@jinntec/fore 1.0.0-3 → 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 (62) hide show
  1. package/README.md +25 -34
  2. package/dist/fore-dev.js +43 -0
  3. package/dist/fore-dev.js.map +1 -0
  4. package/dist/fore.js +36 -1
  5. package/dist/fore.js.map +1 -0
  6. package/index.js +3 -0
  7. package/package.json +34 -38
  8. package/resources/fore.css +35 -50
  9. package/src/DependencyNotifyingDomFacade.js +10 -16
  10. package/src/ForeElementMixin.js +25 -18
  11. package/src/actions/abstract-action.js +17 -9
  12. package/src/actions/fx-action.js +6 -4
  13. package/src/actions/fx-append.js +8 -17
  14. package/src/actions/fx-confirm.js +3 -1
  15. package/src/actions/fx-delete.js +6 -3
  16. package/src/actions/fx-dispatch.js +9 -8
  17. package/src/actions/fx-hide.js +10 -6
  18. package/src/actions/fx-insert.js +49 -39
  19. package/src/actions/fx-message.js +3 -1
  20. package/src/actions/fx-refresh.js +11 -1
  21. package/src/actions/fx-replace.js +68 -0
  22. package/src/actions/fx-return.js +42 -0
  23. package/src/actions/fx-send.js +3 -1
  24. package/src/actions/fx-setvalue.js +58 -51
  25. package/src/actions/fx-show.js +8 -4
  26. package/src/actions/fx-toggle.js +15 -10
  27. package/src/actions/fx-update.js +3 -1
  28. package/src/dep_graph.js +4 -2
  29. package/src/drawdown.js +67 -82
  30. package/src/fore.js +158 -11
  31. package/src/functions/fx-function.js +11 -3
  32. package/src/fx-bind.js +42 -202
  33. package/src/fx-fore.js +105 -70
  34. package/src/fx-header.js +3 -1
  35. package/src/fx-instance.js +9 -1
  36. package/src/fx-model.js +31 -23
  37. package/src/fx-submission.js +73 -47
  38. package/src/fx-var.js +7 -4
  39. package/src/getInScopeContext.js +37 -11
  40. package/src/modelitem.js +4 -4
  41. package/src/relevance.js +65 -0
  42. package/src/ui/abstract-control.js +55 -35
  43. package/src/ui/fx-alert.js +7 -1
  44. package/src/ui/fx-case.js +3 -1
  45. package/src/ui/fx-container.js +7 -1
  46. package/src/ui/fx-control.js +283 -33
  47. package/src/ui/fx-dialog.js +54 -40
  48. package/src/ui/fx-group.js +3 -1
  49. package/src/ui/fx-hint.js +4 -1
  50. package/src/ui/fx-inspector.js +117 -17
  51. package/src/ui/fx-items.js +8 -8
  52. package/src/ui/fx-output.js +14 -5
  53. package/src/ui/fx-repeat.js +33 -41
  54. package/src/ui/fx-repeatitem.js +10 -4
  55. package/src/ui/fx-switch.js +3 -1
  56. package/src/ui/fx-trigger.js +3 -1
  57. package/src/xpath-evaluation.js +121 -131
  58. package/src/xpath-util.js +14 -7
  59. package/dist/fore-all.js +0 -140
  60. package/src/.DS_Store +0 -0
  61. package/src/actions/.DS_Store +0 -0
  62. package/src/ui/.DS_Store +0 -0
package/README.md CHANGED
@@ -6,28 +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
- ## [Element Reference](https://jinntec.github.io/Fore/doc/reference.html)
15
+ [Homepage](https://jinntec.github.io/Fore/) |
16
+ [Documentation](https://jinntec.github.io/fore-docs/) |
22
17
 
23
- For latest and greatest please use a local installation. See 'Running demos and docs'
24
18
 
25
- # What it does
19
+ # Declarative user interfaces in plain HTML
26
20
 
27
21
  Fore lets you write data-driven front-end applications in a declarative way
28
- just using HTML5 and JavaScript (ES6).
22
+ just using HTML5 Web Components.
29
23
 
30
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
+
31
28
  The use cases range from simple to complex forms to full single page
32
29
  applications. It can be used standalone or in conjunction with other web
33
30
  components or frameworks.
@@ -36,6 +33,21 @@ By using the bare metal of the browser
36
33
  platform, Fore integrates well with any other library you might want to use in
37
34
  conjunction with it.
38
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
+
39
51
 
40
52
  ## An xformish framework in Web Components
41
53
 
@@ -45,8 +57,7 @@ Standard but applies those to the world of HTML5 Web Components.
45
57
  Going beyond just forms it nicely integrates with Web Components, allowing to configure,
46
58
  ochestrate and interact with them by binding their properties to data instances.
47
59
 
48
- 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
49
- 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.
50
61
 
51
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
52
63
  XQuery 3.1 support.
@@ -55,19 +66,6 @@ Being as close as possible to the web platform standards available in browsers n
55
66
  JS framework or component library.
56
67
 
57
68
 
58
- ## Features
59
-
60
- * MVC architecture
61
- * state engine with dependency tracking
62
- * fully descriptive
63
- * lifecycle with detailed state events
64
- * multiple XML (or JSON) data instances
65
- * group, repeat + switch container components
66
- * generic UI control to bind any kind of component
67
- * bound template expressions
68
- * powerful XPath/XQuery 3.1 support in the browser
69
- * Submission module declaratively wrapping the fetch API
70
-
71
69
  ## Framework-agnostic
72
70
 
73
71
  Fore focuses on providing a stable processing engine for model-driven
@@ -103,13 +101,6 @@ customize the wiring of the widget you use.
103
101
 
104
102
  More examples are found in the demos (see running)
105
103
 
106
- ## Documentation
107
-
108
- Currently the demos are the documentation (see 'demo' folder). All files listed on the demo.html page are expected to work
109
- and serve the purpose of documentation. The intend is to have at least one demo
110
- for each feature and show how to use it with an example.
111
-
112
- Some of them also offer some explanations and should give you an idea of building your own.
113
104
 
114
105
  ## Development and Contributions
115
106
 
@@ -145,7 +136,7 @@ Include the following snippet at end of body:
145
136
 
146
137
  Run
147
138
 
148
- ```npm install @jintec/fore```
139
+ ```npm install @jinntec/fore```
149
140
 
150
141
  in your project to install it.
151
142