pict-section-recordset 1.1.0 → 1.2.0

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.
Files changed (67) hide show
  1. package/package.json +5 -1
  2. package/source/views/RecordSet-Filters.js +20 -2
  3. package/source/views/filters/RecordSet-Filter-Base.js +86 -8
  4. package/source/views/read/RecordSet-Read.js +308 -2
  5. package/types/providers/Filter-Data-Provider.d.ts +1 -1
  6. package/types/providers/Filter-Data-Provider.d.ts.map +1 -1
  7. package/types/views/Filter-PersistenceView.d.ts +23 -2
  8. package/types/views/Filter-PersistenceView.d.ts.map +1 -1
  9. package/types/views/RecordSet-Filters.d.ts +26 -1
  10. package/types/views/RecordSet-Filters.d.ts.map +1 -1
  11. package/types/views/filters/RecordSet-Filter-Base.d.ts +14 -0
  12. package/types/views/filters/RecordSet-Filter-Base.d.ts.map +1 -1
  13. package/types/views/list/RecordSet-List.d.ts.map +1 -1
  14. package/types/views/read/RecordSet-Read.d.ts +51 -0
  15. package/types/views/read/RecordSet-Read.d.ts.map +1 -1
  16. package/.vscode/launch.json +0 -46
  17. package/CONTRIBUTING.md +0 -50
  18. package/debug/Harness.js +0 -0
  19. package/docs/.nojekyll +0 -0
  20. package/docs/README.md +0 -76
  21. package/docs/_brand.json +0 -18
  22. package/docs/_cover.md +0 -11
  23. package/docs/_sidebar.md +0 -19
  24. package/docs/_version.json +0 -7
  25. package/docs/api-reference.md +0 -233
  26. package/docs/filters.md +0 -151
  27. package/docs/index.html +0 -38
  28. package/docs/record-providers.md +0 -155
  29. package/docs/retold-catalog.json +0 -87
  30. package/docs/retold-keyword-index.json +0 -5227
  31. package/docs/views/create/README.md +0 -181
  32. package/docs/views/dashboard/README.md +0 -308
  33. package/docs/views/list/README.md +0 -260
  34. package/docs/views/read/README.md +0 -216
  35. package/eslint.config.mjs +0 -10
  36. package/example_applications/README.md +0 -39
  37. package/example_applications/ServeExamples.js +0 -82
  38. package/example_applications/bookstore/.quackage.json +0 -9
  39. package/example_applications/bookstore/Bookstore-Application-Configuration.json +0 -4
  40. package/example_applications/bookstore/Bookstore-Application.js +0 -671
  41. package/example_applications/bookstore/css/bookstore.css +0 -729
  42. package/example_applications/bookstore/css/pure.min.css +0 -11
  43. package/example_applications/bookstore/html/index.html +0 -46
  44. package/example_applications/bookstore/package.json +0 -34
  45. package/example_applications/bookstore/providers/PictRouter-Bookstore.json +0 -32
  46. package/example_applications/bookstore/views/PictView-Bookstore-Content-About.json +0 -21
  47. package/example_applications/bookstore/views/PictView-Bookstore-Content-Legal.json +0 -21
  48. package/example_applications/bookstore/views/PictView-Bookstore-Dashboard.js +0 -147
  49. package/example_applications/bookstore/views/PictView-Bookstore-Layout.js +0 -85
  50. package/example_applications/bookstore/views/PictView-Bookstore-Login.js +0 -58
  51. package/example_applications/bookstore/views/PictView-Bookstore-Navigation.js +0 -228
  52. package/example_applications/index.html +0 -50
  53. package/example_applications/mocks/book-edit-view.html +0 -173
  54. package/example_applications/mocks/book-read-view.html +0 -166
  55. package/example_applications/mocks/list-view.html +0 -185
  56. package/example_applications/package.json +0 -16
  57. package/example_applications/simple_entity/.quackage.json +0 -9
  58. package/example_applications/simple_entity/README-Simple-RecordSet.md +0 -8
  59. package/example_applications/simple_entity/Simple-RecordSet-Application.js +0 -887
  60. package/example_applications/simple_entity/html/index.html +0 -207
  61. package/example_applications/simple_entity/package.json +0 -27
  62. package/test/PictSectionRecordSet-Basic_tests.js +0 -205
  63. package/test/PictSectionRecordSet-Filter-Data-Provider_tests.js +0 -263
  64. package/test/PictSectionRecordSet-Filter-InstanceViews-Render_tests.js +0 -328
  65. package/test/PictSectionRecordSet-RecordProvider-Meadow_tests.js +0 -216
  66. package/tsconfig.build.json +0 -16
  67. package/tsconfig.json +0 -16
@@ -1,228 +0,0 @@
1
- const libPictView = require('pict-view');
2
-
3
- const _ViewConfiguration =
4
- {
5
- ViewIdentifier: "Bookstore-Navigation",
6
-
7
- DefaultRenderable: "Bookstore-Navigation-Content",
8
- DefaultDestinationAddress: "#Bookstore-Navigation-Container",
9
-
10
- AutoRender: false,
11
-
12
- CSS: /*css*/`
13
- #Bookstore-Navigation-Container .pure-menu-heading
14
- {
15
- font-size: 110%;
16
- color: var(--theme-color-background-panel, #fff);
17
- margin: 0;
18
- background: #E76F51;
19
- padding: 0.75em 0.6em;
20
- }
21
- .bookstore-nav-session
22
- {
23
- padding: 0.6em;
24
- border-top: 1px solid var(--theme-color-text-primary, #333);
25
- font-size: 0.8rem;
26
- color: var(--theme-color-text-muted, #999);
27
- }
28
- .bookstore-nav-session .dot
29
- {
30
- display: inline-block;
31
- width: 8px;
32
- height: 8px;
33
- border-radius: 50%;
34
- background: #2A9D8F;
35
- box-shadow: 0 0 4px rgba(42,157,143,0.5);
36
- margin-right: 0.35em;
37
- }
38
- .bookstore-nav-session-name
39
- {
40
- display: block;
41
- color: #D4A373;
42
- font-weight: 600;
43
- margin-top: 0.25em;
44
- }
45
- .bookstore-nav-logout
46
- {
47
- display: block;
48
- margin-top: 0.5em;
49
- background: #E76F51;
50
- color: var(--theme-color-background-panel, #fff);
51
- border: none;
52
- padding: 0.35em 0.75em;
53
- border-radius: 4px;
54
- font-size: 0.75rem;
55
- font-weight: 600;
56
- cursor: pointer;
57
- width: 100%;
58
- text-align: center;
59
- }
60
- .bookstore-nav-logout:hover
61
- {
62
- background: #C45A3E;
63
- }
64
- /* Preprocessor toggle section */
65
- .bookstore-nav-preprocessor
66
- {
67
- padding: 0.6em;
68
- border-top: 1px solid var(--theme-color-text-primary, #333);
69
- font-size: 0.75rem;
70
- color: var(--theme-color-text-muted, #999);
71
- }
72
- .bookstore-nav-preprocessor-label
73
- {
74
- display: block;
75
- margin-bottom: 0.35em;
76
- font-weight: 600;
77
- color: #D4A373;
78
- font-size: 0.7rem;
79
- text-transform: uppercase;
80
- letter-spacing: 0.05em;
81
- }
82
- .bookstore-preprocessor-toggle
83
- {
84
- position: relative;
85
- display: inline-block;
86
- width: 36px;
87
- height: 20px;
88
- vertical-align: middle;
89
- }
90
- .bookstore-preprocessor-toggle input
91
- {
92
- opacity: 0;
93
- width: 0;
94
- height: 0;
95
- }
96
- .bookstore-preprocessor-slider
97
- {
98
- position: absolute;
99
- cursor: pointer;
100
- top: 0;
101
- left: 0;
102
- right: 0;
103
- bottom: 0;
104
- background-color: var(--theme-color-text-secondary, #555);
105
- transition: background-color 0.2s;
106
- border-radius: 20px;
107
- }
108
- .bookstore-preprocessor-slider:before
109
- {
110
- position: absolute;
111
- content: "";
112
- height: 14px;
113
- width: 14px;
114
- left: 3px;
115
- bottom: 3px;
116
- background-color: var(--theme-color-background-panel, #fff);
117
- transition: transform 0.2s;
118
- border-radius: 50%;
119
- }
120
- .bookstore-preprocessor-toggle input:checked + .bookstore-preprocessor-slider
121
- {
122
- background-color: #2A9D8F;
123
- }
124
- .bookstore-preprocessor-toggle input:checked + .bookstore-preprocessor-slider:before
125
- {
126
- transform: translateX(16px);
127
- }
128
- .bookstore-preprocessor-status
129
- {
130
- display: inline-block;
131
- margin-left: 0.35em;
132
- vertical-align: middle;
133
- font-size: 0.7rem;
134
- color: var(--theme-color-text-muted, #999);
135
- }
136
- `,
137
-
138
- Templates:
139
- [
140
- {
141
- Hash: "Bookstore-Navigation-Template",
142
- Template: /*html*/`
143
- <span class="pure-menu-heading">Bookstore</span>
144
- <ul class="pure-menu-list">
145
- <li class="pure-menu-item"><a href="#" onclick="{~P~}.PictApplication.navigateTo('/Dashboard')" class="pure-menu-link">Dashboard</a></li>
146
- <li class="pure-menu-item menu-item-divided"><a href="#" onclick="{~P~}.PictApplication.navigateTo('/Books')" class="pure-menu-link">Books</a></li>
147
- <li class="pure-menu-item"><a href="#" onclick="{~P~}.PictApplication.navigateTo('/Authors')" class="pure-menu-link">Authors</a></li>
148
- <li class="pure-menu-item"><a href="#" onclick="{~P~}.PictApplication.navigateTo('/BookStores')" class="pure-menu-link">Stores</a></li>
149
- <li class="pure-menu-item menu-item-divided"><a href="#" onclick="{~P~}.PictApplication.navigateTo('/About')" class="pure-menu-link">About</a></li>
150
- <li class="pure-menu-item"><a href="#" onclick="{~P~}.PictApplication.navigateTo('/Legal')" class="pure-menu-link">Legal</a></li>
151
- </ul>
152
- <div class="bookstore-nav-preprocessor">
153
- <span class="bookstore-nav-preprocessor-label">Template Preprocessor</span>
154
- <label class="bookstore-preprocessor-toggle">
155
- <input type="checkbox" id="Bookstore-Preprocessor-Toggle" onclick="{~P~}.PictApplication.togglePreprocessor()">
156
- <span class="bookstore-preprocessor-slider"></span>
157
- </label>
158
- <span class="bookstore-preprocessor-status" id="Bookstore-Preprocessor-Status">Off</span>
159
- </div>
160
- <div class="bookstore-nav-session">
161
- <span class="dot"></span> Signed in
162
- <span class="bookstore-nav-session-name" id="Bookstore-Nav-UserName"></span>
163
- <button class="bookstore-nav-logout" type="button" onclick="{~P~}.PictApplication.doLogout()">Log out</button>
164
- </div>
165
- `
166
- }
167
- ],
168
-
169
- Renderables:
170
- [
171
- {
172
- RenderableHash: "Bookstore-Navigation-Content",
173
- TemplateHash: "Bookstore-Navigation-Template",
174
- DestinationAddress: "#Bookstore-Navigation-Container"
175
- }
176
- ]
177
- };
178
-
179
- class BookstoreNavigationView extends libPictView
180
- {
181
- constructor(pFable, pOptions, pServiceHash)
182
- {
183
- super(pFable, pOptions, pServiceHash);
184
- }
185
-
186
- onAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent)
187
- {
188
- // Populate the user name from session data
189
- let tmpSession = this.pict.AppData.Session;
190
- let tmpDisplayName = '';
191
-
192
- if (tmpSession && tmpSession.UserRecord)
193
- {
194
- tmpDisplayName = tmpSession.UserRecord.FullName
195
- || tmpSession.UserRecord.LoginID
196
- || '';
197
- }
198
-
199
- let tmpUserNameElements = this.services.ContentAssignment.getElement('#Bookstore-Nav-UserName');
200
- if (tmpUserNameElements && tmpUserNameElements.length > 0)
201
- {
202
- tmpUserNameElements[0].textContent = tmpDisplayName;
203
- }
204
-
205
- // Sync the preprocessor toggle state with the application's current state
206
- let tmpApp = this.pict.PictApplication;
207
- let tmpEnabled = tmpApp && tmpApp.isPreprocessorEnabled && tmpApp.isPreprocessorEnabled();
208
-
209
- let tmpToggleElements = this.services.ContentAssignment.getElement('#Bookstore-Preprocessor-Toggle');
210
- if (tmpToggleElements && tmpToggleElements.length > 0)
211
- {
212
- tmpToggleElements[0].checked = !!tmpEnabled;
213
- }
214
-
215
- let tmpStatusElements = this.services.ContentAssignment.getElement('#Bookstore-Preprocessor-Status');
216
- if (tmpStatusElements && tmpStatusElements.length > 0)
217
- {
218
- tmpStatusElements[0].textContent = tmpEnabled ? 'On' : 'Off';
219
- tmpStatusElements[0].style.color = tmpEnabled ? '#2A9D8F' : '#999';
220
- }
221
-
222
- return super.onAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent);
223
- }
224
- }
225
-
226
- module.exports = BookstoreNavigationView;
227
-
228
- module.exports.default_configuration = _ViewConfiguration;
@@ -1,50 +0,0 @@
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>Examples - Pict Example</title>
7
- <!-- Red Rock Mesa Theme — Pict Example App -->
8
- <style>
9
- *, *::before, *::after { box-sizing: border-box; }
10
- body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; background: #FAEDCD; color: #264653; }
11
-
12
- /* --- Header Bar --- */
13
- .pict-example-header { display: flex; align-items: stretch; background: #264653; border-bottom: 3px solid #E76F51; }
14
- .pict-example-badge { background: #E76F51; color: var(--theme-color-background-panel, #fff); padding: 0.6rem 1rem; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; display: flex; align-items: center; gap: 0.5rem; }
15
- .pict-example-badge svg { width: 14px; height: 14px; fill: var(--theme-color-background-panel, #fff); flex-shrink: 0; }
16
- .pict-example-app-name { padding: 0.6rem 1rem; color: #FAEDCD; font-size: 1.1rem; font-weight: 600; display: flex; align-items: center; }
17
- .pict-example-module { margin-left: auto; padding: 0.6rem 1rem; color: #D4A373; font-size: 0.75rem; display: flex; align-items: center; letter-spacing: 0.03em; }
18
-
19
- /* --- Content Area --- */
20
- .pict-example-content { padding: 1.5rem; }
21
- .pict-example-content h1 { color: #264653; font-size: 1.5rem; margin: 0 0 1.25rem; }
22
-
23
- /* --- Example List --- */
24
- .example-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
25
- .example-list li { background: var(--theme-color-background-panel, #fff); border: 1px solid #D4A373; border-left: 4px solid #E76F51; border-radius: 4px; transition: border-color 0.15s, box-shadow 0.15s; }
26
- .example-list li:hover { border-left-color: #264653; box-shadow: 0 2px 8px rgba(38,70,83,0.1); }
27
- .example-list a { display: block; padding: 0.75rem 1rem; text-decoration: none; color: #264653; font-weight: 500; font-size: 0.95rem; }
28
- .example-list a:hover { color: #E76F51; }
29
- </style>
30
- </head>
31
- <body>
32
- <div class="pict-example-header">
33
- <div class="pict-example-badge">
34
- <svg viewBox="0 0 16 16"><polygon points="8,1 10,6 16,6 11,9.5 13,15 8,11.5 3,15 5,9.5 0,6 6,6"/></svg>
35
- Pict Example
36
- </div>
37
- <div class="pict-example-app-name">Example Index</div>
38
- <div class="pict-example-module">pict-section-recordset</div>
39
- </div>
40
- <div class="pict-example-content">
41
- <h1>Example Applications</h1>
42
- <ul class="example-list">
43
- <li><a href="simple_entity/dist/index.html">Simple Entity (Books &amp; Authors)</a></li>
44
- <li><a href="mocks/list-view.html">Mock: List View</a></li>
45
- <li><a href="mocks/book-read-view.html">Mock: Book Read View</a></li>
46
- <li><a href="mocks/book-edit-view.html">Mock: Book Edit View</a></li>
47
- </ul>
48
- </div>
49
- </body>
50
- </html>
@@ -1,173 +0,0 @@
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>Book Edit View Mock - Pict Example</title>
7
- <!-- Red Rock Mesa Theme — Pict Example App -->
8
- <style>
9
- *, *::before, *::after { box-sizing: border-box; }
10
- body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; background: #FAEDCD; color: #264653; }
11
-
12
- /* --- Header Bar --- */
13
- .pict-example-header { display: flex; align-items: stretch; background: #264653; border-bottom: 3px solid #E76F51; }
14
- .pict-example-badge { background: #E76F51; color: var(--theme-color-background-panel, #fff); padding: 0.6rem 1rem; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; display: flex; align-items: center; gap: 0.5rem; }
15
- .pict-example-badge svg { width: 14px; height: 14px; fill: var(--theme-color-background-panel, #fff); flex-shrink: 0; }
16
- .pict-example-app-name { padding: 0.6rem 1rem; color: #FAEDCD; font-size: 1.1rem; font-weight: 600; display: flex; align-items: center; }
17
- .pict-example-module { margin-left: auto; padding: 0.6rem 1rem; color: #D4A373; font-size: 0.75rem; display: flex; align-items: center; letter-spacing: 0.03em; }
18
-
19
- /* --- Content Area --- */
20
- .pict-example-content { padding: 1.5rem; }
21
-
22
- /* --- Record Header --- */
23
- #RSP-Header-Container { margin-bottom: 1rem; }
24
- #RSP-Header-Container input[type="text"] { border: 1px solid #D4C4A8; background: #FFFCF7; padding: 0.5rem 0.75rem; border-radius: 4px; font-size: 1.5rem; font-weight: 700; color: #264653; width: 100%; margin-bottom: 1rem; }
25
- #RSP-Header-Container input[type="text"]:focus { outline: none; border-color: #E76F51; box-shadow: 0 0 0 2px rgba(231,111,81,0.15); }
26
-
27
- /* --- Tab Navigation --- */
28
- .grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0; list-style: none; margin: 0; padding: 0; }
29
- .grid-item { background: var(--theme-color-background-panel, #fff); padding: 0.65rem 1rem; text-align: center; border: 1px solid #D4A373; border-bottom: 2px solid #D4A373; list-style-type: none; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
30
- .grid-item a { text-decoration: none; color: #264653; font-weight: 500; font-size: 0.9rem; }
31
- .grid-item:hover { background: #FFF9F0; }
32
- .grid-item.active { background: #264653; border-color: #264653; border-bottom-color: #E76F51; }
33
- .grid-item.active a { color: #FAEDCD; }
34
-
35
- /* --- Record Content --- */
36
- #RSP-Record-Container article { background: var(--theme-color-background-panel, #fff); border: 1px solid #D4A373; border-top: 4px solid #E76F51; border-radius: 0 0 6px 6px; padding: 1.25rem; margin: 0 0 1rem; box-shadow: 0 2px 8px rgba(38,70,83,0.08); }
37
- #RSP-Record-Container h3 { color: #264653; font-size: 1.1rem; margin: 0 0 0.75rem; }
38
- #RSP-Record-Container h4 { color: #264653; font-size: 0.95rem; margin: 1rem 0 0.5rem; }
39
- #RSP-Record-Container textarea { border: 1px solid #D4C4A8; background: #FFFCF7; padding: 0.45rem 0.6rem; border-radius: 4px; font-size: 0.9rem; color: #264653; width: 100%; min-height: 80px; font-family: inherit; }
40
- #RSP-Record-Container textarea:focus { outline: none; border-color: #E76F51; box-shadow: 0 0 0 2px rgba(231,111,81,0.15); }
41
- #RSP-Record-Container input[type="text"] { border: 1px solid #D4C4A8; background: #FFFCF7; padding: 0.45rem 0.6rem; border-radius: 4px; font-size: 0.9rem; color: #264653; width: 100%; }
42
- #RSP-Record-Container input[type="text"]:focus { outline: none; border-color: #E76F51; box-shadow: 0 0 0 2px rgba(231,111,81,0.15); }
43
- #RSP-Record-Container ul { padding-left: 1.25rem; }
44
- #RSP-Record-Container li { padding: 0.35rem 0; color: #264653; font-size: 0.9rem; list-style: none; }
45
- #RSP-Record-Container img { max-width: 100%; border-radius: 4px; border: 1px solid #D4A373; margin-bottom: 0.5rem; }
46
- #RSP-Record-Image-Button { background: #264653; color: #FAEDCD; border: none; padding: 0.4rem 1rem; border-radius: 4px; font-size: 0.8rem; font-weight: 600; cursor: pointer; margin-bottom: 0.5rem; }
47
- #RSP-Record-Image-Button:hover { background: #1A3340; }
48
-
49
- /* --- Footer --- */
50
- #RSP-Footer-Container { padding: 0.5rem 0; }
51
- #RSP-Record-Button { background: #E76F51; color: var(--theme-color-background-panel, #fff); border: none; padding: 0.5rem 1.25rem; border-radius: 4px; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
52
- #RSP-Record-Button:hover { background: #C45A3E; }
53
- </style>
54
- </head>
55
- <body>
56
- <div class="pict-example-header">
57
- <div class="pict-example-badge">
58
- <svg viewBox="0 0 16 16"><polygon points="8,1 10,6 16,6 11,9.5 13,15 8,11.5 3,15 5,9.5 0,6 6,6"/></svg>
59
- Pict Example
60
- </div>
61
- <div class="pict-example-app-name">Book Edit View Mock</div>
62
- <div class="pict-example-module">pict-section-recordset</div>
63
- </div>
64
- <div class="pict-example-content">
65
- <!-- START Header template -->
66
- <header id="RSP-Header-Container">
67
- <!-- START Header-Title template -->
68
- <input type="text" value="Book Title" />
69
- <!-- END Header-Title template -->
70
- <!-- START Header-Nav template -->
71
- <nav id="RSP-Header-Nav">
72
- <ul class="grid-container">
73
- <li class="grid-item active"><a href="javascript:void(0);" onclick="toggleTabContent(event, 'RSP-Record-Toggleable-Content-1')">Details</a></li>
74
- <li class="grid-item"><a href="javascript:void(0);" onclick="toggleTabContent(event, 'RSP-Record-Toggleable-Content-2')">Author</a></li>
75
- <li class="grid-item"><a href="javascript:void(0);" onclick="toggleTabContent(event, 'RSP-Record-Toggleable-Content-3')">Series</a></li>
76
- </ul>
77
- </nav>
78
- <!-- END Header-Nav template -->
79
- </header>
80
- <!-- END Header template -->
81
-
82
- <!-- START Record template -->
83
- <section id="RSP-Record-Container">
84
- <!-- START Record Content -->
85
- <article id="RSP-Record-Toggleable-Content-1">
86
- <!-- START Record Content-Description template -->
87
- <textarea>Book Description</textarea>
88
- <!-- END Record Content-Description template -->
89
- <!-- START Record Content-Image template -->
90
- <img src="image.jpg" alt="Book Image">
91
- <button type="button" id="RSP-Record-Image-Button">Change Image</button>
92
- <!-- END Record Content-Image template -->
93
- <!-- START Record Content-Details template -->
94
- <h4>Book Metadata:</h4>
95
- <ul>
96
- <li><input type="text" value="Info 1" /></li>
97
- <li><input type="text" value="Info 2" /></li>
98
- <li><input type="text" value="Info 3" /></li>
99
- </ul>
100
- <!-- END Record Content-Details template -->
101
- </article>
102
- <!-- END Record Content -->
103
-
104
- <!-- START Record Content -->
105
- <article id="RSP-Record-Toggleable-Content-2" style="display:none;">
106
- <!-- START Record Content-Title template -->
107
- <input type="text" value="Joined Entity 1 Title" />
108
- <!-- END Record Content-Title template -->
109
- <!-- START Record Content-Description template -->
110
- <textarea>Joined Entity 1 Description</textarea>
111
- <!-- END Record Content-Description template -->
112
- <!-- START Record Content-Details template -->
113
- <ul>
114
- <li><input type="text" value="Detail A" /></li>
115
- <li><input type="text" value="Detail B" /></li>
116
- <li><input type="text" value="Detail C" /></li>
117
- </ul>
118
- <!-- END Record Content-Details template -->
119
- </article>
120
- <!-- END Record Content -->
121
-
122
- <!-- START Record Content -->
123
- <article id="RSP-Record-Toggleable-Content-3" style="display:none;">
124
- <!-- START Record Content-Title template -->
125
- <input type="text" value="Joined Entity 2 Title" />
126
- <!-- END Record Content-Title template -->
127
- <!-- START Record Content-Description template -->
128
- <textarea>Joined Entity 2 Description</textarea>
129
- <!-- END Record Content-Description template -->
130
- <!-- START Record Content-Details template -->
131
- <ul>
132
- <li><input type="text" value="Detail X" /></li>
133
- <li><input type="text" value="Detail Y" /></li>
134
- <li><input type="text" value="Detail Z" /></li>
135
- </ul>
136
- <!-- END Record Content-Details template -->
137
- </article>
138
- <!-- END Record Content -->
139
- </section>
140
- <!-- END Record template -->
141
-
142
- <!-- Footer template -->
143
- <footer id="RSP-Footer-Container">
144
- <!-- NOTE: slot for additional set actions -->
145
- <!-- START Record Content-Button template -->
146
- <button type="button" id="RSP-Record-Button" onclick="window.location='./book-read-view.html'">Save Changes</button>
147
- <!-- END Record Content-Button template -->
148
- </footer>
149
- <!-- END Footer template -->
150
- </div>
151
-
152
- <script>
153
- function toggleTabContent(event, contentId) {
154
- // Remove 'active' class from all tabs
155
- const tabs = document.querySelectorAll('#RSP-Header-Nav .grid-item');
156
- tabs.forEach(tab => {
157
- tab.classList.remove('active');
158
- });
159
- // Add 'active' class to the clicked tab
160
- event.currentTarget.parentElement.classList.add('active');
161
- // Hide all content sections
162
- const contents = document.querySelectorAll('article[id^="RSP-Record-Toggleable-Content-"]');
163
- contents.forEach(content => {
164
- if (content.id === contentId) {
165
- content.style.display = 'block';
166
- } else {
167
- content.style.display = 'none';
168
- }
169
- });
170
- }
171
- </script>
172
- </body>
173
- </html>
@@ -1,166 +0,0 @@
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>Book Read View Mock - Pict Example</title>
7
- <!-- Red Rock Mesa Theme — Pict Example App -->
8
- <style>
9
- *, *::before, *::after { box-sizing: border-box; }
10
- body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; background: #FAEDCD; color: #264653; }
11
-
12
- /* --- Header Bar --- */
13
- .pict-example-header { display: flex; align-items: stretch; background: #264653; border-bottom: 3px solid #E76F51; }
14
- .pict-example-badge { background: #E76F51; color: var(--theme-color-background-panel, #fff); padding: 0.6rem 1rem; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; display: flex; align-items: center; gap: 0.5rem; }
15
- .pict-example-badge svg { width: 14px; height: 14px; fill: var(--theme-color-background-panel, #fff); flex-shrink: 0; }
16
- .pict-example-app-name { padding: 0.6rem 1rem; color: #FAEDCD; font-size: 1.1rem; font-weight: 600; display: flex; align-items: center; }
17
- .pict-example-module { margin-left: auto; padding: 0.6rem 1rem; color: #D4A373; font-size: 0.75rem; display: flex; align-items: center; letter-spacing: 0.03em; }
18
-
19
- /* --- Content Area --- */
20
- .pict-example-content { padding: 1.5rem; }
21
-
22
- /* --- Record Header --- */
23
- #RSP-Header-Container { margin-bottom: 1rem; }
24
- #RSP-Header-Container h1 { color: #264653; font-size: 1.5rem; margin: 0 0 1rem; }
25
-
26
- /* --- Tab Navigation --- */
27
- .grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0; list-style: none; margin: 0; padding: 0; }
28
- .grid-item { background: var(--theme-color-background-panel, #fff); padding: 0.65rem 1rem; text-align: center; border: 1px solid #D4A373; border-bottom: 2px solid #D4A373; list-style-type: none; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
29
- .grid-item a { text-decoration: none; color: #264653; font-weight: 500; font-size: 0.9rem; }
30
- .grid-item:hover { background: #FFF9F0; }
31
- .grid-item.active { background: #264653; border-color: #264653; border-bottom-color: #E76F51; }
32
- .grid-item.active a { color: #FAEDCD; }
33
-
34
- /* --- Record Content --- */
35
- #RSP-Record-Container article { background: var(--theme-color-background-panel, #fff); border: 1px solid #D4A373; border-top: 4px solid #E76F51; border-radius: 0 0 6px 6px; padding: 1.25rem; margin: 0 0 1rem; box-shadow: 0 2px 8px rgba(38,70,83,0.08); }
36
- #RSP-Record-Container h3 { color: #264653; font-size: 1.1rem; margin: 0 0 0.75rem; }
37
- #RSP-Record-Container h4 { color: #264653; font-size: 0.95rem; margin: 1rem 0 0.5rem; }
38
- #RSP-Record-Container p { color: #264653; line-height: 1.6; }
39
- #RSP-Record-Container ul { padding-left: 1.25rem; }
40
- #RSP-Record-Container li { padding: 0.25rem 0; color: #264653; font-size: 0.9rem; }
41
- #RSP-Record-Container img { max-width: 100%; border-radius: 4px; border: 1px solid #D4A373; }
42
-
43
- /* --- Footer --- */
44
- #RSP-Footer-Container { padding: 0.5rem 0; }
45
- #RSP-Record-Button { background: #E76F51; color: var(--theme-color-background-panel, #fff); border: none; padding: 0.5rem 1.25rem; border-radius: 4px; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
46
- #RSP-Record-Button:hover { background: #C45A3E; }
47
- </style>
48
- </head>
49
- <body>
50
- <div class="pict-example-header">
51
- <div class="pict-example-badge">
52
- <svg viewBox="0 0 16 16"><polygon points="8,1 10,6 16,6 11,9.5 13,15 8,11.5 3,15 5,9.5 0,6 6,6"/></svg>
53
- Pict Example
54
- </div>
55
- <div class="pict-example-app-name">Book Read View Mock</div>
56
- <div class="pict-example-module">pict-section-recordset</div>
57
- </div>
58
- <div class="pict-example-content">
59
- <!-- START Header template -->
60
- <header id="RSP-Header-Container">
61
- <!-- START Header-Title template -->
62
- <h1>Book Title</h1>
63
- <!-- END Header-Title template -->
64
- <!-- START Header-Nav template -->
65
- <nav id="RSP-Header-Nav">
66
- <ul class="grid-container">
67
- <li class="grid-item active"><a href="javascript:void(0);" onclick="toggleTabContent(event, 'RSP-Record-Toggleable-Content-1')">Details</a></li>
68
- <li class="grid-item"><a href="javascript:void(0);" onclick="toggleTabContent(event, 'RSP-Record-Toggleable-Content-2')">Author</a></li>
69
- <li class="grid-item"><a href="javascript:void(0);" onclick="toggleTabContent(event, 'RSP-Record-Toggleable-Content-3')">Series</a></li>
70
- </ul>
71
- </nav>
72
- <!-- END Header-Nav template -->
73
- </header>
74
- <!-- END Header template -->
75
-
76
- <!-- START Record template -->
77
- <section id="RSP-Record-Container">
78
- <!-- START Record Content -->
79
- <article id="RSP-Record-Toggleable-Content-1">
80
- <!-- START Record Content-Description template -->
81
- <p>Book Description</p>
82
- <!-- END Record Content-Description template -->
83
- <!-- START Record Content-Image template -->
84
- <img src="image.jpg" alt="Book Image">
85
- <!-- END Record Content-Image template -->
86
- <!-- START Record Content-Details template -->
87
- <h4>Book Metadata:</h4>
88
- <ul>
89
- <li>Info 1</li>
90
- <li>Info 2</li>
91
- <li>Info 3</li>
92
- </ul>
93
- <!-- END Record Content-Details template -->
94
- </article>
95
- <!-- END Record Content -->
96
-
97
- <!-- START Record Content -->
98
- <article id="RSP-Record-Toggleable-Content-2" style="display:none;">
99
- <!-- START Record Content-Title template -->
100
- <h3>Joined Entity 1 Title</h3>
101
- <!-- END Record Content-Title template -->
102
- <!-- START Record Content-Description template -->
103
- <p>Joined Entity 1 Description</p>
104
- <!-- END Record Content-Description template -->
105
- <!-- START Record Content-Details template -->
106
- <ul>
107
- <li>Detail A</li>
108
- <li>Detail B</li>
109
- <li>Detail C</li>
110
- </ul>
111
- <!-- END Record Content-Details template -->
112
- </article>
113
- <!-- END Record Content -->
114
-
115
- <!-- START Record Content -->
116
- <article id="RSP-Record-Toggleable-Content-3" style="display:none;">
117
- <!-- START Record Content-Title template -->
118
- <h3>Joined Entity 2 Title</h3>
119
- <!-- END Record Content-Title template -->
120
- <!-- START Record Content-Description template -->
121
- <p>Joined Entity 2 Description</p>
122
- <!-- END Record Content-Description template -->
123
- <!-- START Record Content-Details template -->
124
- <ul>
125
- <li>Detail X</li>
126
- <li>Detail Y</li>
127
- <li>Detail Z</li>
128
- </ul>
129
- <!-- END Record Content-Details template -->
130
- </article>
131
- <!-- END Record Content -->
132
- </section>
133
- <!-- END Record template -->
134
-
135
- <!-- Footer template -->
136
- <footer id="RSP-Footer-Container">
137
- <!-- NOTE: slot for additional set actions -->
138
- <!-- START Record Content-Button template -->
139
- <button type="button" id="RSP-Record-Button" onclick="window.location='./book-edit-view.html'">Edit Record</button>
140
- <!-- END Record Content-Button template -->
141
- </footer>
142
- <!-- END Footer template -->
143
- </div>
144
-
145
- <script>
146
- function toggleTabContent(event, contentId) {
147
- // Remove 'active' class from all tabs
148
- const tabs = document.querySelectorAll('#RSP-Header-Nav .grid-item');
149
- tabs.forEach(tab => {
150
- tab.classList.remove('active');
151
- });
152
- // Add 'active' class to the clicked tab
153
- event.currentTarget.parentElement.classList.add('active');
154
- // Hide all content sections
155
- const contents = document.querySelectorAll('article[id^="RSP-Record-Toggleable-Content-"]');
156
- contents.forEach(content => {
157
- if (content.id === contentId) {
158
- content.style.display = 'block';
159
- } else {
160
- content.style.display = 'none';
161
- }
162
- });
163
- }
164
- </script>
165
- </body>
166
- </html>