pict-section-form 1.0.72 → 1.0.74
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/complex_table/Complex-Tabular-Application.js +3 -1
- package/example_applications/complex_table/html/index.html +27 -0
- package/example_applications/postcard_example/providers/PictProvider-Dynamic-Sections-MockServerResponse.json +1 -1
- package/package.json +1 -1
- package/source/providers/Pict-Provider-DynamicTemplates.js +7 -2
- package/source/providers/dynamictemplates/Pict-DynamicTemplates-DefaultFormTemplates.js +3 -3
- package/source/services/ManifestFactory.js +5 -0
- package/source/templates/Pict-Template-ControlFromDynamicManifest.js +16 -2
- package/source/templates/Pict-Template-ControlFromDynamicManifestForHash.js +17 -38
- package/source/templates/Pict-Template-DyanmicView-Value.js +73 -0
- package/source/templates/Pict-Template-DyanmicView-ValueByHash.js +73 -0
- package/types/source/providers/Pict-Provider-DynamicTemplates.d.ts.map +1 -1
- package/types/source/services/ManifestFactory.d.ts.map +1 -1
- package/types/source/templates/Pict-Template-ControlFromDynamicManifest.d.ts +10 -1
- package/types/source/templates/Pict-Template-ControlFromDynamicManifest.d.ts.map +1 -1
- package/types/source/templates/Pict-Template-ControlFromDynamicManifestForHash.d.ts +10 -72
- package/types/source/templates/Pict-Template-ControlFromDynamicManifestForHash.d.ts.map +1 -1
- package/types/source/templates/Pict-Template-Dyanmic-ValueByAddress.d.ts +32 -0
- package/types/source/templates/Pict-Template-Dyanmic-ValueByAddress.d.ts.map +1 -0
- package/types/source/templates/Pict-Template-Dyanmic-ValueByHash.d.ts +32 -0
- package/types/source/templates/Pict-Template-Dyanmic-ValueByHash.d.ts.map +1 -0
- package/types/source/templates/Pict-Template-DyanmicView-Value.d.ts +32 -0
- package/types/source/templates/Pict-Template-DyanmicView-Value.d.ts.map +1 -0
- package/types/source/templates/Pict-Template-DyanmicView-ValueByHash.d.ts +32 -0
- package/types/source/templates/Pict-Template-DyanmicView-ValueByHash.d.ts.map +1 -0
|
@@ -116,10 +116,12 @@ module.exports.default_configuration.pict_configuration = {
|
|
|
116
116
|
{
|
|
117
117
|
Hash: "Book",
|
|
118
118
|
Name: "Books about Tables",
|
|
119
|
+
CSSClass: "HasFancyHeaders",
|
|
119
120
|
Groups: [
|
|
120
121
|
{
|
|
121
122
|
Hash: "Author",
|
|
122
|
-
Name: "Author"
|
|
123
|
+
Name: "Author",
|
|
124
|
+
CSSClass: "FancyCustomGroupTitleOverride",
|
|
123
125
|
},
|
|
124
126
|
{
|
|
125
127
|
Hash: "Book",
|
|
@@ -5,6 +5,33 @@
|
|
|
5
5
|
<style id="PICT-CSS"></style>
|
|
6
6
|
<script src="./pict.min.js" type="text/javascript"></script>
|
|
7
7
|
<script type="text/javascript">Pict.safeOnDocumentReady(() => { Pict.safeLoadPictApplication(ComplexTabularApplication, 0)});</script>
|
|
8
|
+
<!-- CSS placed here to simulate an external collection where we can leverage existing class names/patterns -->
|
|
9
|
+
<style type="text/css">
|
|
10
|
+
.HasFancyHeaders h2
|
|
11
|
+
{
|
|
12
|
+
font-weight: bold;
|
|
13
|
+
text-transform: uppercase;
|
|
14
|
+
font-style: italic;
|
|
15
|
+
color: maroon;
|
|
16
|
+
text-decoration: underline;
|
|
17
|
+
margin: 0.5em 0;
|
|
18
|
+
}
|
|
19
|
+
.HasFancyHeaders h3
|
|
20
|
+
{
|
|
21
|
+
font-weight: bold;
|
|
22
|
+
font-style: italic;
|
|
23
|
+
color: brown;
|
|
24
|
+
text-decoration: underline;
|
|
25
|
+
margin: 0.5em 0;
|
|
26
|
+
}
|
|
27
|
+
.FancyCustomGroupTitleOverride > h3 {
|
|
28
|
+
font-weight: bold;
|
|
29
|
+
font-style: italic;
|
|
30
|
+
color: darkblue;
|
|
31
|
+
text-decoration: underline;
|
|
32
|
+
margin: 0.5em 0;
|
|
33
|
+
}
|
|
34
|
+
</style>
|
|
8
35
|
</head>
|
|
9
36
|
<body>
|
|
10
37
|
<div id="Pict-Form-Container"></div>
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"Hash": "Custom1",
|
|
43
43
|
"Description": "The message and recipient of your postcard.",
|
|
44
44
|
"Layout": "Custom",
|
|
45
|
-
"CustomLayoutTemplate": "<div id=\"custom\"><h5>I AM CUSTOM</h5>{~DI:Custom.CustomField1~} <div id=\"custom2\">{~DIH:CustomField2~}</div></div>"
|
|
45
|
+
"CustomLayoutTemplate": "<div id=\"custom\"><h5>I AM CUSTOM</h5>{~DI:Custom.CustomField1~}<div>{~SV:Custom.CustomField1~}</div> <div id=\"custom2\">{~DIH:CustomField2~}</div><div>{~SVH:CustomField2~}</div></div>"
|
|
46
46
|
}
|
|
47
47
|
]
|
|
48
48
|
}
|
package/package.json
CHANGED
|
@@ -8,8 +8,11 @@ const templateSetReadOnlyTemplates = require('./dynamictemplates/Pict-DynamicTem
|
|
|
8
8
|
const libTemplateValueSetWithGroup = require('../templates/Pict-Template-Metacontroller-ValueSetWithGroup.js');
|
|
9
9
|
const libTemplateDynamicInput = require('../templates/Pict-Template-Metatemplate-Input.js');
|
|
10
10
|
const libTemplateDynamicInputWithHashAddress = require('../templates/Pict-Template-Metatemplate-InputWithHashAddress.js');
|
|
11
|
-
const libTemplateControlFromDynamicManifest = require('../templates/Pict-Template-ControlFromDynamicManifest.js')
|
|
12
|
-
const libTemplateControlFromDynamicManifestForHash = require('../templates/Pict-Template-ControlFromDynamicManifestForHash.js')
|
|
11
|
+
const libTemplateControlFromDynamicManifest = require('../templates/Pict-Template-ControlFromDynamicManifest.js');
|
|
12
|
+
const libTemplateControlFromDynamicManifestForHash = require('../templates/Pict-Template-ControlFromDynamicManifestForHash.js');
|
|
13
|
+
const libTemplateGetViewSchemaValue = require('../templates/Pict-Template-DyanmicView-Value.js');
|
|
14
|
+
const libTemplateGetViewSchemaValueByHash = require('../templates/Pict-Template-DyanmicView-ValueByHash.js');
|
|
15
|
+
|
|
13
16
|
|
|
14
17
|
// TODO: This is temporary until we publish new pict
|
|
15
18
|
const libTemplatePluckJoinUnique = require('../templates/Pict-Template-Proxy-PluckJoinUnique.js');
|
|
@@ -57,6 +60,8 @@ class PictDynamicFormsTemplates extends libPictProvider
|
|
|
57
60
|
this.pict.addTemplate(libTemplatePluckJoinUnique);
|
|
58
61
|
this.pict.addTemplate(libTemplateControlFromDynamicManifest);
|
|
59
62
|
this.pict.addTemplate(libTemplateControlFromDynamicManifestForHash);
|
|
63
|
+
this.pict.addTemplate(libTemplateGetViewSchemaValue);
|
|
64
|
+
this.pict.addTemplate(libTemplateGetViewSchemaValueByHash);
|
|
60
65
|
|
|
61
66
|
if (this.options?.MetaTemplateSet && typeof(this.options.MetaTemplateSet) === 'object')
|
|
62
67
|
{
|
|
@@ -79,7 +79,7 @@ Glug glug glug Oo... -->
|
|
|
79
79
|
"HashPostfix": "-Template-Section-Prefix",
|
|
80
80
|
"Template": /*HTML*/`
|
|
81
81
|
<!-- Form Section Prefix [{~D:Context[0].UUID~}]::[{~D:Context[0].Hash~}] {~D:Record.Hash~}::{~D:Record.Name~} -->
|
|
82
|
-
<div id="SECTION-{~D:Context[0].formID~}" class="pict-form-section">
|
|
82
|
+
<div id="SECTION-{~D:Context[0].formID~}" class="pict-form-section {~D:Record.CSSClass~}">
|
|
83
83
|
<h2>{~D:Record.Name~}</h2>
|
|
84
84
|
`
|
|
85
85
|
},
|
|
@@ -100,8 +100,8 @@ Glug glug glug Oo... -->
|
|
|
100
100
|
"HashPostfix": "-Template-Group-Prefix",
|
|
101
101
|
"Template": /*HTML*/`
|
|
102
102
|
<!-- Form Template Group Prefix [{~D:Context[0].UUID~}]::[{~D:Context[0].Hash~}] {~D:Record.Hash~}::{~D:Record.Name~} -->
|
|
103
|
-
<div id="GROUP-{~D:Context[0].formID~}-{~D:Record.Hash~}" {~D:Record.Macro.PictFormLayout~}>
|
|
104
|
-
<h3
|
|
103
|
+
<div id="GROUP-{~D:Context[0].formID~}-{~D:Record.Hash~}" class="{~D:Record.CSSClass~}" {~D:Record.Macro.PictFormLayout~}>
|
|
104
|
+
<h3>Group: {~D:Record.Name~}</h3>
|
|
105
105
|
`
|
|
106
106
|
},
|
|
107
107
|
// row(s) are useful when our form has multiple inputs on some lines and a single on another...
|
|
@@ -535,6 +535,11 @@ class ManifestFactory extends libFableServiceProviderBase
|
|
|
535
535
|
tmpSection.Name = tmpSectionName;
|
|
536
536
|
}
|
|
537
537
|
|
|
538
|
+
if (tmpSection['Section CSS'])
|
|
539
|
+
{
|
|
540
|
+
tmpSection.CSSClass = tmpSection['Section CSS'];
|
|
541
|
+
}
|
|
542
|
+
|
|
538
543
|
const tmpGroupName = tmpRecord['Group Name']?.trim?.();
|
|
539
544
|
let tmpGroupHash = this.sanitizeObjectKey(tmpGroupName || 'Default_Group');
|
|
540
545
|
// Note: The group name part is laissez-faire about whether it needs to be there or not. The Hash is required on each column if we want to customize.
|
|
@@ -61,9 +61,9 @@ class PictTemplateControlFromDynamicManifest extends libPictTemplate
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
|
-
* Renders
|
|
64
|
+
* Renders a view managed by the metacontroller based on the manifest schema address.
|
|
65
65
|
*
|
|
66
|
-
* @param {string} pTemplateHash - The
|
|
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
69
|
* @returns {string} - The rendered template.
|
|
@@ -73,6 +73,15 @@ class PictTemplateControlFromDynamicManifest extends libPictTemplate
|
|
|
73
73
|
return this.renderAsync(pTemplateHash, pRecord, null, pContextArray);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
/**
|
|
77
|
+
* Renders a view managed by the metacontroller based on the manifest schema address.
|
|
78
|
+
*
|
|
79
|
+
* @param {string} pTemplateHash - The schema hash of the control.
|
|
80
|
+
* @param {object} pRecord - The record object.
|
|
81
|
+
* @param {function} fCallback - The callback function.
|
|
82
|
+
* @param {array} pContextArray - The context array.
|
|
83
|
+
* @returns {string} - The rendered template.
|
|
84
|
+
*/
|
|
76
85
|
renderAsync(pTemplateHash, pRecord, fCallback, pContextArray)
|
|
77
86
|
{
|
|
78
87
|
const tmpMetatemplateGenerator = this.pict.providers.MetatemplateGenerator;
|
|
@@ -82,6 +91,11 @@ class PictTemplateControlFromDynamicManifest extends libPictTemplate
|
|
|
82
91
|
/** @type {Manyfest} */
|
|
83
92
|
const manifest = metacontroller.manifest;
|
|
84
93
|
const descriptor = manifest.getDescriptor(tmpHash);
|
|
94
|
+
if (!descriptor)
|
|
95
|
+
{
|
|
96
|
+
this.log.error(`PictTemplateControlFromDynamicManifest: Cannot find descriptor for address [${tmpHash}]`);
|
|
97
|
+
return '';
|
|
98
|
+
}
|
|
85
99
|
const tmpView = this.pict.views[descriptor.PictForm.ViewHash];
|
|
86
100
|
|
|
87
101
|
this.pict.providers.MetatemplateMacros.buildInputMacros(tmpView, descriptor);
|
|
@@ -1,40 +1,5 @@
|
|
|
1
1
|
const libPictTemplate = require('pict-template');
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* @typedef {{
|
|
5
|
-
reset: () => void,
|
|
6
|
-
clone: () => Manyfest,
|
|
7
|
-
deserialize: (pManifestString: string) => void,
|
|
8
|
-
loadManifest: (pManifest: any) => void,
|
|
9
|
-
serialize: () => string,
|
|
10
|
-
getManifest: () => { Scope: string, Descriptors: any, HashTranslations: any, },
|
|
11
|
-
addDescriptor: (pAddress: string, pDescriptor: any) => void,
|
|
12
|
-
getDescriptorByHash: (pHash: string) => any,
|
|
13
|
-
getDescriptor: (pAddress: string) => any,
|
|
14
|
-
eachDescriptor: (fAction: (pDescriptor: any) => void) => void,
|
|
15
|
-
checkAddressExistsByHash : (pObject: any, pHash: string) => boolean,
|
|
16
|
-
checkAddressExists : (pObject: any, pAddress: string) => boolean,
|
|
17
|
-
resolveHashAddress: (pHash: string) => any,
|
|
18
|
-
getValueByHash : (pObject: any, pHash: string) => any,
|
|
19
|
-
getValueAtAddress : (pObject: any, pAddress: string) => any,
|
|
20
|
-
setValueByHash: (pObject: any, pHash: string, pValue: any) => boolean,
|
|
21
|
-
setValueAtAddress : (pObject: any, pAddress: string, pValue: any) => void,
|
|
22
|
-
deleteValueByHash: (pObject: any, pHash: string, pValue: any) => void,
|
|
23
|
-
deleteValueAtAddress : (pObject: any, pAddress: string, pValue: any) => void,
|
|
24
|
-
validate: (pObject: any) => boolean,
|
|
25
|
-
getDefaultValue: (pDescriptor: any) => any,
|
|
26
|
-
populateDefaults: (pObject: any, pOverwriteProperties: boolean) => void,
|
|
27
|
-
populateObject: (pObject: any, pOverwriteProperties: boolean, fFilter: (pDescriptor: any) => boolean) => void,
|
|
28
|
-
serviceType: string,
|
|
29
|
-
options: any,
|
|
30
|
-
scope?: string,
|
|
31
|
-
elementAddresses: Array<string>,
|
|
32
|
-
elementHashes: Object,
|
|
33
|
-
elementDescriptors: Object,
|
|
34
|
-
* }} Manyfest
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
|
-
|
|
38
3
|
/**
|
|
39
4
|
* This is a template that will generate a Metatemplate input, for manual use of metatemplates.
|
|
40
5
|
*/
|
|
@@ -61,9 +26,9 @@ class PictTemplateControlFromDynamicManifest extends libPictTemplate
|
|
|
61
26
|
}
|
|
62
27
|
|
|
63
28
|
/**
|
|
64
|
-
* Renders
|
|
29
|
+
* Renders a view managed by the metacontroller based on the manifest schema hash.
|
|
65
30
|
*
|
|
66
|
-
* @param {string} pTemplateHash - The
|
|
31
|
+
* @param {string} pTemplateHash - The schema hash of the control.
|
|
67
32
|
* @param {object} pRecord - The record object.
|
|
68
33
|
* @param {array} pContextArray - The context array.
|
|
69
34
|
* @returns {string} - The rendered template.
|
|
@@ -73,15 +38,29 @@ class PictTemplateControlFromDynamicManifest extends libPictTemplate
|
|
|
73
38
|
return this.renderAsync(pTemplateHash, pRecord, null, pContextArray);
|
|
74
39
|
}
|
|
75
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Renders a view managed by the metacontroller based on the manifest schema hash.
|
|
43
|
+
*
|
|
44
|
+
* @param {string} pTemplateHash - The schema hash of the control.
|
|
45
|
+
* @param {object} pRecord - The record object.
|
|
46
|
+
* @param {function} fCallback - The callback function.
|
|
47
|
+
* @param {array} pContextArray - The context array.
|
|
48
|
+
* @returns {string} - The rendered template.
|
|
49
|
+
*/
|
|
76
50
|
renderAsync(pTemplateHash, pRecord, fCallback, pContextArray)
|
|
77
51
|
{
|
|
78
52
|
const tmpMetatemplateGenerator = this.pict.providers.MetatemplateGenerator;
|
|
79
53
|
const tmpHash = pTemplateHash.trim();
|
|
80
54
|
/** @type{import('../views/Pict-View-Form-Metacontroller.js')} */
|
|
81
55
|
const metacontroller = this.pict.views.PictFormMetacontroller;
|
|
82
|
-
/** @type {Manyfest} */
|
|
56
|
+
/** @type {import('./Pict-Template-ControlFromDynamicManifest.js').Manyfest} */
|
|
83
57
|
const manifest = metacontroller.manifest;
|
|
84
58
|
const descriptor = manifest.getDescriptorByHash(tmpHash);
|
|
59
|
+
if (!descriptor)
|
|
60
|
+
{
|
|
61
|
+
this.log.error(`PictTemplateControlFromDynamicManifest: Cannot find descriptor for hash [${tmpHash}]`);
|
|
62
|
+
return '';
|
|
63
|
+
}
|
|
85
64
|
const tmpView = this.pict.views[descriptor.PictForm.ViewHash];
|
|
86
65
|
|
|
87
66
|
this.pict.providers.MetatemplateMacros.buildInputMacros(tmpView, descriptor);
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
const libPictTemplate = require('pict-template');
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This is a template that will generate a Metatemplate input, for manual use of metatemplates.
|
|
5
|
+
*/
|
|
6
|
+
class PictTemplateGetViewSchemaValue extends libPictTemplate
|
|
7
|
+
{
|
|
8
|
+
/**
|
|
9
|
+
* @param {Object} pFable - The Fable Framework instance
|
|
10
|
+
* @param {Object} pOptions - The options for the service
|
|
11
|
+
* @param {String} pServiceHash - The hash of the service
|
|
12
|
+
*/
|
|
13
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
14
|
+
{
|
|
15
|
+
super(pFable, pOptions, pServiceHash);
|
|
16
|
+
|
|
17
|
+
/** @type {import('pict')} */
|
|
18
|
+
this.pict;
|
|
19
|
+
/** @type {import('pict') & { ManifestFactory: import('../services/ManifestFactory.js') }} */
|
|
20
|
+
this.fable;
|
|
21
|
+
/** @type {any} */
|
|
22
|
+
this.log;
|
|
23
|
+
|
|
24
|
+
this.addPattern('{~SchemaValue:', '~}');
|
|
25
|
+
this.addPattern('{~SV:', '~}');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Renders a view managed by the metacontroller based on the manifest schema address.
|
|
30
|
+
*
|
|
31
|
+
* @param {string} pTemplateHash - The schema hash of the control.
|
|
32
|
+
* @param {object} pRecord - The record object.
|
|
33
|
+
* @param {array} pContextArray - The context array.
|
|
34
|
+
* @returns {string} - The rendered template.
|
|
35
|
+
*/
|
|
36
|
+
render(pTemplateHash, pRecord, pContextArray)
|
|
37
|
+
{
|
|
38
|
+
return this.renderAsync(pTemplateHash, pRecord, null, pContextArray);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Renders a view managed by the metacontroller based on the manifest schema address.
|
|
43
|
+
*
|
|
44
|
+
* @param {string} pTemplateHash - The schema hash of the control.
|
|
45
|
+
* @param {object} pRecord - The record object.
|
|
46
|
+
* @param {function} fCallback - The callback function.
|
|
47
|
+
* @param {array} pContextArray - The context array.
|
|
48
|
+
* @returns {string} - The rendered template.
|
|
49
|
+
*/
|
|
50
|
+
renderAsync(pTemplateHash, pRecord, fCallback, pContextArray)
|
|
51
|
+
{
|
|
52
|
+
const tmpMetatemplateGenerator = this.pict.providers.MetatemplateGenerator;
|
|
53
|
+
const tmpHash = pTemplateHash.trim();
|
|
54
|
+
/** @type{import('../views/Pict-View-Form-Metacontroller.js')} */
|
|
55
|
+
const metacontroller = this.pict.views.PictFormMetacontroller;
|
|
56
|
+
/** @type {import('./Pict-Template-ControlFromDynamicManifest.js').Manyfest} */
|
|
57
|
+
const manifest = metacontroller.manifest;
|
|
58
|
+
const descriptor = manifest.getDescriptor(tmpHash);
|
|
59
|
+
if (!descriptor)
|
|
60
|
+
{
|
|
61
|
+
this.log.error(`PictTemplateGetViewSchemaValue: Cannot find descriptor for address [${tmpHash}]`);
|
|
62
|
+
return '';
|
|
63
|
+
}
|
|
64
|
+
/** @type {import('../views/Pict-View-DynamicForm.js')} */
|
|
65
|
+
const tmpView = this.pict.views[descriptor.PictForm.ViewHash];
|
|
66
|
+
|
|
67
|
+
const value = tmpView.getValueByHash(tmpHash);
|
|
68
|
+
|
|
69
|
+
return value ? String(value) : '';
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
module.exports = PictTemplateGetViewSchemaValue;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
const libPictTemplate = require('pict-template');
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This is a template that will generate a Metatemplate input, for manual use of metatemplates.
|
|
5
|
+
*/
|
|
6
|
+
class PictTemplateGetViewSchemaValueByHash extends libPictTemplate
|
|
7
|
+
{
|
|
8
|
+
/**
|
|
9
|
+
* @param {Object} pFable - The Fable Framework instance
|
|
10
|
+
* @param {Object} pOptions - The options for the service
|
|
11
|
+
* @param {String} pServiceHash - The hash of the service
|
|
12
|
+
*/
|
|
13
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
14
|
+
{
|
|
15
|
+
super(pFable, pOptions, pServiceHash);
|
|
16
|
+
|
|
17
|
+
/** @type {import('pict')} */
|
|
18
|
+
this.pict;
|
|
19
|
+
/** @type {import('pict') & { ManifestFactory: import('../services/ManifestFactory.js') }} */
|
|
20
|
+
this.fable;
|
|
21
|
+
/** @type {any} */
|
|
22
|
+
this.log;
|
|
23
|
+
|
|
24
|
+
this.addPattern('{~SchemaValueForHash:', '~}');
|
|
25
|
+
this.addPattern('{~SVH:', '~}');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Renders a view managed by the metacontroller based on the manifest schema address.
|
|
30
|
+
*
|
|
31
|
+
* @param {string} pTemplateHash - The schema hash of the control.
|
|
32
|
+
* @param {object} pRecord - The record object.
|
|
33
|
+
* @param {array} pContextArray - The context array.
|
|
34
|
+
* @returns {string} - The rendered template.
|
|
35
|
+
*/
|
|
36
|
+
render(pTemplateHash, pRecord, pContextArray)
|
|
37
|
+
{
|
|
38
|
+
return this.renderAsync(pTemplateHash, pRecord, null, pContextArray);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Renders a view managed by the metacontroller based on the manifest schema address.
|
|
43
|
+
*
|
|
44
|
+
* @param {string} pTemplateHash - The schema hash of the control.
|
|
45
|
+
* @param {object} pRecord - The record object.
|
|
46
|
+
* @param {function} fCallback - The callback function.
|
|
47
|
+
* @param {array} pContextArray - The context array.
|
|
48
|
+
* @returns {string} - The rendered template.
|
|
49
|
+
*/
|
|
50
|
+
renderAsync(pTemplateHash, pRecord, fCallback, pContextArray)
|
|
51
|
+
{
|
|
52
|
+
const tmpMetatemplateGenerator = this.pict.providers.MetatemplateGenerator;
|
|
53
|
+
const tmpHash = pTemplateHash.trim();
|
|
54
|
+
/** @type{import('../views/Pict-View-Form-Metacontroller.js')} */
|
|
55
|
+
const metacontroller = this.pict.views.PictFormMetacontroller;
|
|
56
|
+
/** @type {import('./Pict-Template-ControlFromDynamicManifest.js').Manyfest} */
|
|
57
|
+
const manifest = metacontroller.manifest;
|
|
58
|
+
const descriptor = manifest.getDescriptorByHash(tmpHash);
|
|
59
|
+
if (!descriptor)
|
|
60
|
+
{
|
|
61
|
+
this.log.error(`PictTemplateGetViewSchemaValueByHash: Cannot find descriptor for hash [${tmpHash}]`);
|
|
62
|
+
return '';
|
|
63
|
+
}
|
|
64
|
+
/** @type {import('../views/Pict-View-DynamicForm.js')} */
|
|
65
|
+
const tmpView = this.pict.views[descriptor.PictForm.ViewHash];
|
|
66
|
+
|
|
67
|
+
const value = tmpView.getValueByHash(tmpHash);
|
|
68
|
+
|
|
69
|
+
return value ? String(value) : '';
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
module.exports = PictTemplateGetViewSchemaValueByHash;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pict-Provider-DynamicTemplates.d.ts","sourceRoot":"","sources":["../../../source/providers/Pict-Provider-DynamicTemplates.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Pict-Provider-DynamicTemplates.d.ts","sourceRoot":"","sources":["../../../source/providers/Pict-Provider-DynamicTemplates.js"],"names":[],"mappings":";AA6BA;;;GAGG;AACH;IAEC;;;;;OAKG;IACH,2DAiCC;IA3BA,kBAAkB;IAClB,SADW,GAAG,CACF;IACZ,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,kBAAkB;IAClB,KADW,GAAG,CACN;IAwBT;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,2CA4DC;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManifestFactory.d.ts","sourceRoot":"","sources":["../../../source/services/ManifestFactory.js"],"names":[],"mappings":";AAOA;IAEC,2DA4CC;IAtCA,sIAAsI;IACtI,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,6CAA6C,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,GAAG,CAAA;KAAE,CACxH;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;IACR,qBAAqB;IACrB,MADW,MAAM,CACR;IAET,cAAmC;IAcnC,+BAAoC;IAEpC,sBAA2B;IAC3B,oBAAyB;IASzB,2BAA2B;IAE3B,gCAAgD;IAChD,sCAAwC;IACxC,kCAA0C;IAG3C;;;;;OAKG;IACH,2BAHW,MAAM,GACL,MAAM,CASjB;IAED;;;;;;;;;OASG;IACH,uCAwJC;IAED;;;;OAIG;IACH,8CAOC;IAED;;;;;;OAMG;IACH,iCAJW,MAAM,OAiBhB;IAED;;;;;;;OAOG;IACH,mCALW,MAAM,MAAO,cACb,MAAM,OAkBhB;IAED;;;;OAIG;IACH,8BAFa,OAAO,CAenB;IAED;;;;;;;OAOG;IACH,
|
|
1
|
+
{"version":3,"file":"ManifestFactory.d.ts","sourceRoot":"","sources":["../../../source/services/ManifestFactory.js"],"names":[],"mappings":";AAOA;IAEC,2DA4CC;IAtCA,sIAAsI;IACtI,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,6CAA6C,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,GAAG,CAAA;KAAE,CACxH;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;IACR,qBAAqB;IACrB,MADW,MAAM,CACR;IAET,cAAmC;IAcnC,+BAAoC;IAEpC,sBAA2B;IAC3B,oBAAyB;IASzB,2BAA2B;IAE3B,gCAAgD;IAChD,sCAAwC;IACxC,kCAA0C;IAG3C;;;;;OAKG;IACH,2BAHW,MAAM,GACL,MAAM,CASjB;IAED;;;;;;;;;OASG;IACH,uCAwJC;IAED;;;;OAIG;IACH,8CAOC;IAED;;;;;;OAMG;IACH,iCAJW,MAAM,OAiBhB;IAED;;;;;;;OAOG;IACH,mCALW,MAAM,MAAO,cACb,MAAM,OAkBhB;IAED;;;;OAIG;IACH,8BAFa,OAAO,CAenB;IAED;;;;;;;OAOG;IACH,kEA0UC;IAED;;;;;;;;;OASG;IACH,2GAGC;IAED;;;;;;OAMG;IACH,0CAJW,GAAG,GAEF,GAAG,CAwDd;CACD"}
|
|
@@ -50,7 +50,16 @@ declare class PictTemplateControlFromDynamicManifest extends libPictTemplate {
|
|
|
50
50
|
};
|
|
51
51
|
/** @type {any} */
|
|
52
52
|
log: any;
|
|
53
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Renders a view managed by the metacontroller based on the manifest schema address.
|
|
55
|
+
*
|
|
56
|
+
* @param {string} pTemplateHash - The schema hash of the control.
|
|
57
|
+
* @param {object} pRecord - The record object.
|
|
58
|
+
* @param {function} fCallback - The callback function.
|
|
59
|
+
* @param {array} pContextArray - The context array.
|
|
60
|
+
* @returns {string} - The rendered template.
|
|
61
|
+
*/
|
|
62
|
+
renderAsync(pTemplateHash: string, pRecord: object, fCallback: Function, pContextArray: any[]): string;
|
|
54
63
|
}
|
|
55
64
|
declare namespace PictTemplateControlFromDynamicManifest {
|
|
56
65
|
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;IAmBT,
|
|
1
|
+
{"version":3,"file":"Pict-Template-ControlFromDynamicManifest.d.ts","sourceRoot":"","sources":["../../../source/templates/Pict-Template-ControlFromDynamicManifest.js"],"names":[],"mappings":"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"}
|
|
@@ -1,37 +1,4 @@
|
|
|
1
1
|
export = PictTemplateControlFromDynamicManifest;
|
|
2
|
-
/**
|
|
3
|
-
* @typedef {{
|
|
4
|
-
reset: () => void,
|
|
5
|
-
clone: () => Manyfest,
|
|
6
|
-
deserialize: (pManifestString: string) => void,
|
|
7
|
-
loadManifest: (pManifest: any) => void,
|
|
8
|
-
serialize: () => string,
|
|
9
|
-
getManifest: () => { Scope: string, Descriptors: any, HashTranslations: any, },
|
|
10
|
-
addDescriptor: (pAddress: string, pDescriptor: any) => void,
|
|
11
|
-
getDescriptorByHash: (pHash: string) => any,
|
|
12
|
-
getDescriptor: (pAddress: string) => any,
|
|
13
|
-
eachDescriptor: (fAction: (pDescriptor: any) => void) => void,
|
|
14
|
-
checkAddressExistsByHash : (pObject: any, pHash: string) => boolean,
|
|
15
|
-
checkAddressExists : (pObject: any, pAddress: string) => boolean,
|
|
16
|
-
resolveHashAddress: (pHash: string) => any,
|
|
17
|
-
getValueByHash : (pObject: any, pHash: string) => any,
|
|
18
|
-
getValueAtAddress : (pObject: any, pAddress: string) => any,
|
|
19
|
-
setValueByHash: (pObject: any, pHash: string, pValue: any) => boolean,
|
|
20
|
-
setValueAtAddress : (pObject: any, pAddress: string, pValue: any) => void,
|
|
21
|
-
deleteValueByHash: (pObject: any, pHash: string, pValue: any) => void,
|
|
22
|
-
deleteValueAtAddress : (pObject: any, pAddress: string, pValue: any) => void,
|
|
23
|
-
validate: (pObject: any) => boolean,
|
|
24
|
-
getDefaultValue: (pDescriptor: any) => any,
|
|
25
|
-
populateDefaults: (pObject: any, pOverwriteProperties: boolean) => void,
|
|
26
|
-
populateObject: (pObject: any, pOverwriteProperties: boolean, fFilter: (pDescriptor: any) => boolean) => void,
|
|
27
|
-
serviceType: string,
|
|
28
|
-
options: any,
|
|
29
|
-
scope?: string,
|
|
30
|
-
elementAddresses: Array<string>,
|
|
31
|
-
elementHashes: Object,
|
|
32
|
-
elementDescriptors: Object,
|
|
33
|
-
* }} Manyfest
|
|
34
|
-
*/
|
|
35
2
|
/**
|
|
36
3
|
* This is a template that will generate a Metatemplate input, for manual use of metatemplates.
|
|
37
4
|
*/
|
|
@@ -50,45 +17,16 @@ declare class PictTemplateControlFromDynamicManifest extends libPictTemplate {
|
|
|
50
17
|
};
|
|
51
18
|
/** @type {any} */
|
|
52
19
|
log: any;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Renders a view managed by the metacontroller based on the manifest schema hash.
|
|
22
|
+
*
|
|
23
|
+
* @param {string} pTemplateHash - The schema hash of the control.
|
|
24
|
+
* @param {object} pRecord - The record object.
|
|
25
|
+
* @param {function} fCallback - The callback function.
|
|
26
|
+
* @param {array} pContextArray - The context array.
|
|
27
|
+
* @returns {string} - The rendered template.
|
|
28
|
+
*/
|
|
29
|
+
renderAsync(pTemplateHash: string, pRecord: object, fCallback: Function, pContextArray: any[]): string;
|
|
57
30
|
}
|
|
58
31
|
import libPictTemplate = require("pict-template");
|
|
59
|
-
type Manyfest = {
|
|
60
|
-
reset: () => void;
|
|
61
|
-
clone: () => Manyfest;
|
|
62
|
-
deserialize: (pManifestString: string) => void;
|
|
63
|
-
loadManifest: (pManifest: any) => void;
|
|
64
|
-
serialize: () => string;
|
|
65
|
-
getManifest: () => {
|
|
66
|
-
Scope: string;
|
|
67
|
-
Descriptors: any;
|
|
68
|
-
HashTranslations: any;
|
|
69
|
-
};
|
|
70
|
-
addDescriptor: (pAddress: string, pDescriptor: any) => void;
|
|
71
|
-
getDescriptorByHash: (pHash: string) => any;
|
|
72
|
-
getDescriptor: (pAddress: string) => any;
|
|
73
|
-
eachDescriptor: (fAction: (pDescriptor: any) => void) => void;
|
|
74
|
-
checkAddressExistsByHash: (pObject: any, pHash: string) => boolean;
|
|
75
|
-
checkAddressExists: (pObject: any, pAddress: string) => boolean;
|
|
76
|
-
resolveHashAddress: (pHash: string) => any;
|
|
77
|
-
getValueByHash: (pObject: any, pHash: string) => any;
|
|
78
|
-
getValueAtAddress: (pObject: any, pAddress: string) => any;
|
|
79
|
-
setValueByHash: (pObject: any, pHash: string, pValue: any) => boolean;
|
|
80
|
-
setValueAtAddress: (pObject: any, pAddress: string, pValue: any) => void;
|
|
81
|
-
deleteValueByHash: (pObject: any, pHash: string, pValue: any) => void;
|
|
82
|
-
deleteValueAtAddress: (pObject: any, pAddress: string, pValue: any) => void;
|
|
83
|
-
validate: (pObject: any) => boolean;
|
|
84
|
-
getDefaultValue: (pDescriptor: any) => any;
|
|
85
|
-
populateDefaults: (pObject: any, pOverwriteProperties: boolean) => void;
|
|
86
|
-
populateObject: (pObject: any, pOverwriteProperties: boolean, fFilter: (pDescriptor: any) => boolean) => void;
|
|
87
|
-
serviceType: string;
|
|
88
|
-
options: any;
|
|
89
|
-
scope?: string;
|
|
90
|
-
elementAddresses: Array<string>;
|
|
91
|
-
elementHashes: any;
|
|
92
|
-
elementDescriptors: any;
|
|
93
|
-
};
|
|
94
32
|
//# 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
|
|
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;IAmBT;;;;;;;;OAQG;IACH,2BANW,MAAM,WACN,MAAM,8CAGJ,MAAM,CA0BlB;CACD"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export = PictTemplateControlFromDynamicManifest;
|
|
2
|
+
/**
|
|
3
|
+
* This is a template that will generate a Metatemplate input, for manual use of metatemplates.
|
|
4
|
+
*/
|
|
5
|
+
declare class PictTemplateControlFromDynamicManifest extends libPictTemplate {
|
|
6
|
+
/**
|
|
7
|
+
* @param {Object} pFable - The Fable Framework instance
|
|
8
|
+
* @param {Object} pOptions - The options for the service
|
|
9
|
+
* @param {String} pServiceHash - The hash of the service
|
|
10
|
+
*/
|
|
11
|
+
constructor(pFable: any, pOptions: any, pServiceHash: string);
|
|
12
|
+
/** @type {import('pict')} */
|
|
13
|
+
pict: import("pict");
|
|
14
|
+
/** @type {import('pict') & { ManifestFactory: import('../services/ManifestFactory.js') }} */
|
|
15
|
+
fable: import("pict") & {
|
|
16
|
+
ManifestFactory: import("../services/ManifestFactory.js");
|
|
17
|
+
};
|
|
18
|
+
/** @type {any} */
|
|
19
|
+
log: any;
|
|
20
|
+
/**
|
|
21
|
+
* Renders a view managed by the metacontroller based on the manifest schema address.
|
|
22
|
+
*
|
|
23
|
+
* @param {string} pTemplateHash - The schema hash of the control.
|
|
24
|
+
* @param {object} pRecord - The record object.
|
|
25
|
+
* @param {function} fCallback - The callback function.
|
|
26
|
+
* @param {array} pContextArray - The context array.
|
|
27
|
+
* @returns {string} - The rendered template.
|
|
28
|
+
*/
|
|
29
|
+
renderAsync(pTemplateHash: string, pRecord: object, fCallback: Function, pContextArray: any[]): string;
|
|
30
|
+
}
|
|
31
|
+
import libPictTemplate = require("pict-template");
|
|
32
|
+
//# sourceMappingURL=Pict-Template-Dyanmic-ValueByAddress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pict-Template-Dyanmic-ValueByAddress.d.ts","sourceRoot":"","sources":["../../../source/templates/Pict-Template-Dyanmic-ValueByAddress.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;IAmBT;;;;;;;;OAQG;IACH,2BANW,MAAM,WACN,MAAM,8CAGJ,MAAM,CAqBlB;CACD"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export = PictTemplateControlFromDynamicManifest;
|
|
2
|
+
/**
|
|
3
|
+
* This is a template that will generate a Metatemplate input, for manual use of metatemplates.
|
|
4
|
+
*/
|
|
5
|
+
declare class PictTemplateControlFromDynamicManifest extends libPictTemplate {
|
|
6
|
+
/**
|
|
7
|
+
* @param {Object} pFable - The Fable Framework instance
|
|
8
|
+
* @param {Object} pOptions - The options for the service
|
|
9
|
+
* @param {String} pServiceHash - The hash of the service
|
|
10
|
+
*/
|
|
11
|
+
constructor(pFable: any, pOptions: any, pServiceHash: string);
|
|
12
|
+
/** @type {import('pict')} */
|
|
13
|
+
pict: import("pict");
|
|
14
|
+
/** @type {import('pict') & { ManifestFactory: import('../services/ManifestFactory.js') }} */
|
|
15
|
+
fable: import("pict") & {
|
|
16
|
+
ManifestFactory: import("../services/ManifestFactory.js");
|
|
17
|
+
};
|
|
18
|
+
/** @type {any} */
|
|
19
|
+
log: any;
|
|
20
|
+
/**
|
|
21
|
+
* Renders a view managed by the metacontroller based on the manifest schema address.
|
|
22
|
+
*
|
|
23
|
+
* @param {string} pTemplateHash - The schema hash of the control.
|
|
24
|
+
* @param {object} pRecord - The record object.
|
|
25
|
+
* @param {function} fCallback - The callback function.
|
|
26
|
+
* @param {array} pContextArray - The context array.
|
|
27
|
+
* @returns {string} - The rendered template.
|
|
28
|
+
*/
|
|
29
|
+
renderAsync(pTemplateHash: string, pRecord: object, fCallback: Function, pContextArray: any[]): string;
|
|
30
|
+
}
|
|
31
|
+
import libPictTemplate = require("pict-template");
|
|
32
|
+
//# sourceMappingURL=Pict-Template-Dyanmic-ValueByHash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pict-Template-Dyanmic-ValueByHash.d.ts","sourceRoot":"","sources":["../../../source/templates/Pict-Template-Dyanmic-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;IAmBT;;;;;;;;OAQG;IACH,2BANW,MAAM,WACN,MAAM,8CAGJ,MAAM,CAqBlB;CACD"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export = PictTemplateGetViewSchemaValue;
|
|
2
|
+
/**
|
|
3
|
+
* This is a template that will generate a Metatemplate input, for manual use of metatemplates.
|
|
4
|
+
*/
|
|
5
|
+
declare class PictTemplateGetViewSchemaValue extends libPictTemplate {
|
|
6
|
+
/**
|
|
7
|
+
* @param {Object} pFable - The Fable Framework instance
|
|
8
|
+
* @param {Object} pOptions - The options for the service
|
|
9
|
+
* @param {String} pServiceHash - The hash of the service
|
|
10
|
+
*/
|
|
11
|
+
constructor(pFable: any, pOptions: any, pServiceHash: string);
|
|
12
|
+
/** @type {import('pict')} */
|
|
13
|
+
pict: import("pict");
|
|
14
|
+
/** @type {import('pict') & { ManifestFactory: import('../services/ManifestFactory.js') }} */
|
|
15
|
+
fable: import("pict") & {
|
|
16
|
+
ManifestFactory: import("../services/ManifestFactory.js");
|
|
17
|
+
};
|
|
18
|
+
/** @type {any} */
|
|
19
|
+
log: any;
|
|
20
|
+
/**
|
|
21
|
+
* Renders a view managed by the metacontroller based on the manifest schema address.
|
|
22
|
+
*
|
|
23
|
+
* @param {string} pTemplateHash - The schema hash of the control.
|
|
24
|
+
* @param {object} pRecord - The record object.
|
|
25
|
+
* @param {function} fCallback - The callback function.
|
|
26
|
+
* @param {array} pContextArray - The context array.
|
|
27
|
+
* @returns {string} - The rendered template.
|
|
28
|
+
*/
|
|
29
|
+
renderAsync(pTemplateHash: string, pRecord: object, fCallback: Function, pContextArray: any[]): string;
|
|
30
|
+
}
|
|
31
|
+
import libPictTemplate = require("pict-template");
|
|
32
|
+
//# sourceMappingURL=Pict-Template-DyanmicView-Value.d.ts.map
|
|
@@ -0,0 +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;IAmBT;;;;;;;;OAQG;IACH,2BANW,MAAM,WACN,MAAM,8CAGJ,MAAM,CAsBlB;CACD"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export = PictTemplateGetViewSchemaValueByHash;
|
|
2
|
+
/**
|
|
3
|
+
* This is a template that will generate a Metatemplate input, for manual use of metatemplates.
|
|
4
|
+
*/
|
|
5
|
+
declare class PictTemplateGetViewSchemaValueByHash extends libPictTemplate {
|
|
6
|
+
/**
|
|
7
|
+
* @param {Object} pFable - The Fable Framework instance
|
|
8
|
+
* @param {Object} pOptions - The options for the service
|
|
9
|
+
* @param {String} pServiceHash - The hash of the service
|
|
10
|
+
*/
|
|
11
|
+
constructor(pFable: any, pOptions: any, pServiceHash: string);
|
|
12
|
+
/** @type {import('pict')} */
|
|
13
|
+
pict: import("pict");
|
|
14
|
+
/** @type {import('pict') & { ManifestFactory: import('../services/ManifestFactory.js') }} */
|
|
15
|
+
fable: import("pict") & {
|
|
16
|
+
ManifestFactory: import("../services/ManifestFactory.js");
|
|
17
|
+
};
|
|
18
|
+
/** @type {any} */
|
|
19
|
+
log: any;
|
|
20
|
+
/**
|
|
21
|
+
* Renders a view managed by the metacontroller based on the manifest schema address.
|
|
22
|
+
*
|
|
23
|
+
* @param {string} pTemplateHash - The schema hash of the control.
|
|
24
|
+
* @param {object} pRecord - The record object.
|
|
25
|
+
* @param {function} fCallback - The callback function.
|
|
26
|
+
* @param {array} pContextArray - The context array.
|
|
27
|
+
* @returns {string} - The rendered template.
|
|
28
|
+
*/
|
|
29
|
+
renderAsync(pTemplateHash: string, pRecord: object, fCallback: Function, pContextArray: any[]): string;
|
|
30
|
+
}
|
|
31
|
+
import libPictTemplate = require("pict-template");
|
|
32
|
+
//# sourceMappingURL=Pict-Template-DyanmicView-ValueByHash.d.ts.map
|
|
@@ -0,0 +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;IAmBT;;;;;;;;OAQG;IACH,2BANW,MAAM,WACN,MAAM,8CAGJ,MAAM,CAsBlB;CACD"}
|