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,79 @@
1
+ # median
2
+
3
+ Returns the middle value of a sorted set.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ median(array)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `array` | Array | An array of numeric values |
16
+
17
+ ## Returns
18
+
19
+ String - The median value.
20
+
21
+ ## Description
22
+
23
+ The `median` function returns the middle value when all values are sorted. For an odd number of values, it returns the exact middle value. For an even number of values, it returns the average of the two middle values.
24
+
25
+ ## Examples
26
+
27
+ ### Odd Number of Values
28
+
29
+ ```expression
30
+ TotalCost = MEDIAN(ItemCosts)
31
+ // With ItemCosts = [100, 200, 50, 45, 5]
32
+ // Sorted: [5, 45, 50, 100, 200]
33
+ // Result: "50" (the middle value)
34
+ ```
35
+
36
+ ### Even Number of Values
37
+
38
+ ```expression
39
+ Result = median([1, 2, 3, 4])
40
+ // Sorted: [1, 2, 3, 4]
41
+ // Middle values: 2 and 3
42
+ // Result: "2.5" (average of 2 and 3)
43
+ ```
44
+
45
+ ### With Variable Data
46
+
47
+ ```expression
48
+ MedianPrice = MEDIAN(Prices)
49
+ // Finds the middle price point
50
+ ```
51
+
52
+ ## Use Cases
53
+
54
+ - **Statistics**: Robust measure of central tendency
55
+ - **Real estate**: Median home prices (less affected by outliers)
56
+ - **Income analysis**: Median income (avoids skew from extremes)
57
+ - **Quality metrics**: Median response time
58
+
59
+ ## Advantages Over Mean
60
+
61
+ The median is more robust than the mean for skewed data:
62
+
63
+ ```expression
64
+ // Example: [1, 2, 3, 4, 1000]
65
+ Mean = 202 // Heavily influenced by 1000
66
+ Median = 3 // Better represents typical value
67
+ ```
68
+
69
+ ## Related Functions
70
+
71
+ - [avg](./avg.md) / [mean](./mean.md) - Arithmetic average
72
+ - [mode](./mode.md) - Most frequent value
73
+ - [min](./min.md) / [max](./max.md) - Extremes
74
+
75
+ ## Notes
76
+
77
+ - Values are automatically sorted before finding median
78
+ - Uses arbitrary precision arithmetic
79
+ - Works with the Math service's `medianPrecise` method
@@ -0,0 +1,73 @@
1
+ # min
2
+
3
+ Returns the smallest value from a set of numbers.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ min(value1, value2, ...)
9
+ min(array)
10
+ ```
11
+
12
+ ## Parameters
13
+
14
+ | Parameter | Type | Description |
15
+ |-----------|------|-------------|
16
+ | `values` | Number(s) | Individual numbers or an array of numbers |
17
+
18
+ ## Returns
19
+
20
+ String - The minimum value from the input set.
21
+
22
+ ## Description
23
+
24
+ The `min` function finds and returns the smallest value from a set of numbers. It can accept individual arguments or an array of values.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ Result = MIN(5, 10, 3, 8)
32
+ // Result: "3"
33
+ ```
34
+
35
+ ### With Variables
36
+
37
+ ```expression
38
+ Lowest = MIN(Price1, Price2, Price3)
39
+ ```
40
+
41
+ ### With Array
42
+
43
+ ```expression
44
+ // Given an array of values
45
+ MinValue = MIN(AppData.Temperatures)
46
+ ```
47
+
48
+ ### Finding Range
49
+
50
+ ```expression
51
+ // Calculate the range of values
52
+ Range = MAX(Values) - MIN(Values)
53
+ ```
54
+
55
+ ## Use Cases
56
+
57
+ - **Data analysis**: Find lowest values in datasets
58
+ - **Pricing**: Determine minimum price
59
+ - **Quality control**: Find minimum measurements
60
+ - **Limits**: Establish lower bounds
61
+
62
+ ## Related Functions
63
+
64
+ - [max](./max.md) - Find maximum value
65
+ - [smallestinset](./smallestinset.md) - Alternative for finding smallest
66
+ - [sortset](./sortset.md) - Sort values to find extremes
67
+ - [avg](./avg.md) - Calculate average
68
+
69
+ ## Notes
70
+
71
+ - Returns result as string (arbitrary precision)
72
+ - Works with the Math service's `minPrecise` method
73
+ - Handles both individual arguments and arrays
@@ -0,0 +1,66 @@
1
+ # mode
2
+
3
+ Returns the most frequently occurring value in a dataset.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ mode(value1, value2, ...)
9
+ mode(array)
10
+ ```
11
+
12
+ ## Parameters
13
+
14
+ | Parameter | Type | Description |
15
+ |-----------|------|-------------|
16
+ | `values` | Number(s) | Individual numbers or an array of numbers |
17
+
18
+ ## Returns
19
+
20
+ String - The value that appears most frequently.
21
+
22
+ ## Description
23
+
24
+ The `mode` function finds and returns the most frequently occurring value in a dataset. If multiple values have the same highest frequency, it returns one of them.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ Result = MODE(1, 2, 2, 3, 3, 3, 4)
32
+ // Result: "3" (appears 3 times)
33
+ ```
34
+
35
+ ### With Array
36
+
37
+ ```expression
38
+ // Find most common value
39
+ MostCommon = MODE(AppData.Ratings)
40
+ ```
41
+
42
+ ### Survey Data
43
+
44
+ ```expression
45
+ // Find most selected option
46
+ PopularChoice = MODE(FLATTEN(AppData.Survey.response))
47
+ ```
48
+
49
+ ## Use Cases
50
+
51
+ - **Survey analysis**: Find most common response
52
+ - **Quality control**: Identify most frequent measurement
53
+ - **Market research**: Most popular choice
54
+ - **Statistics**: Central tendency analysis
55
+
56
+ ## Related Functions
57
+
58
+ - [median](./median.md) - Middle value
59
+ - [avg](./avg.md) - Arithmetic mean
60
+ - [distributionhistogram](./distributionhistogram.md) - Full frequency distribution
61
+
62
+ ## Notes
63
+
64
+ - Returns result as string
65
+ - Works with the Math service's `modePrecise` method
66
+ - For multimodal datasets, returns one of the modes
@@ -0,0 +1,66 @@
1
+ # objectkeystoarray
2
+
3
+ Extracts all keys from an object as an array.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ objectkeystoarray(object)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `object` | Object | The object to extract keys from |
16
+
17
+ ## Returns
18
+
19
+ Array - Array of all keys from the object.
20
+
21
+ ## Description
22
+
23
+ The `objectkeystoarray` function returns all property names (keys) from an object as an array. This is useful for iterating over object properties or analyzing object structure.
24
+
25
+ ## Examples
26
+
27
+ ### Basic Usage
28
+
29
+ ```expression
30
+ // Given object: { name: "John", age: 30, city: "NYC" }
31
+ Result = OBJECTKEYSTOARRAY(Person)
32
+ // Result: ["name", "age", "city"]
33
+ ```
34
+
35
+ ### With Histogram
36
+
37
+ ```expression
38
+ // Get all category names from histogram
39
+ Categories = OBJECTKEYSTOARRAY(CategoryCounts)
40
+ ```
41
+
42
+ ### Dynamic Property Access
43
+
44
+ ```expression
45
+ Keys = OBJECTKEYSTOARRAY(ConfigObject)
46
+ // Use keys for iteration or display
47
+ ```
48
+
49
+ ## Use Cases
50
+
51
+ - **Object inspection**: List all properties
52
+ - **Dynamic iteration**: Process unknown objects
53
+ - **Validation**: Check expected properties exist
54
+ - **Display**: Show object structure
55
+
56
+ ## Related Functions
57
+
58
+ - [objectvaluestoarray](./objectvaluestoarray.md) - Extract values instead
59
+ - [getvalue](./getvalue.md) - Get specific value by key
60
+ - [flatten](./flatten.md) - Flatten arrays
61
+
62
+ ## Notes
63
+
64
+ - Returns array of strings (key names)
65
+ - Order may not be guaranteed
66
+ - Uses the Math service's `objectKeysToArray` method
@@ -0,0 +1,65 @@
1
+ # objectvaluessortbyexternalobjectarray
2
+
3
+ Sorts object values based on an external ordering array.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ objectvaluessortbyexternalobjectarray(object, orderArray, keyProperty)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `object` | Object | Object to sort values from |
16
+ | `orderArray` | Array | Array defining the sort order |
17
+ | `keyProperty` | String | Property to match for ordering |
18
+
19
+ ## Returns
20
+
21
+ Array - Values sorted according to external order.
22
+
23
+ ## Description
24
+
25
+ The `objectvaluessortbyexternalobjectarray` function extracts values from an object and sorts them based on the order defined by an external array.
26
+
27
+ ## Examples
28
+
29
+ ### Basic Usage
30
+
31
+ ```expression
32
+ Data = { 'a': 10, 'b': 20, 'c': 30 }
33
+ Order = [{ key: 'c' }, { key: 'a' }, { key: 'b' }]
34
+
35
+ Result = OBJECTVALUESSORTBYEXTERNALOBJECTARRAY(Data, Order, "key")
36
+ // Result: [30, 10, 20] (sorted: c, a, b)
37
+ ```
38
+
39
+ ### Custom Display Order
40
+
41
+ ```expression
42
+ // Sort categories by custom priority
43
+ CategoryData = { 'urgent': 5, 'normal': 10, 'low': 2 }
44
+ Priority = [{ name: 'urgent' }, { name: 'normal' }, { name: 'low' }]
45
+
46
+ Sorted = OBJECTVALUESSORTBYEXTERNALOBJECTARRAY(CategoryData, Priority, "name")
47
+ ```
48
+
49
+ ## Use Cases
50
+
51
+ - **Custom ordering**: Sort by external criteria
52
+ - **Display order**: Match specific sort order
53
+ - **Prioritization**: Order by priority list
54
+ - **Report generation**: Consistent ordering
55
+
56
+ ## Related Functions
57
+
58
+ - [sorthistogram](./sorthistogram.md) - Sort by values
59
+ - [sorthistogrambykeys](./sorthistogrambykeys.md) - Sort alphabetically
60
+ - [objectvaluestoarray](./objectvaluestoarray.md) - Extract values
61
+
62
+ ## Notes
63
+
64
+ - Maintains relationship between keys and values
65
+ - Uses the Math service
@@ -0,0 +1,67 @@
1
+ # objectvaluestoarray
2
+
3
+ Extracts all values from an object as an array.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ objectvaluestoarray(object)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `object` | Object | The object to extract values from |
16
+
17
+ ## Returns
18
+
19
+ Array - Array of all values from the object.
20
+
21
+ ## Description
22
+
23
+ The `objectvaluestoarray` function returns all property values from an object as an array. This is useful for aggregating values without needing the keys.
24
+
25
+ ## Examples
26
+
27
+ ### Basic Usage
28
+
29
+ ```expression
30
+ // Given object: { name: "John", age: 30, city: "NYC" }
31
+ Result = OBJECTVALUESTOARRAY(Person)
32
+ // Result: ["John", 30, "NYC"]
33
+ ```
34
+
35
+ ### Sum Histogram Values
36
+
37
+ ```expression
38
+ // Get all counts from histogram and sum them
39
+ Values = OBJECTVALUESTOARRAY(CategoryCounts)
40
+ Total = SUM(Values)
41
+ ```
42
+
43
+ ### Aggregate Processing
44
+
45
+ ```expression
46
+ AllValues = OBJECTVALUESTOARRAY(DataObject)
47
+ Average = AVG(AllValues)
48
+ ```
49
+
50
+ ## Use Cases
51
+
52
+ - **Aggregation**: Sum or average all values
53
+ - **Collection**: Get all values regardless of key
54
+ - **Analysis**: Process all object values
55
+ - **Display**: List all values
56
+
57
+ ## Related Functions
58
+
59
+ - [objectkeystoarray](./objectkeystoarray.md) - Extract keys instead
60
+ - [flatten](./flatten.md) - Flatten nested arrays
61
+ - [sum](./sum.md) - Sum the extracted values
62
+
63
+ ## Notes
64
+
65
+ - Returns array of values (any type)
66
+ - Order corresponds to key order
67
+ - Uses the Math service's `objectValuesToArray` method
@@ -0,0 +1,75 @@
1
+ # percent
2
+
3
+ Calculates what percentage one value is of another.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ percent(part, whole)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `part` | Number | The partial value |
16
+ | `whole` | Number | The total value |
17
+
18
+ ## Returns
19
+
20
+ String - The percentage as a decimal (multiply by 100 for traditional percentage).
21
+
22
+ ## Description
23
+
24
+ The `percent` function calculates what percentage the first value is of the second value. The result is returned as a decimal ratio.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ Result = PERCENT(25, 100)
32
+ // Result: "0.25" (25%)
33
+ ```
34
+
35
+ ### Sales Percentage
36
+
37
+ ```expression
38
+ // What percentage of goal was achieved?
39
+ Achievement = PERCENT(ActualSales, SalesGoal)
40
+ ```
41
+
42
+ ### With Multiplication for Display
43
+
44
+ ```expression
45
+ // Get traditional percentage value
46
+ PercentValue = PERCENT(50, 200) * 100
47
+ // Result: 25 (25%)
48
+ ```
49
+
50
+ ### Completion Rate
51
+
52
+ ```expression
53
+ // Calculate completion percentage
54
+ CompletionRate = PERCENT(CompletedTasks, TotalTasks)
55
+ ```
56
+
57
+ ## Use Cases
58
+
59
+ - **Business metrics**: Calculate achievement percentages
60
+ - **Data analysis**: Proportion calculations
61
+ - **Progress tracking**: Completion percentages
62
+ - **Financial reporting**: Ratio analysis
63
+
64
+ ## Related Functions
65
+
66
+ - [compare](./compare.md) - Compare two values
67
+ - [round](./round.md) - Round percentage results
68
+ - [tofixed](./tofixed.md) - Format percentage with decimals
69
+
70
+ ## Notes
71
+
72
+ - Returns decimal, not percentage (0.25 not 25%)
73
+ - Multiply by 100 for traditional percentage display
74
+ - Uses the Math service's `percentPrecise` method
75
+ - Returns result as string for precision
@@ -0,0 +1,77 @@
1
+ # pi
2
+
3
+ Returns the mathematical constant Pi (π) with high precision.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ pi()
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ None.
14
+
15
+ ## Returns
16
+
17
+ String - Pi to 100 decimal places.
18
+
19
+ ## Description
20
+
21
+ The `pi` function returns the mathematical constant π (pi), which is the ratio of a circle's circumference to its diameter. The value is provided with 100 decimal places of precision.
22
+
23
+ ## Examples
24
+
25
+ ### Basic Usage
26
+
27
+ ```expression
28
+ Result = pi()
29
+ // Result: "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679..."
30
+ ```
31
+
32
+ ### Circle Calculations
33
+
34
+ ```expression
35
+ // Circumference of a circle
36
+ Circumference = 2 * pi() * Radius
37
+
38
+ // Area of a circle
39
+ Area = pi() * Radius^2
40
+ ```
41
+
42
+ ### Trigonometry
43
+
44
+ ```expression
45
+ // Convert degrees to radians manually
46
+ Radians = Degrees * pi() / 180
47
+
48
+ // Or use the rad() function
49
+ Radians = rad(Degrees)
50
+ ```
51
+
52
+ ### With Trigonometric Functions
53
+
54
+ ```expression
55
+ // Sine of 90 degrees (π/2 radians)
56
+ Result = sin(pi() / 2)
57
+ // Result: "1" (approximately)
58
+ ```
59
+
60
+ ## Use Cases
61
+
62
+ - **Circle geometry**: Circumference, area, arc length
63
+ - **Trigonometry**: Converting between degrees and radians
64
+ - **Physics**: Wave calculations, oscillations
65
+ - **Engineering**: Rotational calculations
66
+
67
+ ## Related Functions
68
+
69
+ - [euler](./euler.md) - Euler's number (e)
70
+ - [rad](./rad.md) - Convert degrees to radians
71
+ - [sin](./sin.md), [cos](./cos.md), [tan](./tan.md) - Trigonometric functions
72
+
73
+ ## Notes
74
+
75
+ - Returns the full precision value stored in the Math service
76
+ - Uses arbitrary precision arithmetic
77
+ - The value is constant and pre-computed
@@ -0,0 +1,69 @@
1
+ # polynomialregression
2
+
3
+ Fits a polynomial curve to data points.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ polynomialregression(xValues, yValues, degree)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `xValues` | Array | Array of x-coordinates |
16
+ | `yValues` | Array | Array of y-coordinates |
17
+ | `degree` | Number | Degree of polynomial to fit |
18
+
19
+ ## Returns
20
+
21
+ Array - Coefficients of the fitted polynomial.
22
+
23
+ ## Description
24
+
25
+ The `polynomialregression` function fits a polynomial of specified degree to a set of data points using least squares regression. Returns the coefficients of the polynomial.
26
+
27
+ ## Examples
28
+
29
+ ### Linear Fit (Degree 1)
30
+
31
+ ```expression
32
+ // Fit a line: y = mx + b
33
+ Coefficients = POLYNOMIALREGRESSION([1, 2, 3, 4, 5], [2, 4, 5, 4, 5], 1)
34
+ // Returns [intercept, slope]
35
+ ```
36
+
37
+ ### Quadratic Fit (Degree 2)
38
+
39
+ ```expression
40
+ // Fit a parabola: y = ax² + bx + c
41
+ Coefficients = POLYNOMIALREGRESSION(XData, YData, 2)
42
+ // Returns [c, b, a]
43
+ ```
44
+
45
+ ### Higher Degree
46
+
47
+ ```expression
48
+ // Fit cubic polynomial
49
+ CubicCoeffs = POLYNOMIALREGRESSION(XValues, YValues, 3)
50
+ ```
51
+
52
+ ## Use Cases
53
+
54
+ - **Trend analysis**: Fit curves to data
55
+ - **Prediction**: Extrapolate from data
56
+ - **Curve fitting**: Model relationships
57
+ - **Scientific analysis**: Data modeling
58
+
59
+ ## Related Functions
60
+
61
+ - [leastsquares](./leastsquares.md) - Linear least squares
62
+ - [predict](./predict.md) - Predict using coefficients
63
+ - [linest](./linest.md) - Linear estimation
64
+
65
+ ## Notes
66
+
67
+ - Higher degrees may overfit data
68
+ - Returns array of coefficients
69
+ - Uses the Math service's `polynomialRegression` method
@@ -0,0 +1,71 @@
1
+ # predict
2
+
3
+ Predicts a value using polynomial regression coefficients.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ predict(coefficients, xValue)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `coefficients` | Array | Polynomial coefficients from regression |
16
+ | `xValue` | Number | X value to predict for |
17
+
18
+ ## Returns
19
+
20
+ String - The predicted y-value.
21
+
22
+ ## Description
23
+
24
+ The `predict` function uses polynomial coefficients (from polynomialregression or similar) to calculate the predicted y-value for a given x-value.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ // Using linear coefficients [intercept, slope]
32
+ Coefficients = [10, 2] // y = 2x + 10
33
+ Predicted = PREDICT(Coefficients, 5)
34
+ // Result: "20" (2*5 + 10)
35
+ ```
36
+
37
+ ### With Regression Results
38
+
39
+ ```expression
40
+ // First fit the data
41
+ Coeffs = POLYNOMIALREGRESSION(XData, YData, 2)
42
+ // Then predict new values
43
+ FutureValue = PREDICT(Coeffs, NewX)
44
+ ```
45
+
46
+ ### Forecasting
47
+
48
+ ```expression
49
+ // Predict future sales
50
+ TrendCoeffs = POLYNOMIALREGRESSION(Months, Sales, 1)
51
+ NextMonthSales = PREDICT(TrendCoeffs, NextMonth)
52
+ ```
53
+
54
+ ## Use Cases
55
+
56
+ - **Forecasting**: Predict future values
57
+ - **Interpolation**: Estimate values between data points
58
+ - **Extrapolation**: Project beyond data range
59
+ - **Modeling**: Apply regression models
60
+
61
+ ## Related Functions
62
+
63
+ - [polynomialregression](./polynomialregression.md) - Generate coefficients
64
+ - [leastsquares](./leastsquares.md) - Linear regression
65
+ - [linest](./linest.md) - Linear estimation
66
+
67
+ ## Notes
68
+
69
+ - Uses polynomial evaluation
70
+ - Works with any degree polynomial
71
+ - Uses the Math service's `predict` method