akanjs 2.2.4 → 2.2.6
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/CHANGELOG.md +9 -0
- package/base/base.ts +1 -1
- package/base/primitiveRegistry.ts +6 -10
- package/base/types.ts +1 -4
- package/capacitor.base.config.ts +1 -1
- package/client/capacitor.ts +1 -1
- package/client/cookie.ts +2 -4
- package/client/createFont.ts +2 -2
- package/client/csrTypes.ts +2 -8
- package/client/makePageProto.tsx +4 -10
- package/client/router.ts +3 -8
- package/client/translator.ts +4 -12
- package/common/Logger.ts +1 -4
- package/common/formatNumber.ts +2 -5
- package/common/hmrPhase.ts +1 -1
- package/common/isValidDate.ts +0 -3
- package/constant/fieldInfo.ts +3 -3
- package/constant/purify.ts +1 -2
- package/constant/types.ts +0 -4
- package/constant/via.ts +6 -12
- package/document/databaseRegistry.ts +0 -8
- package/document/into.ts +0 -1
- package/fetch/client/fetchClient.ts +1 -6
- package/fetch/client/httpClient.ts +1 -2
- package/fetch/fetchType/appliedReturn.type.ts +0 -1
- package/fetch/fetchType/endpointFetch.type.ts +0 -3
- package/fetch/fetchType/sliceFetch.type.ts +0 -8
- package/fetch/requestStorage.ts +2 -10
- package/package.json +67 -24
- package/server/akanApp.ts +2 -5
- package/server/akanLib.ts +0 -1
- package/server/akanServer.ts +3 -4
- package/server/artifact/builderRpc.ts +2 -2
- package/server/artifact/ipcTypes.ts +0 -4
- package/server/decorators.ts +1 -1
- package/server/di/diLifecycle.ts +3 -6
- package/server/hmr/clientScript.ts +2 -20
- package/server/hmr/devHmrController.ts +0 -4
- package/server/processMetricsCollector.ts +1 -1
- package/server/resolver/database.resolver.ts +2 -2
- package/server/resolver/resolver.contract.fixture.ts +0 -1
- package/server/resolver/signal.resolver.ts +2 -10
- package/server/routing/apiRouter.ts +2 -4
- package/server/rscClient.tsx +1 -7
- package/server/rscWorkerHost.ts +11 -33
- package/server/ssrFromRscRenderer.tsx +3 -35
- package/server/types/react-server-dom-webpack.d.ts +1 -7
- package/server/vendor/react-dom-client.ts +1 -1
- package/server/vendor/react-dom.ts +2 -3
- package/server/vendor/react-jsx-dev-runtime.ts +1 -1
- package/server/vendor/react-jsx-runtime.ts +1 -1
- package/server/vendor/react-refresh-runtime.ts +2 -2
- package/server/vendor/react-server-dom-webpack-client-browser.ts +1 -1
- package/server/vendor/react.ts +2 -9
- package/server/vendor/scheduler.ts +2 -3
- package/server/webRouter.ts +2 -3
- package/service/adapt.ts +1 -5
- package/service/predefinedAdaptor/cache.adaptor.ts +1 -2
- package/service/predefinedAdaptor/database.adaptor.ts +2 -2
- package/service/predefinedAdaptor/solidSqlite.ts +1 -2
- package/service/predefinedAdaptor/websocket.adaptor.ts +3 -15
- package/service/serve.ts +3 -7
- package/signal/base.signal.ts +0 -1
- package/signal/endpointInfo.ts +0 -7
- package/signal/intercept.ts +0 -2
- package/signal/middleware.ts +1 -2
- package/signal/serverSignal.ts +1 -15
- package/signal/signalContext.ts +1 -1
- package/signal/signalRegistry.ts +0 -5
- package/signal/sliceInfo.ts +0 -3
- package/signal/trace.ts +0 -11
- package/signal/types.ts +2 -11
- package/store/action.ts +3 -5
- package/store/stateBuilder.ts +0 -2
- package/store/stateInfo.ts +1 -2
- package/store/types.ts +1 -1
- package/test/playwright.config.base.ts +5 -28
- package/test/playwright.pageAgent.ts +1 -1
- package/test/sampleOf.ts +1 -1
- package/test/testServer.ts +1 -1
- package/types/base/base.d.ts +53 -0
- package/types/base/baseEnv.d.ts +68 -0
- package/types/base/index.d.ts +6 -0
- package/types/base/primitiveRegistry.d.ts +134 -0
- package/types/base/symbols.d.ts +11 -0
- package/types/base/types.d.ts +68 -0
- package/types/base/utils.d.ts +4 -0
- package/types/base.d.ts +1 -0
- package/types/capacitor.base.config.d.ts +3 -0
- package/types/client/capacitor.d.ts +233 -0
- package/types/client/clientRuntime.d.ts +63 -0
- package/types/client/cookie.d.ts +33 -0
- package/types/client/createFont.d.ts +6 -0
- package/types/client/csrTypes.d.ts +262 -0
- package/types/client/decorators.d.ts +7 -0
- package/types/client/device.d.ts +41 -0
- package/types/client/fetch.d.ts +1 -0
- package/types/client/index.d.ts +14 -0
- package/types/client/locale.d.ts +5 -0
- package/types/client/makePageProto.d.ts +17002 -0
- package/types/client/router.d.ts +66 -0
- package/types/client/rscNavigation.d.ts +19 -0
- package/types/client/storage.d.ts +5 -0
- package/types/client/translator.d.ts +18 -0
- package/types/client/types.d.ts +145 -0
- package/types/client/useClient.d.ts +1 -0
- package/types/client.d.ts +1 -0
- package/types/common/Logger.d.ts +41 -0
- package/types/common/applyMixins.d.ts +3 -0
- package/types/common/capitalize.d.ts +2 -0
- package/types/common/deepObjectify.d.ts +4 -0
- package/types/common/fileUpload.d.ts +28 -0
- package/types/common/formatNumber.d.ts +1 -0
- package/types/common/formatPhone.d.ts +2 -0
- package/types/common/getAllPropertyDescriptors.d.ts +5 -0
- package/types/common/hmrPhase.d.ts +6 -0
- package/types/common/httpClient.d.ts +20 -0
- package/types/common/index.d.ts +29 -0
- package/types/common/isDayjs.d.ts +2 -0
- package/types/common/isEmail.d.ts +2 -0
- package/types/common/isPhoneNumber.d.ts +2 -0
- package/types/common/isQueryEqual.d.ts +1 -0
- package/types/common/isValidDate.d.ts +2 -0
- package/types/common/jwtDecode.d.ts +2 -0
- package/types/common/localeConfig.d.ts +11 -0
- package/types/common/lowerlize.d.ts +2 -0
- package/types/common/mergeVersion.d.ts +10 -0
- package/types/common/objectify.d.ts +1 -0
- package/types/common/pathGet.d.ts +1 -0
- package/types/common/pathSet.d.ts +3 -0
- package/types/common/randomPick.d.ts +1 -0
- package/types/common/randomPicks.d.ts +1 -0
- package/types/common/routeConvention.d.ts +35 -0
- package/types/common/sleep.d.ts +2 -0
- package/types/common/splitVersion.d.ts +11 -0
- package/types/common/subRoute.d.ts +7 -0
- package/types/common/types.d.ts +14 -0
- package/types/common.d.ts +1 -0
- package/types/constant/constantRegistry.d.ts +89 -0
- package/types/constant/crystalize.d.ts +4 -0
- package/types/constant/deserialize.d.ts +7 -0
- package/types/constant/fieldInfo.d.ts +153 -0
- package/types/constant/getDefault.d.ts +3 -0
- package/types/constant/immerify.d.ts +2 -0
- package/types/constant/index.d.ts +10 -0
- package/types/constant/purify.d.ts +12 -0
- package/types/constant/serialize.d.ts +11 -0
- package/types/constant/types.d.ts +77 -0
- package/types/constant/via.d.ts +52 -0
- package/types/constant.d.ts +1 -0
- package/types/dictionary/base.dictionary.d.ts +1 -0
- package/types/dictionary/dictInfo.d.ts +206 -0
- package/types/dictionary/dictionary.d.ts +11 -0
- package/types/dictionary/index.d.ts +4 -0
- package/types/dictionary/locale.d.ts +128 -0
- package/types/dictionary/trans.d.ts +82 -0
- package/types/dictionary.d.ts +1 -0
- package/types/document/by.d.ts +20 -0
- package/types/document/dataLoader.d.ts +36 -0
- package/types/document/database.d.ts +96 -0
- package/types/document/databaseRegistry.d.ts +36 -0
- package/types/document/documentQuery.d.ts +105 -0
- package/types/document/documentSchema.d.ts +33 -0
- package/types/document/filterMeta.d.ts +84 -0
- package/types/document/index.d.ts +11 -0
- package/types/document/into.d.ts +65 -0
- package/types/document/loaderInfo.d.ts +35 -0
- package/types/document/schema.d.ts +5 -0
- package/types/document/types.d.ts +36 -0
- package/types/document.d.ts +1 -0
- package/types/fetch/client/fetchClient.d.ts +78 -0
- package/types/fetch/client/httpClient.d.ts +39 -0
- package/types/fetch/client/index.d.ts +3 -0
- package/types/fetch/client/wsClient.d.ts +37 -0
- package/types/fetch/client.d.ts +1 -0
- package/types/fetch/fetchType/appliedReturn.type.d.ts +67 -0
- package/types/fetch/fetchType/buildFetch.type.d.ts +11 -0
- package/types/fetch/fetchType/clientSignal.type.d.ts +16 -0
- package/types/fetch/fetchType/endpointFetch.type.d.ts +29 -0
- package/types/fetch/fetchType/index.d.ts +5 -0
- package/types/fetch/fetchType/sliceFetch.type.d.ts +76 -0
- package/types/fetch/fetchType.d.ts +1 -0
- package/types/fetch/index.d.ts +4 -0
- package/types/fetch/requestStorage.d.ts +29 -0
- package/types/fetch/serializer/fetch.serializer.d.ts +14 -0
- package/types/fetch/serializer/index.d.ts +1 -0
- package/types/fetch/serializer.d.ts +1 -0
- package/types/fetch/types.d.ts +19 -0
- package/types/fetch.d.ts +1 -0
- package/types/index.d.ts +213 -0
- package/types/server/akanApp.d.ts +17 -0
- package/types/server/akanAppHeaders.d.ts +1 -0
- package/types/server/akanLib.d.ts +33 -0
- package/types/server/akanOption.d.ts +15 -0
- package/types/server/akanServer.d.ts +47 -0
- package/types/server/artifact/builderRpc.d.ts +42 -0
- package/types/server/artifact/index.d.ts +6 -0
- package/types/server/artifact/ipcTypes.d.ts +73 -0
- package/types/server/artifact/manifestTypes.d.ts +16 -0
- package/types/server/artifact/routeClientCache.d.ts +45 -0
- package/types/server/artifact/routeSeedIndexStore.d.ts +43 -0
- package/types/server/artifact/routesManifestStore.d.ts +16 -0
- package/types/server/artifact.d.ts +1 -0
- package/types/server/decorators.d.ts +6 -0
- package/types/server/di/diLifecycle.d.ts +45 -0
- package/types/server/di/index.d.ts +4 -0
- package/types/server/di/predefinedAdaptor.d.ts +33 -0
- package/types/server/di/resolveAdaptorHierarchy.d.ts +21 -0
- package/types/server/di/resolveHierarchy.d.ts +11 -0
- package/types/server/di/resolveServiceHierarchy.d.ts +13 -0
- package/types/server/di/utils.d.ts +14 -0
- package/types/server/di.d.ts +1 -0
- package/types/server/hmr/changeBatch.d.ts +13 -0
- package/types/server/hmr/clientScript.d.ts +1 -0
- package/types/server/hmr/devHmrController.d.ts +24 -0
- package/types/server/hmr/index.d.ts +4 -0
- package/types/server/hmr/wsHub.d.ts +45 -0
- package/types/server/hmr.d.ts +1 -0
- package/types/server/imageOptimizer.d.ts +12 -0
- package/types/server/imageOptimizerError.d.ts +4 -0
- package/types/server/index.d.ts +14 -0
- package/types/server/lifecycle/shutdownManager.d.ts +13 -0
- package/types/server/logging/rotatingLogWriter.d.ts +20 -0
- package/types/server/processMetricsCollector.d.ts +10 -0
- package/types/server/proxy/akanResponse.d.ts +7 -0
- package/types/server/proxy/bunRequestFields.d.ts +1 -0
- package/types/server/proxy/hostBasePathWebProxy.d.ts +6 -0
- package/types/server/proxy/index.d.ts +6 -0
- package/types/server/proxy/localeWebProxy.d.ts +5 -0
- package/types/server/proxy/types.d.ts +37 -0
- package/types/server/proxy/webProxyRunner.d.ts +7 -0
- package/types/server/proxy.d.ts +1 -0
- package/types/server/resolver/database.resolver.d.ts +6 -0
- package/types/server/resolver/index.d.ts +3 -0
- package/types/server/resolver/service.resolver.d.ts +7 -0
- package/types/server/resolver/signal.resolver.d.ts +29 -0
- package/types/server/resolver.d.ts +1 -0
- package/types/server/robots.d.ts +1 -0
- package/types/server/routeElementComposer.d.ts +41 -0
- package/types/server/routeTreeBuilder.d.ts +28 -0
- package/types/server/routing/apiRouter.d.ts +61 -0
- package/types/server/rscClient.d.ts +15 -0
- package/types/server/rscWorker.d.ts +3 -0
- package/types/server/rscWorkerHost.d.ts +83 -0
- package/types/server/sitemap.d.ts +13 -0
- package/types/server/ssrFromRscRenderer.d.ts +6 -0
- package/types/server/ssrTypes.d.ts +47 -0
- package/types/server/systemPages.d.ts +27 -0
- package/types/server/types/react-server-dom-webpack.d.ts +91 -0
- package/types/server/types.d.ts +67 -0
- package/types/server/vendor/akanjs-base.d.ts +1 -0
- package/types/server/vendor/akanjs-common.d.ts +1 -0
- package/types/server/vendor/akanjs-constant.d.ts +1 -0
- package/types/server/vendor/akanjs-store.d.ts +1 -0
- package/types/server/vendor/react-dom-client.d.ts +3 -0
- package/types/server/vendor/react-dom.d.ts +3 -0
- package/types/server/vendor/react-jsx-dev-runtime.d.ts +3 -0
- package/types/server/vendor/react-jsx-runtime.d.ts +3 -0
- package/types/server/vendor/react-refresh-runtime.d.ts +3 -0
- package/types/server/vendor/react-server-dom-webpack-client-browser.d.ts +3 -0
- package/types/server/vendor/react.d.ts +11 -0
- package/types/server/vendor/scheduler.d.ts +3 -0
- package/types/server/webRouter.d.ts +44 -0
- package/types/server.d.ts +1 -0
- package/types/service/adapt.d.ts +15 -0
- package/types/service/base.service.d.ts +18 -0
- package/types/service/index.d.ts +10 -0
- package/types/service/injectInfo.d.ts +102 -0
- package/types/service/ipcTypes.d.ts +194 -0
- package/types/service/predefinedAdaptor/cache.adaptor.d.ts +46 -0
- package/types/service/predefinedAdaptor/compress.adaptor.d.ts +22 -0
- package/types/service/predefinedAdaptor/database.adaptor.d.ts +329 -0
- package/types/service/predefinedAdaptor/index.d.ts +13 -0
- package/types/service/predefinedAdaptor/logging.adaptor.d.ts +20 -0
- package/types/service/predefinedAdaptor/queue.adaptor.d.ts +22 -0
- package/types/service/predefinedAdaptor/role.adaptor.d.ts +17 -0
- package/types/service/predefinedAdaptor/schedule.adaptor.d.ts +60 -0
- package/types/service/predefinedAdaptor/solidCache.adaptor.d.ts +25 -0
- package/types/service/predefinedAdaptor/solidPubsub.adaptor.d.ts +20 -0
- package/types/service/predefinedAdaptor/solidQueue.adaptor.d.ts +19 -0
- package/types/service/predefinedAdaptor/solidSqlite.d.ts +24 -0
- package/types/service/predefinedAdaptor/sqlitePath.d.ts +9 -0
- package/types/service/predefinedAdaptor/storage.adaptor.d.ts +80 -0
- package/types/service/predefinedAdaptor/websocket.adaptor.d.ts +49 -0
- package/types/service/predefinedAdaptor.d.ts +1 -0
- package/types/service/serve.d.ts +31 -0
- package/types/service/serviceModule.d.ts +50 -0
- package/types/service/serviceRegistry.d.ts +9 -0
- package/types/service/types.d.ts +55 -0
- package/types/service.d.ts +1 -0
- package/types/signal/base.signal.d.ts +41 -0
- package/types/signal/endpoint.d.ts +28 -0
- package/types/signal/endpointInfo.d.ts +77 -0
- package/types/signal/exception.d.ts +54786 -0
- package/types/signal/guard.d.ts +10 -0
- package/types/signal/guards.d.ts +10 -0
- package/types/signal/index.d.ts +19 -0
- package/types/signal/intercept.d.ts +17 -0
- package/types/signal/internal.d.ts +18 -0
- package/types/signal/internalArg.d.ts +31 -0
- package/types/signal/internalInfo.d.ts +45 -0
- package/types/signal/middleware.d.ts +51 -0
- package/types/signal/serializer/fetch.serializer.d.ts +14 -0
- package/types/signal/serializer/index.d.ts +1 -0
- package/types/signal/serializer.d.ts +1 -0
- package/types/signal/serverSignal.d.ts +36 -0
- package/types/signal/signalContext.d.ts +96 -0
- package/types/signal/signalRegistry.d.ts +49 -0
- package/types/signal/slice.d.ts +42 -0
- package/types/signal/sliceInfo.d.ts +51 -0
- package/types/signal/trace.d.ts +97 -0
- package/types/signal/types.d.ts +142 -0
- package/types/signal.d.ts +1 -0
- package/types/store/action.d.ts +145 -0
- package/types/store/baseSt.d.ts +412 -0
- package/types/store/hooks.d.ts +1 -0
- package/types/store/index.d.ts +8 -0
- package/types/store/rootStore.d.ts +22 -0
- package/types/store/state.d.ts +91 -0
- package/types/store/stateBuilder.d.ts +141 -0
- package/types/store/stateInfo.d.ts +23 -0
- package/types/store/store.d.ts +36 -0
- package/types/store/storeInstance.d.ts +38 -0
- package/types/store/storeRegistry.d.ts +13 -0
- package/types/store/types.d.ts +42 -0
- package/types/store/withSelector.d.ts +42 -0
- package/types/store.d.ts +1 -0
- package/types/test/index.d.ts +4 -0
- package/types/test/playwright.config.base.d.ts +9 -0
- package/types/test/playwright.pageAgent.d.ts +12 -0
- package/types/test/sample.d.ts +15 -0
- package/types/test/sampleOf.d.ts +5 -0
- package/types/test/signalTest.preload.d.ts +1 -0
- package/types/test/signalTestRuntime.d.ts +29 -0
- package/types/test/testServer.d.ts +26 -0
- package/types/test.d.ts +1 -0
- package/types/ui/BottomSheet.d.ts +13 -0
- package/types/ui/Button.d.ts +11 -0
- package/types/ui/ClientSide.d.ts +8 -0
- package/types/ui/Clipboard.d.ts +7 -0
- package/types/ui/Constant/Doc.d.ts +29 -0
- package/types/ui/Constant/Mermaid.d.ts +8 -0
- package/types/ui/Constant/index.d.ts +6 -0
- package/types/ui/Constant/schemaDoc.d.ts +84 -0
- package/types/ui/Constant.d.ts +1 -0
- package/types/ui/Copy.d.ts +10 -0
- package/types/ui/CsrImage.d.ts +18 -0
- package/types/ui/Data/CardList.d.ts +36 -0
- package/types/ui/Data/Dashboard.d.ts +11 -0
- package/types/ui/Data/Insight.d.ts +9 -0
- package/types/ui/Data/Item.d.ts +75 -0
- package/types/ui/Data/ListContainer.d.ts +49 -0
- package/types/ui/Data/Pagination.d.ts +9 -0
- package/types/ui/Data/QueryMaker.d.ts +8 -0
- package/types/ui/Data/TableList.d.ts +26 -0
- package/types/ui/Data/index.d.ts +9 -0
- package/types/ui/Data/index_.d.ts +8 -0
- package/types/ui/Data.d.ts +1 -0
- package/types/ui/DatePicker.d.ts +36 -0
- package/types/ui/Dialog/Action.d.ts +5 -0
- package/types/ui/Dialog/Close.d.ts +6 -0
- package/types/ui/Dialog/Content.d.ts +6 -0
- package/types/ui/Dialog/Modal.d.ts +9 -0
- package/types/ui/Dialog/Provider.d.ts +11 -0
- package/types/ui/Dialog/Title.d.ts +5 -0
- package/types/ui/Dialog/Trigger.d.ts +6 -0
- package/types/ui/Dialog/context.d.ts +10 -0
- package/types/ui/Dialog/index.d.ts +9 -0
- package/types/ui/Dialog.d.ts +1 -0
- package/types/ui/DragAction.d.ts +24 -0
- package/types/ui/DraggableList.d.ts +31 -0
- package/types/ui/Dropdown.d.ts +14 -0
- package/types/ui/Empty.d.ts +12 -0
- package/types/ui/Field.d.ts +411 -0
- package/types/ui/FontFace.d.ts +6 -0
- package/types/ui/Image.d.ts +49 -0
- package/types/ui/InfiniteScroll.d.ts +10 -0
- package/types/ui/Input.d.ts +95 -0
- package/types/ui/KeyboardAvoiding.d.ts +8 -0
- package/types/ui/Layout/BottomAction.d.ts +6 -0
- package/types/ui/Layout/BottomInset.d.ts +7 -0
- package/types/ui/Layout/BottomTab.d.ts +14 -0
- package/types/ui/Layout/Header.d.ts +8 -0
- package/types/ui/Layout/LeftSider.d.ts +9 -0
- package/types/ui/Layout/Navbar.d.ts +11 -0
- package/types/ui/Layout/RightSider.d.ts +10 -0
- package/types/ui/Layout/Sider.d.ts +7 -0
- package/types/ui/Layout/Template.d.ts +7 -0
- package/types/ui/Layout/TopLeftAction.d.ts +6 -0
- package/types/ui/Layout/Unit.d.ts +9 -0
- package/types/ui/Layout/View.d.ts +8 -0
- package/types/ui/Layout/Zone.d.ts +6 -0
- package/types/ui/Layout/index.d.ts +14 -0
- package/types/ui/Layout.d.ts +1 -0
- package/types/ui/Link/Back.d.ts +7 -0
- package/types/ui/Link/Close.d.ts +7 -0
- package/types/ui/Link/CsrLink.d.ts +2 -0
- package/types/ui/Link/Lang.d.ts +8 -0
- package/types/ui/Link/SsrLink.d.ts +2 -0
- package/types/ui/Link/index.d.ts +10 -0
- package/types/ui/Link/types.d.ts +42 -0
- package/types/ui/Link.d.ts +1 -0
- package/types/ui/Load/Edit.d.ts +4 -0
- package/types/ui/Load/Edit_Client.d.ts +27 -0
- package/types/ui/Load/Page.d.ts +15 -0
- package/types/ui/Load/PageCSR.d.ts +3 -0
- package/types/ui/Load/Pagination.d.ts +8 -0
- package/types/ui/Load/Units.d.ts +30 -0
- package/types/ui/Load/View.d.ts +22 -0
- package/types/ui/Load/index.d.ts +8 -0
- package/types/ui/Load/index_.d.ts +3 -0
- package/types/ui/Load.d.ts +1 -0
- package/types/ui/Loading/Area.d.ts +1 -0
- package/types/ui/Loading/Button.d.ts +7 -0
- package/types/ui/Loading/Input.d.ts +7 -0
- package/types/ui/Loading/ProgressBar.d.ts +6 -0
- package/types/ui/Loading/Skeleton.d.ts +7 -0
- package/types/ui/Loading/Spin.d.ts +7 -0
- package/types/ui/Loading/index.d.ts +8 -0
- package/types/ui/Loading.d.ts +1 -0
- package/types/ui/Menu.d.ts +26 -0
- package/types/ui/Modal.d.ts +19 -0
- package/types/ui/Model/AdminPanel.d.ts +31 -0
- package/types/ui/Model/Edit.d.ts +16 -0
- package/types/ui/Model/EditModal.d.ts +52 -0
- package/types/ui/Model/EditWrapper.d.ts +13 -0
- package/types/ui/Model/LoadInit.d.ts +10 -0
- package/types/ui/Model/New.d.ts +16 -0
- package/types/ui/Model/NewWrapper.d.ts +13 -0
- package/types/ui/Model/NewWrapper_Client.d.ts +13 -0
- package/types/ui/Model/Remove.d.ts +13 -0
- package/types/ui/Model/RemoveWrapper.d.ts +12 -0
- package/types/ui/Model/SureToRemove.d.ts +11 -0
- package/types/ui/Model/View.d.ts +19 -0
- package/types/ui/Model/ViewEditModal.d.ts +12 -0
- package/types/ui/Model/ViewModal.d.ts +14 -0
- package/types/ui/Model/ViewWrapper.d.ts +12 -0
- package/types/ui/Model/index.d.ts +16 -0
- package/types/ui/Model/index_.d.ts +14 -0
- package/types/ui/Model.d.ts +1 -0
- package/types/ui/More.d.ts +12 -0
- package/types/ui/ObjectId.d.ts +5 -0
- package/types/ui/Pagination.d.ts +20 -0
- package/types/ui/Popconfirm.d.ts +28 -0
- package/types/ui/Portal.d.ts +6 -0
- package/types/ui/Radio.d.ts +19 -0
- package/types/ui/RecentTime.d.ts +12 -0
- package/types/ui/Refresh.d.ts +7 -0
- package/types/ui/ScreenNavigator.d.ts +18 -0
- package/types/ui/Select.d.ts +43 -0
- package/types/ui/Signal/Arg.d.ts +78 -0
- package/types/ui/Signal/Doc.d.ts +33 -0
- package/types/ui/Signal/Listener.d.ts +9 -0
- package/types/ui/Signal/Message.d.ts +23 -0
- package/types/ui/Signal/Object.d.ts +20 -0
- package/types/ui/Signal/PubSub.d.ts +24 -0
- package/types/ui/Signal/Request.d.ts +8 -0
- package/types/ui/Signal/Response.d.ts +14 -0
- package/types/ui/Signal/RestApi.d.ts +40 -0
- package/types/ui/Signal/WebSocket.d.ts +11 -0
- package/types/ui/Signal/index.d.ts +18 -0
- package/types/ui/Signal/makeExample.d.ts +4 -0
- package/types/ui/Signal/style.d.ts +15 -0
- package/types/ui/Signal.d.ts +1 -0
- package/types/ui/System/CSR.d.ts +32 -0
- package/types/ui/System/Client.d.ts +47 -0
- package/types/ui/System/Common.d.ts +47 -0
- package/types/ui/System/DevModeToggle.d.ts +1 -0
- package/types/ui/System/Gtag.d.ts +4 -0
- package/types/ui/System/Messages.d.ts +1 -0
- package/types/ui/System/Reconnect.d.ts +1 -0
- package/types/ui/System/Root.d.ts +6 -0
- package/types/ui/System/SSR.d.ts +24 -0
- package/types/ui/System/SelectLanguage.d.ts +5 -0
- package/types/ui/System/ThemeToggle.d.ts +4 -0
- package/types/ui/System/index.d.ts +12 -0
- package/types/ui/System.d.ts +1 -0
- package/types/ui/Tab/Menu.d.ts +12 -0
- package/types/ui/Tab/Menus.d.ts +6 -0
- package/types/ui/Tab/Panel.d.ts +8 -0
- package/types/ui/Tab/Provider.d.ts +10 -0
- package/types/ui/Tab/context.d.ts +9 -0
- package/types/ui/Tab/index.d.ts +7 -0
- package/types/ui/Tab.d.ts +1 -0
- package/types/ui/Table.d.ts +41 -0
- package/types/ui/ToggleSelect.d.ts +33 -0
- package/types/ui/Unauthorized.d.ts +9 -0
- package/types/ui/animated.d.ts +5 -0
- package/types/ui/fontCss.d.ts +11 -0
- package/types/ui/index.d.ts +44 -0
- package/types/ui.d.ts +1 -0
- package/types/webkit/bootCsr.d.ts +16 -0
- package/types/webkit/createRobotPage.d.ts +15 -0
- package/types/webkit/createSitemapPage.d.ts +4 -0
- package/types/webkit/index.d.ts +17 -0
- package/types/webkit/lazy.d.ts +11 -0
- package/types/webkit/types.d.ts +7 -0
- package/types/webkit/useCamera.d.ts +19 -0
- package/types/webkit/useCodepush.d.ts +16 -0
- package/types/webkit/useContact.d.ts +11 -0
- package/types/webkit/useCsrValues.d.ts +30 -0
- package/types/webkit/useDebounce.d.ts +2 -0
- package/types/webkit/useFetch.d.ts +18 -0
- package/types/webkit/useGeoLocation.d.ts +8 -0
- package/types/webkit/useHistory.d.ts +23 -0
- package/types/webkit/useInterval.d.ts +2 -0
- package/types/webkit/useLocation.d.ts +8 -0
- package/types/webkit/usePurchase.d.ts +19 -0
- package/types/webkit/usePushNoti.d.ts +7 -0
- package/types/webkit/useThrottle.d.ts +2 -0
- package/types/webkit.d.ts +1 -0
- package/ui/BottomSheet.tsx +1 -1
- package/ui/Clipboard.tsx +1 -1
- package/ui/CsrImage.tsx +3 -14
- package/ui/Data/ListContainer.tsx +1 -1
- package/ui/Data/Pagination.tsx +1 -1
- package/ui/Data/QueryMaker.tsx +0 -339
- package/ui/Data/index.ts +0 -1
- package/ui/DatePicker.tsx +1 -95
- package/ui/Dialog/Modal.tsx +1 -1
- package/ui/DraggableList.tsx +5 -5
- package/ui/Field.tsx +2 -3
- package/ui/Image.tsx +2 -3
- package/ui/InfiniteScroll.tsx +0 -1
- package/ui/Input.tsx +1 -8
- package/ui/Layout/BottomTab.tsx +2 -2
- package/ui/Link/SsrLink.tsx +1 -2
- package/ui/Load/Page.tsx +1 -1
- package/ui/Load/PageCSR.tsx +0 -1
- package/ui/Load/Units.tsx +1 -2
- package/ui/Load/View.tsx +1 -2
- package/ui/Menu.tsx +5 -8
- package/ui/Model/EditModal.tsx +2 -5
- package/ui/Popconfirm.tsx +2 -4
- package/ui/ScreenNavigator.tsx +2 -3
- package/ui/Signal/Message.tsx +2 -3
- package/ui/Signal/PubSub.tsx +0 -2
- package/ui/Signal/Response.tsx +1 -1
- package/ui/Signal/WebSocket.tsx +2 -11
- package/ui/System/Client.tsx +7 -41
- package/ui/System/Gtag.tsx +2 -5
- package/ui/System/Messages.tsx +2 -2
- package/ui/System/Reconnect.tsx +5 -6
- package/ui/System/Root.tsx +0 -1
- package/ui/System/SSR.tsx +1 -7
- package/ui/ToggleSelect.tsx +3 -8
- package/ui/Unauthorized.tsx +1 -1
- package/webkit/bootCsr.tsx +3 -6
- package/webkit/lazy.tsx +1 -8
- package/webkit/useCamera.tsx +0 -1
- package/webkit/useCodepush.tsx +4 -9
- package/webkit/useContact.tsx +0 -1
- package/webkit/useCsrValues.ts +6 -10
- package/webkit/useDebounce.ts +2 -2
- package/webkit/usePurchase.tsx +5 -9
- package/webkit/usePushNoti.tsx +0 -1
- package/base/base.test.ts +0 -135
- package/base/baseEnv.test.ts +0 -146
- package/base/primitiveRegistry.test.ts +0 -127
- package/base/symbols.test.ts +0 -29
- package/base/utils.test.ts +0 -30
- package/build.ts +0 -318
- package/capacitor.base.config.test.ts +0 -83
- package/client/client.auth-storage.test.ts +0 -210
- package/client/client.decorators.test.ts +0 -74
- package/client/client.device.test.ts +0 -181
- package/client/client.page.test.tsx +0 -175
- package/client/client.pure.test.ts +0 -146
- package/client/client.router.test.ts +0 -290
- package/common/Logger.test.ts +0 -45
- package/common/formatAndValidation.test.ts +0 -61
- package/common/httpClient.test.ts +0 -91
- package/common/objectPath.test.ts +0 -108
- package/common/routeConvention.test.ts +0 -132
- package/common/runtimeConfig.test.ts +0 -84
- package/constant/constant.test.ts +0 -374
- package/dictionary/dictionary.test.ts +0 -352
- package/document/document.test.ts +0 -698
- package/fetch/fetch.test.ts +0 -838
- package/server/akanApp.test.ts +0 -130
- package/server/akanServer.test.ts +0 -157
- package/server/artifact/routeClientCache.test.ts +0 -265
- package/server/artifact/routeSeedIndex.test.ts +0 -56
- package/server/artifact/routesManifest.test.ts +0 -64
- package/server/di/diLifecycle.contract.test.ts +0 -168
- package/server/logging/rotatingLogWriter.test.ts +0 -119
- package/server/processMetrics.test.ts +0 -24
- package/server/proxy/webProxyRunner.test.ts +0 -66
- package/server/resolver/resolver.contract.test.ts +0 -594
- package/server/robots.test.ts +0 -16
- package/server/routeTree.test.tsx +0 -198
- package/server/routing/apiRouter.test.ts +0 -136
- package/server/sitemap.test.ts +0 -61
- package/server/systemPages.test.tsx +0 -93
- package/server/webRouter.test.ts +0 -49
- package/service/predefinedAdaptor/compress.adaptor.test.ts +0 -184
- package/service/predefinedAdaptor/solidCache.adaptor.test.ts +0 -107
- package/service/predefinedAdaptor/solidSqlite.test.ts +0 -457
- package/service/service.test.ts +0 -732
- package/signal/signal.test.ts +0 -892
- package/store/stateBuilder.test.ts +0 -168
- package/store/store.test.ts +0 -427
- package/tsconfig.json +0 -5
- package/ui/Constant/schemaDoc.test.ts +0 -113
- package/ui/InfiniteScroll.test.tsx +0 -155
- package/ui/System/Common.test.ts +0 -37
- package/webkit/bootCsr.test.tsx +0 -153
- package/webkit/native.test.tsx +0 -341
- package/webkit/webkit.test.tsx +0 -531
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { type Cls, type EnumInstance, FIELD_META, type GetStateObject, type PrimitiveScalar } from "akanjs/base";
|
|
2
|
+
import { type ConstantCls, type FieldObject, type PurifiedModel } from ".";
|
|
3
|
+
import type { ConstantType, DefaultOf, DocumentModel, QueryOf } from "./types.d.ts";
|
|
4
|
+
type ConstantModelRef<FieldObj extends FieldObject = FieldObject> = Cls<unknown, {
|
|
5
|
+
[FIELD_META]: FieldObj;
|
|
6
|
+
modelType: ConstantType;
|
|
7
|
+
}>;
|
|
8
|
+
/** Runtime registry for Akan constant model metadata, refs, enums, and generated model contracts. */
|
|
9
|
+
export declare class ConstantRegistry {
|
|
10
|
+
static database: Map<string, ConstantModel<string, any, any, any, any, any, FieldObject, Capitalize<string>, GetStateObject<{
|
|
11
|
+
[x: string]: any;
|
|
12
|
+
}>, GetStateObject<{
|
|
13
|
+
[x: string]: any;
|
|
14
|
+
}>, GetStateObject<any>, GetStateObject<any>, GetStateObject<{
|
|
15
|
+
[x: string]: any;
|
|
16
|
+
}>, any, any, any, any, GetStateObject<any>, GetStateObject<any>>>;
|
|
17
|
+
static scalar: Map<string, ScalarConstantModel<string, any, GetStateObject<{
|
|
18
|
+
[x: string]: any;
|
|
19
|
+
}>, any, any>>;
|
|
20
|
+
static enum: Map<string, EnumInstance>;
|
|
21
|
+
static value: Map<string, unknown>;
|
|
22
|
+
static modelRefNameMap: Map<new (...args: never[]) => unknown, string>;
|
|
23
|
+
static has(modelRef: Cls): boolean;
|
|
24
|
+
static getRefName<AllowEmpty extends boolean = false>(modelRef: Cls, { allowEmpty }?: {
|
|
25
|
+
allowEmpty?: AllowEmpty;
|
|
26
|
+
}): AllowEmpty extends true ? string | undefined : string;
|
|
27
|
+
static getModelName(modelRef: Cls): string;
|
|
28
|
+
static isObject(modelRef: Cls<unknown, {
|
|
29
|
+
modelType?: ConstantType;
|
|
30
|
+
}>): boolean;
|
|
31
|
+
static isFull(modelRef: Cls<unknown, {
|
|
32
|
+
modelType?: ConstantType;
|
|
33
|
+
}>): boolean;
|
|
34
|
+
static isLight(modelRef: Cls<unknown, {
|
|
35
|
+
modelType?: ConstantType;
|
|
36
|
+
}>): boolean;
|
|
37
|
+
static isInsight(modelRef: Cls<unknown, {
|
|
38
|
+
modelType?: ConstantType;
|
|
39
|
+
}>): boolean;
|
|
40
|
+
static isScalar(modelRef: Cls<unknown, {
|
|
41
|
+
modelType?: ConstantType;
|
|
42
|
+
}>): boolean;
|
|
43
|
+
static setDatabase(refName: string, cnst: ConstantModel): void;
|
|
44
|
+
static getDatabase<AllowEmpty extends boolean = false>(refName: string, { allowEmpty }?: {
|
|
45
|
+
allowEmpty?: AllowEmpty;
|
|
46
|
+
}): AllowEmpty extends true ? ConstantModel | undefined : ConstantModel;
|
|
47
|
+
static setScalar(refName: string, cnst: ScalarConstantModel): void;
|
|
48
|
+
static getScalar<AllowEmpty extends boolean = false>(refName: string, { allowEmpty }?: {
|
|
49
|
+
allowEmpty?: AllowEmpty;
|
|
50
|
+
}): AllowEmpty extends true ? ScalarConstantModel | undefined : ScalarConstantModel;
|
|
51
|
+
static getModelRef(refName: string, modelType?: ConstantType): Cls | typeof PrimitiveScalar;
|
|
52
|
+
static buildModel<T extends string, InputRef extends ConstantModelRef, ObjectRef extends ConstantModelRef, FullFieldObj extends FieldObject, FullRef extends ConstantModelRef<FullFieldObj>, LightRef extends ConstantModelRef, InsightRef extends ConstantModelRef, Input = InstanceType<InputRef>, Obj = InstanceType<ObjectRef>, Full = InstanceType<FullRef>, Light = InstanceType<LightRef>, Insight = InstanceType<InsightRef>>(refName: T, inputRef: InputRef, objectRef: ObjectRef, fullRef: FullRef, lightRef: LightRef, insightRef: InsightRef, constExports: Record<string, unknown>): ConstantModel<T, Input, Obj, Full, Light, Insight, FullFieldObj, Capitalize<T>, DefaultOf<Full>, DefaultOf<Input>, GetStateObject<Full>, GetStateObject<Input>, DefaultOf<Insight>, PurifiedModel<Input>, DocumentModel<Full>, DocumentModel<Input>, QueryOf<DocumentModel<Full>>, GetStateObject<Light>, GetStateObject<Insight>>;
|
|
53
|
+
static buildScalar<T extends string, Model>(refName: T, Model: Cls<Model>, constExports: Record<string, unknown>): ScalarConstantModel<T, Model, DefaultOf<Model>, DocumentModel<Model>, PurifiedModel<Model>>;
|
|
54
|
+
static serialize<Value>(modelRef: Cls | Cls[], value: Value, nullable?: boolean): Value;
|
|
55
|
+
static deserialize<Value>(modelRef: Cls | Cls[], value: Value, nullable?: boolean): Value;
|
|
56
|
+
}
|
|
57
|
+
export interface ConstantModel<T extends string = string, Input = any, Obj = any, Full = any, Light = any, Insight = any, FullFieldObj extends FieldObject = FieldObject, _CapitalizedRefName extends string = Capitalize<T>, _Default = DefaultOf<Full>, _DefaultInput = DefaultOf<Input>, _DefaultState = GetStateObject<Full>, _DefaultStateInput = GetStateObject<Input>, _DefaultInsight = DefaultOf<Insight>, _PurifiedInput = PurifiedModel<Input>, _Doc = DocumentModel<Full>, _DocInput = DocumentModel<Input>, _QueryOfDoc = QueryOf<_Doc>, _StateLight = GetStateObject<Light>, _StateInsight = GetStateObject<Insight>> {
|
|
58
|
+
refName: T;
|
|
59
|
+
input: ConstantCls<Input>;
|
|
60
|
+
object: ConstantCls<Obj>;
|
|
61
|
+
full: ConstantCls<Full, FullFieldObj>;
|
|
62
|
+
light: ConstantCls<Light>;
|
|
63
|
+
insight: ConstantCls<Insight>;
|
|
64
|
+
_CapitalizedRefName: _CapitalizedRefName;
|
|
65
|
+
_Input: Input;
|
|
66
|
+
_Obj: Obj;
|
|
67
|
+
_Full: Full;
|
|
68
|
+
_Light: Light;
|
|
69
|
+
_Insight: Insight;
|
|
70
|
+
_Default: _Default;
|
|
71
|
+
_DefaultInput: _DefaultInput;
|
|
72
|
+
_DefaultState: _DefaultState;
|
|
73
|
+
_DefaultStateInput: _DefaultStateInput;
|
|
74
|
+
_DefaultInsight: _DefaultInsight;
|
|
75
|
+
_PurifiedInput: _PurifiedInput;
|
|
76
|
+
_Doc: _Doc;
|
|
77
|
+
_DocInput: _DocInput;
|
|
78
|
+
_QueryOfDoc: _QueryOfDoc;
|
|
79
|
+
_StateLight: _StateLight;
|
|
80
|
+
_StateInsight: _StateInsight;
|
|
81
|
+
}
|
|
82
|
+
export interface ScalarConstantModel<T extends string = string, Model = any, _Default = DefaultOf<Model>, _Doc = DocumentModel<Model>, _PurifiedInput = PurifiedModel<Model>> {
|
|
83
|
+
refName: T;
|
|
84
|
+
model: ConstantCls<Model>;
|
|
85
|
+
_Default: _Default;
|
|
86
|
+
_Doc: _Doc;
|
|
87
|
+
_PurifiedInput: _PurifiedInput;
|
|
88
|
+
}
|
|
89
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type PrimitiveScalar } from "akanjs/base";
|
|
2
|
+
import { type ConstantCls } from ".";
|
|
3
|
+
export declare const deserialize: (argRef: ConstantCls | PrimitiveScalar, arrDepth: number, value: unknown, { key, nullable, convertFn }: {
|
|
4
|
+
key?: string;
|
|
5
|
+
nullable?: boolean;
|
|
6
|
+
convertFn?: (value: unknown) => unknown;
|
|
7
|
+
}) => object[] | null;
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { type Any, type Cls, type Dayjs, type EnumInstance, type Float, Int, PRIMITIVE_CLIENT_VALUE, PRIMITIVE_SERVER_VALUE, type PrimitiveScalar, type SingleValue, type UnCls } from "akanjs/base";
|
|
2
|
+
import type { ConstantCls } from "./via.d.ts";
|
|
3
|
+
export type ParamFieldType = (typeof PrimitiveScalar & {
|
|
4
|
+
[PRIMITIVE_CLIENT_VALUE]: string | number | boolean | Dayjs;
|
|
5
|
+
}) | EnumInstance<string, any>;
|
|
6
|
+
export type ConstantFieldType = typeof PrimitiveScalar | Cls | MapConstructor | EnumInstance<string, number>;
|
|
7
|
+
export type ConstantFieldTypeInput = ConstantFieldType | ConstantFieldType[] | ConstantFieldType[][] | ConstantFieldType[][][];
|
|
8
|
+
export type FieldToValue<Field, MapValue = any> = Field extends null ? FieldToValue<Exclude<Field, null>> | null : Field extends MapConstructor ? Map<string, FieldToValue<MapValue>> : Field extends (infer F)[] ? FieldToValue<F>[] : Field extends {
|
|
9
|
+
[PRIMITIVE_SERVER_VALUE]: infer V;
|
|
10
|
+
} ? V : Field extends EnumInstance<string, infer V> ? V : Field extends Cls ? UnCls<Field> : never;
|
|
11
|
+
export interface FieldInfoObject {
|
|
12
|
+
[key: string]: FieldInfo<any, ConstantFieldTypeInput | null, any>;
|
|
13
|
+
}
|
|
14
|
+
export type ExtractFieldInfoObject<Obj extends FieldInfoObject> = {
|
|
15
|
+
[K in keyof Obj]: Obj[K] extends FieldInfo<any, infer FieldValue, infer ExplicitType, infer MapValue> ? unknown extends ExplicitType ? FieldToValue<FieldValue, MapValue> : ExplicitType : never;
|
|
16
|
+
};
|
|
17
|
+
export interface ConstantFieldProps<FieldType extends "property" | "hidden" | "resolve" = "property" | "hidden" | "resolve", FieldValue = any, MapValue = any, Metadata = {
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}> {
|
|
20
|
+
nullable?: boolean;
|
|
21
|
+
ref?: string;
|
|
22
|
+
refPath?: string;
|
|
23
|
+
refType?: "child" | "parent" | "relation";
|
|
24
|
+
default?: FieldValue | ((doc: {
|
|
25
|
+
id: string;
|
|
26
|
+
}) => FieldValue);
|
|
27
|
+
type?: FieldPreset;
|
|
28
|
+
fieldType?: FieldType;
|
|
29
|
+
immutable?: boolean;
|
|
30
|
+
min?: number;
|
|
31
|
+
max?: number;
|
|
32
|
+
enum?: EnumInstance;
|
|
33
|
+
select?: boolean;
|
|
34
|
+
minlength?: number;
|
|
35
|
+
maxlength?: number;
|
|
36
|
+
accumulate?: any;
|
|
37
|
+
example?: FieldValue;
|
|
38
|
+
of?: MapValue;
|
|
39
|
+
validate?: (value: FieldValue, model: any) => boolean;
|
|
40
|
+
text?: "search" | "filter";
|
|
41
|
+
meta?: Metadata;
|
|
42
|
+
}
|
|
43
|
+
export declare const fieldPresets: readonly ["email", "password", "url"];
|
|
44
|
+
export type FieldPreset = (typeof fieldPresets)[number];
|
|
45
|
+
declare class FieldInfo<FieldType extends "property" | "hidden" | "resolve" = any, Value extends ConstantFieldTypeInput | null = null, ExplicitType = unknown, MapValue = Value extends MapConstructor ? typeof PrimitiveScalar : never> {
|
|
46
|
+
readonly value: Value;
|
|
47
|
+
readonly type: ConstantFieldTypeInput;
|
|
48
|
+
readonly option: ConstantFieldProps;
|
|
49
|
+
explicitType: ExplicitType;
|
|
50
|
+
constructor(value: Value, option: ConstantFieldProps<FieldType, any, MapValue>);
|
|
51
|
+
optional(): FieldInfo<FieldType, Value | null, ExplicitType | null, MapValue>;
|
|
52
|
+
meta(meta: ConstantFieldProps["meta"]): this;
|
|
53
|
+
toField(): ConstantField<FieldType, Value, ExplicitType, MapValue, false, {
|
|
54
|
+
[key: string]: any;
|
|
55
|
+
}>;
|
|
56
|
+
}
|
|
57
|
+
interface ConstantFieldBuildProps<FieldType extends "property" | "hidden" | "resolve" = any, FieldValue = any, MapValue = any, Metadata = any, Nullable extends boolean = boolean> {
|
|
58
|
+
nullable: Nullable;
|
|
59
|
+
ref?: string;
|
|
60
|
+
refPath?: string;
|
|
61
|
+
refType?: "child" | "parent" | "relation";
|
|
62
|
+
default: FieldValue | ((doc: {
|
|
63
|
+
id: string;
|
|
64
|
+
}) => FieldValue);
|
|
65
|
+
type?: FieldPreset;
|
|
66
|
+
fieldType: FieldType;
|
|
67
|
+
immutable: boolean;
|
|
68
|
+
min?: number;
|
|
69
|
+
max?: number;
|
|
70
|
+
enum?: EnumInstance;
|
|
71
|
+
select: boolean;
|
|
72
|
+
minlength?: number;
|
|
73
|
+
maxlength?: number;
|
|
74
|
+
accumulate?: any;
|
|
75
|
+
example?: FieldValue;
|
|
76
|
+
of?: MapValue;
|
|
77
|
+
validate?: (value: FieldValue, model: any) => boolean;
|
|
78
|
+
text?: "search" | "filter";
|
|
79
|
+
modelRef: ConstantCls;
|
|
80
|
+
arrDepth: number;
|
|
81
|
+
optArrDepth: number;
|
|
82
|
+
meta: Metadata;
|
|
83
|
+
}
|
|
84
|
+
export interface FieldProps extends ConstantFieldBuildProps {
|
|
85
|
+
isClass: boolean;
|
|
86
|
+
isScalar: boolean;
|
|
87
|
+
isArray: boolean;
|
|
88
|
+
isMap: boolean;
|
|
89
|
+
}
|
|
90
|
+
export type FieldInfoObjectToFieldObject<Obj extends FieldInfoObject> = {
|
|
91
|
+
[K in keyof Obj]: Obj[K] extends FieldInfo<infer FieldType, infer Value, infer ExplicitType, infer MapValue> ? ConstantField<FieldType, Value, unknown extends ExplicitType ? FieldToValue<Value, MapValue> : ExplicitType, MapValue> : never;
|
|
92
|
+
};
|
|
93
|
+
/** Runtime metadata for a single Akan constant field. */
|
|
94
|
+
export declare class ConstantField<FieldType extends "property" | "hidden" | "resolve" = "property" | "hidden" | "resolve", Value extends ConstantFieldTypeInput | null = any, FieldValue = any, MapValue = any, Nullable extends boolean = false, Metadata = {
|
|
95
|
+
[key: string]: any;
|
|
96
|
+
}> implements ConstantFieldBuildProps<FieldType, FieldValue, MapValue, Metadata> {
|
|
97
|
+
static getBaseModelField(): FieldObject;
|
|
98
|
+
static getBaseInsightField(): FieldObject;
|
|
99
|
+
readonly nullable: Nullable;
|
|
100
|
+
readonly ref?: string;
|
|
101
|
+
readonly refPath?: string;
|
|
102
|
+
readonly refType?: "child" | "parent" | "relation";
|
|
103
|
+
readonly default: FieldValue | ((doc: {
|
|
104
|
+
id: string;
|
|
105
|
+
}) => FieldValue);
|
|
106
|
+
readonly type?: FieldPreset;
|
|
107
|
+
readonly fieldType: FieldType;
|
|
108
|
+
readonly immutable: boolean;
|
|
109
|
+
readonly min?: number;
|
|
110
|
+
readonly max?: number;
|
|
111
|
+
readonly enum?: EnumInstance;
|
|
112
|
+
readonly select: boolean;
|
|
113
|
+
readonly minlength?: number;
|
|
114
|
+
readonly maxlength?: number;
|
|
115
|
+
readonly accumulate?: any;
|
|
116
|
+
readonly example?: FieldValue;
|
|
117
|
+
readonly of?: MapValue;
|
|
118
|
+
readonly validate?: (value: FieldValue, model: any) => boolean;
|
|
119
|
+
readonly text?: "search" | "filter";
|
|
120
|
+
readonly modelRef: ConstantCls;
|
|
121
|
+
readonly arrDepth: number;
|
|
122
|
+
readonly optArrDepth: number;
|
|
123
|
+
readonly meta: Metadata;
|
|
124
|
+
constructor(props: ConstantFieldBuildProps<FieldType, FieldValue, MapValue, Metadata>);
|
|
125
|
+
static fromFieldInfo<FieldType extends "property" | "hidden" | "resolve" = any, Value extends ConstantFieldTypeInput | null = null, FieldValue = any, MapValue = any, Nullable extends boolean = false, Metadata = {
|
|
126
|
+
[key: string]: any;
|
|
127
|
+
}>(fieldInfo: FieldInfo<FieldType, Value, FieldValue, MapValue>): ConstantField<FieldType, Value, FieldValue, MapValue, Nullable, Metadata>;
|
|
128
|
+
get isClass(): boolean;
|
|
129
|
+
get isScalar(): boolean;
|
|
130
|
+
get isArray(): boolean;
|
|
131
|
+
get isMap(): boolean;
|
|
132
|
+
getProps(): FieldProps;
|
|
133
|
+
}
|
|
134
|
+
export interface FieldObject {
|
|
135
|
+
[key: string]: ConstantField;
|
|
136
|
+
}
|
|
137
|
+
type FieldOption<Value extends ConstantFieldTypeInput, MapValue = Value extends MapConstructor ? typeof PrimitiveScalar : never, Metadata extends {
|
|
138
|
+
[key: string]: any;
|
|
139
|
+
} = {
|
|
140
|
+
[key: string]: any;
|
|
141
|
+
}, _FieldToValue = FieldToValue<Value, MapValue> | null | undefined> = Omit<ConstantFieldProps<"property" | "hidden" | "resolve", _FieldToValue, MapValue, Metadata>, "enum" | "meta" | "nullable" | "fieldType" | "select"> | Omit<ConstantFieldProps<"property" | "hidden" | "resolve", SingleValue<_FieldToValue>, MapValue, Metadata>, "enum" | "meta" | "nullable" | "fieldType" | "select">[];
|
|
142
|
+
export type PlainTypeToFieldType<PlainType> = PlainType extends [infer First, ...infer Rest] ? PlainTypeToFieldType<First>[] : PlainType extends number ? typeof Int | typeof Float : PlainType extends string ? StringConstructor : typeof Any;
|
|
143
|
+
/** Builds a stored property field with optional validation, default, ref, text, and metadata options. */
|
|
144
|
+
export declare const field: {
|
|
145
|
+
<ExplicitType, Value extends ConstantFieldTypeInput = PlainTypeToFieldType<ExplicitType>, MapValue = Value extends MapConstructor ? typeof PrimitiveScalar : never>(value: Value, option?: FieldOption<Value, MapValue>): FieldInfo<"property", Value, ExplicitType, MapValue>;
|
|
146
|
+
hidden<ExplicitType, Value extends ConstantFieldTypeInput = PlainTypeToFieldType<ExplicitType>, MapValue = Value extends MapConstructor ? typeof PrimitiveScalar : never>(value: Value, option?: FieldOption<Value, MapValue>): FieldInfo<"hidden", Value | null, ExplicitType | null, MapValue>;
|
|
147
|
+
secret<ExplicitType, Value extends ConstantFieldTypeInput = PlainTypeToFieldType<ExplicitType>, MapValue = Value extends MapConstructor ? typeof PrimitiveScalar : never>(value: Value, option?: FieldOption<Value, MapValue>): FieldInfo<"hidden", Value | null, ExplicitType | null, MapValue>;
|
|
148
|
+
};
|
|
149
|
+
/** Builds a resolved field that is derived rather than treated as a stored property. */
|
|
150
|
+
export declare const resolve: <ExplicitType, Value extends ConstantFieldTypeInput = PlainTypeToFieldType<ExplicitType>, MapValue = Value extends MapConstructor ? typeof PrimitiveScalar : never>(value: Value, option?: FieldOption<Value, MapValue>) => FieldInfo<"resolve", Value, ExplicitType, MapValue>;
|
|
151
|
+
export type FieldBuilder = typeof field;
|
|
152
|
+
export type FieldResolver = typeof resolve;
|
|
153
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./constantRegistry.d.ts";
|
|
2
|
+
export * from "./crystalize.d.ts";
|
|
3
|
+
export * from "./deserialize.d.ts";
|
|
4
|
+
export * from "./fieldInfo.d.ts";
|
|
5
|
+
export * from "./getDefault.d.ts";
|
|
6
|
+
export * from "./immerify.d.ts";
|
|
7
|
+
export * from "./purify.d.ts";
|
|
8
|
+
export * from "./serialize.d.ts";
|
|
9
|
+
export * from "./types.d.ts";
|
|
10
|
+
export * from "./via.d.ts";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Dayjs, type GetStateObject, type Upload } from "akanjs/base";
|
|
2
|
+
import { type BaseObject, type ConstantCls, type DefaultOf } from ".";
|
|
3
|
+
type Purified<O> = O extends BaseObject ? string : O extends BaseObject[] ? string[] : O extends Dayjs ? Dayjs : O extends object ? PurifiedModel<O> : O;
|
|
4
|
+
type PurifiedWithObjectToId<T, StateKeys extends keyof GetStateObject<T> = keyof GetStateObject<T>> = {
|
|
5
|
+
[K in StateKeys as null extends T[K] ? never : K]: Purified<T[K]>;
|
|
6
|
+
} & {
|
|
7
|
+
[K in StateKeys as null extends T[K] ? K : never]?: Purified<T[K]> | undefined;
|
|
8
|
+
};
|
|
9
|
+
export type PurifiedModel<T> = T extends Upload[] ? FileList : T extends (infer S)[] ? PurifiedModel<S>[] : T extends string | number | boolean | Dayjs | File ? T : T extends Map<infer K, infer V> ? Map<K, PurifiedModel<V>> : PurifiedWithObjectToId<T>;
|
|
10
|
+
export type PurifyFunc<Input, _DefaultInput = DefaultOf<Input>, _PurifiedInput = PurifiedModel<Input>> = (self: _DefaultInput, isChild?: boolean) => _PurifiedInput | null;
|
|
11
|
+
export declare const makePurify: <I>(modelRef: ConstantCls<I>) => PurifyFunc<I>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Dayjs, type PrimitiveScalar } from "akanjs/base";
|
|
2
|
+
import type { ConstantCls } from ".";
|
|
3
|
+
export type Serialized<O> = O extends (infer V)[] ? Serialized<V>[] : O extends Dayjs ? Date : O extends Map<infer K, infer V> ? {
|
|
4
|
+
[key in K & string]: Serialized<V>;
|
|
5
|
+
} : O extends object ? {
|
|
6
|
+
[K in keyof O]: Serialized<O[K]>;
|
|
7
|
+
} : O;
|
|
8
|
+
export declare const serialize: (argRef: ConstantCls | PrimitiveScalar, arrDepth: number, value: unknown, serializeType: "input" | "object" | undefined, { nullable, key }: {
|
|
9
|
+
nullable?: boolean;
|
|
10
|
+
key?: string;
|
|
11
|
+
}) => object[] | null;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { type Dayjs, type GetStateObject } from "akanjs/base";
|
|
2
|
+
export type QueryOf<T = any> = any;
|
|
3
|
+
export type ConstantType = "input" | "object" | "full" | "light" | "insight" | "scalar";
|
|
4
|
+
type ObjectToId<O> = O extends BaseObject ? string : O extends BaseObject[] ? string[] : O extends Dayjs ? Dayjs : O extends object ? DocumentModel<O> : O;
|
|
5
|
+
type Docify<T, _StateKeys extends keyof GetStateObject<T> = keyof GetStateObject<T>> = {
|
|
6
|
+
[K in _StateKeys as null extends T[K] ? never : K]: ObjectToId<T[K]>;
|
|
7
|
+
} & {
|
|
8
|
+
[K in _StateKeys as null extends T[K] ? K : never]?: ObjectToId<Exclude<T[K], null>> | undefined;
|
|
9
|
+
};
|
|
10
|
+
export type DocumentModel<T> = T extends (infer S)[] ? DocumentModel<S>[] : T extends string | number | boolean | Dayjs | File ? T : T extends Map<infer K, infer V> ? Map<K, DocumentModel<V>> : Docify<T>;
|
|
11
|
+
export type FieldState<T> = T extends {
|
|
12
|
+
id: string;
|
|
13
|
+
} ? T | null : T;
|
|
14
|
+
export type DefaultOf<S> = GetStateObject<{
|
|
15
|
+
[K in keyof S]: FieldState<S[K]>;
|
|
16
|
+
}>;
|
|
17
|
+
export type GetPlainObject<T, O extends string> = Omit<{
|
|
18
|
+
[K in keyof T as T[K] extends (...args: never[]) => unknown ? never : K extends "set" | "save" | "refresh" ? never : K]: T[K];
|
|
19
|
+
}, O>;
|
|
20
|
+
export declare class BaseObject {
|
|
21
|
+
id: string;
|
|
22
|
+
createdAt: Dayjs;
|
|
23
|
+
updatedAt: Dayjs;
|
|
24
|
+
removedAt: Dayjs | null;
|
|
25
|
+
}
|
|
26
|
+
export declare class BaseInsight {
|
|
27
|
+
count: number;
|
|
28
|
+
}
|
|
29
|
+
export interface ProtoFile {
|
|
30
|
+
id: string;
|
|
31
|
+
filename: string;
|
|
32
|
+
abstractData: string | null;
|
|
33
|
+
imageSize: [number, number];
|
|
34
|
+
progress: number | null;
|
|
35
|
+
url: string;
|
|
36
|
+
size: number;
|
|
37
|
+
status: string;
|
|
38
|
+
createdAt: Dayjs;
|
|
39
|
+
updatedAt: Dayjs;
|
|
40
|
+
removedAt: Dayjs | null;
|
|
41
|
+
mimetype: string;
|
|
42
|
+
encoding: string;
|
|
43
|
+
origin: string | null;
|
|
44
|
+
lastModifiedAt: Dayjs;
|
|
45
|
+
}
|
|
46
|
+
export interface ProtoAppInfo {
|
|
47
|
+
appId: string | null;
|
|
48
|
+
appName: string;
|
|
49
|
+
deviceId: string | null;
|
|
50
|
+
platform: "ios" | "android" | null;
|
|
51
|
+
major: number;
|
|
52
|
+
minor: number;
|
|
53
|
+
patch: number;
|
|
54
|
+
branch: string;
|
|
55
|
+
buildNum: string | null;
|
|
56
|
+
versionOs: string | null;
|
|
57
|
+
isEmulator: boolean | null;
|
|
58
|
+
}
|
|
59
|
+
export interface ProtoPatch {
|
|
60
|
+
source: ProtoFile;
|
|
61
|
+
build: ProtoFile;
|
|
62
|
+
appBuild: ProtoFile | null;
|
|
63
|
+
status: "active" | "expired";
|
|
64
|
+
at: Dayjs;
|
|
65
|
+
}
|
|
66
|
+
export declare const DEFAULT_PAGE_SIZE = 20;
|
|
67
|
+
export interface TextDoc {
|
|
68
|
+
[key: string]: string | TextDoc;
|
|
69
|
+
}
|
|
70
|
+
export type NonFunctionalKeys<T> = keyof T extends (...args: never[]) => unknown ? never : keyof T;
|
|
71
|
+
export declare const unsetDate: Dayjs;
|
|
72
|
+
export declare const MAX_INT = 2147483647;
|
|
73
|
+
declare const Responsive_base: import("akanjs/base").EnumInstance<"responsive", "xl" | "lg" | "md" | "sm" | "xs">;
|
|
74
|
+
export declare class Responsive extends Responsive_base {
|
|
75
|
+
}
|
|
76
|
+
export declare const responsiveWidths: readonly [1200, 992, 768, 576, 0];
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type Cls, type EnumInstance, FIELD_META, type MergeAllKeyOfObjects, type MergeAllTypes } from "akanjs/base";
|
|
2
|
+
import { type ExtractFieldInfoObject, type FieldBuilder, type FieldInfoObject, type FieldInfoObjectToFieldObject, type FieldObject, type FieldResolver } from "./fieldInfo.d.ts";
|
|
3
|
+
import { type PurifyFunc } from "./purify.d.ts";
|
|
4
|
+
import type { BaseInsight, BaseObject, ConstantType, DefaultOf, NonFunctionalKeys } from "./types.d.ts";
|
|
5
|
+
type BaseFields = "id" | "createdAt" | "updatedAt" | "removedAt";
|
|
6
|
+
type OmitBase<T> = Omit<T, BaseFields>;
|
|
7
|
+
export interface ConstantMethods<Schema = any> {
|
|
8
|
+
set: (obj: Partial<Schema>) => this;
|
|
9
|
+
}
|
|
10
|
+
export interface ConstantStatics<Schema = any, FieldObj extends FieldObject = FieldObject> {
|
|
11
|
+
[FIELD_META]: FieldObj;
|
|
12
|
+
getDefault: () => DefaultOf<Schema>;
|
|
13
|
+
purify: PurifyFunc<Schema>;
|
|
14
|
+
modelType: ConstantType;
|
|
15
|
+
children: Set<ConstantCls>;
|
|
16
|
+
relations: Set<ConstantCls>;
|
|
17
|
+
enums: Set<EnumInstance>;
|
|
18
|
+
text: {
|
|
19
|
+
search: Set<string>;
|
|
20
|
+
filter: Set<string>;
|
|
21
|
+
children: {
|
|
22
|
+
search: Set<string>;
|
|
23
|
+
filter: Set<string>;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export type ConstantCls<Schema = any, FieldObj extends FieldObject = FieldObject> = (new (obj?: Partial<Schema>) => Schema & ConstantMethods<Schema>) & ConstantStatics<Schema, FieldObj>;
|
|
28
|
+
declare global {
|
|
29
|
+
interface DateConstructor extends ConstantStatics<unknown> {
|
|
30
|
+
}
|
|
31
|
+
interface StringConstructor extends ConstantStatics<unknown> {
|
|
32
|
+
}
|
|
33
|
+
interface BooleanConstructor extends ConstantStatics<unknown> {
|
|
34
|
+
}
|
|
35
|
+
interface MapConstructor extends ConstantStatics<unknown> {
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/** Builds Akan constant models such as scalar, input, object, light, full, and insight classes. */
|
|
39
|
+
export declare function via<Obj extends BaseObject, ObjFieldObj extends FieldObject, K extends NonFunctionalKeys<OmitBase<Obj>>, ResolveField extends (resolve: FieldResolver) => FieldInfoObject, LightModels extends Cls[], _Schema = MergeAllTypes<LightModels> & Pick<Obj, K> & BaseObject & ExtractFieldInfoObject<ReturnType<ResolveField>>, _FieldObj extends FieldObject = MergeAllKeyOfObjects<LightModels, typeof FIELD_META> & Pick<ObjFieldObj, K & keyof ObjFieldObj> & FieldInfoObjectToFieldObject<ReturnType<ResolveField>>>(modelRef: Cls<Obj, {
|
|
40
|
+
[FIELD_META]: ObjFieldObj;
|
|
41
|
+
}>, fields: readonly K[], resolveField: ResolveField, ...lightModelRefs: LightModels): ConstantCls<_Schema, _FieldObj>;
|
|
42
|
+
export declare function via<BuildField extends (builder: FieldBuilder) => FieldInfoObject, Inputs extends Cls[], _Schema = MergeAllTypes<Inputs> & ExtractFieldInfoObject<ReturnType<BuildField>>, _FieldObj extends FieldObject = MergeAllKeyOfObjects<Inputs, typeof FIELD_META> & FieldInfoObjectToFieldObject<ReturnType<BuildField>>>(buildField: BuildField, ...extendInputRefs: Inputs): ConstantCls<_Schema, _FieldObj>;
|
|
43
|
+
export declare function via<Full extends BaseObject, BuildField extends (builder: FieldBuilder) => FieldInfoObject, Insights extends Cls[], _Schema = MergeAllTypes<Insights> & BaseInsight & ExtractFieldInfoObject<ReturnType<BuildField>>, _FieldObj extends FieldObject = MergeAllKeyOfObjects<Insights, typeof FIELD_META> & FieldInfoObjectToFieldObject<ReturnType<BuildField>>>(modelRef: Cls<Full>, buildField: BuildField, ...extendInsightRefs: Insights): ConstantCls<_Schema, _FieldObj>;
|
|
44
|
+
export declare function via<Input, InputFieldObj extends FieldObject, BuildField extends (builder: FieldBuilder) => FieldInfoObject, ObjectModels extends Cls[], _Schema = MergeAllTypes<ObjectModels> & Input & BaseObject & ExtractFieldInfoObject<ReturnType<BuildField>>, _FieldObj extends FieldObject = MergeAllKeyOfObjects<ObjectModels, typeof FIELD_META> & InputFieldObj & FieldInfoObjectToFieldObject<ReturnType<BuildField>>>(inputRef: Cls<Input, {
|
|
45
|
+
[FIELD_META]: InputFieldObj;
|
|
46
|
+
}>, buildField: BuildField, ...extendObjectRefs: ObjectModels): ConstantCls<_Schema, _FieldObj>;
|
|
47
|
+
export declare function via<Obj, ObjFieldObj extends FieldObject, Light, LightFieldObj extends FieldObject, ResolveField extends (resolve: FieldResolver) => FieldInfoObject, FullModels extends Cls[], _Schema = MergeAllTypes<FullModels> & Obj & Light & ExtractFieldInfoObject<ReturnType<ResolveField>>, _FieldObj extends FieldObject = MergeAllKeyOfObjects<FullModels, typeof FIELD_META> & ObjFieldObj & LightFieldObj & FieldInfoObjectToFieldObject<ReturnType<ResolveField>>>(objectRef: Cls<Obj, {
|
|
48
|
+
[FIELD_META]: ObjFieldObj;
|
|
49
|
+
}>, lightModelRef: Cls<Light, {
|
|
50
|
+
[FIELD_META]: LightFieldObj;
|
|
51
|
+
}>, resolveField: ResolveField, ...fullModelRefs: FullModels): ConstantCls<_Schema, _FieldObj>;
|
|
52
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./constant/index.d.ts";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const baseDictionary: import("./dictInfo.d.ts").ServiceDictInfo<[string, string], string, never, "error" | "save" | "password" | "remove" | "ok" | "connecting" | "failed" | "success" | "edit" | "view" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "cancel" | "unauthorized" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "addModel" | "createModel" | "createSuccess" | "updateModel" | "removeModel" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "actions" | "new">;
|