mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
Autoreformat code while building
autoreformat while build
This commit is contained in:
@@ -0,0 +1 @@
|
||||
/dist
|
||||
@@ -0,0 +1,406 @@
|
||||
PyDIVKit examples
|
||||
=================
|
||||
|
||||
This library is for working with DivKit with python.
|
||||
|
||||
Features:
|
||||
* Declarative and imperative DivKit blocks definition
|
||||
* Native Type-hints support
|
||||
* Complete object-oriented API
|
||||
* IDE type checks and suggestions
|
||||
|
||||
Object construction
|
||||
-------------------
|
||||
|
||||
The main idea is a provides ability to construct blocks by python objects.
|
||||
|
||||
```python
|
||||
import json
|
||||
import pydivkit as dk
|
||||
|
||||
container = dk.DivContainer(
|
||||
items=[
|
||||
dk.DivGallery(
|
||||
items=[
|
||||
dk.DivText(text="Hello from pydivkit")
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
print(json.dumps(container.dict(), indent=1))
|
||||
# {
|
||||
# "type": "container",
|
||||
# "items": [
|
||||
# {
|
||||
# "type": "gallery",
|
||||
# "items": [
|
||||
# {
|
||||
# "type": "text",
|
||||
# "text": "Hello from pydivkit"
|
||||
# }
|
||||
# ]
|
||||
# }
|
||||
# ]
|
||||
# }
|
||||
```
|
||||
|
||||
Slider example
|
||||
--------------
|
||||
|
||||
Following code is a rewritten slider example using pydivkit.
|
||||
|
||||
```python
|
||||
import pydivkit as dk
|
||||
|
||||
|
||||
slider = dk.DivData(
|
||||
log_id="sample_card",
|
||||
states=[
|
||||
dk.DivDataState(
|
||||
state_id=0,
|
||||
div=dk.DivSlider(
|
||||
width=dk.DivMatchParentSize(),
|
||||
max_value=10,
|
||||
min_value=1,
|
||||
thumb_style=dk.DivShapeDrawable(
|
||||
color="#00b300",
|
||||
stroke=dk.DivStroke(
|
||||
color="#ffffff",
|
||||
width=3,
|
||||
),
|
||||
shape=dk.DivRoundedRectangleShape(
|
||||
item_width=dk.DivFixedSize(value=32),
|
||||
item_height=dk.DivFixedSize(value=32),
|
||||
corner_radius=dk.DivFixedSize(value=100)
|
||||
),
|
||||
),
|
||||
track_active_style=dk.DivShapeDrawable(
|
||||
color="#00b300",
|
||||
shape=dk.DivRoundedRectangleShape(
|
||||
item_height=dk.DivFixedSize(value=6)
|
||||
)
|
||||
),
|
||||
track_inactive_style=dk.DivShapeDrawable(
|
||||
color="#20000000",
|
||||
shape=dk.DivRoundedRectangleShape(
|
||||
item_height=dk.DivFixedSize(value=6)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
```
|
||||
|
||||
This example might be serialised like this:
|
||||
|
||||
```python
|
||||
import json
|
||||
|
||||
print(json.dumps(slider.dict(), indent=1))
|
||||
# {
|
||||
# "log_id": "sample_card",
|
||||
# "states": [
|
||||
# {
|
||||
# "div": {
|
||||
# "type": "slider",
|
||||
# "max_value": 10,
|
||||
# "min_value": 1,
|
||||
# "thumb_style": {
|
||||
# "type": "shape_drawable",
|
||||
# "color": "#00b300",
|
||||
# "shape": {
|
||||
# "type": "rounded_rectangle",
|
||||
# "corner_radius": {
|
||||
# "type": "fixed",
|
||||
# "value": 100
|
||||
# },
|
||||
# "item_height": {
|
||||
# "type": "fixed",
|
||||
# "value": 32
|
||||
# },
|
||||
# "item_width": {
|
||||
# "type": "fixed",
|
||||
# "value": 32
|
||||
# }
|
||||
# },
|
||||
# "stroke": {
|
||||
# "color": "#ffffff",
|
||||
# "width": 3
|
||||
# }
|
||||
# },
|
||||
# "track_active_style": {
|
||||
# "type": "shape_drawable",
|
||||
# "color": "#00b300",
|
||||
# "shape": {
|
||||
# "type": "rounded_rectangle",
|
||||
# "item_height": {
|
||||
# "type": "fixed",
|
||||
# "value": 6
|
||||
# }
|
||||
# }
|
||||
# },
|
||||
# "track_inactive_style": {
|
||||
# "type": "shape_drawable",
|
||||
# "color": "#20000000",
|
||||
# "shape": {
|
||||
# "type": "rounded_rectangle",
|
||||
# "item_height": {
|
||||
# "type": "fixed",
|
||||
# "value": 6
|
||||
# }
|
||||
# }
|
||||
# },
|
||||
# "width": {
|
||||
# "type": "match_parent"
|
||||
# }
|
||||
# },
|
||||
# "state_id": 0
|
||||
# }
|
||||
# ]
|
||||
# }
|
||||
```
|
||||
|
||||
Templating and DRY
|
||||
------------------
|
||||
|
||||
Of course building blocks from your code every time manually it's
|
||||
a very boring. So the first idea it's a move initialization of the
|
||||
DivKit objects to the functions.
|
||||
|
||||
```python
|
||||
# Naive DRY example which strictly non-recommended
|
||||
import pydivkit as dk
|
||||
|
||||
|
||||
def get_size(value: int = 32) -> dk.DivFixedSize:
|
||||
return dk.DivFixedSize(value=value)
|
||||
|
||||
|
||||
def get_shape() -> dk.DivShape:
|
||||
return dk.DivShape(
|
||||
item_width=get_size(),
|
||||
item_height=get_size(),
|
||||
corner_radius=get_size(100)
|
||||
)
|
||||
|
||||
|
||||
slider_shape = get_shape()
|
||||
|
||||
slider = dk.DivData(
|
||||
log_id="sample_card",
|
||||
states=[
|
||||
dk.DivDataState(
|
||||
# other arguments
|
||||
div=dk.DivSlider(
|
||||
thumb_style=dk.DivShapeDrawable(
|
||||
shape=slider_shape,
|
||||
# other arguments
|
||||
),
|
||||
# other arguments
|
||||
)
|
||||
)
|
||||
]
|
||||
)
|
||||
```
|
||||
|
||||
Looks a little better, but this approach doesn't scale well. To simplify layout
|
||||
and save traffic, DivKit has templates. This is a way to layout similar elements
|
||||
without having to declare the complete json, but just declare a template and use
|
||||
this many times in similar items.
|
||||
|
||||
**PyDivKit supports defining templates through the inheritance.**
|
||||
|
||||
Let's define an example card.
|
||||
|
||||
```python
|
||||
import json
|
||||
|
||||
import pydivkit as dk
|
||||
|
||||
|
||||
class CategoriesItem(dk.DivContainer):
|
||||
"""
|
||||
Class inherited from dk.DivContainer will have a template
|
||||
"""
|
||||
|
||||
# Special object for mark this fields a DivKit field in template
|
||||
icon_url: str = dk.Field()
|
||||
text: str = dk.Field()
|
||||
|
||||
# Set defaults layout for in the template
|
||||
width = dk.DivWrapContentSize()
|
||||
background = [dk.DivSolidBackground(color="#f0f0f0")]
|
||||
content_alignment_vertical = dk.DivAlignmentVertical.CENTER
|
||||
orientation = dk.DivContainerOrientation.HORIZONTAL
|
||||
paddings = dk.DivEdgeInsets(left=12, right=12, top=10, bottom=10)
|
||||
border = dk.DivBorder(corner_radius=12)
|
||||
items = [
|
||||
dk.DivImage(
|
||||
width=dk.DivFixedSize(value=20),
|
||||
height=dk.DivFixedSize(value=20),
|
||||
margins=dk.DivEdgeInsets(right=6),
|
||||
|
||||
# Special object Ref it's a reference for Field property
|
||||
image_url=dk.Ref(icon_url),
|
||||
),
|
||||
dk.DivText(
|
||||
width=dk.DivWrapContentSize(),
|
||||
max_lines=1,
|
||||
|
||||
# Special object Ref it's a reference for Field property
|
||||
text=dk.Ref(text),
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
BASE_URL = "https://leonardo.edadeal.io/dyn/re/segments/level1/96"
|
||||
|
||||
|
||||
# So after class definition you might use all the `Field` marked property
|
||||
# names as an argument.
|
||||
|
||||
gallery = dk.DivGallery(
|
||||
items=[
|
||||
CategoriesItem(
|
||||
text="Food", icon_url=f"{BASE_URL}/food.png",
|
||||
),
|
||||
CategoriesItem(
|
||||
text="Alcohol", icon_url=f"{BASE_URL}/alcohol.png",
|
||||
),
|
||||
CategoriesItem(
|
||||
text="Household", icon_url=f"{BASE_URL}/household.png",
|
||||
),
|
||||
]
|
||||
)
|
||||
|
||||
print(json.dumps(dk.make_div(gallery), indent=1, ensure_ascii=False))
|
||||
# {
|
||||
# "templates": {
|
||||
# "__main__.CategoriesItem": {
|
||||
# "type": "container",
|
||||
# "background": [
|
||||
# {
|
||||
# "type": "solid",
|
||||
# "color": "#f0f0f0"
|
||||
# }
|
||||
# ],
|
||||
# "border": {
|
||||
# "corner_radius": 12
|
||||
# },
|
||||
# "content_alignment_vertical": "center",
|
||||
# "items": [
|
||||
# {
|
||||
# "type": "image",
|
||||
# "height": {
|
||||
# "type": "fixed",
|
||||
# "value": 20
|
||||
# },
|
||||
# "$image_url": "icon_url",
|
||||
# "margins": {
|
||||
# "right": 6
|
||||
# },
|
||||
# "width": {
|
||||
# "type": "fixed",
|
||||
# "value": 20
|
||||
# }
|
||||
# },
|
||||
# {
|
||||
# "type": "text",
|
||||
# "max_lines": 1,
|
||||
# "$text": "text",
|
||||
# "width": {
|
||||
# "type": "wrap_content"
|
||||
# }
|
||||
# }
|
||||
# ],
|
||||
# "orientation": "horizontal",
|
||||
# "paddings": {
|
||||
# "bottom": 10,
|
||||
# "left": 12,
|
||||
# "right": 12,
|
||||
# "top": 10
|
||||
# },
|
||||
# "width": {
|
||||
# "type": "wrap_content"
|
||||
# }
|
||||
# }
|
||||
# },
|
||||
# "card": {
|
||||
# "log_id": "card",
|
||||
# "states": [
|
||||
# {
|
||||
# "div": {
|
||||
# "type": "gallery",
|
||||
# "items": [
|
||||
# {
|
||||
# "type": "__main__.CategoriesItem",
|
||||
# "icon_url": "https://leonardo.edadeal.io/dyn/re/segments/level1/96/food.png",
|
||||
# "text": "Food"
|
||||
# },
|
||||
# {
|
||||
# "type": "__main__.CategoriesItem",
|
||||
# "icon_url": "https://leonardo.edadeal.io/dyn/re/segments/level1/96/alcohol.png",
|
||||
# "text": "Alcohol"
|
||||
# },
|
||||
# {
|
||||
# "type": "__main__.CategoriesItem",
|
||||
# "icon_url": "https://leonardo.edadeal.io/dyn/re/segments/level1/96/household.png",
|
||||
# "text": "Household"
|
||||
# }
|
||||
# ]
|
||||
# },
|
||||
# "state_id": 0
|
||||
# }
|
||||
# ]
|
||||
# }
|
||||
# }
|
||||
```
|
||||
|
||||
Template names
|
||||
--------------
|
||||
|
||||
By default, templates are collecting by the metaclass into shared storage when
|
||||
the class is declaring at import time, and have the
|
||||
format `{module_name}.{class_name}`.
|
||||
|
||||
The following example, which I am sure will not occur in the wild, shows a
|
||||
warning if suddenly the names of the classes, and hence the templates, conflict.
|
||||
|
||||
```python
|
||||
import pydivkit as dk
|
||||
|
||||
|
||||
class MyTemplate(dk.DivContainer):
|
||||
width = dk.DivWrapContentSize()
|
||||
|
||||
|
||||
class MyTemplate(dk.DivContainer):
|
||||
pass
|
||||
|
||||
# RuntimeWarning: Template 'test.MyTemplate' already defined in
|
||||
# <class 'test.MyTemplate'> and will be replaced to <class 'test.MyTemplate'>
|
||||
```
|
||||
|
||||
Also, if you do not want to show the structure of your project to the outside,
|
||||
or for some reason you need to make the example above clean, you can rename the
|
||||
template by declaring a special attribute `__template_name__`
|
||||
|
||||
```python
|
||||
import pydivkit as dk
|
||||
|
||||
|
||||
class MyTemplate(dk.DivContainer):
|
||||
width = dk.DivWrapContentSize()
|
||||
|
||||
print(MyTemplate.template_name)
|
||||
# >>> test.MyTemplate
|
||||
|
||||
class MyTemplate(dk.DivContainer):
|
||||
__template_name__ = "MyTemplate2"
|
||||
|
||||
print(MyTemplate.template_name)
|
||||
# >>> MyTemplate2
|
||||
```
|
||||
@@ -11,3 +11,11 @@ apiGenDir=$scriptDir/../../api_generator
|
||||
cd $apiGenDir
|
||||
echo Executing api_generator with [config = $config] [schemaDir = $schemaDir] [outputDir = $outputDir]
|
||||
python3 -m api_generator -c $config -s $schemaDir -o $outputDir
|
||||
|
||||
echo "Install poetry"
|
||||
python3 -m pip install poetry
|
||||
|
||||
echo "Install requirements"
|
||||
(cd $outputDir/../.. && python3 -m poetry install --no-root -n)
|
||||
echo "Reformat code"
|
||||
(cd $outputDir/../.. && python3 -m poetry run gray $outputDir)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"lang": "python",
|
||||
"header": "# Generated code. Do not modify.\n\nfrom __future__ import annotations\nfrom pydivkit.core import BaseDiv, Field\nimport enum\nimport typing\n"
|
||||
"header": "# Generated code. Do not modify.\n# flake8: noqa: F401, F405, F811\n\nfrom __future__ import annotations\nfrom pydivkit.core import BaseDiv, Field\nimport enum\nimport typing\n\n"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
formatters = add-trailing-comma,isort,unify
|
||||
min-python-version = 3.7
|
||||
log-level = error
|
||||
Generated
+1070
File diff suppressed because it is too large
Load Diff
@@ -1 +1,29 @@
|
||||
from pydivkit.div import * # noqa
|
||||
# flake8: noqa: F405
|
||||
from typing import Dict, Any
|
||||
|
||||
from pydivkit.core import Field, Ref
|
||||
from pydivkit.div import *
|
||||
from pydivkit.div import __all__ as __div_all__
|
||||
|
||||
|
||||
def make_card(log_id: str, *divs: Div):
|
||||
return DivData(
|
||||
log_id=log_id,
|
||||
states=[
|
||||
DivDataState(state_id=state_id, div=div)
|
||||
for state_id, div in enumerate(divs)
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
def make_div(div: Div) -> Dict[str, Any]:
|
||||
return {
|
||||
"templates": {
|
||||
tpl.template_name: tpl.template()
|
||||
for tpl in div.related_templates()
|
||||
},
|
||||
"card": make_card("card", div).dict(),
|
||||
}
|
||||
|
||||
|
||||
__all__ = ("Field", "Ref", "make_card", "make_div") + __div_all__
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from .entities import BaseDiv, BaseEntity
|
||||
from .fields import Field, Ref
|
||||
|
||||
|
||||
__all__ = (
|
||||
"BaseEntity",
|
||||
"BaseDiv",
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
from typing import Any, Callable, Generic, Type, TypeVar
|
||||
|
||||
|
||||
T = TypeVar("T")
|
||||
V = TypeVar("V")
|
||||
|
||||
|
||||
# noinspection PyPep8Naming
|
||||
class classproperty(Generic[T, V]):
|
||||
""" mypy friendly classproperty """
|
||||
|
||||
def __init__(self, getter: Callable[[Type[T]], V]) -> None:
|
||||
self.getter = getattr(getter, "__func__", getter)
|
||||
|
||||
def __get__(self, instance: Any, owner: Type[T]) -> V:
|
||||
return self.getter(owner)
|
||||
|
||||
|
||||
__all__ = "classproperty",
|
||||
@@ -4,6 +4,7 @@ import enum
|
||||
import hashlib
|
||||
import json
|
||||
import uuid
|
||||
import warnings
|
||||
from collections import defaultdict
|
||||
from functools import reduce
|
||||
from types import MappingProxyType
|
||||
@@ -12,8 +13,7 @@ from typing import (
|
||||
get_args, get_origin, get_type_hints,
|
||||
)
|
||||
|
||||
import inflection
|
||||
|
||||
from .compat import classproperty
|
||||
from .fields import _Field
|
||||
from .types.union import inject_types
|
||||
|
||||
@@ -273,6 +273,7 @@ class BaseEntity:
|
||||
|
||||
__subclasses__: Dict[str, Type[BaseEntity]] = {}
|
||||
__related_templates__: FrozenSet[Type[BaseDiv]] = frozenset({})
|
||||
__template_name__: Optional[str] = None
|
||||
|
||||
def __init__(self, **kwargs: Any) -> None:
|
||||
if self.__fields__ and not self.__field_types__:
|
||||
@@ -289,11 +290,22 @@ class BaseEntity:
|
||||
if field_name not in kwargs:
|
||||
setattr(self, field_name, field.default)
|
||||
|
||||
@classproperty
|
||||
@classmethod
|
||||
def template_name(cls) -> str:
|
||||
if cls.__template_name__ is not None:
|
||||
return cls.__template_name__
|
||||
return f"{cls.__module__}.{cls.__name__}"
|
||||
|
||||
def __init_subclass__(cls, *args: Any, **kwargs: Any) -> None:
|
||||
super().__init_subclass__()
|
||||
if cls.__name__ in cls.__subclasses__:
|
||||
raise TypeError(f"Component named {cls.__name__} already exists")
|
||||
cls.__subclasses__[cls.__name__] = cls
|
||||
if cls.template_name in cls.__subclasses__:
|
||||
warnings.warn(
|
||||
f"Template {cls.template_name!r} already defined in "
|
||||
f"{cls.__subclasses__[cls.template_name]!r} "
|
||||
f"and will be replaced to {cls!r}", RuntimeWarning,
|
||||
)
|
||||
cls.__subclasses__[cls.template_name] = cls
|
||||
cls.__fields__ = cls._extract_fields()
|
||||
cls.__field_names__ = cls._extract_field_names(cls.__fields__)
|
||||
cls._remove_fields_from_cls_attrs()
|
||||
@@ -497,9 +509,7 @@ class BaseEntity:
|
||||
field_value = getattr(self, field_name, field.default)
|
||||
if field_value is not None:
|
||||
if isinstance(field_value, _Field) and field_value.ref_to:
|
||||
result[
|
||||
f"${field.field_name}"
|
||||
] = field_value.ref_to.field_name
|
||||
result[f"${field.field_name}"] = field_value.ref_to.field_name
|
||||
else:
|
||||
result[field.field_name] = dump(field_value)
|
||||
return result
|
||||
@@ -708,7 +718,7 @@ class BaseDiv(BaseEntity):
|
||||
@classmethod
|
||||
def _inject_type_field(cls) -> None:
|
||||
if cls.__base_type__:
|
||||
type_value = inflection.underscore(cls.__name__)
|
||||
type_value = cls.template_name
|
||||
setattr(cls, TYPE_FIELD, _Field(default=type_value))
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -23,10 +23,7 @@ class _Field:
|
||||
|
||||
def apply_constraints(self, constraints: Mapping[str, Any]) -> None:
|
||||
for c_key, c_value in constraints.items():
|
||||
if (
|
||||
self.constraints.get(c_key)
|
||||
and self.constraints[c_key] != c_value
|
||||
):
|
||||
if self.constraints.get(c_key) and self.constraints[c_key] != c_value:
|
||||
raise ValueError(
|
||||
f"Incompatible constraints: {c_key} = "
|
||||
f"{self.constraints[c_key]} and {c_key} = {c_value}",
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F405
|
||||
|
||||
from .boolean_variable import BooleanVariable
|
||||
from .color_variable import ColorVariable
|
||||
from .div import Div
|
||||
from .div_accessibility import DivAccessibility, DivAccessibilityMode, DivAccessibilityType
|
||||
from .div_action import DivAction, DivActionTarget, DivActionMenuItem
|
||||
from .div_absolute_edge_insets import DivAbsoluteEdgeInsets
|
||||
from .div_accessibility import (
|
||||
DivAccessibility, DivAccessibilityMode, DivAccessibilityType,
|
||||
)
|
||||
from .div_action import DivAction, DivActionMenuItem, DivActionTarget
|
||||
from .div_alignment_horizontal import DivAlignmentHorizontal
|
||||
from .div_alignment_vertical import DivAlignmentVertical
|
||||
from .div_animation import DivAnimation, DivAnimationName
|
||||
@@ -14,11 +18,16 @@ from .div_appearance_transition import DivAppearanceTransition
|
||||
from .div_aspect import DivAspect
|
||||
from .div_background import DivBackground
|
||||
from .div_base import DivBase
|
||||
from .div_blend_mode import DivBlendMode
|
||||
from .div_border import DivBorder
|
||||
from .div_change_bounds_transition import DivChangeBoundsTransition
|
||||
from .div_change_set_transition import DivChangeSetTransition
|
||||
from .div_change_transition import DivChangeTransition
|
||||
from .div_container import DivContainer, DivContainerLayoutMode, DivContainerOrientation
|
||||
from .div_circle_shape import DivCircleShape
|
||||
from .div_container import (
|
||||
DivContainer, DivContainerLayoutMode, DivContainerOrientation,
|
||||
DivContainerSeparator,
|
||||
)
|
||||
from .div_corners_radius import DivCornersRadius
|
||||
from .div_count import DivCount
|
||||
from .div_custom import DivCustom
|
||||
@@ -34,7 +43,10 @@ from .div_fixed_size import DivFixedSize
|
||||
from .div_focus import DivFocus, DivFocusNextFocusIds
|
||||
from .div_font_family import DivFontFamily
|
||||
from .div_font_weight import DivFontWeight
|
||||
from .div_gallery import DivGallery, DivGalleryCrossContentAlignment, DivGalleryOrientation, DivGalleryScrollMode
|
||||
from .div_gallery import (
|
||||
DivGallery, DivGalleryCrossContentAlignment, DivGalleryOrientation,
|
||||
DivGalleryScrollMode,
|
||||
)
|
||||
from .div_gif_image import DivGifImage
|
||||
from .div_grid import DivGrid
|
||||
from .div_image import DivImage
|
||||
@@ -47,19 +59,29 @@ from .div_line_style import DivLineStyle
|
||||
from .div_linear_gradient import DivLinearGradient
|
||||
from .div_match_parent_size import DivMatchParentSize
|
||||
from .div_neighbour_page_size import DivNeighbourPageSize
|
||||
from .div_nine_patch_background import DivNinePatchBackground
|
||||
from .div_page_size import DivPageSize
|
||||
from .div_pager import DivPager, DivPagerOrientation
|
||||
from .div_pager_layout_mode import DivPagerLayoutMode
|
||||
from .div_patch import DivPatch, DivPatchMode, DivPatchChange
|
||||
from .div_patch import DivPatch, DivPatchChange, DivPatchMode
|
||||
from .div_percentage_size import DivPercentageSize
|
||||
from .div_pivot import DivPivot
|
||||
from .div_pivot_fixed import DivPivotFixed
|
||||
from .div_pivot_percentage import DivPivotPercentage
|
||||
from .div_point import DivPoint
|
||||
from .div_radial_gradient import DivRadialGradient
|
||||
from .div_radial_gradient_center import DivRadialGradientCenter
|
||||
from .div_radial_gradient_fixed_center import DivRadialGradientFixedCenter
|
||||
from .div_radial_gradient_radius import DivRadialGradientRadius
|
||||
from .div_radial_gradient_relative_center import DivRadialGradientRelativeCenter
|
||||
from .div_radial_gradient_relative_radius import (
|
||||
DivRadialGradientRelativeRadius, DivRadialGradientRelativeRadiusValue,
|
||||
)
|
||||
from .div_rounded_rectangle_shape import DivRoundedRectangleShape
|
||||
from .div_scale_transition import DivScaleTransition
|
||||
from .div_separator import DivSeparator, DivSeparatorDelimiterStyle, DelimiterStyleOrientation
|
||||
from .div_separator import (
|
||||
DelimiterStyleOrientation, DivSeparator, DivSeparatorDelimiterStyle,
|
||||
)
|
||||
from .div_shadow import DivShadow
|
||||
from .div_shape import DivShape
|
||||
from .div_shape_drawable import DivShapeDrawable
|
||||
@@ -70,8 +92,12 @@ from .div_slider import DivSlider, DivSliderTextStyle
|
||||
from .div_solid_background import DivSolidBackground
|
||||
from .div_state import DivState, DivStateState
|
||||
from .div_stroke import DivStroke
|
||||
from .div_tabs import DivTabs, DivTabsItem, DivTabsTabTitleStyle, TabTitleStyleAnimationType
|
||||
from .div_text import DivText, DivTextTruncate, DivTextEllipsis, DivTextImage, DivTextRange
|
||||
from .div_tabs import (
|
||||
DivTabs, DivTabsItem, DivTabsTabTitleStyle, TabTitleStyleAnimationType,
|
||||
)
|
||||
from .div_text import (
|
||||
DivText, DivTextEllipsis, DivTextImage, DivTextRange, DivTextTruncate,
|
||||
)
|
||||
from .div_text_gradient import DivTextGradient
|
||||
from .div_tooltip import DivTooltip, DivTooltipPosition
|
||||
from .div_transform import DivTransform
|
||||
@@ -88,8 +114,10 @@ from .number_variable import NumberVariable
|
||||
from .string_variable import StringVariable
|
||||
from .url_variable import UrlVariable
|
||||
|
||||
|
||||
BooleanVariable.update_forward_refs()
|
||||
ColorVariable.update_forward_refs()
|
||||
DivAbsoluteEdgeInsets.update_forward_refs()
|
||||
DivAccessibility.update_forward_refs()
|
||||
DivAction.update_forward_refs()
|
||||
DivActionMenuItem.update_forward_refs()
|
||||
@@ -100,7 +128,9 @@ DivBase.update_forward_refs()
|
||||
DivBorder.update_forward_refs()
|
||||
DivChangeBoundsTransition.update_forward_refs()
|
||||
DivChangeSetTransition.update_forward_refs()
|
||||
DivCircleShape.update_forward_refs()
|
||||
DivContainer.update_forward_refs()
|
||||
DivContainerSeparator.update_forward_refs()
|
||||
DivCornersRadius.update_forward_refs()
|
||||
DivCustom.update_forward_refs()
|
||||
DivData.update_forward_refs()
|
||||
@@ -126,6 +156,7 @@ DivInputNativeInterface.update_forward_refs()
|
||||
DivLinearGradient.update_forward_refs()
|
||||
DivMatchParentSize.update_forward_refs()
|
||||
DivNeighbourPageSize.update_forward_refs()
|
||||
DivNinePatchBackground.update_forward_refs()
|
||||
DivPageSize.update_forward_refs()
|
||||
DivPager.update_forward_refs()
|
||||
DivPatch.update_forward_refs()
|
||||
@@ -135,6 +166,9 @@ DivPivotFixed.update_forward_refs()
|
||||
DivPivotPercentage.update_forward_refs()
|
||||
DivPoint.update_forward_refs()
|
||||
DivRadialGradient.update_forward_refs()
|
||||
DivRadialGradientFixedCenter.update_forward_refs()
|
||||
DivRadialGradientRelativeCenter.update_forward_refs()
|
||||
DivRadialGradientRelativeRadius.update_forward_refs()
|
||||
DivRoundedRectangleShape.update_forward_refs()
|
||||
DivScaleTransition.update_forward_refs()
|
||||
DivSeparator.update_forward_refs()
|
||||
@@ -165,3 +199,5 @@ IntegerVariable.update_forward_refs()
|
||||
NumberVariable.update_forward_refs()
|
||||
StringVariable.update_forward_refs()
|
||||
UrlVariable.update_forward_refs()
|
||||
|
||||
__all__ = ("BooleanVariable", "ColorVariable", "DelimiterStyleOrientation", "Div", "DivAbsoluteEdgeInsets", "DivAccessibility", "DivAccessibilityMode", "DivAccessibilityType", "DivAction", "DivActionMenuItem", "DivActionTarget", "DivAlignmentHorizontal", "DivAlignmentVertical", "DivAnimation", "DivAnimationInterpolator", "DivAnimationName", "DivAppearanceSetTransition", "DivAppearanceTransition", "DivAspect", "DivBackground", "DivBase", "DivBlendMode", "DivBorder", "DivChangeBoundsTransition", "DivChangeSetTransition", "DivChangeTransition", "DivCircleShape", "DivContainer", "DivContainerLayoutMode", "DivContainerOrientation", "DivContainerSeparator", "DivCornersRadius", "DivCount", "DivCustom", "DivData", "DivDataState", "DivDimension", "DivDownloadCallbacks", "DivDrawable", "DivEdgeInsets", "DivExtension", "DivFadeTransition", "DivFixedCount", "DivFixedSize", "DivFocus", "DivFocusNextFocusIds", "DivFontFamily", "DivFontWeight", "DivGallery", "DivGalleryCrossContentAlignment", "DivGalleryOrientation", "DivGalleryScrollMode", "DivGifImage", "DivGrid", "DivImage", "DivImageBackground", "DivImageScale", "DivIndicator", "DivIndicatorAnimation", "DivInfinityCount", "DivInput", "DivInputKeyboardType", "DivInputNativeInterface", "DivLineStyle", "DivLinearGradient", "DivMatchParentSize", "DivNeighbourPageSize", "DivNinePatchBackground", "DivPageSize", "DivPager", "DivPagerLayoutMode", "DivPagerOrientation", "DivPatch", "DivPatchChange", "DivPatchMode", "DivPercentageSize", "DivPivot", "DivPivotFixed", "DivPivotPercentage", "DivPoint", "DivRadialGradient", "DivRadialGradientCenter", "DivRadialGradientFixedCenter", "DivRadialGradientRadius", "DivRadialGradientRelativeCenter", "DivRadialGradientRelativeRadius", "DivRadialGradientRelativeRadiusValue", "DivRoundedRectangleShape", "DivScaleTransition", "DivSeparator", "DivSeparatorDelimiterStyle", "DivShadow", "DivShape", "DivShapeDrawable", "DivSize", "DivSizeUnit", "DivSlideTransition", "DivSlideTransitionEdge", "DivSlider", "DivSliderTextStyle", "DivSolidBackground", "DivState", "DivStateState", "DivStroke", "DivTabs", "DivTabsItem", "DivTabsTabTitleStyle", "DivText", "DivTextEllipsis", "DivTextGradient", "DivTextImage", "DivTextRange", "DivTextTruncate", "DivTooltip", "DivTooltipPosition", "DivTransform", "DivTransitionBase", "DivTransitionSelector", "DivTransitionTrigger", "DivTrigger", "DivTriggerMode", "DivVariable", "DivVisibility", "DivVisibilityAction", "DivWrapContentSize", "IntegerVariable", "NumberVariable", "StringVariable", "TabTitleStyleAnimationType", "UrlVariable")
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
# A Boolean variable in binary format.
|
||||
class BooleanVariable(BaseDiv):
|
||||
@@ -13,7 +16,7 @@ class BooleanVariable(BaseDiv):
|
||||
self, *,
|
||||
name: str,
|
||||
value: bool,
|
||||
type: str = 'boolean',
|
||||
type: str = "boolean",
|
||||
):
|
||||
super().__init__(
|
||||
type=type,
|
||||
@@ -21,9 +24,14 @@ class BooleanVariable(BaseDiv):
|
||||
value=value,
|
||||
)
|
||||
|
||||
type: str = Field(default='boolean')
|
||||
name: str = Field(min_length=1, description='Variable name.')
|
||||
value: bool = Field(description='Value.')
|
||||
type: str = Field(default="boolean")
|
||||
name: str = Field(
|
||||
min_length=1,
|
||||
description="Variable name.",
|
||||
)
|
||||
value: bool = Field(
|
||||
description="Value.",
|
||||
)
|
||||
|
||||
|
||||
BooleanVariable.update_forward_refs()
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
# Variable — HEX color as a string.
|
||||
class ColorVariable(BaseDiv):
|
||||
@@ -13,7 +16,7 @@ class ColorVariable(BaseDiv):
|
||||
self, *,
|
||||
name: str,
|
||||
value: str,
|
||||
type: str = 'color',
|
||||
type: str = "color",
|
||||
):
|
||||
super().__init__(
|
||||
type=type,
|
||||
@@ -21,9 +24,15 @@ class ColorVariable(BaseDiv):
|
||||
value=value,
|
||||
)
|
||||
|
||||
type: str = Field(default='color')
|
||||
name: str = Field(min_length=1, description='Variable name.')
|
||||
value: str = Field(format="color", description='Value.')
|
||||
type: str = Field(default="color")
|
||||
name: str = Field(
|
||||
min_length=1,
|
||||
description="Variable name.",
|
||||
)
|
||||
value: str = Field(
|
||||
format="color",
|
||||
description="Value.",
|
||||
)
|
||||
|
||||
|
||||
ColorVariable.update_forward_refs()
|
||||
|
||||
@@ -1,27 +1,21 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div_container
|
||||
from . import div_custom
|
||||
from . import div_gallery
|
||||
from . import div_gif_image
|
||||
from . import div_grid
|
||||
from . import div_image
|
||||
from . import div_indicator
|
||||
from . import div_input
|
||||
from . import div_pager
|
||||
from . import div_separator
|
||||
from . import div_slider
|
||||
from . import div_state
|
||||
from . import div_tabs
|
||||
from . import div_text
|
||||
|
||||
from typing import Union
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import (
|
||||
div_container, div_custom, div_gallery, div_gif_image, div_grid, div_image,
|
||||
div_indicator, div_input, div_pager, div_separator, div_slider, div_state,
|
||||
div_tabs, div_text,
|
||||
)
|
||||
|
||||
|
||||
Div = Union[
|
||||
div_image.DivImage,
|
||||
div_gif_image.DivGifImage,
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
# Sets the margins, without taking the properties of the screen.
|
||||
class DivAbsoluteEdgeInsets(BaseDiv):
|
||||
|
||||
def __init__(
|
||||
self, *,
|
||||
bottom: typing.Optional[int] = None,
|
||||
left: typing.Optional[int] = None,
|
||||
right: typing.Optional[int] = None,
|
||||
top: typing.Optional[int] = None,
|
||||
):
|
||||
super().__init__(
|
||||
bottom=bottom,
|
||||
left=left,
|
||||
right=right,
|
||||
top=top,
|
||||
)
|
||||
|
||||
bottom: typing.Optional[int] = Field(
|
||||
description="Bottom margin.",
|
||||
)
|
||||
left: typing.Optional[int] = Field(
|
||||
description="Left margin.",
|
||||
)
|
||||
right: typing.Optional[int] = Field(
|
||||
description="Right margin.",
|
||||
)
|
||||
top: typing.Optional[int] = Field(
|
||||
description="Top margin.",
|
||||
)
|
||||
|
||||
|
||||
DivAbsoluteEdgeInsets.update_forward_refs()
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
# Accessibility for disabled people.
|
||||
class DivAccessibility(BaseDiv):
|
||||
@@ -27,28 +30,66 @@ class DivAccessibility(BaseDiv):
|
||||
type=type,
|
||||
)
|
||||
|
||||
description: typing.Optional[str] = Field(min_length=1, description='Element description. It is used as the main description for screen readingapplications.')
|
||||
hint: typing.Optional[str] = Field(min_length=1, description='A tooltip of what will happen during interaction. If Speak Hints is enabled inthe VoiceOver settings on iOS, a tooltip is played after `description`.')
|
||||
mode: typing.Optional[DivAccessibilityMode] = Field(description='The way the accessibility tree is organized. In the `merge` mode theaccessibility service perceives an element together with a subtree as a whole. Inthe `exclude` mode an element together with a subtree isn\'t available foraccessibility.')
|
||||
mute_after_action: typing.Optional[bool] = Field(description='Mutes the sound of the screen reader after interacting with the element.')
|
||||
state_description: typing.Optional[str] = Field(min_length=1, description='Description of the current state of an element. For example, in the descriptionyou can specify a selected date for a date selection element and an on/off statefor a switch.')
|
||||
type: typing.Optional[DivAccessibilityType] = Field(description='Element role. It is used for correct identification of an element by anaccessibility service.')
|
||||
description: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
description=(
|
||||
"Element description. It is used as the main description for "
|
||||
"screen readingapplications."
|
||||
),
|
||||
)
|
||||
hint: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
description=(
|
||||
"A tooltip of what will happen during interaction. If Speak "
|
||||
"Hints is enabled inthe VoiceOver settings on iOS, a tooltip "
|
||||
"is played after `description`."
|
||||
),
|
||||
)
|
||||
mode: typing.Optional[DivAccessibilityMode] = Field(
|
||||
description=(
|
||||
"The way the accessibility tree is organized. In the `merge` "
|
||||
"mode theaccessibility service perceives an element together "
|
||||
"with a subtree as a whole. Inthe `exclude` mode an element "
|
||||
"together with a subtree isn\'t available foraccessibility."
|
||||
),
|
||||
)
|
||||
mute_after_action: typing.Optional[bool] = Field(
|
||||
description=(
|
||||
"Mutes the sound of the screen reader after interacting with "
|
||||
"the element."
|
||||
),
|
||||
)
|
||||
state_description: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
description=(
|
||||
"Description of the current state of an element. For "
|
||||
"example, in the descriptionyou can specify a selected date "
|
||||
"for a date selection element and an on/off statefor a "
|
||||
"switch."
|
||||
),
|
||||
)
|
||||
type: typing.Optional[DivAccessibilityType] = Field(
|
||||
description=(
|
||||
"Element role. It is used for correct identification of an "
|
||||
"element by anaccessibility service."
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
class DivAccessibilityMode(str, enum.Enum):
|
||||
DEFAULT = 'default'
|
||||
MERGE = 'merge'
|
||||
EXCLUDE = 'exclude'
|
||||
DEFAULT = "default"
|
||||
MERGE = "merge"
|
||||
EXCLUDE = "exclude"
|
||||
|
||||
|
||||
class DivAccessibilityType(str, enum.Enum):
|
||||
NONE = 'none'
|
||||
BUTTON = 'button'
|
||||
IMAGE = 'image'
|
||||
TEXT = 'text'
|
||||
EDIT_TEXT = 'edit_text'
|
||||
HEADER = 'header'
|
||||
TAB_BAR = 'tab_bar'
|
||||
NONE = "none"
|
||||
BUTTON = "button"
|
||||
IMAGE = "image"
|
||||
TEXT = "text"
|
||||
EDIT_TEXT = "edit_text"
|
||||
HEADER = "header"
|
||||
TAB_BAR = "tab_bar"
|
||||
|
||||
|
||||
DivAccessibility.update_forward_refs()
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_download_callbacks
|
||||
|
||||
|
||||
@@ -33,19 +36,47 @@ class DivAction(BaseDiv):
|
||||
url=url,
|
||||
)
|
||||
|
||||
download_callbacks: typing.Optional[div_download_callbacks.DivDownloadCallbacks] = Field(description='Callbacks that are called after [dataloading](../../interaction.dita#loading-data).')
|
||||
log_id: str = Field(min_length=1, description='Logging ID.')
|
||||
log_url: typing.Optional[str] = Field(format="uri", description='URL for logging.')
|
||||
menu_items: typing.Optional[typing.List[DivActionMenuItem]] = Field(min_items=1, description='Context menu.')
|
||||
payload: typing.Optional[typing.Dict[str, typing.Any]] = Field(description='Additional parameters, passed to the host application.')
|
||||
referer: typing.Optional[str] = Field(format="uri", description='Referer URL for logging.')
|
||||
target: typing.Optional[DivActionTarget] = Field(description='The tab in which the URL must be opened.')
|
||||
url: typing.Optional[str] = Field(format="uri", description='URL. Possible values: `url` or `div-action://`. To learn more, see [Interactionwith elements](../../interaction.dita).')
|
||||
download_callbacks: typing.Optional[div_download_callbacks.DivDownloadCallbacks] = Field(
|
||||
description=(
|
||||
"Callbacks that are called after "
|
||||
"[dataloading](../../interaction.dita#loading-data)."
|
||||
),
|
||||
)
|
||||
log_id: str = Field(
|
||||
min_length=1,
|
||||
description="Logging ID.",
|
||||
)
|
||||
log_url: typing.Optional[str] = Field(
|
||||
format="uri",
|
||||
description="URL for logging.",
|
||||
)
|
||||
menu_items: typing.Optional[typing.List[DivActionMenuItem]] = Field(
|
||||
min_items=1,
|
||||
description="Context menu.",
|
||||
)
|
||||
payload: typing.Optional[typing.Dict[str, typing.Any]] = Field(
|
||||
description="Additional parameters, passed to the host application.",
|
||||
)
|
||||
referer: typing.Optional[str] = Field(
|
||||
format="uri",
|
||||
description="Referer URL for logging.",
|
||||
)
|
||||
target: typing.Optional[DivActionTarget] = Field(
|
||||
description="The tab in which the URL must be opened.",
|
||||
)
|
||||
url: typing.Optional[str] = Field(
|
||||
format="uri",
|
||||
description=(
|
||||
"URL. Possible values: `url` or `div-action://`. To learn "
|
||||
"more, see [Interactionwith "
|
||||
"elements](../../interaction.dita)."
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
class DivActionTarget(str, enum.Enum):
|
||||
SELF = '_self'
|
||||
BLANK = '_blank'
|
||||
SELF = "_self"
|
||||
BLANK = "_blank"
|
||||
|
||||
|
||||
class DivActionMenuItem(BaseDiv):
|
||||
@@ -62,9 +93,20 @@ class DivActionMenuItem(BaseDiv):
|
||||
text=text,
|
||||
)
|
||||
|
||||
action: typing.Optional[DivAction] = Field(description='One action when clicking on a menu item. Not used if the `actions` parameter isset.')
|
||||
actions: typing.Optional[typing.List[DivAction]] = Field(min_items=1, description='Multiple actions when clicking on a menu item.')
|
||||
text: str = Field(min_length=1, description='Menu item title.')
|
||||
action: typing.Optional[DivAction] = Field(
|
||||
description=(
|
||||
"One action when clicking on a menu item. Not used if the "
|
||||
"`actions` parameter isset."
|
||||
),
|
||||
)
|
||||
actions: typing.Optional[typing.List[DivAction]] = Field(
|
||||
min_items=1,
|
||||
description="Multiple actions when clicking on a menu item.",
|
||||
)
|
||||
text: str = Field(
|
||||
min_length=1,
|
||||
description="Menu item title.",
|
||||
)
|
||||
|
||||
|
||||
DivActionMenuItem.update_forward_refs()
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
class DivAlignmentHorizontal(str, enum.Enum):
|
||||
LEFT = 'left'
|
||||
CENTER = 'center'
|
||||
RIGHT = 'right'
|
||||
LEFT = "left"
|
||||
CENTER = "center"
|
||||
RIGHT = "right"
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
class DivAlignmentVertical(str, enum.Enum):
|
||||
TOP = 'top'
|
||||
CENTER = 'center'
|
||||
BOTTOM = 'bottom'
|
||||
TOP = "top"
|
||||
CENTER = "center"
|
||||
BOTTOM = "bottom"
|
||||
BASELINE = "baseline"
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div_animation_interpolator
|
||||
from . import div_count
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_animation_interpolator, div_count
|
||||
|
||||
|
||||
# Element animation parameters.
|
||||
@@ -34,23 +36,48 @@ class DivAnimation(BaseDiv):
|
||||
start_value=start_value,
|
||||
)
|
||||
|
||||
duration: typing.Optional[int] = Field(description='Animation duration in milliseconds.')
|
||||
end_value: typing.Optional[float] = Field(description='Final value of an animation.')
|
||||
interpolator: typing.Optional[div_animation_interpolator.DivAnimationInterpolator] = Field(description='Animation speed nature. When the value is set to `spring` — animation of dampingfluctuations cut to 0.7 with the `damping=1` parameter. Other options correspondto the Bezier curve:`linear` — cubic-bezier(0, 0, 1, 1);`ease` —cubic-bezier(0.25, 0.1, 0.25, 1);`ease_in` — cubic-bezier(0.42, 0, 1,1);`ease_out` — cubic-bezier(0, 0, 0.58, 1);`ease_in_out` — cubic-bezier(0.42, 0,0.58, 1).')
|
||||
items: typing.Optional[typing.List[DivAnimation]] = Field(min_items=1, description='Animation elements.')
|
||||
name: DivAnimationName = Field(description='Animation type.')
|
||||
repeat: typing.Optional[div_count.DivCount] = Field(description='Number of animation repetitions.')
|
||||
start_delay: typing.Optional[int] = Field(description='Delay in milliseconds before animation starts.')
|
||||
start_value: typing.Optional[float] = Field(description='Starting value of an animation.')
|
||||
duration: typing.Optional[int] = Field(
|
||||
description="Animation duration in milliseconds.",
|
||||
)
|
||||
end_value: typing.Optional[float] = Field(
|
||||
description="Final value of an animation.",
|
||||
)
|
||||
interpolator: typing.Optional[div_animation_interpolator.DivAnimationInterpolator] = Field(
|
||||
description=(
|
||||
"Animation speed nature. When the value is set to `spring` — "
|
||||
"animation of dampingfluctuations cut to 0.7 with the "
|
||||
"`damping=1` parameter. Other options correspondto the "
|
||||
"Bezier curve:`linear` — cubic-bezier(0, 0, 1, 1);`ease` "
|
||||
"—cubic-bezier(0.25, 0.1, 0.25, 1);`ease_in` — "
|
||||
"cubic-bezier(0.42, 0, 1,1);`ease_out` — cubic-bezier(0, 0, "
|
||||
"0.58, 1);`ease_in_out` — cubic-bezier(0.42, 0,0.58, 1)."
|
||||
),
|
||||
)
|
||||
items: typing.Optional[typing.List[DivAnimation]] = Field(
|
||||
min_items=1,
|
||||
description="Animation elements.",
|
||||
)
|
||||
name: DivAnimationName = Field(
|
||||
description="Animation type.",
|
||||
)
|
||||
repeat: typing.Optional[div_count.DivCount] = Field(
|
||||
description="Number of animation repetitions.",
|
||||
)
|
||||
start_delay: typing.Optional[int] = Field(
|
||||
description="Delay in milliseconds before animation starts.",
|
||||
)
|
||||
start_value: typing.Optional[float] = Field(
|
||||
description="Starting value of an animation.",
|
||||
)
|
||||
|
||||
|
||||
class DivAnimationName(str, enum.Enum):
|
||||
FADE = 'fade'
|
||||
TRANSLATE = 'translate'
|
||||
SCALE = 'scale'
|
||||
NATIVE = 'native'
|
||||
SET = 'set'
|
||||
NO_ANIMATION = 'no_animation'
|
||||
FADE = "fade"
|
||||
TRANSLATE = "translate"
|
||||
SCALE = "scale"
|
||||
NATIVE = "native"
|
||||
SET = "set"
|
||||
NO_ANIMATION = "no_animation"
|
||||
|
||||
|
||||
DivAnimation.update_forward_refs()
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
class DivAnimationInterpolator(str, enum.Enum):
|
||||
LINEAR = 'linear'
|
||||
EASE = 'ease'
|
||||
EASE_IN = 'ease_in'
|
||||
EASE_OUT = 'ease_out'
|
||||
EASE_IN_OUT = 'ease_in_out'
|
||||
SPRING = 'spring'
|
||||
LINEAR = "linear"
|
||||
EASE = "ease"
|
||||
EASE_IN = "ease_in"
|
||||
EASE_OUT = "ease_out"
|
||||
EASE_IN_OUT = "ease_in_out"
|
||||
SPRING = "spring"
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_appearance_transition
|
||||
|
||||
|
||||
@@ -14,15 +17,18 @@ class DivAppearanceSetTransition(BaseDiv):
|
||||
def __init__(
|
||||
self, *,
|
||||
items: typing.List[div_appearance_transition.DivAppearanceTransition],
|
||||
type: str = 'set',
|
||||
type: str = "set",
|
||||
):
|
||||
super().__init__(
|
||||
type=type,
|
||||
items=items,
|
||||
)
|
||||
|
||||
type: str = Field(default='set')
|
||||
items: typing.List[div_appearance_transition.DivAppearanceTransition] = Field(min_items=1, description='An array of animations.')
|
||||
type: str = Field(default="set")
|
||||
items: typing.List[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
min_items=1,
|
||||
description="An array of animations.",
|
||||
)
|
||||
|
||||
|
||||
DivAppearanceSetTransition.update_forward_refs()
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div_appearance_set_transition
|
||||
from . import div_fade_transition
|
||||
from . import div_scale_transition
|
||||
from . import div_slide_transition
|
||||
|
||||
from typing import Union
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import (
|
||||
div_appearance_set_transition, div_fade_transition, div_scale_transition,
|
||||
div_slide_transition,
|
||||
)
|
||||
|
||||
|
||||
DivAppearanceTransition = Union[
|
||||
div_appearance_set_transition.DivAppearanceSetTransition,
|
||||
div_fade_transition.DivFadeTransition,
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
# Size with a fixed aspect ratio. It counts height from width and ignores other
|
||||
# specified height values.
|
||||
@@ -18,7 +21,9 @@ class DivAspect(BaseDiv):
|
||||
ratio=ratio,
|
||||
)
|
||||
|
||||
ratio: float = Field(description='`ratio = width / height`.')
|
||||
ratio: float = Field(
|
||||
description="`ratio = width / height`.",
|
||||
)
|
||||
|
||||
|
||||
DivAspect.update_forward_refs()
|
||||
|
||||
@@ -1,20 +1,24 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div_image_background
|
||||
from . import div_linear_gradient
|
||||
from . import div_radial_gradient
|
||||
from . import div_solid_background
|
||||
|
||||
from typing import Union
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import (
|
||||
div_image_background, div_linear_gradient, div_nine_patch_background,
|
||||
div_radial_gradient, div_solid_background,
|
||||
)
|
||||
|
||||
|
||||
DivBackground = Union[
|
||||
div_linear_gradient.DivLinearGradient,
|
||||
div_radial_gradient.DivRadialGradient,
|
||||
div_image_background.DivImageBackground,
|
||||
div_solid_background.DivSolidBackground,
|
||||
div_nine_patch_background.DivNinePatchBackground,
|
||||
]
|
||||
|
||||
@@ -1,27 +1,20 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div_accessibility
|
||||
from . import div_action
|
||||
from . import div_alignment_horizontal
|
||||
from . import div_alignment_vertical
|
||||
from . import div_appearance_transition
|
||||
from . import div_background
|
||||
from . import div_border
|
||||
from . import div_change_transition
|
||||
from . import div_edge_insets
|
||||
from . import div_extension
|
||||
from . import div_focus
|
||||
from . import div_size
|
||||
from . import div_tooltip
|
||||
from . import div_transform
|
||||
from . import div_transition_trigger
|
||||
from . import div_visibility
|
||||
from . import div_visibility_action
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import (
|
||||
div_accessibility, div_action, div_alignment_horizontal,
|
||||
div_alignment_vertical, div_appearance_transition, div_background,
|
||||
div_border, div_change_transition, div_edge_insets, div_extension,
|
||||
div_focus, div_size, div_tooltip, div_transform, div_transition_trigger,
|
||||
div_visibility, div_visibility_action,
|
||||
)
|
||||
|
||||
|
||||
class DivBase(BaseDiv):
|
||||
@@ -82,31 +75,144 @@ class DivBase(BaseDiv):
|
||||
width=width,
|
||||
)
|
||||
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(description='Accessibility for disabled people.')
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(description='Horizontal alignment of an element inside the parent element.')
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(description='Vertical alignment of an element inside the parent element.')
|
||||
alpha: typing.Optional[float] = Field(description='Sets transparency of the entire element: `0` — completely transparent, `1` —opaque.')
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(min_items=1, description='Element background. It can contain multiple layers.')
|
||||
border: typing.Optional[div_border.DivBorder] = Field(description='Element stroke.')
|
||||
column_span: typing.Optional[int] = Field(description='Merges cells in a column of the [grid](div-grid.md) element.')
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(min_items=1, description='Extensions for additional processing of an element. The list of extensions isgiven in [DivExtension](../../extensions.dita).')
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(description='Parameters when focusing on an element or losing focus.')
|
||||
height: typing.Optional[div_size.DivSize] = Field(description='Element height. For Android: if there is text in this or in a child element,specify height in `sp` to scale the element together with the text. To learn moreabout units of size measurement, see [Layout inside the card](../../layout.dita).')
|
||||
id: typing.Optional[str] = Field(min_length=1, description='Element ID. It must be unique within the root element. It is used as`accessibilityIdentifier` on iOS.')
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='External margins from the element stroke.')
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='Internal margins from the element stroke.')
|
||||
row_span: typing.Optional[int] = Field(description='Merges cells in a string of the [grid](div-grid.md) element.')
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='List of [actions](div-action.md) to be executed when selecting an element in[pager](div-pager.md).')
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(min_items=1, description='Tooltips linked to an element. A tooltip can be shown by`div-action://show_tooltip?id=`, hidden by `div-action://hide_tooltip?id=` where`id` — tooltip id.')
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(description='Transformation of the element. Applies the passed transform to the element. Thecontent that does not fit into the original view will be cut off.')
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(description='Change animation. It is played when the position or size of an element changes inthe new layout.')
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Appearance animation. It is played when an element with a new ID appears. Tolearn more about the concept of transitions, see [Animatedtransitions](../../interaction.dita#animation/transition-animation).')
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Disappearance animation. It is played when an element disappears in the newlayout.')
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(min_items=1, description='Animation starting triggers. Default value: `[state_change, visibility_change]`.')
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(description='Element visibility.')
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(description='Tracking visibility of a single element. Not used if the `visibility_actions`parameter is set.')
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(min_items=1, description='Actions when an element appears on the screen.')
|
||||
width: typing.Optional[div_size.DivSize] = Field(description='Element width.')
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(
|
||||
description="Accessibility for disabled people.",
|
||||
)
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(
|
||||
description=(
|
||||
"Horizontal alignment of an element inside the parent "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(
|
||||
description=(
|
||||
"Vertical alignment of an element inside the parent element."
|
||||
),
|
||||
)
|
||||
alpha: typing.Optional[float] = Field(
|
||||
description=(
|
||||
"Sets transparency of the entire element: `0` — completely "
|
||||
"transparent, `1` —opaque."
|
||||
),
|
||||
)
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(
|
||||
min_items=1,
|
||||
description="Element background. It can contain multiple layers.",
|
||||
)
|
||||
border: typing.Optional[div_border.DivBorder] = Field(
|
||||
description="Element stroke.",
|
||||
)
|
||||
column_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a column of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Extensions for additional processing of an element. The "
|
||||
"list of extensions isgiven in "
|
||||
"[DivExtension](../../extensions.dita)."
|
||||
),
|
||||
)
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(
|
||||
description="Parameters when focusing on an element or losing focus.",
|
||||
)
|
||||
height: typing.Optional[div_size.DivSize] = Field(
|
||||
description=(
|
||||
"Element height. For Android: if there is text in this or in "
|
||||
"a child element,specify height in `sp` to scale the element "
|
||||
"together with the text. To learn moreabout units of size "
|
||||
"measurement, see [Layout inside the "
|
||||
"card](../../layout.dita)."
|
||||
),
|
||||
)
|
||||
id: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
description=(
|
||||
"Element ID. It must be unique within the root element. It "
|
||||
"is used as`accessibilityIdentifier` on iOS."
|
||||
),
|
||||
)
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="External margins from the element stroke.",
|
||||
)
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="Internal margins from the element stroke.",
|
||||
)
|
||||
row_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a string of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"List of [actions](div-action.md) to be executed when "
|
||||
"selecting an element in[pager](div-pager.md)."
|
||||
),
|
||||
)
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Tooltips linked to an element. A tooltip can be shown "
|
||||
"by`div-action://show_tooltip?id=`, hidden by "
|
||||
"`div-action://hide_tooltip?id=` where`id` — tooltip id."
|
||||
),
|
||||
)
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(
|
||||
description=(
|
||||
"Transformation of the element. Applies the passed transform "
|
||||
"to the element. Thecontent that does not fit into the "
|
||||
"original view will be cut off."
|
||||
),
|
||||
)
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(
|
||||
description=(
|
||||
"Change animation. It is played when the position or size of "
|
||||
"an element changes inthe new layout."
|
||||
),
|
||||
)
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Appearance animation. It is played when an element with a "
|
||||
"new ID appears. Tolearn more about the concept of "
|
||||
"transitions, see "
|
||||
"[Animatedtransitions](../../interaction.dita#animation/tran"
|
||||
"sition-animation)."
|
||||
),
|
||||
)
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Disappearance animation. It is played when an element "
|
||||
"disappears in the newlayout."
|
||||
),
|
||||
)
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Animation starting triggers. Default value: `[state_change, "
|
||||
"visibility_change]`."
|
||||
),
|
||||
)
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(
|
||||
description="Element visibility.",
|
||||
)
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(
|
||||
description=(
|
||||
"Tracking visibility of a single element. Not used if the "
|
||||
"`visibility_actions`parameter is set."
|
||||
),
|
||||
)
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(
|
||||
min_items=1,
|
||||
description="Actions when an element appears on the screen.",
|
||||
)
|
||||
width: typing.Optional[div_size.DivSize] = Field(
|
||||
description="Element width.",
|
||||
)
|
||||
|
||||
|
||||
DivBase.update_forward_refs()
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
class DivBlendMode(str, enum.Enum):
|
||||
SOURCE_IN = "source_in"
|
||||
SOURCE_ATOP = "source_atop"
|
||||
DARKEN = "darken"
|
||||
LIGHTEN = "lighten"
|
||||
MULTIPLY = "multiply"
|
||||
SCREEN = "screen"
|
||||
@@ -1,13 +1,14 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div_corners_radius
|
||||
from . import div_shadow
|
||||
from . import div_stroke
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_corners_radius, div_shadow, div_stroke
|
||||
|
||||
|
||||
# Stroke around the element.
|
||||
@@ -29,11 +30,24 @@ class DivBorder(BaseDiv):
|
||||
stroke=stroke,
|
||||
)
|
||||
|
||||
corner_radius: typing.Optional[int] = Field(description='One radius of element and stroke corner rounding. Has a lower priority than`corners_radius`.')
|
||||
corners_radius: typing.Optional[div_corners_radius.DivCornersRadius] = Field(description='Multiple radii of element and stroke corner rounding.')
|
||||
has_shadow: typing.Optional[bool] = Field(description='Adding shadow.')
|
||||
shadow: typing.Optional[div_shadow.DivShadow] = Field(description='Shadow parameters.')
|
||||
stroke: typing.Optional[div_stroke.DivStroke] = Field(description='Stroke style.')
|
||||
corner_radius: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"One radius of element and stroke corner rounding. Has a "
|
||||
"lower priority than`corners_radius`."
|
||||
),
|
||||
)
|
||||
corners_radius: typing.Optional[div_corners_radius.DivCornersRadius] = Field(
|
||||
description="Multiple radii of element and stroke corner rounding.",
|
||||
)
|
||||
has_shadow: typing.Optional[bool] = Field(
|
||||
description="Adding shadow.",
|
||||
)
|
||||
shadow: typing.Optional[div_shadow.DivShadow] = Field(
|
||||
description="Shadow parameters.",
|
||||
)
|
||||
stroke: typing.Optional[div_stroke.DivStroke] = Field(
|
||||
description="Stroke style.",
|
||||
)
|
||||
|
||||
|
||||
DivBorder.update_forward_refs()
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_animation_interpolator
|
||||
|
||||
|
||||
@@ -13,7 +16,7 @@ class DivChangeBoundsTransition(BaseDiv):
|
||||
|
||||
def __init__(
|
||||
self, *,
|
||||
type: str = 'change_bounds',
|
||||
type: str = "change_bounds",
|
||||
duration: typing.Optional[int] = None,
|
||||
interpolator: typing.Optional[div_animation_interpolator.DivAnimationInterpolator] = None,
|
||||
start_delay: typing.Optional[int] = None,
|
||||
@@ -25,10 +28,16 @@ class DivChangeBoundsTransition(BaseDiv):
|
||||
start_delay=start_delay,
|
||||
)
|
||||
|
||||
type: str = Field(default='change_bounds')
|
||||
duration: typing.Optional[int] = Field(description='Animation duration in milliseconds.')
|
||||
interpolator: typing.Optional[div_animation_interpolator.DivAnimationInterpolator] = Field(description='Transition speed nature.')
|
||||
start_delay: typing.Optional[int] = Field(description='Delay in milliseconds before animation starts.')
|
||||
type: str = Field(default="change_bounds")
|
||||
duration: typing.Optional[int] = Field(
|
||||
description="Animation duration in milliseconds.",
|
||||
)
|
||||
interpolator: typing.Optional[div_animation_interpolator.DivAnimationInterpolator] = Field(
|
||||
description="Transition speed nature.",
|
||||
)
|
||||
start_delay: typing.Optional[int] = Field(
|
||||
description="Delay in milliseconds before animation starts.",
|
||||
)
|
||||
|
||||
|
||||
DivChangeBoundsTransition.update_forward_refs()
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_change_transition
|
||||
|
||||
|
||||
@@ -14,15 +17,18 @@ class DivChangeSetTransition(BaseDiv):
|
||||
def __init__(
|
||||
self, *,
|
||||
items: typing.List[div_change_transition.DivChangeTransition],
|
||||
type: str = 'set',
|
||||
type: str = "set",
|
||||
):
|
||||
super().__init__(
|
||||
type=type,
|
||||
items=items,
|
||||
)
|
||||
|
||||
type: str = Field(default='set')
|
||||
items: typing.List[div_change_transition.DivChangeTransition] = Field(min_items=1, description='List of animations.')
|
||||
type: str = Field(default="set")
|
||||
items: typing.List[div_change_transition.DivChangeTransition] = Field(
|
||||
min_items=1,
|
||||
description="List of animations.",
|
||||
)
|
||||
|
||||
|
||||
DivChangeSetTransition.update_forward_refs()
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div_change_bounds_transition
|
||||
from . import div_change_set_transition
|
||||
|
||||
from typing import Union
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_change_bounds_transition, div_change_set_transition
|
||||
|
||||
|
||||
DivChangeTransition = Union[
|
||||
div_change_set_transition.DivChangeSetTransition,
|
||||
div_change_bounds_transition.DivChangeBoundsTransition,
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_fixed_size
|
||||
|
||||
|
||||
# A circle.
|
||||
class DivCircleShape(BaseDiv):
|
||||
|
||||
def __init__(
|
||||
self, *,
|
||||
type: str = "circle",
|
||||
radius: typing.Optional[div_fixed_size.DivFixedSize] = None,
|
||||
):
|
||||
super().__init__(
|
||||
type=type,
|
||||
radius=radius,
|
||||
)
|
||||
|
||||
type: str = Field(default="circle")
|
||||
radius: typing.Optional[div_fixed_size.DivFixedSize] = Field(
|
||||
description="Radius.",
|
||||
)
|
||||
|
||||
|
||||
DivCircleShape.update_forward_refs()
|
||||
@@ -1,29 +1,21 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div
|
||||
from . import div_accessibility
|
||||
from . import div_action
|
||||
from . import div_alignment_horizontal
|
||||
from . import div_alignment_vertical
|
||||
from . import div_animation
|
||||
from . import div_appearance_transition
|
||||
from . import div_background
|
||||
from . import div_border
|
||||
from . import div_change_transition
|
||||
from . import div_edge_insets
|
||||
from . import div_extension
|
||||
from . import div_focus
|
||||
from . import div_size
|
||||
from . import div_tooltip
|
||||
from . import div_transform
|
||||
from . import div_transition_trigger
|
||||
from . import div_visibility
|
||||
from . import div_visibility_action
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import (
|
||||
div, div_accessibility, div_action, div_alignment_horizontal,
|
||||
div_alignment_vertical, div_animation, div_appearance_transition,
|
||||
div_background, div_border, div_change_transition, div_drawable,
|
||||
div_edge_insets, div_extension, div_focus, div_size, div_tooltip,
|
||||
div_transform, div_transition_trigger, div_visibility,
|
||||
div_visibility_action,
|
||||
)
|
||||
|
||||
|
||||
# Container. It contains other elements and is responsible for their location. It
|
||||
@@ -34,7 +26,7 @@ class DivContainer(BaseDiv):
|
||||
def __init__(
|
||||
self, *,
|
||||
items: typing.List[div.Div],
|
||||
type: str = 'container',
|
||||
type: str = "container",
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = None,
|
||||
action: typing.Optional[div_action.DivAction] = None,
|
||||
action_animation: typing.Optional[div_animation.DivAnimation] = None,
|
||||
@@ -53,12 +45,14 @@ class DivContainer(BaseDiv):
|
||||
height: typing.Optional[div_size.DivSize] = None,
|
||||
id: typing.Optional[str] = None,
|
||||
layout_mode: typing.Optional[DivContainerLayoutMode] = None,
|
||||
line_separator: typing.Optional[DivContainerSeparator] = None,
|
||||
longtap_actions: typing.Optional[typing.List[div_action.DivAction]] = None,
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = None,
|
||||
orientation: typing.Optional[DivContainerOrientation] = None,
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = None,
|
||||
row_span: typing.Optional[int] = None,
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = None,
|
||||
separator: typing.Optional[DivContainerSeparator] = None,
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = None,
|
||||
transform: typing.Optional[div_transform.DivTransform] = None,
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = None,
|
||||
@@ -91,12 +85,14 @@ class DivContainer(BaseDiv):
|
||||
id=id,
|
||||
items=items,
|
||||
layout_mode=layout_mode,
|
||||
line_separator=line_separator,
|
||||
longtap_actions=longtap_actions,
|
||||
margins=margins,
|
||||
orientation=orientation,
|
||||
paddings=paddings,
|
||||
row_span=row_span,
|
||||
selected_actions=selected_actions,
|
||||
separator=separator,
|
||||
tooltips=tooltips,
|
||||
transform=transform,
|
||||
transition_change=transition_change,
|
||||
@@ -109,53 +105,266 @@ class DivContainer(BaseDiv):
|
||||
width=width,
|
||||
)
|
||||
|
||||
type: str = Field(default='container')
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(description='Accessibility for disabled people.')
|
||||
action: typing.Optional[div_action.DivAction] = Field(description='One action when clicking on an element. Not used if the `actions` parameter isset.')
|
||||
action_animation: typing.Optional[div_animation.DivAnimation] = Field(description='Action animation. Web supports `fade`, `scale` and `set` only.')
|
||||
actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Multiple actions when clicking on an element.')
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(description='Horizontal alignment of an element inside the parent element.')
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(description='Vertical alignment of an element inside the parent element.')
|
||||
alpha: typing.Optional[float] = Field(description='Sets transparency of the entire element: `0` — completely transparent, `1` —opaque.')
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(min_items=1, description='Element background. It can contain multiple layers.')
|
||||
border: typing.Optional[div_border.DivBorder] = Field(description='Element stroke.')
|
||||
column_span: typing.Optional[int] = Field(description='Merges cells in a column of the [grid](div-grid.md) element.')
|
||||
content_alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(description='Default alignment of elements. Not used if the `alignment_horizontal` parameteris set from the element field.')
|
||||
content_alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(description='Default alignment of elements. Not used if the `alignment_vertical` parameter isset from the element field.')
|
||||
doubletap_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Action when double-clicking on an element.')
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(min_items=1, description='Extensions for additional processing of an element. The list of extensions isgiven in [DivExtension](../../extensions.dita).')
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(description='Parameters when focusing on an element or losing focus.')
|
||||
height: typing.Optional[div_size.DivSize] = Field(description='Element height. For Android: if there is text in this or in a child element,specify height in `sp` to scale the element together with the text. To learn moreabout units of size measurement, see [Layout inside the card](../../layout.dita).')
|
||||
id: typing.Optional[str] = Field(min_length=1, description='Element ID. It must be unique within the root element. It is used as`accessibilityIdentifier` on iOS.')
|
||||
items: typing.List[div.Div] = Field(min_items=1, description='Nested elements.')
|
||||
layout_mode: typing.Optional[DivContainerLayoutMode] = Field(description='Method of placing elements. `wrap` value includes the transfer of elements to thenext line if they did not fit in the previous one. If the value is set to `wrap`,then a separate line will be allocated for all elements with a size value ofmatch_parent along the main axis.')
|
||||
longtap_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Action when long-clicking on an element.')
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='External margins from the element stroke.')
|
||||
orientation: typing.Optional[DivContainerOrientation] = Field(description='Location of elements. `overlap` value overlays elements on top of each other inthe order of enumeration. The lowest is the zero element of an array.')
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='Internal margins from the element stroke.')
|
||||
row_span: typing.Optional[int] = Field(description='Merges cells in a string of the [grid](div-grid.md) element.')
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='List of [actions](div-action.md) to be executed when selecting an element in[pager](div-pager.md).')
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(min_items=1, description='Tooltips linked to an element. A tooltip can be shown by`div-action://show_tooltip?id=`, hidden by `div-action://hide_tooltip?id=` where`id` — tooltip id.')
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(description='Transformation of the element. Applies the passed transform to the element. Thecontent that does not fit into the original view will be cut off.')
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(description='Change animation. It is played when the position or size of an element changes inthe new layout.')
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Appearance animation. It is played when an element with a new ID appears. Tolearn more about the concept of transitions, see [Animatedtransitions](../../interaction.dita#animation/transition-animation).')
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Disappearance animation. It is played when an element disappears in the newlayout.')
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(min_items=1, description='Animation starting triggers. Default value: `[state_change, visibility_change]`.')
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(description='Element visibility.')
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(description='Tracking visibility of a single element. Not used if the `visibility_actions`parameter is set.')
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(min_items=1, description='Actions when an element appears on the screen.')
|
||||
width: typing.Optional[div_size.DivSize] = Field(description='Element width.')
|
||||
type: str = Field(default="container")
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(
|
||||
description="Accessibility for disabled people.",
|
||||
)
|
||||
action: typing.Optional[div_action.DivAction] = Field(
|
||||
description=(
|
||||
"One action when clicking on an element. Not used if the "
|
||||
"`actions` parameter isset."
|
||||
),
|
||||
)
|
||||
action_animation: typing.Optional[div_animation.DivAnimation] = Field(
|
||||
description=(
|
||||
"Action animation. Web supports `fade`, `scale` and `set` "
|
||||
"only."
|
||||
),
|
||||
)
|
||||
actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description="Multiple actions when clicking on an element.",
|
||||
)
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(
|
||||
description=(
|
||||
"Horizontal alignment of an element inside the parent "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(
|
||||
description=(
|
||||
"Vertical alignment of an element inside the parent element."
|
||||
),
|
||||
)
|
||||
alpha: typing.Optional[float] = Field(
|
||||
description=(
|
||||
"Sets transparency of the entire element: `0` — completely "
|
||||
"transparent, `1` —opaque."
|
||||
),
|
||||
)
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(
|
||||
min_items=1,
|
||||
description="Element background. It can contain multiple layers.",
|
||||
)
|
||||
border: typing.Optional[div_border.DivBorder] = Field(
|
||||
description="Element stroke.",
|
||||
)
|
||||
column_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a column of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
content_alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(
|
||||
description=(
|
||||
"Default alignment of elements. Not used if the "
|
||||
"`alignment_horizontal` parameteris set from the element "
|
||||
"field."
|
||||
),
|
||||
)
|
||||
content_alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(
|
||||
description=(
|
||||
"Default alignment of elements. `baseline` value aligns "
|
||||
"elements having their ownbaseline along this baseline. "
|
||||
"Other elements are aligned by top side in thiscase. Not "
|
||||
"used if the `alignment_vertical` parameter is set from the "
|
||||
"elementfield."
|
||||
),
|
||||
)
|
||||
doubletap_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description="Action when double-clicking on an element.",
|
||||
)
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Extensions for additional processing of an element. The "
|
||||
"list of extensions isgiven in "
|
||||
"[DivExtension](../../extensions.dita)."
|
||||
),
|
||||
)
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(
|
||||
description="Parameters when focusing on an element or losing focus.",
|
||||
)
|
||||
height: typing.Optional[div_size.DivSize] = Field(
|
||||
description=(
|
||||
"Element height. For Android: if there is text in this or in "
|
||||
"a child element,specify height in `sp` to scale the element "
|
||||
"together with the text. To learn moreabout units of size "
|
||||
"measurement, see [Layout inside the "
|
||||
"card](../../layout.dita)."
|
||||
),
|
||||
)
|
||||
id: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
description=(
|
||||
"Element ID. It must be unique within the root element. It "
|
||||
"is used as`accessibilityIdentifier` on iOS."
|
||||
),
|
||||
)
|
||||
items: typing.List[div.Div] = Field(
|
||||
min_items=1,
|
||||
description="Nested elements.",
|
||||
)
|
||||
layout_mode: typing.Optional[DivContainerLayoutMode] = Field(
|
||||
description=(
|
||||
"Method of placing elements. `wrap` value includes the "
|
||||
"transfer of elements to thenext line if they did not fit in "
|
||||
"the previous one. If the value is set to `wrap`,then a "
|
||||
"separate line will be allocated for all elements with a "
|
||||
"size value of`match_parent` along the main axis. If the "
|
||||
"value is set to `wrap`, then elementswith a size value of "
|
||||
"`match_parent` along the cross axis will be ignored."
|
||||
),
|
||||
)
|
||||
line_separator: typing.Optional[DivContainerSeparator] = Field(
|
||||
description=(
|
||||
"Separator between elements along the cross axis. Not used "
|
||||
"if the `layout_mode`parameter has the value `no_wrap\'."
|
||||
),
|
||||
)
|
||||
longtap_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Action when long-clicking on an element. Doesn\'t work on "
|
||||
"the devices w/o touchgestures."
|
||||
),
|
||||
)
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="External margins from the element stroke.",
|
||||
)
|
||||
orientation: typing.Optional[DivContainerOrientation] = Field(
|
||||
description=(
|
||||
"Location of elements. `overlap` value overlays elements on "
|
||||
"top of each other inthe order of enumeration. The lowest is "
|
||||
"the zero element of an array."
|
||||
),
|
||||
)
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="Internal margins from the element stroke.",
|
||||
)
|
||||
row_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a string of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"List of [actions](div-action.md) to be executed when "
|
||||
"selecting an element in[pager](div-pager.md)."
|
||||
),
|
||||
)
|
||||
separator: typing.Optional[DivContainerSeparator] = Field(
|
||||
description=(
|
||||
"Separator between elements along the main axis. Not used if "
|
||||
"the `orientation`parameter has the value `overlap\'."
|
||||
),
|
||||
)
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Tooltips linked to an element. A tooltip can be shown "
|
||||
"by`div-action://show_tooltip?id=`, hidden by "
|
||||
"`div-action://hide_tooltip?id=` where`id` — tooltip id."
|
||||
),
|
||||
)
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(
|
||||
description=(
|
||||
"Transformation of the element. Applies the passed transform "
|
||||
"to the element. Thecontent that does not fit into the "
|
||||
"original view will be cut off."
|
||||
),
|
||||
)
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(
|
||||
description=(
|
||||
"Change animation. It is played when the position or size of "
|
||||
"an element changes inthe new layout."
|
||||
),
|
||||
)
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Appearance animation. It is played when an element with a "
|
||||
"new ID appears. Tolearn more about the concept of "
|
||||
"transitions, see "
|
||||
"[Animatedtransitions](../../interaction.dita#animation/tran"
|
||||
"sition-animation)."
|
||||
),
|
||||
)
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Disappearance animation. It is played when an element "
|
||||
"disappears in the newlayout."
|
||||
),
|
||||
)
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Animation starting triggers. Default value: `[state_change, "
|
||||
"visibility_change]`."
|
||||
),
|
||||
)
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(
|
||||
description="Element visibility.",
|
||||
)
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(
|
||||
description=(
|
||||
"Tracking visibility of a single element. Not used if the "
|
||||
"`visibility_actions`parameter is set."
|
||||
),
|
||||
)
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(
|
||||
min_items=1,
|
||||
description="Actions when an element appears on the screen.",
|
||||
)
|
||||
width: typing.Optional[div_size.DivSize] = Field(
|
||||
description="Element width.",
|
||||
)
|
||||
|
||||
|
||||
class DivContainerLayoutMode(str, enum.Enum):
|
||||
NO_WRAP = 'no_wrap'
|
||||
WRAP = 'wrap'
|
||||
NO_WRAP = "no_wrap"
|
||||
WRAP = "wrap"
|
||||
|
||||
|
||||
class DivContainerOrientation(str, enum.Enum):
|
||||
VERTICAL = 'vertical'
|
||||
HORIZONTAL = 'horizontal'
|
||||
OVERLAP = 'overlap'
|
||||
VERTICAL = "vertical"
|
||||
HORIZONTAL = "horizontal"
|
||||
OVERLAP = "overlap"
|
||||
|
||||
|
||||
class DivContainerSeparator(BaseDiv):
|
||||
|
||||
def __init__(
|
||||
self, *,
|
||||
style: div_drawable.DivDrawable,
|
||||
show_at_end: typing.Optional[bool] = None,
|
||||
show_at_start: typing.Optional[bool] = None,
|
||||
show_between: typing.Optional[bool] = None,
|
||||
):
|
||||
super().__init__(
|
||||
show_at_end=show_at_end,
|
||||
show_at_start=show_at_start,
|
||||
show_between=show_between,
|
||||
style=style,
|
||||
)
|
||||
|
||||
show_at_end: typing.Optional[bool] = Field(
|
||||
description="Enables showing of separator after the last item.",
|
||||
)
|
||||
show_at_start: typing.Optional[bool] = Field(
|
||||
description="Enables showing of separator before the first item.",
|
||||
)
|
||||
show_between: typing.Optional[bool] = Field(
|
||||
description="Enables showing of separator between items.",
|
||||
)
|
||||
style: div_drawable.DivDrawable = Field(
|
||||
description="Style of the separator.",
|
||||
)
|
||||
|
||||
|
||||
DivContainerSeparator.update_forward_refs()
|
||||
|
||||
|
||||
DivContainer.update_forward_refs()
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
# Sets corner rounding.
|
||||
class DivCornersRadius(BaseDiv):
|
||||
@@ -23,10 +26,38 @@ class DivCornersRadius(BaseDiv):
|
||||
top_right=top_right,
|
||||
)
|
||||
|
||||
bottom_left: typing.Optional[int] = Field(description='Rounding radius of a lower left corner. If not specified, then `corner_radius` isused.', name='bottom-left')
|
||||
bottom_right: typing.Optional[int] = Field(description='Rounding radius of a lower right corner. If not specified, then `corner_radius`is used.', name='bottom-right')
|
||||
top_left: typing.Optional[int] = Field(description='Rounding radius of an upper left corner. If not specified, then `corner_radius`is used.', name='top-left')
|
||||
top_right: typing.Optional[int] = Field(description='Rounding radius of an upper right corner. If not specified, then `corner_radius`is used.', name='top-right')
|
||||
bottom_left: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Rounding radius of a lower left corner. If not specified, "
|
||||
"then `corner_radius` isused."
|
||||
)
|
||||
,
|
||||
name="bottom-left",
|
||||
)
|
||||
bottom_right: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Rounding radius of a lower right corner. If not specified, "
|
||||
"then `corner_radius`is used."
|
||||
)
|
||||
,
|
||||
name="bottom-right",
|
||||
)
|
||||
top_left: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Rounding radius of an upper left corner. If not specified, "
|
||||
"then `corner_radius`is used."
|
||||
)
|
||||
,
|
||||
name="top-left",
|
||||
)
|
||||
top_right: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Rounding radius of an upper right corner. If not specified, "
|
||||
"then `corner_radius`is used."
|
||||
)
|
||||
,
|
||||
name="top-right",
|
||||
)
|
||||
|
||||
|
||||
DivCornersRadius.update_forward_refs()
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div_fixed_count
|
||||
from . import div_infinity_count
|
||||
|
||||
from typing import Union
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_fixed_count, div_infinity_count
|
||||
|
||||
|
||||
DivCount = Union[
|
||||
div_infinity_count.DivInfinityCount,
|
||||
div_fixed_count.DivFixedCount,
|
||||
|
||||
@@ -1,28 +1,20 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div
|
||||
from . import div_accessibility
|
||||
from . import div_action
|
||||
from . import div_alignment_horizontal
|
||||
from . import div_alignment_vertical
|
||||
from . import div_appearance_transition
|
||||
from . import div_background
|
||||
from . import div_border
|
||||
from . import div_change_transition
|
||||
from . import div_edge_insets
|
||||
from . import div_extension
|
||||
from . import div_focus
|
||||
from . import div_size
|
||||
from . import div_tooltip
|
||||
from . import div_transform
|
||||
from . import div_transition_trigger
|
||||
from . import div_visibility
|
||||
from . import div_visibility_action
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import (
|
||||
div, div_accessibility, div_action, div_alignment_horizontal,
|
||||
div_alignment_vertical, div_appearance_transition, div_background,
|
||||
div_border, div_change_transition, div_edge_insets, div_extension,
|
||||
div_focus, div_size, div_tooltip, div_transform, div_transition_trigger,
|
||||
div_visibility, div_visibility_action,
|
||||
)
|
||||
|
||||
|
||||
# Custom element. It is delegated to a host application to create native elements
|
||||
@@ -32,7 +24,7 @@ class DivCustom(BaseDiv):
|
||||
def __init__(
|
||||
self, *,
|
||||
custom_type: str,
|
||||
type: str = 'custom',
|
||||
type: str = "custom",
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = None,
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = None,
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = None,
|
||||
@@ -93,35 +85,155 @@ class DivCustom(BaseDiv):
|
||||
width=width,
|
||||
)
|
||||
|
||||
type: str = Field(default='custom')
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(description='Accessibility for disabled people.')
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(description='Horizontal alignment of an element inside the parent element.')
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(description='Vertical alignment of an element inside the parent element.')
|
||||
alpha: typing.Optional[float] = Field(description='Sets transparency of the entire element: `0` — completely transparent, `1` —opaque.')
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(min_items=1, description='Element background. It can contain multiple layers.')
|
||||
border: typing.Optional[div_border.DivBorder] = Field(description='Element stroke.')
|
||||
column_span: typing.Optional[int] = Field(description='Merges cells in a column of the [grid](div-grid.md) element.')
|
||||
custom_props: typing.Optional[typing.Dict[str, typing.Any]] = Field(description='Element data for a host application.')
|
||||
custom_type: str = Field(description='Subtype of an element for a host application.')
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(min_items=1, description='Extensions for additional processing of an element. The list of extensions isgiven in [DivExtension](../../extensions.dita).')
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(description='Parameters when focusing on an element or losing focus.')
|
||||
height: typing.Optional[div_size.DivSize] = Field(description='Element height. For Android: if there is text in this or in a child element,specify height in `sp` to scale the element together with the text. To learn moreabout units of size measurement, see [Layout inside the card](../../layout.dita).')
|
||||
id: typing.Optional[str] = Field(min_length=1, description='Element ID. It must be unique within the root element. It is used as`accessibilityIdentifier` on iOS.')
|
||||
items: typing.Optional[typing.List[div.Div]] = Field(min_items=1, description='Nested elements.')
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='External margins from the element stroke.')
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='Internal margins from the element stroke.')
|
||||
row_span: typing.Optional[int] = Field(description='Merges cells in a string of the [grid](div-grid.md) element.')
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='List of [actions](div-action.md) to be executed when selecting an element in[pager](div-pager.md).')
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(min_items=1, description='Tooltips linked to an element. A tooltip can be shown by`div-action://show_tooltip?id=`, hidden by `div-action://hide_tooltip?id=` where`id` — tooltip id.')
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(description='Transformation of the element. Applies the passed transform to the element. Thecontent that does not fit into the original view will be cut off.')
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(description='Change animation. It is played when the position or size of an element changes inthe new layout.')
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Appearance animation. It is played when an element with a new ID appears. Tolearn more about the concept of transitions, see [Animatedtransitions](../../interaction.dita#animation/transition-animation).')
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Disappearance animation. It is played when an element disappears in the newlayout.')
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(min_items=1, description='Animation starting triggers. Default value: `[state_change, visibility_change]`.')
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(description='Element visibility.')
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(description='Tracking visibility of a single element. Not used if the `visibility_actions`parameter is set.')
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(min_items=1, description='Actions when an element appears on the screen.')
|
||||
width: typing.Optional[div_size.DivSize] = Field(description='Element width.')
|
||||
type: str = Field(default="custom")
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(
|
||||
description="Accessibility for disabled people.",
|
||||
)
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(
|
||||
description=(
|
||||
"Horizontal alignment of an element inside the parent "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(
|
||||
description=(
|
||||
"Vertical alignment of an element inside the parent element."
|
||||
),
|
||||
)
|
||||
alpha: typing.Optional[float] = Field(
|
||||
description=(
|
||||
"Sets transparency of the entire element: `0` — completely "
|
||||
"transparent, `1` —opaque."
|
||||
),
|
||||
)
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(
|
||||
min_items=1,
|
||||
description="Element background. It can contain multiple layers.",
|
||||
)
|
||||
border: typing.Optional[div_border.DivBorder] = Field(
|
||||
description="Element stroke.",
|
||||
)
|
||||
column_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a column of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
custom_props: typing.Optional[typing.Dict[str, typing.Any]] = Field(
|
||||
description="Element data for a host application.",
|
||||
)
|
||||
custom_type: str = Field(
|
||||
description="Subtype of an element for a host application.",
|
||||
)
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Extensions for additional processing of an element. The "
|
||||
"list of extensions isgiven in "
|
||||
"[DivExtension](../../extensions.dita)."
|
||||
),
|
||||
)
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(
|
||||
description="Parameters when focusing on an element or losing focus.",
|
||||
)
|
||||
height: typing.Optional[div_size.DivSize] = Field(
|
||||
description=(
|
||||
"Element height. For Android: if there is text in this or in "
|
||||
"a child element,specify height in `sp` to scale the element "
|
||||
"together with the text. To learn moreabout units of size "
|
||||
"measurement, see [Layout inside the "
|
||||
"card](../../layout.dita)."
|
||||
),
|
||||
)
|
||||
id: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
description=(
|
||||
"Element ID. It must be unique within the root element. It "
|
||||
"is used as`accessibilityIdentifier` on iOS."
|
||||
),
|
||||
)
|
||||
items: typing.Optional[typing.List[div.Div]] = Field(
|
||||
min_items=1,
|
||||
description="Nested elements.",
|
||||
)
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="External margins from the element stroke.",
|
||||
)
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="Internal margins from the element stroke.",
|
||||
)
|
||||
row_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a string of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"List of [actions](div-action.md) to be executed when "
|
||||
"selecting an element in[pager](div-pager.md)."
|
||||
),
|
||||
)
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Tooltips linked to an element. A tooltip can be shown "
|
||||
"by`div-action://show_tooltip?id=`, hidden by "
|
||||
"`div-action://hide_tooltip?id=` where`id` — tooltip id."
|
||||
),
|
||||
)
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(
|
||||
description=(
|
||||
"Transformation of the element. Applies the passed transform "
|
||||
"to the element. Thecontent that does not fit into the "
|
||||
"original view will be cut off."
|
||||
),
|
||||
)
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(
|
||||
description=(
|
||||
"Change animation. It is played when the position or size of "
|
||||
"an element changes inthe new layout."
|
||||
),
|
||||
)
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Appearance animation. It is played when an element with a "
|
||||
"new ID appears. Tolearn more about the concept of "
|
||||
"transitions, see "
|
||||
"[Animatedtransitions](../../interaction.dita#animation/tran"
|
||||
"sition-animation)."
|
||||
),
|
||||
)
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Disappearance animation. It is played when an element "
|
||||
"disappears in the newlayout."
|
||||
),
|
||||
)
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Animation starting triggers. Default value: `[state_change, "
|
||||
"visibility_change]`."
|
||||
),
|
||||
)
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(
|
||||
description="Element visibility.",
|
||||
)
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(
|
||||
description=(
|
||||
"Tracking visibility of a single element. Not used if the "
|
||||
"`visibility_actions`parameter is set."
|
||||
),
|
||||
)
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(
|
||||
min_items=1,
|
||||
description="Actions when an element appears on the screen.",
|
||||
)
|
||||
width: typing.Optional[div_size.DivSize] = Field(
|
||||
description="Element width.",
|
||||
)
|
||||
|
||||
|
||||
DivCustom.update_forward_refs()
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div
|
||||
from . import div_transition_selector
|
||||
from . import div_trigger
|
||||
from . import div_variable
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div, div_transition_selector, div_trigger, div_variable
|
||||
|
||||
|
||||
# Root structure.
|
||||
@@ -30,11 +30,30 @@ class DivData(BaseDiv):
|
||||
variables=variables,
|
||||
)
|
||||
|
||||
log_id: str = Field(min_length=1, description='Logging ID.')
|
||||
states: typing.List[DivDataState] = Field(min_items=1, description='A set of visual element states. Each element can have a few states with adifferent layout. The states are displayed strictly one by one and switched using[action](div-action.md).')
|
||||
transition_animation_selector: typing.Optional[div_transition_selector.DivTransitionSelector] = Field(description='Events that trigger transition animations. @deprecated')
|
||||
variable_triggers: typing.Optional[typing.List[div_trigger.DivTrigger]] = Field(min_items=1, description='Triggers for changing variables.')
|
||||
variables: typing.Optional[typing.List[div_variable.DivVariable]] = Field(min_items=1, description='Declaration of variables that can be used in an element.')
|
||||
log_id: str = Field(
|
||||
min_length=1,
|
||||
description="Logging ID.",
|
||||
)
|
||||
states: typing.List[DivDataState] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"A set of visual element states. Each element can have a few "
|
||||
"states with adifferent layout. The states are displayed "
|
||||
"strictly one by one and switched "
|
||||
"using[action](div-action.md)."
|
||||
),
|
||||
)
|
||||
transition_animation_selector: typing.Optional[div_transition_selector.DivTransitionSelector] = Field(
|
||||
description="Events that trigger transition animations. @deprecated",
|
||||
)
|
||||
variable_triggers: typing.Optional[typing.List[div_trigger.DivTrigger]] = Field(
|
||||
min_items=1,
|
||||
description="Triggers for changing variables.",
|
||||
)
|
||||
variables: typing.Optional[typing.List[div_variable.DivVariable]] = Field(
|
||||
min_items=1,
|
||||
description="Declaration of variables that can be used in an element.",
|
||||
)
|
||||
|
||||
|
||||
class DivDataState(BaseDiv):
|
||||
@@ -49,8 +68,12 @@ class DivDataState(BaseDiv):
|
||||
state_id=state_id,
|
||||
)
|
||||
|
||||
div: div.Div = Field(description='Contents.')
|
||||
state_id: int = Field(description='State ID.')
|
||||
div: div.Div = Field(
|
||||
description="Contents.",
|
||||
)
|
||||
state_id: int = Field(
|
||||
description="State ID.",
|
||||
)
|
||||
|
||||
|
||||
DivDataState.update_forward_refs()
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_size_unit
|
||||
|
||||
|
||||
@@ -21,8 +24,11 @@ class DivDimension(BaseDiv):
|
||||
value=value,
|
||||
)
|
||||
|
||||
unit: typing.Optional[div_size_unit.DivSizeUnit] = Field()
|
||||
value: float = Field(description='Value.')
|
||||
unit: typing.Optional[div_size_unit.DivSizeUnit] = Field(
|
||||
)
|
||||
value: float = Field(
|
||||
description="Value.",
|
||||
)
|
||||
|
||||
|
||||
DivDimension.update_forward_refs()
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_action
|
||||
|
||||
|
||||
@@ -22,8 +25,17 @@ class DivDownloadCallbacks(BaseDiv):
|
||||
on_success_actions=on_success_actions,
|
||||
)
|
||||
|
||||
on_fail_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Actions in case of unsuccessful loading if the host reported it or the waitingtime expired.')
|
||||
on_success_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Actions in case of successful loading.')
|
||||
on_fail_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Actions in case of unsuccessful loading if the host "
|
||||
"reported it or the waitingtime expired."
|
||||
),
|
||||
)
|
||||
on_success_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description="Actions in case of successful loading.",
|
||||
)
|
||||
|
||||
|
||||
DivDownloadCallbacks.update_forward_refs()
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
from typing import Union
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_shape_drawable
|
||||
|
||||
from typing import Union
|
||||
|
||||
DivDrawable = Union[
|
||||
div_shape_drawable.DivShapeDrawable,
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_size_unit
|
||||
|
||||
|
||||
@@ -27,11 +30,20 @@ class DivEdgeInsets(BaseDiv):
|
||||
unit=unit,
|
||||
)
|
||||
|
||||
bottom: typing.Optional[int] = Field(description='Bottom margin.')
|
||||
left: typing.Optional[int] = Field(description='Left margin.')
|
||||
right: typing.Optional[int] = Field(description='Right margin.')
|
||||
top: typing.Optional[int] = Field(description='Top margin.')
|
||||
unit: typing.Optional[div_size_unit.DivSizeUnit] = Field()
|
||||
bottom: typing.Optional[int] = Field(
|
||||
description="Bottom margin.",
|
||||
)
|
||||
left: typing.Optional[int] = Field(
|
||||
description="Left margin.",
|
||||
)
|
||||
right: typing.Optional[int] = Field(
|
||||
description="Right margin.",
|
||||
)
|
||||
top: typing.Optional[int] = Field(
|
||||
description="Top margin.",
|
||||
)
|
||||
unit: typing.Optional[div_size_unit.DivSizeUnit] = Field(
|
||||
)
|
||||
|
||||
|
||||
DivEdgeInsets.update_forward_refs()
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
# Extension that affects an element.
|
||||
class DivExtension(BaseDiv):
|
||||
@@ -19,8 +22,13 @@ class DivExtension(BaseDiv):
|
||||
params=params,
|
||||
)
|
||||
|
||||
id: str = Field(min_length=1, description='Extension ID.')
|
||||
params: typing.Optional[typing.Dict[str, typing.Any]] = Field(description='Additional extension parameters.')
|
||||
id: str = Field(
|
||||
min_length=1,
|
||||
description="Extension ID.",
|
||||
)
|
||||
params: typing.Optional[typing.Dict[str, typing.Any]] = Field(
|
||||
description="Additional extension parameters.",
|
||||
)
|
||||
|
||||
|
||||
DivExtension.update_forward_refs()
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_animation_interpolator
|
||||
|
||||
|
||||
@@ -13,7 +16,7 @@ class DivFadeTransition(BaseDiv):
|
||||
|
||||
def __init__(
|
||||
self, *,
|
||||
type: str = 'fade',
|
||||
type: str = "fade",
|
||||
alpha: typing.Optional[float] = None,
|
||||
duration: typing.Optional[int] = None,
|
||||
interpolator: typing.Optional[div_animation_interpolator.DivAnimationInterpolator] = None,
|
||||
@@ -27,11 +30,22 @@ class DivFadeTransition(BaseDiv):
|
||||
start_delay=start_delay,
|
||||
)
|
||||
|
||||
type: str = Field(default='fade')
|
||||
alpha: typing.Optional[float] = Field(description='Value of the alpha channel which the element starts appearing from or at which itfinishes disappearing.')
|
||||
duration: typing.Optional[int] = Field(description='Animation duration in milliseconds.')
|
||||
interpolator: typing.Optional[div_animation_interpolator.DivAnimationInterpolator] = Field(description='Transition speed nature.')
|
||||
start_delay: typing.Optional[int] = Field(description='Delay in milliseconds before animation starts.')
|
||||
type: str = Field(default="fade")
|
||||
alpha: typing.Optional[float] = Field(
|
||||
description=(
|
||||
"Value of the alpha channel which the element starts "
|
||||
"appearing from or at which itfinishes disappearing."
|
||||
),
|
||||
)
|
||||
duration: typing.Optional[int] = Field(
|
||||
description="Animation duration in milliseconds.",
|
||||
)
|
||||
interpolator: typing.Optional[div_animation_interpolator.DivAnimationInterpolator] = Field(
|
||||
description="Transition speed nature.",
|
||||
)
|
||||
start_delay: typing.Optional[int] = Field(
|
||||
description="Delay in milliseconds before animation starts.",
|
||||
)
|
||||
|
||||
|
||||
DivFadeTransition.update_forward_refs()
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
# Fixed number of repetitions.
|
||||
class DivFixedCount(BaseDiv):
|
||||
@@ -12,15 +15,17 @@ class DivFixedCount(BaseDiv):
|
||||
def __init__(
|
||||
self, *,
|
||||
value: int,
|
||||
type: str = 'fixed',
|
||||
type: str = "fixed",
|
||||
):
|
||||
super().__init__(
|
||||
type=type,
|
||||
value=value,
|
||||
)
|
||||
|
||||
type: str = Field(default='fixed')
|
||||
value: int = Field(description='Number of repetitions.')
|
||||
type: str = Field(default="fixed")
|
||||
value: int = Field(
|
||||
description="Number of repetitions.",
|
||||
)
|
||||
|
||||
|
||||
DivFixedCount.update_forward_refs()
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_size_unit
|
||||
|
||||
|
||||
@@ -14,7 +17,7 @@ class DivFixedSize(BaseDiv):
|
||||
def __init__(
|
||||
self, *,
|
||||
value: int,
|
||||
type: str = 'fixed',
|
||||
type: str = "fixed",
|
||||
unit: typing.Optional[div_size_unit.DivSizeUnit] = None,
|
||||
):
|
||||
super().__init__(
|
||||
@@ -23,9 +26,17 @@ class DivFixedSize(BaseDiv):
|
||||
value=value,
|
||||
)
|
||||
|
||||
type: str = Field(default='fixed')
|
||||
unit: typing.Optional[div_size_unit.DivSizeUnit] = Field(description='Unit of measurement. To learn more about units of size measurement, see [Layoutinside the card](../../layout.dita).')
|
||||
value: int = Field(description='Element size.')
|
||||
type: str = Field(default="fixed")
|
||||
unit: typing.Optional[div_size_unit.DivSizeUnit] = Field(
|
||||
description=(
|
||||
"Unit of measurement. To learn more about units of size "
|
||||
"measurement, see [Layoutinside the "
|
||||
"card](../../layout.dita)."
|
||||
),
|
||||
)
|
||||
value: int = Field(
|
||||
description="Element size.",
|
||||
)
|
||||
|
||||
|
||||
DivFixedSize.update_forward_refs()
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div_action
|
||||
from . import div_background
|
||||
from . import div_border
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_action, div_background, div_border
|
||||
|
||||
|
||||
# Element behavior when focusing or losing focus.
|
||||
@@ -29,11 +30,27 @@ class DivFocus(BaseDiv):
|
||||
on_focus=on_focus,
|
||||
)
|
||||
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(min_items=1, description='Background of an element when it is in focus. It can contain multiple layers.')
|
||||
border: typing.Optional[div_border.DivBorder] = Field(description='Border of an element when it is in focus')
|
||||
next_focus_ids: typing.Optional[DivFocusNextFocusIds] = Field(description='IDs of elements that will be next to get focus.')
|
||||
on_blur: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Actions when an element loses focus.')
|
||||
on_focus: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Actions when an element gets focus.')
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Background of an element when it is in focus. It can "
|
||||
"contain multiple layers."
|
||||
),
|
||||
)
|
||||
border: typing.Optional[div_border.DivBorder] = Field(
|
||||
description="Border of an element when it is in focus",
|
||||
)
|
||||
next_focus_ids: typing.Optional[DivFocusNextFocusIds] = Field(
|
||||
description="IDs of elements that will be next to get focus.",
|
||||
)
|
||||
on_blur: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description="Actions when an element loses focus.",
|
||||
)
|
||||
on_focus: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description="Actions when an element gets focus.",
|
||||
)
|
||||
|
||||
|
||||
# IDs of elements that will be next to get focus.
|
||||
@@ -55,11 +72,21 @@ class DivFocusNextFocusIds(BaseDiv):
|
||||
up=up,
|
||||
)
|
||||
|
||||
down: typing.Optional[str] = Field(min_length=1)
|
||||
forward: typing.Optional[str] = Field(min_length=1)
|
||||
left: typing.Optional[str] = Field(min_length=1)
|
||||
right: typing.Optional[str] = Field(min_length=1)
|
||||
up: typing.Optional[str] = Field(min_length=1)
|
||||
down: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
)
|
||||
forward: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
)
|
||||
left: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
)
|
||||
right: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
)
|
||||
up: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
)
|
||||
|
||||
|
||||
DivFocusNextFocusIds.update_forward_refs()
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
class DivFontFamily(str, enum.Enum):
|
||||
TEXT = 'text'
|
||||
DISPLAY = 'display'
|
||||
TEXT = "text"
|
||||
DISPLAY = "display"
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
class DivFontWeight(str, enum.Enum):
|
||||
LIGHT = 'light'
|
||||
MEDIUM = 'medium'
|
||||
REGULAR = 'regular'
|
||||
BOLD = 'bold'
|
||||
LIGHT = "light"
|
||||
MEDIUM = "medium"
|
||||
REGULAR = "regular"
|
||||
BOLD = "bold"
|
||||
|
||||
@@ -1,28 +1,20 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div
|
||||
from . import div_accessibility
|
||||
from . import div_action
|
||||
from . import div_alignment_horizontal
|
||||
from . import div_alignment_vertical
|
||||
from . import div_appearance_transition
|
||||
from . import div_background
|
||||
from . import div_border
|
||||
from . import div_change_transition
|
||||
from . import div_edge_insets
|
||||
from . import div_extension
|
||||
from . import div_focus
|
||||
from . import div_size
|
||||
from . import div_tooltip
|
||||
from . import div_transform
|
||||
from . import div_transition_trigger
|
||||
from . import div_visibility
|
||||
from . import div_visibility_action
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import (
|
||||
div, div_accessibility, div_action, div_alignment_horizontal,
|
||||
div_alignment_vertical, div_appearance_transition, div_background,
|
||||
div_border, div_change_transition, div_edge_insets, div_extension,
|
||||
div_focus, div_size, div_tooltip, div_transform, div_transition_trigger,
|
||||
div_visibility, div_visibility_action,
|
||||
)
|
||||
|
||||
|
||||
# Gallery. It contains a horizontal or vertical set of cards that can be scrolled.
|
||||
@@ -31,7 +23,7 @@ class DivGallery(BaseDiv):
|
||||
def __init__(
|
||||
self, *,
|
||||
items: typing.List[div.Div],
|
||||
type: str = 'gallery',
|
||||
type: str = "gallery",
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = None,
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = None,
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = None,
|
||||
@@ -41,6 +33,7 @@ class DivGallery(BaseDiv):
|
||||
column_count: typing.Optional[int] = None,
|
||||
column_span: typing.Optional[int] = None,
|
||||
cross_content_alignment: typing.Optional[DivGalleryCrossContentAlignment] = None,
|
||||
cross_spacing: typing.Optional[int] = None,
|
||||
default_item: typing.Optional[int] = None,
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = None,
|
||||
focus: typing.Optional[div_focus.DivFocus] = None,
|
||||
@@ -76,6 +69,7 @@ class DivGallery(BaseDiv):
|
||||
column_count=column_count,
|
||||
column_span=column_span,
|
||||
cross_content_alignment=cross_content_alignment,
|
||||
cross_spacing=cross_spacing,
|
||||
default_item=default_item,
|
||||
extensions=extensions,
|
||||
focus=focus,
|
||||
@@ -102,56 +96,227 @@ class DivGallery(BaseDiv):
|
||||
width=width,
|
||||
)
|
||||
|
||||
type: str = Field(default='gallery')
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(description='Accessibility for disabled people.')
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(description='Horizontal alignment of an element inside the parent element.')
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(description='Vertical alignment of an element inside the parent element.')
|
||||
alpha: typing.Optional[float] = Field(description='Sets transparency of the entire element: `0` — completely transparent, `1` —opaque.')
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(min_items=1, description='Element background. It can contain multiple layers.')
|
||||
border: typing.Optional[div_border.DivBorder] = Field(description='Element stroke.')
|
||||
column_count: typing.Optional[int] = Field(description='Number of columns for block layout.')
|
||||
column_span: typing.Optional[int] = Field(description='Merges cells in a column of the [grid](div-grid.md) element.')
|
||||
cross_content_alignment: typing.Optional[DivGalleryCrossContentAlignment] = Field(description='Aligning elements in the direction perpendicular to the scroll direction. Inhorizontal galleries:`start` — alignment to the top of the card;`center` — to thecenter;`end` — to the bottom.</p><p>In vertical galleries:`start` — alignment tothe left of the card;`center` — to the center;`end` — to the right.')
|
||||
default_item: typing.Optional[int] = Field(description='Ordinal number of the gallery element to be scrolled to by default. For`scroll_mode`:`default` — the scroll position is set to the beginning of theelement, without taking into account `item_spacing`;`paging` — the scrollposition is set to the center of the element.')
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(min_items=1, description='Extensions for additional processing of an element. The list of extensions isgiven in [DivExtension](../../extensions.dita).')
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(description='Parameters when focusing on an element or losing focus.')
|
||||
height: typing.Optional[div_size.DivSize] = Field(description='Element height. For Android: if there is text in this or in a child element,specify height in `sp` to scale the element together with the text. To learn moreabout units of size measurement, see [Layout inside the card](../../layout.dita).')
|
||||
id: typing.Optional[str] = Field(min_length=1, description='Element ID. It must be unique within the root element. It is used as`accessibilityIdentifier` on iOS.')
|
||||
item_spacing: typing.Optional[int] = Field(description='Spacing between elements.')
|
||||
items: typing.List[div.Div] = Field(min_items=1, description='Gallery elements. Scrolling to elements can be implementedusing:`div-action://set_current_item?id=&item=` — scrolling to the element withan ordinal number `item` inside an element, with the specified`id`;`div-action://set_next_item?id=[&overflow={clamp|ring}]` — scrolling to thenext element inside an element, with the specified`id`;`div-action://set_previous_item?id=[&overflow={clamp|ring}]` — scrolling tothe previous element inside an element, with the specified `id`.</p><p>Theoptional `overflow` parameter is used to set navigation when the first or lastelement is reached:`clamp` — transition will stop at the border element;`ring` —go to the beginning or end, depending on the current element.</p><p>By default,`clamp`.')
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='External margins from the element stroke.')
|
||||
orientation: typing.Optional[DivGalleryOrientation] = Field(description='Gallery orientation.')
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='Internal margins from the element stroke.')
|
||||
restrict_parent_scroll: typing.Optional[bool] = Field(description='If the parameter is enabled, the gallery won\'t transmit the scroll gesture to theparent element.')
|
||||
row_span: typing.Optional[int] = Field(description='Merges cells in a string of the [grid](div-grid.md) element.')
|
||||
scroll_mode: typing.Optional[DivGalleryScrollMode] = Field(description='Scroll type: `default` — continuous, `paging` — page-by-page.')
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='List of [actions](div-action.md) to be executed when selecting an element in[pager](div-pager.md).')
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(min_items=1, description='Tooltips linked to an element. A tooltip can be shown by`div-action://show_tooltip?id=`, hidden by `div-action://hide_tooltip?id=` where`id` — tooltip id.')
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(description='Transformation of the element. Applies the passed transform to the element. Thecontent that does not fit into the original view will be cut off.')
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(description='Change animation. It is played when the position or size of an element changes inthe new layout.')
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Appearance animation. It is played when an element with a new ID appears. Tolearn more about the concept of transitions, see [Animatedtransitions](../../interaction.dita#animation/transition-animation).')
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Disappearance animation. It is played when an element disappears in the newlayout.')
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(min_items=1, description='Animation starting triggers. Default value: `[state_change, visibility_change]`.')
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(description='Element visibility.')
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(description='Tracking visibility of a single element. Not used if the `visibility_actions`parameter is set.')
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(min_items=1, description='Actions when an element appears on the screen.')
|
||||
width: typing.Optional[div_size.DivSize] = Field(description='Element width.')
|
||||
type: str = Field(default="gallery")
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(
|
||||
description="Accessibility for disabled people.",
|
||||
)
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(
|
||||
description=(
|
||||
"Horizontal alignment of an element inside the parent "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(
|
||||
description=(
|
||||
"Vertical alignment of an element inside the parent element."
|
||||
),
|
||||
)
|
||||
alpha: typing.Optional[float] = Field(
|
||||
description=(
|
||||
"Sets transparency of the entire element: `0` — completely "
|
||||
"transparent, `1` —opaque."
|
||||
),
|
||||
)
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(
|
||||
min_items=1,
|
||||
description="Element background. It can contain multiple layers.",
|
||||
)
|
||||
border: typing.Optional[div_border.DivBorder] = Field(
|
||||
description="Element stroke.",
|
||||
)
|
||||
column_count: typing.Optional[int] = Field(
|
||||
description="Number of columns for block layout.",
|
||||
)
|
||||
column_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a column of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
cross_content_alignment: typing.Optional[DivGalleryCrossContentAlignment] = Field(
|
||||
description=(
|
||||
"Aligning elements in the direction perpendicular to the "
|
||||
"scroll direction. Inhorizontal galleries:`start` — "
|
||||
"alignment to the top of the card;`center` — to "
|
||||
"thecenter;`end` — to the bottom.</p><p>In vertical "
|
||||
"galleries:`start` — alignment tothe left of the "
|
||||
"card;`center` — to the center;`end` — to the right."
|
||||
),
|
||||
)
|
||||
cross_spacing: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Spacing between elements across the scroll axis. Default "
|
||||
"value is `item_spacing`"
|
||||
),
|
||||
)
|
||||
default_item: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Ordinal number of the gallery element to be scrolled to by "
|
||||
"default. For`scroll_mode`:`default` — the scroll position "
|
||||
"is set to the beginning of theelement, without taking into "
|
||||
"account `item_spacing`;`paging` — the scrollposition is set "
|
||||
"to the center of the element."
|
||||
),
|
||||
)
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Extensions for additional processing of an element. The "
|
||||
"list of extensions isgiven in "
|
||||
"[DivExtension](../../extensions.dita)."
|
||||
),
|
||||
)
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(
|
||||
description="Parameters when focusing on an element or losing focus.",
|
||||
)
|
||||
height: typing.Optional[div_size.DivSize] = Field(
|
||||
description=(
|
||||
"Element height. For Android: if there is text in this or in "
|
||||
"a child element,specify height in `sp` to scale the element "
|
||||
"together with the text. To learn moreabout units of size "
|
||||
"measurement, see [Layout inside the "
|
||||
"card](../../layout.dita)."
|
||||
),
|
||||
)
|
||||
id: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
description=(
|
||||
"Element ID. It must be unique within the root element. It "
|
||||
"is used as`accessibilityIdentifier` on iOS."
|
||||
),
|
||||
)
|
||||
item_spacing: typing.Optional[int] = Field(
|
||||
description="Spacing between elements.",
|
||||
)
|
||||
items: typing.List[div.Div] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Gallery elements. Scrolling to elements can be "
|
||||
"implementedusing:`div-action://set_current_item?id=&item=` "
|
||||
"— scrolling to the element withan ordinal number `item` "
|
||||
"inside an element, with the "
|
||||
"specified`id`;`div-action://set_next_item?id=[&overflow={cl"
|
||||
"amp|ring}]` — scrolling to thenext element inside an "
|
||||
"element, with the "
|
||||
"specified`id`;`div-action://set_previous_item?id=[&overflow"
|
||||
"={clamp|ring}]` — scrolling tothe previous element inside "
|
||||
"an element, with the specified `id`.</p><p>Theoptional "
|
||||
"`overflow` parameter is used to set navigation when the "
|
||||
"first or lastelement is reached:`clamp` — transition will "
|
||||
"stop at the border element;`ring` —go to the beginning or "
|
||||
"end, depending on the current element.</p><p>By "
|
||||
"default,`clamp`."
|
||||
),
|
||||
)
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="External margins from the element stroke.",
|
||||
)
|
||||
orientation: typing.Optional[DivGalleryOrientation] = Field(
|
||||
description="Gallery orientation.",
|
||||
)
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="Internal margins from the element stroke.",
|
||||
)
|
||||
restrict_parent_scroll: typing.Optional[bool] = Field(
|
||||
description=(
|
||||
"If the parameter is enabled, the gallery won\'t transmit "
|
||||
"the scroll gesture to theparent element."
|
||||
),
|
||||
)
|
||||
row_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a string of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
scroll_mode: typing.Optional[DivGalleryScrollMode] = Field(
|
||||
description=(
|
||||
"Scroll type: `default` — continuous, `paging` — "
|
||||
"page-by-page."
|
||||
),
|
||||
)
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"List of [actions](div-action.md) to be executed when "
|
||||
"selecting an element in[pager](div-pager.md)."
|
||||
),
|
||||
)
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Tooltips linked to an element. A tooltip can be shown "
|
||||
"by`div-action://show_tooltip?id=`, hidden by "
|
||||
"`div-action://hide_tooltip?id=` where`id` — tooltip id."
|
||||
),
|
||||
)
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(
|
||||
description=(
|
||||
"Transformation of the element. Applies the passed transform "
|
||||
"to the element. Thecontent that does not fit into the "
|
||||
"original view will be cut off."
|
||||
),
|
||||
)
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(
|
||||
description=(
|
||||
"Change animation. It is played when the position or size of "
|
||||
"an element changes inthe new layout."
|
||||
),
|
||||
)
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Appearance animation. It is played when an element with a "
|
||||
"new ID appears. Tolearn more about the concept of "
|
||||
"transitions, see "
|
||||
"[Animatedtransitions](../../interaction.dita#animation/tran"
|
||||
"sition-animation)."
|
||||
),
|
||||
)
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Disappearance animation. It is played when an element "
|
||||
"disappears in the newlayout."
|
||||
),
|
||||
)
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Animation starting triggers. Default value: `[state_change, "
|
||||
"visibility_change]`."
|
||||
),
|
||||
)
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(
|
||||
description="Element visibility.",
|
||||
)
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(
|
||||
description=(
|
||||
"Tracking visibility of a single element. Not used if the "
|
||||
"`visibility_actions`parameter is set."
|
||||
),
|
||||
)
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(
|
||||
min_items=1,
|
||||
description="Actions when an element appears on the screen.",
|
||||
)
|
||||
width: typing.Optional[div_size.DivSize] = Field(
|
||||
description="Element width.",
|
||||
)
|
||||
|
||||
|
||||
class DivGalleryCrossContentAlignment(str, enum.Enum):
|
||||
START = 'start'
|
||||
CENTER = 'center'
|
||||
END = 'end'
|
||||
START = "start"
|
||||
CENTER = "center"
|
||||
END = "end"
|
||||
|
||||
|
||||
class DivGalleryOrientation(str, enum.Enum):
|
||||
HORIZONTAL = 'horizontal'
|
||||
VERTICAL = 'vertical'
|
||||
HORIZONTAL = "horizontal"
|
||||
VERTICAL = "vertical"
|
||||
|
||||
|
||||
class DivGalleryScrollMode(str, enum.Enum):
|
||||
PAGING = 'paging'
|
||||
DEFAULT = 'default'
|
||||
PAGING = "paging"
|
||||
DEFAULT = "default"
|
||||
|
||||
|
||||
DivGallery.update_forward_refs()
|
||||
|
||||
@@ -1,30 +1,21 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div_accessibility
|
||||
from . import div_action
|
||||
from . import div_alignment_horizontal
|
||||
from . import div_alignment_vertical
|
||||
from . import div_animation
|
||||
from . import div_appearance_transition
|
||||
from . import div_aspect
|
||||
from . import div_background
|
||||
from . import div_border
|
||||
from . import div_change_transition
|
||||
from . import div_edge_insets
|
||||
from . import div_extension
|
||||
from . import div_focus
|
||||
from . import div_image_scale
|
||||
from . import div_size
|
||||
from . import div_tooltip
|
||||
from . import div_transform
|
||||
from . import div_transition_trigger
|
||||
from . import div_visibility
|
||||
from . import div_visibility_action
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import (
|
||||
div_accessibility, div_action, div_alignment_horizontal,
|
||||
div_alignment_vertical, div_animation, div_appearance_transition,
|
||||
div_aspect, div_background, div_border, div_change_transition,
|
||||
div_edge_insets, div_extension, div_focus, div_image_scale, div_size,
|
||||
div_tooltip, div_transform, div_transition_trigger, div_visibility,
|
||||
div_visibility_action,
|
||||
)
|
||||
|
||||
|
||||
# Animated GIF image.
|
||||
@@ -33,7 +24,7 @@ class DivGifImage(BaseDiv):
|
||||
def __init__(
|
||||
self, *,
|
||||
gif_url: str,
|
||||
type: str = 'gif',
|
||||
type: str = "gif",
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = None,
|
||||
action: typing.Optional[div_action.DivAction] = None,
|
||||
action_animation: typing.Optional[div_animation.DivAnimation] = None,
|
||||
@@ -114,45 +105,206 @@ class DivGifImage(BaseDiv):
|
||||
width=width,
|
||||
)
|
||||
|
||||
type: str = Field(default='gif')
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(description='Accessibility for disabled people.')
|
||||
action: typing.Optional[div_action.DivAction] = Field(description='One action when clicking on an element. Not used if the `actions` parameter isset.')
|
||||
action_animation: typing.Optional[div_animation.DivAnimation] = Field(description='Action animation. Web supports `fade`, `scale` and `set` only.')
|
||||
actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Multiple actions when clicking on an element.')
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(description='Horizontal alignment of an element inside the parent element.')
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(description='Vertical alignment of an element inside the parent element.')
|
||||
alpha: typing.Optional[float] = Field(description='Sets transparency of the entire element: `0` — completely transparent, `1` —opaque.')
|
||||
aspect: typing.Optional[div_aspect.DivAspect] = Field()
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(min_items=1, description='Element background. It can contain multiple layers.')
|
||||
border: typing.Optional[div_border.DivBorder] = Field(description='Element stroke.')
|
||||
column_span: typing.Optional[int] = Field(description='Merges cells in a column of the [grid](div-grid.md) element.')
|
||||
content_alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(description='Horizontal image alignment.')
|
||||
content_alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(description='Vertical image alignment.')
|
||||
doubletap_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Action when double-clicking on an element.')
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(min_items=1, description='Extensions for additional processing of an element. The list of extensions isgiven in [DivExtension](../../extensions.dita).')
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(description='Parameters when focusing on an element or losing focus.')
|
||||
gif_url: str = Field(format="uri", description='Direct URL to a GIF image.')
|
||||
height: typing.Optional[div_size.DivSize] = Field(description='Element height. For Android: if there is text in this or in a child element,specify height in `sp` to scale the element together with the text. To learn moreabout units of size measurement, see [Layout inside the card](../../layout.dita).')
|
||||
id: typing.Optional[str] = Field(min_length=1, description='Element ID. It must be unique within the root element. It is used as`accessibilityIdentifier` on iOS.')
|
||||
longtap_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Action when long-clicking on an element.')
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='External margins from the element stroke.')
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='Internal margins from the element stroke.')
|
||||
placeholder_color: typing.Optional[str] = Field(format="color", description='Placeholder background before the image is loaded.')
|
||||
preload_required: typing.Optional[bool] = Field(description='Background image must be loaded before the display.')
|
||||
preview: typing.Optional[str] = Field(min_length=1, description='Image preview encoded in `base64`. It will be shown instead of`placeholder_color` before the image is loaded. Format `data url`:`data:[;base64],<data>`')
|
||||
row_span: typing.Optional[int] = Field(description='Merges cells in a string of the [grid](div-grid.md) element.')
|
||||
scale: typing.Optional[div_image_scale.DivImageScale] = Field(description='Image scaling:`fit` places the entire image into the element (free space isfilled with background);`fill` scales the image to the element size and cuts offthe excess.')
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='List of [actions](div-action.md) to be executed when selecting an element in[pager](div-pager.md).')
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(min_items=1, description='Tooltips linked to an element. A tooltip can be shown by`div-action://show_tooltip?id=`, hidden by `div-action://hide_tooltip?id=` where`id` — tooltip id.')
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(description='Transformation of the element. Applies the passed transform to the element. Thecontent that does not fit into the original view will be cut off.')
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(description='Change animation. It is played when the position or size of an element changes inthe new layout.')
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Appearance animation. It is played when an element with a new ID appears. Tolearn more about the concept of transitions, see [Animatedtransitions](../../interaction.dita#animation/transition-animation).')
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Disappearance animation. It is played when an element disappears in the newlayout.')
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(min_items=1, description='Animation starting triggers. Default value: `[state_change, visibility_change]`.')
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(description='Element visibility.')
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(description='Tracking visibility of a single element. Not used if the `visibility_actions`parameter is set.')
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(min_items=1, description='Actions when an element appears on the screen.')
|
||||
width: typing.Optional[div_size.DivSize] = Field(description='Element width.')
|
||||
type: str = Field(default="gif")
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(
|
||||
description="Accessibility for disabled people.",
|
||||
)
|
||||
action: typing.Optional[div_action.DivAction] = Field(
|
||||
description=(
|
||||
"One action when clicking on an element. Not used if the "
|
||||
"`actions` parameter isset."
|
||||
),
|
||||
)
|
||||
action_animation: typing.Optional[div_animation.DivAnimation] = Field(
|
||||
description=(
|
||||
"Action animation. Web supports `fade`, `scale` and `set` "
|
||||
"only."
|
||||
),
|
||||
)
|
||||
actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description="Multiple actions when clicking on an element.",
|
||||
)
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(
|
||||
description=(
|
||||
"Horizontal alignment of an element inside the parent "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(
|
||||
description=(
|
||||
"Vertical alignment of an element inside the parent element."
|
||||
),
|
||||
)
|
||||
alpha: typing.Optional[float] = Field(
|
||||
description=(
|
||||
"Sets transparency of the entire element: `0` — completely "
|
||||
"transparent, `1` —opaque."
|
||||
),
|
||||
)
|
||||
aspect: typing.Optional[div_aspect.DivAspect] = Field(
|
||||
)
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(
|
||||
min_items=1,
|
||||
description="Element background. It can contain multiple layers.",
|
||||
)
|
||||
border: typing.Optional[div_border.DivBorder] = Field(
|
||||
description="Element stroke.",
|
||||
)
|
||||
column_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a column of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
content_alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(
|
||||
description="Horizontal image alignment.",
|
||||
)
|
||||
content_alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(
|
||||
description="Vertical image alignment.",
|
||||
)
|
||||
doubletap_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description="Action when double-clicking on an element.",
|
||||
)
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Extensions for additional processing of an element. The "
|
||||
"list of extensions isgiven in "
|
||||
"[DivExtension](../../extensions.dita)."
|
||||
),
|
||||
)
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(
|
||||
description="Parameters when focusing on an element or losing focus.",
|
||||
)
|
||||
gif_url: str = Field(
|
||||
format="uri",
|
||||
description="Direct URL to a GIF image.",
|
||||
)
|
||||
height: typing.Optional[div_size.DivSize] = Field(
|
||||
description=(
|
||||
"Element height. For Android: if there is text in this or in "
|
||||
"a child element,specify height in `sp` to scale the element "
|
||||
"together with the text. To learn moreabout units of size "
|
||||
"measurement, see [Layout inside the "
|
||||
"card](../../layout.dita)."
|
||||
),
|
||||
)
|
||||
id: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
description=(
|
||||
"Element ID. It must be unique within the root element. It "
|
||||
"is used as`accessibilityIdentifier` on iOS."
|
||||
),
|
||||
)
|
||||
longtap_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Action when long-clicking on an element. Doesn\'t work on "
|
||||
"the devices w/o touchgestures."
|
||||
),
|
||||
)
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="External margins from the element stroke.",
|
||||
)
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="Internal margins from the element stroke.",
|
||||
)
|
||||
placeholder_color: typing.Optional[str] = Field(
|
||||
format="color",
|
||||
description="Placeholder background before the image is loaded.",
|
||||
)
|
||||
preload_required: typing.Optional[bool] = Field(
|
||||
description="Background image must be loaded before the display.",
|
||||
)
|
||||
preview: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
description=(
|
||||
"Image preview encoded in `base64`. It will be shown instead "
|
||||
"of`placeholder_color` before the image is loaded. Format "
|
||||
"`data url`:`data:[;base64],<data>`"
|
||||
),
|
||||
)
|
||||
row_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a string of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
scale: typing.Optional[div_image_scale.DivImageScale] = Field(
|
||||
description=(
|
||||
"Image scaling:`fit` places the entire image into the "
|
||||
"element (free space isfilled with background);`fill` scales "
|
||||
"the image to the element size and cuts offthe excess."
|
||||
),
|
||||
)
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"List of [actions](div-action.md) to be executed when "
|
||||
"selecting an element in[pager](div-pager.md)."
|
||||
),
|
||||
)
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Tooltips linked to an element. A tooltip can be shown "
|
||||
"by`div-action://show_tooltip?id=`, hidden by "
|
||||
"`div-action://hide_tooltip?id=` where`id` — tooltip id."
|
||||
),
|
||||
)
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(
|
||||
description=(
|
||||
"Transformation of the element. Applies the passed transform "
|
||||
"to the element. Thecontent that does not fit into the "
|
||||
"original view will be cut off."
|
||||
),
|
||||
)
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(
|
||||
description=(
|
||||
"Change animation. It is played when the position or size of "
|
||||
"an element changes inthe new layout."
|
||||
),
|
||||
)
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Appearance animation. It is played when an element with a "
|
||||
"new ID appears. Tolearn more about the concept of "
|
||||
"transitions, see "
|
||||
"[Animatedtransitions](../../interaction.dita#animation/tran"
|
||||
"sition-animation)."
|
||||
),
|
||||
)
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Disappearance animation. It is played when an element "
|
||||
"disappears in the newlayout."
|
||||
),
|
||||
)
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Animation starting triggers. Default value: `[state_change, "
|
||||
"visibility_change]`."
|
||||
),
|
||||
)
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(
|
||||
description="Element visibility.",
|
||||
)
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(
|
||||
description=(
|
||||
"Tracking visibility of a single element. Not used if the "
|
||||
"`visibility_actions`parameter is set."
|
||||
),
|
||||
)
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(
|
||||
min_items=1,
|
||||
description="Actions when an element appears on the screen.",
|
||||
)
|
||||
width: typing.Optional[div_size.DivSize] = Field(
|
||||
description="Element width.",
|
||||
)
|
||||
|
||||
|
||||
DivGifImage.update_forward_refs()
|
||||
|
||||
@@ -1,29 +1,20 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div
|
||||
from . import div_accessibility
|
||||
from . import div_action
|
||||
from . import div_alignment_horizontal
|
||||
from . import div_alignment_vertical
|
||||
from . import div_animation
|
||||
from . import div_appearance_transition
|
||||
from . import div_background
|
||||
from . import div_border
|
||||
from . import div_change_transition
|
||||
from . import div_edge_insets
|
||||
from . import div_extension
|
||||
from . import div_focus
|
||||
from . import div_size
|
||||
from . import div_tooltip
|
||||
from . import div_transform
|
||||
from . import div_transition_trigger
|
||||
from . import div_visibility
|
||||
from . import div_visibility_action
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import (
|
||||
div, div_accessibility, div_action, div_alignment_horizontal,
|
||||
div_alignment_vertical, div_animation, div_appearance_transition,
|
||||
div_background, div_border, div_change_transition, div_edge_insets,
|
||||
div_extension, div_focus, div_size, div_tooltip, div_transform,
|
||||
div_transition_trigger, div_visibility, div_visibility_action,
|
||||
)
|
||||
|
||||
|
||||
# A grid with an option to merge cells vertically and horizontally.
|
||||
@@ -33,7 +24,7 @@ class DivGrid(BaseDiv):
|
||||
self, *,
|
||||
column_count: int,
|
||||
items: typing.List[div.Div],
|
||||
type: str = 'grid',
|
||||
type: str = "grid",
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = None,
|
||||
action: typing.Optional[div_action.DivAction] = None,
|
||||
action_animation: typing.Optional[div_animation.DivAnimation] = None,
|
||||
@@ -105,41 +96,185 @@ class DivGrid(BaseDiv):
|
||||
width=width,
|
||||
)
|
||||
|
||||
type: str = Field(default='grid')
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(description='Accessibility for disabled people.')
|
||||
action: typing.Optional[div_action.DivAction] = Field(description='One action when clicking on an element. Not used if the `actions` parameter isset.')
|
||||
action_animation: typing.Optional[div_animation.DivAnimation] = Field(description='Action animation. Web supports `fade`, `scale` and `set` only.')
|
||||
actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Multiple actions when clicking on an element.')
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(description='Horizontal alignment of an element inside the parent element.')
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(description='Vertical alignment of an element inside the parent element.')
|
||||
alpha: typing.Optional[float] = Field(description='Sets transparency of the entire element: `0` — completely transparent, `1` —opaque.')
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(min_items=1, description='Element background. It can contain multiple layers.')
|
||||
border: typing.Optional[div_border.DivBorder] = Field(description='Element stroke.')
|
||||
column_count: int = Field(description='Number of columns.')
|
||||
column_span: typing.Optional[int] = Field(description='Merges cells in a column of the [grid](div-grid.md) element.')
|
||||
content_alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(description='Horizontal alignment of grid contents.')
|
||||
content_alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(description='Vertical alignment of grid contents.')
|
||||
doubletap_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Action when double-clicking on an element.')
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(min_items=1, description='Extensions for additional processing of an element. The list of extensions isgiven in [DivExtension](../../extensions.dita).')
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(description='Parameters when focusing on an element or losing focus.')
|
||||
height: typing.Optional[div_size.DivSize] = Field(description='Element height. For Android: if there is text in this or in a child element,specify height in `sp` to scale the element together with the text. To learn moreabout units of size measurement, see [Layout inside the card](../../layout.dita).')
|
||||
id: typing.Optional[str] = Field(min_length=1, description='Element ID. It must be unique within the root element. It is used as`accessibilityIdentifier` on iOS.')
|
||||
items: typing.List[div.Div] = Field(min_items=1, description='Contents.')
|
||||
longtap_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Action when long-clicking on an element.')
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='External margins from the element stroke.')
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='Internal margins from the element stroke.')
|
||||
row_span: typing.Optional[int] = Field(description='Merges cells in a string of the [grid](div-grid.md) element.')
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='List of [actions](div-action.md) to be executed when selecting an element in[pager](div-pager.md).')
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(min_items=1, description='Tooltips linked to an element. A tooltip can be shown by`div-action://show_tooltip?id=`, hidden by `div-action://hide_tooltip?id=` where`id` — tooltip id.')
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(description='Transformation of the element. Applies the passed transform to the element. Thecontent that does not fit into the original view will be cut off.')
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(description='Change animation. It is played when the position or size of an element changes inthe new layout.')
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Appearance animation. It is played when an element with a new ID appears. Tolearn more about the concept of transitions, see [Animatedtransitions](../../interaction.dita#animation/transition-animation).')
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Disappearance animation. It is played when an element disappears in the newlayout.')
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(min_items=1, description='Animation starting triggers. Default value: `[state_change, visibility_change]`.')
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(description='Element visibility.')
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(description='Tracking visibility of a single element. Not used if the `visibility_actions`parameter is set.')
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(min_items=1, description='Actions when an element appears on the screen.')
|
||||
width: typing.Optional[div_size.DivSize] = Field(description='Element width.')
|
||||
type: str = Field(default="grid")
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(
|
||||
description="Accessibility for disabled people.",
|
||||
)
|
||||
action: typing.Optional[div_action.DivAction] = Field(
|
||||
description=(
|
||||
"One action when clicking on an element. Not used if the "
|
||||
"`actions` parameter isset."
|
||||
),
|
||||
)
|
||||
action_animation: typing.Optional[div_animation.DivAnimation] = Field(
|
||||
description=(
|
||||
"Action animation. Web supports `fade`, `scale` and `set` "
|
||||
"only."
|
||||
),
|
||||
)
|
||||
actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description="Multiple actions when clicking on an element.",
|
||||
)
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(
|
||||
description=(
|
||||
"Horizontal alignment of an element inside the parent "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(
|
||||
description=(
|
||||
"Vertical alignment of an element inside the parent element."
|
||||
),
|
||||
)
|
||||
alpha: typing.Optional[float] = Field(
|
||||
description=(
|
||||
"Sets transparency of the entire element: `0` — completely "
|
||||
"transparent, `1` —opaque."
|
||||
),
|
||||
)
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(
|
||||
min_items=1,
|
||||
description="Element background. It can contain multiple layers.",
|
||||
)
|
||||
border: typing.Optional[div_border.DivBorder] = Field(
|
||||
description="Element stroke.",
|
||||
)
|
||||
column_count: int = Field(
|
||||
description="Number of columns.",
|
||||
)
|
||||
column_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a column of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
content_alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(
|
||||
description="Horizontal alignment of grid contents.",
|
||||
)
|
||||
content_alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(
|
||||
description="Vertical alignment of grid contents.",
|
||||
)
|
||||
doubletap_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description="Action when double-clicking on an element.",
|
||||
)
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Extensions for additional processing of an element. The "
|
||||
"list of extensions isgiven in "
|
||||
"[DivExtension](../../extensions.dita)."
|
||||
),
|
||||
)
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(
|
||||
description="Parameters when focusing on an element or losing focus.",
|
||||
)
|
||||
height: typing.Optional[div_size.DivSize] = Field(
|
||||
description=(
|
||||
"Element height. For Android: if there is text in this or in "
|
||||
"a child element,specify height in `sp` to scale the element "
|
||||
"together with the text. To learn moreabout units of size "
|
||||
"measurement, see [Layout inside the "
|
||||
"card](../../layout.dita)."
|
||||
),
|
||||
)
|
||||
id: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
description=(
|
||||
"Element ID. It must be unique within the root element. It "
|
||||
"is used as`accessibilityIdentifier` on iOS."
|
||||
),
|
||||
)
|
||||
items: typing.List[div.Div] = Field(
|
||||
min_items=1,
|
||||
description="Contents.",
|
||||
)
|
||||
longtap_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Action when long-clicking on an element. Doesn\'t work on "
|
||||
"the devices w/o touchgestures."
|
||||
),
|
||||
)
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="External margins from the element stroke.",
|
||||
)
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="Internal margins from the element stroke.",
|
||||
)
|
||||
row_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a string of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"List of [actions](div-action.md) to be executed when "
|
||||
"selecting an element in[pager](div-pager.md)."
|
||||
),
|
||||
)
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Tooltips linked to an element. A tooltip can be shown "
|
||||
"by`div-action://show_tooltip?id=`, hidden by "
|
||||
"`div-action://hide_tooltip?id=` where`id` — tooltip id."
|
||||
),
|
||||
)
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(
|
||||
description=(
|
||||
"Transformation of the element. Applies the passed transform "
|
||||
"to the element. Thecontent that does not fit into the "
|
||||
"original view will be cut off."
|
||||
),
|
||||
)
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(
|
||||
description=(
|
||||
"Change animation. It is played when the position or size of "
|
||||
"an element changes inthe new layout."
|
||||
),
|
||||
)
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Appearance animation. It is played when an element with a "
|
||||
"new ID appears. Tolearn more about the concept of "
|
||||
"transitions, see "
|
||||
"[Animatedtransitions](../../interaction.dita#animation/tran"
|
||||
"sition-animation)."
|
||||
),
|
||||
)
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Disappearance animation. It is played when an element "
|
||||
"disappears in the newlayout."
|
||||
),
|
||||
)
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Animation starting triggers. Default value: `[state_change, "
|
||||
"visibility_change]`."
|
||||
),
|
||||
)
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(
|
||||
description="Element visibility.",
|
||||
)
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(
|
||||
description=(
|
||||
"Tracking visibility of a single element. Not used if the "
|
||||
"`visibility_actions`parameter is set."
|
||||
),
|
||||
)
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(
|
||||
min_items=1,
|
||||
description="Actions when an element appears on the screen.",
|
||||
)
|
||||
width: typing.Optional[div_size.DivSize] = Field(
|
||||
description="Element width.",
|
||||
)
|
||||
|
||||
|
||||
DivGrid.update_forward_refs()
|
||||
|
||||
@@ -1,31 +1,21 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div_accessibility
|
||||
from . import div_action
|
||||
from . import div_alignment_horizontal
|
||||
from . import div_alignment_vertical
|
||||
from . import div_animation
|
||||
from . import div_appearance_transition
|
||||
from . import div_aspect
|
||||
from . import div_background
|
||||
from . import div_border
|
||||
from . import div_change_transition
|
||||
from . import div_edge_insets
|
||||
from . import div_extension
|
||||
from . import div_fade_transition
|
||||
from . import div_focus
|
||||
from . import div_image_scale
|
||||
from . import div_size
|
||||
from . import div_tooltip
|
||||
from . import div_transform
|
||||
from . import div_transition_trigger
|
||||
from . import div_visibility
|
||||
from . import div_visibility_action
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import (
|
||||
div_accessibility, div_action, div_alignment_horizontal,
|
||||
div_alignment_vertical, div_animation, div_appearance_transition,
|
||||
div_aspect, div_background, div_blend_mode, div_border,
|
||||
div_change_transition, div_edge_insets, div_extension, div_fade_transition,
|
||||
div_focus, div_image_scale, div_size, div_tooltip, div_transform,
|
||||
div_transition_trigger, div_visibility, div_visibility_action,
|
||||
)
|
||||
|
||||
|
||||
# Image.
|
||||
@@ -34,7 +24,7 @@ class DivImage(BaseDiv):
|
||||
def __init__(
|
||||
self, *,
|
||||
image_url: str,
|
||||
type: str = 'image',
|
||||
type: str = "image",
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = None,
|
||||
action: typing.Optional[div_action.DivAction] = None,
|
||||
action_animation: typing.Optional[div_animation.DivAnimation] = None,
|
||||
@@ -65,6 +55,7 @@ class DivImage(BaseDiv):
|
||||
scale: typing.Optional[div_image_scale.DivImageScale] = None,
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = None,
|
||||
tint_color: typing.Optional[str] = None,
|
||||
tint_mode: typing.Optional[div_blend_mode.DivBlendMode] = None,
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = None,
|
||||
transform: typing.Optional[div_transform.DivTransform] = None,
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = None,
|
||||
@@ -109,6 +100,7 @@ class DivImage(BaseDiv):
|
||||
scale=scale,
|
||||
selected_actions=selected_actions,
|
||||
tint_color=tint_color,
|
||||
tint_mode=tint_mode,
|
||||
tooltips=tooltips,
|
||||
transform=transform,
|
||||
transition_change=transition_change,
|
||||
@@ -121,48 +113,225 @@ class DivImage(BaseDiv):
|
||||
width=width,
|
||||
)
|
||||
|
||||
type: str = Field(default='image')
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(description='Accessibility for disabled people.')
|
||||
action: typing.Optional[div_action.DivAction] = Field(description='One action when clicking on an element. Not used if the `actions` parameter isset.')
|
||||
action_animation: typing.Optional[div_animation.DivAnimation] = Field(description='Action animation. Web supports `fade`, `scale` and `set` only.')
|
||||
actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Multiple actions when clicking on an element.')
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(description='Horizontal alignment of an element inside the parent element.')
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(description='Vertical alignment of an element inside the parent element.')
|
||||
alpha: typing.Optional[float] = Field(description='Sets transparency of the entire element: `0` — completely transparent, `1` —opaque.')
|
||||
appearance_animation: typing.Optional[div_fade_transition.DivFadeTransition] = Field(description='Transparency animation when loading an image.')
|
||||
aspect: typing.Optional[div_aspect.DivAspect] = Field()
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(min_items=1, description='Element background. It can contain multiple layers.')
|
||||
border: typing.Optional[div_border.DivBorder] = Field(description='Element stroke.')
|
||||
column_span: typing.Optional[int] = Field(description='Merges cells in a column of the [grid](div-grid.md) element.')
|
||||
content_alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(description='Horizontal image alignment.')
|
||||
content_alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(description='Vertical image alignment.')
|
||||
doubletap_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Action when double-clicking on an element.')
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(min_items=1, description='Extensions for additional processing of an element. The list of extensions isgiven in [DivExtension](../../extensions.dita).')
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(description='Parameters when focusing on an element or losing focus.')
|
||||
height: typing.Optional[div_size.DivSize] = Field(description='Element height. For Android: if there is text in this or in a child element,specify height in `sp` to scale the element together with the text. To learn moreabout units of size measurement, see [Layout inside the card](../../layout.dita).')
|
||||
high_priority_preview_show: typing.Optional[bool] = Field(description='It sets the priority of displaying the preview — the preview is decoded in themain stream and displayed as the first frame. Use the parameter carefully — itwill worsen the preview display time and can worsen the application launch time.')
|
||||
id: typing.Optional[str] = Field(min_length=1, description='Element ID. It must be unique within the root element. It is used as`accessibilityIdentifier` on iOS.')
|
||||
image_url: str = Field(format="uri", description='Direct URL to an image.')
|
||||
longtap_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Action when long-clicking on an element.')
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='External margins from the element stroke.')
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='Internal margins from the element stroke.')
|
||||
placeholder_color: typing.Optional[str] = Field(format="color", description='Placeholder background before the image is loaded.')
|
||||
preload_required: typing.Optional[bool] = Field(description='Background image must be loaded before the display.')
|
||||
preview: typing.Optional[str] = Field(min_length=1, description='Image preview encoded in `base64`. It will be shown instead of`placeholder_color` before the image is loaded. Format `data url`:`data:[;base64],<data>`')
|
||||
row_span: typing.Optional[int] = Field(description='Merges cells in a string of the [grid](div-grid.md) element.')
|
||||
scale: typing.Optional[div_image_scale.DivImageScale] = Field(description='Image scaling:`fit` places the entire image into the element (free space isfilled with background);`fill` scales the image to the element size and cuts offthe excess.')
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='List of [actions](div-action.md) to be executed when selecting an element in[pager](div-pager.md).')
|
||||
tint_color: typing.Optional[str] = Field(format="color", description='New color of a contour image.')
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(min_items=1, description='Tooltips linked to an element. A tooltip can be shown by`div-action://show_tooltip?id=`, hidden by `div-action://hide_tooltip?id=` where`id` — tooltip id.')
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(description='Transformation of the element. Applies the passed transform to the element. Thecontent that does not fit into the original view will be cut off.')
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(description='Change animation. It is played when the position or size of an element changes inthe new layout.')
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Appearance animation. It is played when an element with a new ID appears. Tolearn more about the concept of transitions, see [Animatedtransitions](../../interaction.dita#animation/transition-animation).')
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Disappearance animation. It is played when an element disappears in the newlayout.')
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(min_items=1, description='Animation starting triggers. Default value: `[state_change, visibility_change]`.')
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(description='Element visibility.')
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(description='Tracking visibility of a single element. Not used if the `visibility_actions`parameter is set.')
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(min_items=1, description='Actions when an element appears on the screen.')
|
||||
width: typing.Optional[div_size.DivSize] = Field(description='Element width.')
|
||||
type: str = Field(default="image")
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(
|
||||
description="Accessibility for disabled people.",
|
||||
)
|
||||
action: typing.Optional[div_action.DivAction] = Field(
|
||||
description=(
|
||||
"One action when clicking on an element. Not used if the "
|
||||
"`actions` parameter isset."
|
||||
),
|
||||
)
|
||||
action_animation: typing.Optional[div_animation.DivAnimation] = Field(
|
||||
description=(
|
||||
"Action animation. Web supports `fade`, `scale` and `set` "
|
||||
"only."
|
||||
),
|
||||
)
|
||||
actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description="Multiple actions when clicking on an element.",
|
||||
)
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(
|
||||
description=(
|
||||
"Horizontal alignment of an element inside the parent "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(
|
||||
description=(
|
||||
"Vertical alignment of an element inside the parent element."
|
||||
),
|
||||
)
|
||||
alpha: typing.Optional[float] = Field(
|
||||
description=(
|
||||
"Sets transparency of the entire element: `0` — completely "
|
||||
"transparent, `1` —opaque."
|
||||
),
|
||||
)
|
||||
appearance_animation: typing.Optional[div_fade_transition.DivFadeTransition] = Field(
|
||||
description="Transparency animation when loading an image.",
|
||||
)
|
||||
aspect: typing.Optional[div_aspect.DivAspect] = Field(
|
||||
)
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(
|
||||
min_items=1,
|
||||
description="Element background. It can contain multiple layers.",
|
||||
)
|
||||
border: typing.Optional[div_border.DivBorder] = Field(
|
||||
description="Element stroke.",
|
||||
)
|
||||
column_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a column of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
content_alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(
|
||||
description="Horizontal image alignment.",
|
||||
)
|
||||
content_alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(
|
||||
description="Vertical image alignment.",
|
||||
)
|
||||
doubletap_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description="Action when double-clicking on an element.",
|
||||
)
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Extensions for additional processing of an element. The "
|
||||
"list of extensions isgiven in "
|
||||
"[DivExtension](../../extensions.dita)."
|
||||
),
|
||||
)
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(
|
||||
description="Parameters when focusing on an element or losing focus.",
|
||||
)
|
||||
height: typing.Optional[div_size.DivSize] = Field(
|
||||
description=(
|
||||
"Element height. For Android: if there is text in this or in "
|
||||
"a child element,specify height in `sp` to scale the element "
|
||||
"together with the text. To learn moreabout units of size "
|
||||
"measurement, see [Layout inside the "
|
||||
"card](../../layout.dita)."
|
||||
),
|
||||
)
|
||||
high_priority_preview_show: typing.Optional[bool] = Field(
|
||||
description=(
|
||||
"It sets the priority of displaying the preview — the "
|
||||
"preview is decoded in themain stream and displayed as the "
|
||||
"first frame. Use the parameter carefully — itwill worsen "
|
||||
"the preview display time and can worsen the application "
|
||||
"launch time."
|
||||
),
|
||||
)
|
||||
id: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
description=(
|
||||
"Element ID. It must be unique within the root element. It "
|
||||
"is used as`accessibilityIdentifier` on iOS."
|
||||
),
|
||||
)
|
||||
image_url: str = Field(
|
||||
format="uri",
|
||||
description="Direct URL to an image.",
|
||||
)
|
||||
longtap_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Action when long-clicking on an element. Doesn\'t work on "
|
||||
"the devices w/o touchgestures."
|
||||
),
|
||||
)
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="External margins from the element stroke.",
|
||||
)
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="Internal margins from the element stroke.",
|
||||
)
|
||||
placeholder_color: typing.Optional[str] = Field(
|
||||
format="color",
|
||||
description="Placeholder background before the image is loaded.",
|
||||
)
|
||||
preload_required: typing.Optional[bool] = Field(
|
||||
description="Background image must be loaded before the display.",
|
||||
)
|
||||
preview: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
description=(
|
||||
"Image preview encoded in `base64`. It will be shown instead "
|
||||
"of`placeholder_color` before the image is loaded. Format "
|
||||
"`data url`:`data:[;base64],<data>`"
|
||||
),
|
||||
)
|
||||
row_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a string of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
scale: typing.Optional[div_image_scale.DivImageScale] = Field(
|
||||
description=(
|
||||
"Image scaling:`fit` places the entire image into the "
|
||||
"element (free space isfilled with background);`fill` scales "
|
||||
"the image to the element size and cuts offthe excess."
|
||||
),
|
||||
)
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"List of [actions](div-action.md) to be executed when "
|
||||
"selecting an element in[pager](div-pager.md)."
|
||||
),
|
||||
)
|
||||
tint_color: typing.Optional[str] = Field(
|
||||
format="color",
|
||||
description="New color of a contour image.",
|
||||
)
|
||||
tint_mode: typing.Optional[div_blend_mode.DivBlendMode] = Field(
|
||||
description="The blend mode of color specified in tint_color.",
|
||||
)
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Tooltips linked to an element. A tooltip can be shown "
|
||||
"by`div-action://show_tooltip?id=`, hidden by "
|
||||
"`div-action://hide_tooltip?id=` where`id` — tooltip id."
|
||||
),
|
||||
)
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(
|
||||
description=(
|
||||
"Transformation of the element. Applies the passed transform "
|
||||
"to the element. Thecontent that does not fit into the "
|
||||
"original view will be cut off."
|
||||
),
|
||||
)
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(
|
||||
description=(
|
||||
"Change animation. It is played when the position or size of "
|
||||
"an element changes inthe new layout."
|
||||
),
|
||||
)
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Appearance animation. It is played when an element with a "
|
||||
"new ID appears. Tolearn more about the concept of "
|
||||
"transitions, see "
|
||||
"[Animatedtransitions](../../interaction.dita#animation/tran"
|
||||
"sition-animation)."
|
||||
),
|
||||
)
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Disappearance animation. It is played when an element "
|
||||
"disappears in the newlayout."
|
||||
),
|
||||
)
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Animation starting triggers. Default value: `[state_change, "
|
||||
"visibility_change]`."
|
||||
),
|
||||
)
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(
|
||||
description="Element visibility.",
|
||||
)
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(
|
||||
description=(
|
||||
"Tracking visibility of a single element. Not used if the "
|
||||
"`visibility_actions`parameter is set."
|
||||
),
|
||||
)
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(
|
||||
min_items=1,
|
||||
description="Actions when an element appears on the screen.",
|
||||
)
|
||||
width: typing.Optional[div_size.DivSize] = Field(
|
||||
description="Element width.",
|
||||
)
|
||||
|
||||
|
||||
DivImage.update_forward_refs()
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div_alignment_horizontal
|
||||
from . import div_alignment_vertical
|
||||
from . import div_image_scale
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_alignment_horizontal, div_alignment_vertical, div_image_scale
|
||||
|
||||
|
||||
# Background image.
|
||||
@@ -16,7 +17,7 @@ class DivImageBackground(BaseDiv):
|
||||
def __init__(
|
||||
self, *,
|
||||
image_url: str,
|
||||
type: str = 'image',
|
||||
type: str = "image",
|
||||
alpha: typing.Optional[float] = None,
|
||||
content_alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = None,
|
||||
content_alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = None,
|
||||
@@ -33,13 +34,26 @@ class DivImageBackground(BaseDiv):
|
||||
scale=scale,
|
||||
)
|
||||
|
||||
type: str = Field(default='image')
|
||||
alpha: typing.Optional[float] = Field(description='Image transparency.')
|
||||
content_alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(description='Horizontal image alignment.')
|
||||
content_alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(description='Vertical image alignment.')
|
||||
image_url: str = Field(format="uri", description='Image URL.')
|
||||
preload_required: typing.Optional[bool] = Field(description='Background image must be loaded before the display.')
|
||||
scale: typing.Optional[div_image_scale.DivImageScale] = Field(description='Image scaling.')
|
||||
type: str = Field(default="image")
|
||||
alpha: typing.Optional[float] = Field(
|
||||
description="Image transparency.",
|
||||
)
|
||||
content_alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(
|
||||
description="Horizontal image alignment.",
|
||||
)
|
||||
content_alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(
|
||||
description="Vertical image alignment.",
|
||||
)
|
||||
image_url: str = Field(
|
||||
format="uri",
|
||||
description="Image URL.",
|
||||
)
|
||||
preload_required: typing.Optional[bool] = Field(
|
||||
description="Background image must be loaded before the display.",
|
||||
)
|
||||
scale: typing.Optional[div_image_scale.DivImageScale] = Field(
|
||||
description="Image scaling.",
|
||||
)
|
||||
|
||||
|
||||
DivImageBackground.update_forward_refs()
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
class DivImageScale(str, enum.Enum):
|
||||
FILL = 'fill'
|
||||
NO_SCALE = 'no_scale'
|
||||
FIT = 'fit'
|
||||
FILL = "fill"
|
||||
NO_SCALE = "no_scale"
|
||||
FIT = "fit"
|
||||
|
||||
@@ -1,29 +1,20 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div_accessibility
|
||||
from . import div_action
|
||||
from . import div_alignment_horizontal
|
||||
from . import div_alignment_vertical
|
||||
from . import div_appearance_transition
|
||||
from . import div_background
|
||||
from . import div_border
|
||||
from . import div_change_transition
|
||||
from . import div_edge_insets
|
||||
from . import div_extension
|
||||
from . import div_fixed_size
|
||||
from . import div_focus
|
||||
from . import div_shape
|
||||
from . import div_size
|
||||
from . import div_tooltip
|
||||
from . import div_transform
|
||||
from . import div_transition_trigger
|
||||
from . import div_visibility
|
||||
from . import div_visibility_action
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import (
|
||||
div_accessibility, div_action, div_alignment_horizontal,
|
||||
div_alignment_vertical, div_appearance_transition, div_background,
|
||||
div_border, div_change_transition, div_edge_insets, div_extension,
|
||||
div_fixed_size, div_focus, div_shape, div_size, div_tooltip, div_transform,
|
||||
div_transition_trigger, div_visibility, div_visibility_action,
|
||||
)
|
||||
|
||||
|
||||
# Progress indicator for [pager](div-pager.md).
|
||||
@@ -31,7 +22,7 @@ class DivIndicator(BaseDiv):
|
||||
|
||||
def __init__(
|
||||
self, *,
|
||||
type: str = 'indicator',
|
||||
type: str = "indicator",
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = None,
|
||||
active_item_color: typing.Optional[str] = None,
|
||||
active_item_size: typing.Optional[float] = None,
|
||||
@@ -103,46 +94,180 @@ class DivIndicator(BaseDiv):
|
||||
width=width,
|
||||
)
|
||||
|
||||
type: str = Field(default='indicator')
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(description='Accessibility for disabled people.')
|
||||
active_item_color: typing.Optional[str] = Field(format="color", description='Active indicator color.')
|
||||
active_item_size: typing.Optional[float] = Field(description='A size multiplier for an active indicator.')
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(description='Horizontal alignment of an element inside the parent element.')
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(description='Vertical alignment of an element inside the parent element.')
|
||||
alpha: typing.Optional[float] = Field(description='Sets transparency of the entire element: `0` — completely transparent, `1` —opaque.')
|
||||
animation: typing.Optional[DivIndicatorAnimation] = Field(description='Animation of switching between indicators.')
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(min_items=1, description='Element background. It can contain multiple layers.')
|
||||
border: typing.Optional[div_border.DivBorder] = Field(description='Element stroke.')
|
||||
column_span: typing.Optional[int] = Field(description='Merges cells in a column of the [grid](div-grid.md) element.')
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(min_items=1, description='Extensions for additional processing of an element. The list of extensions isgiven in [DivExtension](../../extensions.dita).')
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(description='Parameters when focusing on an element or losing focus.')
|
||||
height: typing.Optional[div_size.DivSize] = Field(description='Element height. For Android: if there is text in this or in a child element,specify height in `sp` to scale the element together with the text. To learn moreabout units of size measurement, see [Layout inside the card](../../layout.dita).')
|
||||
id: typing.Optional[str] = Field(min_length=1, description='Element ID. It must be unique within the root element. It is used as`accessibilityIdentifier` on iOS.')
|
||||
inactive_item_color: typing.Optional[str] = Field(format="color", description='Indicator color.')
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='External margins from the element stroke.')
|
||||
minimum_item_size: typing.Optional[float] = Field(description='A size multiplier for a minimal indicator. It is used when the required number ofindicators don\'t fit on the screen.')
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='Internal margins from the element stroke.')
|
||||
pager_id: typing.Optional[str] = Field(description='ID of the pager that is a data source for an indicator.')
|
||||
row_span: typing.Optional[int] = Field(description='Merges cells in a string of the [grid](div-grid.md) element.')
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='List of [actions](div-action.md) to be executed when selecting an element in[pager](div-pager.md).')
|
||||
shape: typing.Optional[div_shape.DivShape] = Field(description='Indicator shape.')
|
||||
space_between_centers: typing.Optional[div_fixed_size.DivFixedSize] = Field(description='Spacing between indicator centers.')
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(min_items=1, description='Tooltips linked to an element. A tooltip can be shown by`div-action://show_tooltip?id=`, hidden by `div-action://hide_tooltip?id=` where`id` — tooltip id.')
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(description='Transformation of the element. Applies the passed transform to the element. Thecontent that does not fit into the original view will be cut off.')
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(description='Change animation. It is played when the position or size of an element changes inthe new layout.')
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Appearance animation. It is played when an element with a new ID appears. Tolearn more about the concept of transitions, see [Animatedtransitions](../../interaction.dita#animation/transition-animation).')
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Disappearance animation. It is played when an element disappears in the newlayout.')
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(min_items=1, description='Animation starting triggers. Default value: `[state_change, visibility_change]`.')
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(description='Element visibility.')
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(description='Tracking visibility of a single element. Not used if the `visibility_actions`parameter is set.')
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(min_items=1, description='Actions when an element appears on the screen.')
|
||||
width: typing.Optional[div_size.DivSize] = Field(description='Element width.')
|
||||
type: str = Field(default="indicator")
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(
|
||||
description="Accessibility for disabled people.",
|
||||
)
|
||||
active_item_color: typing.Optional[str] = Field(
|
||||
format="color",
|
||||
description="Active indicator color.",
|
||||
)
|
||||
active_item_size: typing.Optional[float] = Field(
|
||||
description="A size multiplier for an active indicator.",
|
||||
)
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(
|
||||
description=(
|
||||
"Horizontal alignment of an element inside the parent "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(
|
||||
description=(
|
||||
"Vertical alignment of an element inside the parent element."
|
||||
),
|
||||
)
|
||||
alpha: typing.Optional[float] = Field(
|
||||
description=(
|
||||
"Sets transparency of the entire element: `0` — completely "
|
||||
"transparent, `1` —opaque."
|
||||
),
|
||||
)
|
||||
animation: typing.Optional[DivIndicatorAnimation] = Field(
|
||||
description="Animation of switching between indicators.",
|
||||
)
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(
|
||||
min_items=1,
|
||||
description="Element background. It can contain multiple layers.",
|
||||
)
|
||||
border: typing.Optional[div_border.DivBorder] = Field(
|
||||
description="Element stroke.",
|
||||
)
|
||||
column_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a column of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Extensions for additional processing of an element. The "
|
||||
"list of extensions isgiven in "
|
||||
"[DivExtension](../../extensions.dita)."
|
||||
),
|
||||
)
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(
|
||||
description="Parameters when focusing on an element or losing focus.",
|
||||
)
|
||||
height: typing.Optional[div_size.DivSize] = Field(
|
||||
description=(
|
||||
"Element height. For Android: if there is text in this or in "
|
||||
"a child element,specify height in `sp` to scale the element "
|
||||
"together with the text. To learn moreabout units of size "
|
||||
"measurement, see [Layout inside the "
|
||||
"card](../../layout.dita)."
|
||||
),
|
||||
)
|
||||
id: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
description=(
|
||||
"Element ID. It must be unique within the root element. It "
|
||||
"is used as`accessibilityIdentifier` on iOS."
|
||||
),
|
||||
)
|
||||
inactive_item_color: typing.Optional[str] = Field(
|
||||
format="color",
|
||||
description="Indicator color.",
|
||||
)
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="External margins from the element stroke.",
|
||||
)
|
||||
minimum_item_size: typing.Optional[float] = Field(
|
||||
description=(
|
||||
"A size multiplier for a minimal indicator. It is used when "
|
||||
"the required number ofindicators don\'t fit on the screen."
|
||||
),
|
||||
)
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="Internal margins from the element stroke.",
|
||||
)
|
||||
pager_id: typing.Optional[str] = Field(
|
||||
description="ID of the pager that is a data source for an indicator.",
|
||||
)
|
||||
row_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a string of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"List of [actions](div-action.md) to be executed when "
|
||||
"selecting an element in[pager](div-pager.md)."
|
||||
),
|
||||
)
|
||||
shape: typing.Optional[div_shape.DivShape] = Field(
|
||||
description="Indicator shape.",
|
||||
)
|
||||
space_between_centers: typing.Optional[div_fixed_size.DivFixedSize] = Field(
|
||||
description="Spacing between indicator centers.",
|
||||
)
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Tooltips linked to an element. A tooltip can be shown "
|
||||
"by`div-action://show_tooltip?id=`, hidden by "
|
||||
"`div-action://hide_tooltip?id=` where`id` — tooltip id."
|
||||
),
|
||||
)
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(
|
||||
description=(
|
||||
"Transformation of the element. Applies the passed transform "
|
||||
"to the element. Thecontent that does not fit into the "
|
||||
"original view will be cut off."
|
||||
),
|
||||
)
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(
|
||||
description=(
|
||||
"Change animation. It is played when the position or size of "
|
||||
"an element changes inthe new layout."
|
||||
),
|
||||
)
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Appearance animation. It is played when an element with a "
|
||||
"new ID appears. Tolearn more about the concept of "
|
||||
"transitions, see "
|
||||
"[Animatedtransitions](../../interaction.dita#animation/tran"
|
||||
"sition-animation)."
|
||||
),
|
||||
)
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Disappearance animation. It is played when an element "
|
||||
"disappears in the newlayout."
|
||||
),
|
||||
)
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Animation starting triggers. Default value: `[state_change, "
|
||||
"visibility_change]`."
|
||||
),
|
||||
)
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(
|
||||
description="Element visibility.",
|
||||
)
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(
|
||||
description=(
|
||||
"Tracking visibility of a single element. Not used if the "
|
||||
"`visibility_actions`parameter is set."
|
||||
),
|
||||
)
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(
|
||||
min_items=1,
|
||||
description="Actions when an element appears on the screen.",
|
||||
)
|
||||
width: typing.Optional[div_size.DivSize] = Field(
|
||||
description="Element width.",
|
||||
)
|
||||
|
||||
|
||||
class DivIndicatorAnimation(str, enum.Enum):
|
||||
SCALE = 'scale'
|
||||
WORM = 'worm'
|
||||
SLIDER = 'slider'
|
||||
SCALE = "scale"
|
||||
WORM = "worm"
|
||||
SLIDER = "slider"
|
||||
|
||||
|
||||
DivIndicator.update_forward_refs()
|
||||
|
||||
@@ -1,23 +1,26 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
# Infinite number of repetitions.
|
||||
class DivInfinityCount(BaseDiv):
|
||||
|
||||
def __init__(
|
||||
self, *,
|
||||
type: str = 'infinity',
|
||||
type: str = "infinity",
|
||||
):
|
||||
super().__init__(
|
||||
type=type,
|
||||
)
|
||||
|
||||
type: str = Field(default='infinity')
|
||||
type: str = Field(default="infinity")
|
||||
|
||||
|
||||
DivInfinityCount.update_forward_refs()
|
||||
|
||||
@@ -1,30 +1,21 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div_accessibility
|
||||
from . import div_action
|
||||
from . import div_alignment_horizontal
|
||||
from . import div_alignment_vertical
|
||||
from . import div_appearance_transition
|
||||
from . import div_background
|
||||
from . import div_border
|
||||
from . import div_change_transition
|
||||
from . import div_edge_insets
|
||||
from . import div_extension
|
||||
from . import div_focus
|
||||
from . import div_font_family
|
||||
from . import div_font_weight
|
||||
from . import div_size
|
||||
from . import div_size_unit
|
||||
from . import div_tooltip
|
||||
from . import div_transform
|
||||
from . import div_transition_trigger
|
||||
from . import div_visibility
|
||||
from . import div_visibility_action
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import (
|
||||
div_accessibility, div_action, div_alignment_horizontal,
|
||||
div_alignment_vertical, div_appearance_transition, div_background,
|
||||
div_border, div_change_transition, div_edge_insets, div_extension,
|
||||
div_focus, div_font_family, div_font_weight, div_size, div_size_unit,
|
||||
div_tooltip, div_transform, div_transition_trigger, div_visibility,
|
||||
div_visibility_action,
|
||||
)
|
||||
|
||||
|
||||
# Text input element.
|
||||
@@ -33,7 +24,7 @@ class DivInput(BaseDiv):
|
||||
def __init__(
|
||||
self, *,
|
||||
text_variable: str,
|
||||
type: str = 'input',
|
||||
type: str = "input",
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = None,
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = None,
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = None,
|
||||
@@ -118,56 +109,222 @@ class DivInput(BaseDiv):
|
||||
width=width,
|
||||
)
|
||||
|
||||
type: str = Field(default='input')
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(description='Accessibility for disabled people.')
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(description='Horizontal alignment of an element inside the parent element.')
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(description='Vertical alignment of an element inside the parent element.')
|
||||
alpha: typing.Optional[float] = Field(description='Sets transparency of the entire element: `0` — completely transparent, `1` —opaque.')
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(min_items=1, description='Element background. It can contain multiple layers.')
|
||||
border: typing.Optional[div_border.DivBorder] = Field(description='Element stroke.')
|
||||
column_span: typing.Optional[int] = Field(description='Merges cells in a column of the [grid](div-grid.md) element.')
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(min_items=1, description='Extensions for additional processing of an element. The list of extensions isgiven in [DivExtension](../../extensions.dita).')
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(description='Parameters when focusing on an element or losing focus.')
|
||||
font_family: typing.Optional[div_font_family.DivFontFamily] = Field(description='Font family:`text` — a standard text font;`display` — a family of fonts with alarge font size.')
|
||||
font_size: typing.Optional[int] = Field(description='Font size.')
|
||||
font_size_unit: typing.Optional[div_size_unit.DivSizeUnit] = Field(description='Unit of measurement:`px` — a physical pixel.`dp` — a logical pixel that doesn\'tdepend on screen density.`sp` — a logical pixel that depends on the font size ona device. Specify height in `sp`. Only available on Android.')
|
||||
font_weight: typing.Optional[div_font_weight.DivFontWeight] = Field(description='Style.')
|
||||
height: typing.Optional[div_size.DivSize] = Field(description='Element height. For Android: if there is text in this or in a child element,specify height in `sp` to scale the element together with the text. To learn moreabout units of size measurement, see [Layout inside the card](../../layout.dita).')
|
||||
highlight_color: typing.Optional[str] = Field(format="color", description='Text highlight color. If the value isn\'t set, the color set in the client will beused instead.')
|
||||
hint_color: typing.Optional[str] = Field(format="color", description='Text color.')
|
||||
hint_text: typing.Optional[str] = Field(min_length=1, description='Tooltip text.')
|
||||
id: typing.Optional[str] = Field(min_length=1, description='Element ID. It must be unique within the root element. It is used as`accessibilityIdentifier` on iOS.')
|
||||
keyboard_type: typing.Optional[DivInputKeyboardType] = Field(description='Keyboard type.')
|
||||
letter_spacing: typing.Optional[float] = Field(description='Spacing between characters.')
|
||||
line_height: typing.Optional[int] = Field(description='Line spacing of the text range. The count is taken from the font baseline.Measured in units specified in `font_size_unit`.')
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='External margins from the element stroke.')
|
||||
max_visible_lines: typing.Optional[int] = Field(description='Maximum number of lines that will be visible in the input view.')
|
||||
native_interface: typing.Optional[DivInputNativeInterface] = Field(description='Text input line used in the native interface.')
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='Internal margins from the element stroke.')
|
||||
row_span: typing.Optional[int] = Field(description='Merges cells in a string of the [grid](div-grid.md) element.')
|
||||
select_all_on_focus: typing.Optional[bool] = Field(description='Highlighting input text when focused.')
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='List of [actions](div-action.md) to be executed when selecting an element in[pager](div-pager.md).')
|
||||
text_color: typing.Optional[str] = Field(format="color", description='Text color.')
|
||||
text_variable: str = Field(min_length=1, description='Name of text storage variable.')
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(min_items=1, description='Tooltips linked to an element. A tooltip can be shown by`div-action://show_tooltip?id=`, hidden by `div-action://hide_tooltip?id=` where`id` — tooltip id.')
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(description='Transformation of the element. Applies the passed transform to the element. Thecontent that does not fit into the original view will be cut off.')
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(description='Change animation. It is played when the position or size of an element changes inthe new layout.')
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Appearance animation. It is played when an element with a new ID appears. Tolearn more about the concept of transitions, see [Animatedtransitions](../../interaction.dita#animation/transition-animation).')
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Disappearance animation. It is played when an element disappears in the newlayout.')
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(min_items=1, description='Animation starting triggers. Default value: `[state_change, visibility_change]`.')
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(description='Element visibility.')
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(description='Tracking visibility of a single element. Not used if the `visibility_actions`parameter is set.')
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(min_items=1, description='Actions when an element appears on the screen.')
|
||||
width: typing.Optional[div_size.DivSize] = Field(description='Element width.')
|
||||
type: str = Field(default="input")
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(
|
||||
description="Accessibility for disabled people.",
|
||||
)
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(
|
||||
description=(
|
||||
"Horizontal alignment of an element inside the parent "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(
|
||||
description=(
|
||||
"Vertical alignment of an element inside the parent element."
|
||||
),
|
||||
)
|
||||
alpha: typing.Optional[float] = Field(
|
||||
description=(
|
||||
"Sets transparency of the entire element: `0` — completely "
|
||||
"transparent, `1` —opaque."
|
||||
),
|
||||
)
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(
|
||||
min_items=1,
|
||||
description="Element background. It can contain multiple layers.",
|
||||
)
|
||||
border: typing.Optional[div_border.DivBorder] = Field(
|
||||
description="Element stroke.",
|
||||
)
|
||||
column_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a column of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Extensions for additional processing of an element. The "
|
||||
"list of extensions isgiven in "
|
||||
"[DivExtension](../../extensions.dita)."
|
||||
),
|
||||
)
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(
|
||||
description="Parameters when focusing on an element or losing focus.",
|
||||
)
|
||||
font_family: typing.Optional[div_font_family.DivFontFamily] = Field(
|
||||
description=(
|
||||
"Font family:`text` — a standard text font;`display` — a "
|
||||
"family of fonts with alarge font size."
|
||||
),
|
||||
)
|
||||
font_size: typing.Optional[int] = Field(
|
||||
description="Font size.",
|
||||
)
|
||||
font_size_unit: typing.Optional[div_size_unit.DivSizeUnit] = Field(
|
||||
description=(
|
||||
"Unit of measurement:`px` — a physical pixel.`dp` — a "
|
||||
"logical pixel that doesn\'tdepend on screen density.`sp` — "
|
||||
"a logical pixel that depends on the font size ona device. "
|
||||
"Specify height in `sp`. Only available on Android."
|
||||
),
|
||||
)
|
||||
font_weight: typing.Optional[div_font_weight.DivFontWeight] = Field(
|
||||
description="Style.",
|
||||
)
|
||||
height: typing.Optional[div_size.DivSize] = Field(
|
||||
description=(
|
||||
"Element height. For Android: if there is text in this or in "
|
||||
"a child element,specify height in `sp` to scale the element "
|
||||
"together with the text. To learn moreabout units of size "
|
||||
"measurement, see [Layout inside the "
|
||||
"card](../../layout.dita)."
|
||||
),
|
||||
)
|
||||
highlight_color: typing.Optional[str] = Field(
|
||||
format="color",
|
||||
description=(
|
||||
"Text highlight color. If the value isn\'t set, the color "
|
||||
"set in the client will beused instead."
|
||||
),
|
||||
)
|
||||
hint_color: typing.Optional[str] = Field(
|
||||
format="color",
|
||||
description="Text color.",
|
||||
)
|
||||
hint_text: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
description="Tooltip text.",
|
||||
)
|
||||
id: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
description=(
|
||||
"Element ID. It must be unique within the root element. It "
|
||||
"is used as`accessibilityIdentifier` on iOS."
|
||||
),
|
||||
)
|
||||
keyboard_type: typing.Optional[DivInputKeyboardType] = Field(
|
||||
description="Keyboard type.",
|
||||
)
|
||||
letter_spacing: typing.Optional[float] = Field(
|
||||
description="Spacing between characters.",
|
||||
)
|
||||
line_height: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Line spacing of the text range. The count is taken from the "
|
||||
"font baseline.Measured in units specified in "
|
||||
"`font_size_unit`."
|
||||
),
|
||||
)
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="External margins from the element stroke.",
|
||||
)
|
||||
max_visible_lines: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Maximum number of lines that will be visible in the input "
|
||||
"view."
|
||||
),
|
||||
)
|
||||
native_interface: typing.Optional[DivInputNativeInterface] = Field(
|
||||
description="Text input line used in the native interface.",
|
||||
)
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="Internal margins from the element stroke.",
|
||||
)
|
||||
row_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a string of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
select_all_on_focus: typing.Optional[bool] = Field(
|
||||
description="Highlighting input text when focused.",
|
||||
)
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"List of [actions](div-action.md) to be executed when "
|
||||
"selecting an element in[pager](div-pager.md)."
|
||||
),
|
||||
)
|
||||
text_color: typing.Optional[str] = Field(
|
||||
format="color",
|
||||
description="Text color.",
|
||||
)
|
||||
text_variable: str = Field(
|
||||
min_length=1,
|
||||
description="Name of text storage variable.",
|
||||
)
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Tooltips linked to an element. A tooltip can be shown "
|
||||
"by`div-action://show_tooltip?id=`, hidden by "
|
||||
"`div-action://hide_tooltip?id=` where`id` — tooltip id."
|
||||
),
|
||||
)
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(
|
||||
description=(
|
||||
"Transformation of the element. Applies the passed transform "
|
||||
"to the element. Thecontent that does not fit into the "
|
||||
"original view will be cut off."
|
||||
),
|
||||
)
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(
|
||||
description=(
|
||||
"Change animation. It is played when the position or size of "
|
||||
"an element changes inthe new layout."
|
||||
),
|
||||
)
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Appearance animation. It is played when an element with a "
|
||||
"new ID appears. Tolearn more about the concept of "
|
||||
"transitions, see "
|
||||
"[Animatedtransitions](../../interaction.dita#animation/tran"
|
||||
"sition-animation)."
|
||||
),
|
||||
)
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Disappearance animation. It is played when an element "
|
||||
"disappears in the newlayout."
|
||||
),
|
||||
)
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Animation starting triggers. Default value: `[state_change, "
|
||||
"visibility_change]`."
|
||||
),
|
||||
)
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(
|
||||
description="Element visibility.",
|
||||
)
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(
|
||||
description=(
|
||||
"Tracking visibility of a single element. Not used if the "
|
||||
"`visibility_actions`parameter is set."
|
||||
),
|
||||
)
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(
|
||||
min_items=1,
|
||||
description="Actions when an element appears on the screen.",
|
||||
)
|
||||
width: typing.Optional[div_size.DivSize] = Field(
|
||||
description="Element width.",
|
||||
)
|
||||
|
||||
|
||||
class DivInputKeyboardType(str, enum.Enum):
|
||||
SINGLE_LINE_TEXT = 'single_line_text'
|
||||
MULTI_LINE_TEXT = 'multi_line_text'
|
||||
PHONE = 'phone'
|
||||
NUMBER = 'number'
|
||||
EMAIL = 'email'
|
||||
URI = 'uri'
|
||||
SINGLE_LINE_TEXT = "single_line_text"
|
||||
MULTI_LINE_TEXT = "multi_line_text"
|
||||
PHONE = "phone"
|
||||
NUMBER = "number"
|
||||
EMAIL = "email"
|
||||
URI = "uri"
|
||||
|
||||
|
||||
# Text input line used in the native interface.
|
||||
@@ -181,7 +338,10 @@ class DivInputNativeInterface(BaseDiv):
|
||||
color=color,
|
||||
)
|
||||
|
||||
color: str = Field(format="color", description='Text input line color.')
|
||||
color: str = Field(
|
||||
format="color",
|
||||
description="Text input line color.",
|
||||
)
|
||||
|
||||
|
||||
DivInputNativeInterface.update_forward_refs()
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
class DivLineStyle(str, enum.Enum):
|
||||
NONE = 'none'
|
||||
SINGLE = 'single'
|
||||
NONE = "none"
|
||||
SINGLE = "single"
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
# Linear gradient.
|
||||
class DivLinearGradient(BaseDiv):
|
||||
@@ -12,7 +15,7 @@ class DivLinearGradient(BaseDiv):
|
||||
def __init__(
|
||||
self, *,
|
||||
colors: typing.List[str],
|
||||
type: str = 'gradient',
|
||||
type: str = "gradient",
|
||||
angle: typing.Optional[int] = None,
|
||||
):
|
||||
super().__init__(
|
||||
@@ -21,9 +24,17 @@ class DivLinearGradient(BaseDiv):
|
||||
colors=colors,
|
||||
)
|
||||
|
||||
type: str = Field(default='gradient')
|
||||
angle: typing.Optional[int] = Field(description='Angle of gradient direction.')
|
||||
colors: typing.List[str] = Field(min_items=2, description='Colors. Gradient points will be located at an equal distance from each other.')
|
||||
type: str = Field(default="gradient")
|
||||
angle: typing.Optional[int] = Field(
|
||||
description="Angle of gradient direction.",
|
||||
)
|
||||
colors: typing.List[str] = Field(
|
||||
min_items=2,
|
||||
description=(
|
||||
"Colors. Gradient points will be located at an equal "
|
||||
"distance from each other."
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
DivLinearGradient.update_forward_refs()
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
# Element size adjusts to a parent element.
|
||||
class DivMatchParentSize(BaseDiv):
|
||||
|
||||
def __init__(
|
||||
self, *,
|
||||
type: str = 'match_parent',
|
||||
type: str = "match_parent",
|
||||
weight: typing.Optional[float] = None,
|
||||
):
|
||||
super().__init__(
|
||||
@@ -19,8 +22,15 @@ class DivMatchParentSize(BaseDiv):
|
||||
weight=weight,
|
||||
)
|
||||
|
||||
type: str = Field(default='match_parent')
|
||||
weight: typing.Optional[float] = Field(description='Weight when distributing free space between elements with the size type`match_parent` inside an element. If the weight isn\'t specified, the elementswill divide the place equally.')
|
||||
type: str = Field(default="match_parent")
|
||||
weight: typing.Optional[float] = Field(
|
||||
description=(
|
||||
"Weight when distributing free space between elements with "
|
||||
"the size type`match_parent` inside an element. If the "
|
||||
"weight isn\'t specified, the elementswill divide the place "
|
||||
"equally."
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
DivMatchParentSize.update_forward_refs()
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_fixed_size
|
||||
|
||||
|
||||
@@ -14,15 +17,17 @@ class DivNeighbourPageSize(BaseDiv):
|
||||
def __init__(
|
||||
self, *,
|
||||
neighbour_page_width: div_fixed_size.DivFixedSize,
|
||||
type: str = 'fixed',
|
||||
type: str = "fixed",
|
||||
):
|
||||
super().__init__(
|
||||
type=type,
|
||||
neighbour_page_width=neighbour_page_width,
|
||||
)
|
||||
|
||||
type: str = Field(default='fixed')
|
||||
neighbour_page_width: div_fixed_size.DivFixedSize = Field(description='Width of the visible part of a neighbouring page.')
|
||||
type: str = Field(default="fixed")
|
||||
neighbour_page_width: div_fixed_size.DivFixedSize = Field(
|
||||
description="Width of the visible part of a neighbouring page.",
|
||||
)
|
||||
|
||||
|
||||
DivNeighbourPageSize.update_forward_refs()
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_absolute_edge_insets
|
||||
|
||||
|
||||
# Image in nine patch format.
|
||||
# https://developer.android.com/studio/write/draw9patch.
|
||||
class DivNinePatchBackground(BaseDiv):
|
||||
|
||||
def __init__(
|
||||
self, *,
|
||||
image_url: str,
|
||||
insets: div_absolute_edge_insets.DivAbsoluteEdgeInsets,
|
||||
type: str = "nine_patch_image",
|
||||
):
|
||||
super().__init__(
|
||||
type=type,
|
||||
image_url=image_url,
|
||||
insets=insets,
|
||||
)
|
||||
|
||||
type: str = Field(default="nine_patch_image")
|
||||
image_url: str = Field(
|
||||
format="uri",
|
||||
description="Image URL.",
|
||||
)
|
||||
insets: div_absolute_edge_insets.DivAbsoluteEdgeInsets = Field(
|
||||
description=(
|
||||
"Margins that break images into parts, according to the "
|
||||
"rule, are similar "
|
||||
"toborder-image-slice.(https://developer.mozilla.org/en-US/d"
|
||||
"ocs/Web/CSS/border-image-slice)"
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
DivNinePatchBackground.update_forward_refs()
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_percentage_size
|
||||
|
||||
|
||||
@@ -14,15 +17,17 @@ class DivPageSize(BaseDiv):
|
||||
def __init__(
|
||||
self, *,
|
||||
page_width: div_percentage_size.DivPercentageSize,
|
||||
type: str = 'percentage',
|
||||
type: str = "percentage",
|
||||
):
|
||||
super().__init__(
|
||||
type=type,
|
||||
page_width=page_width,
|
||||
)
|
||||
|
||||
type: str = Field(default='percentage')
|
||||
page_width: div_percentage_size.DivPercentageSize = Field(description='Page width as a percentage of the parent element width.')
|
||||
type: str = Field(default="percentage")
|
||||
page_width: div_percentage_size.DivPercentageSize = Field(
|
||||
description="Page width as a percentage of the parent element width.",
|
||||
)
|
||||
|
||||
|
||||
DivPageSize.update_forward_refs()
|
||||
|
||||
@@ -1,30 +1,21 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div
|
||||
from . import div_accessibility
|
||||
from . import div_action
|
||||
from . import div_alignment_horizontal
|
||||
from . import div_alignment_vertical
|
||||
from . import div_appearance_transition
|
||||
from . import div_background
|
||||
from . import div_border
|
||||
from . import div_change_transition
|
||||
from . import div_edge_insets
|
||||
from . import div_extension
|
||||
from . import div_fixed_size
|
||||
from . import div_focus
|
||||
from . import div_pager_layout_mode
|
||||
from . import div_size
|
||||
from . import div_tooltip
|
||||
from . import div_transform
|
||||
from . import div_transition_trigger
|
||||
from . import div_visibility
|
||||
from . import div_visibility_action
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import (
|
||||
div, div_accessibility, div_action, div_alignment_horizontal,
|
||||
div_alignment_vertical, div_appearance_transition, div_background,
|
||||
div_border, div_change_transition, div_edge_insets, div_extension,
|
||||
div_fixed_size, div_focus, div_pager_layout_mode, div_size, div_tooltip,
|
||||
div_transform, div_transition_trigger, div_visibility,
|
||||
div_visibility_action,
|
||||
)
|
||||
|
||||
|
||||
# Pager. It contains a horizontal set of cards that can be scrolled page by page.
|
||||
@@ -35,7 +26,7 @@ class DivPager(BaseDiv):
|
||||
self, *,
|
||||
items: typing.List[div.Div],
|
||||
layout_mode: div_pager_layout_mode.DivPagerLayoutMode,
|
||||
type: str = 'pager',
|
||||
type: str = "pager",
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = None,
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = None,
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = None,
|
||||
@@ -101,43 +92,196 @@ class DivPager(BaseDiv):
|
||||
width=width,
|
||||
)
|
||||
|
||||
type: str = Field(default='pager')
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(description='Accessibility for disabled people.')
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(description='Horizontal alignment of an element inside the parent element.')
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(description='Vertical alignment of an element inside the parent element.')
|
||||
alpha: typing.Optional[float] = Field(description='Sets transparency of the entire element: `0` — completely transparent, `1` —opaque.')
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(min_items=1, description='Element background. It can contain multiple layers.')
|
||||
border: typing.Optional[div_border.DivBorder] = Field(description='Element stroke.')
|
||||
column_span: typing.Optional[int] = Field(description='Merges cells in a column of the [grid](div-grid.md) element.')
|
||||
default_item: typing.Optional[int] = Field(description='Ordinal number of the pager element that will be opened by default.')
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(min_items=1, description='Extensions for additional processing of an element. The list of extensions isgiven in [DivExtension](../../extensions.dita).')
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(description='Parameters when focusing on an element or losing focus.')
|
||||
height: typing.Optional[div_size.DivSize] = Field(description='Element height. For Android: if there is text in this or in a child element,specify height in `sp` to scale the element together with the text. To learn moreabout units of size measurement, see [Layout inside the card](../../layout.dita).')
|
||||
id: typing.Optional[str] = Field(min_length=1, description='Element ID. It must be unique within the root element. It is used as`accessibilityIdentifier` on iOS.')
|
||||
item_spacing: typing.Optional[div_fixed_size.DivFixedSize] = Field(description='Spacing between elements.')
|
||||
items: typing.List[div.Div] = Field(min_items=1, description='Pager elements. Page-by-page transition options can be implementedusing:`div-action://set_current_item?id=&item=` — set the current page with anordinal number `item` inside an element, with the specified`id`;`div-action://set_next_item?id=[&overflow={clamp|ring}]` — go to the nextpage inside an element, with the specified`id`;`div-action://set_previous_item?id=[&overflow={clamp|ring}]` — go to theprevious page inside an element, with the specified `id`.</p><p>The optional`overflow` parameter is used to set navigation when the first or last element isreached:`clamp` — transition will stop at the border element;`ring` — go to thebeginning or end, depending on the current element.</p><p>By default, `clamp`.')
|
||||
layout_mode: div_pager_layout_mode.DivPagerLayoutMode = Field(description='Type of calculation of the main page width:`fixed` — from the fixed width of thenext page `neighbour_page_width`;`percentage` — from the percentage value`page_width`.')
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='External margins from the element stroke.')
|
||||
orientation: typing.Optional[DivPagerOrientation] = Field(description='Pager orientation.')
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='Internal margins from the element stroke.')
|
||||
restrict_parent_scroll: typing.Optional[bool] = Field(description='If the parameter is enabled, the pager won\'t transmit the scroll gesture to theparent element.')
|
||||
row_span: typing.Optional[int] = Field(description='Merges cells in a string of the [grid](div-grid.md) element.')
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='List of [actions](div-action.md) to be executed when selecting an element in[pager](div-pager.md).')
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(min_items=1, description='Tooltips linked to an element. A tooltip can be shown by`div-action://show_tooltip?id=`, hidden by `div-action://hide_tooltip?id=` where`id` — tooltip id.')
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(description='Transformation of the element. Applies the passed transform to the element. Thecontent that does not fit into the original view will be cut off.')
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(description='Change animation. It is played when the position or size of an element changes inthe new layout.')
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Appearance animation. It is played when an element with a new ID appears. Tolearn more about the concept of transitions, see [Animatedtransitions](../../interaction.dita#animation/transition-animation).')
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Disappearance animation. It is played when an element disappears in the newlayout.')
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(min_items=1, description='Animation starting triggers. Default value: `[state_change, visibility_change]`.')
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(description='Element visibility.')
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(description='Tracking visibility of a single element. Not used if the `visibility_actions`parameter is set.')
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(min_items=1, description='Actions when an element appears on the screen.')
|
||||
width: typing.Optional[div_size.DivSize] = Field(description='Element width.')
|
||||
type: str = Field(default="pager")
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(
|
||||
description="Accessibility for disabled people.",
|
||||
)
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(
|
||||
description=(
|
||||
"Horizontal alignment of an element inside the parent "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(
|
||||
description=(
|
||||
"Vertical alignment of an element inside the parent element."
|
||||
),
|
||||
)
|
||||
alpha: typing.Optional[float] = Field(
|
||||
description=(
|
||||
"Sets transparency of the entire element: `0` — completely "
|
||||
"transparent, `1` —opaque."
|
||||
),
|
||||
)
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(
|
||||
min_items=1,
|
||||
description="Element background. It can contain multiple layers.",
|
||||
)
|
||||
border: typing.Optional[div_border.DivBorder] = Field(
|
||||
description="Element stroke.",
|
||||
)
|
||||
column_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a column of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
default_item: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Ordinal number of the pager element that will be opened by "
|
||||
"default."
|
||||
),
|
||||
)
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Extensions for additional processing of an element. The "
|
||||
"list of extensions isgiven in "
|
||||
"[DivExtension](../../extensions.dita)."
|
||||
),
|
||||
)
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(
|
||||
description="Parameters when focusing on an element or losing focus.",
|
||||
)
|
||||
height: typing.Optional[div_size.DivSize] = Field(
|
||||
description=(
|
||||
"Element height. For Android: if there is text in this or in "
|
||||
"a child element,specify height in `sp` to scale the element "
|
||||
"together with the text. To learn moreabout units of size "
|
||||
"measurement, see [Layout inside the "
|
||||
"card](../../layout.dita)."
|
||||
),
|
||||
)
|
||||
id: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
description=(
|
||||
"Element ID. It must be unique within the root element. It "
|
||||
"is used as`accessibilityIdentifier` on iOS."
|
||||
),
|
||||
)
|
||||
item_spacing: typing.Optional[div_fixed_size.DivFixedSize] = Field(
|
||||
description="Spacing between elements.",
|
||||
)
|
||||
items: typing.List[div.Div] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Pager elements. Page-by-page transition options can be "
|
||||
"implementedusing:`div-action://set_current_item?id=&item=` "
|
||||
"— set the current page with anordinal number `item` inside "
|
||||
"an element, with the "
|
||||
"specified`id`;`div-action://set_next_item?id=[&overflow={cl"
|
||||
"amp|ring}]` — go to the nextpage inside an element, with "
|
||||
"the "
|
||||
"specified`id`;`div-action://set_previous_item?id=[&overflow"
|
||||
"={clamp|ring}]` — go to theprevious page inside an element, "
|
||||
"with the specified `id`.</p><p>The optional`overflow` "
|
||||
"parameter is used to set navigation when the first or last "
|
||||
"element isreached:`clamp` — transition will stop at the "
|
||||
"border element;`ring` — go to thebeginning or end, "
|
||||
"depending on the current element.</p><p>By default, "
|
||||
"`clamp`."
|
||||
),
|
||||
)
|
||||
layout_mode: div_pager_layout_mode.DivPagerLayoutMode = Field(
|
||||
description=(
|
||||
"Type of calculation of the main page width:`fixed` — from "
|
||||
"the fixed width of thenext page "
|
||||
"`neighbour_page_width`;`percentage` — from the percentage "
|
||||
"value`page_width`."
|
||||
),
|
||||
)
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="External margins from the element stroke.",
|
||||
)
|
||||
orientation: typing.Optional[DivPagerOrientation] = Field(
|
||||
description="Pager orientation.",
|
||||
)
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="Internal margins from the element stroke.",
|
||||
)
|
||||
restrict_parent_scroll: typing.Optional[bool] = Field(
|
||||
description=(
|
||||
"If the parameter is enabled, the pager won\'t transmit the "
|
||||
"scroll gesture to theparent element."
|
||||
),
|
||||
)
|
||||
row_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a string of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"List of [actions](div-action.md) to be executed when "
|
||||
"selecting an element in[pager](div-pager.md)."
|
||||
),
|
||||
)
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Tooltips linked to an element. A tooltip can be shown "
|
||||
"by`div-action://show_tooltip?id=`, hidden by "
|
||||
"`div-action://hide_tooltip?id=` where`id` — tooltip id."
|
||||
),
|
||||
)
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(
|
||||
description=(
|
||||
"Transformation of the element. Applies the passed transform "
|
||||
"to the element. Thecontent that does not fit into the "
|
||||
"original view will be cut off."
|
||||
),
|
||||
)
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(
|
||||
description=(
|
||||
"Change animation. It is played when the position or size of "
|
||||
"an element changes inthe new layout."
|
||||
),
|
||||
)
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Appearance animation. It is played when an element with a "
|
||||
"new ID appears. Tolearn more about the concept of "
|
||||
"transitions, see "
|
||||
"[Animatedtransitions](../../interaction.dita#animation/tran"
|
||||
"sition-animation)."
|
||||
),
|
||||
)
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Disappearance animation. It is played when an element "
|
||||
"disappears in the newlayout."
|
||||
),
|
||||
)
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Animation starting triggers. Default value: `[state_change, "
|
||||
"visibility_change]`."
|
||||
),
|
||||
)
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(
|
||||
description="Element visibility.",
|
||||
)
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(
|
||||
description=(
|
||||
"Tracking visibility of a single element. Not used if the "
|
||||
"`visibility_actions`parameter is set."
|
||||
),
|
||||
)
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(
|
||||
min_items=1,
|
||||
description="Actions when an element appears on the screen.",
|
||||
)
|
||||
width: typing.Optional[div_size.DivSize] = Field(
|
||||
description="Element width.",
|
||||
)
|
||||
|
||||
|
||||
class DivPagerOrientation(str, enum.Enum):
|
||||
HORIZONTAL = 'horizontal'
|
||||
VERTICAL = 'vertical'
|
||||
HORIZONTAL = "horizontal"
|
||||
VERTICAL = "vertical"
|
||||
|
||||
|
||||
DivPager.update_forward_refs()
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div_neighbour_page_size
|
||||
from . import div_page_size
|
||||
|
||||
from typing import Union
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_neighbour_page_size, div_page_size
|
||||
|
||||
|
||||
DivPagerLayoutMode = Union[
|
||||
div_page_size.DivPageSize,
|
||||
div_neighbour_page_size.DivNeighbourPageSize,
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div
|
||||
|
||||
|
||||
@@ -21,13 +24,23 @@ class DivPatch(BaseDiv):
|
||||
mode=mode,
|
||||
)
|
||||
|
||||
changes: typing.List[DivPatchChange] = Field(min_items=1, description='Element changes.')
|
||||
mode: typing.Optional[DivPatchMode] = Field(description='Procedure for applying changes:`transactional` — if an error occurs duringapplication of at least one element, the changes aren\'t applied.`partial` — allpossible changes are applied. If there are errors, they are reported.')
|
||||
changes: typing.List[DivPatchChange] = Field(
|
||||
min_items=1,
|
||||
description="Element changes.",
|
||||
)
|
||||
mode: typing.Optional[DivPatchMode] = Field(
|
||||
description=(
|
||||
"Procedure for applying changes:`transactional` — if an "
|
||||
"error occurs duringapplication of at least one element, the "
|
||||
"changes aren\'t applied.`partial` — allpossible changes are "
|
||||
"applied. If there are errors, they are reported."
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
class DivPatchMode(str, enum.Enum):
|
||||
TRANSACTIONAL = 'transactional'
|
||||
PARTIAL = 'partial'
|
||||
TRANSACTIONAL = "transactional"
|
||||
PARTIAL = "partial"
|
||||
|
||||
|
||||
class DivPatchChange(BaseDiv):
|
||||
@@ -42,8 +55,16 @@ class DivPatchChange(BaseDiv):
|
||||
items=items,
|
||||
)
|
||||
|
||||
id: str = Field(description='ID of an element to be replaced or removed.')
|
||||
items: typing.Optional[typing.List[div.Div]] = Field(min_items=1, description='Elements to be inserted. If the parameter isn\'t specified, the element will beremoved.')
|
||||
id: str = Field(
|
||||
description="ID of an element to be replaced or removed.",
|
||||
)
|
||||
items: typing.Optional[typing.List[div.Div]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Elements to be inserted. If the parameter isn\'t specified, "
|
||||
"the element will beremoved."
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
DivPatchChange.update_forward_refs()
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
# Percentage value of the element size.
|
||||
class DivPercentageSize(BaseDiv):
|
||||
@@ -12,15 +15,17 @@ class DivPercentageSize(BaseDiv):
|
||||
def __init__(
|
||||
self, *,
|
||||
value: float,
|
||||
type: str = 'percentage',
|
||||
type: str = "percentage",
|
||||
):
|
||||
super().__init__(
|
||||
type=type,
|
||||
value=value,
|
||||
)
|
||||
|
||||
type: str = Field(default='percentage')
|
||||
value: float = Field(description='Element size value.')
|
||||
type: str = Field(default="percentage")
|
||||
value: float = Field(
|
||||
description="Element size value.",
|
||||
)
|
||||
|
||||
|
||||
DivPercentageSize.update_forward_refs()
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div_pivot_fixed
|
||||
from . import div_pivot_percentage
|
||||
|
||||
from typing import Union
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_pivot_fixed, div_pivot_percentage
|
||||
|
||||
|
||||
DivPivot = Union[
|
||||
div_pivot_fixed.DivPivotFixed,
|
||||
div_pivot_percentage.DivPivotPercentage,
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_size_unit
|
||||
|
||||
|
||||
@@ -13,7 +16,7 @@ class DivPivotFixed(BaseDiv):
|
||||
|
||||
def __init__(
|
||||
self, *,
|
||||
type: str = 'pivot-fixed',
|
||||
type: str = "pivot-fixed",
|
||||
unit: typing.Optional[div_size_unit.DivSizeUnit] = None,
|
||||
value: typing.Optional[int] = None,
|
||||
):
|
||||
@@ -23,9 +26,17 @@ class DivPivotFixed(BaseDiv):
|
||||
value=value,
|
||||
)
|
||||
|
||||
type: str = Field(default='pivot-fixed')
|
||||
unit: typing.Optional[div_size_unit.DivSizeUnit] = Field(description='Unit of size measurement. To learn more about units of size measurement, see[Layout inside the card](../../layout.dita).')
|
||||
value: typing.Optional[int] = Field(description='Offset.')
|
||||
type: str = Field(default="pivot-fixed")
|
||||
unit: typing.Optional[div_size_unit.DivSizeUnit] = Field(
|
||||
description=(
|
||||
"Unit of size measurement. To learn more about units of size "
|
||||
"measurement, see[Layout inside the "
|
||||
"card](../../layout.dita)."
|
||||
),
|
||||
)
|
||||
value: typing.Optional[int] = Field(
|
||||
description="Offset.",
|
||||
)
|
||||
|
||||
|
||||
DivPivotFixed.update_forward_refs()
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
# Location of the coordinate of the axis of rotation as a percentage relative to
|
||||
# the element.
|
||||
@@ -13,15 +16,17 @@ class DivPivotPercentage(BaseDiv):
|
||||
def __init__(
|
||||
self, *,
|
||||
value: float,
|
||||
type: str = 'pivot-percentage',
|
||||
type: str = "pivot-percentage",
|
||||
):
|
||||
super().__init__(
|
||||
type=type,
|
||||
value=value,
|
||||
)
|
||||
|
||||
type: str = Field(default='pivot-percentage')
|
||||
value: float = Field(description='Location of the element.')
|
||||
type: str = Field(default="pivot-percentage")
|
||||
value: float = Field(
|
||||
description="Location of the element.",
|
||||
)
|
||||
|
||||
|
||||
DivPivotPercentage.update_forward_refs()
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_dimension
|
||||
|
||||
|
||||
@@ -21,8 +24,12 @@ class DivPoint(BaseDiv):
|
||||
y=y,
|
||||
)
|
||||
|
||||
x: div_dimension.DivDimension = Field(description='`X` coordinate.')
|
||||
y: div_dimension.DivDimension = Field(description='`Y` coordinate.')
|
||||
x: div_dimension.DivDimension = Field(
|
||||
description="`X` coordinate.",
|
||||
)
|
||||
y: div_dimension.DivDimension = Field(
|
||||
description="`Y` coordinate.",
|
||||
)
|
||||
|
||||
|
||||
DivPoint.update_forward_refs()
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_radial_gradient_center, div_radial_gradient_radius
|
||||
|
||||
|
||||
# Radial gradient.
|
||||
class DivRadialGradient(BaseDiv):
|
||||
@@ -12,10 +17,10 @@ class DivRadialGradient(BaseDiv):
|
||||
def __init__(
|
||||
self, *,
|
||||
colors: typing.List[str],
|
||||
radius: int,
|
||||
type: str = 'radial_gradient',
|
||||
center_x: typing.Optional[float] = None,
|
||||
center_y: typing.Optional[float] = None,
|
||||
type: str = "radial_gradient",
|
||||
center_x: typing.Optional[div_radial_gradient_center.DivRadialGradientCenter] = None,
|
||||
center_y: typing.Optional[div_radial_gradient_center.DivRadialGradientCenter] = None,
|
||||
radius: typing.Optional[div_radial_gradient_radius.DivRadialGradientRadius] = None,
|
||||
):
|
||||
super().__init__(
|
||||
type=type,
|
||||
@@ -25,11 +30,29 @@ class DivRadialGradient(BaseDiv):
|
||||
radius=radius,
|
||||
)
|
||||
|
||||
type: str = Field(default='radial_gradient')
|
||||
center_x: typing.Optional[float] = Field(description='Shift of the central point of the gradient relative to the left edge along the Xaxis in the range `0..1`.')
|
||||
center_y: typing.Optional[float] = Field(description='Shift of the central point of the gradient relative to the upper edge along the Yaxis in the range `0..1`.')
|
||||
colors: typing.List[str] = Field(min_items=2, description='Colors. Gradient points will be located at an equal distance from each other.')
|
||||
radius: int = Field(description='Radius of the gradient transition in `dp`.')
|
||||
type: str = Field(default="radial_gradient")
|
||||
center_x: typing.Optional[div_radial_gradient_center.DivRadialGradientCenter] = Field(
|
||||
description=(
|
||||
"Shift of the central point of the gradient relative to the "
|
||||
"left edge along the Xaxis."
|
||||
),
|
||||
)
|
||||
center_y: typing.Optional[div_radial_gradient_center.DivRadialGradientCenter] = Field(
|
||||
description=(
|
||||
"Shift of the central point of the gradient relative to the "
|
||||
"upper edge along the Yaxis."
|
||||
),
|
||||
)
|
||||
colors: typing.List[str] = Field(
|
||||
min_items=2,
|
||||
description=(
|
||||
"Colors. Gradient points will be located at an equal "
|
||||
"distance from each other."
|
||||
),
|
||||
)
|
||||
radius: typing.Optional[div_radial_gradient_radius.DivRadialGradientRadius] = Field(
|
||||
description="Radius of the gradient transition.",
|
||||
)
|
||||
|
||||
|
||||
DivRadialGradient.update_forward_refs()
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import enum
|
||||
import typing
|
||||
from typing import Union
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import (
|
||||
div_radial_gradient_fixed_center, div_radial_gradient_relative_center,
|
||||
)
|
||||
|
||||
|
||||
DivRadialGradientCenter = Union[
|
||||
div_radial_gradient_fixed_center.DivRadialGradientFixedCenter,
|
||||
div_radial_gradient_relative_center.DivRadialGradientRelativeCenter,
|
||||
]
|
||||
@@ -0,0 +1,42 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_size_unit
|
||||
|
||||
|
||||
# Fixed central point of the gradient.
|
||||
class DivRadialGradientFixedCenter(BaseDiv):
|
||||
|
||||
def __init__(
|
||||
self, *,
|
||||
value: int,
|
||||
type: str = "fixed",
|
||||
unit: typing.Optional[div_size_unit.DivSizeUnit] = None,
|
||||
):
|
||||
super().__init__(
|
||||
type=type,
|
||||
unit=unit,
|
||||
value=value,
|
||||
)
|
||||
|
||||
type: str = Field(default="fixed")
|
||||
unit: typing.Optional[div_size_unit.DivSizeUnit] = Field(
|
||||
description=(
|
||||
"Unit of measurement. To learn more about units of size "
|
||||
"measurement, see [Layoutinside the "
|
||||
"card](../../layout.dita)."
|
||||
),
|
||||
)
|
||||
value: int = Field(
|
||||
description="Shift value of the fixed central point of the gradient.",
|
||||
)
|
||||
|
||||
|
||||
DivRadialGradientFixedCenter.update_forward_refs()
|
||||
@@ -0,0 +1,18 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import enum
|
||||
import typing
|
||||
from typing import Union
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_fixed_size, div_radial_gradient_relative_radius
|
||||
|
||||
|
||||
DivRadialGradientRadius = Union[
|
||||
div_fixed_size.DivFixedSize,
|
||||
div_radial_gradient_relative_radius.DivRadialGradientRelativeRadius,
|
||||
]
|
||||
@@ -0,0 +1,34 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
# Relative central point of the gradient.
|
||||
class DivRadialGradientRelativeCenter(BaseDiv):
|
||||
|
||||
def __init__(
|
||||
self, *,
|
||||
value: float,
|
||||
type: str = "relative",
|
||||
):
|
||||
super().__init__(
|
||||
type=type,
|
||||
value=value,
|
||||
)
|
||||
|
||||
type: str = Field(default="relative")
|
||||
value: float = Field(
|
||||
description=(
|
||||
"Shift value of the central relative point of the gradient "
|
||||
"in the range `0..1`."
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
DivRadialGradientRelativeCenter.update_forward_refs()
|
||||
@@ -0,0 +1,38 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
# Relative radius of the gradient transition.
|
||||
class DivRadialGradientRelativeRadius(BaseDiv):
|
||||
|
||||
def __init__(
|
||||
self, *,
|
||||
value: DivRadialGradientRelativeRadiusValue,
|
||||
type: str = "relative",
|
||||
):
|
||||
super().__init__(
|
||||
type=type,
|
||||
value=value,
|
||||
)
|
||||
|
||||
type: str = Field(default="relative")
|
||||
value: DivRadialGradientRelativeRadiusValue = Field(
|
||||
description="Type of relative radius of the gradient transition.",
|
||||
)
|
||||
|
||||
|
||||
class DivRadialGradientRelativeRadiusValue(str, enum.Enum):
|
||||
NEAREST_CORNER = "nearest_corner"
|
||||
FARTHEST_CORNER = "farthest_corner"
|
||||
NEAREST_SIDE = "nearest_side"
|
||||
FARTHEST_SIDE = "farthest_side"
|
||||
|
||||
|
||||
DivRadialGradientRelativeRadius.update_forward_refs()
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_fixed_size
|
||||
|
||||
|
||||
@@ -13,7 +16,7 @@ class DivRoundedRectangleShape(BaseDiv):
|
||||
|
||||
def __init__(
|
||||
self, *,
|
||||
type: str = 'rounded_rectangle',
|
||||
type: str = "rounded_rectangle",
|
||||
corner_radius: typing.Optional[div_fixed_size.DivFixedSize] = None,
|
||||
item_height: typing.Optional[div_fixed_size.DivFixedSize] = None,
|
||||
item_width: typing.Optional[div_fixed_size.DivFixedSize] = None,
|
||||
@@ -25,10 +28,16 @@ class DivRoundedRectangleShape(BaseDiv):
|
||||
item_width=item_width,
|
||||
)
|
||||
|
||||
type: str = Field(default='rounded_rectangle')
|
||||
corner_radius: typing.Optional[div_fixed_size.DivFixedSize] = Field(description='Corner rounding radius.')
|
||||
item_height: typing.Optional[div_fixed_size.DivFixedSize] = Field(description='Height.')
|
||||
item_width: typing.Optional[div_fixed_size.DivFixedSize] = Field(description='Width.')
|
||||
type: str = Field(default="rounded_rectangle")
|
||||
corner_radius: typing.Optional[div_fixed_size.DivFixedSize] = Field(
|
||||
description="Corner rounding radius.",
|
||||
)
|
||||
item_height: typing.Optional[div_fixed_size.DivFixedSize] = Field(
|
||||
description="Height.",
|
||||
)
|
||||
item_width: typing.Optional[div_fixed_size.DivFixedSize] = Field(
|
||||
description="Width.",
|
||||
)
|
||||
|
||||
|
||||
DivRoundedRectangleShape.update_forward_refs()
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_animation_interpolator
|
||||
|
||||
|
||||
@@ -13,7 +16,7 @@ class DivScaleTransition(BaseDiv):
|
||||
|
||||
def __init__(
|
||||
self, *,
|
||||
type: str = 'scale',
|
||||
type: str = "scale",
|
||||
duration: typing.Optional[int] = None,
|
||||
interpolator: typing.Optional[div_animation_interpolator.DivAnimationInterpolator] = None,
|
||||
pivot_x: typing.Optional[float] = None,
|
||||
@@ -31,13 +34,34 @@ class DivScaleTransition(BaseDiv):
|
||||
start_delay=start_delay,
|
||||
)
|
||||
|
||||
type: str = Field(default='scale')
|
||||
duration: typing.Optional[int] = Field(description='Animation duration in milliseconds.')
|
||||
interpolator: typing.Optional[div_animation_interpolator.DivAnimationInterpolator] = Field(description='Transition speed nature.')
|
||||
pivot_x: typing.Optional[float] = Field(description='Relative coordinate `X` of the point that won\'t change its position in case ofscaling.')
|
||||
pivot_y: typing.Optional[float] = Field(description='Relative coordinate `Y` of the point that won\'t change its position in case ofscaling.')
|
||||
scale: typing.Optional[float] = Field(description='Value of the scale from which the element starts appearing or at which itfinishes disappearing.')
|
||||
start_delay: typing.Optional[int] = Field(description='Delay in milliseconds before animation starts.')
|
||||
type: str = Field(default="scale")
|
||||
duration: typing.Optional[int] = Field(
|
||||
description="Animation duration in milliseconds.",
|
||||
)
|
||||
interpolator: typing.Optional[div_animation_interpolator.DivAnimationInterpolator] = Field(
|
||||
description="Transition speed nature.",
|
||||
)
|
||||
pivot_x: typing.Optional[float] = Field(
|
||||
description=(
|
||||
"Relative coordinate `X` of the point that won\'t change its "
|
||||
"position in case ofscaling."
|
||||
),
|
||||
)
|
||||
pivot_y: typing.Optional[float] = Field(
|
||||
description=(
|
||||
"Relative coordinate `Y` of the point that won\'t change its "
|
||||
"position in case ofscaling."
|
||||
),
|
||||
)
|
||||
scale: typing.Optional[float] = Field(
|
||||
description=(
|
||||
"Value of the scale from which the element starts appearing "
|
||||
"or at which itfinishes disappearing."
|
||||
),
|
||||
)
|
||||
start_delay: typing.Optional[int] = Field(
|
||||
description="Delay in milliseconds before animation starts.",
|
||||
)
|
||||
|
||||
|
||||
DivScaleTransition.update_forward_refs()
|
||||
|
||||
@@ -1,28 +1,20 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div_accessibility
|
||||
from . import div_action
|
||||
from . import div_alignment_horizontal
|
||||
from . import div_alignment_vertical
|
||||
from . import div_animation
|
||||
from . import div_appearance_transition
|
||||
from . import div_background
|
||||
from . import div_border
|
||||
from . import div_change_transition
|
||||
from . import div_edge_insets
|
||||
from . import div_extension
|
||||
from . import div_focus
|
||||
from . import div_size
|
||||
from . import div_tooltip
|
||||
from . import div_transform
|
||||
from . import div_transition_trigger
|
||||
from . import div_visibility
|
||||
from . import div_visibility_action
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import (
|
||||
div_accessibility, div_action, div_alignment_horizontal,
|
||||
div_alignment_vertical, div_animation, div_appearance_transition,
|
||||
div_background, div_border, div_change_transition, div_edge_insets,
|
||||
div_extension, div_focus, div_size, div_tooltip, div_transform,
|
||||
div_transition_trigger, div_visibility, div_visibility_action,
|
||||
)
|
||||
|
||||
|
||||
# A separating line between elements.
|
||||
@@ -30,7 +22,7 @@ class DivSeparator(BaseDiv):
|
||||
|
||||
def __init__(
|
||||
self, *,
|
||||
type: str = 'separator',
|
||||
type: str = "separator",
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = None,
|
||||
action: typing.Optional[div_action.DivAction] = None,
|
||||
action_animation: typing.Optional[div_animation.DivAnimation] = None,
|
||||
@@ -98,38 +90,175 @@ class DivSeparator(BaseDiv):
|
||||
width=width,
|
||||
)
|
||||
|
||||
type: str = Field(default='separator')
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(description='Accessibility for disabled people.')
|
||||
action: typing.Optional[div_action.DivAction] = Field(description='One action when clicking on an element. Not used if the `actions` parameter isset.')
|
||||
action_animation: typing.Optional[div_animation.DivAnimation] = Field(description='Action animation. Web supports `fade`, `scale` and `set` only.')
|
||||
actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Multiple actions when clicking on an element.')
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(description='Horizontal alignment of an element inside the parent element.')
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(description='Vertical alignment of an element inside the parent element.')
|
||||
alpha: typing.Optional[float] = Field(description='Sets transparency of the entire element: `0` — completely transparent, `1` —opaque.')
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(min_items=1, description='Element background. It can contain multiple layers.')
|
||||
border: typing.Optional[div_border.DivBorder] = Field(description='Element stroke.')
|
||||
column_span: typing.Optional[int] = Field(description='Merges cells in a column of the [grid](div-grid.md) element.')
|
||||
delimiter_style: typing.Optional[DivSeparatorDelimiterStyle] = Field(description='Separator display settings.')
|
||||
doubletap_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Action when double-clicking on an element.')
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(min_items=1, description='Extensions for additional processing of an element. The list of extensions isgiven in [DivExtension](../../extensions.dita).')
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(description='Parameters when focusing on an element or losing focus.')
|
||||
height: typing.Optional[div_size.DivSize] = Field(description='Element height. For Android: if there is text in this or in a child element,specify height in `sp` to scale the element together with the text. To learn moreabout units of size measurement, see [Layout inside the card](../../layout.dita).')
|
||||
id: typing.Optional[str] = Field(min_length=1, description='Element ID. It must be unique within the root element. It is used as`accessibilityIdentifier` on iOS.')
|
||||
longtap_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Action when long-clicking on an element.')
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='External margins from the element stroke.')
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='Internal margins from the element stroke.')
|
||||
row_span: typing.Optional[int] = Field(description='Merges cells in a string of the [grid](div-grid.md) element.')
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='List of [actions](div-action.md) to be executed when selecting an element in[pager](div-pager.md).')
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(min_items=1, description='Tooltips linked to an element. A tooltip can be shown by`div-action://show_tooltip?id=`, hidden by `div-action://hide_tooltip?id=` where`id` — tooltip id.')
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(description='Transformation of the element. Applies the passed transform to the element. Thecontent that does not fit into the original view will be cut off.')
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(description='Change animation. It is played when the position or size of an element changes inthe new layout.')
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Appearance animation. It is played when an element with a new ID appears. Tolearn more about the concept of transitions, see [Animatedtransitions](../../interaction.dita#animation/transition-animation).')
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Disappearance animation. It is played when an element disappears in the newlayout.')
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(min_items=1, description='Animation starting triggers. Default value: `[state_change, visibility_change]`.')
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(description='Element visibility.')
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(description='Tracking visibility of a single element. Not used if the `visibility_actions`parameter is set.')
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(min_items=1, description='Actions when an element appears on the screen.')
|
||||
width: typing.Optional[div_size.DivSize] = Field(description='Element width.')
|
||||
type: str = Field(default="separator")
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(
|
||||
description="Accessibility for disabled people.",
|
||||
)
|
||||
action: typing.Optional[div_action.DivAction] = Field(
|
||||
description=(
|
||||
"One action when clicking on an element. Not used if the "
|
||||
"`actions` parameter isset."
|
||||
),
|
||||
)
|
||||
action_animation: typing.Optional[div_animation.DivAnimation] = Field(
|
||||
description=(
|
||||
"Action animation. Web supports `fade`, `scale` and `set` "
|
||||
"only."
|
||||
),
|
||||
)
|
||||
actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description="Multiple actions when clicking on an element.",
|
||||
)
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(
|
||||
description=(
|
||||
"Horizontal alignment of an element inside the parent "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(
|
||||
description=(
|
||||
"Vertical alignment of an element inside the parent element."
|
||||
),
|
||||
)
|
||||
alpha: typing.Optional[float] = Field(
|
||||
description=(
|
||||
"Sets transparency of the entire element: `0` — completely "
|
||||
"transparent, `1` —opaque."
|
||||
),
|
||||
)
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(
|
||||
min_items=1,
|
||||
description="Element background. It can contain multiple layers.",
|
||||
)
|
||||
border: typing.Optional[div_border.DivBorder] = Field(
|
||||
description="Element stroke.",
|
||||
)
|
||||
column_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a column of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
delimiter_style: typing.Optional[DivSeparatorDelimiterStyle] = Field(
|
||||
description="Separator display settings.",
|
||||
)
|
||||
doubletap_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description="Action when double-clicking on an element.",
|
||||
)
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Extensions for additional processing of an element. The "
|
||||
"list of extensions isgiven in "
|
||||
"[DivExtension](../../extensions.dita)."
|
||||
),
|
||||
)
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(
|
||||
description="Parameters when focusing on an element or losing focus.",
|
||||
)
|
||||
height: typing.Optional[div_size.DivSize] = Field(
|
||||
description=(
|
||||
"Element height. For Android: if there is text in this or in "
|
||||
"a child element,specify height in `sp` to scale the element "
|
||||
"together with the text. To learn moreabout units of size "
|
||||
"measurement, see [Layout inside the "
|
||||
"card](../../layout.dita)."
|
||||
),
|
||||
)
|
||||
id: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
description=(
|
||||
"Element ID. It must be unique within the root element. It "
|
||||
"is used as`accessibilityIdentifier` on iOS."
|
||||
),
|
||||
)
|
||||
longtap_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Action when long-clicking on an element. Doesn\'t work on "
|
||||
"the devices w/o touchgestures."
|
||||
),
|
||||
)
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="External margins from the element stroke.",
|
||||
)
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="Internal margins from the element stroke.",
|
||||
)
|
||||
row_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a string of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"List of [actions](div-action.md) to be executed when "
|
||||
"selecting an element in[pager](div-pager.md)."
|
||||
),
|
||||
)
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Tooltips linked to an element. A tooltip can be shown "
|
||||
"by`div-action://show_tooltip?id=`, hidden by "
|
||||
"`div-action://hide_tooltip?id=` where`id` — tooltip id."
|
||||
),
|
||||
)
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(
|
||||
description=(
|
||||
"Transformation of the element. Applies the passed transform "
|
||||
"to the element. Thecontent that does not fit into the "
|
||||
"original view will be cut off."
|
||||
),
|
||||
)
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(
|
||||
description=(
|
||||
"Change animation. It is played when the position or size of "
|
||||
"an element changes inthe new layout."
|
||||
),
|
||||
)
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Appearance animation. It is played when an element with a "
|
||||
"new ID appears. Tolearn more about the concept of "
|
||||
"transitions, see "
|
||||
"[Animatedtransitions](../../interaction.dita#animation/tran"
|
||||
"sition-animation)."
|
||||
),
|
||||
)
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Disappearance animation. It is played when an element "
|
||||
"disappears in the newlayout."
|
||||
),
|
||||
)
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Animation starting triggers. Default value: `[state_change, "
|
||||
"visibility_change]`."
|
||||
),
|
||||
)
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(
|
||||
description="Element visibility.",
|
||||
)
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(
|
||||
description=(
|
||||
"Tracking visibility of a single element. Not used if the "
|
||||
"`visibility_actions`parameter is set."
|
||||
),
|
||||
)
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(
|
||||
min_items=1,
|
||||
description="Actions when an element appears on the screen.",
|
||||
)
|
||||
width: typing.Optional[div_size.DivSize] = Field(
|
||||
description="Element width.",
|
||||
)
|
||||
|
||||
|
||||
# Separator display settings.
|
||||
@@ -145,13 +274,25 @@ class DivSeparatorDelimiterStyle(BaseDiv):
|
||||
orientation=orientation,
|
||||
)
|
||||
|
||||
color: typing.Optional[str] = Field(format="color", description='Separator color. To prevent the separator from being displayed, set transparencyin the alpha channel. For example, `#00FFFFFF`.')
|
||||
orientation: typing.Optional[DelimiterStyleOrientation] = Field(description='Separator orientation:`vertical` — vertical;`horizontal` — horizontal.<')
|
||||
color: typing.Optional[str] = Field(
|
||||
format="color",
|
||||
description=(
|
||||
"Separator color. To prevent the separator from being "
|
||||
"displayed, set transparencyin the alpha channel. For "
|
||||
"example, `#00FFFFFF`."
|
||||
),
|
||||
)
|
||||
orientation: typing.Optional[DelimiterStyleOrientation] = Field(
|
||||
description=(
|
||||
"Separator orientation:`vertical` — vertical;`horizontal` — "
|
||||
"horizontal.<"
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
class DelimiterStyleOrientation(str, enum.Enum):
|
||||
VERTICAL = 'vertical'
|
||||
HORIZONTAL = 'horizontal'
|
||||
VERTICAL = "vertical"
|
||||
HORIZONTAL = "horizontal"
|
||||
|
||||
|
||||
DivSeparatorDelimiterStyle.update_forward_refs()
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_point
|
||||
|
||||
|
||||
@@ -25,10 +28,19 @@ class DivShadow(BaseDiv):
|
||||
offset=offset,
|
||||
)
|
||||
|
||||
alpha: typing.Optional[float] = Field(description='Shadow transparency.')
|
||||
blur: typing.Optional[int] = Field(description='Blur intensity.')
|
||||
color: typing.Optional[str] = Field(format="color", description='Shadow color.')
|
||||
offset: div_point.DivPoint = Field(description='Shadow offset.')
|
||||
alpha: typing.Optional[float] = Field(
|
||||
description="Shadow transparency.",
|
||||
)
|
||||
blur: typing.Optional[int] = Field(
|
||||
description="Blur intensity.",
|
||||
)
|
||||
color: typing.Optional[str] = Field(
|
||||
format="color",
|
||||
description="Shadow color.",
|
||||
)
|
||||
offset: div_point.DivPoint = Field(
|
||||
description="Shadow offset.",
|
||||
)
|
||||
|
||||
|
||||
DivShadow.update_forward_refs()
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div_rounded_rectangle_shape
|
||||
|
||||
from typing import Union
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_circle_shape, div_rounded_rectangle_shape
|
||||
|
||||
|
||||
DivShape = Union[
|
||||
div_rounded_rectangle_shape.DivRoundedRectangleShape,
|
||||
div_circle_shape.DivCircleShape,
|
||||
]
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div_shape
|
||||
from . import div_stroke
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_shape, div_stroke
|
||||
|
||||
|
||||
# Drawable of a simple geometric shape.
|
||||
@@ -16,7 +18,7 @@ class DivShapeDrawable(BaseDiv):
|
||||
self, *,
|
||||
color: str,
|
||||
shape: div_shape.DivShape,
|
||||
type: str = 'shape_drawable',
|
||||
type: str = "shape_drawable",
|
||||
stroke: typing.Optional[div_stroke.DivStroke] = None,
|
||||
):
|
||||
super().__init__(
|
||||
@@ -26,10 +28,17 @@ class DivShapeDrawable(BaseDiv):
|
||||
stroke=stroke,
|
||||
)
|
||||
|
||||
type: str = Field(default='shape_drawable')
|
||||
color: str = Field(format="color", description='Fill color.')
|
||||
shape: div_shape.DivShape = Field(description='Shape.')
|
||||
stroke: typing.Optional[div_stroke.DivStroke] = Field(description='Stroke style.')
|
||||
type: str = Field(default="shape_drawable")
|
||||
color: str = Field(
|
||||
format="color",
|
||||
description="Fill color.",
|
||||
)
|
||||
shape: div_shape.DivShape = Field(
|
||||
description="Shape.",
|
||||
)
|
||||
stroke: typing.Optional[div_stroke.DivStroke] = Field(
|
||||
description="Stroke style.",
|
||||
)
|
||||
|
||||
|
||||
DivShapeDrawable.update_forward_refs()
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div_fixed_size
|
||||
from . import div_match_parent_size
|
||||
from . import div_wrap_content_size
|
||||
|
||||
from typing import Union
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_fixed_size, div_match_parent_size, div_wrap_content_size
|
||||
|
||||
|
||||
DivSize = Union[
|
||||
div_fixed_size.DivFixedSize,
|
||||
div_match_parent_size.DivMatchParentSize,
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
class DivSizeUnit(str, enum.Enum):
|
||||
DP = 'dp'
|
||||
SP = 'sp'
|
||||
PX = 'px'
|
||||
DP = "dp"
|
||||
SP = "sp"
|
||||
PX = "px"
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div_animation_interpolator
|
||||
from . import div_dimension
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_animation_interpolator, div_dimension
|
||||
|
||||
|
||||
# Slide animation.
|
||||
@@ -14,7 +16,7 @@ class DivSlideTransition(BaseDiv):
|
||||
|
||||
def __init__(
|
||||
self, *,
|
||||
type: str = 'slide',
|
||||
type: str = "slide",
|
||||
distance: typing.Optional[div_dimension.DivDimension] = None,
|
||||
duration: typing.Optional[int] = None,
|
||||
edge: typing.Optional[DivSlideTransitionEdge] = None,
|
||||
@@ -30,19 +32,38 @@ class DivSlideTransition(BaseDiv):
|
||||
start_delay=start_delay,
|
||||
)
|
||||
|
||||
type: str = Field(default='slide')
|
||||
distance: typing.Optional[div_dimension.DivDimension] = Field(description='A fixed value of an offset which the element starts appearing from or at which itfinishes disappearing. If no value is specified, the distance to the selectededge of a parent element is used.')
|
||||
duration: typing.Optional[int] = Field(description='Animation duration in milliseconds.')
|
||||
edge: typing.Optional[DivSlideTransitionEdge] = Field(description='Edge of a parent element for one of the action types:where the element will movefrom when appearing;where the element will move to when disappearing.')
|
||||
interpolator: typing.Optional[div_animation_interpolator.DivAnimationInterpolator] = Field(description='Transition speed nature.')
|
||||
start_delay: typing.Optional[int] = Field(description='Delay in milliseconds before animation starts.')
|
||||
type: str = Field(default="slide")
|
||||
distance: typing.Optional[div_dimension.DivDimension] = Field(
|
||||
description=(
|
||||
"A fixed value of an offset which the element starts "
|
||||
"appearing from or at which itfinishes disappearing. If no "
|
||||
"value is specified, the distance to the selectededge of a "
|
||||
"parent element is used."
|
||||
),
|
||||
)
|
||||
duration: typing.Optional[int] = Field(
|
||||
description="Animation duration in milliseconds.",
|
||||
)
|
||||
edge: typing.Optional[DivSlideTransitionEdge] = Field(
|
||||
description=(
|
||||
"Edge of a parent element for one of the action types:where "
|
||||
"the element will movefrom when appearing;where the element "
|
||||
"will move to when disappearing."
|
||||
),
|
||||
)
|
||||
interpolator: typing.Optional[div_animation_interpolator.DivAnimationInterpolator] = Field(
|
||||
description="Transition speed nature.",
|
||||
)
|
||||
start_delay: typing.Optional[int] = Field(
|
||||
description="Delay in milliseconds before animation starts.",
|
||||
)
|
||||
|
||||
|
||||
class DivSlideTransitionEdge(str, enum.Enum):
|
||||
LEFT = 'left'
|
||||
TOP = 'top'
|
||||
RIGHT = 'right'
|
||||
BOTTOM = 'bottom'
|
||||
LEFT = "left"
|
||||
TOP = "top"
|
||||
RIGHT = "right"
|
||||
BOTTOM = "bottom"
|
||||
|
||||
|
||||
DivSlideTransition.update_forward_refs()
|
||||
|
||||
@@ -1,31 +1,21 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div_accessibility
|
||||
from . import div_action
|
||||
from . import div_alignment_horizontal
|
||||
from . import div_alignment_vertical
|
||||
from . import div_appearance_transition
|
||||
from . import div_background
|
||||
from . import div_border
|
||||
from . import div_change_transition
|
||||
from . import div_drawable
|
||||
from . import div_edge_insets
|
||||
from . import div_extension
|
||||
from . import div_focus
|
||||
from . import div_font_weight
|
||||
from . import div_point
|
||||
from . import div_size
|
||||
from . import div_size_unit
|
||||
from . import div_tooltip
|
||||
from . import div_transform
|
||||
from . import div_transition_trigger
|
||||
from . import div_visibility
|
||||
from . import div_visibility_action
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import (
|
||||
div_accessibility, div_action, div_alignment_horizontal,
|
||||
div_alignment_vertical, div_appearance_transition, div_background,
|
||||
div_border, div_change_transition, div_drawable, div_edge_insets,
|
||||
div_extension, div_focus, div_font_weight, div_point, div_size,
|
||||
div_size_unit, div_tooltip, div_transform, div_transition_trigger,
|
||||
div_visibility, div_visibility_action,
|
||||
)
|
||||
|
||||
|
||||
# Slider for selecting a value in the range.
|
||||
@@ -36,7 +26,7 @@ class DivSlider(BaseDiv):
|
||||
thumb_style: div_drawable.DivDrawable,
|
||||
track_active_style: div_drawable.DivDrawable,
|
||||
track_inactive_style: div_drawable.DivDrawable,
|
||||
type: str = 'slider',
|
||||
type: str = "slider",
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = None,
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = None,
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = None,
|
||||
@@ -115,45 +105,189 @@ class DivSlider(BaseDiv):
|
||||
width=width,
|
||||
)
|
||||
|
||||
type: str = Field(default='slider')
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(description='Accessibility for disabled people.')
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(description='Horizontal alignment of an element inside the parent element.')
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(description='Vertical alignment of an element inside the parent element.')
|
||||
alpha: typing.Optional[float] = Field(description='Sets transparency of the entire element: `0` — completely transparent, `1` —opaque.')
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(min_items=1, description='Element background. It can contain multiple layers.')
|
||||
border: typing.Optional[div_border.DivBorder] = Field(description='Element stroke.')
|
||||
column_span: typing.Optional[int] = Field(description='Merges cells in a column of the [grid](div-grid.md) element.')
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(min_items=1, description='Extensions for additional processing of an element. The list of extensions isgiven in [DivExtension](../../extensions.dita).')
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(description='Parameters when focusing on an element or losing focus.')
|
||||
height: typing.Optional[div_size.DivSize] = Field(description='Element height. For Android: if there is text in this or in a child element,specify height in `sp` to scale the element together with the text. To learn moreabout units of size measurement, see [Layout inside the card](../../layout.dita).')
|
||||
id: typing.Optional[str] = Field(min_length=1, description='Element ID. It must be unique within the root element. It is used as`accessibilityIdentifier` on iOS.')
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='External margins from the element stroke.')
|
||||
max_value: typing.Optional[int] = Field(description='Maximum value. It must be greater than the minimum value.')
|
||||
min_value: typing.Optional[int] = Field(description='Minimum value.')
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='Internal margins from the element stroke.')
|
||||
row_span: typing.Optional[int] = Field(description='Merges cells in a string of the [grid](div-grid.md) element.')
|
||||
secondary_value_accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(description='Accessibility for the secondary thumb.')
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='List of [actions](div-action.md) to be executed when selecting an element in[pager](div-pager.md).')
|
||||
thumb_secondary_style: typing.Optional[div_drawable.DivDrawable] = Field(description='Style of the second pointer.')
|
||||
thumb_secondary_text_style: typing.Optional[DivSliderTextStyle] = Field(description='Text style in the second pointer.')
|
||||
thumb_secondary_value_variable: typing.Optional[str] = Field(min_length=1, description='Name of the variable to store the current value of the secondary thumb.')
|
||||
thumb_style: div_drawable.DivDrawable = Field(description='Style of the first pointer.')
|
||||
thumb_text_style: typing.Optional[DivSliderTextStyle] = Field(description='Text style in the first pointer.')
|
||||
thumb_value_variable: typing.Optional[str] = Field(min_length=1, description='Name of the variable to store the current thumb value.')
|
||||
tick_mark_active_style: typing.Optional[div_drawable.DivDrawable] = Field(description='Style of active serifs.')
|
||||
tick_mark_inactive_style: typing.Optional[div_drawable.DivDrawable] = Field(description='Style of inactive serifs.')
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(min_items=1, description='Tooltips linked to an element. A tooltip can be shown by`div-action://show_tooltip?id=`, hidden by `div-action://hide_tooltip?id=` where`id` — tooltip id.')
|
||||
track_active_style: div_drawable.DivDrawable = Field(description='Style of the active part of a scale.')
|
||||
track_inactive_style: div_drawable.DivDrawable = Field(description='Style of the inactive part of a scale.')
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(description='Transformation of the element. Applies the passed transform to the element. Thecontent that does not fit into the original view will be cut off.')
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(description='Change animation. It is played when the position or size of an element changes inthe new layout.')
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Appearance animation. It is played when an element with a new ID appears. Tolearn more about the concept of transitions, see [Animatedtransitions](../../interaction.dita#animation/transition-animation).')
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Disappearance animation. It is played when an element disappears in the newlayout.')
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(min_items=1, description='Animation starting triggers. Default value: `[state_change, visibility_change]`.')
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(description='Element visibility.')
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(description='Tracking visibility of a single element. Not used if the `visibility_actions`parameter is set.')
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(min_items=1, description='Actions when an element appears on the screen.')
|
||||
width: typing.Optional[div_size.DivSize] = Field(description='Element width.')
|
||||
type: str = Field(default="slider")
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(
|
||||
description="Accessibility for disabled people.",
|
||||
)
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(
|
||||
description=(
|
||||
"Horizontal alignment of an element inside the parent "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(
|
||||
description=(
|
||||
"Vertical alignment of an element inside the parent element."
|
||||
),
|
||||
)
|
||||
alpha: typing.Optional[float] = Field(
|
||||
description=(
|
||||
"Sets transparency of the entire element: `0` — completely "
|
||||
"transparent, `1` —opaque."
|
||||
),
|
||||
)
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(
|
||||
min_items=1,
|
||||
description="Element background. It can contain multiple layers.",
|
||||
)
|
||||
border: typing.Optional[div_border.DivBorder] = Field(
|
||||
description="Element stroke.",
|
||||
)
|
||||
column_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a column of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Extensions for additional processing of an element. The "
|
||||
"list of extensions isgiven in "
|
||||
"[DivExtension](../../extensions.dita)."
|
||||
),
|
||||
)
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(
|
||||
description="Parameters when focusing on an element or losing focus.",
|
||||
)
|
||||
height: typing.Optional[div_size.DivSize] = Field(
|
||||
description=(
|
||||
"Element height. For Android: if there is text in this or in "
|
||||
"a child element,specify height in `sp` to scale the element "
|
||||
"together with the text. To learn moreabout units of size "
|
||||
"measurement, see [Layout inside the "
|
||||
"card](../../layout.dita)."
|
||||
),
|
||||
)
|
||||
id: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
description=(
|
||||
"Element ID. It must be unique within the root element. It "
|
||||
"is used as`accessibilityIdentifier` on iOS."
|
||||
),
|
||||
)
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="External margins from the element stroke.",
|
||||
)
|
||||
max_value: typing.Optional[int] = Field(
|
||||
description="Maximum value. It must be greater than the minimum value.",
|
||||
)
|
||||
min_value: typing.Optional[int] = Field(
|
||||
description="Minimum value.",
|
||||
)
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="Internal margins from the element stroke.",
|
||||
)
|
||||
row_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a string of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
secondary_value_accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(
|
||||
description="Accessibility for the secondary thumb.",
|
||||
)
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"List of [actions](div-action.md) to be executed when "
|
||||
"selecting an element in[pager](div-pager.md)."
|
||||
),
|
||||
)
|
||||
thumb_secondary_style: typing.Optional[div_drawable.DivDrawable] = Field(
|
||||
description="Style of the second pointer.",
|
||||
)
|
||||
thumb_secondary_text_style: typing.Optional[DivSliderTextStyle] = Field(
|
||||
description="Text style in the second pointer.",
|
||||
)
|
||||
thumb_secondary_value_variable: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
description=(
|
||||
"Name of the variable to store the current value of the "
|
||||
"secondary thumb."
|
||||
),
|
||||
)
|
||||
thumb_style: div_drawable.DivDrawable = Field(
|
||||
description="Style of the first pointer.",
|
||||
)
|
||||
thumb_text_style: typing.Optional[DivSliderTextStyle] = Field(
|
||||
description="Text style in the first pointer.",
|
||||
)
|
||||
thumb_value_variable: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
description="Name of the variable to store the current thumb value.",
|
||||
)
|
||||
tick_mark_active_style: typing.Optional[div_drawable.DivDrawable] = Field(
|
||||
description="Style of active serifs.",
|
||||
)
|
||||
tick_mark_inactive_style: typing.Optional[div_drawable.DivDrawable] = Field(
|
||||
description="Style of inactive serifs.",
|
||||
)
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Tooltips linked to an element. A tooltip can be shown "
|
||||
"by`div-action://show_tooltip?id=`, hidden by "
|
||||
"`div-action://hide_tooltip?id=` where`id` — tooltip id."
|
||||
),
|
||||
)
|
||||
track_active_style: div_drawable.DivDrawable = Field(
|
||||
description="Style of the active part of a scale.",
|
||||
)
|
||||
track_inactive_style: div_drawable.DivDrawable = Field(
|
||||
description="Style of the inactive part of a scale.",
|
||||
)
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(
|
||||
description=(
|
||||
"Transformation of the element. Applies the passed transform "
|
||||
"to the element. Thecontent that does not fit into the "
|
||||
"original view will be cut off."
|
||||
),
|
||||
)
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(
|
||||
description=(
|
||||
"Change animation. It is played when the position or size of "
|
||||
"an element changes inthe new layout."
|
||||
),
|
||||
)
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Appearance animation. It is played when an element with a "
|
||||
"new ID appears. Tolearn more about the concept of "
|
||||
"transitions, see "
|
||||
"[Animatedtransitions](../../interaction.dita#animation/tran"
|
||||
"sition-animation)."
|
||||
),
|
||||
)
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Disappearance animation. It is played when an element "
|
||||
"disappears in the newlayout."
|
||||
),
|
||||
)
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Animation starting triggers. Default value: `[state_change, "
|
||||
"visibility_change]`."
|
||||
),
|
||||
)
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(
|
||||
description="Element visibility.",
|
||||
)
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(
|
||||
description=(
|
||||
"Tracking visibility of a single element. Not used if the "
|
||||
"`visibility_actions`parameter is set."
|
||||
),
|
||||
)
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(
|
||||
min_items=1,
|
||||
description="Actions when an element appears on the screen.",
|
||||
)
|
||||
width: typing.Optional[div_size.DivSize] = Field(
|
||||
description="Element width.",
|
||||
)
|
||||
|
||||
|
||||
class DivSliderTextStyle(BaseDiv):
|
||||
@@ -174,11 +308,21 @@ class DivSliderTextStyle(BaseDiv):
|
||||
text_color=text_color,
|
||||
)
|
||||
|
||||
font_size: int = Field(description='Font size.')
|
||||
font_size_unit: typing.Optional[div_size_unit.DivSizeUnit] = Field()
|
||||
font_weight: typing.Optional[div_font_weight.DivFontWeight] = Field(description='Style.')
|
||||
offset: typing.Optional[div_point.DivPoint] = Field(description='Shift relative to the center.')
|
||||
text_color: typing.Optional[str] = Field(format="color", description='Text color.')
|
||||
font_size: int = Field(
|
||||
description="Font size.",
|
||||
)
|
||||
font_size_unit: typing.Optional[div_size_unit.DivSizeUnit] = Field(
|
||||
)
|
||||
font_weight: typing.Optional[div_font_weight.DivFontWeight] = Field(
|
||||
description="Style.",
|
||||
)
|
||||
offset: typing.Optional[div_point.DivPoint] = Field(
|
||||
description="Shift relative to the center.",
|
||||
)
|
||||
text_color: typing.Optional[str] = Field(
|
||||
format="color",
|
||||
description="Text color.",
|
||||
)
|
||||
|
||||
|
||||
DivSliderTextStyle.update_forward_refs()
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
# Solid background color.
|
||||
class DivSolidBackground(BaseDiv):
|
||||
@@ -12,15 +15,18 @@ class DivSolidBackground(BaseDiv):
|
||||
def __init__(
|
||||
self, *,
|
||||
color: str,
|
||||
type: str = 'solid',
|
||||
type: str = "solid",
|
||||
):
|
||||
super().__init__(
|
||||
type=type,
|
||||
color=color,
|
||||
)
|
||||
|
||||
type: str = Field(default='solid')
|
||||
color: str = Field(format="color", description='Color.')
|
||||
type: str = Field(default="solid")
|
||||
color: str = Field(
|
||||
format="color",
|
||||
description="Color.",
|
||||
)
|
||||
|
||||
|
||||
DivSolidBackground.update_forward_refs()
|
||||
|
||||
@@ -1,30 +1,21 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div
|
||||
from . import div_accessibility
|
||||
from . import div_action
|
||||
from . import div_alignment_horizontal
|
||||
from . import div_alignment_vertical
|
||||
from . import div_animation
|
||||
from . import div_appearance_transition
|
||||
from . import div_background
|
||||
from . import div_border
|
||||
from . import div_change_transition
|
||||
from . import div_edge_insets
|
||||
from . import div_extension
|
||||
from . import div_focus
|
||||
from . import div_size
|
||||
from . import div_tooltip
|
||||
from . import div_transform
|
||||
from . import div_transition_selector
|
||||
from . import div_transition_trigger
|
||||
from . import div_visibility
|
||||
from . import div_visibility_action
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import (
|
||||
div, div_accessibility, div_action, div_alignment_horizontal,
|
||||
div_alignment_vertical, div_animation, div_appearance_transition,
|
||||
div_background, div_border, div_change_transition, div_edge_insets,
|
||||
div_extension, div_focus, div_size, div_tooltip, div_transform,
|
||||
div_transition_selector, div_transition_trigger, div_visibility,
|
||||
div_visibility_action,
|
||||
)
|
||||
|
||||
|
||||
# It contains sets of states for visual elements and switches between them.
|
||||
@@ -33,7 +24,7 @@ class DivState(BaseDiv):
|
||||
def __init__(
|
||||
self, *,
|
||||
states: typing.List[DivStateState],
|
||||
type: str = 'state',
|
||||
type: str = "state",
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = None,
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = None,
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = None,
|
||||
@@ -96,36 +87,173 @@ class DivState(BaseDiv):
|
||||
width=width,
|
||||
)
|
||||
|
||||
type: str = Field(default='state')
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(description='Accessibility for disabled people.')
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(description='Horizontal alignment of an element inside the parent element.')
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(description='Vertical alignment of an element inside the parent element.')
|
||||
alpha: typing.Optional[float] = Field(description='Sets transparency of the entire element: `0` — completely transparent, `1` —opaque.')
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(min_items=1, description='Element background. It can contain multiple layers.')
|
||||
border: typing.Optional[div_border.DivBorder] = Field(description='Element stroke.')
|
||||
column_span: typing.Optional[int] = Field(description='Merges cells in a column of the [grid](div-grid.md) element.')
|
||||
default_state_id: typing.Optional[str] = Field(description='ID of the status that will be set by default. If the parameter isnt set, thefirst state of the `states` will be set.')
|
||||
div_id: typing.Optional[str] = Field(description='ID of an element to search in the hierarchy. The ID must be unique at onehierarchy level. @deprecated')
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(min_items=1, description='Extensions for additional processing of an element. The list of extensions isgiven in [DivExtension](../../extensions.dita).')
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(description='Parameters when focusing on an element or losing focus.')
|
||||
height: typing.Optional[div_size.DivSize] = Field(description='Element height. For Android: if there is text in this or in a child element,specify height in `sp` to scale the element together with the text. To learn moreabout units of size measurement, see [Layout inside the card](../../layout.dita).')
|
||||
id: typing.Optional[str] = Field(min_length=1, description='Element ID. It must be unique within the root element. It is used as`accessibilityIdentifier` on iOS.')
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='External margins from the element stroke.')
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='Internal margins from the element stroke.')
|
||||
row_span: typing.Optional[int] = Field(description='Merges cells in a string of the [grid](div-grid.md) element.')
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='List of [actions](div-action.md) to be executed when selecting an element in[pager](div-pager.md).')
|
||||
states: typing.List[DivStateState] = Field(min_items=1, description='States. Each element can have a few states with a different layout. Transitionbetween states is performed using [special scheme](../../interaction.dita) of the[action](div-action.md) element.')
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(min_items=1, description='Tooltips linked to an element. A tooltip can be shown by`div-action://show_tooltip?id=`, hidden by `div-action://hide_tooltip?id=` where`id` — tooltip id.')
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(description='Transformation of the element. Applies the passed transform to the element. Thecontent that does not fit into the original view will be cut off.')
|
||||
transition_animation_selector: typing.Optional[div_transition_selector.DivTransitionSelector] = Field(description='It determines which events trigger transition animations. @deprecated')
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(description='Change animation. It is played when the position or size of an element changes inthe new layout.')
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Appearance animation. It is played when an element with a new ID appears. Tolearn more about the concept of transitions, see [Animatedtransitions](../../interaction.dita#animation/transition-animation).')
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Disappearance animation. It is played when an element disappears in the newlayout.')
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(min_items=1, description='Animation starting triggers. Default value: `[state_change, visibility_change]`.')
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(description='Element visibility.')
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(description='Tracking visibility of a single element. Not used if the `visibility_actions`parameter is set.')
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(min_items=1, description='Actions when an element appears on the screen.')
|
||||
width: typing.Optional[div_size.DivSize] = Field(description='Element width.')
|
||||
type: str = Field(default="state")
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(
|
||||
description="Accessibility for disabled people.",
|
||||
)
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(
|
||||
description=(
|
||||
"Horizontal alignment of an element inside the parent "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(
|
||||
description=(
|
||||
"Vertical alignment of an element inside the parent element."
|
||||
),
|
||||
)
|
||||
alpha: typing.Optional[float] = Field(
|
||||
description=(
|
||||
"Sets transparency of the entire element: `0` — completely "
|
||||
"transparent, `1` —opaque."
|
||||
),
|
||||
)
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(
|
||||
min_items=1,
|
||||
description="Element background. It can contain multiple layers.",
|
||||
)
|
||||
border: typing.Optional[div_border.DivBorder] = Field(
|
||||
description="Element stroke.",
|
||||
)
|
||||
column_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a column of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
default_state_id: typing.Optional[str] = Field(
|
||||
description=(
|
||||
"ID of the status that will be set by default. If the "
|
||||
"parameter isnt set, thefirst state of the `states` will be "
|
||||
"set."
|
||||
),
|
||||
)
|
||||
div_id: typing.Optional[str] = Field(
|
||||
description=(
|
||||
"ID of an element to search in the hierarchy. The ID must be "
|
||||
"unique at onehierarchy level. @deprecated"
|
||||
),
|
||||
)
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Extensions for additional processing of an element. The "
|
||||
"list of extensions isgiven in "
|
||||
"[DivExtension](../../extensions.dita)."
|
||||
),
|
||||
)
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(
|
||||
description="Parameters when focusing on an element or losing focus.",
|
||||
)
|
||||
height: typing.Optional[div_size.DivSize] = Field(
|
||||
description=(
|
||||
"Element height. For Android: if there is text in this or in "
|
||||
"a child element,specify height in `sp` to scale the element "
|
||||
"together with the text. To learn moreabout units of size "
|
||||
"measurement, see [Layout inside the "
|
||||
"card](../../layout.dita)."
|
||||
),
|
||||
)
|
||||
id: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
description=(
|
||||
"Element ID. It must be unique within the root element. It "
|
||||
"is used as`accessibilityIdentifier` on iOS."
|
||||
),
|
||||
)
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="External margins from the element stroke.",
|
||||
)
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="Internal margins from the element stroke.",
|
||||
)
|
||||
row_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a string of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"List of [actions](div-action.md) to be executed when "
|
||||
"selecting an element in[pager](div-pager.md)."
|
||||
),
|
||||
)
|
||||
states: typing.List[DivStateState] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"States. Each element can have a few states with a different "
|
||||
"layout. Transitionbetween states is performed using "
|
||||
"[special scheme](../../interaction.dita) of "
|
||||
"the[action](div-action.md) element."
|
||||
),
|
||||
)
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Tooltips linked to an element. A tooltip can be shown "
|
||||
"by`div-action://show_tooltip?id=`, hidden by "
|
||||
"`div-action://hide_tooltip?id=` where`id` — tooltip id."
|
||||
),
|
||||
)
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(
|
||||
description=(
|
||||
"Transformation of the element. Applies the passed transform "
|
||||
"to the element. Thecontent that does not fit into the "
|
||||
"original view will be cut off."
|
||||
),
|
||||
)
|
||||
transition_animation_selector: typing.Optional[div_transition_selector.DivTransitionSelector] = Field(
|
||||
description=(
|
||||
"It determines which events trigger transition animations. "
|
||||
"@deprecated"
|
||||
),
|
||||
)
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(
|
||||
description=(
|
||||
"Change animation. It is played when the position or size of "
|
||||
"an element changes inthe new layout."
|
||||
),
|
||||
)
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Appearance animation. It is played when an element with a "
|
||||
"new ID appears. Tolearn more about the concept of "
|
||||
"transitions, see "
|
||||
"[Animatedtransitions](../../interaction.dita#animation/tran"
|
||||
"sition-animation)."
|
||||
),
|
||||
)
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Disappearance animation. It is played when an element "
|
||||
"disappears in the newlayout."
|
||||
),
|
||||
)
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Animation starting triggers. Default value: `[state_change, "
|
||||
"visibility_change]`."
|
||||
),
|
||||
)
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(
|
||||
description="Element visibility.",
|
||||
)
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(
|
||||
description=(
|
||||
"Tracking visibility of a single element. Not used if the "
|
||||
"`visibility_actions`parameter is set."
|
||||
),
|
||||
)
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(
|
||||
min_items=1,
|
||||
description="Actions when an element appears on the screen.",
|
||||
)
|
||||
width: typing.Optional[div_size.DivSize] = Field(
|
||||
description="Element width.",
|
||||
)
|
||||
|
||||
|
||||
class DivStateState(BaseDiv):
|
||||
@@ -146,11 +274,31 @@ class DivStateState(BaseDiv):
|
||||
swipe_out_actions=swipe_out_actions,
|
||||
)
|
||||
|
||||
animation_in: typing.Optional[div_animation.DivAnimation] = Field(description='State appearance animation. Use `transition_in` instead. @deprecated')
|
||||
animation_out: typing.Optional[div_animation.DivAnimation] = Field(description='State disappearance animation. Use `transition_out` instead. @deprecated')
|
||||
div: typing.Optional[div.Div] = Field(description='Contents. If the parameter is missing, the state won\'t be displayed.')
|
||||
state_id: str = Field(description='State ID. It must be unique at one hierarchy level.')
|
||||
swipe_out_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Actions when swiping the state horizontally. @deprecated')
|
||||
animation_in: typing.Optional[div_animation.DivAnimation] = Field(
|
||||
description=(
|
||||
"State appearance animation. Use `transition_in` instead. "
|
||||
"@deprecated"
|
||||
),
|
||||
)
|
||||
animation_out: typing.Optional[div_animation.DivAnimation] = Field(
|
||||
description=(
|
||||
"State disappearance animation. Use `transition_out` "
|
||||
"instead. @deprecated"
|
||||
),
|
||||
)
|
||||
div: typing.Optional[div.Div] = Field(
|
||||
description=(
|
||||
"Contents. If the parameter is missing, the state won\'t be "
|
||||
"displayed."
|
||||
),
|
||||
)
|
||||
state_id: str = Field(
|
||||
description="State ID. It must be unique at one hierarchy level.",
|
||||
)
|
||||
swipe_out_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description="Actions when swiping the state horizontally. @deprecated",
|
||||
)
|
||||
|
||||
|
||||
DivStateState.update_forward_refs()
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_size_unit
|
||||
|
||||
|
||||
@@ -23,9 +26,15 @@ class DivStroke(BaseDiv):
|
||||
width=width,
|
||||
)
|
||||
|
||||
color: str = Field(format="color", description='Stroke color.')
|
||||
unit: typing.Optional[div_size_unit.DivSizeUnit] = Field()
|
||||
width: typing.Optional[int] = Field(description='Stroke width.')
|
||||
color: str = Field(
|
||||
format="color",
|
||||
description="Stroke color.",
|
||||
)
|
||||
unit: typing.Optional[div_size_unit.DivSizeUnit] = Field(
|
||||
)
|
||||
width: typing.Optional[int] = Field(
|
||||
description="Stroke width.",
|
||||
)
|
||||
|
||||
|
||||
DivStroke.update_forward_refs()
|
||||
|
||||
@@ -1,32 +1,21 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div
|
||||
from . import div_accessibility
|
||||
from . import div_action
|
||||
from . import div_alignment_horizontal
|
||||
from . import div_alignment_vertical
|
||||
from . import div_appearance_transition
|
||||
from . import div_background
|
||||
from . import div_border
|
||||
from . import div_change_transition
|
||||
from . import div_corners_radius
|
||||
from . import div_edge_insets
|
||||
from . import div_extension
|
||||
from . import div_focus
|
||||
from . import div_font_family
|
||||
from . import div_font_weight
|
||||
from . import div_size
|
||||
from . import div_size_unit
|
||||
from . import div_tooltip
|
||||
from . import div_transform
|
||||
from . import div_transition_trigger
|
||||
from . import div_visibility
|
||||
from . import div_visibility_action
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import (
|
||||
div, div_accessibility, div_action, div_alignment_horizontal,
|
||||
div_alignment_vertical, div_appearance_transition, div_background,
|
||||
div_border, div_change_transition, div_corners_radius, div_edge_insets,
|
||||
div_extension, div_focus, div_font_family, div_font_weight, div_size,
|
||||
div_size_unit, div_tooltip, div_transform, div_transition_trigger,
|
||||
div_visibility, div_visibility_action,
|
||||
)
|
||||
|
||||
|
||||
# Tabs. Height of the first tab is determined by its contents, and height of the
|
||||
@@ -36,7 +25,7 @@ class DivTabs(BaseDiv):
|
||||
def __init__(
|
||||
self, *,
|
||||
items: typing.List[DivTabsItem],
|
||||
type: str = 'tabs',
|
||||
type: str = "tabs",
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = None,
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = None,
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = None,
|
||||
@@ -111,42 +100,201 @@ class DivTabs(BaseDiv):
|
||||
width=width,
|
||||
)
|
||||
|
||||
type: str = Field(default='tabs')
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(description='Accessibility for disabled people.')
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(description='Horizontal alignment of an element inside the parent element.')
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(description='Vertical alignment of an element inside the parent element.')
|
||||
alpha: typing.Optional[float] = Field(description='Sets transparency of the entire element: `0` — completely transparent, `1` —opaque.')
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(min_items=1, description='Element background. It can contain multiple layers.')
|
||||
border: typing.Optional[div_border.DivBorder] = Field(description='Element stroke.')
|
||||
column_span: typing.Optional[int] = Field(description='Merges cells in a column of the [grid](div-grid.md) element.')
|
||||
dynamic_height: typing.Optional[bool] = Field(description='Updating height when changing the active element. In the browser, the value isalways `true`.')
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(min_items=1, description='Extensions for additional processing of an element. The list of extensions isgiven in [DivExtension](../../extensions.dita).')
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(description='Parameters when focusing on an element or losing focus.')
|
||||
has_separator: typing.Optional[bool] = Field(description='A separating line between tabs and contents.')
|
||||
height: typing.Optional[div_size.DivSize] = Field(description='Element height. For Android: if there is text in this or in a child element,specify height in `sp` to scale the element together with the text. To learn moreabout units of size measurement, see [Layout inside the card](../../layout.dita).')
|
||||
id: typing.Optional[str] = Field(min_length=1, description='Element ID. It must be unique within the root element. It is used as`accessibilityIdentifier` on iOS.')
|
||||
items: typing.List[DivTabsItem] = Field(min_items=1, description='Tabs. Transition between tabs can be implementedusing:`div-action://set_current_item?id=&item=` — set the current tab with anordinal number `item` inside an element, with the specified`id`;`div-action://set_next_item?id=[&overflow={clamp|ring}]` — go to the nexttab inside an element, with the specified`id`;`div-action://set_previous_item?id=[&overflow={clamp|ring}]` — go to theprevious tab inside an element, with the specified `id`.</p><p>The optional`overflow` parameter is used to set navigation when the first or last element isreached:`clamp` — transition will stop at the border element;`ring` — go to thebeginning or end, depending on the current element.</p><p>By default, `clamp`.')
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='External margins from the element stroke.')
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='Internal margins from the element stroke.')
|
||||
restrict_parent_scroll: typing.Optional[bool] = Field(description='If the parameter is enabled, tabs won\'t transmit the scroll gesture to the parentelement.')
|
||||
row_span: typing.Optional[int] = Field(description='Merges cells in a string of the [grid](div-grid.md) element.')
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='List of [actions](div-action.md) to be executed when selecting an element in[pager](div-pager.md).')
|
||||
selected_tab: typing.Optional[int] = Field(description='Ordinal number of the tab that will be opened by default.')
|
||||
separator_color: typing.Optional[str] = Field(format="color", description='Separator color.')
|
||||
separator_paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='Indents from the separating line. Not used if `has_separator = false`.')
|
||||
switch_tabs_by_content_swipe_enabled: typing.Optional[bool] = Field(description='Switching tabs by scrolling through the contents.')
|
||||
tab_title_style: typing.Optional[DivTabsTabTitleStyle] = Field(description='Design style of tab titles.')
|
||||
title_paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='Indents in the tab name.')
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(min_items=1, description='Tooltips linked to an element. A tooltip can be shown by`div-action://show_tooltip?id=`, hidden by `div-action://hide_tooltip?id=` where`id` — tooltip id.')
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(description='Transformation of the element. Applies the passed transform to the element. Thecontent that does not fit into the original view will be cut off.')
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(description='Change animation. It is played when the position or size of an element changes inthe new layout.')
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Appearance animation. It is played when an element with a new ID appears. Tolearn more about the concept of transitions, see [Animatedtransitions](../../interaction.dita#animation/transition-animation).')
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Disappearance animation. It is played when an element disappears in the newlayout.')
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(min_items=1, description='Animation starting triggers. Default value: `[state_change, visibility_change]`.')
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(description='Element visibility.')
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(description='Tracking visibility of a single element. Not used if the `visibility_actions`parameter is set.')
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(min_items=1, description='Actions when an element appears on the screen.')
|
||||
width: typing.Optional[div_size.DivSize] = Field(description='Element width.')
|
||||
type: str = Field(default="tabs")
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(
|
||||
description="Accessibility for disabled people.",
|
||||
)
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(
|
||||
description=(
|
||||
"Horizontal alignment of an element inside the parent "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(
|
||||
description=(
|
||||
"Vertical alignment of an element inside the parent element."
|
||||
),
|
||||
)
|
||||
alpha: typing.Optional[float] = Field(
|
||||
description=(
|
||||
"Sets transparency of the entire element: `0` — completely "
|
||||
"transparent, `1` —opaque."
|
||||
),
|
||||
)
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(
|
||||
min_items=1,
|
||||
description="Element background. It can contain multiple layers.",
|
||||
)
|
||||
border: typing.Optional[div_border.DivBorder] = Field(
|
||||
description="Element stroke.",
|
||||
)
|
||||
column_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a column of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
dynamic_height: typing.Optional[bool] = Field(
|
||||
description=(
|
||||
"Updating height when changing the active element. In the "
|
||||
"browser, the value isalways `true`."
|
||||
),
|
||||
)
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Extensions for additional processing of an element. The "
|
||||
"list of extensions isgiven in "
|
||||
"[DivExtension](../../extensions.dita)."
|
||||
),
|
||||
)
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(
|
||||
description="Parameters when focusing on an element or losing focus.",
|
||||
)
|
||||
has_separator: typing.Optional[bool] = Field(
|
||||
description="A separating line between tabs and contents.",
|
||||
)
|
||||
height: typing.Optional[div_size.DivSize] = Field(
|
||||
description=(
|
||||
"Element height. For Android: if there is text in this or in "
|
||||
"a child element,specify height in `sp` to scale the element "
|
||||
"together with the text. To learn moreabout units of size "
|
||||
"measurement, see [Layout inside the "
|
||||
"card](../../layout.dita)."
|
||||
),
|
||||
)
|
||||
id: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
description=(
|
||||
"Element ID. It must be unique within the root element. It "
|
||||
"is used as`accessibilityIdentifier` on iOS."
|
||||
),
|
||||
)
|
||||
items: typing.List[DivTabsItem] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Tabs. Transition between tabs can be "
|
||||
"implementedusing:`div-action://set_current_item?id=&item=` "
|
||||
"— set the current tab with anordinal number `item` inside "
|
||||
"an element, with the "
|
||||
"specified`id`;`div-action://set_next_item?id=[&overflow={cl"
|
||||
"amp|ring}]` — go to the nexttab inside an element, with the "
|
||||
"specified`id`;`div-action://set_previous_item?id=[&overflow"
|
||||
"={clamp|ring}]` — go to theprevious tab inside an element, "
|
||||
"with the specified `id`.</p><p>The optional`overflow` "
|
||||
"parameter is used to set navigation when the first or last "
|
||||
"element isreached:`clamp` — transition will stop at the "
|
||||
"border element;`ring` — go to thebeginning or end, "
|
||||
"depending on the current element.</p><p>By default, "
|
||||
"`clamp`."
|
||||
),
|
||||
)
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="External margins from the element stroke.",
|
||||
)
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="Internal margins from the element stroke.",
|
||||
)
|
||||
restrict_parent_scroll: typing.Optional[bool] = Field(
|
||||
description=(
|
||||
"If the parameter is enabled, tabs won\'t transmit the "
|
||||
"scroll gesture to the parentelement."
|
||||
),
|
||||
)
|
||||
row_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a string of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"List of [actions](div-action.md) to be executed when "
|
||||
"selecting an element in[pager](div-pager.md)."
|
||||
),
|
||||
)
|
||||
selected_tab: typing.Optional[int] = Field(
|
||||
description="Ordinal number of the tab that will be opened by default.",
|
||||
)
|
||||
separator_color: typing.Optional[str] = Field(
|
||||
format="color",
|
||||
description="Separator color.",
|
||||
)
|
||||
separator_paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description=(
|
||||
"Indents from the separating line. Not used if "
|
||||
"`has_separator = false`."
|
||||
),
|
||||
)
|
||||
switch_tabs_by_content_swipe_enabled: typing.Optional[bool] = Field(
|
||||
description="Switching tabs by scrolling through the contents.",
|
||||
)
|
||||
tab_title_style: typing.Optional[DivTabsTabTitleStyle] = Field(
|
||||
description="Design style of tab titles.",
|
||||
)
|
||||
title_paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="Indents in the tab name.",
|
||||
)
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Tooltips linked to an element. A tooltip can be shown "
|
||||
"by`div-action://show_tooltip?id=`, hidden by "
|
||||
"`div-action://hide_tooltip?id=` where`id` — tooltip id."
|
||||
),
|
||||
)
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(
|
||||
description=(
|
||||
"Transformation of the element. Applies the passed transform "
|
||||
"to the element. Thecontent that does not fit into the "
|
||||
"original view will be cut off."
|
||||
),
|
||||
)
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(
|
||||
description=(
|
||||
"Change animation. It is played when the position or size of "
|
||||
"an element changes inthe new layout."
|
||||
),
|
||||
)
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Appearance animation. It is played when an element with a "
|
||||
"new ID appears. Tolearn more about the concept of "
|
||||
"transitions, see "
|
||||
"[Animatedtransitions](../../interaction.dita#animation/tran"
|
||||
"sition-animation)."
|
||||
),
|
||||
)
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Disappearance animation. It is played when an element "
|
||||
"disappears in the newlayout."
|
||||
),
|
||||
)
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Animation starting triggers. Default value: `[state_change, "
|
||||
"visibility_change]`."
|
||||
),
|
||||
)
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(
|
||||
description="Element visibility.",
|
||||
)
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(
|
||||
description=(
|
||||
"Tracking visibility of a single element. Not used if the "
|
||||
"`visibility_actions`parameter is set."
|
||||
),
|
||||
)
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(
|
||||
min_items=1,
|
||||
description="Actions when an element appears on the screen.",
|
||||
)
|
||||
width: typing.Optional[div_size.DivSize] = Field(
|
||||
description="Element width.",
|
||||
)
|
||||
|
||||
|
||||
# Tab.
|
||||
@@ -164,9 +312,16 @@ class DivTabsItem(BaseDiv):
|
||||
title_click_action=title_click_action,
|
||||
)
|
||||
|
||||
div: div.Div = Field(description='Tab contents.')
|
||||
title: str = Field(min_length=1, description='Tab title.')
|
||||
title_click_action: typing.Optional[div_action.DivAction] = Field(description='Action when clicking on the active tab title.')
|
||||
div: div.Div = Field(
|
||||
description="Tab contents.",
|
||||
)
|
||||
title: str = Field(
|
||||
min_length=1,
|
||||
description="Tab title.",
|
||||
)
|
||||
title_click_action: typing.Optional[div_action.DivAction] = Field(
|
||||
description="Action when clicking on the active tab title.",
|
||||
)
|
||||
|
||||
|
||||
DivTabsItem.update_forward_refs()
|
||||
@@ -217,30 +372,86 @@ class DivTabsTabTitleStyle(BaseDiv):
|
||||
paddings=paddings,
|
||||
)
|
||||
|
||||
active_background_color: typing.Optional[str] = Field(format="color", description='Background color of the active tab title.')
|
||||
active_font_weight: typing.Optional[div_font_weight.DivFontWeight] = Field(description='Active tab title style.')
|
||||
active_text_color: typing.Optional[str] = Field(format="color", description='Color of the active tab title text.')
|
||||
animation_duration: typing.Optional[int] = Field(description='Duration of active title change animation.')
|
||||
animation_type: typing.Optional[TabTitleStyleAnimationType] = Field(description='Active title change animation.')
|
||||
corner_radius: typing.Optional[int] = Field(description='Title corner rounding radius. If the parameter isn\'t specified, the rounding ismaximum (half of the smallest size). Not used if the `corners_radius` parameteris set.')
|
||||
corners_radius: typing.Optional[div_corners_radius.DivCornersRadius] = Field(description='Rounding radii of corners of multiple titles. Empty values are replaced by`corner_radius`.')
|
||||
font_family: typing.Optional[div_font_family.DivFontFamily] = Field(description='Font family:`text` — a standard text font;`display` — a family of fonts with alarge font size.')
|
||||
font_size: typing.Optional[int] = Field(description='Title font size.')
|
||||
font_size_unit: typing.Optional[div_size_unit.DivSizeUnit] = Field(description='Units of title font size measurement.')
|
||||
font_weight: typing.Optional[div_font_weight.DivFontWeight] = Field(description='Style. Use `active_font_weight` and `inactive_font_weight` instead. @deprecated')
|
||||
inactive_background_color: typing.Optional[str] = Field(format="color", description='Background color of the inactive tab title.')
|
||||
inactive_font_weight: typing.Optional[div_font_weight.DivFontWeight] = Field(description='Inactive tab title style.')
|
||||
inactive_text_color: typing.Optional[str] = Field(format="color", description='Color of the inactive tab title text.')
|
||||
item_spacing: typing.Optional[int] = Field(description='Spacing between neighbouring tab titles.')
|
||||
letter_spacing: typing.Optional[float] = Field(description='Spacing between title characters.')
|
||||
line_height: typing.Optional[int] = Field(description='Line spacing of the text range. The count is taken from the font baseline.')
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='Indents around the tab title.')
|
||||
active_background_color: typing.Optional[str] = Field(
|
||||
format="color",
|
||||
description="Background color of the active tab title.",
|
||||
)
|
||||
active_font_weight: typing.Optional[div_font_weight.DivFontWeight] = Field(
|
||||
description="Active tab title style.",
|
||||
)
|
||||
active_text_color: typing.Optional[str] = Field(
|
||||
format="color",
|
||||
description="Color of the active tab title text.",
|
||||
)
|
||||
animation_duration: typing.Optional[int] = Field(
|
||||
description="Duration of active title change animation.",
|
||||
)
|
||||
animation_type: typing.Optional[TabTitleStyleAnimationType] = Field(
|
||||
description="Active title change animation.",
|
||||
)
|
||||
corner_radius: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Title corner rounding radius. If the parameter isn\'t "
|
||||
"specified, the rounding ismaximum (half of the smallest "
|
||||
"size). Not used if the `corners_radius` parameteris set."
|
||||
),
|
||||
)
|
||||
corners_radius: typing.Optional[div_corners_radius.DivCornersRadius] = Field(
|
||||
description=(
|
||||
"Rounding radii of corners of multiple titles. Empty values "
|
||||
"are replaced by`corner_radius`."
|
||||
),
|
||||
)
|
||||
font_family: typing.Optional[div_font_family.DivFontFamily] = Field(
|
||||
description=(
|
||||
"Font family:`text` — a standard text font;`display` — a "
|
||||
"family of fonts with alarge font size."
|
||||
),
|
||||
)
|
||||
font_size: typing.Optional[int] = Field(
|
||||
description="Title font size.",
|
||||
)
|
||||
font_size_unit: typing.Optional[div_size_unit.DivSizeUnit] = Field(
|
||||
description="Units of title font size measurement.",
|
||||
)
|
||||
font_weight: typing.Optional[div_font_weight.DivFontWeight] = Field(
|
||||
description=(
|
||||
"Style. Use `active_font_weight` and `inactive_font_weight` "
|
||||
"instead. @deprecated"
|
||||
),
|
||||
)
|
||||
inactive_background_color: typing.Optional[str] = Field(
|
||||
format="color",
|
||||
description="Background color of the inactive tab title.",
|
||||
)
|
||||
inactive_font_weight: typing.Optional[div_font_weight.DivFontWeight] = Field(
|
||||
description="Inactive tab title style.",
|
||||
)
|
||||
inactive_text_color: typing.Optional[str] = Field(
|
||||
format="color",
|
||||
description="Color of the inactive tab title text.",
|
||||
)
|
||||
item_spacing: typing.Optional[int] = Field(
|
||||
description="Spacing between neighbouring tab titles.",
|
||||
)
|
||||
letter_spacing: typing.Optional[float] = Field(
|
||||
description="Spacing between title characters.",
|
||||
)
|
||||
line_height: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Line spacing of the text range. The count is taken from the "
|
||||
"font baseline."
|
||||
),
|
||||
)
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="Indents around the tab title.",
|
||||
)
|
||||
|
||||
|
||||
class TabTitleStyleAnimationType(str, enum.Enum):
|
||||
SLIDE = 'slide'
|
||||
FADE = 'fade'
|
||||
NONE = 'none'
|
||||
SLIDE = "slide"
|
||||
FADE = "fade"
|
||||
NONE = "none"
|
||||
|
||||
|
||||
DivTabsTabTitleStyle.update_forward_refs()
|
||||
|
||||
@@ -1,34 +1,22 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div_accessibility
|
||||
from . import div_action
|
||||
from . import div_alignment_horizontal
|
||||
from . import div_alignment_vertical
|
||||
from . import div_animation
|
||||
from . import div_appearance_transition
|
||||
from . import div_background
|
||||
from . import div_border
|
||||
from . import div_change_transition
|
||||
from . import div_edge_insets
|
||||
from . import div_extension
|
||||
from . import div_fixed_size
|
||||
from . import div_focus
|
||||
from . import div_font_family
|
||||
from . import div_font_weight
|
||||
from . import div_line_style
|
||||
from . import div_size
|
||||
from . import div_size_unit
|
||||
from . import div_text_gradient
|
||||
from . import div_tooltip
|
||||
from . import div_transform
|
||||
from . import div_transition_trigger
|
||||
from . import div_visibility
|
||||
from . import div_visibility_action
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import (
|
||||
div_accessibility, div_action, div_alignment_horizontal,
|
||||
div_alignment_vertical, div_animation, div_appearance_transition,
|
||||
div_background, div_blend_mode, div_border, div_change_transition,
|
||||
div_edge_insets, div_extension, div_fixed_size, div_focus, div_font_family,
|
||||
div_font_weight, div_line_style, div_size, div_size_unit, div_text_gradient,
|
||||
div_tooltip, div_transform, div_transition_trigger, div_visibility,
|
||||
div_visibility_action,
|
||||
)
|
||||
|
||||
|
||||
# Text.
|
||||
@@ -37,7 +25,7 @@ class DivText(BaseDiv):
|
||||
def __init__(
|
||||
self, *,
|
||||
text: str,
|
||||
type: str = 'text',
|
||||
type: str = "text",
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = None,
|
||||
action: typing.Optional[div_action.DivAction] = None,
|
||||
action_animation: typing.Optional[div_animation.DivAnimation] = None,
|
||||
@@ -146,66 +134,267 @@ class DivText(BaseDiv):
|
||||
width=width,
|
||||
)
|
||||
|
||||
type: str = Field(default='text')
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(description='Accessibility for disabled people.')
|
||||
action: typing.Optional[div_action.DivAction] = Field(description='One action when clicking on an element. Not used if the `actions` parameter isset.')
|
||||
action_animation: typing.Optional[div_animation.DivAnimation] = Field(description='Action animation. Web supports `fade`, `scale` and `set` only.')
|
||||
actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Multiple actions when clicking on an element.')
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(description='Horizontal alignment of an element inside the parent element.')
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(description='Vertical alignment of an element inside the parent element.')
|
||||
alpha: typing.Optional[float] = Field(description='Sets transparency of the entire element: `0` — completely transparent, `1` —opaque.')
|
||||
auto_ellipsize: typing.Optional[bool] = Field(description='Automatic text cropping to fit the container size.')
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(min_items=1, description='Element background. It can contain multiple layers.')
|
||||
border: typing.Optional[div_border.DivBorder] = Field(description='Element stroke.')
|
||||
column_span: typing.Optional[int] = Field(description='Merges cells in a column of the [grid](div-grid.md) element.')
|
||||
doubletap_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Action when double-clicking on an element.')
|
||||
ellipsis: typing.Optional[DivTextEllipsis] = Field(description='Text cropping marker. It is displayed when text size exceeds the limit on thenumber of lines.')
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(min_items=1, description='Extensions for additional processing of an element. The list of extensions isgiven in [DivExtension](../../extensions.dita).')
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(description='Parameters when focusing on an element or losing focus.')
|
||||
focused_text_color: typing.Optional[str] = Field(format="color", description='Text color when focusing on the element.')
|
||||
font_family: typing.Optional[div_font_family.DivFontFamily] = Field(description='Font family:`text` — a standard text font;`display` — a family of fonts with alarge font size.')
|
||||
font_size: typing.Optional[int] = Field(description='Font size.')
|
||||
font_size_unit: typing.Optional[div_size_unit.DivSizeUnit] = Field()
|
||||
font_weight: typing.Optional[div_font_weight.DivFontWeight] = Field(description='Style.')
|
||||
height: typing.Optional[div_size.DivSize] = Field(description='Element height. For Android: if there is text in this or in a child element,specify height in `sp` to scale the element together with the text. To learn moreabout units of size measurement, see [Layout inside the card](../../layout.dita).')
|
||||
id: typing.Optional[str] = Field(min_length=1, description='Element ID. It must be unique within the root element. It is used as`accessibilityIdentifier` on iOS.')
|
||||
images: typing.Optional[typing.List[DivTextImage]] = Field(min_items=1, description='Images embedded in text.')
|
||||
letter_spacing: typing.Optional[float] = Field(description='Spacing between characters.')
|
||||
line_height: typing.Optional[int] = Field(description='Line spacing of the text range. The count is taken from the font baseline.')
|
||||
longtap_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Action when long-clicking on an element.')
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='External margins from the element stroke.')
|
||||
max_lines: typing.Optional[int] = Field(description='Maximum number of lines not to be cropped when breaking the limits.')
|
||||
min_hidden_lines: typing.Optional[int] = Field(description='Minimum number of cropped lines when breaking the limits.')
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(description='Internal margins from the element stroke.')
|
||||
ranges: typing.Optional[typing.List[DivTextRange]] = Field(min_items=1, description='A character range in which additional style parameters can be set. Defined bymandatory `start` and `end` fields.')
|
||||
row_span: typing.Optional[int] = Field(description='Merges cells in a string of the [grid](div-grid.md) element.')
|
||||
selectable: typing.Optional[bool] = Field(description='Selecting and copying text.')
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='List of [actions](div-action.md) to be executed when selecting an element in[pager](div-pager.md).')
|
||||
strike: typing.Optional[div_line_style.DivLineStyle] = Field(description='Strikethrough.')
|
||||
text: str = Field(min_length=1, description='Text.')
|
||||
text_alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(description='Horizontal text alignment.')
|
||||
text_alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(description='Vertical text alignment.')
|
||||
text_color: typing.Optional[str] = Field(format="color", description='Text color. Not used if the `text_gradient` parameter is set.')
|
||||
text_gradient: typing.Optional[div_text_gradient.DivTextGradient] = Field(description='Gradient text color.')
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(min_items=1, description='Tooltips linked to an element. A tooltip can be shown by`div-action://show_tooltip?id=`, hidden by `div-action://hide_tooltip?id=` where`id` — tooltip id.')
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(description='Transformation of the element. Applies the passed transform to the element. Thecontent that does not fit into the original view will be cut off.')
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(description='Change animation. It is played when the position or size of an element changes inthe new layout.')
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Appearance animation. It is played when an element with a new ID appears. Tolearn more about the concept of transitions, see [Animatedtransitions](../../interaction.dita#animation/transition-animation).')
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(description='Disappearance animation. It is played when an element disappears in the newlayout.')
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(min_items=1, description='Animation starting triggers. Default value: `[state_change, visibility_change]`.')
|
||||
truncate: typing.Optional[DivTextTruncate] = Field(description='Text cropping method. Use `ellipsis` instead. @deprecated')
|
||||
underline: typing.Optional[div_line_style.DivLineStyle] = Field(description='Underline.')
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(description='Element visibility.')
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(description='Tracking visibility of a single element. Not used if the `visibility_actions`parameter is set.')
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(min_items=1, description='Actions when an element appears on the screen.')
|
||||
width: typing.Optional[div_size.DivSize] = Field(description='Element width.')
|
||||
type: str = Field(default="text")
|
||||
accessibility: typing.Optional[div_accessibility.DivAccessibility] = Field(
|
||||
description="Accessibility for disabled people.",
|
||||
)
|
||||
action: typing.Optional[div_action.DivAction] = Field(
|
||||
description=(
|
||||
"One action when clicking on an element. Not used if the "
|
||||
"`actions` parameter isset."
|
||||
),
|
||||
)
|
||||
action_animation: typing.Optional[div_animation.DivAnimation] = Field(
|
||||
description=(
|
||||
"Action animation. Web supports `fade`, `scale` and `set` "
|
||||
"only."
|
||||
),
|
||||
)
|
||||
actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description="Multiple actions when clicking on an element.",
|
||||
)
|
||||
alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(
|
||||
description=(
|
||||
"Horizontal alignment of an element inside the parent "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(
|
||||
description=(
|
||||
"Vertical alignment of an element inside the parent element."
|
||||
),
|
||||
)
|
||||
alpha: typing.Optional[float] = Field(
|
||||
description=(
|
||||
"Sets transparency of the entire element: `0` — completely "
|
||||
"transparent, `1` —opaque."
|
||||
),
|
||||
)
|
||||
auto_ellipsize: typing.Optional[bool] = Field(
|
||||
description="Automatic text cropping to fit the container size.",
|
||||
)
|
||||
background: typing.Optional[typing.List[div_background.DivBackground]] = Field(
|
||||
min_items=1,
|
||||
description="Element background. It can contain multiple layers.",
|
||||
)
|
||||
border: typing.Optional[div_border.DivBorder] = Field(
|
||||
description="Element stroke.",
|
||||
)
|
||||
column_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a column of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
doubletap_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description="Action when double-clicking on an element.",
|
||||
)
|
||||
ellipsis: typing.Optional[DivTextEllipsis] = Field(
|
||||
description=(
|
||||
"Text cropping marker. It is displayed when text size "
|
||||
"exceeds the limit on thenumber of lines."
|
||||
),
|
||||
)
|
||||
extensions: typing.Optional[typing.List[div_extension.DivExtension]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Extensions for additional processing of an element. The "
|
||||
"list of extensions isgiven in "
|
||||
"[DivExtension](../../extensions.dita)."
|
||||
),
|
||||
)
|
||||
focus: typing.Optional[div_focus.DivFocus] = Field(
|
||||
description="Parameters when focusing on an element or losing focus.",
|
||||
)
|
||||
focused_text_color: typing.Optional[str] = Field(
|
||||
format="color",
|
||||
description="Text color when focusing on the element.",
|
||||
)
|
||||
font_family: typing.Optional[div_font_family.DivFontFamily] = Field(
|
||||
description=(
|
||||
"Font family:`text` — a standard text font;`display` — a "
|
||||
"family of fonts with alarge font size."
|
||||
),
|
||||
)
|
||||
font_size: typing.Optional[int] = Field(
|
||||
description="Font size.",
|
||||
)
|
||||
font_size_unit: typing.Optional[div_size_unit.DivSizeUnit] = Field(
|
||||
)
|
||||
font_weight: typing.Optional[div_font_weight.DivFontWeight] = Field(
|
||||
description="Style.",
|
||||
)
|
||||
height: typing.Optional[div_size.DivSize] = Field(
|
||||
description=(
|
||||
"Element height. For Android: if there is text in this or in "
|
||||
"a child element,specify height in `sp` to scale the element "
|
||||
"together with the text. To learn moreabout units of size "
|
||||
"measurement, see [Layout inside the "
|
||||
"card](../../layout.dita)."
|
||||
),
|
||||
)
|
||||
id: typing.Optional[str] = Field(
|
||||
min_length=1,
|
||||
description=(
|
||||
"Element ID. It must be unique within the root element. It "
|
||||
"is used as`accessibilityIdentifier` on iOS."
|
||||
),
|
||||
)
|
||||
images: typing.Optional[typing.List[DivTextImage]] = Field(
|
||||
min_items=1,
|
||||
description="Images embedded in text.",
|
||||
)
|
||||
letter_spacing: typing.Optional[float] = Field(
|
||||
description="Spacing between characters.",
|
||||
)
|
||||
line_height: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Line spacing of the text range. The count is taken from the "
|
||||
"font baseline."
|
||||
),
|
||||
)
|
||||
longtap_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Action when long-clicking on an element. Doesn\'t work on "
|
||||
"the devices w/o touchgestures."
|
||||
),
|
||||
)
|
||||
margins: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="External margins from the element stroke.",
|
||||
)
|
||||
max_lines: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Maximum number of lines not to be cropped when breaking the "
|
||||
"limits."
|
||||
),
|
||||
)
|
||||
min_hidden_lines: typing.Optional[int] = Field(
|
||||
description="Minimum number of cropped lines when breaking the limits.",
|
||||
)
|
||||
paddings: typing.Optional[div_edge_insets.DivEdgeInsets] = Field(
|
||||
description="Internal margins from the element stroke.",
|
||||
)
|
||||
ranges: typing.Optional[typing.List[DivTextRange]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"A character range in which additional style parameters can "
|
||||
"be set. Defined bymandatory `start` and `end` fields."
|
||||
),
|
||||
)
|
||||
row_span: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Merges cells in a string of the [grid](div-grid.md) "
|
||||
"element."
|
||||
),
|
||||
)
|
||||
selectable: typing.Optional[bool] = Field(
|
||||
description="Selecting and copying text.",
|
||||
)
|
||||
selected_actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"List of [actions](div-action.md) to be executed when "
|
||||
"selecting an element in[pager](div-pager.md)."
|
||||
),
|
||||
)
|
||||
strike: typing.Optional[div_line_style.DivLineStyle] = Field(
|
||||
description="Strikethrough.",
|
||||
)
|
||||
text: str = Field(
|
||||
min_length=1,
|
||||
description="Text.",
|
||||
)
|
||||
text_alignment_horizontal: typing.Optional[div_alignment_horizontal.DivAlignmentHorizontal] = Field(
|
||||
description="Horizontal text alignment.",
|
||||
)
|
||||
text_alignment_vertical: typing.Optional[div_alignment_vertical.DivAlignmentVertical] = Field(
|
||||
description="Vertical text alignment.",
|
||||
)
|
||||
text_color: typing.Optional[str] = Field(
|
||||
format="color",
|
||||
description=(
|
||||
"Text color. Not used if the `text_gradient` parameter is "
|
||||
"set."
|
||||
),
|
||||
)
|
||||
text_gradient: typing.Optional[div_text_gradient.DivTextGradient] = Field(
|
||||
description="Gradient text color.",
|
||||
)
|
||||
tooltips: typing.Optional[typing.List[div_tooltip.DivTooltip]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Tooltips linked to an element. A tooltip can be shown "
|
||||
"by`div-action://show_tooltip?id=`, hidden by "
|
||||
"`div-action://hide_tooltip?id=` where`id` — tooltip id."
|
||||
),
|
||||
)
|
||||
transform: typing.Optional[div_transform.DivTransform] = Field(
|
||||
description=(
|
||||
"Transformation of the element. Applies the passed transform "
|
||||
"to the element. Thecontent that does not fit into the "
|
||||
"original view will be cut off."
|
||||
),
|
||||
)
|
||||
transition_change: typing.Optional[div_change_transition.DivChangeTransition] = Field(
|
||||
description=(
|
||||
"Change animation. It is played when the position or size of "
|
||||
"an element changes inthe new layout."
|
||||
),
|
||||
)
|
||||
transition_in: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Appearance animation. It is played when an element with a "
|
||||
"new ID appears. Tolearn more about the concept of "
|
||||
"transitions, see "
|
||||
"[Animatedtransitions](../../interaction.dita#animation/tran"
|
||||
"sition-animation)."
|
||||
),
|
||||
)
|
||||
transition_out: typing.Optional[div_appearance_transition.DivAppearanceTransition] = Field(
|
||||
description=(
|
||||
"Disappearance animation. It is played when an element "
|
||||
"disappears in the newlayout."
|
||||
),
|
||||
)
|
||||
transition_triggers: typing.Optional[typing.List[div_transition_trigger.DivTransitionTrigger]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Animation starting triggers. Default value: `[state_change, "
|
||||
"visibility_change]`."
|
||||
),
|
||||
)
|
||||
truncate: typing.Optional[DivTextTruncate] = Field(
|
||||
description="Text cropping method. Use `ellipsis` instead. @deprecated",
|
||||
)
|
||||
underline: typing.Optional[div_line_style.DivLineStyle] = Field(
|
||||
description="Underline.",
|
||||
)
|
||||
visibility: typing.Optional[div_visibility.DivVisibility] = Field(
|
||||
description="Element visibility.",
|
||||
)
|
||||
visibility_action: typing.Optional[div_visibility_action.DivVisibilityAction] = Field(
|
||||
description=(
|
||||
"Tracking visibility of a single element. Not used if the "
|
||||
"`visibility_actions`parameter is set."
|
||||
),
|
||||
)
|
||||
visibility_actions: typing.Optional[typing.List[div_visibility_action.DivVisibilityAction]] = Field(
|
||||
min_items=1,
|
||||
description="Actions when an element appears on the screen.",
|
||||
)
|
||||
width: typing.Optional[div_size.DivSize] = Field(
|
||||
description="Element width.",
|
||||
)
|
||||
|
||||
|
||||
class DivTextTruncate(str, enum.Enum):
|
||||
NONE = 'none'
|
||||
START = 'start'
|
||||
END = 'end'
|
||||
MIDDLE = 'middle'
|
||||
NONE = "none"
|
||||
START = "start"
|
||||
END = "end"
|
||||
MIDDLE = "middle"
|
||||
|
||||
|
||||
# Text cropping marker. It is displayed when text size exceeds the limit on the
|
||||
@@ -226,10 +415,25 @@ class DivTextEllipsis(BaseDiv):
|
||||
text=text,
|
||||
)
|
||||
|
||||
actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Actions when clicking on a crop marker.')
|
||||
images: typing.Optional[typing.List[DivTextImage]] = Field(min_items=1, description='Images embedded in a crop marker.')
|
||||
ranges: typing.Optional[typing.List[DivTextRange]] = Field(min_items=1, description='Character ranges inside a crop marker with different text styles.')
|
||||
text: str = Field(min_length=1, description='Marker text.')
|
||||
actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description="Actions when clicking on a crop marker.",
|
||||
)
|
||||
images: typing.Optional[typing.List[DivTextImage]] = Field(
|
||||
min_items=1,
|
||||
description="Images embedded in a crop marker.",
|
||||
)
|
||||
ranges: typing.Optional[typing.List[DivTextRange]] = Field(
|
||||
min_items=1,
|
||||
description=(
|
||||
"Character ranges inside a crop marker with different text "
|
||||
"styles."
|
||||
),
|
||||
)
|
||||
text: str = Field(
|
||||
min_length=1,
|
||||
description="Marker text.",
|
||||
)
|
||||
|
||||
|
||||
DivTextEllipsis.update_forward_refs()
|
||||
@@ -244,21 +448,42 @@ class DivTextImage(BaseDiv):
|
||||
url: str,
|
||||
height: typing.Optional[div_fixed_size.DivFixedSize] = None,
|
||||
tint_color: typing.Optional[str] = None,
|
||||
tint_mode: typing.Optional[div_blend_mode.DivBlendMode] = None,
|
||||
width: typing.Optional[div_fixed_size.DivFixedSize] = None,
|
||||
):
|
||||
super().__init__(
|
||||
height=height,
|
||||
start=start,
|
||||
tint_color=tint_color,
|
||||
tint_mode=tint_mode,
|
||||
url=url,
|
||||
width=width,
|
||||
)
|
||||
|
||||
height: typing.Optional[div_fixed_size.DivFixedSize] = Field(description='Image height.')
|
||||
start: int = Field(description='A symbol to insert prior to an image. To insert an image at the end of the text,specify the number of the last character plus one.')
|
||||
tint_color: typing.Optional[str] = Field(format="color", description='New color of a contour image.')
|
||||
url: str = Field(format="uri", description='Image URL.')
|
||||
width: typing.Optional[div_fixed_size.DivFixedSize] = Field(description='Image width.')
|
||||
height: typing.Optional[div_fixed_size.DivFixedSize] = Field(
|
||||
description="Image height.",
|
||||
)
|
||||
start: int = Field(
|
||||
description=(
|
||||
"A symbol to insert prior to an image. To insert an image at "
|
||||
"the end of the text,specify the number of the last "
|
||||
"character plus one."
|
||||
),
|
||||
)
|
||||
tint_color: typing.Optional[str] = Field(
|
||||
format="color",
|
||||
description="New color of a contour image.",
|
||||
)
|
||||
tint_mode: typing.Optional[div_blend_mode.DivBlendMode] = Field(
|
||||
description="The blend mode of color specified in tint_color.",
|
||||
)
|
||||
url: str = Field(
|
||||
format="uri",
|
||||
description="Image URL.",
|
||||
)
|
||||
width: typing.Optional[div_fixed_size.DivFixedSize] = Field(
|
||||
description="Image width.",
|
||||
)
|
||||
|
||||
|
||||
DivTextImage.update_forward_refs()
|
||||
@@ -299,19 +524,68 @@ class DivTextRange(BaseDiv):
|
||||
underline=underline,
|
||||
)
|
||||
|
||||
actions: typing.Optional[typing.List[div_action.DivAction]] = Field(min_items=1, description='Action when clicking on text.')
|
||||
end: int = Field(description='Ordinal number of the last character to be included in the range.')
|
||||
font_family: typing.Optional[div_font_family.DivFontFamily] = Field(description='Font family:`text` — a standard text font;`display` — a family of fonts with alarge font size.')
|
||||
font_size: typing.Optional[int] = Field(description='Font size.')
|
||||
font_size_unit: typing.Optional[div_size_unit.DivSizeUnit] = Field(description='Unit of measurement:`px` — a physical pixel.`dp` — a logical pixel that doesn\'tdepend on screen density.`sp` — a logical pixel that depends on the font size ona device. Specify height in `sp`. Only available on Android.')
|
||||
font_weight: typing.Optional[div_font_weight.DivFontWeight] = Field(description='Style.')
|
||||
letter_spacing: typing.Optional[float] = Field(description='Spacing between characters.')
|
||||
line_height: typing.Optional[int] = Field(description='Line spacing of the text range. The count is taken from the font baseline.Measured in units specified in `font_size_unit`.')
|
||||
start: int = Field(description='Ordinal number of a character which the range begins from. The first characterhas a number `0`.')
|
||||
strike: typing.Optional[div_line_style.DivLineStyle] = Field(description='Strikethrough.')
|
||||
text_color: typing.Optional[str] = Field(format="color", description='Text color.')
|
||||
top_offset: typing.Optional[int] = Field(description='The top margin of the text range. Measured in units specified in`font_size_unit`.')
|
||||
underline: typing.Optional[div_line_style.DivLineStyle] = Field(description='Underline.')
|
||||
actions: typing.Optional[typing.List[div_action.DivAction]] = Field(
|
||||
min_items=1,
|
||||
description="Action when clicking on text.",
|
||||
)
|
||||
end: int = Field(
|
||||
description=(
|
||||
"Ordinal number of the last character to be included in the "
|
||||
"range."
|
||||
),
|
||||
)
|
||||
font_family: typing.Optional[div_font_family.DivFontFamily] = Field(
|
||||
description=(
|
||||
"Font family:`text` — a standard text font;`display` — a "
|
||||
"family of fonts with alarge font size."
|
||||
),
|
||||
)
|
||||
font_size: typing.Optional[int] = Field(
|
||||
description="Font size.",
|
||||
)
|
||||
font_size_unit: typing.Optional[div_size_unit.DivSizeUnit] = Field(
|
||||
description=(
|
||||
"Unit of measurement:`px` — a physical pixel.`dp` — a "
|
||||
"logical pixel that doesn\'tdepend on screen density.`sp` — "
|
||||
"a logical pixel that depends on the font size ona device. "
|
||||
"Specify height in `sp`. Only available on Android."
|
||||
),
|
||||
)
|
||||
font_weight: typing.Optional[div_font_weight.DivFontWeight] = Field(
|
||||
description="Style.",
|
||||
)
|
||||
letter_spacing: typing.Optional[float] = Field(
|
||||
description="Spacing between characters.",
|
||||
)
|
||||
line_height: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Line spacing of the text range. The count is taken from the "
|
||||
"font baseline.Measured in units specified in "
|
||||
"`font_size_unit`."
|
||||
),
|
||||
)
|
||||
start: int = Field(
|
||||
description=(
|
||||
"Ordinal number of a character which the range begins from. "
|
||||
"The first characterhas a number `0`."
|
||||
),
|
||||
)
|
||||
strike: typing.Optional[div_line_style.DivLineStyle] = Field(
|
||||
description="Strikethrough.",
|
||||
)
|
||||
text_color: typing.Optional[str] = Field(
|
||||
format="color",
|
||||
description="Text color.",
|
||||
)
|
||||
top_offset: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"The top margin of the text range. Measured in units "
|
||||
"specified in`font_size_unit`."
|
||||
),
|
||||
)
|
||||
underline: typing.Optional[div_line_style.DivLineStyle] = Field(
|
||||
description="Underline.",
|
||||
)
|
||||
|
||||
|
||||
DivTextRange.update_forward_refs()
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div_linear_gradient
|
||||
from . import div_radial_gradient
|
||||
|
||||
from typing import Union
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_linear_gradient, div_radial_gradient
|
||||
|
||||
|
||||
DivTextGradient = Union[
|
||||
div_linear_gradient.DivLinearGradient,
|
||||
div_radial_gradient.DivRadialGradient,
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from . import div
|
||||
from . import div_animation
|
||||
from . import div_point
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div, div_animation, div_point
|
||||
|
||||
|
||||
# Tooltip.
|
||||
@@ -33,24 +34,60 @@ class DivTooltip(BaseDiv):
|
||||
position=position,
|
||||
)
|
||||
|
||||
animation_in: typing.Optional[div_animation.DivAnimation] = Field(description='Tooltip appearance animation. By default, the tooltip will be appearing graduallywith an offset from the anchor point by 10 dp.')
|
||||
animation_out: typing.Optional[div_animation.DivAnimation] = Field(description='Tooltip disappearance animation. By default, the tooltip will disappear graduallywith an offset from the anchor point by 10 dp.')
|
||||
div: div.Div = Field(description='An element that will be shown in a tooltip. If there are tooltips inside anelement, they won\'t be shown.')
|
||||
duration: typing.Optional[int] = Field(description='Duration of the tooltip visibility in milliseconds. When the value is set to `0`,the tooltip will be visible until the user hides it.')
|
||||
id: str = Field(min_length=1, description='Tooltip ID. It is used to avoid re-showing. It must be unique for all elementtooltips.')
|
||||
offset: typing.Optional[div_point.DivPoint] = Field(description='Shift relative to an anchor point.')
|
||||
position: DivTooltipPosition = Field(description='The position of a tooltip relative to an element it belongs to.')
|
||||
animation_in: typing.Optional[div_animation.DivAnimation] = Field(
|
||||
description=(
|
||||
"Tooltip appearance animation. By default, the tooltip will "
|
||||
"be appearing graduallywith an offset from the anchor point "
|
||||
"by 10 dp."
|
||||
),
|
||||
)
|
||||
animation_out: typing.Optional[div_animation.DivAnimation] = Field(
|
||||
description=(
|
||||
"Tooltip disappearance animation. By default, the tooltip "
|
||||
"will disappear graduallywith an offset from the anchor "
|
||||
"point by 10 dp."
|
||||
),
|
||||
)
|
||||
div: div.Div = Field(
|
||||
description=(
|
||||
"An element that will be shown in a tooltip. If there are "
|
||||
"tooltips inside anelement, they won\'t be shown."
|
||||
),
|
||||
)
|
||||
duration: typing.Optional[int] = Field(
|
||||
description=(
|
||||
"Duration of the tooltip visibility in milliseconds. When "
|
||||
"the value is set to `0`,the tooltip will be visible until "
|
||||
"the user hides it."
|
||||
),
|
||||
)
|
||||
id: str = Field(
|
||||
min_length=1,
|
||||
description=(
|
||||
"Tooltip ID. It is used to avoid re-showing. It must be "
|
||||
"unique for all elementtooltips."
|
||||
),
|
||||
)
|
||||
offset: typing.Optional[div_point.DivPoint] = Field(
|
||||
description="Shift relative to an anchor point.",
|
||||
)
|
||||
position: DivTooltipPosition = Field(
|
||||
description=(
|
||||
"The position of a tooltip relative to an element it belongs "
|
||||
"to."
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
class DivTooltipPosition(str, enum.Enum):
|
||||
LEFT = 'left'
|
||||
TOP_LEFT = 'top-left'
|
||||
TOP = 'top'
|
||||
TOP_RIGHT = 'top-right'
|
||||
RIGHT = 'right'
|
||||
BOTTOM_RIGHT = 'bottom-right'
|
||||
BOTTOM = 'bottom'
|
||||
BOTTOM_LEFT = 'bottom-left'
|
||||
LEFT = "left"
|
||||
TOP_LEFT = "top-left"
|
||||
TOP = "top"
|
||||
TOP_RIGHT = "top-right"
|
||||
RIGHT = "right"
|
||||
BOTTOM_RIGHT = "bottom-right"
|
||||
BOTTOM = "bottom"
|
||||
BOTTOM_LEFT = "bottom-left"
|
||||
|
||||
|
||||
DivTooltip.update_forward_refs()
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_pivot
|
||||
|
||||
|
||||
@@ -23,9 +26,18 @@ class DivTransform(BaseDiv):
|
||||
rotation=rotation,
|
||||
)
|
||||
|
||||
pivot_x: typing.Optional[div_pivot.DivPivot] = Field(description='The X coordinate of the rotation axis.')
|
||||
pivot_y: typing.Optional[div_pivot.DivPivot] = Field(description='The Y coordinate of the rotation axis.')
|
||||
rotation: typing.Optional[float] = Field(description='The number of degrees by which the element must be rotated. A positive valuedescribes a clockwise rotation.')
|
||||
pivot_x: typing.Optional[div_pivot.DivPivot] = Field(
|
||||
description="The X coordinate of the rotation axis.",
|
||||
)
|
||||
pivot_y: typing.Optional[div_pivot.DivPivot] = Field(
|
||||
description="The Y coordinate of the rotation axis.",
|
||||
)
|
||||
rotation: typing.Optional[float] = Field(
|
||||
description=(
|
||||
"The number of degrees by which the element must be rotated. "
|
||||
"A positive valuedescribes a clockwise rotation."
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
DivTransform.update_forward_refs()
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_animation_interpolator
|
||||
|
||||
|
||||
@@ -22,9 +25,15 @@ class DivTransitionBase(BaseDiv):
|
||||
start_delay=start_delay,
|
||||
)
|
||||
|
||||
duration: typing.Optional[int] = Field(description='Animation duration in milliseconds.')
|
||||
interpolator: typing.Optional[div_animation_interpolator.DivAnimationInterpolator] = Field(description='Transition speed nature.')
|
||||
start_delay: typing.Optional[int] = Field(description='Delay in milliseconds before animation starts.')
|
||||
duration: typing.Optional[int] = Field(
|
||||
description="Animation duration in milliseconds.",
|
||||
)
|
||||
interpolator: typing.Optional[div_animation_interpolator.DivAnimationInterpolator] = Field(
|
||||
description="Transition speed nature.",
|
||||
)
|
||||
start_delay: typing.Optional[int] = Field(
|
||||
description="Delay in milliseconds before animation starts.",
|
||||
)
|
||||
|
||||
|
||||
DivTransitionBase.update_forward_refs()
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
class DivTransitionSelector(str, enum.Enum):
|
||||
NONE = 'none'
|
||||
DATA_CHANGE = 'data_change'
|
||||
STATE_CHANGE = 'state_change'
|
||||
ANY_CHANGE = 'any_change'
|
||||
NONE = "none"
|
||||
DATA_CHANGE = "data_change"
|
||||
STATE_CHANGE = "state_change"
|
||||
ANY_CHANGE = "any_change"
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
|
||||
class DivTransitionTrigger(str, enum.Enum):
|
||||
DATA_CHANGE = 'data_change'
|
||||
STATE_CHANGE = 'state_change'
|
||||
VISIBILITY_CHANGE = 'visibility_change'
|
||||
DATA_CHANGE = "data_change"
|
||||
STATE_CHANGE = "state_change"
|
||||
VISIBILITY_CHANGE = "visibility_change"
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# Generated code. Do not modify.
|
||||
# flake8: noqa: F401, F405, F811
|
||||
|
||||
from __future__ import annotations
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
|
||||
from . import div_action
|
||||
|
||||
|
||||
@@ -23,14 +26,29 @@ class DivTrigger(BaseDiv):
|
||||
mode=mode,
|
||||
)
|
||||
|
||||
actions: typing.List[div_action.DivAction] = Field(min_items=1, description='Action when a trigger is activated.')
|
||||
condition: bool = Field(description='Condition for activating a trigger. For example, `liked && subscribed`.')
|
||||
mode: typing.Optional[DivTriggerMode] = Field(description='Trigger activation mode:`on_condition` — a trigger is activated when thecondition changes from `false` to `true`;`on_variable` — a trigger is activatedwhen the condition is met and the variable value changes.')
|
||||
actions: typing.List[div_action.DivAction] = Field(
|
||||
min_items=1,
|
||||
description="Action when a trigger is activated.",
|
||||
)
|
||||
condition: bool = Field(
|
||||
description=(
|
||||
"Condition for activating a trigger. For example, `liked && "
|
||||
"subscribed`."
|
||||
),
|
||||
)
|
||||
mode: typing.Optional[DivTriggerMode] = Field(
|
||||
description=(
|
||||
"Trigger activation mode:`on_condition` — a trigger is "
|
||||
"activated when thecondition changes from `false` to "
|
||||
"`true`;`on_variable` — a trigger is activatedwhen the "
|
||||
"condition is met and the variable value changes."
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
class DivTriggerMode(str, enum.Enum):
|
||||
ON_CONDITION = 'on_condition'
|
||||
ON_VARIABLE = 'on_variable'
|
||||
ON_CONDITION = "on_condition"
|
||||
ON_VARIABLE = "on_variable"
|
||||
|
||||
|
||||
DivTrigger.update_forward_refs()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user