palistor 0.0.24
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 +21 -0
- package/README.md +947 -0
- package/dist/index.d.ts +54 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +58 -0
- package/dist/index.js.map +1 -0
- package/dist/react/createTrackingProxy.d.ts +55 -0
- package/dist/react/createTrackingProxy.d.ts.map +1 -0
- package/dist/react/createTrackingProxy.js +149 -0
- package/dist/react/createTrackingProxy.js.map +1 -0
- package/dist/react/useForm.d.ts +108 -0
- package/dist/react/useForm.d.ts.map +1 -0
- package/dist/react/useForm.js +180 -0
- package/dist/react/useForm.js.map +1 -0
- package/dist/react/useNotifier.d.ts +35 -0
- package/dist/react/useNotifier.d.ts.map +1 -0
- package/dist/react/useNotifier.js +41 -0
- package/dist/react/useNotifier.js.map +1 -0
- package/dist/react/usePersist.d.ts +45 -0
- package/dist/react/usePersist.d.ts.map +1 -0
- package/dist/react/usePersist.js +60 -0
- package/dist/react/usePersist.js.map +1 -0
- package/dist/react/useStoreContext.d.ts +42 -0
- package/dist/react/useStoreContext.d.ts.map +1 -0
- package/dist/react/useStoreContext.js +46 -0
- package/dist/react/useStoreContext.js.map +1 -0
- package/dist/react/useTranslator.d.ts +37 -0
- package/dist/react/useTranslator.d.ts.map +1 -0
- package/dist/react/useTranslator.js +43 -0
- package/dist/react/useTranslator.js.map +1 -0
- package/dist/store/applyPatch/applyPatch.d.ts +17 -0
- package/dist/store/applyPatch/applyPatch.d.ts.map +1 -0
- package/dist/store/applyPatch/applyPatch.js +44 -0
- package/dist/store/applyPatch/applyPatch.js.map +1 -0
- package/dist/store/buildProxy/buildEntityProjectionProxy.d.ts +52 -0
- package/dist/store/buildProxy/buildEntityProjectionProxy.d.ts.map +1 -0
- package/dist/store/buildProxy/buildEntityProjectionProxy.js +321 -0
- package/dist/store/buildProxy/buildEntityProjectionProxy.js.map +1 -0
- package/dist/store/buildProxy/buildListProxy.d.ts +33 -0
- package/dist/store/buildProxy/buildListProxy.d.ts.map +1 -0
- package/dist/store/buildProxy/buildListProxy.js +306 -0
- package/dist/store/buildProxy/buildListProxy.js.map +1 -0
- package/dist/store/buildProxy/buildProxy.d.ts +41 -0
- package/dist/store/buildProxy/buildProxy.d.ts.map +1 -0
- package/dist/store/buildProxy/buildProxy.js +380 -0
- package/dist/store/buildProxy/buildProxy.js.map +1 -0
- package/dist/store/buildProxy/computeProxyKeys.d.ts +15 -0
- package/dist/store/buildProxy/computeProxyKeys.d.ts.map +1 -0
- package/dist/store/buildProxy/computeProxyKeys.js +28 -0
- package/dist/store/buildProxy/computeProxyKeys.js.map +1 -0
- package/dist/store/buildProxy/handleLazyResolve.d.ts +10 -0
- package/dist/store/buildProxy/handleLazyResolve.d.ts.map +1 -0
- package/dist/store/buildProxy/handleLazyResolve.js +26 -0
- package/dist/store/buildProxy/handleLazyResolve.js.map +1 -0
- package/dist/store/buildProxy/initProxyCaches.d.ts +16 -0
- package/dist/store/buildProxy/initProxyCaches.d.ts.map +1 -0
- package/dist/store/buildProxy/initProxyCaches.js +17 -0
- package/dist/store/buildProxy/initProxyCaches.js.map +1 -0
- package/dist/store/compute/computeFieldState.d.ts +10 -0
- package/dist/store/compute/computeFieldState.d.ts.map +1 -0
- package/dist/store/compute/computeFieldState.js +53 -0
- package/dist/store/compute/computeFieldState.js.map +1 -0
- package/dist/store/compute/fieldStateChanged.d.ts +6 -0
- package/dist/store/compute/fieldStateChanged.d.ts.map +1 -0
- package/dist/store/compute/fieldStateChanged.js +20 -0
- package/dist/store/compute/fieldStateChanged.js.map +1 -0
- package/dist/store/compute/index.d.ts +7 -0
- package/dist/store/compute/index.d.ts.map +1 -0
- package/dist/store/compute/index.js +6 -0
- package/dist/store/compute/index.js.map +1 -0
- package/dist/store/compute/isEmpty.d.ts +6 -0
- package/dist/store/compute/isEmpty.d.ts.map +1 -0
- package/dist/store/compute/isEmpty.js +14 -0
- package/dist/store/compute/isEmpty.js.map +1 -0
- package/dist/store/compute/recompute/collectGroupComputeNodes.d.ts +11 -0
- package/dist/store/compute/recompute/collectGroupComputeNodes.d.ts.map +1 -0
- package/dist/store/compute/recompute/collectGroupComputeNodes.js +26 -0
- package/dist/store/compute/recompute/collectGroupComputeNodes.js.map +1 -0
- package/dist/store/compute/recompute/collectGroupLeafNodes.d.ts +11 -0
- package/dist/store/compute/recompute/collectGroupLeafNodes.d.ts.map +1 -0
- package/dist/store/compute/recompute/collectGroupLeafNodes.js +26 -0
- package/dist/store/compute/recompute/collectGroupLeafNodes.js.map +1 -0
- package/dist/store/compute/recompute/index.d.ts +7 -0
- package/dist/store/compute/recompute/index.d.ts.map +1 -0
- package/dist/store/compute/recompute/index.js +6 -0
- package/dist/store/compute/recompute/index.js.map +1 -0
- package/dist/store/compute/recompute/recomputeAndNotify.d.ts +8 -0
- package/dist/store/compute/recompute/recomputeAndNotify.d.ts.map +1 -0
- package/dist/store/compute/recompute/recomputeAndNotify.js +13 -0
- package/dist/store/compute/recompute/recomputeAndNotify.js.map +1 -0
- package/dist/store/compute/recompute/recomputeLeaves.d.ts +23 -0
- package/dist/store/compute/recompute/recomputeLeaves.d.ts.map +1 -0
- package/dist/store/compute/recompute/recomputeLeaves.js +77 -0
- package/dist/store/compute/recompute/recomputeLeaves.js.map +1 -0
- package/dist/store/compute/recompute/recomputeTargeted.d.ts +14 -0
- package/dist/store/compute/recompute/recomputeTargeted.d.ts.map +1 -0
- package/dist/store/compute/recompute/recomputeTargeted.js +50 -0
- package/dist/store/compute/recompute/recomputeTargeted.js.map +1 -0
- package/dist/store/compute/recompute/topologicalSortComputed.d.ts +16 -0
- package/dist/store/compute/recompute/topologicalSortComputed.d.ts.map +1 -0
- package/dist/store/compute/recompute/topologicalSortComputed.js +60 -0
- package/dist/store/compute/recompute/topologicalSortComputed.js.map +1 -0
- package/dist/store/compute/recompute/types.d.ts +24 -0
- package/dist/store/compute/recompute/types.d.ts.map +1 -0
- package/dist/store/compute/recompute/types.js +2 -0
- package/dist/store/compute/recompute/types.js.map +1 -0
- package/dist/store/compute/resolveFlag.d.ts +7 -0
- package/dist/store/compute/resolveFlag.d.ts.map +1 -0
- package/dist/store/compute/resolveFlag.js +12 -0
- package/dist/store/compute/resolveFlag.js.map +1 -0
- package/dist/store/compute/resolveString.d.ts +11 -0
- package/dist/store/compute/resolveString.d.ts.map +1 -0
- package/dist/store/compute/resolveString.js +18 -0
- package/dist/store/compute/resolveString.js.map +1 -0
- package/dist/store/compute/types.d.ts +37 -0
- package/dist/store/compute/types.d.ts.map +1 -0
- package/dist/store/compute/types.js +2 -0
- package/dist/store/compute/types.js.map +1 -0
- package/dist/store/constants.d.ts +83 -0
- package/dist/store/constants.d.ts.map +1 -0
- package/dist/store/constants.js +145 -0
- package/dist/store/constants.js.map +1 -0
- package/dist/store/defineFieldMapping.d.ts +41 -0
- package/dist/store/defineFieldMapping.d.ts.map +1 -0
- package/dist/store/defineFieldMapping.js +42 -0
- package/dist/store/defineFieldMapping.js.map +1 -0
- package/dist/store/defineList.d.ts +14 -0
- package/dist/store/defineList.d.ts.map +1 -0
- package/dist/store/defineList.js +7 -0
- package/dist/store/defineList.js.map +1 -0
- package/dist/store/dirtyTracking/captureInitialValues.d.ts +8 -0
- package/dist/store/dirtyTracking/captureInitialValues.d.ts.map +1 -0
- package/dist/store/dirtyTracking/captureInitialValues.js +16 -0
- package/dist/store/dirtyTracking/captureInitialValues.js.map +1 -0
- package/dist/store/dirtyTracking/collectInitialSnapshot.d.ts +10 -0
- package/dist/store/dirtyTracking/collectInitialSnapshot.d.ts.map +1 -0
- package/dist/store/dirtyTracking/collectInitialSnapshot.js +35 -0
- package/dist/store/dirtyTracking/collectInitialSnapshot.js.map +1 -0
- package/dist/store/dirtyTracking/index.d.ts +7 -0
- package/dist/store/dirtyTracking/index.d.ts.map +1 -0
- package/dist/store/dirtyTracking/index.js +6 -0
- package/dist/store/dirtyTracking/index.js.map +1 -0
- package/dist/store/dirtyTracking/isDirtyValue.d.ts +7 -0
- package/dist/store/dirtyTracking/isDirtyValue.d.ts.map +1 -0
- package/dist/store/dirtyTracking/isDirtyValue.js +25 -0
- package/dist/store/dirtyTracking/isDirtyValue.js.map +1 -0
- package/dist/store/dirtyTracking/mergeInitialValues.d.ts +11 -0
- package/dist/store/dirtyTracking/mergeInitialValues.d.ts.map +1 -0
- package/dist/store/dirtyTracking/mergeInitialValues.js +29 -0
- package/dist/store/dirtyTracking/mergeInitialValues.js.map +1 -0
- package/dist/store/dirtyTracking/recomputeDirtyTargeted.d.ts +17 -0
- package/dist/store/dirtyTracking/recomputeDirtyTargeted.d.ts.map +1 -0
- package/dist/store/dirtyTracking/recomputeDirtyTargeted.js +90 -0
- package/dist/store/dirtyTracking/recomputeDirtyTargeted.js.map +1 -0
- package/dist/store/dirtyTracking/setGroupRevalidate.d.ts +13 -0
- package/dist/store/dirtyTracking/setGroupRevalidate.d.ts.map +1 -0
- package/dist/store/dirtyTracking/setGroupRevalidate.js +32 -0
- package/dist/store/dirtyTracking/setGroupRevalidate.js.map +1 -0
- package/dist/store/entityRegistry/entityRegistry.d.ts +166 -0
- package/dist/store/entityRegistry/entityRegistry.d.ts.map +1 -0
- package/dist/store/entityRegistry/entityRegistry.js +402 -0
- package/dist/store/entityRegistry/entityRegistry.js.map +1 -0
- package/dist/store/entityRegistry/generateId.d.ts +7 -0
- package/dist/store/entityRegistry/generateId.d.ts.map +1 -0
- package/dist/store/entityRegistry/generateId.js +18 -0
- package/dist/store/entityRegistry/generateId.js.map +1 -0
- package/dist/store/entityRegistry/index.d.ts +4 -0
- package/dist/store/entityRegistry/index.d.ts.map +1 -0
- package/dist/store/entityRegistry/index.js +3 -0
- package/dist/store/entityRegistry/index.js.map +1 -0
- package/dist/store/entityRegistry/types.d.ts +50 -0
- package/dist/store/entityRegistry/types.d.ts.map +1 -0
- package/dist/store/entityRegistry/types.js +2 -0
- package/dist/store/entityRegistry/types.js.map +1 -0
- package/dist/store/fieldMapping.typecheck.d.ts +2 -0
- package/dist/store/fieldMapping.typecheck.d.ts.map +1 -0
- package/dist/store/fieldMapping.typecheck.js +71 -0
- package/dist/store/fieldMapping.typecheck.js.map +1 -0
- package/dist/store/groupDeps/createGroupDeps.d.ts +9 -0
- package/dist/store/groupDeps/createGroupDeps.d.ts.map +1 -0
- package/dist/store/groupDeps/createGroupDeps.js +29 -0
- package/dist/store/groupDeps/createGroupDeps.js.map +1 -0
- package/dist/store/groupDeps/createTrackingValues.d.ts +15 -0
- package/dist/store/groupDeps/createTrackingValues.d.ts.map +1 -0
- package/dist/store/groupDeps/createTrackingValues.js +39 -0
- package/dist/store/groupDeps/createTrackingValues.js.map +1 -0
- package/dist/store/groupDeps/getNodeGroupPath.d.ts +9 -0
- package/dist/store/groupDeps/getNodeGroupPath.d.ts.map +1 -0
- package/dist/store/groupDeps/getNodeGroupPath.js +20 -0
- package/dist/store/groupDeps/getNodeGroupPath.js.map +1 -0
- package/dist/store/groupDeps/getRecipientGroups.d.ts +5 -0
- package/dist/store/groupDeps/getRecipientGroups.d.ts.map +1 -0
- package/dist/store/groupDeps/getRecipientGroups.js +15 -0
- package/dist/store/groupDeps/getRecipientGroups.js.map +1 -0
- package/dist/store/groupDeps/groupDeps.d.ts +19 -0
- package/dist/store/groupDeps/groupDeps.d.ts.map +1 -0
- package/dist/store/groupDeps/groupDeps.js +19 -0
- package/dist/store/groupDeps/groupDeps.js.map +1 -0
- package/dist/store/groupDeps/index.d.ts +7 -0
- package/dist/store/groupDeps/index.d.ts.map +1 -0
- package/dist/store/groupDeps/index.js +7 -0
- package/dist/store/groupDeps/index.js.map +1 -0
- package/dist/store/groupDeps/pairKey.d.ts +7 -0
- package/dist/store/groupDeps/pairKey.d.ts.map +1 -0
- package/dist/store/groupDeps/pairKey.js +12 -0
- package/dist/store/groupDeps/pairKey.js.map +1 -0
- package/dist/store/groupDeps/resolveGroupByPath.d.ts +8 -0
- package/dist/store/groupDeps/resolveGroupByPath.d.ts.map +1 -0
- package/dist/store/groupDeps/resolveGroupByPath.js +19 -0
- package/dist/store/groupDeps/resolveGroupByPath.js.map +1 -0
- package/dist/store/init/createNotificationHub.d.ts +81 -0
- package/dist/store/init/createNotificationHub.d.ts.map +1 -0
- package/dist/store/init/createNotificationHub.js +149 -0
- package/dist/store/init/createNotificationHub.js.map +1 -0
- package/dist/store/init/createResolveManager.d.ts +166 -0
- package/dist/store/init/createResolveManager.d.ts.map +1 -0
- package/dist/store/init/createResolveManager.js +502 -0
- package/dist/store/init/createResolveManager.js.map +1 -0
- package/dist/store/init/initGroupSubmitting.d.ts +8 -0
- package/dist/store/init/initGroupSubmitting.d.ts.map +1 -0
- package/dist/store/init/initGroupSubmitting.js +39 -0
- package/dist/store/init/initGroupSubmitting.js.map +1 -0
- package/dist/store/normalizeConfig.d.ts +28 -0
- package/dist/store/normalizeConfig.d.ts.map +1 -0
- package/dist/store/normalizeConfig.js +76 -0
- package/dist/store/normalizeConfig.js.map +1 -0
- package/dist/store/onChangePipeline/computeFieldKey.d.ts +11 -0
- package/dist/store/onChangePipeline/computeFieldKey.d.ts.map +1 -0
- package/dist/store/onChangePipeline/computeFieldKey.js +18 -0
- package/dist/store/onChangePipeline/computeFieldKey.js.map +1 -0
- package/dist/store/onChangePipeline/findOnChangeAncestors.d.ts +8 -0
- package/dist/store/onChangePipeline/findOnChangeAncestors.d.ts.map +1 -0
- package/dist/store/onChangePipeline/findOnChangeAncestors.js +22 -0
- package/dist/store/onChangePipeline/findOnChangeAncestors.js.map +1 -0
- package/dist/store/onChangePipeline/onChangePipeline.d.ts +29 -0
- package/dist/store/onChangePipeline/onChangePipeline.d.ts.map +1 -0
- package/dist/store/onChangePipeline/onChangePipeline.js +99 -0
- package/dist/store/onChangePipeline/onChangePipeline.js.map +1 -0
- package/dist/store/persist/drivers.d.ts +34 -0
- package/dist/store/persist/drivers.d.ts.map +1 -0
- package/dist/store/persist/drivers.js +89 -0
- package/dist/store/persist/drivers.js.map +1 -0
- package/dist/store/persist/index.d.ts +7 -0
- package/dist/store/persist/index.d.ts.map +1 -0
- package/dist/store/persist/index.js +3 -0
- package/dist/store/persist/index.js.map +1 -0
- package/dist/store/persist/persistManager.d.ts +67 -0
- package/dist/store/persist/persistManager.d.ts.map +1 -0
- package/dist/store/persist/persistManager.js +198 -0
- package/dist/store/persist/persistManager.js.map +1 -0
- package/dist/store/persist/types.d.ts +66 -0
- package/dist/store/persist/types.d.ts.map +1 -0
- package/dist/store/persist/types.js +9 -0
- package/dist/store/persist/types.js.map +1 -0
- package/dist/store/resetPipeline/buildResetPatch.d.ts +11 -0
- package/dist/store/resetPipeline/buildResetPatch.d.ts.map +1 -0
- package/dist/store/resetPipeline/buildResetPatch.js +22 -0
- package/dist/store/resetPipeline/buildResetPatch.js.map +1 -0
- package/dist/store/resetPipeline/collectDefaults.d.ts +12 -0
- package/dist/store/resetPipeline/collectDefaults.d.ts.map +1 -0
- package/dist/store/resetPipeline/collectDefaults.js +31 -0
- package/dist/store/resetPipeline/collectDefaults.js.map +1 -0
- package/dist/store/resetPipeline/resetPipeline.d.ts +19 -0
- package/dist/store/resetPipeline/resetPipeline.d.ts.map +1 -0
- package/dist/store/resetPipeline/resetPipeline.js +49 -0
- package/dist/store/resetPipeline/resetPipeline.js.map +1 -0
- package/dist/store/resolvePipeline/applyPendingWrites.d.ts +26 -0
- package/dist/store/resolvePipeline/applyPendingWrites.d.ts.map +1 -0
- package/dist/store/resolvePipeline/applyPendingWrites.js +68 -0
- package/dist/store/resolvePipeline/applyPendingWrites.js.map +1 -0
- package/dist/store/resolvePipeline/createContextTrackingProxy.d.ts +16 -0
- package/dist/store/resolvePipeline/createContextTrackingProxy.d.ts.map +1 -0
- package/dist/store/resolvePipeline/createContextTrackingProxy.js +29 -0
- package/dist/store/resolvePipeline/createContextTrackingProxy.js.map +1 -0
- package/dist/store/resolvePipeline/createValuesTrackingProxy.d.ts +75 -0
- package/dist/store/resolvePipeline/createValuesTrackingProxy.d.ts.map +1 -0
- package/dist/store/resolvePipeline/createValuesTrackingProxy.js +128 -0
- package/dist/store/resolvePipeline/createValuesTrackingProxy.js.map +1 -0
- package/dist/store/resolvePipeline/executeEntityFieldResolve.d.ts +29 -0
- package/dist/store/resolvePipeline/executeEntityFieldResolve.d.ts.map +1 -0
- package/dist/store/resolvePipeline/executeEntityFieldResolve.js +218 -0
- package/dist/store/resolvePipeline/executeEntityFieldResolve.js.map +1 -0
- package/dist/store/resolvePipeline/executeListResolve.d.ts +32 -0
- package/dist/store/resolvePipeline/executeListResolve.d.ts.map +1 -0
- package/dist/store/resolvePipeline/executeListResolve.js +157 -0
- package/dist/store/resolvePipeline/executeListResolve.js.map +1 -0
- package/dist/store/resolvePipeline/executeResolve.d.ts +26 -0
- package/dist/store/resolvePipeline/executeResolve.d.ts.map +1 -0
- package/dist/store/resolvePipeline/executeResolve.js +201 -0
- package/dist/store/resolvePipeline/executeResolve.js.map +1 -0
- package/dist/store/resolvePipeline/findResolvesToRetrigger.d.ts +10 -0
- package/dist/store/resolvePipeline/findResolvesToRetrigger.d.ts.map +1 -0
- package/dist/store/resolvePipeline/findResolvesToRetrigger.js +29 -0
- package/dist/store/resolvePipeline/findResolvesToRetrigger.js.map +1 -0
- package/dist/store/resolvePipeline/index.d.ts +22 -0
- package/dist/store/resolvePipeline/index.d.ts.map +1 -0
- package/dist/store/resolvePipeline/index.js +18 -0
- package/dist/store/resolvePipeline/index.js.map +1 -0
- package/dist/store/resolvePipeline/initResolveStates.d.ts +41 -0
- package/dist/store/resolvePipeline/initResolveStates.d.ts.map +1 -0
- package/dist/store/resolvePipeline/initResolveStates.js +95 -0
- package/dist/store/resolvePipeline/initResolveStates.js.map +1 -0
- package/dist/store/resolvePipeline/resetResolveState.d.ts +8 -0
- package/dist/store/resolvePipeline/resetResolveState.d.ts.map +1 -0
- package/dist/store/resolvePipeline/resetResolveState.js +18 -0
- package/dist/store/resolvePipeline/resetResolveState.js.map +1 -0
- package/dist/store/resolvePipeline/types.d.ts +134 -0
- package/dist/store/resolvePipeline/types.d.ts.map +1 -0
- package/dist/store/resolvePipeline/types.js +54 -0
- package/dist/store/resolvePipeline/types.js.map +1 -0
- package/dist/store/store/NodeRegistry/index.d.ts +3 -0
- package/dist/store/store/NodeRegistry/index.d.ts.map +1 -0
- package/dist/store/store/NodeRegistry/index.js +2 -0
- package/dist/store/store/NodeRegistry/index.js.map +1 -0
- package/dist/store/store/NodeRegistry/nodeRegistry.d.ts +139 -0
- package/dist/store/store/NodeRegistry/nodeRegistry.d.ts.map +1 -0
- package/dist/store/store/NodeRegistry/nodeRegistry.js +255 -0
- package/dist/store/store/NodeRegistry/nodeRegistry.js.map +1 -0
- package/dist/store/store/NodeRegistry/nodeUtils.d.ts +17 -0
- package/dist/store/store/NodeRegistry/nodeUtils.d.ts.map +1 -0
- package/dist/store/store/NodeRegistry/nodeUtils.js +21 -0
- package/dist/store/store/NodeRegistry/nodeUtils.js.map +1 -0
- package/dist/store/store/NodeRegistry/nodeView.d.ts +28 -0
- package/dist/store/store/NodeRegistry/nodeView.d.ts.map +1 -0
- package/dist/store/store/NodeRegistry/nodeView.js +16 -0
- package/dist/store/store/NodeRegistry/nodeView.js.map +1 -0
- package/dist/store/store/dirtyTracker.d.ts +27 -0
- package/dist/store/store/dirtyTracker.d.ts.map +1 -0
- package/dist/store/store/dirtyTracker.js +38 -0
- package/dist/store/store/dirtyTracker.js.map +1 -0
- package/dist/store/store/groupDepsMap.d.ts +52 -0
- package/dist/store/store/groupDepsMap.d.ts.map +1 -0
- package/dist/store/store/groupDepsMap.js +84 -0
- package/dist/store/store/groupDepsMap.js.map +1 -0
- package/dist/store/store/hasComputedProps.d.ts +7 -0
- package/dist/store/store/hasComputedProps.d.ts.map +1 -0
- package/dist/store/store/hasComputedProps.js +15 -0
- package/dist/store/store/hasComputedProps.js.map +1 -0
- package/dist/store/store/index.d.ts +6 -0
- package/dist/store/store/index.d.ts.map +1 -0
- package/dist/store/store/index.js +3 -0
- package/dist/store/store/index.js.map +1 -0
- package/dist/store/store/nodeMap.d.ts +12 -0
- package/dist/store/store/nodeMap.d.ts.map +1 -0
- package/dist/store/store/nodeMap.js +30 -0
- package/dist/store/store/nodeMap.js.map +1 -0
- package/dist/store/store/palistor.d.ts +256 -0
- package/dist/store/store/palistor.d.ts.map +1 -0
- package/dist/store/store/palistor.js +772 -0
- package/dist/store/store/palistor.js.map +1 -0
- package/dist/store/store/registerNodes.d.ts +33 -0
- package/dist/store/store/registerNodes.d.ts.map +1 -0
- package/dist/store/store/registerNodes.js +88 -0
- package/dist/store/store/registerNodes.js.map +1 -0
- package/dist/store/store/serviceRegistry.d.ts +24 -0
- package/dist/store/store/serviceRegistry.d.ts.map +1 -0
- package/dist/store/store/serviceRegistry.js +32 -0
- package/dist/store/store/serviceRegistry.js.map +1 -0
- package/dist/store/store/types.d.ts +622 -0
- package/dist/store/store/types.d.ts.map +1 -0
- package/dist/store/store/types.js +2 -0
- package/dist/store/store/types.js.map +1 -0
- package/dist/store/submitPipeline/applyLeafBeforeSubmit.d.ts +7 -0
- package/dist/store/submitPipeline/applyLeafBeforeSubmit.d.ts.map +1 -0
- package/dist/store/submitPipeline/applyLeafBeforeSubmit.js +26 -0
- package/dist/store/submitPipeline/applyLeafBeforeSubmit.js.map +1 -0
- package/dist/store/submitPipeline/collectLeafStates.d.ts +11 -0
- package/dist/store/submitPipeline/collectLeafStates.d.ts.map +1 -0
- package/dist/store/submitPipeline/collectLeafStates.js +17 -0
- package/dist/store/submitPipeline/collectLeafStates.js.map +1 -0
- package/dist/store/submitPipeline/getSubValues.d.ts +9 -0
- package/dist/store/submitPipeline/getSubValues.d.ts.map +1 -0
- package/dist/store/submitPipeline/getSubValues.js +26 -0
- package/dist/store/submitPipeline/getSubValues.js.map +1 -0
- package/dist/store/submitPipeline/submitPipeline.d.ts +32 -0
- package/dist/store/submitPipeline/submitPipeline.d.ts.map +1 -0
- package/dist/store/submitPipeline/submitPipeline.js +119 -0
- package/dist/store/submitPipeline/submitPipeline.js.map +1 -0
- package/dist/store/submitPipeline/types.d.ts +12 -0
- package/dist/store/submitPipeline/types.d.ts.map +1 -0
- package/dist/store/submitPipeline/types.js +2 -0
- package/dist/store/submitPipeline/types.js.map +1 -0
- package/dist/store/traversal/index.d.ts +4 -0
- package/dist/store/traversal/index.d.ts.map +1 -0
- package/dist/store/traversal/index.js +3 -0
- package/dist/store/traversal/index.js.map +1 -0
- package/dist/store/traversal/nodeClassifier.d.ts +23 -0
- package/dist/store/traversal/nodeClassifier.d.ts.map +1 -0
- package/dist/store/traversal/nodeClassifier.js +46 -0
- package/dist/store/traversal/nodeClassifier.js.map +1 -0
- package/dist/store/traversal/walkFull.d.ts +33 -0
- package/dist/store/traversal/walkFull.d.ts.map +1 -0
- package/dist/store/traversal/walkFull.js +28 -0
- package/dist/store/traversal/walkFull.js.map +1 -0
- package/dist/store/valuesCache/valuesCache.d.ts +27 -0
- package/dist/store/valuesCache/valuesCache.d.ts.map +1 -0
- package/dist/store/valuesCache/valuesCache.js +58 -0
- package/dist/store/valuesCache/valuesCache.js.map +1 -0
- package/dist/store/writePipeline/formatPatch.d.ts +14 -0
- package/dist/store/writePipeline/formatPatch.d.ts.map +1 -0
- package/dist/store/writePipeline/formatPatch.js +35 -0
- package/dist/store/writePipeline/formatPatch.js.map +1 -0
- package/dist/store/writePipeline/formatValue.d.ts +12 -0
- package/dist/store/writePipeline/formatValue.d.ts.map +1 -0
- package/dist/store/writePipeline/formatValue.js +15 -0
- package/dist/store/writePipeline/formatValue.js.map +1 -0
- package/dist/store/writePipeline/index.d.ts +8 -0
- package/dist/store/writePipeline/index.d.ts.map +1 -0
- package/dist/store/writePipeline/index.js +7 -0
- package/dist/store/writePipeline/index.js.map +1 -0
- package/dist/store/writePipeline/mergeChanged.d.ts +9 -0
- package/dist/store/writePipeline/mergeChanged.d.ts.map +1 -0
- package/dist/store/writePipeline/mergeChanged.js +15 -0
- package/dist/store/writePipeline/mergeChanged.js.map +1 -0
- package/dist/store/writePipeline/runSetter.d.ts +16 -0
- package/dist/store/writePipeline/runSetter.d.ts.map +1 -0
- package/dist/store/writePipeline/runSetter.js +35 -0
- package/dist/store/writePipeline/runSetter.js.map +1 -0
- package/dist/store/writePipeline/storeValue.d.ts +11 -0
- package/dist/store/writePipeline/storeValue.d.ts.map +1 -0
- package/dist/store/writePipeline/storeValue.js +17 -0
- package/dist/store/writePipeline/storeValue.js.map +1 -0
- package/dist/store/writePipeline/types.d.ts +10 -0
- package/dist/store/writePipeline/types.d.ts.map +1 -0
- package/dist/store/writePipeline/types.js +2 -0
- package/dist/store/writePipeline/types.js.map +1 -0
- package/dist/store/writePipeline/writePipeline.d.ts +31 -0
- package/dist/store/writePipeline/writePipeline.d.ts.map +1 -0
- package/dist/store/writePipeline/writePipeline.js +97 -0
- package/dist/store/writePipeline/writePipeline.js.map +1 -0
- package/package.json +79 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Вычисляет строковое свойство (label, placeholder, description) из конфига.
|
|
3
|
+
* Может быть строкой или функцией `(t: TranslateFn, values) => string`.
|
|
4
|
+
*
|
|
5
|
+
* Если translator зарегистрирован — реальный резолв происходит лениво
|
|
6
|
+
* в proxy GET trap (buildProxy.ts). Здесь сохраняем fallback:
|
|
7
|
+
* для функций — вызываем с identity → возвращаем ключ перевода.
|
|
8
|
+
*/
|
|
9
|
+
export function resolveString(configValue, values = {}) {
|
|
10
|
+
if (configValue === undefined)
|
|
11
|
+
return undefined;
|
|
12
|
+
if (typeof configValue === "function") {
|
|
13
|
+
// identity — вернёт ключ как есть (fallback до регистрации translator)
|
|
14
|
+
return configValue((v) => v, values);
|
|
15
|
+
}
|
|
16
|
+
return configValue;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=resolveString.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveString.js","sourceRoot":"","sources":["../../../store/compute/resolveString.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAC3B,WAA2F,EAC3F,SAA8B,EAAE;IAEhC,IAAI,WAAW,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAChD,IAAI,OAAO,WAAW,KAAK,UAAU,EAAE,CAAC;QACtC,uEAAuE;QACvE,OAAO,WAAW,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Полное вычисленное состояние одного поля.
|
|
3
|
+
*
|
|
4
|
+
* Хранится в WeakMap<configNode, FieldState>. Все функции из конфига
|
|
5
|
+
* (isVisible, isRequired, validate…) уже вызваны, результат — чистые значения.
|
|
6
|
+
*/
|
|
7
|
+
export interface FieldState {
|
|
8
|
+
value: unknown;
|
|
9
|
+
label?: string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
isRequired: boolean;
|
|
13
|
+
isReadOnly: boolean;
|
|
14
|
+
isDisabled: boolean;
|
|
15
|
+
isVisible: boolean;
|
|
16
|
+
isInvalid?: boolean;
|
|
17
|
+
errorMessage?: string;
|
|
18
|
+
/** true while submit pipeline is running (group nodes only). */
|
|
19
|
+
submitting?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Per-field: value differs from initial.
|
|
22
|
+
* Per-group: at least one descendant leaf is dirty.
|
|
23
|
+
*/
|
|
24
|
+
dirty?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Group-level flag: when true, validation errors are computed and shown.
|
|
27
|
+
* Before first submit attempt: false (errors hidden).
|
|
28
|
+
* After failed submit: true (live validation on every change).
|
|
29
|
+
* Leaves inherit this from their parent group during recompute.
|
|
30
|
+
*/
|
|
31
|
+
revalidate?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* true while async resolver is loading (group nodes with resolve only).
|
|
34
|
+
*/
|
|
35
|
+
loading?: boolean;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../store/compute/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gEAAgE;IAChE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../store/compute/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Символ для доступа к исходному config-узлу из Proxy.
|
|
3
|
+
* Используется tracking proxy для определения, какой узел читается.
|
|
4
|
+
*/
|
|
5
|
+
export declare const CONFIG_NODE: unique symbol;
|
|
6
|
+
/**
|
|
7
|
+
* Символ для получения исходного source-proxy (store.proxy) из tracking proxy.
|
|
8
|
+
* Позволяет useForm принять tracking proxy поддерево и извлечь source.
|
|
9
|
+
*/
|
|
10
|
+
export declare const SOURCE_PROXY: unique symbol;
|
|
11
|
+
/**
|
|
12
|
+
* Символ для получения ссылки на ProxyStore из tracking proxy.
|
|
13
|
+
* Позволяет useForm принять tracking proxy поддерево и подписаться на store.
|
|
14
|
+
*/
|
|
15
|
+
export declare const STORE_REF: unique symbol;
|
|
16
|
+
/**
|
|
17
|
+
* Символ для получения entity ID из EntityProjectionProxy.
|
|
18
|
+
* Позволяет useForm(entity, templateSelector) извлечь entityId и store из proxy.
|
|
19
|
+
*/
|
|
20
|
+
export declare const ENTITY_ID: unique symbol;
|
|
21
|
+
/**
|
|
22
|
+
* Символ для получения объекта id-листа (EntityLeafNode) из EntityProjectionProxy.
|
|
23
|
+
* Используется tracking proxy для регистрации подписки на id — чтобы rekey()
|
|
24
|
+
* корректно триггерил перерендер компонентов, читающих `entity.id`.
|
|
25
|
+
*/
|
|
26
|
+
export declare const ENTITY_ID_LEAF: unique symbol;
|
|
27
|
+
/**
|
|
28
|
+
* Бренд-символ list proxy — возвращает объект `ListState` (единый кубик «список»).
|
|
29
|
+
* Идентичность узла для tracking/resolve: сам объект `ListState` (ключ в хабе).
|
|
30
|
+
* Root-list — `ownerEntity === null`; per-entity — изолированный `ListState` на
|
|
31
|
+
* каждую пару (owner, listConfigNode).
|
|
32
|
+
*/
|
|
33
|
+
export declare const LIST_STATE: unique symbol;
|
|
34
|
+
/**
|
|
35
|
+
* Единственный источник имён полей состояния (canonical tuple).
|
|
36
|
+
* Из него выводятся {@link FIELD_STATE_PROPS} (Set) и {@link MAPPABLE_KEYS}.
|
|
37
|
+
*/
|
|
38
|
+
export declare const FIELD_STATE_KEYS: readonly ["value", "label", "placeholder", "description", "isRequired", "isReadOnly", "isDisabled", "isVisible", "isInvalid", "errorMessage", "dirty", "loading"];
|
|
39
|
+
/**
|
|
40
|
+
* Свойства, относящиеся к состоянию поля. При обращении к ним прокси
|
|
41
|
+
* возвращает значение из FieldState (вычисленное), а не из конфига.
|
|
42
|
+
*/
|
|
43
|
+
export declare const FIELD_STATE_PROPS: Set<string>;
|
|
44
|
+
/**
|
|
45
|
+
* Ключи, которые можно переименовывать через `fieldMapping`:
|
|
46
|
+
* поля состояния + функциональный сеттер `onValueChange`.
|
|
47
|
+
*/
|
|
48
|
+
export declare const MAPPABLE_KEYS: readonly ["value", "label", "placeholder", "description", "isRequired", "isReadOnly", "isDisabled", "isVisible", "isInvalid", "errorMessage", "dirty", "loading", "onValueChange"];
|
|
49
|
+
/** Имя internal-ключа, допустимое как источник переименования в `fieldMapping`. */
|
|
50
|
+
export type MappableKey = (typeof MAPPABLE_KEYS)[number];
|
|
51
|
+
/**
|
|
52
|
+
* Подмножество mappable-ключей, которые являются ВХОДНЫМИ ключами конфига —
|
|
53
|
+
* т.е. их пишет автор в конфиге узла. Только эти ключи нормализуются
|
|
54
|
+
* external→internal при активном `fieldMapping` (см. {@link normalizeConfig}).
|
|
55
|
+
*
|
|
56
|
+
* Остальные mappable-ключи (`isInvalid`, `errorMessage`, `dirty`, `loading`,
|
|
57
|
+
* `onValueChange`) — вычисляемые/выходные: в конфиге не пишутся, поэтому на
|
|
58
|
+
* входе их нормализовать нечего (перевод для них происходит только на выходе
|
|
59
|
+
* proxy). Попытка написать такой ключ в конфиге — ошибка (strict).
|
|
60
|
+
*/
|
|
61
|
+
export declare const MAPPABLE_CONFIG_KEYS_TUPLE: readonly ["value", "label", "placeholder", "description", "isRequired", "isReadOnly", "isDisabled", "isVisible"];
|
|
62
|
+
export declare const MAPPABLE_CONFIG_KEYS: Set<string>;
|
|
63
|
+
/** Тип-версия {@link MAPPABLE_CONFIG_KEYS} — internal-имена config-ключей,
|
|
64
|
+
* которые можно переименовывать через `fieldMapping` (для валидатора типов). */
|
|
65
|
+
export type MappableConfigKey = (typeof MAPPABLE_CONFIG_KEYS_TUPLE)[number];
|
|
66
|
+
/**
|
|
67
|
+
* Полный набор «служебных» ключей узла конфига.
|
|
68
|
+
* При обходе дерева (init, buildValuesCache) — пропускаются.
|
|
69
|
+
*/
|
|
70
|
+
export declare const CONFIG_PROPS: Set<string>;
|
|
71
|
+
export declare const SPREADABLE_FIELD_STATE_PROPS: string[];
|
|
72
|
+
/**
|
|
73
|
+
* Статический набор ключей, которые включаются при spread группового узла:
|
|
74
|
+
* состояние (submitting, dirty, revalidate, loading) и методы (submit, reset).
|
|
75
|
+
* Дочерние узлы добавляются динамически в computeProxyKeys.
|
|
76
|
+
*/
|
|
77
|
+
export declare const GROUP_SPREAD_KEYS: string[];
|
|
78
|
+
/**
|
|
79
|
+
* Статический набор ключей для proxy списка (ListNode).
|
|
80
|
+
* Возвращается из computeProxyKeys вместо GROUP_SPREAD_KEYS, когда узел — массив.
|
|
81
|
+
*/
|
|
82
|
+
export declare const LIST_SPREAD_KEYS: string[];
|
|
83
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../store/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,OAAO,MAA6B,CAAC;AAE/D;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,OAAO,MAA8B,CAAC;AAEjE;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,OAAO,MAA2B,CAAC;AAE3D;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,OAAO,MAA2B,CAAC;AAE3D;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,OAAO,MAA+B,CAAC;AAEpE;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,OAAO,MAA4B,CAAC;AAE7D;;;GAGG;AACH,eAAO,MAAM,gBAAgB,mKAanB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,iBAAiB,aAAoC,CAAC;AAEnE;;;GAGG;AACH,eAAO,MAAM,aAAa,oLAAkD,CAAC;AAE7E,mFAAmF;AACnF,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,kHAS7B,CAAC;AAEX,eAAO,MAAM,oBAAoB,aAA8C,CAAC;AAEhF;iFACiF;AACjF,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5E;;;GAGG;AACH,eAAO,MAAM,YAAY,aAmBvB,CAAC;AAEH,eAAO,MAAM,4BAA4B,UAM3B,CAAC;AAEf;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,EASrC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,EAWpC,CAAC"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Символ для доступа к исходному config-узлу из Proxy.
|
|
3
|
+
* Используется tracking proxy для определения, какой узел читается.
|
|
4
|
+
*/
|
|
5
|
+
export const CONFIG_NODE = Symbol("configNode");
|
|
6
|
+
/**
|
|
7
|
+
* Символ для получения исходного source-proxy (store.proxy) из tracking proxy.
|
|
8
|
+
* Позволяет useForm принять tracking proxy поддерево и извлечь source.
|
|
9
|
+
*/
|
|
10
|
+
export const SOURCE_PROXY = Symbol("sourceProxy");
|
|
11
|
+
/**
|
|
12
|
+
* Символ для получения ссылки на ProxyStore из tracking proxy.
|
|
13
|
+
* Позволяет useForm принять tracking proxy поддерево и подписаться на store.
|
|
14
|
+
*/
|
|
15
|
+
export const STORE_REF = Symbol("storeRef");
|
|
16
|
+
/**
|
|
17
|
+
* Символ для получения entity ID из EntityProjectionProxy.
|
|
18
|
+
* Позволяет useForm(entity, templateSelector) извлечь entityId и store из proxy.
|
|
19
|
+
*/
|
|
20
|
+
export const ENTITY_ID = Symbol("entityId");
|
|
21
|
+
/**
|
|
22
|
+
* Символ для получения объекта id-листа (EntityLeafNode) из EntityProjectionProxy.
|
|
23
|
+
* Используется tracking proxy для регистрации подписки на id — чтобы rekey()
|
|
24
|
+
* корректно триггерил перерендер компонентов, читающих `entity.id`.
|
|
25
|
+
*/
|
|
26
|
+
export const ENTITY_ID_LEAF = Symbol("entityIdLeaf");
|
|
27
|
+
/**
|
|
28
|
+
* Бренд-символ list proxy — возвращает объект `ListState` (единый кубик «список»).
|
|
29
|
+
* Идентичность узла для tracking/resolve: сам объект `ListState` (ключ в хабе).
|
|
30
|
+
* Root-list — `ownerEntity === null`; per-entity — изолированный `ListState` на
|
|
31
|
+
* каждую пару (owner, listConfigNode).
|
|
32
|
+
*/
|
|
33
|
+
export const LIST_STATE = Symbol("listState");
|
|
34
|
+
/**
|
|
35
|
+
* Единственный источник имён полей состояния (canonical tuple).
|
|
36
|
+
* Из него выводятся {@link FIELD_STATE_PROPS} (Set) и {@link MAPPABLE_KEYS}.
|
|
37
|
+
*/
|
|
38
|
+
export const FIELD_STATE_KEYS = [
|
|
39
|
+
"value",
|
|
40
|
+
"label",
|
|
41
|
+
"placeholder",
|
|
42
|
+
"description",
|
|
43
|
+
"isRequired",
|
|
44
|
+
"isReadOnly",
|
|
45
|
+
"isDisabled",
|
|
46
|
+
"isVisible",
|
|
47
|
+
"isInvalid",
|
|
48
|
+
"errorMessage",
|
|
49
|
+
"dirty",
|
|
50
|
+
"loading",
|
|
51
|
+
];
|
|
52
|
+
/**
|
|
53
|
+
* Свойства, относящиеся к состоянию поля. При обращении к ним прокси
|
|
54
|
+
* возвращает значение из FieldState (вычисленное), а не из конфига.
|
|
55
|
+
*/
|
|
56
|
+
export const FIELD_STATE_PROPS = new Set(FIELD_STATE_KEYS);
|
|
57
|
+
/**
|
|
58
|
+
* Ключи, которые можно переименовывать через `fieldMapping`:
|
|
59
|
+
* поля состояния + функциональный сеттер `onValueChange`.
|
|
60
|
+
*/
|
|
61
|
+
export const MAPPABLE_KEYS = [...FIELD_STATE_KEYS, "onValueChange"];
|
|
62
|
+
/**
|
|
63
|
+
* Подмножество mappable-ключей, которые являются ВХОДНЫМИ ключами конфига —
|
|
64
|
+
* т.е. их пишет автор в конфиге узла. Только эти ключи нормализуются
|
|
65
|
+
* external→internal при активном `fieldMapping` (см. {@link normalizeConfig}).
|
|
66
|
+
*
|
|
67
|
+
* Остальные mappable-ключи (`isInvalid`, `errorMessage`, `dirty`, `loading`,
|
|
68
|
+
* `onValueChange`) — вычисляемые/выходные: в конфиге не пишутся, поэтому на
|
|
69
|
+
* входе их нормализовать нечего (перевод для них происходит только на выходе
|
|
70
|
+
* proxy). Попытка написать такой ключ в конфиге — ошибка (strict).
|
|
71
|
+
*/
|
|
72
|
+
export const MAPPABLE_CONFIG_KEYS_TUPLE = [
|
|
73
|
+
"value",
|
|
74
|
+
"label",
|
|
75
|
+
"placeholder",
|
|
76
|
+
"description",
|
|
77
|
+
"isRequired",
|
|
78
|
+
"isReadOnly",
|
|
79
|
+
"isDisabled",
|
|
80
|
+
"isVisible",
|
|
81
|
+
];
|
|
82
|
+
export const MAPPABLE_CONFIG_KEYS = new Set(MAPPABLE_CONFIG_KEYS_TUPLE);
|
|
83
|
+
/**
|
|
84
|
+
* Полный набор «служебных» ключей узла конфига.
|
|
85
|
+
* При обходе дерева (init, buildValuesCache) — пропускаются.
|
|
86
|
+
*/
|
|
87
|
+
export const CONFIG_PROPS = new Set([
|
|
88
|
+
...FIELD_STATE_PROPS,
|
|
89
|
+
"validate",
|
|
90
|
+
"formatter",
|
|
91
|
+
"setter",
|
|
92
|
+
"componentProps",
|
|
93
|
+
"types",
|
|
94
|
+
"dependencies",
|
|
95
|
+
// Handler props (submit, reset, onChange lifecycle)
|
|
96
|
+
"onSubmit",
|
|
97
|
+
"beforeSubmit",
|
|
98
|
+
"afterSubmit",
|
|
99
|
+
"reset",
|
|
100
|
+
"onChange",
|
|
101
|
+
// Resolve props
|
|
102
|
+
"resolve",
|
|
103
|
+
"deps",
|
|
104
|
+
// Node kind marker — set by registerNodes/entity factories, invisible to user code
|
|
105
|
+
"__kind",
|
|
106
|
+
]);
|
|
107
|
+
export const SPREADABLE_FIELD_STATE_PROPS = [
|
|
108
|
+
...FIELD_STATE_PROPS,
|
|
109
|
+
"onValueChange",
|
|
110
|
+
].filter(k => ![
|
|
111
|
+
"dirty",
|
|
112
|
+
"loading",
|
|
113
|
+
].includes(k));
|
|
114
|
+
/**
|
|
115
|
+
* Статический набор ключей, которые включаются при spread группового узла:
|
|
116
|
+
* состояние (submitting, dirty, revalidate, loading) и методы (submit, reset).
|
|
117
|
+
* Дочерние узлы добавляются динамически в computeProxyKeys.
|
|
118
|
+
*/
|
|
119
|
+
export const GROUP_SPREAD_KEYS = [
|
|
120
|
+
"value",
|
|
121
|
+
"submitting",
|
|
122
|
+
"dirty",
|
|
123
|
+
"revalidate",
|
|
124
|
+
"loading",
|
|
125
|
+
"values",
|
|
126
|
+
"submit",
|
|
127
|
+
"reset",
|
|
128
|
+
];
|
|
129
|
+
/**
|
|
130
|
+
* Статический набор ключей для proxy списка (ListNode).
|
|
131
|
+
* Возвращается из computeProxyKeys вместо GROUP_SPREAD_KEYS, когда узел — массив.
|
|
132
|
+
*/
|
|
133
|
+
export const LIST_SPREAD_KEYS = [
|
|
134
|
+
"items",
|
|
135
|
+
"length",
|
|
136
|
+
"loading",
|
|
137
|
+
"dirty",
|
|
138
|
+
"add",
|
|
139
|
+
"remove",
|
|
140
|
+
"getById",
|
|
141
|
+
"setItems",
|
|
142
|
+
"map",
|
|
143
|
+
"getValues",
|
|
144
|
+
];
|
|
145
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../store/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAkB,MAAM,CAAC,YAAY,CAAC,CAAC;AAE/D;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAkB,MAAM,CAAC,aAAa,CAAC,CAAC;AAEjE;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAkB,MAAM,CAAC,UAAU,CAAC,CAAC;AAE3D;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAkB,MAAM,CAAC,UAAU,CAAC,CAAC;AAE3D;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAkB,MAAM,CAAC,cAAc,CAAC,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAkB,MAAM,CAAC,WAAW,CAAC,CAAC;AAE7D;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,OAAO;IACP,OAAO;IACP,aAAa;IACb,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,WAAW;IACX,cAAc;IACd,OAAO;IACP,SAAS;CACD,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAS,gBAAgB,CAAC,CAAC;AAEnE;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,GAAG,gBAAgB,EAAE,eAAe,CAAU,CAAC;AAK7E;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,OAAO;IACP,OAAO;IACP,aAAa;IACb,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,WAAW;CACH,CAAC;AAEX,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAS,0BAA0B,CAAC,CAAC;AAMhF;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,GAAG,CAAS;IAC1C,GAAG,iBAAiB;IACpB,UAAU;IACV,WAAW;IACX,QAAQ;IACR,gBAAgB;IAChB,OAAO;IACP,cAAc;IACd,oDAAoD;IACpD,UAAU;IACV,cAAc;IACd,aAAa;IACb,OAAO;IACP,UAAU;IACV,gBAAgB;IAChB,SAAS;IACT,MAAM;IACN,mFAAmF;IACnF,QAAQ;CACT,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,GAAG,iBAAiB;IACpB,eAAe;CAChB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACb,OAAO;IACP,SAAS;CACV,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;AAEf;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAa;IACzC,OAAO;IACP,YAAY;IACZ,OAAO;IACP,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,OAAO;CACR,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAa;IACxC,OAAO;IACP,QAAQ;IACR,SAAS;IACT,OAAO;IACP,KAAK;IACL,QAAQ;IACR,SAAS;IACT,UAAU;IACV,KAAK;IACL,WAAW;CACZ,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { FieldMapping } from "./store/types";
|
|
2
|
+
/**
|
|
3
|
+
* Хелпер для объявления переиспользуемой карты `fieldMapping` с сохранением
|
|
4
|
+
* литеральных значений в типе.
|
|
5
|
+
*
|
|
6
|
+
* Зачем нужен: при вынесении карты в отдельную константу литеральные значения
|
|
7
|
+
* (`"required"`, …) обычно расширяются до `string`, и статическое переименование
|
|
8
|
+
* полей перестаёт работать (рантайм при этом не страдает). Два способа этого
|
|
9
|
+
* избежать — `as const` или этот хелпер. `defineFieldMapping` предпочтительнее,
|
|
10
|
+
* так как ещё и проверяет карту на соответствие {@link FieldMapping} (ключи —
|
|
11
|
+
* только mappable-имена, значения — строки).
|
|
12
|
+
*
|
|
13
|
+
* > ⚠️ НЕ используйте `... satisfies FieldMapping` для переиспользуемой карты:
|
|
14
|
+
* > `satisfies` расширяет значения до `string`, и типизация переименования
|
|
15
|
+
* > не сработает. Для inline-литерала прямо в `new Palistor({ fieldMapping })`
|
|
16
|
+
* > хелпер не нужен — `const`-параметр класса сам захватывает литералы.
|
|
17
|
+
*
|
|
18
|
+
* `fieldMapping` задаёт ЕДИНЫЙ публичный словарь имён поля: конфиг пишется в тех
|
|
19
|
+
* же (external) именах, что и читается. Нормализатор в конструкторе Palistor
|
|
20
|
+
* приводит их к internal перед compute (см. `normalizeConfig`), поэтому ядро не
|
|
21
|
+
* меняется. Написать internal-имя ремапленного ключа в конфиге — ошибка (strict).
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* const fieldMapping = defineFieldMapping({
|
|
25
|
+
* isRequired: "required",
|
|
26
|
+
* isInvalid: "error",
|
|
27
|
+
* errorMessage: "helperText",
|
|
28
|
+
* description: "helpText",
|
|
29
|
+
* });
|
|
30
|
+
* const store = new Palistor({
|
|
31
|
+
* config: {
|
|
32
|
+
* // external-имена, не isRequired/description:
|
|
33
|
+
* email: { value: "", required: true, helpText: "We never share it" },
|
|
34
|
+
* },
|
|
35
|
+
* fieldMapping,
|
|
36
|
+
* });
|
|
37
|
+
* store.proxy.email.required; // boolean — типизировано
|
|
38
|
+
* store.proxy.email.helperText; // string — ошибка валидации после submit
|
|
39
|
+
*/
|
|
40
|
+
export declare function defineFieldMapping<const M extends FieldMapping>(mapping: M): M;
|
|
41
|
+
//# sourceMappingURL=defineFieldMapping.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defineFieldMapping.d.ts","sourceRoot":"","sources":["../../store/defineFieldMapping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,CAAC,CAAC,SAAS,YAAY,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAE9E"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Хелпер для объявления переиспользуемой карты `fieldMapping` с сохранением
|
|
3
|
+
* литеральных значений в типе.
|
|
4
|
+
*
|
|
5
|
+
* Зачем нужен: при вынесении карты в отдельную константу литеральные значения
|
|
6
|
+
* (`"required"`, …) обычно расширяются до `string`, и статическое переименование
|
|
7
|
+
* полей перестаёт работать (рантайм при этом не страдает). Два способа этого
|
|
8
|
+
* избежать — `as const` или этот хелпер. `defineFieldMapping` предпочтительнее,
|
|
9
|
+
* так как ещё и проверяет карту на соответствие {@link FieldMapping} (ключи —
|
|
10
|
+
* только mappable-имена, значения — строки).
|
|
11
|
+
*
|
|
12
|
+
* > ⚠️ НЕ используйте `... satisfies FieldMapping` для переиспользуемой карты:
|
|
13
|
+
* > `satisfies` расширяет значения до `string`, и типизация переименования
|
|
14
|
+
* > не сработает. Для inline-литерала прямо в `new Palistor({ fieldMapping })`
|
|
15
|
+
* > хелпер не нужен — `const`-параметр класса сам захватывает литералы.
|
|
16
|
+
*
|
|
17
|
+
* `fieldMapping` задаёт ЕДИНЫЙ публичный словарь имён поля: конфиг пишется в тех
|
|
18
|
+
* же (external) именах, что и читается. Нормализатор в конструкторе Palistor
|
|
19
|
+
* приводит их к internal перед compute (см. `normalizeConfig`), поэтому ядро не
|
|
20
|
+
* меняется. Написать internal-имя ремапленного ключа в конфиге — ошибка (strict).
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* const fieldMapping = defineFieldMapping({
|
|
24
|
+
* isRequired: "required",
|
|
25
|
+
* isInvalid: "error",
|
|
26
|
+
* errorMessage: "helperText",
|
|
27
|
+
* description: "helpText",
|
|
28
|
+
* });
|
|
29
|
+
* const store = new Palistor({
|
|
30
|
+
* config: {
|
|
31
|
+
* // external-имена, не isRequired/description:
|
|
32
|
+
* email: { value: "", required: true, helpText: "We never share it" },
|
|
33
|
+
* },
|
|
34
|
+
* fieldMapping,
|
|
35
|
+
* });
|
|
36
|
+
* store.proxy.email.required; // boolean — типизировано
|
|
37
|
+
* store.proxy.email.helperText; // string — ошибка валидации после submit
|
|
38
|
+
*/
|
|
39
|
+
export function defineFieldMapping(mapping) {
|
|
40
|
+
return mapping;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=defineFieldMapping.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defineFieldMapping.js","sourceRoot":"","sources":["../../store/defineFieldMapping.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,UAAU,kBAAkB,CAA+B,OAAU;IACzE,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TypedListNode, TemplateConfig, ListResolver } from "./store/types";
|
|
2
|
+
interface DefineListConfig<TEntity extends Record<string, any>> {
|
|
3
|
+
template: TemplateConfig<TEntity>;
|
|
4
|
+
resolve?: {
|
|
5
|
+
resolver: ListResolver<TEntity>;
|
|
6
|
+
deps?: string[];
|
|
7
|
+
onError?: (error: unknown, ctx: {
|
|
8
|
+
notify: (msg: string) => void;
|
|
9
|
+
}) => void;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export declare function defineList<TEntity extends Record<string, any>>(config: DefineListConfig<TEntity>): TypedListNode<TEntity>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=defineList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defineList.d.ts","sourceRoot":"","sources":["../../store/defineList.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAqB,MAAM,eAAe,CAAC;AAEpG,UAAU,gBAAgB,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAC5D,QAAQ,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;IAClC,OAAO,CAAC,EAAE;QACR,QAAQ,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;QAChC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAChB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE;YAAE,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;SAAE,KAAK,IAAI,CAAC;KAC5E,CAAC;CACH;AAED,wBAAgB,UAAU,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5D,MAAM,EAAE,gBAAgB,CAAC,OAAO,CAAC,GAChC,aAAa,CAAC,OAAO,CAAC,CAIxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defineList.js","sourceRoot":"","sources":["../../store/defineList.ts"],"names":[],"mappings":"AAWA,MAAM,UAAU,UAAU,CACxB,MAAiC;IAEjC,MAAM,IAAI,GAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACtC,IAAI,MAAM,CAAC,OAAO;QAAE,IAAI,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAA4B,EAAE,CAAC,CAAC;IAChF,OAAO,IAAyC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AnyConfigNode } from "../store/types";
|
|
2
|
+
import type { FieldState } from "../compute/index";
|
|
3
|
+
/**
|
|
4
|
+
* Captures initial values for all leaf nodes into a WeakMap.
|
|
5
|
+
* Called at store creation and after reset/hydrate.
|
|
6
|
+
*/
|
|
7
|
+
export declare function captureInitialValues(node: AnyConfigNode, nodeState: WeakMap<object, FieldState>, initialValueMap: WeakMap<object, unknown>): void;
|
|
8
|
+
//# sourceMappingURL=captureInitialValues.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"captureInitialValues.d.ts","sourceRoot":"","sources":["../../../store/dirtyTracking/captureInitialValues.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,aAAa,EACnB,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,UAAU,CAAC,EACtC,eAAe,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,GACxC,IAAI,CASN"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { walkFull } from "../traversal";
|
|
2
|
+
/**
|
|
3
|
+
* Captures initial values for all leaf nodes into a WeakMap.
|
|
4
|
+
* Called at store creation and after reset/hydrate.
|
|
5
|
+
*/
|
|
6
|
+
export function captureInitialValues(node, nodeState, initialValueMap) {
|
|
7
|
+
walkFull(node, {
|
|
8
|
+
onLeaf(leaf) {
|
|
9
|
+
const state = nodeState.get(leaf);
|
|
10
|
+
if (state) {
|
|
11
|
+
initialValueMap.set(leaf, state.value);
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=captureInitialValues.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"captureInitialValues.js","sourceRoot":"","sources":["../../../store/dirtyTracking/captureInitialValues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAIxC;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAClC,IAAmB,EACnB,SAAsC,EACtC,eAAyC;IAEzC,QAAQ,CAAC,IAAI,EAAE;QACb,MAAM,CAAC,IAAI;YACT,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAClC,IAAI,KAAK,EAAE,CAAC;gBACV,eAAe,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;YACzC,CAAC;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AnyConfigNode } from "../store/types";
|
|
2
|
+
/**
|
|
3
|
+
* Collects current initial values from the initialValueMap for a subtree.
|
|
4
|
+
* Used by reset to restore fields to their initial state.
|
|
5
|
+
*
|
|
6
|
+
* Stops at reset boundaries (child groups with their own `reset` function).
|
|
7
|
+
* Falls back to config default if a leaf has no entry in initialValueMap.
|
|
8
|
+
*/
|
|
9
|
+
export declare function collectInitialSnapshot(node: AnyConfigNode, initialValueMap: WeakMap<object, unknown>): Record<string, unknown>;
|
|
10
|
+
//# sourceMappingURL=collectInitialSnapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collectInitialSnapshot.d.ts","sourceRoot":"","sources":["../../../store/dirtyTracking/collectInitialSnapshot.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,aAAa,EACnB,eAAe,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,GACxC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAuBzB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { configKeys, isLeafNode, isListNode } from "../traversal";
|
|
2
|
+
/**
|
|
3
|
+
* Collects current initial values from the initialValueMap for a subtree.
|
|
4
|
+
* Used by reset to restore fields to their initial state.
|
|
5
|
+
*
|
|
6
|
+
* Stops at reset boundaries (child groups with their own `reset` function).
|
|
7
|
+
* Falls back to config default if a leaf has no entry in initialValueMap.
|
|
8
|
+
*/
|
|
9
|
+
export function collectInitialSnapshot(node, initialValueMap) {
|
|
10
|
+
const result = {};
|
|
11
|
+
for (const key of configKeys(node)) {
|
|
12
|
+
const child = node[key];
|
|
13
|
+
if (!child || typeof child !== "object")
|
|
14
|
+
continue;
|
|
15
|
+
if (isListNode(child))
|
|
16
|
+
continue; // ListNode — пропускаем, обрабатывается в фазе 2
|
|
17
|
+
if (isLeafNode(child)) {
|
|
18
|
+
const initial = initialValueMap.get(child);
|
|
19
|
+
if (initial !== undefined) {
|
|
20
|
+
result[key] = initial;
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
const raw = child.value;
|
|
24
|
+
result[key] = typeof raw === "function" ? "" : raw;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
if (typeof child.reset === "function")
|
|
29
|
+
continue;
|
|
30
|
+
result[key] = collectInitialSnapshot(child, initialValueMap);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return result;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=collectInitialSnapshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collectInitialSnapshot.js","sourceRoot":"","sources":["../../../store/dirtyTracking/collectInitialSnapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAGlE;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CACpC,IAAmB,EACnB,eAAyC;IAEzC,MAAM,MAAM,GAA4B,EAAE,CAAC;IAE3C,KAAK,MAAM,GAAG,IAAI,UAAU,CAAC,IAA+B,CAAC,EAAE,CAAC;QAC9D,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAkB,CAAC;QACzC,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,SAAS;QAClD,IAAI,UAAU,CAAC,KAAK,CAAC;YAAE,SAAS,CAAC,iDAAiD;QAElF,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YACtB,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAC3C,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;gBAC1B,MAAM,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC;YACxB,CAAC;iBAAM,CAAC;gBACN,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC;gBACxB,MAAM,CAAC,GAAG,CAAC,GAAG,OAAO,GAAG,KAAK,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;YACrD,CAAC;QACH,CAAC;aAAM,CAAC;YACN,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,UAAU;gBAAE,SAAS;YAChD,MAAM,CAAC,GAAG,CAAC,GAAG,sBAAsB,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { captureInitialValues } from "./captureInitialValues";
|
|
2
|
+
export { recomputeDirtyTargeted } from "./recomputeDirtyTargeted";
|
|
3
|
+
export type { RecomputeDirtyResult } from "./recomputeDirtyTargeted";
|
|
4
|
+
export { setGroupRevalidate } from "./setGroupRevalidate";
|
|
5
|
+
export { mergeInitialValues } from "./mergeInitialValues";
|
|
6
|
+
export { collectInitialSnapshot } from "./collectInitialSnapshot";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../store/dirtyTracking/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,YAAY,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { captureInitialValues } from "./captureInitialValues";
|
|
2
|
+
export { recomputeDirtyTargeted } from "./recomputeDirtyTargeted";
|
|
3
|
+
export { setGroupRevalidate } from "./setGroupRevalidate";
|
|
4
|
+
export { mergeInitialValues } from "./mergeInitialValues";
|
|
5
|
+
export { collectInitialSnapshot } from "./collectInitialSnapshot";
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../store/dirtyTracking/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compares two values for dirty checking.
|
|
3
|
+
* Primitives use strict equality. Objects/arrays use JSON.stringify.
|
|
4
|
+
* Treats null and undefined as equivalent (both "empty").
|
|
5
|
+
*/
|
|
6
|
+
export declare function isDirtyValue(current: unknown, initial: unknown): boolean;
|
|
7
|
+
//# sourceMappingURL=isDirtyValue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isDirtyValue.d.ts","sourceRoot":"","sources":["../../../store/dirtyTracking/isDirtyValue.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAaxE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compares two values for dirty checking.
|
|
3
|
+
* Primitives use strict equality. Objects/arrays use JSON.stringify.
|
|
4
|
+
* Treats null and undefined as equivalent (both "empty").
|
|
5
|
+
*/
|
|
6
|
+
export function isDirtyValue(current, initial) {
|
|
7
|
+
if (current === initial)
|
|
8
|
+
return false;
|
|
9
|
+
if (current == null && initial == null)
|
|
10
|
+
return false;
|
|
11
|
+
if (current == null || initial == null)
|
|
12
|
+
return true;
|
|
13
|
+
if (typeof current !== typeof initial)
|
|
14
|
+
return true;
|
|
15
|
+
if (typeof current === "object") {
|
|
16
|
+
try {
|
|
17
|
+
return JSON.stringify(current) !== JSON.stringify(initial);
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=isDirtyValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isDirtyValue.js","sourceRoot":"","sources":["../../../store/dirtyTracking/isDirtyValue.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,OAAgB,EAAE,OAAgB;IAC7D,IAAI,OAAO,KAAK,OAAO;QAAE,OAAO,KAAK,CAAC;IACtC,IAAI,OAAO,IAAI,IAAI,IAAI,OAAO,IAAI,IAAI;QAAE,OAAO,KAAK,CAAC;IACrD,IAAI,OAAO,IAAI,IAAI,IAAI,OAAO,IAAI,IAAI;QAAE,OAAO,IAAI,CAAC;IACpD,IAAI,OAAO,OAAO,KAAK,OAAO,OAAO;QAAE,OAAO,IAAI,CAAC;IACnD,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChC,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAC7D,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AnyConfigNode } from "../store/types";
|
|
2
|
+
import type { FieldState } from "../compute/index";
|
|
3
|
+
/**
|
|
4
|
+
* Incrementally merges initial values from a patch into the initialValueMap.
|
|
5
|
+
* Only updates leaf nodes whose keys are present in the patch.
|
|
6
|
+
*
|
|
7
|
+
* Called after resolver success to make resolver data part of the initial state.
|
|
8
|
+
* Optimistic resolver does NOT call this — only the real resolver result counts.
|
|
9
|
+
*/
|
|
10
|
+
export declare function mergeInitialValues(node: AnyConfigNode, nodeState: WeakMap<object, FieldState>, initialValueMap: WeakMap<object, unknown>, patch: Record<string, unknown>): void;
|
|
11
|
+
//# sourceMappingURL=mergeInitialValues.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mergeInitialValues.d.ts","sourceRoot":"","sources":["../../../store/dirtyTracking/mergeInitialValues.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,aAAa,EACnB,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,UAAU,CAAC,EACtC,eAAe,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,EACzC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,IAAI,CAkBN"}
|