create-basicjs 0.1.0 → 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 +1 -1
- package/bin/create-basicjs.js +2 -2
- package/bin/verify-package.js +16 -0
- package/package.json +4 -1
- 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,1250 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
|
|
5
|
+
<title>Cold Rooms</title>
|
|
6
|
+
|
|
7
|
+
<meta charset="UTF-8">
|
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0"><!-- , user-scalable=no -->
|
|
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="../_basic/basic/scroll-bar.js" type="text/javascript" charset="utf-8"></script>
|
|
15
|
+
<script src="../common/theme.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/loading-screen.js" type="text/javascript" charset="utf-8"></script>
|
|
24
|
+
<script src="../_basic/comp/dialog.js" type="text/javascript" charset="utf-8"></script>
|
|
25
|
+
<script src="../_basic/comp/check-box.js" type="text/javascript" charset="utf-8"></script>
|
|
26
|
+
<script src="../_basic/comp/radio-button.js" type="text/javascript" charset="utf-8"></script>
|
|
27
|
+
<script src="../_basic/comp/hold-to-confirm-button.js" type="text/javascript" charset="utf-8"></script>
|
|
28
|
+
<script src="../_basic/comp/spark-line-box.js" type="text/javascript" charset="utf-8"></script>
|
|
29
|
+
<script src="../_basic/comp/chart-box.js" type="text/javascript" charset="utf-8"></script>
|
|
30
|
+
<script src="../_basic/comp/context-menu.js" type="text/javascript" charset="utf-8"></script>
|
|
31
|
+
<script src="../_basic/comp/select-time.js" type="text/javascript" charset="utf-8"></script>
|
|
32
|
+
<script src="../_basic/comp/select-date.js" type="text/javascript" charset="utf-8"></script>
|
|
33
|
+
|
|
34
|
+
<!--
|
|
35
|
+
|
|
36
|
+
/* Bismillah */
|
|
37
|
+
|
|
38
|
+
Module #8: Cold Rooms (Template) - v26.09
|
|
39
|
+
|
|
40
|
+
- Moved from Module #1 (Device Manager). Module #1 is an empty sample now.
|
|
41
|
+
|
|
42
|
+
- Manages cold room controllers: live sensor data, relays, operation mode, alerts, restart and firmware update.
|
|
43
|
+
- Runs inside the admin panel (iframe), but it can work alone too.
|
|
44
|
+
- All devices are simulated. Replace the "DEVICE SERVICE" functions with your API calls (MQTT, REST, Supabase...).
|
|
45
|
+
|
|
46
|
+
-->
|
|
47
|
+
|
|
48
|
+
<script>
|
|
49
|
+
|
|
50
|
+
// *** CONSTANTS:
|
|
51
|
+
const LIB_PATH = "../_basic/";
|
|
52
|
+
const ASSETS = "../assets/";
|
|
53
|
+
|
|
54
|
+
const PAGE_COLOR = T.page;
|
|
55
|
+
const CARD_COLOR = T.surface; // Same with ChartBox dark theme background
|
|
56
|
+
const CARD_BORDER_COLOR = Ink(0.1);
|
|
57
|
+
const FIELD_COLOR = T.surface2;
|
|
58
|
+
const PRIMARY_COLOR = T.primary;
|
|
59
|
+
const ACCENT_COLOR = T.accent;
|
|
60
|
+
const WARNING_COLOR = T.warning;
|
|
61
|
+
const ERROR_COLOR = T.danger;
|
|
62
|
+
const CHART_COLORS = [ACCENT_COLOR, T.info, WARNING_COLOR, "#D55181", "#9085E9"];
|
|
63
|
+
|
|
64
|
+
const TARGET_MIN = -30; // °C (Slider: 0)
|
|
65
|
+
const TARGET_MAX = 10; // °C (Slider: 100)
|
|
66
|
+
const CHART_COUNT = 30; // Seconds on the chart
|
|
67
|
+
const HISTORY_COUNT = 60; // Values kept for the mini graphs
|
|
68
|
+
const LATEST_FIRMWARE = "v2.5.0";
|
|
69
|
+
|
|
70
|
+
const STATUS_LIST = {
|
|
71
|
+
online: { text: "Online", color: ACCENT_COLOR },
|
|
72
|
+
alarm: { text: "Alarm", color: ERROR_COLOR },
|
|
73
|
+
restarting: { text: "Restarting", color: WARNING_COLOR },
|
|
74
|
+
offline: { text: "Offline", color: "#898781" },
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const LEVEL_COLORS = {
|
|
78
|
+
"Info": Ink(0.6),
|
|
79
|
+
"Success": ACCENT_COLOR,
|
|
80
|
+
"Warning": WARNING_COLOR,
|
|
81
|
+
"Error": ERROR_COLOR,
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
// auto: 1 -> Controlled by the thermostat in "auto" and "eco" modes.
|
|
85
|
+
const RELAYS = [
|
|
86
|
+
{ key: "compressor", title: "Compressor", desc: "Cooling unit", auto: 1 },
|
|
87
|
+
{ key: "fan", title: "Evaporator fan", desc: "Air circulation", auto: 0 },
|
|
88
|
+
{ key: "defrost", title: "Defrost heater", desc: "Removes the ice", auto: 1 },
|
|
89
|
+
{ key: "light", title: "Room light", desc: "Inside lighting", auto: 0 },
|
|
90
|
+
];
|
|
91
|
+
|
|
92
|
+
const MODES = [
|
|
93
|
+
{ value: "auto", text: "Auto", desc: "Thermostat keeps the target (±0.5 °C)" },
|
|
94
|
+
{ value: "eco", text: "Eco", desc: "Wider range (±1.5 °C), uses less energy" },
|
|
95
|
+
{ value: "manual", text: "Manual", desc: "You control all the relays" },
|
|
96
|
+
];
|
|
97
|
+
|
|
98
|
+
const ALERTS = [
|
|
99
|
+
{ key: "email", text: "E-mail on alarm" },
|
|
100
|
+
{ key: "sms", text: "SMS on alarm" },
|
|
101
|
+
{ key: "offline", text: "Notify when the device is offline" },
|
|
102
|
+
];
|
|
103
|
+
|
|
104
|
+
// *** TEST DATA: (DEVICE SERVICE)
|
|
105
|
+
const DEVICES = [
|
|
106
|
+
{
|
|
107
|
+
id: "crc-a", name: "Cold Room A", model: "CRC-200", serial: "CRC200-24-00731",
|
|
108
|
+
firmware: "v2.4.1", ip: "192.168.1.41", location: "Warehouse 1 / North",
|
|
109
|
+
online: 1, mode: "auto", target: -18, temp: -17.4, humidity: 86, signal: 88, uptime: 297240,
|
|
110
|
+
relays: { compressor: 1, fan: 1, defrost: 0, light: 0 },
|
|
111
|
+
alerts: { email: 1, sms: 0, offline: 1 },
|
|
112
|
+
defrostTime: "03:00", maintenanceDate: "2026-10-05",
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: "crc-b", name: "Chiller Room B", model: "CRC-200", serial: "CRC200-24-00745",
|
|
116
|
+
firmware: LATEST_FIRMWARE, ip: "192.168.1.42", location: "Warehouse 1 / South",
|
|
117
|
+
online: 1, mode: "eco", target: 2, temp: 2.8, humidity: 91, signal: 74, uptime: 86820,
|
|
118
|
+
relays: { compressor: 0, fan: 1, defrost: 0, light: 1 },
|
|
119
|
+
alerts: { email: 1, sms: 1, offline: 1 },
|
|
120
|
+
defrostTime: "04:30", maintenanceDate: "2026-11-12",
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: "frz-c", name: "Freezer C", model: "CRC-300", serial: "CRC300-25-00112",
|
|
124
|
+
firmware: "v2.3.8", ip: "192.168.2.17", location: "Warehouse 2",
|
|
125
|
+
online: 0, mode: "auto", target: -24, temp: -23.1, humidity: 78, signal: 12, uptime: 0,
|
|
126
|
+
relays: { compressor: 1, fan: 1, defrost: 0, light: 0 },
|
|
127
|
+
alerts: { email: 1, sms: 1, offline: 1 },
|
|
128
|
+
defrostTime: "02:00", maintenanceDate: "2026-09-20",
|
|
129
|
+
lastSeen: Date.now() - 2 * 60 * 60 * 1000,
|
|
130
|
+
},
|
|
131
|
+
];
|
|
132
|
+
|
|
133
|
+
// *** VARIABLES:
|
|
134
|
+
let device = null; // Selected device
|
|
135
|
+
let isReady = 0;
|
|
136
|
+
let isRendering = 0; // WHY: Component setters call onChange. Changes made by code must not be logged.
|
|
137
|
+
|
|
138
|
+
let deviceSelect, lblStatus, btnMore, moreMenu;
|
|
139
|
+
let kpiBoxList = [];
|
|
140
|
+
let chartTemp;
|
|
141
|
+
let infoLabels = {};
|
|
142
|
+
let lblOfflineInfo;
|
|
143
|
+
let relayToggles = {};
|
|
144
|
+
let lblRelayHint, lblTarget, sliderTarget, grpTarget;
|
|
145
|
+
let selectDefrostTime, selectMaintenanceDate;
|
|
146
|
+
let alertCheckBoxes = {};
|
|
147
|
+
let grpEventTable, eventTable = null;
|
|
148
|
+
let btnRestart, btnUpdate, lblFirmwareInfo;
|
|
149
|
+
let waiting;
|
|
150
|
+
|
|
151
|
+
// First running function.
|
|
152
|
+
const start = function () {
|
|
153
|
+
|
|
154
|
+
page.color = PAGE_COLOR;
|
|
155
|
+
|
|
156
|
+
DEVICES.forEach(initDevice);
|
|
157
|
+
|
|
158
|
+
// BOX: Full screen scrollable container
|
|
159
|
+
// WHY: page does not scroll. Scrollable content must be inside a Box with scrollY: 1.
|
|
160
|
+
startBox(0, 0, "100%", "100%", {
|
|
161
|
+
color: "transparent",
|
|
162
|
+
scrollY: 1,
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
VGroup({
|
|
166
|
+
width: "100%",
|
|
167
|
+
height: "auto", // Grows with content, so the Box can scroll.
|
|
168
|
+
align: "left top",
|
|
169
|
+
gap: 16,
|
|
170
|
+
padding: 24,
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
initHeader();
|
|
174
|
+
initKpiRow();
|
|
175
|
+
initChartRow();
|
|
176
|
+
initControlRow();
|
|
177
|
+
initLogRow();
|
|
178
|
+
|
|
179
|
+
endGroup();
|
|
180
|
+
|
|
181
|
+
endBox();
|
|
182
|
+
|
|
183
|
+
// WAITING: Restart, firmware update, connection (comp-m4 LoadingScreen, common/theme.js)
|
|
184
|
+
waiting = Theme.createWaiting();
|
|
185
|
+
|
|
186
|
+
// WHY: Bar count was calculated with the default width (before flex).
|
|
187
|
+
kpiBoxList.forEach(function (kpiBox) { kpiBox.refresh(); });
|
|
188
|
+
|
|
189
|
+
isReady = 1;
|
|
190
|
+
selectDevice(0);
|
|
191
|
+
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
// Runs every second: simulated sensor data.
|
|
195
|
+
const loop = function () {
|
|
196
|
+
|
|
197
|
+
if (!isReady) return;
|
|
198
|
+
|
|
199
|
+
DEVICES.forEach(function (d) {
|
|
200
|
+
simulateDevice(d, getTimeText(new Date()));
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
// WHY not while restarting: simulateDevice adds no point then, the last one was added again (3 times a restart)
|
|
204
|
+
if (device.online && !device.restarting) {
|
|
205
|
+
const h = device.history;
|
|
206
|
+
const last = h.labels.length - 1;
|
|
207
|
+
chartTemp.addValue(h.labels[last], [h.temp[last], h.target[last]]);
|
|
208
|
+
kpiBoxList[0].addValue(h.tempPoints[last]);
|
|
209
|
+
kpiBoxList[1].addValue(h.humidity[last]);
|
|
210
|
+
kpiBoxList[2].addValue(h.power[last]);
|
|
211
|
+
kpiBoxList[3].addValue(h.signal[last]);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
renderLiveValues();
|
|
215
|
+
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
// *** DEVICE SERVICE (SIMULATION):
|
|
219
|
+
|
|
220
|
+
const initDevice = function (d) {
|
|
221
|
+
|
|
222
|
+
d.restarting = 0;
|
|
223
|
+
d.alarm = 0;
|
|
224
|
+
d.events = [];
|
|
225
|
+
d.history = { labels: [], temp: [], tempPoints: [], target: [], humidity: [], power: [], signal: [] };
|
|
226
|
+
|
|
227
|
+
// Fill the history with the last 60 seconds. (Offline device: before it was last seen)
|
|
228
|
+
const wasOnline = d.online;
|
|
229
|
+
const lastTime = d.lastSeen || Date.now();
|
|
230
|
+
d.online = 1;
|
|
231
|
+
for (let i = HISTORY_COUNT; i > 0; i--) {
|
|
232
|
+
simulateDevice(d, getTimeText(new Date(lastTime - i * 1000)), 1);
|
|
233
|
+
}
|
|
234
|
+
d.online = wasOnline;
|
|
235
|
+
|
|
236
|
+
if (d.online) {
|
|
237
|
+
addEvent(d, "Info", "Connected to the panel");
|
|
238
|
+
} else {
|
|
239
|
+
addEvent(d, "Error", "Connection lost (no heartbeat)", new Date(d.lastSeen));
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
// One second of the device. silent: 1 -> No events.
|
|
245
|
+
const TEMP_MIN = -35; // °C: the coldest a compressor can make a room
|
|
246
|
+
const TEMP_MAX = 30; // °C: the air outside
|
|
247
|
+
|
|
248
|
+
const simulateDevice = function (d, timeText, silent = 0) {
|
|
249
|
+
|
|
250
|
+
if (!d.online || d.restarting) return;
|
|
251
|
+
|
|
252
|
+
// Thermostat
|
|
253
|
+
if (d.mode != "manual") {
|
|
254
|
+
const range = (d.mode == "eco") ? 1.5 : 0.5;
|
|
255
|
+
if (d.temp > d.target + range && !d.relays.compressor) setRelay(d, "compressor", 1, "thermostat", silent);
|
|
256
|
+
if (d.temp < d.target - range && d.relays.compressor) setRelay(d, "compressor", 0, "thermostat", silent);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// Temperature
|
|
260
|
+
// NOTE: Faster than a real room, so the alarm can be tested in about 30 seconds. (Manual mode, compressor off)
|
|
261
|
+
let change = 0.15; // Heat from outside
|
|
262
|
+
if (d.relays.compressor) change -= (d.relays.fan) ? 0.35 : 0.22;
|
|
263
|
+
if (d.relays.defrost) change += 0.25;
|
|
264
|
+
if (d.relays.light) change += 0.01;
|
|
265
|
+
// WHY the limits: in Manual mode the room went to +250 °C, or under absolute zero with the compressor on
|
|
266
|
+
d.temp = round1(Math.min(TEMP_MAX, Math.max(TEMP_MIN, d.temp + change + (Math.random() - 0.5) * 0.08)));
|
|
267
|
+
|
|
268
|
+
d.humidity = Math.min(98, Math.max(70, d.humidity + (Math.random() - 0.5) * 1.2 + (d.relays.defrost ? 0.3 : 0)));
|
|
269
|
+
d.signal = Math.min(100, Math.max(40, d.signal + random(-3, 3)));
|
|
270
|
+
d.uptime++;
|
|
271
|
+
|
|
272
|
+
const power = (d.relays.compressor ? 1200 : 0) + (d.relays.fan ? 150 : 0) + (d.relays.defrost ? 800 : 0) + (d.relays.light ? 40 : 0) + 25 + random(-15, 15);
|
|
273
|
+
|
|
274
|
+
// Alarm
|
|
275
|
+
if (!d.alarm && d.temp > d.target + 4) {
|
|
276
|
+
d.alarm = 1;
|
|
277
|
+
if (!silent) addEvent(d, "Warning", "High temperature alarm: " + d.temp.toFixed(1) + " °C");
|
|
278
|
+
} else if (d.alarm && d.temp <= d.target + 3) {
|
|
279
|
+
d.alarm = 0;
|
|
280
|
+
if (!silent) addEvent(d, "Success", "Temperature is normal again");
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// History
|
|
284
|
+
const h = d.history;
|
|
285
|
+
h.labels.push(timeText);
|
|
286
|
+
h.temp.push(d.temp);
|
|
287
|
+
// Marked value: a colored dot on the line while the room is in alarm.
|
|
288
|
+
h.tempPoints.push({ value: round1(d.temp), color: (d.alarm) ? ERROR_COLOR : "" });
|
|
289
|
+
h.target.push(d.target);
|
|
290
|
+
h.humidity.push(Math.round(d.humidity));
|
|
291
|
+
h.power.push(power);
|
|
292
|
+
h.signal.push(d.signal);
|
|
293
|
+
|
|
294
|
+
for (const key in h) {
|
|
295
|
+
if (h[key].length > HISTORY_COUNT) h[key].shift();
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
const setRelay = function (d, key, value, source, silent = 0) {
|
|
301
|
+
|
|
302
|
+
if (d.relays[key] == value) return;
|
|
303
|
+
d.relays[key] = value;
|
|
304
|
+
|
|
305
|
+
const relay = RELAYS.find(function (r) { return r.key == key; });
|
|
306
|
+
if (!silent) addEvent(d, "Info", relay.title + " turned " + ((value) ? "on" : "off") + " (" + source + ")");
|
|
307
|
+
if (d == device) renderControls();
|
|
308
|
+
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
const addEvent = function (d, level, message, date = new Date()) {
|
|
312
|
+
|
|
313
|
+
d.events.unshift({ time: getTimeText(date), level: level, message: message });
|
|
314
|
+
if (d.events.length > 100) d.events.pop();
|
|
315
|
+
|
|
316
|
+
if (d == device && isReady) renderEvents();
|
|
317
|
+
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
// Test: Restart takes 3 seconds.
|
|
321
|
+
const restartDevice = function (d, reason = "Restarted by user") {
|
|
322
|
+
|
|
323
|
+
if (!d.online || d.restarting) return; // (a second click started a second timer that ended the first restart early)
|
|
324
|
+
|
|
325
|
+
d.restarting = 1;
|
|
326
|
+
addEvent(d, "Warning", reason);
|
|
327
|
+
renderAll();
|
|
328
|
+
|
|
329
|
+
waiting.setMessage("Restarting " + d.name + "...");
|
|
330
|
+
waiting.open();
|
|
331
|
+
|
|
332
|
+
setTimeout(function () {
|
|
333
|
+
d.restarting = 0;
|
|
334
|
+
d.uptime = 0;
|
|
335
|
+
addEvent(d, "Success", "Device is online again");
|
|
336
|
+
waiting.close();
|
|
337
|
+
renderAll();
|
|
338
|
+
}, 3000);
|
|
339
|
+
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
// Test: Connection always fails for offline devices.
|
|
343
|
+
const reconnectDevice = function (d) {
|
|
344
|
+
|
|
345
|
+
waiting.setMessage("Connecting to " + d.name + " (" + d.ip + ")...");
|
|
346
|
+
waiting.open();
|
|
347
|
+
|
|
348
|
+
setTimeout(function () {
|
|
349
|
+
waiting.close();
|
|
350
|
+
if (d.online) {
|
|
351
|
+
addEvent(d, "Info", "Device data refreshed");
|
|
352
|
+
} else {
|
|
353
|
+
addEvent(d, "Error", "Connection failed: timeout (" + d.ip + ")");
|
|
354
|
+
}
|
|
355
|
+
}, 1500);
|
|
356
|
+
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
const updateFirmware = function (d) {
|
|
360
|
+
|
|
361
|
+
if (!d.online || d.firmware == LATEST_FIRMWARE) return;
|
|
362
|
+
|
|
363
|
+
waiting.setMessage("Installing firmware " + LATEST_FIRMWARE + "...");
|
|
364
|
+
waiting.open();
|
|
365
|
+
|
|
366
|
+
setTimeout(function () {
|
|
367
|
+
addEvent(d, "Success", "Firmware updated: " + d.firmware + " → " + LATEST_FIRMWARE);
|
|
368
|
+
d.firmware = LATEST_FIRMWARE;
|
|
369
|
+
waiting.close();
|
|
370
|
+
restartDevice(d, "Restarting after the firmware update");
|
|
371
|
+
}, 2500);
|
|
372
|
+
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
const factoryReset = function (d) {
|
|
376
|
+
|
|
377
|
+
d.mode = "auto";
|
|
378
|
+
d.target = (d.model == "CRC-300") ? -24 : -18;
|
|
379
|
+
d.relays = { compressor: 0, fan: 1, defrost: 0, light: 0 };
|
|
380
|
+
d.alerts = { email: 1, sms: 0, offline: 1 };
|
|
381
|
+
d.defrostTime = "03:00";
|
|
382
|
+
|
|
383
|
+
addEvent(d, "Warning", "Factory reset");
|
|
384
|
+
restartDevice(d, "Restarting after the factory reset");
|
|
385
|
+
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
// *** HELPERS:
|
|
389
|
+
|
|
390
|
+
const round1 = function (value) {
|
|
391
|
+
return Math.round(value * 10) / 10;
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
const getTimeText = function (date) {
|
|
395
|
+
return date.toLocaleTimeString("en-GB"); // 14:05:09
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
const formatUptime = function (seconds) {
|
|
399
|
+
const days = Math.floor(seconds / 86400);
|
|
400
|
+
const hours = Math.floor((seconds % 86400) / 3600);
|
|
401
|
+
const minutes = Math.floor((seconds % 3600) / 60);
|
|
402
|
+
return days + "d " + hours + "h " + minutes + "m";
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
const getStatus = function (d) {
|
|
406
|
+
if (!d.online) return "offline";
|
|
407
|
+
if (d.restarting) return "restarting";
|
|
408
|
+
if (d.alarm) return "alarm";
|
|
409
|
+
return "online";
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
const isControllable = function (d) {
|
|
413
|
+
return d.online && !d.restarting;
|
|
414
|
+
};
|
|
415
|
+
|
|
416
|
+
const targetToSlider = function (target) {
|
|
417
|
+
return Math.round((target - TARGET_MIN) / (TARGET_MAX - TARGET_MIN) * 100);
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
const sliderToTarget = function (value) {
|
|
421
|
+
return Math.round(TARGET_MIN + value / 100 * (TARGET_MAX - TARGET_MIN));
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
// WHY: Some components have no enabled setting. "inert" blocks the mouse and keyboard for all the children.
|
|
425
|
+
const setInteractive = function (obj, enabled) {
|
|
426
|
+
obj.elem.inert = !enabled;
|
|
427
|
+
obj.opacity = (enabled) ? 1 : 0.4;
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
const downloadEventsAsCSV = function (d) {
|
|
431
|
+
const lines = ["time,level,message"];
|
|
432
|
+
d.events.forEach(function (e) {
|
|
433
|
+
lines.push([e.time, e.level, '"' + e.message.replace(/"/g, '""') + '"'].join(","));
|
|
434
|
+
});
|
|
435
|
+
const link = document.createElement("a");
|
|
436
|
+
link.href = URL.createObjectURL(new Blob([lines.join("\n")], { type: "text/csv" }));
|
|
437
|
+
link.download = d.id + "-events.csv";
|
|
438
|
+
link.click();
|
|
439
|
+
URL.revokeObjectURL(link.href);
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
// *** VIEW HELPERS:
|
|
443
|
+
|
|
444
|
+
// GROUP: Cards side by side (wraps on small screens)
|
|
445
|
+
const startRow = function () {
|
|
446
|
+
HGroup({
|
|
447
|
+
width: "100%",
|
|
448
|
+
height: "auto",
|
|
449
|
+
align: "left top",
|
|
450
|
+
gap: 16,
|
|
451
|
+
});
|
|
452
|
+
that.elem.style.flexWrap = "wrap";
|
|
453
|
+
that.elem.style.alignItems = "stretch"; // WHY: Cards in the same row have the same height.
|
|
454
|
+
};
|
|
455
|
+
|
|
456
|
+
// flex: "1 1 320px" (grow, shrink, min width before wrap)
|
|
457
|
+
const setFlex = function (obj, flex) {
|
|
458
|
+
obj.elem.style.flex = flex;
|
|
459
|
+
obj.elem.style.minWidth = "0";
|
|
460
|
+
};
|
|
461
|
+
|
|
462
|
+
const startCard = function (title, subtitle, flex) {
|
|
463
|
+
|
|
464
|
+
const card = VGroup({
|
|
465
|
+
height: "auto",
|
|
466
|
+
align: "left top",
|
|
467
|
+
gap: 16,
|
|
468
|
+
padding: 16,
|
|
469
|
+
color: CARD_COLOR,
|
|
470
|
+
border: 1,
|
|
471
|
+
borderColor: CARD_BORDER_COLOR,
|
|
472
|
+
round: 12,
|
|
473
|
+
});
|
|
474
|
+
setFlex(card, flex);
|
|
475
|
+
|
|
476
|
+
VGroup({ width: "100%", height: "auto", align: "left top", gap: 0 });
|
|
477
|
+
|
|
478
|
+
Label({
|
|
479
|
+
text: title,
|
|
480
|
+
fontSize: 16,
|
|
481
|
+
textColor: Ink(0.95),
|
|
482
|
+
});
|
|
483
|
+
that.elem.style.fontFamily = "opensans-bold";
|
|
484
|
+
|
|
485
|
+
if (subtitle) {
|
|
486
|
+
Label({
|
|
487
|
+
text: subtitle,
|
|
488
|
+
fontSize: 12,
|
|
489
|
+
textColor: Ink(0.45),
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
endGroup();
|
|
494
|
+
|
|
495
|
+
return card;
|
|
496
|
+
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
const endCard = function () {
|
|
500
|
+
endGroup();
|
|
501
|
+
};
|
|
502
|
+
|
|
503
|
+
// GROUP: Left and right items (space between)
|
|
504
|
+
const startSpaceBetween = function (gap = 12) {
|
|
505
|
+
HGroup({ width: "100%", height: "auto", align: "left center", gap: gap });
|
|
506
|
+
that.elem.style.justifyContent = "space-between";
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
const createSmallTitle = function (text) {
|
|
510
|
+
Label({
|
|
511
|
+
text: text.toUpperCase(),
|
|
512
|
+
fontSize: 11,
|
|
513
|
+
textColor: Ink(0.45),
|
|
514
|
+
});
|
|
515
|
+
that.elem.style.letterSpacing = "1px";
|
|
516
|
+
};
|
|
517
|
+
|
|
518
|
+
const createButton = function (text, iconFile, onClick, params = {}) {
|
|
519
|
+
|
|
520
|
+
const btn = SmartButton({
|
|
521
|
+
styleName: "classic",
|
|
522
|
+
width: params.width || "auto",
|
|
523
|
+
labelText: text,
|
|
524
|
+
iconFile: (iconFile) ? ASSETS + iconFile : "",
|
|
525
|
+
onClick: onClick,
|
|
526
|
+
style: {
|
|
527
|
+
layout: { gap: 10, padding: [14, 8], align: params.align || "center center" },
|
|
528
|
+
icon: { width: 20, height: 20 },
|
|
529
|
+
label: { fontSize: 14, textColor: Ink(0.9) },
|
|
530
|
+
box: { color: params.color || FIELD_COLOR, border: 1, borderColor: CARD_BORDER_COLOR, round: 8 },
|
|
531
|
+
hover: { color: params.hoverColor || T.surface3 },
|
|
532
|
+
active: { color: params.activeColor || T.surface4 },
|
|
533
|
+
},
|
|
534
|
+
});
|
|
535
|
+
if (btn.icon) btn.icon.elem.style.filter = T.iconFilter; // WHY: Panel icons are black.
|
|
536
|
+
|
|
537
|
+
return btn;
|
|
538
|
+
|
|
539
|
+
};
|
|
540
|
+
|
|
541
|
+
// Dark style for SelectTime and SelectDate
|
|
542
|
+
const PICKER_STYLE = {
|
|
543
|
+
field: { color: FIELD_COLOR, border: 1, borderColor: CARD_BORDER_COLOR, round: 8 },
|
|
544
|
+
fieldHover: { borderColor: Ink(0.3) },
|
|
545
|
+
fieldFocus: { borderColor: ACCENT_COLOR },
|
|
546
|
+
fieldText: { fontSize: 14, textColor: Ink(0.9) },
|
|
547
|
+
placeholder: { textColor: Ink(0.4) },
|
|
548
|
+
icon: { color: Ink(0.55) },
|
|
549
|
+
panel: { color: FIELD_COLOR, borderColor: Ink(0.12), shadow: "0 8px 24px rgba(0, 0, 0, 0.5)" },
|
|
550
|
+
footerButton: { textColor: ACCENT_COLOR },
|
|
551
|
+
disabled: { opacity: 0.4 },
|
|
552
|
+
};
|
|
553
|
+
|
|
554
|
+
// *** VIEW:
|
|
555
|
+
|
|
556
|
+
const initHeader = function () {
|
|
557
|
+
|
|
558
|
+
startSpaceBetween(16);
|
|
559
|
+
that.elem.style.flexWrap = "wrap";
|
|
560
|
+
|
|
561
|
+
// Title and device select
|
|
562
|
+
HGroup({ width: "auto", height: "auto", align: "left center", gap: 20 });
|
|
563
|
+
that.elem.style.flexWrap = "wrap";
|
|
564
|
+
|
|
565
|
+
VGroup({ width: "auto", height: "auto", align: "left top", gap: 0 });
|
|
566
|
+
|
|
567
|
+
Label({
|
|
568
|
+
text: "Cold Rooms",
|
|
569
|
+
fontSize: 26,
|
|
570
|
+
textColor: Ink(0.95),
|
|
571
|
+
});
|
|
572
|
+
that.elem.style.fontFamily = "opensans-bold";
|
|
573
|
+
|
|
574
|
+
Label({
|
|
575
|
+
text: "Cold room controllers",
|
|
576
|
+
fontSize: 14,
|
|
577
|
+
textColor: Ink(0.5),
|
|
578
|
+
});
|
|
579
|
+
|
|
580
|
+
endGroup();
|
|
581
|
+
|
|
582
|
+
deviceSelect = TinySelect({
|
|
583
|
+
title: "Device",
|
|
584
|
+
list: DEVICES.map(function (d) { return { id: d.id, label: d.name }; }),
|
|
585
|
+
height: 40,
|
|
586
|
+
fontSize: 15,
|
|
587
|
+
color: CARD_COLOR,
|
|
588
|
+
border: 1,
|
|
589
|
+
borderColor: CARD_BORDER_COLOR,
|
|
590
|
+
round: 8,
|
|
591
|
+
labelTextColor: Ink(0.95),
|
|
592
|
+
arrowIcon: LIB_PATH + "comp/tiny-select/arrow.svg",
|
|
593
|
+
arrowSize: 20,
|
|
594
|
+
invertIconColor: T.invertIcon,
|
|
595
|
+
listFontSize: 15,
|
|
596
|
+
listTextColor: Ink(0.85),
|
|
597
|
+
listOverTextColor: ACCENT_COLOR,
|
|
598
|
+
listBackgroundColor: FIELD_COLOR,
|
|
599
|
+
listBorderColor: Ink(0.15),
|
|
600
|
+
onSelect: function (index) {
|
|
601
|
+
if (isReady) selectDevice(index);
|
|
602
|
+
},
|
|
603
|
+
});
|
|
604
|
+
deviceSelect.lblTitle.textColor = Ink(0.5);
|
|
605
|
+
|
|
606
|
+
lblStatus = Label({
|
|
607
|
+
text: "",
|
|
608
|
+
fontSize: 13,
|
|
609
|
+
round: 100,
|
|
610
|
+
border: 1,
|
|
611
|
+
padding: [12, 4],
|
|
612
|
+
});
|
|
613
|
+
lblStatus.elem.style.whiteSpace = "nowrap";
|
|
614
|
+
|
|
615
|
+
endGroup();
|
|
616
|
+
|
|
617
|
+
// Buttons
|
|
618
|
+
HGroup({ width: "auto", height: "auto", align: "right center", gap: 10 });
|
|
619
|
+
|
|
620
|
+
createButton("Refresh", "", function () {
|
|
621
|
+
reconnectDevice(device);
|
|
622
|
+
});
|
|
623
|
+
|
|
624
|
+
btnMore = createButton("More", "top-bar/apps.png", function () { });
|
|
625
|
+
|
|
626
|
+
// MENU: More actions
|
|
627
|
+
moreMenu = ContextMenu({
|
|
628
|
+
items: [
|
|
629
|
+
{ text: "Sync device clock", key: "sync" },
|
|
630
|
+
{ text: "Download event log (CSV)", key: "csv" },
|
|
631
|
+
{ text: "Copy serial number", key: "copy" },
|
|
632
|
+
"-",
|
|
633
|
+
{ text: "Factory reset...", key: "reset" },
|
|
634
|
+
],
|
|
635
|
+
onClick: function (self, item) {
|
|
636
|
+
onMoreMenuClick(item.key);
|
|
637
|
+
},
|
|
638
|
+
style: {
|
|
639
|
+
menu: { color: FIELD_COLOR, borderColor: Ink(0.12), shadow: "0px 8px 24px rgba(0, 0, 0, 0.5)" },
|
|
640
|
+
item: { textColor: Ink(0.85) },
|
|
641
|
+
itemHover: { textColor: Ink(1), color: Ink(0.08) },
|
|
642
|
+
disabled: { textColor: Ink(0.3) },
|
|
643
|
+
separator: { color: Ink(0.1) },
|
|
644
|
+
},
|
|
645
|
+
});
|
|
646
|
+
moreMenu.attachTo(btnMore, "click");
|
|
647
|
+
|
|
648
|
+
endGroup();
|
|
649
|
+
|
|
650
|
+
endGroup();
|
|
651
|
+
|
|
652
|
+
};
|
|
653
|
+
|
|
654
|
+
const initKpiRow = function () {
|
|
655
|
+
|
|
656
|
+
const KPI_LIST = [
|
|
657
|
+
// minValue / maxValue: The fixed scale of the graph. null: Automatic.
|
|
658
|
+
{ title: "Temperature", iconFile: "light.png", lineColor: ACCENT_COLOR, minValue: TARGET_MIN, maxValue: TARGET_MAX },
|
|
659
|
+
{ title: "Humidity", iconFile: "maybe.png", lineColor: T.info, minValue: 0, maxValue: 100 },
|
|
660
|
+
{ title: "Power", iconFile: "left-menu/bolt.png", lineColor: WARNING_COLOR, minValue: null, maxValue: 0 },
|
|
661
|
+
{ title: "Signal", iconFile: "left-menu/url.png", lineColor: "#9085E9", minValue: 0, maxValue: 100 },
|
|
662
|
+
];
|
|
663
|
+
|
|
664
|
+
startRow();
|
|
665
|
+
|
|
666
|
+
KPI_LIST.forEach(function (kpi) {
|
|
667
|
+
|
|
668
|
+
const kpiBox = SparkLineBox({
|
|
669
|
+
height: 100,
|
|
670
|
+
title: kpi.title,
|
|
671
|
+
valueText: "",
|
|
672
|
+
iconFile: ASSETS + kpi.iconFile,
|
|
673
|
+
lineColor: kpi.lineColor,
|
|
674
|
+
minValue: kpi.minValue,
|
|
675
|
+
maxValue: kpi.maxValue,
|
|
676
|
+
style: {
|
|
677
|
+
box: { color: CARD_COLOR, border: 1, borderColor: CARD_BORDER_COLOR, round: 12 },
|
|
678
|
+
text: { padding: 14 },
|
|
679
|
+
title: { fontSize: 13, textColor: Ink(0.5) },
|
|
680
|
+
valueText: { fontSize: 24, textColor: Ink(0.95) },
|
|
681
|
+
trend: { flatColor: Ink(0.45) }, // WHY: The default flat color is made for light cards.
|
|
682
|
+
icon: { width: 20, height: 20 },
|
|
683
|
+
graph: { height: 34, padding: 14 },
|
|
684
|
+
},
|
|
685
|
+
});
|
|
686
|
+
setFlex(kpiBox, "1 1 220px");
|
|
687
|
+
kpiBox.icon.elem.style.filter = T.iconFilter; // WHY: Panel icons are black.
|
|
688
|
+
kpiBox.icon.opacity = 0.5;
|
|
689
|
+
|
|
690
|
+
kpiBoxList.push(kpiBox);
|
|
691
|
+
|
|
692
|
+
});
|
|
693
|
+
|
|
694
|
+
endGroup();
|
|
695
|
+
|
|
696
|
+
};
|
|
697
|
+
|
|
698
|
+
const initChartRow = function () {
|
|
699
|
+
|
|
700
|
+
startRow();
|
|
701
|
+
|
|
702
|
+
// LINE: Live temperature
|
|
703
|
+
chartTemp = ChartBox({
|
|
704
|
+
height: 340,
|
|
705
|
+
type: "line",
|
|
706
|
+
theme: T.chartTheme,
|
|
707
|
+
title: "Temperature",
|
|
708
|
+
subtitle: "Live, last " + CHART_COUNT + " seconds",
|
|
709
|
+
maxCount: CHART_COUNT,
|
|
710
|
+
beginAtZero: 0,
|
|
711
|
+
animated: 0, // WHY: A new value every second. With animation, new points rise from the bottom every time.
|
|
712
|
+
labels: [],
|
|
713
|
+
datasets: [
|
|
714
|
+
{
|
|
715
|
+
label: "Temperature",
|
|
716
|
+
data: [],
|
|
717
|
+
fill: "start", // WHY: "true" fills to 0. Temperatures can be negative.
|
|
718
|
+
tension: 0.35,
|
|
719
|
+
backgroundColor: ChartBox.gradient("rgba(101, 162, 147, 0.3)", "rgba(101, 162, 147, 0)"),
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
label: "Target",
|
|
723
|
+
data: [],
|
|
724
|
+
borderDash: [5, 5],
|
|
725
|
+
},
|
|
726
|
+
],
|
|
727
|
+
formatValue: function (value) { return value + " °C"; },
|
|
728
|
+
options: {
|
|
729
|
+
elements: { point: { radius: 0 } },
|
|
730
|
+
scales: { x: { ticks: { maxTicksLimit: 6 } } },
|
|
731
|
+
},
|
|
732
|
+
style: {
|
|
733
|
+
box: { color: CARD_COLOR, borderColor: CARD_BORDER_COLOR, round: 12, padding: 16 },
|
|
734
|
+
chart: { colors: CHART_COLORS },
|
|
735
|
+
},
|
|
736
|
+
});
|
|
737
|
+
setFlex(chartTemp, "2 1 520px");
|
|
738
|
+
// WHY: The chart gets the row height, if the card in the same row is taller.
|
|
739
|
+
chartTemp.elem.style.height = "auto";
|
|
740
|
+
chartTemp.elem.style.minHeight = "340px";
|
|
741
|
+
|
|
742
|
+
// INFO: Device information
|
|
743
|
+
startCard("Device Info", "", "1 1 320px");
|
|
744
|
+
|
|
745
|
+
const INFO_LIST = [
|
|
746
|
+
{ key: "model", title: "Model" },
|
|
747
|
+
{ key: "serial", title: "Serial number" },
|
|
748
|
+
{ key: "firmware", title: "Firmware" },
|
|
749
|
+
{ key: "ip", title: "IP address" },
|
|
750
|
+
{ key: "location", title: "Location" },
|
|
751
|
+
{ key: "uptime", title: "Uptime" },
|
|
752
|
+
{ key: "setpoint", title: "Target" },
|
|
753
|
+
];
|
|
754
|
+
|
|
755
|
+
VGroup({ width: "100%", height: "auto", align: "left top", gap: 0 });
|
|
756
|
+
|
|
757
|
+
INFO_LIST.forEach(function (info, index) {
|
|
758
|
+
|
|
759
|
+
startSpaceBetween();
|
|
760
|
+
that.elem.style.padding = "9px 0px";
|
|
761
|
+
if (index > 0) that.elem.style.borderTop = "1px solid " + Ink(0.06);
|
|
762
|
+
|
|
763
|
+
Label({ text: info.title, fontSize: 14, textColor: Ink(0.5) });
|
|
764
|
+
|
|
765
|
+
infoLabels[info.key] = Label({ text: "", fontSize: 14, textColor: Ink(0.9) });
|
|
766
|
+
that.elem.style.whiteSpace = "nowrap";
|
|
767
|
+
|
|
768
|
+
endGroup();
|
|
769
|
+
|
|
770
|
+
});
|
|
771
|
+
|
|
772
|
+
endGroup();
|
|
773
|
+
|
|
774
|
+
lblOfflineInfo = Label({
|
|
775
|
+
text: "",
|
|
776
|
+
fontSize: 13,
|
|
777
|
+
textColor: ERROR_COLOR,
|
|
778
|
+
color: "rgba(230, 103, 103, 0.1)",
|
|
779
|
+
round: 8,
|
|
780
|
+
padding: [12, 8],
|
|
781
|
+
width: "100%",
|
|
782
|
+
});
|
|
783
|
+
|
|
784
|
+
endCard();
|
|
785
|
+
|
|
786
|
+
endGroup();
|
|
787
|
+
|
|
788
|
+
};
|
|
789
|
+
|
|
790
|
+
const initControlRow = function () {
|
|
791
|
+
|
|
792
|
+
startRow();
|
|
793
|
+
|
|
794
|
+
// RELAYS
|
|
795
|
+
startCard("Relays", "Outputs of the controller", "1 1 320px");
|
|
796
|
+
|
|
797
|
+
RELAYS.forEach(function (relay) {
|
|
798
|
+
|
|
799
|
+
startSpaceBetween();
|
|
800
|
+
|
|
801
|
+
VGroup({ width: "auto", height: "auto", align: "left top", gap: 0 });
|
|
802
|
+
Label({ text: relay.title, fontSize: 15, textColor: Ink(0.9) });
|
|
803
|
+
Label({ text: relay.desc, fontSize: 12, textColor: Ink(0.45) });
|
|
804
|
+
endGroup();
|
|
805
|
+
|
|
806
|
+
relayToggles[relay.key] = Toggle({
|
|
807
|
+
width: 52,
|
|
808
|
+
height: 30,
|
|
809
|
+
spacing: 3,
|
|
810
|
+
backgroundStyle: {
|
|
811
|
+
color: T.surface3,
|
|
812
|
+
selectedColor: PRIMARY_COLOR,
|
|
813
|
+
border: 1,
|
|
814
|
+
borderColor: CARD_BORDER_COLOR,
|
|
815
|
+
},
|
|
816
|
+
buttonStyle: {
|
|
817
|
+
color: Ink(0.35),
|
|
818
|
+
selectedColor: Ink(0.95),
|
|
819
|
+
},
|
|
820
|
+
onChange: function (self) {
|
|
821
|
+
if (isRendering) return;
|
|
822
|
+
setRelay(device, relay.key, self.value, "manual");
|
|
823
|
+
},
|
|
824
|
+
});
|
|
825
|
+
|
|
826
|
+
endGroup();
|
|
827
|
+
|
|
828
|
+
});
|
|
829
|
+
|
|
830
|
+
lblRelayHint = Label({
|
|
831
|
+
text: "Compressor and defrost heater are controlled by the thermostat. Select <b>Manual</b> mode to change them.",
|
|
832
|
+
fontSize: 12,
|
|
833
|
+
textColor: Ink(0.45),
|
|
834
|
+
width: "100%",
|
|
835
|
+
});
|
|
836
|
+
|
|
837
|
+
endCard();
|
|
838
|
+
|
|
839
|
+
// OPERATION
|
|
840
|
+
startCard("Operation", "Mode, target and schedule", "1 1 320px");
|
|
841
|
+
|
|
842
|
+
VGroup({ width: "100%", height: "auto", align: "left top", gap: 10 });
|
|
843
|
+
|
|
844
|
+
createSmallTitle("Mode");
|
|
845
|
+
|
|
846
|
+
MODES.forEach(function (mode) {
|
|
847
|
+
|
|
848
|
+
RadioButton({
|
|
849
|
+
group: "mode",
|
|
850
|
+
value: mode.value,
|
|
851
|
+
labelText: mode.text + " <span style='color:" + Ink(0.4) + "; font-size: 12px'>" + mode.desc + "</span>",
|
|
852
|
+
style: {
|
|
853
|
+
mark: { width: 20, height: 20, color: "transparent", borderColor: Ink(0.35) },
|
|
854
|
+
checkedMark: { color: "transparent", borderColor: ACCENT_COLOR },
|
|
855
|
+
hoverMark: { borderColor: Ink(0.7) },
|
|
856
|
+
dot: { color: ACCENT_COLOR },
|
|
857
|
+
label: { fontSize: 14, textColor: Ink(0.9) },
|
|
858
|
+
},
|
|
859
|
+
onChange: function (self) {
|
|
860
|
+
if (isRendering) return;
|
|
861
|
+
device.mode = self.value;
|
|
862
|
+
addEvent(device, "Info", "Mode changed to " + mode.text);
|
|
863
|
+
renderControls();
|
|
864
|
+
},
|
|
865
|
+
});
|
|
866
|
+
|
|
867
|
+
});
|
|
868
|
+
|
|
869
|
+
endGroup();
|
|
870
|
+
|
|
871
|
+
grpTarget = VGroup({ width: "100%", height: "auto", align: "left top", gap: 8 });
|
|
872
|
+
|
|
873
|
+
startSpaceBetween();
|
|
874
|
+
createSmallTitle("Target temperature");
|
|
875
|
+
lblTarget = Label({ text: "", fontSize: 16, textColor: Ink(0.95) });
|
|
876
|
+
that.elem.style.fontFamily = "opensans-bold";
|
|
877
|
+
endGroup();
|
|
878
|
+
|
|
879
|
+
sliderTarget = Slider({
|
|
880
|
+
width: 280,
|
|
881
|
+
trackHeight: 10,
|
|
882
|
+
minThumbHeight: 28,
|
|
883
|
+
trackColor: ACCENT_COLOR,
|
|
884
|
+
trackBackgroundColor: Ink(0.1),
|
|
885
|
+
thumbColor: Ink(0.9),
|
|
886
|
+
showValueOnSet: 0,
|
|
887
|
+
showValueOnDrag: 0, // WHY: Slider shows 0-100. The real value is shown in lblTarget.
|
|
888
|
+
onDragMove: function (value) {
|
|
889
|
+
lblTarget.text = sliderToTarget(value) + " °C";
|
|
890
|
+
},
|
|
891
|
+
onDragEnd: function () {
|
|
892
|
+
const target = sliderToTarget(sliderTarget.getValue());
|
|
893
|
+
if (target == device.target) return;
|
|
894
|
+
device.target = target;
|
|
895
|
+
addEvent(device, "Info", "Target temperature set to " + target + " °C");
|
|
896
|
+
renderControls();
|
|
897
|
+
},
|
|
898
|
+
});
|
|
899
|
+
|
|
900
|
+
endGroup();
|
|
901
|
+
|
|
902
|
+
// SCHEDULE
|
|
903
|
+
HGroup({ width: "100%", height: "auto", align: "left top", gap: 12 });
|
|
904
|
+
that.elem.style.flexWrap = "wrap";
|
|
905
|
+
|
|
906
|
+
VGroup({ width: "auto", height: "auto", align: "left top", gap: 8 });
|
|
907
|
+
|
|
908
|
+
createSmallTitle("Daily defrost");
|
|
909
|
+
|
|
910
|
+
selectDefrostTime = SelectTime({
|
|
911
|
+
width: 130,
|
|
912
|
+
height: 40,
|
|
913
|
+
minuteStep: 15,
|
|
914
|
+
showClearButton: 0,
|
|
915
|
+
style: Object.assign({}, PICKER_STYLE, {
|
|
916
|
+
columnTitle: { textColor: Ink(0.45), activeTextColor: Ink(0.9) },
|
|
917
|
+
cell: { textColor: Ink(0.85), hoverColor: Ink(0.08) },
|
|
918
|
+
selectedCell: { color: PRIMARY_COLOR, textColor: Ink(1) },
|
|
919
|
+
disabledCell: { textColor: Ink(0.2) },
|
|
920
|
+
}),
|
|
921
|
+
onChange: function (self) {
|
|
922
|
+
if (isRendering || !self.value) return;
|
|
923
|
+
device.defrostTime = self.value;
|
|
924
|
+
addEvent(device, "Info", "Daily defrost time set to " + self.value);
|
|
925
|
+
},
|
|
926
|
+
});
|
|
927
|
+
|
|
928
|
+
endGroup();
|
|
929
|
+
|
|
930
|
+
VGroup({ width: "auto", height: "auto", align: "left top", gap: 8 });
|
|
931
|
+
|
|
932
|
+
createSmallTitle("Next maintenance");
|
|
933
|
+
|
|
934
|
+
selectMaintenanceDate = SelectDate({
|
|
935
|
+
width: 170,
|
|
936
|
+
height: 40,
|
|
937
|
+
minDate: new Date(),
|
|
938
|
+
format: "DD MMM YYYY",
|
|
939
|
+
showClearButton: 0,
|
|
940
|
+
style: Object.assign({}, PICKER_STYLE, {
|
|
941
|
+
title: { textColor: Ink(0.9) },
|
|
942
|
+
arrow: { color: Ink(0.6), hoverColor: Ink(0.08) },
|
|
943
|
+
weekDay: { textColor: Ink(0.45) },
|
|
944
|
+
day: { textColor: Ink(0.85), hoverColor: Ink(0.08) },
|
|
945
|
+
today: { borderColor: Ink(0.35) },
|
|
946
|
+
selectedDay: { color: PRIMARY_COLOR, textColor: Ink(1) },
|
|
947
|
+
disabledDay: { textColor: Ink(0.2) },
|
|
948
|
+
}),
|
|
949
|
+
onChange: function (self) {
|
|
950
|
+
if (isRendering || !self.value) return;
|
|
951
|
+
device.maintenanceDate = self.value;
|
|
952
|
+
addEvent(device, "Info", "Next maintenance set to " + self.dateText);
|
|
953
|
+
},
|
|
954
|
+
});
|
|
955
|
+
|
|
956
|
+
endGroup();
|
|
957
|
+
|
|
958
|
+
endGroup();
|
|
959
|
+
|
|
960
|
+
endCard();
|
|
961
|
+
|
|
962
|
+
// ALERTS
|
|
963
|
+
startCard("Alerts", "Sent by the panel (works when the device is offline)", "1 1 320px");
|
|
964
|
+
|
|
965
|
+
VGroup({ width: "100%", height: "auto", align: "left top", gap: 12 });
|
|
966
|
+
|
|
967
|
+
ALERTS.forEach(function (alert) {
|
|
968
|
+
|
|
969
|
+
alertCheckBoxes[alert.key] = CheckBox({
|
|
970
|
+
labelText: alert.text,
|
|
971
|
+
style: {
|
|
972
|
+
mark: { width: 20, height: 20, color: "transparent", borderColor: Ink(0.35) },
|
|
973
|
+
checkedMark: { color: PRIMARY_COLOR, borderColor: PRIMARY_COLOR },
|
|
974
|
+
hoverMark: { borderColor: Ink(0.7) },
|
|
975
|
+
tick: { color: Ink(1) },
|
|
976
|
+
label: { fontSize: 14, textColor: Ink(0.9) },
|
|
977
|
+
},
|
|
978
|
+
onChange: function (self) {
|
|
979
|
+
if (isRendering) return;
|
|
980
|
+
device.alerts[alert.key] = self.checked;
|
|
981
|
+
addEvent(device, "Info", "Alert \"" + alert.text + "\" " + ((self.checked) ? "enabled" : "disabled"));
|
|
982
|
+
},
|
|
983
|
+
});
|
|
984
|
+
|
|
985
|
+
});
|
|
986
|
+
|
|
987
|
+
endGroup();
|
|
988
|
+
|
|
989
|
+
// MAINTENANCE
|
|
990
|
+
VGroup({ width: "100%", height: "auto", align: "left top", gap: 10 });
|
|
991
|
+
that.elem.style.borderTop = "1px solid " + Ink(0.06);
|
|
992
|
+
that.elem.style.paddingTop = "16px";
|
|
993
|
+
|
|
994
|
+
createSmallTitle("Maintenance");
|
|
995
|
+
|
|
996
|
+
lblFirmwareInfo = Label({ text: "", fontSize: 13, textColor: Ink(0.6), width: "100%" });
|
|
997
|
+
|
|
998
|
+
HGroup({ width: "100%", height: "auto", align: "left center", gap: 10 });
|
|
999
|
+
that.elem.style.flexWrap = "wrap";
|
|
1000
|
+
|
|
1001
|
+
btnUpdate = createButton("Update Firmware", "left-menu/extension.png", function () {
|
|
1002
|
+
updateFirmware(device);
|
|
1003
|
+
});
|
|
1004
|
+
|
|
1005
|
+
// WHY: Hold to confirm, so the device is not restarted by mistake.
|
|
1006
|
+
btnRestart = HoldToConfirmButton({
|
|
1007
|
+
height: 38,
|
|
1008
|
+
labelText: "Hold to Restart",
|
|
1009
|
+
completedText: "RESTARTING",
|
|
1010
|
+
iconFile: ASSETS + "left-menu/bolt.png",
|
|
1011
|
+
holdingIconFile: ASSETS + "left-menu/bolt.png",
|
|
1012
|
+
holdDuration: 1500,
|
|
1013
|
+
resetDelay: 3000,
|
|
1014
|
+
style: {
|
|
1015
|
+
layout: { gap: 8, padding: [14, 0] },
|
|
1016
|
+
icon: { width: 20, height: 20 },
|
|
1017
|
+
label: { fontSize: 14, textColor: Ink(0.9) },
|
|
1018
|
+
holdingLabel: { fontSize: 14, textColor: "#B03A2E" },
|
|
1019
|
+
completedLabel: { fontSize: 14, textColor: T.primaryActive },
|
|
1020
|
+
box: { color: FIELD_COLOR, border: 1, borderColor: CARD_BORDER_COLOR, round: 8 },
|
|
1021
|
+
holdingBox: { color: "#FFD1CB", borderColor: ERROR_COLOR, round: 8 },
|
|
1022
|
+
completedBox: { color: "#DFEFE6", borderColor: ACCENT_COLOR, round: 8 },
|
|
1023
|
+
},
|
|
1024
|
+
onConfirm: function () {
|
|
1025
|
+
restartDevice(device);
|
|
1026
|
+
},
|
|
1027
|
+
});
|
|
1028
|
+
btnRestart.icon.elem.style.filter = T.iconFilter; // WHY: Only the normal icon is on a dark background.
|
|
1029
|
+
|
|
1030
|
+
endGroup();
|
|
1031
|
+
|
|
1032
|
+
endGroup();
|
|
1033
|
+
|
|
1034
|
+
endCard();
|
|
1035
|
+
|
|
1036
|
+
endGroup();
|
|
1037
|
+
|
|
1038
|
+
};
|
|
1039
|
+
|
|
1040
|
+
const initLogRow = function () {
|
|
1041
|
+
|
|
1042
|
+
startRow();
|
|
1043
|
+
|
|
1044
|
+
startCard("Event Log", "Last 10 events of the device. Full list: More > Download event log", "1 1 520px");
|
|
1045
|
+
|
|
1046
|
+
// GROUP: Table (created again when an event is added)
|
|
1047
|
+
grpEventTable = HGroup({ width: "100%", height: "auto", align: "left top" });
|
|
1048
|
+
that.elem.style.overflowX = "auto";
|
|
1049
|
+
endGroup();
|
|
1050
|
+
|
|
1051
|
+
endCard();
|
|
1052
|
+
|
|
1053
|
+
endGroup();
|
|
1054
|
+
|
|
1055
|
+
};
|
|
1056
|
+
|
|
1057
|
+
// *** RENDER:
|
|
1058
|
+
|
|
1059
|
+
const selectDevice = function (index) {
|
|
1060
|
+
|
|
1061
|
+
device = DEVICES[index];
|
|
1062
|
+
|
|
1063
|
+
// Chart and mini graphs: history of the device
|
|
1064
|
+
const h = device.history;
|
|
1065
|
+
chartTemp.data.labels = h.labels.slice(-CHART_COUNT);
|
|
1066
|
+
chartTemp.data.datasets[0].data = h.temp.slice(-CHART_COUNT);
|
|
1067
|
+
chartTemp.data.datasets[1].data = h.target.slice(-CHART_COUNT);
|
|
1068
|
+
chartTemp.update("none");
|
|
1069
|
+
chartTemp.setSubtitle((device.online) ? "Live, last " + CHART_COUNT + " seconds" : "Last data before the connection was lost");
|
|
1070
|
+
|
|
1071
|
+
kpiBoxList[0].setValues(h.tempPoints);
|
|
1072
|
+
kpiBoxList[1].setValues(h.humidity);
|
|
1073
|
+
kpiBoxList[2].setValues(h.power);
|
|
1074
|
+
kpiBoxList[3].setValues(h.signal);
|
|
1075
|
+
|
|
1076
|
+
renderAll();
|
|
1077
|
+
|
|
1078
|
+
};
|
|
1079
|
+
|
|
1080
|
+
const renderAll = function () {
|
|
1081
|
+
renderLiveValues();
|
|
1082
|
+
renderInfo();
|
|
1083
|
+
renderControls();
|
|
1084
|
+
renderEvents();
|
|
1085
|
+
};
|
|
1086
|
+
|
|
1087
|
+
// Changes every second.
|
|
1088
|
+
const renderLiveValues = function () {
|
|
1089
|
+
|
|
1090
|
+
const d = device;
|
|
1091
|
+
const h = d.history;
|
|
1092
|
+
const last = h.labels.length - 1;
|
|
1093
|
+
const hasData = d.online && !d.restarting;
|
|
1094
|
+
|
|
1095
|
+
kpiBoxList[0].setValueText((hasData) ? d.temp.toFixed(1) + " °C" : "—");
|
|
1096
|
+
kpiBoxList[1].setValueText((hasData) ? h.humidity[last] + "%" : "—");
|
|
1097
|
+
kpiBoxList[2].setValueText((hasData) ? h.power[last].toLocaleString("en-US") + " W" : "—");
|
|
1098
|
+
kpiBoxList[3].setValueText((hasData) ? h.signal[last] + "%" : "—");
|
|
1099
|
+
kpiBoxList.forEach(function (kpiBox) { kpiBox.opacity = (hasData) ? 1 : 0.5; });
|
|
1100
|
+
|
|
1101
|
+
// Status
|
|
1102
|
+
const status = STATUS_LIST[getStatus(d)];
|
|
1103
|
+
lblStatus.text = "● " + status.text;
|
|
1104
|
+
lblStatus.textColor = status.color;
|
|
1105
|
+
lblStatus.color = ChartBox.alpha(status.color, 0.12);
|
|
1106
|
+
lblStatus.borderColor = ChartBox.alpha(status.color, 0.4);
|
|
1107
|
+
|
|
1108
|
+
infoLabels.uptime.text = (hasData) ? formatUptime(d.uptime) : "—";
|
|
1109
|
+
|
|
1110
|
+
};
|
|
1111
|
+
|
|
1112
|
+
const renderInfo = function () {
|
|
1113
|
+
|
|
1114
|
+
const d = device;
|
|
1115
|
+
|
|
1116
|
+
infoLabels.model.text = d.model;
|
|
1117
|
+
infoLabels.serial.text = d.serial;
|
|
1118
|
+
infoLabels.firmware.text = d.firmware + ((d.firmware != LATEST_FIRMWARE) ? " <span style='color:" + WARNING_COLOR + "'>(update)</span>" : "");
|
|
1119
|
+
infoLabels.ip.text = d.ip;
|
|
1120
|
+
infoLabels.location.text = d.location;
|
|
1121
|
+
|
|
1122
|
+
lblOfflineInfo.visible = (d.online) ? 0 : 1;
|
|
1123
|
+
if (!d.online) {
|
|
1124
|
+
const minutes = Math.round((Date.now() - d.lastSeen) / 60000);
|
|
1125
|
+
const lastSeenText = (minutes >= 60) ? Math.floor(minutes / 60) + " hours ago" : minutes + " minutes ago";
|
|
1126
|
+
lblOfflineInfo.text = "Device is offline. Last seen <b>" + lastSeenText + "</b>. Check the power and the network cable, then press Refresh.";
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
lblFirmwareInfo.text = (d.firmware == LATEST_FIRMWARE)
|
|
1130
|
+
? "Firmware " + d.firmware + " is up to date."
|
|
1131
|
+
: "Firmware " + LATEST_FIRMWARE + " is available. (Installed: " + d.firmware + ")";
|
|
1132
|
+
|
|
1133
|
+
};
|
|
1134
|
+
|
|
1135
|
+
// Relays, mode, target, schedule, alerts
|
|
1136
|
+
const renderControls = function () {
|
|
1137
|
+
|
|
1138
|
+
const d = device;
|
|
1139
|
+
const controllable = isControllable(d);
|
|
1140
|
+
|
|
1141
|
+
isRendering = 1;
|
|
1142
|
+
|
|
1143
|
+
RELAYS.forEach(function (relay) {
|
|
1144
|
+
const toggle = relayToggles[relay.key];
|
|
1145
|
+
if (toggle.value !== d.relays[relay.key]) toggle.setValue(d.relays[relay.key]);
|
|
1146
|
+
const enabled = controllable && !(relay.auto && d.mode != "manual");
|
|
1147
|
+
toggle.setSecondState((enabled) ? "normal" : "disabled");
|
|
1148
|
+
toggle.opacity = (enabled) ? 1 : 0.4; // WHY: The disabled state of Toggle is not easy to see on a dark background.
|
|
1149
|
+
});
|
|
1150
|
+
lblRelayHint.visible = (d.mode != "manual") ? 1 : 0;
|
|
1151
|
+
|
|
1152
|
+
RadioButton.setValue("mode", d.mode, 1);
|
|
1153
|
+
RadioButton.getGroup("mode").forEach(function (radio) { radio.setEnabled(controllable); });
|
|
1154
|
+
|
|
1155
|
+
lblTarget.text = d.target + " °C";
|
|
1156
|
+
infoLabels.setpoint.text = d.target + " °C";
|
|
1157
|
+
if (sliderToTarget(sliderTarget.getValue()) != d.target) sliderTarget.setValue(targetToSlider(d.target));
|
|
1158
|
+
setInteractive(sliderTarget, controllable);
|
|
1159
|
+
|
|
1160
|
+
selectDefrostTime.setTime(d.defrostTime, 1);
|
|
1161
|
+
selectDefrostTime.setEnabled(controllable);
|
|
1162
|
+
selectMaintenanceDate.setDate(d.maintenanceDate, 1);
|
|
1163
|
+
selectMaintenanceDate.setEnabled(controllable);
|
|
1164
|
+
|
|
1165
|
+
ALERTS.forEach(function (alert) {
|
|
1166
|
+
alertCheckBoxes[alert.key].setChecked(d.alerts[alert.key], 1);
|
|
1167
|
+
});
|
|
1168
|
+
|
|
1169
|
+
setInteractive(btnUpdate, controllable && d.firmware != LATEST_FIRMWARE);
|
|
1170
|
+
setInteractive(btnRestart, controllable);
|
|
1171
|
+
|
|
1172
|
+
["sync", "reset"].forEach(function (key) { moreMenu.setItemEnabled(key, controllable); });
|
|
1173
|
+
|
|
1174
|
+
isRendering = 0;
|
|
1175
|
+
|
|
1176
|
+
};
|
|
1177
|
+
|
|
1178
|
+
const renderEvents = function () {
|
|
1179
|
+
|
|
1180
|
+
if (eventTable) eventTable.remove();
|
|
1181
|
+
|
|
1182
|
+
const previous = getDefaultContainerBox();
|
|
1183
|
+
setDefaultContainerBox(grpEventTable);
|
|
1184
|
+
|
|
1185
|
+
eventTable = TinyTable({
|
|
1186
|
+
columns: Theme.tableColumns(["TIME", "LEVEL", "MESSAGE"], ["15%", "14%", "70%"]),
|
|
1187
|
+
rows: device.events.slice(0, 10).map(function (e) { return [e.time, e.level, e.message]; }),
|
|
1188
|
+
allowHtml: 1, // (the texts are made by the panel, user texts are escaped)
|
|
1189
|
+
style: Theme.tableStyle({ headerColor: FIELD_COLOR, bodyColor: CARD_COLOR, borderColor: CARD_BORDER_COLOR }),
|
|
1190
|
+
onCellCreate: function (cell) {
|
|
1191
|
+
if (cell.columnIndex == 0) cell.label.textColor = Ink(0.5);
|
|
1192
|
+
if (cell.columnIndex == 1) cell.label.textColor = LEVEL_COLORS[cell.value] || Ink(0.8);
|
|
1193
|
+
},
|
|
1194
|
+
});
|
|
1195
|
+
// Fill the card. (Scrolls under the min width.)
|
|
1196
|
+
Theme.fillTableWidth(eventTable);
|
|
1197
|
+
eventTable.elem.style.minWidth = "560px";
|
|
1198
|
+
|
|
1199
|
+
setDefaultContainerBox(previous);
|
|
1200
|
+
|
|
1201
|
+
};
|
|
1202
|
+
|
|
1203
|
+
// *** ACTIONS:
|
|
1204
|
+
|
|
1205
|
+
const onMoreMenuClick = function (key) {
|
|
1206
|
+
|
|
1207
|
+
switch (key) {
|
|
1208
|
+
|
|
1209
|
+
case "sync":
|
|
1210
|
+
addEvent(device, "Success", "Device clock synced: " + getTimeText(new Date()));
|
|
1211
|
+
break;
|
|
1212
|
+
|
|
1213
|
+
case "csv":
|
|
1214
|
+
downloadEventsAsCSV(device);
|
|
1215
|
+
break;
|
|
1216
|
+
|
|
1217
|
+
case "copy":
|
|
1218
|
+
navigator.clipboard.writeText(device.serial).then(function () {
|
|
1219
|
+
addEvent(device, "Info", "Serial number copied: " + device.serial);
|
|
1220
|
+
}).catch(function () {
|
|
1221
|
+
addEvent(device, "Error", "Serial number could not be copied");
|
|
1222
|
+
});
|
|
1223
|
+
break;
|
|
1224
|
+
|
|
1225
|
+
case "reset": {
|
|
1226
|
+
const d = device;
|
|
1227
|
+
Theme.confirm({
|
|
1228
|
+
titleText: "Factory Reset",
|
|
1229
|
+
messageText: "All settings of <b>" + d.name + "</b> will be deleted and the device will restart.",
|
|
1230
|
+
confirmText: "Reset Device",
|
|
1231
|
+
onAnswer: function (isConfirmed) {
|
|
1232
|
+
if (isConfirmed) factoryReset(d);
|
|
1233
|
+
},
|
|
1234
|
+
});
|
|
1235
|
+
break;
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
};
|
|
1241
|
+
|
|
1242
|
+
</script>
|
|
1243
|
+
|
|
1244
|
+
</head>
|
|
1245
|
+
<body>
|
|
1246
|
+
|
|
1247
|
+
<!-- HTML content -->
|
|
1248
|
+
|
|
1249
|
+
</body>
|
|
1250
|
+
</html>
|