pict-section-recordset 1.0.15 → 1.0.16
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 +113 -0
- package/package.json +3 -3
- package/source/providers/RecordSet-RecordProvider-Base.js +28 -0
- package/source/providers/RecordSet-RecordProvider-MeadowEndpoints.js +53 -3
- package/source/services/RecordsSet-MetaController.js +84 -1
- package/source/templates/Pict-Template-FilterView.js +172 -0
- package/source/views/RecordSet-Filter.js +46 -9
- package/source/views/dashboard/RecordSet-Dashboard-HeaderDashboard.js +17 -17
- package/source/views/dashboard/RecordSet-Dashboard-PaginationBottom.js +68 -0
- package/source/views/dashboard/RecordSet-Dashboard-PaginationTop.js +128 -0
- package/source/views/dashboard/RecordSet-Dashboard-RecordList.js +80 -0
- package/source/views/dashboard/RecordSet-Dashboard-RecordListEntry.js +121 -0
- package/source/views/dashboard/RecordSet-Dashboard-RecordListHeader.js +99 -0
- package/source/views/dashboard/RecordSet-Dashboard-Title.js +67 -0
- package/source/views/dashboard/RecordSet-Dashboard.js +354 -37
- package/source/views/list/RecordSet-List.js +11 -34
- package/types/providers/RecordSet-RecordProvider-Base.d.ts +19 -0
- package/types/providers/RecordSet-RecordProvider-Base.d.ts.map +1 -1
- package/types/providers/RecordSet-RecordProvider-MeadowEndpoints.d.ts +38 -5
- package/types/providers/RecordSet-RecordProvider-MeadowEndpoints.d.ts.map +1 -1
- package/types/services/RecordsSet-MetaController.d.ts +18 -1
- package/types/services/RecordsSet-MetaController.d.ts.map +1 -1
- package/types/templates/Pict-Template-FilterView.d.ts +18 -0
- package/types/templates/Pict-Template-FilterView.d.ts.map +1 -0
- package/types/views/RecordSet-Filter.d.ts +28 -2
- package/types/views/RecordSet-Filter.d.ts.map +1 -1
- package/types/views/dashboard/RecordSet-Dashboard-HeaderDashboard.d.ts +5 -5
- package/types/views/dashboard/RecordSet-Dashboard-HeaderDashboard.d.ts.map +1 -1
- package/types/views/dashboard/RecordSet-Dashboard-PaginationBottom.d.ts +11 -0
- package/types/views/dashboard/RecordSet-Dashboard-PaginationBottom.d.ts.map +1 -0
- package/types/views/dashboard/RecordSet-Dashboard-PaginationTop.d.ts +11 -0
- package/types/views/dashboard/RecordSet-Dashboard-PaginationTop.d.ts.map +1 -0
- package/types/views/dashboard/RecordSet-Dashboard-RecordList.d.ts +11 -0
- package/types/views/dashboard/RecordSet-Dashboard-RecordList.d.ts.map +1 -0
- package/types/views/dashboard/RecordSet-Dashboard-RecordListEntry.d.ts +11 -0
- package/types/views/dashboard/RecordSet-Dashboard-RecordListEntry.d.ts.map +1 -0
- package/types/views/dashboard/RecordSet-Dashboard-RecordListHeader.d.ts +11 -0
- package/types/views/dashboard/RecordSet-Dashboard-RecordListHeader.d.ts.map +1 -0
- package/types/views/dashboard/RecordSet-Dashboard-Title.d.ts +11 -0
- package/types/views/dashboard/RecordSet-Dashboard-Title.d.ts.map +1 -0
- package/types/views/dashboard/RecordSet-Dashboard.d.ts +18 -0
- package/types/views/dashboard/RecordSet-Dashboard.d.ts.map +1 -1
- package/types/views/list/RecordSet-List.d.ts +0 -1
- package/types/views/list/RecordSet-List.d.ts.map +1 -1
- package/source/views/dashboard/RecordSet-Dashboard-RecordSetDashboard.js +0 -64
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
const libPictView = require('pict-view');
|
|
2
2
|
|
|
3
3
|
/** @type {Record<string, any>} */
|
|
4
|
-
const
|
|
4
|
+
const _DEFAULT_CONFIGURATION_Dashboard_HeaderList =
|
|
5
5
|
{
|
|
6
|
-
ViewIdentifier: 'PRSP-Dashboard-
|
|
6
|
+
ViewIdentifier: 'PRSP-Dashboard-HeaderList',
|
|
7
7
|
|
|
8
|
-
DefaultRenderable: '
|
|
9
|
-
DefaultDestinationAddress: '#
|
|
8
|
+
DefaultRenderable: 'PRSP_Renderable_HeaderList',
|
|
9
|
+
DefaultDestinationAddress: '#PRSP_HeaderList_Container',
|
|
10
10
|
DefaultTemplateRecordAddress: false,
|
|
11
11
|
|
|
12
12
|
// If this is set to true, when the App initializes this will.
|
|
@@ -28,37 +28,37 @@ const _DEFAULT_CONFIGURATION_Dashboard_HeaderDashboard =
|
|
|
28
28
|
Templates:
|
|
29
29
|
[
|
|
30
30
|
{
|
|
31
|
-
Hash: 'PRSP-Dashboard-
|
|
31
|
+
Hash: 'PRSP-Dashboard-HeaderList-Template',
|
|
32
32
|
Template: /*html*/`
|
|
33
|
-
<!-- DefaultPackage pict view template: [PRSP-Dashboard-
|
|
34
|
-
<!-- DefaultPackage end view template:
|
|
33
|
+
<!-- DefaultPackage pict view template: [PRSP-Dashboard-HeaderList-Template] -->
|
|
34
|
+
<!-- DefaultPackage end view template: [PRSP-Dashboard-HeaderList-Template] -->
|
|
35
35
|
`
|
|
36
|
-
}
|
|
36
|
+
},
|
|
37
37
|
],
|
|
38
38
|
|
|
39
39
|
Renderables:
|
|
40
40
|
[
|
|
41
41
|
{
|
|
42
|
-
RenderableHash: '
|
|
43
|
-
TemplateHash: 'PRSP-Dashboard-
|
|
44
|
-
DestinationAddress: '#
|
|
42
|
+
RenderableHash: 'PRSP_Renderable_HeaderList',
|
|
43
|
+
TemplateHash: 'PRSP-Dashboard-HeaderList-Template',
|
|
44
|
+
DestinationAddress: '#PRSP_HeaderList_Container',
|
|
45
45
|
RenderMethod: 'replace'
|
|
46
|
-
}
|
|
46
|
+
},
|
|
47
47
|
],
|
|
48
48
|
|
|
49
|
-
Manifests: {}
|
|
49
|
+
Manifests: {},
|
|
50
50
|
};
|
|
51
51
|
|
|
52
|
-
class
|
|
52
|
+
class viewRecordSetListHeaderList extends libPictView
|
|
53
53
|
{
|
|
54
54
|
constructor(pFable, pOptions, pServiceHash)
|
|
55
55
|
{
|
|
56
|
-
let tmpOptions = Object.assign({},
|
|
56
|
+
let tmpOptions = Object.assign({}, _DEFAULT_CONFIGURATION_Dashboard_HeaderList, pOptions);
|
|
57
57
|
super(pFable, tmpOptions, pServiceHash);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
module.exports =
|
|
61
|
+
module.exports = viewRecordSetListHeaderList;
|
|
62
62
|
|
|
63
|
-
module.exports.default_configuration =
|
|
63
|
+
module.exports.default_configuration = _DEFAULT_CONFIGURATION_Dashboard_HeaderList;
|
|
64
64
|
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
const libPictView = require('pict-view');
|
|
2
|
+
|
|
3
|
+
/** @type {Record<string, any>} */
|
|
4
|
+
const _DEFAULT_CONFIGURATION_List_PaginationBottom = (
|
|
5
|
+
{
|
|
6
|
+
ViewIdentifier: 'PRSP-Dashboard-PaginationBottom',
|
|
7
|
+
|
|
8
|
+
DefaultRenderable: 'PRSP_Renderable_PaginationBottom',
|
|
9
|
+
DefaultDestinationAddress: '#PRSP_PaginationBottom_Container',
|
|
10
|
+
DefaultTemplateRecordAddress: false,
|
|
11
|
+
|
|
12
|
+
// If this is set to true, when the App initializes this will.
|
|
13
|
+
// While the App initializes, initialize will be called.
|
|
14
|
+
AutoInitialize: false,
|
|
15
|
+
AutoInitializeOrdinal: 0,
|
|
16
|
+
|
|
17
|
+
// If this is set to true, when the App autorenders (on load) this will.
|
|
18
|
+
// After the App initializes, render will be called.
|
|
19
|
+
AutoRender: false,
|
|
20
|
+
AutoRenderOrdinal: 0,
|
|
21
|
+
|
|
22
|
+
AutoSolveWithApp: false,
|
|
23
|
+
AutoSolveOrdinal: 0,
|
|
24
|
+
|
|
25
|
+
CSS: false,
|
|
26
|
+
CSSPriority: 500,
|
|
27
|
+
|
|
28
|
+
Templates:
|
|
29
|
+
[
|
|
30
|
+
{
|
|
31
|
+
Hash: 'PRSP-Dashboard-PaginationBottom-Template',
|
|
32
|
+
Template: /*html*/`
|
|
33
|
+
<!-- DefaultPackage pict view template: [PRSP-Dashboard-PaginationBottom-Template] -->
|
|
34
|
+
<nav id="RSP_Lower_Pagination_Container">
|
|
35
|
+
{~T:PRSP-Dashboard-Pagination-Template-Description~}
|
|
36
|
+
{~T:PRSP-Dashboard-Pagination-Template-Buttons~}
|
|
37
|
+
</nav>
|
|
38
|
+
<!-- DefaultPackage end view template: [PRSP-Dashboard-PaginationBottom-Template] -->
|
|
39
|
+
`
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
|
|
43
|
+
Renderables:
|
|
44
|
+
[
|
|
45
|
+
{
|
|
46
|
+
RenderableHash: 'PRSP_Renderable_PaginationBottom',
|
|
47
|
+
TemplateHash: 'PRSP-Dashboard-PaginationBottom-Template',
|
|
48
|
+
DestinationAddress: '#PRSP_PaginationBottom_Container',
|
|
49
|
+
RenderMethod: 'replace'
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
|
|
53
|
+
Manifests: {}
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
class viewRecordSetListPaginationBottom extends libPictView
|
|
57
|
+
{
|
|
58
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
59
|
+
{
|
|
60
|
+
let tmpOptions = Object.assign({}, _DEFAULT_CONFIGURATION_List_PaginationBottom, pOptions);
|
|
61
|
+
super(pFable, tmpOptions, pServiceHash);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
module.exports = viewRecordSetListPaginationBottom;
|
|
66
|
+
|
|
67
|
+
module.exports.default_configuration = _DEFAULT_CONFIGURATION_List_PaginationBottom;
|
|
68
|
+
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
const libPictView = require('pict-view');
|
|
2
|
+
|
|
3
|
+
/** @type {Record<string, any>} */
|
|
4
|
+
const _DEFAULT_CONFIGURATION_List_PaginationTop = (
|
|
5
|
+
{
|
|
6
|
+
ViewIdentifier: 'PRSP-Dashboard-PaginationTop',
|
|
7
|
+
|
|
8
|
+
DefaultRenderable: 'PRSP_Renderable_PaginationTop',
|
|
9
|
+
DefaultDestinationAddress: '#PRSP_PaginationTop_Container',
|
|
10
|
+
DefaultTemplateRecordAddress: false,
|
|
11
|
+
|
|
12
|
+
// If this is set to true, when the App initializes this will.
|
|
13
|
+
// While the App initializes, initialize will be called.
|
|
14
|
+
AutoInitialize: false,
|
|
15
|
+
AutoInitializeOrdinal: 0,
|
|
16
|
+
|
|
17
|
+
// If this is set to true, when the App autorenders (on load) this will.
|
|
18
|
+
// After the App initializes, render will be called.
|
|
19
|
+
AutoRender: false,
|
|
20
|
+
AutoRenderOrdinal: 0,
|
|
21
|
+
|
|
22
|
+
AutoSolveWithApp: false,
|
|
23
|
+
AutoSolveOrdinal: 0,
|
|
24
|
+
|
|
25
|
+
CSS: false,
|
|
26
|
+
CSSPriority: 500,
|
|
27
|
+
|
|
28
|
+
Templates:
|
|
29
|
+
[
|
|
30
|
+
{
|
|
31
|
+
Hash: 'PRSP-Dashboard-PaginationTop-Template',
|
|
32
|
+
Template: /*html*/`
|
|
33
|
+
<!-- DefaultPackage pict view template: [PRSP-Dashboard-PaginationTop-Template] -->
|
|
34
|
+
<nav id="RSP_Upper_Pagination_Container" role="navigation" aria-label="pagination">
|
|
35
|
+
{~T:PRSP-Dashboard-Pagination-Template-Description~}
|
|
36
|
+
{~T:PRSP-Dashboard-Pagination-Template-Buttons~}
|
|
37
|
+
</nav>
|
|
38
|
+
<div>
|
|
39
|
+
{~TS:PRSP-Dashboard-Pagination-Template-Pages:Record.PageLinksLimited~}
|
|
40
|
+
</div>
|
|
41
|
+
<!-- DefaultPackage end view template: [PRSP-Dashboard-PaginationTop-Template] -->
|
|
42
|
+
`
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
Hash: 'PRSP-Dashboard-Pagination-Template-Description',
|
|
46
|
+
Template: /*html*/`
|
|
47
|
+
<!-- DefaultPackage pict view template: [PRSP-Dashboard-Pagination-Template-Description] -->
|
|
48
|
+
<div>
|
|
49
|
+
Showing
|
|
50
|
+
<span id="PRSP_Pagination_Description_Records_Start">{~D:Record.Offset~}</span> to
|
|
51
|
+
<span id="PRSP_Pagination_Description_Records_End">{~D:Record.PageEnd~}</span> of
|
|
52
|
+
<span id="PRSP_Pagination_Description_Records_Total">{~D:Record.TotalRecordCount.Count~}</span> total records.
|
|
53
|
+
</div>
|
|
54
|
+
<!-- DefaultPackage end view template: [PRSP-Dashboard-Pagination-Template-Description] -->
|
|
55
|
+
`
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
Hash: 'PRSP-Dashboard-Pagination-Template-Buttons',
|
|
59
|
+
Template: /*html*/`
|
|
60
|
+
<!-- DefaultPackage pict view template: [PRSP-Dashboard-Pagination-Template-Buttons] -->
|
|
61
|
+
<ul style="list-style-type: none; padding: 0; display: flex; justify-content: center;">
|
|
62
|
+
{~TIfAbs:PRSP-Dashboard-Pagination-Template-Button-Previous:Record:Record.PageLinkBookmarks.ShowPreviousLink^TRUE^true~}
|
|
63
|
+
{~TS:PRSP-Dashboard-Pagination-Template-Button-Page~}
|
|
64
|
+
{~TIfAbs:PRSP-Dashboard-Pagination-Template-Button-Next:Record:Record.PageLinkBookmarks.ShowNextLink^TRUE^true~}
|
|
65
|
+
</ul>
|
|
66
|
+
<!-- DefaultPackage end view template: [PRSP-Dashboard-Pagination-Template-Buttons] -->
|
|
67
|
+
`
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
Hash: 'PRSP-Dashboard-Pagination-Template-Button-Previous',
|
|
71
|
+
Template: /*html*/`
|
|
72
|
+
<!-- DefaultPackage pict view template: [PRSP-Dashboard-Pagination-Template-Button-Previous] -->
|
|
73
|
+
<li><a href="{~D:Record.PageLinkBookmarks.PreviousLink.URL~}" aria-label="Previous page">« Previous</a></li>
|
|
74
|
+
<!-- DefaultPackage end view template: [PRSP-Dashboard-Pagination-Template-Button-Previous] -->
|
|
75
|
+
`
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
Hash: 'PRSP-Dashboard-Pagination-Template-Button-Next',
|
|
79
|
+
Template: /*html*/`
|
|
80
|
+
<!-- DefaultPackage pict view template: [PRSP-Dashboard-Pagination-Template-Button-Next] -->
|
|
81
|
+
<li style="margin-left: 15px;"><a href="{~D:Record.PageLinkBookmarks.NextLink.URL~}" aria-label="Next page">Next »</a></li>
|
|
82
|
+
<!-- DefaultPackage end view template: [PRSP-Dashboard-Pagination-Template-Button-Next] -->
|
|
83
|
+
`
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
Hash: 'PRSP-Dashboard-Pagination-Template-Button-Page',
|
|
87
|
+
Template: /*html*/`
|
|
88
|
+
<!-- DefaultPackage pict view template: [PRSP-Dashboard-Pagination-Template-Button-Page] -->
|
|
89
|
+
<li><a href="#" aria-label="Go to page {~D:Record.Page~}">{~D:Record.Page~}</a></li>
|
|
90
|
+
<!-- DefaultPackage end view template: [PRSP-Dashboard-Pagination-Template-Button-Page] -->
|
|
91
|
+
`
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
Hash: 'PRSP-Dashboard-Pagination-Template-Pages',
|
|
95
|
+
Template: /*html*/`
|
|
96
|
+
<!-- DefaultPackage pict view template: [PRSP-Dashboard-Pagination-Template-Button-Pages] -->
|
|
97
|
+
<a href="{~D:Record.URL~}" aria-label="Go to page {~D:Record.Page~}" class="page-offset_{~D:Record.RelativeOffset~}">{~D:Record.Page~}</a>
|
|
98
|
+
<!-- DefaultPackage end view template: [PRSP-Dashboard-Pagination-Template-Button-Pages] -->
|
|
99
|
+
`
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
|
|
103
|
+
Renderables:
|
|
104
|
+
[
|
|
105
|
+
{
|
|
106
|
+
RenderableHash: 'PRSP_Renderable_PaginationTop',
|
|
107
|
+
TemplateHash: 'PRSP-Dashboard-PaginationTop-Template',
|
|
108
|
+
DestinationAddress: '#PRSP_PaginationTop_Container',
|
|
109
|
+
RenderMethod: 'replace'
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
|
|
113
|
+
Manifests: {}
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
class viewRecordSetListPaginationTop extends libPictView
|
|
117
|
+
{
|
|
118
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
119
|
+
{
|
|
120
|
+
let tmpOptions = Object.assign({}, _DEFAULT_CONFIGURATION_List_PaginationTop, pOptions);
|
|
121
|
+
super(pFable, tmpOptions, pServiceHash);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
module.exports = viewRecordSetListPaginationTop;
|
|
126
|
+
|
|
127
|
+
module.exports.default_configuration = _DEFAULT_CONFIGURATION_List_PaginationTop;
|
|
128
|
+
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
const libPictView = require('pict-view');
|
|
2
|
+
|
|
3
|
+
/** @type {Record<string, any>} */
|
|
4
|
+
const _DEFAULT_CONFIGURATION_List_RecordList =
|
|
5
|
+
{
|
|
6
|
+
ViewIdentifier: 'PRSP-Dashboard-RecordList',
|
|
7
|
+
|
|
8
|
+
DefaultRenderable: 'PRSP_Renderable_RecordList',
|
|
9
|
+
DefaultDestinationAddress: '#PRSP_RecordList_Container',
|
|
10
|
+
DefaultTemplateRecordAddress: false,
|
|
11
|
+
|
|
12
|
+
// If this is set to true, when the App initializes this will.
|
|
13
|
+
// While the App initializes, initialize will be called.
|
|
14
|
+
AutoInitialize: false,
|
|
15
|
+
AutoInitializeOrdinal: 0,
|
|
16
|
+
|
|
17
|
+
// If this is set to true, when the App autorenders (on load) this will.
|
|
18
|
+
// After the App initializes, render will be called.
|
|
19
|
+
AutoRender: false,
|
|
20
|
+
AutoRenderOrdinal: 0,
|
|
21
|
+
|
|
22
|
+
AutoSolveWithApp: false,
|
|
23
|
+
AutoSolveOrdinal: 0,
|
|
24
|
+
|
|
25
|
+
CSS: false,
|
|
26
|
+
CSSPriority: 500,
|
|
27
|
+
|
|
28
|
+
Templates:
|
|
29
|
+
[
|
|
30
|
+
{
|
|
31
|
+
Hash: 'PRSP-Dashboard-RecordList-Template',
|
|
32
|
+
Template: /*html*/`
|
|
33
|
+
<!-- DefaultPackage pict view template: [PRSP-Dashboard-RecordList-Template] -->
|
|
34
|
+
<section id="PRSP_List_Container">
|
|
35
|
+
{~T:PRSP-Dashboard-RecordList-Template-Table~}
|
|
36
|
+
</section>
|
|
37
|
+
<!-- DefaultPackage end view template: [PRSP-Dashboard-RecordList-Template] -->
|
|
38
|
+
`
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
Hash: 'PRSP-Dashboard-RecordList-Template-Table',
|
|
42
|
+
Template: /*html*/`
|
|
43
|
+
<!-- DefaultPackage pict view template: [PRSP-Dashboard-RecordList-Template-Table] -->
|
|
44
|
+
<table id="PRSP_List_Table" tablespacing="0" cellpadding="0" cellspacing="0" style="width: 100%; border-collapse: collapse; margin-bottom: 20px;">
|
|
45
|
+
<thead>{~T:PRSP-Dashboard-RecordListHeader-Template~}</thead>
|
|
46
|
+
<tbody id="PRSP_RecordList_Container_Entries">
|
|
47
|
+
{~T:PRSP-Dashboard-RecordListEntry-Template~}
|
|
48
|
+
</tbody>
|
|
49
|
+
</table>
|
|
50
|
+
<!-- DefaultPackage end view template: [PRSP-Dashboard-RecordList-Template-Table] -->
|
|
51
|
+
`
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
|
|
55
|
+
Renderables:
|
|
56
|
+
[
|
|
57
|
+
{
|
|
58
|
+
RenderableHash: 'PRSP_Renderable_RecordList',
|
|
59
|
+
TemplateHash: 'PRSP-Dashboard-RecordList-Template',
|
|
60
|
+
DestinationAddress: '#PRSP_RecordList_Container',
|
|
61
|
+
RenderMethod: 'replace'
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
|
|
65
|
+
Manifests: {}
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
class viewRecordSetListRecordList extends libPictView
|
|
69
|
+
{
|
|
70
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
71
|
+
{
|
|
72
|
+
let tmpOptions = Object.assign({}, _DEFAULT_CONFIGURATION_List_RecordList, pOptions);
|
|
73
|
+
super(pFable, tmpOptions, pServiceHash);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
module.exports = viewRecordSetListRecordList;
|
|
78
|
+
|
|
79
|
+
module.exports.default_configuration = _DEFAULT_CONFIGURATION_List_RecordList;
|
|
80
|
+
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
const libPictView = require('pict-view');
|
|
2
|
+
|
|
3
|
+
/** @type {Record<string, any>} */
|
|
4
|
+
const _DEFAULT_CONFIGURATION_List_RecordListEntry = (
|
|
5
|
+
{
|
|
6
|
+
ViewIdentifier: 'PRSP-Dashboard-RecordListEntry',
|
|
7
|
+
|
|
8
|
+
DefaultRenderable: 'PRSP_Renderable_RecordListEntry',
|
|
9
|
+
DefaultDestinationAddress: '#PRSP_RecordListEntry_Container',
|
|
10
|
+
DefaultTemplateRecordAddress: false,
|
|
11
|
+
|
|
12
|
+
// If this is set to true, when the App initializes this will.
|
|
13
|
+
// While the App initializes, initialize will be called.
|
|
14
|
+
AutoInitialize: false,
|
|
15
|
+
AutoInitializeOrdinal: 0,
|
|
16
|
+
|
|
17
|
+
// If this is set to true, when the App autorenders (on load) this will.
|
|
18
|
+
// After the App initializes, render will be called.
|
|
19
|
+
AutoRender: false,
|
|
20
|
+
AutoRenderOrdinal: 0,
|
|
21
|
+
|
|
22
|
+
AutoSolveWithApp: false,
|
|
23
|
+
AutoSolveOrdinal: 0,
|
|
24
|
+
|
|
25
|
+
CSS: false,
|
|
26
|
+
CSSPriority: 500,
|
|
27
|
+
|
|
28
|
+
Templates:
|
|
29
|
+
[
|
|
30
|
+
{
|
|
31
|
+
// TODO: Add extras template here; it's in the header but not here yet.
|
|
32
|
+
Hash: 'PRSP-Dashboard-RecordListEntry-Template',
|
|
33
|
+
Template: /*html*/`
|
|
34
|
+
{~TSWP:PRSP-Dashboard-RecordListEntry-Template-Row:Record.Records.Records:Record~}
|
|
35
|
+
`
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
Hash: 'PRSP-Dashboard-RecordListEntry-Template-Row',
|
|
39
|
+
Template: /*html*/`
|
|
40
|
+
<!-- DefaultPackage pict view template: [PRSP-Dashboard-RecordListEntry-Template] -->
|
|
41
|
+
<tr>
|
|
42
|
+
{~TSWP:PRSP-Dashboard-RecordListEntry-Template-Row-Cell:Record.Payload.TableCells:Record.Data~}
|
|
43
|
+
{~T:PRSP-Dashboard-RecordListHeader-Template-Extra-Row~}
|
|
44
|
+
{~T:PRSP-Dashboard-RecordListAction-Template-Cell~}
|
|
45
|
+
</tr>
|
|
46
|
+
<!-- DefaultPackage end view template: [PRSP-Dashboard-RecordListEntry-Template] -->
|
|
47
|
+
`
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
Hash: 'PRSP-Dashboard-RecordListHeader-Template-Extra-Row',
|
|
51
|
+
Template: /*html*/`
|
|
52
|
+
<!-- DefaultPackage pict view template: [PRSP-Dashboard-RecordListHeader-Template-Extra-Row] -->
|
|
53
|
+
{~TBR:Record.Payload.RecordSetConfiguration.RecordSetListExtraColumnRowTemplateHash~}
|
|
54
|
+
<!-- DefaultPackage end view template: [PRSP-Dashboard-RecordListHeader-Extra-Row] -->
|
|
55
|
+
`
|
|
56
|
+
// {~TBR:Record.Payload.RecordSetConfiguration.RecordSetListExtraColumnRowTemplateHash~}
|
|
57
|
+
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
Hash: 'PRSP-Dashboard-RecordListEntry-Template-Row-Cell',
|
|
61
|
+
Template: /*html*/`
|
|
62
|
+
<td style="border-bottom: 1px solid #ccc; padding: 5px;">
|
|
63
|
+
{~DVBK:Record.Payload:Record.Data.Key~}
|
|
64
|
+
</td>
|
|
65
|
+
`
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
Hash: 'PRSP-Dashboard-RecordListEntry-Template-Entry-Cell-Datum',
|
|
69
|
+
Template: /*html*/`
|
|
70
|
+
<!-- DefaultPackage pict view template: [PRSP-Dashboard-RecordListEntry-Template-Entry-Cell-Datum] -->
|
|
71
|
+
`
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
Hash: 'PRSP-Dashboard-RecordListAction-Template-Cell',
|
|
75
|
+
// FIXME: Needs a better way of getting the appropriate link templates in (likely requiring piping the RecordSet to the link manager)
|
|
76
|
+
Template: /*html*/`
|
|
77
|
+
<td style="border-bottom: 1px solid #ccc; padding: 5px;">
|
|
78
|
+
<ul>
|
|
79
|
+
{~TSWP:PRSP-Dashboard-RecordListAction-Template-Cell-Datum:Pict.providers.RecordSetLinkManager.linkTemplates:Record~}
|
|
80
|
+
</ul>
|
|
81
|
+
</td>
|
|
82
|
+
`
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
Hash: 'PRSP-Dashboard-RecordListAction-Template-Cell-Datum',
|
|
86
|
+
// These use the new TemplateByReference template expression, which uses the values in these addresses to lookup the template hash then renders those template with the current Record state.
|
|
87
|
+
// This is part one of refactoring to include metatemplate resolution ase a core behavior pict itself rather than a pict-section-form capability
|
|
88
|
+
Template: /*html*/`
|
|
89
|
+
<li><a href="{~TBR:Record.Data.URL~}">{~TBR:Record.Data.Name~}</a></li>
|
|
90
|
+
`
|
|
91
|
+
// {~Breakpoint~}
|
|
92
|
+
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
|
|
96
|
+
Renderables:
|
|
97
|
+
[
|
|
98
|
+
{
|
|
99
|
+
RenderableHash: 'PRSP_Renderable_RecordListEntry',
|
|
100
|
+
TemplateHash: 'PRSP-Dashboard-RecordListEntry-Template',
|
|
101
|
+
DestinationAddress: '#PRSP_RecordListEntry_Container',
|
|
102
|
+
RenderMethod: 'replace'
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
|
|
106
|
+
Manifests: {}
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
class viewRecordSetListRecordListEntry extends libPictView
|
|
110
|
+
{
|
|
111
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
112
|
+
{
|
|
113
|
+
let tmpOptions = Object.assign({}, _DEFAULT_CONFIGURATION_List_RecordListEntry, pOptions);
|
|
114
|
+
super(pFable, tmpOptions, pServiceHash);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
module.exports = viewRecordSetListRecordListEntry;
|
|
119
|
+
|
|
120
|
+
module.exports.default_configuration = _DEFAULT_CONFIGURATION_List_RecordListEntry;
|
|
121
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
const libPictView = require('pict-view');
|
|
2
|
+
|
|
3
|
+
/** @type {Record<string, any>} */
|
|
4
|
+
const _DEFAULT_CONFIGURATION_List_RecordListHeader = (
|
|
5
|
+
{
|
|
6
|
+
ViewIdentifier: 'PRSP-Dashboard-RecordListHeader',
|
|
7
|
+
|
|
8
|
+
DefaultRenderable: 'PRSP_Renderable_RecordListHeader',
|
|
9
|
+
DefaultDestinationAddress: '#PRSP_RecordListHeader_Container',
|
|
10
|
+
DefaultTemplateRecordAddress: false,
|
|
11
|
+
|
|
12
|
+
// If this is set to true, when the App initializes this will.
|
|
13
|
+
// While the App initializes, initialize will be called.
|
|
14
|
+
AutoInitialize: false,
|
|
15
|
+
AutoInitializeOrdinal: 0,
|
|
16
|
+
|
|
17
|
+
// If this is set to true, when the App autorenders (on load) this will.
|
|
18
|
+
// After the App initializes, render will be called.
|
|
19
|
+
AutoRender: false,
|
|
20
|
+
AutoRenderOrdinal: 0,
|
|
21
|
+
|
|
22
|
+
AutoSolveWithApp: false,
|
|
23
|
+
AutoSolveOrdinal: 0,
|
|
24
|
+
|
|
25
|
+
CSS: false,
|
|
26
|
+
CSSPriority: 500,
|
|
27
|
+
|
|
28
|
+
Templates:
|
|
29
|
+
[
|
|
30
|
+
{
|
|
31
|
+
Hash: 'PRSP-Dashboard-RecordListHeader-Template',
|
|
32
|
+
Template: /*html*/`
|
|
33
|
+
<!-- DefaultPackage pict view template: [PRSP-Dashboard-RecordListHeader-Template] -->
|
|
34
|
+
<tr>
|
|
35
|
+
{~TS:PRSP-Dashboard-RecordListHeader-Template-Header:Record.TableCells~}
|
|
36
|
+
{~T:PRSP-Dashboard-RecordListHeader-Template-Extra-Header~}
|
|
37
|
+
{~T:PRSP-Dashboard-RecordListActions-Template-Header~}
|
|
38
|
+
</tr>
|
|
39
|
+
<!-- DefaultPackage end view template: [PRSP-Dashboard-RecordListHeader-Template] -->
|
|
40
|
+
`
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
Hash: 'PRSP-Dashboard-RecordListHeader-Template-Header',
|
|
44
|
+
Template: /*html*/`
|
|
45
|
+
<!-- DefaultPackage pict view template: [PRSP-Dashboard-RecordListHeader-Template-Header] -->
|
|
46
|
+
<th style="border-bottom: 1px solid #ccc; padding: 5px; background-color: #f2f2f2; color: #333;">
|
|
47
|
+
{~D:Record.DisplayName~}
|
|
48
|
+
</th>
|
|
49
|
+
<!-- DefaultPackage end view template: [PRSP-Dashboard-RecordListHeader-Template-Header] -->
|
|
50
|
+
`
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
Hash: 'PRSP-Dashboard-RecordListHeader-Template-Extra-Header',
|
|
54
|
+
Template: /*html*/`
|
|
55
|
+
<!-- DefaultPackage pict view template: [PRSP-Dashboard-RecordListHeader-Template-Extra-Header] -->
|
|
56
|
+
{~TBR:Record.RecordSetConfiguration.RecordSetListExtraColumnsHeaderTemplateHash~}
|
|
57
|
+
<!-- DefaultPackage end view template: [PRSP-Dashboard-RecordListHeader-Extra-Header] -->
|
|
58
|
+
`
|
|
59
|
+
// {~TBR:Record.RecordSetConfiguration.RecordSetListExtraColumnsHeaderTemplateHash~}
|
|
60
|
+
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
Hash: 'PRSP-Dashboard-RecordListActions-Template-Header',
|
|
64
|
+
Template: /*html*/`
|
|
65
|
+
<!-- DefaultPackage pict view template: [PRSP-Dashboard-RecordListActions-Template-Header] -->
|
|
66
|
+
<th style="border-bottom: 1px solid #ccc; padding: 5px; background-color: #f2f2f2; color: #333;">
|
|
67
|
+
Actions
|
|
68
|
+
</th>
|
|
69
|
+
<!-- DefaultPackage end view template: [PRSP-Dashboard-RecordListActions-Template-Header] -->
|
|
70
|
+
`
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
|
|
74
|
+
Renderables:
|
|
75
|
+
[
|
|
76
|
+
{
|
|
77
|
+
RenderableHash: 'PRSP_Renderable_RecordListHeader',
|
|
78
|
+
TemplateHash: 'PRSP-Dashboard-RecordListHeader-Template',
|
|
79
|
+
DestinationAddress: '#PRSP_RecordListHeader_Container',
|
|
80
|
+
RenderMethod: 'replace'
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
|
|
84
|
+
Manifests: {}
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
class viewRecordSetListRecordListHeader extends libPictView
|
|
88
|
+
{
|
|
89
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
90
|
+
{
|
|
91
|
+
let tmpOptions = Object.assign({}, _DEFAULT_CONFIGURATION_List_RecordListHeader, pOptions);
|
|
92
|
+
super(pFable, tmpOptions, pServiceHash);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
module.exports = viewRecordSetListRecordListHeader;
|
|
97
|
+
|
|
98
|
+
module.exports.default_configuration = _DEFAULT_CONFIGURATION_List_RecordListHeader;
|
|
99
|
+
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
const libPictView = require('pict-view');
|
|
2
|
+
|
|
3
|
+
/** @type {Record<string, any>} */
|
|
4
|
+
const _DEFAULT_CONFIGURATION_List_Title =
|
|
5
|
+
{
|
|
6
|
+
ViewIdentifier: 'PRSP-Dashboard-Title',
|
|
7
|
+
|
|
8
|
+
DefaultRenderable: 'PRSP_Renderable_Title',
|
|
9
|
+
DefaultDestinationAddress: '#PRSP_Title_Container',
|
|
10
|
+
DefaultTemplateRecordAddress: false,
|
|
11
|
+
|
|
12
|
+
// If this is set to true, when the App initializes this will.
|
|
13
|
+
// While the App initializes, initialize will be called.
|
|
14
|
+
AutoInitialize: false,
|
|
15
|
+
AutoInitializeOrdinal: 0,
|
|
16
|
+
|
|
17
|
+
// If this is set to true, when the App autorenders (on load) this will.
|
|
18
|
+
// After the App initializes, render will be called.
|
|
19
|
+
AutoRender: false,
|
|
20
|
+
AutoRenderOrdinal: 0,
|
|
21
|
+
|
|
22
|
+
AutoSolveWithApp: false,
|
|
23
|
+
AutoSolveOrdinal: 0,
|
|
24
|
+
|
|
25
|
+
CSS: false,
|
|
26
|
+
CSSPriority: 500,
|
|
27
|
+
|
|
28
|
+
Templates:
|
|
29
|
+
[
|
|
30
|
+
{
|
|
31
|
+
Hash: 'PRSP-Dashboard-Title-Template',
|
|
32
|
+
Template: /*html*/`
|
|
33
|
+
<!-- DefaultPackage pict view template: [PRSP-Dashboard-Title-Template] -->
|
|
34
|
+
<header id="PRSP_Title_Container">
|
|
35
|
+
<h1 id="PRSP_Title">{~D:Record.Title~}</h1>
|
|
36
|
+
<h2 id="PRSP_Subtitle">{~D:Record.Subtitle~}</h2>
|
|
37
|
+
</header>
|
|
38
|
+
<!-- DefaultPackage end view template: [PRSP-Dashboard-Title-Template] -->
|
|
39
|
+
`
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
|
|
43
|
+
Renderables:
|
|
44
|
+
[
|
|
45
|
+
{
|
|
46
|
+
RenderableHash: 'PRSP_Renderable_Title',
|
|
47
|
+
TemplateHash: 'PRSP-Dashboard-Title-Template',
|
|
48
|
+
DestinationAddress: '#PRSP_Title_Container',
|
|
49
|
+
RenderMethod: 'replace'
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
|
|
53
|
+
Manifests: {},
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
class viewRecordSetListTitle extends libPictView
|
|
57
|
+
{
|
|
58
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
59
|
+
{
|
|
60
|
+
let tmpOptions = Object.assign({}, _DEFAULT_CONFIGURATION_List_Title, pOptions);
|
|
61
|
+
super(pFable, tmpOptions, pServiceHash);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
module.exports = viewRecordSetListTitle;
|
|
66
|
+
|
|
67
|
+
module.exports.default_configuration = _DEFAULT_CONFIGURATION_List_Title;
|