@jinntec/fore 0.25.0 → 1.0.0-2
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.
- package/README.md +75 -22
- package/dist/fore-all.js +11 -11
- package/dist/fore.js +1 -1
- package/index.js +5 -1
- package/package.json +17 -6
- package/resources/fore.css +121 -4
- package/resources/toastify.css +3 -1
- package/src/DependencyNotifyingDomFacade.js +9 -1
- package/src/ForeElementMixin.js +83 -12
- package/src/actions/abstract-action.js +101 -27
- package/src/actions/fx-action.js +4 -2
- package/src/actions/fx-append.js +21 -18
- package/src/actions/fx-confirm.js +22 -0
- package/src/actions/fx-dispatch.js +10 -2
- package/src/actions/fx-insert.js +35 -30
- package/src/actions/fx-message.js +7 -1
- package/src/actions/fx-send.js +1 -1
- package/src/actions/fx-setvalue.js +2 -9
- package/src/dep_graph.js +9 -0
- package/src/drawdown.js +172 -0
- package/src/fore.js +126 -18
- package/src/functions/fx-function.js +2 -2
- package/src/fx-bind.js +11 -7
- package/src/fx-fore.js +283 -67
- package/src/fx-header.js +20 -0
- package/src/fx-instance.js +54 -10
- package/src/fx-model.js +175 -38
- package/src/fx-submission.js +235 -53
- package/src/getInScopeContext.js +2 -3
- package/src/ui/abstract-control.js +23 -44
- package/src/ui/fx-alert.js +20 -19
- package/src/ui/fx-container.js +9 -4
- package/src/ui/fx-control.js +92 -37
- package/src/ui/fx-inspector.js +44 -0
- package/src/ui/fx-items.js +104 -20
- package/src/ui/fx-output.js +92 -3
- package/src/ui/fx-repeat.js +87 -80
- package/src/ui/fx-repeatitem.js +38 -48
- package/src/ui/fx-trigger.js +49 -27
- package/src/xpath-evaluation.js +533 -235
- package/src/xpath-util.js +50 -12
package/README.md
CHANGED
|
@@ -1,28 +1,54 @@
|
|
|
1
|
+

|
|
2
|
+

|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+

|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
1
10
|
|
|
2
11
|

|
|
3
12
|
|
|
4
13
|
>'situated in front of something else' - Merriam Webster
|
|
5
14
|
|
|
15
|
+
[](https://twitter.com/JinnForeTec)
|
|
16
|
+
|
|
6
17
|
## [Demos](https://jinntec.github.io/Fore)
|
|
7
18
|
|
|
8
|
-
|
|
19
|
+
# What it does
|
|
9
20
|
|
|
10
|
-
|
|
11
|
-
|
|
21
|
+
Fore lets you write data-driven front-end applications in a declarative way
|
|
22
|
+
just using HTML5 and JavaScript (ES6).
|
|
12
23
|
|
|
13
|
-
|
|
24
|
+

|
|
25
|
+
The use cases range from simple to complex forms to full single page
|
|
26
|
+
applications. It can be used standalone or in conjunction with other web
|
|
27
|
+
components or frameworks.
|
|
14
28
|
|
|
15
|
-
|
|
16
|
-
|
|
29
|
+
By using the bare metal of the browser
|
|
30
|
+
platform, Fore integrates well with any other library you might want to use in
|
|
31
|
+
conjunction with it.
|
|
17
32
|
|
|
18
|
-
|
|
33
|
+
|
|
34
|
+
## An xformish framework in Web Components
|
|
35
|
+
|
|
36
|
+
Fore is a model-driven language that follows the ideas of the XForms 2.0
|
|
37
|
+
Standard but applies those to the world of HTML5 Web Components.
|
|
38
|
+
|
|
39
|
+
Going beyond just forms it nicely integrates with Web Components, allowing to configure,
|
|
40
|
+
ochestrate and interact with them by binding their properties to data instances.
|
|
41
|
+
|
|
42
|
+
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
|
|
43
|
+
actions makes JSON processing even easier than in native JavaScript.
|
|
19
44
|
|
|
20
45
|
Through the wonderful [fontoXPath library](https://github.com/FontoXML/fontoxpath) Fore is able to process XML in the client with XPath 3.1 and
|
|
21
46
|
XQuery 3.1 support.
|
|
22
47
|
|
|
23
|
-
Being as close as possible to the web platform standards available in browsers natively Fore combines well with any other
|
|
48
|
+
Being as close as possible to the web platform standards available in browsers natively, Fore combines well with any other
|
|
24
49
|
JS framework or component library.
|
|
25
50
|
|
|
51
|
+
|
|
26
52
|
## Features
|
|
27
53
|
|
|
28
54
|
* MVC architecture
|
|
@@ -34,11 +60,12 @@ JS framework or component library.
|
|
|
34
60
|
* generic UI control to bind any kind of component
|
|
35
61
|
* bound template expressions
|
|
36
62
|
* powerful XPath/XQuery 3.1 support in the browser
|
|
63
|
+
* Submission module declaratively wrapping the fetch API
|
|
37
64
|
|
|
38
65
|
## Framework-agnostic
|
|
39
66
|
|
|
40
67
|
Fore focuses on providing a stable processing engine for model-driven
|
|
41
|
-
|
|
68
|
+
apps. Major premise for a longer-term solution is to stick closely to the features
|
|
42
69
|
of the browser platform and avoid specific frameworks for the implementation.
|
|
43
70
|
|
|
44
71
|
That said it's obvious that Fore does not provide a set of controls
|
|
@@ -46,7 +73,7 @@ by itself but allows you to use whatever uber-fancy components you have
|
|
|
46
73
|
found elsewhere. May it be some material-design date-picker or
|
|
47
74
|
that nice jquery(sic!) timeline nobody has done better yet.
|
|
48
75
|
|
|
49
|
-
That comes to the price of slightly more markup up-front
|
|
76
|
+
That comes to the price of slightly more markup up-front
|
|
50
77
|
but allows big flexibility and makes it compatible with any framework
|
|
51
78
|
that plays by the rules of the platform.
|
|
52
79
|
|
|
@@ -72,27 +99,42 @@ More examples are found in the demos (see running)
|
|
|
72
99
|
|
|
73
100
|
## Documentation
|
|
74
101
|
|
|
75
|
-
Currently the demos are the documentation (see 'demo' folder). All files listed on the demo.html page are expected to work
|
|
102
|
+
Currently the demos are the documentation (see 'demo' folder). All files listed on the demo.html page are expected to work
|
|
103
|
+
and serve the purpose of documentation. The intend is to have at least one demo
|
|
104
|
+
for each feature and show how to use it with an example.
|
|
76
105
|
|
|
77
106
|
Some of them also offer some explanations and should give you an idea of building your own.
|
|
78
107
|
|
|
79
|
-
##
|
|
108
|
+
## Development and Contributions
|
|
80
109
|
|
|
81
|
-
|
|
110
|
+
Default branch of development is 'dev'.
|
|
111
|
+
Feature additions or bugfixes will always there.
|
|
82
112
|
|
|
83
|
-
|
|
113
|
+
The master branch is only used for releases.
|
|
84
114
|
|
|
85
|
-
|
|
115
|
+
Contributions are always welcome.
|
|
86
116
|
|
|
87
|
-
|
|
88
|
-
feature additions or bugfixes will always go into 'dev'.
|
|
117
|
+
### what to contribute
|
|
89
118
|
|
|
90
|
-
|
|
119
|
+
It's not all about code.
|
|
91
120
|
|
|
92
|
-
|
|
121
|
+
Any feedback is welcome and appreciated. Please use the ['discussions'](https://github.com/Jinntec/Fore/discussions) or
|
|
122
|
+
['issues'](https://github.com/Jinntec/Fore/issues) as appropriate to suggest features or ask your questions.
|
|
93
123
|
|
|
94
|
-
|
|
124
|
+
New demo files are highly welcome as always something new can be learned.
|
|
125
|
+
There is a directory called 'template' that contains some blueprints that can be copied to quickly get going.
|
|
95
126
|
|
|
127
|
+
When working on demos it is recommended to copy your file to the 'demo' folder
|
|
128
|
+
and make it work there. If you have additional files you can create
|
|
129
|
+
a subdirectory for the new demo.
|
|
130
|
+
|
|
131
|
+
## Running from CDN
|
|
132
|
+
|
|
133
|
+
Include the following snippet at end of body:
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@jinntec/fore@latest/dist/fore-all.js"></script>
|
|
137
|
+
```
|
|
96
138
|
## Installation
|
|
97
139
|
|
|
98
140
|
Run
|
|
@@ -118,7 +160,6 @@ If you intend to hack it yourself ...
|
|
|
118
160
|
* clone this repo to your machine
|
|
119
161
|
* run `npm i` to install dependencies
|
|
120
162
|
|
|
121
|
-
|
|
122
163
|
## Running demos and docs
|
|
123
164
|
|
|
124
165
|
1. checkout this repo or download the sources
|
|
@@ -152,6 +193,18 @@ The package is still huge but is expected to shrink massively.
|
|
|
152
193
|
Include the repective bundle in your webpage with a module import:
|
|
153
194
|
```
|
|
154
195
|
<script type="module">
|
|
155
|
-
import 'fore-all.js';
|
|
196
|
+
import 'dist/fore-all.js';
|
|
156
197
|
</script>
|
|
157
198
|
```
|
|
199
|
+
|
|
200
|
+
## Giant shoulders
|
|
201
|
+
|
|
202
|
+
The giants that made Fore possible:
|
|
203
|
+
|
|
204
|
+
* past and current [XForms editors](https://www.w3.org/community/xformsusers/wiki/XForms_2.0) - not all brilliant ideas get traction and fame. Nevertheless a brilliantly worked out state engine.
|
|
205
|
+
* [fontoXPath](https://github.com/FontoXML/fontoxpath) - without this wonderful XPath 3.1 implementation in the browser Fore has never been possible - period.
|
|
206
|
+
* [depGraph](https://github.com/jriecken/dependency-graph) - finding this gem saved a big bunch of work.
|
|
207
|
+
|
|
208
|
+
Thanks to all giants!
|
|
209
|
+
|
|
210
|
+
|