pixuireactcomponents 1.2.0 → 1.2.2
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/README.md +5 -6
- package/package.json +9 -66
- package/tsconfig.json +27 -13
- package/{src/pixUIReactComponents/ui → ui}/components/slapface/Slapface.tsx +17 -17
- package/ui/sample/Slapface/SlapfaceDemo.tsx +30 -0
- package/.eslintignore +0 -7
- package/.eslintrc.js +0 -48
- package/.pixiderc/apps.json +0 -12
- package/.pixiderc/devel-config.meta.json +0 -23
- package/.pixiderc/postinstall.js +0 -17
- package/.pixiderc/util.js +0 -136
- package/.pixiderc/webpack.js +0 -180
- package/faas/helloworld.js +0 -8
- package/gen/pbo/pandora_pb.d.ts +0 -1179
- package/gen/pbo/pandora_pb.js +0 -10475
- package/gen/pbo/pandora_pb_service.d.ts +0 -1317
- package/gen/pbo/pandora_pb_service.js +0 -2307
- package/gen/pbo/test_pb.d.ts +0 -99
- package/gen/pbo/test_pb.js +0 -889
- package/gen/pbo/test_pb_service.d.ts +0 -82
- package/gen/pbo/test_pb_service.js +0 -117
- package/lib/assets/border.png +0 -0
- package/lib/assets/check.html +0 -54
- package/lib/assets/pixui.png +0 -0
- package/lib/assets/preact.png +0 -0
- package/lib/check/main.less +0 -63
- package/lib/check/main.tsx +0 -42
- package/lib/check/tool.js +0 -3
- package/lib/check/util.tsx +0 -107
- package/lib/dom.ts +0 -16
- package/lib/ext.d.ts +0 -95
- package/lib/grpc-web/dist/ChunkParser.js +0 -115
- package/lib/grpc-web/dist/ChunkParser.js.map +0 -1
- package/lib/grpc-web/dist/Code.js +0 -58
- package/lib/grpc-web/dist/Code.js.map +0 -1
- package/lib/grpc-web/dist/client.js +0 -299
- package/lib/grpc-web/dist/client.js.map +0 -1
- package/lib/grpc-web/dist/debug.js +0 -16
- package/lib/grpc-web/dist/debug.js.map +0 -1
- package/lib/grpc-web/dist/detach.js +0 -7
- package/lib/grpc-web/dist/detach.js.map +0 -1
- package/lib/grpc-web/dist/index.js +0 -29
- package/lib/grpc-web/dist/index.js.map +0 -1
- package/lib/grpc-web/dist/invoke.js +0 -32
- package/lib/grpc-web/dist/invoke.js.map +0 -1
- package/lib/grpc-web/dist/message.js +0 -3
- package/lib/grpc-web/dist/message.js.map +0 -1
- package/lib/grpc-web/dist/metadata.js +0 -5
- package/lib/grpc-web/dist/metadata.js.map +0 -1
- package/lib/grpc-web/dist/service.js +0 -3
- package/lib/grpc-web/dist/service.js.map +0 -1
- package/lib/grpc-web/dist/transports/Transport.js +0 -13
- package/lib/grpc-web/dist/transports/Transport.js.map +0 -1
- package/lib/grpc-web/dist/transports/http/fetch.js +0 -112
- package/lib/grpc-web/dist/transports/http/fetch.js.map +0 -1
- package/lib/grpc-web/dist/transports/http/http.js +0 -15
- package/lib/grpc-web/dist/transports/http/http.js.map +0 -1
- package/lib/grpc-web/dist/transports/http/xhr.js +0 -127
- package/lib/grpc-web/dist/transports/http/xhr.js.map +0 -1
- package/lib/grpc-web/dist/transports/http/xhrUtil.js +0 -37
- package/lib/grpc-web/dist/transports/http/xhrUtil.js.map +0 -1
- package/lib/grpc-web/dist/transports/websocket/websocket.js +0 -95
- package/lib/grpc-web/dist/transports/websocket/websocket.js.map +0 -1
- package/lib/grpc-web/dist/typings/ChunkParser.d.ts +0 -17
- package/lib/grpc-web/dist/typings/Code.d.ts +0 -20
- package/lib/grpc-web/dist/typings/client.d.ts +0 -22
- package/lib/grpc-web/dist/typings/debug.d.ts +0 -1
- package/lib/grpc-web/dist/typings/detach.d.ts +0 -1
- package/lib/grpc-web/dist/typings/index.d.ts +0 -60
- package/lib/grpc-web/dist/typings/invoke.d.ts +0 -17
- package/lib/grpc-web/dist/typings/message.d.ts +0 -8
- package/lib/grpc-web/dist/typings/metadata.d.ts +0 -2
- package/lib/grpc-web/dist/typings/service.d.ts +0 -16
- package/lib/grpc-web/dist/typings/transports/Transport.d.ts +0 -22
- package/lib/grpc-web/dist/typings/transports/http/fetch.d.ts +0 -6
- package/lib/grpc-web/dist/typings/transports/http/http.d.ts +0 -5
- package/lib/grpc-web/dist/typings/transports/http/xhr.d.ts +0 -27
- package/lib/grpc-web/dist/typings/transports/http/xhrUtil.d.ts +0 -3
- package/lib/grpc-web/dist/typings/transports/websocket/websocket.d.ts +0 -2
- package/lib/grpc-web/dist/typings/unary.d.ts +0 -20
- package/lib/grpc-web/dist/typings/util.d.ts +0 -2
- package/lib/grpc-web/dist/unary.js +0 -44
- package/lib/grpc-web/dist/unary.js.map +0 -1
- package/lib/grpc-web/dist/util.js +0 -11
- package/lib/grpc-web/dist/util.js.map +0 -1
- package/lib/grpcTransport/PixHttp2Transport.ts +0 -104
- package/lib/grpcTransport/PixLuaTransport.ts +0 -80
- package/lib/pi_component/tinyList/tinyList.js +0 -573
- package/lib/pi_component/tinyList/tinyList.tsx +0 -586
- package/lib/preact/compat/src/Children.js +0 -26
- package/lib/preact/compat/src/PureComponent.js +0 -19
- package/lib/preact/compat/src/events.js +0 -36
- package/lib/preact/compat/src/forwardRef.js +0 -29
- package/lib/preact/compat/src/index.d.ts +0 -121
- package/lib/preact/compat/src/index.js +0 -159
- package/lib/preact/compat/src/internal.d.ts +0 -45
- package/lib/preact/compat/src/memo.js +0 -34
- package/lib/preact/compat/src/portals.js +0 -85
- package/lib/preact/compat/src/render.js +0 -166
- package/lib/preact/compat/src/suspense-list.d.ts +0 -14
- package/lib/preact/compat/src/suspense-list.js +0 -127
- package/lib/preact/compat/src/suspense.d.ts +0 -15
- package/lib/preact/compat/src/suspense.js +0 -165
- package/lib/preact/compat/src/util.js +0 -23
- package/lib/preact/hooks/src/index.d.ts +0 -133
- package/lib/preact/hooks/src/index.js +0 -339
- package/lib/preact/hooks/src/internal.d.ts +0 -55
- package/lib/preact/src/clone-element.js +0 -27
- package/lib/preact/src/compat.ts +0 -0
- package/lib/preact/src/component.js +0 -219
- package/lib/preact/src/constants.js +0 -3
- package/lib/preact/src/create-context.js +0 -55
- package/lib/preact/src/create-element.js +0 -102
- package/lib/preact/src/css.d.ts +0 -30341
- package/lib/preact/src/diff/catch-error.js +0 -41
- package/lib/preact/src/diff/children.js +0 -259
- package/lib/preact/src/diff/index.js +0 -445
- package/lib/preact/src/diff/props.js +0 -163
- package/lib/preact/src/index.d.ts +0 -275
- package/lib/preact/src/index.js +0 -14
- package/lib/preact/src/internal.d.ts +0 -94
- package/lib/preact/src/jsx.d.ts +0 -884
- package/lib/preact/src/options.js +0 -16
- package/lib/preact/src/render.js +0 -98
- package/lib/preact/src/util.js +0 -25
- package/lib/preact-router/.travis.yml +0 -3
- package/lib/preact-router/LICENSE +0 -21
- package/lib/preact-router/README.md +0 -254
- package/lib/preact-router/index.d.ts +0 -71
- package/lib/preact-router/match/index.d.ts +0 -16
- package/lib/preact-router/match/package.json +0 -13
- package/lib/preact-router/match/src/cjs.js +0 -4
- package/lib/preact-router/match/src/index.js +0 -36
- package/lib/preact-router/package-lock.json +0 -12330
- package/lib/preact-router/package.json +0 -78
- package/lib/preact-router/src/cjs.js +0 -11
- package/lib/preact-router/src/index.js +0 -270
- package/lib/preact-router/src/util.js +0 -87
- package/lib/react-window/src/FixedSizeGrid.js +0 -244
- package/lib/react-window/src/FixedSizeList.js +0 -130
- package/lib/react-window/src/VariableSizeGrid.js +0 -507
- package/lib/react-window/src/VariableSizeList.js +0 -316
- package/lib/react-window/src/__tests__/FixedSizeGrid.js +0 -1336
- package/lib/react-window/src/__tests__/FixedSizeList.js +0 -966
- package/lib/react-window/src/__tests__/VariableSizeGrid.js +0 -779
- package/lib/react-window/src/__tests__/VariableSizeList.js +0 -442
- package/lib/react-window/src/__tests__/__snapshots__/FixedSizeGrid.js.snap +0 -912
- package/lib/react-window/src/__tests__/__snapshots__/FixedSizeList.js.snap +0 -568
- package/lib/react-window/src/__tests__/__snapshots__/VariableSizeGrid.js.snap +0 -542
- package/lib/react-window/src/__tests__/__snapshots__/VariableSizeList.js.snap +0 -331
- package/lib/react-window/src/__tests__/areEqual.js +0 -32
- package/lib/react-window/src/__tests__/shouldComponentUpdate.js +0 -36
- package/lib/react-window/src/areEqual.js +0 -18
- package/lib/react-window/src/createGridComponent.js +0 -919
- package/lib/react-window/src/createListComponent.js +0 -729
- package/lib/react-window/src/domHelpers.js +0 -72
- package/lib/react-window/src/index.js +0 -9
- package/lib/react-window/src/shallowDiffers.js +0 -17
- package/lib/react-window/src/shouldComponentUpdate.js +0 -16
- package/lib/react-window/src/test.js.flow +0 -382
- package/lib/react-window/src/timer.js +0 -36
- package/src/app/demopage.tsx +0 -77
- package/src/app/index.html +0 -48
- package/src/app/main.tsx +0 -30
- package/src/asset/Textures/Alert/bg_tips.png +0 -0
- package/src/asset/Textures/Alert/btn_zhedie_a.png +0 -0
- package/src/asset/Textures/Alert/com_home_bg_left.png +0 -0
- package/src/asset/Textures/Alert/com_home_bg_rightbar.png +0 -0
- package/src/asset/Textures/Commons/com_home_bg_a.png +0 -0
- package/src/asset/Textures/Commons/com_home_bg_back_top.png +0 -0
- package/src/asset/Textures/Commons/com_home_bg_bottombar_sheet.png +0 -0
- package/src/asset/Textures/Commons/com_home_bg_list_xiala.png +0 -0
- package/src/asset/Textures/Commons/com_home_bg_rightbar_line.png +0 -0
- package/src/asset/Textures/Commons/com_home_bg_rightbar_selected.png +0 -0
- package/src/asset/Textures/Commons/com_home_bg_touxiang_140.png +0 -0
- package/src/asset/Textures/Commons/com_home_bg_touxiang_60.png +0 -0
- package/src/asset/Textures/Commons/com_home_bg_touxiang_80.png +0 -0
- package/src/asset/Textures/Commons/com_home_btn_back.png +0 -0
- package/src/asset/Textures/Commons/com_home_btn_bottombar.png +0 -0
- package/src/asset/Textures/Commons/com_home_btn_bottombar_fadongtai.png +0 -0
- package/src/asset/Textures/Commons/com_home_btn_close.png +0 -0
- package/src/asset/Textures/Commons/com_home_btn_guanzhu_126.png +0 -0
- package/src/asset/Textures/Commons/com_home_btn_guanzhu_86.png +0 -0
- package/src/asset/Textures/Commons/com_home_btn_left_bianji.png +0 -0
- package/src/asset/Textures/Commons/com_home_btn_left_dongtai.png +0 -0
- package/src/asset/Textures/Commons/com_home_btn_left_touxiang.png +0 -0
- package/src/asset/Textures/Commons/com_home_btn_selet.png +0 -0
- package/src/asset/Textures/Commons/com_home_btn_yiguanzhu_126.png +0 -0
- package/src/asset/Textures/Commons/com_home_btn_yiguanzhu_86.png +0 -0
- package/src/asset/Textures/Commons/com_home_icon_bottombar_fadongtai.png +0 -0
- package/src/asset/Textures/Commons/com_home_icon_bottombar_red.png +0 -0
- package/src/asset/Textures/Commons/com_home_icon_loading.png +0 -0
- package/src/asset/Textures/Commons/com_home_pic_touxiang_moren.png +0 -0
- package/src/asset/Textures/Commons/com_home_tab_left_a.png +0 -0
- package/src/asset/Textures/Commons/com_home_tab_left_b.png +0 -0
- package/src/asset/Textures/Commons/com_home_tab_left_c.png +0 -0
- package/src/asset/Textures/Commons/feedItems/gc1_huati_icon_middle_v.png +0 -0
- package/src/asset/Textures/Commons/feedItems/gc1_huati_icon_middle_yonghurenzheng.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_bg.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_bg_line.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_bg_middle_chakan.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_bg_middle_input.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_bg_zan.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_btn_middle_input.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_btn_more.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_btn_normal.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_btn_photo_more.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_btn_zhedie_a.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_btn_zhedie_a_shadow.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_btn_zhedie_b_normal.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_btn_zhedie_b_pressed.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_icon_a_normal.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_icon_a_pressed.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_icon_b_normal.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_icon_c_normal.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_icon_d.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_icon_e.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_icon_f_share.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_icon_middle_input_back.png +0 -0
- package/src/asset/Textures/Commons/gc1_huati_bg_middle_topbtn.png +0 -0
- package/src/asset/Textures/Commons/gc1_huati_bg_middle_topbtn_pressd.png +0 -0
- package/src/asset/Textures/Commons/karaoke/rukou_bg_music.png +0 -0
- package/src/asset/Textures/Commons/karaoke/rukou_btn_a.png +0 -0
- package/src/asset/Textures/Commons/karaoke/rukou_btn_b.png +0 -0
- package/src/asset/Textures/Commons/karaoke/rukou_icon_b.png +0 -0
- package/src/asset/Textures/Commons/karaoke/rukou_icon_d.png +0 -0
- package/src/asset/Textures/Commons/karaoke/rukou_icon_e.png +0 -0
- package/src/asset/Textures/Commons/rukou_bg_bottombar_line.png +0 -0
- package/src/asset/Textures/Commons/rukou_icon_a.png +0 -0
- package/src/asset/Textures/Commons/tc_bianji_tab_a.png +0 -0
- package/src/asset/Textures/Commons/tc_zanshang_bg_line.png +0 -0
- package/src/asset/Textures/Commons/touxiang_bg_tishikuang.png +0 -0
- package/src/asset/Textures/Commons/video/rukou_icon_shipin.png +0 -0
- package/src/asset/Textures/Commons/video/xiangce_btn_bofang.png +0 -0
- package/src/asset/Textures/Commons/voice/rukou_icon_yuyin.png +0 -0
- package/src/asset/Textures/Commons/voice/tc_yuyin_bg.png +0 -0
- package/src/asset/Textures/Commons/voice/tc_yuyin_bg_load.png +0 -0
- package/src/asset/Textures/Commons/voice/tc_yuyin_bg_xinhao_a.png +0 -0
- package/src/asset/Textures/Commons/voice/tc_yuyin_bg_xinhao_b.png +0 -0
- package/src/asset/Textures/Commons/xiangce_icon_bottombar_gulita.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_bg.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_bg_bottom.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_bg_input.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_bg_tips.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_bg_topbar_a.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_bg_topbar_line.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_bg_upload_photo.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_bg_upload_photo_line.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_bg_zhaopian_line.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_btn.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_btn_close.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_btn_upload_photo.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_radio_normal.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_radio_normal_@slice_0.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_radio_selected.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_tab_a.png +0 -0
- package/src/asset/Textures/SocialSecond/gc1_huati_bg_middle_topbar.png +0 -0
- package/src/asset/Textures/SocialSecond/gc1_huati_bg_middle_topbar_pre.png +0 -0
- package/src/asset/Textures/SocialSecond/newmessage_bg_left_line.png +0 -0
- package/src/asset/Textures/SocialSecond/newmessage_bg_left_normal.png +0 -0
- package/src/asset/Textures/SocialSecond/newmessage_bg_left_selected.png +0 -0
- package/src/asset/Textures/SocialSecond/newmessage_bg_middle_new.png +0 -0
- package/src/asset/Textures/SocialSecond/paihang_bg_list.png +0 -0
- package/src/asset/Textures/SocialSecond/paihang_bg_list_line.png +0 -0
- package/src/asset/Textures/SocialSecond/paihang_bg_list_my.png +0 -0
- package/src/asset/Textures/SocialSecond/paihang_bg_list_top.png +0 -0
- package/src/asset/Textures/SocialSecond/paihang_bg_topbar_a.png +0 -0
- package/src/asset/Textures/SocialSecond/paihang_icon_topbar_selected.png +0 -0
- package/src/asset/Textures/SocialSecond/paihang_pic_1.png +0 -0
- package/src/asset/Textures/SocialSecond/paihang_pic_2.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_fadongtai_btn_close.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_guanzhu_bg_topbar.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_guanzhu_bg_topbar_selected.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_liwu_bg.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_liwu_bg_daoju.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_liwu_btn_a.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_liwu_btn_b.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_liwu_btn_c.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_liwu_pic_daoju1.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_liwu_pic_daoju2.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_liwu_pic_daoju3.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_pinglun_bg.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_shipin_tianjiashipin.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_yuyin_bg.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_yuyin_bg_delete.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_yuyin_bg_xinhao_a.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_yuyin_bg_xinhao_b.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_yuyin_star.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_yuyin_stop.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_zanshang_bg_line.png +0 -0
- package/src/asset/Textures/SocialSecond/touxiang_bg_tishikuang.png +0 -0
- package/src/asset/Textures/SocialSecond/xiangce_huadong.png +0 -0
- package/src/asset/Textures/SocialSecond/xiangce_huadong_xuanzhong.png +0 -0
- package/src/asset/Textures/SocialSecond/xiangce_icon_xiazai.png +0 -0
- package/src/asset/Textures/SocialVideo/com_home_btn_close.png +0 -0
- package/src/asset/Textures/SocialVideo/tc_shipin_bg_guodu.png +0 -0
- package/src/asset/Textures/SocialVideo/tc_shipin_jinduanjian.png +0 -0
- package/src/asset/Textures/SocialVideo/tc_shipin_jindutiao.png +0 -0
- package/src/asset/Textures/SocialVideo/tc_shipin_jindutiao_hui.png +0 -0
- package/src/asset/Textures/SocialVideo/tc_shipin_play.png +0 -0
- package/src/asset/Textures/SocialVideo/tc_shipin_play_big.png +0 -0
- package/src/asset/Textures/SocialVideo/tc_shipin_stop.png +0 -0
- package/src/asset/laugh.gif +0 -0
- package/src/asset/npms.png +0 -0
- package/src/asset/pixui.png +0 -0
- package/src/asset/preact.png +0 -0
- package/src/asset/template.html +0 -47
- package/src/common/frame/appsettings.js +0 -111
- package/src/common/frame/common.js +0 -17
- package/src/common/frame/platform-api-callback.js +0 -341
- package/src/common/frame/platform-api.d.ts +0 -156
- package/src/common/frame/platform-api.js +0 -479
- package/src/common/main.less +0 -119
- package/src/pixUIReactComponents/README.md +0 -8
- package/src/pixUIReactComponents/package.json +0 -11
- package/src/pixUIReactComponents/tsconfig.json +0 -45
- package/src/pixUIReactComponents/ui/sample/Slapface/SlapfaceDemo.tsx +0 -30
- package/src/pixUIReactUtils/GenerateConstructorAndGeterSeter.js +0 -227
- package/src/pixUIReactUtils/MakeImage.js +0 -207
- package/src/pixUIReactUtils/README.md +0 -124
- package/src/pixUIReactUtils/Version.js +0 -3
- package/src/pixUIReactUtils/img/makeImage.png +0 -0
- package/src/pixUIReactUtils/index.js +0 -1
- package/src/pixUIReactUtils/package.json +0 -16
- package/src/preprocess/index.html +0 -48
- package/src/preprocess/main.tsx +0 -17
- package/src/preprocess/preprocesspage.tsx +0 -41
- /package/{src/pixUIReactComponents/cmdAfterTsBuild.js → cmdAfterTsBuild.js} +0 -0
- /package/{src/pixUIReactComponents/index.js → index.js} +0 -0
- /package/{src/pixUIReactComponents/tools → tools}/EventDispatcherJs.tsx +0 -0
- /package/{src/pixUIReactComponents/tools → tools}/Logger.tsx +0 -0
- /package/{src/pixUIReactComponents/tools → tools}/img/logger.png +0 -0
- /package/{src/pixUIReactComponents/tools → tools}/tools.md +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/bulletscreen/BulletItemAnimation.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/bulletscreen/BulletScreenAnimation.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/bulletscreen/bullet.less +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/button/Button.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/carousel/Carousel.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/checkBox/CheckBox.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/dropdown/Dropdown.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/dropdown/DropdownOptionUI.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/dropdown/DropdownSpreadMainUI.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/dropdown/DropdownUnspreadMainUI.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/gradient/GradientText.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/outlinetext/OutlineText.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/progress/Progress.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/slapface/less/Slapface.less +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/slider/Slider.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/tab/Tab.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/tab/Tabs.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/togglegroup/ToggleGroup.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/videoplayer/VideoPlayer.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/waterfallcomponent/WaterfallComponent.jsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/waterfallcomponent/less/WaterfallComponent.less +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/Images.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/OutlineText/OutlineDemo.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/btn_close.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/changtai_button.jpg +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/checkbox0.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/checkbox1.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/data_arrow_down.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/data_arrow_up.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/dot.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/inner.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/item_reddot.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/loading.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/money_dropdown.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/money_dropdownall.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/outer.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/slapface_samplepic1.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/slapface_samplepic2.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/slapface_samplepic3.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/slapface_samplepic4.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/slapface_samplepic5.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/slapface_samplepic6.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/tab_choosed.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/tabs_bg.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/video_pause.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/video_play.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/video_reload.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/xuanfu_button.jpg +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/yaxia_button.jpg +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/bulletscreen/BulletDemo.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/button/ButtonDemo.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/carousel/carouselDemo.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/checkBox/checkBoxDemo.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/dropdown/DropdownDemo.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/dropdown/MoneyDropdownOption.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/dropdown/MoneyDropdownSpreadMain.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/dropdown/MoneyDropdownUnspreadMain.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/gradient/GradientDemo.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/less/video.less +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/progress/ProgressDemo.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/slider/SliderDemo.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/tab/TabDemo.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/tab/TopTab.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/togglegroup/ToggleGroupDemo.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/videoplayer/VideoPlayerDemo.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/waterfallcomponent/WaterfallComponentDemo.jsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/ui.md +0 -0
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
let size: number = -1;
|
|
4
|
-
|
|
5
|
-
// This utility copied from "dom-helpers" package.
|
|
6
|
-
export function getScrollbarSize(recalculate?: boolean = false): number {
|
|
7
|
-
if (size === -1 || recalculate) {
|
|
8
|
-
const div = document.createElement('div');
|
|
9
|
-
const style = div.style;
|
|
10
|
-
style.width = '50px';
|
|
11
|
-
style.height = '50px';
|
|
12
|
-
style.overflow = 'scroll';
|
|
13
|
-
|
|
14
|
-
((document.body: any): HTMLBodyElement).appendChild(div);
|
|
15
|
-
|
|
16
|
-
size = div.offsetWidth - div.clientWidth;
|
|
17
|
-
|
|
18
|
-
((document.body: any): HTMLBodyElement).removeChild(div);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return size;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export type RTLOffsetType =
|
|
25
|
-
| 'negative'
|
|
26
|
-
| 'positive-descending'
|
|
27
|
-
| 'positive-ascending';
|
|
28
|
-
|
|
29
|
-
let cachedRTLResult: RTLOffsetType | null = null;
|
|
30
|
-
|
|
31
|
-
// TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.
|
|
32
|
-
// Chrome does not seem to adhere; its scrollLeft values are positive (measured relative to the left).
|
|
33
|
-
// Safari's elastic bounce makes detecting this even more complicated wrt potential false positives.
|
|
34
|
-
// The safest way to check this is to intentionally set a negative offset,
|
|
35
|
-
// and then verify that the subsequent "scroll" event matches the negative offset.
|
|
36
|
-
// If it does not match, then we can assume a non-standard RTL scroll implementation.
|
|
37
|
-
export function getRTLOffsetType(recalculate?: boolean = false): RTLOffsetType {
|
|
38
|
-
if (cachedRTLResult === null || recalculate) {
|
|
39
|
-
const outerDiv = document.createElement('div');
|
|
40
|
-
const outerStyle = outerDiv.style;
|
|
41
|
-
outerStyle.width = '50px';
|
|
42
|
-
outerStyle.height = '50px';
|
|
43
|
-
outerStyle.overflow = 'scroll';
|
|
44
|
-
outerStyle.direction = 'rtl';
|
|
45
|
-
|
|
46
|
-
const innerDiv = document.createElement('div');
|
|
47
|
-
const innerStyle = innerDiv.style;
|
|
48
|
-
innerStyle.width = '100px';
|
|
49
|
-
innerStyle.height = '100px';
|
|
50
|
-
|
|
51
|
-
outerDiv.appendChild(innerDiv);
|
|
52
|
-
|
|
53
|
-
((document.body: any): HTMLBodyElement).appendChild(outerDiv);
|
|
54
|
-
|
|
55
|
-
if (outerDiv.scrollLeft > 0) {
|
|
56
|
-
cachedRTLResult = 'positive-descending';
|
|
57
|
-
} else {
|
|
58
|
-
outerDiv.scrollLeft = 1;
|
|
59
|
-
if (outerDiv.scrollLeft === 0) {
|
|
60
|
-
cachedRTLResult = 'negative';
|
|
61
|
-
} else {
|
|
62
|
-
cachedRTLResult = 'positive-ascending';
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
((document.body: any): HTMLBodyElement).removeChild(outerDiv);
|
|
67
|
-
|
|
68
|
-
return cachedRTLResult;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return cachedRTLResult;
|
|
72
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
export { default as VariableSizeGrid } from './VariableSizeGrid';
|
|
4
|
-
export { default as VariableSizeList } from './VariableSizeList';
|
|
5
|
-
export { default as FixedSizeGrid } from './FixedSizeGrid';
|
|
6
|
-
export { default as FixedSizeList } from './FixedSizeList';
|
|
7
|
-
|
|
8
|
-
export { default as areEqual } from './areEqual';
|
|
9
|
-
export { default as shouldComponentUpdate } from './shouldComponentUpdate';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
// Pulled from react-compat
|
|
4
|
-
// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349
|
|
5
|
-
export default function shallowDiffers(prev: Object, next: Object): boolean {
|
|
6
|
-
for (let attribute in prev) {
|
|
7
|
-
if (!(attribute in next)) {
|
|
8
|
-
return true;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
for (let attribute in next) {
|
|
12
|
-
if (prev[attribute] !== next[attribute]) {
|
|
13
|
-
return true;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
import areEqual from './areEqual';
|
|
4
|
-
import shallowDiffers from './shallowDiffers';
|
|
5
|
-
|
|
6
|
-
// Custom shouldComponentUpdate for class components.
|
|
7
|
-
// It knows to compare individual style props and ignore the wrapper object.
|
|
8
|
-
// See https://reactjs.org/docs/react-component.html#shouldcomponentupdate
|
|
9
|
-
export default function shouldComponentUpdate(
|
|
10
|
-
nextProps: Object,
|
|
11
|
-
nextState: Object
|
|
12
|
-
): boolean {
|
|
13
|
-
return (
|
|
14
|
-
!areEqual(this.props, nextProps) || shallowDiffers(this.state, nextState)
|
|
15
|
-
);
|
|
16
|
-
}
|
|
@@ -1,382 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import {
|
|
5
|
-
FixedSizeList,
|
|
6
|
-
VariableSizeList,
|
|
7
|
-
FixedSizeGrid,
|
|
8
|
-
VariableSizeGrid,
|
|
9
|
-
} from './';
|
|
10
|
-
|
|
11
|
-
type ItemData = {|
|
|
12
|
-
num: number,
|
|
13
|
-
str: string,
|
|
14
|
-
|};
|
|
15
|
-
|
|
16
|
-
const assertVoid = (value: void) => {};
|
|
17
|
-
const assertEmpty = (value: empty) => {};
|
|
18
|
-
const assertNumber = (value: number) => {};
|
|
19
|
-
const assertString = (value: string) => {};
|
|
20
|
-
const assertCustomType = (value: ItemData) => {};
|
|
21
|
-
|
|
22
|
-
/* FixedSizeList */
|
|
23
|
-
|
|
24
|
-
{
|
|
25
|
-
const Item = ({ index, style }) => {
|
|
26
|
-
(index: number);
|
|
27
|
-
(style: Object);
|
|
28
|
-
return null;
|
|
29
|
-
};
|
|
30
|
-
<FixedSizeList width={0} height={0} itemSize={0} itemCount={0}>
|
|
31
|
-
{Item}
|
|
32
|
-
</FixedSizeList>;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
{
|
|
36
|
-
const Item = ({ data }) => {
|
|
37
|
-
assertNumber(data);
|
|
38
|
-
// $FlowFixMe number is passed to FixedSizeList
|
|
39
|
-
assertString(data);
|
|
40
|
-
return null;
|
|
41
|
-
};
|
|
42
|
-
const itemKey = (index, data) => {
|
|
43
|
-
assertNumber(data);
|
|
44
|
-
// $FlowFixMe expected
|
|
45
|
-
assertString(data);
|
|
46
|
-
return index;
|
|
47
|
-
};
|
|
48
|
-
<FixedSizeList width={0} height={0} itemSize={0} itemCount={0} itemData={1} itemKey={itemKey}>
|
|
49
|
-
{Item}
|
|
50
|
-
</FixedSizeList>;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
{
|
|
54
|
-
const Item = ({ data }) => {
|
|
55
|
-
assertCustomType(data);
|
|
56
|
-
// $FlowFixMe ItemData is passed to FixedSizeList
|
|
57
|
-
assertString(data);
|
|
58
|
-
return null;
|
|
59
|
-
};
|
|
60
|
-
const itemKey = (index, data) => {
|
|
61
|
-
assertCustomType(data);
|
|
62
|
-
// $FlowFixMe expected
|
|
63
|
-
assertString(data);
|
|
64
|
-
return index;
|
|
65
|
-
};
|
|
66
|
-
<FixedSizeList
|
|
67
|
-
width={0}
|
|
68
|
-
height={0}
|
|
69
|
-
itemSize={0}
|
|
70
|
-
itemCount={0}
|
|
71
|
-
itemData={{
|
|
72
|
-
num: 123,
|
|
73
|
-
str: 'abc',
|
|
74
|
-
}}
|
|
75
|
-
itemKey={itemKey}
|
|
76
|
-
>
|
|
77
|
-
{Item}
|
|
78
|
-
</FixedSizeList>;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
{
|
|
82
|
-
const Item = ({ data }) => {
|
|
83
|
-
assertVoid(data);
|
|
84
|
-
// $FlowFixMe itemData is undefined by default
|
|
85
|
-
assertEmpty(data);
|
|
86
|
-
|
|
87
|
-
return null;
|
|
88
|
-
};
|
|
89
|
-
const itemKey = (index, data) => {
|
|
90
|
-
assertVoid(data);
|
|
91
|
-
// $FlowFixMe expected
|
|
92
|
-
assertString(data);
|
|
93
|
-
return index;
|
|
94
|
-
};
|
|
95
|
-
<FixedSizeList width={0} height={0} itemSize={0} itemCount={0} itemKey={itemKey}>
|
|
96
|
-
{Item}
|
|
97
|
-
</FixedSizeList>;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/* VariableSizeList */
|
|
101
|
-
|
|
102
|
-
{
|
|
103
|
-
const Item = ({ data }) => {
|
|
104
|
-
assertNumber(data);
|
|
105
|
-
// $FlowFixMe number is passed to VariableSizeList
|
|
106
|
-
assertString(data);
|
|
107
|
-
return null;
|
|
108
|
-
};
|
|
109
|
-
const itemKey = (index, data) => {
|
|
110
|
-
assertNumber(data);
|
|
111
|
-
// $FlowFixMe expected
|
|
112
|
-
assertString(data);
|
|
113
|
-
return index;
|
|
114
|
-
};
|
|
115
|
-
<VariableSizeList
|
|
116
|
-
width={0}
|
|
117
|
-
height={0}
|
|
118
|
-
itemSize={0}
|
|
119
|
-
itemCount={0}
|
|
120
|
-
itemData={1}
|
|
121
|
-
itemKey={itemKey}
|
|
122
|
-
>
|
|
123
|
-
{Item}
|
|
124
|
-
</VariableSizeList>;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
{
|
|
128
|
-
const Item = ({ data }) => {
|
|
129
|
-
assertCustomType(data);
|
|
130
|
-
// $FlowFixMe ItemData is passed to VariableSizeList
|
|
131
|
-
assertString(data);
|
|
132
|
-
return null;
|
|
133
|
-
};
|
|
134
|
-
const itemKey = (index, data) => {
|
|
135
|
-
assertCustomType(data);
|
|
136
|
-
// $FlowFixMe expected
|
|
137
|
-
assertString(data);
|
|
138
|
-
return index;
|
|
139
|
-
};
|
|
140
|
-
<VariableSizeList
|
|
141
|
-
width={0}
|
|
142
|
-
height={0}
|
|
143
|
-
itemSize={0}
|
|
144
|
-
itemCount={0}
|
|
145
|
-
itemData={{
|
|
146
|
-
num: 123,
|
|
147
|
-
str: 'abc',
|
|
148
|
-
}}
|
|
149
|
-
itemKey={itemKey}
|
|
150
|
-
>
|
|
151
|
-
{Item}
|
|
152
|
-
</VariableSizeList>;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
{
|
|
156
|
-
const Item = ({ data }) => {
|
|
157
|
-
assertVoid(data);
|
|
158
|
-
// $FlowFixMe itemData is undefined by default
|
|
159
|
-
assertEmpty(data);
|
|
160
|
-
return null;
|
|
161
|
-
};
|
|
162
|
-
const itemKey = (index, data) => {
|
|
163
|
-
assertVoid(data);
|
|
164
|
-
// $FlowFixMe expected
|
|
165
|
-
assertString(data);
|
|
166
|
-
return index;
|
|
167
|
-
};
|
|
168
|
-
<VariableSizeList width={0} height={0} itemSize={0} itemCount={0} itemKey={itemKey}>
|
|
169
|
-
{Item}
|
|
170
|
-
</VariableSizeList>;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
{
|
|
174
|
-
class Item extends React.PureComponent<{ data: void }> {
|
|
175
|
-
render() {
|
|
176
|
-
const { data } = this.props;
|
|
177
|
-
assertVoid(data);
|
|
178
|
-
// $FlowFixMe itemData is undefined by default
|
|
179
|
-
assertEmpty(data);
|
|
180
|
-
return null;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
const itemKey = (index, data) => {
|
|
184
|
-
assertVoid(data);
|
|
185
|
-
// $FlowFixMe expected
|
|
186
|
-
assertString(data);
|
|
187
|
-
return index;
|
|
188
|
-
};
|
|
189
|
-
<VariableSizeList width={0} height={0} itemSize={0} itemCount={0} itemKey={itemKey}>
|
|
190
|
-
{Item}
|
|
191
|
-
</VariableSizeList>;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
/* FixedSizeGrid */
|
|
195
|
-
|
|
196
|
-
{
|
|
197
|
-
const Item = ({ columnIndex, rowIndex, style }) => {
|
|
198
|
-
(columnIndex: number);
|
|
199
|
-
(rowIndex: number);
|
|
200
|
-
(style: Object);
|
|
201
|
-
return null;
|
|
202
|
-
};
|
|
203
|
-
<FixedSizeGrid
|
|
204
|
-
width={0}
|
|
205
|
-
height={0}
|
|
206
|
-
rowHeight={0}
|
|
207
|
-
rowCount={0}
|
|
208
|
-
columnWidth={0}
|
|
209
|
-
columnCount={0}
|
|
210
|
-
>
|
|
211
|
-
{Item}
|
|
212
|
-
</FixedSizeGrid>;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
{
|
|
216
|
-
const Item = ({ data }) => {
|
|
217
|
-
assertNumber(data);
|
|
218
|
-
// $FlowFixMe number is passed to FixedSizeGrid
|
|
219
|
-
assertString(data);
|
|
220
|
-
return null;
|
|
221
|
-
};
|
|
222
|
-
const itemKey = ({ columnIndex, data, rowIndex }) => {
|
|
223
|
-
assertNumber(data);
|
|
224
|
-
// $FlowFixMe expected
|
|
225
|
-
assertString(data);
|
|
226
|
-
return `${columnIndex}:${rowIndex}`;
|
|
227
|
-
};
|
|
228
|
-
<FixedSizeGrid
|
|
229
|
-
width={0}
|
|
230
|
-
height={0}
|
|
231
|
-
rowHeight={0}
|
|
232
|
-
rowCount={0}
|
|
233
|
-
columnWidth={0}
|
|
234
|
-
columnCount={0}
|
|
235
|
-
itemData={1}
|
|
236
|
-
itemKey={itemKey}
|
|
237
|
-
>
|
|
238
|
-
{Item}
|
|
239
|
-
</FixedSizeGrid>;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
{
|
|
243
|
-
const Item = ({ data }) => {
|
|
244
|
-
assertCustomType(data);
|
|
245
|
-
// $FlowFixMe ItemData is passed to FixedSizeGrid
|
|
246
|
-
assertString(data);
|
|
247
|
-
return null;
|
|
248
|
-
};
|
|
249
|
-
const itemKey = ({ columnIndex, data, rowIndex }) => {
|
|
250
|
-
assertCustomType(data);
|
|
251
|
-
// $FlowFixMe expected
|
|
252
|
-
assertString(data);
|
|
253
|
-
return `${columnIndex}:${rowIndex}`;
|
|
254
|
-
};
|
|
255
|
-
<FixedSizeGrid
|
|
256
|
-
width={0}
|
|
257
|
-
height={0}
|
|
258
|
-
rowHeight={0}
|
|
259
|
-
rowCount={0}
|
|
260
|
-
columnWidth={0}
|
|
261
|
-
columnCount={0}
|
|
262
|
-
itemData={{
|
|
263
|
-
num: 123,
|
|
264
|
-
str: 'abc',
|
|
265
|
-
}}
|
|
266
|
-
itemKey={itemKey}
|
|
267
|
-
>
|
|
268
|
-
{Item}
|
|
269
|
-
</FixedSizeGrid>;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
{
|
|
273
|
-
const Item = ({ data }) => {
|
|
274
|
-
assertVoid(data);
|
|
275
|
-
// $FlowFixMe itemData is undefined by default
|
|
276
|
-
assertEmpty(data);
|
|
277
|
-
return null;
|
|
278
|
-
};
|
|
279
|
-
const itemKey = ({ columnIndex, data, rowIndex }) => {
|
|
280
|
-
assertVoid(data);
|
|
281
|
-
// $FlowFixMe expected
|
|
282
|
-
assertString(data);
|
|
283
|
-
return `${columnIndex}:${rowIndex}`;
|
|
284
|
-
};
|
|
285
|
-
<FixedSizeGrid
|
|
286
|
-
width={0}
|
|
287
|
-
height={0}
|
|
288
|
-
rowHeight={0}
|
|
289
|
-
rowCount={0}
|
|
290
|
-
columnWidth={0}
|
|
291
|
-
columnCount={0}
|
|
292
|
-
itemKey={itemKey}
|
|
293
|
-
>
|
|
294
|
-
{Item}
|
|
295
|
-
</FixedSizeGrid>;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
/* VariableSizeGrid */
|
|
299
|
-
|
|
300
|
-
{
|
|
301
|
-
const Item = ({ data }) => {
|
|
302
|
-
assertNumber(data);
|
|
303
|
-
// $FlowFixMe number is passed to VariableSizeGrid
|
|
304
|
-
assertString(data);
|
|
305
|
-
return null;
|
|
306
|
-
};
|
|
307
|
-
<VariableSizeGrid
|
|
308
|
-
width={0}
|
|
309
|
-
height={0}
|
|
310
|
-
rowHeight={0}
|
|
311
|
-
rowCount={0}
|
|
312
|
-
columnWidth={0}
|
|
313
|
-
columnCount={0}
|
|
314
|
-
itemData={1}
|
|
315
|
-
>
|
|
316
|
-
{Item}
|
|
317
|
-
</VariableSizeGrid>;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
{
|
|
321
|
-
const Item = ({ data }) => {
|
|
322
|
-
assertCustomType(data);
|
|
323
|
-
// $FlowFixMe ItemData is passed to VariableSizeGrid
|
|
324
|
-
assertString(data);
|
|
325
|
-
return null;
|
|
326
|
-
};
|
|
327
|
-
<VariableSizeGrid
|
|
328
|
-
width={0}
|
|
329
|
-
height={0}
|
|
330
|
-
rowHeight={0}
|
|
331
|
-
rowCount={0}
|
|
332
|
-
columnWidth={0}
|
|
333
|
-
columnCount={0}
|
|
334
|
-
itemData={{
|
|
335
|
-
num: 123,
|
|
336
|
-
str: 'abc',
|
|
337
|
-
}}
|
|
338
|
-
>
|
|
339
|
-
{Item}
|
|
340
|
-
</VariableSizeGrid>;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
{
|
|
344
|
-
const Item = ({ data }) => {
|
|
345
|
-
assertVoid(data);
|
|
346
|
-
// $FlowFixMe itemData is undefined by default
|
|
347
|
-
assertEmpty(data);
|
|
348
|
-
return null;
|
|
349
|
-
};
|
|
350
|
-
<VariableSizeGrid
|
|
351
|
-
width={0}
|
|
352
|
-
height={0}
|
|
353
|
-
rowHeight={0}
|
|
354
|
-
rowCount={0}
|
|
355
|
-
columnWidth={0}
|
|
356
|
-
columnCount={0}
|
|
357
|
-
>
|
|
358
|
-
{Item}
|
|
359
|
-
</VariableSizeGrid>;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
{
|
|
363
|
-
class Item extends React.PureComponent<{ data: void }> {
|
|
364
|
-
render() {
|
|
365
|
-
const { data } = this.props;
|
|
366
|
-
assertVoid(data);
|
|
367
|
-
// $FlowFixMe itemData is undefined by default
|
|
368
|
-
assertEmpty(data);
|
|
369
|
-
return null;
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
<VariableSizeGrid
|
|
373
|
-
width={0}
|
|
374
|
-
height={0}
|
|
375
|
-
rowHeight={0}
|
|
376
|
-
rowCount={0}
|
|
377
|
-
columnWidth={0}
|
|
378
|
-
columnCount={0}
|
|
379
|
-
>
|
|
380
|
-
{Item}
|
|
381
|
-
</VariableSizeGrid>;
|
|
382
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
// Animation frame based implementation of setTimeout.
|
|
4
|
-
// Inspired by Joe Lambert, https://gist.github.com/joelambert/1002116#file-requesttimeout-js
|
|
5
|
-
|
|
6
|
-
const hasNativePerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';
|
|
7
|
-
|
|
8
|
-
const now = hasNativePerformanceNow ? () => performance.now() : () => Date.now();
|
|
9
|
-
|
|
10
|
-
export type TimeoutID = {|
|
|
11
|
-
id: AnimationFrameID,
|
|
12
|
-
|};
|
|
13
|
-
|
|
14
|
-
export function cancelTimeout(timeoutID: TimeoutID) {
|
|
15
|
-
cancelAnimationFrame(timeoutID.id);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export function requestTimeout(callback: Function, delay: number): TimeoutID {
|
|
19
|
-
const start = now();
|
|
20
|
-
|
|
21
|
-
function tick() {
|
|
22
|
-
let n = now();
|
|
23
|
-
// console.log('requestTimeout', n, start, n - start, delay);
|
|
24
|
-
if (n - start >= delay) {
|
|
25
|
-
callback.call(null);
|
|
26
|
-
} else {
|
|
27
|
-
timeoutID.id = requestAnimationFrame(tick);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const timeoutID: TimeoutID = {
|
|
32
|
-
id: requestAnimationFrame(tick),
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
return timeoutID;
|
|
36
|
-
}
|
package/src/app/demopage.tsx
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { Faas, context } from 'faas-lib/faas-proxy';
|
|
2
|
-
import { Component, CSSProperties, createRef } from 'preact';
|
|
3
|
-
|
|
4
|
-
import { platformAPI } from '../common/frame/platform-api';
|
|
5
|
-
if (!platformAPI.canUsePlatformAPI()) {
|
|
6
|
-
context.withLOG = true;
|
|
7
|
-
context.extraInfoFunction = () => {
|
|
8
|
-
return {
|
|
9
|
-
pdr_app_ver: '0.0.0',
|
|
10
|
-
userinfo: {},
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const bgStyle: CSSProperties = {
|
|
16
|
-
width: '100%',
|
|
17
|
-
height: '100%',
|
|
18
|
-
backgroundColor: 'green',
|
|
19
|
-
display: 'flex',
|
|
20
|
-
flexDirection: 'column',
|
|
21
|
-
alignItems: 'center',
|
|
22
|
-
justifyContent: 'flex-start'
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const contentWrapperStyle: CSSProperties = {
|
|
26
|
-
width: '1334px',
|
|
27
|
-
height: '750px',
|
|
28
|
-
backgroundColor: '#FF000066',
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export class DemoPage extends Component<any, { content: string }>{
|
|
32
|
-
private divRef = createRef();
|
|
33
|
-
|
|
34
|
-
constructor(props) {
|
|
35
|
-
super(props);
|
|
36
|
-
this.state = {
|
|
37
|
-
content: ''
|
|
38
|
-
};
|
|
39
|
-
this.testCallFaas();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
testCallFaas = async () => {
|
|
43
|
-
// let resp = await Faas.Demo_sayHello({name: 'harden'});
|
|
44
|
-
// console.warn('^'.repeat(10), resp);
|
|
45
|
-
// this.setState({
|
|
46
|
-
// content: resp
|
|
47
|
-
// });
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
async componentWillMount() {
|
|
51
|
-
console.log('DemoPage componentWillMount');
|
|
52
|
-
console.log('appId:' + platformAPI.getAppId());
|
|
53
|
-
console.log('appKey:' + platformAPI.getAppKey());
|
|
54
|
-
|
|
55
|
-
window.onclose = () => {
|
|
56
|
-
console.log('DemoPage onclose');
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
componentDidMount() {
|
|
61
|
-
setTimeout(() => {
|
|
62
|
-
let height = window.getComputedStyle(this.divRef.current, null).getPropertyValue('height');
|
|
63
|
-
|
|
64
|
-
console.warn(height, ' height');
|
|
65
|
-
}, 100);
|
|
66
|
-
console.warn(' didmount');
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
render() {
|
|
70
|
-
return (
|
|
71
|
-
<video src={'http://image.smoba.qq.com/Video/playonline/Nobe_Video.mp4'}
|
|
72
|
-
autoPlay={true} muted loop={true}
|
|
73
|
-
ref={this.divRef} style={contentWrapperStyle}>
|
|
74
|
-
</video>
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
}
|
package/src/app/index.html
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" flex="default"/>
|
|
5
|
-
<style>
|
|
6
|
-
body {
|
|
7
|
-
/*background-color: #0c85d0;*/
|
|
8
|
-
display: flex;
|
|
9
|
-
/* flex-direction: column; */
|
|
10
|
-
align-items: center;
|
|
11
|
-
justify-content: center;
|
|
12
|
-
width: 100%;
|
|
13
|
-
height: 100%;
|
|
14
|
-
overflow: hidden ;
|
|
15
|
-
margin: 0px;
|
|
16
|
-
padding: 0px;
|
|
17
|
-
box-sizing: border-box;
|
|
18
|
-
position: relative;
|
|
19
|
-
/* background-color: 'white'; */
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
a{
|
|
23
|
-
color:aliceblue;
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
div{
|
|
28
|
-
display: flex;
|
|
29
|
-
/* flex-direction: column; */
|
|
30
|
-
box-sizing: border-box;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.frame {
|
|
34
|
-
/* border: 2px solid #990000; */
|
|
35
|
-
display: flex;
|
|
36
|
-
flex-direction: column;
|
|
37
|
-
/* flex-basis: content; */
|
|
38
|
-
/*justify-content: space-evenly;*/
|
|
39
|
-
width: 100%;
|
|
40
|
-
height: 100%;
|
|
41
|
-
}
|
|
42
|
-
</style>
|
|
43
|
-
|
|
44
|
-
</head>
|
|
45
|
-
<body>
|
|
46
|
-
<div id="container" class="frame"></div>
|
|
47
|
-
</body>
|
|
48
|
-
</html>
|
package/src/app/main.tsx
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { renderDom } from 'lib/dom';
|
|
2
|
-
import { VideoPlayerDemo } from 'src/pixUIReactComponents/ui/sample/videoplayer/VideoPlayerDemo';
|
|
3
|
-
import { SliderDemo } from 'src/pixUIReactComponents/ui/sample/slider/SliderDemo';
|
|
4
|
-
import { CarouselDemo } from 'src/pixUIReactComponents/ui/sample/carousel/carouselDemo';
|
|
5
|
-
import { Tabs } from 'src/pixUIReactComponents';
|
|
6
|
-
import { TabDemo } from 'src/pixUIReactComponents/ui/sample/tab/TabDemo';
|
|
7
|
-
import { Checkbox } from 'src/pixUIReactComponents/ui/components/checkBox/CheckBox';
|
|
8
|
-
import { CheckboxDemo } from 'src/pixUIReactComponents/ui/sample/checkBox/checkBoxDemo';
|
|
9
|
-
import { SlapfaceDemo } from 'src/pixUIReactComponents/ui/sample/slapface/SlapfaceDemo';
|
|
10
|
-
import {ButtonDemo} from 'src/pixUIReactComponents/ui/sample/button/ButtonDemo';
|
|
11
|
-
import { WaterfallComponentDemo } from 'src/pixUIReactComponents/ui/sample/waterfallcomponent/WaterfallComponentDemo';
|
|
12
|
-
import { ToggleGroupDemo } from 'src/pixUIReactComponents/ui/sample/togglegroup/ToggleGroupDemo';
|
|
13
|
-
|
|
14
|
-
window.addEventListener('load', () => {
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
let render = () => {
|
|
18
|
-
renderDom(
|
|
19
|
-
// <SliderDemo/>,
|
|
20
|
-
// <CarouselDemo/>,
|
|
21
|
-
<SlapfaceDemo/>,
|
|
22
|
-
// <TabDemo/>,
|
|
23
|
-
// <CheckboxDemo />,
|
|
24
|
-
// <WaterfallComponentDemo />,
|
|
25
|
-
// <ButtonDemo/>,
|
|
26
|
-
// <ToggleGroupDemo/>,
|
|
27
|
-
document.getElementById('container')!);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
render();
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|