@jinntec/fore 1.0.0-4 → 1.1.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 (66) hide show
  1. package/README.md +26 -38
  2. package/dist/fore-dev.js +43 -0
  3. package/dist/fore-dev.js.map +1 -0
  4. package/dist/fore.js +37 -0
  5. package/dist/fore.js.map +1 -0
  6. package/index.js +4 -0
  7. package/package.json +42 -42
  8. package/resources/fore.css +186 -0
  9. package/resources/toastify.css +87 -0
  10. package/resources/{fore-styles.css → vars.css} +0 -292
  11. package/src/DependencyNotifyingDomFacade.js +10 -16
  12. package/src/ForeElementMixin.js +26 -19
  13. package/src/actions/abstract-action.js +30 -9
  14. package/src/actions/fx-action.js +6 -4
  15. package/src/actions/fx-append.js +8 -17
  16. package/src/actions/fx-confirm.js +5 -3
  17. package/src/actions/fx-delete.js +6 -3
  18. package/src/actions/fx-dispatch.js +9 -8
  19. package/src/actions/fx-hide.js +10 -6
  20. package/src/actions/fx-insert.js +49 -39
  21. package/src/actions/fx-message.js +3 -1
  22. package/src/actions/fx-refresh.js +15 -1
  23. package/src/actions/fx-replace.js +73 -0
  24. package/src/actions/fx-return.js +42 -0
  25. package/src/actions/fx-send.js +3 -1
  26. package/src/actions/fx-setfocus.js +37 -0
  27. package/src/actions/fx-setvalue.js +58 -51
  28. package/src/actions/fx-show.js +12 -4
  29. package/src/actions/fx-toggle.js +15 -10
  30. package/src/actions/fx-update.js +3 -1
  31. package/src/dep_graph.js +4 -2
  32. package/src/drawdown.js +67 -82
  33. package/src/fore.js +158 -12
  34. package/src/functions/fx-function.js +17 -3
  35. package/src/fx-bind.js +42 -202
  36. package/src/fx-fore.js +599 -567
  37. package/src/fx-header.js +3 -1
  38. package/src/fx-instance.js +9 -1
  39. package/src/fx-model.js +59 -23
  40. package/src/fx-submission.js +106 -48
  41. package/src/fx-var.js +7 -4
  42. package/src/getInScopeContext.js +37 -11
  43. package/src/modelitem.js +4 -4
  44. package/src/relevance.js +64 -0
  45. package/src/ui/abstract-control.js +64 -37
  46. package/src/ui/fx-alert.js +7 -1
  47. package/src/ui/fx-case.js +4 -3
  48. package/src/ui/fx-container.js +7 -1
  49. package/src/ui/fx-control.js +309 -34
  50. package/src/ui/fx-dialog.js +54 -40
  51. package/src/ui/fx-group.js +3 -1
  52. package/src/ui/fx-hint.js +4 -1
  53. package/src/ui/fx-inspector.js +120 -17
  54. package/src/ui/fx-items.js +8 -8
  55. package/src/ui/fx-output.js +16 -5
  56. package/src/ui/fx-repeat.js +33 -41
  57. package/src/ui/fx-repeatitem.js +10 -4
  58. package/src/ui/fx-switch.js +5 -3
  59. package/src/ui/fx-trigger.js +3 -1
  60. package/src/xpath-evaluation.js +621 -576
  61. package/src/xpath-util.js +15 -8
  62. package/dist/fore-all.js +0 -140
  63. package/dist/fore-debug.js +0 -140
  64. package/src/.DS_Store +0 -0
  65. package/src/actions/.DS_Store +0 -0
  66. package/src/ui/.DS_Store +0 -0
package/README.md CHANGED
@@ -6,31 +6,25 @@
6
6
  ![GitHub top language](https://img.shields.io/github/languages/top/jinntec/fore)
7
7
 
8
8
 
9
-
10
-
11
- ![logo](resources/images/light-200.png)
9
+ <img src="resources/images/light7.png" width="400">
12
10
 
13
11
  >'situated in front of something else' - Merriam Webster
14
12
 
15
13
  [![Twitter URL](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Ftwitter.com%2FJinnForeTec)](https://twitter.com/JinnForeTec)
16
14
 
17
- ## [Demos Demos Demos Demos Demos](https://jinntec.github.io/Fore)
18
-
19
- Sorry for being loud - some people complaining not finding demos.
20
-
21
- > ATTENTION: Demos are out of sync with latest release. If you want latest and greatest checkout your local copy please. Demos will be updated
22
- > for final release.
15
+ [Homepage](https://jinntec.github.io/Fore/) |
16
+ [Documentation](https://jinntec.github.io/fore-docs/) |
23
17
 
24
- ## [Element Reference](https://jinntec.github.io/Fore/doc/reference.html)
25
18
 
26
- For latest and greatest please use a local installation. See 'Running demos and docs'
27
-
28
- # What it does
19
+ # Declarative user interfaces in plain HTML
29
20
 
30
21
  Fore lets you write data-driven front-end applications in a declarative way
31
- just using HTML5 and JavaScript (ES6).
22
+ just using HTML5 Web Components.
32
23
 
33
24
  ![todo](resources/images/todo-screen.png)
25
+
26
+ [Source code](https://github.com/Jinntec/Fore/blob/960e093fadfbc96eb8514721fb7b53462567f1ec/demo/todo2.html) for above example just uses 53 lines of HTML.
27
+
34
28
  The use cases range from simple to complex forms to full single page
35
29
  applications. It can be used standalone or in conjunction with other web
36
30
  components or frameworks.
@@ -39,6 +33,21 @@ By using the bare metal of the browser
39
33
  platform, Fore integrates well with any other library you might want to use in
40
34
  conjunction with it.
41
35
 
36
+ ## Features
37
+
38
+ * implemented as vanilla web components in ES6
39
+ * fully descriptive - just HTML5
40
+ * MVC architecture
41
+ * state engine with dependency tracking for optimized updating
42
+ * lifecycle with detailed state events
43
+ * descriptive actions for data mutations (setvalue, insert, delete)
44
+ * multiple XML (or JSON) data instances
45
+ * group, repeat, dialog + switch container components
46
+ * generic UI control to bind any kind of control
47
+ * bound template expressions
48
+ * powerful XPath/XQuery 3.1 support in the browser
49
+ * Submission module declaratively wrapping the fetch API
50
+
42
51
 
43
52
  ## An xformish framework in Web Components
44
53
 
@@ -48,8 +57,7 @@ Standard but applies those to the world of HTML5 Web Components.
48
57
  Going beyond just forms it nicely integrates with Web Components, allowing to configure,
49
58
  ochestrate and interact with them by binding their properties to data instances.
50
59
 
51
- Fore uses XML as it's main data model but allows to use JSON alternatively or at the same time. Accessing and mutating JSON data with declarative
52
- actions makes JSON processing even easier than in native JavaScript.
60
+ Fore uses XML as it's main data model but allows to use JSON alternatively or at the same time.
53
61
 
54
62
  Through the wonderful [fontoXPath library](https://github.com/FontoXML/fontoxpath) Fore is able to process XML in the client with XPath 3.1 and
55
63
  XQuery 3.1 support.
@@ -58,19 +66,6 @@ Being as close as possible to the web platform standards available in browsers n
58
66
  JS framework or component library.
59
67
 
60
68
 
61
- ## Features
62
-
63
- * MVC architecture
64
- * state engine with dependency tracking
65
- * fully descriptive
66
- * lifecycle with detailed state events
67
- * multiple XML (or JSON) data instances
68
- * group, repeat + switch container components
69
- * generic UI control to bind any kind of component
70
- * bound template expressions
71
- * powerful XPath/XQuery 3.1 support in the browser
72
- * Submission module declaratively wrapping the fetch API
73
-
74
69
  ## Framework-agnostic
75
70
 
76
71
  Fore focuses on providing a stable processing engine for model-driven
@@ -106,13 +101,6 @@ customize the wiring of the widget you use.
106
101
 
107
102
  More examples are found in the demos (see running)
108
103
 
109
- ## Documentation
110
-
111
- Currently the demos are the documentation (see 'demo' folder). All files listed on the demo.html page are expected to work
112
- and serve the purpose of documentation. The intend is to have at least one demo
113
- for each feature and show how to use it with an example.
114
-
115
- Some of them also offer some explanations and should give you an idea of building your own.
116
104
 
117
105
  ## Development and Contributions
118
106
 
@@ -148,7 +136,7 @@ Include the following snippet at end of body:
148
136
 
149
137
  Run
150
138
 
151
- ```npm install @jintec/fore```
139
+ ```npm install @jinntec/fore```
152
140
 
153
141
  in your project to install it.
154
142
 
@@ -156,7 +144,7 @@ Import it in your HTML page like so:
156
144
 
157
145
  ```
158
146
  <script type="module">
159
- import 'node_modules/@jinntec/fore/dist/fore-all.js';
147
+ import 'node_modules/@jinntec/fore/dist/fore.js';
160
148
  </script>
161
149
  ```
162
150