@quan-erp/base-frontend 1.0.0
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/LICENSE.md +49 -0
- package/README.md +80 -0
- package/dist-export/api/ai-assistant/ai-assistant.api.d.ts +14 -0
- package/dist-export/api/ai-assistant/ai-assistant.api.d.ts.map +1 -0
- package/dist-export/api/ai-assistant/ai-assistant.api.js +93 -0
- package/dist-export/api/ai-assistant/ai-assistant.dto.d.ts +54 -0
- package/dist-export/api/ai-assistant/ai-assistant.dto.d.ts.map +1 -0
- package/dist-export/api/ai-assistant/ai-assistant.dto.js +4 -0
- package/dist-export/api/ai-assistant/ai-assistant.export.d.ts +7 -0
- package/dist-export/api/ai-assistant/ai-assistant.export.d.ts.map +1 -0
- package/dist-export/api/ai-assistant/ai-assistant.export.js +7 -0
- package/dist-export/api/ai-model/ai-model.api.d.ts +37 -0
- package/dist-export/api/ai-model/ai-model.api.d.ts.map +1 -0
- package/dist-export/api/ai-model/ai-model.api.js +80 -0
- package/dist-export/api/ai-tool/ai-tool.dto.d.ts +26 -0
- package/dist-export/api/ai-tool/ai-tool.dto.d.ts.map +1 -0
- package/dist-export/api/ai-tool/ai-tool.dto.js +1 -0
- package/dist-export/api/branch/branch.export.d.ts +11 -0
- package/dist-export/api/branch/branch.export.d.ts.map +1 -0
- package/dist-export/api/branch/branch.export.js +12 -0
- package/dist-export/api/branch/branch.type.d.ts +46 -0
- package/dist-export/api/branch/branch.type.d.ts.map +1 -0
- package/dist-export/api/branch/branch.type.js +44 -0
- package/dist-export/api/change-log/change-log.dto.d.ts +41 -0
- package/dist-export/api/change-log/change-log.dto.d.ts.map +1 -0
- package/dist-export/api/change-log/change-log.dto.js +1 -0
- package/dist-export/api/change-log/change-log.export.d.ts +39 -0
- package/dist-export/api/change-log/change-log.export.d.ts.map +1 -0
- package/dist-export/api/change-log/change-log.export.js +18 -0
- package/dist-export/api/currency/currency.export.d.ts +17 -0
- package/dist-export/api/currency/currency.export.d.ts.map +1 -0
- package/dist-export/api/currency/currency.export.js +12 -0
- package/dist-export/api/currency/currency.type.d.ts +21 -0
- package/dist-export/api/currency/currency.type.d.ts.map +1 -0
- package/dist-export/api/currency/currency.type.js +1 -0
- package/dist-export/api/currency-exchange/currency-exchange.export.d.ts +11 -0
- package/dist-export/api/currency-exchange/currency-exchange.export.d.ts.map +1 -0
- package/dist-export/api/currency-exchange/currency-exchange.export.js +12 -0
- package/dist-export/api/currency-exchange/currency-exchange.type.d.ts +33 -0
- package/dist-export/api/currency-exchange/currency-exchange.type.d.ts.map +1 -0
- package/dist-export/api/currency-exchange/currency-exchange.type.js +1 -0
- package/dist-export/api/file/file.export.d.ts +14 -0
- package/dist-export/api/file/file.export.d.ts.map +1 -0
- package/dist-export/api/file/file.export.js +12 -0
- package/dist-export/api/file/file.type.d.ts +39 -0
- package/dist-export/api/file/file.type.d.ts.map +1 -0
- package/dist-export/api/file/file.type.js +10 -0
- package/dist-export/api/firebase/firebase.d.ts +4 -0
- package/dist-export/api/firebase/firebase.d.ts.map +1 -0
- package/dist-export/api/firebase/firebase.dto.d.ts +7 -0
- package/dist-export/api/firebase/firebase.dto.d.ts.map +1 -0
- package/dist-export/api/firebase/firebase.dto.js +1 -0
- package/dist-export/api/firebase/firebase.export.d.ts +2 -0
- package/dist-export/api/firebase/firebase.export.d.ts.map +1 -0
- package/dist-export/api/firebase/firebase.export.js +1 -0
- package/dist-export/api/firebase/firebase.js +35 -0
- package/dist-export/api/location/location.dto.d.ts +28 -0
- package/dist-export/api/location/location.dto.d.ts.map +1 -0
- package/dist-export/api/location/location.dto.js +27 -0
- package/dist-export/api/location/location.export.d.ts +26 -0
- package/dist-export/api/location/location.export.d.ts.map +1 -0
- package/dist-export/api/location/location.export.js +16 -0
- package/dist-export/api/notification/notification.api.d.ts +9 -0
- package/dist-export/api/notification/notification.api.d.ts.map +1 -0
- package/dist-export/api/notification/notification.api.js +45 -0
- package/dist-export/api/notification/notification.export.d.ts +6 -0
- package/dist-export/api/notification/notification.export.d.ts.map +1 -0
- package/dist-export/api/notification/notification.export.js +13 -0
- package/dist-export/api/notification/notification.store.d.ts +8 -0
- package/dist-export/api/notification/notification.store.d.ts.map +1 -0
- package/dist-export/api/notification/notification.store.js +46 -0
- package/dist-export/api/notification/notification.type.d.ts +48 -0
- package/dist-export/api/notification/notification.type.d.ts.map +1 -0
- package/dist-export/api/notification/notification.type.js +1 -0
- package/dist-export/api/partner/partner.export.d.ts +15 -0
- package/dist-export/api/partner/partner.export.d.ts.map +1 -0
- package/dist-export/api/partner/partner.export.js +12 -0
- package/dist-export/api/partner/partner.type.d.ts +41 -0
- package/dist-export/api/partner/partner.type.d.ts.map +1 -0
- package/dist-export/api/partner/partner.type.js +1 -0
- package/dist-export/api/partner-shipping-address/partner-shipping-adderss.export.d.ts +18 -0
- package/dist-export/api/partner-shipping-address/partner-shipping-adderss.export.d.ts.map +1 -0
- package/dist-export/api/partner-shipping-address/partner-shipping-adderss.export.js +13 -0
- package/dist-export/api/partner-shipping-address/partner-shipping-address.type.d.ts +38 -0
- package/dist-export/api/partner-shipping-address/partner-shipping-address.type.d.ts.map +1 -0
- package/dist-export/api/partner-shipping-address/partner-shipping-address.type.js +36 -0
- package/dist-export/api/permission/permission.export.d.ts +8 -0
- package/dist-export/api/permission/permission.export.d.ts.map +1 -0
- package/dist-export/api/permission/permission.export.js +10 -0
- package/dist-export/api/permission/permission.lib.d.ts +5 -0
- package/dist-export/api/permission/permission.lib.d.ts.map +1 -0
- package/dist-export/api/permission/permission.lib.js +24 -0
- package/dist-export/api/permission/permission.type.d.ts +32 -0
- package/dist-export/api/permission/permission.type.d.ts.map +1 -0
- package/dist-export/api/permission/permission.type.js +1 -0
- package/dist-export/api/role-permission/role-permission.api.d.ts +25 -0
- package/dist-export/api/role-permission/role-permission.api.d.ts.map +1 -0
- package/dist-export/api/role-permission/role-permission.api.js +71 -0
- package/dist-export/api/role-permission/role-permission.dto.d.ts +6 -0
- package/dist-export/api/role-permission/role-permission.dto.d.ts.map +1 -0
- package/dist-export/api/role-permission/role-permission.dto.js +1 -0
- package/dist-export/api/role-permission/role-permission.export.d.ts +11 -0
- package/dist-export/api/role-permission/role-permission.export.d.ts.map +1 -0
- package/dist-export/api/role-permission/role-permission.export.js +9 -0
- package/dist-export/api/setting/setting.api.d.ts +14 -0
- package/dist-export/api/setting/setting.api.d.ts.map +1 -0
- package/dist-export/api/setting/setting.api.js +70 -0
- package/dist-export/api/setting/setting.export.d.ts +36 -0
- package/dist-export/api/setting/setting.export.d.ts.map +1 -0
- package/dist-export/api/setting/setting.export.js +17 -0
- package/dist-export/api/setting/setting.store.d.ts +11 -0
- package/dist-export/api/setting/setting.store.d.ts.map +1 -0
- package/dist-export/api/setting/setting.store.js +36 -0
- package/dist-export/api/setting/setting.type.d.ts +44 -0
- package/dist-export/api/setting/setting.type.d.ts.map +1 -0
- package/dist-export/api/setting/setting.type.js +27 -0
- package/dist-export/api/tag/tag.api.d.ts +10 -0
- package/dist-export/api/tag/tag.api.d.ts.map +1 -0
- package/dist-export/api/tag/tag.api.js +60 -0
- package/dist-export/api/tag/tag.dto.d.ts +8 -0
- package/dist-export/api/tag/tag.dto.d.ts.map +1 -0
- package/dist-export/api/tag/tag.dto.js +1 -0
- package/dist-export/api/tag/tag.export.d.ts +10 -0
- package/dist-export/api/tag/tag.export.d.ts.map +1 -0
- package/dist-export/api/tag/tag.export.js +13 -0
- package/dist-export/api/unit/uoc.export.d.ts +11 -0
- package/dist-export/api/unit/uoc.export.d.ts.map +1 -0
- package/dist-export/api/unit/uoc.export.js +13 -0
- package/dist-export/api/unit/uoc.type.d.ts +11 -0
- package/dist-export/api/unit/uoc.type.d.ts.map +1 -0
- package/dist-export/api/unit/uoc.type.js +1 -0
- package/dist-export/api/unit/uom.export.d.ts +14 -0
- package/dist-export/api/unit/uom.export.d.ts.map +1 -0
- package/dist-export/api/unit/uom.export.js +16 -0
- package/dist-export/api/unit/uom.type.d.ts +30 -0
- package/dist-export/api/unit/uom.type.d.ts.map +1 -0
- package/dist-export/api/unit/uom.type.js +1 -0
- package/dist-export/api/user/user.api.d.ts +28 -0
- package/dist-export/api/user/user.api.d.ts.map +1 -0
- package/dist-export/api/user/user.api.js +138 -0
- package/dist-export/api/user/user.export.d.ts +11 -0
- package/dist-export/api/user/user.export.d.ts.map +1 -0
- package/dist-export/api/user/user.export.js +12 -0
- package/dist-export/api/user/user.type.d.ts +49 -0
- package/dist-export/api/user/user.type.d.ts.map +1 -0
- package/dist-export/api/user/user.type.js +20 -0
- package/dist-export/api/workflow/workflow.export.d.ts +41 -0
- package/dist-export/api/workflow/workflow.export.d.ts.map +1 -0
- package/dist-export/api/workflow/workflow.export.js +19 -0
- package/dist-export/api/workflow/workflow.type.d.ts +210 -0
- package/dist-export/api/workflow/workflow.type.d.ts.map +1 -0
- package/dist-export/api/workflow/workflow.type.js +11 -0
- package/dist-export/components/change-log/change-log.export.d.ts +9 -0
- package/dist-export/components/change-log/change-log.export.d.ts.map +1 -0
- package/dist-export/components/change-log/change-log.export.js +6 -0
- package/dist-export/components/home-shortcut-item/home-shortcut-item.export.d.ts +4 -0
- package/dist-export/components/home-shortcut-item/home-shortcut-item.export.d.ts.map +1 -0
- package/dist-export/components/home-shortcut-item/home-shortcut-item.export.js +6 -0
- package/dist-export/components/home-shortcut-item/home-shortcut-item.type.d.ts +5 -0
- package/dist-export/components/home-shortcut-item/home-shortcut-item.type.d.ts.map +1 -0
- package/dist-export/components/home-shortcut-item/home-shortcut-item.type.js +1 -0
- package/dist-export/components/location/location.export.d.ts +8 -0
- package/dist-export/components/location/location.export.d.ts.map +1 -0
- package/dist-export/components/location/location.export.js +16 -0
- package/dist-export/components/location/location.type.d.ts +62 -0
- package/dist-export/components/location/location.type.d.ts.map +1 -0
- package/dist-export/components/location/location.type.js +1 -0
- package/dist-export/components/sportlight-search/sportlight-search.export.d.ts +15 -0
- package/dist-export/components/sportlight-search/sportlight-search.export.d.ts.map +1 -0
- package/dist-export/components/sportlight-search/sportlight-search.export.js +11 -0
- package/dist-export/components/sportlight-search/sportlight-search.type.d.ts +23 -0
- package/dist-export/components/sportlight-search/sportlight-search.type.d.ts.map +1 -0
- package/dist-export/components/sportlight-search/sportlight-search.type.js +5 -0
- package/dist-export/components/tag/tag.dropdown.d.ts +13 -0
- package/dist-export/components/tag/tag.dropdown.d.ts.map +1 -0
- package/dist-export/components/tag/tag.dropdown.export.d.ts +5 -0
- package/dist-export/components/tag/tag.dropdown.export.d.ts.map +1 -0
- package/dist-export/components/tag/tag.dropdown.export.js +6 -0
- package/dist-export/components/tag/tag.dropdown.js +84 -0
- package/dist-export/dto/base.dto.d.ts +6 -0
- package/dist-export/dto/base.dto.d.ts.map +1 -0
- package/dist-export/dto/base.dto.js +1 -0
- package/dist-export/export/export-dashboard.d.ts +5 -0
- package/dist-export/export/export-dashboard.d.ts.map +1 -0
- package/dist-export/export/export-dashboard.js +7 -0
- package/dist-export/export/export-env.d.ts +5 -0
- package/dist-export/export/export-env.d.ts.map +1 -0
- package/dist-export/export/export-env.js +5 -0
- package/dist-export/export/export-navigate.d.ts +3 -0
- package/dist-export/export/export-navigate.d.ts.map +1 -0
- package/dist-export/export/export-navigate.js +7 -0
- package/dist-export/export/export-use-is-contain-in-bottom-nav-bar.d.ts +3 -0
- package/dist-export/export/export-use-is-contain-in-bottom-nav-bar.d.ts.map +1 -0
- package/dist-export/export/export-use-is-contain-in-bottom-nav-bar.js +6 -0
- package/dist-export/export/index.d.ts +6 -0
- package/dist-export/export/index.d.ts.map +1 -0
- package/dist-export/export/index.js +5 -0
- package/dist-export/export.d.ts +131 -0
- package/dist-export/export.d.ts.map +1 -0
- package/dist-export/export.js +143 -0
- package/dist-export/locale/locale.export.d.ts +7 -0
- package/dist-export/locale/locale.export.d.ts.map +1 -0
- package/dist-export/locale/locale.export.js +9 -0
- package/dist-export/locale/locales/en-US.json +145 -0
- package/dist-export/locale/locales/my-MM.json +145 -0
- package/dist-export/locale/locales/zh-CN.json +145 -0
- package/dist-export/page/ai-assistant/ai-assistant.export.d.ts +5 -0
- package/dist-export/page/ai-assistant/ai-assistant.export.d.ts.map +1 -0
- package/dist-export/page/ai-assistant/ai-assistant.export.js +6 -0
- package/dist-export/page/ai-assistant/ai-assistant.locale.d.ts +7 -0
- package/dist-export/page/ai-assistant/ai-assistant.locale.d.ts.map +1 -0
- package/dist-export/page/ai-assistant/ai-assistant.locale.js +9 -0
- package/dist-export/page/ai-assistant/component/assistant.dropdown.d.ts +16 -0
- package/dist-export/page/ai-assistant/component/assistant.dropdown.d.ts.map +1 -0
- package/dist-export/page/ai-assistant/component/assistant.dropdown.js +50 -0
- package/dist-export/page/ai-assistant/component/icon-park-icon.d.ts +9 -0
- package/dist-export/page/ai-assistant/component/icon-park-icon.d.ts.map +1 -0
- package/dist-export/page/ai-assistant/component/icon-park-icon.js +11 -0
- package/dist-export/page/ai-assistant/locales/en-US.json +92 -0
- package/dist-export/page/ai-assistant/locales/my-MM.json +91 -0
- package/dist-export/page/ai-assistant/locales/zh-CN.json +91 -0
- package/dist-export/page/branch/branch.export.d.ts +4 -0
- package/dist-export/page/branch/branch.export.d.ts.map +1 -0
- package/dist-export/page/branch/branch.export.js +6 -0
- package/dist-export/page/branch/branch.types.d.ts +14 -0
- package/dist-export/page/branch/branch.types.d.ts.map +1 -0
- package/dist-export/page/branch/branch.types.js +1 -0
- package/dist-export/page/currency/currency.export.d.ts +6 -0
- package/dist-export/page/currency/currency.export.d.ts.map +1 -0
- package/dist-export/page/currency/currency.export.js +9 -0
- package/dist-export/page/currency/currency.type.d.ts +25 -0
- package/dist-export/page/currency/currency.type.d.ts.map +1 -0
- package/dist-export/page/currency/currency.type.js +1 -0
- package/dist-export/page/partner/partner.export.d.ts +4 -0
- package/dist-export/page/partner/partner.export.d.ts.map +1 -0
- package/dist-export/page/partner/partner.export.js +6 -0
- package/dist-export/page/partner/partner.types.d.ts +15 -0
- package/dist-export/page/partner/partner.types.d.ts.map +1 -0
- package/dist-export/page/partner/partner.types.js +1 -0
- package/dist-export/page/uoc/uoc.export.d.ts +5 -0
- package/dist-export/page/uoc/uoc.export.d.ts.map +1 -0
- package/dist-export/page/uoc/uoc.export.js +9 -0
- package/dist-export/page/uoc/uoc.types.d.ts +25 -0
- package/dist-export/page/uoc/uoc.types.d.ts.map +1 -0
- package/dist-export/page/uoc/uoc.types.js +1 -0
- package/dist-export/page/user/user.export.d.ts +4 -0
- package/dist-export/page/user/user.export.d.ts.map +1 -0
- package/dist-export/page/user/user.export.js +6 -0
- package/dist-export/page/user/user.types.d.ts +14 -0
- package/dist-export/page/user/user.types.d.ts.map +1 -0
- package/dist-export/page/user/user.types.js +1 -0
- package/dist-export/plugin/app-state.d.ts +5 -0
- package/dist-export/plugin/app-state.d.ts.map +1 -0
- package/dist-export/plugin/app-state.js +157 -0
- package/dist-export/plugin/export.d.ts +3 -0
- package/dist-export/plugin/export.d.ts.map +1 -0
- package/dist-export/plugin/export.js +7 -0
- package/dist-export/store/bottom-nav-bar/bottom-nav-bar.export.d.ts +6 -0
- package/dist-export/store/bottom-nav-bar/bottom-nav-bar.export.d.ts.map +1 -0
- package/dist-export/store/bottom-nav-bar/bottom-nav-bar.export.js +6 -0
- package/dist-export/store/bottom-nav-bar/bottom-nav-bar.type.d.ts +8 -0
- package/dist-export/store/bottom-nav-bar/bottom-nav-bar.type.d.ts.map +1 -0
- package/dist-export/store/bottom-nav-bar/bottom-nav-bar.type.js +1 -0
- package/dist-export/store/dto.d.ts +10 -0
- package/dist-export/store/dto.d.ts.map +1 -0
- package/dist-export/store/dto.js +11 -0
- package/dist-export/store/home-shortcut/home-shortcut.export.d.ts +7 -0
- package/dist-export/store/home-shortcut/home-shortcut.export.d.ts.map +1 -0
- package/dist-export/store/home-shortcut/home-shortcut.export.js +9 -0
- package/dist-export/store/home-shortcut/home-shortcut.type.d.ts +20 -0
- package/dist-export/store/home-shortcut/home-shortcut.type.d.ts.map +1 -0
- package/dist-export/store/home-shortcut/home-shortcut.type.js +1 -0
- package/dist-export/store/nav-menu/nav-menu.export.d.ts +6 -0
- package/dist-export/store/nav-menu/nav-menu.export.d.ts.map +1 -0
- package/dist-export/store/nav-menu/nav-menu.export.js +6 -0
- package/dist-export/store/nav-menu/nav-menu.type.d.ts +46 -0
- package/dist-export/store/nav-menu/nav-menu.type.d.ts.map +1 -0
- package/dist-export/store/nav-menu/nav-menu.type.js +1 -0
- package/dist-export/store/partner-detail-tab-store/partner-detail-tab.export.d.ts +3 -0
- package/dist-export/store/partner-detail-tab-store/partner-detail-tab.export.d.ts.map +1 -0
- package/dist-export/store/partner-detail-tab-store/partner-detail-tab.export.js +6 -0
- package/dist-export/store/partner-detail-tab-store/partner-detail-tab.type.d.ts +14 -0
- package/dist-export/store/partner-detail-tab-store/partner-detail-tab.type.d.ts.map +1 -0
- package/dist-export/store/partner-detail-tab-store/partner-detail-tab.type.js +1 -0
- package/dist-export/store/permission-template/permission-template.export.d.ts +7 -0
- package/dist-export/store/permission-template/permission-template.export.d.ts.map +1 -0
- package/dist-export/store/permission-template/permission-template.export.js +9 -0
- package/dist-export/store/permission-template/permission-template.type.d.ts +13 -0
- package/dist-export/store/permission-template/permission-template.type.d.ts.map +1 -0
- package/dist-export/store/permission-template/permission-template.type.js +1 -0
- package/dist-export/store/root-component-store/root-component.export.d.ts +6 -0
- package/dist-export/store/root-component-store/root-component.export.d.ts.map +1 -0
- package/dist-export/store/root-component-store/root-component.export.js +9 -0
- package/dist-export/store/root-component-store/root-component.type.d.ts +7 -0
- package/dist-export/store/root-component-store/root-component.type.d.ts.map +1 -0
- package/dist-export/store/root-component-store/root-component.type.js +1 -0
- package/dist-export/store/web-env/web-env.export.d.ts +6 -0
- package/dist-export/store/web-env/web-env.export.d.ts.map +1 -0
- package/dist-export/store/web-env/web-env.export.js +9 -0
- package/dist-export/store/web-env/web-env.store.d.ts +6 -0
- package/dist-export/store/web-env/web-env.store.d.ts.map +1 -0
- package/dist-export/store/web-env/web-env.store.js +16 -0
- package/dist-export/store/web-env/web-env.type.d.ts +16 -0
- package/dist-export/store/web-env/web-env.type.d.ts.map +1 -0
- package/dist-export/store/web-env/web-env.type.js +1 -0
- package/dist-export/utils/axios-client.d.ts +5 -0
- package/dist-export/utils/axios-client.d.ts.map +1 -0
- package/dist-export/utils/axios-client.js +84 -0
- package/dist-export/utils/common.d.ts +6 -0
- package/dist-export/utils/common.d.ts.map +1 -0
- package/dist-export/utils/common.js +5 -0
- package/dist-export/utils/index.d.ts +3 -0
- package/dist-export/utils/index.d.ts.map +1 -0
- package/dist-export/utils/index.js +2 -0
- package/dist-export/utils/pagination.d.ts +11 -0
- package/dist-export/utils/pagination.d.ts.map +1 -0
- package/dist-export/utils/pagination.js +6 -0
- package/dist-export/utils/react-query-indexed-db-persister.d.ts +7 -0
- package/dist-export/utils/react-query-indexed-db-persister.d.ts.map +1 -0
- package/dist-export/utils/react-query-indexed-db-persister.js +21 -0
- package/dist-export/utils/types.utils.d.ts +2 -0
- package/dist-export/utils/types.utils.d.ts.map +1 -0
- package/dist-export/utils/types.utils.js +1 -0
- package/package.json +182 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { useMutation, useQuery } from "@tanstack/react-query";
|
|
2
|
+
import axiosClient, { refreshClient } from "../../utils/axios-client";
|
|
3
|
+
import { RequestDto } from "@quan-erp/shared-frontend-core";
|
|
4
|
+
import { queryClient, useAppRegistry } from "../../plugin/app-state";
|
|
5
|
+
import { DEFAULT_STALE_TIME } from "../../utils/common";
|
|
6
|
+
import { resolveIndexPagination } from "../../utils/pagination";
|
|
7
|
+
import { withApiMetadataFetchFn } from "../permission/permission.lib";
|
|
8
|
+
export async function getNewAccessToken() {
|
|
9
|
+
const res = await refreshClient.post(`/account/refresh-token`);
|
|
10
|
+
return res.data.payload;
|
|
11
|
+
}
|
|
12
|
+
export const getUsersApi = withApiMetadataFetchFn({
|
|
13
|
+
api: { method: 'GET', url: '/user' },
|
|
14
|
+
fetchFn: async (skip, limit, search) => {
|
|
15
|
+
const response = await axiosClient.get(`/user`, {
|
|
16
|
+
params: {
|
|
17
|
+
skip,
|
|
18
|
+
limit,
|
|
19
|
+
search
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
return response.data.payload;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
export const updateUserByIdApi = withApiMetadataFetchFn({
|
|
26
|
+
api: { method: 'PUT', url: '/user/:id' },
|
|
27
|
+
fetchFn: async (id, user) => {
|
|
28
|
+
const response = await axiosClient.put(`/user/${id}`, new RequestDto(user));
|
|
29
|
+
return response.data;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
const USER_CACHE_QUERY = `user`;
|
|
33
|
+
export function useUserQuery(query = {}, option) {
|
|
34
|
+
const { currentPage, pageSize, skip, query: search } = resolveIndexPagination(query);
|
|
35
|
+
return useQuery({
|
|
36
|
+
queryKey: [USER_CACHE_QUERY, currentPage, pageSize, search],
|
|
37
|
+
queryFn: () => getUsersApi.fetchFn(skip, pageSize, search ?? undefined),
|
|
38
|
+
staleTime: DEFAULT_STALE_TIME,
|
|
39
|
+
retry: false,
|
|
40
|
+
...(option || {}),
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
export function useUpdateUserQuery() {
|
|
44
|
+
return useMutation({
|
|
45
|
+
mutationFn: ({ id, user }) => updateUserByIdApi.fetchFn(id, user),
|
|
46
|
+
onSuccess: (data) => {
|
|
47
|
+
useAppRegistry.getState().queryClient.invalidateQueries({ queryKey: [USER_CACHE_QUERY] });
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
export const createUserApi = withApiMetadataFetchFn({
|
|
52
|
+
api: { method: 'POST', url: '/user' },
|
|
53
|
+
fetchFn: async (user) => {
|
|
54
|
+
const response = await axiosClient.post('/user', new RequestDto(user));
|
|
55
|
+
if (response.data.status === 'error')
|
|
56
|
+
throw new Error(response.data.message);
|
|
57
|
+
return response.data;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
export function useCreateUserQuery() {
|
|
61
|
+
return useMutation({
|
|
62
|
+
mutationFn: (user) => createUserApi.fetchFn(user),
|
|
63
|
+
onSuccess: (data) => {
|
|
64
|
+
useAppRegistry.getState().queryClient.invalidateQueries({ queryKey: [USER_CACHE_QUERY] });
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
export const changePasswordApi = withApiMetadataFetchFn({
|
|
69
|
+
api: { method: 'POST', url: '/account/change-password' },
|
|
70
|
+
fetchFn: async (data) => {
|
|
71
|
+
const response = await axiosClient.post(`/account/change-password`, new RequestDto(data));
|
|
72
|
+
return response.data.payload;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
export function useChangePasswordQuery() {
|
|
76
|
+
return useMutation({
|
|
77
|
+
mutationFn: (data) => changePasswordApi.fetchFn(data),
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
export const resetPasswordApi = withApiMetadataFetchFn({
|
|
81
|
+
api: { method: 'POST', url: '/account/reset-password' },
|
|
82
|
+
fetchFn: async (data) => {
|
|
83
|
+
const response = await axiosClient.post(`/account/reset-password`, new RequestDto(data));
|
|
84
|
+
return response.data.payload;
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
export function useResetPasswordQuery() {
|
|
88
|
+
return useMutation({
|
|
89
|
+
mutationFn: (data) => resetPasswordApi.fetchFn(data),
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
export const getLoggedInDevicesApi = withApiMetadataFetchFn({
|
|
93
|
+
api: { method: 'GET', url: '/account/logged-in-devices' },
|
|
94
|
+
fetchFn: async (skip, limit) => {
|
|
95
|
+
const response = await axiosClient.get(`/account/logged-in-devices?skip=${skip}&limit=${limit}`);
|
|
96
|
+
return response.data.payload;
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
const LOGGED_IN_DEVICE = 'LOGGED_IN_DEVICE';
|
|
100
|
+
export function useLoggedInDeviceQuery(query = {}, option) {
|
|
101
|
+
const { currentPage, pageSize, skip } = resolveIndexPagination(query);
|
|
102
|
+
return useQuery({
|
|
103
|
+
queryFn: () => getLoggedInDevicesApi.fetchFn(skip, pageSize),
|
|
104
|
+
staleTime: DEFAULT_STALE_TIME,
|
|
105
|
+
queryKey: [LOGGED_IN_DEVICE, currentPage, pageSize],
|
|
106
|
+
...(option || {}),
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
export const logoutDeviceApi = withApiMetadataFetchFn({
|
|
110
|
+
api: { method: 'POST', url: '/account/logout-other-device' },
|
|
111
|
+
fetchFn: async (id) => {
|
|
112
|
+
const response = await axiosClient.post(`/account/logout-other-device`, new RequestDto({ id }));
|
|
113
|
+
return response.data.payload;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
export function useLogoutDeviceQuery() {
|
|
117
|
+
return useMutation({
|
|
118
|
+
mutationFn: (id) => logoutDeviceApi.fetchFn(id),
|
|
119
|
+
onSuccess() {
|
|
120
|
+
queryClient.invalidateQueries({ queryKey: [LOGGED_IN_DEVICE] });
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
export const deactivateAccountApi = withApiMetadataFetchFn({
|
|
125
|
+
api: { method: 'POST', url: '/account/deactive' },
|
|
126
|
+
fetchFn: async (data) => {
|
|
127
|
+
const response = await axiosClient.post(`/account/deactive`, new RequestDto(data));
|
|
128
|
+
return response.data.payload;
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
export function useDeactivateAccountQuery() {
|
|
132
|
+
return useMutation({
|
|
133
|
+
mutationFn: (data) => deactivateAccountApi.fetchFn(data),
|
|
134
|
+
onSuccess: () => {
|
|
135
|
+
useAppRegistry.getState().queryClient.invalidateQueries({ queryKey: [USER_CACHE_QUERY] });
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ResponseDto, type RequestIndexPaginationDto } from "@quan-erp/shared-frontend-core";
|
|
2
|
+
import type { UseMutationResult, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
|
|
3
|
+
import type { CreateUserDto, UpdateUserDto, UserDto } from "./user.type";
|
|
4
|
+
export * from './user.type';
|
|
5
|
+
export declare function useUpdateUserQuery(): UseMutationResult<ResponseDto<any>, Error, {
|
|
6
|
+
id: string;
|
|
7
|
+
user: UpdateUserDto;
|
|
8
|
+
}, unknown>;
|
|
9
|
+
export declare function useCreateUserQuery(): UseMutationResult<any, Error, CreateUserDto, unknown>;
|
|
10
|
+
export declare function useUserQuery(query?: RequestIndexPaginationDto, option?: Omit<UseQueryOptions<UserDto[]>, 'queryFn' | 'queryKey'>): UseQueryResult<UserDto[], Error>;
|
|
11
|
+
//# sourceMappingURL=user.export.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.export.d.ts","sourceRoot":"","sources":["../../../src/api/user/user.export.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,WAAW,EAAE,KAAK,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AACxG,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAChG,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEzE,cAAc,aAAa,CAAA;AAO3B,wBAAgB,kBAAkB;QAH1B,MAAM;UACJ,aAAa;YAItB;AAKD,wBAAgB,kBAAkB,0DAEjC;AAUD,wBAAgB,YAAY,CACxB,KAAK,GAAE,yBAA8B,EACrC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,oCAGpE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PluginAPI } from "@quan-erp/shared-frontend-core";
|
|
2
|
+
import { APINames } from "../../export";
|
|
3
|
+
export * from './user.type';
|
|
4
|
+
export function useUpdateUserQuery() {
|
|
5
|
+
return PluginAPI.use('builtin', APINames.useUpdateUserQuery)();
|
|
6
|
+
}
|
|
7
|
+
export function useCreateUserQuery() {
|
|
8
|
+
return PluginAPI.use('builtin', APINames.useCreateUserQuery)();
|
|
9
|
+
}
|
|
10
|
+
export function useUserQuery(query = {}, option) {
|
|
11
|
+
return PluginAPI.use('builtin', APINames.useUserQuery)(query, option);
|
|
12
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { TagDto } from "../tag/tag.dto";
|
|
2
|
+
export interface UserDto {
|
|
3
|
+
id: number;
|
|
4
|
+
name: string;
|
|
5
|
+
username: string;
|
|
6
|
+
createDate: Date;
|
|
7
|
+
updateDate: Date;
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
role: {
|
|
10
|
+
id: number;
|
|
11
|
+
name: string;
|
|
12
|
+
};
|
|
13
|
+
tags: TagDto[];
|
|
14
|
+
}
|
|
15
|
+
export interface UpdateUserDto {
|
|
16
|
+
name: string;
|
|
17
|
+
username: string;
|
|
18
|
+
roleId: number;
|
|
19
|
+
tags?: number[];
|
|
20
|
+
}
|
|
21
|
+
export declare class CreateUserDto {
|
|
22
|
+
username: string;
|
|
23
|
+
name: string;
|
|
24
|
+
password: string;
|
|
25
|
+
roleId: number;
|
|
26
|
+
tags?: number[];
|
|
27
|
+
}
|
|
28
|
+
export declare class ChangePasswordDto {
|
|
29
|
+
userId: number;
|
|
30
|
+
oldPassword: string;
|
|
31
|
+
newPassword: string;
|
|
32
|
+
}
|
|
33
|
+
export declare class ResetPasswordDto {
|
|
34
|
+
userId: number;
|
|
35
|
+
newPassword: string;
|
|
36
|
+
}
|
|
37
|
+
export type LoggedInDevicesDto = {
|
|
38
|
+
id: number;
|
|
39
|
+
createDate: string;
|
|
40
|
+
ipAddress: string;
|
|
41
|
+
expireAt: string;
|
|
42
|
+
device: string;
|
|
43
|
+
isCurrentDevice: boolean;
|
|
44
|
+
};
|
|
45
|
+
export declare class DeactivateAccountDto {
|
|
46
|
+
userId: number;
|
|
47
|
+
deactive: boolean;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=user.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.type.d.ts","sourceRoot":"","sources":["../../../src/api/user/user.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,WAAW,OAAO;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE;QACF,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,IAAI,EAAE,MAAM,EAAE,CAAA;CACjB;AAGD,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAGD,qBAAa,aAAa;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAGD,qBAAa,iBAAiB;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;CACtB;AAKD,qBAAa,gBAAgB;IACzB,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,MAAM,CAAA;CACtB;AAGD,MAAM,MAAM,kBAAkB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,eAAe,EAAE,OAAO,CAAA;CAC3B,CAAA;AAGD,qBAAa,oBAAoB;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,OAAO,CAAA;CACpB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export class CreateUserDto {
|
|
2
|
+
username;
|
|
3
|
+
name;
|
|
4
|
+
password;
|
|
5
|
+
roleId;
|
|
6
|
+
tags;
|
|
7
|
+
}
|
|
8
|
+
export class ChangePasswordDto {
|
|
9
|
+
userId;
|
|
10
|
+
oldPassword;
|
|
11
|
+
newPassword;
|
|
12
|
+
}
|
|
13
|
+
export class ResetPasswordDto {
|
|
14
|
+
userId;
|
|
15
|
+
newPassword;
|
|
16
|
+
}
|
|
17
|
+
export class DeactivateAccountDto {
|
|
18
|
+
userId;
|
|
19
|
+
deactive;
|
|
20
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Edge } from "@xyflow/react";
|
|
2
|
+
import type { GenericNodeData, NodeCustomOutput, WorflowNodeType, Workflow, WorkflowNode, WorkflowScheme } from "./workflow.type";
|
|
3
|
+
import type { ReactNode } from "react";
|
|
4
|
+
export * from './workflow.type';
|
|
5
|
+
export declare function workflowNodes(): WorflowNodeType[];
|
|
6
|
+
type GenericOnSave = ({ edges, nodes, currentNode }: {
|
|
7
|
+
edges: Edge[];
|
|
8
|
+
nodes: WorkflowNode[];
|
|
9
|
+
currentNode: WorkflowNode;
|
|
10
|
+
}) => WorkflowScheme;
|
|
11
|
+
export declare function workflowGenericOnSave(): GenericOnSave;
|
|
12
|
+
type GenericOnLoad = ({ flow, wf }: {
|
|
13
|
+
flow: WorkflowScheme;
|
|
14
|
+
wf: Workflow;
|
|
15
|
+
}) => Edge[];
|
|
16
|
+
export declare function workflowGenericOnLoad(): GenericOnLoad;
|
|
17
|
+
type WorkflowNodeProps = {
|
|
18
|
+
pluginName: string;
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
data: GenericNodeData;
|
|
21
|
+
defaultIcon?: ReactNode;
|
|
22
|
+
defaultLabel?: string;
|
|
23
|
+
defaultIconBg?: string;
|
|
24
|
+
selected?: boolean;
|
|
25
|
+
id: string;
|
|
26
|
+
};
|
|
27
|
+
export declare function WorkflowNode(props: WorkflowNodeProps): ReactNode;
|
|
28
|
+
export declare function createDefaultWorkflowNodeComponent(options: {
|
|
29
|
+
defaultIcon: ReactNode;
|
|
30
|
+
defaultLabel: string;
|
|
31
|
+
pluginName: string;
|
|
32
|
+
defaultIconBg?: string;
|
|
33
|
+
hasInput?: boolean;
|
|
34
|
+
hasOutput?: boolean;
|
|
35
|
+
customOutputs?: NodeCustomOutput[];
|
|
36
|
+
}): ({ id, data, selected }: {
|
|
37
|
+
id: string;
|
|
38
|
+
data: GenericNodeData;
|
|
39
|
+
selected?: boolean;
|
|
40
|
+
}) => ReactNode;
|
|
41
|
+
//# sourceMappingURL=workflow.export.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.export.d.ts","sourceRoot":"","sources":["../../../src/api/workflow/workflow.export.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAClI,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,cAAc,iBAAiB,CAAA;AAE/B,wBAAgB,aAAa,IAAI,eAAe,EAAE,CAEjD;AAOD,KAAK,aAAa,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE;IACjD,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,WAAW,EAAE,YAAY,CAAC;CAC7B,KAAK,cAAc,CAAA;AACpB,wBAAgB,qBAAqB,kBAEpC;AAED,KAAK,aAAa,GAAG,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE;IAChC,IAAI,EAAE,cAAc,CAAC;IACrB,EAAE,EAAE,QAAQ,CAAC;CAChB,KAAK,IAAI,EAAE,CAAA;AACZ,wBAAgB,qBAAqB,kBAEpC;AAUD,KAAK,iBAAiB,GAAG;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,EAAE,eAAe,CAAC;IACtB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;CACd,CAAA;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,aAEpD;AAiBD,wBAAgB,kCAAkC,CAAC,OAAO,EAAE;IACxD,WAAW,EAAE,SAAS,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,gBAAgB,EAAE,CAAC;CACtC,4BAb8B;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,eAAe,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,KAAK,SAAS,CAWd"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PluginAPI } from "@quan-erp/shared-frontend-core";
|
|
2
|
+
import { BUILTIN_PLUGIN } from "../../utils/common";
|
|
3
|
+
import { APINames } from "../../export";
|
|
4
|
+
export * from './workflow.type';
|
|
5
|
+
export function workflowNodes() {
|
|
6
|
+
return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.workflowNodes);
|
|
7
|
+
}
|
|
8
|
+
export function workflowGenericOnSave() {
|
|
9
|
+
return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.workflowGenericOnSave);
|
|
10
|
+
}
|
|
11
|
+
export function workflowGenericOnLoad() {
|
|
12
|
+
return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.workflowGenericOnLoad);
|
|
13
|
+
}
|
|
14
|
+
export function WorkflowNode(props) {
|
|
15
|
+
return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.WorkflowNode)(props);
|
|
16
|
+
}
|
|
17
|
+
export function createDefaultWorkflowNodeComponent(options) {
|
|
18
|
+
return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.createWorkflowNodeComponent)(options);
|
|
19
|
+
}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import type { Connection, Edge, Node } from "@xyflow/react";
|
|
2
|
+
import type { ComponentType } from "react";
|
|
3
|
+
export type NodeResultType<T extends any> = T[];
|
|
4
|
+
export declare class NodeResult {
|
|
5
|
+
static none(): never[];
|
|
6
|
+
static single<T extends any>(obj: T): NodeResultType<T>;
|
|
7
|
+
static multiple<T extends any>(objs: T[]): NodeResultType<T>;
|
|
8
|
+
}
|
|
9
|
+
export type PropsType = ({
|
|
10
|
+
type: 'string';
|
|
11
|
+
} | {
|
|
12
|
+
type: 'string';
|
|
13
|
+
isMultiline: true;
|
|
14
|
+
} | {
|
|
15
|
+
type: 'number';
|
|
16
|
+
} | {
|
|
17
|
+
type: 'boolean';
|
|
18
|
+
} | {
|
|
19
|
+
type: 'date';
|
|
20
|
+
} | {
|
|
21
|
+
type: 'any';
|
|
22
|
+
} | {
|
|
23
|
+
type: 'array';
|
|
24
|
+
items: PropsType;
|
|
25
|
+
} | {
|
|
26
|
+
type: 'array';
|
|
27
|
+
items: PropsType[];
|
|
28
|
+
} | {
|
|
29
|
+
type: 'object';
|
|
30
|
+
properties: Record<string, PropsType | PropsType[]>;
|
|
31
|
+
} | {
|
|
32
|
+
type: 'object';
|
|
33
|
+
properties: 'any';
|
|
34
|
+
} | {
|
|
35
|
+
type: 'enum';
|
|
36
|
+
values: readonly string[];
|
|
37
|
+
}) & {
|
|
38
|
+
label: string;
|
|
39
|
+
};
|
|
40
|
+
export type WorkflowNodeDefination = {
|
|
41
|
+
type: string;
|
|
42
|
+
group: string[] | ['any'] | (['any'] & string[]);
|
|
43
|
+
displayName?: string;
|
|
44
|
+
description?: string;
|
|
45
|
+
props: PropsType;
|
|
46
|
+
isTriggerable: boolean;
|
|
47
|
+
returnType?: {
|
|
48
|
+
type: 'array';
|
|
49
|
+
items: PropsType | PropsType[];
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export type SchemaToType<T> = T extends {
|
|
53
|
+
type: 'any';
|
|
54
|
+
} ? any : T extends {
|
|
55
|
+
type: 'string';
|
|
56
|
+
} ? string : T extends {
|
|
57
|
+
type: 'number';
|
|
58
|
+
} ? number : T extends {
|
|
59
|
+
type: 'boolean';
|
|
60
|
+
} ? boolean : T extends {
|
|
61
|
+
type: 'date';
|
|
62
|
+
} ? Date : T extends {
|
|
63
|
+
type: 'enum';
|
|
64
|
+
values: readonly (infer V)[];
|
|
65
|
+
} ? V : T extends {
|
|
66
|
+
type: 'array';
|
|
67
|
+
items: infer I;
|
|
68
|
+
} ? I extends PropsType ? SchemaToType<I>[] : never : T extends {
|
|
69
|
+
type: 'object';
|
|
70
|
+
properties: infer P;
|
|
71
|
+
} ? P extends Record<string, any> ? {
|
|
72
|
+
[K in keyof P]: SchemaToType<P[K]>;
|
|
73
|
+
} : never : never;
|
|
74
|
+
export type WorkflowScheme = {
|
|
75
|
+
id: string;
|
|
76
|
+
type: string;
|
|
77
|
+
label?: string;
|
|
78
|
+
props?: SchemaToType<PropsType>;
|
|
79
|
+
args?: any;
|
|
80
|
+
metadata?: {
|
|
81
|
+
position: {
|
|
82
|
+
x: number;
|
|
83
|
+
y: number;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
inputJoins: {
|
|
87
|
+
type: string;
|
|
88
|
+
id: string;
|
|
89
|
+
}[];
|
|
90
|
+
joins: {
|
|
91
|
+
type: string;
|
|
92
|
+
id: string;
|
|
93
|
+
}[];
|
|
94
|
+
next?: {
|
|
95
|
+
type: string;
|
|
96
|
+
id: string;
|
|
97
|
+
}[];
|
|
98
|
+
};
|
|
99
|
+
export type Workflow = {
|
|
100
|
+
id: string | number;
|
|
101
|
+
name: string;
|
|
102
|
+
displayName?: string | null;
|
|
103
|
+
description: string;
|
|
104
|
+
init: string | number;
|
|
105
|
+
flows: WorkflowScheme[];
|
|
106
|
+
additionalCanvasItems: any[];
|
|
107
|
+
maxRunDurationInMillisecond?: number;
|
|
108
|
+
maxRetry?: number;
|
|
109
|
+
activate?: boolean;
|
|
110
|
+
};
|
|
111
|
+
export type ExecutionHistoryData = {
|
|
112
|
+
operation: 'execute';
|
|
113
|
+
id: string;
|
|
114
|
+
type: string;
|
|
115
|
+
props: any;
|
|
116
|
+
args: any;
|
|
117
|
+
} | {
|
|
118
|
+
operation: 'return';
|
|
119
|
+
id: string;
|
|
120
|
+
type: string;
|
|
121
|
+
return: any;
|
|
122
|
+
} | {
|
|
123
|
+
operation: 'next';
|
|
124
|
+
id: string;
|
|
125
|
+
type: string;
|
|
126
|
+
next: string[] | null;
|
|
127
|
+
} | {
|
|
128
|
+
operation: 'error';
|
|
129
|
+
id: string;
|
|
130
|
+
type: string;
|
|
131
|
+
error: any;
|
|
132
|
+
} | {
|
|
133
|
+
operation: 'set-variable';
|
|
134
|
+
setVariables: {
|
|
135
|
+
key: string;
|
|
136
|
+
value: any;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
export type ExecutionHistory = ExecutionHistoryData & {
|
|
140
|
+
timestamp: Date;
|
|
141
|
+
};
|
|
142
|
+
export type WorkflowChanges = {
|
|
143
|
+
id: number;
|
|
144
|
+
init: string;
|
|
145
|
+
flow: WorkflowScheme[];
|
|
146
|
+
additionalCanvasItems: any[];
|
|
147
|
+
};
|
|
148
|
+
export interface WorkflowExecutionHistory {
|
|
149
|
+
id: number;
|
|
150
|
+
executionContextId: string;
|
|
151
|
+
workflowId: number;
|
|
152
|
+
workflow?: Workflow;
|
|
153
|
+
history: ExecutionHistory[];
|
|
154
|
+
executedWorkflow?: WorkflowChanges;
|
|
155
|
+
createDate?: string;
|
|
156
|
+
updateDate?: string;
|
|
157
|
+
}
|
|
158
|
+
export type WorkflowNodeData = {
|
|
159
|
+
defination?: WorkflowNodeDefination;
|
|
160
|
+
values?: Record<string, any>;
|
|
161
|
+
label?: string;
|
|
162
|
+
subLabel?: string;
|
|
163
|
+
icon?: React.ReactNode;
|
|
164
|
+
headerBg?: string;
|
|
165
|
+
iconBg?: string;
|
|
166
|
+
hasInput?: boolean;
|
|
167
|
+
[key: string]: any;
|
|
168
|
+
};
|
|
169
|
+
export type WorkflowNode = Node<WorkflowNodeData> & {
|
|
170
|
+
plugin: string;
|
|
171
|
+
};
|
|
172
|
+
export type WorflowNodeType = {
|
|
173
|
+
type: string;
|
|
174
|
+
element: ComponentType<any>;
|
|
175
|
+
onSave: (props: {
|
|
176
|
+
edges: Edge[];
|
|
177
|
+
nodes: WorkflowNode[];
|
|
178
|
+
currentNode: WorkflowNode;
|
|
179
|
+
}) => WorkflowScheme;
|
|
180
|
+
onLoad?: (props: {
|
|
181
|
+
flow: WorkflowScheme;
|
|
182
|
+
wf: Workflow;
|
|
183
|
+
}) => Edge[];
|
|
184
|
+
isValidConnection?: (props: {
|
|
185
|
+
connection: Connection;
|
|
186
|
+
sourceNode: WorkflowNode;
|
|
187
|
+
targetNode: WorkflowNode;
|
|
188
|
+
}) => {
|
|
189
|
+
isValid: boolean;
|
|
190
|
+
message?: string;
|
|
191
|
+
};
|
|
192
|
+
defaultInputHandle?: string;
|
|
193
|
+
};
|
|
194
|
+
export type GenericNodeData = {
|
|
195
|
+
defination?: WorkflowNodeDefination;
|
|
196
|
+
label?: string;
|
|
197
|
+
subLabel?: string;
|
|
198
|
+
icon?: React.ReactNode;
|
|
199
|
+
iconBg?: string;
|
|
200
|
+
values?: any;
|
|
201
|
+
hasInput?: boolean;
|
|
202
|
+
hasOutput?: boolean;
|
|
203
|
+
};
|
|
204
|
+
export type NodeCustomOutput = {
|
|
205
|
+
id: string;
|
|
206
|
+
top: string;
|
|
207
|
+
bgClass: string;
|
|
208
|
+
hoverClass: string;
|
|
209
|
+
};
|
|
210
|
+
//# sourceMappingURL=workflow.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.type.d.ts","sourceRoot":"","sources":["../../../src/api/workflow/workflow.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC,EAAE,CAAA;AAC/C,qBAAa,UAAU;IACnB,MAAM,CAAC,IAAI;IAIX,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC;IAIvD,MAAM,CAAC,QAAQ,CAAC,CAAC,SAAS,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,cAAc,CAAC,CAAC,CAAC;CAG/D;AAID,MAAM,MAAM,SAAS,GAAG,CAClB;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,WAAW,EAAE,IAAI,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE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,UAAU,EAAE,EAAE;IACjD,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;KAClB,CAAA;CACJ,aAEA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PluginAPI } from "@quan-erp/shared-frontend-core";
|
|
2
|
+
import { BUILTIN_PLUGIN } from "../../utils/common";
|
|
3
|
+
import { APINames } from "../../export";
|
|
4
|
+
export function ChangeLog({ reference, pluginName }) {
|
|
5
|
+
return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.ChangeLog)({ reference, pluginName });
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home-shortcut-item.export.d.ts","sourceRoot":"","sources":["../../../src/components/home-shortcut-item/home-shortcut-item.export.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,wBAAgB,YAAY,CAAC,IAAI,EAAE,oBAAoB,aAEtD"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PluginAPI } from "@quan-erp/shared-frontend-core";
|
|
2
|
+
import { BUILTIN_PLUGIN } from "../../utils/common";
|
|
3
|
+
import { APINames } from "../../export";
|
|
4
|
+
export function ShortcutItem(prop) {
|
|
5
|
+
return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.ShortcutItem)(prop);
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home-shortcut-item.type.d.ts","sourceRoot":"","sources":["../../../src/components/home-shortcut-item/home-shortcut-item.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,oBAAoB,GAAG;IAAE,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAA;CAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { CountryDropdownProps, DivisionDropdownProps, StateDropdownProps, TownshipDropdownProps } from "./location.type";
|
|
3
|
+
export * from "./location.type";
|
|
4
|
+
export declare function CountryDropdown(props: CountryDropdownProps): ReactNode;
|
|
5
|
+
export declare function StateDropdown(props: StateDropdownProps): ReactNode;
|
|
6
|
+
export declare function DivisionDropdown(props: DivisionDropdownProps): ReactNode;
|
|
7
|
+
export declare function TownshipDropdown(props: TownshipDropdownProps): ReactNode;
|
|
8
|
+
//# sourceMappingURL=location.export.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"location.export.d.ts","sourceRoot":"","sources":["../../../src/components/location/location.export.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EACR,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACxB,MAAM,iBAAiB,CAAC;AAEzB,cAAc,iBAAiB,CAAC;AAOhC,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,aAE1D;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,aAEtD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,aAE5D;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,aAE5D"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PluginAPI } from "@quan-erp/shared-frontend-core";
|
|
2
|
+
import { APINames } from "../../export";
|
|
3
|
+
import { BUILTIN_PLUGIN } from "../../utils/common";
|
|
4
|
+
export * from "./location.type";
|
|
5
|
+
export function CountryDropdown(props) {
|
|
6
|
+
return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.CountryDropdown)(props);
|
|
7
|
+
}
|
|
8
|
+
export function StateDropdown(props) {
|
|
9
|
+
return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.StateDropdown)(props);
|
|
10
|
+
}
|
|
11
|
+
export function DivisionDropdown(props) {
|
|
12
|
+
return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.DivisionDropdown)(props);
|
|
13
|
+
}
|
|
14
|
+
export function TownshipDropdown(props) {
|
|
15
|
+
return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.TownshipDropdown)(props);
|
|
16
|
+
}
|