@seedprotocol/sdk 0.1.32 → 0.1.33
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/dist/{index-D3rRD7XE.js → index-BgZMod4t.js} +16 -17
- package/dist/index-BgZMod4t.js.map +1 -0
- package/dist/{index-DO_8pXy8.js → index-C5t1T2iY.js} +2 -2
- package/dist/index-C5t1T2iY.js.map +1 -0
- package/dist/main.js +1 -1
- package/dist/{seed-Cf-ElPkP.js → seed-Mp6JVHa2.js} +2 -2
- package/dist/{seed-Cf-ElPkP.js.map → seed-Mp6JVHa2.js.map} +1 -1
- package/dist/{seed-C0EQDRcF.js → seed-VcgMFZrT.js} +3 -3
- package/dist/{seed-C0EQDRcF.js.map → seed-VcgMFZrT.js.map} +1 -1
- package/dist/{seed-BPDg8Msg.js → seed-nWPHoYI5.js} +3 -3
- package/dist/{seed-BPDg8Msg.js.map → seed-nWPHoYI5.js.map} +1 -1
- package/dist/{seed.schema.config-CZJE4P0T.js → seed.schema.config-Cp-DUNSB.js} +2 -2
- package/dist/{seed.schema.config-CZJE4P0T.js.map → seed.schema.config-Cp-DUNSB.js.map} +1 -1
- package/dist/types/src/browser/property/class.d.ts.map +1 -1
- package/dist/types/src/browser/react/property.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/index-D3rRD7XE.js.map +0 -1
- package/dist/index-DO_8pXy8.js.map +0 -1
|
@@ -999,7 +999,7 @@ const hydrateFromDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
999
999
|
renderValue: refResolvedDisplayValue,
|
|
1000
1000
|
});
|
|
1001
1001
|
if (propertyNameFromDb === 'storageTransactionId') {
|
|
1002
|
-
const { Item } = yield import('./index-
|
|
1002
|
+
const { Item } = yield import('./index-C5t1T2iY.js');
|
|
1003
1003
|
const item = yield Item.find({
|
|
1004
1004
|
seedLocalId,
|
|
1005
1005
|
modelName: itemModelName,
|
|
@@ -1745,7 +1745,6 @@ class ItemProperty {
|
|
|
1745
1745
|
}
|
|
1746
1746
|
if (skipTransform && !this._alias) ;
|
|
1747
1747
|
this._subject.next(renderValue);
|
|
1748
|
-
eventEmitter.emit(`item.${itemModelName},${seedUid || seedLocalId}.update`);
|
|
1749
1748
|
// this._lastRenderedValue = renderValue
|
|
1750
1749
|
});
|
|
1751
1750
|
this._service.start();
|
|
@@ -4319,7 +4318,7 @@ const addModelsToDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
4319
4318
|
if (!models$1) {
|
|
4320
4319
|
return;
|
|
4321
4320
|
}
|
|
4322
|
-
const { models: SeedModels } = yield import('./seed.schema.config-
|
|
4321
|
+
const { models: SeedModels } = yield import('./seed.schema.config-Cp-DUNSB.js');
|
|
4323
4322
|
const allModels = Object.assign(Object.assign({}, SeedModels), models$1);
|
|
4324
4323
|
let hasModelsInDb = false;
|
|
4325
4324
|
const schemaDefsByModelName = new Map();
|
|
@@ -5783,11 +5782,11 @@ const globalMachine = setup({
|
|
|
5783
5782
|
(_a) => __awaiter(void 0, [_a], void 0, function* ({ context }) {
|
|
5784
5783
|
let SeedClass;
|
|
5785
5784
|
if (context.environment === 'node') {
|
|
5786
|
-
const { SeedNode } = yield import('./seed-
|
|
5785
|
+
const { SeedNode } = yield import('./seed-VcgMFZrT.js');
|
|
5787
5786
|
SeedClass = SeedNode;
|
|
5788
5787
|
}
|
|
5789
5788
|
else {
|
|
5790
|
-
const { SeedBrowser } = yield import('./seed-
|
|
5789
|
+
const { SeedBrowser } = yield import('./seed-nWPHoYI5.js');
|
|
5791
5790
|
SeedClass = SeedBrowser;
|
|
5792
5791
|
}
|
|
5793
5792
|
return SeedClass;
|
|
@@ -6197,13 +6196,16 @@ const useItemProperty = ({ propertyName, seedLocalId, seedUid, }) => {
|
|
|
6197
6196
|
return snapshot.context.renderValue || snapshot.context.propertyValue;
|
|
6198
6197
|
});
|
|
6199
6198
|
const status = useSelector(property === null || property === void 0 ? void 0 : property.getService(), (snapshot) => snapshot === null || snapshot === void 0 ? void 0 : snapshot.value);
|
|
6200
|
-
useEffect(() => {
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
}, [property, value])
|
|
6199
|
+
// useEffect(() => {
|
|
6200
|
+
// if (property && property.value !== value) {
|
|
6201
|
+
// readFromDb()
|
|
6202
|
+
// }
|
|
6203
|
+
// }, [property, value])
|
|
6205
6204
|
const readFromDb = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
6206
|
-
if (!isAppDbReady() ||
|
|
6205
|
+
if (!isAppDbReady() ||
|
|
6206
|
+
internalStatus !== 'ready' ||
|
|
6207
|
+
isReadingFromDb ||
|
|
6208
|
+
(!seedLocalId && !seedUid)) {
|
|
6207
6209
|
return;
|
|
6208
6210
|
}
|
|
6209
6211
|
setIsReadingFromDb(true);
|
|
@@ -6219,15 +6221,12 @@ const useItemProperty = ({ propertyName, seedLocalId, seedUid, }) => {
|
|
|
6219
6221
|
}
|
|
6220
6222
|
setProperty(() => foundProperty);
|
|
6221
6223
|
setIsInitialized(true);
|
|
6222
|
-
}), [
|
|
6224
|
+
}), []);
|
|
6223
6225
|
useEffect(() => {
|
|
6224
6226
|
if (internalStatus === 'ready') {
|
|
6225
6227
|
readFromDb();
|
|
6226
6228
|
}
|
|
6227
6229
|
}, [internalStatus]);
|
|
6228
|
-
// TODO: How can we force a re-render when the property is updated?
|
|
6229
|
-
// Right now, the value will trigger an update because it's using a selector
|
|
6230
|
-
// and a change is pushed to the hook listener.
|
|
6231
6230
|
return {
|
|
6232
6231
|
property,
|
|
6233
6232
|
isInitialized,
|
|
@@ -6544,7 +6543,7 @@ const client = {
|
|
|
6544
6543
|
console.error('fs listeners not ready during init');
|
|
6545
6544
|
}
|
|
6546
6545
|
globalService.send({ type: 'init', endpoints, models, addresses });
|
|
6547
|
-
import('./seed.schema.config-
|
|
6546
|
+
import('./seed.schema.config-Cp-DUNSB.js').then(({ models }) => {
|
|
6548
6547
|
for (const [key, value] of Object.entries(models)) {
|
|
6549
6548
|
setModel(key, value);
|
|
6550
6549
|
}
|
|
@@ -6601,4 +6600,4 @@ if (isNode()) {
|
|
|
6601
6600
|
}
|
|
6602
6601
|
|
|
6603
6602
|
export { CHILD_SNAPSHOT as C, GET_SCHEMAS as G, Item as I, Json as J, List as L, Model as M, Property as P, Relation as R, Text as T, GET_SEEDS as a, GET_SEED_IDS as b, GET_STORAGE_TRANSACTION_ID as c, GET_VERSIONS as d, GET_PROPERTIES as e, GET_ALL_PROPERTIES_FOR_ALL_VERSIONS as f, itemMachineAll as g, internalMachine as h, itemMachineSingle as i, isNode as j, isBrowser as k, isReactNative as l, ImageSrc as m, ItemProperty as n, useItem as o, useItemProperties as p, useCreateItem as q, useItemProperty as r, useDeleteItem as s, useGlobalServiceStatus as t, useItems as u, useServices as v, withSeed as w, getGlobalService as x, client as y, getCorrectId as z };
|
|
6604
|
-
//# sourceMappingURL=index-
|
|
6603
|
+
//# sourceMappingURL=index-BgZMod4t.js.map
|