pict-section-recordset 1.0.0 → 1.0.2
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/.vscode/launch.json +46 -0
- package/debug/Harness.js +0 -7
- package/example_applications/ServeExamples.js +1 -1
- package/example_applications/mocks/book-edit-view.html +145 -0
- package/example_applications/mocks/book-read-view.html +139 -0
- package/example_applications/mocks/list-view.html +125 -0
- package/example_applications/simple_entity/Simple-RecordSet-Application.js +33 -27
- package/example_applications/simple_entity/html/index.html +3 -3
- package/package.json +12 -8
- package/source/Pict-Section-RecordSet.js +6 -2
- package/source/application/Pict-Application-RecordSet.js +23 -4
- package/source/providers/RecordSet-RecordProvider-Base.js +217 -0
- package/source/providers/RecordSet-RecordProvider-MeadowEndpoints.js +339 -0
- package/source/providers/RecordSet-Router.js +64 -0
- package/source/services/RecordsSet-MetaController.js +268 -0
- package/source/views/RecordSet-Filter.js +91 -0
- package/source/views/RecordSet-RecordBaseView.js +84 -0
- package/source/views/RecordsSet-MacroView.js +63 -0
- package/source/views/dashboard/RecordSet-Dashboard-HeaderDashboard.js +63 -0
- package/source/views/dashboard/RecordSet-Dashboard-RecordSetDashboard.js +63 -0
- package/source/views/dashboard/RecordSet-Dashboard-TabBarDashboard.js +63 -0
- package/source/views/dashboard/RecordSet-Dashboard.js +63 -0
- package/source/views/edit/RecordSet-Edit-HeaderEdit.js +63 -0
- package/source/views/edit/RecordSet-Edit-RecordEdit.js +63 -0
- package/source/views/edit/RecordSet-Edit-RecordEditControls.js +63 -0
- package/source/views/edit/RecordSet-Edit-RecordEditExtra.js +63 -0
- package/source/views/edit/RecordSet-Edit-TabBarEdit.js +63 -0
- package/source/views/edit/RecordSet-Edit.js +63 -0
- package/source/views/list/RecordSet-List-HeaderList.js +63 -0
- package/source/views/list/RecordSet-List-PaginationBottom.js +67 -0
- package/source/views/list/RecordSet-List-PaginationTop.js +127 -0
- package/source/views/list/RecordSet-List-RecordList.js +79 -0
- package/source/views/list/RecordSet-List-RecordListEntry.js +86 -0
- package/source/views/list/RecordSet-List-RecordListHeader.js +77 -0
- package/source/views/list/RecordSet-List-Title.js +66 -0
- package/source/views/list/RecordSet-List.js +310 -0
- package/source/views/read/RecordSet-Read-HeaderRead.js +63 -0
- package/source/views/read/RecordSet-Read-RecordRead.js +63 -0
- package/source/views/read/RecordSet-Read-RecordReadExtra.js +63 -0
- package/source/views/read/RecordSet-Read-TabBarRead.js +63 -0
- package/source/views/read/RecordSet-Read.js +162 -0
- package/test/PictSectionRecordSet-Basic_tests.js +6 -2
- package/test/PictSectionRecordSet-RecordProvider-Meadow_tests.js +203 -0
- package/tsconfig.build.json +16 -0
- package/tsconfig.json +1 -1
- package/types/Pict-Section-RecordSet.d.ts +9 -1
- package/types/application/Pict-Application-RecordSet.d.ts +5 -5
- package/types/application/Pict-Application-RecordSet.d.ts.map +1 -1
- package/types/providers/RecordSet-RecordProvider-Base.d.ts +207 -0
- package/types/providers/RecordSet-RecordProvider-Base.d.ts.map +1 -1
- package/types/providers/RecordSet-RecordProvider-MeadowEndpoints.d.ts +100 -0
- package/types/providers/RecordSet-RecordProvider-MeadowEndpoints.d.ts.map +1 -0
- package/types/providers/RecordSet-Router.d.ts +36 -0
- package/types/providers/RecordSet-Router.d.ts.map +1 -0
- package/types/services/RecordsSet-MetaController.d.ts +36 -0
- package/types/services/RecordsSet-MetaController.d.ts.map +1 -0
- package/types/views/RecordSet-Filter.d.ts +34 -0
- package/types/views/RecordSet-Filter.d.ts.map +1 -0
- package/types/views/RecordSet-RecordBaseView.d.ts +49 -0
- package/types/views/RecordSet-RecordBaseView.d.ts.map +1 -0
- package/types/views/RecordsSet-MacroView.d.ts +34 -0
- package/types/views/RecordsSet-MacroView.d.ts.map +1 -0
- package/types/views/dashboard/RecordSet-Dashboard-HeaderDashboard.d.ts +34 -0
- package/types/views/dashboard/RecordSet-Dashboard-HeaderDashboard.d.ts.map +1 -0
- package/types/views/dashboard/RecordSet-Dashboard-RecordSetDashboard.d.ts +34 -0
- package/types/views/dashboard/RecordSet-Dashboard-RecordSetDashboard.d.ts.map +1 -0
- package/types/views/dashboard/RecordSet-Dashboard-TabBarDashboard.d.ts +34 -0
- package/types/views/dashboard/RecordSet-Dashboard-TabBarDashboard.d.ts.map +1 -0
- package/types/views/dashboard/RecordSet-Dashboard.d.ts +33 -0
- package/types/views/dashboard/RecordSet-Dashboard.d.ts.map +1 -0
- package/types/views/edit/RecordSet-Edit-HeaderEdit.d.ts +34 -0
- package/types/views/edit/RecordSet-Edit-HeaderEdit.d.ts.map +1 -0
- package/types/views/edit/RecordSet-Edit-RecordEdit.d.ts +34 -0
- package/types/views/edit/RecordSet-Edit-RecordEdit.d.ts.map +1 -0
- package/types/views/edit/RecordSet-Edit-RecordEditControls.d.ts +34 -0
- package/types/views/edit/RecordSet-Edit-RecordEditControls.d.ts.map +1 -0
- package/types/views/edit/RecordSet-Edit-RecordEditExtra.d.ts +34 -0
- package/types/views/edit/RecordSet-Edit-RecordEditExtra.d.ts.map +1 -0
- package/types/views/edit/RecordSet-Edit-TabBarEdit.d.ts +34 -0
- package/types/views/edit/RecordSet-Edit-TabBarEdit.d.ts.map +1 -0
- package/types/views/edit/RecordSet-Edit.d.ts +33 -0
- package/types/views/edit/RecordSet-Edit.d.ts.map +1 -0
- package/types/views/list/RecordSet-List-HeaderList.d.ts +34 -0
- package/types/views/list/RecordSet-List-HeaderList.d.ts.map +1 -0
- package/types/views/list/RecordSet-List-PaginationBottom.d.ts +34 -0
- package/types/views/list/RecordSet-List-PaginationBottom.d.ts.map +1 -0
- package/types/views/list/RecordSet-List-PaginationTop.d.ts +34 -0
- package/types/views/list/RecordSet-List-PaginationTop.d.ts.map +1 -0
- package/types/views/list/RecordSet-List-RecordList.d.ts +34 -0
- package/types/views/list/RecordSet-List-RecordList.d.ts.map +1 -0
- package/types/views/list/RecordSet-List-RecordListEntry.d.ts +34 -0
- package/types/views/list/RecordSet-List-RecordListEntry.d.ts.map +1 -0
- package/types/views/list/RecordSet-List-RecordListHeader.d.ts +34 -0
- package/types/views/list/RecordSet-List-RecordListHeader.d.ts.map +1 -0
- package/types/views/list/RecordSet-List-Title.d.ts +34 -0
- package/types/views/list/RecordSet-List-Title.d.ts.map +1 -0
- package/types/views/list/RecordSet-List.d.ts +47 -0
- package/types/views/list/RecordSet-List.d.ts.map +1 -0
- package/types/views/read/RecordSet-Read-HeaderRead.d.ts +34 -0
- package/types/views/read/RecordSet-Read-HeaderRead.d.ts.map +1 -0
- package/types/views/read/RecordSet-Read-RecordRead.d.ts +34 -0
- package/types/views/read/RecordSet-Read-RecordRead.d.ts.map +1 -0
- package/types/views/read/RecordSet-Read-RecordReadExtra.d.ts +34 -0
- package/types/views/read/RecordSet-Read-RecordReadExtra.d.ts.map +1 -0
- package/types/views/read/RecordSet-Read-TabBarRead.d.ts +34 -0
- package/types/views/read/RecordSet-Read-TabBarRead.d.ts.map +1 -0
- package/types/views/read/RecordSet-Read.d.ts +44 -0
- package/types/views/read/RecordSet-Read.d.ts.map +1 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Use IntelliSense to learn about possible attributes.
|
|
3
|
+
// Hover to view descriptions of existing attributes.
|
|
4
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
+
"version": "0.2.0",
|
|
6
|
+
"configurations": [
|
|
7
|
+
{
|
|
8
|
+
"name": "Launch Debug Harness",
|
|
9
|
+
"type": "pwa-node",
|
|
10
|
+
"request": "launch",
|
|
11
|
+
"outputCapture": "std",
|
|
12
|
+
"skipFiles": [
|
|
13
|
+
"<node_internals>/**"
|
|
14
|
+
],
|
|
15
|
+
"program": "${workspaceFolder}/debug/Harness.js",
|
|
16
|
+
"presentation": {
|
|
17
|
+
"hidden": false,
|
|
18
|
+
"group": "",
|
|
19
|
+
"order": 1
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "Mocha Tests",
|
|
24
|
+
"args": [
|
|
25
|
+
"-u",
|
|
26
|
+
"tdd",
|
|
27
|
+
"--timeout",
|
|
28
|
+
"999999",
|
|
29
|
+
"--colors",
|
|
30
|
+
"${workspaceFolder}/test"
|
|
31
|
+
],
|
|
32
|
+
"internalConsoleOptions": "openOnSessionStart",
|
|
33
|
+
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
|
|
34
|
+
"request": "launch",
|
|
35
|
+
"skipFiles": [
|
|
36
|
+
"<node_internals>/**"
|
|
37
|
+
],
|
|
38
|
+
"type": "pwa-node",
|
|
39
|
+
"presentation": {
|
|
40
|
+
"hidden": false,
|
|
41
|
+
"group": "",
|
|
42
|
+
"order": 2
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
package/debug/Harness.js
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
const libParseCSV = require('../utility/csvparser/ParseCSV-Program.js');
|
|
2
|
-
|
|
3
|
-
// This command takes the `TabularManifestCSV.csv` file and imports it into a JSON file
|
|
4
|
-
//libParseCSV.run(['node', 'Harness.js', 'import']);
|
|
5
|
-
// This command takes the `data/MathExampleForm.json` file and injects any sidecare files in the `input_data` folder into the JSON file
|
|
6
|
-
//libParseCSV.run(['node', 'Harness.js', 'inject']);
|
|
7
|
-
libParseCSV.run(['node', 'Harness.js', 'intersect']);
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Example Pict-Section-Form List View </title>
|
|
7
|
+
<style>
|
|
8
|
+
.grid-container {
|
|
9
|
+
display: grid;
|
|
10
|
+
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
|
11
|
+
gap: 10px;
|
|
12
|
+
}
|
|
13
|
+
.grid-item{
|
|
14
|
+
background-color: #f0f0f0;
|
|
15
|
+
padding: 10px;
|
|
16
|
+
text-align: center;
|
|
17
|
+
border: 1px solid #ccc;
|
|
18
|
+
list-style-type: none;
|
|
19
|
+
}
|
|
20
|
+
.grid-item.active {
|
|
21
|
+
background-color: aliceblue
|
|
22
|
+
}
|
|
23
|
+
article {
|
|
24
|
+
padding: 20px;
|
|
25
|
+
border: 1px solid #ccc;
|
|
26
|
+
margin: 10px 0;
|
|
27
|
+
}
|
|
28
|
+
</style>
|
|
29
|
+
</head>
|
|
30
|
+
<body>
|
|
31
|
+
<!-- START Header template -->
|
|
32
|
+
<header id="RSP-Header-Container">
|
|
33
|
+
<!-- START Header-Title template -->
|
|
34
|
+
<input type="text" style="font-size: 24px; margin-top: 20px;" value="Book Title" />
|
|
35
|
+
<br>
|
|
36
|
+
<!-- END Header-Title template -->
|
|
37
|
+
<!-- START Header-Nav template -->
|
|
38
|
+
<nav id="RSP-Header-Nav">
|
|
39
|
+
<ul class="grid-container">
|
|
40
|
+
<li class="grid-item active"><a href="javascript:void(0);" onclick="toggleTabContent(event, 'RSP-Record-Toggleable-Content-1')">Details</a></li>
|
|
41
|
+
<li class="grid-item"><a href="javascript:void(0);" onclick="toggleTabContent(event, 'RSP-Record-Toggleable-Content-2')">Author</a></li>
|
|
42
|
+
<li class="grid-item"><a href="javascript:void(0);" onclick="toggleTabContent(event, 'RSP-Record-Toggleable-Content-3')">Series</a></li>
|
|
43
|
+
</ul>
|
|
44
|
+
</nav>
|
|
45
|
+
<!-- END Header-Nav template -->
|
|
46
|
+
</header>
|
|
47
|
+
<!-- END Header template -->
|
|
48
|
+
|
|
49
|
+
<!-- START Record template -->
|
|
50
|
+
<section id="RSP-Record-Container">
|
|
51
|
+
<!-- START Record Content -->
|
|
52
|
+
<article id="RSP-Record-Toggleable-Content-1">
|
|
53
|
+
<!-- START Record Content-Description template -->
|
|
54
|
+
<br />
|
|
55
|
+
<textarea>Book Description</textarea>
|
|
56
|
+
<br />
|
|
57
|
+
<!-- END Record Content-Description template -->
|
|
58
|
+
<!-- START Record Content-Image template -->
|
|
59
|
+
<img src="image.jpg" alt="Book Image">
|
|
60
|
+
<button type="button" id="RSP-Record-Image-Button">Change Image</button>
|
|
61
|
+
<!-- END Record Content-Image template -->
|
|
62
|
+
<!-- START Record Content-Details template -->
|
|
63
|
+
<h4>Book Metadata:</h4>
|
|
64
|
+
<ul>
|
|
65
|
+
<li><input type="text" value="Info 1" /></li>
|
|
66
|
+
<li><input type="text" value="Info 2" /></li>
|
|
67
|
+
<li><input type="text" value="Info 3" /></li>
|
|
68
|
+
</ul>
|
|
69
|
+
<!-- END Record Content-Details template -->
|
|
70
|
+
</article>
|
|
71
|
+
<!-- END Record Content -->
|
|
72
|
+
|
|
73
|
+
<!-- START Record Content -->
|
|
74
|
+
<article id="RSP-Record-Toggleable-Content-2" style="display:none;">
|
|
75
|
+
<!-- START Record Content-Title template -->
|
|
76
|
+
<input type="text" value="Joined Entity 1 Title" />
|
|
77
|
+
<!-- END Record Content-Title template -->
|
|
78
|
+
<!-- START Record Content-Description template -->
|
|
79
|
+
<br />
|
|
80
|
+
<textarea>Joined Entity 1 Description</textarea>
|
|
81
|
+
<!-- END Record Content-Description template -->
|
|
82
|
+
<!-- START Record Content-Details template -->
|
|
83
|
+
<ul>
|
|
84
|
+
<li><input type="text" value="Detail A" /></li>
|
|
85
|
+
<li><input type="text" value="Detail B" /></li>
|
|
86
|
+
<li><input type="text" value="Detail C" /></li>
|
|
87
|
+
</ul>
|
|
88
|
+
<!-- END Record Content-Details template -->
|
|
89
|
+
</article>
|
|
90
|
+
<!-- END Record Content -->
|
|
91
|
+
|
|
92
|
+
<!-- START Record Content -->
|
|
93
|
+
<article id="RSP-Record-Toggleable-Content-3" style="display:none;">
|
|
94
|
+
<!-- START Record Content-Title template -->
|
|
95
|
+
<input type="text" value="Joined Entity 2 Title" />
|
|
96
|
+
<!-- END Record Content-Title template -->
|
|
97
|
+
<!-- START Record Content-Description template -->
|
|
98
|
+
<br />
|
|
99
|
+
<textarea>Joined Entity 2 Description</textarea>
|
|
100
|
+
<!-- END Record Content-Description template -->
|
|
101
|
+
<!-- START Record Content-Details template -->
|
|
102
|
+
<ul>
|
|
103
|
+
<li><input type="text" value="Detail X" /></li>
|
|
104
|
+
<li><input type="text" value="Detail Y" /></li>
|
|
105
|
+
<li><input type="text" value="Detail Z" /></li>
|
|
106
|
+
</ul>
|
|
107
|
+
<!-- END Record Content-Details template -->
|
|
108
|
+
</article>
|
|
109
|
+
<!-- END Record Content -->
|
|
110
|
+
|
|
111
|
+
</section>
|
|
112
|
+
<!-- END Record template -->
|
|
113
|
+
|
|
114
|
+
<!-- Footer template -->
|
|
115
|
+
<footer id="RSP-Footer-Container">
|
|
116
|
+
<!-- NOTE: slot for additional set actions -->
|
|
117
|
+
<!-- START Record Content-Button template -->
|
|
118
|
+
<button type="button" id="RSP-Record-Button" onclick="window.location='./book-read-view.html'">Save Changes</button>
|
|
119
|
+
<!-- END Record Content-Button template -->
|
|
120
|
+
</footer>
|
|
121
|
+
<!-- END Footer template -->
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
<script>
|
|
125
|
+
function toggleTabContent(event, contentId) {
|
|
126
|
+
// Remove 'active' class from all tabs
|
|
127
|
+
const tabs = document.querySelectorAll('#RSP-Header-Nav .grid-item');
|
|
128
|
+
tabs.forEach(tab => {
|
|
129
|
+
tab.classList.remove('active');
|
|
130
|
+
});
|
|
131
|
+
// Add 'active' class to the clicked tab
|
|
132
|
+
event.currentTarget.parentElement.classList.add('active');
|
|
133
|
+
// Hide all content sections
|
|
134
|
+
const contents = document.querySelectorAll('article[id^="RSP-Record-Toggleable-Content-"]');
|
|
135
|
+
contents.forEach(content => {
|
|
136
|
+
if (content.id === contentId) {
|
|
137
|
+
content.style.display = 'block';
|
|
138
|
+
} else {
|
|
139
|
+
content.style.display = 'none';
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
</script>
|
|
144
|
+
</body>
|
|
145
|
+
</html>
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Example Pict-Section-Form List View </title>
|
|
7
|
+
<style>
|
|
8
|
+
.grid-container {
|
|
9
|
+
display: grid;
|
|
10
|
+
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
|
11
|
+
gap: 10px;
|
|
12
|
+
}
|
|
13
|
+
.grid-item{
|
|
14
|
+
background-color: #f0f0f0;
|
|
15
|
+
padding: 10px;
|
|
16
|
+
text-align: center;
|
|
17
|
+
border: 1px solid #ccc;
|
|
18
|
+
list-style-type: none;
|
|
19
|
+
}
|
|
20
|
+
.grid-item.active {
|
|
21
|
+
background-color: aliceblue
|
|
22
|
+
}
|
|
23
|
+
article {
|
|
24
|
+
padding: 20px;
|
|
25
|
+
border: 1px solid #ccc;
|
|
26
|
+
margin: 10px 0;
|
|
27
|
+
}
|
|
28
|
+
</style>
|
|
29
|
+
</head>
|
|
30
|
+
<body>
|
|
31
|
+
<!-- START Header template -->
|
|
32
|
+
<header id="RSP-Header-Container">
|
|
33
|
+
<!-- START Header-Title template -->
|
|
34
|
+
<h1>Book Title</h1>
|
|
35
|
+
<!-- END Header-Title template -->
|
|
36
|
+
<!-- START Header-Nav template -->
|
|
37
|
+
<nav id="RSP-Header-Nav">
|
|
38
|
+
<ul class="grid-container">
|
|
39
|
+
<li class="grid-item active"><a href="javascript:void(0);" onclick="toggleTabContent(event, 'RSP-Record-Toggleable-Content-1')">Details</a></li>
|
|
40
|
+
<li class="grid-item"><a href="javascript:void(0);" onclick="toggleTabContent(event, 'RSP-Record-Toggleable-Content-2')">Author</a></li>
|
|
41
|
+
<li class="grid-item"><a href="javascript:void(0);" onclick="toggleTabContent(event, 'RSP-Record-Toggleable-Content-3')">Series</a></li>
|
|
42
|
+
</ul>
|
|
43
|
+
</nav>
|
|
44
|
+
<!-- END Header-Nav template -->
|
|
45
|
+
</header>
|
|
46
|
+
<!-- END Header template -->
|
|
47
|
+
|
|
48
|
+
<!-- START Record template -->
|
|
49
|
+
<section id="RSP-Record-Container">
|
|
50
|
+
<!-- START Record Content -->
|
|
51
|
+
<article id="RSP-Record-Toggleable-Content-1">
|
|
52
|
+
<!-- START Record Content-Description template -->
|
|
53
|
+
<p>Book Description</p>
|
|
54
|
+
<!-- END Record Content-Description template -->
|
|
55
|
+
<!-- START Record Content-Image template -->
|
|
56
|
+
<img src="image.jpg" alt="Book Image">
|
|
57
|
+
<!-- END Record Content-Image template -->
|
|
58
|
+
<!-- START Record Content-Details template -->
|
|
59
|
+
<h4>Book Metadata:</h4>
|
|
60
|
+
<ul>
|
|
61
|
+
<li>Info 1</li>
|
|
62
|
+
<li>Info 2</li>
|
|
63
|
+
<li>Info 3</li>
|
|
64
|
+
</ul>
|
|
65
|
+
<!-- END Record Content-Details template -->
|
|
66
|
+
</article>
|
|
67
|
+
<!-- END Record Content -->
|
|
68
|
+
|
|
69
|
+
<!-- START Record Content -->
|
|
70
|
+
<article id="RSP-Record-Toggleable-Content-2" style="display:none;">
|
|
71
|
+
<!-- START Record Content-Title template -->
|
|
72
|
+
<h3>Joined Entity 1 Title</h3>
|
|
73
|
+
<!-- END Record Content-Title template -->
|
|
74
|
+
<!-- START Record Content-Description template -->
|
|
75
|
+
<p>Joined Entity 1 Description</p>
|
|
76
|
+
<!-- END Record Content-Description template -->
|
|
77
|
+
<!-- START Record Content-Details template -->
|
|
78
|
+
<ul>
|
|
79
|
+
<li>Detail A</li>
|
|
80
|
+
<li>Detail B</li>
|
|
81
|
+
<li>Detail C</li>
|
|
82
|
+
</ul>
|
|
83
|
+
<!-- END Record Content-Details template -->
|
|
84
|
+
</article>
|
|
85
|
+
<!-- END Record Content -->
|
|
86
|
+
|
|
87
|
+
<!-- START Record Content -->
|
|
88
|
+
<article id="RSP-Record-Toggleable-Content-3" style="display:none;">
|
|
89
|
+
<!-- START Record Content-Title template -->
|
|
90
|
+
<h3>Joined Entity 2 Title</h3>
|
|
91
|
+
<!-- END Record Content-Title template -->
|
|
92
|
+
<!-- START Record Content-Description template -->
|
|
93
|
+
<p>Joined Entity 2 Description</p>
|
|
94
|
+
<!-- END Record Content-Description template -->
|
|
95
|
+
<!-- START Record Content-Details template -->
|
|
96
|
+
<ul>
|
|
97
|
+
<li>Detail X</li>
|
|
98
|
+
<li>Detail Y</li>
|
|
99
|
+
<li>Detail Z</li>
|
|
100
|
+
</ul>
|
|
101
|
+
<!-- END Record Content-Details template -->
|
|
102
|
+
</article>
|
|
103
|
+
<!-- END Record Content -->
|
|
104
|
+
|
|
105
|
+
</section>
|
|
106
|
+
<!-- END Record template -->
|
|
107
|
+
|
|
108
|
+
<!-- Footer template -->
|
|
109
|
+
<footer id="RSP-Footer-Container">
|
|
110
|
+
<!-- NOTE: slot for additional set actions -->
|
|
111
|
+
<!-- START Record Content-Button template -->
|
|
112
|
+
<button type="button" id="RSP-Record-Button" onclick="window.location='./book-edit-view.html'">Edit Record</button>
|
|
113
|
+
<!-- END Record Content-Button template -->
|
|
114
|
+
</footer>
|
|
115
|
+
<!-- END Footer template -->
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
<script>
|
|
119
|
+
function toggleTabContent(event, contentId) {
|
|
120
|
+
// Remove 'active' class from all tabs
|
|
121
|
+
const tabs = document.querySelectorAll('#RSP-Header-Nav .grid-item');
|
|
122
|
+
tabs.forEach(tab => {
|
|
123
|
+
tab.classList.remove('active');
|
|
124
|
+
});
|
|
125
|
+
// Add 'active' class to the clicked tab
|
|
126
|
+
event.currentTarget.parentElement.classList.add('active');
|
|
127
|
+
// Hide all content sections
|
|
128
|
+
const contents = document.querySelectorAll('article[id^="RSP-Record-Toggleable-Content-"]');
|
|
129
|
+
contents.forEach(content => {
|
|
130
|
+
if (content.id === contentId) {
|
|
131
|
+
content.style.display = 'block';
|
|
132
|
+
} else {
|
|
133
|
+
content.style.display = 'none';
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
</script>
|
|
138
|
+
</body>
|
|
139
|
+
</html>
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Example Pict-Section-Form List View </title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<!-- START Header template -->
|
|
10
|
+
<header id="RSP-Header-Container">
|
|
11
|
+
<!-- START Header-Title template -->
|
|
12
|
+
<h1>Title of Entity</h1>
|
|
13
|
+
<!-- END Header-Title template -->
|
|
14
|
+
<!-- START Header-Subtitle template -->
|
|
15
|
+
<h2>Subtitle of Entity</h2>
|
|
16
|
+
<!-- END Header-Subtitle template -->
|
|
17
|
+
</header>
|
|
18
|
+
<!-- END Header template -->
|
|
19
|
+
|
|
20
|
+
<!-- START Filter template-->
|
|
21
|
+
<section id="RSP-Filter-Container">
|
|
22
|
+
<form id="RSP-Filter-Form">
|
|
23
|
+
<!-- START Filter-Input-Container template -->
|
|
24
|
+
<fieldset>
|
|
25
|
+
<!-- START Filter-Input-Label template -->
|
|
26
|
+
<label for="filter">Filter:</label>
|
|
27
|
+
<!-- END Filter-Input-Label template -->
|
|
28
|
+
<!-- START Filter-Input template -->
|
|
29
|
+
<input type="text" id="filter" name="filter">
|
|
30
|
+
<!-- END Filter-Input template -->
|
|
31
|
+
</fieldset>
|
|
32
|
+
<!-- END Filter-Input-Container template -->
|
|
33
|
+
<!-- START Filter-Button-Container template -->
|
|
34
|
+
<fieldset id="RSP-Filter-Button-Container">
|
|
35
|
+
<!-- START Filter-Button-Reset template -->
|
|
36
|
+
<button type="button" id="RSP-Filter-Button-Reset">Reset</button>
|
|
37
|
+
<!-- END Filter-Button-Reset template -->
|
|
38
|
+
|
|
39
|
+
<!-- START Filter-Button-Apply template -->
|
|
40
|
+
<button type="submit" id="RSP-Filter-Button-Apply">Apply</button>
|
|
41
|
+
<!-- END Filter-Button-Apply template -->
|
|
42
|
+
</fieldset>
|
|
43
|
+
<!-- END Filter-Button-Container template -->
|
|
44
|
+
</form>
|
|
45
|
+
</section>
|
|
46
|
+
<!-- END Filter template-->
|
|
47
|
+
|
|
48
|
+
<!-- START Upper Pagination template -->
|
|
49
|
+
<nav id="RSP-Upper-Pagination-Container">
|
|
50
|
+
<!-- START Upper Pagination-Description template -->
|
|
51
|
+
<p>Showing 1-25 of 100</p>
|
|
52
|
+
<!-- END Upper Pagination-Description template -->
|
|
53
|
+
<!-- START Upper Pagination-Button-Container template -->
|
|
54
|
+
<ul>
|
|
55
|
+
<!-- START Upper Pagination Button Previous template -->
|
|
56
|
+
<li><a href="#">« Previous</a></li>
|
|
57
|
+
<!-- END Upper Pagination Button Previous template -->
|
|
58
|
+
<!-- START Upper Pagination Button Page template -->
|
|
59
|
+
<li><a href="#">1</a></li>
|
|
60
|
+
<!-- END Upper Pagination Button Page template -->
|
|
61
|
+
<!-- NOTE: more as needed (for examples)-->
|
|
62
|
+
<li><a href="#">2</a></li>
|
|
63
|
+
<li><a href="#">3</a></li>
|
|
64
|
+
<li><a href="#">4</a></li>
|
|
65
|
+
<!-- START Upper Pagination Button Next template -->
|
|
66
|
+
<li><a href="#">Next »</a></li>
|
|
67
|
+
<!-- END Upper Pagination Button Next template -->
|
|
68
|
+
<!-- START Upper Pagination Button Page template -->
|
|
69
|
+
</ul>
|
|
70
|
+
<!-- END Upper Pagination Button Page template -->
|
|
71
|
+
</nav>
|
|
72
|
+
<!-- END Upper Pagination template -->
|
|
73
|
+
|
|
74
|
+
<!-- START List template -->
|
|
75
|
+
<section id="RSP-List-Container">
|
|
76
|
+
<!-- START List-Table template -->
|
|
77
|
+
<table id="RSP-List-Table">
|
|
78
|
+
<!-- START List-Table-Header template -->
|
|
79
|
+
<thead>
|
|
80
|
+
<tr>
|
|
81
|
+
<!-- START List-Table-Header-Cell -->
|
|
82
|
+
<th>Column 1</th>
|
|
83
|
+
<!-- END List-Table-Header-Cell -->
|
|
84
|
+
<!-- NOTE: more cells as needed -->
|
|
85
|
+
<th>Column 2</th>
|
|
86
|
+
<th>Column 3</th>
|
|
87
|
+
</tr>
|
|
88
|
+
</thead>
|
|
89
|
+
<!-- END List-Table-Header template -->
|
|
90
|
+
<!-- START List-Table-Body template -->
|
|
91
|
+
<tbody>
|
|
92
|
+
<!-- START List-Table-Body-Row -->
|
|
93
|
+
<tr>
|
|
94
|
+
<!-- START List-Table-Body-Cell -->
|
|
95
|
+
<td>Row 1, Cell 1</td>
|
|
96
|
+
<!-- END List-Table-Body-Cell -->
|
|
97
|
+
<!-- NOTE: more cells as needed -->
|
|
98
|
+
<td>Row 1, Cell 2</td>
|
|
99
|
+
<td>Row 1, Cell 3</td>
|
|
100
|
+
<!-- START List-Table-Body-Extra-Cell -->
|
|
101
|
+
<td><!-- NOTE: slot for extra columns--></td>
|
|
102
|
+
<!-- END List-Table-Body-Extra-Cell -->
|
|
103
|
+
</tr>
|
|
104
|
+
<!-- END List-Table-Body-Row -->
|
|
105
|
+
<!-- Note: more rows as needed -->
|
|
106
|
+
</tbody>
|
|
107
|
+
<!-- END List-Table-Body template -->
|
|
108
|
+
</table>
|
|
109
|
+
<!-- END List-Table template -->
|
|
110
|
+
</section>
|
|
111
|
+
<!-- END List template -->
|
|
112
|
+
|
|
113
|
+
<!-- START Lower Pagination template -->
|
|
114
|
+
<nav id="RSP-Lower-Pagination-Container">
|
|
115
|
+
<!-- NOTE: Re-apply "RSP-Upper-Pagination-Container" content here to avoid duplication. -->
|
|
116
|
+
</nav>
|
|
117
|
+
<!-- END Lower Pagination template -->
|
|
118
|
+
|
|
119
|
+
<!-- Footer template -->
|
|
120
|
+
<footer id="RSP-Footer-Container">
|
|
121
|
+
<!-- NOTE: slot for additional set actions -->
|
|
122
|
+
</footer>
|
|
123
|
+
<!-- END Footer template -->
|
|
124
|
+
</body>
|
|
125
|
+
</html>
|
|
@@ -4,30 +4,36 @@ const libPictRecordSet = require('../../source/Pict-Section-RecordSet.js');
|
|
|
4
4
|
module.exports = libPictRecordSet.PictRecordSetApplication;
|
|
5
5
|
|
|
6
6
|
module.exports.default_configuration.pict_configuration = (
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
7
|
+
{
|
|
8
|
+
"Product": "Simple Record Set",
|
|
9
|
+
|
|
10
|
+
"PictApplicationConfiguration":
|
|
11
|
+
{
|
|
12
|
+
"AutoRenderMainViewportViewAfterInitialize": false
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
"DefaultRecordSetConfigurations":
|
|
16
|
+
[
|
|
17
|
+
{
|
|
18
|
+
"RecordSet": "Book",
|
|
19
|
+
|
|
20
|
+
"RecordSetType": "MeadowEndpoint", // Could be "Custom" which would require a provider to already be created for the record set.
|
|
21
|
+
"RecordSetMeadowEntity": "Book", // This leverages the /Schema endpoint to get the record set columns.
|
|
22
|
+
|
|
23
|
+
"RecordSetURLPrefix": "/1.0/"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"RecordSet": "Author",
|
|
27
|
+
|
|
28
|
+
"RecordSetType": "MeadowEndpoint",
|
|
29
|
+
"RecordSetMeadowEntity": "Author",
|
|
30
|
+
|
|
31
|
+
"RecordSetURLPrefix": "/1.0/"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"RecordSet": "RandomizedValues",
|
|
35
|
+
|
|
36
|
+
"RecordSetType": "Custom" // This means the `PS-RSP-RandomizedValues` provider will be checked for to get records.
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
});
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<title>Simple.</title>
|
|
5
5
|
<style id="PICT-CSS"></style>
|
|
6
|
-
<script src="./pict.
|
|
6
|
+
<script src="./pict.js" type="text/javascript"></script>
|
|
7
7
|
<script type="text/javascript">Pict.safeOnDocumentReady(() => { Pict.safeLoadPictApplication(SimpleApplication, 1)});</script>
|
|
8
8
|
</head>
|
|
9
9
|
<body>
|
|
10
|
-
<div id="
|
|
11
|
-
<script src="./simple_application.
|
|
10
|
+
<div id="PRSP_List_Container"></div>
|
|
11
|
+
<script src="./simple_application.js" type="text/javascript"></script>
|
|
12
12
|
</body>
|
|
13
13
|
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pict-section-recordset",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Pict dynamic record set management views",
|
|
5
5
|
"main": "source/Pict-Section-RecordSet.js",
|
|
6
6
|
"directories": {
|
|
@@ -21,27 +21,31 @@
|
|
|
21
21
|
"build": "npx quack build",
|
|
22
22
|
"test": "npx mocha -u tdd -R spec",
|
|
23
23
|
"lint": "eslint source/**",
|
|
24
|
-
"types": "tsc -p ."
|
|
24
|
+
"types": "tsc -p tsconfig.build.json"
|
|
25
25
|
},
|
|
26
26
|
"types": "types/source/Pict-Section-RecordSet.d.ts",
|
|
27
27
|
"author": "steven velozo <steven@velozo.com>",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@eslint/js": "^9.21.0",
|
|
31
|
+
"@types/mocha": "^10.0.10",
|
|
32
|
+
"@types/node": "^16.18.126",
|
|
31
33
|
"browser-env": "^3.3.0",
|
|
32
|
-
"eslint": "^9.
|
|
34
|
+
"eslint": "^9.26.0",
|
|
33
35
|
"jquery": "^3.7.1",
|
|
34
|
-
"pict": "^1.0.
|
|
35
|
-
"pict-application": "^1.0.
|
|
36
|
+
"pict": "^1.0.248",
|
|
37
|
+
"pict-application": "^1.0.25",
|
|
36
38
|
"pict-service-commandlineutility": "^1.0.15",
|
|
37
|
-
"quackage": "^1.0.
|
|
38
|
-
"typescript": "^5.
|
|
39
|
+
"quackage": "^1.0.41",
|
|
40
|
+
"typescript": "^5.8.3"
|
|
39
41
|
},
|
|
40
42
|
"dependencies": {
|
|
41
43
|
"fable-serviceproviderbase": "^3.0.15",
|
|
42
44
|
"pict-provider": "^1.0.3",
|
|
45
|
+
"pict-router": "^1.0.3",
|
|
46
|
+
"pict-section-form": "^1.0.90",
|
|
43
47
|
"pict-template": "^1.0.10",
|
|
44
|
-
"pict-view": "^1.0.
|
|
48
|
+
"pict-view": "^1.0.60"
|
|
45
49
|
},
|
|
46
50
|
"mocha": {
|
|
47
51
|
"diff": true,
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
// The container for all the Pict-Section-Form related code.
|
|
2
2
|
|
|
3
3
|
// The main dynamic view class
|
|
4
|
-
module.exports = require('./
|
|
4
|
+
module.exports = require('./services/RecordsSet-MetaController.js');
|
|
5
5
|
//module.exports.default_configuration = require('./views/Pict-View-DynamicForm-DefaultConfiguration.json');
|
|
6
6
|
|
|
7
7
|
// The application container
|
|
8
|
-
module.exports.PictRecordSetApplication = require('./application/Pict-Application-RecordSet.js');
|
|
8
|
+
module.exports.PictRecordSetApplication = require('./application/Pict-Application-RecordSet.js');
|
|
9
|
+
|
|
10
|
+
// Export the providers
|
|
11
|
+
module.exports.RecordSetProviderBase = require('./providers/RecordSet-RecordProvider-Base.js');
|
|
12
|
+
module.exports.RecordSetProviderMeadowEndpoints = require('./providers/RecordSet-RecordProvider-MeadowEndpoints.js');
|
|
@@ -3,14 +3,14 @@ const libPictApplication = require('pict-application');
|
|
|
3
3
|
const libPictSectionRecordSet = require('../Pict-Section-RecordSet.js');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* Represents a
|
|
6
|
+
* Represents a PictSectionRecordSetApplication.
|
|
7
7
|
*
|
|
8
|
-
* This is the automagic controller for a
|
|
8
|
+
* This is the automagic controller for a dynamic record set application.
|
|
9
9
|
*
|
|
10
10
|
* @class
|
|
11
11
|
* @extends libPictApplication
|
|
12
12
|
*/
|
|
13
|
-
class
|
|
13
|
+
class PictSectionRecordSetApplication extends libPictApplication
|
|
14
14
|
{
|
|
15
15
|
constructor(pFable, pOptions, pServiceHash)
|
|
16
16
|
{
|
|
@@ -21,9 +21,28 @@ class PictSectionFormApplication extends libPictApplication
|
|
|
21
21
|
// Add the pict recordset meta controller service
|
|
22
22
|
this.pict.addServiceType('PictSectionRecordSet', libPictSectionRecordSet);
|
|
23
23
|
}
|
|
24
|
+
|
|
25
|
+
onInitialize()
|
|
26
|
+
{
|
|
27
|
+
// Add the PictSectionRecordSet service
|
|
28
|
+
this.pict.instantiateServiceProvider('PictSectionRecordSet', this.options);
|
|
29
|
+
// Initialize the views for the foundation metacontroller service
|
|
30
|
+
this.pict.PictSectionRecordSet.initialize();
|
|
31
|
+
|
|
32
|
+
// Initialize the parent class
|
|
33
|
+
return super.onInitialize();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
onAfterInitialize()
|
|
37
|
+
{
|
|
38
|
+
// Now add the routes
|
|
39
|
+
this.pict.providers.RecordSetRouter.addRoutes(this.fable.providers.RecordSetRouter.pictRouter);
|
|
40
|
+
|
|
41
|
+
return super.onAfterInitialize();
|
|
42
|
+
}
|
|
24
43
|
};
|
|
25
44
|
|
|
26
|
-
module.exports =
|
|
45
|
+
module.exports = PictSectionRecordSetApplication
|
|
27
46
|
|
|
28
47
|
module.exports.default_configuration = (
|
|
29
48
|
{
|