pict-section-form 1.0.129 → 1.0.131
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 +2 -2
- package/source/providers/Pict-Provider-DynamicTabularData.js +23 -6
- package/source/views/Pict-View-Form-Metacontroller.js +21 -0
- package/source/views/support/Pict-View-PSF-DebugViewer.js +173 -37
- package/source/views/support/Pict-View-PSF-SupportBase.js +93 -1
- package/types/source/services/Fable-Service-TransactionTracking.d.ts +0 -21
- package/types/source/services/Fable-Service-TransactionTracking.d.ts.map +0 -1
- /package/source/views/support/{Pict-View-PSF-Lifecycle-Visualization.js → Pict-View-PSF-LifeCycle-Visualization.js} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pict-section-form",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.131",
|
|
4
4
|
"description": "Pict dynamic form sections",
|
|
5
5
|
"main": "source/Pict-Section-Form.js",
|
|
6
6
|
"directories": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"browser-env": "^3.3.0",
|
|
32
32
|
"eslint": "^9.36.0",
|
|
33
33
|
"jquery": "^3.7.1",
|
|
34
|
-
"pict": "^1.0.
|
|
34
|
+
"pict": "^1.0.311",
|
|
35
35
|
"pict-application": "^1.0.29",
|
|
36
36
|
"pict-service-commandlineutility": "^1.0.15",
|
|
37
37
|
"quackage": "^1.0.42",
|
|
@@ -172,7 +172,8 @@ class DynamicTabularData extends libPictProvider
|
|
|
172
172
|
{
|
|
173
173
|
tmpRowPrototype = JSON.parse(JSON.stringify(tmpGroup.DefaultRows[tmpDestinationObject.length]));
|
|
174
174
|
}
|
|
175
|
-
tmpDestinationObject.push(tmpGroup.supportingManifest.populateDefaults(tmpRowPrototype))
|
|
175
|
+
tmpDestinationObject.push(tmpGroup.supportingManifest.populateDefaults(tmpRowPrototype));
|
|
176
|
+
this.pict.providers.DynamicSolver.solveViews();
|
|
176
177
|
pView.render();
|
|
177
178
|
pView.marshalToView();
|
|
178
179
|
}
|
|
@@ -180,6 +181,7 @@ class DynamicTabularData extends libPictProvider
|
|
|
180
181
|
{
|
|
181
182
|
let tmpRowIndex = pView.fable.getUUID();
|
|
182
183
|
tmpDestinationObject[tmpRowIndex] = tmpGroup.supportingManifest.populateDefaults({});
|
|
184
|
+
this.pict.providers.DynamicSolver.solveViews();
|
|
183
185
|
pView.render();
|
|
184
186
|
pView.marshalToView();
|
|
185
187
|
}
|
|
@@ -253,8 +255,11 @@ class DynamicTabularData extends libPictProvider
|
|
|
253
255
|
}
|
|
254
256
|
let tmpElementToBeMoved = tmpDestinationObject.splice(tmpRowIndex, 1);
|
|
255
257
|
tmpDestinationObject.splice(tmpNewRowIndex, 0, tmpElementToBeMoved[0]);
|
|
258
|
+
this.pict.providers.DynamicSolver.solveViews();
|
|
256
259
|
pView.render();
|
|
257
|
-
pView.marshalToView();
|
|
260
|
+
//pView.marshalToView();
|
|
261
|
+
// We've re-rendered but we don't know what needs to be marshaled based on the solve that ran above so marshal everything
|
|
262
|
+
this.pict.views.PictFormMetacontroller.marshalFormSections();
|
|
258
263
|
}
|
|
259
264
|
else if (typeof(tmpDestinationObject) === 'object')
|
|
260
265
|
{
|
|
@@ -289,8 +294,11 @@ class DynamicTabularData extends libPictProvider
|
|
|
289
294
|
}
|
|
290
295
|
let tmpElementToBeMoved = tmpDestinationObject.splice(tmpRowIndex, 1);
|
|
291
296
|
tmpDestinationObject.splice(tmpRowIndex + 1, 0, tmpElementToBeMoved[0]);
|
|
297
|
+
this.pict.providers.DynamicSolver.solveViews();
|
|
292
298
|
pView.render();
|
|
293
|
-
pView.marshalToView();
|
|
299
|
+
//pView.marshalToView();
|
|
300
|
+
// We've re-rendered but we don't know what needs to be marshaled based on the solve that ran above so marshal everything
|
|
301
|
+
this.pict.views.PictFormMetacontroller.marshalFormSections();
|
|
294
302
|
}
|
|
295
303
|
else if (typeof(tmpDestinationObject) === 'object')
|
|
296
304
|
{
|
|
@@ -330,8 +338,11 @@ class DynamicTabularData extends libPictProvider
|
|
|
330
338
|
}
|
|
331
339
|
let tmpElementToBeMoved = tmpDestinationObject.splice(tmpRowIndex, 1);
|
|
332
340
|
tmpDestinationObject.splice(tmpRowIndex - 1, 0, tmpElementToBeMoved[0]);
|
|
341
|
+
this.pict.providers.DynamicSolver.solveViews();
|
|
333
342
|
pView.render();
|
|
334
|
-
pView.marshalToView();
|
|
343
|
+
//pView.marshalToView();
|
|
344
|
+
// We've re-rendered but we don't know what needs to be marshaled based on the solve that ran above so marshal everything
|
|
345
|
+
this.pict.views.PictFormMetacontroller.marshalFormSections();
|
|
335
346
|
}
|
|
336
347
|
else if (typeof(tmpDestinationObject) === 'object')
|
|
337
348
|
{
|
|
@@ -372,8 +383,11 @@ class DynamicTabularData extends libPictProvider
|
|
|
372
383
|
return false;
|
|
373
384
|
}
|
|
374
385
|
tmpDestinationObject.splice(tmpRowIndex, 1);
|
|
386
|
+
this.pict.providers.DynamicSolver.solveViews();
|
|
375
387
|
pView.render();
|
|
376
|
-
pView.marshalToView();
|
|
388
|
+
//pView.marshalToView();
|
|
389
|
+
// We've re-rendered but we don't know what needs to be marshaled based on the solve that ran above so marshal everything
|
|
390
|
+
this.pict.views.PictFormMetacontroller.marshalFormSections();
|
|
377
391
|
}
|
|
378
392
|
else if (typeof(tmpDestinationObject) === 'object')
|
|
379
393
|
{
|
|
@@ -384,8 +398,11 @@ class DynamicTabularData extends libPictProvider
|
|
|
384
398
|
return false;
|
|
385
399
|
}
|
|
386
400
|
delete tmpDestinationObject[tmpRowIndex]
|
|
401
|
+
this.pict.providers.DynamicSolver.solveViews();
|
|
387
402
|
pView.render();
|
|
388
|
-
pView.marshalToView();
|
|
403
|
+
//pView.marshalToView();
|
|
404
|
+
// We've re-rendered but we don't know what needs to be marshaled based on the solve that ran above so marshal everything
|
|
405
|
+
this.pict.views.PictFormMetacontroller.marshalFormSections();
|
|
389
406
|
}
|
|
390
407
|
}
|
|
391
408
|
}
|
|
@@ -489,6 +489,27 @@ class PictFormMetacontroller extends libPictViewClass
|
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
491
|
|
|
492
|
+
/**
|
|
493
|
+
* Marshals data to the form sections based on the provided filter and sort functions
|
|
494
|
+
*
|
|
495
|
+
* If no filter and sort functions are provided, render all form sections.
|
|
496
|
+
*
|
|
497
|
+
* @param {Function} [fFilterFunction] - The filter function used to filter the views.
|
|
498
|
+
* @param {SortFunction} [fSortFunction] - The sort function used to sort the views.
|
|
499
|
+
*/
|
|
500
|
+
marshalFormSections(fFilterFunction, fSortFunction)
|
|
501
|
+
{
|
|
502
|
+
let tmpViewList = this.filterViews(fFilterFunction, fSortFunction);
|
|
503
|
+
for (let i = 0; i < tmpViewList.length; i++)
|
|
504
|
+
{
|
|
505
|
+
if (tmpViewList[i] === this)
|
|
506
|
+
{
|
|
507
|
+
continue;
|
|
508
|
+
}
|
|
509
|
+
tmpViewList[i].marshalToView();
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
|
|
492
513
|
/**
|
|
493
514
|
* Regenerates the DyunamicForm section templates based on the provided filter and sort function.
|
|
494
515
|
*
|
|
@@ -10,26 +10,161 @@ const defaultViewConfiguration = (
|
|
|
10
10
|
RenderOnLoad: false,
|
|
11
11
|
|
|
12
12
|
CSS: /*css*/`
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
:root{
|
|
14
|
+
--PSFDV-gutter-size: 5px;
|
|
15
|
+
--PSFDV-indentation-size: calc(2 * var(--PSFDV-gutter-size));
|
|
16
|
+
--PSFDV-Global-background-color: #dcdce5;
|
|
17
|
+
--PSFDV-Global-text-color: #333333;
|
|
18
|
+
--PSFDV-Section-background-color: #cacae8;
|
|
19
|
+
--PSFDV-Section-button-color: #5A52A3;
|
|
20
|
+
--PSFDV-Section-button-text-color: #D8D7E5;
|
|
21
|
+
--PSFDV-Section-Data-background-color: #e2e2f0;
|
|
22
|
+
--PSFDV-Section-DynamicInput-background-color: #a3ccd8;
|
|
23
|
+
--PSFDV-Section-DynamicInput-button-color: #2b89a4;
|
|
24
|
+
--PSFDV-Section-DynamicInput-button-text-color: #D8D7E5;
|
|
25
|
+
}
|
|
26
|
+
#Pict-Form-Extensions-Container {
|
|
27
|
+
color: var(--PSFDV-Global-text-color);
|
|
28
|
+
background-color: var(--PSFDV-Global-background-color);
|
|
29
|
+
padding: var(--PSFDV-gutter-size);
|
|
30
|
+
font-family: Arial, sans-serif;
|
|
31
|
+
font-size: 14px;
|
|
32
|
+
}
|
|
33
|
+
.PSFDV-Extension-Header {
|
|
34
|
+
font-size: 10px;
|
|
35
|
+
font-weight: bold;
|
|
36
|
+
margin-bottom: var(--PSFDV-gutter-size);
|
|
37
|
+
}
|
|
38
|
+
.PSFDV-Global-Header {
|
|
39
|
+
margin: var(--PSFDV-gutter-size);
|
|
40
|
+
}
|
|
41
|
+
.PSFDV-Section-Header {
|
|
42
|
+
margin: var(--PSFDV-gutter-size);
|
|
43
|
+
}
|
|
44
|
+
.PSFDV-Content-Header {
|
|
45
|
+
margin: var(--PSFDV-gutter-size);
|
|
46
|
+
}
|
|
47
|
+
#PSFDV-SectionList .PSFDV-Section {
|
|
48
|
+
margin: var(--PSFDV-gutter-size);
|
|
49
|
+
padding: var(--PSFDV-gutter-size);
|
|
50
|
+
background-color: var(--PSFDV-Section-background-color);
|
|
51
|
+
}
|
|
52
|
+
.PSFDV-Section-Descriptors {
|
|
53
|
+
border-left: 5px solid var(--PSFDV-Section-background-color);
|
|
54
|
+
background-color: #ffffff;
|
|
55
|
+
padding: var(--PSFDV-gutter-size) 0;
|
|
56
|
+
}
|
|
57
|
+
.PSFDV-Section-Group {
|
|
58
|
+
border-left: 5px solid var(--PSFDV-Section-button-color);
|
|
59
|
+
padding: var(--PSFDV-gutter-size);
|
|
60
|
+
background-color: #efefef;
|
|
61
|
+
}
|
|
62
|
+
.PSFDV-Section-Buttons {
|
|
63
|
+
list-style-type: none;
|
|
64
|
+
padding: 0;
|
|
65
|
+
margin: calc(var(--PSFDV-gutter-size) * 2) var(--PSFDV-gutter-size);
|
|
66
|
+
}
|
|
67
|
+
.PSFDV-Section-Button {
|
|
68
|
+
display: inline;
|
|
69
|
+
margin-right: calc(var(--PSFDV-gutter-size) * 0.25);
|
|
70
|
+
text-decoration: none;
|
|
71
|
+
background-color: var(--PSFDV-Section-button-color);
|
|
72
|
+
padding: var(--PSFDV-gutter-size);
|
|
73
|
+
border-radius: var(--PSFDV-gutter-size);
|
|
74
|
+
}
|
|
75
|
+
.PSFDV-Section-Button a {
|
|
76
|
+
text-decoration: none;
|
|
77
|
+
color: var(--PSFDV-Section-button-text-color);
|
|
78
|
+
}
|
|
79
|
+
.PSFDV-Section-Button a:hover {
|
|
80
|
+
text-decoration: underline;
|
|
81
|
+
}
|
|
82
|
+
.PSFDV-Solver-Entry {
|
|
83
|
+
padding-left: var(--PSFDV-indentation-size);
|
|
84
|
+
margin-left: var(--PSFDV-gutter-size);
|
|
85
|
+
font-family: "Courier New", "Lucida Console", monospace;
|
|
86
|
+
white-space: nowrap;
|
|
87
|
+
overflow: scroll;
|
|
88
|
+
}
|
|
89
|
+
.PSFDV-Solver-Result {
|
|
90
|
+
font-family: "Courier New", "Lucida Console", monospace;
|
|
91
|
+
background-color: #dedede;
|
|
92
|
+
border: 1px solid #cccccc;
|
|
93
|
+
font-weight: bold;
|
|
94
|
+
border-radius: var(--PSFDV-gutter-size);
|
|
95
|
+
margin-top: var(--PSFDV-gutter-size);
|
|
96
|
+
display: inline-block;
|
|
97
|
+
white-space: nowrap;
|
|
98
|
+
overflow: scroll;
|
|
99
|
+
padding: var(--PSFDV-gutter-size);
|
|
100
|
+
}
|
|
101
|
+
.PSFDV-DataHeader {
|
|
102
|
+
font-weight: bold;
|
|
103
|
+
background-color: #f0f0f0;
|
|
104
|
+
padding: var(--PSFDV-gutter-size);
|
|
105
|
+
}
|
|
106
|
+
.PSFDV-Section-ExtraData {
|
|
107
|
+
margin-top: var(--PSFDV-gutter-size);
|
|
108
|
+
padding: var(--PSFDV-gutter-size);
|
|
109
|
+
background-color: var(--PSFDV-Section-Data-background-color);
|
|
110
|
+
}
|
|
111
|
+
.PSFDV-Section .PSFDV-DeEmphasize
|
|
112
|
+
{
|
|
113
|
+
color: var(--PSFDV-Section-button-color);
|
|
114
|
+
}
|
|
115
|
+
.PSFDV-DeEmphasize {
|
|
116
|
+
font-weight: light;
|
|
117
|
+
font-size: smaller;
|
|
118
|
+
display: block;
|
|
119
|
+
}
|
|
120
|
+
.PSFDV-Data {
|
|
121
|
+
margin-left: var(--PSFDV-indentation-size);
|
|
122
|
+
line-height: 0.85;
|
|
123
|
+
font-size: smaller;
|
|
124
|
+
}
|
|
125
|
+
.PSFDV-Label {
|
|
126
|
+
font-weight: light;
|
|
127
|
+
min-width: 15%;
|
|
128
|
+
display: block;
|
|
129
|
+
color: var(--PSFDV-Section-button-color);
|
|
130
|
+
margin: var(--PSFDV-gutter-size) 0;
|
|
131
|
+
}
|
|
132
|
+
.PSFDV-Hidden {
|
|
133
|
+
display: none;
|
|
134
|
+
}
|
|
135
|
+
.PSFDV-Section-Solver-DynamicInput {
|
|
136
|
+
background-color: #ffffff;
|
|
137
|
+
}
|
|
138
|
+
#PSFDV-DynamicInputSection .PSFDV-Section {
|
|
139
|
+
margin: var(--PSFDV-gutter-size);
|
|
140
|
+
padding: var(--PSFDV-gutter-size);
|
|
141
|
+
background-color: var(--PSFDV-Section-DynamicInput-background-color);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
#PSFDV-DynamicInputSection .PSFDV-Section .PSFDV-Section-Button {
|
|
145
|
+
background-color: var(--PSFDV-Section-DynamicInput-button-color);
|
|
146
|
+
}
|
|
147
|
+
#PSFDV-DynamicInputSection .PSFDV-Section .PSFDV-Section-Button a {
|
|
148
|
+
color: var(--PSFDV-Section-DynamicInput-button-text-color);
|
|
149
|
+
}
|
|
150
|
+
#PSFDV-DynamicInputSection .PSFDV-Section .PSFDV-Label,
|
|
151
|
+
#PSFDV-DynamicInputSection .PSFDV-Section .PSFDV-DeEmphasize {
|
|
152
|
+
color: var(--PSFDV-Section-DynamicInput-button-color);
|
|
153
|
+
}
|
|
154
|
+
#PSFDV-DynamicInputSection .PSFDV-Section-Descriptors {
|
|
155
|
+
border-left: 5px solid var(--PSFDV-Section-DynamicInput-background-color);
|
|
156
|
+
}
|
|
157
|
+
#PSFDV-DynamicInputSection .PSFDV-Section-Group {
|
|
158
|
+
border-left: 5px solid var(--PSFDV-Section-DynamicInput-button-color);
|
|
159
|
+
}
|
|
25
160
|
`,
|
|
26
161
|
|
|
27
162
|
Templates: [
|
|
28
163
|
{
|
|
29
164
|
Hash: "Pict-Form-DebugViewer-Content",
|
|
30
165
|
Template: /*html*/`
|
|
31
|
-
<div>
|
|
32
|
-
<h2>Pict Inline Form
|
|
166
|
+
<div id="Pict-Form-DebugViewer-Content">
|
|
167
|
+
<h2 class="PSFDV-Global-Header">Pict Inline Form Editing Tool</h2>
|
|
33
168
|
{~T:Pict-Form-DebugViewer-MetacontrollerContainer~}
|
|
34
169
|
</div>`
|
|
35
170
|
},
|
|
@@ -50,25 +185,37 @@ const defaultViewConfiguration = (
|
|
|
50
185
|
Hash: "Pict-Form-DebugViewer-SectionContainer",
|
|
51
186
|
Template: /*html*/`
|
|
52
187
|
<div id="PSFDV-Section-{~D:Record.Hash~}" class="PSFDV-Section">
|
|
53
|
-
<h3><span class="PSFDV-DeEmphasize">Section:</span> {~D:Record.sectionDefinition.Name~}</h3>
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
<
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
|
|
188
|
+
<h3 class="PSFDV-Section-Header"><span class="PSFDV-DeEmphasize">Section:</span> {~D:Record.sectionDefinition.Name~}</h3>
|
|
189
|
+
<ul class="PSFDV-Section-Buttons">
|
|
190
|
+
<li class="PSFDV-Section-Button"><a href="javascript:void(0);" onclick="{~P~}.views['{~D:Record.View.Hash~}'].render()">Render</a></li>
|
|
191
|
+
<li class="PSFDV-Section-Button"><a href="javascript:void(0);" onclick="{~P~}.ContentAssignment.assignContent('{~D:Record.View.options.DefaultDestinationAddress~}','')">Clear</a></li>
|
|
192
|
+
<li class="PSFDV-Section-Button"><a href="javascript:void(0);" onclick="{~P~}.ContentAssignment.removeClass('#PSFDV-{~D:Record.View.Hash~}-Extra', 'PSFDV-Hidden')">Extra Data</a></li>
|
|
193
|
+
</ul>
|
|
194
|
+
<div id="PSFDV-{~D:Record.View.Hash~}-Extra" class="PSFDV-Hidden PSFDV-Section-ExtraData">
|
|
195
|
+
<p class="PSFDV-Data">
|
|
196
|
+
<span class="PSFDV-Label">Description:</span> {~D:Record.sectionDefinition.Description~}
|
|
197
|
+
</p>
|
|
198
|
+
<p class="PSFDV-Data">
|
|
199
|
+
<span class="PSFDV-Label">Hash:</span> {~D:Record.View.Hash~}
|
|
200
|
+
</p>
|
|
201
|
+
<p class="PSFDV-Data">
|
|
202
|
+
<span class="PSFDV-Label">HTML ID:</span> {~D:Record.View.sectionDefinition.Macro.HTMLID~}
|
|
203
|
+
</p>
|
|
204
|
+
<h4 class="PSFDV-Content-Header">Section Solvers:</h4>
|
|
60
205
|
<div class="PSFDV-Section-Solvers">
|
|
61
206
|
{~TS:Pict-Form-DebugViewer-SolverEntry:Record.Solvers[]<<~?ExpressionScope,==,Section?~>>~}
|
|
62
207
|
</div>
|
|
63
|
-
<h4>Tabular/RecordSet Solvers:</h4>
|
|
208
|
+
<h4 class="PSFDV-Content-Header">Tabular/RecordSet Solvers:</h4>
|
|
64
209
|
<div class="PSFDV-Group-Solvers">
|
|
65
210
|
{~TS:Pict-Form-DebugViewer-SolverEntry:Record.Solvers[]<<~?ExpressionScope,==,Group?~>>~}
|
|
66
211
|
</div>
|
|
67
|
-
<h4>Inputs:</h4>
|
|
212
|
+
<h4 class="PSFDV-Content-Header">Inputs:</h4>
|
|
68
213
|
<div class="PSFDV-Section-Solver-DynamicInput">
|
|
69
214
|
{~TS:Pict-Form-DebugViewer-GroupContainer:Record.View.sectionDefinition.Groups~}
|
|
70
215
|
</div>
|
|
71
|
-
<
|
|
216
|
+
<ul class="PSFDV-Section-Buttons">
|
|
217
|
+
<li class="PSFDV-Section-Button"><a href="javascript:void(0);" onclick="{~P~}.ContentAssignment.addClass('#PSFDV-{~D:Record.View.Hash~}-Extra', 'PSFDV-Hidden')">Hide Extra Data for {~D:Record.View.Hash~}</a></li>
|
|
218
|
+
</ul>
|
|
72
219
|
</div>
|
|
73
220
|
</div>
|
|
74
221
|
`
|
|
@@ -87,7 +234,7 @@ const defaultViewConfiguration = (
|
|
|
87
234
|
Hash: "Pict-Form-DebugViewer-GroupContainer",
|
|
88
235
|
Template: /*html*/`
|
|
89
236
|
<div class="PSFDV-Section-Group">
|
|
90
|
-
<
|
|
237
|
+
<h5 class="PSFDV-Content-Header"><span class="PSFDV-DeEmphasize">Group:</span> {~D:Record.Name~} [idx <em>{~D:Record.GroupIndex~}</em>]</h5>
|
|
91
238
|
<p class="PSFDV-Data"><span class="PSFDV-Label">Layout:</span> {~D:Record.Layout~}</p>
|
|
92
239
|
<div class="PSFDV-Section-Rows">
|
|
93
240
|
{~TS:Pict-Form-DebugViewer-RowContainer:Record.Rows~}
|
|
@@ -99,7 +246,7 @@ const defaultViewConfiguration = (
|
|
|
99
246
|
Hash: "Pict-Form-DebugViewer-RowContainer",
|
|
100
247
|
Template: /*html*/`
|
|
101
248
|
<div class="PSFDV-Section-Descriptors">
|
|
102
|
-
<
|
|
249
|
+
<h6 class="PSFDV-Content-Header">Row {~D:Record.Hash~}</h6>
|
|
103
250
|
{~TS:Pict-Form-DebugViewer-DescriptorContainer:Record.Inputs~}
|
|
104
251
|
</div>
|
|
105
252
|
`
|
|
@@ -117,23 +264,12 @@ const defaultViewConfiguration = (
|
|
|
117
264
|
<p class="PSFDV-Data"><span class="PSFDV-Label">HTML ID</span> {~D:Record.PictForm.Macro.HTMLID~}</p>
|
|
118
265
|
</div>
|
|
119
266
|
`
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
Hash: "Pict-Form-DebugViewer-Container",
|
|
123
|
-
Template: /*html*/`<div id="Pict-Form-Extensions-Container"></div>`
|
|
124
267
|
}
|
|
125
268
|
],
|
|
126
269
|
Renderables: [
|
|
127
270
|
{
|
|
128
271
|
RenderableHash: "Pict-Form-DebugViewer-Renderable",
|
|
129
272
|
TemplateHash: "Pict-Form-DebugViewer-Content"
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
RenderableHash: "Pict-Form-DebugViewer-Container",
|
|
133
|
-
TemplateHash: "Pict-Form-DebugViewer-Container",
|
|
134
|
-
ContentDestinationAddress: 'body',
|
|
135
|
-
RenderMethod: 'append_once',
|
|
136
|
-
TestAddress: "#Pict-Form-Extensions-Container",
|
|
137
273
|
}
|
|
138
274
|
]
|
|
139
275
|
});
|
|
@@ -22,6 +22,40 @@ class PictFormsSupportBase extends libPictView
|
|
|
22
22
|
constructor(pFable, pOptions, pServiceHash)
|
|
23
23
|
{
|
|
24
24
|
super(pFable, pOptions, pServiceHash);
|
|
25
|
+
|
|
26
|
+
// Only add this css if it doesn't exist
|
|
27
|
+
if (!('Pict-Support' in this.pict.CSSMap.inlineCSSMap))
|
|
28
|
+
{
|
|
29
|
+
this.pict.CSSMap.addCSS('Pict-Support',
|
|
30
|
+
/*css*/`
|
|
31
|
+
#Pict-Form-Extensions-Wrap {
|
|
32
|
+
position: absolute;
|
|
33
|
+
left: 50%;
|
|
34
|
+
top: 0px;
|
|
35
|
+
width: 50vw;
|
|
36
|
+
max-height: 75vh;
|
|
37
|
+
overflow: auto;
|
|
38
|
+
}
|
|
39
|
+
#Pict-Form-Extension-DragControl {
|
|
40
|
+
background-color: #eae;
|
|
41
|
+
cursor: move;
|
|
42
|
+
padding: 2px 4px;
|
|
43
|
+
border-radius: 3px;
|
|
44
|
+
|
|
45
|
+
}
|
|
46
|
+
`, 1000, 'Pict-Form-SupportBase');
|
|
47
|
+
}
|
|
48
|
+
// Only add this template if it doesn't exist
|
|
49
|
+
if (this.pict.TemplateProvider.getTemplate('Pict-Form-Support-Container') == null)
|
|
50
|
+
{
|
|
51
|
+
this.pict.TemplateProvider.addTemplate('Pict-Form-Support-Container',
|
|
52
|
+
/*html*/`
|
|
53
|
+
<div id="Pict-Form-Extensions-Wrap">
|
|
54
|
+
<p class="PSFDV-Extension-Header"><span id="Pict-Form-Extension-DragControl" class="PSDV-Extension-Header-Controlbar">Pict.Extensions <a href="javascript:void(0);" onclick="{~P~}.views.PictFormMetacontroller.showSupportViewInlineEditor()">reload</a> <a href="javascript:void(0);" onclick="{~P~}.ContentAssignment.toggleClass('#Pict-Form-Extensions-Container', 'PSFDV-Hidden')">toggle</a></span></p>
|
|
55
|
+
<div id="Pict-Form-Extensions-Container"></div>
|
|
56
|
+
</div>
|
|
57
|
+
`);
|
|
58
|
+
}
|
|
25
59
|
}
|
|
26
60
|
|
|
27
61
|
getDynamicState()
|
|
@@ -229,10 +263,68 @@ class PictFormsSupportBase extends libPictView
|
|
|
229
263
|
}
|
|
230
264
|
|
|
231
265
|
// 4. Render the container for the support view if it isn't loaded
|
|
232
|
-
let tmpContainerRenderableHash = 'Pict-Form-
|
|
266
|
+
let tmpContainerRenderableHash = 'Pict-Form-Support-Container';
|
|
267
|
+
|
|
268
|
+
// Check if the renderable exists -- if not, create it dynamically
|
|
269
|
+
// This just appends itself to the body once, and creates a simple container for extensions to load into.
|
|
270
|
+
if (!(tmpContainerRenderableHash in this.renderables))
|
|
271
|
+
{
|
|
272
|
+
this.renderables[tmpContainerRenderableHash] = (
|
|
273
|
+
{
|
|
274
|
+
RenderableHash: "Pict-Form-Support-Container",
|
|
275
|
+
TemplateHash: "Pict-Form-Support-Container",
|
|
276
|
+
ContentDestinationAddress: 'body',
|
|
277
|
+
RenderMethod: 'append_once',
|
|
278
|
+
TestAddress: "#Pict-Form-Extensions-Container",
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
|
|
233
282
|
this.renderables[tmpContainerRenderableHash].TestAddress = tmpContainerTest;
|
|
234
283
|
this.pict.CSSMap.injectCSS();
|
|
284
|
+
|
|
235
285
|
this.render(tmpContainerRenderableHash);
|
|
286
|
+
|
|
287
|
+
// 5. Make the container draggable
|
|
288
|
+
// Setup the draggable behavior for the window
|
|
289
|
+
let tmpDraggableElement = document.getElementById('Pict-Form-Extensions-Wrap'); // What we are dragging
|
|
290
|
+
let tmpDragInteractiveControl = document.getElementById('Pict-Form-Extension-DragControl'); // The control you click on to drag
|
|
291
|
+
if (tmpDraggableElement && tmpDragInteractiveControl)
|
|
292
|
+
{
|
|
293
|
+
tmpDragInteractiveControl.addEventListener('mousedown',
|
|
294
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
295
|
+
* BEGIN of browser event code block
|
|
296
|
+
*
|
|
297
|
+
* The below code is meant to run in response to a browser event.
|
|
298
|
+
* --> Therefore the "this" context is the element that fired the event.
|
|
299
|
+
* --> Happy trails.
|
|
300
|
+
*/
|
|
301
|
+
function (pEvent)
|
|
302
|
+
{
|
|
303
|
+
let tmpOffsetX = pEvent.offsetX + tmpDragInteractiveControl.clientLeft;
|
|
304
|
+
let tmpOffsetY = pEvent.offsetY + tmpDragInteractiveControl.clientTop;
|
|
305
|
+
function dragHandler(pEvent)
|
|
306
|
+
{
|
|
307
|
+
pEvent.stopPropagation();
|
|
308
|
+
|
|
309
|
+
tmpDraggableElement.style.left = (pEvent.clientX - tmpOffsetX) + 'px';
|
|
310
|
+
tmpDraggableElement.style.top = (pEvent.clientY - tmpOffsetY) + 'px';
|
|
311
|
+
}
|
|
312
|
+
function dragStop(pEvent)
|
|
313
|
+
{
|
|
314
|
+
window.removeEventListener('pointermove', dragHandler);
|
|
315
|
+
window.removeEventListener('pointerup', dragStop);
|
|
316
|
+
}
|
|
317
|
+
window.addEventListener('pointermove', dragHandler);
|
|
318
|
+
window.addEventListener('pointerup', dragStop);
|
|
319
|
+
|
|
320
|
+
// Prevent janky selection behaviors in the browser
|
|
321
|
+
pEvent.preventDefault();
|
|
322
|
+
});
|
|
323
|
+
/*
|
|
324
|
+
* END of browser event code block
|
|
325
|
+
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
326
|
+
}
|
|
327
|
+
|
|
236
328
|
}
|
|
237
329
|
}
|
|
238
330
|
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export = TransactionTracking;
|
|
2
|
-
declare class TransactionTracking {
|
|
3
|
-
constructor(pFable: any, pOptions: any, pServiceHash: any);
|
|
4
|
-
/** @type {import('pict') & { addAndInstantiateSingletonService: (hash: string, options: any, prototype: any) => any }} */
|
|
5
|
-
fable: import("pict") & {
|
|
6
|
-
addAndInstantiateSingletonService: (hash: string, options: any, prototype: any) => any;
|
|
7
|
-
};
|
|
8
|
-
/** @type {any} */
|
|
9
|
-
log: any;
|
|
10
|
-
/** @type {string} */
|
|
11
|
-
UUID: string;
|
|
12
|
-
transactionMap: {};
|
|
13
|
-
get transactions(): {};
|
|
14
|
-
logToTransaction(pKey: any, pMessage: any, pCategory: any): boolean;
|
|
15
|
-
registerTransaction(pKey: any): any;
|
|
16
|
-
checkEvent(pKey: any, pEvent: any, pHash: any): boolean;
|
|
17
|
-
}
|
|
18
|
-
declare namespace TransactionTracking {
|
|
19
|
-
let default_configuration: Record<string, any>;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=Fable-Service-TransactionTracking.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Fable-Service-TransactionTracking.d.ts","sourceRoot":"","sources":["../../../source/services/Fable-Service-TransactionTracking.js"],"names":[],"mappings":";AAMA;IAEC,2DAaC;IARA,0HAA0H;IAC1H,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,iCAAiC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,KAAK,GAAG,CAAA;KAAE,CAC5G;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;IACR,qBAAqB;IACrB,MADW,MAAM,CACR;IAET,mBAAwB;IAGzB,uBAGC;IAED,oEAgBC;IAED,oCAeC;IAED,wDA2BC;CACD;;+BAIU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC"}
|
|
File without changes
|