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,479 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
Communication protocols
|
|
5
|
-
|
|
6
|
-
Lua->Javascript:
|
|
7
|
-
invoke disposable callback command
|
|
8
|
-
{
|
|
9
|
-
"cmd": "InvokeJavascriptDisposableCallback",
|
|
10
|
-
"args": [...encodedArgs],
|
|
11
|
-
"callbackID": (identifier of javascript callback. NOTICE: CALLBACK CAN ONLY BE CALLED ONCE)
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
invoke non-disposable callback command
|
|
15
|
-
{
|
|
16
|
-
"cmd": "InvokeJavascriptNondisposableCallback",
|
|
17
|
-
"args": [...encodedArgs],
|
|
18
|
-
"callbackID": (identifier of javascript callback, NOTICE: CALLBACK CAN BE CALLED MULITIPLE TIMES)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
invoke lua return processor
|
|
22
|
-
{
|
|
23
|
-
"cmd": "ProcessLuaReturn",
|
|
24
|
-
"args": [...encodedArgs],
|
|
25
|
-
// [callback args of result processor: (issuccess, err, ...returnResults)]
|
|
26
|
-
"callbackID": (identifier of lua return results which used to find signal trigger stored in this.luaResultSignals),
|
|
27
|
-
"callSuccess": (is lua call successfully made),
|
|
28
|
-
"err": (lua error)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
Javascript->Lua:
|
|
32
|
-
normal call command:
|
|
33
|
-
{
|
|
34
|
-
"func": "functionName",
|
|
35
|
-
"args": [...encodedArgs],
|
|
36
|
-
}
|
|
37
|
-
*/
|
|
38
|
-
import { appSettings } from "./appsettings.js"
|
|
39
|
-
|
|
40
|
-
let FUNCARG_OP_CODE = {
|
|
41
|
-
"ADD_DISPOSABLE_FUNC": 0,
|
|
42
|
-
"ADD_NONDISPOSABLE_FUNC": 1,
|
|
43
|
-
"REMOVE_NONDISPOSABLE_FUNC": 2,
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function makeSingleton(cls) {
|
|
47
|
-
return (function () {
|
|
48
|
-
var instance;
|
|
49
|
-
return {
|
|
50
|
-
getInstance: function () {
|
|
51
|
-
if (!instance) {
|
|
52
|
-
instance = new cls();
|
|
53
|
-
}
|
|
54
|
-
return instance;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
})();
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function functionArgEncoder(adapter, funcOpCode, arg) {
|
|
61
|
-
let wrapper = {};
|
|
62
|
-
wrapper.valuetype = "function";
|
|
63
|
-
switch (funcOpCode) {
|
|
64
|
-
case FUNCARG_OP_CODE.ADD_DISPOSABLE_FUNC: {
|
|
65
|
-
wrapper.callbackID = adapter.registerDisposableCallback(arg);
|
|
66
|
-
}; break;
|
|
67
|
-
case FUNCARG_OP_CODE.ADD_NONDISPOSABLE_FUNC: {
|
|
68
|
-
wrapper.callbackID = adapter.registerNondisposableCallback(arg);
|
|
69
|
-
}; break;
|
|
70
|
-
case FUNCARG_OP_CODE.REMOVE_NONDISPOSABLE_FUNC: {
|
|
71
|
-
wrapper.callbackID = adapter.getNondisposableCallbackID(arg);
|
|
72
|
-
if (wrapper.callbackID != undefined)
|
|
73
|
-
adapter.removeNondisposableCallbackByID(wrapper.callbackID);
|
|
74
|
-
}; break;
|
|
75
|
-
}
|
|
76
|
-
wrapper.funcOpCode = funcOpCode;
|
|
77
|
-
return wrapper;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
function objectArgEncoder(adapter, funcOpCode, arg) {
|
|
81
|
-
let wrapper = {};
|
|
82
|
-
wrapper.valuetype = "table";
|
|
83
|
-
wrapper.value = JSON.stringify(arg);
|
|
84
|
-
return wrapper;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function undefinedArgEncoder(adapter, funcOpCode, arg) {
|
|
88
|
-
let wrapper = {};
|
|
89
|
-
wrapper.valuetype = "nil";
|
|
90
|
-
return wrapper;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
let ARG_ENCODERS = {
|
|
95
|
-
"function": functionArgEncoder,
|
|
96
|
-
"object": objectArgEncoder,
|
|
97
|
-
"undefined": undefinedArgEncoder,
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
function encodeArgs(adapter, funcOpCode, ...args) {
|
|
101
|
-
let encodedArgs = [];
|
|
102
|
-
for (let i = 0; i < args.length; ++i) {
|
|
103
|
-
let argtype = typeof(args[i]);
|
|
104
|
-
let encoder = ARG_ENCODERS[argtype];
|
|
105
|
-
if (encoder === undefined) {
|
|
106
|
-
encodedArgs.push(args[i]);
|
|
107
|
-
} else {
|
|
108
|
-
// let arg = encoder(adapter, funcOpCode, args[i]);
|
|
109
|
-
encodedArgs.push(encoder(adapter, funcOpCode, args[i]));
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
return encodedArgs;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
function tableArgDecoder(arg) {
|
|
116
|
-
return JSON.parse(arg.value);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function nilArgDecoder(arg) {
|
|
120
|
-
return undefined;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
let ARG_DECODERS = {
|
|
124
|
-
"table": tableArgDecoder,
|
|
125
|
-
"nil": nilArgDecoder,
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
function decodeArgs(args) {
|
|
129
|
-
let decoededArgs = [];
|
|
130
|
-
for (let i = 0; i < args.length; ++i) {
|
|
131
|
-
let argtype = args[i].valuetype;
|
|
132
|
-
let decoder = ARG_DECODERS[argtype];
|
|
133
|
-
if (decoder === undefined) {
|
|
134
|
-
decoededArgs.push(args[i]);
|
|
135
|
-
} else {
|
|
136
|
-
decoededArgs.push(decoder(args[i]));
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
return decoededArgs;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
let LUA_EVENT_HANDLER_MAPPER = {
|
|
143
|
-
"InvokeJavascriptDisposableCallback": "onInvokeDisposableCallback",
|
|
144
|
-
"InvokeJavascriptNondisposableCallback": "onInvokeNondisposableCallback",
|
|
145
|
-
"ProcessLuaReturn": "onProcessLuaReturn",
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
let PandoraSDKAdapterCls = function () {
|
|
149
|
-
this.callbackID = 0;
|
|
150
|
-
this.disposableCallbacks = {};
|
|
151
|
-
this.nonDisposableCallbacks = {};
|
|
152
|
-
this.luaResultSignals = {};
|
|
153
|
-
this.customMessageHandler = undefined;
|
|
154
|
-
let inst = this;
|
|
155
|
-
if(external.addEventListener){
|
|
156
|
-
external.addEventListener("message", function (msg) {
|
|
157
|
-
let cmd = JSON.parse(msg.data);
|
|
158
|
-
if (LUA_EVENT_HANDLER_MAPPER.hasOwnProperty(cmd.cmd)) {
|
|
159
|
-
let funcName = LUA_EVENT_HANDLER_MAPPER[cmd.cmd];
|
|
160
|
-
if (typeof(inst[funcName]) == "function") {
|
|
161
|
-
inst[funcName](cmd);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
else {
|
|
165
|
-
if (typeof (inst.customMessageHandler) == "function") {
|
|
166
|
-
inst.customMessageHandler(cmd);
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
else {
|
|
170
|
-
// console.log("cmd processor " + cmd.cmd + " not defined");
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
PandoraSDKAdapterCls.prototype.getNewID = function () {
|
|
180
|
-
let id = this.callbackID;
|
|
181
|
-
this.callbackID += 1;
|
|
182
|
-
return id.toString();
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
PandoraSDKAdapterCls.prototype.getNondisposableCallbackID = function(func) {
|
|
186
|
-
for (let k in this.nonDisposableCallbacks) {
|
|
187
|
-
let f = this.nonDisposableCallbacks[k];
|
|
188
|
-
if (func === f) {
|
|
189
|
-
return k;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
return undefined;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
PandoraSDKAdapterCls.prototype.registerCustomMessageHandler = function(handler) {
|
|
196
|
-
this.customMessageHandler = handler;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
PandoraSDKAdapterCls.prototype.registerDisposableCallback = function (callback) {
|
|
200
|
-
let id = this.getNewID();
|
|
201
|
-
this.disposableCallbacks[id] = callback;
|
|
202
|
-
return id;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
PandoraSDKAdapterCls.prototype.registerNondisposableCallback = function (callback) {
|
|
206
|
-
let id = this.getNewID();
|
|
207
|
-
this.nonDisposableCallbacks[id] = callback;
|
|
208
|
-
return id;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
PandoraSDKAdapterCls.prototype.removeNondisposableCallbackByID = function (id) {
|
|
212
|
-
if (this.nonDisposableCallbacks.hasOwnProperty(id)) {
|
|
213
|
-
delete this.nonDisposableCallbacks[id];
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// when callback is invoked, it will be remove from this.disposableCallbacks
|
|
218
|
-
PandoraSDKAdapterCls.prototype.onInvokeDisposableCallback = function (cmd) {
|
|
219
|
-
let id = cmd.callbackID;
|
|
220
|
-
if (id == undefined) {
|
|
221
|
-
return;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
let callback = this.disposableCallbacks[id];
|
|
225
|
-
if (callback == undefined) {
|
|
226
|
-
return;
|
|
227
|
-
}
|
|
228
|
-
delete this.disposableCallbacks[id];
|
|
229
|
-
let args = decodeArgs(cmd.args);
|
|
230
|
-
callback(...args);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
PandoraSDKAdapterCls.prototype.onInvokeNondisposableCallback = function (cmd) {
|
|
234
|
-
let id = cmd.callbackID;
|
|
235
|
-
if (id == undefined) {
|
|
236
|
-
return;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
let callback = this.nonDisposableCallbacks[id];
|
|
240
|
-
if (callback == undefined) {
|
|
241
|
-
return;
|
|
242
|
-
}
|
|
243
|
-
let args = decodeArgs(cmd.args);
|
|
244
|
-
callback(...args);
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
PandoraSDKAdapterCls.prototype.onProcessLuaReturn = function (cmd) {
|
|
248
|
-
let isSuccess = cmd.callSuccess;
|
|
249
|
-
let err = cmd.err;
|
|
250
|
-
let id = cmd.callbackID;
|
|
251
|
-
|
|
252
|
-
if (!this.luaResultSignals.hasOwnProperty(id)) {
|
|
253
|
-
return undefined;
|
|
254
|
-
}
|
|
255
|
-
let results = decodeArgs(cmd.args);
|
|
256
|
-
let signals = this.luaResultSignals[id];
|
|
257
|
-
delete this.luaResultSignals[id];
|
|
258
|
-
|
|
259
|
-
if (isSuccess) {
|
|
260
|
-
if (results.length == 1) {
|
|
261
|
-
signals.procDoneSignal(results[0]);
|
|
262
|
-
return;
|
|
263
|
-
}
|
|
264
|
-
if (results.length <= 0) {
|
|
265
|
-
signals.procDoneSignal();
|
|
266
|
-
return;
|
|
267
|
-
}
|
|
268
|
-
signals.procDoneSignal(results);
|
|
269
|
-
} else {
|
|
270
|
-
signals.procFailedSignal(err);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
let BANNED_FUNCTIONS = {
|
|
275
|
-
"LuaTimer.Add": "LuaTimer is not allowed to call from javascript, use window.setInterval and window.setTimeout instead",
|
|
276
|
-
"LuaTimer.Delete": "LuaTimer is not allowed to call from javascript, use window.setInterval and window.setTimeout instead",
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
let LUAFUNC_ARG_OP_CODE = {
|
|
280
|
-
"EventDispatcher.AddEventListener": FUNCARG_OP_CODE.ADD_NONDISPOSABLE_FUNC,
|
|
281
|
-
"EventDispatcher.RemoveEventListener": FUNCARG_OP_CODE.REMOVE_NONDISPOSABLE_FUNC,
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
PandoraSDKAdapterCls.prototype.callLua = function (funcname, ...args) {
|
|
285
|
-
let bannedMessage = BANNED_FUNCTIONS[funcname];
|
|
286
|
-
if (bannedMessage) {
|
|
287
|
-
console.log(bannedMessage);
|
|
288
|
-
return undefined;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
let cmdobj = {};
|
|
292
|
-
cmdobj.func = funcname;
|
|
293
|
-
let opcode = LUAFUNC_ARG_OP_CODE[funcname];
|
|
294
|
-
if (opcode == undefined) {
|
|
295
|
-
opcode = FUNCARG_OP_CODE.ADD_DISPOSABLE_FUNC;
|
|
296
|
-
}
|
|
297
|
-
cmdobj.args = encodeArgs(this, opcode, ...args);
|
|
298
|
-
let callbackID = this.getNewID();
|
|
299
|
-
cmdobj.callbackID = callbackID;
|
|
300
|
-
|
|
301
|
-
var procDoneSignal;
|
|
302
|
-
var procFailedSignal;
|
|
303
|
-
let promise = new Promise(function(resolve, reject){
|
|
304
|
-
procDoneSignal = resolve;
|
|
305
|
-
procFailedSignal = reject;
|
|
306
|
-
});
|
|
307
|
-
this.luaResultSignals[callbackID] = {
|
|
308
|
-
"procDoneSignal": procDoneSignal,
|
|
309
|
-
"procFailedSignal": procFailedSignal
|
|
310
|
-
};
|
|
311
|
-
|
|
312
|
-
if(external.sendMessage){
|
|
313
|
-
external.sendMessage(JSON.stringify(cmdobj));
|
|
314
|
-
}
|
|
315
|
-
return promise;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
//----------------------
|
|
319
|
-
// 以下是平台API
|
|
320
|
-
//----------------------
|
|
321
|
-
|
|
322
|
-
// 是否可以调用小应用平台SDK API, 同步接口
|
|
323
|
-
// @return bool
|
|
324
|
-
// Example:
|
|
325
|
-
// let canUsePlatformAPI = platformAPI.canUsePlatformAPI()
|
|
326
|
-
PandoraSDKAdapterCls.prototype.canUsePlatformAPI = () => {
|
|
327
|
-
let sdk_info = appSettings.getQueryString("_sdk_info");
|
|
328
|
-
if(sdk_info === "openplatform_unity" ){
|
|
329
|
-
return true;
|
|
330
|
-
}
|
|
331
|
-
return false;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
// 获取 appId
|
|
335
|
-
// @return int
|
|
336
|
-
// let appId = platformAPI.getAppId()
|
|
337
|
-
PandoraSDKAdapterCls.prototype.getAppId = () => {
|
|
338
|
-
return appSettings.getAppInfo().appId;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
// 获取 appKey
|
|
342
|
-
// @return string
|
|
343
|
-
// let appId = platformAPI.getAppKey()
|
|
344
|
-
PandoraSDKAdapterCls.prototype.getAppKey = () => {
|
|
345
|
-
return appSettings.getAppInfo().appKey;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
// Export OpenPlatform SDK API | 结果直接从返回值中获取, 调用时需要在函数前加 await
|
|
349
|
-
// Example :
|
|
350
|
-
// let userdata = await platformAPI.getUserData();
|
|
351
|
-
|
|
352
|
-
// 获取用户登录态,返回值是一个登录态Object, 包括以下字段,均为string类型:
|
|
353
|
-
// sRoleId 角色ID
|
|
354
|
-
// sOpenId 用户标识
|
|
355
|
-
// sServiceType 游戏简称,如完美世界(wmsj,这个是跟接入AMS系统时的代号一致)
|
|
356
|
-
// sAcountType 帐号类型:qq(手Q) wx(微信) ttpp(游客)
|
|
357
|
-
// sArea 大区号,正式环境下微信为1,手Q为2,测试环境下各业务可能各不相同
|
|
358
|
-
// sPartition 小区号(区服)
|
|
359
|
-
// sAppId 应用ID
|
|
360
|
-
// sAccessToken 登录token
|
|
361
|
-
// sPayToken 支付token,手Q有单独的支付token,微信支付token和登录token相同
|
|
362
|
-
// sGameVer 游戏版本号
|
|
363
|
-
// sPlatID 平台ID:0(ios) 1(android)
|
|
364
|
-
// sGameName 游戏名称,跟sServiceType一致
|
|
365
|
-
// sMSDKGameID 只有接入GCloud的业务使用此字段,游戏在MSDK平台注册的应用ID
|
|
366
|
-
// sSdkVersion 潘多拉SDK版本号,如SPEEDM-IOS-1,在SDK升级时会改变,也用于云端规则匹配
|
|
367
|
-
PandoraSDKAdapterCls.prototype.getUserData = async function () {
|
|
368
|
-
return await this.callLua("Common.GetUserDataTable");
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
// 获取平台标识符,返回值类型:string 包括 pc android mac ios
|
|
372
|
-
PandoraSDKAdapterCls.prototype.getPlatformDesc = async function () {
|
|
373
|
-
return await this.callLua("Common.GetPlatformDesc");
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
// 获取App版本号
|
|
377
|
-
// @return : string , 版本号字符串
|
|
378
|
-
PandoraSDKAdapterCls.prototype.getAppVersion = async function () {
|
|
379
|
-
return await this.callLua("Common.GetAppVersion", appSettings.getAppInfo().appId);
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
// 获取是否正式环境
|
|
383
|
-
// @return : bool
|
|
384
|
-
PandoraSDKAdapterCls.prototype.getIsProductEnvironment = async function () {
|
|
385
|
-
return await this.callLua("Common.IsProductEnvironment");
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
// 写文件
|
|
389
|
-
// 注意:为了避免不同活动写入的文件名重复,文件名会被加上appId后缀。文件超过一定时间后(目前是7天)将被自动删除
|
|
390
|
-
// @param fileName 文件名,相对路径,绝对路径是pandora的cookies目录+fileName
|
|
391
|
-
// @param content 文件内容
|
|
392
|
-
// @return 写文件成功返回true;否则返回false
|
|
393
|
-
PandoraSDKAdapterCls.prototype.writeCookie = function(fileName, content){
|
|
394
|
-
this.callLua("Common.WriteCookie" , fileName + "_" + appSettings.getAppInfo().appId, content);
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
// 读文件
|
|
398
|
-
// 注意:为了避免重复,文件名会被加上appId后缀
|
|
399
|
-
// @param fileName 文件名,相对路径,绝对路径是pandora的cookies目录+fileName
|
|
400
|
-
// @return 读取成功返回文件内容,读取失败返回空字符串
|
|
401
|
-
PandoraSDKAdapterCls.prototype.readCookie = async function(fileName){
|
|
402
|
-
return await this.callLua("Common.ReadCookie" , fileName + "_" + appSettings.getAppInfo().appId);
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
// 设置缓存信息
|
|
406
|
-
// @dataKey : string 保存数据的key
|
|
407
|
-
// @dataValue : string 要保存的数据
|
|
408
|
-
PandoraSDKAdapterCls.prototype.setDataStash = async function (dataKey, dataValue) {
|
|
409
|
-
if(arguments.length === 2){
|
|
410
|
-
this.callLua("Common.SetDataStash", appSettings.getAppInfo().appId, appSettings.getAppInfo().appKey, dataKey, dataValue);
|
|
411
|
-
}else if(arguments.length === 3){
|
|
412
|
-
// 兼容旧参数 appId , dataKey, dataValue
|
|
413
|
-
this.callLua("Common.SetDataStash", appSettings.getAppInfo().appId, appSettings.getAppInfo().appKey, arguments[1], arguments[2]);
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
// 获取缓存的信息
|
|
418
|
-
// @dataKey : string 保存数据的key
|
|
419
|
-
// @return : string 保存的数据
|
|
420
|
-
PandoraSDKAdapterCls.prototype.getDataStash = async function (dataKey) {
|
|
421
|
-
return await this.callLua("Common.GetDataStash", appSettings.getAppInfo().appId, dataKey);
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
// 清除缓存的信息
|
|
425
|
-
PandoraSDKAdapterCls.prototype.clearDataStash = async function () {
|
|
426
|
-
this.callLua("Common.ClearDataStash", appSettings.getAppInfo().appId, appSettings.getAppInfo().appKey);
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
// 给游戏发json消息
|
|
430
|
-
// @jsonStr : string 消息字符串
|
|
431
|
-
PandoraSDKAdapterCls.prototype.callGame = async function (jsonStr) {
|
|
432
|
-
this.callLua("Common.CallGame", jsonStr);
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
// JS 异常上报 | 上报字符串类型(用于分析异常)
|
|
436
|
-
// @content : string 上报内容
|
|
437
|
-
PandoraSDKAdapterCls.prototype.reportJSExceptionStringToTdm = function(content){
|
|
438
|
-
this.callLua("Common.ReportJSExceptionToTdm" , content, appSettings.getAppInfo().appId, appSettings.getAppInfo().appKey);
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
// 自定义TAG上报 | TDM上报字符串类型(用于自定义统计)
|
|
442
|
-
// @content : string 上报内容
|
|
443
|
-
// @tag : string 特性点tag
|
|
444
|
-
PandoraSDKAdapterCls.prototype.reportStringToTdm = function(content, tag){
|
|
445
|
-
this.callLua("Common.ReportToTdm" , content, tag, 2, appSettings.getAppInfo().appId, appSettings.getAppInfo().appKey);
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
// 自定义TAG上报 | TDM上报累加类型(用于统计次数)
|
|
449
|
-
// @tag : string 特性点tag
|
|
450
|
-
PandoraSDKAdapterCls.prototype.reportNumberToTdm = function(tag){
|
|
451
|
-
this.callLua("Common.ReportToTdm" , "", tag, 0, appSettings.getAppInfo().appId, appSettings.getAppInfo().appKey);
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
// 经分上报
|
|
455
|
-
PandoraSDKAdapterCls.prototype.reportStats = function(iModule, iChannelId, iType, iActId, iJumpType, sJumpUrl,
|
|
456
|
-
sRecommendId, iChangjingId, iGoodsId, iCountId, iFee,
|
|
457
|
-
iCurrencyType, iActStyle, iFlowId){
|
|
458
|
-
this.callLua("Common.OpenPlatformReportStats" , iModule, iChannelId, iType, iActId, iJumpType, sJumpUrl,
|
|
459
|
-
sRecommendId, iChangjingId, iGoodsId, iCountId, iFee,
|
|
460
|
-
iCurrencyType, iActStyle, iFlowId);
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
// 注册收消息(用来收从别的虚拟机发过来的消息)
|
|
464
|
-
PandoraSDKAdapterCls.prototype.addEventListener = function(eventType, listener){
|
|
465
|
-
this.callLua("EventDispatcher.AddEventListener" , eventType, listener);
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
// 反注册
|
|
469
|
-
PandoraSDKAdapterCls.prototype.removeEventListener = function(eventType, listener){
|
|
470
|
-
this.callLua("EventDispatcher.RemoveEventListener" , eventType, listener);
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
// 发消息
|
|
474
|
-
PandoraSDKAdapterCls.prototype.dispatchEvent = function(eventType, msg){
|
|
475
|
-
this.callLua("EventDispatcher.DispatchEvent" , eventType, msg);
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
let PandoraSDKAdapter = makeSingleton(PandoraSDKAdapterCls);
|
|
479
|
-
export let platformAPI = PandoraSDKAdapter.getInstance();
|
package/src/common/main.less
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
@baseColor: #6dffa7;
|
|
2
|
-
@spinColor: spin(@baseColor, 90);
|
|
3
|
-
|
|
4
|
-
.bottomTabBtn{
|
|
5
|
-
font-size:25px;
|
|
6
|
-
color: black;
|
|
7
|
-
}
|
|
8
|
-
.bottomTabBtnActive{
|
|
9
|
-
font-size:30px;
|
|
10
|
-
color: red;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.btn{
|
|
14
|
-
border: 1px solid black;
|
|
15
|
-
padding: 10px;
|
|
16
|
-
border-radius: 0.5rem;
|
|
17
|
-
justify-content: center;
|
|
18
|
-
cursor: pointer;
|
|
19
|
-
&:hover {
|
|
20
|
-
background-color: rgb(173, 120, 220);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
.title {
|
|
26
|
-
font-size: 1.2em;
|
|
27
|
-
vertical-align: middle;
|
|
28
|
-
//margin-top: 10px;
|
|
29
|
-
color: @spinColor;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.wp95{
|
|
33
|
-
width: 95%;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.redFont{
|
|
37
|
-
color: red;
|
|
38
|
-
display: inline-block;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.flexrow{
|
|
42
|
-
display: flex;
|
|
43
|
-
flex-direction: row;
|
|
44
|
-
justify-content: space-evenly;
|
|
45
|
-
width: 100%;
|
|
46
|
-
// font-size: 35px;
|
|
47
|
-
color: @spinColor
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.App {
|
|
51
|
-
// text-align: center;
|
|
52
|
-
width: 100%;
|
|
53
|
-
height: 100%;
|
|
54
|
-
display: flex;
|
|
55
|
-
flex-direction: column;
|
|
56
|
-
header {
|
|
57
|
-
// background-color: #222;
|
|
58
|
-
background-color: @baseColor;
|
|
59
|
-
padding: 10px;
|
|
60
|
-
color: white;
|
|
61
|
-
text-align: left;
|
|
62
|
-
|
|
63
|
-
.logo {
|
|
64
|
-
animation: App-logo-spin infinite 20s linear;
|
|
65
|
-
height: 40px;
|
|
66
|
-
vertical-align: middle;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.title {
|
|
70
|
-
font-size: 2em;
|
|
71
|
-
vertical-align: middle;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
@keyframes App-logo-spin {
|
|
78
|
-
from {
|
|
79
|
-
transform: rotate(0deg);
|
|
80
|
-
}
|
|
81
|
-
to {
|
|
82
|
-
transform: rotate(360deg);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.menu {
|
|
87
|
-
width: 100%;
|
|
88
|
-
background: rgb(238, 238, 238);
|
|
89
|
-
padding: 10px 0;
|
|
90
|
-
overflow: hidden;
|
|
91
|
-
margin-bottom: 0;
|
|
92
|
-
a {
|
|
93
|
-
:link {
|
|
94
|
-
color: rgb(149, 0, 0);
|
|
95
|
-
}
|
|
96
|
-
:visited {
|
|
97
|
-
color: rgb(0, 149, 0);
|
|
98
|
-
}
|
|
99
|
-
:hover {
|
|
100
|
-
color: #000;
|
|
101
|
-
}
|
|
102
|
-
:active {
|
|
103
|
-
color: rgb(0, 0, 149);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
li {
|
|
107
|
-
list-style: none;
|
|
108
|
-
float: left;
|
|
109
|
-
padding: 0 5px;
|
|
110
|
-
margin-left: 20px;
|
|
111
|
-
color: rgb(149, 0, 0);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.sideList {
|
|
116
|
-
list-style-type: square;
|
|
117
|
-
list-style-position: inside;
|
|
118
|
-
padding-left: 0px;
|
|
119
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "es5",
|
|
4
|
-
"module": "ES6",
|
|
5
|
-
"baseUrl": ".",
|
|
6
|
-
"paths": {
|
|
7
|
-
"preact": ["../../lib/preact/src"],
|
|
8
|
-
},
|
|
9
|
-
"outDir": "../publish_components",
|
|
10
|
-
"allowJs": true,
|
|
11
|
-
"skipLibCheck": true,
|
|
12
|
-
"esModuleInterop": true,
|
|
13
|
-
"allowSyntheticDefaultImports": true,
|
|
14
|
-
"strict": true,
|
|
15
|
-
"forceConsistentCasingInFileNames": true,
|
|
16
|
-
"moduleResolution":"node",
|
|
17
|
-
"resolveJsonModule": true,
|
|
18
|
-
"noImplicitAny": false,
|
|
19
|
-
"jsx":"react",
|
|
20
|
-
"jsxFactory": "h",
|
|
21
|
-
// "sourceMap": false,
|
|
22
|
-
"declaration": true,
|
|
23
|
-
"declarationDir": "../publish_components"
|
|
24
|
-
// "noEmit": true
|
|
25
|
-
},
|
|
26
|
-
"files":[
|
|
27
|
-
"index.js",
|
|
28
|
-
"package.json",
|
|
29
|
-
],
|
|
30
|
-
"include": [
|
|
31
|
-
"ui/components/tab/*",
|
|
32
|
-
"ui/components/slider/*",
|
|
33
|
-
"ui/components/progress/*",
|
|
34
|
-
"ui/components/dropdown/*",
|
|
35
|
-
"ui/components/gradient/*",
|
|
36
|
-
"ui/components/outlinetext",
|
|
37
|
-
"tools/*",
|
|
38
|
-
"ui/components/carousel/*",
|
|
39
|
-
"ui/components/slapface/*",
|
|
40
|
-
"ui/components/slapface/less/*",
|
|
41
|
-
"ui/components/button/*",
|
|
42
|
-
|
|
43
|
-
],
|
|
44
|
-
|
|
45
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Component } from 'preact';
|
|
2
|
-
import { Slapface } from 'src/pixUIReactComponents/ui/components/slapface/Slapface';
|
|
3
|
-
import { Images } from 'src/pixUIReactComponents/ui/sample/Images'
|
|
4
|
-
|
|
5
|
-
const settingsitems = {
|
|
6
|
-
ani_switch_type: 2,
|
|
7
|
-
is_mask: false
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
let jumpButton = {
|
|
11
|
-
pic_changtai: Images.changtai_button,
|
|
12
|
-
pic_yaxia: Images.yaxia_button,
|
|
13
|
-
pic_xuanfu: Images.xuanfu_button
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
let btn_closeButton = Images.btn_close
|
|
17
|
-
|
|
18
|
-
let groupArr = [{ picture: "https://cdn.pixabay.com/photo/2021/03/22/01/55/burger-6113497_1280.jpg", isLoadDone: false, width: 632, height: 639 }, { picture: "https://cdn.pixabay.com/photo/2023/03/07/13/18/fruit-7835730_1280.jpg", isLoadDone: false, width: 304, height: 331 },
|
|
19
|
-
{ picture: "https://cdn.pixabay.com/photo/2023/03/08/20/52/architecture-7838713_1280.jpg", isLoadDone: false, width: 662, height: 631 }, { picture: "https://cdn.pixabay.com/photo/2023/02/12/13/34/bird-7785106_1280.jpg", isLoadDone: false, width: 728, height: 651 },
|
|
20
|
-
{ picture: "https://cdn.pixabay.com/photo/2023/03/06/15/45/coffee-7833769_1280.jpg", isLoadDone: false, width: 630, height: 579 }, { picture: "https://cdn.pixabay.com/photo/2013/07/18/20/26/sea-164989_1280.jpg", isLoadDone: false, width: 703, height: 621 }];
|
|
21
|
-
|
|
22
|
-
export class SlapfaceDemo extends Component<any, any>{
|
|
23
|
-
render() {
|
|
24
|
-
return (
|
|
25
|
-
<div>
|
|
26
|
-
<Slapface LoadGroup={groupArr} jumpButton={jumpButton} settingsitems={settingsitems} pic_loading={Images.loading} btn_closeButton = {Images.btn_close}/>
|
|
27
|
-
</div>
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
}
|