create-basicjs 0.0.1 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -2
- package/bin/create-basicjs.js +104 -1
- package/bin/verify-package.js +16 -0
- package/package.json +27 -6
- package/payload/starter/AGENTS.md +82 -0
- package/payload/starter/CLAUDE.md +1 -0
- package/payload/starter/README.md +45 -0
- package/payload/starter/_basic/VERSION +1 -0
- package/payload/starter/_basic/assets/categories/cappuccino.png +0 -0
- package/payload/starter/_basic/assets/categories/chocolate-milk.png +0 -0
- package/payload/starter/_basic/assets/categories/coffee-cup.png +0 -0
- package/payload/starter/_basic/assets/categories/coffee.png +0 -0
- package/payload/starter/_basic/assets/categories/frappe.png +0 -0
- package/payload/starter/_basic/assets/categories/iced-caffee.png +0 -0
- package/payload/starter/_basic/assets/categories/milkshake.png +0 -0
- package/payload/starter/_basic/assets/categories/orange-juice.png +0 -0
- package/payload/starter/_basic/assets/categories/tea.png +0 -0
- package/payload/starter/_basic/assets/data-table/palette.svg +2 -0
- package/payload/starter/_basic/assets/data-table/people.js +104 -0
- package/payload/starter/_basic/assets/data-table/trash.svg +2 -0
- package/payload/starter/_basic/assets/fruids/brokoli.png +0 -0
- package/payload/starter/_basic/assets/fruids/cilek.png +0 -0
- package/payload/starter/_basic/assets/fruids/domates.png +0 -0
- package/payload/starter/_basic/assets/fruids/elma.png +0 -0
- package/payload/starter/_basic/assets/fruids/havuc.png +0 -0
- package/payload/starter/_basic/assets/fruids/karpuz.png +0 -0
- package/payload/starter/_basic/assets/fruids/limon.png +0 -0
- package/payload/starter/_basic/assets/fruids/muz.png +0 -0
- package/payload/starter/_basic/assets/fruids/nar.png +0 -0
- package/payload/starter/_basic/assets/fruids/patlican.png +0 -0
- package/payload/starter/_basic/assets/fruids/yabanmersini.png +0 -0
- package/payload/starter/_basic/assets/fruids/yesilbiber.png +0 -0
- package/payload/starter/_basic/assets/icons/alert-black.png +0 -0
- package/payload/starter/_basic/assets/icons/alert.png +0 -0
- package/payload/starter/_basic/assets/icons/arrow-drop.svg +3 -0
- package/payload/starter/_basic/assets/icons/arrow-rise.svg +3 -0
- package/payload/starter/_basic/assets/icons/close.svg +1 -0
- package/payload/starter/_basic/assets/icons/lamp-on.png +0 -0
- package/payload/starter/_basic/assets/icons/lamp.png +0 -0
- package/payload/starter/_basic/assets/icons/lock.png +0 -0
- package/payload/starter/_basic/assets/icons/panel.png +0 -0
- package/payload/starter/_basic/assets/icons/plant.png +0 -0
- package/payload/starter/_basic/assets/icons/trash.png +0 -0
- package/payload/starter/_basic/assets/icons/trash.svg +2 -0
- package/payload/starter/_basic/assets/tab-bar/settings.png +0 -0
- package/payload/starter/_basic/assets/tab-bar/status.png +0 -0
- package/payload/starter/_basic/assets/tab-bar/transactions.png +0 -0
- package/payload/starter/_basic/assets/tutorial/blueberries.png +0 -0
- package/payload/starter/_basic/assets/tutorial/carrot.png +0 -0
- package/payload/starter/_basic/assets/tutorial/olives.png +0 -0
- package/payload/starter/_basic/assets/tutorial/strawberry.png +0 -0
- package/payload/starter/_basic/assets/ui-bottom-bar/setting.svg +11 -0
- package/payload/starter/_basic/basic/LICENSE +14 -0
- package/payload/starter/_basic/basic/basic.css +277 -0
- package/payload/starter/_basic/basic/basic.js +3767 -0
- package/payload/starter/_basic/basic/basic.min.css +1 -0
- package/payload/starter/_basic/basic/basic.min.js +65 -0
- package/payload/starter/_basic/basic/font/open-sans/LICENSE.txt +206 -0
- package/payload/starter/_basic/basic/font/open-sans/OpenSans-Bold.ttf +0 -0
- package/payload/starter/_basic/basic/font/open-sans/OpenSans-Regular.ttf +0 -0
- package/payload/starter/_basic/basic/scroll-bar.js +536 -0
- package/payload/starter/_basic/basic/scroll-bar.min.js +2 -0
- package/payload/starter/_basic/comp/action-button/add.png +0 -0
- package/payload/starter/_basic/comp/action-button.js +522 -0
- package/payload/starter/_basic/comp/action-tab-bar.js +383 -0
- package/payload/starter/_basic/comp/app-bar.js +236 -0
- package/payload/starter/_basic/comp/badge-v2.js +246 -0
- package/payload/starter/_basic/comp/bottom-bar.js +547 -0
- package/payload/starter/_basic/comp/breadcrumbs.js +522 -0
- package/payload/starter/_basic/comp/chart-box/chart-4.5.1.umd.min.js +13 -0
- package/payload/starter/_basic/comp/chart-box/chart-js-LICENSE.md +9 -0
- package/payload/starter/_basic/comp/chart-box.js +868 -0
- package/payload/starter/_basic/comp/check-box.js +374 -0
- package/payload/starter/_basic/comp/context-menu.js +634 -0
- package/payload/starter/_basic/comp/currency-input-b.js +190 -0
- package/payload/starter/_basic/comp/data-table/arrow.svg +2 -0
- package/payload/starter/_basic/comp/data-table.js +865 -0
- package/payload/starter/_basic/comp/dialog.js +854 -0
- package/payload/starter/_basic/comp/email-input-b.js +57 -0
- package/payload/starter/_basic/comp/filters.js +493 -0
- package/payload/starter/_basic/comp/form.js +590 -0
- package/payload/starter/_basic/comp/full-screen-select/arrow.svg +2 -0
- package/payload/starter/_basic/comp/full-screen-select/cancel.svg +2 -0
- package/payload/starter/_basic/comp/full-screen-select.js +611 -0
- package/payload/starter/_basic/comp/gauge.js +435 -0
- package/payload/starter/_basic/comp/hold-to-confirm-button/trash-red.png +0 -0
- package/payload/starter/_basic/comp/hold-to-confirm-button/trash.png +0 -0
- package/payload/starter/_basic/comp/hold-to-confirm-button.js +280 -0
- package/payload/starter/_basic/comp/input-b.js +759 -0
- package/payload/starter/_basic/comp/item-list.js +1396 -0
- package/payload/starter/_basic/comp/label-editor.js +1137 -0
- package/payload/starter/_basic/comp/left-menu/_Material Symbols & Icons - Google Fonts.webloc +8 -0
- package/payload/starter/_basic/comp/left-menu/data-table.png +0 -0
- package/payload/starter/_basic/comp/left-menu/home.png +0 -0
- package/payload/starter/_basic/comp/left-menu/reports.png +0 -0
- package/payload/starter/_basic/comp/left-menu/setting.png +0 -0
- package/payload/starter/_basic/comp/left-menu.js +476 -0
- package/payload/starter/_basic/comp/line-progress-bar.js +192 -0
- package/payload/starter/_basic/comp/loading-screen.js +382 -0
- package/payload/starter/_basic/comp/login-page-v2.js +586 -0
- package/payload/starter/_basic/comp/mini-graph-box.js +483 -0
- package/payload/starter/_basic/comp/notice.js +227 -0
- package/payload/starter/_basic/comp/number-input-b.js +121 -0
- package/payload/starter/_basic/comp/numeric-keyboard.js +296 -0
- package/payload/starter/_basic/comp/page-control.js +745 -0
- package/payload/starter/_basic/comp/page-header.js +190 -0
- package/payload/starter/_basic/comp/password-input-b/hide-btn.png +0 -0
- package/payload/starter/_basic/comp/password-input-b/hide-btn2.png +0 -0
- package/payload/starter/_basic/comp/password-input-b/show-btn.png +0 -0
- package/payload/starter/_basic/comp/password-input-b/show-btn2.png +0 -0
- package/payload/starter/_basic/comp/password-input-b.js +164 -0
- package/payload/starter/_basic/comp/period-bar.js +435 -0
- package/payload/starter/_basic/comp/phone-input-b.js +287 -0
- package/payload/starter/_basic/comp/progress-bar.js +676 -0
- package/payload/starter/_basic/comp/property-panel.js +2740 -0
- package/payload/starter/_basic/comp/radio-button.js +467 -0
- package/payload/starter/_basic/comp/rich-text-editor.js +1061 -0
- package/payload/starter/_basic/comp/scrolling-text.js +296 -0
- package/payload/starter/_basic/comp/search-input-v2/clear-round.svg +1 -0
- package/payload/starter/_basic/comp/search-input-v2/clear.svg +1 -0
- package/payload/starter/_basic/comp/search-input-v2/filter.png +0 -0
- package/payload/starter/_basic/comp/search-input-v2/filter.svg +1 -0
- package/payload/starter/_basic/comp/search-input-v2/search.svg +1 -0
- package/payload/starter/_basic/comp/search-input-v2.js +427 -0
- package/payload/starter/_basic/comp/search-results.js +560 -0
- package/payload/starter/_basic/comp/select-box.js +1740 -0
- package/payload/starter/_basic/comp/select-color.js +603 -0
- package/payload/starter/_basic/comp/select-date.js +1003 -0
- package/payload/starter/_basic/comp/select-file.js +732 -0
- package/payload/starter/_basic/comp/select-time.js +979 -0
- package/payload/starter/_basic/comp/settings-row.js +298 -0
- package/payload/starter/_basic/comp/side-panel.js +573 -0
- package/payload/starter/_basic/comp/slider-field.js +776 -0
- package/payload/starter/_basic/comp/slider.js +368 -0
- package/payload/starter/_basic/comp/smart-button/alert-black.png +0 -0
- package/payload/starter/_basic/comp/smart-button/clock.png +0 -0
- package/payload/starter/_basic/comp/smart-button.js +896 -0
- package/payload/starter/_basic/comp/smart-table/clock.png +0 -0
- package/payload/starter/_basic/comp/smart-table/down.png +0 -0
- package/payload/starter/_basic/comp/smart-table/scroll.png +0 -0
- package/payload/starter/_basic/comp/smart-table/sort.png +0 -0
- package/payload/starter/_basic/comp/smart-table/up.png +0 -0
- package/payload/starter/_basic/comp/smart-table.js +1321 -0
- package/payload/starter/_basic/comp/sortable-list.js +1172 -0
- package/payload/starter/_basic/comp/spark-line-box.js +729 -0
- package/payload/starter/_basic/comp/stepper.js +699 -0
- package/payload/starter/_basic/comp/tabs.js +1317 -0
- package/payload/starter/_basic/comp/tag-input.js +1067 -0
- package/payload/starter/_basic/comp/tap-effect.js +168 -0
- package/payload/starter/_basic/comp/textarea-b.js +184 -0
- package/payload/starter/_basic/comp/time-line.js +324 -0
- package/payload/starter/_basic/comp/tiny-select/arrow.svg +1 -0
- package/payload/starter/_basic/comp/tiny-select.js +282 -0
- package/payload/starter/_basic/comp/tiny-table.js +279 -0
- package/payload/starter/_basic/comp/toast.js +838 -0
- package/payload/starter/_basic/comp/toggle.js +636 -0
- package/payload/starter/_basic/comp/tooltip.js +471 -0
- package/payload/starter/_basic/comp/tree-view.js +1096 -0
- package/payload/starter/_basic/comp/ui-effects.js +1091 -0
- package/payload/starter/_basic/comp/ui-standards.js +402 -0
- package/payload/starter/_basic/comp/url-input-b.js +145 -0
- package/payload/starter/_basic/comp/web-view.js +534 -0
- package/payload/starter/_basic/docs/basic-js-animated-rules.md +90 -0
- package/payload/starter/_basic/docs/basic-js-code-rules.md +91 -0
- package/payload/starter/_basic/docs/basic-js-components.md +134 -0
- package/payload/starter/_basic/docs/basic-js-core.md +131 -0
- package/payload/starter/_basic/docs/component-index.md +522 -0
- package/payload/starter/_basic/docs/component-template.js +416 -0
- package/payload/starter/_basic/docs/handbook/00-introduction.md +125 -0
- package/payload/starter/_basic/docs/handbook/00-what-is-new.md +96 -0
- package/payload/starter/_basic/docs/handbook/01-label.md +104 -0
- package/payload/starter/_basic/docs/handbook/02-box.md +166 -0
- package/payload/starter/_basic/docs/handbook/03-image.md +81 -0
- package/payload/starter/_basic/docs/handbook/04-common-properties.md +159 -0
- package/payload/starter/_basic/docs/handbook/05-autolayout.md +332 -0
- package/payload/starter/_basic/docs/handbook/06-button.md +103 -0
- package/payload/starter/_basic/docs/handbook/07-input.md +78 -0
- package/payload/starter/_basic/docs/handbook/08-page.md +120 -0
- package/payload/starter/_basic/docs/handbook/09-useful-examples.md +309 -0
- package/payload/starter/_basic/docs/handbook/10-motion.md +132 -0
- package/payload/starter/_basic/docs/handbook/11-other-functions.md +92 -0
- package/payload/starter/_basic/docs/handbook/12-utilities.md +123 -0
- package/payload/starter/_basic/docs/handbook/13-sound.md +88 -0
- package/payload/starter/_basic/docs/what-is-new.md +402 -0
- package/payload/starter/_basic/examples/action-button.htm +81 -0
- package/payload/starter/_basic/examples/action-tab-bar.htm +97 -0
- package/payload/starter/_basic/examples/app-bar.htm +140 -0
- package/payload/starter/_basic/examples/badgeV2.htm +68 -0
- package/payload/starter/_basic/examples/bottom-bar/grid.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/grids.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/home.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/homes.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon1.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon1s.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon2.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon2s.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon3.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon3s.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon4.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon4s.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/search.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/searchs.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/settings.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/settingss.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/tasks.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/taskss.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar-2.htm +187 -0
- package/payload/starter/_basic/examples/bottom-bar.htm +46 -0
- package/payload/starter/_basic/examples/breadcrumbs.htm +284 -0
- package/payload/starter/_basic/examples/chart-box.htm +287 -0
- package/payload/starter/_basic/examples/check-box-1.htm +220 -0
- package/payload/starter/_basic/examples/check-box-2.htm +212 -0
- package/payload/starter/_basic/examples/check-box-3.htm +179 -0
- package/payload/starter/_basic/examples/context-menu.htm +269 -0
- package/payload/starter/_basic/examples/currency-input-b.htm +71 -0
- package/payload/starter/_basic/examples/data-table-2.htm +67 -0
- package/payload/starter/_basic/examples/data-table-3.htm +72 -0
- package/payload/starter/_basic/examples/data-table-4.htm +144 -0
- package/payload/starter/_basic/examples/data-table-5.htm +152 -0
- package/payload/starter/_basic/examples/data-table.htm +178 -0
- package/payload/starter/_basic/examples/dialog-centered.htm +130 -0
- package/payload/starter/_basic/examples/dialog.htm +209 -0
- package/payload/starter/_basic/examples/email-input-b.htm +67 -0
- package/payload/starter/_basic/examples/filters.htm +115 -0
- package/payload/starter/_basic/examples/form-1.htm +123 -0
- package/payload/starter/_basic/examples/full-screen-select.htm +114 -0
- package/payload/starter/_basic/examples/gauge.htm +133 -0
- package/payload/starter/_basic/examples/hold-to-confirm-button.htm +144 -0
- package/payload/starter/_basic/examples/input-b-ex1.htm +132 -0
- package/payload/starter/_basic/examples/input-b-ex2.htm +136 -0
- package/payload/starter/_basic/examples/input-b-ex3-style.htm +113 -0
- package/payload/starter/_basic/examples/input-b-ex4-custom-unit.htm +112 -0
- package/payload/starter/_basic/examples/input-b-ex5-warning-icon.htm +80 -0
- package/payload/starter/_basic/examples/input-b-ex6-dark.htm +108 -0
- package/payload/starter/_basic/examples/input-b-ex7-ozden.htm +153 -0
- package/payload/starter/_basic/examples/item-list-2.htm +253 -0
- package/payload/starter/_basic/examples/item-list.htm +176 -0
- package/payload/starter/_basic/examples/label-editor.htm +196 -0
- package/payload/starter/_basic/examples/left-menu.htm +81 -0
- package/payload/starter/_basic/examples/line-progress-bar.htm +145 -0
- package/payload/starter/_basic/examples/loading-screen.htm +217 -0
- package/payload/starter/_basic/examples/login-page-dark-v2.htm +269 -0
- package/payload/starter/_basic/examples/login-page-v2.htm +269 -0
- package/payload/starter/_basic/examples/mini-graph-box.htm +229 -0
- package/payload/starter/_basic/examples/notice.htm +79 -0
- package/payload/starter/_basic/examples/number-input-b.htm +68 -0
- package/payload/starter/_basic/examples/numeric-keyboard.htm +100 -0
- package/payload/starter/_basic/examples/page-control.htm +262 -0
- package/payload/starter/_basic/examples/page-header.htm +117 -0
- package/payload/starter/_basic/examples/password-input-b.htm +70 -0
- package/payload/starter/_basic/examples/period-bar.htm +94 -0
- package/payload/starter/_basic/examples/phone-input-b-select-country.htm +298 -0
- package/payload/starter/_basic/examples/phone-input-b.htm +72 -0
- package/payload/starter/_basic/examples/progress-bar-ozden.htm +168 -0
- package/payload/starter/_basic/examples/progress-bar.htm +296 -0
- package/payload/starter/_basic/examples/property-panel.htm +216 -0
- package/payload/starter/_basic/examples/radio-button-1.htm +264 -0
- package/payload/starter/_basic/examples/radio-button-2.htm +256 -0
- package/payload/starter/_basic/examples/radio-button-3.htm +168 -0
- package/payload/starter/_basic/examples/rich-text-editor.htm +228 -0
- package/payload/starter/_basic/examples/scrolling-text.htm +75 -0
- package/payload/starter/_basic/examples/search-input-v2-ozden.htm +128 -0
- package/payload/starter/_basic/examples/search-input-v2-place.htm +80 -0
- package/payload/starter/_basic/examples/search-input-v2.htm +65 -0
- package/payload/starter/_basic/examples/search-results.htm +193 -0
- package/payload/starter/_basic/examples/select-box-ozden-item.htm +114 -0
- package/payload/starter/_basic/examples/select-box-ozden-text.htm +64 -0
- package/payload/starter/_basic/examples/select-box.htm +254 -0
- package/payload/starter/_basic/examples/select-color.htm +215 -0
- package/payload/starter/_basic/examples/select-date.htm +244 -0
- package/payload/starter/_basic/examples/select-file.htm +268 -0
- package/payload/starter/_basic/examples/select-time.htm +249 -0
- package/payload/starter/_basic/examples/settings-row.htm +193 -0
- package/payload/starter/_basic/examples/side-panel-2.htm +270 -0
- package/payload/starter/_basic/examples/side-panel.htm +219 -0
- package/payload/starter/_basic/examples/slider-field.htm +223 -0
- package/payload/starter/_basic/examples/slider.htm +180 -0
- package/payload/starter/_basic/examples/smart-button-2.htm +220 -0
- package/payload/starter/_basic/examples/smart-button-3-ozden.htm +320 -0
- package/payload/starter/_basic/examples/smart-button-4-dark.htm +102 -0
- package/payload/starter/_basic/examples/smart-button-5-features.htm +205 -0
- package/payload/starter/_basic/examples/smart-button.htm +252 -0
- package/payload/starter/_basic/examples/smart-table-1.htm +142 -0
- package/payload/starter/_basic/examples/smart-table-2.htm +191 -0
- package/payload/starter/_basic/examples/smart-table-3.htm +359 -0
- package/payload/starter/_basic/examples/smart-table-4.htm +158 -0
- package/payload/starter/_basic/examples/sortable-list.htm +250 -0
- package/payload/starter/_basic/examples/spark-line-box.htm +285 -0
- package/payload/starter/_basic/examples/stepper-2.htm +172 -0
- package/payload/starter/_basic/examples/stepper.htm +255 -0
- package/payload/starter/_basic/examples/tabs-2/coffee.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i1-white.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i1.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i2-white.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i2.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i3-white.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i3.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i4-white.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i4.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i5-white.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i5.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/lamp-on.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/lamp.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/search.svg +2 -0
- package/payload/starter/_basic/examples/tabs-2.htm +188 -0
- package/payload/starter/_basic/examples/tabs.htm +300 -0
- package/payload/starter/_basic/examples/tag-input.htm +242 -0
- package/payload/starter/_basic/examples/tap-effect.htm +100 -0
- package/payload/starter/_basic/examples/textarea-b.htm +76 -0
- package/payload/starter/_basic/examples/time-line.htm +226 -0
- package/payload/starter/_basic/examples/tiny-select.htm +86 -0
- package/payload/starter/_basic/examples/tiny-table.htm +109 -0
- package/payload/starter/_basic/examples/toast.htm +262 -0
- package/payload/starter/_basic/examples/toggle-2.htm +163 -0
- package/payload/starter/_basic/examples/toggle-3.htm +218 -0
- package/payload/starter/_basic/examples/toggle.htm +93 -0
- package/payload/starter/_basic/examples/tooltip-2.htm +177 -0
- package/payload/starter/_basic/examples/tooltip-3.htm +212 -0
- package/payload/starter/_basic/examples/tooltip.htm +124 -0
- package/payload/starter/_basic/examples/tree-view.htm +285 -0
- package/payload/starter/_basic/examples/ui-effects.htm +463 -0
- package/payload/starter/_basic/examples/ui-standards.htm +261 -0
- package/payload/starter/_basic/examples/unfinished-login-page-dark-supabase.htm +221 -0
- package/payload/starter/_basic/examples/unfinished-login-page-supabase.htm +221 -0
- package/payload/starter/_basic/examples/url-input-b.htm +85 -0
- package/payload/starter/_basic/examples/web-view.htm +241 -0
- package/payload/starter/_basic/min/action-button.min.js +2 -0
- package/payload/starter/_basic/min/action-tab-bar.min.js +2 -0
- package/payload/starter/_basic/min/app-bar.min.js +2 -0
- package/payload/starter/_basic/min/badge-v2.min.js +2 -0
- package/payload/starter/_basic/min/bottom-bar.min.js +2 -0
- package/payload/starter/_basic/min/breadcrumbs.min.js +2 -0
- package/payload/starter/_basic/min/chart-box.min.js +2 -0
- package/payload/starter/_basic/min/check-box.min.js +2 -0
- package/payload/starter/_basic/min/context-menu.min.js +2 -0
- package/payload/starter/_basic/min/currency-input-b.min.js +2 -0
- package/payload/starter/_basic/min/data-table.min.js +2 -0
- package/payload/starter/_basic/min/dialog.min.js +2 -0
- package/payload/starter/_basic/min/email-input-b.min.js +2 -0
- package/payload/starter/_basic/min/filters.min.js +2 -0
- package/payload/starter/_basic/min/form.min.js +2 -0
- package/payload/starter/_basic/min/full-screen-select.min.js +2 -0
- package/payload/starter/_basic/min/gauge.min.js +2 -0
- package/payload/starter/_basic/min/hold-to-confirm-button.min.js +2 -0
- package/payload/starter/_basic/min/input-b.min.js +2 -0
- package/payload/starter/_basic/min/item-list.min.js +2 -0
- package/payload/starter/_basic/min/label-editor.min.js +2 -0
- package/payload/starter/_basic/min/left-menu.min.js +2 -0
- package/payload/starter/_basic/min/line-progress-bar.min.js +2 -0
- package/payload/starter/_basic/min/loading-screen.min.js +2 -0
- package/payload/starter/_basic/min/login-page-v2.min.js +2 -0
- package/payload/starter/_basic/min/mini-graph-box.min.js +2 -0
- package/payload/starter/_basic/min/notice.min.js +2 -0
- package/payload/starter/_basic/min/number-input-b.min.js +2 -0
- package/payload/starter/_basic/min/numeric-keyboard.min.js +2 -0
- package/payload/starter/_basic/min/page-control.min.js +2 -0
- package/payload/starter/_basic/min/page-header.min.js +2 -0
- package/payload/starter/_basic/min/password-input-b.min.js +2 -0
- package/payload/starter/_basic/min/period-bar.min.js +2 -0
- package/payload/starter/_basic/min/phone-input-b.min.js +2 -0
- package/payload/starter/_basic/min/progress-bar.min.js +2 -0
- package/payload/starter/_basic/min/property-panel.min.js +2 -0
- package/payload/starter/_basic/min/radio-button.min.js +2 -0
- package/payload/starter/_basic/min/rich-text-editor.min.js +2 -0
- package/payload/starter/_basic/min/scrolling-text.min.js +2 -0
- package/payload/starter/_basic/min/search-input-v2.min.js +2 -0
- package/payload/starter/_basic/min/search-results.min.js +2 -0
- package/payload/starter/_basic/min/select-box.min.js +2 -0
- package/payload/starter/_basic/min/select-color.min.js +2 -0
- package/payload/starter/_basic/min/select-date.min.js +2 -0
- package/payload/starter/_basic/min/select-file.min.js +2 -0
- package/payload/starter/_basic/min/select-time.min.js +2 -0
- package/payload/starter/_basic/min/settings-row.min.js +2 -0
- package/payload/starter/_basic/min/side-panel.min.js +2 -0
- package/payload/starter/_basic/min/slider-field.min.js +2 -0
- package/payload/starter/_basic/min/slider.min.js +2 -0
- package/payload/starter/_basic/min/smart-button.min.js +2 -0
- package/payload/starter/_basic/min/smart-table.min.js +2 -0
- package/payload/starter/_basic/min/sortable-list.min.js +2 -0
- package/payload/starter/_basic/min/spark-line-box.min.js +2 -0
- package/payload/starter/_basic/min/stepper.min.js +2 -0
- package/payload/starter/_basic/min/tabs.min.js +2 -0
- package/payload/starter/_basic/min/tag-input.min.js +2 -0
- package/payload/starter/_basic/min/tap-effect.min.js +2 -0
- package/payload/starter/_basic/min/textarea-b.min.js +2 -0
- package/payload/starter/_basic/min/time-line.min.js +2 -0
- package/payload/starter/_basic/min/tiny-select.min.js +2 -0
- package/payload/starter/_basic/min/tiny-table.min.js +2 -0
- package/payload/starter/_basic/min/toast.min.js +2 -0
- package/payload/starter/_basic/min/toggle.min.js +2 -0
- package/payload/starter/_basic/min/tooltip.min.js +2 -0
- package/payload/starter/_basic/min/tree-view.min.js +2 -0
- package/payload/starter/_basic/min/ui-effects.min.js +2 -0
- package/payload/starter/_basic/min/ui-standards.min.js +2 -0
- package/payload/starter/_basic/min/url-input-b.min.js +2 -0
- package/payload/starter/_basic/min/web-view.min.js +2 -0
- package/payload/starter/_basic/tools/build.js +175 -0
- package/payload/starter/_basic/tools/check.js +318 -0
- package/payload/starter/app/app.js +27 -0
- package/payload/starter/assets/.gitkeep +0 -0
- package/payload/starter/gitignore +3 -0
- package/payload/starter/index.htm +23 -0
- package/payload/templates/booking/TEMPLATE.md +77 -0
- package/payload/templates/booking/app/app.js +722 -0
- package/payload/templates/booking/app/settings.js +52 -0
- package/payload/templates/booking/app/store.js +265 -0
- package/payload/templates/booking/app/texts.js +148 -0
- package/payload/templates/booking/assets/app-icon.svg +1 -0
- package/payload/templates/booking/assets/tabs/account.svg +1 -0
- package/payload/templates/booking/assets/tabs/appointments.svg +1 -0
- package/payload/templates/booking/assets/tabs/home.svg +1 -0
- package/payload/templates/booking/assets/tabs/services.svg +1 -0
- package/payload/templates/booking/components/booking-ui.js +252 -0
- package/payload/templates/booking/index.htm +53 -0
- package/payload/templates/booking/pages/account.js +124 -0
- package/payload/templates/booking/pages/appointments.js +141 -0
- package/payload/templates/booking/pages/book.js +231 -0
- package/payload/templates/booking/pages/home.js +99 -0
- package/payload/templates/booking/pages/services.js +79 -0
- package/payload/templates/classic/TEMPLATE.md +104 -0
- package/payload/templates/classic/app/app.js +779 -0
- package/payload/templates/classic/app/settings.js +77 -0
- package/payload/templates/classic/assets/_attribute.txt +37 -0
- package/payload/templates/classic/assets/cards/dill.png +0 -0
- package/payload/templates/classic/assets/cards/fennel.png +0 -0
- package/payload/templates/classic/assets/cards/juniper.png +0 -0
- package/payload/templates/classic/assets/cards/olives.png +0 -0
- package/payload/templates/classic/assets/cards/oregano.png +0 -0
- package/payload/templates/classic/assets/cards/pepper.png +0 -0
- package/payload/templates/classic/assets/cards/rosehip.png +0 -0
- package/payload/templates/classic/assets/categories/cappuccino.png +0 -0
- package/payload/templates/classic/assets/categories/chocolate-milk.png +0 -0
- package/payload/templates/classic/assets/categories/coffee-cup.png +0 -0
- package/payload/templates/classic/assets/categories/coffee.png +0 -0
- package/payload/templates/classic/assets/categories/frappe.png +0 -0
- package/payload/templates/classic/assets/categories/iced-caffee.png +0 -0
- package/payload/templates/classic/assets/categories/milkshake.png +0 -0
- package/payload/templates/classic/assets/categories/orange-juice.png +0 -0
- package/payload/templates/classic/assets/categories/tea.png +0 -0
- package/payload/templates/classic/assets/example-tabs/coffee.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i1-white.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i1.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i2-white.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i2.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i3-white.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i3.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i4-white.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i4.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i5-white.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i5.png +0 -0
- package/payload/templates/classic/assets/example-tabs/lamp-on.png +0 -0
- package/payload/templates/classic/assets/example-tabs/lamp.png +0 -0
- package/payload/templates/classic/assets/example-tabs/search.svg +2 -0
- package/payload/templates/classic/assets/files/ai.png +0 -0
- package/payload/templates/classic/assets/files/doc.png +0 -0
- package/payload/templates/classic/assets/files/folder.png +0 -0
- package/payload/templates/classic/assets/files/js.png +0 -0
- package/payload/templates/classic/assets/files/pdf.png +0 -0
- package/payload/templates/classic/assets/files/txt.png +0 -0
- package/payload/templates/classic/assets/files/xls.png +0 -0
- package/payload/templates/classic/assets/icons/arrow-drop.svg +3 -0
- package/payload/templates/classic/assets/icons/arrow-rise.svg +3 -0
- package/payload/templates/classic/assets/icons/download.svg +18 -0
- package/payload/templates/classic/assets/icons/lamp-on.png +0 -0
- package/payload/templates/classic/assets/icons/lamp.png +0 -0
- package/payload/templates/classic/assets/icons/lock-small.png +0 -0
- package/payload/templates/classic/assets/icons/lock.png +0 -0
- package/payload/templates/classic/assets/icons/logo.png +0 -0
- package/payload/templates/classic/assets/icons/trash-red.svg +2 -0
- package/payload/templates/classic/assets/icons/trash.svg +2 -0
- package/payload/templates/classic/assets/menu/t1.png +0 -0
- package/payload/templates/classic/assets/menu/t10.png +0 -0
- package/payload/templates/classic/assets/menu/t11.png +0 -0
- package/payload/templates/classic/assets/menu/t2.png +0 -0
- package/payload/templates/classic/assets/menu/t3.png +0 -0
- package/payload/templates/classic/assets/menu/t4.png +0 -0
- package/payload/templates/classic/assets/menu/t5.png +0 -0
- package/payload/templates/classic/assets/menu/t6.png +0 -0
- package/payload/templates/classic/assets/menu/t7.png +0 -0
- package/payload/templates/classic/assets/menu/t8.png +0 -0
- package/payload/templates/classic/assets/menu/t9.png +0 -0
- package/payload/templates/classic/assets/products/brokoli.png +0 -0
- package/payload/templates/classic/assets/products/cilek.png +0 -0
- package/payload/templates/classic/assets/products/domates.png +0 -0
- package/payload/templates/classic/assets/products/elma.png +0 -0
- package/payload/templates/classic/assets/products/havuc.png +0 -0
- package/payload/templates/classic/assets/products/karpuz.png +0 -0
- package/payload/templates/classic/assets/products/limon.png +0 -0
- package/payload/templates/classic/assets/products/muz.png +0 -0
- package/payload/templates/classic/assets/products/nar.png +0 -0
- package/payload/templates/classic/assets/products/patlican.png +0 -0
- package/payload/templates/classic/assets/products/yabanmersini.png +0 -0
- package/payload/templates/classic/assets/products/yesilbiber.png +0 -0
- package/payload/templates/classic/assets/tab-bar/settings.png +0 -0
- package/payload/templates/classic/assets/tab-bar/status.png +0 -0
- package/payload/templates/classic/assets/tab-bar/transactions.png +0 -0
- package/payload/templates/classic/assets/tabs/grid.png +0 -0
- package/payload/templates/classic/assets/tabs/grids.png +0 -0
- package/payload/templates/classic/assets/tabs/home.png +0 -0
- package/payload/templates/classic/assets/tabs/homes.png +0 -0
- package/payload/templates/classic/assets/tabs/search.png +0 -0
- package/payload/templates/classic/assets/tabs/searchs.png +0 -0
- package/payload/templates/classic/assets/tabs/settings.png +0 -0
- package/payload/templates/classic/assets/tabs/settingss.png +0 -0
- package/payload/templates/classic/assets/tabs/tasks.png +0 -0
- package/payload/templates/classic/assets/tabs/taskss.png +0 -0
- package/payload/templates/classic/html/privacy.htm +58 -0
- package/payload/templates/classic/index.htm +70 -0
- package/payload/templates/classic/pages/dialogs.js +205 -0
- package/payload/templates/classic/pages/example.js +296 -0
- package/payload/templates/classic/pages/examples.js +148 -0
- package/payload/templates/classic/pages/home.js +268 -0
- package/payload/templates/classic/pages/info-pages.js +95 -0
- package/payload/templates/classic/pages/lock.js +70 -0
- package/payload/templates/classic/pages/search.js +153 -0
- package/payload/templates/classic/pages/settings.js +184 -0
- package/payload/templates/classic/pages/tasks.js +221 -0
- package/payload/templates/classic/pages/template-pages.js +240 -0
- package/payload/templates/coffee-shop/TEMPLATE.md +63 -0
- package/payload/templates/coffee-shop/app/app.js +713 -0
- package/payload/templates/coffee-shop/app/settings.js +20 -0
- package/payload/templates/coffee-shop/app/store.js +52 -0
- package/payload/templates/coffee-shop/assets/cappuccino.png +0 -0
- package/payload/templates/coffee-shop/assets/chocolate-milk.png +0 -0
- package/payload/templates/coffee-shop/assets/coffee-art/cocoa.svg +1 -0
- package/payload/templates/coffee-shop/assets/coffee-art/filter.svg +1 -0
- package/payload/templates/coffee-shop/assets/coffee-art/frappe.svg +1 -0
- package/payload/templates/coffee-shop/assets/coffee-art/iced.svg +1 -0
- package/payload/templates/coffee-shop/assets/coffee-art/latte.svg +1 -0
- package/payload/templates/coffee-shop/assets/coffee-art/tea.svg +1 -0
- package/payload/templates/coffee-shop/assets/coffee.png +0 -0
- package/payload/templates/coffee-shop/assets/credits.txt +41 -0
- package/payload/templates/coffee-shop/assets/fonts/OFL.txt +93 -0
- package/payload/templates/coffee-shop/assets/fonts/gelasio-OFL.txt +93 -0
- package/payload/templates/coffee-shop/assets/fonts/gelasio.ttf +0 -0
- package/payload/templates/coffee-shop/assets/frappe.png +0 -0
- package/payload/templates/coffee-shop/assets/iced-caffee.png +0 -0
- package/payload/templates/coffee-shop/assets/tabs/cart.svg +1 -0
- package/payload/templates/coffee-shop/assets/tabs/home.svg +1 -0
- package/payload/templates/coffee-shop/assets/tabs/menu.svg +1 -0
- package/payload/templates/coffee-shop/assets/tabs/rewards.svg +1 -0
- package/payload/templates/coffee-shop/assets/tea.png +0 -0
- package/payload/templates/coffee-shop/components/coffee-ui.js +246 -0
- package/payload/templates/coffee-shop/index.htm +55 -0
- package/payload/templates/coffee-shop/pages/cart.js +82 -0
- package/payload/templates/coffee-shop/pages/drink.js +74 -0
- package/payload/templates/coffee-shop/pages/home.js +54 -0
- package/payload/templates/coffee-shop/pages/menu.js +53 -0
- package/payload/templates/coffee-shop/pages/rewards.js +38 -0
- package/payload/templates/forms/TEMPLATE.md +12 -0
- package/payload/templates/forms/app/app.js +30 -0
- package/payload/templates/forms/appointment-form.htm +969 -0
- package/payload/templates/forms/assets/error.png +0 -0
- package/payload/templates/forms/assets/logo.png +0 -0
- package/payload/templates/forms/assets/logo2.png +0 -0
- package/payload/templates/forms/assets/mail.png +0 -0
- package/payload/templates/forms/assets/success.png +0 -0
- package/payload/templates/forms/contact-form-iframe.htm +24 -0
- package/payload/templates/forms/contact-form-table.sql +11 -0
- package/payload/templates/forms/contact-form-to-mail.htm +358 -0
- package/payload/templates/forms/contact-form-to-supabase.htm +396 -0
- package/payload/templates/forms/dark-contact-form.htm +623 -0
- package/payload/templates/forms/event-registration-form.htm +1056 -0
- package/payload/templates/forms/feedback-form.htm +813 -0
- package/payload/templates/forms/order-form.htm +1187 -0
- package/payload/templates/forms/recruitment-form.htm +698 -0
- package/payload/templates/forms/service/PHPMailer/Exception.php +40 -0
- package/payload/templates/forms/service/PHPMailer/LICENSE +502 -0
- package/payload/templates/forms/service/PHPMailer/PHPMailer.php +5586 -0
- package/payload/templates/forms/service/PHPMailer/SMTP.php +1617 -0
- package/payload/templates/forms/service/readme.md +162 -0
- package/payload/templates/forms/service/send-form-mail.php +941 -0
- package/payload/templates/forms/support-ticket-form.htm +908 -0
- package/payload/templates/panel/TEMPLATE.md +16 -0
- package/payload/templates/panel/assets/_Material Symbols & Icons - Google Fonts.webloc +8 -0
- package/payload/templates/panel/assets/arrow_down.png +0 -0
- package/payload/templates/panel/assets/close.png +0 -0
- package/payload/templates/panel/assets/left-menu/bolt.png +0 -0
- package/payload/templates/panel/assets/left-menu/brick.png +0 -0
- package/payload/templates/panel/assets/left-menu/code.png +0 -0
- package/payload/templates/panel/assets/left-menu/dashboard.png +0 -0
- package/payload/templates/panel/assets/left-menu/data-table.png +0 -0
- package/payload/templates/panel/assets/left-menu/extension.png +0 -0
- package/payload/templates/panel/assets/left-menu/home.png +0 -0
- package/payload/templates/panel/assets/left-menu/reports.png +0 -0
- package/payload/templates/panel/assets/left-menu/setting.png +0 -0
- package/payload/templates/panel/assets/left-menu/url.png +0 -0
- package/payload/templates/panel/assets/light.png +0 -0
- package/payload/templates/panel/assets/maybe.png +0 -0
- package/payload/templates/panel/assets/panel-icon.png +0 -0
- package/payload/templates/panel/assets/top-bar/add.png +0 -0
- package/payload/templates/panel/assets/top-bar/add.svg +1 -0
- package/payload/templates/panel/assets/top-bar/apps.png +0 -0
- package/payload/templates/panel/assets/top-bar/apps.svg +1 -0
- package/payload/templates/panel/assets/top-bar/arrow-down.svg +1 -0
- package/payload/templates/panel/assets/top-bar/bell.svg +1 -0
- package/payload/templates/panel/assets/top-bar/bookmark.png +0 -0
- package/payload/templates/panel/assets/top-bar/bookmark.svg +1 -0
- package/payload/templates/panel/assets/top-bar/cancel.png +0 -0
- package/payload/templates/panel/assets/top-bar/close.svg +1 -0
- package/payload/templates/panel/assets/top-bar/comment.png +0 -0
- package/payload/templates/panel/assets/top-bar/filter.png +0 -0
- package/payload/templates/panel/assets/top-bar/keyboard.svg +1 -0
- package/payload/templates/panel/assets/top-bar/notification.png +0 -0
- package/payload/templates/panel/assets/top-bar/search.png +0 -0
- package/payload/templates/panel/assets/top-bar/search.svg +1 -0
- package/payload/templates/panel/assets/top-bar/user.png +0 -0
- package/payload/templates/panel/assets/top-bar/user.svg +1 -0
- package/payload/templates/panel/assets/warning.png +0 -0
- package/payload/templates/panel/common/bridge.js +1 -0
- package/payload/templates/panel/common/bridge.min.js +0 -0
- package/payload/templates/panel/common/components.js +12 -0
- package/payload/templates/panel/common/full-view.js +107 -0
- package/payload/templates/panel/common/full-view.min.js +1 -0
- package/payload/templates/panel/common/main-view.js +53 -0
- package/payload/templates/panel/common/main-view.min.js +1 -0
- package/payload/templates/panel/common/module-page.js +46 -0
- package/payload/templates/panel/common/module-page.min.js +1 -0
- package/payload/templates/panel/common/right-view.js +77 -0
- package/payload/templates/panel/common/right-view.min.js +1 -0
- package/payload/templates/panel/common/start-page.js +31 -0
- package/payload/templates/panel/common/start-page.min.js +1 -0
- package/payload/templates/panel/common/theme.js +491 -0
- package/payload/templates/panel/common/top-bar-v25-07-29-1.js +330 -0
- package/payload/templates/panel/common/top-bar-v25-07-29-2.js +265 -0
- package/payload/templates/panel/common/top-bar.js +855 -0
- package/payload/templates/panel/common/top-bar.min.js +1 -0
- package/payload/templates/panel/common/ui-standards.css +77 -0
- package/payload/templates/panel/common/ui-standards.js +133 -0
- package/payload/templates/panel/common/ui-standards.min.css +1 -0
- package/payload/templates/panel/common/ui-standards.min.js +1 -0
- package/payload/templates/panel/index.htm +642 -0
- package/payload/templates/panel/managers/database.js +1 -0
- package/payload/templates/panel/managers/database.min.js +1 -0
- package/payload/templates/panel/managers/login.js +2 -0
- package/payload/templates/panel/managers/login.min.js +1 -0
- package/payload/templates/panel/module1/empty-main.htm +26 -0
- package/payload/templates/panel/module10/greenhouse.htm +1361 -0
- package/payload/templates/panel/module11/arduino-projects.htm +1124 -0
- package/payload/templates/panel/module2/empty-full.htm +26 -0
- package/payload/templates/panel/module3/empty-right.htm +26 -0
- package/payload/templates/panel/module4/empty-main-topbar.htm +26 -0
- package/payload/templates/panel/module5/empty-right-topbar.htm +26 -0
- package/payload/templates/panel/module6/energy-hub.htm +1507 -0
- package/payload/templates/panel/module7/3d-printers.htm +1258 -0
- package/payload/templates/panel/module8/cold-rooms.htm +1250 -0
- package/payload/templates/panel/module9/elevator-fleet.htm +1488 -0
- package/payload/templates/panel/pages/_page-template.js +36 -0
- package/payload/templates/panel/pages/_page-template.min.js +1 -0
- package/payload/templates/panel/pages/activity.js +1072 -0
- package/payload/templates/panel/pages/contents.js +1555 -0
- package/payload/templates/panel/pages/contents.min.js +1 -0
- package/payload/templates/panel/pages/customers.js +1171 -0
- package/payload/templates/panel/pages/edit-user.js +381 -0
- package/payload/templates/panel/pages/edit-user.min.js +1 -0
- package/payload/templates/panel/pages/edit-users-table.min.js +1 -0
- package/payload/templates/panel/pages/home.js +637 -0
- package/payload/templates/panel/pages/home.min.js +1 -0
- package/payload/templates/panel/pages/media.js +1538 -0
- package/payload/templates/panel/pages/notifications.js +542 -0
- package/payload/templates/panel/pages/notifications.min.js +1 -0
- package/payload/templates/panel/pages/orders.js +1147 -0
- package/payload/templates/panel/pages/products.js +1281 -0
- package/payload/templates/panel/pages/reports.js +1138 -0
- package/payload/templates/panel/pages/reports.min.js +1 -0
- package/payload/templates/panel/pages/roles.js +1096 -0
- package/payload/templates/panel/pages/settings.js +1462 -0
- package/payload/templates/panel/pages/settings.min.js +1 -0
- package/payload/templates/panel/pages/user-actions.js +456 -0
- package/payload/templates/panel/pages/user-actions.min.js +2 -0
- package/payload/templates/panel/pages/user-list.js +1113 -0
- package/payload/templates/panel/pages/users.js +334 -0
- package/payload/templates/panel/pages/users.min.js +1 -0
- package/payload/templates/shop/TEMPLATE.md +69 -0
- package/payload/templates/shop/app/app.js +727 -0
- package/payload/templates/shop/app/art.js +89 -0
- package/payload/templates/shop/app/settings.js +45 -0
- package/payload/templates/shop/app/store.js +239 -0
- package/payload/templates/shop/app/texts.js +232 -0
- package/payload/templates/shop/assets/app-icon.svg +1 -0
- package/payload/templates/shop/assets/tabs/account.svg +1 -0
- package/payload/templates/shop/assets/tabs/cart.svg +1 -0
- package/payload/templates/shop/assets/tabs/home.svg +1 -0
- package/payload/templates/shop/assets/tabs/shop.svg +1 -0
- package/payload/templates/shop/components/shop-ui.js +343 -0
- package/payload/templates/shop/index.htm +57 -0
- package/payload/templates/shop/pages/account.js +190 -0
- package/payload/templates/shop/pages/cart.js +116 -0
- package/payload/templates/shop/pages/checkout.js +134 -0
- package/payload/templates/shop/pages/favorites.js +37 -0
- package/payload/templates/shop/pages/home.js +86 -0
- package/payload/templates/shop/pages/orders.js +132 -0
- package/payload/templates/shop/pages/product.js +168 -0
- package/payload/templates/shop/pages/shop.js +113 -0
- package/payload/templates/starter/TEMPLATE.md +107 -0
- package/payload/templates/starter/app/app.js +660 -0
- package/payload/templates/starter/app/settings.js +57 -0
- package/payload/templates/starter/assets/app-icon.svg +5 -0
- package/payload/templates/starter/assets/products/brokoli.png +0 -0
- package/payload/templates/starter/assets/products/cilek.png +0 -0
- package/payload/templates/starter/assets/products/domates.png +0 -0
- package/payload/templates/starter/assets/products/elma.png +0 -0
- package/payload/templates/starter/assets/products/havuc.png +0 -0
- package/payload/templates/starter/assets/products/karpuz.png +0 -0
- package/payload/templates/starter/assets/products/limon.png +0 -0
- package/payload/templates/starter/assets/products/muz.png +0 -0
- package/payload/templates/starter/assets/products/nar.png +0 -0
- package/payload/templates/starter/assets/products/patlican.png +0 -0
- package/payload/templates/starter/assets/products/yabanmersini.png +0 -0
- package/payload/templates/starter/assets/products/yesilbiber.png +0 -0
- package/payload/templates/starter/assets/tabs/grid.png +0 -0
- package/payload/templates/starter/assets/tabs/grids.png +0 -0
- package/payload/templates/starter/assets/tabs/home.png +0 -0
- package/payload/templates/starter/assets/tabs/homes.png +0 -0
- package/payload/templates/starter/assets/tabs/settings.png +0 -0
- package/payload/templates/starter/assets/tabs/settingss.png +0 -0
- package/payload/templates/starter/assets/tabs/tasks.png +0 -0
- package/payload/templates/starter/assets/tabs/taskss.png +0 -0
- package/payload/templates/starter/html/about.htm +54 -0
- package/payload/templates/starter/index.htm +57 -0
- package/payload/templates/starter/pages/about.js +23 -0
- package/payload/templates/starter/pages/home.js +81 -0
- package/payload/templates/starter/pages/product.js +45 -0
- package/payload/templates/starter/pages/products.js +61 -0
- package/payload/templates/starter/pages/settings.js +103 -0
- package/payload/templates/starter/pages/tasks.js +187 -0
- package/payload/templates/starter/pages/website.js +29 -0
|
@@ -0,0 +1,729 @@
|
|
|
1
|
+
/* Bismillah */
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
|
|
5
|
+
SparkLineBox - v26.09
|
|
6
|
+
|
|
7
|
+
UI COMPONENT TEMPLATE
|
|
8
|
+
- An alternative to MiniGraphBox: a small KPI box with a title, a value text, an icon and a line graph (sparkline)
|
|
9
|
+
instead of bars. Same API: addValue, setValues, setTitle, setValueText, setIcon...
|
|
10
|
+
- The line is drawn with SVG (one path for the line, one for the area under it). Objects are created one time,
|
|
11
|
+
only the path data changes. (Fast for live data)
|
|
12
|
+
- Trend badge: "▲ 12%" or "▼ 3%", the last value compared with the first visible value. (showTrend, or your own trendText)
|
|
13
|
+
- Last value dot, optional min / max dots, and marked values: addValue(95, "red") draws a dot in that color.
|
|
14
|
+
- Mouse over: a tooltip shows the value of the nearest point. (hover: 1)
|
|
15
|
+
- maxPoints: How many values are kept. New values are added to the right, the first value is removed when it is full.
|
|
16
|
+
- minValue / maxValue: 0 or null means auto (the smallest / biggest visible value). minValue: 0 keeps the base line at zero.
|
|
17
|
+
- curve: "smooth" or "linear".
|
|
18
|
+
|
|
19
|
+
VALUE: A number, or { value, color }
|
|
20
|
+
|
|
21
|
+
USAGE:
|
|
22
|
+
const graph = SparkLineBox({ title: "Sold Items", valueText: "1.3K", iconFile: "carrot.png", lineColor: "tomato" });
|
|
23
|
+
graph.addValue(24);
|
|
24
|
+
graph.addValue(95, "red"); // Marked value: a red dot on the line
|
|
25
|
+
graph.setValues([10, 20, 15]);
|
|
26
|
+
SparkLineBox({ title: "CPU", maxValue: 100, minValue: 0, valueFormat: (value) => value + "%" });
|
|
27
|
+
|
|
28
|
+
Started Date: September 2026
|
|
29
|
+
Developer: Bugra Ozden
|
|
30
|
+
Email: bugra.ozden@gmail.com
|
|
31
|
+
Webpage: https://bug7a.github.io/js-components/
|
|
32
|
+
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
"use strict";
|
|
36
|
+
|
|
37
|
+
// Default values:
|
|
38
|
+
const SparkLineBoxDefaults = {
|
|
39
|
+
key: "0",
|
|
40
|
+
width: 200,
|
|
41
|
+
height: 80,
|
|
42
|
+
title: "Sold Items",
|
|
43
|
+
valueText: "1.3K",
|
|
44
|
+
iconFile: "", // "": No icon
|
|
45
|
+
lineColor: "tomato",
|
|
46
|
+
values: [], // [10, 20, { value: 15, color: "orange" }]
|
|
47
|
+
maxPoints: 30, // How many values are shown
|
|
48
|
+
minValue: null, // null: Auto. 0: The base line is always zero.
|
|
49
|
+
maxValue: 0, // 0: Auto (the biggest visible value is the top of the graph)
|
|
50
|
+
curve: "smooth", // "smooth", "linear"
|
|
51
|
+
showArea: 1, // 1: Light fill under the line
|
|
52
|
+
showLastDot: 1, // 1: A dot on the last value
|
|
53
|
+
showMinMax: 0, // 1: Dots on the smallest and the biggest value
|
|
54
|
+
showTrend: 1, // 1: Trend badge (last value compared with the first visible value)
|
|
55
|
+
trendText: "", // Your own badge text. "": Calculated. (Ex: "▲ 12%")
|
|
56
|
+
hover: 1, // 1: Tooltip with the value on mouse over
|
|
57
|
+
animated: 1, // 1: The line moves with a short motion when a value is added.
|
|
58
|
+
valueFormat: function (value) { return String(value); }, // Tooltip text
|
|
59
|
+
onClick: function (self) { },
|
|
60
|
+
style: {
|
|
61
|
+
box: {
|
|
62
|
+
color: "whitesmoke",
|
|
63
|
+
border: 1,
|
|
64
|
+
borderColor: Black(0.6),
|
|
65
|
+
round: 4,
|
|
66
|
+
},
|
|
67
|
+
text: {
|
|
68
|
+
padding: 8,
|
|
69
|
+
},
|
|
70
|
+
title: {
|
|
71
|
+
fontSize: 12,
|
|
72
|
+
textColor: Black(0.5),
|
|
73
|
+
},
|
|
74
|
+
valueText: {
|
|
75
|
+
fontSize: 20,
|
|
76
|
+
textColor: Black(0.75),
|
|
77
|
+
},
|
|
78
|
+
icon: {
|
|
79
|
+
width: 24,
|
|
80
|
+
height: 24,
|
|
81
|
+
},
|
|
82
|
+
trend: {
|
|
83
|
+
fontSize: 11,
|
|
84
|
+
upColor: "#2E9E5B",
|
|
85
|
+
downColor: "#D64545",
|
|
86
|
+
flatColor: Black(0.45),
|
|
87
|
+
round: 4,
|
|
88
|
+
padding: [5, 1],
|
|
89
|
+
backgroundOpacity: 0.12,
|
|
90
|
+
},
|
|
91
|
+
graph: {
|
|
92
|
+
height: 30, // Height of the graph area at the bottom
|
|
93
|
+
padding: 4, // Left and right space
|
|
94
|
+
lineWidth: 2,
|
|
95
|
+
areaOpacity: 0.15,
|
|
96
|
+
dotRadius: 3,
|
|
97
|
+
minMaxDotRadius: 2.5,
|
|
98
|
+
minMaxColor: Black(0.45),
|
|
99
|
+
dotRingColor: White(1), // The ring around the dots: the color of the box (a dark box: its dark color)
|
|
100
|
+
motion: 0.2, // Seconds. 0: No animation
|
|
101
|
+
},
|
|
102
|
+
tooltip: {
|
|
103
|
+
color: "#373836",
|
|
104
|
+
textColor: White(1),
|
|
105
|
+
fontSize: 11,
|
|
106
|
+
round: 4,
|
|
107
|
+
padding: [6, 2],
|
|
108
|
+
lineColor: Black(0.25),
|
|
109
|
+
},
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const SparkLineBox = function (params = {}) {
|
|
114
|
+
|
|
115
|
+
// Merge params:
|
|
116
|
+
mergeIntoIfMissing(params, SparkLineBoxDefaults);
|
|
117
|
+
|
|
118
|
+
// Edit params, if needed:
|
|
119
|
+
const _bs = params.style.box;
|
|
120
|
+
params.color = _bs.color;
|
|
121
|
+
params.border = _bs.border;
|
|
122
|
+
params.borderColor = _bs.borderColor;
|
|
123
|
+
params.round = _bs.round;
|
|
124
|
+
|
|
125
|
+
// BOX: Component container
|
|
126
|
+
let box = startObject(params);
|
|
127
|
+
|
|
128
|
+
// *** PRIVATE VARIABLES:
|
|
129
|
+
const _s = box.style;
|
|
130
|
+
const SVG_NS = "http://www.w3.org/2000/svg";
|
|
131
|
+
let svg, areaPath, linePath, lastDot, minDot, maxDot, hoverLine, hoverDot;
|
|
132
|
+
let markDots = []; // Dots of the marked values (with a color)
|
|
133
|
+
let points = []; // [{ x, y, item }] of the last draw
|
|
134
|
+
let cancelResize = null; // (box.after: stopped by remove())
|
|
135
|
+
let graphWidth = 0;
|
|
136
|
+
let hoverIndex = -1;
|
|
137
|
+
const RESIZE_WAIT = 30; // ms
|
|
138
|
+
const TOOLTIP_EDGE_SPACE = 2; // Between the tooltip and the box sides
|
|
139
|
+
const TOOLTIP_GAP = 8; // Between the tooltip and the point
|
|
140
|
+
|
|
141
|
+
// *** PUBLIC VARIABLES:
|
|
142
|
+
// [var] Visible values, from left to right: [{ value, color }]
|
|
143
|
+
box.values = [];
|
|
144
|
+
|
|
145
|
+
// *** PRIVATE FUNCTIONS:
|
|
146
|
+
|
|
147
|
+
const normalizeValue = function (item) {
|
|
148
|
+
if (item !== null && typeof item == "object") {
|
|
149
|
+
return { value: basic.num(item.value) || 0, color: item.color || "" };
|
|
150
|
+
}
|
|
151
|
+
return { value: basic.num(item) || 0, color: "" };
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
// How many points the graph has room for (maxPoints, at least 2).
|
|
155
|
+
const getSlotCount = function () {
|
|
156
|
+
return Math.max(2, basic.num(box.maxPoints) || 2);
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
// Keep only the last values that fit in the graph.
|
|
160
|
+
const trimValues = function () {
|
|
161
|
+
const max = getSlotCount();
|
|
162
|
+
if (box.values.length > max) {
|
|
163
|
+
box.values = box.values.slice(box.values.length - max);
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
// { min, max } of the graph scale
|
|
168
|
+
const getRange = function () {
|
|
169
|
+
let min = Infinity;
|
|
170
|
+
let max = -Infinity;
|
|
171
|
+
box.values.forEach(function (item) {
|
|
172
|
+
if (item.value < min) min = item.value;
|
|
173
|
+
if (item.value > max) max = item.value;
|
|
174
|
+
});
|
|
175
|
+
if (box.values.length == 0) {
|
|
176
|
+
min = 0;
|
|
177
|
+
max = 0;
|
|
178
|
+
}
|
|
179
|
+
const hasMinValue = (box.minValue !== null && box.minValue !== undefined && box.minValue !== "");
|
|
180
|
+
if (hasMinValue) min = Math.min(basic.num(box.minValue) || 0, min);
|
|
181
|
+
if (box.maxValue > 0) max = Math.max(box.maxValue, min);
|
|
182
|
+
return { min: min, max: max };
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
const createSvgElement = function (name, attributes) {
|
|
186
|
+
const element = document.createElementNS(SVG_NS, name);
|
|
187
|
+
Object.keys(attributes).forEach(function (key) { element.setAttribute(key, attributes[key]); });
|
|
188
|
+
return element;
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
// SVG elements are not basic.js objects: they are shown with style.display.
|
|
192
|
+
const setShown = function (element, isShown) {
|
|
193
|
+
element.style.display = (isShown) ? "" : "none";
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
const placeDot = function (dot, point) {
|
|
197
|
+
dot.setAttribute("cx", point.x);
|
|
198
|
+
dot.setAttribute("cy", point.y);
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
// Path data of the line: "M x y C ..." (smooth) or "M x y L x y ..." (linear)
|
|
202
|
+
const getLinePathData = function (list) {
|
|
203
|
+
|
|
204
|
+
if (list.length == 0) return "";
|
|
205
|
+
if (list.length == 1) return "M " + list[0].x + " " + list[0].y;
|
|
206
|
+
|
|
207
|
+
let d = "M " + list[0].x + " " + list[0].y;
|
|
208
|
+
|
|
209
|
+
if (box.curve === "linear") {
|
|
210
|
+
for (let i = 1; i < list.length; i++) d += " L " + list[i].x + " " + list[i].y;
|
|
211
|
+
return d;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Smooth: Catmull-Rom to cubic bezier
|
|
215
|
+
for (let i = 0; i < list.length - 1; i++) {
|
|
216
|
+
const p0 = list[Math.max(i - 1, 0)];
|
|
217
|
+
const p1 = list[i];
|
|
218
|
+
const p2 = list[i + 1];
|
|
219
|
+
const p3 = list[Math.min(i + 2, list.length - 1)];
|
|
220
|
+
const c1x = p1.x + (p2.x - p0.x) / 6;
|
|
221
|
+
const c1y = p1.y + (p2.y - p0.y) / 6;
|
|
222
|
+
const c2x = p2.x - (p3.x - p1.x) / 6;
|
|
223
|
+
const c2y = p2.y - (p3.y - p1.y) / 6;
|
|
224
|
+
d += " C " + r1(c1x) + " " + r1(c1y) + " " + r1(c2x) + " " + r1(c2y) + " " + p2.x + " " + p2.y;
|
|
225
|
+
}
|
|
226
|
+
return d;
|
|
227
|
+
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
const r1 = function (value) {
|
|
231
|
+
return Math.round(value * 10) / 10;
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
// WHY: The "d" transition only works on the CSS property (Chrome). The attribute is set for the other browsers.
|
|
235
|
+
const setPathData = function (path, data) {
|
|
236
|
+
path.setAttribute("d", data);
|
|
237
|
+
if (SparkLineBox.supportsCssPath) path.style.d = (data) ? 'path("' + data + '")' : "";
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
const setLineMotion = function (enabled) {
|
|
241
|
+
const seconds = (enabled && box.animated == 1) ? _s.graph.motion : 0;
|
|
242
|
+
const motion = (seconds > 0) ? "d " + seconds + "s" : "none";
|
|
243
|
+
const dotMotion = (seconds > 0) ? "cx " + seconds + "s, cy " + seconds + "s" : "none";
|
|
244
|
+
linePath.style.transition = motion;
|
|
245
|
+
areaPath.style.transition = motion;
|
|
246
|
+
lastDot.style.transition = dotMotion; // Only the last dot moves. The min / max and marked dots belong to old points, they jump.
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
// Path data of the line and the area for a point list
|
|
250
|
+
const getPathDataSet = function (list) {
|
|
251
|
+
const lineData = getLinePathData(list);
|
|
252
|
+
let areaData = "";
|
|
253
|
+
if (box.showArea == 1 && list.length > 1) {
|
|
254
|
+
const first = list[0];
|
|
255
|
+
const last = list[list.length - 1];
|
|
256
|
+
areaData = lineData + " L " + last.x + " " + _s.graph.height + " L " + first.x + " " + _s.graph.height + " Z";
|
|
257
|
+
}
|
|
258
|
+
return { line: lineData, area: areaData };
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
// { x, y, item } of every value. range: { min, max } of the scale
|
|
262
|
+
const getPoints = function (range) {
|
|
263
|
+
|
|
264
|
+
const padding = _s.graph.padding;
|
|
265
|
+
const lineWidth = _s.graph.lineWidth;
|
|
266
|
+
const innerWidth = Math.max(0, graphWidth - padding * 2);
|
|
267
|
+
const top = lineWidth + _s.graph.dotRadius; // Space for the line width and the dots
|
|
268
|
+
const bottom = _s.graph.height - lineWidth - _s.graph.dotRadius;
|
|
269
|
+
const span = range.max - range.min;
|
|
270
|
+
|
|
271
|
+
// WHY: The x positions come from maxPoints, not from the value count. So the line grows from the left and does not stretch.
|
|
272
|
+
const slots = getSlotCount();
|
|
273
|
+
const step = (slots > 1) ? innerWidth / (slots - 1) : 0;
|
|
274
|
+
|
|
275
|
+
return box.values.map(function (item, index) {
|
|
276
|
+
const x = r1(padding + index * step);
|
|
277
|
+
let y = r1((top + bottom) / 2);
|
|
278
|
+
if (span > 0) y = r1(bottom - (item.value - range.min) / span * (bottom - top));
|
|
279
|
+
return { x: x, y: y, item: item };
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
// START SHAPE: The old points at their new places (no motion) and the new point on the previous point.
|
|
285
|
+
// Same number of segments as the final shape, so the "d" transition moves only the last segment.
|
|
286
|
+
const drawStartShape = function () {
|
|
287
|
+
const last = points[points.length - 1];
|
|
288
|
+
const previous = points[points.length - 2];
|
|
289
|
+
const startPoints = points.slice(0, -1).concat([{ x: previous.x, y: previous.y, item: last.item }]);
|
|
290
|
+
const startData = getPathDataSet(startPoints);
|
|
291
|
+
setLineMotion(0);
|
|
292
|
+
setPathData(linePath, startData.line);
|
|
293
|
+
if (startData.area) setPathData(areaPath, startData.area);
|
|
294
|
+
placeDot(lastDot, previous);
|
|
295
|
+
void svg.getBoundingClientRect(); // WHY: Apply the start shape now, before the motion is turned on.
|
|
296
|
+
setLineMotion(1);
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
const drawMinMaxDots = function (span) {
|
|
300
|
+
|
|
301
|
+
const isShown = (box.showMinMax == 1 && points.length > 1 && span > 0);
|
|
302
|
+
setShown(minDot, isShown);
|
|
303
|
+
setShown(maxDot, isShown);
|
|
304
|
+
if (!isShown) return;
|
|
305
|
+
|
|
306
|
+
let minPoint = points[0];
|
|
307
|
+
let maxPoint = points[0];
|
|
308
|
+
points.forEach(function (p) {
|
|
309
|
+
if (p.item.value < minPoint.item.value) minPoint = p;
|
|
310
|
+
if (p.item.value > maxPoint.item.value) maxPoint = p;
|
|
311
|
+
});
|
|
312
|
+
placeDot(minDot, minPoint);
|
|
313
|
+
placeDot(maxDot, maxPoint);
|
|
314
|
+
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
// Marked values (own color)
|
|
318
|
+
const drawMarkDots = function () {
|
|
319
|
+
|
|
320
|
+
const marked = points.filter(function (p) { return p.item.color; });
|
|
321
|
+
|
|
322
|
+
while (markDots.length < marked.length) {
|
|
323
|
+
const dot = createSvgElement("circle", { r: _s.graph.dotRadius, stroke: _s.graph.dotRingColor, "stroke-width": 1 });
|
|
324
|
+
svg.appendChild(dot);
|
|
325
|
+
markDots.push(dot);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
markDots.forEach(function (dot, index) {
|
|
329
|
+
const p = marked[index];
|
|
330
|
+
setShown(dot, !!p);
|
|
331
|
+
if (!p) return;
|
|
332
|
+
placeDot(dot, p);
|
|
333
|
+
dot.setAttribute("fill", p.item.color);
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
// Draw the line for the current values.
|
|
339
|
+
// animated: 1 -> Only the new (last) point moves: it starts at the previous point and moves to its place.
|
|
340
|
+
// 0 -> The line jumps to the new shape. (setValues, resize)
|
|
341
|
+
// WHY: When the graph is full, every point gets its right neighbour's value. If the whole path is animated, the
|
|
342
|
+
// old points move up and down like a wave. The old points must jump, only the new point is animated.
|
|
343
|
+
const draw = function (animated = 1) {
|
|
344
|
+
|
|
345
|
+
if (!box || !svg) return;
|
|
346
|
+
|
|
347
|
+
const range = getRange();
|
|
348
|
+
points = getPoints(range);
|
|
349
|
+
|
|
350
|
+
const last = points[points.length - 1];
|
|
351
|
+
const canAnimate = (animated && box.animated == 1 && _s.graph.motion > 0 && points.length > 1);
|
|
352
|
+
|
|
353
|
+
if (canAnimate) {
|
|
354
|
+
drawStartShape();
|
|
355
|
+
} else {
|
|
356
|
+
setLineMotion(0);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
// FINAL SHAPE:
|
|
360
|
+
const data = getPathDataSet(points);
|
|
361
|
+
setPathData(linePath, data.line);
|
|
362
|
+
|
|
363
|
+
if (data.area) setPathData(areaPath, data.area);
|
|
364
|
+
setShown(areaPath, !!data.area);
|
|
365
|
+
|
|
366
|
+
const isLastDotShown = (box.showLastDot == 1 && !!last);
|
|
367
|
+
if (isLastDotShown) placeDot(lastDot, last);
|
|
368
|
+
setShown(lastDot, isLastDotShown);
|
|
369
|
+
|
|
370
|
+
drawMinMaxDots(range.max - range.min);
|
|
371
|
+
drawMarkDots();
|
|
372
|
+
|
|
373
|
+
updateTrend();
|
|
374
|
+
if (hoverIndex >= 0) showHover(hoverIndex);
|
|
375
|
+
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
// Trend badge: last value compared with the first visible value
|
|
379
|
+
const updateTrend = function () {
|
|
380
|
+
|
|
381
|
+
if (box.trendText) {
|
|
382
|
+
box.lblTrend.text = box.trendText;
|
|
383
|
+
paintTrend(0);
|
|
384
|
+
box.lblTrend.visible = 1;
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
if (box.showTrend != 1 || box.values.length < 2) {
|
|
389
|
+
box.lblTrend.visible = 0;
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
const first = box.values[0].value;
|
|
394
|
+
const last = box.values[box.values.length - 1].value;
|
|
395
|
+
const diff = last - first;
|
|
396
|
+
const direction = Math.sign(diff);
|
|
397
|
+
let text;
|
|
398
|
+
|
|
399
|
+
if (first == 0) {
|
|
400
|
+
text = (diff > 0 ? "+" : "") + r1(diff);
|
|
401
|
+
} else {
|
|
402
|
+
const percent = Math.round(Math.abs(diff) / Math.abs(first) * 100);
|
|
403
|
+
text = getTrendArrow(direction) + percent + "%";
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
box.lblTrend.text = text;
|
|
407
|
+
paintTrend(direction);
|
|
408
|
+
box.lblTrend.visible = 1;
|
|
409
|
+
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
// direction: 1 up, -1 down, 0 flat
|
|
413
|
+
const getTrendArrow = function (direction) {
|
|
414
|
+
if (direction > 0) return "▲ ";
|
|
415
|
+
if (direction < 0) return "▼ ";
|
|
416
|
+
return "";
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
const getTrendColor = function (direction) {
|
|
420
|
+
if (direction > 0) return _s.trend.upColor;
|
|
421
|
+
if (direction < 0) return _s.trend.downColor;
|
|
422
|
+
return _s.trend.flatColor;
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
const paintTrend = function (direction) {
|
|
426
|
+
const color = getTrendColor(direction);
|
|
427
|
+
box.lblTrend.textColor = color;
|
|
428
|
+
box.lblTrend.css.backgroundColor = SparkLineBox.withAlpha(color, _s.trend.backgroundOpacity);
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
// *** HOVER (tooltip):
|
|
432
|
+
|
|
433
|
+
const showHover = function (index) {
|
|
434
|
+
|
|
435
|
+
const p = points[index];
|
|
436
|
+
if (!p) return hideHover();
|
|
437
|
+
hoverIndex = index;
|
|
438
|
+
|
|
439
|
+
hoverLine.setAttribute("x1", p.x);
|
|
440
|
+
hoverLine.setAttribute("x2", p.x);
|
|
441
|
+
hoverLine.setAttribute("y1", 0);
|
|
442
|
+
hoverLine.setAttribute("y2", _s.graph.height);
|
|
443
|
+
setShown(hoverLine, 1);
|
|
444
|
+
placeDot(hoverDot, p);
|
|
445
|
+
hoverDot.setAttribute("fill", p.item.color || box.lineColor);
|
|
446
|
+
setShown(hoverDot, 1);
|
|
447
|
+
|
|
448
|
+
box.lblTooltip.text = box.valueFormat(p.item.value, p.item);
|
|
449
|
+
box.lblTooltip.visible = 1;
|
|
450
|
+
// Above the point, inside the box
|
|
451
|
+
const tipWidth = box.lblTooltip.elem.offsetWidth;
|
|
452
|
+
const graphTop = box.elem.clientHeight - _s.graph.height;
|
|
453
|
+
let left = p.x - tipWidth / 2;
|
|
454
|
+
left = Math.max(TOOLTIP_EDGE_SPACE, Math.min(left, box.elem.clientWidth - tipWidth - TOOLTIP_EDGE_SPACE));
|
|
455
|
+
box.lblTooltip.left = Math.round(left);
|
|
456
|
+
const top = Math.round(graphTop + p.y - box.lblTooltip.elem.offsetHeight - TOOLTIP_GAP);
|
|
457
|
+
box.lblTooltip.top = Math.max(TOOLTIP_EDGE_SPACE, top);
|
|
458
|
+
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
const hideHover = function () {
|
|
462
|
+
hoverIndex = -1;
|
|
463
|
+
setShown(hoverLine, 0);
|
|
464
|
+
setShown(hoverDot, 0);
|
|
465
|
+
box.lblTooltip.visible = 0;
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
const onMouseMove = function (self, event) {
|
|
469
|
+
if (box.hover != 1 || points.length == 0) return;
|
|
470
|
+
const rect = box.elem.getBoundingClientRect();
|
|
471
|
+
const x = withPageZoom(event.clientX - rect.left) - _s.graph.padding;
|
|
472
|
+
const slots = getSlotCount();
|
|
473
|
+
const step = Math.max(1, (graphWidth - _s.graph.padding * 2) / (slots - 1));
|
|
474
|
+
const index = Math.max(0, Math.min(points.length - 1, Math.round(x / step)));
|
|
475
|
+
if (index !== hoverIndex) showHover(index);
|
|
476
|
+
};
|
|
477
|
+
|
|
478
|
+
// The box size can change: width "100%"
|
|
479
|
+
const refreshSize = function () {
|
|
480
|
+
if (!box) return;
|
|
481
|
+
graphWidth = box.elem.clientWidth;
|
|
482
|
+
svg.setAttribute("viewBox", "0 0 " + Math.max(1, graphWidth) + " " + _s.graph.height);
|
|
483
|
+
draw(0);
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
// *** PUBLIC FUNCTIONS:
|
|
487
|
+
|
|
488
|
+
// Add a value to the right. If the graph is full, the first value is removed.
|
|
489
|
+
box.addValue = function (value, color) {
|
|
490
|
+
const item = normalizeValue(value);
|
|
491
|
+
if (color) item.color = color;
|
|
492
|
+
box.values.push(item);
|
|
493
|
+
trimValues();
|
|
494
|
+
draw(1);
|
|
495
|
+
};
|
|
496
|
+
// USAGE: graph.addValue(24) or graph.addValue(95, "red") (marked value: a red dot)
|
|
497
|
+
|
|
498
|
+
box.setValues = function (values) {
|
|
499
|
+
box.values = (values || []).map(normalizeValue);
|
|
500
|
+
trimValues();
|
|
501
|
+
hideHover();
|
|
502
|
+
draw(0);
|
|
503
|
+
};
|
|
504
|
+
// USAGE: graph.setValues([10, 20, { value: 15, color: "orange" }])
|
|
505
|
+
|
|
506
|
+
box.getValues = function () {
|
|
507
|
+
return box.values.map(function (item) { return item.value; });
|
|
508
|
+
};
|
|
509
|
+
|
|
510
|
+
box.getLastValue = function () {
|
|
511
|
+
const item = box.values[box.values.length - 1];
|
|
512
|
+
return (item) ? item.value : null;
|
|
513
|
+
};
|
|
514
|
+
|
|
515
|
+
box.clear = function () {
|
|
516
|
+
box.values = [];
|
|
517
|
+
hideHover();
|
|
518
|
+
draw(0);
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
box.setTitle = function (text) {
|
|
522
|
+
box.title = text;
|
|
523
|
+
box.lblTitle.text = text;
|
|
524
|
+
};
|
|
525
|
+
|
|
526
|
+
box.setValueText = function (text) {
|
|
527
|
+
box.valueText = text;
|
|
528
|
+
box.lblValueText.text = text;
|
|
529
|
+
};
|
|
530
|
+
|
|
531
|
+
box.setIcon = function (iconFile) {
|
|
532
|
+
box.iconFile = iconFile || "";
|
|
533
|
+
box.icon.visible = (box.iconFile) ? 1 : 0;
|
|
534
|
+
if (box.iconFile) box.icon.load(box.iconFile);
|
|
535
|
+
};
|
|
536
|
+
// USAGE: graph.setIcon("assets/carrot.png") or graph.setIcon("") to hide it
|
|
537
|
+
|
|
538
|
+
box.setLineColor = function (color) {
|
|
539
|
+
box.lineColor = color;
|
|
540
|
+
linePath.setAttribute("stroke", color);
|
|
541
|
+
areaPath.setAttribute("fill", color);
|
|
542
|
+
lastDot.setAttribute("fill", color);
|
|
543
|
+
hoverDot.setAttribute("fill", color);
|
|
544
|
+
};
|
|
545
|
+
|
|
546
|
+
// 0: Auto
|
|
547
|
+
box.setMaxValue = function (maxValue) {
|
|
548
|
+
box.maxValue = basic.num(maxValue) || 0;
|
|
549
|
+
draw(0);
|
|
550
|
+
};
|
|
551
|
+
|
|
552
|
+
// null: Auto
|
|
553
|
+
box.setMinValue = function (minValue) {
|
|
554
|
+
const isAuto = (minValue === null || minValue === undefined || minValue === "");
|
|
555
|
+
box.minValue = (isAuto) ? null : basic.num(minValue) || 0;
|
|
556
|
+
draw(0);
|
|
557
|
+
};
|
|
558
|
+
|
|
559
|
+
// "": Calculated from the values
|
|
560
|
+
box.setTrendText = function (text) {
|
|
561
|
+
box.trendText = text || "";
|
|
562
|
+
updateTrend();
|
|
563
|
+
};
|
|
564
|
+
|
|
565
|
+
box.setMaxPoints = function (maxPoints) {
|
|
566
|
+
box.maxPoints = Math.max(2, basic.num(maxPoints) || 2);
|
|
567
|
+
trimValues();
|
|
568
|
+
draw(0);
|
|
569
|
+
};
|
|
570
|
+
|
|
571
|
+
box.refresh = function () {
|
|
572
|
+
refreshSize();
|
|
573
|
+
};
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
// *** OBJECT VIEW:
|
|
577
|
+
|
|
578
|
+
// BOX: Graph (at the bottom)
|
|
579
|
+
box.graphBox = Box({
|
|
580
|
+
left: 0,
|
|
581
|
+
top: 0,
|
|
582
|
+
width: "100%",
|
|
583
|
+
height: _s.graph.height,
|
|
584
|
+
color: "transparent",
|
|
585
|
+
});
|
|
586
|
+
box.graphBox.css = { top: "auto", bottom: "0px", lineHeight: "0" };
|
|
587
|
+
|
|
588
|
+
// SVG: line, area, dots
|
|
589
|
+
svg = createSvgElement("svg", {
|
|
590
|
+
width: "100%",
|
|
591
|
+
height: _s.graph.height,
|
|
592
|
+
viewBox: "0 0 200 " + _s.graph.height,
|
|
593
|
+
preserveAspectRatio: "none",
|
|
594
|
+
});
|
|
595
|
+
svg.style.display = "block";
|
|
596
|
+
svg.style.overflow = "visible";
|
|
597
|
+
svg.setAttribute("aria-hidden", "true");
|
|
598
|
+
|
|
599
|
+
areaPath = createSvgElement("path", { fill: box.lineColor, "fill-opacity": _s.graph.areaOpacity, stroke: "none" });
|
|
600
|
+
linePath = createSvgElement("path", {
|
|
601
|
+
fill: "none",
|
|
602
|
+
stroke: box.lineColor,
|
|
603
|
+
"stroke-width": _s.graph.lineWidth,
|
|
604
|
+
"stroke-linecap": "round",
|
|
605
|
+
"stroke-linejoin": "round",
|
|
606
|
+
});
|
|
607
|
+
linePath.setAttribute("vector-effect", "non-scaling-stroke");
|
|
608
|
+
hoverLine = createSvgElement("line", { stroke: _s.tooltip.lineColor, "stroke-width": 1, "stroke-dasharray": "2 2" });
|
|
609
|
+
hoverLine.style.display = "none";
|
|
610
|
+
minDot = createSvgElement("circle", { r: _s.graph.minMaxDotRadius, fill: _s.graph.minMaxColor, stroke: _s.graph.dotRingColor, "stroke-width": 1 });
|
|
611
|
+
maxDot = createSvgElement("circle", { r: _s.graph.minMaxDotRadius, fill: _s.graph.minMaxColor, stroke: _s.graph.dotRingColor, "stroke-width": 1 });
|
|
612
|
+
lastDot = createSvgElement("circle", { r: _s.graph.dotRadius, fill: box.lineColor, stroke: _s.graph.dotRingColor, "stroke-width": 1.5 });
|
|
613
|
+
hoverDot = createSvgElement("circle", { r: _s.graph.dotRadius + 1, fill: box.lineColor, stroke: _s.graph.dotRingColor, "stroke-width": 1.5 });
|
|
614
|
+
hoverDot.style.display = "none";
|
|
615
|
+
|
|
616
|
+
[areaPath, linePath, hoverLine, minDot, maxDot, lastDot, hoverDot].forEach(function (element) { svg.appendChild(element); });
|
|
617
|
+
box.graphBox.elem.appendChild(svg);
|
|
618
|
+
|
|
619
|
+
// GROUP: Title and value text (left top)
|
|
620
|
+
VGroup({
|
|
621
|
+
align: "left top",
|
|
622
|
+
padding: _s.text.padding,
|
|
623
|
+
gap: 0,
|
|
624
|
+
});
|
|
625
|
+
|
|
626
|
+
box.lblTitle = Label({
|
|
627
|
+
text: box.title,
|
|
628
|
+
fontSize: _s.title.fontSize,
|
|
629
|
+
textColor: _s.title.textColor,
|
|
630
|
+
});
|
|
631
|
+
// WHY: marginBottom: Line heights of the two texts leave a big space between them.
|
|
632
|
+
box.lblTitle.css = { whiteSpace: "nowrap", marginBottom: "-6px" };
|
|
633
|
+
|
|
634
|
+
// GROUP: Value text and trend badge
|
|
635
|
+
HGroup({ width: "auto", height: "auto", align: "left center", gap: 6 });
|
|
636
|
+
|
|
637
|
+
box.lblValueText = Label({
|
|
638
|
+
text: box.valueText,
|
|
639
|
+
fontSize: _s.valueText.fontSize,
|
|
640
|
+
textColor: _s.valueText.textColor,
|
|
641
|
+
});
|
|
642
|
+
box.lblValueText.css.whiteSpace = "nowrap";
|
|
643
|
+
|
|
644
|
+
box.lblTrend = Label({
|
|
645
|
+
text: "",
|
|
646
|
+
fontSize: _s.trend.fontSize,
|
|
647
|
+
textColor: _s.trend.flatColor,
|
|
648
|
+
round: _s.trend.round,
|
|
649
|
+
padding: _s.trend.padding,
|
|
650
|
+
});
|
|
651
|
+
// WHY: marginTop: Lines up with the middle of the big value text.
|
|
652
|
+
box.lblTrend.css = { whiteSpace: "nowrap", lineHeight: "1.5", marginTop: "4px" };
|
|
653
|
+
|
|
654
|
+
endGroup();
|
|
655
|
+
|
|
656
|
+
endGroup();
|
|
657
|
+
|
|
658
|
+
// GROUP: Icon (right top)
|
|
659
|
+
HGroup({
|
|
660
|
+
align: "right top",
|
|
661
|
+
padding: _s.text.padding,
|
|
662
|
+
gap: 0,
|
|
663
|
+
});
|
|
664
|
+
|
|
665
|
+
box.icon = Icon({
|
|
666
|
+
width: _s.icon.width,
|
|
667
|
+
height: _s.icon.height,
|
|
668
|
+
});
|
|
669
|
+
box.icon.elem.alt = "";
|
|
670
|
+
|
|
671
|
+
endGroup();
|
|
672
|
+
|
|
673
|
+
// LABEL: Tooltip (over the graph)
|
|
674
|
+
box.lblTooltip = Label({
|
|
675
|
+
text: "",
|
|
676
|
+
fontSize: _s.tooltip.fontSize,
|
|
677
|
+
textColor: _s.tooltip.textColor,
|
|
678
|
+
color: _s.tooltip.color,
|
|
679
|
+
round: _s.tooltip.round,
|
|
680
|
+
padding: _s.tooltip.padding,
|
|
681
|
+
});
|
|
682
|
+
box.lblTooltip.css = { whiteSpace: "nowrap", lineHeight: "1.4", pointerEvents: "none" };
|
|
683
|
+
box.lblTooltip.visible = 0;
|
|
684
|
+
|
|
685
|
+
// *** OBJECT INIT CODE:
|
|
686
|
+
|
|
687
|
+
box.on("click", function () { box.onClick(box); });
|
|
688
|
+
box.on("mousemove", onMouseMove);
|
|
689
|
+
box.on("mouseleave", function () { hideHover(); });
|
|
690
|
+
box.cursor = "default";
|
|
691
|
+
box.clickable = 1; // WHY: mousemove needs pointer events.
|
|
692
|
+
|
|
693
|
+
box.setIcon(box.iconFile);
|
|
694
|
+
|
|
695
|
+
box.values = (params.values || []).map(normalizeValue); // WHY: Copy. The default [] must not be shared between components.
|
|
696
|
+
trimValues();
|
|
697
|
+
refreshSize();
|
|
698
|
+
|
|
699
|
+
box.onResize(function () {
|
|
700
|
+
if (cancelResize) cancelResize();
|
|
701
|
+
cancelResize = box.after(RESIZE_WAIT, function () {
|
|
702
|
+
cancelResize = null;
|
|
703
|
+
refreshSize();
|
|
704
|
+
});
|
|
705
|
+
});
|
|
706
|
+
|
|
707
|
+
return endObject(box);
|
|
708
|
+
|
|
709
|
+
};
|
|
710
|
+
|
|
711
|
+
// *** STATIC FUNCTIONS:
|
|
712
|
+
|
|
713
|
+
// "#2E9E5B" or "rgb(…)" with an alpha. (For the trend badge background)
|
|
714
|
+
SparkLineBox._alphaCache = {};
|
|
715
|
+
SparkLineBox.withAlpha = function (color, alpha) {
|
|
716
|
+
const key = color + "|" + alpha;
|
|
717
|
+
if (SparkLineBox._alphaCache[key]) return SparkLineBox._alphaCache[key];
|
|
718
|
+
const probe = document.createElement("div");
|
|
719
|
+
probe.style.color = color;
|
|
720
|
+
document.body.appendChild(probe);
|
|
721
|
+
const rgb = getComputedStyle(probe).color; // "rgb(r, g, b)" or "rgba(r, g, b, a)"
|
|
722
|
+
probe.remove();
|
|
723
|
+
const parts = rgb.match(/[\d.]+/g) || [0, 0, 0];
|
|
724
|
+
SparkLineBox._alphaCache[key] = "rgba(" + parts[0] + ", " + parts[1] + ", " + parts[2] + ", " + alpha + ")";
|
|
725
|
+
return SparkLineBox._alphaCache[key];
|
|
726
|
+
};
|
|
727
|
+
|
|
728
|
+
// Chrome and Edge can animate the path with the CSS "d" property.
|
|
729
|
+
SparkLineBox.supportsCssPath = (typeof CSS !== "undefined" && CSS.supports && CSS.supports("d", 'path("M 0 0 L 1 1")'));
|