({
store,
storesById,
metrics,
metricsById,
indexes,
indexesById,
relationships,
relationshipsById,
queries,
queriesById,
checkpoints,
checkpointsById,
persister,
persistersById,
synchronizer,
synchronizersById,
children
})
| 157 | } |
| 158 | ]; |
| 159 | var Provider = ({ |
| 160 | store, |
| 161 | storesById, |
| 162 | metrics, |
| 163 | metricsById, |
| 164 | indexes, |
| 165 | indexesById, |
| 166 | relationships, |
| 167 | relationshipsById, |
| 168 | queries, |
| 169 | queriesById, |
| 170 | checkpoints, |
| 171 | checkpointsById, |
| 172 | persister, |
| 173 | persistersById, |
| 174 | synchronizer, |
| 175 | synchronizersById, |
| 176 | children |
| 177 | }) => { |
| 178 | const parentValue = useContext(Context); |
| 179 | const [extraThingsById, setExtraThingsById] = useState( |
| 180 | () => arrayNew(8, () => ({})) |
| 181 | ); |
| 182 | const addExtraThingById = useCallback( |
| 183 | (thingOffset, id, thing) => setExtraThingsById( |
| 184 | (extraThingsById2) => objGet(extraThingsById2[thingOffset], id) == thing ? extraThingsById2 : arrayWith(extraThingsById2, thingOffset, { |
| 185 | ...extraThingsById2[thingOffset], |
| 186 | [id]: thing |
| 187 | }) |
| 188 | ), |
| 189 | [] |
| 190 | ); |
| 191 | const delExtraThingById = useCallback( |
| 192 | (thingOffset, id) => setExtraThingsById( |
| 193 | (extraThingsById2) => !objHas(extraThingsById2[thingOffset], id) ? extraThingsById2 : arrayWith( |
| 194 | extraThingsById2, |
| 195 | thingOffset, |
| 196 | objDel(extraThingsById2[thingOffset], id) |
| 197 | ) |
| 198 | ), |
| 199 | [] |
| 200 | ); |
| 201 | return /* @__PURE__ */ jsx(Context.Provider, { |
| 202 | value: useMemo( |
| 203 | () => [ |
| 204 | ...mergeParentThings( |
| 205 | OFFSET_STORE, |
| 206 | parentValue, |
| 207 | store, |
| 208 | storesById, |
| 209 | extraThingsById |
| 210 | ), |
| 211 | ...mergeParentThings( |
| 212 | OFFSET_METRICS, |
| 213 | parentValue, |
| 214 | metrics, |
| 215 | metricsById, |
| 216 | extraThingsById |
nothing calls this directly
no test coverage detected
searching dependent graphs…