pict-section-form 1.0.92 → 1.0.93
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_distill/Simple-Form-Application.js +3 -3
- package/package.json +1 -1
- package/source/providers/Pict-Provider-DynamicSolver.js +3 -3
- package/source/providers/inputs/Pict-Provider-Input-TemplatedEntityLookup.js +6 -6
- package/types/source/providers/Pict-Provider-DynamicSolver.d.ts.map +1 -1
- package/types/source/providers/inputs/Pict-Provider-Input-EntityBundleRequest.d.ts +1 -0
- package/types/source/providers/inputs/Pict-Provider-Input-EntityBundleRequest.d.ts.map +1 -1
- package/types/source/providers/inputs/Pict-Provider-Input-TemplatedEntityLookup.d.ts +79 -0
- package/types/source/providers/inputs/Pict-Provider-Input-TemplatedEntityLookup.d.ts.map +1 -0
|
@@ -163,8 +163,8 @@ module.exports.default_configuration.pict_configuration = (
|
|
|
163
163
|
Group: "Book",
|
|
164
164
|
Row: 2, Width: 1,
|
|
165
165
|
InputType: "TemplatedEntityLookup",
|
|
166
|
-
Providers: ["Pict-Input-
|
|
167
|
-
|
|
166
|
+
Providers: ["Pict-Input-TemplatedEntityLookup"],
|
|
167
|
+
TemplatedEntityLookup:
|
|
168
168
|
{
|
|
169
169
|
Template: "Record GUIDBookAuthorJoin {~D:AppData.CurrentBookAuthorJoinForDisplayTemplate.GUIDBookAuthorJoin~} IDBook {~D:AppData.CurrentBookAuthorJoinForDisplayTemplate.IDBook~} is the first book for IDAuthor {~D:AppData.CurrentAuthor.IDAuthor~} AuthorName [{~D:AppData.CurrentAuthor.Name~}]",
|
|
170
170
|
|
|
@@ -184,4 +184,4 @@ module.exports.default_configuration.pict_configuration = (
|
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
-
});
|
|
187
|
+
});
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@ const libInputAutofillTriggerGroup = require('./inputs/Pict-Provider-Input-Autof
|
|
|
12
12
|
const libInputMarkdown = require('./inputs/Pict-Provider-Input-Markdown.js');
|
|
13
13
|
const libInputHTML = require('./inputs/Pict-Provider-Input-HTML.js');
|
|
14
14
|
const libInputPreciseNumber = require('./inputs/Pict-Provider-Input-PreciseNumber.js');
|
|
15
|
-
const
|
|
15
|
+
const libInputTemplatedEntityLookup = require('./inputs/Pict-Provider-Input-TemplatedEntityLookup.js');
|
|
16
16
|
|
|
17
17
|
const _DefaultProviderConfiguration = (
|
|
18
18
|
{
|
|
@@ -99,9 +99,9 @@ class PictDynamicSolver extends libPictProvider
|
|
|
99
99
|
{
|
|
100
100
|
this.pict.addProvider('Pict-Input-PreciseNumber', libInputPreciseNumber.default_configuration, libInputPreciseNumber);
|
|
101
101
|
}
|
|
102
|
-
if (!this.pict.providers['Pict-Input-
|
|
102
|
+
if (!this.pict.providers['Pict-Input-TemplatedEntityLookup'])
|
|
103
103
|
{
|
|
104
|
-
this.pict.addProvider('Pict-Input-
|
|
104
|
+
this.pict.addProvider('Pict-Input-TemplatedEntityLookup', libInputTemplatedEntityLookup.default_configuration, libInputTemplatedEntityLookup);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
|
|
@@ -55,7 +55,7 @@ class CustomInputHandler extends libPictSectionInputExtension
|
|
|
55
55
|
assignDisplayEntityData(pDisplayID, pInput, pValue)
|
|
56
56
|
{
|
|
57
57
|
// 0. Manage state
|
|
58
|
-
let tmpDisplayTemplate = (typeof(pInput.PictForm.
|
|
58
|
+
let tmpDisplayTemplate = (typeof(pInput.PictForm.TemplatedEntityLookup.Template) === "string") ? pInput.PictForm.TemplatedEntityLookup.Template : "";
|
|
59
59
|
let tmpDisplayContent = '';
|
|
60
60
|
|
|
61
61
|
if (typeof(pInput) != "object")
|
|
@@ -68,14 +68,14 @@ class CustomInputHandler extends libPictSectionInputExtension
|
|
|
68
68
|
this.log.error("Error in assignDisplayEntityData: pInput.PictForm is not an object");
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
|
-
if (!(`
|
|
71
|
+
if (!(`TemplatedEntityLookup` in pInput.PictForm))
|
|
72
72
|
{
|
|
73
|
-
this.log.error("Error in assignDisplayEntityData: pInput.PictForm.
|
|
73
|
+
this.log.error("Error in assignDisplayEntityData: pInput.PictForm.TemplatedEntityLookup is not in the PictForm object");
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
76
|
-
if (!Array.isArray(pInput.PictForm.
|
|
76
|
+
if (!Array.isArray(pInput.PictForm.TemplatedEntityLookup.EntitiesBundle))
|
|
77
77
|
{
|
|
78
|
-
this.log.error("Error in assignDisplayEntityData: pInput.PictForm.
|
|
78
|
+
this.log.error("Error in assignDisplayEntityData: pInput.PictForm.TemplatedEntityLookup.EntitiesBundle is not an array");
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
81
|
|
|
@@ -85,7 +85,7 @@ class CustomInputHandler extends libPictSectionInputExtension
|
|
|
85
85
|
tmpAnticipate.anticipate(
|
|
86
86
|
function (fNext)
|
|
87
87
|
{
|
|
88
|
-
this.pict.EntityProvider.gatherDataFromServer(pInput.PictForm.
|
|
88
|
+
this.pict.EntityProvider.gatherDataFromServer(pInput.PictForm.TemplatedEntityLookup.EntitiesBundle, fNext);
|
|
89
89
|
}.bind(this));
|
|
90
90
|
|
|
91
91
|
// 2. Check the Empty Value Test List
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pict-Provider-DynamicSolver.d.ts","sourceRoot":"","sources":["../../../source/providers/Pict-Provider-DynamicSolver.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Pict-Provider-DynamicSolver.d.ts","sourceRoot":"","sources":["../../../source/providers/Pict-Provider-DynamicSolver.js"],"names":[],"mappings":";AA0BA;;GAEG;AACH;IAEC;;;;;;OAMG;IACH,oBAJW,MAAM,YACN,MAAM,gBACN,MAAM,EAqEhB;IA9DA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,gGAAgG;IAChG,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,qCAAqC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,GAAG,CAAA;KAAE,CAClF;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;IACR,qBAAqB;IACrB,MADW,MAAM,CACR;IACT,qBAAqB;IACrB,MADW,MAAM,CACR;IAuDV;;;;;;;;;OASG;IACH,qBALW,MAAM,GAAC,MAAM,cACb,OAAO,aACP,MAAM,GACJ,MAAM,GAAC,SAAS,CA8B5B;IAED;;;;;;;OAOG;IACH,wDAFW,MAAM,QAyDhB;IAED;;;;;OAKG;IACH,gEAFW,MAAM,QA+BhB;IAED;;;;;OAKG;IACH,sDAFW,MAAM,QAwBhB;IAED;;;;;;;;OAQG;IACH,gCAJW,MAAM,yBAWhB;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,yBAFW,QAAM,MAAM,EAAE,QAiFxB;IADA;;;;;MAAuC;CAExC"}
|
|
@@ -46,6 +46,7 @@ declare class CustomInputHandler extends libPictSectionInputExtension {
|
|
|
46
46
|
/** @type {any} */
|
|
47
47
|
log: any;
|
|
48
48
|
gatherEntitySet(fCallback: any, pEntityInformation: any, pView: any, pInput: any, pValue: any): any;
|
|
49
|
+
gatherCustomDataSet(fCallback: any, pCustomRequestInformation: any, pView: any, pInput: any, pValue: any): any;
|
|
49
50
|
/**
|
|
50
51
|
* TODO: I added a proise return here to know when this data load is done for the dashboard usecase. Could use a revisit.
|
|
51
52
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pict-Provider-Input-EntityBundleRequest.d.ts","sourceRoot":"","sources":["../../../../source/providers/inputs/Pict-Provider-Input-EntityBundleRequest.js"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH;IAEC,2DAUC;IANA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,4DAA4D;IAC5D,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,aAAa,EAAE,MAAM,GAAG,CAAA;KAAE,CAC9C;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;IAGT,oGA0EC;IAED;;;;;;;;;OASG;IACH,sDALW,GAAG,iBACH,MAAM,GAEL,OAAO,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"Pict-Provider-Input-EntityBundleRequest.d.ts","sourceRoot":"","sources":["../../../../source/providers/inputs/Pict-Provider-Input-EntityBundleRequest.js"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH;IAEC,2DAUC;IANA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,4DAA4D;IAC5D,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,aAAa,EAAE,MAAM,GAAG,CAAA;KAAE,CAC9C;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;IAGT,oGA0EC;IAED,+GAgEC;IAED;;;;;;;;;OASG;IACH,sDALW,GAAG,iBACH,MAAM,GAEL,OAAO,CAAC,GAAG,CAAC,CA8EvB;IAyBD;;;;;;;;;;OAUG;IACH,uEALW,GAAG,iBACH,MAAM,aACN,MAAM,GACJ,GAAG,CAKf;IAED;;;;;;;;OAQG;IACH,8CAJW,GAAG,iBACH,MAAM,GACJ,GAAG,CAMf;IAED;;;;;;;;;OASG;IACH,qDALW,GAAG,iBACH,MAAM,aACN,MAAM,GACJ,GAAG,CAMf;IAED;;;;;;;;;;OAUG;IACH,6EAJW,GAAG,iBACH,MAAM,GACJ,OAAO,CAKnB;IAED;;;;;;;;;;OAUG;IACH,yEALW,GAAG,iBACH,MAAM,aACN,MAAM,GACJ,GAAG,CAKf;CACD"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export = CustomInputHandler;
|
|
2
|
+
/**
|
|
3
|
+
* CustomInputHandler class.
|
|
4
|
+
*
|
|
5
|
+
* @class
|
|
6
|
+
* @extends libPictSectionInputExtension
|
|
7
|
+
* @memberof providers.inputs
|
|
8
|
+
*/
|
|
9
|
+
declare class CustomInputHandler extends libPictSectionInputExtension {
|
|
10
|
+
constructor(pFable: any, pOptions: any, pServiceHash: any);
|
|
11
|
+
/** @type {import('pict')} */
|
|
12
|
+
pict: import("pict");
|
|
13
|
+
/** @type {import('pict') & { newAnticipate: () => any }} */
|
|
14
|
+
fable: import("pict") & {
|
|
15
|
+
newAnticipate: () => any;
|
|
16
|
+
};
|
|
17
|
+
/** @type {any} */
|
|
18
|
+
log: any;
|
|
19
|
+
/**
|
|
20
|
+
* Generates the HTML ID for a content display input element.
|
|
21
|
+
*
|
|
22
|
+
* @param {string} pInputHTMLID - The HTML ID of the input element.
|
|
23
|
+
* @returns {string} - The generated HTML ID for the content display input element.
|
|
24
|
+
*/
|
|
25
|
+
getContentDisplayHTMLID(pInputHTMLID: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* Generates a tabular content display input ID based on the provided input HTML ID and row index.
|
|
28
|
+
*
|
|
29
|
+
* @param {string} pInputHTMLID - The input HTML ID.
|
|
30
|
+
* @param {number} pRowIndex - The row index.
|
|
31
|
+
* @returns {string} - The generated tabular content display input ID.
|
|
32
|
+
*/
|
|
33
|
+
getTabularContentDisplayInputID(pInputHTMLID: string, pRowIndex: number): string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @param {String} pDisplayID
|
|
37
|
+
* @param {Object} pInput - The PictForm Input Object
|
|
38
|
+
* @param {any} pValue
|
|
39
|
+
*/
|
|
40
|
+
assignDisplayEntityData(pDisplayID: string, pInput: any, pValue: any): void;
|
|
41
|
+
/**
|
|
42
|
+
* Initializes a tabular input element.
|
|
43
|
+
*
|
|
44
|
+
* @param {Object} pView - The view object.
|
|
45
|
+
* @param {Object} pGroup - The group object.
|
|
46
|
+
* @param {Object} pInput - The input object.
|
|
47
|
+
* @param {any} pValue - The input value.
|
|
48
|
+
* @param {string} pHTMLSelector - The HTML selector.
|
|
49
|
+
* @param {number} pRowIndex - The index of the row.
|
|
50
|
+
* @returns {any} - The result of the initialization.
|
|
51
|
+
*/
|
|
52
|
+
onInputInitializeTabular(pView: any, pGroup: any, pInput: any, pValue: any, pHTMLSelector: string, pRowIndex: number): any;
|
|
53
|
+
/**
|
|
54
|
+
* Marshals data to the form for the given input.
|
|
55
|
+
*
|
|
56
|
+
* @param {Object} pView - The view object.
|
|
57
|
+
* @param {Object} pGroup - The group object.
|
|
58
|
+
* @param {Object} pRow - The row object.
|
|
59
|
+
* @param {Object} pInput - The input object.
|
|
60
|
+
* @param {any} pValue - The value to be marshaled.
|
|
61
|
+
* @param {string} pHTMLSelector - The HTML selector.
|
|
62
|
+
* @returns {boolean} - Returns true if the value is successfully marshaled to the form, otherwise false.
|
|
63
|
+
*/
|
|
64
|
+
onDataMarshalToForm(pView: any, pGroup: any, pRow: any, pInput: any, pValue: any, pHTMLSelector: string): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Marshals data to a form in tabular format.
|
|
67
|
+
*
|
|
68
|
+
* @param {Object} pView - The view object.
|
|
69
|
+
* @param {Object} pGroup - The group object.
|
|
70
|
+
* @param {Object} pInput - The input object.
|
|
71
|
+
* @param {any} pValue - The value parameter.
|
|
72
|
+
* @param {string} pHTMLSelector - The HTML selector parameter.
|
|
73
|
+
* @param {number} pRowIndex - The row index parameter.
|
|
74
|
+
* @returns {any} - The result of the data marshaling.
|
|
75
|
+
*/
|
|
76
|
+
onDataMarshalToFormTabular(pView: any, pGroup: any, pInput: any, pValue: any, pHTMLSelector: string, pRowIndex: number): any;
|
|
77
|
+
}
|
|
78
|
+
import libPictSectionInputExtension = require("../Pict-Provider-InputExtension.js");
|
|
79
|
+
//# sourceMappingURL=Pict-Provider-Input-TemplatedEntityLookup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pict-Provider-Input-TemplatedEntityLookup.d.ts","sourceRoot":"","sources":["../../../../source/providers/inputs/Pict-Provider-Input-TemplatedEntityLookup.js"],"names":[],"mappings":";AAIA;;;;;;GAMG;AACH;IAEC,2DAUC;IANA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,4DAA4D;IAC5D,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,aAAa,EAAE,MAAM,GAAG,CAAA;KAAE,CAC9C;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;IAGT;;;;;OAKG;IACH,sCAHW,MAAM,GACJ,MAAM,CAKlB;IAED;;;;;;OAMG;IACH,8CAJW,MAAM,aACN,MAAM,GACJ,MAAM,CAKlB;IAED;;;;;OAKG;IACH,iEAFW,GAAG,QAoEb;IAmBD;;;;;;;;;;OAUG;IACH,uEALW,GAAG,iBACH,MAAM,aACN,MAAM,GACJ,GAAG,CAMf;IAED;;;;;;;;;;OAUG;IACH,6EAJW,GAAG,iBACH,MAAM,GACJ,OAAO,CAMnB;IAED;;;;;;;;;;OAUG;IACH,yEALW,GAAG,iBACH,MAAM,aACN,MAAM,GACJ,GAAG,CAMf;CACD"}
|