create-basicjs 0.0.1 → 0.1.1
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 +27 -2
- package/bin/create-basicjs.js +104 -1
- package/bin/verify-package.js +16 -0
- package/package.json +27 -6
- package/payload/starter/AGENTS.md +82 -0
- package/payload/starter/CLAUDE.md +1 -0
- package/payload/starter/README.md +45 -0
- package/payload/starter/_basic/VERSION +1 -0
- package/payload/starter/_basic/assets/categories/cappuccino.png +0 -0
- package/payload/starter/_basic/assets/categories/chocolate-milk.png +0 -0
- package/payload/starter/_basic/assets/categories/coffee-cup.png +0 -0
- package/payload/starter/_basic/assets/categories/coffee.png +0 -0
- package/payload/starter/_basic/assets/categories/frappe.png +0 -0
- package/payload/starter/_basic/assets/categories/iced-caffee.png +0 -0
- package/payload/starter/_basic/assets/categories/milkshake.png +0 -0
- package/payload/starter/_basic/assets/categories/orange-juice.png +0 -0
- package/payload/starter/_basic/assets/categories/tea.png +0 -0
- package/payload/starter/_basic/assets/data-table/palette.svg +2 -0
- package/payload/starter/_basic/assets/data-table/people.js +104 -0
- package/payload/starter/_basic/assets/data-table/trash.svg +2 -0
- package/payload/starter/_basic/assets/fruids/brokoli.png +0 -0
- package/payload/starter/_basic/assets/fruids/cilek.png +0 -0
- package/payload/starter/_basic/assets/fruids/domates.png +0 -0
- package/payload/starter/_basic/assets/fruids/elma.png +0 -0
- package/payload/starter/_basic/assets/fruids/havuc.png +0 -0
- package/payload/starter/_basic/assets/fruids/karpuz.png +0 -0
- package/payload/starter/_basic/assets/fruids/limon.png +0 -0
- package/payload/starter/_basic/assets/fruids/muz.png +0 -0
- package/payload/starter/_basic/assets/fruids/nar.png +0 -0
- package/payload/starter/_basic/assets/fruids/patlican.png +0 -0
- package/payload/starter/_basic/assets/fruids/yabanmersini.png +0 -0
- package/payload/starter/_basic/assets/fruids/yesilbiber.png +0 -0
- package/payload/starter/_basic/assets/icons/alert-black.png +0 -0
- package/payload/starter/_basic/assets/icons/alert.png +0 -0
- package/payload/starter/_basic/assets/icons/arrow-drop.svg +3 -0
- package/payload/starter/_basic/assets/icons/arrow-rise.svg +3 -0
- package/payload/starter/_basic/assets/icons/close.svg +1 -0
- package/payload/starter/_basic/assets/icons/lamp-on.png +0 -0
- package/payload/starter/_basic/assets/icons/lamp.png +0 -0
- package/payload/starter/_basic/assets/icons/lock.png +0 -0
- package/payload/starter/_basic/assets/icons/panel.png +0 -0
- package/payload/starter/_basic/assets/icons/plant.png +0 -0
- package/payload/starter/_basic/assets/icons/trash.png +0 -0
- package/payload/starter/_basic/assets/icons/trash.svg +2 -0
- package/payload/starter/_basic/assets/tab-bar/settings.png +0 -0
- package/payload/starter/_basic/assets/tab-bar/status.png +0 -0
- package/payload/starter/_basic/assets/tab-bar/transactions.png +0 -0
- package/payload/starter/_basic/assets/tutorial/blueberries.png +0 -0
- package/payload/starter/_basic/assets/tutorial/carrot.png +0 -0
- package/payload/starter/_basic/assets/tutorial/olives.png +0 -0
- package/payload/starter/_basic/assets/tutorial/strawberry.png +0 -0
- package/payload/starter/_basic/assets/ui-bottom-bar/setting.svg +11 -0
- package/payload/starter/_basic/basic/LICENSE +14 -0
- package/payload/starter/_basic/basic/basic.css +277 -0
- package/payload/starter/_basic/basic/basic.js +3767 -0
- package/payload/starter/_basic/basic/basic.min.css +1 -0
- package/payload/starter/_basic/basic/basic.min.js +65 -0
- package/payload/starter/_basic/basic/font/open-sans/LICENSE.txt +206 -0
- package/payload/starter/_basic/basic/font/open-sans/OpenSans-Bold.ttf +0 -0
- package/payload/starter/_basic/basic/font/open-sans/OpenSans-Regular.ttf +0 -0
- package/payload/starter/_basic/basic/scroll-bar.js +536 -0
- package/payload/starter/_basic/basic/scroll-bar.min.js +2 -0
- package/payload/starter/_basic/comp/action-button/add.png +0 -0
- package/payload/starter/_basic/comp/action-button.js +522 -0
- package/payload/starter/_basic/comp/action-tab-bar.js +383 -0
- package/payload/starter/_basic/comp/app-bar.js +236 -0
- package/payload/starter/_basic/comp/badge-v2.js +246 -0
- package/payload/starter/_basic/comp/bottom-bar.js +547 -0
- package/payload/starter/_basic/comp/breadcrumbs.js +522 -0
- package/payload/starter/_basic/comp/chart-box/chart-4.5.1.umd.min.js +13 -0
- package/payload/starter/_basic/comp/chart-box/chart-js-LICENSE.md +9 -0
- package/payload/starter/_basic/comp/chart-box.js +868 -0
- package/payload/starter/_basic/comp/check-box.js +374 -0
- package/payload/starter/_basic/comp/context-menu.js +634 -0
- package/payload/starter/_basic/comp/currency-input-b.js +190 -0
- package/payload/starter/_basic/comp/data-table/arrow.svg +2 -0
- package/payload/starter/_basic/comp/data-table.js +865 -0
- package/payload/starter/_basic/comp/dialog.js +854 -0
- package/payload/starter/_basic/comp/email-input-b.js +57 -0
- package/payload/starter/_basic/comp/filters.js +493 -0
- package/payload/starter/_basic/comp/form.js +590 -0
- package/payload/starter/_basic/comp/full-screen-select/arrow.svg +2 -0
- package/payload/starter/_basic/comp/full-screen-select/cancel.svg +2 -0
- package/payload/starter/_basic/comp/full-screen-select.js +611 -0
- package/payload/starter/_basic/comp/gauge.js +435 -0
- package/payload/starter/_basic/comp/hold-to-confirm-button/trash-red.png +0 -0
- package/payload/starter/_basic/comp/hold-to-confirm-button/trash.png +0 -0
- package/payload/starter/_basic/comp/hold-to-confirm-button.js +280 -0
- package/payload/starter/_basic/comp/input-b.js +759 -0
- package/payload/starter/_basic/comp/item-list.js +1396 -0
- package/payload/starter/_basic/comp/label-editor.js +1137 -0
- package/payload/starter/_basic/comp/left-menu/_Material Symbols & Icons - Google Fonts.webloc +8 -0
- package/payload/starter/_basic/comp/left-menu/data-table.png +0 -0
- package/payload/starter/_basic/comp/left-menu/home.png +0 -0
- package/payload/starter/_basic/comp/left-menu/reports.png +0 -0
- package/payload/starter/_basic/comp/left-menu/setting.png +0 -0
- package/payload/starter/_basic/comp/left-menu.js +476 -0
- package/payload/starter/_basic/comp/line-progress-bar.js +192 -0
- package/payload/starter/_basic/comp/loading-screen.js +382 -0
- package/payload/starter/_basic/comp/login-page-v2.js +586 -0
- package/payload/starter/_basic/comp/mini-graph-box.js +483 -0
- package/payload/starter/_basic/comp/notice.js +227 -0
- package/payload/starter/_basic/comp/number-input-b.js +121 -0
- package/payload/starter/_basic/comp/numeric-keyboard.js +296 -0
- package/payload/starter/_basic/comp/page-control.js +745 -0
- package/payload/starter/_basic/comp/page-header.js +190 -0
- package/payload/starter/_basic/comp/password-input-b/hide-btn.png +0 -0
- package/payload/starter/_basic/comp/password-input-b/hide-btn2.png +0 -0
- package/payload/starter/_basic/comp/password-input-b/show-btn.png +0 -0
- package/payload/starter/_basic/comp/password-input-b/show-btn2.png +0 -0
- package/payload/starter/_basic/comp/password-input-b.js +164 -0
- package/payload/starter/_basic/comp/period-bar.js +435 -0
- package/payload/starter/_basic/comp/phone-input-b.js +287 -0
- package/payload/starter/_basic/comp/progress-bar.js +676 -0
- package/payload/starter/_basic/comp/property-panel.js +2740 -0
- package/payload/starter/_basic/comp/radio-button.js +467 -0
- package/payload/starter/_basic/comp/rich-text-editor.js +1061 -0
- package/payload/starter/_basic/comp/scrolling-text.js +296 -0
- package/payload/starter/_basic/comp/search-input-v2/clear-round.svg +1 -0
- package/payload/starter/_basic/comp/search-input-v2/clear.svg +1 -0
- package/payload/starter/_basic/comp/search-input-v2/filter.png +0 -0
- package/payload/starter/_basic/comp/search-input-v2/filter.svg +1 -0
- package/payload/starter/_basic/comp/search-input-v2/search.svg +1 -0
- package/payload/starter/_basic/comp/search-input-v2.js +427 -0
- package/payload/starter/_basic/comp/search-results.js +560 -0
- package/payload/starter/_basic/comp/select-box.js +1740 -0
- package/payload/starter/_basic/comp/select-color.js +603 -0
- package/payload/starter/_basic/comp/select-date.js +1003 -0
- package/payload/starter/_basic/comp/select-file.js +732 -0
- package/payload/starter/_basic/comp/select-time.js +979 -0
- package/payload/starter/_basic/comp/settings-row.js +298 -0
- package/payload/starter/_basic/comp/side-panel.js +573 -0
- package/payload/starter/_basic/comp/slider-field.js +776 -0
- package/payload/starter/_basic/comp/slider.js +368 -0
- package/payload/starter/_basic/comp/smart-button/alert-black.png +0 -0
- package/payload/starter/_basic/comp/smart-button/clock.png +0 -0
- package/payload/starter/_basic/comp/smart-button.js +896 -0
- package/payload/starter/_basic/comp/smart-table/clock.png +0 -0
- package/payload/starter/_basic/comp/smart-table/down.png +0 -0
- package/payload/starter/_basic/comp/smart-table/scroll.png +0 -0
- package/payload/starter/_basic/comp/smart-table/sort.png +0 -0
- package/payload/starter/_basic/comp/smart-table/up.png +0 -0
- package/payload/starter/_basic/comp/smart-table.js +1321 -0
- package/payload/starter/_basic/comp/sortable-list.js +1172 -0
- package/payload/starter/_basic/comp/spark-line-box.js +729 -0
- package/payload/starter/_basic/comp/stepper.js +699 -0
- package/payload/starter/_basic/comp/tabs.js +1317 -0
- package/payload/starter/_basic/comp/tag-input.js +1067 -0
- package/payload/starter/_basic/comp/tap-effect.js +168 -0
- package/payload/starter/_basic/comp/textarea-b.js +184 -0
- package/payload/starter/_basic/comp/time-line.js +324 -0
- package/payload/starter/_basic/comp/tiny-select/arrow.svg +1 -0
- package/payload/starter/_basic/comp/tiny-select.js +282 -0
- package/payload/starter/_basic/comp/tiny-table.js +279 -0
- package/payload/starter/_basic/comp/toast.js +838 -0
- package/payload/starter/_basic/comp/toggle.js +636 -0
- package/payload/starter/_basic/comp/tooltip.js +471 -0
- package/payload/starter/_basic/comp/tree-view.js +1096 -0
- package/payload/starter/_basic/comp/ui-effects.js +1091 -0
- package/payload/starter/_basic/comp/ui-standards.js +402 -0
- package/payload/starter/_basic/comp/url-input-b.js +145 -0
- package/payload/starter/_basic/comp/web-view.js +534 -0
- package/payload/starter/_basic/docs/basic-js-animated-rules.md +90 -0
- package/payload/starter/_basic/docs/basic-js-code-rules.md +91 -0
- package/payload/starter/_basic/docs/basic-js-components.md +134 -0
- package/payload/starter/_basic/docs/basic-js-core.md +131 -0
- package/payload/starter/_basic/docs/component-index.md +522 -0
- package/payload/starter/_basic/docs/component-template.js +416 -0
- package/payload/starter/_basic/docs/handbook/00-introduction.md +125 -0
- package/payload/starter/_basic/docs/handbook/00-what-is-new.md +96 -0
- package/payload/starter/_basic/docs/handbook/01-label.md +104 -0
- package/payload/starter/_basic/docs/handbook/02-box.md +166 -0
- package/payload/starter/_basic/docs/handbook/03-image.md +81 -0
- package/payload/starter/_basic/docs/handbook/04-common-properties.md +159 -0
- package/payload/starter/_basic/docs/handbook/05-autolayout.md +332 -0
- package/payload/starter/_basic/docs/handbook/06-button.md +103 -0
- package/payload/starter/_basic/docs/handbook/07-input.md +78 -0
- package/payload/starter/_basic/docs/handbook/08-page.md +120 -0
- package/payload/starter/_basic/docs/handbook/09-useful-examples.md +309 -0
- package/payload/starter/_basic/docs/handbook/10-motion.md +132 -0
- package/payload/starter/_basic/docs/handbook/11-other-functions.md +92 -0
- package/payload/starter/_basic/docs/handbook/12-utilities.md +123 -0
- package/payload/starter/_basic/docs/handbook/13-sound.md +88 -0
- package/payload/starter/_basic/docs/what-is-new.md +402 -0
- package/payload/starter/_basic/examples/action-button.htm +81 -0
- package/payload/starter/_basic/examples/action-tab-bar.htm +97 -0
- package/payload/starter/_basic/examples/app-bar.htm +140 -0
- package/payload/starter/_basic/examples/badgeV2.htm +68 -0
- package/payload/starter/_basic/examples/bottom-bar/grid.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/grids.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/home.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/homes.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon1.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon1s.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon2.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon2s.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon3.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon3s.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon4.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon4s.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/search.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/searchs.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/settings.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/settingss.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/tasks.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/taskss.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar-2.htm +187 -0
- package/payload/starter/_basic/examples/bottom-bar.htm +46 -0
- package/payload/starter/_basic/examples/breadcrumbs.htm +284 -0
- package/payload/starter/_basic/examples/chart-box.htm +287 -0
- package/payload/starter/_basic/examples/check-box-1.htm +220 -0
- package/payload/starter/_basic/examples/check-box-2.htm +212 -0
- package/payload/starter/_basic/examples/check-box-3.htm +179 -0
- package/payload/starter/_basic/examples/context-menu.htm +269 -0
- package/payload/starter/_basic/examples/currency-input-b.htm +71 -0
- package/payload/starter/_basic/examples/data-table-2.htm +67 -0
- package/payload/starter/_basic/examples/data-table-3.htm +72 -0
- package/payload/starter/_basic/examples/data-table-4.htm +144 -0
- package/payload/starter/_basic/examples/data-table-5.htm +152 -0
- package/payload/starter/_basic/examples/data-table.htm +178 -0
- package/payload/starter/_basic/examples/dialog-centered.htm +130 -0
- package/payload/starter/_basic/examples/dialog.htm +209 -0
- package/payload/starter/_basic/examples/email-input-b.htm +67 -0
- package/payload/starter/_basic/examples/filters.htm +115 -0
- package/payload/starter/_basic/examples/form-1.htm +123 -0
- package/payload/starter/_basic/examples/full-screen-select.htm +114 -0
- package/payload/starter/_basic/examples/gauge.htm +133 -0
- package/payload/starter/_basic/examples/hold-to-confirm-button.htm +144 -0
- package/payload/starter/_basic/examples/input-b-ex1.htm +132 -0
- package/payload/starter/_basic/examples/input-b-ex2.htm +136 -0
- package/payload/starter/_basic/examples/input-b-ex3-style.htm +113 -0
- package/payload/starter/_basic/examples/input-b-ex4-custom-unit.htm +112 -0
- package/payload/starter/_basic/examples/input-b-ex5-warning-icon.htm +80 -0
- package/payload/starter/_basic/examples/input-b-ex6-dark.htm +108 -0
- package/payload/starter/_basic/examples/input-b-ex7-ozden.htm +153 -0
- package/payload/starter/_basic/examples/item-list-2.htm +253 -0
- package/payload/starter/_basic/examples/item-list.htm +176 -0
- package/payload/starter/_basic/examples/label-editor.htm +196 -0
- package/payload/starter/_basic/examples/left-menu.htm +81 -0
- package/payload/starter/_basic/examples/line-progress-bar.htm +145 -0
- package/payload/starter/_basic/examples/loading-screen.htm +217 -0
- package/payload/starter/_basic/examples/login-page-dark-v2.htm +269 -0
- package/payload/starter/_basic/examples/login-page-v2.htm +269 -0
- package/payload/starter/_basic/examples/mini-graph-box.htm +229 -0
- package/payload/starter/_basic/examples/notice.htm +79 -0
- package/payload/starter/_basic/examples/number-input-b.htm +68 -0
- package/payload/starter/_basic/examples/numeric-keyboard.htm +100 -0
- package/payload/starter/_basic/examples/page-control.htm +262 -0
- package/payload/starter/_basic/examples/page-header.htm +117 -0
- package/payload/starter/_basic/examples/password-input-b.htm +70 -0
- package/payload/starter/_basic/examples/period-bar.htm +94 -0
- package/payload/starter/_basic/examples/phone-input-b-select-country.htm +298 -0
- package/payload/starter/_basic/examples/phone-input-b.htm +72 -0
- package/payload/starter/_basic/examples/progress-bar-ozden.htm +168 -0
- package/payload/starter/_basic/examples/progress-bar.htm +296 -0
- package/payload/starter/_basic/examples/property-panel.htm +216 -0
- package/payload/starter/_basic/examples/radio-button-1.htm +264 -0
- package/payload/starter/_basic/examples/radio-button-2.htm +256 -0
- package/payload/starter/_basic/examples/radio-button-3.htm +168 -0
- package/payload/starter/_basic/examples/rich-text-editor.htm +228 -0
- package/payload/starter/_basic/examples/scrolling-text.htm +75 -0
- package/payload/starter/_basic/examples/search-input-v2-ozden.htm +128 -0
- package/payload/starter/_basic/examples/search-input-v2-place.htm +80 -0
- package/payload/starter/_basic/examples/search-input-v2.htm +65 -0
- package/payload/starter/_basic/examples/search-results.htm +193 -0
- package/payload/starter/_basic/examples/select-box-ozden-item.htm +114 -0
- package/payload/starter/_basic/examples/select-box-ozden-text.htm +64 -0
- package/payload/starter/_basic/examples/select-box.htm +254 -0
- package/payload/starter/_basic/examples/select-color.htm +215 -0
- package/payload/starter/_basic/examples/select-date.htm +244 -0
- package/payload/starter/_basic/examples/select-file.htm +268 -0
- package/payload/starter/_basic/examples/select-time.htm +249 -0
- package/payload/starter/_basic/examples/settings-row.htm +193 -0
- package/payload/starter/_basic/examples/side-panel-2.htm +270 -0
- package/payload/starter/_basic/examples/side-panel.htm +219 -0
- package/payload/starter/_basic/examples/slider-field.htm +223 -0
- package/payload/starter/_basic/examples/slider.htm +180 -0
- package/payload/starter/_basic/examples/smart-button-2.htm +220 -0
- package/payload/starter/_basic/examples/smart-button-3-ozden.htm +320 -0
- package/payload/starter/_basic/examples/smart-button-4-dark.htm +102 -0
- package/payload/starter/_basic/examples/smart-button-5-features.htm +205 -0
- package/payload/starter/_basic/examples/smart-button.htm +252 -0
- package/payload/starter/_basic/examples/smart-table-1.htm +142 -0
- package/payload/starter/_basic/examples/smart-table-2.htm +191 -0
- package/payload/starter/_basic/examples/smart-table-3.htm +359 -0
- package/payload/starter/_basic/examples/smart-table-4.htm +158 -0
- package/payload/starter/_basic/examples/sortable-list.htm +250 -0
- package/payload/starter/_basic/examples/spark-line-box.htm +285 -0
- package/payload/starter/_basic/examples/stepper-2.htm +172 -0
- package/payload/starter/_basic/examples/stepper.htm +255 -0
- package/payload/starter/_basic/examples/tabs-2/coffee.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i1-white.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i1.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i2-white.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i2.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i3-white.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i3.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i4-white.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i4.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i5-white.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i5.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/lamp-on.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/lamp.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/search.svg +2 -0
- package/payload/starter/_basic/examples/tabs-2.htm +188 -0
- package/payload/starter/_basic/examples/tabs.htm +300 -0
- package/payload/starter/_basic/examples/tag-input.htm +242 -0
- package/payload/starter/_basic/examples/tap-effect.htm +100 -0
- package/payload/starter/_basic/examples/textarea-b.htm +76 -0
- package/payload/starter/_basic/examples/time-line.htm +226 -0
- package/payload/starter/_basic/examples/tiny-select.htm +86 -0
- package/payload/starter/_basic/examples/tiny-table.htm +109 -0
- package/payload/starter/_basic/examples/toast.htm +262 -0
- package/payload/starter/_basic/examples/toggle-2.htm +163 -0
- package/payload/starter/_basic/examples/toggle-3.htm +218 -0
- package/payload/starter/_basic/examples/toggle.htm +93 -0
- package/payload/starter/_basic/examples/tooltip-2.htm +177 -0
- package/payload/starter/_basic/examples/tooltip-3.htm +212 -0
- package/payload/starter/_basic/examples/tooltip.htm +124 -0
- package/payload/starter/_basic/examples/tree-view.htm +285 -0
- package/payload/starter/_basic/examples/ui-effects.htm +463 -0
- package/payload/starter/_basic/examples/ui-standards.htm +261 -0
- package/payload/starter/_basic/examples/unfinished-login-page-dark-supabase.htm +221 -0
- package/payload/starter/_basic/examples/unfinished-login-page-supabase.htm +221 -0
- package/payload/starter/_basic/examples/url-input-b.htm +85 -0
- package/payload/starter/_basic/examples/web-view.htm +241 -0
- package/payload/starter/_basic/min/action-button.min.js +2 -0
- package/payload/starter/_basic/min/action-tab-bar.min.js +2 -0
- package/payload/starter/_basic/min/app-bar.min.js +2 -0
- package/payload/starter/_basic/min/badge-v2.min.js +2 -0
- package/payload/starter/_basic/min/bottom-bar.min.js +2 -0
- package/payload/starter/_basic/min/breadcrumbs.min.js +2 -0
- package/payload/starter/_basic/min/chart-box.min.js +2 -0
- package/payload/starter/_basic/min/check-box.min.js +2 -0
- package/payload/starter/_basic/min/context-menu.min.js +2 -0
- package/payload/starter/_basic/min/currency-input-b.min.js +2 -0
- package/payload/starter/_basic/min/data-table.min.js +2 -0
- package/payload/starter/_basic/min/dialog.min.js +2 -0
- package/payload/starter/_basic/min/email-input-b.min.js +2 -0
- package/payload/starter/_basic/min/filters.min.js +2 -0
- package/payload/starter/_basic/min/form.min.js +2 -0
- package/payload/starter/_basic/min/full-screen-select.min.js +2 -0
- package/payload/starter/_basic/min/gauge.min.js +2 -0
- package/payload/starter/_basic/min/hold-to-confirm-button.min.js +2 -0
- package/payload/starter/_basic/min/input-b.min.js +2 -0
- package/payload/starter/_basic/min/item-list.min.js +2 -0
- package/payload/starter/_basic/min/label-editor.min.js +2 -0
- package/payload/starter/_basic/min/left-menu.min.js +2 -0
- package/payload/starter/_basic/min/line-progress-bar.min.js +2 -0
- package/payload/starter/_basic/min/loading-screen.min.js +2 -0
- package/payload/starter/_basic/min/login-page-v2.min.js +2 -0
- package/payload/starter/_basic/min/mini-graph-box.min.js +2 -0
- package/payload/starter/_basic/min/notice.min.js +2 -0
- package/payload/starter/_basic/min/number-input-b.min.js +2 -0
- package/payload/starter/_basic/min/numeric-keyboard.min.js +2 -0
- package/payload/starter/_basic/min/page-control.min.js +2 -0
- package/payload/starter/_basic/min/page-header.min.js +2 -0
- package/payload/starter/_basic/min/password-input-b.min.js +2 -0
- package/payload/starter/_basic/min/period-bar.min.js +2 -0
- package/payload/starter/_basic/min/phone-input-b.min.js +2 -0
- package/payload/starter/_basic/min/progress-bar.min.js +2 -0
- package/payload/starter/_basic/min/property-panel.min.js +2 -0
- package/payload/starter/_basic/min/radio-button.min.js +2 -0
- package/payload/starter/_basic/min/rich-text-editor.min.js +2 -0
- package/payload/starter/_basic/min/scrolling-text.min.js +2 -0
- package/payload/starter/_basic/min/search-input-v2.min.js +2 -0
- package/payload/starter/_basic/min/search-results.min.js +2 -0
- package/payload/starter/_basic/min/select-box.min.js +2 -0
- package/payload/starter/_basic/min/select-color.min.js +2 -0
- package/payload/starter/_basic/min/select-date.min.js +2 -0
- package/payload/starter/_basic/min/select-file.min.js +2 -0
- package/payload/starter/_basic/min/select-time.min.js +2 -0
- package/payload/starter/_basic/min/settings-row.min.js +2 -0
- package/payload/starter/_basic/min/side-panel.min.js +2 -0
- package/payload/starter/_basic/min/slider-field.min.js +2 -0
- package/payload/starter/_basic/min/slider.min.js +2 -0
- package/payload/starter/_basic/min/smart-button.min.js +2 -0
- package/payload/starter/_basic/min/smart-table.min.js +2 -0
- package/payload/starter/_basic/min/sortable-list.min.js +2 -0
- package/payload/starter/_basic/min/spark-line-box.min.js +2 -0
- package/payload/starter/_basic/min/stepper.min.js +2 -0
- package/payload/starter/_basic/min/tabs.min.js +2 -0
- package/payload/starter/_basic/min/tag-input.min.js +2 -0
- package/payload/starter/_basic/min/tap-effect.min.js +2 -0
- package/payload/starter/_basic/min/textarea-b.min.js +2 -0
- package/payload/starter/_basic/min/time-line.min.js +2 -0
- package/payload/starter/_basic/min/tiny-select.min.js +2 -0
- package/payload/starter/_basic/min/tiny-table.min.js +2 -0
- package/payload/starter/_basic/min/toast.min.js +2 -0
- package/payload/starter/_basic/min/toggle.min.js +2 -0
- package/payload/starter/_basic/min/tooltip.min.js +2 -0
- package/payload/starter/_basic/min/tree-view.min.js +2 -0
- package/payload/starter/_basic/min/ui-effects.min.js +2 -0
- package/payload/starter/_basic/min/ui-standards.min.js +2 -0
- package/payload/starter/_basic/min/url-input-b.min.js +2 -0
- package/payload/starter/_basic/min/web-view.min.js +2 -0
- package/payload/starter/_basic/tools/build.js +175 -0
- package/payload/starter/_basic/tools/check.js +318 -0
- package/payload/starter/app/app.js +27 -0
- package/payload/starter/assets/.gitkeep +0 -0
- package/payload/starter/gitignore +3 -0
- package/payload/starter/index.htm +23 -0
- package/payload/templates/booking/TEMPLATE.md +77 -0
- package/payload/templates/booking/app/app.js +722 -0
- package/payload/templates/booking/app/settings.js +52 -0
- package/payload/templates/booking/app/store.js +265 -0
- package/payload/templates/booking/app/texts.js +148 -0
- package/payload/templates/booking/assets/app-icon.svg +1 -0
- package/payload/templates/booking/assets/tabs/account.svg +1 -0
- package/payload/templates/booking/assets/tabs/appointments.svg +1 -0
- package/payload/templates/booking/assets/tabs/home.svg +1 -0
- package/payload/templates/booking/assets/tabs/services.svg +1 -0
- package/payload/templates/booking/components/booking-ui.js +252 -0
- package/payload/templates/booking/index.htm +53 -0
- package/payload/templates/booking/pages/account.js +124 -0
- package/payload/templates/booking/pages/appointments.js +141 -0
- package/payload/templates/booking/pages/book.js +231 -0
- package/payload/templates/booking/pages/home.js +99 -0
- package/payload/templates/booking/pages/services.js +79 -0
- package/payload/templates/classic/TEMPLATE.md +104 -0
- package/payload/templates/classic/app/app.js +779 -0
- package/payload/templates/classic/app/settings.js +77 -0
- package/payload/templates/classic/assets/_attribute.txt +37 -0
- package/payload/templates/classic/assets/cards/dill.png +0 -0
- package/payload/templates/classic/assets/cards/fennel.png +0 -0
- package/payload/templates/classic/assets/cards/juniper.png +0 -0
- package/payload/templates/classic/assets/cards/olives.png +0 -0
- package/payload/templates/classic/assets/cards/oregano.png +0 -0
- package/payload/templates/classic/assets/cards/pepper.png +0 -0
- package/payload/templates/classic/assets/cards/rosehip.png +0 -0
- package/payload/templates/classic/assets/categories/cappuccino.png +0 -0
- package/payload/templates/classic/assets/categories/chocolate-milk.png +0 -0
- package/payload/templates/classic/assets/categories/coffee-cup.png +0 -0
- package/payload/templates/classic/assets/categories/coffee.png +0 -0
- package/payload/templates/classic/assets/categories/frappe.png +0 -0
- package/payload/templates/classic/assets/categories/iced-caffee.png +0 -0
- package/payload/templates/classic/assets/categories/milkshake.png +0 -0
- package/payload/templates/classic/assets/categories/orange-juice.png +0 -0
- package/payload/templates/classic/assets/categories/tea.png +0 -0
- package/payload/templates/classic/assets/example-tabs/coffee.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i1-white.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i1.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i2-white.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i2.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i3-white.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i3.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i4-white.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i4.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i5-white.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i5.png +0 -0
- package/payload/templates/classic/assets/example-tabs/lamp-on.png +0 -0
- package/payload/templates/classic/assets/example-tabs/lamp.png +0 -0
- package/payload/templates/classic/assets/example-tabs/search.svg +2 -0
- package/payload/templates/classic/assets/files/ai.png +0 -0
- package/payload/templates/classic/assets/files/doc.png +0 -0
- package/payload/templates/classic/assets/files/folder.png +0 -0
- package/payload/templates/classic/assets/files/js.png +0 -0
- package/payload/templates/classic/assets/files/pdf.png +0 -0
- package/payload/templates/classic/assets/files/txt.png +0 -0
- package/payload/templates/classic/assets/files/xls.png +0 -0
- package/payload/templates/classic/assets/icons/arrow-drop.svg +3 -0
- package/payload/templates/classic/assets/icons/arrow-rise.svg +3 -0
- package/payload/templates/classic/assets/icons/download.svg +18 -0
- package/payload/templates/classic/assets/icons/lamp-on.png +0 -0
- package/payload/templates/classic/assets/icons/lamp.png +0 -0
- package/payload/templates/classic/assets/icons/lock-small.png +0 -0
- package/payload/templates/classic/assets/icons/lock.png +0 -0
- package/payload/templates/classic/assets/icons/logo.png +0 -0
- package/payload/templates/classic/assets/icons/trash-red.svg +2 -0
- package/payload/templates/classic/assets/icons/trash.svg +2 -0
- package/payload/templates/classic/assets/menu/t1.png +0 -0
- package/payload/templates/classic/assets/menu/t10.png +0 -0
- package/payload/templates/classic/assets/menu/t11.png +0 -0
- package/payload/templates/classic/assets/menu/t2.png +0 -0
- package/payload/templates/classic/assets/menu/t3.png +0 -0
- package/payload/templates/classic/assets/menu/t4.png +0 -0
- package/payload/templates/classic/assets/menu/t5.png +0 -0
- package/payload/templates/classic/assets/menu/t6.png +0 -0
- package/payload/templates/classic/assets/menu/t7.png +0 -0
- package/payload/templates/classic/assets/menu/t8.png +0 -0
- package/payload/templates/classic/assets/menu/t9.png +0 -0
- package/payload/templates/classic/assets/products/brokoli.png +0 -0
- package/payload/templates/classic/assets/products/cilek.png +0 -0
- package/payload/templates/classic/assets/products/domates.png +0 -0
- package/payload/templates/classic/assets/products/elma.png +0 -0
- package/payload/templates/classic/assets/products/havuc.png +0 -0
- package/payload/templates/classic/assets/products/karpuz.png +0 -0
- package/payload/templates/classic/assets/products/limon.png +0 -0
- package/payload/templates/classic/assets/products/muz.png +0 -0
- package/payload/templates/classic/assets/products/nar.png +0 -0
- package/payload/templates/classic/assets/products/patlican.png +0 -0
- package/payload/templates/classic/assets/products/yabanmersini.png +0 -0
- package/payload/templates/classic/assets/products/yesilbiber.png +0 -0
- package/payload/templates/classic/assets/tab-bar/settings.png +0 -0
- package/payload/templates/classic/assets/tab-bar/status.png +0 -0
- package/payload/templates/classic/assets/tab-bar/transactions.png +0 -0
- package/payload/templates/classic/assets/tabs/grid.png +0 -0
- package/payload/templates/classic/assets/tabs/grids.png +0 -0
- package/payload/templates/classic/assets/tabs/home.png +0 -0
- package/payload/templates/classic/assets/tabs/homes.png +0 -0
- package/payload/templates/classic/assets/tabs/search.png +0 -0
- package/payload/templates/classic/assets/tabs/searchs.png +0 -0
- package/payload/templates/classic/assets/tabs/settings.png +0 -0
- package/payload/templates/classic/assets/tabs/settingss.png +0 -0
- package/payload/templates/classic/assets/tabs/tasks.png +0 -0
- package/payload/templates/classic/assets/tabs/taskss.png +0 -0
- package/payload/templates/classic/html/privacy.htm +58 -0
- package/payload/templates/classic/index.htm +70 -0
- package/payload/templates/classic/pages/dialogs.js +205 -0
- package/payload/templates/classic/pages/example.js +296 -0
- package/payload/templates/classic/pages/examples.js +148 -0
- package/payload/templates/classic/pages/home.js +268 -0
- package/payload/templates/classic/pages/info-pages.js +95 -0
- package/payload/templates/classic/pages/lock.js +70 -0
- package/payload/templates/classic/pages/search.js +153 -0
- package/payload/templates/classic/pages/settings.js +184 -0
- package/payload/templates/classic/pages/tasks.js +221 -0
- package/payload/templates/classic/pages/template-pages.js +240 -0
- package/payload/templates/coffee-shop/TEMPLATE.md +63 -0
- package/payload/templates/coffee-shop/app/app.js +713 -0
- package/payload/templates/coffee-shop/app/settings.js +20 -0
- package/payload/templates/coffee-shop/app/store.js +52 -0
- package/payload/templates/coffee-shop/assets/cappuccino.png +0 -0
- package/payload/templates/coffee-shop/assets/chocolate-milk.png +0 -0
- package/payload/templates/coffee-shop/assets/coffee-art/cocoa.svg +1 -0
- package/payload/templates/coffee-shop/assets/coffee-art/filter.svg +1 -0
- package/payload/templates/coffee-shop/assets/coffee-art/frappe.svg +1 -0
- package/payload/templates/coffee-shop/assets/coffee-art/iced.svg +1 -0
- package/payload/templates/coffee-shop/assets/coffee-art/latte.svg +1 -0
- package/payload/templates/coffee-shop/assets/coffee-art/tea.svg +1 -0
- package/payload/templates/coffee-shop/assets/coffee.png +0 -0
- package/payload/templates/coffee-shop/assets/credits.txt +41 -0
- package/payload/templates/coffee-shop/assets/fonts/OFL.txt +93 -0
- package/payload/templates/coffee-shop/assets/fonts/gelasio-OFL.txt +93 -0
- package/payload/templates/coffee-shop/assets/fonts/gelasio.ttf +0 -0
- package/payload/templates/coffee-shop/assets/frappe.png +0 -0
- package/payload/templates/coffee-shop/assets/iced-caffee.png +0 -0
- package/payload/templates/coffee-shop/assets/tabs/cart.svg +1 -0
- package/payload/templates/coffee-shop/assets/tabs/home.svg +1 -0
- package/payload/templates/coffee-shop/assets/tabs/menu.svg +1 -0
- package/payload/templates/coffee-shop/assets/tabs/rewards.svg +1 -0
- package/payload/templates/coffee-shop/assets/tea.png +0 -0
- package/payload/templates/coffee-shop/components/coffee-ui.js +246 -0
- package/payload/templates/coffee-shop/index.htm +55 -0
- package/payload/templates/coffee-shop/pages/cart.js +82 -0
- package/payload/templates/coffee-shop/pages/drink.js +74 -0
- package/payload/templates/coffee-shop/pages/home.js +54 -0
- package/payload/templates/coffee-shop/pages/menu.js +53 -0
- package/payload/templates/coffee-shop/pages/rewards.js +38 -0
- package/payload/templates/forms/TEMPLATE.md +12 -0
- package/payload/templates/forms/app/app.js +30 -0
- package/payload/templates/forms/appointment-form.htm +969 -0
- package/payload/templates/forms/assets/error.png +0 -0
- package/payload/templates/forms/assets/logo.png +0 -0
- package/payload/templates/forms/assets/logo2.png +0 -0
- package/payload/templates/forms/assets/mail.png +0 -0
- package/payload/templates/forms/assets/success.png +0 -0
- package/payload/templates/forms/contact-form-iframe.htm +24 -0
- package/payload/templates/forms/contact-form-table.sql +11 -0
- package/payload/templates/forms/contact-form-to-mail.htm +358 -0
- package/payload/templates/forms/contact-form-to-supabase.htm +396 -0
- package/payload/templates/forms/dark-contact-form.htm +623 -0
- package/payload/templates/forms/event-registration-form.htm +1056 -0
- package/payload/templates/forms/feedback-form.htm +813 -0
- package/payload/templates/forms/order-form.htm +1187 -0
- package/payload/templates/forms/recruitment-form.htm +698 -0
- package/payload/templates/forms/service/PHPMailer/Exception.php +40 -0
- package/payload/templates/forms/service/PHPMailer/LICENSE +502 -0
- package/payload/templates/forms/service/PHPMailer/PHPMailer.php +5586 -0
- package/payload/templates/forms/service/PHPMailer/SMTP.php +1617 -0
- package/payload/templates/forms/service/readme.md +162 -0
- package/payload/templates/forms/service/send-form-mail.php +941 -0
- package/payload/templates/forms/support-ticket-form.htm +908 -0
- package/payload/templates/panel/TEMPLATE.md +16 -0
- package/payload/templates/panel/assets/_Material Symbols & Icons - Google Fonts.webloc +8 -0
- package/payload/templates/panel/assets/arrow_down.png +0 -0
- package/payload/templates/panel/assets/close.png +0 -0
- package/payload/templates/panel/assets/left-menu/bolt.png +0 -0
- package/payload/templates/panel/assets/left-menu/brick.png +0 -0
- package/payload/templates/panel/assets/left-menu/code.png +0 -0
- package/payload/templates/panel/assets/left-menu/dashboard.png +0 -0
- package/payload/templates/panel/assets/left-menu/data-table.png +0 -0
- package/payload/templates/panel/assets/left-menu/extension.png +0 -0
- package/payload/templates/panel/assets/left-menu/home.png +0 -0
- package/payload/templates/panel/assets/left-menu/reports.png +0 -0
- package/payload/templates/panel/assets/left-menu/setting.png +0 -0
- package/payload/templates/panel/assets/left-menu/url.png +0 -0
- package/payload/templates/panel/assets/light.png +0 -0
- package/payload/templates/panel/assets/maybe.png +0 -0
- package/payload/templates/panel/assets/panel-icon.png +0 -0
- package/payload/templates/panel/assets/top-bar/add.png +0 -0
- package/payload/templates/panel/assets/top-bar/add.svg +1 -0
- package/payload/templates/panel/assets/top-bar/apps.png +0 -0
- package/payload/templates/panel/assets/top-bar/apps.svg +1 -0
- package/payload/templates/panel/assets/top-bar/arrow-down.svg +1 -0
- package/payload/templates/panel/assets/top-bar/bell.svg +1 -0
- package/payload/templates/panel/assets/top-bar/bookmark.png +0 -0
- package/payload/templates/panel/assets/top-bar/bookmark.svg +1 -0
- package/payload/templates/panel/assets/top-bar/cancel.png +0 -0
- package/payload/templates/panel/assets/top-bar/close.svg +1 -0
- package/payload/templates/panel/assets/top-bar/comment.png +0 -0
- package/payload/templates/panel/assets/top-bar/filter.png +0 -0
- package/payload/templates/panel/assets/top-bar/keyboard.svg +1 -0
- package/payload/templates/panel/assets/top-bar/notification.png +0 -0
- package/payload/templates/panel/assets/top-bar/search.png +0 -0
- package/payload/templates/panel/assets/top-bar/search.svg +1 -0
- package/payload/templates/panel/assets/top-bar/user.png +0 -0
- package/payload/templates/panel/assets/top-bar/user.svg +1 -0
- package/payload/templates/panel/assets/warning.png +0 -0
- package/payload/templates/panel/common/bridge.js +1 -0
- package/payload/templates/panel/common/bridge.min.js +0 -0
- package/payload/templates/panel/common/components.js +12 -0
- package/payload/templates/panel/common/full-view.js +107 -0
- package/payload/templates/panel/common/full-view.min.js +1 -0
- package/payload/templates/panel/common/main-view.js +53 -0
- package/payload/templates/panel/common/main-view.min.js +1 -0
- package/payload/templates/panel/common/module-page.js +46 -0
- package/payload/templates/panel/common/module-page.min.js +1 -0
- package/payload/templates/panel/common/right-view.js +77 -0
- package/payload/templates/panel/common/right-view.min.js +1 -0
- package/payload/templates/panel/common/start-page.js +31 -0
- package/payload/templates/panel/common/start-page.min.js +1 -0
- package/payload/templates/panel/common/theme.js +491 -0
- package/payload/templates/panel/common/top-bar-v25-07-29-1.js +330 -0
- package/payload/templates/panel/common/top-bar-v25-07-29-2.js +265 -0
- package/payload/templates/panel/common/top-bar.js +855 -0
- package/payload/templates/panel/common/top-bar.min.js +1 -0
- package/payload/templates/panel/common/ui-standards.css +77 -0
- package/payload/templates/panel/common/ui-standards.js +133 -0
- package/payload/templates/panel/common/ui-standards.min.css +1 -0
- package/payload/templates/panel/common/ui-standards.min.js +1 -0
- package/payload/templates/panel/index.htm +642 -0
- package/payload/templates/panel/managers/database.js +1 -0
- package/payload/templates/panel/managers/database.min.js +1 -0
- package/payload/templates/panel/managers/login.js +2 -0
- package/payload/templates/panel/managers/login.min.js +1 -0
- package/payload/templates/panel/module1/empty-main.htm +26 -0
- package/payload/templates/panel/module10/greenhouse.htm +1361 -0
- package/payload/templates/panel/module11/arduino-projects.htm +1124 -0
- package/payload/templates/panel/module2/empty-full.htm +26 -0
- package/payload/templates/panel/module3/empty-right.htm +26 -0
- package/payload/templates/panel/module4/empty-main-topbar.htm +26 -0
- package/payload/templates/panel/module5/empty-right-topbar.htm +26 -0
- package/payload/templates/panel/module6/energy-hub.htm +1507 -0
- package/payload/templates/panel/module7/3d-printers.htm +1258 -0
- package/payload/templates/panel/module8/cold-rooms.htm +1250 -0
- package/payload/templates/panel/module9/elevator-fleet.htm +1488 -0
- package/payload/templates/panel/pages/_page-template.js +36 -0
- package/payload/templates/panel/pages/_page-template.min.js +1 -0
- package/payload/templates/panel/pages/activity.js +1072 -0
- package/payload/templates/panel/pages/contents.js +1555 -0
- package/payload/templates/panel/pages/contents.min.js +1 -0
- package/payload/templates/panel/pages/customers.js +1171 -0
- package/payload/templates/panel/pages/edit-user.js +381 -0
- package/payload/templates/panel/pages/edit-user.min.js +1 -0
- package/payload/templates/panel/pages/edit-users-table.min.js +1 -0
- package/payload/templates/panel/pages/home.js +637 -0
- package/payload/templates/panel/pages/home.min.js +1 -0
- package/payload/templates/panel/pages/media.js +1538 -0
- package/payload/templates/panel/pages/notifications.js +542 -0
- package/payload/templates/panel/pages/notifications.min.js +1 -0
- package/payload/templates/panel/pages/orders.js +1147 -0
- package/payload/templates/panel/pages/products.js +1281 -0
- package/payload/templates/panel/pages/reports.js +1138 -0
- package/payload/templates/panel/pages/reports.min.js +1 -0
- package/payload/templates/panel/pages/roles.js +1096 -0
- package/payload/templates/panel/pages/settings.js +1462 -0
- package/payload/templates/panel/pages/settings.min.js +1 -0
- package/payload/templates/panel/pages/user-actions.js +456 -0
- package/payload/templates/panel/pages/user-actions.min.js +2 -0
- package/payload/templates/panel/pages/user-list.js +1113 -0
- package/payload/templates/panel/pages/users.js +334 -0
- package/payload/templates/panel/pages/users.min.js +1 -0
- package/payload/templates/shop/TEMPLATE.md +69 -0
- package/payload/templates/shop/app/app.js +727 -0
- package/payload/templates/shop/app/art.js +89 -0
- package/payload/templates/shop/app/settings.js +45 -0
- package/payload/templates/shop/app/store.js +239 -0
- package/payload/templates/shop/app/texts.js +232 -0
- package/payload/templates/shop/assets/app-icon.svg +1 -0
- package/payload/templates/shop/assets/tabs/account.svg +1 -0
- package/payload/templates/shop/assets/tabs/cart.svg +1 -0
- package/payload/templates/shop/assets/tabs/home.svg +1 -0
- package/payload/templates/shop/assets/tabs/shop.svg +1 -0
- package/payload/templates/shop/components/shop-ui.js +343 -0
- package/payload/templates/shop/index.htm +57 -0
- package/payload/templates/shop/pages/account.js +190 -0
- package/payload/templates/shop/pages/cart.js +116 -0
- package/payload/templates/shop/pages/checkout.js +134 -0
- package/payload/templates/shop/pages/favorites.js +37 -0
- package/payload/templates/shop/pages/home.js +86 -0
- package/payload/templates/shop/pages/orders.js +132 -0
- package/payload/templates/shop/pages/product.js +168 -0
- package/payload/templates/shop/pages/shop.js +113 -0
- package/payload/templates/starter/TEMPLATE.md +107 -0
- package/payload/templates/starter/app/app.js +660 -0
- package/payload/templates/starter/app/settings.js +57 -0
- package/payload/templates/starter/assets/app-icon.svg +5 -0
- package/payload/templates/starter/assets/products/brokoli.png +0 -0
- package/payload/templates/starter/assets/products/cilek.png +0 -0
- package/payload/templates/starter/assets/products/domates.png +0 -0
- package/payload/templates/starter/assets/products/elma.png +0 -0
- package/payload/templates/starter/assets/products/havuc.png +0 -0
- package/payload/templates/starter/assets/products/karpuz.png +0 -0
- package/payload/templates/starter/assets/products/limon.png +0 -0
- package/payload/templates/starter/assets/products/muz.png +0 -0
- package/payload/templates/starter/assets/products/nar.png +0 -0
- package/payload/templates/starter/assets/products/patlican.png +0 -0
- package/payload/templates/starter/assets/products/yabanmersini.png +0 -0
- package/payload/templates/starter/assets/products/yesilbiber.png +0 -0
- package/payload/templates/starter/assets/tabs/grid.png +0 -0
- package/payload/templates/starter/assets/tabs/grids.png +0 -0
- package/payload/templates/starter/assets/tabs/home.png +0 -0
- package/payload/templates/starter/assets/tabs/homes.png +0 -0
- package/payload/templates/starter/assets/tabs/settings.png +0 -0
- package/payload/templates/starter/assets/tabs/settingss.png +0 -0
- package/payload/templates/starter/assets/tabs/tasks.png +0 -0
- package/payload/templates/starter/assets/tabs/taskss.png +0 -0
- package/payload/templates/starter/html/about.htm +54 -0
- package/payload/templates/starter/index.htm +57 -0
- package/payload/templates/starter/pages/about.js +23 -0
- package/payload/templates/starter/pages/home.js +81 -0
- package/payload/templates/starter/pages/product.js +45 -0
- package/payload/templates/starter/pages/products.js +61 -0
- package/payload/templates/starter/pages/settings.js +103 -0
- package/payload/templates/starter/pages/tasks.js +187 -0
- package/payload/templates/starter/pages/website.js +29 -0
|
@@ -0,0 +1,1124 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
|
|
5
|
+
<title>Arduino Projects</title>
|
|
6
|
+
|
|
7
|
+
<meta charset="UTF-8">
|
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
9
|
+
|
|
10
|
+
<!-- LIBRARY FILES -->
|
|
11
|
+
<link rel="preload" href="../_basic/basic/font/open-sans/OpenSans-Regular.ttf" as="font" crossorigin="anonymous">
|
|
12
|
+
<link rel="stylesheet" type="text/css" href="../_basic/basic/basic.min.css">
|
|
13
|
+
<script src="../_basic/basic/basic.js" type="text/javascript" charset="utf-8"></script>
|
|
14
|
+
<script src="../common/theme.js" type="text/javascript" charset="utf-8"></script>
|
|
15
|
+
<script src="../_basic/basic/scroll-bar.js" type="text/javascript" charset="utf-8"></script>
|
|
16
|
+
|
|
17
|
+
<!-- COMPONENTS -->
|
|
18
|
+
<script src="../_basic/comp/tiny-select.js" type="text/javascript" charset="utf-8"></script>
|
|
19
|
+
<script src="../_basic/comp/tiny-table.js" type="text/javascript" charset="utf-8"></script>
|
|
20
|
+
<script src="../_basic/comp/toggle.js" type="text/javascript" charset="utf-8"></script>
|
|
21
|
+
<script src="../_basic/comp/slider.js" type="text/javascript" charset="utf-8"></script>
|
|
22
|
+
<script src="../_basic/comp/smart-button.js" type="text/javascript" charset="utf-8"></script>
|
|
23
|
+
<script src="../_basic/comp/dialog.js" type="text/javascript" charset="utf-8"></script>
|
|
24
|
+
<script src="../_basic/comp/radio-button.js" type="text/javascript" charset="utf-8"></script>
|
|
25
|
+
<script src="../_basic/comp/hold-to-confirm-button.js" type="text/javascript" charset="utf-8"></script>
|
|
26
|
+
<script src="../_basic/comp/progress-bar.js" type="text/javascript" charset="utf-8"></script>
|
|
27
|
+
<script src="../_basic/comp/spark-line-box.js" type="text/javascript" charset="utf-8"></script>
|
|
28
|
+
<script src="../_basic/comp/chart-box.js" type="text/javascript" charset="utf-8"></script>
|
|
29
|
+
<script src="../_basic/comp/context-menu.js" type="text/javascript" charset="utf-8"></script>
|
|
30
|
+
<script src="../_basic/comp/gauge.js" type="text/javascript" charset="utf-8"></script>
|
|
31
|
+
<script src="../_basic/comp/tabs.js" type="text/javascript" charset="utf-8"></script>
|
|
32
|
+
<script src="../_basic/comp/stepper.js" type="text/javascript" charset="utf-8"></script>
|
|
33
|
+
|
|
34
|
+
<!--
|
|
35
|
+
|
|
36
|
+
/* Bismillah */
|
|
37
|
+
|
|
38
|
+
Module #11: Arduino Projects (Template) - v26.09
|
|
39
|
+
|
|
40
|
+
- Managing a small fleet of Arduino / ESP boards: the board and its firmware, live telemetry
|
|
41
|
+
(free RAM, loop frequency, Wi-Fi signal, sensors), the pins, the serial monitor, the
|
|
42
|
+
libraries of the sketch and the outputs of the board.
|
|
43
|
+
- Everything is built from the components of the kit: Gauge, SparkLineBox, ChartBox, Tabs,
|
|
44
|
+
TinyTable, ProgressBar, Stepper, Slider, Toggle, RadioButton, TinySelect, ContextMenu,
|
|
45
|
+
SmartButton, HoldToConfirmButton, Dialog and ScrollBar.
|
|
46
|
+
- Runs inside the admin panel (iframe), but it can work alone too.
|
|
47
|
+
- Simulation: 1 second = 1 second of the board. Replace the "BOARD SERVICE" functions with
|
|
48
|
+
your own link to the boards (serial, MQTT, HTTP, WebSocket...).
|
|
49
|
+
|
|
50
|
+
-->
|
|
51
|
+
|
|
52
|
+
<script>
|
|
53
|
+
|
|
54
|
+
// *** CONSTANTS:
|
|
55
|
+
const LIB_PATH = "../_basic/";
|
|
56
|
+
const ASSETS = "../assets/";
|
|
57
|
+
|
|
58
|
+
const PAGE_COLOR = T.page;
|
|
59
|
+
const CARD_COLOR = T.surface;
|
|
60
|
+
const CARD_BORDER_COLOR = Ink(0.1);
|
|
61
|
+
const FIELD_COLOR = T.surface2;
|
|
62
|
+
const PRIMARY_COLOR = "#2F7E78"; // Arduino teal
|
|
63
|
+
const ACCENT_COLOR = T.accent;
|
|
64
|
+
const WARNING_COLOR = T.warning;
|
|
65
|
+
const DANGER_COLOR = "#C9564B";
|
|
66
|
+
const TEMP_COLOR = "#E0715A";
|
|
67
|
+
const HUM_COLOR = "#5A8FE0";
|
|
68
|
+
|
|
69
|
+
const CHART_COUNT = 40; // Points on the chart
|
|
70
|
+
const KPI_COUNT = 30; // Points of a SparkLineBox
|
|
71
|
+
const SERIAL_MAX_LINES = 120;
|
|
72
|
+
|
|
73
|
+
// *** BOARDS (the data that would come from your service):
|
|
74
|
+
|
|
75
|
+
const BOARDS = [
|
|
76
|
+
{
|
|
77
|
+
id: "uno",
|
|
78
|
+
name: "Line Counter",
|
|
79
|
+
board: "Arduino Uno R4 WiFi",
|
|
80
|
+
mcu: "RA4M1 · 48 MHz",
|
|
81
|
+
flashKB: 256, ramKB: 32,
|
|
82
|
+
sketch: "line-counter.ino", version: "1.4.2",
|
|
83
|
+
sketchKB: 96, ramUsedKB: 12,
|
|
84
|
+
ip: "192.168.1.51", mac: "A8:61:0A:44:12:9C",
|
|
85
|
+
color: ACCENT_COLOR,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: "esp32",
|
|
89
|
+
name: "Greenhouse Node",
|
|
90
|
+
board: "ESP32-S3 DevKitC",
|
|
91
|
+
mcu: "Xtensa LX7 · 240 MHz",
|
|
92
|
+
flashKB: 8192, ramKB: 512,
|
|
93
|
+
sketch: "greenhouse-node.ino", version: "2.0.0",
|
|
94
|
+
sketchKB: 1240, ramUsedKB: 186,
|
|
95
|
+
ip: "192.168.1.52", mac: "3C:61:05:12:AA:04",
|
|
96
|
+
color: "#7E6BC4",
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: "nano",
|
|
100
|
+
name: "Door Sensor",
|
|
101
|
+
board: "Arduino Nano 33 IoT",
|
|
102
|
+
mcu: "SAMD21 · 48 MHz",
|
|
103
|
+
flashKB: 256, ramKB: 32,
|
|
104
|
+
sketch: "door-sensor.ino", version: "0.9.1",
|
|
105
|
+
sketchKB: 74, ramUsedKB: 9,
|
|
106
|
+
ip: "192.168.1.53", mac: "F4:12:FA:90:31:77",
|
|
107
|
+
color: T.warning,
|
|
108
|
+
},
|
|
109
|
+
];
|
|
110
|
+
|
|
111
|
+
// The pins of a sketch. (mode: "IN", "OUT", "PWM", "ANALOG")
|
|
112
|
+
const PIN_TEMPLATE = [
|
|
113
|
+
{ pin: "D2", mode: "IN", label: "Start button", value: 0 },
|
|
114
|
+
{ pin: "D3", mode: "IN", label: "Photo barrier", value: 1 },
|
|
115
|
+
{ pin: "D5", mode: "PWM", label: "Fan speed", value: 60 },
|
|
116
|
+
{ pin: "D7", mode: "OUT", label: "Status LED", value: 1 },
|
|
117
|
+
{ pin: "D8", mode: "OUT", label: "Relay", value: 0 },
|
|
118
|
+
{ pin: "D9", mode: "OUT", label: "Buzzer", value: 0 },
|
|
119
|
+
{ pin: "A0", mode: "ANALOG", label: "Temperature (NTC)", value: 512 },
|
|
120
|
+
{ pin: "A1", mode: "ANALOG", label: "Humidity", value: 430 },
|
|
121
|
+
];
|
|
122
|
+
|
|
123
|
+
const LIBRARIES = [
|
|
124
|
+
["ArduinoJson", "7.1.0", "Benoit Blanchon"],
|
|
125
|
+
["PubSubClient", "2.8.0", "Nick O'Leary"],
|
|
126
|
+
["DHT sensor library", "1.4.6", "Adafruit"],
|
|
127
|
+
["WiFiNINA", "1.8.14", "Arduino"],
|
|
128
|
+
["OneWire", "2.3.8", "Paul Stoffregen"],
|
|
129
|
+
];
|
|
130
|
+
|
|
131
|
+
const MODES = [
|
|
132
|
+
{ id: "auto", label: "Auto", desc: "The sketch decides" },
|
|
133
|
+
{ id: "manual", label: "Manual", desc: "You drive the outputs" },
|
|
134
|
+
];
|
|
135
|
+
|
|
136
|
+
// *** VARIABLES:
|
|
137
|
+
|
|
138
|
+
let boards = [];
|
|
139
|
+
let board = null; // The board that is shown
|
|
140
|
+
let isReady = 0;
|
|
141
|
+
let isRendering = 0; // WHY: Setters call onChange. A value written by code is not a user change.
|
|
142
|
+
let simSecond = 0;
|
|
143
|
+
|
|
144
|
+
let boardSelect, lblSubtitle, lblStatus, lblClock, lblUptime, moreMenu;
|
|
145
|
+
let alertBox, lblAlert, btnAlertClose;
|
|
146
|
+
let gaugeVoltage, gaugeTemp;
|
|
147
|
+
let boardInfo = {};
|
|
148
|
+
let progressFlash, progressRam, progressUpload, lblUploadInfo, btnUpload;
|
|
149
|
+
let kpiBoxList = [];
|
|
150
|
+
let chartSensors;
|
|
151
|
+
let tabs, pinTable, libraryTable, serialBox, serialGroup, serialInput, serialScrollBar;
|
|
152
|
+
let outputToggles = {}, pwmSlider, lblPwm, intervalStepper;
|
|
153
|
+
let boardTable, eventTable;
|
|
154
|
+
|
|
155
|
+
// *** START:
|
|
156
|
+
|
|
157
|
+
const start = function () {
|
|
158
|
+
|
|
159
|
+
page.color = PAGE_COLOR;
|
|
160
|
+
|
|
161
|
+
BOARDS.forEach(initBoard);
|
|
162
|
+
board = boards[0];
|
|
163
|
+
|
|
164
|
+
// A little history, so the graphs are not empty at the start.
|
|
165
|
+
for (let i = 0; i < CHART_COUNT; i++) {
|
|
166
|
+
simSecond = i;
|
|
167
|
+
boards.forEach(function (b) { readSensors(b, 1); });
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// BOX: Full screen scrollable container
|
|
171
|
+
// WHY: page does not scroll. Scrollable content must be inside a Box with scrollY: 1.
|
|
172
|
+
startBox(0, 0, "100%", "100%", {
|
|
173
|
+
color: "transparent",
|
|
174
|
+
scrollY: 1,
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
VGroup({
|
|
178
|
+
width: "100%",
|
|
179
|
+
height: "auto", // Grows with content, so the Box can scroll.
|
|
180
|
+
align: "left top",
|
|
181
|
+
gap: 16,
|
|
182
|
+
padding: 24,
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
initHeader();
|
|
186
|
+
initAlert();
|
|
187
|
+
initHeroRow();
|
|
188
|
+
initKpiRow();
|
|
189
|
+
initChartRow();
|
|
190
|
+
initTabsRow();
|
|
191
|
+
initControlRow();
|
|
192
|
+
initBottomRow();
|
|
193
|
+
|
|
194
|
+
endGroup();
|
|
195
|
+
|
|
196
|
+
endBox();
|
|
197
|
+
|
|
198
|
+
// WHY: The point count was calculated with the default width (before flex).
|
|
199
|
+
kpiBoxList.forEach(function (kpiBox) { kpiBox.refresh(); });
|
|
200
|
+
|
|
201
|
+
isReady = 1;
|
|
202
|
+
selectBoard(0);
|
|
203
|
+
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
// Runs every second.
|
|
207
|
+
const loop = function () {
|
|
208
|
+
|
|
209
|
+
if (!isReady) return;
|
|
210
|
+
|
|
211
|
+
simSecond++;
|
|
212
|
+
|
|
213
|
+
boards.forEach(function (b) {
|
|
214
|
+
if (b.isOnline) readSensors(b); // WHY: an offline board sends nothing (its serial lines and charts went on)
|
|
215
|
+
stepUpload(b);
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
renderLive();
|
|
219
|
+
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
// *** BOARD SERVICE (replace with your own link to the boards):
|
|
223
|
+
|
|
224
|
+
const initBoard = function (data) {
|
|
225
|
+
|
|
226
|
+
const b = Object.assign({}, data);
|
|
227
|
+
|
|
228
|
+
b.isOnline = 1;
|
|
229
|
+
b.mode = "auto";
|
|
230
|
+
b.uptimeS = 3600 * 6 + 1200 + Math.round(Math.random() * 600);
|
|
231
|
+
b.intervalMs = 1000;
|
|
232
|
+
b.pwm = 60;
|
|
233
|
+
b.pins = PIN_TEMPLATE.map(function (p) { return Object.assign({}, p); });
|
|
234
|
+
b.temperature = 22 + Math.random() * 3;
|
|
235
|
+
b.humidity = 48 + Math.random() * 6;
|
|
236
|
+
b.voltage = 4.98;
|
|
237
|
+
b.mcuTemp = 38;
|
|
238
|
+
b.freeRamKB = b.ramKB - b.ramUsedKB;
|
|
239
|
+
b.loopHz = 980;
|
|
240
|
+
b.rssi = -54;
|
|
241
|
+
b.upload = { isRunning: 0, percent: 0, step: "" };
|
|
242
|
+
b.serial = [];
|
|
243
|
+
b.events = [];
|
|
244
|
+
b.history = { temperature: [], humidity: [], freeRam: [], loopHz: [], rssi: [] };
|
|
245
|
+
b.labels = [];
|
|
246
|
+
|
|
247
|
+
addSerial(b, "Booting " + b.sketch + " v" + b.version);
|
|
248
|
+
addSerial(b, "WiFi connected, IP " + b.ip);
|
|
249
|
+
addEvent(b, "Info", "Board connected");
|
|
250
|
+
|
|
251
|
+
boards.push(b);
|
|
252
|
+
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
// One reading of every sensor. (quiet: no events, used to fill the history)
|
|
256
|
+
const readSensors = function (b, quiet) {
|
|
257
|
+
|
|
258
|
+
const wave = Math.sin(simSecond / 14) ;
|
|
259
|
+
b.temperature = 23 + wave * 2.2 + (Math.random() - 0.5) * 0.4;
|
|
260
|
+
b.humidity = 50 - wave * 4 + (Math.random() - 0.5) * 1.2;
|
|
261
|
+
b.voltage = 4.92 + Math.random() * 0.14;
|
|
262
|
+
b.mcuTemp = 36 + wave * 4 + Math.random();
|
|
263
|
+
b.freeRamKB = Math.max(1, b.ramKB - b.ramUsedKB - Math.random() * 2);
|
|
264
|
+
b.loopHz = 900 + Math.round(Math.random() * 180);
|
|
265
|
+
b.rssi = -48 - Math.round(Math.random() * 22);
|
|
266
|
+
b.uptimeS++;
|
|
267
|
+
|
|
268
|
+
// The analog pins follow the sensors.
|
|
269
|
+
b.pins.forEach(function (p) {
|
|
270
|
+
if (p.pin === "A0") p.value = Math.round(b.temperature / 50 * 1023);
|
|
271
|
+
if (p.pin === "A1") p.value = Math.round(b.humidity / 100 * 1023);
|
|
272
|
+
if (p.mode === "PWM") p.value = b.pwm;
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
// In Auto mode the sketch drives the outputs.
|
|
276
|
+
if (b.mode === "auto") {
|
|
277
|
+
setPinValue(b, "D7", 1);
|
|
278
|
+
setPinValue(b, "D8", (b.temperature > 24.5) ? 1 : 0);
|
|
279
|
+
setPinValue(b, "D9", 0);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
pushHistory(b);
|
|
283
|
+
|
|
284
|
+
if (quiet) return;
|
|
285
|
+
|
|
286
|
+
// Now and then a line on the serial port.
|
|
287
|
+
if (simSecond % 5 === 0) {
|
|
288
|
+
addSerial(b, "T=" + b.temperature.toFixed(1) + "C H=" + b.humidity.toFixed(0) + "% RAM=" + Math.round(b.freeRamKB) + "kB");
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
if (b.voltage < 4.9 && !b.lowVoltage) {
|
|
292
|
+
b.lowVoltage = 1;
|
|
293
|
+
addEvent(b, "Warning", "Supply voltage under 4.90 V");
|
|
294
|
+
} else if (b.voltage >= 4.95) {
|
|
295
|
+
b.lowVoltage = 0;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
const pushHistory = function (b) {
|
|
301
|
+
const push = function (list, value) {
|
|
302
|
+
list.push(value);
|
|
303
|
+
if (list.length > CHART_COUNT) list.shift();
|
|
304
|
+
};
|
|
305
|
+
push(b.history.temperature, Number(b.temperature.toFixed(2)));
|
|
306
|
+
push(b.history.humidity, Number(b.humidity.toFixed(1)));
|
|
307
|
+
push(b.history.freeRam, Number(b.freeRamKB.toFixed(1)));
|
|
308
|
+
push(b.history.loopHz, b.loopHz);
|
|
309
|
+
push(b.history.rssi, b.rssi);
|
|
310
|
+
push(b.labels, formatClock(b.uptimeS));
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
const setPinValue = function (b, pin, value) {
|
|
314
|
+
const item = b.pins.find(function (p) { return p.pin === pin; });
|
|
315
|
+
if (item) item.value = value;
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
const getPin = function (b, pin) {
|
|
319
|
+
return b.pins.find(function (p) { return p.pin === pin; });
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
const addSerial = function (b, text) {
|
|
323
|
+
b.serial.push({ time: formatClock(b.uptimeS || 0), text: text });
|
|
324
|
+
if (b.serial.length > SERIAL_MAX_LINES) b.serial.shift();
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
const addEvent = function (b, level, message) {
|
|
328
|
+
b.events.unshift({ time: new Date().toLocaleTimeString("en-GB"), level: level, message: message });
|
|
329
|
+
if (b.events.length > 40) b.events.pop();
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
// *** UPLOAD (flashing the sketch):
|
|
333
|
+
|
|
334
|
+
const startUpload = function (b) {
|
|
335
|
+
if (b.upload.isRunning) return;
|
|
336
|
+
if (!b.isOnline) {
|
|
337
|
+
addEvent(b, "Error", "Upload failed: the board is offline");
|
|
338
|
+
renderLive();
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
b.upload = { isRunning: 1, percent: 0, step: "Compiling" };
|
|
342
|
+
addSerial(b, "--- Upload started ---");
|
|
343
|
+
addEvent(b, "Info", "Upload started: " + b.sketch);
|
|
344
|
+
renderLive();
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
const stepUpload = function (b) {
|
|
348
|
+
|
|
349
|
+
if (!b.upload.isRunning) return;
|
|
350
|
+
|
|
351
|
+
b.upload.percent = Math.min(100, b.upload.percent + 8 + Math.random() * 10);
|
|
352
|
+
b.upload.step = (b.upload.percent < 35) ? "Compiling" : (b.upload.percent < 90) ? "Writing flash" : "Verifying";
|
|
353
|
+
|
|
354
|
+
if (b.upload.percent >= 100) {
|
|
355
|
+
b.upload.isRunning = 0;
|
|
356
|
+
b.upload.step = "Done";
|
|
357
|
+
b.version = nextVersion(b.version);
|
|
358
|
+
b.uptimeS = 0;
|
|
359
|
+
addSerial(b, "--- Upload finished, board restarted ---");
|
|
360
|
+
addSerial(b, "Booting " + b.sketch + " v" + b.version);
|
|
361
|
+
addEvent(b, "Success", "Uploaded and restarted (v" + b.version + ")");
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
const nextVersion = function (version) {
|
|
367
|
+
const parts = String(version).split(".");
|
|
368
|
+
parts[2] = String(Number(parts[2] || 0) + 1);
|
|
369
|
+
return parts.join(".");
|
|
370
|
+
};
|
|
371
|
+
|
|
372
|
+
// *** VIEW:
|
|
373
|
+
|
|
374
|
+
const initHeader = function () {
|
|
375
|
+
|
|
376
|
+
startSpaceBetween(16);
|
|
377
|
+
that.elem.style.flexWrap = "wrap";
|
|
378
|
+
|
|
379
|
+
HGroup({ width: "auto", height: "auto", align: "left center", gap: 20 });
|
|
380
|
+
that.elem.style.flexWrap = "wrap";
|
|
381
|
+
|
|
382
|
+
VGroup({ width: "auto", height: "auto", align: "left top", gap: 0 });
|
|
383
|
+
Label({ text: "Arduino Projects", fontSize: 26, textColor: Ink(0.95) });
|
|
384
|
+
that.elem.style.fontFamily = "opensans-bold";
|
|
385
|
+
lblSubtitle = Label({ text: "", fontSize: 14, textColor: Ink(0.5) });
|
|
386
|
+
endGroup();
|
|
387
|
+
|
|
388
|
+
boardSelect = TinySelect({
|
|
389
|
+
title: "Board",
|
|
390
|
+
list: BOARDS.map(function (b) { return { id: b.id, label: b.name }; }),
|
|
391
|
+
height: 40, fontSize: 15, color: CARD_COLOR, border: 1, borderColor: CARD_BORDER_COLOR, round: 8,
|
|
392
|
+
labelTextColor: Ink(0.95),
|
|
393
|
+
arrowIcon: LIB_PATH + "comp/tiny-select/arrow.svg", arrowSize: 20, invertIconColor: T.invertIcon,
|
|
394
|
+
listFontSize: 15, listTextColor: Ink(0.85), listOverTextColor: ACCENT_COLOR,
|
|
395
|
+
listBackgroundColor: FIELD_COLOR, listBorderColor: Ink(0.15),
|
|
396
|
+
onSelect: function (index) { if (isReady) selectBoard(index); },
|
|
397
|
+
});
|
|
398
|
+
boardSelect.lblTitle.textColor = Ink(0.5);
|
|
399
|
+
|
|
400
|
+
lblStatus = Label({ text: "", fontSize: 13, round: 100, border: 1, padding: [12, 4] });
|
|
401
|
+
lblStatus.elem.style.whiteSpace = "nowrap";
|
|
402
|
+
|
|
403
|
+
endGroup();
|
|
404
|
+
|
|
405
|
+
HGroup({ width: "auto", height: "auto", align: "right center", gap: 16 });
|
|
406
|
+
|
|
407
|
+
VGroup({ width: "auto", height: "auto", align: "right center", gap: 0 });
|
|
408
|
+
lblClock = Label({ text: "", fontSize: 22, textColor: Ink(0.95) });
|
|
409
|
+
that.elem.style.fontVariantNumeric = "tabular-nums";
|
|
410
|
+
lblUptime = Label({ text: "", fontSize: 12, textColor: Ink(0.5) });
|
|
411
|
+
that.elem.style.whiteSpace = "nowrap";
|
|
412
|
+
endGroup();
|
|
413
|
+
|
|
414
|
+
const btnMore = createButton("More", "top-bar/apps.png", function () { });
|
|
415
|
+
moreMenu = ContextMenu({
|
|
416
|
+
items: [
|
|
417
|
+
{ text: "Send a test line to the serial port", key: "serial" },
|
|
418
|
+
{ text: "Test: Wi-Fi signal drops", key: "rssi" },
|
|
419
|
+
{ text: "Test: Board goes offline", key: "offline" },
|
|
420
|
+
{ type: "separator" },
|
|
421
|
+
{ text: "Clear the serial monitor", key: "clear" },
|
|
422
|
+
],
|
|
423
|
+
styleName: (T.isDark) ? "dark" : "classic", // WHY: ContextMenu has no "modern" (T.compStyle of the light theme)
|
|
424
|
+
onSelect: function (self, item) { runTestAction(item.key); },
|
|
425
|
+
});
|
|
426
|
+
moreMenu.attachTo(btnMore, "click");
|
|
427
|
+
|
|
428
|
+
endGroup();
|
|
429
|
+
|
|
430
|
+
endGroup();
|
|
431
|
+
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
const initAlert = function () {
|
|
435
|
+
|
|
436
|
+
alertBox = HGroup({ width: "100%", height: "auto", align: "left center", gap: 12, padding: [14, 10], round: 10, border: 1, visible: 0 });
|
|
437
|
+
lblAlert = Label({ text: "", fontSize: 14, grow: 1 });
|
|
438
|
+
btnAlertClose = createButton("Dismiss", "", function () { hideAlert(); });
|
|
439
|
+
endGroup();
|
|
440
|
+
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
const showAlert = function (text, color) {
|
|
444
|
+
lblAlert.text = text;
|
|
445
|
+
lblAlert.textColor = color;
|
|
446
|
+
alertBox.color = ChartBox.alpha(color, 0.12);
|
|
447
|
+
alertBox.borderColor = ChartBox.alpha(color, 0.4);
|
|
448
|
+
alertBox.visible = 1;
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
const hideAlert = function () {
|
|
452
|
+
alertBox.visible = 0;
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
const initHeroRow = function () {
|
|
456
|
+
|
|
457
|
+
startRow();
|
|
458
|
+
|
|
459
|
+
// CARD: The board
|
|
460
|
+
startCard("Board", "Live telemetry", "2 1 460px");
|
|
461
|
+
|
|
462
|
+
// GAUGES: comp/gauge.js (half arc)
|
|
463
|
+
HGroup({ width: "100%", height: "auto", align: "center center", gap: 30, wrap: 1 });
|
|
464
|
+
that.clipContent = 0;
|
|
465
|
+
|
|
466
|
+
gaugeVoltage = Gauge({
|
|
467
|
+
width: 180, height: 120, styleName: T.compStyle,
|
|
468
|
+
startAngle: -90, sweepAngle: 180, radius: 54,
|
|
469
|
+
minValue: 0, maxValue: 6, value: 5, decimals: 2,
|
|
470
|
+
valueSuffix: " V", titleText: "Supply",
|
|
471
|
+
markerValue: 5, // The nominal voltage
|
|
472
|
+
style: { bar: { color: ACCENT_COLOR, width: 10 }, track: { width: 10 }, value: { fontSize: 24 }, sub: { fontSize: 12 } },
|
|
473
|
+
});
|
|
474
|
+
gaugeVoltage.elem.style.flexShrink = "0";
|
|
475
|
+
|
|
476
|
+
gaugeTemp = Gauge({
|
|
477
|
+
width: 180, height: 120, styleName: T.compStyle,
|
|
478
|
+
startAngle: -90, sweepAngle: 180, radius: 54,
|
|
479
|
+
minValue: 0, maxValue: 90, value: 38,
|
|
480
|
+
valueSuffix: "°", titleText: "MCU",
|
|
481
|
+
markerValue: 70, // The limit
|
|
482
|
+
style: { bar: { color: TEMP_COLOR, width: 10 }, track: { width: 10 }, value: { fontSize: 24 }, sub: { fontSize: 12 } },
|
|
483
|
+
});
|
|
484
|
+
gaugeTemp.elem.style.flexShrink = "0";
|
|
485
|
+
|
|
486
|
+
endGroup();
|
|
487
|
+
|
|
488
|
+
VGroup({ width: "100%", height: "auto", align: "left top", gap: 0 });
|
|
489
|
+
boardInfo.board = createInfoLine("Model", 1);
|
|
490
|
+
boardInfo.mcu = createInfoLine("MCU");
|
|
491
|
+
boardInfo.ip = createInfoLine("IP address");
|
|
492
|
+
boardInfo.mac = createInfoLine("MAC");
|
|
493
|
+
boardInfo.uptime = createInfoLine("Uptime");
|
|
494
|
+
endGroup();
|
|
495
|
+
|
|
496
|
+
endCard();
|
|
497
|
+
|
|
498
|
+
// CARD: The firmware
|
|
499
|
+
startCard("Firmware", "Sketch and memory", "1 1 340px");
|
|
500
|
+
|
|
501
|
+
VGroup({ width: "100%", height: "auto", align: "left top", gap: 0 });
|
|
502
|
+
boardInfo.sketch = createInfoLine("Sketch", 1);
|
|
503
|
+
boardInfo.version = createInfoLine("Version");
|
|
504
|
+
endGroup();
|
|
505
|
+
|
|
506
|
+
VGroup({ width: "100%", height: "auto", align: "left top", gap: 10 });
|
|
507
|
+
progressFlash = createProgress("Flash", PRIMARY_COLOR);
|
|
508
|
+
progressRam = createProgress("RAM", "#7E6BC4");
|
|
509
|
+
endGroup();
|
|
510
|
+
|
|
511
|
+
VGroup({ width: "100%", height: "auto", align: "left top", gap: 8 });
|
|
512
|
+
that.elem.style.paddingTop = "6px";
|
|
513
|
+
that.elem.style.borderTop = "1px solid " + Ink(0.06);
|
|
514
|
+
|
|
515
|
+
btnUpload = HoldToConfirmButton({
|
|
516
|
+
width: "100%",
|
|
517
|
+
height: 38,
|
|
518
|
+
labelText: "Hold to Upload Sketch",
|
|
519
|
+
completedText: "UPLOADING",
|
|
520
|
+
iconFile: ASSETS + "left-menu/bolt.png",
|
|
521
|
+
holdingIconFile: ASSETS + "left-menu/bolt.png",
|
|
522
|
+
holdDuration: 1200,
|
|
523
|
+
resetDelay: 2500,
|
|
524
|
+
style: {
|
|
525
|
+
layout: { gap: 8, padding: [14, 0] },
|
|
526
|
+
icon: { width: 18, height: 18 },
|
|
527
|
+
label: { fontSize: 14, textColor: Ink(0.9) },
|
|
528
|
+
holdingLabel: { fontSize: 14, textColor: "#B03A2E" },
|
|
529
|
+
completedLabel: { fontSize: 14, textColor: T.primaryActive },
|
|
530
|
+
box: { color: FIELD_COLOR, border: 1, borderColor: CARD_BORDER_COLOR, round: 8 },
|
|
531
|
+
holdingBox: { color: "#FFD1CB", borderColor: DANGER_COLOR, round: 8 },
|
|
532
|
+
completedBox: { color: "#DFEFE6", borderColor: ACCENT_COLOR, round: 8 },
|
|
533
|
+
},
|
|
534
|
+
onConfirm: function () { startUpload(board); },
|
|
535
|
+
});
|
|
536
|
+
btnUpload.icon.elem.style.filter = T.iconFilter; // WHY: Only the normal icon is on a dark background.
|
|
537
|
+
|
|
538
|
+
progressUpload = ProgressBar({
|
|
539
|
+
width: "100%", value: 0, styleName: "modern",
|
|
540
|
+
valueFormat: function (self) { return Math.round(self.value) + "%"; },
|
|
541
|
+
style: { track: { height: 8, color: Ink(0.08) }, bar: { color: ACCENT_COLOR }, valueText: { fontSize: 12, textColor: Ink(0.6) } },
|
|
542
|
+
});
|
|
543
|
+
lblUploadInfo = Label({ text: "", fontSize: 12, textColor: Ink(0.45) });
|
|
544
|
+
|
|
545
|
+
endGroup();
|
|
546
|
+
|
|
547
|
+
endCard();
|
|
548
|
+
|
|
549
|
+
endGroup();
|
|
550
|
+
|
|
551
|
+
};
|
|
552
|
+
|
|
553
|
+
const initKpiRow = function () {
|
|
554
|
+
|
|
555
|
+
const KPI_LIST = [
|
|
556
|
+
{ title: "Free RAM", iconFile: "left-menu/dashboard.png", lineColor: "#7E6BC4", key: "freeRam" },
|
|
557
|
+
{ title: "Loop frequency", iconFile: "left-menu/bolt.png", lineColor: ACCENT_COLOR, key: "loopHz" },
|
|
558
|
+
{ title: "Wi-Fi signal", iconFile: "left-menu/url.png", lineColor: HUM_COLOR, key: "rssi" },
|
|
559
|
+
{ title: "Temperature", iconFile: "left-menu/reports.png", lineColor: TEMP_COLOR, key: "temperature" },
|
|
560
|
+
];
|
|
561
|
+
|
|
562
|
+
startRow();
|
|
563
|
+
|
|
564
|
+
KPI_LIST.forEach(function (kpi) {
|
|
565
|
+
const kpiBox = SparkLineBox({
|
|
566
|
+
height: 100, title: kpi.title, valueText: "", iconFile: ASSETS + kpi.iconFile, lineColor: kpi.lineColor,
|
|
567
|
+
style: {
|
|
568
|
+
box: { color: CARD_COLOR, border: 1, borderColor: CARD_BORDER_COLOR, round: 12 },
|
|
569
|
+
text: { padding: 14 },
|
|
570
|
+
title: { fontSize: 13, textColor: Ink(0.5) },
|
|
571
|
+
valueText: { fontSize: 24, textColor: Ink(0.95) },
|
|
572
|
+
trend: { flatColor: Ink(0.45) }, // WHY: The default flat color is made for light cards.
|
|
573
|
+
icon: { width: 20, height: 20 },
|
|
574
|
+
graph: { height: 34, padding: 14 },
|
|
575
|
+
},
|
|
576
|
+
});
|
|
577
|
+
setFlex(kpiBox, "1 1 220px");
|
|
578
|
+
kpiBox.icon.elem.style.filter = T.iconFilter; // WHY: Panel icons are black.
|
|
579
|
+
kpiBox.icon.opacity = 0.5;
|
|
580
|
+
kpiBox.dataKey = kpi.key;
|
|
581
|
+
kpiBoxList.push(kpiBox);
|
|
582
|
+
});
|
|
583
|
+
|
|
584
|
+
endGroup();
|
|
585
|
+
|
|
586
|
+
};
|
|
587
|
+
|
|
588
|
+
const initChartRow = function () {
|
|
589
|
+
|
|
590
|
+
startRow();
|
|
591
|
+
|
|
592
|
+
startCard("Sensors", "The last " + CHART_COUNT + " readings", "1 1 100%");
|
|
593
|
+
|
|
594
|
+
chartSensors = ChartBox({
|
|
595
|
+
width: "100%", height: 220, type: "line", theme: T.chartTheme, legend: "top",
|
|
596
|
+
maxCount: CHART_COUNT, animated: 0, labels: [],
|
|
597
|
+
datasets: [
|
|
598
|
+
{ label: "Temperature (C)", data: [], borderColor: TEMP_COLOR, tension: 0.3 },
|
|
599
|
+
{ label: "Humidity (%)", data: [], borderColor: HUM_COLOR, tension: 0.3 },
|
|
600
|
+
],
|
|
601
|
+
options: { elements: { point: { radius: 0 } } },
|
|
602
|
+
});
|
|
603
|
+
|
|
604
|
+
endCard();
|
|
605
|
+
|
|
606
|
+
endGroup();
|
|
607
|
+
|
|
608
|
+
};
|
|
609
|
+
|
|
610
|
+
const initTabsRow = function () {
|
|
611
|
+
|
|
612
|
+
startRow();
|
|
613
|
+
|
|
614
|
+
startCard("Sketch", "Pins, serial monitor and libraries", "1 1 100%");
|
|
615
|
+
|
|
616
|
+
// TABS: comp/tabs.js
|
|
617
|
+
tabs = Tabs({
|
|
618
|
+
width: "100%",
|
|
619
|
+
styleName: T.compStyle,
|
|
620
|
+
panels: 1,
|
|
621
|
+
panelHeight: 290,
|
|
622
|
+
tabs: [
|
|
623
|
+
{ key: "pins", text: "Pins", count: PIN_TEMPLATE.length },
|
|
624
|
+
{ key: "serial", text: "Serial Monitor" },
|
|
625
|
+
{ key: "libraries", text: "Libraries", count: LIBRARIES.length },
|
|
626
|
+
],
|
|
627
|
+
style: { panel: { color: "transparent", padding: [0, 12] } },
|
|
628
|
+
});
|
|
629
|
+
|
|
630
|
+
// PANEL: Pins
|
|
631
|
+
tabs.startPanel("pins");
|
|
632
|
+
pinTable = createTableHost(["PIN", "MODE", "LABEL", "VALUE"], ["12%", "16%", "52%", "20%"], 420);
|
|
633
|
+
tabs.endPanel();
|
|
634
|
+
|
|
635
|
+
// PANEL: Serial monitor
|
|
636
|
+
tabs.startPanel("serial");
|
|
637
|
+
|
|
638
|
+
VGroup({ width: "100%", height: "auto", align: "left top", gap: 10 });
|
|
639
|
+
|
|
640
|
+
serialBox = Box({ width: "100%", height: 200, color: "#0E0F0D", border: 1, borderColor: CARD_BORDER_COLOR, round: 8, scrollY: 1 });
|
|
641
|
+
|
|
642
|
+
createIn(serialBox, function () {
|
|
643
|
+
serialGroup = VGroup({ width: "100%", height: "auto", align: "left top", gap: 2, padding: 12 });
|
|
644
|
+
serialGroup.elem.style.alignItems = "stretch";
|
|
645
|
+
serialGroup.position = "relative"; // WHY: A box grows with content only when it is in the flow.
|
|
646
|
+
endGroup();
|
|
647
|
+
});
|
|
648
|
+
|
|
649
|
+
// SCROLL BAR: basic/scroll-bar.js
|
|
650
|
+
serialScrollBar = ScrollBar({
|
|
651
|
+
scrollableBox: serialBox,
|
|
652
|
+
bar_color: "#8A8A88", bar_mouseOverColor: "#BFBFBD",
|
|
653
|
+
bar_width: 4, bar_round: 3, bar_opacity: 0.4, bar_mouseOverOpacity: 0.9, bar_padding: 2,
|
|
654
|
+
neverHide: 0, showDots: 0,
|
|
655
|
+
});
|
|
656
|
+
|
|
657
|
+
startSpaceBetween(10);
|
|
658
|
+
|
|
659
|
+
serialInput = Input({
|
|
660
|
+
height: 36, grow: 1,
|
|
661
|
+
placeholder: "Send a command to the board and press Enter",
|
|
662
|
+
fontSize: 14, color: FIELD_COLOR, textColor: Ink(0.9),
|
|
663
|
+
border: 1, borderColor: CARD_BORDER_COLOR, round: 8,
|
|
664
|
+
});
|
|
665
|
+
serialInput.onEnter(function (self) { sendSerialCommand(self.text); });
|
|
666
|
+
|
|
667
|
+
createButton("Send", "", function () { sendSerialCommand(serialInput.text); });
|
|
668
|
+
|
|
669
|
+
endGroup();
|
|
670
|
+
|
|
671
|
+
endGroup();
|
|
672
|
+
|
|
673
|
+
tabs.endPanel();
|
|
674
|
+
|
|
675
|
+
// PANEL: Libraries
|
|
676
|
+
tabs.startPanel("libraries");
|
|
677
|
+
libraryTable = createTableHost(["LIBRARY", "VERSION", "AUTHOR"], ["50%", "20%", "30%"], 420);
|
|
678
|
+
renderTable(libraryTable, LIBRARIES);
|
|
679
|
+
tabs.endPanel();
|
|
680
|
+
|
|
681
|
+
endCard();
|
|
682
|
+
|
|
683
|
+
endGroup();
|
|
684
|
+
|
|
685
|
+
};
|
|
686
|
+
|
|
687
|
+
const initControlRow = function () {
|
|
688
|
+
|
|
689
|
+
startRow();
|
|
690
|
+
|
|
691
|
+
// CARD: Outputs
|
|
692
|
+
startCard("Outputs", "The digital pins of the board", "1 1 340px");
|
|
693
|
+
|
|
694
|
+
["D7", "D8", "D9"].forEach(function (pin) {
|
|
695
|
+
startSpaceBetween();
|
|
696
|
+
that.elem.style.padding = "8px 0px";
|
|
697
|
+
that.elem.style.borderTop = "1px solid " + Ink(0.06);
|
|
698
|
+
const item = PIN_TEMPLATE.find(function (p) { return p.pin === pin; });
|
|
699
|
+
Label({ text: pin + " · " + item.label, fontSize: 14, textColor: Ink(0.8) });
|
|
700
|
+
outputToggles[pin] = createToggle(function (self) {
|
|
701
|
+
setPinValue(board, pin, (self.value) ? 1 : 0);
|
|
702
|
+
addSerial(board, "digitalWrite(" + pin + ", " + ((self.value) ? "HIGH" : "LOW") + ")");
|
|
703
|
+
renderLive();
|
|
704
|
+
});
|
|
705
|
+
endGroup();
|
|
706
|
+
});
|
|
707
|
+
|
|
708
|
+
endCard();
|
|
709
|
+
|
|
710
|
+
// CARD: PWM and interval
|
|
711
|
+
startCard("Tuning", "PWM and the sampling interval", "1 1 340px");
|
|
712
|
+
|
|
713
|
+
VGroup({ width: "100%", height: "auto", align: "left top", gap: 8 });
|
|
714
|
+
startSpaceBetween();
|
|
715
|
+
createSmallTitle("D5 · Fan speed (PWM)");
|
|
716
|
+
lblPwm = Label({ text: "", fontSize: 14, textColor: Ink(0.9) });
|
|
717
|
+
endGroup();
|
|
718
|
+
// NOTE: Slider (comp-m2) sends the value (0 - 100) to onDragMove, not the object.
|
|
719
|
+
pwmSlider = createSlider(ACCENT_COLOR, function (value) {
|
|
720
|
+
board.pwm = Math.round(value / 100 * 255);
|
|
721
|
+
lblPwm.text = board.pwm + " / 255";
|
|
722
|
+
}, function () {
|
|
723
|
+
addSerial(board, "analogWrite(D5, " + board.pwm + ")");
|
|
724
|
+
renderLive();
|
|
725
|
+
});
|
|
726
|
+
endGroup();
|
|
727
|
+
|
|
728
|
+
startSpaceBetween();
|
|
729
|
+
that.elem.style.padding = "10px 0px 0px 0px";
|
|
730
|
+
that.elem.style.borderTop = "1px solid " + Ink(0.06);
|
|
731
|
+
|
|
732
|
+
createSmallTitle("Sampling interval");
|
|
733
|
+
|
|
734
|
+
// STEPPER: comp/stepper.js
|
|
735
|
+
intervalStepper = Stepper({
|
|
736
|
+
width: 170, height: 40, styleName: T.compStyle,
|
|
737
|
+
value: 1000, min: 100, max: 5000, step: 100,
|
|
738
|
+
unitText: " ms",
|
|
739
|
+
onChange: function (self) {
|
|
740
|
+
if (isRendering) return;
|
|
741
|
+
board.intervalMs = self.value;
|
|
742
|
+
addSerial(board, "setInterval(" + self.value + ")");
|
|
743
|
+
},
|
|
744
|
+
});
|
|
745
|
+
|
|
746
|
+
endGroup();
|
|
747
|
+
|
|
748
|
+
endCard();
|
|
749
|
+
|
|
750
|
+
// CARD: Mode
|
|
751
|
+
startCard("Mode", "Who drives the outputs", "1 1 280px");
|
|
752
|
+
|
|
753
|
+
VGroup({ width: "100%", height: "auto", align: "left top", gap: 10 });
|
|
754
|
+
MODES.forEach(function (mode) {
|
|
755
|
+
RadioButton({
|
|
756
|
+
group: "arduinoMode", value: mode.id,
|
|
757
|
+
labelText: mode.label + " <span style='color:" + Ink(0.4) + "; font-size: 12px'>" + mode.desc + "</span>",
|
|
758
|
+
style: DARK_RADIO_STYLE,
|
|
759
|
+
onChange: function (self) {
|
|
760
|
+
if (isRendering) return;
|
|
761
|
+
board.mode = self.value;
|
|
762
|
+
addEvent(board, "Info", "Mode: " + self.value);
|
|
763
|
+
renderLive();
|
|
764
|
+
},
|
|
765
|
+
});
|
|
766
|
+
});
|
|
767
|
+
endGroup();
|
|
768
|
+
|
|
769
|
+
endCard();
|
|
770
|
+
|
|
771
|
+
endGroup();
|
|
772
|
+
|
|
773
|
+
};
|
|
774
|
+
|
|
775
|
+
const initBottomRow = function () {
|
|
776
|
+
|
|
777
|
+
startRow();
|
|
778
|
+
|
|
779
|
+
startCard("Boards", "Every board of the project", "1 1 480px");
|
|
780
|
+
boardTable = createTableHost(["BOARD", "MODEL", "IP", "SKETCH", "STATE"], ["22%", "26%", "18%", "22%", "12%"], 560);
|
|
781
|
+
endCard();
|
|
782
|
+
|
|
783
|
+
startCard("Events", "The last events of this board", "1 1 420px");
|
|
784
|
+
eventTable = createTableHost(["TIME", "LEVEL", "MESSAGE"], ["18%", "18%", "64%"], 420);
|
|
785
|
+
endCard();
|
|
786
|
+
|
|
787
|
+
endGroup();
|
|
788
|
+
|
|
789
|
+
};
|
|
790
|
+
|
|
791
|
+
// *** RENDER:
|
|
792
|
+
|
|
793
|
+
const selectBoard = function (index) {
|
|
794
|
+
|
|
795
|
+
board = boards[index];
|
|
796
|
+
hideAlert();
|
|
797
|
+
|
|
798
|
+
isRendering = 1;
|
|
799
|
+
intervalStepper.setValue(board.intervalMs, 1);
|
|
800
|
+
pwmSlider.setValue(Math.round(board.pwm / 255 * 100));
|
|
801
|
+
RadioButton.setValue("arduinoMode", board.mode, 1);
|
|
802
|
+
isRendering = 0;
|
|
803
|
+
|
|
804
|
+
renderLive();
|
|
805
|
+
|
|
806
|
+
};
|
|
807
|
+
|
|
808
|
+
const renderLive = function () {
|
|
809
|
+
|
|
810
|
+
const b = board;
|
|
811
|
+
|
|
812
|
+
// HEADER:
|
|
813
|
+
lblSubtitle.text = b.board + " · " + b.mcu;
|
|
814
|
+
lblClock.text = formatClock(b.uptimeS);
|
|
815
|
+
lblUptime.text = "uptime · " + formatDuration(b.uptimeS);
|
|
816
|
+
setPill(lblStatus, (b.isOnline) ? "Online" : "Offline", (b.isOnline) ? ACCENT_COLOR : DANGER_COLOR);
|
|
817
|
+
|
|
818
|
+
// GAUGES:
|
|
819
|
+
gaugeVoltage.setValue(Number(b.voltage.toFixed(2)));
|
|
820
|
+
gaugeVoltage.setBarColor((b.voltage < 4.9) ? WARNING_COLOR : ACCENT_COLOR);
|
|
821
|
+
gaugeVoltage.setSubText((b.voltage < 4.9) ? "Low" : "Normal");
|
|
822
|
+
gaugeTemp.setValue(Math.round(b.mcuTemp));
|
|
823
|
+
gaugeTemp.setBarColor((b.mcuTemp > 70) ? DANGER_COLOR : TEMP_COLOR);
|
|
824
|
+
gaugeTemp.setSubText((b.mcuTemp > 70) ? "Hot" : "Normal");
|
|
825
|
+
|
|
826
|
+
// BOARD INFO:
|
|
827
|
+
boardInfo.board.text = b.board;
|
|
828
|
+
boardInfo.mcu.text = b.mcu;
|
|
829
|
+
boardInfo.ip.text = b.ip;
|
|
830
|
+
boardInfo.mac.text = b.mac;
|
|
831
|
+
boardInfo.uptime.text = formatDuration(b.uptimeS);
|
|
832
|
+
boardInfo.sketch.text = b.sketch;
|
|
833
|
+
boardInfo.version.text = "v" + b.version;
|
|
834
|
+
|
|
835
|
+
// MEMORY:
|
|
836
|
+
progressFlash.setValue(b.sketchKB / b.flashKB * 100);
|
|
837
|
+
progressFlash.setTitleText("Flash · " + b.sketchKB + " / " + b.flashKB + " kB");
|
|
838
|
+
progressRam.setValue((b.ramKB - b.freeRamKB) / b.ramKB * 100);
|
|
839
|
+
progressRam.setTitleText("RAM · " + Math.round(b.ramKB - b.freeRamKB) + " / " + b.ramKB + " kB");
|
|
840
|
+
|
|
841
|
+
// UPLOAD:
|
|
842
|
+
progressUpload.setValue(b.upload.percent);
|
|
843
|
+
lblUploadInfo.text = (b.upload.isRunning) ? b.upload.step + "..." : (b.upload.step === "Done") ? "Last upload finished." : "The board restarts after the upload.";
|
|
844
|
+
btnUpload.opacity = (b.upload.isRunning) ? 0.5 : 1;
|
|
845
|
+
btnUpload.clickable = (b.upload.isRunning) ? 0 : 1;
|
|
846
|
+
|
|
847
|
+
// KPI:
|
|
848
|
+
kpiBoxList.forEach(function (kpiBox) {
|
|
849
|
+
const list = b.history[kpiBox.dataKey] || [];
|
|
850
|
+
kpiBox.setValues(list);
|
|
851
|
+
const last = list[list.length - 1];
|
|
852
|
+
kpiBox.setValueText(formatKpi(kpiBox.dataKey, last));
|
|
853
|
+
});
|
|
854
|
+
|
|
855
|
+
// CHART:
|
|
856
|
+
chartSensors.setLabels(b.labels);
|
|
857
|
+
chartSensors.setValues(b.history.temperature, 0);
|
|
858
|
+
chartSensors.setValues(b.history.humidity, 1);
|
|
859
|
+
|
|
860
|
+
// TABLES:
|
|
861
|
+
renderTable(pinTable, b.pins.map(function (p) {
|
|
862
|
+
return [p.pin, p.mode, p.label, formatPinValue(p)];
|
|
863
|
+
}));
|
|
864
|
+
|
|
865
|
+
renderTable(boardTable, boards.map(function (item) {
|
|
866
|
+
return [item.name, item.board, item.ip, item.sketch + " v" + item.version, (item.isOnline) ? "Online" : "Offline"];
|
|
867
|
+
}));
|
|
868
|
+
|
|
869
|
+
renderTable(eventTable, b.events.slice(0, 8).map(function (e) { return [e.time, e.level, e.message]; }));
|
|
870
|
+
|
|
871
|
+
// OUTPUTS:
|
|
872
|
+
isRendering = 1;
|
|
873
|
+
Object.keys(outputToggles).forEach(function (pin) {
|
|
874
|
+
const item = getPin(b, pin);
|
|
875
|
+
const on = (item && item.value == 1) ? 1 : 0;
|
|
876
|
+
// WHY: setValue() fires onChange, so it is only called when the value really changed.
|
|
877
|
+
if (outputToggles[pin].value != on) outputToggles[pin].setValue(on);
|
|
878
|
+
outputToggles[pin].opacity = (b.mode === "auto") ? 0.45 : 1;
|
|
879
|
+
outputToggles[pin].clickable = (b.mode === "auto") ? 0 : 1;
|
|
880
|
+
});
|
|
881
|
+
lblPwm.text = b.pwm + " / 255";
|
|
882
|
+
isRendering = 0;
|
|
883
|
+
|
|
884
|
+
renderSerial();
|
|
885
|
+
|
|
886
|
+
// ALERT:
|
|
887
|
+
if (!b.isOnline) showAlert(b.name + " does not answer. Check the power and the Wi-Fi.", DANGER_COLOR);
|
|
888
|
+
else if (b.mcuTemp > 70) showAlert("The MCU is over 70 °C. The board may slow itself down.", WARNING_COLOR);
|
|
889
|
+
|
|
890
|
+
};
|
|
891
|
+
|
|
892
|
+
const renderSerial = function () {
|
|
893
|
+
|
|
894
|
+
const isAtBottom = (serialBox.elem.scrollTop + serialBox.elem.clientHeight >= serialBox.elem.scrollHeight - 24);
|
|
895
|
+
|
|
896
|
+
serialGroup.children.forEach(function (child) { child.remove(); });
|
|
897
|
+
|
|
898
|
+
createIn(serialGroup, function () {
|
|
899
|
+
board.serial.slice(-60).forEach(function (line) {
|
|
900
|
+
HGroup({ width: "100%", height: "auto", align: "left top", gap: 10 });
|
|
901
|
+
Label({ plainText: line.time, fontSize: 12, textColor: Ink(0.3) });
|
|
902
|
+
that.elem.style.fontVariantNumeric = "tabular-nums";
|
|
903
|
+
that.elem.style.flexShrink = "0";
|
|
904
|
+
Label({ plainText: line.text, fontSize: 12, textColor: Ink(0.75), grow: 1 });
|
|
905
|
+
endGroup();
|
|
906
|
+
});
|
|
907
|
+
});
|
|
908
|
+
|
|
909
|
+
// WHY: Follow the new lines only when the user is already at the bottom.
|
|
910
|
+
if (isAtBottom) serialBox.elem.scrollTop = serialBox.elem.scrollHeight;
|
|
911
|
+
if (serialScrollBar) serialScrollBar.refreshScroll();
|
|
912
|
+
|
|
913
|
+
};
|
|
914
|
+
|
|
915
|
+
const sendSerialCommand = function (text) {
|
|
916
|
+
const command = String(text || "").trim();
|
|
917
|
+
if (!command) return;
|
|
918
|
+
addSerial(board, "> " + command);
|
|
919
|
+
addSerial(board, (board.isOnline) ? "OK" : "No answer: the board is offline");
|
|
920
|
+
serialInput.text = "";
|
|
921
|
+
renderLive();
|
|
922
|
+
};
|
|
923
|
+
|
|
924
|
+
const runTestAction = function (key) {
|
|
925
|
+
if (key === "serial") addSerial(board, "Test line " + simSecond);
|
|
926
|
+
if (key === "rssi") { board.rssi = -88; addEvent(board, "Warning", "Wi-Fi signal is weak (-88 dBm)"); }
|
|
927
|
+
if (key === "offline") { board.isOnline = (board.isOnline) ? 0 : 1; addEvent(board, (board.isOnline) ? "Info" : "Error", (board.isOnline) ? "Board is back" : "Board went offline"); }
|
|
928
|
+
if (key === "clear") board.serial = [];
|
|
929
|
+
renderLive();
|
|
930
|
+
};
|
|
931
|
+
|
|
932
|
+
// *** VIEW HELPERS:
|
|
933
|
+
|
|
934
|
+
const startRow = function () {
|
|
935
|
+
HGroup({ width: "100%", height: "auto", align: "left top", gap: 16 });
|
|
936
|
+
that.elem.style.flexWrap = "wrap";
|
|
937
|
+
that.elem.style.alignItems = "stretch"; // WHY: Cards in the same row have the same height.
|
|
938
|
+
};
|
|
939
|
+
|
|
940
|
+
const setFlex = function (obj, flex) {
|
|
941
|
+
obj.elem.style.flex = flex;
|
|
942
|
+
obj.elem.style.minWidth = "0";
|
|
943
|
+
};
|
|
944
|
+
|
|
945
|
+
const startCard = function (title, subtitle, flex) {
|
|
946
|
+
const cardBox = VGroup({ height: "auto", align: "left top", gap: 14, padding: 16, color: CARD_COLOR, border: 1, borderColor: CARD_BORDER_COLOR, round: 12 });
|
|
947
|
+
setFlex(cardBox, flex);
|
|
948
|
+
startSpaceBetween();
|
|
949
|
+
VGroup({ width: "auto", height: "auto", align: "left top", gap: 0 });
|
|
950
|
+
Label({ text: title, fontSize: 15, textColor: Ink(0.95) });
|
|
951
|
+
that.elem.style.fontFamily = "opensans-bold";
|
|
952
|
+
if (subtitle) Label({ text: subtitle, fontSize: 12, textColor: Ink(0.45) });
|
|
953
|
+
endGroup();
|
|
954
|
+
cardBox.lblRight = Label({ text: "", fontSize: 12, textColor: Ink(0.5) });
|
|
955
|
+
that.elem.style.whiteSpace = "nowrap";
|
|
956
|
+
endGroup();
|
|
957
|
+
return cardBox;
|
|
958
|
+
};
|
|
959
|
+
|
|
960
|
+
const endCard = function () { endGroup(); };
|
|
961
|
+
|
|
962
|
+
const startSpaceBetween = function (gap = 12) {
|
|
963
|
+
HGroup({ width: "100%", height: "auto", align: "left center", gap: gap });
|
|
964
|
+
that.elem.style.justifyContent = "space-between";
|
|
965
|
+
};
|
|
966
|
+
|
|
967
|
+
const createSmallTitle = function (text) {
|
|
968
|
+
Label({ text: text.toUpperCase(), fontSize: 11, textColor: Ink(0.45) });
|
|
969
|
+
that.elem.style.letterSpacing = "1px";
|
|
970
|
+
return that;
|
|
971
|
+
};
|
|
972
|
+
|
|
973
|
+
const setPill = function (label, text, color) {
|
|
974
|
+
label.text = text;
|
|
975
|
+
label.textColor = color;
|
|
976
|
+
label.color = ChartBox.alpha(color, 0.12);
|
|
977
|
+
label.borderColor = ChartBox.alpha(color, 0.4);
|
|
978
|
+
};
|
|
979
|
+
|
|
980
|
+
const createInfoLine = function (title, first) {
|
|
981
|
+
startSpaceBetween();
|
|
982
|
+
that.elem.style.padding = "8px 0px";
|
|
983
|
+
if (!first) that.elem.style.borderTop = "1px solid " + Ink(0.06);
|
|
984
|
+
Label({ text: title, fontSize: 14, textColor: Ink(0.5) });
|
|
985
|
+
const value = Label({ text: "", fontSize: 14, textColor: Ink(0.9) });
|
|
986
|
+
that.elem.style.whiteSpace = "nowrap";
|
|
987
|
+
endGroup();
|
|
988
|
+
return value;
|
|
989
|
+
};
|
|
990
|
+
|
|
991
|
+
const createButton = function (text, iconFile, onClick, params = {}) {
|
|
992
|
+
const btn = SmartButton({
|
|
993
|
+
styleName: "classic",
|
|
994
|
+
width: params.width || "auto",
|
|
995
|
+
labelText: text,
|
|
996
|
+
iconFile: (iconFile) ? ASSETS + iconFile : "",
|
|
997
|
+
onClick: onClick,
|
|
998
|
+
style: {
|
|
999
|
+
layout: { gap: 10, padding: [14, 8], align: "center center" },
|
|
1000
|
+
icon: { width: 18, height: 18 },
|
|
1001
|
+
label: { fontSize: 14, textColor: Ink(0.9) },
|
|
1002
|
+
box: { color: params.color || FIELD_COLOR, border: 1, borderColor: CARD_BORDER_COLOR, round: 8 },
|
|
1003
|
+
hover: { color: params.hoverColor || T.surface3 },
|
|
1004
|
+
active: { color: params.activeColor || T.surface4 },
|
|
1005
|
+
},
|
|
1006
|
+
});
|
|
1007
|
+
if (btn.icon) btn.icon.elem.style.filter = T.iconFilter; // WHY: Panel icons are black.
|
|
1008
|
+
return btn;
|
|
1009
|
+
};
|
|
1010
|
+
|
|
1011
|
+
const createSlider = function (color, onDragMove, onDragEnd) {
|
|
1012
|
+
return Slider({
|
|
1013
|
+
width: "100%",
|
|
1014
|
+
trackHeight: 8,
|
|
1015
|
+
minThumbHeight: 26,
|
|
1016
|
+
trackColor: color,
|
|
1017
|
+
trackBackgroundColor: Ink(0.1),
|
|
1018
|
+
thumbColor: Ink(0.9),
|
|
1019
|
+
showValueOnSet: 0,
|
|
1020
|
+
showValueOnDrag: 0, // WHY: Slider shows 0-100. The real value is in a label.
|
|
1021
|
+
onDragMove: onDragMove,
|
|
1022
|
+
onDragEnd: onDragEnd,
|
|
1023
|
+
});
|
|
1024
|
+
};
|
|
1025
|
+
|
|
1026
|
+
const createToggle = function (onChange) {
|
|
1027
|
+
return Toggle({
|
|
1028
|
+
width: 52,
|
|
1029
|
+
height: 30,
|
|
1030
|
+
spacing: 3,
|
|
1031
|
+
backgroundStyle: { color: T.surface3, selectedColor: PRIMARY_COLOR, border: 1, borderColor: CARD_BORDER_COLOR },
|
|
1032
|
+
buttonStyle: { color: Ink(0.35), selectedColor: Ink(0.95) },
|
|
1033
|
+
onChange: function (self) { if (!isRendering) onChange(self); },
|
|
1034
|
+
});
|
|
1035
|
+
};
|
|
1036
|
+
|
|
1037
|
+
const createProgress = function (title, color) {
|
|
1038
|
+
const bar = ProgressBar({
|
|
1039
|
+
width: "100%", value: 0, styleName: "modern",
|
|
1040
|
+
valueFormat: function (self) { return Math.round(self.value) + "%"; },
|
|
1041
|
+
// NOTE: The style key of the title label is "title". ("titleText" is the text itself, set with setTitleText().)
|
|
1042
|
+
style: { track: { height: 8, color: Ink(0.08) }, bar: { color: color }, valueText: { fontSize: 12, textColor: Ink(0.6) }, title: { fontSize: 12, textColor: Ink(0.75) } },
|
|
1043
|
+
});
|
|
1044
|
+
bar.setTitleText(title);
|
|
1045
|
+
return bar;
|
|
1046
|
+
};
|
|
1047
|
+
|
|
1048
|
+
// A place for a table. The table itself is made again on every render.
|
|
1049
|
+
// NOTE: Like the other panel modules, the table is removed and made again. (comp-m4 TinyTable also has setRows().)
|
|
1050
|
+
const createTableHost = function (headers, widths, minWidth) {
|
|
1051
|
+
const host = VGroup({ width: "100%", height: "auto", align: "left top", gap: 0, color: "transparent", scrollX: 1 });
|
|
1052
|
+
endGroup();
|
|
1053
|
+
host.tableHeaders = headers;
|
|
1054
|
+
host.tableWidths = widths;
|
|
1055
|
+
host.tableMinWidth = minWidth || 0;
|
|
1056
|
+
host.table = null;
|
|
1057
|
+
return host;
|
|
1058
|
+
};
|
|
1059
|
+
|
|
1060
|
+
const renderTable = function (host, rows) {
|
|
1061
|
+
|
|
1062
|
+
if (host.table) host.table.remove();
|
|
1063
|
+
|
|
1064
|
+
createIn(host, function () {
|
|
1065
|
+
host.table = TinyTable({
|
|
1066
|
+
columns: Theme.tableColumns(host.tableHeaders, host.tableWidths),
|
|
1067
|
+
rows: rows,
|
|
1068
|
+
allowHtml: 1, // (the texts are made by the panel, user texts are escaped)
|
|
1069
|
+
style: Theme.tableStyle({ headerColor: FIELD_COLOR, bodyColor: CARD_COLOR, borderColor: CARD_BORDER_COLOR }),
|
|
1070
|
+
});
|
|
1071
|
+
});
|
|
1072
|
+
|
|
1073
|
+
Theme.fillTableWidth(host.table);
|
|
1074
|
+
if (host.tableMinWidth) host.table.elem.style.minWidth = host.tableMinWidth + "px";
|
|
1075
|
+
|
|
1076
|
+
};
|
|
1077
|
+
|
|
1078
|
+
const DARK_RADIO_STYLE = {
|
|
1079
|
+
mark: { width: 20, height: 20, color: "transparent", borderColor: Ink(0.35) },
|
|
1080
|
+
checkedMark: { color: "transparent", borderColor: ACCENT_COLOR },
|
|
1081
|
+
hoverMark: { borderColor: Ink(0.7) },
|
|
1082
|
+
dot: { color: ACCENT_COLOR },
|
|
1083
|
+
label: { fontSize: 14, textColor: Ink(0.9) },
|
|
1084
|
+
description: { fontSize: 12, textColor: Ink(0.45) },
|
|
1085
|
+
};
|
|
1086
|
+
|
|
1087
|
+
// *** FORMAT:
|
|
1088
|
+
|
|
1089
|
+
const formatClock = function (seconds) {
|
|
1090
|
+
const h = Math.floor(seconds / 3600) % 24;
|
|
1091
|
+
const m = Math.floor(seconds / 60) % 60;
|
|
1092
|
+
const s = Math.floor(seconds) % 60;
|
|
1093
|
+
const pad = function (n) { return String(n).padStart(2, "0"); };
|
|
1094
|
+
return pad(h) + ":" + pad(m) + ":" + pad(s);
|
|
1095
|
+
};
|
|
1096
|
+
|
|
1097
|
+
const formatDuration = function (seconds) {
|
|
1098
|
+
const d = Math.floor(seconds / 86400);
|
|
1099
|
+
const h = Math.floor(seconds / 3600) % 24;
|
|
1100
|
+
const m = Math.floor(seconds / 60) % 60;
|
|
1101
|
+
if (d > 0) return d + " d " + h + " h";
|
|
1102
|
+
if (h > 0) return h + " h " + m + " min";
|
|
1103
|
+
return m + " min";
|
|
1104
|
+
};
|
|
1105
|
+
|
|
1106
|
+
const formatKpi = function (key, value) {
|
|
1107
|
+
if (value === undefined) return "—";
|
|
1108
|
+
if (key === "freeRam") return Math.round(value) + " kB";
|
|
1109
|
+
if (key === "loopHz") return Math.round(value) + " Hz";
|
|
1110
|
+
if (key === "rssi") return Math.round(value) + " dBm";
|
|
1111
|
+
return Number(value).toFixed(1) + " °C";
|
|
1112
|
+
};
|
|
1113
|
+
|
|
1114
|
+
const formatPinValue = function (p) {
|
|
1115
|
+
if (p.mode === "ANALOG") return String(p.value);
|
|
1116
|
+
if (p.mode === "PWM") return p.value + " / 255";
|
|
1117
|
+
return (p.value == 1) ? "HIGH" : "LOW";
|
|
1118
|
+
};
|
|
1119
|
+
|
|
1120
|
+
</script>
|
|
1121
|
+
|
|
1122
|
+
</head>
|
|
1123
|
+
<body></body>
|
|
1124
|
+
</html>
|