pict-section-recordset 1.0.4 → 1.0.6
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/example_applications/simple_entity/Simple-RecordSet-Application.js +1 -0
- package/package.json +1 -1
- package/source/views/RecordSet-Filter.js +81 -67
- package/source/views/dashboard/RecordSet-Dashboard-HeaderDashboard.js +50 -50
- package/source/views/dashboard/RecordSet-Dashboard-RecordSetDashboard.js +51 -51
- package/source/views/dashboard/RecordSet-Dashboard-TabBarDashboard.js +50 -50
- package/source/views/dashboard/RecordSet-Dashboard.js +50 -50
- package/source/views/edit/RecordSet-Edit-HeaderEdit.js +51 -51
- package/source/views/edit/RecordSet-Edit-RecordEdit.js +51 -51
- package/source/views/edit/RecordSet-Edit-RecordEditControls.js +51 -51
- package/source/views/edit/RecordSet-Edit-RecordEditExtra.js +51 -51
- package/source/views/edit/RecordSet-Edit-TabBarEdit.js +51 -51
- package/source/views/edit/RecordSet-Edit.js +51 -51
- package/source/views/list/RecordSet-List-HeaderList.js +51 -51
- package/source/views/list/RecordSet-List-PaginationTop.js +2 -2
- package/source/views/list/RecordSet-List-RecordList.js +57 -57
- package/source/views/list/RecordSet-List-Title.js +47 -47
- package/source/views/list/RecordSet-List.js +36 -4
- package/source/views/read/RecordSet-Read-HeaderRead.js +51 -51
- package/source/views/read/RecordSet-Read-RecordRead.js +42 -42
- package/source/views/read/RecordSet-Read-RecordReadExtra.js +51 -51
- package/source/views/read/RecordSet-Read-TabBarRead.js +51 -51
- package/types/services/RecordsSet-MetaController.d.ts +1 -0
- package/types/services/RecordsSet-MetaController.d.ts.map +1 -1
- package/types/views/RecordSet-Filter.d.ts +2 -0
- package/types/views/RecordSet-Filter.d.ts.map +1 -1
- package/types/views/dashboard/RecordSet-Dashboard-HeaderDashboard.d.ts.map +1 -1
- package/types/views/dashboard/RecordSet-Dashboard-RecordSetDashboard.d.ts.map +1 -1
- package/types/views/dashboard/RecordSet-Dashboard-TabBarDashboard.d.ts.map +1 -1
- package/types/views/edit/RecordSet-Edit-HeaderEdit.d.ts.map +1 -1
- package/types/views/edit/RecordSet-Edit-RecordEdit.d.ts.map +1 -1
- package/types/views/edit/RecordSet-Edit-RecordEditControls.d.ts.map +1 -1
- package/types/views/edit/RecordSet-Edit-RecordEditExtra.d.ts.map +1 -1
- package/types/views/edit/RecordSet-Edit-TabBarEdit.d.ts.map +1 -1
- package/types/views/list/RecordSet-List-HeaderList.d.ts.map +1 -1
- package/types/views/list/RecordSet-List-RecordList.d.ts.map +1 -1
- package/types/views/list/RecordSet-List-RecordListEntry.d.ts.map +1 -1
- package/types/views/list/RecordSet-List-RecordListHeader.d.ts.map +1 -1
- package/types/views/list/RecordSet-List-Title.d.ts.map +1 -1
- package/types/views/list/RecordSet-List.d.ts +2 -1
- package/types/views/list/RecordSet-List.d.ts.map +1 -1
- package/types/views/read/RecordSet-Read-HeaderRead.d.ts.map +1 -1
- package/types/views/read/RecordSet-Read-RecordReadExtra.d.ts.map +1 -1
- package/types/views/read/RecordSet-Read-TabBarRead.d.ts.map +1 -1
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
const libPictRecordSetRecordView = require('../RecordSet-RecordBaseView.js');
|
|
2
2
|
|
|
3
|
-
const _DEFAULT_CONFIGURATION__Edit =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
3
|
+
const _DEFAULT_CONFIGURATION__Edit =
|
|
4
|
+
{
|
|
5
|
+
ViewIdentifier: 'PRSP-Edit',
|
|
6
|
+
|
|
7
|
+
DefaultRenderable: 'PRSP_Renderable_Edit',
|
|
8
|
+
DefaultDestinationAddress: '#PRSP_Edit_Container',
|
|
9
|
+
DefaultTemplateRecordAddress: false,
|
|
10
|
+
|
|
11
|
+
// If this is set to true, when the App initializes this will.
|
|
12
|
+
// While the App initializes, initialize will be called.
|
|
13
|
+
AutoInitialize: false,
|
|
14
|
+
AutoInitializeOrdinal: 0,
|
|
15
|
+
|
|
16
|
+
// If this is set to true, when the App autorenders (on load) this will.
|
|
17
|
+
// After the App initializes, render will be called.
|
|
18
|
+
AutoRender: false,
|
|
19
|
+
AutoRenderOrdinal: 0,
|
|
20
|
+
|
|
21
|
+
AutoSolveWithApp: false,
|
|
22
|
+
AutoSolveOrdinal: 0,
|
|
23
|
+
|
|
24
|
+
CSS: false,
|
|
25
|
+
CSSPriority: 500,
|
|
26
|
+
|
|
27
|
+
Templates:
|
|
28
|
+
[
|
|
29
|
+
{
|
|
30
|
+
Hash: 'PRSP-Edit-Template',
|
|
31
|
+
Template: /*html*/`
|
|
32
32
|
<!-- DefaultPackage pict view template: [PRSP-Edit-Template] -->
|
|
33
|
-
<!-- DefaultPackage end view template:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
33
|
+
<!-- DefaultPackage end view template: [PRSP-Edit-Template] -->
|
|
34
|
+
`
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
|
|
38
|
+
Renderables:
|
|
39
|
+
[
|
|
40
|
+
{
|
|
41
|
+
RenderableHash: 'PRSP_Renderable_Edit',
|
|
42
|
+
TemplateHash: 'PRSP-Edit-Template',
|
|
43
|
+
DestinationAddress: '#PRSP_Edit_Container',
|
|
44
|
+
RenderMethod: 'replace'
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
|
|
48
|
+
Manifests: {},
|
|
49
|
+
};
|
|
50
50
|
|
|
51
51
|
class viewRecordSetEdit extends libPictRecordSetRecordView
|
|
52
52
|
{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
54
|
+
{
|
|
55
|
+
let tmpOptions = Object.assign({}, _DEFAULT_CONFIGURATION__Edit, pOptions);
|
|
56
|
+
super(pFable, tmpOptions, pServiceHash);
|
|
57
|
+
}
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
module.exports = viewRecordSetEdit;
|
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
const libPictView = require('pict-view');
|
|
2
2
|
|
|
3
|
-
const _DEFAULT_CONFIGURATION_List_HeaderList =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
3
|
+
const _DEFAULT_CONFIGURATION_List_HeaderList =
|
|
4
|
+
{
|
|
5
|
+
ViewIdentifier: 'PRSP-List-HeaderList',
|
|
6
|
+
|
|
7
|
+
DefaultRenderable: 'PRSP_Renderable_HeaderList',
|
|
8
|
+
DefaultDestinationAddress: '#PRSP_HeaderList_Container',
|
|
9
|
+
DefaultTemplateRecordAddress: false,
|
|
10
|
+
|
|
11
|
+
// If this is set to true, when the App initializes this will.
|
|
12
|
+
// While the App initializes, initialize will be called.
|
|
13
|
+
AutoInitialize: false,
|
|
14
|
+
AutoInitializeOrdinal: 0,
|
|
15
|
+
|
|
16
|
+
// If this is set to true, when the App autorenders (on load) this will.
|
|
17
|
+
// After the App initializes, render will be called.
|
|
18
|
+
AutoRender: false,
|
|
19
|
+
AutoRenderOrdinal: 0,
|
|
20
|
+
|
|
21
|
+
AutoSolveWithApp: false,
|
|
22
|
+
AutoSolveOrdinal: 0,
|
|
23
|
+
|
|
24
|
+
CSS: false,
|
|
25
|
+
CSSPriority: 500,
|
|
26
|
+
|
|
27
|
+
Templates:
|
|
28
|
+
[
|
|
29
|
+
{
|
|
30
|
+
Hash: 'PRSP-List-HeaderList-Template',
|
|
31
|
+
Template: /*html*/`
|
|
32
32
|
<!-- DefaultPackage pict view template: [PRSP-List-HeaderList-Template] -->
|
|
33
|
-
<!-- DefaultPackage end view template:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
33
|
+
<!-- DefaultPackage end view template: [PRSP-List-HeaderList-Template] -->
|
|
34
|
+
`
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
|
|
38
|
+
Renderables:
|
|
39
|
+
[
|
|
40
|
+
{
|
|
41
|
+
RenderableHash: 'PRSP_Renderable_HeaderList',
|
|
42
|
+
TemplateHash: 'PRSP-List-HeaderList-Template',
|
|
43
|
+
DestinationAddress: '#PRSP_HeaderList_Container',
|
|
44
|
+
RenderMethod: 'replace'
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
|
|
48
|
+
Manifests: {},
|
|
49
|
+
};
|
|
50
50
|
|
|
51
51
|
class viewRecordSetListHeaderList extends libPictView
|
|
52
52
|
{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
54
|
+
{
|
|
55
|
+
let tmpOptions = Object.assign({}, _DEFAULT_CONFIGURATION_List_HeaderList, pOptions);
|
|
56
|
+
super(pFable, tmpOptions, pServiceHash);
|
|
57
|
+
}
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
module.exports = viewRecordSetListHeaderList;
|
|
@@ -58,9 +58,9 @@ const _DEFAULT_CONFIGURATION_List_PaginationTop = (
|
|
|
58
58
|
Template: /*html*/`
|
|
59
59
|
<!-- DefaultPackage pict view template: [PRSP-List-Pagination-Template-Buttons] -->
|
|
60
60
|
<ul style="list-style-type: none; padding: 0; display: flex; justify-content: center;">
|
|
61
|
-
{~
|
|
61
|
+
{~TIfAbs:PRSP-List-Pagination-Template-Button-Previous:Record:Record.PageLinkBookmarks.ShowPreviousLink^TRUE^true~}
|
|
62
62
|
{~TS:PRSP-List-Pagination-Template-Button-Page~}
|
|
63
|
-
{~
|
|
63
|
+
{~TIfAbs:PRSP-List-Pagination-Template-Button-Next:Record:Record.PageLinkBookmarks.ShowNextLink^TRUE^true~}
|
|
64
64
|
</ul>
|
|
65
65
|
<!-- DefaultPackage end view template: [PRSP-List-Pagination-Template-Buttons] -->
|
|
66
66
|
`
|
|
@@ -1,76 +1,76 @@
|
|
|
1
1
|
const libPictView = require('pict-view');
|
|
2
2
|
|
|
3
|
-
const _DEFAULT_CONFIGURATION_List_RecordList =
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
const _DEFAULT_CONFIGURATION_List_RecordList =
|
|
4
|
+
{
|
|
5
|
+
ViewIdentifier: 'PRSP-List-RecordList',
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
DefaultRenderable: 'PRSP_Renderable_RecordList',
|
|
8
|
+
DefaultDestinationAddress: '#PRSP_RecordList_Container',
|
|
9
|
+
DefaultTemplateRecordAddress: false,
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
// If this is set to true, when the App initializes this will.
|
|
12
|
+
// While the App initializes, initialize will be called.
|
|
13
|
+
AutoInitialize: false,
|
|
14
|
+
AutoInitializeOrdinal: 0,
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
// If this is set to true, when the App autorenders (on load) this will.
|
|
17
|
+
// After the App initializes, render will be called.
|
|
18
|
+
AutoRender: false,
|
|
19
|
+
AutoRenderOrdinal: 0,
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
AutoSolveWithApp: false,
|
|
22
|
+
AutoSolveOrdinal: 0,
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
CSS: false,
|
|
25
|
+
CSSPriority: 500,
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
Templates:
|
|
28
|
+
[
|
|
29
|
+
{
|
|
30
|
+
Hash: 'PRSP-List-RecordList-Template',
|
|
31
|
+
Template: /*html*/`
|
|
32
32
|
<!-- DefaultPackage pict view template: [PRSP-List-RecordList-Template] -->
|
|
33
|
-
|
|
33
|
+
<section id="PRSP_List_Container">
|
|
34
34
|
{~T:PRSP-List-RecordList-Template-Table~}
|
|
35
35
|
</section>
|
|
36
|
-
<!-- DefaultPackage end view template:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
36
|
+
<!-- DefaultPackage end view template: [PRSP-List-RecordList-Template] -->
|
|
37
|
+
`
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
Hash: 'PRSP-List-RecordList-Template-Table',
|
|
41
|
+
Template: /*html*/`
|
|
42
|
+
<!-- DefaultPackage pict view template: [PRSP-List-RecordList-Template-Table] -->
|
|
43
|
+
<table id="PRSP_List_Table" tablespacing="0" cellpadding="0" cellspacing="0" style="width: 100%; border-collapse: collapse; margin-bottom: 20px;">
|
|
44
|
+
<thead>{~T:PRSP-List-RecordListHeader-Template~}</thead>
|
|
45
|
+
<tbody id="PRSP_RecordList_Container_Entries">
|
|
46
|
+
{~T:PRSP-List-RecordListEntry-Template~}
|
|
47
|
+
</tbody>
|
|
48
|
+
</table>
|
|
49
|
+
<!-- DefaultPackage end view template: [PRSP-List-RecordList-Template-Table] -->
|
|
50
|
+
`
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
Renderables:
|
|
55
|
+
[
|
|
56
|
+
{
|
|
57
|
+
RenderableHash: 'PRSP_Renderable_RecordList',
|
|
58
|
+
TemplateHash: 'PRSP-List-RecordList-Template',
|
|
59
|
+
DestinationAddress: '#PRSP_RecordList_Container',
|
|
60
|
+
RenderMethod: 'replace'
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
Manifests: {}
|
|
65
|
+
};
|
|
66
66
|
|
|
67
67
|
class viewRecordSetListRecordList extends libPictView
|
|
68
68
|
{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
70
|
+
{
|
|
71
|
+
let tmpOptions = Object.assign({}, _DEFAULT_CONFIGURATION_List_RecordList, pOptions);
|
|
72
|
+
super(pFable, tmpOptions, pServiceHash);
|
|
73
|
+
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
module.exports = viewRecordSetListRecordList;
|
|
@@ -1,64 +1,64 @@
|
|
|
1
1
|
const libPictView = require('pict-view');
|
|
2
2
|
|
|
3
|
-
const _DEFAULT_CONFIGURATION_List_Title =
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
const _DEFAULT_CONFIGURATION_List_Title =
|
|
4
|
+
{
|
|
5
|
+
ViewIdentifier: 'PRSP-List-Title',
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
DefaultRenderable: 'PRSP_Renderable_Title',
|
|
8
|
+
DefaultDestinationAddress: '#PRSP_Title_Container',
|
|
9
|
+
DefaultTemplateRecordAddress: false,
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
// If this is set to true, when the App initializes this will.
|
|
12
|
+
// While the App initializes, initialize will be called.
|
|
13
|
+
AutoInitialize: false,
|
|
14
|
+
AutoInitializeOrdinal: 0,
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
// If this is set to true, when the App autorenders (on load) this will.
|
|
17
|
+
// After the App initializes, render will be called.
|
|
18
|
+
AutoRender: false,
|
|
19
|
+
AutoRenderOrdinal: 0,
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
AutoSolveWithApp: false,
|
|
22
|
+
AutoSolveOrdinal: 0,
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
CSS: false,
|
|
25
|
+
CSSPriority: 500,
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
Templates:
|
|
28
|
+
[
|
|
29
|
+
{
|
|
30
|
+
Hash: 'PRSP-List-Title-Template',
|
|
31
|
+
Template: /*html*/`
|
|
32
32
|
<!-- DefaultPackage pict view template: [PRSP-List-Title-Template] -->
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
<!-- DefaultPackage end view template:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
<header id="PRSP_Title_Container">
|
|
34
|
+
<h1 id="PRSP_Title">{~D:Record.Title~}</h1>
|
|
35
|
+
<h2 id="PRSP_Subtitle">{~D:Record.Subtitle~}</h2>
|
|
36
|
+
</header>
|
|
37
|
+
<!-- DefaultPackage end view template: [PRSP-List-Title-Template] -->
|
|
38
|
+
`
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
42
|
+
Renderables:
|
|
43
|
+
[
|
|
44
|
+
{
|
|
45
|
+
RenderableHash: 'PRSP_Renderable_Title',
|
|
46
|
+
TemplateHash: 'PRSP-List-Title-Template',
|
|
47
|
+
DestinationAddress: '#PRSP_Title_Container',
|
|
48
|
+
RenderMethod: 'replace'
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
Manifests: {},
|
|
53
|
+
};
|
|
54
54
|
|
|
55
55
|
class viewRecordSetListTitle extends libPictView
|
|
56
56
|
{
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
58
|
+
{
|
|
59
|
+
let tmpOptions = Object.assign({}, _DEFAULT_CONFIGURATION_List_Title, pOptions);
|
|
60
|
+
super(pFable, tmpOptions, pServiceHash);
|
|
61
|
+
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
module.exports = viewRecordSetListTitle;
|
|
@@ -2,6 +2,7 @@ const libPictRecordSetRecordView = require('../RecordSet-RecordBaseView.js');
|
|
|
2
2
|
|
|
3
3
|
const viewHeaderList = require('./RecordSet-List-HeaderList.js');
|
|
4
4
|
const viewTitle = require('./RecordSet-List-Title.js');
|
|
5
|
+
const viewFilters = require('../RecordSet-Filter.js');
|
|
5
6
|
const viewPaginationTop = require('./RecordSet-List-PaginationTop.js');
|
|
6
7
|
const viewRecordList = require('./RecordSet-List-RecordList.js');
|
|
7
8
|
const viewRecordListHeader = require('./RecordSet-List-RecordListHeader.js');
|
|
@@ -41,6 +42,7 @@ const _DEFAULT_CONFIGURATION__List = (
|
|
|
41
42
|
<section id="PRSP_List_Container">
|
|
42
43
|
{~V:PRSP-List-Title~}
|
|
43
44
|
{~V:PRSP-List-HeaderList~}
|
|
45
|
+
{~V:PRSP-Filters~}
|
|
44
46
|
{~V:PRSP-List-PaginationTop~}
|
|
45
47
|
{~V:PRSP-List-RecordList~}
|
|
46
48
|
{~V:PRSP-List-PaginationBottom~}
|
|
@@ -87,6 +89,31 @@ class viewRecordSetList extends libPictRecordSetRecordView
|
|
|
87
89
|
};
|
|
88
90
|
}
|
|
89
91
|
|
|
92
|
+
handleSearch(pSearchString)
|
|
93
|
+
{
|
|
94
|
+
const pictRouter = this.pict.providers.PictRouter;
|
|
95
|
+
const recordSet = pictRouter.router.current[0]?.data?.RecordSet;
|
|
96
|
+
const offset = '0'; // since we are searching, we reset to page 1
|
|
97
|
+
const pageSize = pictRouter.router.current[0]?.data?.PageSize || '100';
|
|
98
|
+
if (!recordSet)
|
|
99
|
+
{
|
|
100
|
+
this.pict.log.error('PictRecordSetRouter.handleSearch: No record set found in the current route: ', { routes: pictRouter.router.current });
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
const tmpProviderConfiguration = this.pict.PictSectionRecordSet.recordSetProviderConfigurations[recordSet];
|
|
104
|
+
if (pSearchString)
|
|
105
|
+
{
|
|
106
|
+
//FIXME: figure this out based on the record set; or defer to another provider?
|
|
107
|
+
const searchFields = tmpProviderConfiguration?.SearchFields ?? [ 'Name' ];
|
|
108
|
+
const filterExpr = searchFields.map((filterField) => `FBVOR~${filterField}~LK~${encodeURIComponent(`%${pSearchString}%`)}`).join('~');
|
|
109
|
+
pictRouter.navigate(`/PSRS/${recordSet}/List/FilteredTo/${filterExpr}/${offset}/${pageSize}`);
|
|
110
|
+
}
|
|
111
|
+
else
|
|
112
|
+
{
|
|
113
|
+
pictRouter.navigate(`/PSRS/${recordSet}/List`);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
90
117
|
handleRecordSetListRoute(pRoutePayload)
|
|
91
118
|
{
|
|
92
119
|
if (typeof(pRoutePayload) != 'object')
|
|
@@ -104,7 +131,7 @@ class viewRecordSetList extends libPictRecordSetRecordView
|
|
|
104
131
|
const tmpProviderConfiguration = this.pict.PictSectionRecordSet.recordSetProviderConfigurations[pRoutePayload.data.RecordSet];
|
|
105
132
|
const tmpProviderHash = `RSP-Provider-${pRoutePayload.data.RecordSet}`;
|
|
106
133
|
|
|
107
|
-
const tmpFilterString = pRoutePayload.data.FilterString
|
|
134
|
+
const tmpFilterString = pRoutePayload.data.FilterString || '';
|
|
108
135
|
|
|
109
136
|
const tmpOffset = pRoutePayload.data.Offset ? pRoutePayload.data.Offset : 0;
|
|
110
137
|
const tmpPageSize = pRoutePayload.data.PageSize ? pRoutePayload.data.PageSize : 100;
|
|
@@ -180,7 +207,7 @@ class viewRecordSetList extends libPictRecordSetRecordView
|
|
|
180
207
|
|
|
181
208
|
"RenderDestination": this.options.DefaultDestinationAddress,
|
|
182
209
|
|
|
183
|
-
"FilterString": pFilterString
|
|
210
|
+
"FilterString": pFilterString ? encodeURIComponent(pFilterString) : undefined,
|
|
184
211
|
|
|
185
212
|
"Records": { "Records": [] },
|
|
186
213
|
"TotalRecordCount": { "Count": -1 },
|
|
@@ -241,9 +268,12 @@ class viewRecordSetList extends libPictRecordSetRecordView
|
|
|
241
268
|
|
|
242
269
|
tmpRecordListData.PageLinkBookmarks.Previous = tmpRecordListData.PageLinkBookmarks.Current - 1;
|
|
243
270
|
tmpRecordListData.PageLinkBookmarks.Next = tmpRecordListData.PageLinkBookmarks.Current + 1;
|
|
271
|
+
tmpRecordListData.PageLinkBookmarks.ShowPreviousLink = true;
|
|
272
|
+
tmpRecordListData.PageLinkBookmarks.ShowNextLink = true;
|
|
244
273
|
if (tmpRecordListData.PageLinkBookmarks.Previous < 0)
|
|
245
274
|
{
|
|
246
|
-
tmpRecordListData.PageLinkBookmarks.
|
|
275
|
+
tmpRecordListData.PageLinkBookmarks.PreviousLink = false;
|
|
276
|
+
tmpRecordListData.PageLinkBookmarks.ShowPreviousLink = false;
|
|
247
277
|
}
|
|
248
278
|
else
|
|
249
279
|
{
|
|
@@ -251,7 +281,8 @@ class viewRecordSetList extends libPictRecordSetRecordView
|
|
|
251
281
|
}
|
|
252
282
|
if (tmpRecordListData.PageLinkBookmarks.Next >= tmpRecordListData.PageLinks.length)
|
|
253
283
|
{
|
|
254
|
-
tmpRecordListData.PageLinkBookmarks.
|
|
284
|
+
tmpRecordListData.PageLinkBookmarks.NextLink = false;
|
|
285
|
+
tmpRecordListData.PageLinkBookmarks.ShowNextLink = false;
|
|
255
286
|
}
|
|
256
287
|
else
|
|
257
288
|
{
|
|
@@ -295,6 +326,7 @@ class viewRecordSetList extends libPictRecordSetRecordView
|
|
|
295
326
|
{
|
|
296
327
|
this.childViews.headerList = this.pict.addView('PRSP-List-HeaderList', viewHeaderList.default_configuration, viewHeaderList);
|
|
297
328
|
this.childViews.title = this.pict.addView('PRSP-List-Title', viewTitle.default_configuration, viewTitle);
|
|
329
|
+
this.childViews.filters = this.pict.addView('PRSP-Filters', viewFilters.default_configuration, viewFilters);
|
|
298
330
|
this.childViews.paginationTop = this.pict.addView('PRSP-List-PaginationTop', viewPaginationTop.default_configuration, viewPaginationTop);
|
|
299
331
|
this.childViews.recordList = this.pict.addView('PRSP-List-RecordList', viewRecordList.default_configuration, viewRecordList);
|
|
300
332
|
this.childViews.recordListHeader = this.pict.addView('PRSP-List-RecordListHeader', viewRecordListHeader.default_configuration, viewRecordListHeader);
|