pict-section-recordset 1.0.2 → 1.0.4
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 +19 -0
- package/example_applications/simple_entity/html/index.html +1 -1
- package/package.json +5 -5
- package/source/providers/RecordSet-Link-Manager.js +52 -0
- package/source/providers/RecordSet-RecordProvider-MeadowEndpoints.js +1 -0
- package/source/services/RecordsSet-MetaController.js +39 -1
- package/source/views/list/RecordSet-List-RecordListEntry.js +101 -65
- package/source/views/list/RecordSet-List-RecordListHeader.js +75 -54
- package/source/views/list/RecordSet-List.js +16 -6
- package/source/views/read/RecordSet-Read-RecordRead.js +62 -48
- package/source/views/read/RecordSet-Read.js +71 -28
- package/types/providers/RecordSet-Link-Manager.d.ts +23 -0
- package/types/providers/RecordSet-Link-Manager.d.ts.map +1 -0
- package/types/providers/RecordSet-RecordProvider-MeadowEndpoints.d.ts.map +1 -1
- package/types/services/RecordsSet-MetaController.d.ts +1 -0
- package/types/services/RecordsSet-MetaController.d.ts.map +1 -1
- package/types/views/RecordSet-RecordBaseView.d.ts +5 -1
- package/types/views/RecordSet-RecordBaseView.d.ts.map +1 -1
- package/types/views/list/RecordSet-List-RecordListEntry.d.ts.map +1 -1
- package/types/views/list/RecordSet-List-RecordListHeader.d.ts.map +1 -1
- package/types/views/list/RecordSet-List.d.ts.map +1 -1
- package/types/views/read/RecordSet-Read-RecordRead.d.ts.map +1 -1
- package/types/views/read/RecordSet-Read.d.ts +7 -8
- package/types/views/read/RecordSet-Read.d.ts.map +1 -1
|
@@ -20,6 +20,25 @@ module.exports.default_configuration.pict_configuration = (
|
|
|
20
20
|
"RecordSetType": "MeadowEndpoint", // Could be "Custom" which would require a provider to already be created for the record set.
|
|
21
21
|
"RecordSetMeadowEntity": "Book", // This leverages the /Schema endpoint to get the record set columns.
|
|
22
22
|
|
|
23
|
+
"RecordSetListColumns": [
|
|
24
|
+
{
|
|
25
|
+
"Key": "Title",
|
|
26
|
+
"DisplayName": "Title"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"Key": "Genre",
|
|
30
|
+
"DisplayName": "Genre"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"Key": "ISBN",
|
|
34
|
+
"DisplayName": "Int'l SBN"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
|
|
38
|
+
"RecordSetListHasExtraColumns": true,
|
|
39
|
+
"RecordSetListExtraColumnsHeaderTemplate": "<th style=\"border-bottom: 1px solid #ccc; padding: 5px; background-color: #f2f2f2; color: #333;\">Cover</th>",
|
|
40
|
+
"RecordSetListExtraColumnRowTemplate": "<td><img src=\"{~D:Record.Data.ImageURL~}\"></td>",
|
|
41
|
+
|
|
23
42
|
"RecordSetURLPrefix": "/1.0/"
|
|
24
43
|
},
|
|
25
44
|
{
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<script type="text/javascript">Pict.safeOnDocumentReady(() => { Pict.safeLoadPictApplication(SimpleApplication, 1)});</script>
|
|
8
8
|
</head>
|
|
9
9
|
<body>
|
|
10
|
-
<div id="
|
|
10
|
+
<div id="PRSP_Container"></div>
|
|
11
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.4",
|
|
4
4
|
"description": "Pict dynamic record set management views",
|
|
5
5
|
"main": "source/Pict-Section-RecordSet.js",
|
|
6
6
|
"directories": {
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"author": "steven velozo <steven@velozo.com>",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@eslint/js": "^9.
|
|
30
|
+
"@eslint/js": "^9.27.0",
|
|
31
31
|
"@types/mocha": "^10.0.10",
|
|
32
|
-
"@types/node": "^
|
|
32
|
+
"@types/node": "^22.15.19",
|
|
33
33
|
"browser-env": "^3.3.0",
|
|
34
|
-
"eslint": "^9.
|
|
34
|
+
"eslint": "^9.27.0",
|
|
35
35
|
"jquery": "^3.7.1",
|
|
36
|
-
"pict": "^1.0.
|
|
36
|
+
"pict": "^1.0.252",
|
|
37
37
|
"pict-application": "^1.0.25",
|
|
38
38
|
"pict-service-commandlineutility": "^1.0.15",
|
|
39
39
|
"quackage": "^1.0.41",
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
const libPictProvider = require('pict-provider');
|
|
2
|
+
|
|
3
|
+
const _DEFAULT_PROVIDER_CONFIGURATION =
|
|
4
|
+
{
|
|
5
|
+
ProviderIdentifier: 'Pict-RecordSet-LinkManager',
|
|
6
|
+
|
|
7
|
+
AutoInitialize: true,
|
|
8
|
+
AutoInitializeOrdinal: 0
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class PictRecordSetRouter extends libPictProvider
|
|
12
|
+
{
|
|
13
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
14
|
+
{
|
|
15
|
+
let tmpOptions = Object.assign({}, _DEFAULT_PROVIDER_CONFIGURATION, pOptions);
|
|
16
|
+
super(pFable, tmpOptions, pServiceHash);
|
|
17
|
+
|
|
18
|
+
/** @type {Record<string, any>} */
|
|
19
|
+
this.options;
|
|
20
|
+
/** @type {import('pict')} */
|
|
21
|
+
this.pict;
|
|
22
|
+
|
|
23
|
+
// An array of link templates with a hash, name template and uri template.
|
|
24
|
+
// Format:
|
|
25
|
+
// {
|
|
26
|
+
// Name: "View Record",
|
|
27
|
+
// URL: "#/PSRS/{~D:Record.Payload.RecordSet~}/Read/{~DVBK:Record.Data:Record.Payload.GUIDAddress~}",
|
|
28
|
+
// Default: true
|
|
29
|
+
// }
|
|
30
|
+
this.linkTemplates = [];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// TODO: Add the ability to add routes that are scoped to particular entity types
|
|
34
|
+
addRecordLinkTemplate(pNameTemplate, pURLTemplate, pDefault)
|
|
35
|
+
{
|
|
36
|
+
let tmpDefaultAction = (typeof(pDefault) !== 'undefined') ? pDefault : false;
|
|
37
|
+
|
|
38
|
+
const tmpLinkTemplateObject = (
|
|
39
|
+
{
|
|
40
|
+
Name: pNameTemplate,
|
|
41
|
+
URL: pURLTemplate,
|
|
42
|
+
Default: tmpDefaultAction
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
this.linkTemplates.push(tmpLinkTemplateObject);
|
|
46
|
+
|
|
47
|
+
return tmpLinkTemplateObject;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
module.exports = PictRecordSetRouter;
|
|
52
|
+
module.exports.default_configuration = _DEFAULT_PROVIDER_CONFIGURATION;
|
|
@@ -63,6 +63,7 @@ class RecordSetProvider extends libRecordSetProviderBase
|
|
|
63
63
|
{
|
|
64
64
|
throw new Error('Entity is not defined in the provider options.');
|
|
65
65
|
}
|
|
66
|
+
// FIXME: The GUIDS are returning false to isNaN so this doesn't work
|
|
66
67
|
if (typeof pIDOrGuid === 'string' && isNaN(parseInt(pIDOrGuid)))
|
|
67
68
|
{
|
|
68
69
|
return this.getRecordByGUID(pIDOrGuid);
|
|
@@ -9,6 +9,8 @@ const viewRecordSetDashboard = require('../views/dashboard/RecordSet-Dashboard.j
|
|
|
9
9
|
const providerBase = require('../providers/RecordSet-RecordProvider-Base.js');
|
|
10
10
|
const providerMeadowEndpoints = require('../providers/RecordSet-RecordProvider-MeadowEndpoints.js');
|
|
11
11
|
|
|
12
|
+
const providerLinkManager = require('../providers/RecordSet-Link-Manager.js');
|
|
13
|
+
|
|
12
14
|
const providerRouter = require('../providers/RecordSet-Router.js');
|
|
13
15
|
|
|
14
16
|
const _DEFAULT_CONFIGURATION =
|
|
@@ -42,6 +44,8 @@ class RecordSetMetacontroller extends libFableServiceProviderBase
|
|
|
42
44
|
this.recordSetProviders = {};
|
|
43
45
|
this.recordSetProviderConfigurations = {};
|
|
44
46
|
|
|
47
|
+
this.recordSetListConfigurations = {};
|
|
48
|
+
|
|
45
49
|
this.has_initialized = false;
|
|
46
50
|
}
|
|
47
51
|
|
|
@@ -84,6 +88,31 @@ class RecordSetMetacontroller extends libFableServiceProviderBase
|
|
|
84
88
|
return false;
|
|
85
89
|
}
|
|
86
90
|
|
|
91
|
+
let tmpExtraColumnHeaderTemplateHash = `RecordSet-List-ExtraColumnHeader-${pRecordSetConfiguration.RecordSet}`;
|
|
92
|
+
pRecordSetConfiguration.RecordSetListExtraColumnsHeaderTemplateHash = tmpExtraColumnHeaderTemplateHash;
|
|
93
|
+
let tmpExtraColumnRowTemplateHash = `RecordSet-List-ExtraColumnRow-${pRecordSetConfiguration.RecordSet}`;
|
|
94
|
+
pRecordSetConfiguration.RecordSetListExtraColumnRowTemplateHash = tmpExtraColumnRowTemplateHash;
|
|
95
|
+
if (pRecordSetConfiguration.RecordSetListHasExtraColumns)
|
|
96
|
+
{
|
|
97
|
+
let tmpRecordSetExtraColumnHeaderTemplate = pRecordSetConfiguration.RecordSetListExtraColumnsHeaderTemplate;
|
|
98
|
+
if (tmpRecordSetExtraColumnHeaderTemplate === undefined)
|
|
99
|
+
{
|
|
100
|
+
tmpRecordSetExtraColumnHeaderTemplate = '';
|
|
101
|
+
}
|
|
102
|
+
let tmpRecordSetExtraColumnRowTemplate = pRecordSetConfiguration.RecordSetListExtraColumnRowTemplate;
|
|
103
|
+
if (tmpRecordSetExtraColumnRowTemplate === undefined)
|
|
104
|
+
{
|
|
105
|
+
tmpRecordSetExtraColumnRowTemplate = '';
|
|
106
|
+
}
|
|
107
|
+
this.fable.TemplateProvider.addTemplate(tmpExtraColumnHeaderTemplateHash, tmpRecordSetExtraColumnHeaderTemplate);
|
|
108
|
+
this.fable.TemplateProvider.addTemplate(tmpExtraColumnRowTemplateHash, tmpRecordSetExtraColumnRowTemplate);
|
|
109
|
+
}
|
|
110
|
+
else
|
|
111
|
+
{
|
|
112
|
+
this.fable.TemplateProvider.addTemplate(tmpExtraColumnHeaderTemplateHash, '');
|
|
113
|
+
this.fable.TemplateProvider.addTemplate(tmpExtraColumnRowTemplateHash, '');
|
|
114
|
+
}
|
|
115
|
+
|
|
87
116
|
let tmpProvider = false;
|
|
88
117
|
|
|
89
118
|
const providerConfiguration = Object.assign({}, {Hash: `RSP-Provider-${pRecordSetConfiguration.RecordSet}`}, pRecordSetConfiguration);
|
|
@@ -225,6 +254,11 @@ class RecordSetMetacontroller extends libFableServiceProviderBase
|
|
|
225
254
|
return true;
|
|
226
255
|
}
|
|
227
256
|
|
|
257
|
+
addRecordLinkTemplate(pNameTemplate, pURLTemplate, pDefault)
|
|
258
|
+
{
|
|
259
|
+
return this.fable.providers.RecordSetLinkManager.addRecordLinkTemplate(pNameTemplate, pURLTemplate, pDefault);
|
|
260
|
+
}
|
|
261
|
+
|
|
228
262
|
initialize()
|
|
229
263
|
{
|
|
230
264
|
if (this.has_initialized)
|
|
@@ -233,6 +267,8 @@ class RecordSetMetacontroller extends libFableServiceProviderBase
|
|
|
233
267
|
return this;
|
|
234
268
|
}
|
|
235
269
|
|
|
270
|
+
this.fable.addProvider('RecordSetLinkManager', {}, providerLinkManager);
|
|
271
|
+
|
|
236
272
|
// Add the subviews internally and externally
|
|
237
273
|
this.childViews.list = this.fable.addView('RSP-RecordSet-List', this.options, viewRecordSetList);
|
|
238
274
|
this.childViews.edit = this.fable.addView('RSP-RecordSet-Edit', this.options, viewRecordSetEdit);
|
|
@@ -252,7 +288,9 @@ class RecordSetMetacontroller extends libFableServiceProviderBase
|
|
|
252
288
|
this.loadRecordSetConfigurationArray(this.fable.settings.DefaultRecordSetConfigurations);
|
|
253
289
|
}
|
|
254
290
|
|
|
255
|
-
this.has_initialized = true;
|
|
291
|
+
this.has_initialized = true;
|
|
292
|
+
|
|
293
|
+
// Load pict-router if it isn't loaded
|
|
256
294
|
if (!('RecordSetRouter' in this.fable.providers))
|
|
257
295
|
{
|
|
258
296
|
this.fable.addProvider('RecordSetRouter', {}, providerRouter);
|
|
@@ -1,83 +1,119 @@
|
|
|
1
1
|
const libPictView = require('pict-view');
|
|
2
2
|
|
|
3
3
|
const _DEFAULT_CONFIGURATION_List_RecordListEntry = (
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
4
|
+
{
|
|
5
|
+
ViewIdentifier: 'PRSP-List-RecordListEntry',
|
|
6
|
+
|
|
7
|
+
DefaultRenderable: 'PRSP_Renderable_RecordListEntry',
|
|
8
|
+
DefaultDestinationAddress: '#PRSP_RecordListEntry_Container',
|
|
9
|
+
DefaultTemplateRecordAddress: false,
|
|
10
|
+
|
|
11
|
+
// If this is set to true, when the App initializes this will.
|
|
12
|
+
// While the App initializes, initialize will be called.
|
|
13
|
+
AutoInitialize: false,
|
|
14
|
+
AutoInitializeOrdinal: 0,
|
|
15
|
+
|
|
16
|
+
// If this is set to true, when the App autorenders (on load) this will.
|
|
17
|
+
// After the App initializes, render will be called.
|
|
18
|
+
AutoRender: false,
|
|
19
|
+
AutoRenderOrdinal: 0,
|
|
20
|
+
|
|
21
|
+
AutoSolveWithApp: false,
|
|
22
|
+
AutoSolveOrdinal: 0,
|
|
23
|
+
|
|
24
|
+
CSS: false,
|
|
25
|
+
CSSPriority: 500,
|
|
26
|
+
|
|
27
|
+
Templates:
|
|
28
|
+
[
|
|
29
|
+
{
|
|
30
|
+
// TODO: Add extras template here; it's in the header but not here yet.
|
|
31
|
+
Hash: 'PRSP-List-RecordListEntry-Template',
|
|
32
|
+
Template: /*html*/`
|
|
33
|
+
{~TSWP:PRSP-List-RecordListEntry-Template-Row:Record.Records.Records:Record~}
|
|
33
34
|
`
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
Hash: 'PRSP-List-RecordListEntry-Template-Row',
|
|
38
|
+
Template: /*html*/`
|
|
38
39
|
<!-- DefaultPackage pict view template: [PRSP-List-RecordListEntry-Template] -->
|
|
39
40
|
<tr>
|
|
40
41
|
{~TSWP:PRSP-List-RecordListEntry-Template-Row-Cell:Record.Payload.TableCells:Record.Data~}
|
|
42
|
+
{~T:PRSP-List-RecordListHeader-Template-Extra-Row~}
|
|
43
|
+
{~T:PRSP-List-RecordListAction-Template-Cell~}
|
|
41
44
|
</tr>
|
|
42
45
|
<!-- DefaultPackage end view template: [PRSP-List-RecordListEntry-Template] -->
|
|
43
46
|
`
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
//
|
|
48
|
+
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
Hash: 'PRSP-List-RecordListHeader-Template-Extra-Row',
|
|
52
|
+
Template: /*html*/`
|
|
53
|
+
<!-- DefaultPackage pict view template: [PRSP-List-RecordListHeader-Template-Extra-Row] -->
|
|
54
|
+
{~TBR:Record.Payload.RecordSetConfiguration.RecordSetListExtraColumnRowTemplateHash~}
|
|
55
|
+
<!-- DefaultPackage end view template: [PRSP-List-RecordListHeader-Extra-Row] -->
|
|
51
56
|
`
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
// {~TBR:Record.Payload.RecordSetConfiguration.RecordSetListExtraColumnRowTemplateHash~}
|
|
58
|
+
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
Hash: 'PRSP-List-RecordListEntry-Template-Row-Cell',
|
|
62
|
+
Template: /*html*/`
|
|
63
|
+
<td style="border-bottom: 1px solid #ccc; padding: 5px;">
|
|
64
|
+
{~DVBK:Record.Payload:Record.Data.Key~}
|
|
65
|
+
</td>
|
|
66
|
+
`
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
Hash: 'PRSP-List-RecordListEntry-Template-Entry-Cell-Datum',
|
|
70
|
+
Template: /*html*/`
|
|
56
71
|
<!-- DefaultPackage pict view template: [PRSP-List-RecordListEntry-Template-Entry-Cell-Datum] -->
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
72
|
+
`
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
Hash: 'PRSP-List-RecordListAction-Template-Cell',
|
|
76
|
+
// FIXME: Needs a better way of getting the appropriate link templates in (likely requiring piping the RecordSet to the link manager)
|
|
77
|
+
Template: /*html*/`
|
|
78
|
+
<td style="border-bottom: 1px solid #ccc; padding: 5px;">
|
|
79
|
+
<ul>
|
|
80
|
+
{~TSWP:PRSP-List-RecordListAction-Template-Cell-Datum:Pict.providers.RecordSetLinkManager.linkTemplates:Record~}
|
|
81
|
+
</ul>
|
|
82
|
+
</td>
|
|
83
|
+
`
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
Hash: 'PRSP-List-RecordListAction-Template-Cell-Datum',
|
|
87
|
+
// 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.
|
|
88
|
+
// This is part one of refactoring to include metatemplate resolution ase a core behavior pict itself rather than a pict-section-form capability
|
|
89
|
+
Template: /*html*/`
|
|
90
|
+
<li><a href="{~TBR:Record.Data.URL~}">{~TBR:Record.Data.Name~}</a></li>
|
|
91
|
+
`
|
|
92
|
+
// {~Breakpoint~}
|
|
93
|
+
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
|
|
97
|
+
Renderables:
|
|
98
|
+
[
|
|
99
|
+
{
|
|
100
|
+
RenderableHash: 'PRSP_Renderable_RecordListEntry',
|
|
101
|
+
TemplateHash: 'PRSP-List-RecordListEntry-Template',
|
|
102
|
+
DestinationAddress: '#PRSP_RecordListEntry_Container',
|
|
103
|
+
RenderMethod: 'replace'
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
|
|
107
|
+
Manifests: {}
|
|
108
|
+
});
|
|
73
109
|
|
|
74
110
|
class viewRecordSetListRecordListEntry extends libPictView
|
|
75
111
|
{
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
112
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
113
|
+
{
|
|
114
|
+
let tmpOptions = Object.assign({}, _DEFAULT_CONFIGURATION_List_RecordListEntry, pOptions);
|
|
115
|
+
super(pFable, tmpOptions, pServiceHash);
|
|
116
|
+
}
|
|
81
117
|
}
|
|
82
118
|
|
|
83
119
|
module.exports = viewRecordSetListRecordListEntry;
|
|
@@ -1,74 +1,95 @@
|
|
|
1
1
|
const libPictView = require('pict-view');
|
|
2
2
|
|
|
3
3
|
const _DEFAULT_CONFIGURATION_List_RecordListHeader = (
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
{
|
|
5
|
+
ViewIdentifier: 'PRSP-List-RecordListHeader',
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
DefaultRenderable: 'PRSP_Renderable_RecordListHeader',
|
|
8
|
+
DefaultDestinationAddress: '#PRSP_RecordListHeader_Container',
|
|
9
|
+
DefaultTemplateRecordAddress: false,
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
// If this is set to true, when the App initializes this will.
|
|
12
|
+
// While the App initializes, initialize will be called.
|
|
13
|
+
AutoInitialize: false,
|
|
14
|
+
AutoInitializeOrdinal: 0,
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
// If this is set to true, when the App autorenders (on load) this will.
|
|
17
|
+
// After the App initializes, render will be called.
|
|
18
|
+
AutoRender: false,
|
|
19
|
+
AutoRenderOrdinal: 0,
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
AutoSolveWithApp: false,
|
|
22
|
+
AutoSolveOrdinal: 0,
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
CSS: false,
|
|
25
|
+
CSSPriority: 500,
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
Templates:
|
|
28
|
+
[
|
|
29
|
+
{
|
|
30
|
+
Hash: 'PRSP-List-RecordListHeader-Template',
|
|
31
|
+
Template: /*html*/`
|
|
32
32
|
<!-- DefaultPackage pict view template: [PRSP-List-RecordListHeader-Template] -->
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
<tr>
|
|
34
|
+
{~TS:PRSP-List-RecordListHeader-Template-Header:Record.TableCells~}
|
|
35
|
+
{~T:PRSP-List-RecordListHeader-Template-Extra-Header~}
|
|
36
|
+
{~T:PRSP-List-RecordListActions-Template-Header~}
|
|
37
|
+
</tr>
|
|
37
38
|
<!-- DefaultPackage end view template: [PRSP-List-RecordListHeader-Template] -->
|
|
38
39
|
`
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
Hash: 'PRSP-List-RecordListHeader-Template-Header',
|
|
43
|
+
Template: /*html*/`
|
|
44
|
+
<!-- DefaultPackage pict view template: [PRSP-List-RecordListHeader-Template-Header] -->
|
|
45
|
+
<th style="border-bottom: 1px solid #ccc; padding: 5px; background-color: #f2f2f2; color: #333;">
|
|
46
|
+
{~D:Record.DisplayName~}
|
|
47
|
+
</th>
|
|
48
|
+
<!-- DefaultPackage end view template: [PRSP-List-RecordListHeader-Template-Header] -->
|
|
49
|
+
`
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
Hash: 'PRSP-List-RecordListHeader-Template-Extra-Header',
|
|
53
|
+
Template: /*html*/`
|
|
54
|
+
<!-- DefaultPackage pict view template: [PRSP-List-RecordListHeader-Template-Extra-Header] -->
|
|
55
|
+
{~TBR:Record.RecordSetConfiguration.RecordSetListExtraColumnsHeaderTemplateHash~}
|
|
56
|
+
<!-- DefaultPackage end view template: [PRSP-List-RecordListHeader-Extra-Header] -->
|
|
57
|
+
`
|
|
58
|
+
// {~TBR:Record.RecordSetConfiguration.RecordSetListExtraColumnsHeaderTemplateHash~}
|
|
59
|
+
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
Hash: 'PRSP-List-RecordListActions-Template-Header',
|
|
63
|
+
Template: /*html*/`
|
|
64
|
+
<!-- DefaultPackage pict view template: [PRSP-List-RecordListActions-Template-Header] -->
|
|
65
|
+
<th style="border-bottom: 1px solid #ccc; padding: 5px; background-color: #f2f2f2; color: #333;">
|
|
66
|
+
Actions
|
|
67
|
+
</th>
|
|
68
|
+
<!-- DefaultPackage end view template: [PRSP-List-RecordListActions-Template-Header] -->
|
|
69
|
+
`
|
|
70
|
+
},
|
|
71
|
+
],
|
|
51
72
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
73
|
+
Renderables:
|
|
74
|
+
[
|
|
75
|
+
{
|
|
76
|
+
RenderableHash: 'PRSP_Renderable_RecordListHeader',
|
|
77
|
+
TemplateHash: 'PRSP-List-RecordListHeader-Template',
|
|
78
|
+
DestinationAddress: '#PRSP_RecordListHeader_Container',
|
|
79
|
+
RenderMethod: 'replace'
|
|
80
|
+
}
|
|
81
|
+
],
|
|
61
82
|
|
|
62
|
-
|
|
63
|
-
|
|
83
|
+
Manifests: {}
|
|
84
|
+
});
|
|
64
85
|
|
|
65
86
|
class viewRecordSetListRecordListHeader extends libPictView
|
|
66
87
|
{
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
88
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
89
|
+
{
|
|
90
|
+
let tmpOptions = Object.assign({}, _DEFAULT_CONFIGURATION_List_RecordListHeader, pOptions);
|
|
91
|
+
super(pFable, tmpOptions, pServiceHash);
|
|
92
|
+
}
|
|
72
93
|
}
|
|
73
94
|
|
|
74
95
|
module.exports = viewRecordSetListRecordListHeader;
|
|
@@ -13,7 +13,7 @@ const _DEFAULT_CONFIGURATION__List = (
|
|
|
13
13
|
ViewIdentifier: 'PRSP-List',
|
|
14
14
|
|
|
15
15
|
DefaultRenderable: 'PRSP_Renderable_List',
|
|
16
|
-
DefaultDestinationAddress: '#
|
|
16
|
+
DefaultDestinationAddress: '#PRSP_Container',
|
|
17
17
|
DefaultTemplateRecordAddress: false,
|
|
18
18
|
|
|
19
19
|
// If this is set to true, when the App initializes this will.
|
|
@@ -61,7 +61,7 @@ const _DEFAULT_CONFIGURATION__List = (
|
|
|
61
61
|
{
|
|
62
62
|
RenderableHash: 'PRSP_Renderable_List',
|
|
63
63
|
TemplateHash: 'PRSP-List-Template',
|
|
64
|
-
DestinationAddress: '#
|
|
64
|
+
DestinationAddress: '#PRSP_Container',
|
|
65
65
|
RenderMethod: 'replace'
|
|
66
66
|
}
|
|
67
67
|
],
|
|
@@ -123,13 +123,10 @@ class viewRecordSetList extends libPictRecordSetRecordView
|
|
|
123
123
|
|
|
124
124
|
onBeforeRenderList(pRecordListData)
|
|
125
125
|
{
|
|
126
|
-
// Put code here to preprocess columns into other data parts.
|
|
127
|
-
this.formatDisplayData(pRecordListData);
|
|
128
|
-
|
|
129
126
|
return pRecordListData;
|
|
130
127
|
}
|
|
131
128
|
|
|
132
|
-
|
|
129
|
+
dynamicallyGenerateColumns(pRecordListData)
|
|
133
130
|
{
|
|
134
131
|
pRecordListData.TableCells = [];
|
|
135
132
|
const tmpEntity = pRecordListData.RecordSetConfiguration.Entity;
|
|
@@ -200,6 +197,9 @@ class viewRecordSetList extends libPictRecordSetRecordView
|
|
|
200
197
|
// Get the record schema
|
|
201
198
|
tmpRecordListData.RecordSchema = this.pict.providers[pProviderHash].recordSchema;
|
|
202
199
|
|
|
200
|
+
// TODO: This should be coming from the schema but that can come after we discuss how we deal with default routing
|
|
201
|
+
tmpRecordListData.GUIDAddress = `GUID${this.pict.providers[pProviderHash].options.Entity}`;
|
|
202
|
+
|
|
203
203
|
// Get the "page end record number" for the current page (e.g. for messaging like Record 700 to 800 of 75,000)
|
|
204
204
|
tmpRecordListData.PageEnd = parseInt(tmpRecordListData.Offset) + tmpRecordListData.Records.Records.length;
|
|
205
205
|
|
|
@@ -258,6 +258,16 @@ class viewRecordSetList extends libPictRecordSetRecordView
|
|
|
258
258
|
tmpRecordListData.PageLinkBookmarks.NextLink = tmpRecordListData.PageLinks[tmpRecordListData.PageLinkBookmarks.Next];
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
+
// Put code here to preprocess columns into other data parts.
|
|
262
|
+
if (tmpRecordListData.RecordSetConfiguration.hasOwnProperty('RecordSetListColumns'))
|
|
263
|
+
{
|
|
264
|
+
tmpRecordListData.TableCells = tmpRecordListData.RecordSetConfiguration.RecordSetListColumns;
|
|
265
|
+
}
|
|
266
|
+
else
|
|
267
|
+
{
|
|
268
|
+
this.dynamicallyGenerateColumns(tmpRecordListData);
|
|
269
|
+
}
|
|
270
|
+
|
|
261
271
|
tmpRecordListData = this.onBeforeRenderList(tmpRecordListData);
|
|
262
272
|
|
|
263
273
|
this.renderAsync('PRSP_Renderable_List', tmpRecordListData.RenderDestination, tmpRecordListData,
|
|
@@ -1,60 +1,74 @@
|
|
|
1
1
|
const libPictView = require('pict-view');
|
|
2
2
|
|
|
3
3
|
const _DEFAULT_CONFIGURATION_Read_RecordRead = (
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
4
|
+
{
|
|
5
|
+
ViewIdentifier: 'PRSP-Read-RecordRead',
|
|
6
|
+
|
|
7
|
+
DefaultRenderable: 'PRSP_Renderable_RecordRead',
|
|
8
|
+
DefaultDestinationAddress: '#PRSP_RecordRead_Container',
|
|
9
|
+
DefaultTemplateRecordAddress: false,
|
|
10
|
+
|
|
11
|
+
// If this is set to true, when the App initializes this will.
|
|
12
|
+
// While the App initializes, initialize will be called.
|
|
13
|
+
AutoInitialize: false,
|
|
14
|
+
AutoInitializeOrdinal: 0,
|
|
15
|
+
|
|
16
|
+
// If this is set to true, when the App autorenders (on load) this will.
|
|
17
|
+
// After the App initializes, render will be called.
|
|
18
|
+
AutoRender: false,
|
|
19
|
+
AutoRenderOrdinal: 0,
|
|
20
|
+
|
|
21
|
+
AutoSolveWithApp: false,
|
|
22
|
+
AutoSolveOrdinal: 0,
|
|
23
|
+
|
|
24
|
+
CSS: false,
|
|
25
|
+
CSSPriority: 500,
|
|
26
|
+
|
|
27
|
+
Templates:
|
|
28
|
+
[
|
|
29
|
+
{
|
|
30
|
+
Hash: 'PRSP-Read-RecordRead-Template',
|
|
31
|
+
Template: /*html*/`
|
|
32
32
|
<!-- DefaultPackage pict view template: [PRSP-Read-RecordRead-Template] -->
|
|
33
|
+
<div>
|
|
34
|
+
{~TSWP:PRSP-Read-RecordRead-Template-Row:Record.DisplayFields:Record.Record~}
|
|
35
|
+
</div>
|
|
33
36
|
<!-- DefaultPackage end view template: [PRSP-Read-RecordRead-Template] -->
|
|
34
37
|
`
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
Hash: 'PRSP-Read-RecordRead-Template-Row',
|
|
41
|
+
Template: /*html*/`
|
|
42
|
+
<!-- DefaultPackage pict view template: [PRSP-Read-RecordRead-Template] -->
|
|
43
|
+
<div>
|
|
44
|
+
<span style="font-style: italic;">{~D:Record.Data.DisplayName~}</span>
|
|
45
|
+
<span style="font-weight: bold;">{~DVBK:Record.Payload:Record.Data.Key~}</span>
|
|
46
|
+
</div>
|
|
47
|
+
<!-- DefaultPackage end view template: [PRSP-Read-RecordRead-Template] -->
|
|
48
|
+
`
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
|
|
52
|
+
Renderables:
|
|
53
|
+
[
|
|
54
|
+
{
|
|
55
|
+
RenderableHash: 'PRSP_Renderable_RecordRead',
|
|
56
|
+
TemplateHash: 'PRSP-Read-RecordRead-Template',
|
|
57
|
+
DestinationAddress: '#PRSP_RecordRead_Container',
|
|
58
|
+
RenderMethod: 'replace'
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
|
|
62
|
+
Manifests: {}
|
|
63
|
+
});
|
|
50
64
|
|
|
51
65
|
class viewRecordSetReadRecordRead extends libPictView
|
|
52
66
|
{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
67
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
68
|
+
{
|
|
69
|
+
let tmpOptions = Object.assign({}, _DEFAULT_CONFIGURATION_Read_RecordRead, pOptions);
|
|
70
|
+
super(pFable, tmpOptions, pServiceHash);
|
|
71
|
+
}
|
|
58
72
|
}
|
|
59
73
|
|
|
60
74
|
module.exports = viewRecordSetReadRecordRead;
|
|
@@ -11,7 +11,7 @@ const _DEFAULT_CONFIGURATION__Read = (
|
|
|
11
11
|
ViewIdentifier: 'PRSP-Read',
|
|
12
12
|
|
|
13
13
|
DefaultRenderable: 'PRSP_Renderable_Read',
|
|
14
|
-
DefaultDestinationAddress: '#
|
|
14
|
+
DefaultDestinationAddress: '#PRSP_Container',
|
|
15
15
|
DefaultTemplateRecordAddress: false,
|
|
16
16
|
|
|
17
17
|
// If this is set to true, when the App initializes this will.
|
|
@@ -36,9 +36,23 @@ const _DEFAULT_CONFIGURATION__Read = (
|
|
|
36
36
|
Hash: 'PRSP-Read-Template',
|
|
37
37
|
Template: /*html*/`
|
|
38
38
|
<!-- DefaultPackage pict view template: [PRSP-Read-Template] -->
|
|
39
|
+
<h1>{~D:Record.RecordSet~} {~D:Record.GUIDAddress~} [{~D:Record.RecordConfiguration.GUIDRecord~}]</h1>
|
|
40
|
+
<!--
|
|
41
|
+
{~DJ:Record~}
|
|
42
|
+
-->
|
|
43
|
+
{~T:PRSP-Read-RecordRead-Template~}
|
|
39
44
|
<!-- DefaultPackage end view template: [PRSP-Read-Template] -->
|
|
40
45
|
`
|
|
41
|
-
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
Hash: 'PRSP-Read-Link-Name-Template',
|
|
49
|
+
Template: `View`
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
Hash: 'PRSP-Read-Link-URL-Template',
|
|
53
|
+
// TODO: Double payload pattern...
|
|
54
|
+
Template: `#/PSRS/{~D:Record.Payload.Payload.RecordSet~}/Read/{~DVBK:Record.Payload.Data:Record.Payload.Payload.GUIDAddress~}`
|
|
55
|
+
},
|
|
42
56
|
],
|
|
43
57
|
|
|
44
58
|
Renderables:
|
|
@@ -46,7 +60,7 @@ const _DEFAULT_CONFIGURATION__Read = (
|
|
|
46
60
|
{
|
|
47
61
|
RenderableHash: 'PRSP_Renderable_Read',
|
|
48
62
|
TemplateHash: 'PRSP-Read-Template',
|
|
49
|
-
DestinationAddress: '#
|
|
63
|
+
DestinationAddress: '#PRSP_Container',
|
|
50
64
|
RenderMethod: 'replace'
|
|
51
65
|
}
|
|
52
66
|
],
|
|
@@ -62,22 +76,60 @@ class viewRecordSetRead extends libPictRecordSetRecordView
|
|
|
62
76
|
super(pFable, tmpOptions, pServiceHash);
|
|
63
77
|
|
|
64
78
|
this.childViews = {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
recordListHeader: null,
|
|
70
|
-
recordListEntry: null,
|
|
71
|
-
paginationBottom: null
|
|
79
|
+
viewHeaderRead: null,
|
|
80
|
+
viewTabBarRead: null,
|
|
81
|
+
viewRecordRead: null,
|
|
82
|
+
viewRecordReadExtra: null
|
|
72
83
|
};
|
|
73
84
|
}
|
|
74
85
|
|
|
86
|
+
|
|
87
|
+
handleRecordSetReadRoute(pRoutePayload)
|
|
88
|
+
{
|
|
89
|
+
if (typeof(pRoutePayload) != 'object')
|
|
90
|
+
{
|
|
91
|
+
throw new Error(`Pict RecordSet Read view route handler called with invalid route payload.`);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const tmpProviderConfiguration = this.pict.PictSectionRecordSet.recordSetProviderConfigurations[pRoutePayload.data.RecordSet];
|
|
95
|
+
const tmpProviderHash = `RSP-Provider-${pRoutePayload.data.RecordSet}`;
|
|
96
|
+
|
|
97
|
+
tmpProviderConfiguration.RoutePayload = pRoutePayload;
|
|
98
|
+
tmpProviderConfiguration.RecordSet = pRoutePayload.data.RecordSet;
|
|
99
|
+
tmpProviderConfiguration.GUIDRecord = pRoutePayload.data.GUIDRecord;
|
|
100
|
+
|
|
101
|
+
return this.renderRead(tmpProviderConfiguration, tmpProviderHash, pRoutePayload.data.GUIDRecord);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
addRoutes(pPictRouter)
|
|
105
|
+
{
|
|
106
|
+
pPictRouter.addRoute('/PSRS/:RecordSet/Read/:GUIDRecord', this.handleRecordSetReadRoute.bind(this));
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
|
|
75
110
|
onBeforeRenderRead(pRecordReadData)
|
|
76
111
|
{
|
|
112
|
+
this.formatDisplayData(pRecordReadData);
|
|
77
113
|
return pRecordReadData;
|
|
78
114
|
}
|
|
79
115
|
|
|
80
|
-
|
|
116
|
+
formatDisplayData(pRecordListData)
|
|
117
|
+
{
|
|
118
|
+
pRecordListData.DisplayFields = [];
|
|
119
|
+
const tmpSchema = pRecordListData.RecordSchema;
|
|
120
|
+
const tmpProperties = tmpSchema?.properties;
|
|
121
|
+
// loop throught the schema and add the columns to the tableCells -- just show all for now.
|
|
122
|
+
for (const tmpColumn in tmpProperties)
|
|
123
|
+
{
|
|
124
|
+
pRecordListData.DisplayFields.push({
|
|
125
|
+
'Key': tmpColumn,
|
|
126
|
+
'DisplayName': tmpProperties?.[tmpColumn].title || tmpColumn,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
return pRecordListData;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
async renderRead(pRecordConfiguration, pProviderHash, pRecordGUID)
|
|
81
133
|
{
|
|
82
134
|
// Get the records
|
|
83
135
|
if (!(pProviderHash in this.pict.providers))
|
|
@@ -98,26 +150,14 @@ class viewRecordSetRead extends libPictRecordSetRecordView
|
|
|
98
150
|
};
|
|
99
151
|
|
|
100
152
|
// If the record configuration does not have a GUID, try to infer one from the RecordSet name
|
|
101
|
-
|
|
102
|
-
{
|
|
103
|
-
// So this will be something like "GUIDBook" or "GUIDAuthor"
|
|
104
|
-
tmpRecordReadData.RecordConfiguration.GUIDAddress = `GUID${pRecordConfiguration.RecordSet}`;
|
|
105
|
-
}
|
|
153
|
+
// TODO: This should be coming from the schema but that can come after we discuss how we deal with default routing
|
|
154
|
+
tmpRecordReadData.GUIDAddress = `GUID${this.pict.providers[pProviderHash].options.Entity}`;
|
|
106
155
|
|
|
107
|
-
tmpRecordReadData.
|
|
108
|
-
tmpRecordReadData.TotalRecordCount = await this.pict.providers[pProviderHash].getRecordSetCount({Offset:tmpRecordReadData.Offset, PageSize:tmpRecordReadData.PageSize});
|
|
156
|
+
tmpRecordReadData.Record = await this.pict.providers[pProviderHash].getRecordByGUID(pRecordGUID);
|
|
109
157
|
tmpRecordReadData.RecordSchema = this.pict.providers[pProviderHash].recordSchema;
|
|
110
158
|
|
|
111
159
|
tmpRecordReadData = this.onBeforeRenderRead(tmpRecordReadData);
|
|
112
160
|
|
|
113
|
-
// If there isn't a title template passed in as part of the configuration,, create one.
|
|
114
|
-
if (!tmpRecordReadData.RecordConfiguration.TitleTemplate)
|
|
115
|
-
{
|
|
116
|
-
// This dynamically grabs the guid address and tries to pull it from the record
|
|
117
|
-
tmpRecordReadData.RecordConfiguration.TitleTemplate = `{~D:Record.RecordSet~} GUID [{~D:Record.Record.${tmpRecordReadData.RecordConfiguration.GUIDAddress}}] `;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
|
|
121
161
|
this.renderAsync('PRSP_Renderable_Read', tmpRecordReadData.RenderDestination, tmpRecordReadData,
|
|
122
162
|
function (pError)
|
|
123
163
|
{
|
|
@@ -129,11 +169,11 @@ class viewRecordSetRead extends libPictRecordSetRecordView
|
|
|
129
169
|
|
|
130
170
|
if (this.pict.LogNoisiness > 0)
|
|
131
171
|
{
|
|
132
|
-
this.pict.log.info(`RecordSetRead: Rendered read ${tmpRecordReadData.RecordSet} with ${tmpRecordReadData.RecordConfiguration.
|
|
172
|
+
this.pict.log.info(`RecordSetRead: Rendered read ${tmpRecordReadData.RecordSet} with ${tmpRecordReadData.RecordConfiguration.GUIDRecord} []`, tmpRecordReadData);
|
|
133
173
|
}
|
|
134
174
|
else
|
|
135
175
|
{
|
|
136
|
-
this.pict.log.info(`RecordSetRead: Rendered read ${tmpRecordReadData.RecordSet} with ${tmpRecordReadData.RecordConfiguration.
|
|
176
|
+
this.pict.log.info(`RecordSetRead: Rendered read ${tmpRecordReadData.RecordSet} with ${tmpRecordReadData.RecordConfiguration.GUIDRecord} []`);
|
|
137
177
|
}
|
|
138
178
|
return true;
|
|
139
179
|
}.bind(this));
|
|
@@ -152,6 +192,9 @@ class viewRecordSetRead extends libPictRecordSetRecordView
|
|
|
152
192
|
this.childViews.recordReadExtra.initialize();
|
|
153
193
|
this.childViews.tabBarRead.initialize();
|
|
154
194
|
|
|
195
|
+
// Add the route templates for the read view
|
|
196
|
+
this.pict.PictSectionRecordSet.addRecordLinkTemplate('PRSP-Read-Link-Name-Template', 'PRSP-Read-Link-URL-Template', true);
|
|
197
|
+
|
|
155
198
|
return super.onInitialize();
|
|
156
199
|
}
|
|
157
200
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export = PictRecordSetRouter;
|
|
2
|
+
declare class PictRecordSetRouter {
|
|
3
|
+
constructor(pFable: any, pOptions: any, pServiceHash: any);
|
|
4
|
+
/** @type {Record<string, any>} */
|
|
5
|
+
options: Record<string, any>;
|
|
6
|
+
/** @type {import('pict')} */
|
|
7
|
+
pict: import("pict");
|
|
8
|
+
linkTemplates: any[];
|
|
9
|
+
addRecordLinkTemplate(pNameTemplate: any, pURLTemplate: any, pDefault: any): {
|
|
10
|
+
Name: any;
|
|
11
|
+
URL: any;
|
|
12
|
+
Default: any;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
declare namespace PictRecordSetRouter {
|
|
16
|
+
export { _DEFAULT_PROVIDER_CONFIGURATION as default_configuration };
|
|
17
|
+
}
|
|
18
|
+
declare namespace _DEFAULT_PROVIDER_CONFIGURATION {
|
|
19
|
+
let ProviderIdentifier: string;
|
|
20
|
+
let AutoInitialize: boolean;
|
|
21
|
+
let AutoInitializeOrdinal: number;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=RecordSet-Link-Manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecordSet-Link-Manager.d.ts","sourceRoot":"","sources":["../../source/providers/RecordSet-Link-Manager.js"],"names":[],"mappings":";AAUA;IAEC,2DAkBC;IAbA,kCAAkC;IAClC,SADW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAClB;IACZ,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IAST,qBAAuB;IAIxB;;;;MAcC;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecordSet-RecordProvider-MeadowEndpoints.d.ts","sourceRoot":"","sources":["../../source/providers/RecordSet-RecordProvider-MeadowEndpoints.js"],"names":[],"mappings":";AAGA;;;;;;;;;;;;;;;GAeG;AAEH;;;GAGG;AACH;IAYE,yBAAyB;IACzB,YADW,UAAU,CACN;IAQf,kCAAkC;IAClC,SADW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CACZ;IAGnB;;;OAGG;IAEH;;;;OAIG;IACH,qBAFW,MAAM,GAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"RecordSet-RecordProvider-MeadowEndpoints.d.ts","sourceRoot":"","sources":["../../source/providers/RecordSet-RecordProvider-MeadowEndpoints.js"],"names":[],"mappings":";AAGA;;;;;;;;;;;;;;;GAeG;AAEH;;;GAGG;AACH;IAYE,yBAAyB;IACzB,YADW,UAAU,CACN;IAQf,kCAAkC;IAClC,SADW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CACZ;IAGnB;;;OAGG;IAEH;;;;OAIG;IACH,qBAFW,MAAM,GAAC,MAAM,gBA4BvB;IAED;;;;OAIG;IACH,uBAFW,MAAM,GAAC,MAAM,gBAuBvB;IA+CD;;;;OAIG;IACH,4BAFW,eAAe,gBAyBzB;IAED;;;;OAIG;IACH,sBAFW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,gBAsB7B;IAED;;;;OAIG;IACH,sBAFW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,gBAsB7B;IAED;;;;OAIG;IACH,sBAFW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,gBAsB7B;IAED;;;;OAIG;IACH,sBAFW,MAAM,GAAC,MAAM,gBAKvB;IAaD;;;;OAIG;IACH,qBAFW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,gBAK7B;IAcD;;OAEG;IACH,6BAFW,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,QAgBjC;CAMD;;;;;0BA7UY,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,GAAG,KAAK,IAAI;uBAErC,OAAO,oCAAoC,EAAE,eAAe;uBAC5D,OAAO,oCAAoC,EAAE,eAAe;kBAE5D;IACT,OAAO,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC1F,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC5E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC7E,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC9E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC7E,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC5E,UAAU,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,IAAI,CAAC;CAC7F"}
|
|
@@ -25,6 +25,7 @@ declare class RecordSetMetacontroller {
|
|
|
25
25
|
loadRecordSetDynamcally(pRecordSet: any, pEntity: any, pDefaultFilter: any): any;
|
|
26
26
|
handleLoadDynamicRecordSetRoute(pRoutePayload: any): any;
|
|
27
27
|
addRoutes(pPictRouter: any): boolean;
|
|
28
|
+
addRecordLinkTemplate(pNameTemplate: any, pURLTemplate: any, pDefault: any): any;
|
|
28
29
|
initialize(): true | this;
|
|
29
30
|
}
|
|
30
31
|
declare namespace RecordSetMetacontroller {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecordsSet-MetaController.d.ts","sourceRoot":"","sources":["../../source/services/RecordsSet-MetaController.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"RecordsSet-MetaController.d.ts","sourceRoot":"","sources":["../../source/services/RecordsSet-MetaController.js"],"names":[],"mappings":";AAoBA;IAEC,2DAyBC;IApBA,0HAA0H;IAC1H,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,iCAAiC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,KAAK,GAAG,CAAA;KAAE,CAC5G;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;IACR,kBAAkB;IAClB,SADW,GAAG,CACF;IACZ,qBAAqB;IACrB,MADW,MAAM,CACR;IAET;;;;;MAKC;IAED,uBAA4B;IAC5B,oCAAyC;IAEzC,yBAA4B;IA6B7B,kEAiEC;IAED,4EAmBC;IAED,iFAyCC;IAED,yDAaC;IAED,qCAMC;IAED,iFAGC;IAED,0BAuCC;CACD"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export = viewPictSectionRecordSetViewBase;
|
|
2
2
|
declare class viewPictSectionRecordSetViewBase extends libPictView {
|
|
3
3
|
constructor(pFable: any, pOptions: any, pServiceHash: any);
|
|
4
|
-
/** @type {import('pict') & {
|
|
4
|
+
/** @type {import('pict') & {
|
|
5
|
+
* log: any,
|
|
6
|
+
* instantiateServiceProviderWithoutRegistration: (hash: String) => any,
|
|
7
|
+
* PictSectionRecordSet: InstanceType<import('../Pict-Section-RecordSet.js')> }
|
|
8
|
+
* } */
|
|
5
9
|
pict: import("pict") & {
|
|
6
10
|
log: any;
|
|
7
11
|
instantiateServiceProviderWithoutRegistration: (hash: string) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecordSet-RecordBaseView.d.ts","sourceRoot":"","sources":["../../source/views/RecordSet-RecordBaseView.js"],"names":[],"mappings":";AA4DA;IAEC,
|
|
1
|
+
{"version":3,"file":"RecordSet-RecordBaseView.d.ts","sourceRoot":"","sources":["../../source/views/RecordSet-RecordBaseView.js"],"names":[],"mappings":";AA4DA;IAEC,2DAUC;IANA;;;;YAIQ;IACR,MALW,OAAO,MAAM,CAAC,GAAG;QACpB,GAAG,EAAE,GAAG,CAAC;QACT,6CAA6C,EAAE,CAAC,IAAI,QAAQ,KAAK,GAAG,CAAC;QACrE,oBAAoB,EAAE,YAAY,CAAC;;;;;;;;SAAsC,CAAC,CAAA;KAAE,CAE3E;IAGV,qCAIC;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecordSet-List-RecordListEntry.d.ts","sourceRoot":"","sources":["../../../source/views/list/RecordSet-List-RecordListEntry.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"RecordSet-List-RecordListEntry.d.ts","sourceRoot":"","sources":["../../../source/views/list/RecordSet-List-RecordListEntry.js"],"names":[],"mappings":";AAgGA;IAEC,2DAIC;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecordSet-List-RecordListHeader.d.ts","sourceRoot":"","sources":["../../../source/views/list/RecordSet-List-RecordListHeader.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"RecordSet-List-RecordListHeader.d.ts","sourceRoot":"","sources":["../../../source/views/list/RecordSet-List-RecordListHeader.js"],"names":[],"mappings":";AA2EA;IAEC,2DAIC;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecordSet-List.d.ts","sourceRoot":"","sources":["../../../source/views/list/RecordSet-List.js"],"names":[],"mappings":";AAuEA;IAOE;;;;;;;;MAQC;IAGF,+DAuBC;IAWD,8CAMC;IAED,6CAkCC;IA9BA,iCAUC;IAsBF,
|
|
1
|
+
{"version":3,"file":"RecordSet-List.d.ts","sourceRoot":"","sources":["../../../source/views/list/RecordSet-List.js"],"names":[],"mappings":";AAuEA;IAOE;;;;;;;;MAQC;IAGF,+DAuBC;IAWD,8CAMC;IAED,6CAkCC;IA9BA,iCAUC;IAsBF,iIAqHC;CAuBD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecordSet-Read-RecordRead.d.ts","sourceRoot":"","sources":["../../../source/views/read/RecordSet-Read-RecordRead.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"RecordSet-Read-RecordRead.d.ts","sourceRoot":"","sources":["../../../source/views/read/RecordSet-Read-RecordRead.js"],"names":[],"mappings":";AAgEA;IAEC,2DAIC;CACD"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
export = viewRecordSetRead;
|
|
2
2
|
declare class viewRecordSetRead extends libPictRecordSetRecordView {
|
|
3
3
|
childViews: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
recordListHeader: any;
|
|
9
|
-
recordListEntry: any;
|
|
10
|
-
paginationBottom: any;
|
|
4
|
+
viewHeaderRead: any;
|
|
5
|
+
viewTabBarRead: any;
|
|
6
|
+
viewRecordRead: any;
|
|
7
|
+
viewRecordReadExtra: any;
|
|
11
8
|
};
|
|
9
|
+
handleRecordSetReadRoute(pRoutePayload: any): Promise<boolean>;
|
|
12
10
|
onBeforeRenderRead(pRecordReadData: any): any;
|
|
13
|
-
|
|
11
|
+
formatDisplayData(pRecordListData: any): any;
|
|
12
|
+
renderRead(pRecordConfiguration: any, pProviderHash: any, pRecordGUID: any): Promise<boolean>;
|
|
14
13
|
}
|
|
15
14
|
declare namespace viewRecordSetRead {
|
|
16
15
|
export { _DEFAULT_CONFIGURATION__Read as default_configuration };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecordSet-Read.d.ts","sourceRoot":"","sources":["../../../source/views/read/RecordSet-Read.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"RecordSet-Read.d.ts","sourceRoot":"","sources":["../../../source/views/read/RecordSet-Read.js"],"names":[],"mappings":";AAsEA;IAOE;;;;;MAKC;IAIF,+DAeC;IAQD,8CAIC;IAED,6CAcC;IAED,8FAgDC;CAoBD"}
|