monorise 0.0.2 → 0.0.3
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/base/index.d.ts +18 -6
- package/dist/base/index.js.map +1 -1
- package/dist/cli/cli.js +8 -4
- package/dist/cli/cli.js.map +1 -1
- package/dist/core/index.d.ts +16 -11
- package/dist/core/index.js +15 -10
- package/dist/core/index.js.map +1 -1
- package/dist/react/actions/auth.action.d.ts +1 -1
- package/dist/react/actions/config.action.d.ts +1 -1
- package/dist/react/actions/core.action.d.ts +1 -1
- package/dist/react/actions/core.action.d.ts.map +1 -1
- package/dist/react/index.d.ts +127 -127
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +120 -6
- package/dist/react/index.js.map +1 -1
- package/dist/react/lib/api.d.ts +5 -5
- package/dist/react/lib/api.d.ts.map +1 -1
- package/dist/react/lib/entity.d.ts +1 -1
- package/dist/react/lib/utils.d.ts +1 -1
- package/dist/react/services/auth.service.d.ts +4 -4
- package/dist/react/services/core.service.d.ts +17 -16
- package/dist/react/services/core.service.d.ts.map +1 -1
- package/dist/react/services/filestore.service.d.ts +1 -1
- package/dist/react/store/monorise.store.d.ts +1 -1
- package/dist/react/types/api.type.d.ts +5 -5
- package/dist/react/types/api.type.d.ts.map +1 -1
- package/dist/react/types/monorise.type.d.ts +1 -1
- package/dist/react/types/mutual.type.d.ts +1 -1
- package/dist/sst/constants/event.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAM3C,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACzB,MAAM,aAAa,CAAC;AAKr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;;;;;;;;;;;;;;;;;GAvEz2yC,cAAc,uJACd,SAAS;QAsE43G,CAAC;SAA6B,CAAC;qBAAoD,CAAC;;IArEz9G,uBAAuB,6MACvB,uBAAuB,kJACb,CAAC;AAEb,OAAO,EACL,KAAK,EACL,KAAK,EACL,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,SAAS,EACT,SAAS,EACT,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,SAAS,EACT,UAAU,EACV,YAAY,EACZ,wBAAwB,EACxB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,MAAM,EACN,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,sBAAsB,EACtB,WAAW,EACX,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,SAAS,EACT,uBAAuB,EACvB,uBAAuB,GACxB,CAAC;AAEF,eAAe,QAAQ,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;AAEtE,YAAY,EACV,aAAa,EACb,WAAW,EACX,MAAM,EACN,eAAe,GAChB,MAAM,gBAAgB,CAAC"}
|
package/dist/react/index.js
CHANGED
|
@@ -419,7 +419,7 @@ var initCoreActions = (monoriseStore, appActions, coreService2) => {
|
|
|
419
419
|
}
|
|
420
420
|
};
|
|
421
421
|
const listMoreEntities2 = async (entityType, opts = {}) => {
|
|
422
|
-
var _a;
|
|
422
|
+
var _a, _b;
|
|
423
423
|
const requestKey = getEntityRequestKey("list", entityType);
|
|
424
424
|
const store2 = monoriseStore.getState();
|
|
425
425
|
const entityState = store2.entity[entityType];
|
|
@@ -437,7 +437,7 @@ var initCoreActions = (monoriseStore, appActions, coreService2) => {
|
|
|
437
437
|
try {
|
|
438
438
|
const { data: result } = await entityService.listEntities(
|
|
439
439
|
{
|
|
440
|
-
limit: 20,
|
|
440
|
+
limit: (_b = opts.limit) != null ? _b : 20,
|
|
441
441
|
lastKey
|
|
442
442
|
},
|
|
443
443
|
opts
|
|
@@ -645,7 +645,80 @@ var initCoreActions = (monoriseStore, appActions, coreService2) => {
|
|
|
645
645
|
const { data } = await entityService.createEntity(entity, opts);
|
|
646
646
|
monoriseStore.setState(
|
|
647
647
|
produce4((state) => {
|
|
648
|
+
var _a2, _b, _c, _d;
|
|
648
649
|
state.entity[entityType].dataMap.set(data.entityId, data);
|
|
650
|
+
const tagConfigs = (_a2 = state.config[entityType]) == null ? void 0 : _a2.tags;
|
|
651
|
+
if (tagConfigs) {
|
|
652
|
+
for (const tagConfig of tagConfigs) {
|
|
653
|
+
const { name, processor } = tagConfig;
|
|
654
|
+
const processorResults = processor(
|
|
655
|
+
data
|
|
656
|
+
);
|
|
657
|
+
for (const tagKey of Object.keys(state.tag)) {
|
|
658
|
+
const [tagEntityType, tagName, ...paramParts] = tagKey.split("/");
|
|
659
|
+
if (tagEntityType !== entityType || tagName !== name) {
|
|
660
|
+
continue;
|
|
661
|
+
}
|
|
662
|
+
if (!((_b = state.tag[tagKey]) == null ? void 0 : _b.isFirstFetched)) {
|
|
663
|
+
continue;
|
|
664
|
+
}
|
|
665
|
+
const keyParams = {};
|
|
666
|
+
for (const part of paramParts) {
|
|
667
|
+
const colonIdx = part.indexOf(":");
|
|
668
|
+
if (colonIdx > 0) {
|
|
669
|
+
keyParams[part.substring(0, colonIdx)] = part.substring(colonIdx + 1);
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
if (keyParams.query) {
|
|
673
|
+
continue;
|
|
674
|
+
}
|
|
675
|
+
const matches = processorResults.some((result) => {
|
|
676
|
+
if (keyParams.group && result.group !== keyParams.group) {
|
|
677
|
+
return false;
|
|
678
|
+
}
|
|
679
|
+
if (keyParams.start && (!result.sortValue || result.sortValue < keyParams.start)) {
|
|
680
|
+
return false;
|
|
681
|
+
}
|
|
682
|
+
if (keyParams.end && (!result.sortValue || result.sortValue > keyParams.end)) {
|
|
683
|
+
return false;
|
|
684
|
+
}
|
|
685
|
+
return true;
|
|
686
|
+
});
|
|
687
|
+
if (matches) {
|
|
688
|
+
state.tag[tagKey].dataMap.set(data.entityId, data);
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
const mutualFields = (_d = (_c = state.config[entityType]) == null ? void 0 : _c.mutual) == null ? void 0 : _d.mutualFields;
|
|
694
|
+
if (mutualFields) {
|
|
695
|
+
for (const [field, fieldConfig] of Object.entries(mutualFields)) {
|
|
696
|
+
const byEntityType = fieldConfig.entityType;
|
|
697
|
+
const ids = entity[field];
|
|
698
|
+
if (!Array.isArray(ids)) continue;
|
|
699
|
+
for (const byEntityId2 of ids) {
|
|
700
|
+
const mutualKey = getMutualStateKey(
|
|
701
|
+
byEntityType,
|
|
702
|
+
byEntityId2,
|
|
703
|
+
entityType
|
|
704
|
+
);
|
|
705
|
+
if (state.mutual[mutualKey] && state.mutual[mutualKey].isFirstFetched) {
|
|
706
|
+
state.mutual[mutualKey].dataMap.set(data.entityId, {
|
|
707
|
+
entityId: data.entityId,
|
|
708
|
+
entityType,
|
|
709
|
+
byEntityId: byEntityId2,
|
|
710
|
+
byEntityType,
|
|
711
|
+
mutualId: "",
|
|
712
|
+
data: data.data,
|
|
713
|
+
mutualData: {},
|
|
714
|
+
createdAt: data.createdAt,
|
|
715
|
+
updatedAt: data.updatedAt,
|
|
716
|
+
mutualUpdatedAt: data.updatedAt
|
|
717
|
+
});
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
}
|
|
649
722
|
}),
|
|
650
723
|
void 0,
|
|
651
724
|
`mr/entity/create/${entityType}`
|
|
@@ -685,6 +758,7 @@ var initCoreActions = (monoriseStore, appActions, coreService2) => {
|
|
|
685
758
|
const { data } = await entityService.editEntity(id, entity, opts);
|
|
686
759
|
monoriseStore.setState(
|
|
687
760
|
produce4((state) => {
|
|
761
|
+
var _a2, _b;
|
|
688
762
|
state.entity[entityType].dataMap.set(data.entityId, data);
|
|
689
763
|
for (const key of Object.keys(state.mutual)) {
|
|
690
764
|
const [_byEntity, _byId, _entityType] = key.split("/");
|
|
@@ -697,6 +771,24 @@ var initCoreActions = (monoriseStore, appActions, coreService2) => {
|
|
|
697
771
|
}
|
|
698
772
|
}
|
|
699
773
|
}
|
|
774
|
+
for (const key of Object.keys(state.mutual)) {
|
|
775
|
+
const [_byEntity, _byId] = key.split("/");
|
|
776
|
+
if (_byEntity === entityType && _byId === id) {
|
|
777
|
+
const newDataMap = new Map(state.mutual[key].dataMap);
|
|
778
|
+
for (const [entryId, mutual] of newDataMap) {
|
|
779
|
+
newDataMap.set(entryId, __spreadProps(__spreadValues({}, mutual), { data: data.data }));
|
|
780
|
+
}
|
|
781
|
+
state.mutual[key].dataMap = newDataMap;
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
for (const tagKey of Object.keys(state.tag)) {
|
|
785
|
+
const [tagEntityType] = tagKey.split("/");
|
|
786
|
+
if (tagEntityType === entityType) {
|
|
787
|
+
if ((_b = (_a2 = state.tag[tagKey]) == null ? void 0 : _a2.dataMap) == null ? void 0 : _b.has(id)) {
|
|
788
|
+
state.tag[tagKey].dataMap.set(id, data);
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
}
|
|
700
792
|
}),
|
|
701
793
|
void 0,
|
|
702
794
|
`mr/entity/edit/${entityType}/${id}`
|
|
@@ -717,6 +809,7 @@ var initCoreActions = (monoriseStore, appActions, coreService2) => {
|
|
|
717
809
|
deleteLocalMutualsByEntity(entityType, id);
|
|
718
810
|
monoriseStore.setState(
|
|
719
811
|
produce4((state) => {
|
|
812
|
+
var _a2, _b;
|
|
720
813
|
state.entity[entityType].dataMap.delete(id);
|
|
721
814
|
for (const key of Object.keys(state.mutual)) {
|
|
722
815
|
const [_byEntity, _byId, _entityType] = key.split("/");
|
|
@@ -724,6 +817,12 @@ var initCoreActions = (monoriseStore, appActions, coreService2) => {
|
|
|
724
817
|
state.mutual[key].dataMap.delete(id);
|
|
725
818
|
}
|
|
726
819
|
}
|
|
820
|
+
for (const tagKey of Object.keys(state.tag)) {
|
|
821
|
+
const [tagEntityType] = tagKey.split("/");
|
|
822
|
+
if (tagEntityType === entityType) {
|
|
823
|
+
(_b = (_a2 = state.tag[tagKey]) == null ? void 0 : _a2.dataMap) == null ? void 0 : _b.delete(id);
|
|
824
|
+
}
|
|
825
|
+
}
|
|
727
826
|
}),
|
|
728
827
|
void 0,
|
|
729
828
|
`mr/entity/delete/${entityType}/${id}`
|
|
@@ -1280,10 +1379,10 @@ var initCoreActions = (monoriseStore, appActions, coreService2) => {
|
|
|
1280
1379
|
}
|
|
1281
1380
|
}, [all, params.all]);
|
|
1282
1381
|
useEffect2(() => {
|
|
1283
|
-
if (!isFirstFetched) {
|
|
1382
|
+
if (!isFirstFetched || (opts == null ? void 0 : opts.forceFetch)) {
|
|
1284
1383
|
listEntities(entityType, { skRange, all }, opts);
|
|
1285
1384
|
}
|
|
1286
|
-
}, [all, entityType, skRange, opts, isFirstFetched]);
|
|
1385
|
+
}, [all, entityType, skRange, opts, isFirstFetched, opts == null ? void 0 : opts.forceFetch]);
|
|
1287
1386
|
useEffect2(() => {
|
|
1288
1387
|
var _a;
|
|
1289
1388
|
let queryTimeout;
|
|
@@ -1346,6 +1445,7 @@ var initCoreActions = (monoriseStore, appActions, coreService2) => {
|
|
|
1346
1445
|
listMore: async () => {
|
|
1347
1446
|
if (!lastKey) return;
|
|
1348
1447
|
await listMoreEntities2(entityType, __spreadProps(__spreadValues({}, opts), {
|
|
1448
|
+
limit: limit != null ? limit : opts.limit,
|
|
1349
1449
|
forceFetch: true
|
|
1350
1450
|
}));
|
|
1351
1451
|
}
|
|
@@ -1402,7 +1502,7 @@ var initCoreActions = (monoriseStore, appActions, coreService2) => {
|
|
|
1402
1502
|
const isLoading = useLoadStore2(requestKey);
|
|
1403
1503
|
const error = useErrorStore2(requestKey);
|
|
1404
1504
|
useEffect2(() => {
|
|
1405
|
-
if (
|
|
1505
|
+
if (byEntityType && entityType && byId && (!isFirstFetched || (opts == null ? void 0 : opts.forceFetch))) {
|
|
1406
1506
|
listEntitiesByEntity(
|
|
1407
1507
|
byEntityType,
|
|
1408
1508
|
entityType,
|
|
@@ -1437,7 +1537,21 @@ var initCoreActions = (monoriseStore, appActions, coreService2) => {
|
|
|
1437
1537
|
requestKey,
|
|
1438
1538
|
error,
|
|
1439
1539
|
isFirstFetched,
|
|
1440
|
-
lastKey
|
|
1540
|
+
lastKey,
|
|
1541
|
+
refetch: async () => {
|
|
1542
|
+
if (byEntityType && entityType && byId) {
|
|
1543
|
+
return await listEntitiesByEntity(
|
|
1544
|
+
byEntityType,
|
|
1545
|
+
entityType,
|
|
1546
|
+
byId,
|
|
1547
|
+
__spreadProps(__spreadValues({}, opts), {
|
|
1548
|
+
forceFetch: true,
|
|
1549
|
+
stateKey
|
|
1550
|
+
}),
|
|
1551
|
+
chainEntityQuery
|
|
1552
|
+
);
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1441
1555
|
}, lastKey && {
|
|
1442
1556
|
listMore: () => {
|
|
1443
1557
|
if (byEntityType && entityType && byId) {
|