From 3032a26750e92d6d5560b84de4678243f61a974d Mon Sep 17 00:00:00 2001 From: Kevin Bulteel Date: Thu, 11 Jan 2024 17:45:18 +0100 Subject: [PATCH] fix: stopflag had wrong position --- .../@hec.js/ui/example/component/component.js | 5 +- .../@hec.js/ui/example/component/index.html | 11 ++++- .../@hec.js/ui/example/lazy-list/index.html | 1 - .../@hec.js/ui/example/lazy-list/lazy-list.js | 15 +++--- packages/@hec.js/ui/lib/src/component.js | 7 ++- packages/@hec.js/ui/lib/src/notify/visible.js | 48 +++++++++---------- packages/@hec.js/ui/lib/src/plugins.js | 6 +-- .../@hec.js/ui/lib/src/plugins/data-for.js | 3 ++ .../ui/lib/src/plugins/data-include.js | 8 ++-- .../@hec.js/ui/lib/src/plugins/data-lazy.js | 17 +++---- .../ui/lib/src/plugins/data-preload.js | 34 +++++++------ packages/@hec.js/ui/lib/src/preload.js | 17 +++++++ packages/@hec.js/ui/lib/src/template.js | 19 ++++---- 13 files changed, 107 insertions(+), 84 deletions(-) create mode 100644 packages/@hec.js/ui/lib/src/preload.js diff --git a/packages/@hec.js/ui/example/component/component.js b/packages/@hec.js/ui/example/component/component.js index 34fc48d..d8fb156 100644 --- a/packages/@hec.js/ui/example/component/component.js +++ b/packages/@hec.js/ui/example/component/component.js @@ -2,6 +2,8 @@ import { component, templateByName } from '../../lib/index.js'; component('my-counter', { count: 0, camelCase: '' }, ({ count, camelCase }) => { + console.log('EXECUTE') + let isDown = false; const mousedown = async () => { @@ -16,8 +18,7 @@ component('my-counter', { count: 0, camelCase: '' }, ({ count, camelCase }) => { } - return templateByName( - new URL('./component.html', import.meta.url), + return templateByName('./component.html', { count, mousedown, diff --git a/packages/@hec.js/ui/example/component/index.html b/packages/@hec.js/ui/example/component/index.html index 5692991..aa67637 100644 --- a/packages/@hec.js/ui/example/component/index.html +++ b/packages/@hec.js/ui/example/component/index.html @@ -5,16 +5,23 @@ hec.js :: Component + + - +