@divkitframework/jsonbuilder 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/jsonbuilder.js +61 -46
- package/dist/es/jsonbuilder.js.map +1 -1
- package/dist/jsonbuilder.d.ts +175 -53
- package/dist/jsonbuilder.js +62 -46
- package/dist/jsonbuilder.js.map +1 -1
- package/package.json +3 -2
package/dist/jsonbuilder.d.ts
CHANGED
|
@@ -80,10 +80,9 @@ declare type Exactly<TBase, TExt extends TBase> = {
|
|
|
80
80
|
};
|
|
81
81
|
declare type IntBoolean = 1 | 0;
|
|
82
82
|
/**
|
|
83
|
-
* DFS
|
|
84
|
-
*
|
|
85
|
-
* @param
|
|
86
|
-
* @param nodeAction действие, выполняемое для каждого узла дерева
|
|
83
|
+
* DFS for a js object with callback on each leaf
|
|
84
|
+
* @param tree js object
|
|
85
|
+
* @param nodeAction callback for each leaf
|
|
87
86
|
*/
|
|
88
87
|
declare function treeWalkDFS(tree: unknown, nodeAction: (x: unknown, path: string[]) => void): void;
|
|
89
88
|
declare function copyTemplates<T extends ITemplates>(templates: T): T;
|
|
@@ -142,6 +141,28 @@ interface ColorVariableProps {
|
|
|
142
141
|
value: Type<string>;
|
|
143
142
|
}
|
|
144
143
|
|
|
144
|
+
/**
|
|
145
|
+
* Sets the margins, without taking the properties of the screen.
|
|
146
|
+
*/
|
|
147
|
+
interface IDivAbsoluteEdgeInsets {
|
|
148
|
+
/**
|
|
149
|
+
* Bottom margin.
|
|
150
|
+
*/
|
|
151
|
+
bottom?: Type<number | DivExpression>;
|
|
152
|
+
/**
|
|
153
|
+
* Left margin.
|
|
154
|
+
*/
|
|
155
|
+
left?: Type<number | DivExpression>;
|
|
156
|
+
/**
|
|
157
|
+
* Right margin.
|
|
158
|
+
*/
|
|
159
|
+
right?: Type<number | DivExpression>;
|
|
160
|
+
/**
|
|
161
|
+
* Top margin.
|
|
162
|
+
*/
|
|
163
|
+
top?: Type<number | DivExpression>;
|
|
164
|
+
}
|
|
165
|
+
|
|
145
166
|
/**
|
|
146
167
|
* Accessibility for disabled people.
|
|
147
168
|
*/
|
|
@@ -313,7 +334,7 @@ interface IDivAspect {
|
|
|
313
334
|
ratio: Type<number | DivExpression>;
|
|
314
335
|
}
|
|
315
336
|
|
|
316
|
-
declare type DivBackground = DivLinearGradient | DivRadialGradient | DivImageBackground | DivSolidBackground;
|
|
337
|
+
declare type DivBackground = DivLinearGradient | DivRadialGradient | DivImageBackground | DivSolidBackground | DivNinePatchBackground;
|
|
317
338
|
|
|
318
339
|
interface IDivBase {
|
|
319
340
|
/**
|
|
@@ -429,6 +450,8 @@ interface IDivBase {
|
|
|
429
450
|
width?: Type<DivSize>;
|
|
430
451
|
}
|
|
431
452
|
|
|
453
|
+
declare type DivBlendMode = 'source_in' | 'source_atop' | 'darken' | 'lighten' | 'multiply' | 'screen';
|
|
454
|
+
|
|
432
455
|
/**
|
|
433
456
|
* Stroke around the element.
|
|
434
457
|
*/
|
|
@@ -511,6 +534,25 @@ interface DivChangeSetTransitionProps {
|
|
|
511
534
|
|
|
512
535
|
declare type DivChangeTransition = DivChangeSetTransition | DivChangeBoundsTransition;
|
|
513
536
|
|
|
537
|
+
/**
|
|
538
|
+
* A circle.
|
|
539
|
+
*/
|
|
540
|
+
declare class DivCircleShape<T extends DivCircleShapeProps = DivCircleShapeProps> {
|
|
541
|
+
readonly _props?: Exact<DivCircleShapeProps, T>;
|
|
542
|
+
readonly type = "circle";
|
|
543
|
+
/**
|
|
544
|
+
* Radius.
|
|
545
|
+
*/
|
|
546
|
+
radius?: Type<DivFixedSize>;
|
|
547
|
+
constructor(props?: Exact<DivCircleShapeProps, T>);
|
|
548
|
+
}
|
|
549
|
+
interface DivCircleShapeProps {
|
|
550
|
+
/**
|
|
551
|
+
* Radius.
|
|
552
|
+
*/
|
|
553
|
+
radius?: Type<DivFixedSize>;
|
|
554
|
+
}
|
|
555
|
+
|
|
514
556
|
/**
|
|
515
557
|
* Container. It contains other elements and is responsible for their location. It is used to
|
|
516
558
|
* arrange elements vertically, horizontally, and with an overlay in a certain order, simulating
|
|
@@ -600,11 +642,18 @@ declare class DivContainer<T extends DivContainerProps = DivContainerProps> {
|
|
|
600
642
|
/**
|
|
601
643
|
* Method of placing elements. `wrap` value includes the transfer of elements to the next line if
|
|
602
644
|
* they did not fit in the previous one. If the value is set to `wrap`, then a separate line will
|
|
603
|
-
* be allocated for all elements with a size value of match_parent along the main axis.
|
|
645
|
+
* be allocated for all elements with a size value of match_parent along the main axis. If the
|
|
646
|
+
* value is set to `wrap`, then elements with a size value of match_parent along the cross axis
|
|
647
|
+
* will be ignored.
|
|
604
648
|
*/
|
|
605
649
|
layout_mode?: Type<DivContainerLayoutMode | DivExpression>;
|
|
606
650
|
/**
|
|
607
|
-
*
|
|
651
|
+
* Separator between elements along the cross axis. Not used if the `layout_mode` parameter has
|
|
652
|
+
* the value `no_wrap'.
|
|
653
|
+
*/
|
|
654
|
+
line_separator?: Type<IDivContainerSeparator>;
|
|
655
|
+
/**
|
|
656
|
+
* Action when long-clicking on an element. Doesn't work on the devices w/o touch gestures.
|
|
608
657
|
*/
|
|
609
658
|
longtap_actions?: Type<NonEmptyArray<IDivAction>>;
|
|
610
659
|
/**
|
|
@@ -629,6 +678,11 @@ declare class DivContainer<T extends DivContainerProps = DivContainerProps> {
|
|
|
629
678
|
* [pager](div-pager.md).
|
|
630
679
|
*/
|
|
631
680
|
selected_actions?: Type<NonEmptyArray<IDivAction>>;
|
|
681
|
+
/**
|
|
682
|
+
* Separator between elements along the main axis. Not used if the `orientation` parameter has
|
|
683
|
+
* the value `overlap'.
|
|
684
|
+
*/
|
|
685
|
+
separator?: Type<IDivContainerSeparator>;
|
|
632
686
|
/**
|
|
633
687
|
* Tooltips linked to an element. A tooltip can be shown by `div-action://show_tooltip?id=`,
|
|
634
688
|
* hidden by `div-action://hide_tooltip?id=` where `id` — tooltip id.
|
|
@@ -759,11 +813,18 @@ interface DivContainerProps {
|
|
|
759
813
|
/**
|
|
760
814
|
* Method of placing elements. `wrap` value includes the transfer of elements to the next line if
|
|
761
815
|
* they did not fit in the previous one. If the value is set to `wrap`, then a separate line will
|
|
762
|
-
* be allocated for all elements with a size value of match_parent along the main axis.
|
|
816
|
+
* be allocated for all elements with a size value of match_parent along the main axis. If the
|
|
817
|
+
* value is set to `wrap`, then elements with a size value of match_parent along the cross axis
|
|
818
|
+
* will be ignored.
|
|
763
819
|
*/
|
|
764
820
|
layout_mode?: Type<DivContainerLayoutMode | DivExpression>;
|
|
765
821
|
/**
|
|
766
|
-
*
|
|
822
|
+
* Separator between elements along the cross axis. Not used if the `layout_mode` parameter has
|
|
823
|
+
* the value `no_wrap'.
|
|
824
|
+
*/
|
|
825
|
+
line_separator?: Type<IDivContainerSeparator>;
|
|
826
|
+
/**
|
|
827
|
+
* Action when long-clicking on an element. Doesn't work on the devices w/o touch gestures.
|
|
767
828
|
*/
|
|
768
829
|
longtap_actions?: Type<NonEmptyArray<IDivAction>>;
|
|
769
830
|
/**
|
|
@@ -788,6 +849,11 @@ interface DivContainerProps {
|
|
|
788
849
|
* [pager](div-pager.md).
|
|
789
850
|
*/
|
|
790
851
|
selected_actions?: Type<NonEmptyArray<IDivAction>>;
|
|
852
|
+
/**
|
|
853
|
+
* Separator between elements along the main axis. Not used if the `orientation` parameter has
|
|
854
|
+
* the value `overlap'.
|
|
855
|
+
*/
|
|
856
|
+
separator?: Type<IDivContainerSeparator>;
|
|
791
857
|
/**
|
|
792
858
|
* Tooltips linked to an element. A tooltip can be shown by `div-action://show_tooltip?id=`,
|
|
793
859
|
* hidden by `div-action://hide_tooltip?id=` where `id` — tooltip id.
|
|
@@ -837,6 +903,24 @@ interface DivContainerProps {
|
|
|
837
903
|
}
|
|
838
904
|
declare type DivContainerLayoutMode = 'no_wrap' | 'wrap';
|
|
839
905
|
declare type DivContainerOrientation = 'vertical' | 'horizontal' | 'overlap';
|
|
906
|
+
interface IDivContainerSeparator {
|
|
907
|
+
/**
|
|
908
|
+
* Enables showing of separator after the last item.
|
|
909
|
+
*/
|
|
910
|
+
show_at_end?: Type<IntBoolean | DivExpression>;
|
|
911
|
+
/**
|
|
912
|
+
* Enables showing of separator before the first item.
|
|
913
|
+
*/
|
|
914
|
+
show_at_start?: Type<IntBoolean | DivExpression>;
|
|
915
|
+
/**
|
|
916
|
+
* Enables showing of separator between items.
|
|
917
|
+
*/
|
|
918
|
+
show_between?: Type<IntBoolean | DivExpression>;
|
|
919
|
+
/**
|
|
920
|
+
* Style of the separator.
|
|
921
|
+
*/
|
|
922
|
+
style: Type<DivDrawable>;
|
|
923
|
+
}
|
|
840
924
|
|
|
841
925
|
/**
|
|
842
926
|
* Sets corner rounding.
|
|
@@ -1362,6 +1446,10 @@ declare class DivGallery<T extends DivGalleryProps = DivGalleryProps> {
|
|
|
1362
1446
|
* the center;`end` — to the right.
|
|
1363
1447
|
*/
|
|
1364
1448
|
cross_content_alignment?: Type<DivGalleryCrossContentAlignment | DivExpression>;
|
|
1449
|
+
/**
|
|
1450
|
+
* Spacing between elements across the scroll axis. Default value is `item_spacing`
|
|
1451
|
+
*/
|
|
1452
|
+
cross_spacing?: Type<number | DivExpression>;
|
|
1365
1453
|
/**
|
|
1366
1454
|
* Ordinal number of the gallery element to be scrolled to by default. For
|
|
1367
1455
|
* `scroll_mode`:`default` — the scroll position is set to the beginning of the element, without
|
|
@@ -1524,6 +1612,10 @@ interface DivGalleryProps {
|
|
|
1524
1612
|
* the center;`end` — to the right.
|
|
1525
1613
|
*/
|
|
1526
1614
|
cross_content_alignment?: Type<DivGalleryCrossContentAlignment | DivExpression>;
|
|
1615
|
+
/**
|
|
1616
|
+
* Spacing between elements across the scroll axis. Default value is `item_spacing`
|
|
1617
|
+
*/
|
|
1618
|
+
cross_spacing?: Type<number | DivExpression>;
|
|
1527
1619
|
/**
|
|
1528
1620
|
* Ordinal number of the gallery element to be scrolled to by default. For
|
|
1529
1621
|
* `scroll_mode`:`default` — the scroll position is set to the beginning of the element, without
|
|
@@ -1733,7 +1825,7 @@ declare class DivGifImage<T extends DivGifImageProps = DivGifImageProps> {
|
|
|
1733
1825
|
*/
|
|
1734
1826
|
id?: Type<string>;
|
|
1735
1827
|
/**
|
|
1736
|
-
* Action when long-clicking on an element.
|
|
1828
|
+
* Action when long-clicking on an element. Doesn't work on the devices w/o touch gestures.
|
|
1737
1829
|
*/
|
|
1738
1830
|
longtap_actions?: Type<NonEmptyArray<IDivAction>>;
|
|
1739
1831
|
/**
|
|
@@ -1898,7 +1990,7 @@ interface DivGifImageProps {
|
|
|
1898
1990
|
*/
|
|
1899
1991
|
id?: Type<string>;
|
|
1900
1992
|
/**
|
|
1901
|
-
* Action when long-clicking on an element.
|
|
1993
|
+
* Action when long-clicking on an element. Doesn't work on the devices w/o touch gestures.
|
|
1902
1994
|
*/
|
|
1903
1995
|
longtap_actions?: Type<NonEmptyArray<IDivAction>>;
|
|
1904
1996
|
/**
|
|
@@ -2071,7 +2163,7 @@ declare class DivGrid<T extends DivGridProps = DivGridProps> {
|
|
|
2071
2163
|
*/
|
|
2072
2164
|
items: Type<NonEmptyArray<Div>>;
|
|
2073
2165
|
/**
|
|
2074
|
-
* Action when long-clicking on an element.
|
|
2166
|
+
* Action when long-clicking on an element. Doesn't work on the devices w/o touch gestures.
|
|
2075
2167
|
*/
|
|
2076
2168
|
longtap_actions?: Type<NonEmptyArray<IDivAction>>;
|
|
2077
2169
|
/**
|
|
@@ -2221,7 +2313,7 @@ interface DivGridProps {
|
|
|
2221
2313
|
*/
|
|
2222
2314
|
items: Type<NonEmptyArray<Div>>;
|
|
2223
2315
|
/**
|
|
2224
|
-
* Action when long-clicking on an element.
|
|
2316
|
+
* Action when long-clicking on an element. Doesn't work on the devices w/o touch gestures.
|
|
2225
2317
|
*/
|
|
2226
2318
|
longtap_actions?: Type<NonEmptyArray<IDivAction>>;
|
|
2227
2319
|
/**
|
|
@@ -2383,7 +2475,7 @@ declare class DivImage<T extends DivImageProps = DivImageProps> {
|
|
|
2383
2475
|
*/
|
|
2384
2476
|
image_url: Type<string | DivExpression>;
|
|
2385
2477
|
/**
|
|
2386
|
-
* Action when long-clicking on an element.
|
|
2478
|
+
* Action when long-clicking on an element. Doesn't work on the devices w/o touch gestures.
|
|
2387
2479
|
*/
|
|
2388
2480
|
longtap_actions?: Type<NonEmptyArray<IDivAction>>;
|
|
2389
2481
|
/**
|
|
@@ -2425,6 +2517,10 @@ declare class DivImage<T extends DivImageProps = DivImageProps> {
|
|
|
2425
2517
|
* New color of a contour image.
|
|
2426
2518
|
*/
|
|
2427
2519
|
tint_color?: Type<string | DivExpression>;
|
|
2520
|
+
/**
|
|
2521
|
+
* The blend mode of color specified in tint_color. Default value: `sourceIn`
|
|
2522
|
+
*/
|
|
2523
|
+
tint_mode?: Type<DivBlendMode | DivExpression>;
|
|
2428
2524
|
/**
|
|
2429
2525
|
* Tooltips linked to an element. A tooltip can be shown by `div-action://show_tooltip?id=`,
|
|
2430
2526
|
* hidden by `div-action://hide_tooltip?id=` where `id` — tooltip id.
|
|
@@ -2562,7 +2658,7 @@ interface DivImageProps {
|
|
|
2562
2658
|
*/
|
|
2563
2659
|
image_url: Type<string | DivExpression>;
|
|
2564
2660
|
/**
|
|
2565
|
-
* Action when long-clicking on an element.
|
|
2661
|
+
* Action when long-clicking on an element. Doesn't work on the devices w/o touch gestures.
|
|
2566
2662
|
*/
|
|
2567
2663
|
longtap_actions?: Type<NonEmptyArray<IDivAction>>;
|
|
2568
2664
|
/**
|
|
@@ -2604,6 +2700,10 @@ interface DivImageProps {
|
|
|
2604
2700
|
* New color of a contour image.
|
|
2605
2701
|
*/
|
|
2606
2702
|
tint_color?: Type<string | DivExpression>;
|
|
2703
|
+
/**
|
|
2704
|
+
* The blend mode of color specified in tint_color. Default value: `sourceIn`
|
|
2705
|
+
*/
|
|
2706
|
+
tint_mode?: Type<DivBlendMode | DivExpression>;
|
|
2607
2707
|
/**
|
|
2608
2708
|
* Tooltips linked to an element. A tooltip can be shown by `div-action://show_tooltip?id=`,
|
|
2609
2709
|
* hidden by `div-action://hide_tooltip?id=` where `id` — tooltip id.
|
|
@@ -3466,6 +3566,35 @@ interface DivNeighbourPageSizeProps {
|
|
|
3466
3566
|
neighbour_page_width: Type<DivFixedSize>;
|
|
3467
3567
|
}
|
|
3468
3568
|
|
|
3569
|
+
/**
|
|
3570
|
+
* Image in nine patch format. https://developer.android.com/studio/write/draw9patch.
|
|
3571
|
+
*/
|
|
3572
|
+
declare class DivNinePatchBackground<T extends DivNinePatchBackgroundProps = DivNinePatchBackgroundProps> {
|
|
3573
|
+
readonly _props?: Exact<DivNinePatchBackgroundProps, T>;
|
|
3574
|
+
readonly type = "nine_patch_image";
|
|
3575
|
+
/**
|
|
3576
|
+
* Image URL.
|
|
3577
|
+
*/
|
|
3578
|
+
image_url: Type<string | DivExpression>;
|
|
3579
|
+
/**
|
|
3580
|
+
* Margins that break images into parts, according to the rule, are similar to
|
|
3581
|
+
* border-image-slice. (https://developer.mozilla.org/en-US/docs/Web/CSS/border-image-slice)
|
|
3582
|
+
*/
|
|
3583
|
+
insets: Type<IDivAbsoluteEdgeInsets>;
|
|
3584
|
+
constructor(props: Exact<DivNinePatchBackgroundProps, T>);
|
|
3585
|
+
}
|
|
3586
|
+
interface DivNinePatchBackgroundProps {
|
|
3587
|
+
/**
|
|
3588
|
+
* Image URL.
|
|
3589
|
+
*/
|
|
3590
|
+
image_url: Type<string | DivExpression>;
|
|
3591
|
+
/**
|
|
3592
|
+
* Margins that break images into parts, according to the rule, are similar to
|
|
3593
|
+
* border-image-slice. (https://developer.mozilla.org/en-US/docs/Web/CSS/border-image-slice)
|
|
3594
|
+
*/
|
|
3595
|
+
insets: Type<IDivAbsoluteEdgeInsets>;
|
|
3596
|
+
}
|
|
3597
|
+
|
|
3469
3598
|
/**
|
|
3470
3599
|
* Percentage value of the page width.
|
|
3471
3600
|
*/
|
|
@@ -4186,7 +4315,7 @@ declare class DivSeparator<T extends DivSeparatorProps = DivSeparatorProps> {
|
|
|
4186
4315
|
*/
|
|
4187
4316
|
id?: Type<string>;
|
|
4188
4317
|
/**
|
|
4189
|
-
* Action when long-clicking on an element.
|
|
4318
|
+
* Action when long-clicking on an element. Doesn't work on the devices w/o touch gestures.
|
|
4190
4319
|
*/
|
|
4191
4320
|
longtap_actions?: Type<NonEmptyArray<IDivAction>>;
|
|
4192
4321
|
/**
|
|
@@ -4324,7 +4453,7 @@ interface DivSeparatorProps {
|
|
|
4324
4453
|
*/
|
|
4325
4454
|
id?: Type<string>;
|
|
4326
4455
|
/**
|
|
4327
|
-
* Action when long-clicking on an element.
|
|
4456
|
+
* Action when long-clicking on an element. Doesn't work on the devices w/o touch gestures.
|
|
4328
4457
|
*/
|
|
4329
4458
|
longtap_actions?: Type<NonEmptyArray<IDivAction>>;
|
|
4330
4459
|
/**
|
|
@@ -4429,7 +4558,7 @@ interface IDivShadow {
|
|
|
4429
4558
|
offset: Type<IDivPoint>;
|
|
4430
4559
|
}
|
|
4431
4560
|
|
|
4432
|
-
declare type DivShape = DivRoundedRectangleShape;
|
|
4561
|
+
declare type DivShape = DivRoundedRectangleShape | DivCircleShape;
|
|
4433
4562
|
|
|
4434
4563
|
/**
|
|
4435
4564
|
* Drawable of a simple geometric shape.
|
|
@@ -5763,7 +5892,7 @@ declare class DivText<T extends DivTextProps = DivTextProps> {
|
|
|
5763
5892
|
*/
|
|
5764
5893
|
line_height?: Type<number | DivExpression>;
|
|
5765
5894
|
/**
|
|
5766
|
-
* Action when long-clicking on an element.
|
|
5895
|
+
* Action when long-clicking on an element. Doesn't work on the devices w/o touch gestures.
|
|
5767
5896
|
*/
|
|
5768
5897
|
longtap_actions?: Type<NonEmptyArray<IDivAction>>;
|
|
5769
5898
|
/**
|
|
@@ -5986,7 +6115,7 @@ interface DivTextProps {
|
|
|
5986
6115
|
*/
|
|
5987
6116
|
line_height?: Type<number | DivExpression>;
|
|
5988
6117
|
/**
|
|
5989
|
-
* Action when long-clicking on an element.
|
|
6118
|
+
* Action when long-clicking on an element. Doesn't work on the devices w/o touch gestures.
|
|
5990
6119
|
*/
|
|
5991
6120
|
longtap_actions?: Type<NonEmptyArray<IDivAction>>;
|
|
5992
6121
|
/**
|
|
@@ -6541,13 +6670,6 @@ declare type TemplateHelper<U extends ITemplates> = {
|
|
|
6541
6670
|
*/
|
|
6542
6671
|
declare function templateHelper<T extends ITemplates>(templates: T): TemplateHelper<T>;
|
|
6543
6672
|
|
|
6544
|
-
/**
|
|
6545
|
-
* Проверяет имя шаблона и возвращает true,
|
|
6546
|
-
* если имя шаблона нужно сохранить.
|
|
6547
|
-
* Например, в веб-морде есть 'мета-шаблон'
|
|
6548
|
-
* home:block, который нельзя переименовывать
|
|
6549
|
-
*/
|
|
6550
|
-
declare function isExternalTemplate(templateName: string): boolean;
|
|
6551
6673
|
declare type TemplateResolvedAction<T> = (props: {
|
|
6552
6674
|
name: string;
|
|
6553
6675
|
template: Div;
|
|
@@ -6557,12 +6679,10 @@ declare type TemplateResolvedAction<T> = (props: {
|
|
|
6557
6679
|
};
|
|
6558
6680
|
}) => T;
|
|
6559
6681
|
/**
|
|
6560
|
-
*
|
|
6561
|
-
* перед выполнением действия
|
|
6682
|
+
* Templates walker. It resolves template dependencies on each step, and also can run a callback after that
|
|
6562
6683
|
* @param templates
|
|
6563
|
-
* @param resolvedAction
|
|
6564
|
-
*
|
|
6565
|
-
* @param depsResolved ранее разрешенные зависимости, например для общих шаблонов
|
|
6684
|
+
* @param resolvedAction Callback for the template. It will be called after resolving dependencies
|
|
6685
|
+
* @param depsResolved Deps resolve cache, for example, for common templates
|
|
6566
6686
|
*/
|
|
6567
6687
|
declare function runResolveDeps<T>(templates: ITemplates, resolvedAction: TemplateResolvedAction<T>, depsResolved?: {
|
|
6568
6688
|
[k: string]: T;
|
|
@@ -6570,9 +6690,10 @@ declare function runResolveDeps<T>(templates: ITemplates, resolvedAction: Templa
|
|
|
6570
6690
|
[k: string]: T;
|
|
6571
6691
|
};
|
|
6572
6692
|
/**
|
|
6573
|
-
*
|
|
6574
|
-
* @param templates
|
|
6575
|
-
* @
|
|
6693
|
+
* Search for a templates dependencies
|
|
6694
|
+
* @param templates
|
|
6695
|
+
* @param depsResolved Deps resolution cache
|
|
6696
|
+
* @returns Map with deps for each template
|
|
6576
6697
|
*/
|
|
6577
6698
|
declare function templatesDepsMap(templates: ITemplates, depsResolved?: {
|
|
6578
6699
|
[k: string]: string[];
|
|
@@ -6598,18 +6719,18 @@ declare function thelperWithMemo<T extends ITemplates>(options?: {
|
|
|
6598
6719
|
}): ThelperWithMemo<T>;
|
|
6599
6720
|
|
|
6600
6721
|
/**
|
|
6601
|
-
*
|
|
6602
|
-
*
|
|
6722
|
+
* Templates rewriting for a nested templates
|
|
6723
|
+
* For example, in template
|
|
6603
6724
|
* new DivContainer({
|
|
6604
6725
|
* items: [
|
|
6605
6726
|
* template('template2')
|
|
6606
6727
|
* ]
|
|
6607
6728
|
* })
|
|
6608
|
-
* 'template2'
|
|
6609
|
-
* @param templates
|
|
6610
|
-
* @param rename
|
|
6611
|
-
* @param
|
|
6612
|
-
* @returns
|
|
6729
|
+
* 'template2' would be replaces into `template2/${hash(templates.template2)}`
|
|
6730
|
+
* @param templates Templates to process
|
|
6731
|
+
* @param rename New name generator
|
|
6732
|
+
* @param resolvedNames Rename cache
|
|
6733
|
+
* @returns Processed templates + map with transformed names
|
|
6613
6734
|
*/
|
|
6614
6735
|
declare function rewriteNames<T extends ITemplates>(templates: T, rename: (name: string, templates: T) => string, resolvedNames?: {
|
|
6615
6736
|
[k: string]: string;
|
|
@@ -6621,24 +6742,25 @@ declare function rewriteNames<T extends ITemplates>(templates: T, rename: (name:
|
|
|
6621
6742
|
};
|
|
6622
6743
|
|
|
6623
6744
|
/**
|
|
6624
|
-
*
|
|
6745
|
+
* Changes the reference-objects with the actual props
|
|
6746
|
+
*
|
|
6747
|
+
* Example:
|
|
6625
6748
|
* prop: reference('template_prop')
|
|
6626
|
-
*
|
|
6749
|
+
* to
|
|
6627
6750
|
* $prop: 'template_prop'
|
|
6628
|
-
* @param templates
|
|
6629
|
-
* @returns
|
|
6751
|
+
* @param templates
|
|
6752
|
+
* @returns Serialization-ready templates
|
|
6630
6753
|
*/
|
|
6631
6754
|
declare function rewriteRefs<T extends ITemplates>(templates: T): T;
|
|
6632
6755
|
|
|
6633
6756
|
declare function getTemplateHash(template: Div): string;
|
|
6634
6757
|
declare function thelperVersion(templates: ITemplates): (name: string) => string;
|
|
6635
6758
|
/**
|
|
6636
|
-
*
|
|
6637
|
-
*
|
|
6638
|
-
*
|
|
6639
|
-
* @param
|
|
6640
|
-
* @
|
|
6641
|
-
* @returns хэшмап новых имен шаблонов
|
|
6759
|
+
* Replaces a TemplateBlock calls with the concat of the name with a hash (md5).
|
|
6760
|
+
* The names of the root templates are not changed! (templates object keys)
|
|
6761
|
+
* @param templates
|
|
6762
|
+
* @param resolvedNames Names cache
|
|
6763
|
+
* @returns A map with new names
|
|
6642
6764
|
*/
|
|
6643
6765
|
declare function rewriteTemplateVersions<T extends ITemplates>(templates: T, resolvedNames?: {
|
|
6644
6766
|
[k: string]: string;
|
|
@@ -6649,4 +6771,4 @@ declare function rewriteTemplateVersions<T extends ITemplates>(templates: T, res
|
|
|
6649
6771
|
};
|
|
6650
6772
|
};
|
|
6651
6773
|
|
|
6652
|
-
export { BooleanVariable, BooleanVariableProps, ColorVariable, ColorVariableProps, DelimiterStyleOrientation, Div, DivAccessibilityMode, DivAccessibilityType, DivActionTarget, DivAlignmentHorizontal, DivAlignmentVertical, DivAnimationInterpolator, DivAnimationName, DivAppearanceSetTransition, DivAppearanceSetTransitionProps, DivAppearanceTransition, DivBackground, DivChangeBoundsTransition, DivChangeBoundsTransitionProps, DivChangeSetTransition, DivChangeSetTransitionProps, DivChangeTransition, DivContainer, DivContainerLayoutMode, DivContainerOrientation, DivContainerProps, DivCount, DivCustom, DivCustomProps, DivDrawable, DivExpression, DivFadeTransition, DivFadeTransitionProps, DivFixedCount, DivFixedCountProps, DivFixedSize, DivFixedSizeProps, DivFontFamily, DivFontWeight, DivGallery, DivGalleryCrossContentAlignment, DivGalleryOrientation, DivGalleryProps, DivGalleryScrollMode, DivGifImage, DivGifImageProps, DivGradientBackground, DivGrid, DivGridProps, DivImage, DivImageBackground, DivImageBackgroundProps, DivImageProps, DivImageScale, DivIndicator, DivIndicatorAnimation, DivIndicatorProps, DivInfinityCount, DivInfinityCountProps, DivInput, DivInputKeyboardType, DivInputProps, DivLineStyle, DivLinearGradient, DivLinearGradientProps, DivMatchParentSize, DivMatchParentSizeProps, DivNeighbourPageSize, DivNeighbourPageSizeProps, DivPageSize, DivPageSizeProps, DivPager, DivPagerLayoutMode, DivPagerOrientation, DivPagerProps, DivPatchMode, DivPercentageSize, DivPercentageSizeProps, DivPivot, DivPivotFixed, DivPivotFixedProps, DivPivotPercentage, DivPivotPercentageProps, DivRadialGradient, DivRadialGradientCenter, DivRadialGradientFixedCenter, DivRadialGradientFixedCenterProps, DivRadialGradientProps, DivRadialGradientRadius, DivRadialGradientRelativeCenter, DivRadialGradientRelativeCenterProps, DivRadialGradientRelativeRadius, DivRadialGradientRelativeRadiusProps, DivRadialGradientRelativeRadiusValue, DivRoundedRectangleShape, DivRoundedRectangleShapeProps, DivScaleTransition, DivScaleTransitionProps, DivSeparator, DivSeparatorProps, DivShape, DivShapeDrawable, DivShapeDrawableProps, DivSize, DivSizeUnit, DivSlideTransition, DivSlideTransitionEdge, DivSlideTransitionProps, DivSlider, DivSliderProps, DivSolidBackground, DivSolidBackgroundProps, DivState, DivStateProps, DivTabs, DivTabsProps, DivText, DivTextGradient, DivTextProps, DivTextTruncate, DivTooltipPosition, DivTransitionSelector, DivTransitionTrigger, DivTriggerMode, DivVariable, DivVisibility, DivWrapContentSize, DivWrapContentSizeProps, Exact, IDivAccessibility, IDivAction, IDivActionMenuItem, IDivAnimation, IDivAspect, IDivBase, IDivBorder, IDivCornersRadius, IDivData, IDivDataState, IDivDimension, IDivDownloadCallbacks, IDivEdgeInsets, IDivExtension, IDivFocus, IDivFocusNextFocusIds, IDivInputNativeInterface, IDivPatch, IDivPatchChange, IDivPoint, IDivSeparatorDelimiterStyle, IDivShadow, IDivSliderTextStyle, IDivStateState, IDivStroke, IDivTabsItem, IDivTabsTabTitleStyle, IDivTextEllipsis, IDivTextImage, IDivTextRange, IDivTooltip, IDivTransform, IDivTransitionBase, IDivTrigger, IDivVisibilityAction, ITemplates, IntBoolean, IntegerVariable, IntegerVariableProps, NonEmptyArray, NumberVariable, NumberVariableProps, SafeDivExpression, StringVariable, StringVariableProps, TabTitleStyleAnimationType, TemplateBlock, TemplateHelper, TemplatePropertyReference, TemplateResolvedAction, ThelperWithMemo, Type, UrlVariable, UrlVariableProps, copyTemplates, divCard, escapeCard, escapeExpression, expression, fixed, getTemplateHash,
|
|
6774
|
+
export { BooleanVariable, BooleanVariableProps, ColorVariable, ColorVariableProps, DelimiterStyleOrientation, Div, DivAccessibilityMode, DivAccessibilityType, DivActionTarget, DivAlignmentHorizontal, DivAlignmentVertical, DivAnimationInterpolator, DivAnimationName, DivAppearanceSetTransition, DivAppearanceSetTransitionProps, DivAppearanceTransition, DivBackground, DivBlendMode, DivChangeBoundsTransition, DivChangeBoundsTransitionProps, DivChangeSetTransition, DivChangeSetTransitionProps, DivChangeTransition, DivCircleShape, DivCircleShapeProps, DivContainer, DivContainerLayoutMode, DivContainerOrientation, DivContainerProps, DivCount, DivCustom, DivCustomProps, DivDrawable, DivExpression, DivFadeTransition, DivFadeTransitionProps, DivFixedCount, DivFixedCountProps, DivFixedSize, DivFixedSizeProps, DivFontFamily, DivFontWeight, DivGallery, DivGalleryCrossContentAlignment, DivGalleryOrientation, DivGalleryProps, DivGalleryScrollMode, DivGifImage, DivGifImageProps, DivGradientBackground, DivGrid, DivGridProps, DivImage, DivImageBackground, DivImageBackgroundProps, DivImageProps, DivImageScale, DivIndicator, DivIndicatorAnimation, DivIndicatorProps, DivInfinityCount, DivInfinityCountProps, DivInput, DivInputKeyboardType, DivInputProps, DivLineStyle, DivLinearGradient, DivLinearGradientProps, DivMatchParentSize, DivMatchParentSizeProps, DivNeighbourPageSize, DivNeighbourPageSizeProps, DivNinePatchBackground, DivNinePatchBackgroundProps, DivPageSize, DivPageSizeProps, DivPager, DivPagerLayoutMode, DivPagerOrientation, DivPagerProps, DivPatchMode, DivPercentageSize, DivPercentageSizeProps, DivPivot, DivPivotFixed, DivPivotFixedProps, DivPivotPercentage, DivPivotPercentageProps, DivRadialGradient, DivRadialGradientCenter, DivRadialGradientFixedCenter, DivRadialGradientFixedCenterProps, DivRadialGradientProps, DivRadialGradientRadius, DivRadialGradientRelativeCenter, DivRadialGradientRelativeCenterProps, DivRadialGradientRelativeRadius, DivRadialGradientRelativeRadiusProps, DivRadialGradientRelativeRadiusValue, DivRoundedRectangleShape, DivRoundedRectangleShapeProps, DivScaleTransition, DivScaleTransitionProps, DivSeparator, DivSeparatorProps, DivShape, DivShapeDrawable, DivShapeDrawableProps, DivSize, DivSizeUnit, DivSlideTransition, DivSlideTransitionEdge, DivSlideTransitionProps, DivSlider, DivSliderProps, DivSolidBackground, DivSolidBackgroundProps, DivState, DivStateProps, DivTabs, DivTabsProps, DivText, DivTextGradient, DivTextProps, DivTextTruncate, DivTooltipPosition, DivTransitionSelector, DivTransitionTrigger, DivTriggerMode, DivVariable, DivVisibility, DivWrapContentSize, DivWrapContentSizeProps, Exact, IDivAbsoluteEdgeInsets, IDivAccessibility, IDivAction, IDivActionMenuItem, IDivAnimation, IDivAspect, IDivBase, IDivBorder, IDivContainerSeparator, IDivCornersRadius, IDivData, IDivDataState, IDivDimension, IDivDownloadCallbacks, IDivEdgeInsets, IDivExtension, IDivFocus, IDivFocusNextFocusIds, IDivInputNativeInterface, IDivPatch, IDivPatchChange, IDivPoint, IDivSeparatorDelimiterStyle, IDivShadow, IDivSliderTextStyle, IDivStateState, IDivStroke, IDivTabsItem, IDivTabsTabTitleStyle, IDivTextEllipsis, IDivTextImage, IDivTextRange, IDivTooltip, IDivTransform, IDivTransitionBase, IDivTrigger, IDivVisibilityAction, ITemplates, IntBoolean, IntegerVariable, IntegerVariableProps, NonEmptyArray, NumberVariable, NumberVariableProps, SafeDivExpression, StringVariable, StringVariableProps, TabTitleStyleAnimationType, TemplateBlock, TemplateHelper, TemplatePropertyReference, TemplateResolvedAction, ThelperWithMemo, Type, UrlVariable, UrlVariableProps, copyTemplates, divCard, escapeCard, escapeExpression, expression, fixed, getTemplateHash, matchParent, reference, rewriteNames, rewriteRefs, rewriteTemplateVersions, runResolveDeps, template, templateHelper, templatesDepsMap, thelperVersion, thelperWithMemo, treeWalkDFS, weighted, wrapContent };
|