pict-section-formeditor 1.0.0
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/LICENSE +21 -0
- package/README.md +118 -0
- package/docs/.nojekyll +0 -0
- package/docs/README.md +162 -0
- package/docs/_sidebar.md +23 -0
- package/docs/_topbar.md +5 -0
- package/docs/cover.md +12 -0
- package/docs/css/docuserve.css +73 -0
- package/docs/index.html +39 -0
- package/docs/retold-catalog.json +224 -0
- package/docs/retold-keyword-index.json +46846 -0
- package/example_applications/form_editor/.quackage.json +10 -0
- package/example_applications/form_editor/FormEditor-Example-Application.js +226 -0
- package/example_applications/form_editor/html/icon-chooser.html +375 -0
- package/example_applications/form_editor/html/index.html +54 -0
- package/example_applications/form_editor/package.json +50 -0
- package/package.json +55 -0
- package/sample_manifests/Complex-Table.json +974 -0
- package/sample_manifests/Distill-Example.json +200 -0
- package/sample_manifests/Gradebook-Assignment.json +38 -0
- package/sample_manifests/Gradebook-Student.json +40 -0
- package/sample_manifests/Manyfest-Editor.json +347 -0
- package/sample_manifests/Simple-Form.json +232 -0
- package/sample_manifests/Simple-Table.json +79 -0
- package/source/Pict-Section-FormEditor-DefaultConfiguration.js +3321 -0
- package/source/Pict-Section-FormEditor.js +35 -0
- package/source/providers/Pict-Provider-ChildPictManager-Application.js +40 -0
- package/source/providers/Pict-Provider-ChildPictManager.js +238 -0
- package/source/providers/Pict-Provider-FormEditorDocumentation.js +356 -0
- package/source/providers/Pict-Provider-FormEditorDragDrop.js +535 -0
- package/source/providers/Pict-Provider-FormEditorIconography.js +1002 -0
- package/source/providers/Pict-Provider-FormEditorManifestOps.js +1443 -0
- package/source/providers/Pict-Provider-FormEditorRendering.js +730 -0
- package/source/providers/Pict-Provider-FormEditorUtilities.js +862 -0
- package/source/providers/Pict-Provider-PreviewCSS.js +42 -0
- package/source/views/PictView-FormEditor-InlineEditing.js +309 -0
- package/source/views/PictView-FormEditor-InputTypePicker.js +532 -0
- package/source/views/PictView-FormEditor-PropertiesPanel.js +7730 -0
- package/source/views/PictView-FormEditor.js +681 -0
- package/test/Pict-Section-FormEditor_tests.js +4102 -0
- package/user-documentation/.pict_documentation_topics.json +695 -0
- package/user-documentation/Getting-Started.md +32 -0
- package/user-documentation/Groups.md +52 -0
- package/user-documentation/Inputs.md +98 -0
- package/user-documentation/Sections.md +36 -0
- package/user-documentation/Shortcuts.md +44 -0
- package/user-documentation/Solver-Expression-Walkthrough.md +176 -0
- package/user-documentation/Solver-Expressions-Advanced.md +344 -0
- package/user-documentation/Solver-Functions.md +213 -0
- package/user-documentation/Solvers.md +81 -0
- package/user-documentation/ToC.md +18 -0
- package/user-documentation/solverfunctions/abs.md +84 -0
- package/user-documentation/solverfunctions/aggregationhistogram.md +83 -0
- package/user-documentation/solverfunctions/aggregationhistogrambyobject.md +64 -0
- package/user-documentation/solverfunctions/arrayconcat.md +64 -0
- package/user-documentation/solverfunctions/avg.md +81 -0
- package/user-documentation/solverfunctions/bucketset.md +69 -0
- package/user-documentation/solverfunctions/ceil.md +70 -0
- package/user-documentation/solverfunctions/cleanvaluearray.md +66 -0
- package/user-documentation/solverfunctions/cleanvalueobject.md +68 -0
- package/user-documentation/solverfunctions/colorgroupbackground.md +60 -0
- package/user-documentation/solverfunctions/colorinputbackground.md +62 -0
- package/user-documentation/solverfunctions/colorinputbackgroundtabular.md +64 -0
- package/user-documentation/solverfunctions/colorsectionbackground.md +59 -0
- package/user-documentation/solverfunctions/compare.md +72 -0
- package/user-documentation/solverfunctions/concat.md +73 -0
- package/user-documentation/solverfunctions/concatraw.md +73 -0
- package/user-documentation/solverfunctions/cos.md +75 -0
- package/user-documentation/solverfunctions/count.md +73 -0
- package/user-documentation/solverfunctions/countset.md +65 -0
- package/user-documentation/solverfunctions/countsetelements.md +63 -0
- package/user-documentation/solverfunctions/createarrayfromabsolutevalues.md +63 -0
- package/user-documentation/solverfunctions/createvalueobjectbyhashes.md +69 -0
- package/user-documentation/solverfunctions/cumulativesummation.md +96 -0
- package/user-documentation/solverfunctions/dateadddays.md +79 -0
- package/user-documentation/solverfunctions/dateaddhours.md +74 -0
- package/user-documentation/solverfunctions/dateaddmilliseconds.md +65 -0
- package/user-documentation/solverfunctions/dateaddminutes.md +72 -0
- package/user-documentation/solverfunctions/dateaddmonths.md +74 -0
- package/user-documentation/solverfunctions/dateaddseconds.md +66 -0
- package/user-documentation/solverfunctions/dateaddweeks.md +73 -0
- package/user-documentation/solverfunctions/dateaddyears.md +74 -0
- package/user-documentation/solverfunctions/datedaydifference.md +84 -0
- package/user-documentation/solverfunctions/datefromparts.md +81 -0
- package/user-documentation/solverfunctions/datehourdifference.md +64 -0
- package/user-documentation/solverfunctions/datemathadd.md +72 -0
- package/user-documentation/solverfunctions/datemilliseconddifference.md +64 -0
- package/user-documentation/solverfunctions/dateminutedifference.md +64 -0
- package/user-documentation/solverfunctions/datemonthdifference.md +66 -0
- package/user-documentation/solverfunctions/dateseconddifference.md +64 -0
- package/user-documentation/solverfunctions/dateweekdifference.md +65 -0
- package/user-documentation/solverfunctions/dateyeardifference.md +64 -0
- package/user-documentation/solverfunctions/differencearrays.md +59 -0
- package/user-documentation/solverfunctions/disablesolverordinal.md +58 -0
- package/user-documentation/solverfunctions/distributionhistogram.md +96 -0
- package/user-documentation/solverfunctions/distributionhistogrambyobject.md +64 -0
- package/user-documentation/solverfunctions/enablesolverordinal.md +57 -0
- package/user-documentation/solverfunctions/entryinset.md +72 -0
- package/user-documentation/solverfunctions/euler.md +77 -0
- package/user-documentation/solverfunctions/exp.md +74 -0
- package/user-documentation/solverfunctions/findfirstvaluebyexactmatch.md +67 -0
- package/user-documentation/solverfunctions/findfirstvaluebystringincludes.md +67 -0
- package/user-documentation/solverfunctions/flatten.md +76 -0
- package/user-documentation/solverfunctions/floor.md +70 -0
- package/user-documentation/solverfunctions/gaussianelimination.md +75 -0
- package/user-documentation/solverfunctions/generatearrayofobjectsfromsets.md +70 -0
- package/user-documentation/solverfunctions/generatehtmlhexcolor.md +67 -0
- package/user-documentation/solverfunctions/getvalue.md +90 -0
- package/user-documentation/solverfunctions/getvaluearray.md +64 -0
- package/user-documentation/solverfunctions/getvalueobject.md +67 -0
- package/user-documentation/solverfunctions/hidesections.md +58 -0
- package/user-documentation/solverfunctions/if.md +109 -0
- package/user-documentation/solverfunctions/iterativeseries.md +107 -0
- package/user-documentation/solverfunctions/join.md +75 -0
- package/user-documentation/solverfunctions/joinraw.md +64 -0
- package/user-documentation/solverfunctions/largestinset.md +63 -0
- package/user-documentation/solverfunctions/leastsquares.md +66 -0
- package/user-documentation/solverfunctions/linest.md +58 -0
- package/user-documentation/solverfunctions/log.md +74 -0
- package/user-documentation/solverfunctions/logvalues.md +65 -0
- package/user-documentation/solverfunctions/match.md +71 -0
- package/user-documentation/solverfunctions/matrixinverse.md +67 -0
- package/user-documentation/solverfunctions/matrixmultiply.md +71 -0
- package/user-documentation/solverfunctions/matrixtranspose.md +72 -0
- package/user-documentation/solverfunctions/matrixvectormultiply.md +69 -0
- package/user-documentation/solverfunctions/max.md +73 -0
- package/user-documentation/solverfunctions/mean.md +63 -0
- package/user-documentation/solverfunctions/median.md +79 -0
- package/user-documentation/solverfunctions/min.md +73 -0
- package/user-documentation/solverfunctions/mode.md +66 -0
- package/user-documentation/solverfunctions/objectkeystoarray.md +66 -0
- package/user-documentation/solverfunctions/objectvaluessortbyexternalobjectarray.md +65 -0
- package/user-documentation/solverfunctions/objectvaluestoarray.md +67 -0
- package/user-documentation/solverfunctions/percent.md +75 -0
- package/user-documentation/solverfunctions/pi.md +77 -0
- package/user-documentation/solverfunctions/polynomialregression.md +69 -0
- package/user-documentation/solverfunctions/predict.md +71 -0
- package/user-documentation/solverfunctions/rad.md +85 -0
- package/user-documentation/solverfunctions/randomfloat.md +63 -0
- package/user-documentation/solverfunctions/randomfloatbetween.md +72 -0
- package/user-documentation/solverfunctions/randomfloatupto.md +65 -0
- package/user-documentation/solverfunctions/randominteger.md +56 -0
- package/user-documentation/solverfunctions/randomintegerbetween.md +72 -0
- package/user-documentation/solverfunctions/randomintegerupto.md +64 -0
- package/user-documentation/solverfunctions/refreshtabularsection.md +57 -0
- package/user-documentation/solverfunctions/resolvehtmlentities.md +64 -0
- package/user-documentation/solverfunctions/round.md +111 -0
- package/user-documentation/solverfunctions/runsolvers.md +49 -0
- package/user-documentation/solverfunctions/setconcatenate.md +64 -0
- package/user-documentation/solverfunctions/setgroupvisibility.md +60 -0
- package/user-documentation/solverfunctions/setsectionvisibility.md +59 -0
- package/user-documentation/solverfunctions/setsolverordinalenabled.md +59 -0
- package/user-documentation/solverfunctions/settabularrowlength.md +57 -0
- package/user-documentation/solverfunctions/setvalue.md +65 -0
- package/user-documentation/solverfunctions/showsections.md +58 -0
- package/user-documentation/solverfunctions/sin.md +83 -0
- package/user-documentation/solverfunctions/slice.md +80 -0
- package/user-documentation/solverfunctions/smallestinset.md +63 -0
- package/user-documentation/solverfunctions/sortarray.md +58 -0
- package/user-documentation/solverfunctions/sorthistogram.md +70 -0
- package/user-documentation/solverfunctions/sorthistogrambykeys.md +69 -0
- package/user-documentation/solverfunctions/sortset.md +75 -0
- package/user-documentation/solverfunctions/sqrt.md +85 -0
- package/user-documentation/solverfunctions/stdev.md +81 -0
- package/user-documentation/solverfunctions/stdeva.md +58 -0
- package/user-documentation/solverfunctions/stdevp.md +83 -0
- package/user-documentation/solverfunctions/stringcountsegments.md +66 -0
- package/user-documentation/solverfunctions/stringgetsegments.md +74 -0
- package/user-documentation/solverfunctions/subtractingsummation.md +66 -0
- package/user-documentation/solverfunctions/sum.md +78 -0
- package/user-documentation/solverfunctions/tan.md +78 -0
- package/user-documentation/solverfunctions/tofixed.md +75 -0
- package/user-documentation/solverfunctions/unionarrays.md +59 -0
- package/user-documentation/solverfunctions/uniquearray.md +58 -0
- package/user-documentation/solverfunctions/var.md +67 -0
- package/user-documentation/solverfunctions/vara.md +58 -0
- package/user-documentation/solverfunctions/varp.md +66 -0
- package/user-documentation/solverfunctions/when.md +98 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# exp
|
|
2
|
+
|
|
3
|
+
Calculates e raised to the power of a number.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
exp(exponent)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Description |
|
|
14
|
+
|-----------|------|-------------|
|
|
15
|
+
| `exponent` | Number | The power to raise e to |
|
|
16
|
+
|
|
17
|
+
## Returns
|
|
18
|
+
|
|
19
|
+
Number - The value of e^exponent.
|
|
20
|
+
|
|
21
|
+
## Description
|
|
22
|
+
|
|
23
|
+
The `exp` function calculates e (Euler's number, approximately 2.71828) raised to the specified power. This is the inverse of the natural logarithm function.
|
|
24
|
+
|
|
25
|
+
## Examples
|
|
26
|
+
|
|
27
|
+
### Basic Usage
|
|
28
|
+
|
|
29
|
+
```expression
|
|
30
|
+
Result = EXP(1)
|
|
31
|
+
// Result: 2.718281828459045 (e)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Exponential of Zero
|
|
35
|
+
|
|
36
|
+
```expression
|
|
37
|
+
Result = EXP(0)
|
|
38
|
+
// Result: 1
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### With Variables
|
|
42
|
+
|
|
43
|
+
```expression
|
|
44
|
+
GrowthFactor = EXP(Rate * Time)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Inverse of log
|
|
48
|
+
|
|
49
|
+
```expression
|
|
50
|
+
// EXP and LOG are inverse functions
|
|
51
|
+
Original = 2.5
|
|
52
|
+
Transformed = EXP(LOG(Original))
|
|
53
|
+
// Transformed ≈ 2.5
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Use Cases
|
|
57
|
+
|
|
58
|
+
- **Growth models**: Exponential growth calculations
|
|
59
|
+
- **Statistics**: Normal distribution calculations
|
|
60
|
+
- **Finance**: Continuous compound interest
|
|
61
|
+
- **Physics**: Decay and growth functions
|
|
62
|
+
|
|
63
|
+
## Related Functions
|
|
64
|
+
|
|
65
|
+
- [log](./log.md) - Inverse function (natural logarithm)
|
|
66
|
+
- [euler](./euler.md) - Euler's number constant
|
|
67
|
+
- [sqrt](./sqrt.md) - Square root
|
|
68
|
+
|
|
69
|
+
## Notes
|
|
70
|
+
|
|
71
|
+
- EXP(0) = 1
|
|
72
|
+
- EXP(1) = e ≈ 2.71828
|
|
73
|
+
- Uses JavaScript's `Math.exp` internally
|
|
74
|
+
- Useful for exponential growth/decay calculations
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# findfirstvaluebyexactmatch
|
|
2
|
+
|
|
3
|
+
Finds the first object in an array where a property exactly matches a value.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
findfirstvaluebyexactmatch(array, property, value)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Description |
|
|
14
|
+
|-----------|------|-------------|
|
|
15
|
+
| `array` | Array | Array of objects to search |
|
|
16
|
+
| `property` | String | Property name to match against |
|
|
17
|
+
| `value` | Any | Value to match |
|
|
18
|
+
|
|
19
|
+
## Returns
|
|
20
|
+
|
|
21
|
+
Object - The first matching object, or undefined if not found.
|
|
22
|
+
|
|
23
|
+
## Description
|
|
24
|
+
|
|
25
|
+
The `findfirstvaluebyexactmatch` function searches through an array of objects and returns the first object where the specified property exactly matches the given value.
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
### Basic Usage
|
|
30
|
+
|
|
31
|
+
```expression
|
|
32
|
+
// Given array: [{ id: 1, name: "Alice" }, { id: 2, name: "Bob" }]
|
|
33
|
+
Result = FINDFIRSTVALUEBYEXACTMATCH(Users, "name", "Bob")
|
|
34
|
+
// Result: { id: 2, name: "Bob" }
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Find by ID
|
|
38
|
+
|
|
39
|
+
```expression
|
|
40
|
+
User = FINDFIRSTVALUEBYEXACTMATCH(AppData.Users, "id", "U123")
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Product Lookup
|
|
44
|
+
|
|
45
|
+
```expression
|
|
46
|
+
Product = FINDFIRSTVALUEBYEXACTMATCH(Products, "sku", "WIDGET-001")
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Use Cases
|
|
50
|
+
|
|
51
|
+
- **Lookups**: Find record by unique property
|
|
52
|
+
- **Data retrieval**: Get specific object
|
|
53
|
+
- **Validation**: Check if record exists
|
|
54
|
+
- **Search**: Simple exact-match search
|
|
55
|
+
|
|
56
|
+
## Related Functions
|
|
57
|
+
|
|
58
|
+
- [findfirstvaluebystringincludes](./findfirstvaluebystringincludes.md) - Partial string match
|
|
59
|
+
- [match](./match.md) - Regex pattern matching
|
|
60
|
+
- [entryinset](./entryinset.md) - Check if value exists in set
|
|
61
|
+
|
|
62
|
+
## Notes
|
|
63
|
+
|
|
64
|
+
- Returns first match only
|
|
65
|
+
- Case-sensitive matching
|
|
66
|
+
- Returns undefined if not found
|
|
67
|
+
- Uses the Utility service's `findFirstValueByExactMatch` method
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# findfirstvaluebystringincludes
|
|
2
|
+
|
|
3
|
+
Finds the first object where a property contains a substring.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
findfirstvaluebystringincludes(array, property, substring)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Description |
|
|
14
|
+
|-----------|------|-------------|
|
|
15
|
+
| `array` | Array | Array of objects to search |
|
|
16
|
+
| `property` | String | Property name to search in |
|
|
17
|
+
| `substring` | String | Substring to search for |
|
|
18
|
+
|
|
19
|
+
## Returns
|
|
20
|
+
|
|
21
|
+
Object - The first matching object, or undefined if not found.
|
|
22
|
+
|
|
23
|
+
## Description
|
|
24
|
+
|
|
25
|
+
The `findfirstvaluebystringincludes` function searches through an array of objects and returns the first object where the specified property contains the given substring.
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
### Basic Usage
|
|
30
|
+
|
|
31
|
+
```expression
|
|
32
|
+
// Given: [{ name: "Alice Smith" }, { name: "Bob Jones" }]
|
|
33
|
+
Result = FINDFIRSTVALUEBYSTRINGINCLUDES(Users, "name", "Smith")
|
|
34
|
+
// Result: { name: "Alice Smith" }
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Email Search
|
|
38
|
+
|
|
39
|
+
```expression
|
|
40
|
+
User = FINDFIRSTVALUEBYSTRINGINCLUDES(Users, "email", "@company.com")
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Description Search
|
|
44
|
+
|
|
45
|
+
```expression
|
|
46
|
+
Product = FINDFIRSTVALUEBYSTRINGINCLUDES(Products, "description", "wireless")
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Use Cases
|
|
50
|
+
|
|
51
|
+
- **Fuzzy search**: Find by partial match
|
|
52
|
+
- **Text search**: Search in text fields
|
|
53
|
+
- **Filtering**: Find containing substring
|
|
54
|
+
- **Lookups**: Partial name/ID matching
|
|
55
|
+
|
|
56
|
+
## Related Functions
|
|
57
|
+
|
|
58
|
+
- [findfirstvaluebyexactmatch](./findfirstvaluebyexactmatch.md) - Exact match
|
|
59
|
+
- [match](./match.md) - Regex pattern matching
|
|
60
|
+
- [entryinset](./entryinset.md) - Check membership
|
|
61
|
+
|
|
62
|
+
## Notes
|
|
63
|
+
|
|
64
|
+
- Case-sensitive by default
|
|
65
|
+
- Returns first match only
|
|
66
|
+
- Partial string matching
|
|
67
|
+
- Uses the Utility service's `findFirstValueByStringIncludes` method
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# flatten
|
|
2
|
+
|
|
3
|
+
Flattens a nested array or extracts property values from an array of objects.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
flatten(array)
|
|
9
|
+
flatten(arrayOfObjects.property)
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| Parameter | Type | Description |
|
|
15
|
+
|-----------|------|-------------|
|
|
16
|
+
| `array` | Array | The array to flatten or property path to extract |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
Array - A flattened array of values.
|
|
21
|
+
|
|
22
|
+
## Description
|
|
23
|
+
|
|
24
|
+
The `flatten` function can flatten nested arrays into a single-level array, or extract all values of a specific property from an array of objects. This is essential for preparing data for aggregate functions.
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
### Flatten Nested Arrays
|
|
29
|
+
|
|
30
|
+
```expression
|
|
31
|
+
Result = FLATTEN([[1, 2], [3, 4], [5]])
|
|
32
|
+
// Result: [1, 2, 3, 4, 5]
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Extract Property Values
|
|
36
|
+
|
|
37
|
+
```expression
|
|
38
|
+
// Given AppData.Cities with objects containing 'population' property
|
|
39
|
+
Populations = FLATTEN(AppData.Cities.population)
|
|
40
|
+
// Result: [39538223, 29145505, 21538187, ...]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### With Aggregate Functions
|
|
44
|
+
|
|
45
|
+
```expression
|
|
46
|
+
// Sum all populations
|
|
47
|
+
TotalPopulation = SUM(FLATTEN(AppData.Cities.population))
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Chain Operations
|
|
51
|
+
|
|
52
|
+
```expression
|
|
53
|
+
// Get average of extracted values
|
|
54
|
+
AverageScore = AVG(FLATTEN(AppData.Students.score))
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Use Cases
|
|
58
|
+
|
|
59
|
+
- **Data extraction**: Get property values from object arrays
|
|
60
|
+
- **Array processing**: Flatten nested structures
|
|
61
|
+
- **Aggregation prep**: Prepare data for SUM, AVG, etc.
|
|
62
|
+
- **Data transformation**: Restructure array data
|
|
63
|
+
|
|
64
|
+
## Related Functions
|
|
65
|
+
|
|
66
|
+
- [sum](./sum.md) - Sum flattened values
|
|
67
|
+
- [avg](./avg.md) - Average flattened values
|
|
68
|
+
- [objectkeystoarray](./objectkeystoarray.md) - Extract object keys
|
|
69
|
+
- [objectvaluestoarray](./objectvaluestoarray.md) - Extract object values
|
|
70
|
+
|
|
71
|
+
## Notes
|
|
72
|
+
|
|
73
|
+
- Critical for preparing data for aggregate functions
|
|
74
|
+
- Works with both nested arrays and object arrays
|
|
75
|
+
- Uses the Math service's `flatten` method
|
|
76
|
+
- Commonly used in data pipelines
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# floor
|
|
2
|
+
|
|
3
|
+
Returns the largest integer less than or equal to a number.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
floor(value)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Description |
|
|
14
|
+
|-----------|------|-------------|
|
|
15
|
+
| `value` | Number/String | The value to floor |
|
|
16
|
+
|
|
17
|
+
## Returns
|
|
18
|
+
|
|
19
|
+
String - The largest integer less than or equal to the input.
|
|
20
|
+
|
|
21
|
+
## Description
|
|
22
|
+
|
|
23
|
+
The `floor` function rounds a number down to the nearest integer. For positive numbers, this truncates the decimal portion. For negative numbers, it rounds away from zero (more negative).
|
|
24
|
+
|
|
25
|
+
## Examples
|
|
26
|
+
|
|
27
|
+
### Basic Usage
|
|
28
|
+
|
|
29
|
+
```expression
|
|
30
|
+
Result = floor(3.7)
|
|
31
|
+
// Result: "3"
|
|
32
|
+
|
|
33
|
+
Result = floor(3.2)
|
|
34
|
+
// Result: "3"
|
|
35
|
+
|
|
36
|
+
Result = floor(3.0)
|
|
37
|
+
// Result: "3"
|
|
38
|
+
|
|
39
|
+
Result = floor(-2.3)
|
|
40
|
+
// Result: "-3" (rounds toward negative infinity)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### With Expressions
|
|
44
|
+
|
|
45
|
+
```expression
|
|
46
|
+
// Get the integer part of a calculation
|
|
47
|
+
WholeUnits = floor(TotalAmount / UnitPrice)
|
|
48
|
+
|
|
49
|
+
// Determine array index from position
|
|
50
|
+
Index = floor(Position / ItemSize)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Use Cases
|
|
54
|
+
|
|
55
|
+
- **Integer division**: Getting the quotient without remainder
|
|
56
|
+
- **Array indexing**: Converting continuous values to discrete indices
|
|
57
|
+
- **Pagination**: Calculating page numbers
|
|
58
|
+
- **Time calculations**: Converting decimal hours to whole hours
|
|
59
|
+
|
|
60
|
+
## Related Functions
|
|
61
|
+
|
|
62
|
+
- [ceil](./ceil.md) - Round up (ceiling)
|
|
63
|
+
- [round](./round.md) - Round to nearest
|
|
64
|
+
- [tofixed](./tofixed.md) - Format to fixed decimal places
|
|
65
|
+
|
|
66
|
+
## Notes
|
|
67
|
+
|
|
68
|
+
- Uses arbitrary precision arithmetic
|
|
69
|
+
- Returns a string representation
|
|
70
|
+
- For negative numbers, floor(-2.3) = -3, not -2
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# gaussianelimination
|
|
2
|
+
|
|
3
|
+
Solves a system of linear equations using Gaussian elimination.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
gaussianelimination(coefficientMatrix, constantVector)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Description |
|
|
14
|
+
|-----------|------|-------------|
|
|
15
|
+
| `coefficientMatrix` | Array | Matrix of coefficients (n×n) |
|
|
16
|
+
| `constantVector` | Array | Vector of constants (length n) |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
Array - Solution vector.
|
|
21
|
+
|
|
22
|
+
## Description
|
|
23
|
+
|
|
24
|
+
The `gaussianelimination` function solves a system of linear equations Ax = b using Gaussian elimination with back substitution.
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
### Basic Usage
|
|
29
|
+
|
|
30
|
+
```expression
|
|
31
|
+
// Solve:
|
|
32
|
+
// 2x + y = 5
|
|
33
|
+
// x + 3y = 10
|
|
34
|
+
|
|
35
|
+
A = [[2, 1], [1, 3]]
|
|
36
|
+
b = [5, 10]
|
|
37
|
+
Solution = GAUSSIANELIMINATION(A, b)
|
|
38
|
+
// Result: [1, 3] meaning x=1, y=3
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 3x3 System
|
|
42
|
+
|
|
43
|
+
```expression
|
|
44
|
+
// Three equations with three unknowns
|
|
45
|
+
Coefficients = [[1, 2, 1], [2, 6, 1], [1, 1, 4]]
|
|
46
|
+
Constants = [2, 7, 3]
|
|
47
|
+
Solution = GAUSSIANELIMINATION(Coefficients, Constants)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Engineering Problem
|
|
51
|
+
|
|
52
|
+
```expression
|
|
53
|
+
// Solve circuit/structure equations
|
|
54
|
+
Values = GAUSSIANELIMINATION(SystemMatrix, LoadVector)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Use Cases
|
|
58
|
+
|
|
59
|
+
- **Engineering**: Structural analysis
|
|
60
|
+
- **Physics**: Equilibrium problems
|
|
61
|
+
- **Economics**: Input-output models
|
|
62
|
+
- **Optimization**: Constraint systems
|
|
63
|
+
|
|
64
|
+
## Related Functions
|
|
65
|
+
|
|
66
|
+
- [matrixinverse](./matrixinverse.md) - Alternative via inverse
|
|
67
|
+
- [matrixmultiply](./matrixmultiply.md) - Verify solutions
|
|
68
|
+
- [leastsquares](./leastsquares.md) - Overdetermined systems
|
|
69
|
+
|
|
70
|
+
## Notes
|
|
71
|
+
|
|
72
|
+
- Efficient for dense systems
|
|
73
|
+
- Handles n×n systems
|
|
74
|
+
- May have numerical precision limits
|
|
75
|
+
- Uses the Math service's `gaussianElimination` method
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# generatearrayofobjectsfromsets
|
|
2
|
+
|
|
3
|
+
Generates an array of objects from parallel arrays.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
generatearrayofobjectsfromsets(keys, valueArrays)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Description |
|
|
14
|
+
|-----------|------|-------------|
|
|
15
|
+
| `keys` | Array | Array of property names |
|
|
16
|
+
| `valueArrays` | Array | Array of value arrays |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
Array - Array of objects with properties from keys and values from arrays.
|
|
21
|
+
|
|
22
|
+
## Description
|
|
23
|
+
|
|
24
|
+
The `generatearrayofobjectsfromsets` function creates an array of objects by combining property names with parallel arrays of values. Each object gets its properties from corresponding positions in the value arrays.
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
### Basic Usage
|
|
29
|
+
|
|
30
|
+
```expression
|
|
31
|
+
Keys = ["name", "age"]
|
|
32
|
+
Names = ["Alice", "Bob", "Carol"]
|
|
33
|
+
Ages = [25, 30, 35]
|
|
34
|
+
|
|
35
|
+
Result = GENERATEARRAYOFOBJECTSFROMSETS(Keys, [Names, Ages])
|
|
36
|
+
// Result: [
|
|
37
|
+
// { name: "Alice", age: 25 },
|
|
38
|
+
// { name: "Bob", age: 30 },
|
|
39
|
+
// { name: "Carol", age: 35 }
|
|
40
|
+
// ]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### From CSV Columns
|
|
44
|
+
|
|
45
|
+
```expression
|
|
46
|
+
Headers = ["id", "product", "price"]
|
|
47
|
+
Column1 = ["001", "002", "003"]
|
|
48
|
+
Column2 = ["Widget", "Gadget", "Thing"]
|
|
49
|
+
Column3 = [9.99, 19.99, 4.99]
|
|
50
|
+
|
|
51
|
+
Records = GENERATEARRAYOFOBJECTSFROMSETS(Headers, [Column1, Column2, Column3])
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Use Cases
|
|
55
|
+
|
|
56
|
+
- **Data transformation**: Convert columnar to row data
|
|
57
|
+
- **CSV processing**: Build objects from columns
|
|
58
|
+
- **Parallel arrays**: Combine related arrays
|
|
59
|
+
- **Data generation**: Create structured data
|
|
60
|
+
|
|
61
|
+
## Related Functions
|
|
62
|
+
|
|
63
|
+
- [createvalueobjectbyhashes](./createvalueobjectbyhashes.md) - Create single object
|
|
64
|
+
- [objectkeystoarray](./objectkeystoarray.md) - Extract keys
|
|
65
|
+
- [flatten](./flatten.md) - Flatten arrays
|
|
66
|
+
|
|
67
|
+
## Notes
|
|
68
|
+
|
|
69
|
+
- Value arrays should have same length
|
|
70
|
+
- Uses the Math service's `generateArrayOfObjectsFromSets` method
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# generatehtmlhexcolor
|
|
2
|
+
|
|
3
|
+
Generates an HTML hex color string from RGB components.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
generatehtmlhexcolor(red, green, blue)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Description |
|
|
14
|
+
|-----------|------|-------------|
|
|
15
|
+
| `red` | Integer | Red component, 0-255 |
|
|
16
|
+
| `green` | Integer | Green component, 0-255 |
|
|
17
|
+
| `blue` | Integer | Blue component, 0-255 |
|
|
18
|
+
|
|
19
|
+
## Returns
|
|
20
|
+
|
|
21
|
+
A string containing the HTML hex color code (e.g., `"#FF0000"`).
|
|
22
|
+
|
|
23
|
+
## Description
|
|
24
|
+
|
|
25
|
+
The `generatehtmlhexcolor` function takes three integer values representing the red, green, and blue components of a color and returns the corresponding HTML hex color string. Each component should be an integer between 0 and 255. The returned string is in the format `#RRGGBB` and can be used with color-related form functions such as `colorsectionbackground`, `colorgroupbackground`, and `colorinputbackground`.
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
### Generating an orange color
|
|
30
|
+
|
|
31
|
+
```expression
|
|
32
|
+
Color = generatehtmlhexcolor(255, 128, 0)
|
|
33
|
+
// Color is "#FF8000"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Generating red
|
|
37
|
+
|
|
38
|
+
```expression
|
|
39
|
+
Red = generatehtmlhexcolor(255, 0, 0)
|
|
40
|
+
// Red is "#FF0000"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Using calculated color values
|
|
44
|
+
|
|
45
|
+
```expression
|
|
46
|
+
Intensity = Score * 255 / 100
|
|
47
|
+
BarColor = generatehtmlhexcolor(Intensity, 255 - Intensity, 0)
|
|
48
|
+
// Produces a color ranging from green (low score) to red (high score)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Use Cases
|
|
52
|
+
|
|
53
|
+
- **Dynamic coloring**: Generate colors based on calculated values for use in form styling
|
|
54
|
+
- **Data visualization**: Map numeric values to colors for visual feedback in forms
|
|
55
|
+
- **Conditional formatting**: Create color values dynamically based on form state
|
|
56
|
+
|
|
57
|
+
## Related Functions
|
|
58
|
+
|
|
59
|
+
- [colorsectionbackground](./colorsectionbackground.md) - Sets the background color of a form section
|
|
60
|
+
- [colorgroupbackground](./colorgroupbackground.md) - Sets the background color of a form group
|
|
61
|
+
- [colorinputbackground](./colorinputbackground.md) - Sets the background color of a form input
|
|
62
|
+
|
|
63
|
+
## Notes
|
|
64
|
+
|
|
65
|
+
- Each RGB component should be an integer between 0 and 255
|
|
66
|
+
- Values outside the 0-255 range may produce unexpected results
|
|
67
|
+
- The returned string includes the `#` prefix
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# getvalue
|
|
2
|
+
|
|
3
|
+
Retrieves a value from application state using a hash/path address.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
getvalue(path)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Description |
|
|
14
|
+
|-----------|------|-------------|
|
|
15
|
+
| `path` | String | Dot-notation path to the value (in quotes) |
|
|
16
|
+
|
|
17
|
+
## Returns
|
|
18
|
+
|
|
19
|
+
The value at the specified path, or `undefined` if not found.
|
|
20
|
+
|
|
21
|
+
## Description
|
|
22
|
+
|
|
23
|
+
The `getvalue` function retrieves values from the Fable application state (AppData, services, etc.) using a dot-notation path. This allows expressions to access data stored elsewhere in the application.
|
|
24
|
+
|
|
25
|
+
## Examples
|
|
26
|
+
|
|
27
|
+
### Basic Usage
|
|
28
|
+
|
|
29
|
+
```expression
|
|
30
|
+
// Access a simple value
|
|
31
|
+
PitSize = getvalue("AppData.Pit")
|
|
32
|
+
// If AppData.Pit = "Bottomless"
|
|
33
|
+
// Result: "Bottomless"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Array Access
|
|
37
|
+
|
|
38
|
+
```expression
|
|
39
|
+
// Access array elements
|
|
40
|
+
FirstStudent = GETVALUE("AppData.Students[0]")
|
|
41
|
+
// If AppData.Students = ["Kim", "Jim", "Joan Jett", "Tank Girl"]
|
|
42
|
+
// Result: "Kim"
|
|
43
|
+
|
|
44
|
+
ThirdStudent = GETVALUE("AppData.Students[2]")
|
|
45
|
+
// Result: "Joan Jett"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Nested Object Access
|
|
49
|
+
|
|
50
|
+
```expression
|
|
51
|
+
// Access nested properties
|
|
52
|
+
CityName = getvalue("AppData.Cities[0].city")
|
|
53
|
+
// If AppData.Cities[0] = { city: "New York", state: "New York" }
|
|
54
|
+
// Result: "New York"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### With Null Coalescence Assignment
|
|
58
|
+
|
|
59
|
+
```expression
|
|
60
|
+
// Only assign if target doesn't already have a value
|
|
61
|
+
Name ?= GETVALUE("AppData.Students[0]")
|
|
62
|
+
// Sets Name to "Kim" only if Name is currently empty/undefined
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### In Complex Expressions
|
|
66
|
+
|
|
67
|
+
```expression
|
|
68
|
+
// Combine with other functions
|
|
69
|
+
Histogram = aggregationhistogrambyobject(getvalue("AppData.Teams"), "States", "Score")
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Use Cases
|
|
73
|
+
|
|
74
|
+
- **Configuration access**: Reading application settings
|
|
75
|
+
- **Data lookup**: Retrieving stored values
|
|
76
|
+
- **Dynamic references**: Access paths determined at runtime
|
|
77
|
+
- **Cross-module data**: Sharing data between components
|
|
78
|
+
|
|
79
|
+
## Related Functions
|
|
80
|
+
|
|
81
|
+
- [getvaluearray](./getvaluearray.md) - Get array of values
|
|
82
|
+
- [getvalueobject](./getvalueobject.md) - Get object of values
|
|
83
|
+
|
|
84
|
+
## Notes
|
|
85
|
+
|
|
86
|
+
- The path must be quoted (it's a string)
|
|
87
|
+
- Accesses `fable.Utility.getInternalValueByHash`
|
|
88
|
+
- Returns `undefined` if the path doesn't exist
|
|
89
|
+
- Array indices use bracket notation: `[0]`, `[1]`, etc.
|
|
90
|
+
- Works with any data stored on the Fable instance
|