gomtm 0.0.391 → 0.0.394
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/package.json +49 -38
- package/dist/esm/block/BlockItem.d.ts +0 -14
- package/dist/esm/block/BlockItem.js +0 -202
- package/dist/esm/block/BlockPage.d.ts +0 -15
- package/dist/esm/block/BlockPage.js +0 -197
- package/dist/esm/block/ChildrenDebug.d.ts +0 -15
- package/dist/esm/block/ChildrenDebug.js +0 -177
- package/dist/esm/block/MtBlockSS.d.ts +0 -6
- package/dist/esm/block/MtBlockSS.js +0 -10
- package/dist/esm/block/block-edit/MtBlockEditor.d.ts +0 -2
- package/dist/esm/block/block-edit/MtBlockEditor.js +0 -8
- package/dist/esm/block/block-store.d.ts +0 -14
- package/dist/esm/block/block-store.js +0 -79
- package/dist/esm/block/blockRegister.d.ts +0 -8
- package/dist/esm/block/blockRegister.js +0 -55
- package/dist/esm/block/blocks/Hello2Block.d.ts +0 -4
- package/dist/esm/block/blocks/Hello2Block.js +0 -12
- package/dist/esm/block/blocks/HelloBlock.d.ts +0 -5
- package/dist/esm/block/blocks/HelloBlock.js +0 -14
- package/dist/esm/block/blocks/HelloText.d.ts +0 -4
- package/dist/esm/block/blocks/HelloText.js +0 -12
- package/dist/esm/block/blocks/hello/Hello.d.ts +0 -4
- package/dist/esm/block/blocks/hello/Hello.js +0 -11
- package/dist/esm/block/blocks/hello/edit.d.ts +0 -5
- package/dist/esm/block/blocks/hello/edit.js +0 -15
- package/dist/esm/block/blocks/hello/index.d.ts +0 -9
- package/dist/esm/block/blocks/hello/index.js +0 -29
- package/dist/esm/block/blocks/hello2/index.d.ts +0 -4
- package/dist/esm/block/blocks/hello2/index.js +0 -12
- package/dist/esm/block/consts.d.ts +0 -1
- package/dist/esm/block/consts.js +0 -4
- package/dist/esm/cli/build.d.ts +0 -2
- package/dist/esm/cli/build.js +0 -60
- package/dist/esm/cli/deployMtWorker.d.ts +0 -2
- package/dist/esm/cli/deployMtWorker.js +0 -19
- package/dist/esm/cli/deploy_cf_worker.d.ts +0 -2
- package/dist/esm/cli/deploy_cf_worker.js +0 -70
- package/dist/esm/cli/deploy_mtxcli.d.ts +0 -2
- package/dist/esm/cli/deploy_mtxcli.js +0 -55
- package/dist/esm/cli/deploy_mtxedge.d.ts +0 -2
- package/dist/esm/cli/deploy_mtxedge.js +0 -55
- package/dist/esm/cli/deploy_mtxui.d.ts +0 -2
- package/dist/esm/cli/deploy_mtxui.js +0 -45
- package/dist/esm/cli/up_cf1.d.ts +0 -2
- package/dist/esm/cli/up_cf1.js +0 -29
- package/dist/esm/cli/utils.d.ts +0 -1
- package/dist/esm/cli/utils.js +0 -5
- package/dist/esm/cli/vc_mtxedge.d.ts +0 -2
- package/dist/esm/cli/vc_mtxedge.js +0 -44
- package/dist/esm/components/MtDate.d.ts +0 -6
- package/dist/esm/components/MtDate.js +0 -17
- package/dist/esm/components/MtmErrorView.d.ts +0 -7
- package/dist/esm/components/MtmErrorView.js +0 -16
- package/dist/esm/components/MtmInstallScript.d.ts +0 -2
- package/dist/esm/components/MtmInstallScript.js +0 -16
- package/dist/esm/components/SSR.d.ts +0 -11
- package/dist/esm/components/SSR.js +0 -76
- package/dist/esm/components/Tag.d.ts +0 -6
- package/dist/esm/components/Tag.js +0 -17
- package/dist/esm/components/auth/AuthPage.d.ts +0 -2
- package/dist/esm/components/auth/AuthPage.js +0 -36
- package/dist/esm/components/auth/LoginScreen2.d.ts +0 -2
- package/dist/esm/components/auth/LoginScreen2.js +0 -106
- package/dist/esm/components/auth/UserAuthForm.d.ts +0 -5
- package/dist/esm/components/auth/UserAuthForm.js +0 -76
- package/dist/esm/components/blog/BlogPostCreateForm.d.ts +0 -2
- package/dist/esm/components/blog/BlogPostCreateForm.js +0 -27
- package/dist/esm/components/blog/BlogPostImportDlgUrl.d.ts +0 -6
- package/dist/esm/components/blog/BlogPostImportDlgUrl.js +0 -94
- package/dist/esm/components/blog/PostEditForm.d.ts +0 -2
- package/dist/esm/components/blog/PostEditForm.js +0 -91
- package/dist/esm/components/blog/post-content.d.ts +0 -5
- package/dist/esm/components/blog/post-content.js +0 -15
- package/dist/esm/components/curdView/curdViewEditor.d.ts +0 -7
- package/dist/esm/components/curdView/curdViewEditor.js +0 -109
- package/dist/esm/components/devtools/GoMtmDebug.d.ts +0 -2
- package/dist/esm/components/devtools/GoMtmDebug.js +0 -48
- package/dist/esm/components/formFieldRender/SchemaFormFieldsRender.d.ts +0 -6
- package/dist/esm/components/formFieldRender/SchemaFormFieldsRender.js +0 -46
- package/dist/esm/components/site/SiteInfo.d.ts +0 -2
- package/dist/esm/components/site/SiteInfo.js +0 -15
- package/dist/esm/components/site/SiteSwitchDlg.d.ts +0 -0
- package/dist/esm/components/site/SiteSwitchDlg.js +0 -1
- package/dist/esm/connectquery/call-unary-method.d.ts +0 -8
- package/dist/esm/connectquery/call-unary-method.js +0 -47
- package/dist/esm/connectquery/connect-query-key.d.ts +0 -16
- package/dist/esm/connectquery/connect-query-key.js +0 -15
- package/dist/esm/connectquery/create-use-infinite-query-options.d.ts +0 -22
- package/dist/esm/connectquery/create-use-infinite-query-options.js +0 -93
- package/dist/esm/connectquery/create-use-query-options.d.ts +0 -21
- package/dist/esm/connectquery/create-use-query-options.js +0 -74
- package/dist/esm/connectquery/default-options.d.ts +0 -6
- package/dist/esm/connectquery/default-options.js +0 -9
- package/dist/esm/connectquery/index.d.ts +0 -16
- package/dist/esm/connectquery/index.js +0 -33
- package/dist/esm/connectquery/method-unary-descriptor.d.ts +0 -4
- package/dist/esm/connectquery/method-unary-descriptor.js +0 -0
- package/dist/esm/connectquery/use-infinite-query.d.ts +0 -14
- package/dist/esm/connectquery/use-infinite-query.js +0 -87
- package/dist/esm/connectquery/use-mutation.d.ts +0 -10
- package/dist/esm/connectquery/use-mutation.js +0 -79
- package/dist/esm/connectquery/use-query.d.ts +0 -14
- package/dist/esm/connectquery/use-query.js +0 -75
- package/dist/esm/connectquery/use-transport.d.ts +0 -7
- package/dist/esm/connectquery/use-transport.js +0 -23
- package/dist/esm/connectquery/utils.d.ts +0 -8
- package/dist/esm/connectquery/utils.js +0 -24
- package/dist/esm/consts.d.ts +0 -34
- package/dist/esm/consts.js +0 -70
- package/dist/esm/curd/CreateFormV2.d.ts +0 -16
- package/dist/esm/curd/CreateFormV2.js +0 -81
- package/dist/esm/curd/CurdView.d.ts +0 -4
- package/dist/esm/curd/CurdView.js +0 -35
- package/dist/esm/curd/CurdViewSS.d.ts +0 -4
- package/dist/esm/curd/CurdViewSS.js +0 -69
- package/dist/esm/curd/DynViews.d.ts +0 -6
- package/dist/esm/curd/DynViews.js +0 -69
- package/dist/esm/curd/ListPageCommands.d.ts +0 -2
- package/dist/esm/curd/ListPageCommands.js +0 -25
- package/dist/esm/curd/create/CurdCreatePanel.d.ts +0 -5
- package/dist/esm/curd/create/CurdCreatePanel.js +0 -47
- package/dist/esm/curd/create/useCurdCreate.d.ts +0 -7
- package/dist/esm/curd/create/useCurdCreate.js +0 -25
- package/dist/esm/curd/edit/CurdEditPanel.d.ts +0 -2
- package/dist/esm/curd/edit/CurdEditPanel.js +0 -60
- package/dist/esm/curd/edit/form-context.d.ts +0 -17
- package/dist/esm/curd/edit/form-context.js +0 -92
- package/dist/esm/curd/edit/formStore.d.ts +0 -17
- package/dist/esm/curd/edit/formStore.js +0 -92
- package/dist/esm/curd/edit/useCurdUpdateForm.d.ts +0 -7
- package/dist/esm/curd/edit/useCurdUpdateForm.js +0 -25
- package/dist/esm/curd/form/CurdEditPanel.d.ts +0 -2
- package/dist/esm/curd/form/CurdEditPanel.js +0 -36
- package/dist/esm/curd/form/FormShell.d.ts +0 -2
- package/dist/esm/curd/form/FormShell.js +0 -9
- package/dist/esm/curd/form/GomtmForm.d.ts +0 -2
- package/dist/esm/curd/form/GomtmForm.js +0 -46
- package/dist/esm/curd/form/formStore.d.ts +0 -31
- package/dist/esm/curd/form/formStore.js +0 -188
- package/dist/esm/curd/form/useCurdUpdateForm.d.ts +0 -7
- package/dist/esm/curd/form/useCurdUpdateForm.js +0 -25
- package/dist/esm/curd/form-context.d.ts +0 -17
- package/dist/esm/curd/form-context.js +0 -89
- package/dist/esm/curd/list-item/ListViewLayoutRender.d.ts +0 -15
- package/dist/esm/curd/list-item/ListViewLayoutRender.js +0 -220
- package/dist/esm/curd/listview/CommonListView.d.ts +0 -9
- package/dist/esm/curd/listview/CommonListView.js +0 -139
- package/dist/esm/curd/listview/CommonListViewV2.d.ts +0 -5
- package/dist/esm/curd/listview/CommonListViewV2.js +0 -66
- package/dist/esm/curd/listview/ListViewComponentsSetup.d.ts +0 -3
- package/dist/esm/curd/listview/ListViewComponentsSetup.js +0 -23
- package/dist/esm/curd/listview/ListViewRender.d.ts +0 -2
- package/dist/esm/curd/listview/ListViewRender.js +0 -20
- package/dist/esm/curd/listview/MtListView.d.ts +0 -3
- package/dist/esm/curd/listview/MtListView.js +0 -50
- package/dist/esm/curd/listview/list-store.d.ts +0 -34
- package/dist/esm/curd/listview/list-store.js +0 -90
- package/dist/esm/curd/listview/listview-layouts/default/index.d.ts +0 -2
- package/dist/esm/curd/listview/listview-layouts/default/index.js +0 -9
- package/dist/esm/curd/listview/listview-layouts/listviewlayout-demo/index.d.ts +0 -2
- package/dist/esm/curd/listview/listview-layouts/listviewlayout-demo/index.js +0 -12
- package/dist/esm/curd/mutationButton.d.ts +0 -7
- package/dist/esm/curd/mutationButton.js +0 -14
- package/dist/esm/curd/remove/RemovePanel.d.ts +0 -13
- package/dist/esm/curd/remove/RemovePanel.js +0 -72
- package/dist/esm/form/ConnectEsUpdateForm.d.ts +0 -17
- package/dist/esm/form/ConnectEsUpdateForm.js +0 -78
- package/dist/esm/form/GoMtmForm.d.ts +0 -5
- package/dist/esm/form/GoMtmForm.js +0 -31
- package/dist/esm/form/SchemaFormView.d.ts +0 -14
- package/dist/esm/form/SchemaFormView.js +0 -44
- package/dist/esm/gomtmQuery.d.ts +0 -7
- package/dist/esm/gomtmQuery.js +0 -86
- package/dist/esm/gomtmpb/descriptions/mtm/conf/conf.d.ts +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/conf/conf.js +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/mtps/mtpspb/mtps.d.ts +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/mtps/mtpspb/mtps.js +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/sppb/ai.d.ts +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/sppb/ai.js +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/sppb/av.d.ts +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/sppb/av.js +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/sppb/bot.d.ts +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/sppb/bot.js +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/sppb/conf.d.ts +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/sppb/conf.js +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/sppb/curd.d.ts +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/sppb/curd.js +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/sppb/cx.d.ts +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/sppb/cx.js +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/sppb/events.d.ts +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/sppb/events.js +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/sppb/git.d.ts +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/sppb/git.js +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/sppb/gitproject.d.ts +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/sppb/gitproject.js +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/sppb/mtm.d.ts +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/sppb/mtm.js +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/sppb/sp.d.ts +0 -0
- package/dist/esm/gomtmpb/descriptions/mtm/sppb/sp.js +0 -0
- package/dist/esm/gomtmpb/mtm/conf/conf-ConfService_connectquery.d.ts +0 -53
- package/dist/esm/gomtmpb/mtm/conf/conf-ConfService_connectquery.js +0 -60
- package/dist/esm/gomtmpb/mtm/conf/conf_connect.d.ts +0 -38
- package/dist/esm/gomtmpb/mtm/conf/conf_connect.js +0 -56
- package/dist/esm/gomtmpb/mtm/conf/conf_pb.d.ts +0 -481
- package/dist/esm/gomtmpb/mtm/conf/conf_pb.js +0 -2359
- package/dist/esm/gomtmpb/mtm/mtps/mtpspb/mtps-PsService_connectquery.d.ts +0 -52
- package/dist/esm/gomtmpb/mtm/mtps/mtpspb/mtps-PsService_connectquery.js +0 -59
- package/dist/esm/gomtmpb/mtm/mtps/mtpspb/mtps_connect.d.ts +0 -37
- package/dist/esm/gomtmpb/mtm/mtps/mtpspb/mtps_connect.js +0 -55
- package/dist/esm/gomtmpb/mtm/mtps/mtpspb/mtps_pb.d.ts +0 -154
- package/dist/esm/gomtmpb/mtm/mtps/mtpspb/mtps_pb.js +0 -530
- package/dist/esm/gomtmpb/mtm/sppb/ai-AiService_connectquery.d.ts +0 -22
- package/dist/esm/gomtmpb/mtm/sppb/ai-AiService_connectquery.js +0 -26
- package/dist/esm/gomtmpb/mtm/sppb/ai_connect.d.ts +0 -19
- package/dist/esm/gomtmpb/mtm/sppb/ai_connect.js +0 -32
- package/dist/esm/gomtmpb/mtm/sppb/ai_pb.d.ts +0 -47
- package/dist/esm/gomtmpb/mtm/sppb/ai_pb.js +0 -149
- package/dist/esm/gomtmpb/mtm/sppb/av-AvService_connectquery.d.ts +0 -53
- package/dist/esm/gomtmpb/mtm/sppb/av-AvService_connectquery.js +0 -60
- package/dist/esm/gomtmpb/mtm/sppb/av_connect.d.ts +0 -38
- package/dist/esm/gomtmpb/mtm/sppb/av_connect.js +0 -56
- package/dist/esm/gomtmpb/mtm/sppb/av_pb.d.ts +0 -77
- package/dist/esm/gomtmpb/mtm/sppb/av_pb.js +0 -290
- package/dist/esm/gomtmpb/mtm/sppb/bot-BotService_connectquery.d.ts +0 -173
- package/dist/esm/gomtmpb/mtm/sppb/bot-BotService_connectquery.js +0 -192
- package/dist/esm/gomtmpb/mtm/sppb/bot_connect.d.ts +0 -110
- package/dist/esm/gomtmpb/mtm/sppb/bot_connect.js +0 -180
- package/dist/esm/gomtmpb/mtm/sppb/bot_pb.d.ts +0 -722
- package/dist/esm/gomtmpb/mtm/sppb/bot_pb.js +0 -2291
- package/dist/esm/gomtmpb/mtm/sppb/conf-ConfService_connectquery.d.ts +0 -53
- package/dist/esm/gomtmpb/mtm/sppb/conf-ConfService_connectquery.js +0 -60
- package/dist/esm/gomtmpb/mtm/sppb/conf_connect.d.ts +0 -38
- package/dist/esm/gomtmpb/mtm/sppb/conf_connect.js +0 -56
- package/dist/esm/gomtmpb/mtm/sppb/conf_pb.d.ts +0 -472
- package/dist/esm/gomtmpb/mtm/sppb/conf_pb.js +0 -2357
- package/dist/esm/gomtmpb/mtm/sppb/curd-CurdService_connectquery.d.ts +0 -73
- package/dist/esm/gomtmpb/mtm/sppb/curd-CurdService_connectquery.js +0 -82
- package/dist/esm/gomtmpb/mtm/sppb/curd_connect.d.ts +0 -50
- package/dist/esm/gomtmpb/mtm/sppb/curd_connect.js +0 -79
- package/dist/esm/gomtmpb/mtm/sppb/curd_pb.d.ts +0 -199
- package/dist/esm/gomtmpb/mtm/sppb/curd_pb.js +0 -773
- package/dist/esm/gomtmpb/mtm/sppb/cx-CxService_connectquery.d.ts +0 -133
- package/dist/esm/gomtmpb/mtm/sppb/cx-CxService_connectquery.js +0 -148
- package/dist/esm/gomtmpb/mtm/sppb/cx_connect.d.ts +0 -86
- package/dist/esm/gomtmpb/mtm/sppb/cx_connect.js +0 -141
- package/dist/esm/gomtmpb/mtm/sppb/cx_pb.d.ts +0 -335
- package/dist/esm/gomtmpb/mtm/sppb/cx_pb.js +0 -1618
- package/dist/esm/gomtmpb/mtm/sppb/events_pb.d.ts +0 -231
- package/dist/esm/gomtmpb/mtm/sppb/events_pb.js +0 -874
- package/dist/esm/gomtmpb/mtm/sppb/git-GitService_connectquery.d.ts +0 -63
- package/dist/esm/gomtmpb/mtm/sppb/git-GitService_connectquery.js +0 -71
- package/dist/esm/gomtmpb/mtm/sppb/git_connect.d.ts +0 -44
- package/dist/esm/gomtmpb/mtm/sppb/git_connect.js +0 -67
- package/dist/esm/gomtmpb/mtm/sppb/git_pb.d.ts +0 -108
- package/dist/esm/gomtmpb/mtm/sppb/git_pb.js +0 -311
- package/dist/esm/gomtmpb/mtm/sppb/gitproject-GitProjectService_connectquery.d.ts +0 -12
- package/dist/esm/gomtmpb/mtm/sppb/gitproject-GitProjectService_connectquery.js +0 -15
- package/dist/esm/gomtmpb/mtm/sppb/gitproject_connect.d.ts +0 -13
- package/dist/esm/gomtmpb/mtm/sppb/gitproject_connect.js +0 -19
- package/dist/esm/gomtmpb/mtm/sppb/gitproject_pb.d.ts +0 -23
- package/dist/esm/gomtmpb/mtm/sppb/gitproject_pb.js +0 -67
- package/dist/esm/gomtmpb/mtm/sppb/mtm-MtmService_connectquery.d.ts +0 -392
- package/dist/esm/gomtmpb/mtm/sppb/mtm-MtmService_connectquery.js +0 -433
- package/dist/esm/gomtmpb/mtm/sppb/mtm_connect.d.ts +0 -241
- package/dist/esm/gomtmpb/mtm/sppb/mtm_connect.js +0 -395
- package/dist/esm/gomtmpb/mtm/sppb/mtm_pb.d.ts +0 -1675
- package/dist/esm/gomtmpb/mtm/sppb/mtm_pb.js +0 -6831
- package/dist/esm/gomtmpb/mtm/sppb/sp-SpService_connectquery.d.ts +0 -213
- package/dist/esm/gomtmpb/mtm/sppb/sp-SpService_connectquery.js +0 -236
- package/dist/esm/gomtmpb/mtm/sppb/sp_connect.d.ts +0 -134
- package/dist/esm/gomtmpb/mtm/sppb/sp_connect.js +0 -210
- package/dist/esm/gomtmpb/mtm/sppb/sp_pb.d.ts +0 -684
- package/dist/esm/gomtmpb/mtm/sppb/sp_pb.js +0 -2905
- package/dist/esm/index.d.ts +0 -3
- package/dist/esm/index.js +0 -5
- package/dist/esm/lib/auth/jwt.d.ts +0 -7
- package/dist/esm/lib/auth/jwt.js +0 -43
- package/dist/esm/lib/meta.d.ts +0 -10
- package/dist/esm/lib/meta.js +0 -76
- package/dist/esm/ly/LayoutBase.d.ts +0 -6
- package/dist/esm/ly/LayoutBase.js +0 -83
- package/dist/esm/ly/Lazy.d.ts +0 -2
- package/dist/esm/ly/Lazy.js +0 -12
- package/dist/esm/ly/UserAvatorMenus.d.ts +0 -2
- package/dist/esm/ly/UserAvatorMenus.js +0 -75
- package/dist/esm/ly/dash5/aside.d.ts +0 -2
- package/dist/esm/ly/dash5/aside.js +0 -40
- package/dist/esm/ly/dash5/components/PageCreate.d.ts +0 -4
- package/dist/esm/ly/dash5/components/PageCreate.js +0 -8
- package/dist/esm/ly/dash5/components/PageEdit.d.ts +0 -4
- package/dist/esm/ly/dash5/components/PageEdit.js +0 -8
- package/dist/esm/ly/dash5/components/PageList.d.ts +0 -4
- package/dist/esm/ly/dash5/components/PageList.js +0 -9
- package/dist/esm/ly/dash5/components/PageShow.d.ts +0 -4
- package/dist/esm/ly/dash5/components/PageShow.js +0 -8
- package/dist/esm/ly/dash5/header.d.ts +0 -2
- package/dist/esm/ly/dash5/header.js +0 -124
- package/dist/esm/ly/dash5/index.d.ts +0 -2
- package/dist/esm/ly/dash5/index.js +0 -25
- package/dist/esm/ly/debug-layout/index.d.ts +0 -2
- package/dist/esm/ly/debug-layout/index.js +0 -12
- package/dist/esm/ly/demo-layout/index.d.ts +0 -2
- package/dist/esm/ly/demo-layout/index.js +0 -9
- package/dist/esm/ly/front-layout/PageCmds.d.ts +0 -2
- package/dist/esm/ly/front-layout/PageCmds.js +0 -25
- package/dist/esm/ly/front-layout/PageSearchCmd.d.ts +0 -2
- package/dist/esm/ly/front-layout/PageSearchCmd.js +0 -70
- package/dist/esm/ly/front-layout/header.d.ts +0 -2
- package/dist/esm/ly/front-layout/header.js +0 -18
- package/dist/esm/ly/front-layout/headerv2.d.ts +0 -0
- package/dist/esm/ly/front-layout/headerv2.js +0 -0
- package/dist/esm/ly/front-layout/index.d.ts +0 -2
- package/dist/esm/ly/front-layout/index.js +0 -12
- package/dist/esm/ly/front-layout/main-nav.d.ts +0 -3
- package/dist/esm/ly/front-layout/main-nav.js +0 -116
- package/dist/esm/lzBizComponents.d.ts +0 -5
- package/dist/esm/lzBizComponents.js +0 -15
- package/dist/esm/main.d.ts +0 -2
- package/dist/esm/main.js +0 -34
- package/dist/esm/messageTypeRegistry.d.ts +0 -5
- package/dist/esm/messageTypeRegistry.js +0 -34
- package/dist/esm/mtmFetcher.d.ts +0 -30
- package/dist/esm/mtmFetcher.js +0 -211
- package/dist/esm/providers/AuthProvider.d.ts +0 -9
- package/dist/esm/providers/AuthProvider.js +0 -104
- package/dist/esm/providers/GomtmAppSS.d.ts +0 -2
- package/dist/esm/providers/GomtmAppSS.js +0 -71
- package/dist/esm/providers/LoggerProvider.d.ts +0 -10
- package/dist/esm/providers/LoggerProvider.js +0 -23
- package/dist/esm/providers/ReactQueryProvider.d.ts +0 -4
- package/dist/esm/providers/ReactQueryProvider.js +0 -67
- package/dist/esm/store/App_useTransition.d.ts +0 -2
- package/dist/esm/store/App_useTransition.js +0 -59
- package/dist/esm/store/GomtmAppSetting.d.ts +0 -2
- package/dist/esm/store/GomtmAppSetting.js +0 -18
- package/dist/esm/store/customStorage.d.ts +0 -2
- package/dist/esm/store/customStorage.js +0 -35
- package/dist/esm/store/mtapp-store.d.ts +0 -49
- package/dist/esm/store/mtapp-store.js +0 -157
- package/dist/esm/validations/CrawlerConfig.d.ts +0 -18
- package/dist/esm/validations/CrawlerConfig.js +0 -10
- package/dist/esm/validations/_common.d.ts +0 -57
- package/dist/esm/validations/_common.js +0 -30
- package/dist/esm/validations/auth.d.ts +0 -33
- package/dist/esm/validations/auth.js +0 -18
- package/dist/esm/validations/blog.d.ts +0 -17
- package/dist/esm/validations/blog.js +0 -10
- package/dist/esm/validations/crawlerSchema.d.ts +0 -17
- package/dist/esm/validations/crawlerSchema.js +0 -10
- package/dist/esm/validations/env.d.ts +0 -8
- package/dist/esm/validations/env.js +0 -9
- package/dist/esm/validations/post.d.ts +0 -34
- package/dist/esm/validations/post.js +0 -28
- package/dist/esm/validations/sp.d.ts +0 -18
- package/dist/esm/validations/sp.js +0 -12
- package/dist/esm/validations/spContentModi.d.ts +0 -62
- package/dist/esm/validations/spContentModi.js +0 -30
- package/dist/esm/validations/spHost.d.ts +0 -8
- package/dist/esm/validations/spHost.js +0 -7
- package/dist/esm/validations/spPage.d.ts +0 -14
- package/dist/esm/validations/spPage.js +0 -9
- package/dist/esm/validations/spRoute.d.ts +0 -57
- package/dist/esm/validations/spRoute.js +0 -28
- package/dist/esm/validations/user.d.ts +0 -64
- package/dist/esm/validations/user.js +0 -33
- package/dist/tsconfig.type.tsbuildinfo +0 -1
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
var __async = (__this, __arguments, generator) => {
|
|
3
|
-
return new Promise((resolve, reject) => {
|
|
4
|
-
var fulfilled = (value) => {
|
|
5
|
-
try {
|
|
6
|
-
step(generator.next(value));
|
|
7
|
-
} catch (e) {
|
|
8
|
-
reject(e);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
var rejected = (value) => {
|
|
12
|
-
try {
|
|
13
|
-
step(generator.throw(value));
|
|
14
|
-
} catch (e) {
|
|
15
|
-
reject(e);
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
19
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
import { useQueryClient } from "@tanstack/react-query";
|
|
23
|
-
import { deleteCookie } from "mtxlib/clientlib";
|
|
24
|
-
import { useMtRouter } from "mtxuilib/hooks/use-router";
|
|
25
|
-
import { useRouter, useSearchParams } from "next/navigation";
|
|
26
|
-
import { useCallback, useMemo } from "react";
|
|
27
|
-
import { CONST_COOKIE_MtM_TOKEN_NAME } from "../consts";
|
|
28
|
-
import { useGomtmSuspenseQuery } from "../gomtmQuery";
|
|
29
|
-
import { userinfo } from "../gomtmpb/mtm/sppb/mtm-MtmService_connectquery";
|
|
30
|
-
import { useGomtm } from "../store/mtapp-store";
|
|
31
|
-
function isRoleMatch(currentRoles, allowRoles) {
|
|
32
|
-
if (!currentRoles) {
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
if (!(allowRoles == null ? void 0 : allowRoles.length)) {
|
|
36
|
-
return true;
|
|
37
|
-
}
|
|
38
|
-
for (const roleName of allowRoles) {
|
|
39
|
-
const ok = currentRoles.find((x) => x == roleName);
|
|
40
|
-
if (ok) {
|
|
41
|
-
return true;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return false;
|
|
45
|
-
}
|
|
46
|
-
function useAuth() {
|
|
47
|
-
const cookieStr = useGomtm((x) => x.cookieStr);
|
|
48
|
-
const token = useGomtm((x) => x.token);
|
|
49
|
-
const userInfoQuery = useGomtmSuspenseQuery(userinfo.service.typeName, userinfo.name);
|
|
50
|
-
const userId = useMemo(() => {
|
|
51
|
-
var _a;
|
|
52
|
-
return (_a = userInfoQuery.data.userInfo) == null ? void 0 : _a.ID;
|
|
53
|
-
}, [userInfoQuery.data]);
|
|
54
|
-
return {
|
|
55
|
-
userId
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
function useLogout() {
|
|
59
|
-
const router = useMtRouter();
|
|
60
|
-
const queryClient = useQueryClient();
|
|
61
|
-
const setToken = useGomtm((x) => x.setToken);
|
|
62
|
-
return useCallback(() => {
|
|
63
|
-
deleteCookie(CONST_COOKIE_MtM_TOKEN_NAME);
|
|
64
|
-
setToken("");
|
|
65
|
-
queryClient.invalidateQueries();
|
|
66
|
-
router.refresh();
|
|
67
|
-
}, [setToken, queryClient, router]);
|
|
68
|
-
}
|
|
69
|
-
function useLogin() {
|
|
70
|
-
const searchParams = useSearchParams();
|
|
71
|
-
const router = useRouter();
|
|
72
|
-
const login = useCallback((values) => __async(this, null, function* () {
|
|
73
|
-
const res = yield fetch("/api.v1/auth/login", {
|
|
74
|
-
method: "POST",
|
|
75
|
-
body: JSON.stringify(values)
|
|
76
|
-
});
|
|
77
|
-
const { success } = yield res.json();
|
|
78
|
-
if (success) {
|
|
79
|
-
const nextUrl = searchParams.get("next");
|
|
80
|
-
router.push(nextUrl != null ? nextUrl : "/");
|
|
81
|
-
router.refresh();
|
|
82
|
-
} else {
|
|
83
|
-
alert("Login failed");
|
|
84
|
-
}
|
|
85
|
-
}), [router, searchParams]);
|
|
86
|
-
return {
|
|
87
|
-
login
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
function useIsLogined() {
|
|
91
|
-
const userInfoQuery = useGomtmSuspenseQuery(userinfo.service.typeName, userinfo.name);
|
|
92
|
-
const userId = useMemo(() => {
|
|
93
|
-
var _a;
|
|
94
|
-
return (_a = userInfoQuery.data.userInfo) == null ? void 0 : _a.ID;
|
|
95
|
-
}, [userInfoQuery.data]);
|
|
96
|
-
return !!userId;
|
|
97
|
-
}
|
|
98
|
-
export {
|
|
99
|
-
isRoleMatch,
|
|
100
|
-
useAuth,
|
|
101
|
-
useIsLogined,
|
|
102
|
-
useLogin,
|
|
103
|
-
useLogout
|
|
104
|
-
};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __async = (__this, __arguments, generator) => {
|
|
21
|
-
return new Promise((resolve, reject) => {
|
|
22
|
-
var fulfilled = (value) => {
|
|
23
|
-
try {
|
|
24
|
-
step(generator.next(value));
|
|
25
|
-
} catch (e) {
|
|
26
|
-
reject(e);
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
var rejected = (value) => {
|
|
30
|
-
try {
|
|
31
|
-
step(generator.throw(value));
|
|
32
|
-
} catch (e) {
|
|
33
|
-
reject(e);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
37
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
import { jsx } from "react/jsx-runtime";
|
|
41
|
-
import { cookies, headers } from "next/headers";
|
|
42
|
-
import { PrefetchConnectQuery } from "../components/SSR";
|
|
43
|
-
import { CONST_COOKIE_MtM_TOKEN_NAME, CookieConfigState } from "../consts";
|
|
44
|
-
import { userinfo } from "../gomtmpb/mtm/sppb/mtm-MtmService_connectquery";
|
|
45
|
-
import { ssrGetBackendUrl } from "../mtmFetcher";
|
|
46
|
-
import { GoMtmAppProvider } from "../store/mtapp-store";
|
|
47
|
-
function GomtmAppSS(props) {
|
|
48
|
-
return __async(this, null, function* () {
|
|
49
|
-
var _a, _b;
|
|
50
|
-
const { children } = props;
|
|
51
|
-
const backend = ssrGetBackendUrl();
|
|
52
|
-
const cookiesStr = headers().get("Cookie");
|
|
53
|
-
const configState = JSON.parse(((_a = cookies().get(CookieConfigState)) == null ? void 0 : _a.value) || "{}");
|
|
54
|
-
const cState = configState["state"];
|
|
55
|
-
const token = (_b = cookies().get(CONST_COOKIE_MtM_TOKEN_NAME)) == null ? void 0 : _b.value;
|
|
56
|
-
const gomtmHost = headers().get("host");
|
|
57
|
-
return /* @__PURE__ */ jsx(
|
|
58
|
-
GoMtmAppProvider,
|
|
59
|
-
__spreadProps(__spreadValues({}, cState), {
|
|
60
|
-
cookieStr: cookiesStr || "",
|
|
61
|
-
token,
|
|
62
|
-
backendUrl: (cState == null ? void 0 : cState.backendUrl) || backend,
|
|
63
|
-
gomtmHost,
|
|
64
|
-
children: /* @__PURE__ */ jsx(PrefetchConnectQuery, { svc: userinfo.service.typeName, method: userinfo.name, children })
|
|
65
|
-
})
|
|
66
|
-
);
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
export {
|
|
70
|
-
GomtmAppSS
|
|
71
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
export declare function LoggerProvider(props: {} & PropsWithChildren): import("react").JSX.Element;
|
|
3
|
-
export declare function useLogger(): {
|
|
4
|
-
info: {
|
|
5
|
-
(...data: any[]): void;
|
|
6
|
-
(...data: any[]): void;
|
|
7
|
-
(...data: any[]): void;
|
|
8
|
-
(message?: any, ...optionalParams: any[]): void;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { mtlogger } from "mtxlib/mt-logger";
|
|
4
|
-
import { createContext, useContext, useState } from "react";
|
|
5
|
-
const LoggerContext = createContext(void 0);
|
|
6
|
-
function LoggerProvider(props) {
|
|
7
|
-
const { children } = props;
|
|
8
|
-
const [_logger, setLogger] = useState(mtlogger);
|
|
9
|
-
return /* @__PURE__ */ jsx(LoggerContext.Provider, { value: {
|
|
10
|
-
logger: _logger
|
|
11
|
-
}, children });
|
|
12
|
-
}
|
|
13
|
-
function useLogger() {
|
|
14
|
-
const context = useContext(LoggerContext);
|
|
15
|
-
if (context === void 0) {
|
|
16
|
-
throw new Error("useLogger must be used within a LoggerProvider");
|
|
17
|
-
}
|
|
18
|
-
return { info: mtlogger.log };
|
|
19
|
-
}
|
|
20
|
-
export {
|
|
21
|
-
LoggerProvider,
|
|
22
|
-
useLogger
|
|
23
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
export declare const MtReactQueryProvider: (props: PropsWithChildren) => import("react").JSX.Element;
|
|
3
|
-
export declare function RqErrorBoundary(props: PropsWithChildren): import("react").JSX.Element;
|
|
4
|
-
export declare function RqErrorBoundaryUseHook(props: PropsWithChildren): import("react").JSX.Element;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
import {
|
|
5
|
-
QueryClient,
|
|
6
|
-
QueryClientProvider,
|
|
7
|
-
QueryErrorResetBoundary,
|
|
8
|
-
useQueryErrorResetBoundary
|
|
9
|
-
} from "@tanstack/react-query";
|
|
10
|
-
import { ReactQueryStreamedHydration } from "@tanstack/react-query-next-experimental";
|
|
11
|
-
import { ErrorBoundary } from "react-error-boundary";
|
|
12
|
-
const MtReactQueryProvider = (props) => {
|
|
13
|
-
const { children } = props;
|
|
14
|
-
const [queryClient] = useState(() => new QueryClient({
|
|
15
|
-
// 这里的参数需要 正确设置,因为 设置不正确可能会导致 hydrate 莫名其妙的错误。
|
|
16
|
-
// 其中,默认参数,经测试 hydrate ssr 没问题
|
|
17
|
-
defaultOptions: {
|
|
18
|
-
// 提示: //import { defaultOptions } from "@connectrpc/connect-query"; 中,解决 int64 的问题。
|
|
19
|
-
// 文档:
|
|
20
|
-
// ...defaultOptions,
|
|
21
|
-
queries: {
|
|
22
|
-
// ...defaultOptions.queries,
|
|
23
|
-
refetchOnWindowFocus: false,
|
|
24
|
-
// default: true
|
|
25
|
-
staleTime: Infinity,
|
|
26
|
-
refetchOnMount: false,
|
|
27
|
-
refetchOnReconnect: false,
|
|
28
|
-
retry: false
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}));
|
|
32
|
-
return /* @__PURE__ */ jsx(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx(RqErrorBoundary, { children: /* @__PURE__ */ jsx(ReactQueryStreamedHydration, { children }) }) });
|
|
33
|
-
};
|
|
34
|
-
function RqErrorBoundary(props) {
|
|
35
|
-
const { children } = props;
|
|
36
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(QueryErrorResetBoundary, { children: ({ reset }) => /* @__PURE__ */ jsx(
|
|
37
|
-
ErrorBoundary,
|
|
38
|
-
{
|
|
39
|
-
onReset: reset,
|
|
40
|
-
fallbackRender: ({ resetErrorBoundary, error }) => /* @__PURE__ */ jsxs("div", { className: "green-red-100 prose dark:prose-invert container mx-auto p-8 text-lg", children: [
|
|
41
|
-
/* @__PURE__ */ jsx("div", { className: " pb-8 text-center", children: "some thing error" }),
|
|
42
|
-
/* @__PURE__ */ jsx("div", { children: error == null ? void 0 : error.toString() }),
|
|
43
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ jsx("button", { onClick: () => resetErrorBoundary(), children: "Retry" }) })
|
|
44
|
-
] }),
|
|
45
|
-
children
|
|
46
|
-
}
|
|
47
|
-
) }) });
|
|
48
|
-
}
|
|
49
|
-
function RqErrorBoundaryUseHook(props) {
|
|
50
|
-
const { reset } = useQueryErrorResetBoundary();
|
|
51
|
-
return /* @__PURE__ */ jsx(
|
|
52
|
-
ErrorBoundary,
|
|
53
|
-
{
|
|
54
|
-
onReset: reset,
|
|
55
|
-
fallbackRender: ({ resetErrorBoundary }) => /* @__PURE__ */ jsxs("div", { children: [
|
|
56
|
-
/* @__PURE__ */ jsx("div", { children: "There was an error\uFF08RqErrorBoundaryUseHook\uFF09!" }),
|
|
57
|
-
/* @__PURE__ */ jsx("button", { onClick: () => resetErrorBoundary(), children: "Try again" })
|
|
58
|
-
] }),
|
|
59
|
-
children: props.children
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
export {
|
|
64
|
-
MtReactQueryProvider,
|
|
65
|
-
RqErrorBoundary,
|
|
66
|
-
RqErrorBoundaryUseHook
|
|
67
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Suspense, use, useEffect, useReducer, useTransition } from "react";
|
|
3
|
-
import { createStore } from "zustand";
|
|
4
|
-
const postStore = createStore((set) => ({
|
|
5
|
-
post: fetch(`https://jsonplaceholder.typicode.com/posts/1`).then(
|
|
6
|
-
(res) => res.json()
|
|
7
|
-
),
|
|
8
|
-
fetchPost: (id) => {
|
|
9
|
-
set({
|
|
10
|
-
post: fetch(
|
|
11
|
-
`https://jsonplaceholder.typicode.com/posts/${id}`
|
|
12
|
-
).then((res) => res.json())
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
}));
|
|
16
|
-
const usePostStore = (selector) => {
|
|
17
|
-
const getValue = () => selector(postStore.getState());
|
|
18
|
-
const [value, dispatch] = useReducer(getValue, void 0, getValue);
|
|
19
|
-
useEffect(() => postStore.subscribe(dispatch), [selector]);
|
|
20
|
-
return value;
|
|
21
|
-
};
|
|
22
|
-
const Post = () => {
|
|
23
|
-
const post = use(usePostStore((state) => state.post));
|
|
24
|
-
return /* @__PURE__ */ jsxs("ul", { children: [
|
|
25
|
-
/* @__PURE__ */ jsxs("li", { children: [
|
|
26
|
-
"ID: ",
|
|
27
|
-
post.id
|
|
28
|
-
] }),
|
|
29
|
-
/* @__PURE__ */ jsxs("li", { children: [
|
|
30
|
-
"Title: ",
|
|
31
|
-
post.title
|
|
32
|
-
] }),
|
|
33
|
-
/* @__PURE__ */ jsxs("li", { children: [
|
|
34
|
-
"Body: ",
|
|
35
|
-
post.body
|
|
36
|
-
] })
|
|
37
|
-
] });
|
|
38
|
-
};
|
|
39
|
-
const DemoPostApp = () => {
|
|
40
|
-
const [isPending, startTransition] = useTransition();
|
|
41
|
-
const fetchPostOrig = usePostStore((state) => state.fetchPost);
|
|
42
|
-
const fetchPost = (id) => {
|
|
43
|
-
startTransition(() => {
|
|
44
|
-
fetchPostOrig(id);
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
return /* @__PURE__ */ jsxs("div", { children: [
|
|
48
|
-
/* @__PURE__ */ jsx("button", { onClick: () => fetchPost(1), children: "Fetch post 1" }),
|
|
49
|
-
/* @__PURE__ */ jsx("button", { onClick: () => fetchPost(2), children: "Fetch post 2" }),
|
|
50
|
-
/* @__PURE__ */ jsx("button", { onClick: () => fetchPost(3), children: "Fetch post 3" }),
|
|
51
|
-
/* @__PURE__ */ jsx("button", { onClick: () => fetchPost(4), children: "Fetch post 4" }),
|
|
52
|
-
isPending && /* @__PURE__ */ jsx("div", { children: "Pending..." }),
|
|
53
|
-
/* @__PURE__ */ jsx("hr", {}),
|
|
54
|
-
/* @__PURE__ */ jsx(Suspense, { fallback: "Loading...", children: /* @__PURE__ */ jsx(Post, {}) })
|
|
55
|
-
] });
|
|
56
|
-
};
|
|
57
|
-
export {
|
|
58
|
-
DemoPostApp
|
|
59
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Dialog, DialogContent, DialogTrigger } from "mtxuilib/ui/dialog";
|
|
4
|
-
import { MtButton } from "mtxuilib/ui/ui-mt/Button";
|
|
5
|
-
import { useGomtm } from "./mtapp-store";
|
|
6
|
-
const GomtmAppSetting = () => {
|
|
7
|
-
const setCacheEnabled = useGomtm((x) => x.setCacheEnabled);
|
|
8
|
-
const cacheEnabled = useGomtm((x) => x.cacheEnabled);
|
|
9
|
-
return /* @__PURE__ */ jsxs(Dialog, { children: [
|
|
10
|
-
/* @__PURE__ */ jsx(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx(MtButton, { children: "app setting" }) }),
|
|
11
|
-
/* @__PURE__ */ jsx(DialogContent, { children: /* @__PURE__ */ jsx(MtButton, { onClick: () => {
|
|
12
|
-
setCacheEnabled(!cacheEnabled);
|
|
13
|
-
}, children: "cacheEnabled" }) })
|
|
14
|
-
] });
|
|
15
|
-
};
|
|
16
|
-
export {
|
|
17
|
-
GomtmAppSetting
|
|
18
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
var __async = (__this, __arguments, generator) => {
|
|
2
|
-
return new Promise((resolve, reject) => {
|
|
3
|
-
var fulfilled = (value) => {
|
|
4
|
-
try {
|
|
5
|
-
step(generator.next(value));
|
|
6
|
-
} catch (e) {
|
|
7
|
-
reject(e);
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
var rejected = (value) => {
|
|
11
|
-
try {
|
|
12
|
-
step(generator.throw(value));
|
|
13
|
-
} catch (e) {
|
|
14
|
-
reject(e);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
18
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
import { deleteCookie, getCookie, setCookie } from "mtxlib/clientlib";
|
|
22
|
-
const customCookieStorage = {
|
|
23
|
-
getItem: (name) => __async(void 0, null, function* () {
|
|
24
|
-
return getCookie(name) || null;
|
|
25
|
-
}),
|
|
26
|
-
setItem: (name, value) => __async(void 0, null, function* () {
|
|
27
|
-
yield setCookie(name, value);
|
|
28
|
-
}),
|
|
29
|
-
removeItem: (name) => __async(void 0, null, function* () {
|
|
30
|
-
deleteCookie(name);
|
|
31
|
-
})
|
|
32
|
-
};
|
|
33
|
-
export {
|
|
34
|
-
customCookieStorage
|
|
35
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
export type ActionHandler = (props: {
|
|
3
|
-
action: string;
|
|
4
|
-
values?: any;
|
|
5
|
-
}) => void;
|
|
6
|
-
interface GomtmAppProps {
|
|
7
|
-
debug?: boolean;
|
|
8
|
-
listviewLayout?: string;
|
|
9
|
-
cacheEnabled?: boolean;
|
|
10
|
-
backendUrl?: string;
|
|
11
|
-
layout?: string;
|
|
12
|
-
theme?: string;
|
|
13
|
-
counter?: number;
|
|
14
|
-
params?: any;
|
|
15
|
-
cookieStr?: string;
|
|
16
|
-
token?: string;
|
|
17
|
-
gomtmHost?: string;
|
|
18
|
-
globalSearchParams?: any;
|
|
19
|
-
openDebug?: boolean;
|
|
20
|
-
}
|
|
21
|
-
interface GomtmAppState extends GomtmAppProps {
|
|
22
|
-
loading?: boolean;
|
|
23
|
-
setCounter: (counter: number) => void;
|
|
24
|
-
setLoading: (loading: boolean) => void;
|
|
25
|
-
setDebug: (debug: boolean) => void;
|
|
26
|
-
setLayout: (layout: string) => void;
|
|
27
|
-
setGlobalSearchParams: (globalSearchParams: any) => void;
|
|
28
|
-
setOpenDebug: (openDebug: boolean) => void;
|
|
29
|
-
setCacheEnabled: (cacheEnabled: boolean) => void;
|
|
30
|
-
logout: () => void;
|
|
31
|
-
setToken: (token: string) => void;
|
|
32
|
-
}
|
|
33
|
-
export declare const gomtmContext: import("react").Context<(Omit<import("zustand").StoreApi<GomtmAppState>, "persist"> & {
|
|
34
|
-
persist: {
|
|
35
|
-
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<GomtmAppState, unknown>>) => void;
|
|
36
|
-
clearStorage: () => void;
|
|
37
|
-
rehydrate: () => void | Promise<void>;
|
|
38
|
-
hasHydrated: () => boolean;
|
|
39
|
-
onHydrate: (fn: (state: GomtmAppState) => void) => () => void;
|
|
40
|
-
onFinishHydration: (fn: (state: GomtmAppState) => void) => () => void;
|
|
41
|
-
getOptions: () => Partial<import("zustand/middleware").PersistOptions<GomtmAppState, unknown>>;
|
|
42
|
-
};
|
|
43
|
-
}) | null>;
|
|
44
|
-
type BearProviderProps = React.PropsWithChildren<GomtmAppProps>;
|
|
45
|
-
export declare const GoMtmAppProvider: (props: BearProviderProps) => import("react").JSX.Element;
|
|
46
|
-
export declare function useGomtm<T>(selector: (state: GomtmAppState) => T): T;
|
|
47
|
-
export declare const MtConnectProvider: (props: PropsWithChildren) => import("react").JSX.Element;
|
|
48
|
-
export declare const DebugCounter: () => import("react").JSX.Element;
|
|
49
|
-
export {};
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
-
var __spreadValues = (a, b) => {
|
|
10
|
-
for (var prop in b || (b = {}))
|
|
11
|
-
if (__hasOwnProp.call(b, prop))
|
|
12
|
-
__defNormalProp(a, prop, b[prop]);
|
|
13
|
-
if (__getOwnPropSymbols)
|
|
14
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
-
if (__propIsEnum.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
}
|
|
18
|
-
return a;
|
|
19
|
-
};
|
|
20
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
-
var __objRest = (source, exclude) => {
|
|
22
|
-
var target = {};
|
|
23
|
-
for (var prop in source)
|
|
24
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25
|
-
target[prop] = source[prop];
|
|
26
|
-
if (source != null && __getOwnPropSymbols)
|
|
27
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
28
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
29
|
-
target[prop] = source[prop];
|
|
30
|
-
}
|
|
31
|
-
return target;
|
|
32
|
-
};
|
|
33
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
34
|
-
import { createConnectTransport } from "@connectrpc/connect-web";
|
|
35
|
-
import { deleteCookie } from "mtxlib/clientlib";
|
|
36
|
-
import { MtButton } from "mtxuilib/ui/ui-mt/Button";
|
|
37
|
-
import { createContext, useContext, useMemo, useRef } from "react";
|
|
38
|
-
import { useHotkeys } from "react-hotkeys-hook";
|
|
39
|
-
import { useStore } from "zustand";
|
|
40
|
-
import { createJSONStorage, persist } from "zustand/middleware";
|
|
41
|
-
import { createStore } from "zustand/vanilla";
|
|
42
|
-
import { GoMtmDebug } from "../components/devtools/GoMtmDebug";
|
|
43
|
-
import { TransportProvider } from "../connectquery";
|
|
44
|
-
import { CONST_COOKIE_MtM_TOKEN_NAME, CookieConfigState, HOTKEY_Debug, MTM_API_PREFIX } from "../consts";
|
|
45
|
-
import { anypbTypeReg } from "../messageTypeRegistry";
|
|
46
|
-
import { gomtmFetcher } from "../mtmFetcher";
|
|
47
|
-
import { MtReactQueryProvider } from "../providers/ReactQueryProvider";
|
|
48
|
-
import { customCookieStorage } from "./customStorage";
|
|
49
|
-
const createGomtmAppStore = (initProps) => {
|
|
50
|
-
const DEFAULT_PROPS = {
|
|
51
|
-
debug: false,
|
|
52
|
-
params: {},
|
|
53
|
-
counter: 0
|
|
54
|
-
};
|
|
55
|
-
return createStore()(
|
|
56
|
-
persist(
|
|
57
|
-
(set) => __spreadProps(__spreadValues(__spreadValues({}, DEFAULT_PROPS), initProps), {
|
|
58
|
-
setLoading: (loading) => set({ loading }),
|
|
59
|
-
setDebug: (debug) => set({ debug }),
|
|
60
|
-
setLayout: (layout) => set({ layout }),
|
|
61
|
-
setCacheEnabled: (cacheEnabled) => set({ cacheEnabled }),
|
|
62
|
-
setCounter: (counter) => set({ counter }),
|
|
63
|
-
setGlobalSearchParams: (globalSearchParams) => set({ globalSearchParams }),
|
|
64
|
-
openDebug: false,
|
|
65
|
-
setOpenDebug: (openDebug) => set({ openDebug }),
|
|
66
|
-
logout: () => {
|
|
67
|
-
deleteCookie(CONST_COOKIE_MtM_TOKEN_NAME);
|
|
68
|
-
},
|
|
69
|
-
setToken: (token) => set({ token })
|
|
70
|
-
}),
|
|
71
|
-
{
|
|
72
|
-
name: CookieConfigState,
|
|
73
|
-
// name of the item in the storage (must be unique)
|
|
74
|
-
storage: createJSONStorage(() => customCookieStorage),
|
|
75
|
-
partialize: (state) => {
|
|
76
|
-
return Object.fromEntries(
|
|
77
|
-
Object.entries(state).filter(
|
|
78
|
-
([key]) => {
|
|
79
|
-
return !["cookieStr", "children"].includes(key);
|
|
80
|
-
}
|
|
81
|
-
)
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
)
|
|
86
|
-
);
|
|
87
|
-
};
|
|
88
|
-
const gomtmContext = createContext(null);
|
|
89
|
-
const GoMtmAppProvider = (props) => {
|
|
90
|
-
const _a = props, { children } = _a, etc = __objRest(_a, ["children"]);
|
|
91
|
-
const storeRef = useRef();
|
|
92
|
-
if (!storeRef.current) {
|
|
93
|
-
storeRef.current = createGomtmAppStore(props);
|
|
94
|
-
}
|
|
95
|
-
return /* @__PURE__ */ jsx(gomtmContext.Provider, { value: storeRef.current, children: /* @__PURE__ */ jsxs(MtConnectProvider, { children: [
|
|
96
|
-
/* @__PURE__ */ jsxs(MtReactQueryProvider, { children: [
|
|
97
|
-
/* @__PURE__ */ jsx(GoMtmDebug, {}),
|
|
98
|
-
children
|
|
99
|
-
] }),
|
|
100
|
-
/* @__PURE__ */ jsx(Setup, {})
|
|
101
|
-
] }) });
|
|
102
|
-
};
|
|
103
|
-
function useGomtm(selector) {
|
|
104
|
-
const store = useContext(gomtmContext);
|
|
105
|
-
if (!store)
|
|
106
|
-
throw new Error("userGomtm Missing GoMtmAppProvider in the tree");
|
|
107
|
-
return useStore(store, selector);
|
|
108
|
-
}
|
|
109
|
-
const Setup = () => {
|
|
110
|
-
const setDebug = useGomtm((x) => x.setDebug);
|
|
111
|
-
const debug = useGomtm((x) => x.debug);
|
|
112
|
-
useHotkeys(HOTKEY_Debug, () => {
|
|
113
|
-
console.log("set debug", debug);
|
|
114
|
-
setDebug(!debug);
|
|
115
|
-
}, [debug, setDebug]);
|
|
116
|
-
return null;
|
|
117
|
-
};
|
|
118
|
-
const MtConnectProvider = (props) => {
|
|
119
|
-
const { children } = props;
|
|
120
|
-
const backendUrl = useGomtm((x) => x.backendUrl);
|
|
121
|
-
const cookieStr = useGomtm((x) => x.cookieStr);
|
|
122
|
-
const token = useGomtm((x) => x.token);
|
|
123
|
-
const transport = useMemo(() => {
|
|
124
|
-
const baseApiUrl = new URL(MTM_API_PREFIX, backendUrl || "").toString();
|
|
125
|
-
return createConnectTransport({
|
|
126
|
-
baseUrl: baseApiUrl,
|
|
127
|
-
fetch: gomtmFetcher({
|
|
128
|
-
cookieStr,
|
|
129
|
-
token
|
|
130
|
-
}),
|
|
131
|
-
jsonOptions: {
|
|
132
|
-
typeRegistry: anypbTypeReg
|
|
133
|
-
},
|
|
134
|
-
useHttpGet: true,
|
|
135
|
-
useBinaryFormat: false
|
|
136
|
-
});
|
|
137
|
-
}, [backendUrl, cookieStr, token]);
|
|
138
|
-
return /* @__PURE__ */ jsx(TransportProvider, { transport, children });
|
|
139
|
-
};
|
|
140
|
-
const DebugCounter = () => {
|
|
141
|
-
const counter = useGomtm((x) => x.counter);
|
|
142
|
-
const setCounter = useGomtm((x) => x.setCounter);
|
|
143
|
-
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(MtButton, { onClick: () => {
|
|
144
|
-
setCounter((counter || 0) + 1);
|
|
145
|
-
}, children: [
|
|
146
|
-
"counter:(",
|
|
147
|
-
counter,
|
|
148
|
-
")"
|
|
149
|
-
] }) });
|
|
150
|
-
};
|
|
151
|
-
export {
|
|
152
|
-
DebugCounter,
|
|
153
|
-
GoMtmAppProvider,
|
|
154
|
-
MtConnectProvider,
|
|
155
|
-
gomtmContext,
|
|
156
|
-
useGomtm
|
|
157
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
export declare const crawlerConfigSchema: z.ZodObject<{
|
|
3
|
-
entryUrls: z.ZodString;
|
|
4
|
-
proxy: z.ZodOptional<z.ZodString>;
|
|
5
|
-
maxRequestsPerCrawl: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
6
|
-
queueName: z.ZodOptional<z.ZodString>;
|
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
entryUrls: string;
|
|
9
|
-
proxy?: string | undefined;
|
|
10
|
-
maxRequestsPerCrawl?: number | undefined;
|
|
11
|
-
queueName?: string | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
entryUrls: string;
|
|
14
|
-
proxy?: string | undefined;
|
|
15
|
-
maxRequestsPerCrawl?: number | undefined;
|
|
16
|
-
queueName?: string | undefined;
|
|
17
|
-
}>;
|
|
18
|
-
export type CrawlerConfigType = z.infer<typeof crawlerConfigSchema>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
const crawlerConfigSchema = z.object({
|
|
3
|
-
entryUrls: z.string(),
|
|
4
|
-
proxy: z.string().optional(),
|
|
5
|
-
maxRequestsPerCrawl: z.number().default(1e3).optional(),
|
|
6
|
-
queueName: z.string().optional()
|
|
7
|
-
});
|
|
8
|
-
export {
|
|
9
|
-
crawlerConfigSchema
|
|
10
|
-
};
|