pict-section-form 1.0.99 → 1.0.101
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/package.json +5 -5
- package/source/templates/Pict-Template-ControlFromDynamicManifest.js +14 -6
- package/source/templates/Pict-Template-ControlFromDynamicManifestForHash.js +14 -6
- package/source/templates/Pict-Template-DyanmicView-Value.js +13 -7
- package/source/templates/Pict-Template-DyanmicView-ValueByHash.js +13 -7
- package/source/templates/Pict-Template-Metacontroller-ValueSetWithGroup.js +16 -10
- package/source/templates/Pict-Template-Metatemplate-Input.js +21 -7
- package/source/templates/Pict-Template-Metatemplate-InputWithHashAddress.js +39 -17
- package/source/templates/Pict-Template-Proxy-PluckJoinUnique.js +3 -2
- package/types/source/templates/Pict-Template-ControlFromDynamicManifest.d.ts +4 -3
- package/types/source/templates/Pict-Template-ControlFromDynamicManifest.d.ts.map +1 -1
- package/types/source/templates/Pict-Template-ControlFromDynamicManifestForHash.d.ts +4 -3
- package/types/source/templates/Pict-Template-ControlFromDynamicManifestForHash.d.ts.map +1 -1
- package/types/source/templates/Pict-Template-DyanmicView-Value.d.ts +4 -3
- package/types/source/templates/Pict-Template-DyanmicView-Value.d.ts.map +1 -1
- package/types/source/templates/Pict-Template-DyanmicView-ValueByHash.d.ts +4 -3
- package/types/source/templates/Pict-Template-DyanmicView-ValueByHash.d.ts.map +1 -1
- package/types/source/templates/Pict-Template-Metacontroller-ValueSetWithGroup.d.ts +4 -1
- package/types/source/templates/Pict-Template-Metacontroller-ValueSetWithGroup.d.ts.map +1 -1
- package/types/source/templates/Pict-Template-Metatemplate-Input.d.ts +12 -1
- package/types/source/templates/Pict-Template-Metatemplate-Input.d.ts.map +1 -1
- package/types/source/templates/Pict-Template-Metatemplate-InputWithHashAddress.d.ts +12 -1
- package/types/source/templates/Pict-Template-Metatemplate-InputWithHashAddress.d.ts.map +1 -1
- package/types/source/templates/Pict-Template-Proxy-PluckJoinUnique.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pict-section-form",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.101",
|
|
4
4
|
"description": "Pict dynamic form sections",
|
|
5
5
|
"main": "source/Pict-Section-Form.js",
|
|
6
6
|
"directories": {
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"browser-env": "^3.3.0",
|
|
32
32
|
"eslint": "^9.26.0",
|
|
33
33
|
"jquery": "^3.7.1",
|
|
34
|
-
"pict": "^1.0.
|
|
34
|
+
"pict": "^1.0.275",
|
|
35
35
|
"pict-application": "^1.0.27",
|
|
36
36
|
"pict-service-commandlineutility": "^1.0.15",
|
|
37
|
-
"quackage": "^1.0.
|
|
37
|
+
"quackage": "^1.0.42",
|
|
38
38
|
"tui-grid": "^4.21.22",
|
|
39
39
|
"typescript": "^5.8.3"
|
|
40
40
|
},
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"marked": "^15.0.11",
|
|
44
44
|
"pict-provider": "^1.0.6",
|
|
45
45
|
"pict-section-tuigrid": "^1.0.27",
|
|
46
|
-
"pict-template": "^1.0.
|
|
47
|
-
"pict-view": "^1.0.
|
|
46
|
+
"pict-template": "^1.0.12",
|
|
47
|
+
"pict-view": "^1.0.62"
|
|
48
48
|
},
|
|
49
49
|
"mocha": {
|
|
50
50
|
"diff": true,
|
|
@@ -66,11 +66,12 @@ class PictTemplateControlFromDynamicManifest extends libPictTemplate
|
|
|
66
66
|
* @param {string} pTemplateHash - The schema hash of the control.
|
|
67
67
|
* @param {object} pRecord - The record object.
|
|
68
68
|
* @param {array} pContextArray - The context array.
|
|
69
|
+
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
69
70
|
* @returns {string} - The rendered template.
|
|
70
71
|
*/
|
|
71
|
-
render(pTemplateHash, pRecord, pContextArray)
|
|
72
|
+
render(pTemplateHash, pRecord, pContextArray, pScope)
|
|
72
73
|
{
|
|
73
|
-
return this.renderAsync(pTemplateHash, pRecord, null, pContextArray);
|
|
74
|
+
return this.renderAsync(pTemplateHash, pRecord, null, pContextArray, pScope);
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
/**
|
|
@@ -78,11 +79,12 @@ class PictTemplateControlFromDynamicManifest extends libPictTemplate
|
|
|
78
79
|
*
|
|
79
80
|
* @param {string} pTemplateHash - The schema hash of the control.
|
|
80
81
|
* @param {object} pRecord - The record object.
|
|
81
|
-
* @param {function} fCallback - The callback function.
|
|
82
|
+
* @param {function | null} fCallback - The callback function.
|
|
82
83
|
* @param {array} pContextArray - The context array.
|
|
83
|
-
* @
|
|
84
|
+
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
85
|
+
* @returns {string | undefined} - The rendered template or undefined if callback is provided.
|
|
84
86
|
*/
|
|
85
|
-
renderAsync(pTemplateHash, pRecord, fCallback, pContextArray)
|
|
87
|
+
renderAsync(pTemplateHash, pRecord, fCallback, pContextArray, pScope)
|
|
86
88
|
{
|
|
87
89
|
const tmpMetatemplateGenerator = this.pict.providers.MetatemplateGenerator;
|
|
88
90
|
const tmpHash = pTemplateHash.trim();
|
|
@@ -94,9 +96,15 @@ class PictTemplateControlFromDynamicManifest extends libPictTemplate
|
|
|
94
96
|
if (!descriptor)
|
|
95
97
|
{
|
|
96
98
|
this.log.error(`PictTemplateControlFromDynamicManifest: Cannot find descriptor for address [${tmpHash}]`);
|
|
99
|
+
if (typeof fCallback === 'function')
|
|
100
|
+
{
|
|
101
|
+
return fCallback(null, '');
|
|
102
|
+
}
|
|
97
103
|
return '';
|
|
98
104
|
}
|
|
99
105
|
const tmpView = this.pict.views[descriptor.PictForm.ViewHash];
|
|
106
|
+
const tmpScope = tmpView || pScope;
|
|
107
|
+
const tmpContextArray = tmpScope ? [ tmpScope ] : (pContextArray || [ this.pict ]);
|
|
100
108
|
|
|
101
109
|
this.pict.providers.MetatemplateMacros.buildInputMacros(tmpView, descriptor);
|
|
102
110
|
|
|
@@ -105,7 +113,7 @@ class PictTemplateControlFromDynamicManifest extends libPictTemplate
|
|
|
105
113
|
`getInput("${descriptor.PictForm.GroupIndex}","${descriptor.PictForm.RowIndex}","${descriptor.PictForm.InputIndex}")`);
|
|
106
114
|
|
|
107
115
|
// Now parse it and return it.
|
|
108
|
-
return this.pict.parseTemplate(tmpTemplate, descriptor, fCallback,
|
|
116
|
+
return this.pict.parseTemplate(tmpTemplate, descriptor, fCallback, tmpContextArray, tmpScope);
|
|
109
117
|
}
|
|
110
118
|
}
|
|
111
119
|
|
|
@@ -31,11 +31,12 @@ class PictTemplateControlFromDynamicManifest extends libPictTemplate
|
|
|
31
31
|
* @param {string} pTemplateHash - The schema hash of the control.
|
|
32
32
|
* @param {object} pRecord - The record object.
|
|
33
33
|
* @param {array} pContextArray - The context array.
|
|
34
|
+
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
34
35
|
* @returns {string} - The rendered template.
|
|
35
36
|
*/
|
|
36
|
-
render(pTemplateHash, pRecord, pContextArray)
|
|
37
|
+
render(pTemplateHash, pRecord, pContextArray, pScope)
|
|
37
38
|
{
|
|
38
|
-
return this.renderAsync(pTemplateHash, pRecord, null, pContextArray);
|
|
39
|
+
return this.renderAsync(pTemplateHash, pRecord, null, pContextArray, pScope);
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
/**
|
|
@@ -43,11 +44,12 @@ class PictTemplateControlFromDynamicManifest extends libPictTemplate
|
|
|
43
44
|
*
|
|
44
45
|
* @param {string} pTemplateHash - The schema hash of the control.
|
|
45
46
|
* @param {object} pRecord - The record object.
|
|
46
|
-
* @param {function} fCallback - The callback function.
|
|
47
|
+
* @param {function | null} fCallback - The callback function.
|
|
47
48
|
* @param {array} pContextArray - The context array.
|
|
48
|
-
* @
|
|
49
|
+
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
50
|
+
* @returns {string | undefined} - The rendered template or undefined if callback is provided.
|
|
49
51
|
*/
|
|
50
|
-
renderAsync(pTemplateHash, pRecord, fCallback, pContextArray)
|
|
52
|
+
renderAsync(pTemplateHash, pRecord, fCallback, pContextArray, pScope)
|
|
51
53
|
{
|
|
52
54
|
const tmpMetatemplateGenerator = this.pict.providers.MetatemplateGenerator;
|
|
53
55
|
const tmpHash = pTemplateHash.trim();
|
|
@@ -59,9 +61,15 @@ class PictTemplateControlFromDynamicManifest extends libPictTemplate
|
|
|
59
61
|
if (!descriptor)
|
|
60
62
|
{
|
|
61
63
|
this.log.error(`PictTemplateControlFromDynamicManifest: Cannot find descriptor for hash [${tmpHash}]`);
|
|
64
|
+
if (typeof fCallback === 'function')
|
|
65
|
+
{
|
|
66
|
+
return fCallback(null, '');
|
|
67
|
+
}
|
|
62
68
|
return '';
|
|
63
69
|
}
|
|
64
70
|
const tmpView = this.pict.views[descriptor.PictForm.ViewHash];
|
|
71
|
+
const tmpScope = tmpView || pScope;
|
|
72
|
+
const tmpContextArray = tmpScope ? [ tmpScope ] : (pContextArray || [ this.pict ]);
|
|
65
73
|
|
|
66
74
|
this.pict.providers.MetatemplateMacros.buildInputMacros(tmpView, descriptor);
|
|
67
75
|
|
|
@@ -70,7 +78,7 @@ class PictTemplateControlFromDynamicManifest extends libPictTemplate
|
|
|
70
78
|
`getInput("${descriptor.PictForm.GroupIndex}","${descriptor.PictForm.RowIndex}","${descriptor.PictForm.InputIndex}")`);
|
|
71
79
|
|
|
72
80
|
// Now parse it and return it.
|
|
73
|
-
return this.pict.parseTemplate(tmpTemplate, descriptor, fCallback,
|
|
81
|
+
return this.pict.parseTemplate(tmpTemplate, descriptor, fCallback, tmpContextArray, tmpScope);
|
|
74
82
|
}
|
|
75
83
|
}
|
|
76
84
|
|
|
@@ -31,11 +31,12 @@ class PictTemplateGetViewSchemaValue extends libPictTemplate
|
|
|
31
31
|
* @param {string} pTemplateHash - The schema hash of the control.
|
|
32
32
|
* @param {object} pRecord - The record object.
|
|
33
33
|
* @param {array} pContextArray - The context array.
|
|
34
|
+
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
34
35
|
* @returns {string} - The rendered template.
|
|
35
36
|
*/
|
|
36
|
-
render(pTemplateHash, pRecord, pContextArray)
|
|
37
|
+
render(pTemplateHash, pRecord, pContextArray, pScope)
|
|
37
38
|
{
|
|
38
|
-
return this.renderAsync(pTemplateHash, pRecord, null, pContextArray);
|
|
39
|
+
return this.renderAsync(pTemplateHash, pRecord, null, pContextArray, pScope);
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
/**
|
|
@@ -43,11 +44,12 @@ class PictTemplateGetViewSchemaValue extends libPictTemplate
|
|
|
43
44
|
*
|
|
44
45
|
* @param {string} pTemplateHash - The schema hash of the control.
|
|
45
46
|
* @param {object} pRecord - The record object.
|
|
46
|
-
* @param {function} fCallback - The callback function.
|
|
47
|
+
* @param {function | null} fCallback - The callback function.
|
|
47
48
|
* @param {array} pContextArray - The context array.
|
|
48
|
-
* @
|
|
49
|
+
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
50
|
+
* @returns {string | undefined} - The rendered template or undefined if callback is provided.
|
|
49
51
|
*/
|
|
50
|
-
renderAsync(pTemplateHash, pRecord, fCallback, pContextArray)
|
|
52
|
+
renderAsync(pTemplateHash, pRecord, fCallback, pContextArray, pScope)
|
|
51
53
|
{
|
|
52
54
|
const [ tmpSchemaAddress, tmpTemplateHash ] = pTemplateHash.trim().split('^');
|
|
53
55
|
/** @type{import('../views/Pict-View-Form-Metacontroller.js')} */
|
|
@@ -58,6 +60,10 @@ class PictTemplateGetViewSchemaValue extends libPictTemplate
|
|
|
58
60
|
if (!descriptor)
|
|
59
61
|
{
|
|
60
62
|
this.log.error(`PictTemplateGetViewSchemaValue: Cannot find descriptor for address [${tmpSchemaAddress}]`);
|
|
63
|
+
if (typeof fCallback === 'function')
|
|
64
|
+
{
|
|
65
|
+
return fCallback(null, '');
|
|
66
|
+
}
|
|
61
67
|
return '';
|
|
62
68
|
}
|
|
63
69
|
/** @type {import('../views/Pict-View-DynamicForm.js')} */
|
|
@@ -70,7 +76,7 @@ class PictTemplateGetViewSchemaValue extends libPictTemplate
|
|
|
70
76
|
const tmpRecord = { Value: value, ParentRecord: pRecord, View: tmpView, Descriptor: descriptor };
|
|
71
77
|
if (typeof fCallback !== 'function')
|
|
72
78
|
{
|
|
73
|
-
return this.pict.parseTemplateByHash(tmpTemplateHash, tmpRecord, null, pContextArray);
|
|
79
|
+
return this.pict.parseTemplateByHash(tmpTemplateHash, tmpRecord, null, pContextArray, pScope);
|
|
74
80
|
}
|
|
75
81
|
return this.pict.parseTemplateByHash(tmpTemplateHash, tmpRecord,
|
|
76
82
|
(pError, pValue) =>
|
|
@@ -80,7 +86,7 @@ class PictTemplateGetViewSchemaValue extends libPictTemplate
|
|
|
80
86
|
return fCallback(pError, '');
|
|
81
87
|
}
|
|
82
88
|
return fCallback(null, pValue);
|
|
83
|
-
}, pContextArray);
|
|
89
|
+
}, pContextArray, pScope);
|
|
84
90
|
}
|
|
85
91
|
|
|
86
92
|
if (typeof(fCallback) === 'function')
|
|
@@ -31,11 +31,12 @@ class PictTemplateGetViewSchemaValueByHash extends libPictTemplate
|
|
|
31
31
|
* @param {string} pTemplateHash - The schema hash of the control.
|
|
32
32
|
* @param {object} pRecord - The record object.
|
|
33
33
|
* @param {array} pContextArray - The context array.
|
|
34
|
+
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
34
35
|
* @returns {string} - The rendered template.
|
|
35
36
|
*/
|
|
36
|
-
render(pTemplateHash, pRecord, pContextArray)
|
|
37
|
+
render(pTemplateHash, pRecord, pContextArray, pScope)
|
|
37
38
|
{
|
|
38
|
-
return this.renderAsync(pTemplateHash, pRecord, null, pContextArray);
|
|
39
|
+
return this.renderAsync(pTemplateHash, pRecord, null, pContextArray, pScope);
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
/**
|
|
@@ -43,11 +44,12 @@ class PictTemplateGetViewSchemaValueByHash extends libPictTemplate
|
|
|
43
44
|
*
|
|
44
45
|
* @param {string} pTemplateHash - The schema hash of the control.
|
|
45
46
|
* @param {object} pRecord - The record object.
|
|
46
|
-
* @param {function} fCallback - The callback function.
|
|
47
|
+
* @param {function | null} fCallback - The callback function.
|
|
47
48
|
* @param {array} pContextArray - The context array.
|
|
48
|
-
* @
|
|
49
|
+
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
50
|
+
* @returns {string | undefined} - The rendered template or undefined if callback is provided.
|
|
49
51
|
*/
|
|
50
|
-
renderAsync(pTemplateHash, pRecord, fCallback, pContextArray)
|
|
52
|
+
renderAsync(pTemplateHash, pRecord, fCallback, pContextArray, pScope)
|
|
51
53
|
{
|
|
52
54
|
const [ tmpSchemaHash, tmpTemplateHash ] = pTemplateHash.trim().split('^');
|
|
53
55
|
/** @type{import('../views/Pict-View-Form-Metacontroller.js')} */
|
|
@@ -58,6 +60,10 @@ class PictTemplateGetViewSchemaValueByHash extends libPictTemplate
|
|
|
58
60
|
if (!descriptor)
|
|
59
61
|
{
|
|
60
62
|
this.log.error(`PictTemplateGetViewSchemaValueByHash: Cannot find descriptor for address [${tmpSchemaHash}]`);
|
|
63
|
+
if (typeof fCallback === 'function')
|
|
64
|
+
{
|
|
65
|
+
return fCallback(null, '');
|
|
66
|
+
}
|
|
61
67
|
return '';
|
|
62
68
|
}
|
|
63
69
|
/** @type {import('../views/Pict-View-DynamicForm.js')} */
|
|
@@ -70,7 +76,7 @@ class PictTemplateGetViewSchemaValueByHash extends libPictTemplate
|
|
|
70
76
|
const tmpRecord = { Value: value, ParentRecord: pRecord, View: tmpView, Descriptor: descriptor };
|
|
71
77
|
if (typeof fCallback !== 'function')
|
|
72
78
|
{
|
|
73
|
-
return this.pict.parseTemplateByHash(tmpTemplateHash, tmpRecord, null, pContextArray);
|
|
79
|
+
return this.pict.parseTemplateByHash(tmpTemplateHash, tmpRecord, null, pContextArray, pScope);
|
|
74
80
|
}
|
|
75
81
|
return this.pict.parseTemplateByHash(tmpTemplateHash, tmpRecord,
|
|
76
82
|
(pError, pValue) =>
|
|
@@ -80,7 +86,7 @@ class PictTemplateGetViewSchemaValueByHash extends libPictTemplate
|
|
|
80
86
|
return fCallback(pError, '');
|
|
81
87
|
}
|
|
82
88
|
return fCallback(null, pValue);
|
|
83
|
-
}, pContextArray);
|
|
89
|
+
}, pContextArray, pScope);
|
|
84
90
|
}
|
|
85
91
|
|
|
86
92
|
if (typeof(fCallback) === 'function')
|
|
@@ -33,9 +33,10 @@ class PictTemplateMetacontrollerValueSet extends libPictTemplate
|
|
|
33
33
|
* @param {string} pTemplateHash - The template hash.
|
|
34
34
|
* @param {object} pRecord - The record object.
|
|
35
35
|
* @param {array} pContextArray - The context array.
|
|
36
|
+
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
36
37
|
* @returns {string} - The rendered template.
|
|
37
38
|
*/
|
|
38
|
-
render(pTemplateHash, pRecord, pContextArray)
|
|
39
|
+
render(pTemplateHash, pRecord, pContextArray, pScope)
|
|
39
40
|
{
|
|
40
41
|
let tmpHash = pTemplateHash.trim();
|
|
41
42
|
let tmpData = (typeof (pRecord) === 'object') ? pRecord : {};
|
|
@@ -64,7 +65,7 @@ class PictTemplateMetacontrollerValueSet extends libPictTemplate
|
|
|
64
65
|
tmpGroupIndex = tmpHashTemplateSeparator[1];
|
|
65
66
|
tmpAddressOfData = tmpHashTemplateSeparator[2];
|
|
66
67
|
|
|
67
|
-
tmpData = this.resolveStateFromAddress(tmpAddressOfData, tmpData, pContextArray);
|
|
68
|
+
tmpData = this.resolveStateFromAddress(tmpAddressOfData, tmpData, pContextArray, null, pScope);
|
|
68
69
|
|
|
69
70
|
let tmpDataValueSet = [];
|
|
70
71
|
if (Array.isArray(tmpData))
|
|
@@ -91,11 +92,11 @@ class PictTemplateMetacontrollerValueSet extends libPictTemplate
|
|
|
91
92
|
if (!tmpData)
|
|
92
93
|
{
|
|
93
94
|
// No address was provided, just render the template with what this template has.
|
|
94
|
-
return this.pict.parseTemplateSetByHash(tmpTemplateHash, pRecord, null, pContextArray);
|
|
95
|
+
return this.pict.parseTemplateSetByHash(tmpTemplateHash, pRecord, null, pContextArray, pScope);
|
|
95
96
|
}
|
|
96
97
|
else
|
|
97
98
|
{
|
|
98
|
-
return this.pict.parseTemplateSetByHash(tmpTemplateHash, tmpData, null, pContextArray);
|
|
99
|
+
return this.pict.parseTemplateSetByHash(tmpTemplateHash, tmpData, null, pContextArray, pScope);
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
102
|
|
|
@@ -106,8 +107,11 @@ class PictTemplateMetacontrollerValueSet extends libPictTemplate
|
|
|
106
107
|
* @param {object} pRecord - The record object to use for rendering the template.
|
|
107
108
|
* @param {function} fCallback - The callback function to invoke after rendering the template.
|
|
108
109
|
* @param {array} pContextArray - The context array to use for resolving the data.
|
|
110
|
+
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
111
|
+
*
|
|
112
|
+
* @return {void}
|
|
109
113
|
*/
|
|
110
|
-
renderAsync(pTemplateHash, pRecord, fCallback, pContextArray)
|
|
114
|
+
renderAsync(pTemplateHash, pRecord, fCallback, pContextArray, pScope)
|
|
111
115
|
{
|
|
112
116
|
let tmpHash = pTemplateHash.trim();
|
|
113
117
|
let tmpData = (typeof (pRecord) === 'object') ? pRecord : {};
|
|
@@ -145,7 +149,7 @@ class PictTemplateMetacontrollerValueSet extends libPictTemplate
|
|
|
145
149
|
}
|
|
146
150
|
|
|
147
151
|
// Now resolve the data
|
|
148
|
-
tmpData = this.resolveStateFromAddress(tmpAddressOfData, tmpData, pContextArray);
|
|
152
|
+
tmpData = this.resolveStateFromAddress(tmpAddressOfData, tmpData, pContextArray, null, pScope);
|
|
149
153
|
|
|
150
154
|
let tmpDataValueSet = [];
|
|
151
155
|
if (Array.isArray(tmpData))
|
|
@@ -173,7 +177,7 @@ class PictTemplateMetacontrollerValueSet extends libPictTemplate
|
|
|
173
177
|
{
|
|
174
178
|
// No address was provided, just render the template with what this template has.
|
|
175
179
|
// The async portion of this is a mind bender because of how entry can happen dynamically from templates
|
|
176
|
-
|
|
180
|
+
this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash, pRecord,
|
|
177
181
|
(pError, pValue) =>
|
|
178
182
|
{
|
|
179
183
|
if (pError)
|
|
@@ -181,11 +185,12 @@ class PictTemplateMetacontrollerValueSet extends libPictTemplate
|
|
|
181
185
|
return tmpCallback(pError, '');
|
|
182
186
|
}
|
|
183
187
|
return tmpCallback(null, pValue);
|
|
184
|
-
}, pContextArray);
|
|
188
|
+
}, pContextArray, pScope);
|
|
189
|
+
return;
|
|
185
190
|
}
|
|
186
191
|
else
|
|
187
192
|
{
|
|
188
|
-
|
|
193
|
+
this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash, tmpData,
|
|
189
194
|
(pError, pValue) =>
|
|
190
195
|
{
|
|
191
196
|
if (pError)
|
|
@@ -193,7 +198,8 @@ class PictTemplateMetacontrollerValueSet extends libPictTemplate
|
|
|
193
198
|
return tmpCallback(pError, '');
|
|
194
199
|
}
|
|
195
200
|
return tmpCallback(null, pValue);
|
|
196
|
-
}, pContextArray);
|
|
201
|
+
}, pContextArray, pScope);
|
|
202
|
+
return;
|
|
197
203
|
}
|
|
198
204
|
}
|
|
199
205
|
}
|
|
@@ -33,9 +33,10 @@ class PictTemplateMetatemplateInputTemplate extends libPictTemplate
|
|
|
33
33
|
* @param {string} pTemplateHash - The template hash.
|
|
34
34
|
* @param {object} pRecord - The record object.
|
|
35
35
|
* @param {array} pContextArray - The context array.
|
|
36
|
+
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
36
37
|
* @returns {string} - The rendered template.
|
|
37
38
|
*/
|
|
38
|
-
render(pTemplateHash, pRecord, pContextArray)
|
|
39
|
+
render(pTemplateHash, pRecord, pContextArray, pScope)
|
|
39
40
|
{
|
|
40
41
|
let tmpHash = pTemplateHash.trim();
|
|
41
42
|
let tmpMetatemplateGenerator = this.pict.providers.MetatemplateGenerator;
|
|
@@ -93,7 +94,7 @@ class PictTemplateMetatemplateInputTemplate extends libPictTemplate
|
|
|
93
94
|
if (tmpRow.Inputs[i].Hash === tmpInput.Hash)
|
|
94
95
|
{
|
|
95
96
|
let tmpInput = tmpRow.Inputs[i];
|
|
96
|
-
return this.pict.parseTemplate(tmpMetatemplateGenerator.getInputMetatemplateTemplateReference(tmpMetatemplateGenerator.dynamicInputView, tmpInput.DataType, tmpInput.PictForm.InputType, `getInput("0","0","${tmpInput.PictForm.InputIndex}")`), tmpInput, null, [tmpMetatemplateGenerator.dynamicInputView]);
|
|
97
|
+
return this.pict.parseTemplate(tmpMetatemplateGenerator.getInputMetatemplateTemplateReference(tmpMetatemplateGenerator.dynamicInputView, tmpInput.DataType, tmpInput.PictForm.InputType, `getInput("0","0","${tmpInput.PictForm.InputIndex}")`), tmpInput, null, [tmpMetatemplateGenerator.dynamicInputView], tmpMetatemplateGenerator.dynamicInputView);
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
100
|
|
|
@@ -108,10 +109,21 @@ class PictTemplateMetatemplateInputTemplate extends libPictTemplate
|
|
|
108
109
|
let tmpTemplate = tmpMetatemplateGenerator.getInputMetatemplateTemplateReference(tmpMetatemplateGenerator.dynamicInputView, tmpInput.DataType, tmpInput.PictForm.InputType, `getInput("0","0","${tmpInput.PictForm.InputIndex}")`);
|
|
109
110
|
|
|
110
111
|
// Now parse it and return it.
|
|
111
|
-
return this.pict.parseTemplate(tmpTemplate, tmpInput, null, [tmpMetatemplateGenerator.dynamicInputView]);
|
|
112
|
+
return this.pict.parseTemplate(tmpTemplate, tmpInput, null, [tmpMetatemplateGenerator.dynamicInputView], tmpMetatemplateGenerator.dynamicInputView);
|
|
112
113
|
}
|
|
113
114
|
|
|
114
|
-
|
|
115
|
+
/**
|
|
116
|
+
* Renders the PICT Metacontroller Template. The Record reference is ignored in this template.
|
|
117
|
+
*
|
|
118
|
+
* @param {string} pTemplateHash - The schema hash of the control.
|
|
119
|
+
* @param {object} pRecord - The record object.
|
|
120
|
+
* @param {function | null} fCallback - The callback function.
|
|
121
|
+
* @param {array} pContextArray - The context array.
|
|
122
|
+
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
123
|
+
*
|
|
124
|
+
* @return {void}
|
|
125
|
+
*/
|
|
126
|
+
renderAsync(pTemplateHash, pRecord, fCallback, pContextArray, pScope)
|
|
115
127
|
{
|
|
116
128
|
let tmpHash = pTemplateHash.trim();
|
|
117
129
|
let tmpMetatemplateGenerator = this.pict.providers.MetatemplateGenerator;
|
|
@@ -131,7 +143,7 @@ class PictTemplateMetatemplateInputTemplate extends libPictTemplate
|
|
|
131
143
|
if (tmpHashTemplateSeparator.length < 2)
|
|
132
144
|
{
|
|
133
145
|
this.log.warn(`MetaTemplateInput template requires at least parameters (Address and DataType) [${tmpHash}]`);
|
|
134
|
-
return '';
|
|
146
|
+
return fCallback(null, '');
|
|
135
147
|
}
|
|
136
148
|
tmpInputName = tmpHashTemplateSeparator[0];
|
|
137
149
|
tmpInputAddress = tmpHashTemplateSeparator[1];
|
|
@@ -170,7 +182,8 @@ class PictTemplateMetatemplateInputTemplate extends libPictTemplate
|
|
|
170
182
|
{
|
|
171
183
|
let tmpInput = tmpRow.Inputs[i];
|
|
172
184
|
let tmpTemplate = tmpMetatemplateGenerator.getInputMetatemplateTemplateReference(tmpMetatemplateGenerator.dynamicInputView, tmpInput.DataType, tmpInput.PictForm.InputType, `getInput("0","0","${tmpInput.PictForm.InputIndex}")`);
|
|
173
|
-
|
|
185
|
+
this.pict.parseTemplate(tmpTemplate, tmpInput, fCallback, [tmpMetatemplateGenerator.dynamicInputView], tmpMetatemplateGenerator.dynamicInputView);
|
|
186
|
+
return;
|
|
174
187
|
}
|
|
175
188
|
}
|
|
176
189
|
|
|
@@ -184,7 +197,8 @@ class PictTemplateMetatemplateInputTemplate extends libPictTemplate
|
|
|
184
197
|
// Now generate the metatemplate
|
|
185
198
|
let tmpTemplate = tmpMetatemplateGenerator.getInputMetatemplateTemplateReference(tmpMetatemplateGenerator.dynamicInputView, tmpInput.DataType, tmpInput.PictForm.InputType, `getInput("0","0","${tmpInput.PictForm.InputIndex}")`);
|
|
186
199
|
|
|
187
|
-
|
|
200
|
+
this.pict.parseTemplate(tmpTemplate, tmpInput, fCallback, [tmpMetatemplateGenerator.dynamicInputView], tmpMetatemplateGenerator.dynamicInputView);
|
|
201
|
+
return;
|
|
188
202
|
}
|
|
189
203
|
}
|
|
190
204
|
|
|
@@ -33,9 +33,10 @@ class PictTemplateMetatemplateInputTemplate extends libPictTemplate
|
|
|
33
33
|
* @param {string} pTemplateHash - The template hash.
|
|
34
34
|
* @param {object} pRecord - The record object.
|
|
35
35
|
* @param {array} pContextArray - The context array.
|
|
36
|
+
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
36
37
|
* @returns {string} - The rendered template.
|
|
37
38
|
*/
|
|
38
|
-
render(pTemplateHash, pRecord, pContextArray)
|
|
39
|
+
render(pTemplateHash, pRecord, pContextArray, pScope)
|
|
39
40
|
{
|
|
40
41
|
let tmpHash = pTemplateHash.trim();
|
|
41
42
|
let tmpMetatemplateGenerator = this.pict.providers.MetatemplateGenerator;
|
|
@@ -59,7 +60,8 @@ class PictTemplateMetatemplateInputTemplate extends libPictTemplate
|
|
|
59
60
|
}
|
|
60
61
|
tmpInputName = tmpHashTemplateSeparator[0];
|
|
61
62
|
// This template expects this address to be a location to get the hash from...
|
|
62
|
-
|
|
63
|
+
//FIXME: should pScope here be the eventual view so the scope is consistent?
|
|
64
|
+
tmpInputAddress = this.resolveStateFromAddress(tmpHashTemplateSeparator[1], pRecord, pContextArray, null, pScope);
|
|
63
65
|
if ((typeof(tmpInputAddress) !== 'string') || tmpInputAddress.length < 1)
|
|
64
66
|
{
|
|
65
67
|
this.log.warn(`MetaTemplateInput template requires a valid Address for an Address in the second parameter [${tmpHash}]`);
|
|
@@ -71,17 +73,19 @@ class PictTemplateMetatemplateInputTemplate extends libPictTemplate
|
|
|
71
73
|
tmpInputType = tmpHashTemplateSeparator[3];
|
|
72
74
|
}
|
|
73
75
|
// Construct a fake input object
|
|
74
|
-
|
|
76
|
+
const tmpInput =
|
|
77
|
+
{
|
|
75
78
|
Address: tmpInputAddress,
|
|
76
79
|
DataAddress: tmpInputAddress,
|
|
77
80
|
Name: tmpInputName,
|
|
78
81
|
Hash: this.fable.ManifestFactory.sanitizeObjectKey(tmpInputAddress),
|
|
79
82
|
DataType: tmpDataType,
|
|
80
|
-
PictForm:
|
|
83
|
+
PictForm:
|
|
84
|
+
{
|
|
81
85
|
InformaryDataAddress: tmpInputAddress,
|
|
82
86
|
GroupIndex: 0,
|
|
83
87
|
Row: 0
|
|
84
|
-
}
|
|
88
|
+
},
|
|
85
89
|
};
|
|
86
90
|
|
|
87
91
|
this.currentInputIndex++;
|
|
@@ -98,8 +102,9 @@ class PictTemplateMetatemplateInputTemplate extends libPictTemplate
|
|
|
98
102
|
{
|
|
99
103
|
if (tmpRow.Inputs[i].Hash === tmpInput.Hash)
|
|
100
104
|
{
|
|
101
|
-
|
|
102
|
-
return this.pict.parseTemplate(tmpMetatemplateGenerator.getInputMetatemplateTemplateReference(tmpMetatemplateGenerator.dynamicInputView,
|
|
105
|
+
const tmpInput = tmpRow.Inputs[i];
|
|
106
|
+
return this.pict.parseTemplate(tmpMetatemplateGenerator.getInputMetatemplateTemplateReference(tmpMetatemplateGenerator.dynamicInputView,
|
|
107
|
+
tmpInput.DataType, tmpInput.PictForm.InputType, `getInput("0","0","${tmpInput.PictForm.InputIndex}")`), tmpInput, null, [tmpMetatemplateGenerator.dynamicInputView], tmpMetatemplateGenerator.dynamicInputView);
|
|
103
108
|
}
|
|
104
109
|
}
|
|
105
110
|
|
|
@@ -111,13 +116,25 @@ class PictTemplateMetatemplateInputTemplate extends libPictTemplate
|
|
|
111
116
|
this.pict.providers.MetatemplateMacros.buildInputMacros(tmpMetatemplateGenerator.dynamicInputView, tmpInput);
|
|
112
117
|
|
|
113
118
|
// Now generate the metatemplate
|
|
114
|
-
|
|
119
|
+
const tmpTemplate = tmpMetatemplateGenerator.getInputMetatemplateTemplateReference(tmpMetatemplateGenerator.dynamicInputView,
|
|
120
|
+
tmpInput.DataType, tmpInput.PictForm.InputType, `getInput("0","0","${tmpInput.PictForm.InputIndex}")`);
|
|
115
121
|
|
|
116
122
|
// Now parse it and return it.
|
|
117
|
-
return this.pict.parseTemplate(tmpTemplate, tmpInput, null, [tmpMetatemplateGenerator.dynamicInputView]);
|
|
123
|
+
return this.pict.parseTemplate(tmpTemplate, tmpInput, null, [tmpMetatemplateGenerator.dynamicInputView], tmpMetatemplateGenerator.dynamicInputView);
|
|
118
124
|
}
|
|
119
125
|
|
|
120
|
-
|
|
126
|
+
/**
|
|
127
|
+
* Renders the PICT Metacontroller Template. The Record reference is ignored in this template.
|
|
128
|
+
*
|
|
129
|
+
* @param {string} pTemplateHash - The schema hash of the control.
|
|
130
|
+
* @param {object} pRecord - The record object.
|
|
131
|
+
* @param {function | null} fCallback - The callback function.
|
|
132
|
+
* @param {array} pContextArray - The context array.
|
|
133
|
+
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
134
|
+
*
|
|
135
|
+
* @return {void}
|
|
136
|
+
*/
|
|
137
|
+
renderAsync(pTemplateHash, pRecord, fCallback, pContextArray, pScope)
|
|
121
138
|
{
|
|
122
139
|
let tmpHash = pTemplateHash.trim();
|
|
123
140
|
let tmpMetatemplateGenerator = this.pict.providers.MetatemplateGenerator;
|
|
@@ -137,15 +154,16 @@ class PictTemplateMetatemplateInputTemplate extends libPictTemplate
|
|
|
137
154
|
if (tmpHashTemplateSeparator.length < 2)
|
|
138
155
|
{
|
|
139
156
|
this.log.warn(`MetaTemplateInput template requires at least parameters (Address and DataType) [${tmpHash}]`);
|
|
140
|
-
return '';
|
|
157
|
+
return fCallback(null, '');
|
|
141
158
|
}
|
|
142
159
|
tmpInputName = tmpHashTemplateSeparator[0];
|
|
143
160
|
// This template expects this address to be a location to get the hash from...
|
|
144
|
-
|
|
161
|
+
//FIXME: should pScope here be the eventual view so the scope is consistent?
|
|
162
|
+
tmpInputAddress = this.resolveStateFromAddress(tmpHashTemplateSeparator[1], pRecord, pContextArray, null, pScope);
|
|
145
163
|
if ((typeof(tmpInputAddress) !== 'string') || tmpInputAddress.length < 1)
|
|
146
164
|
{
|
|
147
165
|
this.log.warn(`MetaTemplateInput template requires a valid Address for an Address in the second parameter [${tmpHash}]`);
|
|
148
|
-
return '';
|
|
166
|
+
return fCallback(null, '');
|
|
149
167
|
}
|
|
150
168
|
tmpDataType = tmpHashTemplateSeparator[2];
|
|
151
169
|
if (tmpHashTemplateSeparator.length > 3)
|
|
@@ -181,8 +199,10 @@ class PictTemplateMetatemplateInputTemplate extends libPictTemplate
|
|
|
181
199
|
if (tmpRow.Inputs[i].Hash === tmpInput.Hash)
|
|
182
200
|
{
|
|
183
201
|
let tmpInput = tmpRow.Inputs[i];
|
|
184
|
-
let tmpTemplate = tmpMetatemplateGenerator.getInputMetatemplateTemplateReference(tmpMetatemplateGenerator.dynamicInputView,
|
|
185
|
-
|
|
202
|
+
let tmpTemplate = tmpMetatemplateGenerator.getInputMetatemplateTemplateReference(tmpMetatemplateGenerator.dynamicInputView,
|
|
203
|
+
tmpInput.DataType, tmpInput.PictForm.InputType, `getInput("0","0","${tmpInput.PictForm.InputIndex}")`);
|
|
204
|
+
this.pict.parseTemplate(tmpTemplate, tmpInput, fCallback, [tmpMetatemplateGenerator.dynamicInputView], tmpMetatemplateGenerator.dynamicInputView);
|
|
205
|
+
return;
|
|
186
206
|
}
|
|
187
207
|
}
|
|
188
208
|
|
|
@@ -194,9 +214,11 @@ class PictTemplateMetatemplateInputTemplate extends libPictTemplate
|
|
|
194
214
|
this.pict.providers.MetatemplateMacros.buildInputMacros(tmpMetatemplateGenerator.dynamicInputView, tmpInput);
|
|
195
215
|
|
|
196
216
|
// Now generate the metatemplate
|
|
197
|
-
|
|
217
|
+
const tmpTemplate = tmpMetatemplateGenerator.getInputMetatemplateTemplateReference(tmpMetatemplateGenerator.dynamicInputView,
|
|
218
|
+
tmpInput.DataType, tmpInput.PictForm.InputType, `getInput("0","0","${tmpInput.PictForm.InputIndex}")`);
|
|
198
219
|
|
|
199
|
-
|
|
220
|
+
this.pict.parseTemplate(tmpTemplate, tmpInput, fCallback, [tmpMetatemplateGenerator.dynamicInputView], tmpMetatemplateGenerator.dynamicInputView);
|
|
221
|
+
return;
|
|
200
222
|
}
|
|
201
223
|
}
|
|
202
224
|
|
|
@@ -28,9 +28,10 @@ class PictTemplateProviderPluckJoinUnique extends libPictTemplate
|
|
|
28
28
|
* @param {string} pTemplateHash - The template hash.
|
|
29
29
|
* @param {object} pRecord - The record object.
|
|
30
30
|
* @param {array} pContextArray - The context array.
|
|
31
|
+
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
31
32
|
* @returns {string} - The rendered template.
|
|
32
33
|
*/
|
|
33
|
-
render(pTemplateHash, pRecord, pContextArray)
|
|
34
|
+
render(pTemplateHash, pRecord, pContextArray, pScope)
|
|
34
35
|
{
|
|
35
36
|
let tmpHash = pTemplateHash;
|
|
36
37
|
let tmpData = (typeof (pRecord) === 'object') ? pRecord : {};
|
|
@@ -58,7 +59,7 @@ class PictTemplateProviderPluckJoinUnique extends libPictTemplate
|
|
|
58
59
|
let tmpValueMap = {};
|
|
59
60
|
for (let i = 0; i < tmpDataAddresses.length; i++)
|
|
60
61
|
{
|
|
61
|
-
let tmpValueSet = this.resolveStateFromAddress(tmpDataAddresses[i], tmpData, pContextArray);
|
|
62
|
+
let tmpValueSet = this.resolveStateFromAddress(tmpDataAddresses[i], tmpData, pContextArray, null, pScope);
|
|
62
63
|
|
|
63
64
|
if (tmpValueSet && Array.isArray(tmpValueSet))
|
|
64
65
|
{
|
|
@@ -55,11 +55,12 @@ declare class PictTemplateControlFromDynamicManifest extends libPictTemplate {
|
|
|
55
55
|
*
|
|
56
56
|
* @param {string} pTemplateHash - The schema hash of the control.
|
|
57
57
|
* @param {object} pRecord - The record object.
|
|
58
|
-
* @param {function} fCallback - The callback function.
|
|
58
|
+
* @param {function | null} fCallback - The callback function.
|
|
59
59
|
* @param {array} pContextArray - The context array.
|
|
60
|
-
* @
|
|
60
|
+
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
61
|
+
* @returns {string | undefined} - The rendered template or undefined if callback is provided.
|
|
61
62
|
*/
|
|
62
|
-
renderAsync(pTemplateHash: string, pRecord: object, fCallback: Function, pContextArray: any[]): string;
|
|
63
|
+
renderAsync(pTemplateHash: string, pRecord: object, fCallback: Function | null, pContextArray: any[], pScope?: any): string | undefined;
|
|
63
64
|
}
|
|
64
65
|
declare namespace PictTemplateControlFromDynamicManifest {
|
|
65
66
|
export { Manyfest };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pict-Template-ControlFromDynamicManifest.d.ts","sourceRoot":"","sources":["../../../source/templates/Pict-Template-ControlFromDynamicManifest.js"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAGH;;GAEG;AACH;IAEC;;;;OAIG;IACH,8DAaC;IATA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,6FAA6F;IAC7F,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,eAAe,EAAE,OAAO,gCAAgC,CAAC,CAAA;KAAE,CAC/E;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;
|
|
1
|
+
{"version":3,"file":"Pict-Template-ControlFromDynamicManifest.d.ts","sourceRoot":"","sources":["../../../source/templates/Pict-Template-ControlFromDynamicManifest.js"],"names":[],"mappings":"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"}
|
|
@@ -22,11 +22,12 @@ declare class PictTemplateControlFromDynamicManifest extends libPictTemplate {
|
|
|
22
22
|
*
|
|
23
23
|
* @param {string} pTemplateHash - The schema hash of the control.
|
|
24
24
|
* @param {object} pRecord - The record object.
|
|
25
|
-
* @param {function} fCallback - The callback function.
|
|
25
|
+
* @param {function | null} fCallback - The callback function.
|
|
26
26
|
* @param {array} pContextArray - The context array.
|
|
27
|
-
* @
|
|
27
|
+
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
28
|
+
* @returns {string | undefined} - The rendered template or undefined if callback is provided.
|
|
28
29
|
*/
|
|
29
|
-
renderAsync(pTemplateHash: string, pRecord: object, fCallback: Function, pContextArray: any[]): string;
|
|
30
|
+
renderAsync(pTemplateHash: string, pRecord: object, fCallback: Function | null, pContextArray: any[], pScope?: any): string | undefined;
|
|
30
31
|
}
|
|
31
32
|
import libPictTemplate = require("pict-template");
|
|
32
33
|
//# sourceMappingURL=Pict-Template-ControlFromDynamicManifestForHash.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pict-Template-ControlFromDynamicManifestForHash.d.ts","sourceRoot":"","sources":["../../../source/templates/Pict-Template-ControlFromDynamicManifestForHash.js"],"names":[],"mappings":";AAEA;;GAEG;AACH;IAEC;;;;OAIG;IACH,8DAaC;IATA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,6FAA6F;IAC7F,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,eAAe,EAAE,OAAO,gCAAgC,CAAC,CAAA;KAAE,CAC/E;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;
|
|
1
|
+
{"version":3,"file":"Pict-Template-ControlFromDynamicManifestForHash.d.ts","sourceRoot":"","sources":["../../../source/templates/Pict-Template-ControlFromDynamicManifestForHash.js"],"names":[],"mappings":";AAEA;;GAEG;AACH;IAEC;;;;OAIG;IACH,8DAaC;IATA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,6FAA6F;IAC7F,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,eAAe,EAAE,OAAO,gCAAgC,CAAC,CAAA;KAAE,CAC/E;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;IAoBT;;;;;;;;;OASG;IACH,2BAPW,MAAM,WACN,MAAM,aACN,WAAW,IAAI,iCAEf,GAAG,GACD,MAAM,GAAG,SAAS,CAgC9B;CACD"}
|
|
@@ -22,11 +22,12 @@ declare class PictTemplateGetViewSchemaValue extends libPictTemplate {
|
|
|
22
22
|
*
|
|
23
23
|
* @param {string} pTemplateHash - The schema hash of the control.
|
|
24
24
|
* @param {object} pRecord - The record object.
|
|
25
|
-
* @param {function} fCallback - The callback function.
|
|
25
|
+
* @param {function | null} fCallback - The callback function.
|
|
26
26
|
* @param {array} pContextArray - The context array.
|
|
27
|
-
* @
|
|
27
|
+
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
28
|
+
* @returns {string | undefined} - The rendered template or undefined if callback is provided.
|
|
28
29
|
*/
|
|
29
|
-
renderAsync(pTemplateHash: string, pRecord: object, fCallback: Function, pContextArray: any[]): string |
|
|
30
|
+
renderAsync(pTemplateHash: string, pRecord: object, fCallback: Function | null, pContextArray: any[], pScope?: any): string | undefined;
|
|
30
31
|
}
|
|
31
32
|
import libPictTemplate = require("pict-template");
|
|
32
33
|
//# sourceMappingURL=Pict-Template-DyanmicView-Value.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pict-Template-DyanmicView-Value.d.ts","sourceRoot":"","sources":["../../../source/templates/Pict-Template-DyanmicView-Value.js"],"names":[],"mappings":";AAEA;;GAEG;AACH;IAEC;;;;OAIG;IACH,8DAaC;IATA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,6FAA6F;IAC7F,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,eAAe,EAAE,OAAO,gCAAgC,CAAC,CAAA;KAAE,CAC/E;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;
|
|
1
|
+
{"version":3,"file":"Pict-Template-DyanmicView-Value.d.ts","sourceRoot":"","sources":["../../../source/templates/Pict-Template-DyanmicView-Value.js"],"names":[],"mappings":";AAEA;;GAEG;AACH;IAEC;;;;OAIG;IACH,8DAaC;IATA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,6FAA6F;IAC7F,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,eAAe,EAAE,OAAO,gCAAgC,CAAC,CAAA;KAAE,CAC/E;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;IAoBT;;;;;;;;;OASG;IACH,2BAPW,MAAM,WACN,MAAM,aACN,WAAW,IAAI,iCAEf,GAAG,GACD,MAAM,GAAG,SAAS,CAkD9B;CACD"}
|
|
@@ -22,11 +22,12 @@ declare class PictTemplateGetViewSchemaValueByHash extends libPictTemplate {
|
|
|
22
22
|
*
|
|
23
23
|
* @param {string} pTemplateHash - The schema hash of the control.
|
|
24
24
|
* @param {object} pRecord - The record object.
|
|
25
|
-
* @param {function} fCallback - The callback function.
|
|
25
|
+
* @param {function | null} fCallback - The callback function.
|
|
26
26
|
* @param {array} pContextArray - The context array.
|
|
27
|
-
* @
|
|
27
|
+
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
28
|
+
* @returns {string | undefined} - The rendered template or undefined if callback is provided.
|
|
28
29
|
*/
|
|
29
|
-
renderAsync(pTemplateHash: string, pRecord: object, fCallback: Function, pContextArray: any[]): string;
|
|
30
|
+
renderAsync(pTemplateHash: string, pRecord: object, fCallback: Function | null, pContextArray: any[], pScope?: any): string | undefined;
|
|
30
31
|
}
|
|
31
32
|
import libPictTemplate = require("pict-template");
|
|
32
33
|
//# sourceMappingURL=Pict-Template-DyanmicView-ValueByHash.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pict-Template-DyanmicView-ValueByHash.d.ts","sourceRoot":"","sources":["../../../source/templates/Pict-Template-DyanmicView-ValueByHash.js"],"names":[],"mappings":";AAEA;;GAEG;AACH;IAEC;;;;OAIG;IACH,8DAaC;IATA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,6FAA6F;IAC7F,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,eAAe,EAAE,OAAO,gCAAgC,CAAC,CAAA;KAAE,CAC/E;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;
|
|
1
|
+
{"version":3,"file":"Pict-Template-DyanmicView-ValueByHash.d.ts","sourceRoot":"","sources":["../../../source/templates/Pict-Template-DyanmicView-ValueByHash.js"],"names":[],"mappings":";AAEA;;GAEG;AACH;IAEC;;;;OAIG;IACH,8DAaC;IATA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,6FAA6F;IAC7F,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,eAAe,EAAE,OAAO,gCAAgC,CAAC,CAAA;KAAE,CAC/E;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;IAoBT;;;;;;;;;OASG;IACH,2BAPW,MAAM,WACN,MAAM,aACN,WAAW,IAAI,iCAEf,GAAG,GACD,MAAM,GAAG,SAAS,CAkD9B;CACD"}
|
|
@@ -24,8 +24,11 @@ declare class PictTemplateMetacontrollerValueSet extends libPictTemplate {
|
|
|
24
24
|
* @param {object} pRecord - The record object to use for rendering the template.
|
|
25
25
|
* @param {function} fCallback - The callback function to invoke after rendering the template.
|
|
26
26
|
* @param {array} pContextArray - The context array to use for resolving the data.
|
|
27
|
+
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
28
|
+
*
|
|
29
|
+
* @return {void}
|
|
27
30
|
*/
|
|
28
|
-
renderAsync(pTemplateHash: string, pRecord: object, fCallback: Function, pContextArray: any[]):
|
|
31
|
+
renderAsync(pTemplateHash: string, pRecord: object, fCallback: Function, pContextArray: any[], pScope?: any): void;
|
|
29
32
|
}
|
|
30
33
|
import libPictTemplate = require("pict-template");
|
|
31
34
|
//# sourceMappingURL=Pict-Template-Metacontroller-ValueSetWithGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pict-Template-Metacontroller-ValueSetWithGroup.d.ts","sourceRoot":"","sources":["../../../source/templates/Pict-Template-Metacontroller-ValueSetWithGroup.js"],"names":[],"mappings":";AAEA;;;;GAIG;AACH;IAEC;;;;OAIG;IACH,8DAaC;IATA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,6BAA6B;IAC7B,OADW,OAAO,MAAM,CAAC,CACf;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;
|
|
1
|
+
{"version":3,"file":"Pict-Template-Metacontroller-ValueSetWithGroup.d.ts","sourceRoot":"","sources":["../../../source/templates/Pict-Template-Metacontroller-ValueSetWithGroup.js"],"names":[],"mappings":";AAEA;;;;GAIG;AACH;IAEC;;;;OAIG;IACH,8DAaC;IATA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,6BAA6B;IAC7B,OADW,OAAO,MAAM,CAAC,CACf;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;IA+ET;;;;;;;;;;OAUG;IACH,2BARW,MAAM,WACN,MAAM,sDAGN,GAAG,GAEF,IAAI,CA4Ff;CACD"}
|
|
@@ -18,7 +18,18 @@ declare class PictTemplateMetatemplateInputTemplate extends libPictTemplate {
|
|
|
18
18
|
/** @type {any} */
|
|
19
19
|
log: any;
|
|
20
20
|
currentInputIndex: number;
|
|
21
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Renders the PICT Metacontroller Template. The Record reference is ignored in this template.
|
|
23
|
+
*
|
|
24
|
+
* @param {string} pTemplateHash - The schema hash of the control.
|
|
25
|
+
* @param {object} pRecord - The record object.
|
|
26
|
+
* @param {function | null} fCallback - The callback function.
|
|
27
|
+
* @param {array} pContextArray - The context array.
|
|
28
|
+
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
29
|
+
*
|
|
30
|
+
* @return {void}
|
|
31
|
+
*/
|
|
32
|
+
renderAsync(pTemplateHash: string, pRecord: object, fCallback: Function | null, pContextArray: any[], pScope?: any): void;
|
|
22
33
|
}
|
|
23
34
|
import libPictTemplate = require("pict-template");
|
|
24
35
|
//# sourceMappingURL=Pict-Template-Metatemplate-Input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pict-Template-Metatemplate-Input.d.ts","sourceRoot":"","sources":["../../../source/templates/Pict-Template-Metatemplate-Input.js"],"names":[],"mappings":";AAEA;;GAEG;AACH;IAEC;;;;OAIG;IACH,8DAeC;IAXA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,6FAA6F;IAC7F,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,eAAe,EAAE,OAAO,gCAAgC,CAAC,CAAA;KAAE,CAC/E;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;IAKR,0BAA0B;
|
|
1
|
+
{"version":3,"file":"Pict-Template-Metatemplate-Input.d.ts","sourceRoot":"","sources":["../../../source/templates/Pict-Template-Metatemplate-Input.js"],"names":[],"mappings":";AAEA;;GAEG;AACH;IAEC;;;;OAIG;IACH,8DAeC;IAXA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,6FAA6F;IAC7F,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,eAAe,EAAE,OAAO,gCAAgC,CAAC,CAAA;KAAE,CAC/E;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;IAKR,0BAA0B;IAwF3B;;;;;;;;;;OAUG;IACH,2BARW,MAAM,WACN,MAAM,aACN,WAAW,IAAI,iCAEf,GAAG,GAEF,IAAI,CA8Ef;CACD"}
|
|
@@ -18,7 +18,18 @@ declare class PictTemplateMetatemplateInputTemplate extends libPictTemplate {
|
|
|
18
18
|
/** @type {any} */
|
|
19
19
|
log: any;
|
|
20
20
|
currentInputIndex: number;
|
|
21
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Renders the PICT Metacontroller Template. The Record reference is ignored in this template.
|
|
23
|
+
*
|
|
24
|
+
* @param {string} pTemplateHash - The schema hash of the control.
|
|
25
|
+
* @param {object} pRecord - The record object.
|
|
26
|
+
* @param {function | null} fCallback - The callback function.
|
|
27
|
+
* @param {array} pContextArray - The context array.
|
|
28
|
+
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
29
|
+
*
|
|
30
|
+
* @return {void}
|
|
31
|
+
*/
|
|
32
|
+
renderAsync(pTemplateHash: string, pRecord: object, fCallback: Function | null, pContextArray: any[], pScope?: any): void;
|
|
22
33
|
}
|
|
23
34
|
import libPictTemplate = require("pict-template");
|
|
24
35
|
//# sourceMappingURL=Pict-Template-Metatemplate-InputWithHashAddress.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pict-Template-Metatemplate-InputWithHashAddress.d.ts","sourceRoot":"","sources":["../../../source/templates/Pict-Template-Metatemplate-InputWithHashAddress.js"],"names":[],"mappings":";AAEA;;GAEG;AACH;IAEC;;;;OAIG;IACH,8DAeC;IAXA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,6FAA6F;IAC7F,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,eAAe,EAAE,OAAO,gCAAgC,CAAC,CAAA;KAAE,CAC/E;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;IAKR,0BAA0B;
|
|
1
|
+
{"version":3,"file":"Pict-Template-Metatemplate-InputWithHashAddress.d.ts","sourceRoot":"","sources":["../../../source/templates/Pict-Template-Metatemplate-InputWithHashAddress.js"],"names":[],"mappings":";AAEA;;GAEG;AACH;IAEC;;;;OAIG;IACH,8DAeC;IAXA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,6FAA6F;IAC7F,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,eAAe,EAAE,OAAO,gCAAgC,CAAC,CAAA;KAAE,CAC/E;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;IAKR,0BAA0B;IAmG3B;;;;;;;;;;OAUG;IACH,2BARW,MAAM,WACN,MAAM,aACN,WAAW,IAAI,iCAEf,GAAG,GAEF,IAAI,CAuFf;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pict-Template-Proxy-PluckJoinUnique.d.ts","sourceRoot":"","sources":["../../../source/templates/Pict-Template-Proxy-PluckJoinUnique.js"],"names":[],"mappings":";AAEA;IAEC;;;;OAIG;IACH,8DAaC;IATA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,6BAA6B;IAC7B,OADW,OAAO,MAAM,CAAC,CACf;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;
|
|
1
|
+
{"version":3,"file":"Pict-Template-Proxy-PluckJoinUnique.d.ts","sourceRoot":"","sources":["../../../source/templates/Pict-Template-Proxy-PluckJoinUnique.js"],"names":[],"mappings":";AAEA;IAEC;;;;OAIG;IACH,8DAaC;IATA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,6BAA6B;IAC7B,OADW,OAAO,MAAM,CAAC,CACf;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;CA0ET"}
|