pict-section-recordset 1.0.7 → 1.0.9
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/package.json +1 -1
- package/source/providers/RecordSet-RecordProvider-MeadowEndpoints.js +6 -3
- package/source/views/list/RecordSet-List.js +17 -1
- package/types/providers/RecordSet-RecordProvider-MeadowEndpoints.d.ts +2 -2
- package/types/providers/RecordSet-RecordProvider-MeadowEndpoints.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -34,8 +34,6 @@ class RecordSetProvider extends libRecordSetProviderBase
|
|
|
34
34
|
{
|
|
35
35
|
super(pFable, pOptions, pServiceHash);
|
|
36
36
|
|
|
37
|
-
/** @type {RestClient} */
|
|
38
|
-
this.restClient;
|
|
39
37
|
/** @type {Record<string, any>} */
|
|
40
38
|
this.options;
|
|
41
39
|
/** @type {import('fable')} */
|
|
@@ -47,6 +45,12 @@ class RecordSetProvider extends libRecordSetProviderBase
|
|
|
47
45
|
this._Schema = { };
|
|
48
46
|
}
|
|
49
47
|
|
|
48
|
+
/** @type {RestClient} */
|
|
49
|
+
get restClient()
|
|
50
|
+
{
|
|
51
|
+
return this.fable.RestClient;
|
|
52
|
+
}
|
|
53
|
+
|
|
50
54
|
/**
|
|
51
55
|
* @typedef {(error?: Error, result?: T) => void} RecordSetCallback
|
|
52
56
|
* @template T = Record<string, any>
|
|
@@ -318,7 +322,6 @@ class RecordSetProvider extends libRecordSetProviderBase
|
|
|
318
322
|
onInitializeAsync(fCallback)
|
|
319
323
|
{
|
|
320
324
|
this.fable.log.info('Initializing RecordSetProvider-MeadowEndpoints');
|
|
321
|
-
this.restClient = this.fable.RestClient;
|
|
322
325
|
const checkSession = this.pict.services.PictSectionRecordSet ? this.pict.services.PictSectionRecordSet.checkSession.bind(this.pict.services.PictSectionRecordSet) : async () => true;
|
|
323
326
|
checkSession('Schema').then(async (supported) =>
|
|
324
327
|
{
|
|
@@ -263,8 +263,24 @@ class viewRecordSetList extends libPictRecordSetRecordView
|
|
|
263
263
|
|
|
264
264
|
//FIXME: short-term workaround to not blow up the tempplate rendering with way too many links
|
|
265
265
|
const linkRangeStart = Math.max(0, tmpRecordListData.PageLinkBookmarks.Current - 10);
|
|
266
|
-
const linkRangeEnd = Math.min(tmpRecordListData.PageLinks.length
|
|
266
|
+
const linkRangeEnd = Math.min(tmpRecordListData.PageLinks.length, tmpRecordListData.PageLinkBookmarks.Current + 10);
|
|
267
267
|
tmpRecordListData.PageLinksLimited = tmpRecordListData.PageLinks.slice(linkRangeStart, linkRangeEnd);
|
|
268
|
+
if (linkRangeStart > 0)
|
|
269
|
+
{
|
|
270
|
+
tmpRecordListData.PageLinksLimited.unshift(
|
|
271
|
+
{
|
|
272
|
+
Page: 1,
|
|
273
|
+
URL:`#/PSRS/${tmpRecordListData.RecordSet}/List/${0}/${tmpRecordListData.PageSize}`
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
if (linkRangeEnd < tmpRecordListData.PageLinks.length)
|
|
277
|
+
{
|
|
278
|
+
tmpRecordListData.PageLinksLimited.push(
|
|
279
|
+
{
|
|
280
|
+
Page: tmpRecordListData.PageCount,
|
|
281
|
+
URL:`#/PSRS/${tmpRecordListData.RecordSet}/List/${(tmpRecordListData.PageCount - 1) * tmpRecordListData.PageSize}/${tmpRecordListData.PageSize}`
|
|
282
|
+
});
|
|
283
|
+
}
|
|
268
284
|
|
|
269
285
|
tmpRecordListData.PageLinkBookmarks.Previous = tmpRecordListData.PageLinkBookmarks.Current - 1;
|
|
270
286
|
tmpRecordListData.PageLinkBookmarks.Next = tmpRecordListData.PageLinkBookmarks.Current + 1;
|
|
@@ -20,12 +20,12 @@ export = RecordSetProvider;
|
|
|
20
20
|
* @extends libRecordSetProviderBase
|
|
21
21
|
*/
|
|
22
22
|
declare class RecordSetProvider extends libRecordSetProviderBase {
|
|
23
|
-
/** @type {RestClient} */
|
|
24
|
-
restClient: RestClient;
|
|
25
23
|
/** @type {import('fable') & import('pict')} */
|
|
26
24
|
pict: any & import("pict");
|
|
27
25
|
/** @type {Record<string, any>} */
|
|
28
26
|
_Schema: Record<string, any>;
|
|
27
|
+
/** @type {RestClient} */
|
|
28
|
+
get restClient(): RestClient;
|
|
29
29
|
/**
|
|
30
30
|
* @typedef {(error?: Error, result?: T) => void} RecordSetCallback
|
|
31
31
|
* @template T = Record<string, any>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecordSet-RecordProvider-MeadowEndpoints.d.ts","sourceRoot":"","sources":["../../source/providers/RecordSet-RecordProvider-MeadowEndpoints.js"],"names":[],"mappings":";AAGA;;;;;;;;;;;;;;;GAeG;AAEH;;;GAGG;AACH;
|
|
1
|
+
{"version":3,"file":"RecordSet-RecordProvider-MeadowEndpoints.d.ts","sourceRoot":"","sources":["../../source/providers/RecordSet-RecordProvider-MeadowEndpoints.js"],"names":[],"mappings":";AAGA;;;;;;;;;;;;;;;GAeG;AAEH;;;GAGG;AACH;IAgBE,+CAA+C;IAC/C,MADW,GAAe,GAAG,OAAO,MAAM,CAAC,CAClC;IAET,kCAAkC;IAClC,SADW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CACZ;IAGnB,yBAAyB;IACzB,kBADW,UAAU,CAIpB;IAED;;;OAGG;IAEH;;;;OAIG;IACH,qBAFW,MAAM,GAAC,MAAM,gBA4BvB;IAED;;;;OAIG;IACH,uBAFW,MAAM,GAAC,MAAM,gBAuBvB;IA+CD;;;;OAIG;IACH,4BAFW,eAAe,gBAyBzB;IAED;;;;OAIG;IACH,sBAFW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,gBAsB7B;IAED;;;;OAIG;IACH,sBAFW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,gBAsB7B;IAED;;;;OAIG;IACH,sBAFW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,gBAsB7B;IAED;;;;OAIG;IACH,sBAFW,MAAM,GAAC,MAAM,gBAKvB;IAaD;;;;OAIG;IACH,q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