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,60 @@
1
+ # colorgroupbackground
2
+
3
+ Sets the background color of a form group.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ colorgroupbackground(sectionHash, groupHash, color)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `sectionHash` | String | The hash identifier of the section containing the group |
16
+ | `groupHash` | String | The hash identifier of the group |
17
+ | `color` | String | HTML hex color string (e.g., `"#E0FFE0"`) |
18
+
19
+ ## Returns
20
+
21
+ Void. This function does not return a value.
22
+
23
+ ## Description
24
+
25
+ The `colorgroupbackground` function sets the background color of a specific group within a form section. This provides more granular visual control than section-level coloring, allowing individual groups of inputs to be highlighted independently. It is useful for drawing attention to specific parts of a form or providing visual feedback at the group level.
26
+
27
+ ## Examples
28
+
29
+ ### Highlighting a group with a light green background
30
+
31
+ ```expression
32
+ colorgroupbackground("S1", "S1_G1", "#E0FFE0")
33
+ // Sets the background of group S1_G1 in section S1 to light green
34
+ ```
35
+
36
+ ### Conditional group coloring
37
+
38
+ ```expression
39
+ GroupColor = IF(GroupIsComplete, "#E0FFE0", "#FFFFFF")
40
+ colorgroupbackground("Details", "RequiredFields", GroupColor)
41
+ // Green background when all required fields are filled, white otherwise
42
+ ```
43
+
44
+ ## Use Cases
45
+
46
+ - **Group-level validation**: Color a group based on whether its inputs pass validation
47
+ - **Visual grouping**: Use color to distinguish between different groups within a section
48
+ - **Completion tracking**: Indicate which groups of fields have been completed
49
+
50
+ ## Related Functions
51
+
52
+ - [generatehtmlhexcolor](./generatehtmlhexcolor.md) - Generates an HTML hex color string from RGB components
53
+ - [colorsectionbackground](./colorsectionbackground.md) - Sets the background color of a form section
54
+ - [colorinputbackground](./colorinputbackground.md) - Sets the background color of a form input
55
+
56
+ ## Notes
57
+
58
+ - The color parameter should be a valid HTML hex color string including the `#` prefix
59
+ - Both the section hash and group hash must match hashes defined in the form configuration
60
+ - The parent section must be visible for the group color change to be seen
@@ -0,0 +1,62 @@
1
+ # colorinputbackground
2
+
3
+ Sets the background color of a form input.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ colorinputbackground(sectionHash, inputHash, color)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `sectionHash` | String | The hash identifier of the section containing the input |
16
+ | `inputHash` | String | The hash identifier of the input |
17
+ | `color` | String | HTML hex color string (e.g., `"#FFFFCC"`) |
18
+
19
+ ## Returns
20
+
21
+ Void. This function does not return a value.
22
+
23
+ ## Description
24
+
25
+ The `colorinputbackground` function sets the background color of a specific form input element. This is the most granular color control available, targeting individual inputs within a form. It is useful for field-level validation feedback, highlighting specific fields that need attention, or providing visual cues based on calculated values. The function also accepts an optional fourth parameter to control apply change behavior and an optional fifth parameter for a CSS selector.
26
+
27
+ ## Examples
28
+
29
+ ### Highlighting a price field
30
+
31
+ ```expression
32
+ colorinputbackground("S1", "Price", "#FFFFCC")
33
+ // Sets the background of the Price input in section S1 to light yellow
34
+ ```
35
+
36
+ ### Validation coloring
37
+
38
+ ```expression
39
+ FieldColor = IF(Price > 0, "#FFFFFF", "#FFE0E0")
40
+ colorinputbackground("OrderDetails", "Price", FieldColor)
41
+ // White background if Price is valid, light red if not
42
+ ```
43
+
44
+ ## Use Cases
45
+
46
+ - **Field-level validation**: Highlight individual fields that have validation errors
47
+ - **Required field indication**: Color required fields to draw user attention
48
+ - **Value-based formatting**: Change input color based on its value (e.g., negative numbers in red)
49
+
50
+ ## Related Functions
51
+
52
+ - [generatehtmlhexcolor](./generatehtmlhexcolor.md) - Generates an HTML hex color string from RGB components
53
+ - [colorsectionbackground](./colorsectionbackground.md) - Sets the background color of a form section
54
+ - [colorgroupbackground](./colorgroupbackground.md) - Sets the background color of a form group
55
+ - [colorinputbackgroundtabular](./colorinputbackgroundtabular.md) - Sets the background color of a cell in a tabular group
56
+
57
+ ## Notes
58
+
59
+ - The color parameter should be a valid HTML hex color string including the `#` prefix
60
+ - Optional fourth parameter controls apply change behavior
61
+ - Optional fifth parameter specifies a CSS selector for targeting specific sub-elements
62
+ - The section and input hashes must match hashes defined in the form configuration
@@ -0,0 +1,64 @@
1
+ # colorinputbackgroundtabular
2
+
3
+ Sets the background color of a specific cell in a tabular group.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ colorinputbackgroundtabular(sectionHash, groupHash, inputHash, rowIndex, color)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `sectionHash` | String | The hash identifier of the section containing the tabular group |
16
+ | `groupHash` | String | The hash identifier of the tabular group |
17
+ | `inputHash` | String | The hash identifier of the input (column) |
18
+ | `rowIndex` | Integer | The zero-based row index |
19
+ | `color` | String | HTML hex color string (e.g., `"#FFFFCC"`) |
20
+
21
+ ## Returns
22
+
23
+ Void. This function does not return a value.
24
+
25
+ ## Description
26
+
27
+ The `colorinputbackgroundtabular` function sets the background color of a specific cell within a tabular form group. It targets a single cell by its section, group, input (column), and row index. This enables cell-level visual formatting in tabular data, such as highlighting specific values, indicating validation errors in individual cells, or applying conditional formatting across a data grid. The function also accepts optional parameters for apply change behavior, CSS selector, and element ID prefix.
28
+
29
+ ## Examples
30
+
31
+ ### Highlighting a cell in the first row
32
+
33
+ ```expression
34
+ colorinputbackgroundtabular("S1", "S1_G1", "Price", 0, "#FFFFCC")
35
+ // Sets the background of the Price cell in row 0 of group S1_G1 to light yellow
36
+ ```
37
+
38
+ ### Conditional cell coloring
39
+
40
+ ```expression
41
+ CellColor = IF(RowTotal > Budget, "#FFE0E0", "#FFFFFF")
42
+ colorinputbackgroundtabular("DataSection", "DataGroup", "Total", RowIdx, CellColor)
43
+ // Red background if the row total exceeds budget, white otherwise
44
+ ```
45
+
46
+ ## Use Cases
47
+
48
+ - **Cell-level validation**: Highlight specific cells that contain invalid or out-of-range values
49
+ - **Conditional formatting**: Apply spreadsheet-like conditional formatting to tabular data
50
+ - **Data visualization**: Use color to represent data values in a tabular layout
51
+
52
+ ## Related Functions
53
+
54
+ - [generatehtmlhexcolor](./generatehtmlhexcolor.md) - Generates an HTML hex color string from RGB components
55
+ - [colorinputbackground](./colorinputbackground.md) - Sets the background color of a non-tabular form input
56
+ - [colorgroupbackground](./colorgroupbackground.md) - Sets the background color of a form group
57
+
58
+ ## Notes
59
+
60
+ - The `rowIndex` parameter is zero-based (first row is 0)
61
+ - Optional sixth parameter controls apply change behavior
62
+ - Optional seventh parameter specifies a CSS selector for targeting specific sub-elements
63
+ - Optional eighth parameter specifies an element ID prefix
64
+ - All hash parameters must match hashes defined in the form configuration
@@ -0,0 +1,59 @@
1
+ # colorsectionbackground
2
+
3
+ Sets the background color of a form section.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ colorsectionbackground(sectionHash, color)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `sectionHash` | String | The hash identifier of the section |
16
+ | `color` | String | HTML hex color string (e.g., `"#FFE0E0"`) |
17
+
18
+ ## Returns
19
+
20
+ Void. This function does not return a value.
21
+
22
+ ## Description
23
+
24
+ The `colorsectionbackground` function sets the background color of a form section to the specified HTML hex color. This is useful for visually highlighting sections based on form state, validation results, or other conditions. The function can also accept an optional third parameter to control apply change behavior.
25
+
26
+ ## Examples
27
+
28
+ ### Highlighting a section with a light red background
29
+
30
+ ```expression
31
+ colorsectionbackground("S1", "#FFE0E0")
32
+ // Sets the background of section S1 to light red
33
+ ```
34
+
35
+ ### Dynamic coloring based on status
36
+
37
+ ```expression
38
+ SectionColor = IF(IsValid, "#E0FFE0", "#FFE0E0")
39
+ colorsectionbackground("FormData", SectionColor)
40
+ // Green background if valid, red background if not
41
+ ```
42
+
43
+ ## Use Cases
44
+
45
+ - **Validation feedback**: Color a section red when it contains validation errors, green when valid
46
+ - **Status indication**: Visually indicate the state of a section based on its completion or status
47
+ - **Attention drawing**: Highlight a section that requires user attention
48
+
49
+ ## Related Functions
50
+
51
+ - [generatehtmlhexcolor](./generatehtmlhexcolor.md) - Generates an HTML hex color string from RGB components
52
+ - [colorgroupbackground](./colorgroupbackground.md) - Sets the background color of a form group
53
+ - [colorinputbackground](./colorinputbackground.md) - Sets the background color of a form input
54
+
55
+ ## Notes
56
+
57
+ - The color parameter should be a valid HTML hex color string including the `#` prefix
58
+ - Can accept an optional third parameter for apply change behavior
59
+ - The section hash must match a hash defined in the form configuration
@@ -0,0 +1,72 @@
1
+ # compare
2
+
3
+ Compares two values and returns their relationship.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ compare(value1, value2)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `value1` | Number | First value to compare |
16
+ | `value2` | Number | Second value to compare |
17
+
18
+ ## Returns
19
+
20
+ String - Returns "-1" if value1 < value2, "0" if equal, "1" if value1 > value2.
21
+
22
+ ## Description
23
+
24
+ The `compare` function compares two numeric values and returns a value indicating their relative order. This is useful for sorting and conditional logic.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Comparisons
29
+
30
+ ```expression
31
+ Result = COMPARE(5, 10)
32
+ // Result: "-1" (5 is less than 10)
33
+
34
+ Result = COMPARE(10, 5)
35
+ // Result: "1" (10 is greater than 5)
36
+
37
+ Result = COMPARE(5, 5)
38
+ // Result: "0" (equal)
39
+ ```
40
+
41
+ ### With Variables
42
+
43
+ ```expression
44
+ Comparison = COMPARE(ActualValue, ExpectedValue)
45
+ ```
46
+
47
+ ### Conditional Logic
48
+
49
+ ```expression
50
+ // Check if over budget
51
+ OverBudget = COMPARE(Spending, Budget) == 1
52
+ ```
53
+
54
+ ## Use Cases
55
+
56
+ - **Sorting**: Determine sort order
57
+ - **Validation**: Check thresholds
58
+ - **Business logic**: Compare metrics
59
+ - **Conditional processing**: Branch based on comparison
60
+
61
+ ## Related Functions
62
+
63
+ - [max](./max.md) - Find maximum value
64
+ - [min](./min.md) - Find minimum value
65
+ - [if](./if.md) - Conditional logic
66
+ - [when](./when.md) - Conditional expression
67
+
68
+ ## Notes
69
+
70
+ - Returns string: "-1", "0", or "1"
71
+ - Uses the Math service's `comparePrecise` method
72
+ - Works with arbitrary precision numbers
@@ -0,0 +1,73 @@
1
+ # concat
2
+
3
+ Concatenates values into a single string with space separation.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ concat(value1, value2, ...)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `values` | Any | Values to concatenate |
16
+
17
+ ## Returns
18
+
19
+ String - All values joined with spaces.
20
+
21
+ ## Description
22
+
23
+ The `concat` function joins multiple values into a single string, automatically adding spaces between each value. This is useful for building display strings and messages.
24
+
25
+ ## Examples
26
+
27
+ ### Basic Usage
28
+
29
+ ```expression
30
+ Result = CONCAT("Hello", "World")
31
+ // Result: "Hello World"
32
+ ```
33
+
34
+ ### Multiple Values
35
+
36
+ ```expression
37
+ FullName = CONCAT(FirstName, MiddleName, LastName)
38
+ // Result: "John William Smith"
39
+ ```
40
+
41
+ ### With Numbers
42
+
43
+ ```expression
44
+ Message = CONCAT("Total:", 42, "items")
45
+ // Result: "Total: 42 items"
46
+ ```
47
+
48
+ ### Building Labels
49
+
50
+ ```expression
51
+ Label = CONCAT(ProductName, "-", Size, Color)
52
+ // Result: "Widget - Large Blue"
53
+ ```
54
+
55
+ ## Use Cases
56
+
57
+ - **Display strings**: Build user-facing text
58
+ - **Labels**: Create composite labels
59
+ - **Messages**: Construct messages from parts
60
+ - **Reports**: Combine data for display
61
+
62
+ ## Related Functions
63
+
64
+ - [concatraw](./concatraw.md) - Concatenate without spaces
65
+ - [join](./join.md) - Join with custom separator
66
+ - [joinraw](./joinraw.md) - Join without spaces
67
+
68
+ ## Notes
69
+
70
+ - Automatically adds spaces between values
71
+ - Converts non-string values to strings
72
+ - Use `concatraw` for no separator
73
+ - Uses the DataFormat service internally
@@ -0,0 +1,73 @@
1
+ # concatraw
2
+
3
+ Concatenates values into a single string without any separation.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ concatraw(value1, value2, ...)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `values` | Any | Values to concatenate |
16
+
17
+ ## Returns
18
+
19
+ String - All values joined with no separator.
20
+
21
+ ## Description
22
+
23
+ The `concatraw` function joins multiple values into a single string without adding any spaces or separators between them. This is useful for building identifiers, codes, and other concatenated strings where spaces would be inappropriate.
24
+
25
+ ## Examples
26
+
27
+ ### Basic Usage
28
+
29
+ ```expression
30
+ Result = CONCATRAW("Hello", "World")
31
+ // Result: "HelloWorld"
32
+ ```
33
+
34
+ ### Building Codes
35
+
36
+ ```expression
37
+ ProductCode = CONCATRAW(Category, "-", ItemNumber)
38
+ // Result: "ELEC-12345"
39
+ ```
40
+
41
+ ### File Names
42
+
43
+ ```expression
44
+ FileName = CONCATRAW(BaseName, "_", Version, ".txt")
45
+ // Result: "report_v2.txt"
46
+ ```
47
+
48
+ ### Identifiers
49
+
50
+ ```expression
51
+ UniqueID = CONCATRAW(Prefix, ID, Suffix)
52
+ // Result: "USR00123ACT"
53
+ ```
54
+
55
+ ## Use Cases
56
+
57
+ - **Identifiers**: Build unique IDs
58
+ - **File names**: Construct file names
59
+ - **Codes**: Create product/reference codes
60
+ - **URLs**: Build URL components
61
+
62
+ ## Related Functions
63
+
64
+ - [concat](./concat.md) - Concatenate with spaces
65
+ - [join](./join.md) - Join with custom separator
66
+ - [joinraw](./joinraw.md) - Join array without spaces
67
+
68
+ ## Notes
69
+
70
+ - No separator between values
71
+ - Converts non-string values to strings
72
+ - Useful when spaces are not wanted
73
+ - Uses the DataFormat service internally
@@ -0,0 +1,75 @@
1
+ # cos
2
+
3
+ Calculates the cosine of an angle (in radians).
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ cos(radians)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `radians` | Number/String | The angle in radians |
16
+
17
+ ## Returns
18
+
19
+ String - The cosine of the angle.
20
+
21
+ ## Description
22
+
23
+ The `cos` function calculates the cosine of an angle. The input must be in radians. Use the `rad()` function to convert degrees to radians if needed.
24
+
25
+ ## Examples
26
+
27
+ ### Basic Usage
28
+
29
+ ```expression
30
+ Result = cos(0)
31
+ // Result: "1"
32
+
33
+ Result = cos(3.14159265358979) // π
34
+ // Result: "-1" (approximately)
35
+ ```
36
+
37
+ ### Converting from Degrees
38
+
39
+ ```expression
40
+ // Cosine of 60 degrees
41
+ Result = cos(rad(60))
42
+ // Result: "0.5"
43
+
44
+ // Cosine of 90 degrees
45
+ Result = cos(rad(90))
46
+ // Result: "0" (approximately)
47
+ ```
48
+
49
+ ### In Expressions
50
+
51
+ ```expression
52
+ // Circle point calculations
53
+ X = Radius * cos(Angle)
54
+ Y = Radius * sin(Angle)
55
+ ```
56
+
57
+ ## Use Cases
58
+
59
+ - **Trigonometry**: Triangle calculations, angle computations
60
+ - **Graphics**: Rotation matrices, 3D transformations
61
+ - **Physics**: Projectile motion (horizontal component)
62
+ - **Engineering**: Phase calculations in AC circuits
63
+
64
+ ## Related Functions
65
+
66
+ - [sin](./sin.md) - Sine
67
+ - [tan](./tan.md) - Tangent
68
+ - [rad](./rad.md) - Convert degrees to radians
69
+ - [pi](./pi.md) - Pi constant
70
+
71
+ ## Notes
72
+
73
+ - Input must be in radians, not degrees
74
+ - Use `rad(degrees)` to convert from degrees
75
+ - Uses JavaScript's `Math.cos()` internally
@@ -0,0 +1,73 @@
1
+ # count
2
+
3
+ Returns the count of elements in an array or set.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ count(array)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `array` | Array | The array to count elements from |
16
+
17
+ ## Returns
18
+
19
+ String - The number of elements in the array.
20
+
21
+ ## Description
22
+
23
+ The `count` function returns the number of elements in an array. This is useful for determining the size of datasets or validating data.
24
+
25
+ ## Examples
26
+
27
+ ### Basic Usage
28
+
29
+ ```expression
30
+ Result = COUNT([1, 2, 3, 4, 5])
31
+ // Result: "5"
32
+ ```
33
+
34
+ ### With Data Path
35
+
36
+ ```expression
37
+ // Count records in a dataset
38
+ TotalCities = COUNT(AppData.Cities)
39
+ ```
40
+
41
+ ### Conditional Counting
42
+
43
+ ```expression
44
+ // Use with filtered data
45
+ ActiveUsers = COUNT(FLATTEN(AppData.Users.active))
46
+ ```
47
+
48
+ ### Validation
49
+
50
+ ```expression
51
+ // Verify expected count
52
+ IsValid = COUNT(Records) == ExpectedCount
53
+ ```
54
+
55
+ ## Use Cases
56
+
57
+ - **Data validation**: Verify record counts
58
+ - **Statistics**: Determine sample size
59
+ - **Pagination**: Calculate total pages
60
+ - **Reporting**: Show record counts
61
+
62
+ ## Related Functions
63
+
64
+ - [countset](./countset.md) - Count elements in a set
65
+ - [countsetelements](./countsetelements.md) - Count unique elements
66
+ - [sum](./sum.md) - Sum values instead of counting
67
+ - [avg](./avg.md) - Average (uses count internally)
68
+
69
+ ## Notes
70
+
71
+ - Returns result as string
72
+ - Works with the Math service's `count` method
73
+ - Returns "0" for empty arrays
@@ -0,0 +1,65 @@
1
+ # countset
2
+
3
+ Returns the count of elements in a set.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ countset(set)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `set` | Array | The set to count elements from |
16
+
17
+ ## Returns
18
+
19
+ String - The number of elements in the set.
20
+
21
+ ## Description
22
+
23
+ The `countset` function returns the number of elements in a set. It works similarly to `count` but is specifically designed for set operations.
24
+
25
+ ## Examples
26
+
27
+ ### Basic Usage
28
+
29
+ ```expression
30
+ Result = COUNTSET([1, 2, 3, 4, 5])
31
+ // Result: "5"
32
+ ```
33
+
34
+ ### With Data
35
+
36
+ ```expression
37
+ // Count items in a set
38
+ TotalItems = COUNTSET(AppData.UniqueCategories)
39
+ ```
40
+
41
+ ### After Set Operations
42
+
43
+ ```expression
44
+ // Count after concatenating sets
45
+ CombinedCount = COUNTSET(SETCONCATENATE(Set1, Set2))
46
+ ```
47
+
48
+ ## Use Cases
49
+
50
+ - **Set operations**: Determine set cardinality
51
+ - **Data analysis**: Count unique values
52
+ - **Validation**: Verify set sizes
53
+ - **Statistics**: Sample size from sets
54
+
55
+ ## Related Functions
56
+
57
+ - [count](./count.md) - Count array elements
58
+ - [countsetelements](./countsetelements.md) - Count unique elements
59
+ - [setconcatenate](./setconcatenate.md) - Combine sets
60
+
61
+ ## Notes
62
+
63
+ - Returns result as string
64
+ - Works with the Math service's `count` method
65
+ - Functionally similar to `count`