@lowdefy/docs 4.0.0-alpha.7 → 4.0.0-alpha.8

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 (275) hide show
  1. package/dist/operators/client/filter_default_value.js +55 -0
  2. package/{public/modules/connectDocsearch.js → dist/operatorsClient.js} +1 -19
  3. package/{templates/blocks/schemaTransformer.js → dist/types.js} +5 -10
  4. package/package.json +19 -3
  5. package/404.yaml +0 -26
  6. package/CHANGELOG.md +0 -697
  7. package/actions/CallMethod.yaml +0 -57
  8. package/actions/JsAction.yaml +0 -281
  9. package/actions/Link.yaml +0 -120
  10. package/actions/Login.yaml +0 -123
  11. package/actions/Logout.yaml +0 -44
  12. package/actions/Message.yaml +0 -68
  13. package/actions/Notification.yaml +0 -84
  14. package/actions/Request.yaml +0 -70
  15. package/actions/Reset.yaml +0 -42
  16. package/actions/ResetValidation.yaml +0 -102
  17. package/actions/ScrollTo.yaml +0 -100
  18. package/actions/SetGlobal.yaml +0 -78
  19. package/actions/SetState.yaml +0 -85
  20. package/actions/Throw.yaml +0 -89
  21. package/actions/Validate.yaml +0 -104
  22. package/actions/Wait.yaml +0 -40
  23. package/blocks/all_icons.yaml +0 -803
  24. package/blocks/container/Affix.yaml +0 -26
  25. package/blocks/container/Alert.yaml +0 -27
  26. package/blocks/container/Badge.yaml +0 -27
  27. package/blocks/container/Box.yaml +0 -27
  28. package/blocks/container/Card.yaml +0 -29
  29. package/blocks/container/Collapse.yaml +0 -38
  30. package/blocks/container/Comment.yaml +0 -43
  31. package/blocks/container/ConfirmModal.yaml +0 -36
  32. package/blocks/container/Descriptions.yaml +0 -51
  33. package/blocks/container/Drawer.yaml +0 -46
  34. package/blocks/container/Label.yaml +0 -28
  35. package/blocks/container/Modal.yaml +0 -46
  36. package/blocks/container/PageHCF.yaml +0 -28
  37. package/blocks/container/PageHCSF.yaml +0 -29
  38. package/blocks/container/PageHSCF.yaml +0 -29
  39. package/blocks/container/PageHeaderMenu.yaml +0 -52
  40. package/blocks/container/PageSHCF.yaml +0 -29
  41. package/blocks/container/PageSiderMenu.yaml +0 -53
  42. package/blocks/container/Result.yaml +0 -34
  43. package/blocks/container/Span.yaml +0 -27
  44. package/blocks/container/Spin.yaml +0 -27
  45. package/blocks/container/Tabs.yaml +0 -41
  46. package/blocks/container/Tooltip.yaml +0 -38
  47. package/blocks/display/Anchor.yaml +0 -25
  48. package/blocks/display/Avatar.yaml +0 -23
  49. package/blocks/display/Breadcrumb.yaml +0 -28
  50. package/blocks/display/Button.yaml +0 -43
  51. package/blocks/display/DangerousHtml.yaml +0 -62
  52. package/blocks/display/DangerousMarkdown.yaml +0 -46
  53. package/blocks/display/Divider.yaml +0 -23
  54. package/blocks/display/EChart.yaml +0 -53
  55. package/blocks/display/Html.yaml +0 -50
  56. package/blocks/display/Icon.yaml +0 -23
  57. package/blocks/display/Img.yaml +0 -40
  58. package/blocks/display/Markdown.yaml +0 -31
  59. package/blocks/display/MarkdownWithCode.yaml +0 -46
  60. package/blocks/display/Menu.yaml +0 -48
  61. package/blocks/display/Message.yaml +0 -34
  62. package/blocks/display/MobileMenu.yaml +0 -47
  63. package/blocks/display/Notification.yaml +0 -34
  64. package/blocks/display/Paragraph.yaml +0 -30
  65. package/blocks/display/Progress.yaml +0 -52
  66. package/blocks/display/Skeleton.yaml +0 -27
  67. package/blocks/display/Statistic.yaml +0 -35
  68. package/blocks/display/Title.yaml +0 -32
  69. package/blocks/input/AutoComplete.yaml +0 -30
  70. package/blocks/input/ButtonSelector.yaml +0 -36
  71. package/blocks/input/CheckboxSelector.yaml +0 -36
  72. package/blocks/input/CheckboxSwitch.yaml +0 -56
  73. package/blocks/input/ChromeColorSelector.yaml +0 -24
  74. package/blocks/input/CircleColorSelector.yaml +0 -24
  75. package/blocks/input/ColorSelector.yaml +0 -24
  76. package/blocks/input/CompactColorSelector.yaml +0 -24
  77. package/blocks/input/DateRangeSelector.yaml +0 -26
  78. package/blocks/input/DateSelector.yaml +0 -26
  79. package/blocks/input/DateTimeSelector.yaml +0 -28
  80. package/blocks/input/GithubColorSelector.yaml +0 -24
  81. package/blocks/input/MonthSelector.yaml +0 -26
  82. package/blocks/input/MultipleSelector.yaml +0 -117
  83. package/blocks/input/NumberInput.yaml +0 -24
  84. package/blocks/input/Pagination.yaml +0 -33
  85. package/blocks/input/ParagraphInput.yaml +0 -32
  86. package/blocks/input/PasswordInput.yaml +0 -48
  87. package/blocks/input/RadioSelector.yaml +0 -36
  88. package/blocks/input/RatingSlider.yaml +0 -24
  89. package/blocks/input/S3UploadButton.yaml +0 -28
  90. package/blocks/input/Selector.yaml +0 -98
  91. package/blocks/input/SliderColorSelector.yaml +0 -24
  92. package/blocks/input/SwatchesColorSelector.yaml +0 -24
  93. package/blocks/input/Switch.yaml +0 -24
  94. package/blocks/input/TextArea.yaml +0 -27
  95. package/blocks/input/TextInput.yaml +0 -59
  96. package/blocks/input/TitleInput.yaml +0 -32
  97. package/blocks/input/TwitterColorSelector.yaml +0 -24
  98. package/blocks/input/WeekSelector.yaml +0 -26
  99. package/blocks/list/ControlledList.yaml +0 -191
  100. package/blocks/list/List.yaml +0 -157
  101. package/blocks/list/TimelineList.yaml +0 -136
  102. package/body.html +0 -1
  103. package/concepts/blocks.yaml +0 -249
  104. package/concepts/cli.yaml +0 -173
  105. package/concepts/connections-and-requests.yaml +0 -114
  106. package/concepts/context-and-state.yaml +0 -82
  107. package/concepts/custom-blocks.yaml +0 -190
  108. package/concepts/custom-code.yaml +0 -197
  109. package/concepts/events-and-actions.yaml +0 -224
  110. package/concepts/hosting-files.yaml +0 -50
  111. package/concepts/layout.yaml +0 -1464
  112. package/concepts/lists.yaml +0 -162
  113. package/concepts/lowdefy-schema.yaml +0 -245
  114. package/concepts/operators.yaml +0 -66
  115. package/concepts/overview.yaml +0 -48
  116. package/concepts/secrets.yaml +0 -56
  117. package/connections/AWSS3.yaml +0 -228
  118. package/connections/AmazonRedshift.yaml +0 -75
  119. package/connections/AxiosHttp.yaml +0 -194
  120. package/connections/Elasticsearch.yaml +0 -378
  121. package/connections/GoogleSheet.yaml +0 -332
  122. package/connections/Knex.yaml +0 -181
  123. package/connections/KnexRequests.md +0 -121
  124. package/connections/MSSQL.yaml +0 -90
  125. package/connections/MariaDB.yaml +0 -77
  126. package/connections/MongoDB.yaml +0 -581
  127. package/connections/MySQL.yaml +0 -92
  128. package/connections/OracleDB.yaml +0 -73
  129. package/connections/PostgreSQL.yaml +0 -99
  130. package/connections/Redis.yaml +0 -147
  131. package/connections/SQLite.yaml +0 -94
  132. package/connections/SendGridMail.yaml +0 -113
  133. package/connections/Stripe.yaml +0 -139
  134. package/deployment/aws-lambda.yaml +0 -128
  135. package/deployment/docker.yaml +0 -118
  136. package/deployment/netlify.yaml +0 -69
  137. package/deployment/node-server.yaml +0 -111
  138. package/head.html +0 -7
  139. package/howto/generate-csv.yaml.njk +0 -252
  140. package/howto/generate-pdf.yaml.njk +0 -651
  141. package/howto/generateCsv/lowdefy.yaml +0 -64
  142. package/howto/generateCsv/public/csvMake.js +0 -27
  143. package/howto/generatePdf/inv_template.yaml +0 -200
  144. package/howto/generatePdf/lowdefy.yaml +0 -117
  145. package/howto/generatePdf/my_header.html +0 -1
  146. package/howto/generatePdf/public/logo_example.png +0 -0
  147. package/howto/generatePdf/public/modules/importUmd.js +0 -7
  148. package/howto/generatePdf/public/modules/pdfMake.js +0 -7
  149. package/howto/generatePdf/public/modules/vfs_fonts.js +0 -12
  150. package/howto/use-refrences.md +0 -5
  151. package/introduction.yaml +0 -100
  152. package/lowdefy.yaml +0 -66
  153. package/menus.yaml +0 -832
  154. package/operators/_actions.yaml +0 -123
  155. package/operators/_and.yaml +0 -90
  156. package/operators/_args.yaml +0 -79
  157. package/operators/_array.yaml +0 -326
  158. package/operators/_base64.yaml +0 -56
  159. package/operators/_change_case.yaml +0 -347
  160. package/operators/_date.yaml +0 -71
  161. package/operators/_diff.yaml +0 -75
  162. package/operators/_divide.yaml +0 -46
  163. package/operators/_eq.yaml +0 -67
  164. package/operators/_event.yaml +0 -103
  165. package/operators/_format.yaml +0 -209
  166. package/operators/_function.yaml +0 -66
  167. package/operators/_get.yaml +0 -108
  168. package/operators/_global.yaml +0 -107
  169. package/operators/_gt.yaml +0 -65
  170. package/operators/_gte.yaml +0 -65
  171. package/operators/_hash.yaml +0 -109
  172. package/operators/_if.yaml +0 -44
  173. package/operators/_if_none.yaml +0 -61
  174. package/operators/_index.yaml +0 -65
  175. package/operators/_input.yaml +0 -114
  176. package/operators/_js.yaml +0 -189
  177. package/operators/_json.yaml +0 -128
  178. package/operators/_list_contexts.yaml +0 -37
  179. package/operators/_location.yaml +0 -59
  180. package/operators/_log.yaml +0 -36
  181. package/operators/_lt.yaml +0 -65
  182. package/operators/_lte.yaml +0 -65
  183. package/operators/_math.yaml +0 -374
  184. package/operators/_media.yaml +0 -86
  185. package/operators/_menu.yaml +0 -81
  186. package/operators/_mql.yaml +0 -101
  187. package/operators/_ne.yaml +0 -77
  188. package/operators/_not.yaml +0 -47
  189. package/operators/_number.yaml +0 -157
  190. package/operators/_nunjucks.yaml +0 -73
  191. package/operators/_object.yaml +0 -193
  192. package/operators/_operator.yaml +0 -47
  193. package/operators/_or.yaml +0 -81
  194. package/operators/_product.yaml +0 -59
  195. package/operators/_random.yaml +0 -104
  196. package/operators/_ref.yaml +0 -266
  197. package/operators/_regex.yaml +0 -83
  198. package/operators/_request.yaml +0 -50
  199. package/operators/_secret.yaml +0 -74
  200. package/operators/_state.yaml +0 -114
  201. package/operators/_string.yaml +0 -283
  202. package/operators/_subtract.yaml +0 -38
  203. package/operators/_sum.yaml +0 -59
  204. package/operators/_switch.yaml +0 -51
  205. package/operators/_type.yaml +0 -92
  206. package/operators/_uri.yaml +0 -56
  207. package/operators/_url_query.yaml +0 -120
  208. package/operators/_user.yaml +0 -107
  209. package/operators/_uuid.yaml +0 -114
  210. package/operators/_var.yaml +0 -105
  211. package/operators/_yaml.yaml +0 -107
  212. package/pages.yaml +0 -227
  213. package/public/images/authors/gervwyk.jpeg +0 -0
  214. package/public/images/authors/sandile.jpeg +0 -0
  215. package/public/images/howto/header_generate_csv.jpg +0 -0
  216. package/public/images/howto/header_generate_pdf.jpg +0 -0
  217. package/public/logo_example.png +0 -0
  218. package/public/lowdefy_app_schema.png +0 -0
  219. package/public/modules/csvMake.js +0 -27
  220. package/public/modules/filterDefaultValue.js +0 -48
  221. package/public/modules/importUmd.js +0 -7
  222. package/public/modules/index.js +0 -5
  223. package/public/modules/pdfMake.js +0 -7
  224. package/public/modules/test/filterDefaultValue.test.js +0 -91
  225. package/public/modules/vfs_fonts.js +0 -12
  226. package/public/sitemap.xml +0 -1024
  227. package/templates/actions.yaml.njk +0 -68
  228. package/templates/blocks/defaultValueTransformer.js +0 -53
  229. package/templates/blocks/exampleTransformer.js +0 -81
  230. package/templates/blocks/layout.yaml +0 -114
  231. package/templates/blocks/propertiesFormTransformer.js +0 -419
  232. package/templates/blocks/propertiesGetterTransformer.js +0 -132
  233. package/templates/blocks/schema.yaml.njk +0 -42
  234. package/templates/blocks/style.yaml +0 -26
  235. package/templates/blocks/template.yaml.njk +0 -495
  236. package/templates/blog.yaml.njk +0 -221
  237. package/templates/cli_command.yaml.njk +0 -37
  238. package/templates/footer.yaml.njk +0 -604
  239. package/templates/general.yaml.njk +0 -124
  240. package/templates/generateSitemap.js +0 -41
  241. package/templates/header.yaml +0 -138
  242. package/templates/navigation_buttons.yaml +0 -68
  243. package/templates/operators.yaml.njk +0 -82
  244. package/templates/operatorsMethodTransformer.js +0 -119
  245. package/templates/test/array.test.js +0 -1335
  246. package/templates/test/boolean.test.js +0 -98
  247. package/templates/test/button.test.js +0 -166
  248. package/templates/test/color.test.js +0 -126
  249. package/templates/test/enum.test.js +0 -105
  250. package/templates/test/icon.test.js +0 -109
  251. package/templates/test/integer.test.js +0 -99
  252. package/templates/test/manual.test.js +0 -238
  253. package/templates/test/number.test.js +0 -99
  254. package/templates/test/object.test.js +0 -434
  255. package/templates/test/oneOf.test.js +0 -794
  256. package/templates/test/string.test.js +0 -98
  257. package/templates/test/yaml.test.js +0 -605
  258. package/tutorial/next-steps.yaml +0 -83
  259. package/tutorial/tutorial-actions-operators-config.yaml +0 -142
  260. package/tutorial/tutorial-actions-operators.yaml +0 -436
  261. package/tutorial/tutorial-add-blocks-config.yaml +0 -109
  262. package/tutorial/tutorial-add-blocks.yaml +0 -195
  263. package/tutorial/tutorial-create-page-config.yaml +0 -77
  264. package/tutorial/tutorial-create-page.yaml +0 -196
  265. package/tutorial/tutorial-deploy.yaml +0 -146
  266. package/tutorial/tutorial-requests-config.yaml +0 -186
  267. package/tutorial/tutorial-requests.yaml +0 -338
  268. package/tutorial/tutorial-start.yaml +0 -282
  269. package/users/login-and-logout.yaml +0 -164
  270. package/users/openid-connect.yaml +0 -84
  271. package/users/protected-pages.yaml +0 -67
  272. package/users/roles.yaml +0 -70
  273. package/users/user-object.yaml +0 -73
  274. package/users/users-introduction.yaml +0 -80
  275. package/version.yaml +0 -1
@@ -1,77 +0,0 @@
1
- # Copyright 2020-2021 Lowdefy, Inc
2
-
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
-
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- _ref:
16
- path: templates/operators.yaml.njk
17
- transformer: templates/operatorsMethodTransformer.js
18
- vars:
19
- pageId: _ne
20
- pageTitle: _ne
21
- filePath: operators/_ne.yaml
22
- types: |
23
- ```
24
- ([value1: any, value2: any]): boolean
25
- ```
26
- description: |
27
- The `_ne` operator tests if two values are not equal. It takes an array of two values to test.
28
-
29
- > The `_ne` won't do a deep comparison.
30
-
31
- arguments: |
32
- ###### array
33
- An array of two values to compare.
34
- examples: |
35
- ###### Two non-equal strings:
36
-
37
- ```yaml
38
- _ne:
39
- - "Hello"
40
- - "Hello you"
41
- ```
42
- Returns: `true`
43
-
44
- ###### Two equal strings:
45
-
46
- ```yaml
47
- _ne:
48
- - "Hello"
49
- - "Hello"
50
- ```
51
- Returns: `false`
52
-
53
- ###### Two numbers:
54
- ```yaml
55
- _ne:
56
- - _sum:
57
- - 3
58
- - 4
59
- - 8
60
- ```
61
- Returns: `true`
62
-
63
- ###### Arrays are not compared deeply:
64
- ```yaml
65
- _ne:
66
- - [1,2,3]
67
- - [1,2,3]
68
- ```
69
- Returns: `true`
70
-
71
- ###### Values from "getter" operators are copies and not equal:
72
- ```yaml
73
- _ne:
74
- - _state: my_object
75
- - _state: my_object
76
- ```
77
- Returns: `true`
@@ -1,47 +0,0 @@
1
- # Copyright 2020-2021 Lowdefy, Inc
2
-
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
-
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- _ref:
16
- path: templates/operators.yaml.njk
17
- transformer: templates/operatorsMethodTransformer.js
18
- vars:
19
- pageId: _not
20
- pageTitle: _not
21
- filePath: operators/_not.yaml
22
- types: |
23
- ```
24
- (value: any): boolean
25
- ```
26
- description: |
27
- The `_not` operator returns the logical negation of the input. If the value is not a boolean, it will be converted to a boolean using javascript [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy) and [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) rules.
28
- arguments: |
29
- ###### any
30
- examples: |
31
- ###### Not `true` is `false`:
32
- ```yaml
33
- _not: true
34
- ```
35
- Returns: `false`
36
-
37
- ###### Return `true` for a falsy value:
38
- ```yaml
39
- _not: null
40
- ```
41
- Returns: `true`
42
-
43
- ###### Return `false` for a truthy value:
44
- ```yaml
45
- _not: 100
46
- ```
47
- Returns: `false`
@@ -1,157 +0,0 @@
1
- # Copyright 2020-2021 Lowdefy, Inc
2
-
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
-
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- _ref:
16
- path: templates/operators.yaml.njk
17
- transformer: templates/operatorsMethodTransformer.js
18
- vars:
19
- pageId: _number
20
- pageTitle: _number
21
- filePath: operators/_number.yaml
22
- description: |
23
- The `_number` operator can be used to run javascript [`Number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) methods.
24
- methods:
25
- - name: EPSILON
26
- types: |
27
- ```
28
- (void): number
29
- ```
30
- description: |
31
- The `_number.EPSILON` property represents the smallest interval between two representable numbers.. [See MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON) for more details and examples.
32
- - name: MAX_SAFE_INTEGER
33
- types: |
34
- ```
35
- (void): number
36
- ```
37
- description: |
38
- The `_number.MAX_SAFE_INTEGER` property represents the maximum safe integer in JavaScript (2^53 - 1). [See MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER) for more details and examples.
39
- - name: MAX_VALUE
40
- types: |
41
- ```
42
- (void): number
43
- ```
44
- description: |
45
- The `_number.MAX_VALUE` property represents the largest positive representable number. [See MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_VALUE) for more details and examples.
46
- - name: MIN_SAFE_INTEGER
47
- types: |
48
- ```
49
- (void): number
50
- ```
51
- description: |
52
- The `_number.MIN_SAFE_INTEGER` property represents the minimum safe integer in JavaScript (-(2^53 - 1)). [See MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MIN_SAFE_INTEGER) for more details and examples.
53
- - name: MIN_VALUE
54
- types: |
55
- ```
56
- (void): number
57
- ```
58
- description: |
59
- The `_number.MIN_VALUE` property represents the smallest positive representable number — that is, the positive number closest to zero (without actually being zero). [See MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MIN_VALUE) for more details and examples.
60
- - name: NaN
61
- types: |
62
- ```
63
- (void): number
64
- ```
65
- description: |
66
- The `_number.NaN` property represents the special "Not a Number" value. [See MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN) for more details and examples.
67
- - name: NEGATIVE_INFINITY
68
- types: |
69
- ```
70
- (void): number
71
- ```
72
- description: |
73
- The `_number.NEGATIVE_INFINITY` property represents negative infinity. Returned on overflow. [See MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/NEGATIVE_INFINITY) for more details and examples.
74
- - name: POSITIVE_INFINITY
75
- types: |
76
- ```
77
- (void): number
78
- ```
79
- description: |
80
- The `_number.POSITIVE_INFINITY` property represents positive infinity. [See MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/POSITIVE_INFINITY) for more details and examples.
81
- - name: isFinite
82
- types: |
83
- ```
84
- (void): number
85
- ```
86
- description: |
87
- The `_number.isFinite` method is used to determine whether the passed value is a finite number. [See MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite) for more details and examples.
88
- - name: isInteger
89
- types: |
90
- ```
91
- (void): number
92
- ```
93
- description: |
94
- The `_number.isInteger` method is used to determine whether the passed value is an integer. [See MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger) for more details and examples.
95
- - name: isNaN
96
- types: |
97
- ```
98
- (void): number
99
- ```
100
- description: |
101
- The `_number.isNaN` method is used to determine whether the passed value is NaN. [See MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) for more details and examples.
102
- - name: isSafeInteger
103
- types: |
104
- ```
105
- (void): number
106
- ```
107
- description: |
108
- The `_number.isSafeInteger` method is used to determine whether the passed value is a safe integer (number between -(2^53 - 1) and 2^53 - 1). [See MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger) for more details and examples.
109
- - name: parseFloat
110
- types: |
111
- ```
112
- (void): number
113
- ```
114
- description: |
115
- The `_number.parseFloat` method parses an argument and returns a floating point number. If a number cannot be parsed from the argument, it returns NaN. [See MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/parseFloat) for more details and examples.
116
- - name: parseInt
117
- types: |
118
- ```
119
- (void): number
120
- ```
121
- description: |
122
- The `_number.parseInt` method parses a string argument and returns an integer of the specified radix or base. If a number cannot be parsed from the argument, it returns NaN. [See MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/parseInt) for more details and examples.
123
- - name: toExponential
124
- types: |
125
- ```
126
- (void): number
127
- ```
128
- description: |
129
- The `_number.toExponential` method returns a string representing the Number object in exponential notation. [See MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential) for more details and examples.
130
- - name: toFixed
131
- types: |
132
- ```
133
- (void): number
134
- ```
135
- description: |
136
- The `_number.toFixed` method formats a number using fixed-point notation. [See MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed) for more details and examples.
137
- - name: toLocaleString
138
- types: |
139
- ```
140
- (void): number
141
- ```
142
- description: |
143
- The `_number.toLocaleString` method returns a string with a language-sensitive representation of this number. [See MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString) for more details and examples.
144
- - name: toPrecision
145
- types: |
146
- ```
147
- (void): number
148
- ```
149
- description: |
150
- The `_number.toPrecision` method returns a string representing the Number object to the specified precision. [See MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) for more details and examples.
151
- - name: toString
152
- types: |
153
- ```
154
- (void): number
155
- ```
156
- description: |
157
- The `_number.toString` method returns a string representing the specified Number object. [See MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString) for more details and examples.
@@ -1,73 +0,0 @@
1
- # Copyright 2020-2021 Lowdefy, Inc
2
-
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
-
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- _ref:
16
- path: templates/operators.yaml.njk
17
- transformer: templates/operatorsMethodTransformer.js
18
- vars:
19
- pageId: _nunjucks
20
- pageTitle: _nunjucks
21
- filePath: operators/_nunjucks.yaml
22
- types: |
23
- ```
24
- (template: string): string
25
- (arguments: {template: string, on: object}): string
26
- ```
27
- description: |
28
- The `_nunjucks` hydrates a [Nunjucks](https://mozilla.github.io/nunjucks/) template.
29
-
30
- If called with a string argument, the template variables are the values in `state`. Otherwise template variables can be specified using the `on` argument.
31
- arguments: |
32
- ###### string
33
- The template to hydrate. The template variables used are the values in state
34
-
35
- ###### object
36
- - `template: string`: The template to hydrate.
37
- - `on: object`: The template variables to use when hydrating the template.
38
- examples: |
39
- ###### Populate a template from values in `state`:
40
- ```yaml
41
- _nunjucks: Hello {{ name }}
42
- ```
43
- Returns: `"Hello Steven"` if the value of name in state is `"Steven"`.
44
-
45
- ###### Populate a markdown template with different values:
46
- Assuming `get_items` returns:
47
- ```yaml
48
- - name: Coca Cola
49
- description: The original.
50
- - name: Pepsi
51
- description: The same but different.
52
- ```
53
-
54
- ```yaml
55
- _nunjucks:
56
- template: |
57
- ### {{ title }}
58
-
59
- {% for item in item_list %}
60
- - {{ item.name }}: {{ item.description }}
61
- {% endfor %}
62
- on:
63
- title: Soft drinks
64
- items:
65
- _request: get_items
66
- ```
67
- Returns:
68
- ```markdown
69
- ### Soft drinks
70
-
71
- - Coca Cola: The original.
72
- - Pepsi: The same but different.
73
- ```
@@ -1,193 +0,0 @@
1
- # Copyright 2020-2021 Lowdefy, Inc
2
-
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
-
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- _ref:
16
- path: templates/operators.yaml.njk
17
- transformer: templates/operatorsMethodTransformer.js
18
- vars:
19
- pageId: _object
20
- pageTitle: _object
21
- filePath: operators/_object.yaml
22
- description: |
23
- The `_object` operator can be used to run javascript [`Object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) methods.
24
- methods:
25
- - name: assign
26
- types: |
27
- ```
28
- (objs: obj[]): object
29
- ```
30
- description: |
31
- The `_object.assign` method copies the values of one ore more source objects to a target objects. The first object in the arguments array is the target object, and the rest are source objects. Keys in the target object are overwritten. The result of `_object.assign` can be seen as a "shallow-merge" of all the objects in the array, with the values in later objects taken preferentially.
32
- arguments: |
33
- ###### array
34
- An array of objects.
35
- examples: |
36
- ###### Merge three objects:
37
- ```yaml
38
- _object.assign:
39
- - firstName: Rachel
40
- lastName: Green
41
- series: Friends
42
- - firstName: Monica
43
- lastName: Geller
44
- address:
45
- street: 90 Bedford St
46
- city: New York
47
- zipCode: '10014'
48
- country: US
49
- - friends:
50
- - Ross Geller
51
- - Rachel Green
52
- - Chandler Bing
53
- - Phoebe Buffay
54
- - Joey Tribbiani
55
- ```
56
- Returns:
57
- ```yaml
58
- firstName: Monica
59
- lastName: Geller
60
- series: Friends
61
- address:
62
- street: 90 Bedford St
63
- city: New York
64
- zipCode: '10014'
65
- country: US
66
- friends:
67
- - Ross Geller
68
- - Rachel Green
69
- - Chandler Bing
70
- - Phoebe Buffay
71
- - Joey Tribbiani
72
- ```
73
- - name: defineProperty
74
- types: |
75
- ```
76
- (arguments: {
77
- on: object,
78
- key: string,
79
- descriptor: {
80
- value: any,
81
- configurable?: boolean,
82
- enumerable?: boolean,
83
- writable?: boolean
84
- }
85
- }): any
86
- (arguments: [
87
- on: object,
88
- key: string,
89
- descriptor: {
90
- value: any,
91
- configurable?: boolean,
92
- enumerable?: boolean,
93
- writable?: boolean
94
- }
95
- ]): any
96
- ```
97
- description: |
98
- The `_object.defineProperty` method defines a new property directly on an object, or modifies an existing property on an object, and returns the object. The first object in the arguments array, or the `on` parameter, is the target object to which the property will be applied. The second argument, or the `key` parameter, is the property name or key which will be applied to the target object. The third and last object argument, or the `descriptor` parameter, has serval options to consider, however, for the most common application set the `value` object key to the value that should be applied to the target object key. See [Object.defineProperty](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) for a more detailed description.
99
-
100
- > The `_object.defineProperty` method is handy when the `key` to set is variable.
101
- examples: |
102
- ###### Set a value to a object key:
103
- ```yaml
104
- _object.defineProperty:
105
- - firstName: Rachel
106
- series: Friends
107
- - lastName
108
- - descriptor:
109
- value: Green
110
- ```
111
- Returns:
112
- ```yaml
113
- firstName: Rachel
114
- lastName: Green
115
- series: Friends
116
- ```
117
- - name: keys
118
- types: |
119
- ```
120
- (obj: object): string[]
121
- ```
122
- description: |
123
- The `_object.keys` method returns an array with the objects keys.
124
- arguments: |
125
- ###### object
126
- The object to get keys from.
127
- examples: |
128
- ###### Get the keys of an object:
129
- ```yaml
130
- _object.keys:
131
- firstName: Monica
132
- lastName: Geller
133
- address:
134
- street: 90 Bedford St
135
- city: New York
136
- zipCode: '10014'
137
- country: US
138
- friends:
139
- - Ross Geller
140
- - Rachel Green
141
- - Chandler Bing
142
- - Phoebe Buffay
143
- - Joey Tribbiani
144
- ```
145
- Returns:
146
- ```yaml
147
- - firstName
148
- - lastName
149
- - address
150
- - friends
151
- ```
152
- - name: values
153
- types: |
154
- ```
155
- (obj: object): any[]
156
- ```
157
- description: |
158
- The `_object.keys` method returns an array with the values of all the fields in an object.
159
- arguments: |
160
- ###### object
161
- The object to get keys from.
162
- examples: |
163
- ###### Get the values of an object:
164
- ```yaml
165
- _object.values:
166
- firstName: Monica
167
- lastName: Geller
168
- address:
169
- street: 90 Bedford St
170
- city: New York
171
- zipCode: '10014'
172
- country: US
173
- friends:
174
- - Ross Geller
175
- - Rachel Green
176
- - Chandler Bing
177
- - Phoebe Buffay
178
- - Joey Tribbiani
179
- ```
180
- Returns:
181
- ```yaml
182
- - Monica
183
- - Geller
184
- - street: 90 Bedford St
185
- city: New York
186
- zipCode: '10014'
187
- country: US
188
- - - Ross Geller
189
- - Rachel Green
190
- - Chandler Bing
191
- - Phoebe Buffay
192
- - Joey Tribbiani
193
- ```
@@ -1,47 +0,0 @@
1
- # Copyright 2020-2021 Lowdefy, Inc
2
-
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
-
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- _ref:
16
- path: templates/operators.yaml.njk
17
- transformer: templates/operatorsMethodTransformer.js
18
- vars:
19
- pageId: _operator
20
- pageTitle: _operator
21
- filePath: operators/_operator.yaml
22
- types: |
23
- ```
24
- (arguments: {operator: string, params: any): any
25
- ```
26
- description: |
27
- The `_operator` operator evaluates an operator with the given params. This is useful if the operator needs to be chosen dynamically. The `_operator` cannot evaluate itself.
28
- arguments: |
29
- ###### object
30
- - `operator: string`: The name of the operator to evaluate.
31
- - `params: any`: The params to give to the operator.
32
- examples: |
33
- ###### Get a value from `urlQuery` if specified, else use the value in `state`:
34
- ```yaml
35
- _operator:
36
- operator:
37
- _if:
38
- test:
39
- _eq:
40
- - _state: location_selector
41
- - url_query
42
- then: _url_query
43
- else: _state
44
- params:
45
- key: field_to_get
46
- ```
47
- Returns: Value from `urlQuery` if `location_selector == url_query`, else the value from `state`.
@@ -1,81 +0,0 @@
1
- # Copyright 2020-2021 Lowdefy, Inc
2
-
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
-
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- _ref:
16
- path: templates/operators.yaml.njk
17
- transformer: templates/operatorsMethodTransformer.js
18
- vars:
19
- pageId: _or
20
- pageTitle: _or
21
- filePath: operators/_or.yaml
22
- types: |
23
- ```
24
- (values: any[]): boolean
25
- ```
26
- description: |
27
- The `_or` operator performs a logical `or` over an array of inputs, using javascript [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy) and [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) rules.
28
-
29
- It returns true if any of the values in the array are truthy (not `false`, `0`, `null`, `undefined`, or the empty string `""`). If all the values are falsy, it returns `false`.
30
- arguments: |
31
- ###### array
32
- An array of values over which to perform a logical or.
33
- examples: |
34
- ###### `true` and `false` values:
35
- ```yaml
36
- _or:
37
- - true
38
- - false
39
- ```
40
- Returns: `true`
41
-
42
- ###### Array of `true` and `false` values:
43
- ```yaml
44
- _or:
45
- - true
46
- - false
47
- - false
48
- - false
49
- ```
50
- Returns: `true`
51
-
52
- ###### Falsy values values:
53
- ```yaml
54
- _or:
55
- - null
56
- - 0
57
- - ''
58
- ```
59
- Returns: `false`
60
-
61
- ###### Truthy values:
62
- ```yaml
63
- _or:
64
- - false
65
- - "Hello"
66
- ```
67
- Returns: `true`
68
-
69
- ```yaml
70
- _or:
71
- - false
72
- - 99
73
- ```
74
- Returns: `true`
75
-
76
- ```yaml
77
- _or:
78
- - false
79
- - [1,2,3]
80
- ```
81
- Returns: `true`