neo.mjs 6.40.0 → 6.41.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.
- package/apps/ServiceWorker.mjs +2 -2
- package/apps/portal/view/learn/ContentView.mjs +5 -1
- package/examples/ServiceWorker.mjs +2 -2
- package/package.json +1 -1
- package/resources/data/deck/learnneo/pages/benefits/FormsEngine.md +10 -20
- package/resources/data/deck/learnneo/tree.json +1 -1
- package/src/DefaultConfig.mjs +2 -2
- package/src/main/DomEvents.mjs +13 -7
package/apps/ServiceWorker.mjs
CHANGED
package/package.json
CHANGED
@@ -202,34 +202,24 @@ class MainView extends FormContainer {
|
|
202
202
|
}]
|
203
203
|
}
|
204
204
|
|
205
|
-
async
|
206
|
-
const formValues = await
|
205
|
+
async getFormValues(form) {
|
206
|
+
const formValues = await form.getValues();
|
207
207
|
Neo.Main.log({value: formValues});
|
208
208
|
|
209
|
-
const isValid = await
|
210
|
-
Neo.Main.log({value: `isValid: ${isValid}`})
|
209
|
+
const isValid = await form.validate();
|
210
|
+
Neo.Main.log({value: `isValid: ${isValid}`})
|
211
211
|
}
|
212
212
|
|
213
|
-
async
|
214
|
-
|
215
|
-
|
216
|
-
formValues = await form.getValues();
|
217
|
-
|
218
|
-
Neo.Main.log({value: formValues});
|
213
|
+
async getMainFormValues(data) {
|
214
|
+
await this.getFormValues(this)
|
215
|
+
}
|
219
216
|
|
220
|
-
|
221
|
-
|
217
|
+
async getProductFormValues(data) {
|
218
|
+
await this.getFormValues(this.getReference('product-form'))
|
222
219
|
}
|
223
220
|
|
224
221
|
async getUserFormValues(data) {
|
225
|
-
|
226
|
-
form = this.getReference('user-form'),
|
227
|
-
formValues = await form.getValues();
|
228
|
-
|
229
|
-
Neo.Main.log({value: formValues});
|
230
|
-
|
231
|
-
const isValid = await form.validate();
|
232
|
-
Neo.Main.log({value: `isValid: ${isValid}`});
|
222
|
+
await this.getFormValues(this.getReference('user-form'))
|
233
223
|
}
|
234
224
|
}
|
235
225
|
Neo.setupClass(MainView);
|
@@ -2,7 +2,7 @@
|
|
2
2
|
{"name": "Welcome!", "parentId": null, "isLeaf": true, "id": "Welcome" },
|
3
3
|
{"name": "Benefits", "parentId": null, "isLeaf": false, "id": "WhyNeo"},
|
4
4
|
{"name": "Introduction ", "parentId": "WhyNeo", "isLeaf": true, "id": "WhyNeo-Intro"},
|
5
|
-
{"name": "
|
5
|
+
{"name": "Off the Main Thread", "parentId": "WhyNeo", "isLeaf": true, "id": "benefits.Multi-Threading"},
|
6
6
|
{"name": "Extreme Speed", "parentId": "WhyNeo", "isLeaf": true, "id": "WhyNeo-Speed"},
|
7
7
|
{"name": "Multi-Window Applications", "parentId": "WhyNeo", "isLeaf": true, "id": "WhyNeo-Multi-Window"},
|
8
8
|
{"name": "Quick Application Development", "parentId": "WhyNeo", "isLeaf": true, "id": "WhyNeo-Quick"},
|
package/src/DefaultConfig.mjs
CHANGED
@@ -260,12 +260,12 @@ const DefaultConfig = {
|
|
260
260
|
useVdomWorker: true,
|
261
261
|
/**
|
262
262
|
* buildScripts/injectPackageVersion.mjs will update this value
|
263
|
-
* @default '6.
|
263
|
+
* @default '6.41.0'
|
264
264
|
* @memberOf! module:Neo
|
265
265
|
* @name config.version
|
266
266
|
* @type String
|
267
267
|
*/
|
268
|
-
version: '6.
|
268
|
+
version: '6.41.0'
|
269
269
|
};
|
270
270
|
|
271
271
|
Object.assign(DefaultConfig, {
|
package/src/main/DomEvents.mjs
CHANGED
@@ -542,17 +542,19 @@ class DomEvents extends Base {
|
|
542
542
|
onKeyDown(event) {
|
543
543
|
let {target} = event,
|
544
544
|
{tagName} = target,
|
545
|
-
isInput
|
545
|
+
isInput = tagName === 'INPUT' || tagName === 'TEXTAREA';
|
546
546
|
|
547
547
|
if (isInput && disabledInputKeys[target.id]?.includes(event.key)) {
|
548
548
|
event.preventDefault()
|
549
549
|
} else {
|
550
550
|
this.sendMessageToApp(this.getKeyboardEventData(event));
|
551
551
|
|
552
|
-
if (
|
553
|
-
|
554
|
-
|
555
|
-
|
552
|
+
if (
|
553
|
+
!isInput &&
|
554
|
+
['ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowUp'].includes(event.key) &&
|
555
|
+
this.testPathInclusion(event, ['neo-selection'], true)
|
556
|
+
) {
|
557
|
+
event.preventDefault()
|
556
558
|
}
|
557
559
|
}
|
558
560
|
}
|
@@ -832,9 +834,10 @@ event.preventDefault();
|
|
832
834
|
/**
|
833
835
|
* @param {Object} event
|
834
836
|
* @param {Object} targetArray
|
837
|
+
* @param {Object} testSubstring=false
|
835
838
|
* @returns {Object|Boolean} target cls & node if found, false otherwise
|
836
839
|
*/
|
837
|
-
testPathInclusion(event, targetArray) {
|
840
|
+
testPathInclusion(event, targetArray, testSubstring=false) {
|
838
841
|
let countTargets = targetArray.length,
|
839
842
|
path = event.path || event.composedPath(),
|
840
843
|
i = 0,
|
@@ -845,7 +848,10 @@ event.preventDefault();
|
|
845
848
|
node = path[i];
|
846
849
|
|
847
850
|
for (j = 0; j < countTargets; j++) {
|
848
|
-
if (
|
851
|
+
if (
|
852
|
+
testSubstring && node.classList?.value?.includes(targetArray[j]) ||
|
853
|
+
node.classList?.contains(targetArray[j])
|
854
|
+
) {
|
849
855
|
return {cls: targetArray[j], node}
|
850
856
|
}
|
851
857
|
}
|