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.
Files changed (178) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +118 -0
  3. package/docs/.nojekyll +0 -0
  4. package/docs/README.md +162 -0
  5. package/docs/_sidebar.md +23 -0
  6. package/docs/_topbar.md +5 -0
  7. package/docs/cover.md +12 -0
  8. package/docs/css/docuserve.css +73 -0
  9. package/docs/index.html +39 -0
  10. package/docs/retold-catalog.json +224 -0
  11. package/docs/retold-keyword-index.json +46846 -0
  12. package/example_applications/form_editor/.quackage.json +10 -0
  13. package/example_applications/form_editor/FormEditor-Example-Application.js +226 -0
  14. package/example_applications/form_editor/html/icon-chooser.html +375 -0
  15. package/example_applications/form_editor/html/index.html +54 -0
  16. package/example_applications/form_editor/package.json +50 -0
  17. package/package.json +55 -0
  18. package/sample_manifests/Complex-Table.json +974 -0
  19. package/sample_manifests/Distill-Example.json +200 -0
  20. package/sample_manifests/Gradebook-Assignment.json +38 -0
  21. package/sample_manifests/Gradebook-Student.json +40 -0
  22. package/sample_manifests/Manyfest-Editor.json +347 -0
  23. package/sample_manifests/Simple-Form.json +232 -0
  24. package/sample_manifests/Simple-Table.json +79 -0
  25. package/source/Pict-Section-FormEditor-DefaultConfiguration.js +3321 -0
  26. package/source/Pict-Section-FormEditor.js +35 -0
  27. package/source/providers/Pict-Provider-ChildPictManager-Application.js +40 -0
  28. package/source/providers/Pict-Provider-ChildPictManager.js +238 -0
  29. package/source/providers/Pict-Provider-FormEditorDocumentation.js +356 -0
  30. package/source/providers/Pict-Provider-FormEditorDragDrop.js +535 -0
  31. package/source/providers/Pict-Provider-FormEditorIconography.js +1002 -0
  32. package/source/providers/Pict-Provider-FormEditorManifestOps.js +1443 -0
  33. package/source/providers/Pict-Provider-FormEditorRendering.js +730 -0
  34. package/source/providers/Pict-Provider-FormEditorUtilities.js +862 -0
  35. package/source/providers/Pict-Provider-PreviewCSS.js +42 -0
  36. package/source/views/PictView-FormEditor-InlineEditing.js +309 -0
  37. package/source/views/PictView-FormEditor-InputTypePicker.js +532 -0
  38. package/source/views/PictView-FormEditor-PropertiesPanel.js +7730 -0
  39. package/source/views/PictView-FormEditor.js +681 -0
  40. package/test/Pict-Section-FormEditor_tests.js +4102 -0
  41. package/user-documentation/.pict_documentation_topics.json +695 -0
  42. package/user-documentation/Getting-Started.md +32 -0
  43. package/user-documentation/Groups.md +52 -0
  44. package/user-documentation/Inputs.md +98 -0
  45. package/user-documentation/Sections.md +36 -0
  46. package/user-documentation/Shortcuts.md +44 -0
  47. package/user-documentation/Solver-Expression-Walkthrough.md +176 -0
  48. package/user-documentation/Solver-Expressions-Advanced.md +344 -0
  49. package/user-documentation/Solver-Functions.md +213 -0
  50. package/user-documentation/Solvers.md +81 -0
  51. package/user-documentation/ToC.md +18 -0
  52. package/user-documentation/solverfunctions/abs.md +84 -0
  53. package/user-documentation/solverfunctions/aggregationhistogram.md +83 -0
  54. package/user-documentation/solverfunctions/aggregationhistogrambyobject.md +64 -0
  55. package/user-documentation/solverfunctions/arrayconcat.md +64 -0
  56. package/user-documentation/solverfunctions/avg.md +81 -0
  57. package/user-documentation/solverfunctions/bucketset.md +69 -0
  58. package/user-documentation/solverfunctions/ceil.md +70 -0
  59. package/user-documentation/solverfunctions/cleanvaluearray.md +66 -0
  60. package/user-documentation/solverfunctions/cleanvalueobject.md +68 -0
  61. package/user-documentation/solverfunctions/colorgroupbackground.md +60 -0
  62. package/user-documentation/solverfunctions/colorinputbackground.md +62 -0
  63. package/user-documentation/solverfunctions/colorinputbackgroundtabular.md +64 -0
  64. package/user-documentation/solverfunctions/colorsectionbackground.md +59 -0
  65. package/user-documentation/solverfunctions/compare.md +72 -0
  66. package/user-documentation/solverfunctions/concat.md +73 -0
  67. package/user-documentation/solverfunctions/concatraw.md +73 -0
  68. package/user-documentation/solverfunctions/cos.md +75 -0
  69. package/user-documentation/solverfunctions/count.md +73 -0
  70. package/user-documentation/solverfunctions/countset.md +65 -0
  71. package/user-documentation/solverfunctions/countsetelements.md +63 -0
  72. package/user-documentation/solverfunctions/createarrayfromabsolutevalues.md +63 -0
  73. package/user-documentation/solverfunctions/createvalueobjectbyhashes.md +69 -0
  74. package/user-documentation/solverfunctions/cumulativesummation.md +96 -0
  75. package/user-documentation/solverfunctions/dateadddays.md +79 -0
  76. package/user-documentation/solverfunctions/dateaddhours.md +74 -0
  77. package/user-documentation/solverfunctions/dateaddmilliseconds.md +65 -0
  78. package/user-documentation/solverfunctions/dateaddminutes.md +72 -0
  79. package/user-documentation/solverfunctions/dateaddmonths.md +74 -0
  80. package/user-documentation/solverfunctions/dateaddseconds.md +66 -0
  81. package/user-documentation/solverfunctions/dateaddweeks.md +73 -0
  82. package/user-documentation/solverfunctions/dateaddyears.md +74 -0
  83. package/user-documentation/solverfunctions/datedaydifference.md +84 -0
  84. package/user-documentation/solverfunctions/datefromparts.md +81 -0
  85. package/user-documentation/solverfunctions/datehourdifference.md +64 -0
  86. package/user-documentation/solverfunctions/datemathadd.md +72 -0
  87. package/user-documentation/solverfunctions/datemilliseconddifference.md +64 -0
  88. package/user-documentation/solverfunctions/dateminutedifference.md +64 -0
  89. package/user-documentation/solverfunctions/datemonthdifference.md +66 -0
  90. package/user-documentation/solverfunctions/dateseconddifference.md +64 -0
  91. package/user-documentation/solverfunctions/dateweekdifference.md +65 -0
  92. package/user-documentation/solverfunctions/dateyeardifference.md +64 -0
  93. package/user-documentation/solverfunctions/differencearrays.md +59 -0
  94. package/user-documentation/solverfunctions/disablesolverordinal.md +58 -0
  95. package/user-documentation/solverfunctions/distributionhistogram.md +96 -0
  96. package/user-documentation/solverfunctions/distributionhistogrambyobject.md +64 -0
  97. package/user-documentation/solverfunctions/enablesolverordinal.md +57 -0
  98. package/user-documentation/solverfunctions/entryinset.md +72 -0
  99. package/user-documentation/solverfunctions/euler.md +77 -0
  100. package/user-documentation/solverfunctions/exp.md +74 -0
  101. package/user-documentation/solverfunctions/findfirstvaluebyexactmatch.md +67 -0
  102. package/user-documentation/solverfunctions/findfirstvaluebystringincludes.md +67 -0
  103. package/user-documentation/solverfunctions/flatten.md +76 -0
  104. package/user-documentation/solverfunctions/floor.md +70 -0
  105. package/user-documentation/solverfunctions/gaussianelimination.md +75 -0
  106. package/user-documentation/solverfunctions/generatearrayofobjectsfromsets.md +70 -0
  107. package/user-documentation/solverfunctions/generatehtmlhexcolor.md +67 -0
  108. package/user-documentation/solverfunctions/getvalue.md +90 -0
  109. package/user-documentation/solverfunctions/getvaluearray.md +64 -0
  110. package/user-documentation/solverfunctions/getvalueobject.md +67 -0
  111. package/user-documentation/solverfunctions/hidesections.md +58 -0
  112. package/user-documentation/solverfunctions/if.md +109 -0
  113. package/user-documentation/solverfunctions/iterativeseries.md +107 -0
  114. package/user-documentation/solverfunctions/join.md +75 -0
  115. package/user-documentation/solverfunctions/joinraw.md +64 -0
  116. package/user-documentation/solverfunctions/largestinset.md +63 -0
  117. package/user-documentation/solverfunctions/leastsquares.md +66 -0
  118. package/user-documentation/solverfunctions/linest.md +58 -0
  119. package/user-documentation/solverfunctions/log.md +74 -0
  120. package/user-documentation/solverfunctions/logvalues.md +65 -0
  121. package/user-documentation/solverfunctions/match.md +71 -0
  122. package/user-documentation/solverfunctions/matrixinverse.md +67 -0
  123. package/user-documentation/solverfunctions/matrixmultiply.md +71 -0
  124. package/user-documentation/solverfunctions/matrixtranspose.md +72 -0
  125. package/user-documentation/solverfunctions/matrixvectormultiply.md +69 -0
  126. package/user-documentation/solverfunctions/max.md +73 -0
  127. package/user-documentation/solverfunctions/mean.md +63 -0
  128. package/user-documentation/solverfunctions/median.md +79 -0
  129. package/user-documentation/solverfunctions/min.md +73 -0
  130. package/user-documentation/solverfunctions/mode.md +66 -0
  131. package/user-documentation/solverfunctions/objectkeystoarray.md +66 -0
  132. package/user-documentation/solverfunctions/objectvaluessortbyexternalobjectarray.md +65 -0
  133. package/user-documentation/solverfunctions/objectvaluestoarray.md +67 -0
  134. package/user-documentation/solverfunctions/percent.md +75 -0
  135. package/user-documentation/solverfunctions/pi.md +77 -0
  136. package/user-documentation/solverfunctions/polynomialregression.md +69 -0
  137. package/user-documentation/solverfunctions/predict.md +71 -0
  138. package/user-documentation/solverfunctions/rad.md +85 -0
  139. package/user-documentation/solverfunctions/randomfloat.md +63 -0
  140. package/user-documentation/solverfunctions/randomfloatbetween.md +72 -0
  141. package/user-documentation/solverfunctions/randomfloatupto.md +65 -0
  142. package/user-documentation/solverfunctions/randominteger.md +56 -0
  143. package/user-documentation/solverfunctions/randomintegerbetween.md +72 -0
  144. package/user-documentation/solverfunctions/randomintegerupto.md +64 -0
  145. package/user-documentation/solverfunctions/refreshtabularsection.md +57 -0
  146. package/user-documentation/solverfunctions/resolvehtmlentities.md +64 -0
  147. package/user-documentation/solverfunctions/round.md +111 -0
  148. package/user-documentation/solverfunctions/runsolvers.md +49 -0
  149. package/user-documentation/solverfunctions/setconcatenate.md +64 -0
  150. package/user-documentation/solverfunctions/setgroupvisibility.md +60 -0
  151. package/user-documentation/solverfunctions/setsectionvisibility.md +59 -0
  152. package/user-documentation/solverfunctions/setsolverordinalenabled.md +59 -0
  153. package/user-documentation/solverfunctions/settabularrowlength.md +57 -0
  154. package/user-documentation/solverfunctions/setvalue.md +65 -0
  155. package/user-documentation/solverfunctions/showsections.md +58 -0
  156. package/user-documentation/solverfunctions/sin.md +83 -0
  157. package/user-documentation/solverfunctions/slice.md +80 -0
  158. package/user-documentation/solverfunctions/smallestinset.md +63 -0
  159. package/user-documentation/solverfunctions/sortarray.md +58 -0
  160. package/user-documentation/solverfunctions/sorthistogram.md +70 -0
  161. package/user-documentation/solverfunctions/sorthistogrambykeys.md +69 -0
  162. package/user-documentation/solverfunctions/sortset.md +75 -0
  163. package/user-documentation/solverfunctions/sqrt.md +85 -0
  164. package/user-documentation/solverfunctions/stdev.md +81 -0
  165. package/user-documentation/solverfunctions/stdeva.md +58 -0
  166. package/user-documentation/solverfunctions/stdevp.md +83 -0
  167. package/user-documentation/solverfunctions/stringcountsegments.md +66 -0
  168. package/user-documentation/solverfunctions/stringgetsegments.md +74 -0
  169. package/user-documentation/solverfunctions/subtractingsummation.md +66 -0
  170. package/user-documentation/solverfunctions/sum.md +78 -0
  171. package/user-documentation/solverfunctions/tan.md +78 -0
  172. package/user-documentation/solverfunctions/tofixed.md +75 -0
  173. package/user-documentation/solverfunctions/unionarrays.md +59 -0
  174. package/user-documentation/solverfunctions/uniquearray.md +58 -0
  175. package/user-documentation/solverfunctions/var.md +67 -0
  176. package/user-documentation/solverfunctions/vara.md +58 -0
  177. package/user-documentation/solverfunctions/varp.md +66 -0
  178. package/user-documentation/solverfunctions/when.md +98 -0
@@ -0,0 +1,64 @@
1
+ # getvaluearray
2
+
3
+ Gets a value from an array by index.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ getvaluearray(array, index)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `array` | Array | The array to retrieve from |
16
+ | `index` | Number | Zero-based index |
17
+
18
+ ## Returns
19
+
20
+ Any - The value at the specified index.
21
+
22
+ ## Description
23
+
24
+ The `getvaluearray` function retrieves a value from an array at the specified index. Uses zero-based indexing.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ Result = GETVALUEARRAY(["a", "b", "c", "d"], 2)
32
+ // Result: "c" (index 2, third element)
33
+ ```
34
+
35
+ ### First Element
36
+
37
+ ```expression
38
+ First = GETVALUEARRAY(Items, 0)
39
+ ```
40
+
41
+ ### With Variable Index
42
+
43
+ ```expression
44
+ SelectedItem = GETVALUEARRAY(Options, SelectedIndex)
45
+ ```
46
+
47
+ ## Use Cases
48
+
49
+ - **Random selection**: Get random array element
50
+ - **Indexed access**: Retrieve by position
51
+ - **Dynamic selection**: Variable-based selection
52
+ - **Data extraction**: Get specific element
53
+
54
+ ## Related Functions
55
+
56
+ - [getvalue](./getvalue.md) - Get property from object
57
+ - [getvalueobject](./getvalueobject.md) - Get from object by key
58
+ - [slice](./slice.md) - Get range of elements
59
+
60
+ ## Notes
61
+
62
+ - Zero-based indexing
63
+ - Returns undefined for out-of-bounds
64
+ - Uses the Logic service's `getValueArray` method
@@ -0,0 +1,67 @@
1
+ # getvalueobject
2
+
3
+ Gets a value from an object by key.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ getvalueobject(object, key)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `object` | Object | The object to retrieve from |
16
+ | `key` | String | The property key |
17
+
18
+ ## Returns
19
+
20
+ Any - The value of the specified property.
21
+
22
+ ## Description
23
+
24
+ The `getvalueobject` function retrieves a value from an object using a string key. This is useful for dynamic property access.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ // Given object: { name: "John", age: 30 }
32
+ Result = GETVALUEOBJECT(Person, "name")
33
+ // Result: "John"
34
+ ```
35
+
36
+ ### Dynamic Key
37
+
38
+ ```expression
39
+ PropertyName = "email"
40
+ Value = GETVALUEOBJECT(User, PropertyName)
41
+ ```
42
+
43
+ ### Histogram Access
44
+
45
+ ```expression
46
+ // Get count for specific category
47
+ Count = GETVALUEOBJECT(CategoryCounts, "Electronics")
48
+ ```
49
+
50
+ ## Use Cases
51
+
52
+ - **Dynamic access**: Access property by variable name
53
+ - **Histogram lookup**: Get value by key
54
+ - **Configuration**: Access settings by name
55
+ - **Data extraction**: Get nested values
56
+
57
+ ## Related Functions
58
+
59
+ - [getvalue](./getvalue.md) - Get from data state
60
+ - [getvaluearray](./getvaluearray.md) - Get from array by index
61
+ - [objectkeystoarray](./objectkeystoarray.md) - Get all keys
62
+
63
+ ## Notes
64
+
65
+ - String key access
66
+ - Returns undefined for missing keys
67
+ - Uses the Logic service's `getValueObject` method
@@ -0,0 +1,58 @@
1
+ # hidesections
2
+
3
+ Hides the specified form sections.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ hidesections(sectionHashes)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `sectionHashes` | Array or String | An array of section hash strings, or a single section hash string |
16
+
17
+ ## Returns
18
+
19
+ Void. This function does not return a value.
20
+
21
+ ## Description
22
+
23
+ The `hidesections` function hides one or more form sections from the page. You can pass either an array of section hash strings to hide multiple sections at once, or a single string to hide one section. Hidden sections are not visible to the user but remain part of the form state. This is commonly used in conjunction with solver logic to conditionally hide parts of a form based on user input or other state.
24
+
25
+ ## Examples
26
+
27
+ ### Hiding multiple sections from an array
28
+
29
+ ```expression
30
+ hidesections(HiddenSectionList)
31
+ // Where HiddenSectionList is an array like ["S2", "S4"]
32
+ // Hides sections S2 and S4
33
+ ```
34
+
35
+ ### Hiding a single section
36
+
37
+ ```expression
38
+ hidesections("OptionalDetails")
39
+ // Hides the OptionalDetails section
40
+ ```
41
+
42
+ ## Use Cases
43
+
44
+ - **Conditional form display**: Hide sections of a form that are not relevant based on user selections
45
+ - **Simplifying forms**: Remove unnecessary sections to reduce visual clutter
46
+ - **Workflow gating**: Hide sections until prerequisite conditions are met
47
+
48
+ ## Related Functions
49
+
50
+ - [showsections](./showsections.md) - Makes the specified form sections visible
51
+ - [setsectionvisibility](./setsectionvisibility.md) - Sets a specific section's visibility with a boolean
52
+ - [setgroupvisibility](./setgroupvisibility.md) - Sets a specific group's visibility within a section
53
+
54
+ ## Notes
55
+
56
+ - Accepts either an array of section hash strings or a single string
57
+ - Section hashes must match the hashes defined in the form configuration
58
+ - Hidden sections retain their data in the application state
@@ -0,0 +1,109 @@
1
+ # if
2
+
3
+ Performs a conditional comparison and returns one of two values based on the result.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ if(left, operator, right, onTrue, onFalse)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `left` | Any | Left value to compare |
16
+ | `operator` | String | Comparison operator |
17
+ | `right` | Any | Right value to compare |
18
+ | `onTrue` | Any | Value returned if comparison is true |
19
+ | `onFalse` | Any | Value returned if comparison is false |
20
+
21
+ ### Comparison Operators
22
+
23
+ | Operator | Alias | Description |
24
+ |----------|-------|-------------|
25
+ | `<` | `LT` | Less than |
26
+ | `<=` | `LTE` | Less than or equal |
27
+ | `>` | `GT` | Greater than |
28
+ | `>=` | `GTE` | Greater than or equal |
29
+ | `==` | | Loose equality (with small tolerance for numbers) |
30
+ | `===` | | Strict equality |
31
+
32
+ ## Returns
33
+
34
+ The `onTrue` value if the comparison is true, otherwise `onFalse`.
35
+
36
+ ## Description
37
+
38
+ The `if` function evaluates a condition and returns different values based on the result. It supports both numeric comparisons (with arbitrary precision) and string comparisons.
39
+
40
+ ## Examples
41
+
42
+ ### Basic Comparison
43
+
44
+ ```expression
45
+ GTE = If(AppData.Cities[0].latitude, "<", "50", "west", "east")
46
+ // If latitude < 50, returns "west", otherwise "east"
47
+ // Result: "west"
48
+ ```
49
+
50
+ ### String Comparison
51
+
52
+ ```expression
53
+ Equals = If(AppData.Cities[0].city, "==", "New York", "yes", "no")
54
+ // Result: "yes"
55
+ ```
56
+
57
+ ### Numeric Equality with Tolerance
58
+
59
+ ```expression
60
+ // Uses small epsilon for floating point comparison
61
+ EpsilonEquals = If("1.0000000001", "==", "1", "yes", "no")
62
+ // Result: "yes" (within tolerance)
63
+
64
+ // Strict equality requires exact match
65
+ PreciseEquals = If("1.0000000001", "===", "1", "yes", "no")
66
+ // Result: "no" (not exactly equal)
67
+ ```
68
+
69
+ ### Computed Return Values
70
+
71
+ ```expression
72
+ // Return values can be expressions
73
+ Computed = If(AppData.Cities[0].latitude, "<", "50", AppData.Cities[0].latitude + 25, AppData.Cities[0].latitude - 25)
74
+ ```
75
+
76
+ ### Nested Conditions
77
+
78
+ ```expression
79
+ // Chain conditions for multiple outcomes
80
+ Grade = IF(Score, ">=", 90, "A", IF(Score, ">=", 80, "B", IF(Score, ">=", 70, "C", "F")))
81
+ ```
82
+
83
+ ### In Complex Expressions
84
+
85
+ ```expression
86
+ // Conditional within larger expressions
87
+ WetCount = IF(DryCount, "<=", 30, DryCount, WetCountIntermediate)
88
+
89
+ // Selecting between computed values
90
+ CombinedValues = MAP VAR dry FROM DryValues VAR wet FROM WetValues VAR x from XValues : IF(x, "LTE", Chart.OptimalMoistureContent, dry, wet)
91
+ ```
92
+
93
+ ## Use Cases
94
+
95
+ - **Data validation**: Check if values meet criteria
96
+ - **Conditional formatting**: Return different display values
97
+ - **Business logic**: Apply different rules based on conditions
98
+ - **Threshold checks**: Compare against limits
99
+
100
+ ## Related Functions
101
+
102
+ - [when](./when.md) - Truthy check (simpler conditional)
103
+
104
+ ## Notes
105
+
106
+ - Uses arbitrary precision for numeric comparisons
107
+ - The `==` operator uses a tolerance of 0.000001 for numeric values
108
+ - The `===` operator performs exact comparison for numbers
109
+ - String comparisons are case-sensitive
@@ -0,0 +1,107 @@
1
+ # iterativeseries
2
+
3
+ Performs iterative mathematical operations on set elements.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ iterativeseries(array, valueProperty, resultProperty, startValue, operation)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `array` | Array | Array of objects to process |
16
+ | `valueProperty` | String | Property name containing values |
17
+ | `resultProperty` | String | Property name to store results |
18
+ | `startValue` | Number/String | Initial value for the series |
19
+ | `operation` | String | Operation to perform ("add", "subtract", "multiply", "divide") |
20
+
21
+ ## Returns
22
+
23
+ Array - The input array with results added to each object.
24
+
25
+ ## Description
26
+
27
+ The `iterativeseries` function performs a specified mathematical operation iteratively across an array of objects. It starts with an initial value and applies the operation with each element's value, storing the cumulative result.
28
+
29
+ ## Examples
30
+
31
+ ### Cumulative Addition
32
+
33
+ ```expression
34
+ Result = ITERATIVESERIES(Values, "Value", "Resultant", 1, "add")
35
+
36
+ // Input:
37
+ Values = [
38
+ { Value: 10 },
39
+ { Value: 20 },
40
+ { Value: 5 }
41
+ ]
42
+
43
+ // Output:
44
+ // [
45
+ // { Value: 10, Resultant: "10" }, // 1 - 1 + 10 = 10
46
+ // { Value: 20, Resultant: "30" }, // 10 + 20 = 30
47
+ // { Value: 5, Resultant: "35" } // 30 + 5 = 35
48
+ // ]
49
+ ```
50
+
51
+ ### Running Product
52
+
53
+ ```expression
54
+ Result = ITERATIVESERIES(Data, "Factor", "Product", 1, "multiply")
55
+
56
+ // Input:
57
+ Data = [
58
+ { Factor: 2 },
59
+ { Factor: 3 },
60
+ { Factor: 4 }
61
+ ]
62
+
63
+ // Output: Products: 2, 6, 24
64
+ ```
65
+
66
+ ### Depreciation Calculation
67
+
68
+ ```expression
69
+ // Calculate declining balance
70
+ Assets = [
71
+ { DepreciationRate: 0.1 },
72
+ { DepreciationRate: 0.1 },
73
+ { DepreciationRate: 0.1 }
74
+ ]
75
+
76
+ // Start with initial value and multiply by (1 - rate) each period
77
+ Result = ITERATIVESERIES(Assets, "DepreciationRate", "RemainingValue", 1000, "custom")
78
+ ```
79
+
80
+ ## Available Operations
81
+
82
+ | Operation | Description |
83
+ |-----------|-------------|
84
+ | `"add"` | Cumulative addition |
85
+ | `"subtract"` | Cumulative subtraction |
86
+ | `"multiply"` | Cumulative multiplication |
87
+ | `"divide"` | Cumulative division |
88
+
89
+ ## Use Cases
90
+
91
+ - **Financial calculations**: Compound interest, depreciation
92
+ - **Inventory**: Running balance calculations
93
+ - **Statistics**: Cumulative products, geometric series
94
+ - **Process modeling**: Sequential transformations
95
+
96
+ ## Related Functions
97
+
98
+ - [cumulativesummation](./cumulativesummation.md) - Specifically for cumulative sums
99
+ - [subtractingsummation](./subtractingsummation.md) - Specifically for subtracting
100
+ - [sum](./sum.md) - Simple sum of all values
101
+
102
+ ## Notes
103
+
104
+ - Modifies the input array by adding the result property
105
+ - Uses arbitrary precision arithmetic
106
+ - The start value is used as the initial accumulator
107
+ - Works with the Math service's `iterativeSeries` method
@@ -0,0 +1,75 @@
1
+ # join
2
+
3
+ Joins array elements into a string with a specified separator.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ join(array, separator)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `array` | Array | The array of values to join |
16
+ | `separator` | String | The separator to place between elements |
17
+
18
+ ## Returns
19
+
20
+ String - All array elements joined with the specified separator.
21
+
22
+ ## Description
23
+
24
+ The `join` function combines all elements of an array into a single string, placing the specified separator between each element.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ Result = JOIN(["a", "b", "c"], ", ")
32
+ // Result: "a, b, c"
33
+ ```
34
+
35
+ ### With Data Array
36
+
37
+ ```expression
38
+ // Join city names with semicolons
39
+ CityList = JOIN(FLATTEN(AppData.Cities.name), "; ")
40
+ // Result: "New York; Los Angeles; Chicago"
41
+ ```
42
+
43
+ ### Creating CSV Line
44
+
45
+ ```expression
46
+ CSVLine = JOIN(DataRow, ",")
47
+ // Result: "value1,value2,value3"
48
+ ```
49
+
50
+ ### Path Building
51
+
52
+ ```expression
53
+ FilePath = JOIN(PathParts, "/")
54
+ // Result: "home/user/documents"
55
+ ```
56
+
57
+ ## Use Cases
58
+
59
+ - **Display lists**: Format lists for display
60
+ - **CSV generation**: Build CSV lines
61
+ - **Path construction**: Build file paths
62
+ - **Report generation**: Format data for output
63
+
64
+ ## Related Functions
65
+
66
+ - [joinraw](./joinraw.md) - Join without separator
67
+ - [concat](./concat.md) - Concatenate with spaces
68
+ - [flatten](./flatten.md) - Flatten nested arrays before joining
69
+
70
+ ## Notes
71
+
72
+ - Separator is placed between elements only
73
+ - Empty arrays return empty string
74
+ - Uses the DataFormat service internally
75
+ - Converts all elements to strings
@@ -0,0 +1,64 @@
1
+ # joinraw
2
+
3
+ Joins array elements into a string without any separator.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ joinraw(array)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `array` | Array | The array of values to join |
16
+
17
+ ## Returns
18
+
19
+ String - All array elements joined with no separator.
20
+
21
+ ## Description
22
+
23
+ The `joinraw` function combines all elements of an array into a single string without placing any separator between elements.
24
+
25
+ ## Examples
26
+
27
+ ### Basic Usage
28
+
29
+ ```expression
30
+ Result = JOINRAW(["H", "e", "l", "l", "o"])
31
+ // Result: "Hello"
32
+ ```
33
+
34
+ ### Building Identifiers
35
+
36
+ ```expression
37
+ Code = JOINRAW([Prefix, Number, Suffix])
38
+ // Result: "ABC123XYZ"
39
+ ```
40
+
41
+ ### Character Array to String
42
+
43
+ ```expression
44
+ Word = JOINRAW(Characters)
45
+ // Result: combined string
46
+ ```
47
+
48
+ ## Use Cases
49
+
50
+ - **String reconstruction**: Rebuild strings from character arrays
51
+ - **Code generation**: Build identifiers
52
+ - **Data transformation**: Combine array into string
53
+
54
+ ## Related Functions
55
+
56
+ - [join](./join.md) - Join with custom separator
57
+ - [concat](./concat.md) - Concatenate with spaces
58
+ - [concatraw](./concatraw.md) - Concatenate without spaces
59
+
60
+ ## Notes
61
+
62
+ - No separator between elements
63
+ - Uses the DataFormat service internally
64
+ - Useful when working with character arrays
@@ -0,0 +1,63 @@
1
+ # largestinset
2
+
3
+ Returns the largest value from a set/array.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ largestinset(set)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `set` | Array | The array of values |
16
+
17
+ ## Returns
18
+
19
+ String - The largest value in the set.
20
+
21
+ ## Description
22
+
23
+ The `largestinset` function finds and returns the largest (maximum) value from an array. This is an alternative to the `max` function specifically designed for set operations.
24
+
25
+ ## Examples
26
+
27
+ ### Basic Usage
28
+
29
+ ```expression
30
+ Result = LARGESTINSET([5, 2, 8, 1, 9])
31
+ // Result: "9"
32
+ ```
33
+
34
+ ### With Data
35
+
36
+ ```expression
37
+ HighestScore = LARGESTINSET(FLATTEN(AppData.Students.score))
38
+ ```
39
+
40
+ ### Sales Data
41
+
42
+ ```expression
43
+ TopSale = LARGESTINSET(MonthlySales)
44
+ ```
45
+
46
+ ## Use Cases
47
+
48
+ - **Analysis**: Find maximum values
49
+ - **Rankings**: Determine top values
50
+ - **Comparisons**: Find highest in category
51
+ - **Limits**: Check maximum constraints
52
+
53
+ ## Related Functions
54
+
55
+ - [smallestinset](./smallestinset.md) - Find minimum value
56
+ - [max](./max.md) - Alternative maximum function
57
+ - [sortset](./sortset.md) - Sort to find extremes
58
+
59
+ ## Notes
60
+
61
+ - Returns result as string
62
+ - Works with numeric values
63
+ - Uses the Math service's `largestInSet` method
@@ -0,0 +1,66 @@
1
+ # leastsquares
2
+
3
+ Performs linear least squares regression.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ leastsquares(xValues, yValues)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `xValues` | Array | Array of x-coordinates (independent variable) |
16
+ | `yValues` | Array | Array of y-coordinates (dependent variable) |
17
+
18
+ ## Returns
19
+
20
+ Object - Regression results including slope, intercept, and statistics.
21
+
22
+ ## Description
23
+
24
+ The `leastsquares` function performs linear regression to find the best-fit line through a set of data points. It returns the slope, intercept, and other statistical measures.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ Result = LEASTSQUARES([1, 2, 3, 4, 5], [2, 4, 6, 8, 10])
32
+ // Returns: { slope: 2, intercept: 0, ... }
33
+ ```
34
+
35
+ ### Sales Trend
36
+
37
+ ```expression
38
+ // Analyze sales trend over time
39
+ SalesTrend = LEASTSQUARES(Months, SalesData)
40
+ ```
41
+
42
+ ### Temperature Analysis
43
+
44
+ ```expression
45
+ TempRegression = LEASTSQUARES(Years, AvgTemperatures)
46
+ // slope indicates rate of change
47
+ ```
48
+
49
+ ## Use Cases
50
+
51
+ - **Trend analysis**: Find linear trends
52
+ - **Forecasting**: Project future values
53
+ - **Correlation**: Measure linear relationship
54
+ - **Scientific analysis**: Linear modeling
55
+
56
+ ## Related Functions
57
+
58
+ - [linest](./linest.md) - Alternative linear estimation
59
+ - [polynomialregression](./polynomialregression.md) - Higher-order regression
60
+ - [predict](./predict.md) - Predict using regression results
61
+
62
+ ## Notes
63
+
64
+ - Also available as `linest`
65
+ - Returns comprehensive statistics
66
+ - Uses the Math service's `leastSquares` method