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 atomic: true, 912 selfClosing: true, 913 excludeRoot: true, 914 uattrs: { 915 content: {}, 916 }, 917 }, 918 'input': { 919 atomic: true, 920 selfClosing: true, 921 events: ['change', 'enterkeyclick', 'translate', 'share', 'search', 'optionselect', 'selectchange'], 922 attrs: { 923 checked: { 924 enum: ['false', 'true'], 925 }, 926 showcounter: { 927 enum: ['false', 'true'], 928 }, 929 type: { 930 enum: ['text', 'button', 'checkbox', 'email', 'date', 'time', 'number', 'password', 'radio', 'submit', 'reset'], 931 }, 932 menuoptions: {}, 933 name: {}, 934 value: {}, 935 placeholder: {}, 936 enterkeytype: { 937 enum: ['default', 'next', 'go', 'done', 'send', 'search'], 938 }, 939 maxlength: { 940 checkFunc: 'number', 941 }, 942 headericon: {}, 943 selectedstart: { 944 def: -1, 945 checkFunc: 'number', 946 }, 947 selectedend: { 948 def: -1, 949 checkFunc: 'number', 950 }, 951 autofocus: { 952 enum: ['false', 'true'], 953 }, 954 softkeyboardenabled: { 955 enum: ['true', 'false'], 956 }, 957 showpasswordicon: { 958 enum: ['true', 'false'], 959 }, 960 }, 961 }, 962 'marquee': { 963 atomic: true, 964 selfClosing: true, 965 events: ['bounce', 'finish', 'start'], 966 attrs: { 967 scrollamount: { 968 def: 6, 969 checkFunc: 'number', 970 }, 971 loop: { 972 def: -1, 973 checkFunc: 'number', 974 }, 975 direction: { 976 enum: ['left', 'right'], 977 }, 978 }, 979 }, 980 'refresh': { 981 uevents: ['refresh', 'pulldown'], 982 attrs: { 983 refreshing: { 984 enum: ['false', 'true'], 985 }, 986 offset: { 987 checkFunc: 'length', 988 }, 989 type: { 990 enum: ['auto', 'pulldown'], 991 }, 992 lasttime: { 993 enum: ['false', 'true'], 994 }, 995 timeoffset: { 996 checkFunc: 'length', 997 }, 998 friction: { 999 checkFunc: 'number', 1000 }, 1001 }, 1002 }, 1003 'form': { 1004 events: ['submit', 'reset'], 1005 }, 1006 'swiper': { 1007 unSupportedChildren: ['list'], 1008 events: ['change', 'rotation'], 1009 attrs: { 1010 autoplay: { 1011 enum: ['false', 'true'], 1012 }, 1013 indicator: { 1014 enum: ['true', 'false'], 1015 }, 1016 indicatormask: { 1017 enum: ['false', 'true'], 1018 }, 1019 indicatordisabled: { 1020 enum: ['false', 'true'], 1021 }, 1022 index: { 1023 checkFunc: 'number', 1024 }, 1025 interval: { 1026 checkFunc: 'number', 1027 }, 1028 loop: { 1029 enum: ['true', 'false'], 1030 }, 1031 duration: { 1032 checkFunc: 'number', 1033 }, 1034 vertical: { 1035 enum: ['false', 'true'], 1036 }, 1037 digital: { 1038 enum: ['false', 'true'], 1039 }, 1040 }, 1041 }, 1042 'search': { 1043 events: ['change', 'submit', 'translate', 'share', 'search', 'optionselect', 'selectchange'], 1044 atomic: true, 1045 selfClosing: true, 1046 attrs: { 1047 icon: {}, 1048 hint: {}, 1049 value: {}, 1050 searchbutton: {}, 1051 menuoptions: {}, 1052 selectedstart: { 1053 checkFunc: 'number', 1054 }, 1055 selectedend: { 1056 checkFunc: 'number', 1057 }, 1058 autofocus: { 1059 enum: ['false', 'true'], 1060 }, 1061 softkeyboardenabled: { 1062 enum: ['false', 'true'], 1063 }, 1064 }, 1065 }, 1066 'progress': { 1067 atomic: true, 1068 selfClosing: true, 1069 events: [], 1070 attrs: { 1071 type: { 1072 enum: ['horizontal', 'circular', 'ring', 'scale-ring', 'arc', 'eclipse'], 1073 }, 1074 percent: { 1075 def: 0, 1076 checkFunc: 'number', 1077 }, 1078 secondarypercent: { 1079 def: 0, 1080 checkFunc: 'number', 1081 }, 1082 clockwise: { 1083 enum: ['true', 'false'], 1084 }, 1085 }, 1086 }, 1087 'picker': { 1088 events: ['change', 'columnchange', 'cancel'], 1089 atomic: true, 1090 selfClosing: true, 1091 uevents: ['focus', 'blur', 'longpress', 'key', 'swipe', 'accessibility', 'touchstart', 1092 'touchmove', 'touchcancel', 'touchend'], 1093 attrs: { 1094 type: { 1095 enum: ['text', 'date', 'time', 'datetime', 'multi-text'], 1096 }, 1097 start: { 1098 checkFunc: 'date', 1099 }, 1100 end: { 1101 checkFunc: 'date', 1102 }, 1103 range: {}, 1104 selected: {}, 1105 value: {}, 1106 containsecond: { 1107 enum: ['false', 'true'], 1108 }, 1109 columns: { 1110 checkFunc: 'number', 1111 }, 1112 lunarswitch: { 1113 enum: ['false', 'true'], 1114 }, 1115 hours: { 1116 enum: ['24', '12'], 1117 }, 1118 lunar: { 1119 enum: ['false', 'true'], 1120 }, 1121 }, 1122 }, 1123 'picker-view': { 1124 atomic: true, 1125 selfClosing: true, 1126 uevents: ['change', 'columnchange'], 1127 attrs: { 1128 type: { 1129 enum: ['text', 'time', 'date', 'datetime', 'multi-text'], 1130 }, 1131 range: {}, 1132 selected: {}, 1133 indicatorprefix: {}, 1134 indicatorsuffix: {}, 1135 containsecond: { 1136 enum: ['false', 'true'], 1137 }, 1138 start: { 1139 checkFunc: 'date', 1140 }, 1141 end: { 1142 checkFunc: 'date', 1143 }, 1144 lunarswitch: { 1145 enum: ['false', 'true'], 1146 }, 1147 columns: { 1148 checkFunc: 'number', 1149 }, 1150 hours: { 1151 enum: ['24', '12'], 1152 }, 1153 lunar: { 1154 enum: ['false', 'true'], 1155 }, 1156 }, 1157 }, 1158 'qrcode': { 1159 atomic: true, 1160 events: [], 1161 selfClosing: true, 1162 attrs: { 1163 value: { 1164 required: true, 1165 }, 1166 type: { 1167 enum: ['rect', 'circle'], 1168 }, 1169 }, 1170 }, 1171 'switch': { 1172 atomic: true, 1173 events: ['change'], 1174 selfClosing: true, 1175 attrs: { 1176 checked: { 1177 enum: ['false', 'true'], 1178 }, 1179 showtext: { 1180 enum: ['false', 'true'], 1181 }, 1182 texton: {}, 1183 textoff: {}, 1184 }, 1185 }, 1186 'label': { 1187 textContent: true, 1188 atomic: true, 1189 selfClosing: true, 1190 attrs: { 1191 target: {}, 1192 }, 1193 uevents: [], 1194 }, 1195 'textarea': { 1196 atomic: true, 1197 selfClosing: true, 1198 textContent: true, 1199 events: ['change', 'translate', 'share', 'search', 'optionselect', 'selectchange'], 1200 attrs: { 1201 placeholder: {}, 1202 menuoptions: {}, 1203 value: {}, 1204 maxlength: { 1205 checkFunc: 'number', 1206 }, 1207 headericon: {}, 1208 extend: { 1209 enum: ['false', 'true'], 1210 }, 1211 showcounter: { 1212 enum: ['false', 'true'], 1213 }, 1214 selectedstart: { 1215 def: -1, 1216 checkFunc: 'number', 1217 }, 1218 selectedend: { 1219 def: -1, 1220 checkFunc: 'number', 1221 }, 1222 autofocus: { 1223 enum: ['false', 'true'], 1224 }, 1225 softkeyboardenabled: { 1226 enum: ['true', 'false'], 1227 }, 1228 }, 1229 }, 1230 'video': { 1231 atomic: true, 1232 selfClosing: true, 1233 events: ['start', 'pause', 'finish', 'stop', 'error', 'prepared', 'fullscreenchange', 'timeupdate', 'seeked', 'seeking'], 1234 attrs: { 1235 autoplay: { 1236 enum: ['false', 'true'], 1237 }, 1238 poster: { 1239 checkPath: true, 1240 }, 1241 src: { 1242 checkPath: true, 1243 }, 1244 muted: { 1245 enum: ['false', 'true'], 1246 }, 1247 controls: { 1248 enum: ['true', 'false'], 1249 }, 1250 loop: { 1251 enum: ['false', 'true'], 1252 }, 1253 starttime: { 1254 def: 0, 1255 checkFunc: 'number', 1256 }, 1257 direction: { 1258 enum: ['auto', 'vertical', 'horizontal', 'adapt'], 1259 }, 1260 speed: { 1261 def: 1.0, 1262 checkFunc: 'number', 1263 } 1264 }, 1265 }, 1266 'audio': { 1267 atomic: true, 1268 selfClosing: true, 1269 attrs: { 1270 streamType: { 1271 enum: ['music', 'voicecall'], 1272 }, 1273 }, 1274 }, 1275 'camera': { 1276 atomic: true, 1277 selfClosing: true, 1278 events: ['error'], 1279 attrs: { 1280 deviceposition: { 1281 enum: ['back', 'front'], 1282 }, 1283 flash: { 1284 enum: ['auto', 'on', 'off', 'torch'], 1285 }, 1286 }, 1287 }, 1288 'canvas': { 1289 atomic: true, 1290 selfClosing: true, 1291 events: [], 1292 attrs: {}, 1293 }, 1294 'stack': { 1295 events: [], 1296 attrs: {}, 1297 }, 1298 'tabs': { 1299 events: ['change'], 1300 children: ['tab-content', 'tab-bar'], 1301 attrs: { 1302 index: { 1303 def: 0, 1304 checkFunc: 'number', 1305 }, 1306 vertical: { 1307 enum: ['false', 'true'], 1308 }, 1309 }, 1310 }, 1311 'tab-content': { 1312 parents: ['tabs'], 1313 attrs: { 1314 scrollable: { 1315 enum: ['true', 'false'], 1316 }, 1317 }, 1318 }, 1319 'tab-bar': { 1320 parents: ['tabs', 'navigation-bar'], 1321 attrs: { 1322 mode: { 1323 enum: ['fixed', 'scrollable'], 1324 }, 1325 }, 1326 }, 1327 'popup': { 1328 events: ['visibilitychange'], 1329 attrs: { 1330 target: { 1331 required: true, 1332 }, 1333 placement: { 1334 enum: ['bottom', 'left', 'right', 'top', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'], 1335 }, 1336 keepalive: { 1337 enum: ['false', 'true'], 1338 }, 1339 clickable: { 1340 enum: ['true', 'false'], 1341 }, 1342 arrowoffset: { 1343 checkFunc: 'length', 1344 }, 1345 }, 1346 }, 1347 'rating': { 1348 atomic: true, 1349 selfClosing: true, 1350 events: ['change'], 1351 attrs: { 1352 numstars: { 1353 checkFunc: 'number', 1354 }, 1355 rating: { 1356 checkFunc: 'number', 1357 }, 1358 stepsize: { 1359 checkFunc: 'number', 1360 }, 1361 indicator: { 1362 enum: ['false', 'true'], 1363 }, 1364 }, 1365 uevents: ['focus', 'blur', 'key', 'swipe', 'accessibility', 'touchstart', 'touchmove', 'touchcancel', 'touchend'], 1366 }, 1367 'select': { 1368 textContent: true, 1369 events: ['change'], 1370 children: ['option'], 1371 uevents: ['focus', 'blur', 'longpress', 'key', 'swipe', 'accessibility', 'touchstart', 1372 'touchmove', 'touchcancel', 'touchend'], 1373 }, 1374 'option': { 1375 atomic: true, 1376 selfClosing: true, 1377 excludeRoot: true, 1378 valueContent: true, 1379 parents: ['select', 'menu', 'navigation-menu'], 1380 uevents: [], 1381 attrs: { 1382 selected: { 1383 enum: ['false', 'true'], 1384 }, 1385 value: { 1386 required: true, 1387 }, 1388 icon: {}, 1389 action: { 1390 enum: ['popup', 'show'], 1391 }, 1392 }, 1393 }, 1394 'badge': { 1395 attrs: { 1396 placement: { 1397 def: 'rightTop', 1398 enum: ['right', 'rightTop', 'left'], 1399 }, 1400 count: { 1401 def: 0, 1402 checkFunc: 'number', 1403 }, 1404 visible: { 1405 enum: ['false', 'true'], 1406 }, 1407 maxcount: { 1408 def: 99, 1409 checkFunc: 'number', 1410 }, 1411 config: {}, 1412 label: {}, 1413 }, 1414 }, 1415 'stepper': { 1416 events: ['finish', 'skip', 'change', 'next', 'back'], 1417 children: ['stepper-item'], 1418 attrs: { 1419 index: { 1420 checkFunc: 'number', 1421 }, 1422 }, 1423 }, 1424 'stepper-item': { 1425 excludeRoot: true, 1426 parents: ['stepper'], 1427 events: ['appear', 'disappear'], 1428 attrs: { 1429 label: {}, 1430 }, 1431 }, 1432 'panel': { 1433 uevents: ['sizechange'], 1434 uattrs: { 1435 type: { 1436 enum: ['minibar', 'foldable', 'temporary'], 1437 }, 1438 mode: { 1439 enum: ['mini', 'half', 'full'], 1440 }, 1441 dragbar: { 1442 enum: ['true', 'false'], 1443 }, 1444 fullheight: { 1445 checkFunc: 'length', 1446 }, 1447 halfheight: { 1448 checkFunc: 'length', 1449 }, 1450 miniheight: { 1451 checkFunc: 'length', 1452 }, 1453 id: {}, 1454 class: {}, 1455 style: {}, 1456 ref: {}, 1457 data: {}, 1458 tid: {}, 1459 shareid: {}, 1460 voicelabel: {}, 1461 subscriptlabel: {}, 1462 scenelabel: { 1463 enum: ['video', 'audio', 'page', 'switch', 'common'], 1464 }, 1465 subscriptflag: { 1466 enum: ['auto', 'on', 'off'], 1467 }, 1468 accessibilitygroup: { 1469 enum: ['false', 'true'], 1470 }, 1471 accessibilitytext: {}, 1472 accessibilitydescription: {}, 1473 accessibilityimportance: { 1474 enum: ['auto', 'yes', 'no', 'no-hide-descendants'], 1475 }, 1476 }, 1477 }, 1478 'toolbar': { 1479 uevents: [], 1480 children: ['toolbar-item'], 1481 attrs: {}, 1482 }, 1483 'toolbar-item': { 1484 excludeRoot: true, 1485 parents: ['toolbar'], 1486 events: [], 1487 attrs: { 1488 value: {}, 1489 icon: {}, 1490 }, 1491 }, 1492 'piece': { 1493 excludeRoot: true, 1494 events: ['close'], 1495 attrs: { 1496 content: {}, 1497 icon: {}, 1498 closable: { 1499 enum: ['false', 'true'], 1500 }, 1501 }, 1502 }, 1503 'toggle': { 1504 excludeRoot: true, 1505 events: ['change'], 1506 attrs: { 1507 value: {}, 1508 checked: { 1509 enum: ['false', 'true'], 1510 }, 1511 }, 1512 }, 1513 'grid-container': { 1514 excludeRoot: true, 1515 children: ['grid-row'], 1516 attrs: { 1517 columns: {}, 1518 sizetype: {}, 1519 gutter: { 1520 checkFunc: 'length', 1521 }, 1522 gridtemplate: { 1523 enum: ['default', 'grid'], 1524 }, 1525 }, 1526 }, 1527 'grid-row': { 1528 excludeRoot: true, 1529 children: ['grid-col'], 1530 attrs: {}, 1531 }, 1532 'grid-col': { 1533 excludeRoot: true, 1534 attrs: { 1535 xs: {}, 1536 sm: {}, 1537 md: {}, 1538 lg: {}, 1539 span: { 1540 checkFunc: 'number', 1541 }, 1542 offset: { 1543 checkFunc: 'number', 1544 }, 1545 }, 1546 }, 1547 'xcomponent': { 1548 atomic: true, 1549 selfClosing: true, 1550 uevents: ['load', 'destroy'], 1551 uattrs: { 1552 id: { 1553 required: true, 1554 }, 1555 type: { 1556 required: true, 1557 }, 1558 libraryname: {}, 1559 ref: {}, 1560 }, 1561 }, 1562 'web': { 1563 atomic: true, 1564 selfClosing: true, 1565 uattrs: { 1566 src: { 1567 checkPath: true, 1568 }, 1569 id: {}, 1570 }, 1571 uevents: ['pagestart', 'pagefinish', 'error', 'message'], 1572 }, 1573}; 1574const richCommonTag = { 1575 events: ['click', 'dragstart', 'drag', 'dragend', 'dragenter', 1576 'dragover', 'dragleave', 'drop', 'doubleclick', 1577 'focus', 'blur', 'doubleclick', 'longpress', 1578 'pinchstart', 'pinchupdate', 'pinchend', 'pinchcancel', 1579 'touchstart', 'touchmove', 'touchcancel', 'touchend', 1580 'swipe', 'key', 'accessibility'], 1581 attrs: { 1582 id: {}, 1583 style: {}, 1584 class: {}, 1585 ref: {}, 1586 disabled: { 1587 enum: ['false', 'true'], 1588 }, 1589 focusable: { 1590 enum: ['false', 'true'], 1591 }, 1592 data: {}, 1593 springeffect: { 1594 enum: ['spring-small', 'spring-medium', 'spring-large'], 1595 }, 1596 dir: { 1597 enum: ['auto', 'rtl', 'ltr'], 1598 }, 1599 if: { 1600 excludeRoot: true, 1601 def: 'false', 1602 }, 1603 elif: { 1604 def: 'false', 1605 }, 1606 else: { 1607 excludeRoot: true, 1608 def: 'false', 1609 }, 1610 for: { 1611 excludeRoot: true, 1612 }, 1613 tid: {}, 1614 show: { 1615 excludeRoot: true, 1616 def: 'true', 1617 }, 1618 shareid: {}, 1619 voicelabel: {}, 1620 subscriptlabel: {}, 1621 scenelabel: { 1622 enum: ['video', 'audio', 'page', 'switch', 'common'], 1623 }, 1624 subscriptflag: { 1625 enum: ['auto', 'on', 'off'], 1626 }, 1627 accessibilitygroup: { 1628 enum: ['false', 'true'], 1629 }, 1630 accessibilitytext: {}, 1631 accessibilitydescription: {}, 1632 accessibilityimportance: { 1633 enum: ['auto', 'yes', 'no', 'no-hide-descendants'], 1634 }, 1635 }, 1636 children: ['block', 'slot'], 1637 parents: ['block'], 1638}; 1639module.exports = { 1640 richCommonTag: richCommonTag, 1641 richNativeTag: richNativeTag, 1642}; 1643