@twobirds/microcomponents 0.0.82 → 0.0.84
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/assets/documentation/MC.md +0 -1
- package/assets/test/test.html +1 -1
- package/dist/MC.d.ts +11 -10
- package/dist/MC.d.ts.map +1 -1
- package/dist/MC.js +137 -200
- package/dist/MC.min.js +157 -296
- package/dist/MC.ts +202 -337
- package/dist/elements.d.ts +1 -1
- package/dist/elements.d.ts.map +1 -1
- package/dist/elements.js +26 -6
- package/dist/elements.min.js +1 -1
- package/dist/elements.ts +50 -7
- package/dist/formValues.js +2 -2
- package/dist/formValues.min.js +1 -1
- package/dist/formValues.ts +3 -3
- package/dist/microcomponents.d.ts +0 -1
- package/dist/microcomponents.d.ts.map +1 -1
- package/dist/microcomponents.js +0 -1
- package/dist/microcomponents.min.js +1 -1
- package/dist/microcomponents.ts +1 -1
- package/dist/observables.d.ts.map +1 -1
- package/dist/observables.js +52 -57
- package/dist/observables.min.js +1 -1
- package/dist/observables.ts +68 -73
- package/package.json +6 -5
- package/public/MC.d.ts +11 -10
- package/public/MC.d.ts.map +1 -1
- package/public/MC.js +137 -200
- package/public/MC.js.map +1 -1
- package/public/MC.min.js +157 -296
- package/public/MC.ts +202 -337
- package/public/documentation/MC.md +0 -1
- package/public/elements.d.ts +1 -1
- package/public/elements.d.ts.map +1 -1
- package/public/elements.js +26 -6
- package/public/elements.js.map +1 -1
- package/public/elements.min.js +1 -1
- package/public/elements.ts +50 -7
- package/public/formValues.js +2 -2
- package/public/formValues.js.map +1 -1
- package/public/formValues.min.js +1 -1
- package/public/formValues.ts +3 -3
- package/public/microcomponents.d.ts +0 -1
- package/public/microcomponents.d.ts.map +1 -1
- package/public/microcomponents.js +0 -1
- package/public/microcomponents.js.map +1 -1
- package/public/microcomponents.min.js +1 -1
- package/public/microcomponents.ts +1 -1
- package/public/observables.d.ts.map +1 -1
- package/public/observables.js +52 -57
- package/public/observables.js.map +1 -1
- package/public/observables.min.js +1 -1
- package/public/observables.ts +68 -73
- package/public/{test/selectors.ts → selectors._ts} +2 -367
- package/public/src/MC.d.ts +37 -0
- package/public/src/MC.d.ts.map +1 -0
- package/public/src/MC.js +316 -0
- package/public/src/MC.js.map +1 -0
- package/public/src/MC.ts +202 -337
- package/public/src/elements.d.ts +5 -0
- package/public/src/elements.d.ts.map +1 -0
- package/public/src/elements.js +68 -0
- package/public/src/elements.js.map +1 -0
- package/public/src/elements.ts +50 -7
- package/public/src/formValues.d.ts +3 -0
- package/public/src/formValues.d.ts.map +1 -0
- package/public/src/formValues.js +162 -0
- package/public/src/formValues.js.map +1 -0
- package/public/src/formValues.ts +3 -3
- package/public/src/helpers.d.ts +14 -0
- package/public/src/helpers.d.ts.map +1 -0
- package/public/src/helpers.js +113 -0
- package/public/src/microcomponents.d.ts +6 -0
- package/public/src/microcomponents.d.ts.map +1 -0
- package/public/src/microcomponents.js +7 -0
- package/public/src/microcomponents.js.map +1 -0
- package/public/src/microcomponents.ts +1 -1
- package/public/src/observables.d.ts +11 -0
- package/public/src/observables.d.ts.map +1 -0
- package/public/src/observables.js +244 -0
- package/public/src/observables.js.map +1 -0
- package/public/src/observables.ts +68 -73
- package/public/{selectors.ts → src/selectors._ts} +2 -367
- package/public/src/test/grandparent.css +11 -0
- package/public/src/test/test/child.d.ts +2 -0
- package/public/src/test/test/child.d.ts.map +1 -0
- package/public/src/test/test/child.js +15 -0
- package/public/src/test/test/child.js.map +1 -0
- package/public/src/test/test/child.ts +21 -0
- package/public/src/test/test/grandchild.d.ts +2 -0
- package/public/src/test/test/grandchild.d.ts.map +1 -0
- package/public/src/test/test/grandchild.js +15 -0
- package/public/src/test/test/grandchild.js.map +1 -0
- package/public/src/test/test/grandchild.ts +21 -0
- package/public/src/test/test/grandparent.d.ts +2 -0
- package/public/src/test/test/grandparent.d.ts.map +1 -0
- package/public/src/test/test/grandparent.js +1 -0
- package/public/src/test/test/grandparent.js.map +1 -0
- package/public/src/test/test/grandparent.ts +29 -0
- package/public/src/test/test/greatgrandchild.d.ts +2 -0
- package/public/src/test/test/greatgrandchild.d.ts.map +1 -0
- package/public/src/test/test/greatgrandchild.js +29 -0
- package/public/src/test/test/greatgrandchild.js.map +1 -0
- package/public/src/test/test/greatgrandchild.ts +42 -0
- package/public/src/test/test/parent.d.ts +2 -0
- package/public/src/test/test/parent.d.ts.map +1 -0
- package/public/src/test/test/parent.js +15 -0
- package/public/src/test/test/parent.js.map +1 -0
- package/public/src/test/test/parent.ts +21 -0
- package/public/src/test/test/testform.d.ts +2 -0
- package/public/src/test/test/testform.d.ts.map +1 -0
- package/public/src/test/test/testform.js +1 -0
- package/public/src/test/test/testform.js.map +1 -0
- package/public/src/test/test/testform.ts +153 -0
- package/public/src/test/test/testfunction.d.ts +3 -0
- package/public/src/test/test/testfunction.d.ts.map +1 -0
- package/public/src/test/test/testfunction.js +7 -0
- package/public/src/test/test/testfunction.js.map +1 -0
- package/public/src/test/test/testfunction.ts +12 -0
- package/public/src/test/test/testmc.d.ts +3 -0
- package/public/src/test/test/testmc.d.ts.map +1 -0
- package/public/src/test/test/testmc.js +10 -0
- package/public/src/test/test/testmc.js.map +1 -0
- package/public/src/test/test/testmc.ts +16 -0
- package/public/src/test/test/testsimpleclass.d.ts +3 -0
- package/public/src/test/test/testsimpleclass.d.ts.map +1 -0
- package/public/src/test/test/testsimpleclass.js +9 -0
- package/public/src/test/test/testsimpleclass.js.map +1 -0
- package/public/src/test/test/testsimpleclass.ts +15 -0
- package/public/src/test/test.d.ts +2 -0
- package/public/src/test/test.d.ts.map +1 -0
- package/public/src/test/test.js +80 -0
- package/public/src/test/test.js.map +1 -0
- package/public/src/test/test.ts +188 -0
- package/public/src/test/testform.css +47 -0
- package/public/src/test/testform.html +56 -0
- package/public/src/test/testform.json +27 -0
- package/public/test/MC.d.ts +11 -10
- package/public/test/MC.d.ts.map +1 -1
- package/public/test/MC.js +137 -200
- package/public/test/MC.min.js +377 -0
- package/public/test/MC.ts +202 -337
- package/public/test/elements.d.ts +1 -1
- package/public/test/elements.d.ts.map +1 -1
- package/public/test/elements.js +26 -6
- package/public/test/elements.min.js +1 -0
- package/public/test/elements.ts +50 -7
- package/public/test/formValues.js +2 -2
- package/public/test/formValues.min.js +1 -0
- package/public/test/formValues.ts +3 -3
- package/public/test/grandparent.css +1 -3
- package/public/test/microcomponents.d.ts +0 -1
- package/public/test/microcomponents.d.ts.map +1 -1
- package/public/test/microcomponents.js +0 -1
- package/public/test/microcomponents.min.js +1 -1
- package/public/test/microcomponents.ts +1 -1
- package/public/test/observables.d.ts.map +1 -1
- package/public/test/observables.js +52 -57
- package/public/test/observables.min.js +1 -0
- package/public/test/observables.ts +68 -73
- package/public/test/test/child.ts +21 -0
- package/public/test/test/grandchild.ts +21 -0
- package/public/test/test/grandparent.d.ts.map +1 -1
- package/public/test/test/grandparent.js +1 -1
- package/public/test/test/grandparent.js.map +1 -1
- package/public/test/test/grandparent.ts +29 -0
- package/public/test/test/greatgrandchild.ts +42 -0
- package/public/test/test/parent.ts +21 -0
- package/public/test/test/testform.js +1 -1
- package/public/test/test/testform.js.map +1 -1
- package/public/test/test/testform.ts +153 -0
- package/public/test/test/testfunction.d.ts +3 -0
- package/public/test/test/testfunction.d.ts.map +1 -0
- package/public/test/test/testfunction.js +7 -0
- package/public/test/test/testfunction.js.map +1 -0
- package/public/test/test/testfunction.ts +12 -0
- package/public/test/test/testmc.d.ts +2 -5
- package/public/test/test/testmc.d.ts.map +1 -1
- package/public/test/test/testmc.js +4 -4
- package/public/test/test/testmc.js.map +1 -1
- package/public/test/test/testmc.ts +16 -0
- package/public/test/test/testsimpleclass.d.ts +3 -0
- package/public/test/test/testsimpleclass.d.ts.map +1 -0
- package/public/test/test/testsimpleclass.js +9 -0
- package/public/test/test/testsimpleclass.js.map +1 -0
- package/public/test/test/testsimpleclass.ts +15 -0
- package/public/test/test.html +1 -1
- package/public/test/test.js +5 -6
- package/public/test/test.js.map +1 -1
- package/public/test/test.ts +188 -0
- package/public/test/testform.css +47 -0
- package/public/test/testform.html +56 -0
- package/public/test/testform.json +3 -3
- package/public/typedoc/assets/navigation.js +1 -1
- package/public/typedoc/assets/search.js +1 -1
- package/public/typedoc/classes/MC.DC.html +6 -4
- package/public/typedoc/classes/MC.MC.html +3 -4
- package/public/typedoc/classes/MC.McBase.html +2 -2
- package/public/typedoc/functions/MC.autoload.html +1 -1
- package/public/typedoc/functions/MC.off.html +1 -0
- package/public/typedoc/functions/MC.on.html +1 -0
- package/public/typedoc/functions/MC.one.html +1 -0
- package/public/typedoc/functions/elements.defineCE.html +1 -1
- package/public/typedoc/functions/elements.getCE.html +1 -1
- package/public/typedoc/functions/formValues.formValues.html +1 -1
- package/public/typedoc/functions/observables.observe.html +1 -1
- package/public/typedoc/interfaces/MC.HTMLMcElement.html +2 -2
- package/public/typedoc/modules/MC.html +7 -6
- package/public/typedoc/modules/elements.html +1 -1
- package/public/typedoc/modules/formValues.html +1 -1
- package/public/typedoc/modules/observables.html +1 -1
- package/public/typedoc/types/observables.Observable.html +1 -1
- package/src/MC.ts +202 -337
- package/src/elements.ts +50 -7
- package/src/formValues.ts +3 -3
- package/src/microcomponents.ts +1 -1
- package/src/observables.ts +68 -73
- package/{dist/selectors.ts → src/selectors._ts} +2 -367
- package/src/test/test/grandparent.ts +12 -4
- package/src/test/test/testform.ts +13 -11
- package/src/test/test/testfunction.ts +12 -0
- package/src/test/test/testmc.ts +13 -9
- package/src/test/test/testsimpleclass.ts +15 -0
- package/src/test/test.ts +8 -20
- package/tasks.md +36 -0
- package/tsconfig.json +2 -2
- package/typedoc.json +1 -1
- package/webpack.config.js +2 -2
- package/dist/McEvent.d.ts +0 -15
- package/dist/McEvent.d.ts.map +0 -1
- package/dist/McEvent.js +0 -71
- package/dist/selectors.d.ts +0 -108
- package/dist/selectors.d.ts.map +0 -1
- package/dist/selectors.js +0 -971
- package/dist/selectors.min.js +0 -1
- package/public/McEvent.d.ts +0 -15
- package/public/McEvent.d.ts.map +0 -1
- package/public/McEvent.js +0 -71
- package/public/McEvent.js.map +0 -1
- package/public/selectors.d.ts +0 -108
- package/public/selectors.d.ts.map +0 -1
- package/public/selectors.js +0 -971
- package/public/selectors.js.map +0 -1
- package/public/selectors.min.js +0 -1
- package/public/src/selectors.ts +0 -1634
- package/public/test/MC.js.map +0 -1
- package/public/test/McEvent.d.ts +0 -15
- package/public/test/McEvent.d.ts.map +0 -1
- package/public/test/McEvent.js +0 -71
- package/public/test/McEvent.js.map +0 -1
- package/public/test/McEvent.ts +0 -96
- package/public/test/elements.js.map +0 -1
- package/public/test/formValues.js.map +0 -1
- package/public/test/microcomponents.js.map +0 -1
- package/public/test/observables.js.map +0 -1
- package/public/test/selectors.d.ts +0 -108
- package/public/test/selectors.d.ts.map +0 -1
- package/public/test/selectors.js +0 -971
- package/public/test/selectors.js.map +0 -1
- package/public/typedoc/classes/MC.McEvent.html +0 -9
- package/public/typedoc/functions/MC.addListener.html +0 -1
- package/public/typedoc/functions/MC.removeListener.html +0 -1
- package/src/McEvent.ts +0 -96
- package/src/selectors.ts +0 -1634
- /package/{dist/McEvent.ts → public/McEvent._ts} +0 -0
- /package/public/{McEvent.ts → src/McEvent._ts} +0 -0
- /package/public/{test → src}/helpers.js.map +0 -0
- /package/{public/src/McEvent.ts → src/McEvent._ts} +0 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
import {
|
|
3
|
+
DC,
|
|
4
|
+
defineCE,
|
|
5
|
+
Observable,
|
|
6
|
+
formValues,
|
|
7
|
+
LooseObject
|
|
8
|
+
} from '../../microcomponents.js';
|
|
9
|
+
|
|
10
|
+
defineCE(
|
|
11
|
+
'test-testform',
|
|
12
|
+
|
|
13
|
+
class TestForm extends DC {
|
|
14
|
+
data: unknown;
|
|
15
|
+
|
|
16
|
+
constructor(target: HTMLElement) {
|
|
17
|
+
super(target);
|
|
18
|
+
|
|
19
|
+
let shadow = (this as DC).target.attachShadow({ mode: 'open' });
|
|
20
|
+
shadow.innerHTML = `<style>${this.css}</style>${this.template}`;
|
|
21
|
+
|
|
22
|
+
formValues(this, 'data', shadow); // create this.data formdata observable
|
|
23
|
+
|
|
24
|
+
(this.data as Observable).bind(shadow); // 1 way bind formdata to the form DOM
|
|
25
|
+
|
|
26
|
+
// load and display data
|
|
27
|
+
fetch('./testform.json')
|
|
28
|
+
.then( res => res.json())
|
|
29
|
+
.then( data => {
|
|
30
|
+
this.data = data;
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
get template() {
|
|
36
|
+
return /*html*/ `
|
|
37
|
+
<form>
|
|
38
|
+
<!-- sample form to start with -->
|
|
39
|
+
<fieldset>
|
|
40
|
+
<legend>Inputs</legend>
|
|
41
|
+
<label>text</label><input type="text" name="textInput" value="Hallo" /> <strong>2wB: </strong>{textInput}<br />
|
|
42
|
+
<label>color</label><input type="color" name="colorInput" value="#000000" /><br />
|
|
43
|
+
<label>date</label><input type="date" name="dateInput" value="" /><br />
|
|
44
|
+
<label>datetime-local</label><input type="datetime-local" name="dtlInput" value="" /><br />
|
|
45
|
+
<label>email</label><input type="email" name="email" value="" /><br />
|
|
46
|
+
<label>file</label><input type="file" name="fileInput" value="" /><br />
|
|
47
|
+
<label>hidden</label><input type="hidden" name="hiddenInput" value="hiddenVal" /><br />
|
|
48
|
+
<label>month</label><input type="month" name="month" value="" /><br />
|
|
49
|
+
<label>number</label><input type="number" name="number" value="" /><br />
|
|
50
|
+
<label>password</label><input type="password" name="passInput" value="" /><br />
|
|
51
|
+
<label>range</label><input type="range" name="rangeInput" value="" /><br />
|
|
52
|
+
<label>search</label><input type="search" name="searchInput" value="" /><br />
|
|
53
|
+
<label>tel</label><input type="tel" name="telInput" value="" /><br />
|
|
54
|
+
<label>time</label><input type="time" name="timeInput" value="" /><br />
|
|
55
|
+
<label>url</label><input type="url" name="urlInput" value="" /><br />
|
|
56
|
+
<label>week</label><input type="week" name="weekInput" value="" /><br />
|
|
57
|
+
</fieldset>
|
|
58
|
+
|
|
59
|
+
<fieldset>
|
|
60
|
+
<legend>Selects <strong>2wB: </strong> <span>"{singleSelect}"</span> <span>[{multiSelect}]</span></legend>
|
|
61
|
+
|
|
62
|
+
<label>singleSelect</label>
|
|
63
|
+
<select name="singleSelect">
|
|
64
|
+
<option disabled selected value> -- select -- </option>
|
|
65
|
+
<option value="1">Option 1</option>
|
|
66
|
+
<option value="2">Option 2</option>
|
|
67
|
+
<option value="3">Option 3</option>
|
|
68
|
+
<option value="4">Option 4</option>
|
|
69
|
+
</select><br />
|
|
70
|
+
|
|
71
|
+
<label>multiSelect</label>
|
|
72
|
+
<select name="multiSelect" multiple="multiple" type="select-multiple">
|
|
73
|
+
<option value="1">Option 1</option>
|
|
74
|
+
<option value="2" selected=true>Option 2</option>
|
|
75
|
+
<option value="3">Option 3</option>
|
|
76
|
+
<option value="4" selected=true>Option 4</option>
|
|
77
|
+
</select>
|
|
78
|
+
|
|
79
|
+
</fieldset>
|
|
80
|
+
|
|
81
|
+
<fieldset>
|
|
82
|
+
<legend>Radiobuttons <strong>2wB: </strong><span>"{myRadio}"</span></legend>
|
|
83
|
+
|
|
84
|
+
<label>radio1</label><input type="radio" name="myRadio" value="radio1"><br />
|
|
85
|
+
<label>radio2</label><input type="radio" name="myRadio" value="radio2"><br />
|
|
86
|
+
<label>radio3</label><input type="radio" name="myRadio" value="radio3"><br />
|
|
87
|
+
|
|
88
|
+
</fieldset>
|
|
89
|
+
|
|
90
|
+
<fieldset>
|
|
91
|
+
<legend>Checkboxes</legend>
|
|
92
|
+
<label>cb1</label><input type="checkbox" name="cb1"><br />
|
|
93
|
+
<label>cb2</label><input type="checkbox" name="cb2"><br />
|
|
94
|
+
<label>cb3</label><input type="checkbox" name="cb3"><br />
|
|
95
|
+
<label>cb4</label><input type="checkbox" name="cb4"><br />
|
|
96
|
+
<label>cb5</label><input type="checkbox" name="cb5"><br />
|
|
97
|
+
|
|
98
|
+
</fieldset>
|
|
99
|
+
|
|
100
|
+
<fieldset>
|
|
101
|
+
<legend>TextArea</legend>
|
|
102
|
+
<label>textArea</label>
|
|
103
|
+
<textarea name="textArea">abc</textarea>
|
|
104
|
+
</fieldset>
|
|
105
|
+
|
|
106
|
+
</form>
|
|
107
|
+
`;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
get css() {
|
|
111
|
+
return /*css*/ `
|
|
112
|
+
legend {
|
|
113
|
+
display: inherit;
|
|
114
|
+
margin: inherit;
|
|
115
|
+
vertical-align: inherit;
|
|
116
|
+
font-weight: bold;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
label {
|
|
120
|
+
display: inline-block;
|
|
121
|
+
margin-top: 1em;
|
|
122
|
+
margin-left: 5px;
|
|
123
|
+
vertical-align: top;
|
|
124
|
+
min-width:10em;
|
|
125
|
+
text-align: right;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
form input,
|
|
129
|
+
form select,
|
|
130
|
+
form textarea {
|
|
131
|
+
display: inline-block;
|
|
132
|
+
margin-left: 5px;
|
|
133
|
+
margin-top: 1.1em;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
input[type="radio"],
|
|
137
|
+
input[type="checkbox"] {
|
|
138
|
+
margin-top: 1.3em;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
body > form {
|
|
142
|
+
display: block;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
form fieldset {
|
|
146
|
+
border: 1px solid #aaaaaa;
|
|
147
|
+
border-radius: 3px;
|
|
148
|
+
margin: 0.5em 0;
|
|
149
|
+
}
|
|
150
|
+
`;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testfunction.d.ts","sourceRoot":"","sources":["../../../src/test/test/testfunction.ts"],"names":[],"mappings":";AAWA,wBAA4C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testfunction.js","sourceRoot":"","sources":["../../../src/test/test/testfunction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,CAAC,GAAG,CAAE,iBAAiB,CAAE,CAAC;AAEjC,QAAQ,CACJ,mBAAmB,EACnB,SAAS,YAAY,CAAE,CAAS,EAAE,CAAQ;IACtC,OAAO,CAAC,GAAG,CAAC,CAAC;AACjB,CAAC,CACJ,CAAC;AAEF,eAAe,KAAK,CAAE,mBAAmB,CAAE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineCE, getCE } from '../../microcomponents.js';
|
|
2
|
+
|
|
3
|
+
console.log( 'testfunction.ts' );
|
|
4
|
+
|
|
5
|
+
defineCE(
|
|
6
|
+
'test-testfunction',
|
|
7
|
+
function testfunction( a: number, b:number ){
|
|
8
|
+
return a + b;
|
|
9
|
+
}
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
export default getCE( 'test-testfunction' );
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export default
|
|
3
|
-
constructor(target: HTMLElement);
|
|
4
|
-
oneInit(): void;
|
|
5
|
-
}
|
|
1
|
+
declare const _default: CustomElementConstructor | undefined;
|
|
2
|
+
export default _default;
|
|
6
3
|
//# sourceMappingURL=testmc.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testmc.d.ts","sourceRoot":"","sources":["../../../src/test/test/testmc.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"testmc.d.ts","sourceRoot":"","sources":["../../../src/test/test/testmc.ts"],"names":[],"mappings":";AAeA,wBAAsC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { DC } from '
|
|
2
|
-
|
|
1
|
+
import { defineCE, getCE, DC } from '../../microcomponents.js';
|
|
2
|
+
defineCE('test-testmc', class TestMc extends DC {
|
|
3
3
|
constructor(target) {
|
|
4
4
|
super(target);
|
|
5
|
-
delete this._mc;
|
|
6
5
|
}
|
|
7
6
|
oneInit() {
|
|
8
7
|
}
|
|
9
|
-
}
|
|
8
|
+
});
|
|
9
|
+
export default getCE('test-testmc');
|
|
10
10
|
//# sourceMappingURL=testmc.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testmc.js","sourceRoot":"","sources":["../../../src/test/test/testmc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"testmc.js","sourceRoot":"","sources":["../../../src/test/test/testmc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE/D,QAAQ,CACJ,aAAa,EACb,MAAM,MAAO,SAAQ,EAAE;IACnB,YAAY,MAAmB;QAC3B,KAAK,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAED,OAAO;IAEP,CAAC;CACJ,CACJ,CAAC;AAEF,eAAe,KAAK,CAAE,aAAa,CAAE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineCE, getCE, DC } from '../../microcomponents.js';
|
|
2
|
+
|
|
3
|
+
defineCE(
|
|
4
|
+
'test-testmc',
|
|
5
|
+
class TestMc extends DC {
|
|
6
|
+
constructor(target: HTMLElement) {
|
|
7
|
+
super(target);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
oneInit() {
|
|
11
|
+
// console.log('testmc connected to DOM');
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
export default getCE( 'test-testmc' );
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testsimpleclass.d.ts","sourceRoot":"","sources":["../../../src/test/test/testsimpleclass.ts"],"names":[],"mappings":";AAcA,wBAA+C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { defineCE, getCE } from '../../microcomponents.js';
|
|
2
|
+
defineCE('test-testsimpleclass', class TestSimpleClass {
|
|
3
|
+
constructor(target) {
|
|
4
|
+
}
|
|
5
|
+
oneInit() {
|
|
6
|
+
}
|
|
7
|
+
});
|
|
8
|
+
export default getCE('test-testsimpleclass');
|
|
9
|
+
//# sourceMappingURL=testsimpleclass.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testsimpleclass.js","sourceRoot":"","sources":["../../../src/test/test/testsimpleclass.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAM,MAAM,0BAA0B,CAAC;AAE/D,QAAQ,CACJ,sBAAsB,EACtB,MAAM,eAAe;IACjB,YAAY,MAAmB;IAC/B,CAAC;IAED,OAAO;IAEP,CAAC;CACJ,CACJ,CAAC;AAEF,eAAe,KAAK,CAAE,sBAAsB,CAAE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineCE, getCE, DC } from '../../microcomponents.js';
|
|
2
|
+
|
|
3
|
+
defineCE(
|
|
4
|
+
'test-testsimpleclass',
|
|
5
|
+
class TestSimpleClass {
|
|
6
|
+
constructor(target: HTMLElement) {
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
oneInit() {
|
|
10
|
+
// console.log('testmc connected to DOM');
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
export default getCE( 'test-testsimpleclass' );
|
package/public/test/test.html
CHANGED
package/public/test/test.js
CHANGED
|
@@ -18,14 +18,14 @@ class Translator extends DC {
|
|
|
18
18
|
that.Translation.bind(translationTargetObject);
|
|
19
19
|
that.target.setAttribute('language', 'en');
|
|
20
20
|
that.Language.notify();
|
|
21
|
-
delete that._mc;
|
|
22
21
|
}
|
|
23
22
|
onAttributeChanged(ev) {
|
|
24
|
-
|
|
23
|
+
let detail = ev.detail || {};
|
|
24
|
+
if (!detail.newValue)
|
|
25
25
|
return;
|
|
26
|
-
switch (
|
|
26
|
+
switch (detail.name) {
|
|
27
27
|
case 'language':
|
|
28
|
-
this.Language =
|
|
28
|
+
this.Language = detail.newValue;
|
|
29
29
|
break;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -46,7 +46,6 @@ defineCE('my-tag', class MyTag extends DC {
|
|
|
46
46
|
let that = this;
|
|
47
47
|
target.innerHTML = this.#template;
|
|
48
48
|
DC.add(target, 'translator', new Translator(target, that.#languages, target));
|
|
49
|
-
delete that._mc;
|
|
50
49
|
}
|
|
51
50
|
oneInit(ev) {
|
|
52
51
|
let that = this;
|
|
@@ -56,7 +55,7 @@ defineCE('my-tag', class MyTag extends DC {
|
|
|
56
55
|
}
|
|
57
56
|
onClick(ev) {
|
|
58
57
|
const that = this, c = that.Dom.counter++;
|
|
59
|
-
ev.data.stopPropagation();
|
|
58
|
+
ev.detail.data.stopPropagation();
|
|
60
59
|
that.target.classList.remove('clicked');
|
|
61
60
|
that.target.classList.add(that.Dom.counter > 9 ? 'overClicked' : 'clicked');
|
|
62
61
|
}
|
package/public/test/test.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../src/test/test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../src/test/test.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import {
|
|
2
|
+
LooseObject,
|
|
3
|
+
DC,
|
|
4
|
+
defineCE,
|
|
5
|
+
getCE,
|
|
6
|
+
observe,
|
|
7
|
+
Observable,
|
|
8
|
+
} from '../microcomponents.js';
|
|
9
|
+
|
|
10
|
+
class Translator extends DC {
|
|
11
|
+
#translations: LooseObject = {};
|
|
12
|
+
|
|
13
|
+
Language: unknown = 'en';
|
|
14
|
+
Translation: unknown = {};
|
|
15
|
+
|
|
16
|
+
constructor(
|
|
17
|
+
target: HTMLElement | ShadowRoot | DocumentFragment,
|
|
18
|
+
translations: LooseObject,
|
|
19
|
+
translationTargetObject: HTMLElement
|
|
20
|
+
) {
|
|
21
|
+
super(target as HTMLElement);
|
|
22
|
+
let that = this; // minifier help
|
|
23
|
+
|
|
24
|
+
// state
|
|
25
|
+
that.Language = 'en';
|
|
26
|
+
that.Translation = {};
|
|
27
|
+
|
|
28
|
+
observe(that);
|
|
29
|
+
|
|
30
|
+
// setup
|
|
31
|
+
that.#translations = translations;
|
|
32
|
+
|
|
33
|
+
// on language change switch translation object
|
|
34
|
+
(that.Language as Observable).observe((lang) => {
|
|
35
|
+
if (that.#translations.hasOwnProperty(lang)) {
|
|
36
|
+
that.Translation = { lang: that.#translations[lang] }; // set translation
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
(that.Translation as Observable).bind(translationTargetObject);
|
|
41
|
+
|
|
42
|
+
that.target.setAttribute('language', 'en');
|
|
43
|
+
|
|
44
|
+
(that.Language as Observable).notify();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
onAttributeChanged(ev: CustomEvent) {
|
|
48
|
+
let detail = ev.detail || {};
|
|
49
|
+
if (!detail.newValue) return;
|
|
50
|
+
switch (detail.name) {
|
|
51
|
+
case 'language':
|
|
52
|
+
this.Language = detail.newValue;
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
defineCE(
|
|
59
|
+
// equivalent to custom element registry .define()
|
|
60
|
+
'my-tag',
|
|
61
|
+
class MyTag extends DC {
|
|
62
|
+
#template: string = '<button>{lang.click} {counter}</button>';
|
|
63
|
+
|
|
64
|
+
#languages = {
|
|
65
|
+
en: {
|
|
66
|
+
click: 'click me',
|
|
67
|
+
},
|
|
68
|
+
de: {
|
|
69
|
+
click: 'klick mich',
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
Dom: LooseObject = {};
|
|
74
|
+
|
|
75
|
+
constructor(target: HTMLElement) {
|
|
76
|
+
super(target);
|
|
77
|
+
|
|
78
|
+
let that = this; // minifier help
|
|
79
|
+
|
|
80
|
+
// render
|
|
81
|
+
target.innerHTML = this.#template;
|
|
82
|
+
|
|
83
|
+
// add translator
|
|
84
|
+
DC.add(
|
|
85
|
+
target,
|
|
86
|
+
'translator',
|
|
87
|
+
new Translator(target, that.#languages, target)
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
oneInit(ev: CustomEvent) {
|
|
92
|
+
let that = this;
|
|
93
|
+
|
|
94
|
+
// state
|
|
95
|
+
that.Dom = { counter: 0 };
|
|
96
|
+
|
|
97
|
+
// state: convert all props defined so far into observables
|
|
98
|
+
observe(that);
|
|
99
|
+
|
|
100
|
+
// bind Dom to target
|
|
101
|
+
(that.Dom as Observable).bind(that.target);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
onClick(ev: CustomEvent) {
|
|
105
|
+
const that = this,
|
|
106
|
+
c = that.Dom.counter++;
|
|
107
|
+
(ev.detail.data as PointerEvent).stopPropagation();
|
|
108
|
+
(that.target as HTMLElement).classList.remove('clicked');
|
|
109
|
+
(that.target as HTMLElement).classList.add(
|
|
110
|
+
that.Dom.counter > 9 ? 'overClicked' : 'clicked'
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
['language']
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
let MyTag: CustomElementConstructor = getCE('my-tag')!,
|
|
118
|
+
fragment = new DocumentFragment();
|
|
119
|
+
|
|
120
|
+
/*
|
|
121
|
+
stress test
|
|
122
|
+
*/
|
|
123
|
+
|
|
124
|
+
let start = new Date().getTime(),
|
|
125
|
+
max = 1000;
|
|
126
|
+
|
|
127
|
+
// create 1000 elements
|
|
128
|
+
for (let x = 0; x < max; x++) {
|
|
129
|
+
fragment.append(new MyTag());
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
let end = new Date().getTime();
|
|
133
|
+
|
|
134
|
+
// and put them into the DOM
|
|
135
|
+
document.body.appendChild(fragment);
|
|
136
|
+
|
|
137
|
+
//document.querySelectorAll('my-tag').forEach((e) => e.remove());
|
|
138
|
+
|
|
139
|
+
/*
|
|
140
|
+
console test
|
|
141
|
+
*/
|
|
142
|
+
|
|
143
|
+
setTimeout(() => {
|
|
144
|
+
// console.clear();
|
|
145
|
+
|
|
146
|
+
console.log(
|
|
147
|
+
'%c \n\nStress Test:\n\n %cInstancing %s web components (%s classes): %c %s ms.',
|
|
148
|
+
'font-weight: bold; color: black;',
|
|
149
|
+
'font-weight: normal;',
|
|
150
|
+
max,
|
|
151
|
+
max * 3,
|
|
152
|
+
'font-weight: bold; color: blue;',
|
|
153
|
+
end - start
|
|
154
|
+
);
|
|
155
|
+
|
|
156
|
+
//document.body.appendChild(new MyTag());
|
|
157
|
+
|
|
158
|
+
let element = document.querySelector('my-tag');
|
|
159
|
+
|
|
160
|
+
console.log(
|
|
161
|
+
"\n\n%cInspect this tag:%c \n( ...to see the inner structure in the '._mc' property )\n\n %O %c %s",
|
|
162
|
+
'font-weight: bold;',
|
|
163
|
+
'font-weight: normal;',
|
|
164
|
+
element,
|
|
165
|
+
'font-weight: bold;',
|
|
166
|
+
'\n\nLook up code in the debugger: test.js\n'
|
|
167
|
+
);
|
|
168
|
+
|
|
169
|
+
let form = ( document.querySelector('test-testform') as any);
|
|
170
|
+
let formInstance = form._mc.TestTestform;
|
|
171
|
+
|
|
172
|
+
(window as any).form = formInstance;
|
|
173
|
+
console.log(
|
|
174
|
+
"\n\n%cAttached a global variable 'form':%c \n\n %O %c %s %c %s %c %s",
|
|
175
|
+
'font-weight: bold;',
|
|
176
|
+
'font-weight: normal;',
|
|
177
|
+
formInstance,
|
|
178
|
+
'font-weight: bold;',
|
|
179
|
+
'\n\nYou can use it to change input values, e.g. \n\n',
|
|
180
|
+
'font-weight: normal;',
|
|
181
|
+
' form.data.textInput="other value"',
|
|
182
|
+
'font-weight: bold;',
|
|
183
|
+
'\n\nChanges will be reflected in the form contents, same as vice versa.\n'
|
|
184
|
+
);
|
|
185
|
+
|
|
186
|
+
// will trigger the event on all micro components contained in <my-tag>
|
|
187
|
+
DC.trigger(element, 'doSomething');
|
|
188
|
+
}, 1000);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
legend {
|
|
2
|
+
display: inherit;
|
|
3
|
+
margin: inherit;
|
|
4
|
+
vertical-align: inherit;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
label {
|
|
8
|
+
display: inline;
|
|
9
|
+
margin-top: 5px;
|
|
10
|
+
margin-left: 5px;
|
|
11
|
+
vertical-align: top;
|
|
12
|
+
width: 10em;
|
|
13
|
+
text-align: right;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
label::before {
|
|
17
|
+
content: ' ';
|
|
18
|
+
display: block;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
form input,
|
|
22
|
+
form select,
|
|
23
|
+
form textarea {
|
|
24
|
+
margin-left: 5px;
|
|
25
|
+
margin-top: 0px;
|
|
26
|
+
display: inline;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
form label + textarea {
|
|
30
|
+
display: inline-block;
|
|
31
|
+
margin-top: 3px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
form input + label {
|
|
35
|
+
width: inherit;
|
|
36
|
+
margin-top: 3px;
|
|
37
|
+
text-align: left;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
body > form {
|
|
41
|
+
display: block;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
form fieldset {
|
|
45
|
+
border: 1px solid darkslategrey;
|
|
46
|
+
border-radius: 3px;
|
|
47
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<!-- test form -->
|
|
2
|
+
<fieldset>
|
|
3
|
+
<legend>Inputs</legend>
|
|
4
|
+
<label>text</label><input type="text" name="textInput" value="" /> <strong>2wB: </strong>{textInput}
|
|
5
|
+
<label>color</label><input type="color" name="colorInput" value="" />
|
|
6
|
+
<label>date</label><input type="date" name="dateInput" value="" />
|
|
7
|
+
<label>datetime-local</label><input type="datetime-local" name="dtlInput" value="" />
|
|
8
|
+
<label>email</label><input type="email" name="email" value="" />
|
|
9
|
+
<label>file</label><input type="file" name="fileInput" value="" />
|
|
10
|
+
<label>hidden</label><input type="hidden" name="hiddenInput" value="hiddenVal" />
|
|
11
|
+
<label>month</label><input type="month" name="month" value="" />
|
|
12
|
+
<label>number</label><input type="number" name="number" value="" />
|
|
13
|
+
<label>password</label><input type="password" name="passInput" value="" />
|
|
14
|
+
<label>range</label><input type="range" name="rangeInput" value="" />
|
|
15
|
+
<label>search</label><input type="search" name="searchInput" value="" />
|
|
16
|
+
<label>tel</label><input type="tel" name="telInput" value="" />
|
|
17
|
+
<label>time</label><input type="time" name="timeInput" value="" />
|
|
18
|
+
<label>url</label><input type="url" name="urlInput" value="" />
|
|
19
|
+
<label>week</label><input type="week" name="weekInput" value="" />
|
|
20
|
+
</fieldset>
|
|
21
|
+
<fieldset>
|
|
22
|
+
<legend>Selects</legend>
|
|
23
|
+
<label>singleSelect</label>
|
|
24
|
+
<select name="singleSelect">
|
|
25
|
+
<option disabled selected value> -- select -- </option>
|
|
26
|
+
<option value="1">Option 1</option>
|
|
27
|
+
<option value="2">Option 2</option>
|
|
28
|
+
<option value="3">Option 3</option>
|
|
29
|
+
<option value="4">Option 4</option>
|
|
30
|
+
</select>
|
|
31
|
+
<label>multiSelect</label>
|
|
32
|
+
<select name="multiSelect" multiple="multiple" type="select-multiple">
|
|
33
|
+
<option value="1">Option 1</option>
|
|
34
|
+
<option value="2" selected=true>Option 2</option>
|
|
35
|
+
<option value="3">Option 3</option>
|
|
36
|
+
<option value="4" selected=true>Option 4</option>
|
|
37
|
+
</select>
|
|
38
|
+
</fieldset>
|
|
39
|
+
<fieldset>
|
|
40
|
+
<legend>Radiobuttons <strong>2wB: </strong>{myRadio}</legend>
|
|
41
|
+
<label>radio1</label><input type="radio" name="myRadio" value="radio1">
|
|
42
|
+
<label>radio2</label><input type="radio" name="myRadio" value="radio2">
|
|
43
|
+
<label>radio3</label><input type="radio" name="myRadio" value="radio3">
|
|
44
|
+
</fieldset>
|
|
45
|
+
<fieldset>
|
|
46
|
+
<legend>Checkboxes</legend>
|
|
47
|
+
<label>cb1</label><input type="checkbox" name="cb1">
|
|
48
|
+
<label>cb2</label><input type="checkbox" name="cb2">
|
|
49
|
+
<label>cb3</label><input type="checkbox" name="cb3">
|
|
50
|
+
<label>cb4</label><input type="checkbox" name="cb4">
|
|
51
|
+
<label>cb5</label><input type="checkbox" name="cb5">
|
|
52
|
+
</fieldset>
|
|
53
|
+
<fieldset>
|
|
54
|
+
<legend>TextArea</legend>
|
|
55
|
+
<label>textArea</label><textarea name="textArea"></textarea>
|
|
56
|
+
</fieldset>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"textInput":"
|
|
2
|
+
"textInput":"Hallo Welt",
|
|
3
3
|
"colorInput":"#eaf8f8",
|
|
4
4
|
"dateInput":"",
|
|
5
5
|
"dtlInput":"",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"cb3":true,
|
|
22
22
|
"cb4":false,
|
|
23
23
|
"cb5":false,
|
|
24
|
-
"singleSelect":"
|
|
24
|
+
"singleSelect":"",
|
|
25
25
|
"multiSelect":["2","4"],
|
|
26
|
-
"textArea":"This is some example
|
|
26
|
+
"textArea":"This is some example\rtext..."
|
|
27
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
window.navigationData = "data:application/octet-stream;base64,
|
|
1
|
+
window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA42SQU+DMBiG/0u9kjmQTcdRtsSDxIvxsuzQwVdoLO3SFqMx/neTIbTrWuT8vc/D+5Vv/400fGqUIWDQAtcKReiEdYMy1IqqY6Buh8mi0S1DEXqnvEJZEqGyoaySwFG2HzUVEMoh3xkN6XipqeCWaAhdGtfpTzR6atD/SM6JK8PBchAh2zfMOvAsZWaz1vKpTCdLFvI61Yr8ulKRz6qiJa1rkEH+xgR6Txpv0rul/bhb6+slw0r19NYpECcPgcoW5LZ2oPIRK/CD59EU/PRaPBflrv/hxkG5Bklw2WsuQs4DrtaWDXdaMIEr3w8s8sUwnrhJQUgAFoRMcTyE8UkKghhMHpc4KpAf+Mh8h28NZ53by5g3Lv11ckwm5UiXm/t4lVyV865mC/9inj0Pv7li26e0BAAA"
|