1/* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16const richNativeTag = { 17 'div': { 18 events: ['reachstart', 'reachend', 'reachtop', 'reachbottom'], 19 attrs: {}, 20 }, 21 'a': { 22 textContent: true, 23 children: ['span'], 24 attrs: { 25 visited: { 26 enum: ['false', 'true'], 27 }, 28 href: {}, 29 value: {}, 30 }, 31 }, 32 'button': { 33 textContent: true, 34 atomic: true, 35 selfClosing: true, 36 attrs: { 37 type: { 38 enum: ['capsule', 'circle', 'text', 'arc', 'download'], 39 }, 40 value: {}, 41 icon: {}, 42 waiting: { 43 enum: ['false', 'true'], 44 }, 45 placement: { 46 def: 'end', 47 enum: ['end', 'start', 'top', 'bottom'], 48 }, 49 }, 50 }, 51 'text': { 52 textContent: true, 53 children: ['a', 'span', 'tspan', 'textpath', 'animate', 'animatetransform'], 54 attrs: { 55 value: {}, 56 fill: {}, 57 fillOpacity: {}, 58 stroke: {}, 59 strokeOpacity: {}, 60 strokeWidth: {}, 61 transform: {}, 62 opacity: {}, 63 x: {}, 64 y: {}, 65 id: {}, 66 dx: {}, 67 dy: {}, 68 rotate: {}, 69 fontSize: {}, 70 }, 71 }, 72 'span': { 73 textContent: true, 74 children: ['span'], 75 excludeRoot: true, 76 parents: ['text', 'span'], 77 uevents: ['click'], 78 uattrs: { 79 id: {}, 80 style: {}, 81 class: {}, 82 ref: {}, 83 data: {}, 84 springeffect: { 85 enum: ['spring-small', 'spring-medium', 'spring-large'], 86 }, 87 dir: { 88 enum: ['auto', 'rtl', 'ltr'], 89 }, 90 if: { 91 excludeRoot: true, 92 def: 'false', 93 }, 94 elif: { 95 def: 'false', 96 }, 97 else: { 98 excludeRoot: true, 99 def: 'false', 100 }, 101 for: { 102 excludeRoot: true, 103 }, 104 tid: {}, 105 show: { 106 excludeRoot: true, 107 def: 'true', 108 }, 109 shareid: {}, 110 voicelabel: {}, 111 subscriptlabel: {}, 112 scenelabel: { 113 enum: ['video', 'audio', 'page', 'switch', 'common'], 114 }, 115 subscriptflag: { 116 enum: ['auto', 'on', 'off'], 117 }, 118 accessibilitygroup: { 119 enum: ['false', 'true'], 120 }, 121 accessibilitytext: {}, 122 accessibilitydescription: {}, 123 accessibilityimportance: { 124 enum: ['auto', 'yes', 'no', 'no-hide-descendants'], 125 }, 126 }, 127 }, 128 'richtext': { 129 textContent: true, 130 uevents: ['start', 'complete'], 131 }, 132 'image': { 133 alias: ['img'], 134 events: ['error', 'complete'], 135 atomic: true, 136 selfClosing: true, 137 attrs: { 138 src: { 139 checkPath: true, 140 }, 141 alt: { 142 checkPath: true, 143 }, 144 syncload: { 145 enum: ['true', 'false'], 146 }, 147 }, 148 }, 149 'image-animator': { 150 atomic: true, 151 selfClosing: true, 152 events: ['start', 'pause', 'stop', 'resume'], 153 attrs: { 154 images: { 155 required: true, 156 }, 157 predecode: { 158 def: 0, 159 checkFunc: 'number', 160 }, 161 iteration: {}, 162 reverse: { 163 enum: ['false', 'true'], 164 }, 165 fixedsize: { 166 enum: ['true', 'false'], 167 }, 168 duration: { 169 required: true, 170 }, 171 fillmode: { 172 enum: ['forwards', 'none'], 173 }, 174 }, 175 }, 176 'divider': { 177 atomic: true, 178 selfClosing: true, 179 uattrs: { 180 vertical: { 181 enum: ['false', 'true'], 182 }, 183 id: {}, 184 style: {}, 185 class: {}, 186 ref: {}, 187 data: {}, 188 springeffect: { 189 enum: ['spring-small', 'spring-medium', 'spring-large'], 190 }, 191 dir: { 192 enum: ['auto', 'rtl', 'ltr'], 193 }, 194 if: { 195 excludeRoot: true, 196 def: 'false', 197 }, 198 elif: { 199 def: 'false', 200 }, 201 else: { 202 excludeRoot: true, 203 def: 'false', 204 }, 205 for: { 206 excludeRoot: true, 207 }, 208 tid: {}, 209 show: { 210 excludeRoot: true, 211 def: 'true', 212 }, 213 shareid: {}, 214 data: {}, 215 voicelabel: {}, 216 subscriptlabel: {}, 217 scenelabel: { 218 enum: ['video', 'audio', 'page', 'switch', 'common'], 219 }, 220 subscriptflag: { 221 enum: ['auto', 'on', 'off'], 222 }, 223 accessibilitygroup: { 224 enum: ['false', 'true'], 225 }, 226 accessibilitytext: {}, 227 accessibilitydescription: {}, 228 accessibilityimportance: { 229 enum: ['auto', 'yes', 'no', 'no-hide-descendants'], 230 }, 231 }, 232 uevents: [], 233 }, 234 'menu': { 235 uevents: ['selected', 'cancel'], 236 children: ['option'], 237 uattrs: { 238 target: {}, 239 title: {}, 240 type: { 241 enum: ['click', 'longpress'], 242 }, 243 id: {}, 244 class: {}, 245 style: {}, 246 data: {}, 247 springeffect: { 248 enum: ['spring-small', 'spring-medium', 'spring-large'], 249 }, 250 dir: { 251 enum: ['auto', 'rtl', 'ltr'], 252 }, 253 if: { 254 excludeRoot: true, 255 def: 'false', 256 }, 257 elif: { 258 def: 'false', 259 }, 260 else: { 261 excludeRoot: true, 262 def: 'false', 263 }, 264 for: { 265 excludeRoot: true, 266 }, 267 show: { 268 excludeRoot: true, 269 def: 'true', 270 }, 271 tid: {}, 272 shareid: {}, 273 voicelabel: {}, 274 subscriptlabel: {}, 275 scenelabel: { 276 enum: ['video', 'audio', 'page', 'switch', 'common'], 277 }, 278 subscriptflag: { 279 enum: ['auto', 'on', 'off'], 280 }, 281 accessibilitygroup: { 282 enum: ['false', 'true'], 283 }, 284 accessibilitytext: {}, 285 accessibilitydescription: {}, 286 accessibilityimportance: { 287 enum: ['auto', 'yes', 'no', 'no-hide-descendants'], 288 }, 289 }, 290 }, 291 'navigation-bar': { 292 events: ['backclick', 'startclick', 'endclick'], 293 uevents: [], 294 children: ['navigation-menu', 'select', 'tab-bar'], 295 attrs: { 296 type: { 297 enum: ['normal', 'emphasize'], 298 }, 299 title: { 300 required: true, 301 }, 302 subtitle: {}, 303 header: {}, 304 backenabled: { 305 enum: ['false', 'true'], 306 }, 307 starticon: {}, 308 endicon: {}, 309 logo: {}, 310 }, 311 }, 312 'navigation-menu': { 313 events: ['selected'], 314 uevents: [], 315 children: ['option'], 316 attrs: {}, 317 }, 318 'calendar': { 319 atomic: true, 320 selfClosing: true, 321 events: ['selectedchange'], 322 uevents: [], 323 attrs: { 324 date: { 325 checkFunc: 'date', 326 }, 327 dateadapter: {}, 328 startdayofweek: {}, 329 workdays: {}, 330 holidays: {}, 331 }, 332 }, 333 'chart': { 334 atomic: true, 335 selfClosing: true, 336 attrs: { 337 type: { 338 enum: ['line', 'bar', 'gauge', 'progress', 'loading', 'rainbow'], 339 }, 340 percent: { 341 def: 0, 342 checkFunc: 'number', 343 }, 344 options: {}, 345 datasets: {}, 346 segments: {}, 347 effects: { 348 enum: ['true', 'false'], 349 }, 350 animationduration: { 351 def: 3000, 352 checkFunc: 'number', 353 }, 354 }, 355 }, 356 'dialog': { 357 uevents: ['cancel'], 358 uattrs: { 359 id: {}, 360 style: {}, 361 class: {}, 362 ref: {}, 363 disabled: { 364 enum: ['false', 'true'], 365 }, 366 data: {}, 367 dir: { 368 enum: ['auto', 'rtl', 'ltr'], 369 }, 370 if: { 371 excludeRoot: true, 372 def: 'false', 373 }, 374 elif: { 375 def: 'false', 376 }, 377 else: { 378 excludeRoot: true, 379 def: 'false', 380 }, 381 for: { 382 excludeRoot: true, 383 }, 384 tid: {}, 385 show: { 386 excludeRoot: true, 387 def: 'true', 388 }, 389 shareid: {}, 390 voicelabel: {}, 391 subscriptlabel: {}, 392 scenelabel: { 393 enum: ['video', 'audio', 'page', 'switch', 'common'], 394 }, 395 subscriptflag: { 396 enum: ['auto', 'on', 'off'], 397 }, 398 accessibilitygroup: { 399 enum: ['false', 'true'], 400 }, 401 accessibilitytext: {}, 402 accessibilitydescription: {}, 403 accessibilityimportance: { 404 enum: ['auto', 'yes', 'no', 'no-hide-descendants'], 405 }, 406 }, 407 }, 408 'slider': { 409 atomic: true, 410 selfClosing: true, 411 events: ['change'], 412 attrs: { 413 min: { 414 def: 0, 415 checkFunc: 'number', 416 }, 417 max: { 418 def: 100, 419 checkFunc: 'number', 420 }, 421 step: { 422 def: 1, 423 checkFunc: 'number', 424 }, 425 value: { 426 def: 0, 427 checkFunc: 'number', 428 }, 429 type: { 430 def: 'continuous', 431 enum: ['continuous', 'intermittent'], 432 }, 433 mode: { 434 def: 'outset', 435 enum: ['outset', 'inset'], 436 }, 437 minicon: {}, 438 maxicon: {}, 439 showsteps: { 440 enum: ['false', 'true'], 441 }, 442 showtips: { 443 enum: ['false', 'true'], 444 }, 445 }, 446 }, 447 'svg': { 448 children: ['svg', 'circle', 'ellipse', 'line', 'path', 'polygon', 'polyline', 'rect', 'text', 'animate', 'animatetransform', 'animatemotion'], 449 attrs: { 450 fill: {}, 451 fillOpacity: {}, 452 fillRule: { 453 enum: ['nonzero', 'evenodd'], 454 }, 455 opacity: {}, 456 stroke: {}, 457 strokeDasharray: {}, 458 strokeDashoffset: {}, 459 strokeLinejoin: { 460 enum: ['bevel', 'miter', 'round'], 461 }, 462 strokeLinecap: { 463 enum: ['butt', 'round', 'square'], 464 }, 465 strokeMiterlimit: {}, 466 strokeOpacity: {}, 467 strokeWidth: {}, 468 transform: {}, 469 fontSize: {}, 470 width: {}, 471 height: {}, 472 x: {}, 473 y: {}, 474 viewbox: {}, 475 }, 476 }, 477 'tspan': { 478 uattrs: { 479 fill: {}, 480 fillOpacity: {}, 481 stroke: {}, 482 strokeOpacity: {}, 483 strokeWidth: {}, 484 x: {}, 485 y: {}, 486 id: {}, 487 dx: {}, 488 dy: {}, 489 rotate: {}, 490 transform: {}, 491 fontSize: {}, 492 }, 493 }, 494 'textpath': { 495 children: ['tspan', 'textpath', 'animate', 'animatetransform'], 496 attrs: { 497 fill: {}, 498 fillOpacity: {}, 499 stroke: {}, 500 strokeOpacity: {}, 501 strokeWidth: {}, 502 startoffset: {}, 503 id: {}, 504 fontSize: {}, 505 path: {}, 506 startOffset: {}, 507 }, 508 }, 509 'rect': { 510 children: ['animate', 'animatetransform', 'animatemotion'], 511 attrs: { 512 fill: {}, 513 fillOpacity: {}, 514 fillRule: { 515 enum: ['nonzero', 'evenodd'], 516 }, 517 opacity: {}, 518 stroke: {}, 519 strokeDasharray: {}, 520 strokeDashoffset: {}, 521 strokeLinejoin: { 522 enum: ['bevel', 'miter', 'round'], 523 }, 524 strokeLinecap: { 525 enum: ['butt', 'round', 'square'], 526 }, 527 strokeMiterlimit: {}, 528 strokeOpacity: {}, 529 strokeWidth: {}, 530 transform: {}, 531 width: {}, 532 height: {}, 533 x: {}, 534 y: {}, 535 rx: {}, 536 ry: {}, 537 }, 538 }, 539 'circle': { 540 children: ['animate', 'animatetransform', 'animatemotion'], 541 uattrs: { 542 fill: {}, 543 fillOpacity: {}, 544 fillRule: { 545 enum: ['nonzero', 'evenodd'], 546 }, 547 opacity: {}, 548 stroke: {}, 549 strokeDasharray: {}, 550 strokeDashoffset: {}, 551 strokeLinejoin: { 552 enum: ['bevel', 'miter', 'round'], 553 }, 554 strokeLinecap: { 555 enum: ['butt', 'round', 'square'], 556 }, 557 strokeMiterlimit: {}, 558 strokeOpacity: {}, 559 strokeWidth: {}, 560 transform: {}, 561 cx: {}, 562 cy: {}, 563 r: {}, 564 }, 565 }, 566 'ellipse': { 567 children: ['animate', 'animatetransform', 'animatemotion'], 568 uattrs: { 569 fill: {}, 570 fillOpacity: {}, 571 fillRule: { 572 enum: ['nonzero', 'evenodd'], 573 }, 574 opacity: {}, 575 stroke: {}, 576 strokeDasharray: {}, 577 strokeDashoffset: {}, 578 strokeLinejoin: { 579 enum: ['bevel', 'miter', 'round'], 580 }, 581 strokeLinecap: { 582 enum: ['butt', 'round', 'square'], 583 }, 584 strokeMiterlimit: {}, 585 strokeOpacity: {}, 586 strokeWidth: {}, 587 transform: {}, 588 class: {}, 589 cx: {}, 590 cy: {}, 591 rx: {}, 592 ry: {}, 593 }, 594 }, 595 'path': { 596 children: ['animate', 'animatetransform', 'animatemotion'], 597 uattrs: { 598 fill: {}, 599 fillOpacity: {}, 600 fillRule: { 601 enum: ['nonzero', 'evenodd'], 602 }, 603 opacity: {}, 604 stroke: {}, 605 strokeDasharray: {}, 606 strokeDashoffset: {}, 607 strokeLinejoin: { 608 enum: ['bevel', 'miter', 'round'], 609 }, 610 strokeLinecap: { 611 enum: ['butt', 'round', 'square'], 612 }, 613 strokeMiterlimit: {}, 614 id: {}, 615 strokeOpacity: {}, 616 strokeWidth: {}, 617 transform: {}, 618 d: {}, 619 }, 620 }, 621 'line': { 622 children: ['animate', 'animatetransform', 'animatemotion'], 623 uattrs: { 624 fill: {}, 625 fillOpacity: {}, 626 fillRule: { 627 enum: ['nonzero', 'evenodd'], 628 }, 629 opacity: {}, 630 stroke: {}, 631 strokeDasharray: {}, 632 strokeDashoffset: {}, 633 strokeLinejoin: { 634 enum: ['bevel', 'miter', 'round'], 635 }, 636 strokeLinecap: { 637 enum: ['butt', 'round', 'square'], 638 }, 639 strokeMiterlimit: {}, 640 strokeOpacity: {}, 641 strokeWidth: {}, 642 transform: {}, 643 class: {}, 644 x1: {}, 645 y1: {}, 646 x2: {}, 647 y2: {}, 648 }, 649 }, 650 'polyline': { 651 children: ['animate', 'animatetransform', 'animatemotion'], 652 uattrs: { 653 fill: {}, 654 fillOpacity: {}, 655 fillRule: { 656 enum: ['nonzero', 'evenodd'], 657 }, 658 opacity: {}, 659 stroke: {}, 660 strokeDasharray: {}, 661 strokeDashoffset: {}, 662 strokeLinejoin: { 663 enum: ['bevel', 'miter', 'round'], 664 }, 665 strokeLinecap: { 666 enum: ['butt', 'round', 'square'], 667 }, 668 strokeMiterlimit: {}, 669 strokeOpacity: {}, 670 strokeWidth: {}, 671 transform: {}, 672 points: {}, 673 }, 674 }, 675 'polygon': { 676 children: ['animate', 'animatetransform', 'animatemotion'], 677 uattrs: { 678 fill: {}, 679 fillOpacity: { 680 def: 1, 681 }, 682 fillRule: { 683 enum: ['nonzero', 'evenodd'], 684 }, 685 opacity: { 686 def: 1, 687 }, 688 stroke: {}, 689 strokeDasharray: {}, 690 strokeDashoffset: {}, 691 strokeLinejoin: { 692 enum: ['bevel', 'miter', 'round'], 693 }, 694 strokeLinecap: { 695 enum: ['butt', 'round', 'square'], 696 }, 697 strokeMiterlimit: { 698 def: 4, 699 }, 700 strokeOpacity: { 701 def: 1, 702 }, 703 strokeWidth: {}, 704 class: {}, 705 transform: {}, 706 points: {}, 707 }, 708 }, 709 'animate': { 710 atomic: true, 711 uattrs: { 712 id: {}, 713 begin: { 714 def: 0, 715 checkFunc: 'time', 716 }, 717 dur: { 718 def: 0, 719 checkFunc: 'time', 720 }, 721 end: { 722 def: 0, 723 checkFunc: 'time', 724 }, 725 fill: { 726 enum: ['freeze', 'remove'], 727 }, 728 keytimes: {}, 729 keysplines: {}, 730 repeatcount: {}, 731 calcmode: {}, 732 attributename: {}, 733 from: {}, 734 to: {}, 735 values: {}, 736 }, 737 }, 738 'animatemotion': { 739 atomic: true, 740 uattrs: { 741 begin: { 742 def: 0, 743 checkFunc: 'time', 744 }, 745 dur: { 746 def: 0, 747 checkFunc: 'time', 748 }, 749 end: { 750 def: 0, 751 checkFunc: 'time', 752 }, 753 repeatcount: {}, 754 fill: { 755 enum: ['freeze', 'remove'], 756 }, 757 calcmode: { 758 enum: ['discrete', 'linear', 'paced', 'spline'], 759 }, 760 keytimes: {}, 761 keysplines: {}, 762 from: {}, 763 to: {}, 764 keypoints: {}, 765 path: {}, 766 rotate: {}, 767 }, 768 }, 769 'animatetransform': { 770 atomic: true, 771 uattrs: { 772 begin: { 773 def: 0, 774 checkFunc: 'time', 775 }, 776 dur: { 777 def: 0, 778 checkFunc: 'time', 779 }, 780 end: { 781 def: 0, 782 checkFunc: 'time', 783 }, 784 repeatcount: { 785 def: 1, 786 checkFunc: ['number','indefinite'], 787 }, 788 fill: { 789 enum: ['freeze', 'remove'], 790 }, 791 calcmode: {}, 792 from: {}, 793 to: {}, 794 values: {}, 795 attributetype: {}, 796 attributename: {}, 797 type: {}, 798 }, 799 }, 800 'list': { 801 events: ['scroll', 'scrollbottom', 'scrolltop', 'scrollend', 'scrolltouchup', 'requestitem', 'indexerchange', 'rotate'], 802 children: ['list-item', 'list-item-group'], 803 attrs: { 804 scrollpage: { 805 enum: ['false', 'true'], 806 }, 807 cachedcount: { 808 def: 0, 809 checkFunc: 'number', 810 }, 811 scrollbar: { 812 enum: ['off', 'auto', 'on'], 813 }, 814 scrolleffect: { 815 enum: ['spring', 'fade', 'no'], 816 }, 817 indexer: { 818 enum: ['false', 'true'], 819 }, 820 shapemode: { 821 enum: ['default', 'rect', 'round'], 822 }, 823 itemscale: { 824 enum: ['true', 'false'], 825 }, 826 itemcenter: { 827 enum: ['false', 'true'], 828 }, 829 updateeffect: { 830 enum: ['false', 'true'], 831 }, 832 scrollvibrate: { 833 enum: ['true', 'false'], 834 }, 835 initialindex: { 836 def: 0, 837 checkFunc: 'number', 838 }, 839 initialoffset: { 840 def: 0, 841 checkFunc: 'length', 842 }, 843 indexercircle: { 844 enum: ['false', 'true'], 845 }, 846 indexermulti: { 847 enum: ['false', 'true'], 848 }, 849 indexerbubble: { 850 enum: ['true', 'false'], 851 }, 852 divider: { 853 enum: ['false', 'true'], 854 }, 855 chainanimation: { 856 enum: ['false', 'true'], 857 }, 858 selected: {}, 859 }, 860 }, 861 'list-item': { 862 excludeRoot: true, 863 parents: ['list', 'list-item-group'], 864 events: ['sticky'], 865 attrs: { 866 type: {}, 867 card: { 868 enum: ['true', 'false'], 869 }, 870 primary: { 871 enum: ['false', 'true'], 872 }, 873 section: {}, 874 sticky: { 875 enum: ['none', 'normal', 'opacity'], 876 }, 877 stickyradius: { 878 checkFunc: 'length', 879 }, 880 clickeffect: { 881 enum: ['true', 'false'], 882 }, 883 }, 884 }, 885 'list-item-group': { 886 excludeRoot: true, 887 parents: ['list'], 888 children: ['list-item'], 889 events: ['groupclick', 'groupcollapse', 'groupexpand'], 890 attrs: { 891 type: {}, 892 }, 893 }, 894 'block': { 895 excludeRoot: true, 896 uattrs: { 897 for: {}, 898 tid: {}, 899 if: { 900 def: 'false', 901 }, 902 elif: { 903 def: 'false', 904 }, 905 else: { 906 def: 'false', 907 }, 908 }, 909 }, 910 'slot': { 911 excludeRoot: true, 912 uattrs: { 913 name: {}, 914 content: {}, 915 }, 916 }, 917 'input': { 918 atomic: true, 919 selfClosing: true, 920 events: ['change', 'enterkeyclick', 'translate', 'share', 'search', 'optionselect', 'selectchange'], 921 attrs: { 922 checked: { 923 enum: ['false', 'true'], 924 }, 925 showcounter: { 926 enum: ['false', 'true'], 927 }, 928 type: { 929 enum: ['text', 'button', 'checkbox', 'email', 'date', 'time', 'number', 'password', 'radio', 'submit', 'reset'], 930 }, 931 menuoptions: {}, 932 name: {}, 933 value: {}, 934 placeholder: {}, 935 enterkeytype: { 936 enum: ['default', 'next', 'go', 'done', 'send', 'search'], 937 }, 938 maxlength: { 939 checkFunc: 'number', 940 }, 941 headericon: {}, 942 selectedstart: { 943 def: -1, 944 checkFunc: 'number', 945 }, 946 selectedend: { 947 def: -1, 948 checkFunc: 'number', 949 }, 950 autofocus: { 951 enum: ['false', 'true'], 952 }, 953 softkeyboardenabled: { 954 enum: ['true', 'false'], 955 }, 956 showpasswordicon: { 957 enum: ['true', 'false'], 958 }, 959 }, 960 }, 961 'marquee': { 962 atomic: true, 963 selfClosing: true, 964 events: ['bounce', 'finish', 'start'], 965 attrs: { 966 scrollamount: { 967 def: 6, 968 checkFunc: 'number', 969 }, 970 loop: { 971 def: -1, 972 checkFunc: 'number', 973 }, 974 direction: { 975 enum: ['left', 'right'], 976 }, 977 }, 978 }, 979 'refresh': { 980 uevents: ['refresh', 'pulldown'], 981 attrs: { 982 refreshing: { 983 enum: ['false', 'true'], 984 }, 985 offset: { 986 checkFunc: 'length', 987 }, 988 type: { 989 enum: ['auto', 'pulldown'], 990 }, 991 lasttime: { 992 enum: ['false', 'true'], 993 }, 994 timeoffset: { 995 checkFunc: 'length', 996 }, 997 friction: { 998 checkFunc: 'number', 999 }, 1000 }, 1001 }, 1002 'form': { 1003 events: ['submit', 'reset'], 1004 }, 1005 'swiper': { 1006 unSupportedChildren: ['list'], 1007 events: ['change', 'rotation'], 1008 attrs: { 1009 autoplay: { 1010 enum: ['false', 'true'], 1011 }, 1012 indicator: { 1013 enum: ['true', 'false'], 1014 }, 1015 indicatormask: { 1016 enum: ['false', 'true'], 1017 }, 1018 indicatordisabled: { 1019 enum: ['false', 'true'], 1020 }, 1021 index: { 1022 checkFunc: 'number', 1023 }, 1024 interval: { 1025 checkFunc: 'number', 1026 }, 1027 loop: { 1028 enum: ['true', 'false'], 1029 }, 1030 duration: { 1031 checkFunc: 'number', 1032 }, 1033 vertical: { 1034 enum: ['false', 'true'], 1035 }, 1036 digital: { 1037 enum: ['false', 'true'], 1038 }, 1039 }, 1040 }, 1041 'search': { 1042 events: ['change', 'submit', 'translate', 'share', 'search', 'optionselect', 'selectchange'], 1043 atomic: true, 1044 selfClosing: true, 1045 attrs: { 1046 icon: {}, 1047 hint: {}, 1048 value: {}, 1049 searchbutton: {}, 1050 menuoptions: {}, 1051 selectedstart: { 1052 checkFunc: 'number', 1053 }, 1054 selectedend: { 1055 checkFunc: 'number', 1056 }, 1057 autofocus: { 1058 enum: ['false', 'true'], 1059 }, 1060 softkeyboardenabled: { 1061 enum: ['false', 'true'], 1062 }, 1063 }, 1064 }, 1065 'progress': { 1066 atomic: true, 1067 selfClosing: true, 1068 events: [], 1069 attrs: { 1070 type: { 1071 enum: ['horizontal', 'circular', 'ring', 'scale-ring', 'arc', 'eclipse'], 1072 }, 1073 percent: { 1074 def: 0, 1075 checkFunc: 'number', 1076 }, 1077 secondarypercent: { 1078 def: 0, 1079 checkFunc: 'number', 1080 }, 1081 clockwise: { 1082 enum: ['true', 'false'], 1083 }, 1084 }, 1085 }, 1086 'picker': { 1087 events: ['change', 'columnchange', 'cancel'], 1088 atomic: true, 1089 selfClosing: true, 1090 uevents: ['focus', 'blur', 'longpress', 'key', 'swipe', 'accessibility', 'touchstart', 1091 'touchmove', 'touchcancel', 'touchend'], 1092 attrs: { 1093 type: { 1094 enum: ['text', 'date', 'time', 'datetime', 'multi-text'], 1095 }, 1096 start: { 1097 checkFunc: 'date', 1098 }, 1099 end: { 1100 checkFunc: 'date', 1101 }, 1102 range: {}, 1103 selected: {}, 1104 value: {}, 1105 containsecond: { 1106 enum: ['false', 'true'], 1107 }, 1108 columns: { 1109 checkFunc: 'number', 1110 }, 1111 lunarswitch: { 1112 enum: ['false', 'true'], 1113 }, 1114 hours: { 1115 enum: ['24', '12'], 1116 }, 1117 lunar: { 1118 enum: ['false', 'true'], 1119 }, 1120 }, 1121 }, 1122 'picker-view': { 1123 atomic: true, 1124 selfClosing: true, 1125 uevents: ['change', 'columnchange'], 1126 attrs: { 1127 type: { 1128 enum: ['text', 'time', 'date', 'datetime', 'multi-text'], 1129 }, 1130 range: {}, 1131 selected: {}, 1132 indicatorprefix: {}, 1133 indicatorsuffix: {}, 1134 containsecond: { 1135 enum: ['false', 'true'], 1136 }, 1137 start: { 1138 checkFunc: 'date', 1139 }, 1140 end: { 1141 checkFunc: 'date', 1142 }, 1143 lunarswitch: { 1144 enum: ['false', 'true'], 1145 }, 1146 columns: { 1147 checkFunc: 'number', 1148 }, 1149 hours: { 1150 enum: ['24', '12'], 1151 }, 1152 lunar: { 1153 enum: ['false', 'true'], 1154 }, 1155 }, 1156 }, 1157 'qrcode': { 1158 atomic: true, 1159 events: [], 1160 selfClosing: true, 1161 attrs: { 1162 value: { 1163 required: true, 1164 }, 1165 type: { 1166 enum: ['rect', 'circle'], 1167 }, 1168 }, 1169 }, 1170 'switch': { 1171 atomic: true, 1172 events: ['change'], 1173 selfClosing: true, 1174 attrs: { 1175 checked: { 1176 enum: ['false', 'true'], 1177 }, 1178 showtext: { 1179 enum: ['false', 'true'], 1180 }, 1181 texton: {}, 1182 textoff: {}, 1183 }, 1184 }, 1185 'label': { 1186 textContent: true, 1187 atomic: true, 1188 selfClosing: true, 1189 attrs: { 1190 target: {}, 1191 }, 1192 uevents: [], 1193 }, 1194 'textarea': { 1195 atomic: true, 1196 selfClosing: true, 1197 textContent: true, 1198 events: ['change', 'translate', 'share', 'search', 'optionselect', 'selectchange'], 1199 attrs: { 1200 placeholder: {}, 1201 menuoptions: {}, 1202 value: {}, 1203 maxlength: { 1204 checkFunc: 'number', 1205 }, 1206 headericon: {}, 1207 extend: { 1208 enum: ['false', 'true'], 1209 }, 1210 showcounter: { 1211 enum: ['false', 'true'], 1212 }, 1213 selectedstart: { 1214 def: -1, 1215 checkFunc: 'number', 1216 }, 1217 selectedend: { 1218 def: -1, 1219 checkFunc: 'number', 1220 }, 1221 autofocus: { 1222 enum: ['false', 'true'], 1223 }, 1224 softkeyboardenabled: { 1225 enum: ['true', 'false'], 1226 }, 1227 }, 1228 }, 1229 'video': { 1230 atomic: true, 1231 selfClosing: true, 1232 events: ['start', 'pause', 'finish', 'stop', 'error', 'prepared', 'fullscreenchange', 'timeupdate', 'seeked', 'seeking'], 1233 attrs: { 1234 autoplay: { 1235 enum: ['false', 'true'], 1236 }, 1237 poster: { 1238 checkPath: true, 1239 }, 1240 src: { 1241 checkPath: true, 1242 }, 1243 muted: { 1244 enum: ['false', 'true'], 1245 }, 1246 controls: { 1247 enum: ['true', 'false'], 1248 }, 1249 loop: { 1250 enum: ['false', 'true'], 1251 }, 1252 starttime: { 1253 def: 0, 1254 checkFunc: 'number', 1255 }, 1256 direction: { 1257 enum: ['auto', 'vertical', 'horizontal', 'adapt'], 1258 }, 1259 speed: { 1260 def: 1.0, 1261 checkFunc: 'number', 1262 } 1263 }, 1264 }, 1265 'audio': { 1266 atomic: true, 1267 selfClosing: true, 1268 attrs: { 1269 streamType: { 1270 enum: ['music', 'voicecall'], 1271 }, 1272 }, 1273 }, 1274 'camera': { 1275 atomic: true, 1276 selfClosing: true, 1277 events: ['error'], 1278 attrs: { 1279 deviceposition: { 1280 enum: ['back', 'front'], 1281 }, 1282 flash: { 1283 enum: ['auto', 'on', 'off', 'torch'], 1284 }, 1285 }, 1286 }, 1287 'canvas': { 1288 atomic: true, 1289 selfClosing: true, 1290 events: [], 1291 attrs: {}, 1292 }, 1293 'stack': { 1294 events: [], 1295 attrs: {}, 1296 }, 1297 'tabs': { 1298 events: ['change'], 1299 children: ['tab-content', 'tab-bar'], 1300 attrs: { 1301 index: { 1302 def: 0, 1303 checkFunc: 'number', 1304 }, 1305 vertical: { 1306 enum: ['false', 'true'], 1307 }, 1308 }, 1309 }, 1310 'tab-content': { 1311 parents: ['tabs'], 1312 attrs: { 1313 scrollable: { 1314 enum: ['true', 'false'], 1315 }, 1316 }, 1317 }, 1318 'tab-bar': { 1319 parents: ['tabs', 'navigation-bar'], 1320 attrs: { 1321 mode: { 1322 enum: ['fixed', 'scrollable'], 1323 }, 1324 }, 1325 }, 1326 'popup': { 1327 events: ['visibilitychange'], 1328 attrs: { 1329 target: { 1330 required: true, 1331 }, 1332 placement: { 1333 enum: ['bottom', 'left', 'right', 'top', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'], 1334 }, 1335 keepalive: { 1336 enum: ['false', 'true'], 1337 }, 1338 clickable: { 1339 enum: ['true', 'false'], 1340 }, 1341 arrowoffset: { 1342 checkFunc: 'length', 1343 }, 1344 }, 1345 }, 1346 'rating': { 1347 atomic: true, 1348 selfClosing: true, 1349 events: ['change'], 1350 attrs: { 1351 numstars: { 1352 checkFunc: 'number', 1353 }, 1354 rating: { 1355 checkFunc: 'number', 1356 }, 1357 stepsize: { 1358 checkFunc: 'number', 1359 }, 1360 indicator: { 1361 enum: ['false', 'true'], 1362 }, 1363 }, 1364 uevents: ['focus', 'blur', 'key', 'swipe', 'accessibility', 'touchstart', 'touchmove', 'touchcancel', 'touchend'], 1365 }, 1366 'select': { 1367 textContent: true, 1368 events: ['change'], 1369 children: ['option'], 1370 uevents: ['focus', 'blur', 'longpress', 'key', 'swipe', 'accessibility', 'touchstart', 1371 'touchmove', 'touchcancel', 'touchend'], 1372 }, 1373 'option': { 1374 atomic: true, 1375 selfClosing: true, 1376 excludeRoot: true, 1377 valueContent: true, 1378 parents: ['select', 'menu', 'navigation-menu'], 1379 uevents: [], 1380 attrs: { 1381 selected: { 1382 enum: ['false', 'true'], 1383 }, 1384 value: { 1385 required: true, 1386 }, 1387 icon: {}, 1388 action: { 1389 enum: ['popup', 'show'], 1390 }, 1391 }, 1392 }, 1393 'badge': { 1394 attrs: { 1395 placement: { 1396 def: 'rightTop', 1397 enum: ['right', 'rightTop', 'left'], 1398 }, 1399 count: { 1400 def: 0, 1401 checkFunc: 'number', 1402 }, 1403 visible: { 1404 enum: ['false', 'true'], 1405 }, 1406 maxcount: { 1407 def: 99, 1408 checkFunc: 'number', 1409 }, 1410 config: {}, 1411 label: {}, 1412 }, 1413 }, 1414 'stepper': { 1415 events: ['finish', 'skip', 'change', 'next', 'back'], 1416 children: ['stepper-item'], 1417 attrs: { 1418 index: { 1419 checkFunc: 'number', 1420 }, 1421 }, 1422 }, 1423 'stepper-item': { 1424 excludeRoot: true, 1425 parents: ['stepper'], 1426 events: ['appear', 'disappear'], 1427 attrs: { 1428 label: {}, 1429 }, 1430 }, 1431 'panel': { 1432 uevents: ['sizechange'], 1433 uattrs: { 1434 type: { 1435 enum: ['minibar', 'foldable', 'temporary'], 1436 }, 1437 mode: { 1438 enum: ['mini', 'half', 'full'], 1439 }, 1440 dragbar: { 1441 enum: ['true', 'false'], 1442 }, 1443 fullheight: { 1444 checkFunc: 'length', 1445 }, 1446 halfheight: { 1447 checkFunc: 'length', 1448 }, 1449 miniheight: { 1450 checkFunc: 'length', 1451 }, 1452 id: {}, 1453 class: {}, 1454 style: {}, 1455 ref: {}, 1456 data: {}, 1457 tid: {}, 1458 shareid: {}, 1459 voicelabel: {}, 1460 subscriptlabel: {}, 1461 scenelabel: { 1462 enum: ['video', 'audio', 'page', 'switch', 'common'], 1463 }, 1464 subscriptflag: { 1465 enum: ['auto', 'on', 'off'], 1466 }, 1467 accessibilitygroup: { 1468 enum: ['false', 'true'], 1469 }, 1470 accessibilitytext: {}, 1471 accessibilitydescription: {}, 1472 accessibilityimportance: { 1473 enum: ['auto', 'yes', 'no', 'no-hide-descendants'], 1474 }, 1475 }, 1476 }, 1477 'toolbar': { 1478 uevents: [], 1479 children: ['toolbar-item'], 1480 attrs: {}, 1481 }, 1482 'toolbar-item': { 1483 excludeRoot: true, 1484 parents: ['toolbar'], 1485 events: [], 1486 attrs: { 1487 value: {}, 1488 icon: {}, 1489 }, 1490 }, 1491 'piece': { 1492 excludeRoot: true, 1493 events: ['close'], 1494 attrs: { 1495 content: {}, 1496 icon: {}, 1497 closable: { 1498 enum: ['false', 'true'], 1499 }, 1500 }, 1501 }, 1502 'toggle': { 1503 excludeRoot: true, 1504 events: ['change'], 1505 attrs: { 1506 value: {}, 1507 checked: { 1508 enum: ['false', 'true'], 1509 }, 1510 }, 1511 }, 1512 'grid-container': { 1513 excludeRoot: true, 1514 children: ['grid-row'], 1515 attrs: { 1516 columns: {}, 1517 sizetype: {}, 1518 gutter: { 1519 checkFunc: 'length', 1520 }, 1521 gridtemplate: { 1522 enum: ['default', 'grid'], 1523 }, 1524 }, 1525 }, 1526 'grid-row': { 1527 excludeRoot: true, 1528 children: ['grid-col'], 1529 attrs: {}, 1530 }, 1531 'grid-col': { 1532 excludeRoot: true, 1533 attrs: { 1534 xs: {}, 1535 sm: {}, 1536 md: {}, 1537 lg: {}, 1538 span: { 1539 checkFunc: 'number', 1540 }, 1541 offset: { 1542 checkFunc: 'number', 1543 }, 1544 }, 1545 }, 1546 'xcomponent': { 1547 atomic: true, 1548 selfClosing: true, 1549 uevents: ['load', 'destroy'], 1550 uattrs: { 1551 id: { 1552 required: true, 1553 }, 1554 type: { 1555 required: true, 1556 }, 1557 libraryname: {}, 1558 ref: {}, 1559 }, 1560 }, 1561 'web': { 1562 atomic: true, 1563 selfClosing: true, 1564 uattrs: { 1565 src: { 1566 checkPath: true, 1567 }, 1568 id: {}, 1569 }, 1570 uevents: ['pagestart', 'pagefinish', 'error', 'message'], 1571 }, 1572}; 1573const richCommonTag = { 1574 events: ['click', 'dragstart', 'drag', 'dragend', 'dragenter', 1575 'dragover', 'dragleave', 'drop', 'doubleclick', 1576 'focus', 'blur', 'doubleclick', 'longpress', 1577 'pinchstart', 'pinchupdate', 'pinchend', 'pinchcancel', 1578 'touchstart', 'touchmove', 'touchcancel', 'touchend', 1579 'swipe', 'key', 'accessibility'], 1580 attrs: { 1581 id: {}, 1582 style: {}, 1583 class: {}, 1584 ref: {}, 1585 disabled: { 1586 enum: ['false', 'true'], 1587 }, 1588 focusable: { 1589 enum: ['false', 'true'], 1590 }, 1591 data: {}, 1592 springeffect: { 1593 enum: ['spring-small', 'spring-medium', 'spring-large'], 1594 }, 1595 dir: { 1596 enum: ['auto', 'rtl', 'ltr'], 1597 }, 1598 if: { 1599 excludeRoot: true, 1600 def: 'false', 1601 }, 1602 elif: { 1603 def: 'false', 1604 }, 1605 else: { 1606 excludeRoot: true, 1607 def: 'false', 1608 }, 1609 for: { 1610 excludeRoot: true, 1611 }, 1612 tid: {}, 1613 show: { 1614 excludeRoot: true, 1615 def: 'true', 1616 }, 1617 shareid: {}, 1618 voicelabel: {}, 1619 subscriptlabel: {}, 1620 scenelabel: { 1621 enum: ['video', 'audio', 'page', 'switch', 'common'], 1622 }, 1623 subscriptflag: { 1624 enum: ['auto', 'on', 'off'], 1625 }, 1626 accessibilitygroup: { 1627 enum: ['false', 'true'], 1628 }, 1629 accessibilitytext: {}, 1630 accessibilitydescription: {}, 1631 accessibilityimportance: { 1632 enum: ['auto', 'yes', 'no', 'no-hide-descendants'], 1633 }, 1634 }, 1635 children: ['block', 'slot'], 1636 parents: ['block'], 1637}; 1638module.exports = { 1639 richCommonTag: richCommonTag, 1640 richNativeTag: richNativeTag, 1641}; 1642