@fctc/interface-logic 4.3.5 → 4.3.7
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/hooks.d.mts +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +37 -3
- package/dist/hooks.mjs +37 -3
- package/dist/provider.js +37 -3
- package/dist/provider.mjs +37 -3
- package/dist/services.d.mts +1 -1
- package/dist/services.d.ts +1 -1
- package/dist/services.js +37 -3
- package/dist/services.mjs +37 -3
- package/package.json +1 -1
package/dist/hooks.d.mts
CHANGED
|
@@ -584,7 +584,7 @@ declare const useGetCurrentUser: () => _tanstack_react_query.UseMutationResult<a
|
|
|
584
584
|
extraHeaders?: any;
|
|
585
585
|
}, unknown>;
|
|
586
586
|
|
|
587
|
-
declare const useGetList: () => _tanstack_react_query.UseMutationResult<
|
|
587
|
+
declare const useGetList: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
588
588
|
model: string;
|
|
589
589
|
domain: any;
|
|
590
590
|
service?: string;
|
package/dist/hooks.d.ts
CHANGED
|
@@ -584,7 +584,7 @@ declare const useGetCurrentUser: () => _tanstack_react_query.UseMutationResult<a
|
|
|
584
584
|
extraHeaders?: any;
|
|
585
585
|
}, unknown>;
|
|
586
586
|
|
|
587
|
-
declare const useGetList: () => _tanstack_react_query.UseMutationResult<
|
|
587
|
+
declare const useGetList: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
588
588
|
model: string;
|
|
589
589
|
domain: any;
|
|
590
590
|
service?: string;
|
package/dist/hooks.js
CHANGED
|
@@ -5643,9 +5643,30 @@ var saveSnapshot = async ({
|
|
|
5643
5643
|
return false;
|
|
5644
5644
|
}
|
|
5645
5645
|
};
|
|
5646
|
+
var addRecordResponseHandler = ({
|
|
5647
|
+
modelName,
|
|
5648
|
+
id,
|
|
5649
|
+
data
|
|
5650
|
+
}) => {
|
|
5651
|
+
if (modelName === "restaurant.floor" /* RESTAURANT_FLOOR */) {
|
|
5652
|
+
return [[id, ""]];
|
|
5653
|
+
}
|
|
5654
|
+
return data;
|
|
5655
|
+
};
|
|
5646
5656
|
|
|
5647
5657
|
// src/services/filesystem-service/model-repository.ts
|
|
5648
5658
|
var ModelRepository = class {
|
|
5659
|
+
getAll = async ({ modelName }) => {
|
|
5660
|
+
try {
|
|
5661
|
+
const snapshot = await loadSnapshot({
|
|
5662
|
+
modelName
|
|
5663
|
+
});
|
|
5664
|
+
return snapshot.data;
|
|
5665
|
+
} catch (error) {
|
|
5666
|
+
console.error("failed to get all records:", error);
|
|
5667
|
+
return [];
|
|
5668
|
+
}
|
|
5669
|
+
};
|
|
5649
5670
|
getRecord = async ({
|
|
5650
5671
|
id,
|
|
5651
5672
|
modelName
|
|
@@ -5688,7 +5709,12 @@ var ModelRepository = class {
|
|
|
5688
5709
|
}
|
|
5689
5710
|
console.log(`\u2705 ${snapshot.data.length} records saved`);
|
|
5690
5711
|
console.log(snapshot.data);
|
|
5691
|
-
|
|
5712
|
+
const response = addRecordResponseHandler({
|
|
5713
|
+
id: newId,
|
|
5714
|
+
modelName,
|
|
5715
|
+
data: snapshot.data
|
|
5716
|
+
});
|
|
5717
|
+
return response;
|
|
5692
5718
|
} catch (error) {
|
|
5693
5719
|
console.error("failed to add new record:", error);
|
|
5694
5720
|
return [];
|
|
@@ -6131,8 +6157,10 @@ var getCurrentUserService = (env) => {
|
|
|
6131
6157
|
// src/services/pos-service/get-list.ts
|
|
6132
6158
|
var import_react28 = require("react");
|
|
6133
6159
|
var getListService = (env) => {
|
|
6160
|
+
const isLocalMode = env?.isLocalMode;
|
|
6161
|
+
const repo = new ModelRepository();
|
|
6134
6162
|
const getList = (0, import_react28.useCallback)(
|
|
6135
|
-
({
|
|
6163
|
+
async ({
|
|
6136
6164
|
model,
|
|
6137
6165
|
domain,
|
|
6138
6166
|
xNode,
|
|
@@ -6141,6 +6169,12 @@ var getListService = (env) => {
|
|
|
6141
6169
|
offset,
|
|
6142
6170
|
limit
|
|
6143
6171
|
}) => {
|
|
6172
|
+
if (isLocalMode) {
|
|
6173
|
+
const data = await repo.getAll({
|
|
6174
|
+
modelName: model
|
|
6175
|
+
});
|
|
6176
|
+
return data;
|
|
6177
|
+
}
|
|
6144
6178
|
const jsonData = {
|
|
6145
6179
|
model,
|
|
6146
6180
|
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
@@ -6163,7 +6197,7 @@ var getListService = (env) => {
|
|
|
6163
6197
|
service
|
|
6164
6198
|
);
|
|
6165
6199
|
},
|
|
6166
|
-
[env]
|
|
6200
|
+
[env, isLocalMode]
|
|
6167
6201
|
);
|
|
6168
6202
|
return {
|
|
6169
6203
|
getList
|
package/dist/hooks.mjs
CHANGED
|
@@ -5495,9 +5495,30 @@ var saveSnapshot = async ({
|
|
|
5495
5495
|
return false;
|
|
5496
5496
|
}
|
|
5497
5497
|
};
|
|
5498
|
+
var addRecordResponseHandler = ({
|
|
5499
|
+
modelName,
|
|
5500
|
+
id,
|
|
5501
|
+
data
|
|
5502
|
+
}) => {
|
|
5503
|
+
if (modelName === "restaurant.floor" /* RESTAURANT_FLOOR */) {
|
|
5504
|
+
return [[id, ""]];
|
|
5505
|
+
}
|
|
5506
|
+
return data;
|
|
5507
|
+
};
|
|
5498
5508
|
|
|
5499
5509
|
// src/services/filesystem-service/model-repository.ts
|
|
5500
5510
|
var ModelRepository = class {
|
|
5511
|
+
getAll = async ({ modelName }) => {
|
|
5512
|
+
try {
|
|
5513
|
+
const snapshot = await loadSnapshot({
|
|
5514
|
+
modelName
|
|
5515
|
+
});
|
|
5516
|
+
return snapshot.data;
|
|
5517
|
+
} catch (error) {
|
|
5518
|
+
console.error("failed to get all records:", error);
|
|
5519
|
+
return [];
|
|
5520
|
+
}
|
|
5521
|
+
};
|
|
5501
5522
|
getRecord = async ({
|
|
5502
5523
|
id,
|
|
5503
5524
|
modelName
|
|
@@ -5540,7 +5561,12 @@ var ModelRepository = class {
|
|
|
5540
5561
|
}
|
|
5541
5562
|
console.log(`\u2705 ${snapshot.data.length} records saved`);
|
|
5542
5563
|
console.log(snapshot.data);
|
|
5543
|
-
|
|
5564
|
+
const response = addRecordResponseHandler({
|
|
5565
|
+
id: newId,
|
|
5566
|
+
modelName,
|
|
5567
|
+
data: snapshot.data
|
|
5568
|
+
});
|
|
5569
|
+
return response;
|
|
5544
5570
|
} catch (error) {
|
|
5545
5571
|
console.error("failed to add new record:", error);
|
|
5546
5572
|
return [];
|
|
@@ -5983,8 +6009,10 @@ var getCurrentUserService = (env) => {
|
|
|
5983
6009
|
// src/services/pos-service/get-list.ts
|
|
5984
6010
|
import { useCallback as useCallback23 } from "react";
|
|
5985
6011
|
var getListService = (env) => {
|
|
6012
|
+
const isLocalMode = env?.isLocalMode;
|
|
6013
|
+
const repo = new ModelRepository();
|
|
5986
6014
|
const getList = useCallback23(
|
|
5987
|
-
({
|
|
6015
|
+
async ({
|
|
5988
6016
|
model,
|
|
5989
6017
|
domain,
|
|
5990
6018
|
xNode,
|
|
@@ -5993,6 +6021,12 @@ var getListService = (env) => {
|
|
|
5993
6021
|
offset,
|
|
5994
6022
|
limit
|
|
5995
6023
|
}) => {
|
|
6024
|
+
if (isLocalMode) {
|
|
6025
|
+
const data = await repo.getAll({
|
|
6026
|
+
modelName: model
|
|
6027
|
+
});
|
|
6028
|
+
return data;
|
|
6029
|
+
}
|
|
5996
6030
|
const jsonData = {
|
|
5997
6031
|
model,
|
|
5998
6032
|
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
@@ -6015,7 +6049,7 @@ var getListService = (env) => {
|
|
|
6015
6049
|
service
|
|
6016
6050
|
);
|
|
6017
6051
|
},
|
|
6018
|
-
[env]
|
|
6052
|
+
[env, isLocalMode]
|
|
6019
6053
|
);
|
|
6020
6054
|
return {
|
|
6021
6055
|
getList
|
package/dist/provider.js
CHANGED
|
@@ -5625,9 +5625,30 @@ var saveSnapshot = async ({
|
|
|
5625
5625
|
return false;
|
|
5626
5626
|
}
|
|
5627
5627
|
};
|
|
5628
|
+
var addRecordResponseHandler = ({
|
|
5629
|
+
modelName,
|
|
5630
|
+
id,
|
|
5631
|
+
data
|
|
5632
|
+
}) => {
|
|
5633
|
+
if (modelName === "restaurant.floor" /* RESTAURANT_FLOOR */) {
|
|
5634
|
+
return [[id, ""]];
|
|
5635
|
+
}
|
|
5636
|
+
return data;
|
|
5637
|
+
};
|
|
5628
5638
|
|
|
5629
5639
|
// src/services/filesystem-service/model-repository.ts
|
|
5630
5640
|
var ModelRepository = class {
|
|
5641
|
+
getAll = async ({ modelName }) => {
|
|
5642
|
+
try {
|
|
5643
|
+
const snapshot = await loadSnapshot({
|
|
5644
|
+
modelName
|
|
5645
|
+
});
|
|
5646
|
+
return snapshot.data;
|
|
5647
|
+
} catch (error) {
|
|
5648
|
+
console.error("failed to get all records:", error);
|
|
5649
|
+
return [];
|
|
5650
|
+
}
|
|
5651
|
+
};
|
|
5631
5652
|
getRecord = async ({
|
|
5632
5653
|
id,
|
|
5633
5654
|
modelName
|
|
@@ -5670,7 +5691,12 @@ var ModelRepository = class {
|
|
|
5670
5691
|
}
|
|
5671
5692
|
console.log(`\u2705 ${snapshot.data.length} records saved`);
|
|
5672
5693
|
console.log(snapshot.data);
|
|
5673
|
-
|
|
5694
|
+
const response = addRecordResponseHandler({
|
|
5695
|
+
id: newId,
|
|
5696
|
+
modelName,
|
|
5697
|
+
data: snapshot.data
|
|
5698
|
+
});
|
|
5699
|
+
return response;
|
|
5674
5700
|
} catch (error) {
|
|
5675
5701
|
console.error("failed to add new record:", error);
|
|
5676
5702
|
return [];
|
|
@@ -6113,8 +6139,10 @@ var getCurrentUserService = (env) => {
|
|
|
6113
6139
|
// src/services/pos-service/get-list.ts
|
|
6114
6140
|
var import_react24 = require("react");
|
|
6115
6141
|
var getListService = (env) => {
|
|
6142
|
+
const isLocalMode = env?.isLocalMode;
|
|
6143
|
+
const repo = new ModelRepository();
|
|
6116
6144
|
const getList = (0, import_react24.useCallback)(
|
|
6117
|
-
({
|
|
6145
|
+
async ({
|
|
6118
6146
|
model,
|
|
6119
6147
|
domain,
|
|
6120
6148
|
xNode,
|
|
@@ -6123,6 +6151,12 @@ var getListService = (env) => {
|
|
|
6123
6151
|
offset,
|
|
6124
6152
|
limit
|
|
6125
6153
|
}) => {
|
|
6154
|
+
if (isLocalMode) {
|
|
6155
|
+
const data = await repo.getAll({
|
|
6156
|
+
modelName: model
|
|
6157
|
+
});
|
|
6158
|
+
return data;
|
|
6159
|
+
}
|
|
6126
6160
|
const jsonData = {
|
|
6127
6161
|
model,
|
|
6128
6162
|
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
@@ -6145,7 +6179,7 @@ var getListService = (env) => {
|
|
|
6145
6179
|
service
|
|
6146
6180
|
);
|
|
6147
6181
|
},
|
|
6148
|
-
[env]
|
|
6182
|
+
[env, isLocalMode]
|
|
6149
6183
|
);
|
|
6150
6184
|
return {
|
|
6151
6185
|
getList
|
package/dist/provider.mjs
CHANGED
|
@@ -5582,9 +5582,30 @@ var saveSnapshot = async ({
|
|
|
5582
5582
|
return false;
|
|
5583
5583
|
}
|
|
5584
5584
|
};
|
|
5585
|
+
var addRecordResponseHandler = ({
|
|
5586
|
+
modelName,
|
|
5587
|
+
id,
|
|
5588
|
+
data
|
|
5589
|
+
}) => {
|
|
5590
|
+
if (modelName === "restaurant.floor" /* RESTAURANT_FLOOR */) {
|
|
5591
|
+
return [[id, ""]];
|
|
5592
|
+
}
|
|
5593
|
+
return data;
|
|
5594
|
+
};
|
|
5585
5595
|
|
|
5586
5596
|
// src/services/filesystem-service/model-repository.ts
|
|
5587
5597
|
var ModelRepository = class {
|
|
5598
|
+
getAll = async ({ modelName }) => {
|
|
5599
|
+
try {
|
|
5600
|
+
const snapshot = await loadSnapshot({
|
|
5601
|
+
modelName
|
|
5602
|
+
});
|
|
5603
|
+
return snapshot.data;
|
|
5604
|
+
} catch (error) {
|
|
5605
|
+
console.error("failed to get all records:", error);
|
|
5606
|
+
return [];
|
|
5607
|
+
}
|
|
5608
|
+
};
|
|
5588
5609
|
getRecord = async ({
|
|
5589
5610
|
id,
|
|
5590
5611
|
modelName
|
|
@@ -5627,7 +5648,12 @@ var ModelRepository = class {
|
|
|
5627
5648
|
}
|
|
5628
5649
|
console.log(`\u2705 ${snapshot.data.length} records saved`);
|
|
5629
5650
|
console.log(snapshot.data);
|
|
5630
|
-
|
|
5651
|
+
const response = addRecordResponseHandler({
|
|
5652
|
+
id: newId,
|
|
5653
|
+
modelName,
|
|
5654
|
+
data: snapshot.data
|
|
5655
|
+
});
|
|
5656
|
+
return response;
|
|
5631
5657
|
} catch (error) {
|
|
5632
5658
|
console.error("failed to add new record:", error);
|
|
5633
5659
|
return [];
|
|
@@ -6070,8 +6096,10 @@ var getCurrentUserService = (env) => {
|
|
|
6070
6096
|
// src/services/pos-service/get-list.ts
|
|
6071
6097
|
import { useCallback as useCallback22 } from "react";
|
|
6072
6098
|
var getListService = (env) => {
|
|
6099
|
+
const isLocalMode = env?.isLocalMode;
|
|
6100
|
+
const repo = new ModelRepository();
|
|
6073
6101
|
const getList = useCallback22(
|
|
6074
|
-
({
|
|
6102
|
+
async ({
|
|
6075
6103
|
model,
|
|
6076
6104
|
domain,
|
|
6077
6105
|
xNode,
|
|
@@ -6080,6 +6108,12 @@ var getListService = (env) => {
|
|
|
6080
6108
|
offset,
|
|
6081
6109
|
limit
|
|
6082
6110
|
}) => {
|
|
6111
|
+
if (isLocalMode) {
|
|
6112
|
+
const data = await repo.getAll({
|
|
6113
|
+
modelName: model
|
|
6114
|
+
});
|
|
6115
|
+
return data;
|
|
6116
|
+
}
|
|
6083
6117
|
const jsonData = {
|
|
6084
6118
|
model,
|
|
6085
6119
|
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
@@ -6102,7 +6136,7 @@ var getListService = (env) => {
|
|
|
6102
6136
|
service
|
|
6103
6137
|
);
|
|
6104
6138
|
},
|
|
6105
|
-
[env]
|
|
6139
|
+
[env, isLocalMode]
|
|
6106
6140
|
);
|
|
6107
6141
|
return {
|
|
6108
6142
|
getList
|
package/dist/services.d.mts
CHANGED
|
@@ -464,7 +464,7 @@ declare const serviceFactories: readonly [(env: any) => {
|
|
|
464
464
|
specification: any;
|
|
465
465
|
offset?: number;
|
|
466
466
|
limit?: number;
|
|
467
|
-
}) => any
|
|
467
|
+
}) => Promise<any>;
|
|
468
468
|
}, (env: any) => {
|
|
469
469
|
getOrderLine: ({ model, ids, specification, xNode, service, }: {
|
|
470
470
|
model: string;
|
package/dist/services.d.ts
CHANGED
|
@@ -464,7 +464,7 @@ declare const serviceFactories: readonly [(env: any) => {
|
|
|
464
464
|
specification: any;
|
|
465
465
|
offset?: number;
|
|
466
466
|
limit?: number;
|
|
467
|
-
}) => any
|
|
467
|
+
}) => Promise<any>;
|
|
468
468
|
}, (env: any) => {
|
|
469
469
|
getOrderLine: ({ model, ids, specification, xNode, service, }: {
|
|
470
470
|
model: string;
|
package/dist/services.js
CHANGED
|
@@ -3605,9 +3605,30 @@ var saveSnapshot = async ({
|
|
|
3605
3605
|
return false;
|
|
3606
3606
|
}
|
|
3607
3607
|
};
|
|
3608
|
+
var addRecordResponseHandler = ({
|
|
3609
|
+
modelName,
|
|
3610
|
+
id,
|
|
3611
|
+
data
|
|
3612
|
+
}) => {
|
|
3613
|
+
if (modelName === "restaurant.floor" /* RESTAURANT_FLOOR */) {
|
|
3614
|
+
return [[id, ""]];
|
|
3615
|
+
}
|
|
3616
|
+
return data;
|
|
3617
|
+
};
|
|
3608
3618
|
|
|
3609
3619
|
// src/services/filesystem-service/model-repository.ts
|
|
3610
3620
|
var ModelRepository = class {
|
|
3621
|
+
getAll = async ({ modelName }) => {
|
|
3622
|
+
try {
|
|
3623
|
+
const snapshot = await loadSnapshot({
|
|
3624
|
+
modelName
|
|
3625
|
+
});
|
|
3626
|
+
return snapshot.data;
|
|
3627
|
+
} catch (error) {
|
|
3628
|
+
console.error("failed to get all records:", error);
|
|
3629
|
+
return [];
|
|
3630
|
+
}
|
|
3631
|
+
};
|
|
3611
3632
|
getRecord = async ({
|
|
3612
3633
|
id,
|
|
3613
3634
|
modelName
|
|
@@ -3650,7 +3671,12 @@ var ModelRepository = class {
|
|
|
3650
3671
|
}
|
|
3651
3672
|
console.log(`\u2705 ${snapshot.data.length} records saved`);
|
|
3652
3673
|
console.log(snapshot.data);
|
|
3653
|
-
|
|
3674
|
+
const response = addRecordResponseHandler({
|
|
3675
|
+
id: newId,
|
|
3676
|
+
modelName,
|
|
3677
|
+
data: snapshot.data
|
|
3678
|
+
});
|
|
3679
|
+
return response;
|
|
3654
3680
|
} catch (error) {
|
|
3655
3681
|
console.error("failed to add new record:", error);
|
|
3656
3682
|
return [];
|
|
@@ -4093,8 +4119,10 @@ var getCurrentUserService = (env) => {
|
|
|
4093
4119
|
// src/services/pos-service/get-list.ts
|
|
4094
4120
|
var import_react17 = require("react");
|
|
4095
4121
|
var getListService = (env) => {
|
|
4122
|
+
const isLocalMode = env?.isLocalMode;
|
|
4123
|
+
const repo = new ModelRepository();
|
|
4096
4124
|
const getList = (0, import_react17.useCallback)(
|
|
4097
|
-
({
|
|
4125
|
+
async ({
|
|
4098
4126
|
model,
|
|
4099
4127
|
domain,
|
|
4100
4128
|
xNode,
|
|
@@ -4103,6 +4131,12 @@ var getListService = (env) => {
|
|
|
4103
4131
|
offset,
|
|
4104
4132
|
limit
|
|
4105
4133
|
}) => {
|
|
4134
|
+
if (isLocalMode) {
|
|
4135
|
+
const data = await repo.getAll({
|
|
4136
|
+
modelName: model
|
|
4137
|
+
});
|
|
4138
|
+
return data;
|
|
4139
|
+
}
|
|
4106
4140
|
const jsonData = {
|
|
4107
4141
|
model,
|
|
4108
4142
|
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
@@ -4125,7 +4159,7 @@ var getListService = (env) => {
|
|
|
4125
4159
|
service
|
|
4126
4160
|
);
|
|
4127
4161
|
},
|
|
4128
|
-
[env]
|
|
4162
|
+
[env, isLocalMode]
|
|
4129
4163
|
);
|
|
4130
4164
|
return {
|
|
4131
4165
|
getList
|
package/dist/services.mjs
CHANGED
|
@@ -3558,9 +3558,30 @@ var saveSnapshot = async ({
|
|
|
3558
3558
|
return false;
|
|
3559
3559
|
}
|
|
3560
3560
|
};
|
|
3561
|
+
var addRecordResponseHandler = ({
|
|
3562
|
+
modelName,
|
|
3563
|
+
id,
|
|
3564
|
+
data
|
|
3565
|
+
}) => {
|
|
3566
|
+
if (modelName === "restaurant.floor" /* RESTAURANT_FLOOR */) {
|
|
3567
|
+
return [[id, ""]];
|
|
3568
|
+
}
|
|
3569
|
+
return data;
|
|
3570
|
+
};
|
|
3561
3571
|
|
|
3562
3572
|
// src/services/filesystem-service/model-repository.ts
|
|
3563
3573
|
var ModelRepository = class {
|
|
3574
|
+
getAll = async ({ modelName }) => {
|
|
3575
|
+
try {
|
|
3576
|
+
const snapshot = await loadSnapshot({
|
|
3577
|
+
modelName
|
|
3578
|
+
});
|
|
3579
|
+
return snapshot.data;
|
|
3580
|
+
} catch (error) {
|
|
3581
|
+
console.error("failed to get all records:", error);
|
|
3582
|
+
return [];
|
|
3583
|
+
}
|
|
3584
|
+
};
|
|
3564
3585
|
getRecord = async ({
|
|
3565
3586
|
id,
|
|
3566
3587
|
modelName
|
|
@@ -3603,7 +3624,12 @@ var ModelRepository = class {
|
|
|
3603
3624
|
}
|
|
3604
3625
|
console.log(`\u2705 ${snapshot.data.length} records saved`);
|
|
3605
3626
|
console.log(snapshot.data);
|
|
3606
|
-
|
|
3627
|
+
const response = addRecordResponseHandler({
|
|
3628
|
+
id: newId,
|
|
3629
|
+
modelName,
|
|
3630
|
+
data: snapshot.data
|
|
3631
|
+
});
|
|
3632
|
+
return response;
|
|
3607
3633
|
} catch (error) {
|
|
3608
3634
|
console.error("failed to add new record:", error);
|
|
3609
3635
|
return [];
|
|
@@ -4046,8 +4072,10 @@ var getCurrentUserService = (env) => {
|
|
|
4046
4072
|
// src/services/pos-service/get-list.ts
|
|
4047
4073
|
import { useCallback as useCallback14 } from "react";
|
|
4048
4074
|
var getListService = (env) => {
|
|
4075
|
+
const isLocalMode = env?.isLocalMode;
|
|
4076
|
+
const repo = new ModelRepository();
|
|
4049
4077
|
const getList = useCallback14(
|
|
4050
|
-
({
|
|
4078
|
+
async ({
|
|
4051
4079
|
model,
|
|
4052
4080
|
domain,
|
|
4053
4081
|
xNode,
|
|
@@ -4056,6 +4084,12 @@ var getListService = (env) => {
|
|
|
4056
4084
|
offset,
|
|
4057
4085
|
limit
|
|
4058
4086
|
}) => {
|
|
4087
|
+
if (isLocalMode) {
|
|
4088
|
+
const data = await repo.getAll({
|
|
4089
|
+
modelName: model
|
|
4090
|
+
});
|
|
4091
|
+
return data;
|
|
4092
|
+
}
|
|
4059
4093
|
const jsonData = {
|
|
4060
4094
|
model,
|
|
4061
4095
|
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
@@ -4078,7 +4112,7 @@ var getListService = (env) => {
|
|
|
4078
4112
|
service
|
|
4079
4113
|
);
|
|
4080
4114
|
},
|
|
4081
|
-
[env]
|
|
4115
|
+
[env, isLocalMode]
|
|
4082
4116
|
);
|
|
4083
4117
|
return {
|
|
4084
4118
|
getList
|