@lowdefy/docs 3.23.0-alpha.0 → 4.0.0-alpha.4

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 (47) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/actions/JsAction.yaml +2 -2
  3. package/blocks/all_icons.yaml +1 -0
  4. package/blocks/{display → container}/Alert.yaml +3 -2
  5. package/blocks/{display → container}/Descriptions.yaml +3 -1
  6. package/blocks/container/Drawer.yaml +1 -0
  7. package/blocks/{context → container}/PageHCF.yaml +2 -2
  8. package/blocks/{context → container}/PageHCSF.yaml +2 -2
  9. package/blocks/{context → container}/PageHSCF.yaml +2 -2
  10. package/blocks/{context → container}/PageHeaderMenu.yaml +2 -2
  11. package/blocks/{context → container}/PageSHCF.yaml +2 -2
  12. package/blocks/{context → container}/PageSiderMenu.yaml +2 -2
  13. package/blocks/display/Img.yaml +1 -1
  14. package/blocks/input/MultipleSelector.yaml +80 -0
  15. package/blocks/input/Selector.yaml +62 -0
  16. package/concepts/custom-blocks.yaml +2 -2
  17. package/concepts/custom-code.yaml +3 -3
  18. package/connections/AxiosHttp.yaml +1 -1
  19. package/deployment/aws-lambda.yaml +2 -2
  20. package/deployment/docker.yaml +2 -2
  21. package/howto/generate-csv.yaml.njk +1 -1
  22. package/howto/generate-pdf.yaml.njk +2 -2
  23. package/howto/generateCsv/lowdefy.yaml +1 -1
  24. package/howto/generatePdf/lowdefy.yaml +1 -1
  25. package/howto/use-refrences.md +5 -0
  26. package/lowdefy.yaml +1 -1
  27. package/menus.yaml +22 -26
  28. package/operators/_actions.yaml +1 -1
  29. package/operators/_event.yaml +1 -0
  30. package/operators/_global.yaml +1 -0
  31. package/operators/_index.yaml +1 -0
  32. package/operators/_input.yaml +1 -0
  33. package/operators/_js.yaml +2 -2
  34. package/operators/_ref.yaml +16 -8
  35. package/operators/_state.yaml +1 -0
  36. package/operators/_url_query.yaml +1 -0
  37. package/package.json +7 -7
  38. package/pages.yaml +6 -8
  39. package/public/sitemap.xml +216 -201
  40. package/tutorial/tutorial-create-page.yaml +1 -1
  41. package/tutorial/tutorial-start.yaml +1 -1
  42. package/users/login-and-logout.yaml +2 -2
  43. package/users/protected-pages.yaml +2 -2
  44. package/users/roles.yaml +2 -2
  45. package/users/users-introduction.yaml +1 -1
  46. package/version.yaml +1 -1
  47. package/blocks/context/Context.yaml +0 -27
@@ -73,7 +73,7 @@ _ref:
73
73
  ###### Reference pages:
74
74
  ```yaml
75
75
  # lowdefy.yaml
76
- lowdefy: '3.22.0'
76
+ lowdefy: '3.23.1'
77
77
  pages:
78
78
  - _ref: pages/page1.yaml
79
79
  - _ref: pages/page2.yaml
@@ -94,7 +94,7 @@ _ref:
94
94
  ```
95
95
  Returns:
96
96
  ```
97
- lowdefy: '3.22.0'
97
+ lowdefy: '3.23.1'
98
98
  pages:
99
99
  - id: page1
100
100
  type: PageHeaderMenu
@@ -176,12 +176,20 @@ _ref:
176
176
 
177
177
  const readFilePromise = promisify(fs.readFile);
178
178
 
179
- async function useLocalOrSharedConfig(path, vars, context) {
180
- const localFile = await readFilePromise(path.resolve(path), 'utf8');
179
+ async function useLocalOrSharedConfig(refPath, vars, context) {
180
+ let fileContent
181
+ try {
182
+ fileContent = await readFilePromise(path.resolve(refPath), 'utf8');
183
+ return fileContent;
184
+ } catch (error) {
185
+ if (error.code === 'ENOENT') {
186
+ fileContent = readFilePromise(path.resolve('../shared', refPath), 'utf8');
187
+ return fileContent;
188
+ }
189
+ throw error;
190
+ }
181
191
 
182
- if (localFile) return localFile;
183
192
 
184
- return readFilePromise(path.resolve('../shared', path), 'utf8');
185
193
  }
186
194
 
187
195
  module.exports = useLocalOrSharedConfig;
@@ -189,7 +197,7 @@ _ref:
189
197
 
190
198
  ```yaml
191
199
  // lowdefy.yaml
192
- lowdefy: 3.22.0
200
+ lowdefy: 3.23.1
193
201
 
194
202
  cli:
195
203
  refResolver: resolvers/useLocalOrSharedConfig.js
@@ -215,7 +223,7 @@ _ref:
215
223
  ```
216
224
  ```yaml
217
225
  // lowdefy.yaml
218
- lowdefy: 3.22.0
226
+ lowdefy: 3.23.1
219
227
 
220
228
  pages:
221
229
  - _ref:
@@ -19,6 +19,7 @@ _ref:
19
19
  pageId: _state
20
20
  pageTitle: _state
21
21
  filePath: operators/_state.yaml
22
+ env: Client Only
22
23
  types: |
23
24
  ```
24
25
  (key: string): any
@@ -19,6 +19,7 @@ _ref:
19
19
  pageId: _url_query
20
20
  pageTitle: _url_query
21
21
  filePath: operators/_url_query.yaml
22
+ env: Client Only
22
23
  types: |
23
24
  ```
24
25
  (key: string): any
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/docs",
3
- "version": "3.23.0-alpha.0",
3
+ "version": "4.0.0-alpha.4",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -31,14 +31,14 @@
31
31
  "test": "jest --coverage"
32
32
  },
33
33
  "devDependencies": {
34
- "@babel/cli": "7.14.3",
35
- "@babel/core": "7.14.3",
36
- "@babel/preset-env": "7.14.4",
37
- "babel-jest": "26.6.3",
38
- "jest": "26.6.3"
34
+ "@babel/cli": "7.15.7",
35
+ "@babel/core": "7.15.8",
36
+ "@babel/preset-env": "7.15.8",
37
+ "babel-jest": "27.3.1",
38
+ "jest": "27.3.1"
39
39
  },
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "8a2b43f5906ff3fbe50237f706c0daec3a480fca"
43
+ "gitHead": "537d166ba3f6e017b8a61c2a7e5c12fd0a48bf67"
44
44
  }
package/pages.yaml CHANGED
@@ -115,20 +115,18 @@
115
115
  - _ref: blocks/container/Drawer.yaml
116
116
  - _ref: blocks/container/Label.yaml
117
117
  - _ref: blocks/container/Modal.yaml
118
+ - _ref: blocks/container/PageHCF.yaml
119
+ - _ref: blocks/container/PageHCSF.yaml
120
+ - _ref: blocks/container/PageHeaderMenu.yaml
121
+ - _ref: blocks/container/PageHSCF.yaml
122
+ - _ref: blocks/container/PageSHCF.yaml
123
+ - _ref: blocks/container/PageSiderMenu.yaml
118
124
  - _ref: blocks/container/Result.yaml
119
125
  - _ref: blocks/container/Span.yaml
120
126
  - _ref: blocks/container/Spin.yaml
121
127
  - _ref: blocks/container/Tabs.yaml
122
128
  - _ref: blocks/container/Tooltip.yaml
123
129
 
124
- - _ref: blocks/context/Context.yaml
125
- - _ref: blocks/context/PageHCF.yaml
126
- - _ref: blocks/context/PageHCSF.yaml
127
- - _ref: blocks/context/PageHeaderMenu.yaml
128
- - _ref: blocks/context/PageHSCF.yaml
129
- - _ref: blocks/context/PageSHCF.yaml
130
- - _ref: blocks/context/PageSiderMenu.yaml
131
-
132
130
  - _ref: blocks/list/ControlledList.yaml
133
131
  - _ref: blocks/list/List.yaml
134
132
  # - _ref: blocks/list/TimelineList.yaml