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,1072 @@
|
|
|
1
|
+
/* Bismillah */
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
|
|
5
|
+
Activity Log Page (Template) - v26.09
|
|
6
|
+
|
|
7
|
+
- Who did what and when in the panel (audit log): filters, security alert, summary graphs,
|
|
8
|
+
a big table (virtual scroll) and a details panel with the changes (before / after).
|
|
9
|
+
- Live mode: New events are collected and shown with a "new events" button,
|
|
10
|
+
so the table does not jump while the user reads it.
|
|
11
|
+
- Test data: About 5000 events of the last 90 days, created one time with a fixed seed.
|
|
12
|
+
Users come from the Roles page (RolesPage.load), if it is loaded.
|
|
13
|
+
- Replace ActivityPage.getEvents() with your service (API with paging and filters for big logs).
|
|
14
|
+
|
|
15
|
+
COMPONENTS:
|
|
16
|
+
- Tabs (comp-m4): Time range
|
|
17
|
+
- SearchInput (comp-m2): Search
|
|
18
|
+
- TinySelect (comp-m2): User, action and module filters
|
|
19
|
+
- Toggle (comp-m2): Live updates
|
|
20
|
+
- SparkLineBox (comp-m4): Summary graphs
|
|
21
|
+
- SmartTable (comp-m3): Event list
|
|
22
|
+
- TinyTable (comp-m4): Changes (details panel)
|
|
23
|
+
- SmartButton (comp-m4): Actions
|
|
24
|
+
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
ActivityPageDefaults = {
|
|
28
|
+
color: "transparent",
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const ActivityPage = function(params = {}) {
|
|
32
|
+
|
|
33
|
+
// BOX: Page container
|
|
34
|
+
let box = startPage(params, ActivityPageDefaults, mainView);
|
|
35
|
+
|
|
36
|
+
mainView.setKey(ActivityPage.KEY);
|
|
37
|
+
|
|
38
|
+
// *** PRIVATE VARIABLES:
|
|
39
|
+
|
|
40
|
+
const ASSETS = "assets/";
|
|
41
|
+
const LIB_PATH = "_basic/";
|
|
42
|
+
const S = ActivityPage.STYLE;
|
|
43
|
+
|
|
44
|
+
const HOUR = 60 * 60 * 1000;
|
|
45
|
+
const DAY = 24 * HOUR;
|
|
46
|
+
const LIVE_INTERVAL = 4000; // ms (test: a new event every 4 seconds)
|
|
47
|
+
const FAILED_SIGN_IN_LIMIT = 3; // In the last hour: show the security alert
|
|
48
|
+
|
|
49
|
+
const RANGES = [
|
|
50
|
+
{ text: "24 hours", ms: DAY },
|
|
51
|
+
{ text: "7 days", ms: 7 * DAY },
|
|
52
|
+
{ text: "30 days", ms: 30 * DAY },
|
|
53
|
+
{ text: "90 days", ms: 90 * DAY },
|
|
54
|
+
];
|
|
55
|
+
|
|
56
|
+
const filter = {
|
|
57
|
+
rangeIndex: 1,
|
|
58
|
+
search: "",
|
|
59
|
+
userId: "",
|
|
60
|
+
action: "",
|
|
61
|
+
module: "",
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
let liveTimer = null;
|
|
65
|
+
let searchTimer = null;
|
|
66
|
+
let pendingCount = 0; // Live events that are not in the table yet
|
|
67
|
+
let isRendering = 0;
|
|
68
|
+
|
|
69
|
+
// Components
|
|
70
|
+
let lblSubtitle, liveToggle, lblLive;
|
|
71
|
+
let alertBox, lblAlert;
|
|
72
|
+
let rangeTabs, searchInput, userSelect, actionSelect, moduleSelect;
|
|
73
|
+
let kpiBoxList = [];
|
|
74
|
+
let btnNewEvents, lblResultCount, smartTable;
|
|
75
|
+
|
|
76
|
+
// *** PRIVATE FUNCTIONS:
|
|
77
|
+
|
|
78
|
+
const getEvents = function() {
|
|
79
|
+
return ActivityPage.getEvents();
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const getFilteredEvents = function() {
|
|
83
|
+
|
|
84
|
+
const since = Date.now() - RANGES[filter.rangeIndex].ms;
|
|
85
|
+
const search = filter.search.trim().toLowerCase();
|
|
86
|
+
|
|
87
|
+
return getEvents().filter(function(event) {
|
|
88
|
+
if (event.time < since) return false;
|
|
89
|
+
if (filter.userId && String(event.userId) != filter.userId) return false;
|
|
90
|
+
if (filter.action && event.action != filter.action) return false;
|
|
91
|
+
if (filter.module && event.module != filter.module) return false;
|
|
92
|
+
if (search) {
|
|
93
|
+
const text = (event.userName + " " + event.target + " " + event.ip + " " + ActivityPage.ACTIONS[event.action].label).toLowerCase();
|
|
94
|
+
if (!text.includes(search)) return false;
|
|
95
|
+
}
|
|
96
|
+
return true;
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const renderTable = function() {
|
|
102
|
+
|
|
103
|
+
const list = getFilteredEvents();
|
|
104
|
+
|
|
105
|
+
smartTable.setItemDataList(list.map(function(event) {
|
|
106
|
+
return {
|
|
107
|
+
id: event.id,
|
|
108
|
+
time: ActivityPage.formatDateTime(event.time), // Sortable text
|
|
109
|
+
user: event.userName,
|
|
110
|
+
action: ActivityPage.ACTIONS[event.action].label,
|
|
111
|
+
module: event.module,
|
|
112
|
+
target: event.target,
|
|
113
|
+
ip: event.ip,
|
|
114
|
+
};
|
|
115
|
+
}));
|
|
116
|
+
|
|
117
|
+
lblResultCount.text = list.length.toLocaleString("en-US") + " events in the last " + RANGES[filter.rangeIndex].text;
|
|
118
|
+
|
|
119
|
+
pendingCount = 0;
|
|
120
|
+
updateNewEventsButton();
|
|
121
|
+
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const renderSummary = function() {
|
|
125
|
+
|
|
126
|
+
const events = getEvents();
|
|
127
|
+
const now = Date.now();
|
|
128
|
+
|
|
129
|
+
// Last 24 hours, one bar for each hour
|
|
130
|
+
const hourly = function(test) {
|
|
131
|
+
const bars = new Array(24).fill(0);
|
|
132
|
+
events.forEach(function(event) {
|
|
133
|
+
const age = now - event.time;
|
|
134
|
+
if (age < 0 || age >= DAY || !test(event)) return;
|
|
135
|
+
bars[23 - Math.floor(age / HOUR)]++;
|
|
136
|
+
});
|
|
137
|
+
return bars;
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
// Last 7 days, one bar for each day
|
|
141
|
+
const daily = function(test, countUsers) {
|
|
142
|
+
const bars = new Array(7).fill(0).map(function() { return (countUsers) ? new Set() : 0; });
|
|
143
|
+
events.forEach(function(event) {
|
|
144
|
+
const age = now - event.time;
|
|
145
|
+
if (age < 0 || age >= 7 * DAY || !test(event)) return;
|
|
146
|
+
const index = 6 - Math.floor(age / DAY);
|
|
147
|
+
if (countUsers) bars[index].add(event.userId);
|
|
148
|
+
else bars[index]++;
|
|
149
|
+
});
|
|
150
|
+
return (countUsers) ? bars.map(function(set) { return set.size; }) : bars;
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
const all = hourly(function() { return true; });
|
|
154
|
+
const failed = hourly(function(event) { return event.action == "login_failed"; });
|
|
155
|
+
const activeUsers = daily(function() { return true; }, 1);
|
|
156
|
+
const deletions = daily(function(event) { return event.action == "delete"; });
|
|
157
|
+
|
|
158
|
+
const users7d = new Set(events.filter(function(event) { return now - event.time < 7 * DAY; }).map(function(event) { return event.userId; }));
|
|
159
|
+
|
|
160
|
+
const values = [
|
|
161
|
+
{ text: sum(all).toLocaleString("en-US"), bars: all },
|
|
162
|
+
{ text: String(sum(failed)), bars: failed.map(function(value) { return { value: value, color: (value >= FAILED_SIGN_IN_LIMIT) ? S.ERROR_COLOR : "" }; }) },
|
|
163
|
+
{ text: String(users7d.size), bars: activeUsers },
|
|
164
|
+
{ text: String(sum(deletions)), bars: deletions },
|
|
165
|
+
];
|
|
166
|
+
|
|
167
|
+
kpiBoxList.forEach(function(kpiBox, index) {
|
|
168
|
+
kpiBox.setValueText(values[index].text);
|
|
169
|
+
kpiBox.setValues(values[index].bars);
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
renderSecurityAlert();
|
|
173
|
+
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
const sum = function(list) {
|
|
177
|
+
return list.reduce(function(total, value) { return total + value; }, 0);
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
// Failed sign-ins of the last hour, grouped by the user.
|
|
181
|
+
const renderSecurityAlert = function() {
|
|
182
|
+
|
|
183
|
+
const since = Date.now() - HOUR;
|
|
184
|
+
const counts = {};
|
|
185
|
+
|
|
186
|
+
getEvents().forEach(function(event) {
|
|
187
|
+
if (event.action != "login_failed" || event.time < since) return;
|
|
188
|
+
counts[event.userId] = (counts[event.userId] || 0) + 1;
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
const userId = Object.keys(counts).sort(function(a, b) { return counts[b] - counts[a]; })[0];
|
|
192
|
+
const isShown = userId && counts[userId] >= FAILED_SIGN_IN_LIMIT;
|
|
193
|
+
|
|
194
|
+
alertBox.visible = (isShown) ? 1 : 0;
|
|
195
|
+
if (!isShown) return;
|
|
196
|
+
|
|
197
|
+
const user = ActivityPage.getUsers().find(function(u) { return String(u.id) == userId; });
|
|
198
|
+
alertBox.userId = userId;
|
|
199
|
+
lblAlert.text = "<b>" + counts[userId] + " failed sign-ins</b> for " + ActivityPage.escapeHtml((user) ? user.name : "a user") + " in the last hour. Check the IP addresses and lock the account if needed.";
|
|
200
|
+
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
const updateNewEventsButton = function() {
|
|
204
|
+
btnNewEvents.visible = (pendingCount > 0) ? 1 : 0;
|
|
205
|
+
btnNewEvents.setText("↑ " + pendingCount + " new event" + ((pendingCount > 1) ? "s" : "") + " · Show");
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
const setLive = function(isOn) {
|
|
209
|
+
clearInterval(liveTimer);
|
|
210
|
+
liveTimer = null;
|
|
211
|
+
lblLive.text = (isOn) ? "<span style='color:" + S.ACCENT_COLOR + "'>●</span> Live" : "Live updates";
|
|
212
|
+
if (!isOn) return;
|
|
213
|
+
liveTimer = setInterval(function() {
|
|
214
|
+
if (!box) return;
|
|
215
|
+
// TODO: Get new events from your service (polling, SSE or WebSocket).
|
|
216
|
+
getEvents().unshift(ActivityPage.createLiveEvent());
|
|
217
|
+
pendingCount++;
|
|
218
|
+
updateNewEventsButton();
|
|
219
|
+
renderSummary();
|
|
220
|
+
}, LIVE_INTERVAL);
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
const exportCSV = function() {
|
|
224
|
+
|
|
225
|
+
const rows = smartTable.visibleItemDataList; // WHY: Also uses the search of the table.
|
|
226
|
+
const quote = function(value) { return "\"" + String(value).replace(/"/g, "\"\"") + "\""; };
|
|
227
|
+
const lines = ["time,user,action,module,target,ip"].concat(rows.map(function(row) {
|
|
228
|
+
return [row.time, row.user, row.action, row.module, row.target, row.ip].map(quote).join(",");
|
|
229
|
+
}));
|
|
230
|
+
|
|
231
|
+
const link = document.createElement("a");
|
|
232
|
+
link.href = URL.createObjectURL(new Blob([lines.join("\n")], { type: "text/csv" }));
|
|
233
|
+
link.download = "activity-log-" + ActivityPage.formatDateTime(Date.now()).slice(0, 10) + ".csv";
|
|
234
|
+
link.click();
|
|
235
|
+
URL.revokeObjectURL(link.href);
|
|
236
|
+
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
const setUserFilter = function(userId) {
|
|
240
|
+
const index = userSelect.getIndexById(String(userId));
|
|
241
|
+
if (index >= 0) userSelect.setSelectedIndex(index); // onSelect renders the table
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
const openDetails = function(eventId) {
|
|
245
|
+
const event = getEvents().find(function(e) { return e.id == eventId; });
|
|
246
|
+
if (!event) return;
|
|
247
|
+
ActivityDetails({
|
|
248
|
+
event: event,
|
|
249
|
+
onShowUser: function(userId) {
|
|
250
|
+
closeDetails();
|
|
251
|
+
setUserFilter(userId);
|
|
252
|
+
},
|
|
253
|
+
});
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
const closeDetails = function() {
|
|
257
|
+
if (rightView.isShown(ActivityDetails.KEY)) {
|
|
258
|
+
rightView.hide();
|
|
259
|
+
rightView.clean();
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
// *** VIEW HELPERS:
|
|
264
|
+
|
|
265
|
+
const setFlex = function(obj, flex) {
|
|
266
|
+
obj.elem.style.flex = flex;
|
|
267
|
+
obj.elem.style.minWidth = "0";
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
const startCard = function(params = {}) {
|
|
271
|
+
return VGroup({
|
|
272
|
+
width: "100%",
|
|
273
|
+
height: "auto",
|
|
274
|
+
align: "left top",
|
|
275
|
+
gap: 12,
|
|
276
|
+
padding: 16,
|
|
277
|
+
color: S.CARD_COLOR,
|
|
278
|
+
border: 1,
|
|
279
|
+
borderColor: S.CARD_BORDER_COLOR,
|
|
280
|
+
round: 12,
|
|
281
|
+
...params,
|
|
282
|
+
});
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
const createTinySelect = function(list, onSelect) {
|
|
286
|
+
return TinySelect({
|
|
287
|
+
list: list,
|
|
288
|
+
height: 40,
|
|
289
|
+
fontSize: 14,
|
|
290
|
+
color: S.FIELD_COLOR,
|
|
291
|
+
border: 1,
|
|
292
|
+
borderColor: S.CARD_BORDER_COLOR,
|
|
293
|
+
round: 8,
|
|
294
|
+
labelBoldFont: 0,
|
|
295
|
+
labelTextColor: Ink(0.9),
|
|
296
|
+
arrowIcon: LIB_PATH + "comp/tiny-select/arrow.svg",
|
|
297
|
+
arrowSize: 18,
|
|
298
|
+
invertIconColor: T.invertIcon,
|
|
299
|
+
listFontSize: 14,
|
|
300
|
+
listTextColor: Ink(0.85),
|
|
301
|
+
listOverTextColor: S.ACCENT_COLOR,
|
|
302
|
+
listBackgroundColor: S.FIELD_COLOR,
|
|
303
|
+
listBorderColor: Ink(0.15),
|
|
304
|
+
onSelect: function(index, id) {
|
|
305
|
+
if (isRendering || !smartTable) return; // Called on create
|
|
306
|
+
onSelect(id);
|
|
307
|
+
},
|
|
308
|
+
});
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
// *** PUBLIC FUNCTIONS:
|
|
312
|
+
|
|
313
|
+
box.destroy = function() {
|
|
314
|
+
|
|
315
|
+
clearInterval(liveTimer);
|
|
316
|
+
clearTimeout(searchTimer);
|
|
317
|
+
closeDetails();
|
|
318
|
+
|
|
319
|
+
// WHY: SmartTable has window events and a menu on the page. box.remove() does not remove them.
|
|
320
|
+
if (smartTable) smartTable.remove();
|
|
321
|
+
|
|
322
|
+
box.remove();
|
|
323
|
+
box = null;
|
|
324
|
+
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
// *** PAGE VIEW:
|
|
328
|
+
|
|
329
|
+
const initHeader = function() {
|
|
330
|
+
|
|
331
|
+
HGroup({ width: "100%", height: "auto", align: "left center", gap: 16 });
|
|
332
|
+
that.elem.style.flexWrap = "wrap";
|
|
333
|
+
that.elem.style.justifyContent = "space-between";
|
|
334
|
+
|
|
335
|
+
VGroup({ width: "auto", height: "auto", align: "left top", gap: 0 });
|
|
336
|
+
|
|
337
|
+
Label({ text: "Activity Log", fontSize: 26, textColor: Ink(0.95) });
|
|
338
|
+
that.elem.style.fontFamily = "opensans-bold";
|
|
339
|
+
|
|
340
|
+
lblSubtitle = Label({ text: "Who did what, and when. Events are kept for 90 days.", fontSize: 14, textColor: Ink(0.5) });
|
|
341
|
+
|
|
342
|
+
endGroup();
|
|
343
|
+
|
|
344
|
+
HGroup({ width: "auto", height: "auto", align: "right center", gap: 12 });
|
|
345
|
+
|
|
346
|
+
lblLive = Label({ text: "", fontSize: 14, textColor: Ink(0.75) });
|
|
347
|
+
|
|
348
|
+
liveToggle = Toggle({
|
|
349
|
+
width: 52,
|
|
350
|
+
height: 30,
|
|
351
|
+
spacing: 3,
|
|
352
|
+
backgroundStyle: { color: T.surface3, selectedColor: S.PRIMARY_COLOR, border: 1, borderColor: S.CARD_BORDER_COLOR },
|
|
353
|
+
buttonStyle: { color: Ink(0.35), selectedColor: Ink(0.95) },
|
|
354
|
+
onChange: function(self) {
|
|
355
|
+
setLive(self.value === 1);
|
|
356
|
+
},
|
|
357
|
+
});
|
|
358
|
+
liveToggle.elem.setAttribute("aria-label", "Live updates");
|
|
359
|
+
|
|
360
|
+
ActivityPage.createButton("Export CSV", ASSETS + "arrow_down.png", exportCSV, { primary: 1 });
|
|
361
|
+
|
|
362
|
+
endGroup();
|
|
363
|
+
|
|
364
|
+
endGroup();
|
|
365
|
+
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
const initSecurityAlert = function() {
|
|
369
|
+
|
|
370
|
+
alertBox = HGroup({
|
|
371
|
+
width: "100%",
|
|
372
|
+
height: "auto",
|
|
373
|
+
align: "left center",
|
|
374
|
+
gap: 12,
|
|
375
|
+
padding: [16, 12],
|
|
376
|
+
color: "rgba(230, 103, 103, 0.10)",
|
|
377
|
+
border: 1,
|
|
378
|
+
borderColor: "rgba(230, 103, 103, 0.45)",
|
|
379
|
+
round: 12,
|
|
380
|
+
});
|
|
381
|
+
alertBox.elem.setAttribute("role", "alert");
|
|
382
|
+
|
|
383
|
+
Icon({ width: 22, height: 22 });
|
|
384
|
+
that.load(ASSETS + "warning.png");
|
|
385
|
+
that.elem.style.filter = "invert(62%) sepia(40%) saturate(900%) hue-rotate(310deg)"; // Red-ish icon
|
|
386
|
+
that.elem.style.flexShrink = "0";
|
|
387
|
+
|
|
388
|
+
lblAlert = Label({ text: "", fontSize: 14, textColor: Ink(0.9) });
|
|
389
|
+
setFlex(lblAlert, "1 1 auto");
|
|
390
|
+
|
|
391
|
+
ActivityPage.createButton("Show Events", "", function() {
|
|
392
|
+
setUserFilter(alertBox.userId);
|
|
393
|
+
const index = actionSelect.getIndexById("login_failed");
|
|
394
|
+
if (index >= 0) actionSelect.setSelectedIndex(index);
|
|
395
|
+
});
|
|
396
|
+
|
|
397
|
+
endGroup();
|
|
398
|
+
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
const initFilters = function() {
|
|
402
|
+
|
|
403
|
+
startCard();
|
|
404
|
+
|
|
405
|
+
HGroup({ width: "100%", height: "auto", align: "left center", gap: 10 });
|
|
406
|
+
that.elem.style.flexWrap = "wrap";
|
|
407
|
+
|
|
408
|
+
rangeTabs = Tabs({
|
|
409
|
+
variant: "pill",
|
|
410
|
+
styleName: T.compStyle,
|
|
411
|
+
tabs: Theme.indexTabs(RANGES.map(function(range) { return range.text; })), // (the key of a tab is its index: self.value)
|
|
412
|
+
onChange: function(self) {
|
|
413
|
+
filter.rangeIndex = self.value;
|
|
414
|
+
renderTable();
|
|
415
|
+
},
|
|
416
|
+
style: Theme.tabsStyle({ height: 40, barColor: S.FIELD_COLOR, borderColor: S.CARD_BORDER_COLOR, padding: [12, 6], activeColor: S.PRIMARY_COLOR }),
|
|
417
|
+
});
|
|
418
|
+
|
|
419
|
+
searchInput = SearchInput({
|
|
420
|
+
width: 240,
|
|
421
|
+
height: 40,
|
|
422
|
+
border: 1,
|
|
423
|
+
borderColor: S.CARD_BORDER_COLOR,
|
|
424
|
+
borderBottomStyle: "1px solid " + S.CARD_BORDER_COLOR,
|
|
425
|
+
round: 8,
|
|
426
|
+
color: S.FIELD_COLOR,
|
|
427
|
+
textColor: Ink(0.9),
|
|
428
|
+
fontSize: 14,
|
|
429
|
+
searchIconSize: 16,
|
|
430
|
+
placeholderText: "Search user, target, IP",
|
|
431
|
+
invertIconColor: T.invertIcon,
|
|
432
|
+
searchIconFile: LIB_PATH + "comp/search-input-v2/search.svg",
|
|
433
|
+
clearIconFile: LIB_PATH + "comp/search-input-v2/clear.svg",
|
|
434
|
+
onSearch: function(text) {
|
|
435
|
+
filter.search = text;
|
|
436
|
+
searchTimer = waitAndRun(searchTimer, renderTable, 200); // WHY: Filtering thousands of rows on every key is slow.
|
|
437
|
+
},
|
|
438
|
+
});
|
|
439
|
+
that.position = "relative";
|
|
440
|
+
|
|
441
|
+
userSelect = createTinySelect(
|
|
442
|
+
[{ id: "", label: "All users" }].concat(ActivityPage.getUsers().map(function(user) {
|
|
443
|
+
return { id: String(user.id), label: ActivityPage.escapeHtml(user.name) };
|
|
444
|
+
})),
|
|
445
|
+
function(id) { filter.userId = id; renderTable(); }
|
|
446
|
+
);
|
|
447
|
+
|
|
448
|
+
actionSelect = createTinySelect(
|
|
449
|
+
[{ id: "", label: "All actions" }].concat(Object.keys(ActivityPage.ACTIONS).map(function(id) {
|
|
450
|
+
return { id: id, label: ActivityPage.ACTIONS[id].label };
|
|
451
|
+
})),
|
|
452
|
+
function(id) { filter.action = id; renderTable(); }
|
|
453
|
+
);
|
|
454
|
+
|
|
455
|
+
moduleSelect = createTinySelect(
|
|
456
|
+
[{ id: "", label: "All modules" }].concat(ActivityPage.MODULES.map(function(name) {
|
|
457
|
+
return { id: name, label: name };
|
|
458
|
+
})),
|
|
459
|
+
function(id) { filter.module = id; renderTable(); }
|
|
460
|
+
);
|
|
461
|
+
|
|
462
|
+
endGroup();
|
|
463
|
+
|
|
464
|
+
endGroup();
|
|
465
|
+
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
const initSummary = function() {
|
|
469
|
+
|
|
470
|
+
const KPI_LIST = [
|
|
471
|
+
{ title: "Events · 24 hours", lineColor: S.ACCENT_COLOR },
|
|
472
|
+
{ title: "Failed sign-ins · 24 hours", lineColor: Theme.readable("#E0A03C") },
|
|
473
|
+
{ title: "Active users · 7 days", lineColor: T.info },
|
|
474
|
+
{ title: "Deletions · 7 days", lineColor: S.ERROR_COLOR },
|
|
475
|
+
];
|
|
476
|
+
|
|
477
|
+
HGroup({ width: "100%", height: "auto", align: "left top", gap: 16 });
|
|
478
|
+
that.elem.style.flexWrap = "wrap";
|
|
479
|
+
|
|
480
|
+
KPI_LIST.forEach(function(kpi) {
|
|
481
|
+
|
|
482
|
+
const kpiBox = SparkLineBox({
|
|
483
|
+
height: 96,
|
|
484
|
+
title: kpi.title,
|
|
485
|
+
valueText: "",
|
|
486
|
+
iconFile: "",
|
|
487
|
+
lineColor: kpi.lineColor,
|
|
488
|
+
style: {
|
|
489
|
+
box: { color: S.CARD_COLOR, border: 1, borderColor: S.CARD_BORDER_COLOR, round: 12 },
|
|
490
|
+
text: { padding: 14 },
|
|
491
|
+
title: { fontSize: 13, textColor: Ink(0.5) },
|
|
492
|
+
valueText: { fontSize: 24, textColor: Ink(0.95) },
|
|
493
|
+
trend: { flatColor: Ink(0.45) }, // WHY: The default flat color is made for light cards.
|
|
494
|
+
graph: { height: 30, padding: 14 },
|
|
495
|
+
},
|
|
496
|
+
});
|
|
497
|
+
setFlex(kpiBox, "1 1 220px");
|
|
498
|
+
kpiBoxList.push(kpiBox);
|
|
499
|
+
|
|
500
|
+
});
|
|
501
|
+
|
|
502
|
+
endGroup();
|
|
503
|
+
|
|
504
|
+
// WHY: Bar count was calculated with the default width (before flex).
|
|
505
|
+
kpiBoxList.forEach(function(kpiBox) { kpiBox.refresh(); });
|
|
506
|
+
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
const initTable = function() {
|
|
510
|
+
|
|
511
|
+
startCard({ gap: 10 });
|
|
512
|
+
|
|
513
|
+
HGroup({ width: "100%", height: "auto", align: "left center", gap: 10 });
|
|
514
|
+
that.elem.style.justifyContent = "space-between";
|
|
515
|
+
|
|
516
|
+
lblResultCount = Label({ text: "", fontSize: 14, textColor: Ink(0.6) });
|
|
517
|
+
|
|
518
|
+
// WHY: SmartButton does not create its label when the text is empty. setText() needs the label.
|
|
519
|
+
btnNewEvents = ActivityPage.createButton("New events", "", renderTable, { primary: 1 });
|
|
520
|
+
|
|
521
|
+
endGroup();
|
|
522
|
+
|
|
523
|
+
HGroup({ width: "100%", height: 620, align: "left top" });
|
|
524
|
+
|
|
525
|
+
smartTable = SmartTable({
|
|
526
|
+
titleDataList: [
|
|
527
|
+
{ name: "TIME", dataTitle: "time", dataType: "string", width: 180, shortable: 1 },
|
|
528
|
+
{ name: "USER", dataTitle: "user", dataType: "string", width: 170, shortable: 1 },
|
|
529
|
+
{ name: "ACTION", dataTitle: "action", dataType: "string", width: 180, shortable: 1 },
|
|
530
|
+
{ name: "MODULE", dataTitle: "module", dataType: "string", width: 130, shortable: 1 },
|
|
531
|
+
{ name: "TARGET", dataTitle: "target", dataType: "string", width: 300, shortable: 1 },
|
|
532
|
+
{ name: "IP ADDRESS", dataTitle: "ip", dataType: "string", width: 140, shortable: 1 },
|
|
533
|
+
],
|
|
534
|
+
itemDataList: [],
|
|
535
|
+
titleHeight: 44,
|
|
536
|
+
itemHeight: 40,
|
|
537
|
+
infoHeight: 56,
|
|
538
|
+
itemLineCount: 13,
|
|
539
|
+
sortByTitleIndex: 0,
|
|
540
|
+
sortDirection: "Z-A", // Newest first
|
|
541
|
+
onSelect: function(itemData) {
|
|
542
|
+
openDetails(itemData.id);
|
|
543
|
+
},
|
|
544
|
+
// Colored action texts
|
|
545
|
+
updateCustomItemCell: function(cell, titleDataIndex, data) {
|
|
546
|
+
if (titleDataIndex != 2) return;
|
|
547
|
+
const action = ActivityPage.getActionByLabel(data);
|
|
548
|
+
cell.label.textColor = (action) ? action.color : Ink(0.75);
|
|
549
|
+
},
|
|
550
|
+
...ActivityPage.getSmartTableStyle(LIB_PATH),
|
|
551
|
+
});
|
|
552
|
+
|
|
553
|
+
endGroup();
|
|
554
|
+
|
|
555
|
+
endGroup();
|
|
556
|
+
|
|
557
|
+
};
|
|
558
|
+
|
|
559
|
+
// *** PAGE INIT CODE:
|
|
560
|
+
|
|
561
|
+
// BOX: Scrollable container
|
|
562
|
+
// WHY: page does not scroll. Scrollable content must be inside a Box with scrollY: 1.
|
|
563
|
+
startBox(0, 0, "100%", "100%", {
|
|
564
|
+
color: "transparent",
|
|
565
|
+
scrollY: 1,
|
|
566
|
+
});
|
|
567
|
+
|
|
568
|
+
VGroup({
|
|
569
|
+
width: "100%",
|
|
570
|
+
height: "auto", // Grows with content, so the Box can scroll.
|
|
571
|
+
align: "left top",
|
|
572
|
+
gap: 16,
|
|
573
|
+
padding: 24,
|
|
574
|
+
});
|
|
575
|
+
|
|
576
|
+
initHeader();
|
|
577
|
+
initSecurityAlert();
|
|
578
|
+
initSummary();
|
|
579
|
+
initFilters();
|
|
580
|
+
initTable();
|
|
581
|
+
|
|
582
|
+
endGroup();
|
|
583
|
+
|
|
584
|
+
endBox();
|
|
585
|
+
|
|
586
|
+
rangeTabs.setValue(filter.rangeIndex, 1);
|
|
587
|
+
setLive(0);
|
|
588
|
+
renderSummary();
|
|
589
|
+
renderTable();
|
|
590
|
+
|
|
591
|
+
return box.endPage();
|
|
592
|
+
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
ActivityPage.KEY = "Activity";
|
|
596
|
+
|
|
597
|
+
// *** DETAILS PANEL (RIGHT VIEW):
|
|
598
|
+
|
|
599
|
+
const ActivityDetailsDefaults = {
|
|
600
|
+
event: null,
|
|
601
|
+
onShowUser: function(userId) {},
|
|
602
|
+
};
|
|
603
|
+
|
|
604
|
+
const ActivityDetails = function(params = {}) {
|
|
605
|
+
|
|
606
|
+
// Merge params:
|
|
607
|
+
mergeIntoIfMissing(params, ActivityDetailsDefaults);
|
|
608
|
+
|
|
609
|
+
params.left = 0;
|
|
610
|
+
params.top = 0;
|
|
611
|
+
params.width = "100%";
|
|
612
|
+
params.height = "100%";
|
|
613
|
+
params.color = T.surfaceDeep;
|
|
614
|
+
|
|
615
|
+
// WHY: event is a live object of the list. startObject() would copy it.
|
|
616
|
+
const event = params.event;
|
|
617
|
+
|
|
618
|
+
// BOX: Component container
|
|
619
|
+
let box = startObject(params);
|
|
620
|
+
|
|
621
|
+
const S = ActivityPage.STYLE;
|
|
622
|
+
const action = ActivityPage.ACTIONS[event.action];
|
|
623
|
+
const escape = ActivityPage.escapeHtml;
|
|
624
|
+
|
|
625
|
+
box.destroy = function() {
|
|
626
|
+
box.remove();
|
|
627
|
+
box = null;
|
|
628
|
+
};
|
|
629
|
+
|
|
630
|
+
// Left line
|
|
631
|
+
Box(0, 0, 1, "100%", { color: Ink(0.12) });
|
|
632
|
+
|
|
633
|
+
// GROUP: Scrollable content
|
|
634
|
+
startBox(0, 0, "100%", "calc(100% - 76px)", { color: "transparent", scrollY: 1 });
|
|
635
|
+
|
|
636
|
+
VGroup({ width: "100%", height: "auto", align: "left top", gap: 16, padding: 20 });
|
|
637
|
+
|
|
638
|
+
// Title
|
|
639
|
+
HGroup({ width: "100%", height: "auto", align: "left center", gap: 8 });
|
|
640
|
+
that.elem.style.justifyContent = "space-between";
|
|
641
|
+
|
|
642
|
+
Label({ text: "Event Details", fontSize: 18, textColor: Ink(0.95) });
|
|
643
|
+
that.elem.style.fontFamily = "opensans-bold";
|
|
644
|
+
|
|
645
|
+
Icon({ width: 28, height: 28, clickable: 1 });
|
|
646
|
+
that.load("assets/close.png");
|
|
647
|
+
that.elem.style.filter = T.iconFilter;
|
|
648
|
+
that.elem.style.cursor = "pointer";
|
|
649
|
+
that.opacity = 0.6;
|
|
650
|
+
that.on("click", function() {
|
|
651
|
+
rightView.hide();
|
|
652
|
+
rightView.clean();
|
|
653
|
+
});
|
|
654
|
+
|
|
655
|
+
endGroup();
|
|
656
|
+
|
|
657
|
+
// Summary sentence
|
|
658
|
+
VGroup({ width: "100%", height: "auto", align: "left top", gap: 8, padding: [16, 14], color: S.CARD_COLOR, border: 1, borderColor: S.CARD_BORDER_COLOR, round: 10 });
|
|
659
|
+
|
|
660
|
+
Label({
|
|
661
|
+
text: action.label.toUpperCase(),
|
|
662
|
+
fontSize: 11,
|
|
663
|
+
textColor: action.color,
|
|
664
|
+
color: ActivityPage.alpha(action.color, 0.14),
|
|
665
|
+
round: 6,
|
|
666
|
+
padding: [8, 3],
|
|
667
|
+
});
|
|
668
|
+
that.elem.style.letterSpacing = "1px";
|
|
669
|
+
|
|
670
|
+
Label({
|
|
671
|
+
text: "<b>" + escape(event.userName) + "</b> " + action.label.toLowerCase() + " <b>" + escape(event.target) + "</b>",
|
|
672
|
+
fontSize: 16,
|
|
673
|
+
textColor: Ink(0.9),
|
|
674
|
+
width: "100%",
|
|
675
|
+
});
|
|
676
|
+
|
|
677
|
+
Label({
|
|
678
|
+
text: ActivityPage.formatRelative(event.time) + " · " + new Date(event.time).toLocaleString("en-GB", { dateStyle: "full", timeStyle: "medium" }),
|
|
679
|
+
fontSize: 13,
|
|
680
|
+
textColor: Ink(0.5),
|
|
681
|
+
width: "100%",
|
|
682
|
+
});
|
|
683
|
+
|
|
684
|
+
endGroup();
|
|
685
|
+
|
|
686
|
+
// Information
|
|
687
|
+
const INFO = [
|
|
688
|
+
["Module", event.module],
|
|
689
|
+
["User", event.userName + " (" + event.userEmail + ")"],
|
|
690
|
+
["IP address", event.ip],
|
|
691
|
+
["Location", event.location],
|
|
692
|
+
["Device", event.device],
|
|
693
|
+
["Request ID", event.requestId],
|
|
694
|
+
];
|
|
695
|
+
|
|
696
|
+
VGroup({ width: "100%", height: "auto", align: "left top", gap: 0 });
|
|
697
|
+
|
|
698
|
+
INFO.forEach(function(info, index) {
|
|
699
|
+
HGroup({ width: "100%", height: "auto", align: "left center", gap: 16, padding: [0, 9] });
|
|
700
|
+
that.elem.style.justifyContent = "space-between";
|
|
701
|
+
if (index > 0) that.elem.style.borderTop = "1px solid " + Ink(0.06);
|
|
702
|
+
Label({ text: info[0], fontSize: 13, textColor: Ink(0.5) });
|
|
703
|
+
that.elem.style.flexShrink = "0";
|
|
704
|
+
Label({ text: escape(info[1]), fontSize: 13, textColor: Ink(0.9), textAlign: "right" });
|
|
705
|
+
endGroup();
|
|
706
|
+
});
|
|
707
|
+
|
|
708
|
+
endGroup();
|
|
709
|
+
|
|
710
|
+
// Changes
|
|
711
|
+
if (event.changes && event.changes.length) {
|
|
712
|
+
|
|
713
|
+
Label({ text: "CHANGES", fontSize: 11, textColor: Ink(0.45) });
|
|
714
|
+
that.elem.style.letterSpacing = "1px";
|
|
715
|
+
|
|
716
|
+
const table = TinyTable({
|
|
717
|
+
columns: Theme.tableColumns(["FIELD", "BEFORE", "AFTER"], ["28%", "35%", "36%"]),
|
|
718
|
+
rows: event.changes.map(function(change) {
|
|
719
|
+
return [escape(change.field), escape(change.before), escape(change.after)];
|
|
720
|
+
}),
|
|
721
|
+
allowHtml: 1, // (the texts are made by the panel, user texts are escaped)
|
|
722
|
+
style: Theme.tableStyle({ headerColor: S.FIELD_COLOR, bodyColor: S.CARD_COLOR, borderColor: S.CARD_BORDER_COLOR }),
|
|
723
|
+
onCellCreate: function(cell) {
|
|
724
|
+
if (cell.columnIndex == 1) {
|
|
725
|
+
cell.label.textColor = Theme.readable("#E6A0A0"); // (the light theme: it was pale on white)
|
|
726
|
+
cell.label.elem.style.textDecoration = "line-through";
|
|
727
|
+
}
|
|
728
|
+
if (cell.columnIndex == 2) cell.label.textColor = Theme.readable("#9FD3C4");
|
|
729
|
+
},
|
|
730
|
+
});
|
|
731
|
+
Theme.fillTableWidth(table);
|
|
732
|
+
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
endGroup();
|
|
736
|
+
|
|
737
|
+
endBox();
|
|
738
|
+
|
|
739
|
+
// GROUP: Buttons (bottom)
|
|
740
|
+
HGroup({ left: 0, bottom: 0, width: "100%", height: 76, align: "right center", gap: 8, padding: [20, 0] });
|
|
741
|
+
that.elem.style.borderTop = "1px solid " + Ink(0.08);
|
|
742
|
+
|
|
743
|
+
const btnCopy = ActivityPage.createButton("Copy JSON", "", function() {
|
|
744
|
+
navigator.clipboard.writeText(JSON.stringify(event, null, 2)).then(function() {
|
|
745
|
+
btnCopy.setText("Copied ✓");
|
|
746
|
+
setTimeout(function() { if (box) btnCopy.setText("Copy JSON"); }, 1500);
|
|
747
|
+
});
|
|
748
|
+
});
|
|
749
|
+
|
|
750
|
+
ActivityPage.createButton("All Events of This User", "", function() {
|
|
751
|
+
box.onShowUser(event.userId);
|
|
752
|
+
}, { primary: 1 });
|
|
753
|
+
|
|
754
|
+
endGroup();
|
|
755
|
+
|
|
756
|
+
// *** INIT CODE:
|
|
757
|
+
|
|
758
|
+
rightView.clean();
|
|
759
|
+
rightView.setKey(ActivityDetails.KEY);
|
|
760
|
+
rightView.setWidth(460);
|
|
761
|
+
rightView.add(box);
|
|
762
|
+
rightView.show();
|
|
763
|
+
rightView.destroyPage = box.destroy;
|
|
764
|
+
|
|
765
|
+
return endObject(box);
|
|
766
|
+
|
|
767
|
+
};
|
|
768
|
+
|
|
769
|
+
ActivityDetails.KEY = "ActivityDetails";
|
|
770
|
+
|
|
771
|
+
// *** STATIC: STYLE AND HELPERS
|
|
772
|
+
|
|
773
|
+
ActivityPage.STYLE = {
|
|
774
|
+
CARD_COLOR: T.surface,
|
|
775
|
+
CARD_BORDER_COLOR: Ink(0.1),
|
|
776
|
+
FIELD_COLOR: T.surface2,
|
|
777
|
+
PRIMARY_COLOR: T.primary,
|
|
778
|
+
ACCENT_COLOR: T.accent,
|
|
779
|
+
ERROR_COLOR: T.danger,
|
|
780
|
+
};
|
|
781
|
+
|
|
782
|
+
// security: 1 -> Important for security
|
|
783
|
+
ActivityPage.ACTIONS = {
|
|
784
|
+
create: { label: "Created", color: T.accent },
|
|
785
|
+
update: { label: "Updated", color: T.info },
|
|
786
|
+
delete: { label: "Deleted", color: T.danger },
|
|
787
|
+
login: { label: "Signed in", color: Theme.readable("#A9A79F") },
|
|
788
|
+
login_failed: { label: "Failed sign-in", color: Theme.readable("#E0A03C"), security: 1 },
|
|
789
|
+
permission: { label: "Changed permissions", color: "#9085E9", security: 1 },
|
|
790
|
+
export: { label: "Exported", color: T.warning },
|
|
791
|
+
};
|
|
792
|
+
|
|
793
|
+
ActivityPage.MODULES = ["Auth", "Users", "Contents", "Media Library", "Roles", "Settings", "Reports"];
|
|
794
|
+
|
|
795
|
+
ActivityPage.getActionByLabel = function(label) {
|
|
796
|
+
const id = Object.keys(ActivityPage.ACTIONS).find(function(key) { return ActivityPage.ACTIONS[key].label == label; });
|
|
797
|
+
return (id) ? ActivityPage.ACTIONS[id] : null;
|
|
798
|
+
};
|
|
799
|
+
|
|
800
|
+
ActivityPage.escapeHtml = function(text) {
|
|
801
|
+
return String(text).replace(/[&<>"']/g, function(c) { return { "&": "&", "<": "<", ">": ">", "\"": """, "'": "'" }[c]; });
|
|
802
|
+
};
|
|
803
|
+
|
|
804
|
+
// T.accent, 0.2 -> "rgba(101, 162, 147, 0.2)"
|
|
805
|
+
ActivityPage.alpha = function(hex, alpha) {
|
|
806
|
+
const n = parseInt(hex.slice(1), 16);
|
|
807
|
+
return "rgba(" + (n >> 16) + ", " + ((n >> 8) & 255) + ", " + (n & 255) + ", " + alpha + ")";
|
|
808
|
+
};
|
|
809
|
+
|
|
810
|
+
// Local time: "2026-09-16 14:05:09" (sortable text)
|
|
811
|
+
ActivityPage.formatDateTime = function(time) {
|
|
812
|
+
const d = new Date(time);
|
|
813
|
+
const pad = function(n) { return String(n).padStart(2, "0"); };
|
|
814
|
+
return d.getFullYear() + "-" + pad(d.getMonth() + 1) + "-" + pad(d.getDate()) + " " + pad(d.getHours()) + ":" + pad(d.getMinutes()) + ":" + pad(d.getSeconds());
|
|
815
|
+
};
|
|
816
|
+
|
|
817
|
+
// "5 minutes ago"
|
|
818
|
+
ActivityPage.formatRelative = function(time) {
|
|
819
|
+
const seconds = Math.round((Date.now() - time) / 1000);
|
|
820
|
+
const units = [["year", 31536000], ["month", 2592000], ["day", 86400], ["hour", 3600], ["minute", 60]];
|
|
821
|
+
for (const unit of units) {
|
|
822
|
+
const value = Math.floor(seconds / unit[1]);
|
|
823
|
+
if (value >= 1) return value + " " + unit[0] + ((value > 1) ? "s" : "") + " ago";
|
|
824
|
+
}
|
|
825
|
+
return "Just now";
|
|
826
|
+
};
|
|
827
|
+
|
|
828
|
+
// params: { primary: 1, width }
|
|
829
|
+
ActivityPage.createButton = function(text, iconFile, onClick, params = {}) {
|
|
830
|
+
const S = ActivityPage.STYLE;
|
|
831
|
+
const btn = SmartButton({
|
|
832
|
+
styleName: "classic",
|
|
833
|
+
width: params.width || "auto",
|
|
834
|
+
labelText: text,
|
|
835
|
+
iconFile: iconFile || "",
|
|
836
|
+
onClick: onClick,
|
|
837
|
+
style: {
|
|
838
|
+
layout: { gap: 8, padding: [14, 8] },
|
|
839
|
+
icon: { width: 18, height: 18 },
|
|
840
|
+
label: { fontSize: 14, textColor: Ink(0.92) },
|
|
841
|
+
box: { color: (params.primary) ? S.PRIMARY_COLOR : S.FIELD_COLOR, border: 1, borderColor: S.CARD_BORDER_COLOR, round: 8 },
|
|
842
|
+
hover: { color: (params.primary) ? T.primaryHover : T.surface3 },
|
|
843
|
+
active: { color: (params.primary) ? T.primaryActive : T.surface4 },
|
|
844
|
+
},
|
|
845
|
+
});
|
|
846
|
+
if (btn.icon) btn.icon.elem.style.filter = T.iconFilter; // WHY: Panel icons are black.
|
|
847
|
+
return btn;
|
|
848
|
+
};
|
|
849
|
+
|
|
850
|
+
ActivityPage.getSmartTableStyle = function(libPath) {
|
|
851
|
+
const S = ActivityPage.STYLE;
|
|
852
|
+
return {
|
|
853
|
+
scrollBarParams: {
|
|
854
|
+
bar_border: 0, bar_round: 3, bar_borderColor: Ink(0.15), bar_width: 4, bar_mouseOverWidth: 4,
|
|
855
|
+
bar_mouseOverColor: T.scrollBar, bar_opacity: 0.4, bar_mouseOverOpacity: 0.9, bar_padding: 2, bar_color: T.scrollBar,
|
|
856
|
+
neverHide: 0, showDots: 0,
|
|
857
|
+
},
|
|
858
|
+
// WHY: Filtre kutusu ile alt bar aynı renkti, kutu görünmüyordu. Bar kart rengine, kutu ise alan rengine (FIELD_COLOR) alındı.
|
|
859
|
+
searchInputParams: {
|
|
860
|
+
width: "50%", height: 34, border: 1, round: 8, color: S.FIELD_COLOR, borderColor: S.CARD_BORDER_COLOR,
|
|
861
|
+
borderBottomStyle: "1px solid " + S.CARD_BORDER_COLOR,
|
|
862
|
+
textColor: Ink(0.9), placeholderColor: Ink(0.4), fontSize: 14,
|
|
863
|
+
placeholderText: "Filter the table",
|
|
864
|
+
searchIconSize: 15, searchIconOpacity: 0.55, invertIconColor: T.invertIcon,
|
|
865
|
+
searchIconFile: libPath + "comp/search-input-v2/filter.png",
|
|
866
|
+
clearIconFile: libPath + "comp/search-input-v2/clear.svg",
|
|
867
|
+
},
|
|
868
|
+
// Filtre kutusundaki sütun seçim listesi (ALL) de koyu tema ile açılsın.
|
|
869
|
+
searchTitleMenuParams: {
|
|
870
|
+
minWidth: 170,
|
|
871
|
+
style: {
|
|
872
|
+
menu: { color: S.FIELD_COLOR, border: 1, borderColor: Ink(0.12), round: 8, padding: 4, shadow: "0 8px 24px " + Black(0.5) },
|
|
873
|
+
item: { height: 30, fontSize: 13, textColor: Ink(0.75), color: "transparent", round: 6, padding: 10, gap: 10 },
|
|
874
|
+
itemHover: { textColor: "white", color: Ink(0.08) },
|
|
875
|
+
disabled: { textColor: Ink(0.3), opacity: 0.4 },
|
|
876
|
+
icon: { width: 14, height: 14 },
|
|
877
|
+
separator: { color: Ink(0.1), space: 4 },
|
|
878
|
+
},
|
|
879
|
+
},
|
|
880
|
+
style: {
|
|
881
|
+
width: "100%",
|
|
882
|
+
height: "100%",
|
|
883
|
+
round: 8,
|
|
884
|
+
line1Color: S.CARD_COLOR,
|
|
885
|
+
line2Color: T.tableRow2,
|
|
886
|
+
highlightItemCellColor: T.tableHighlight,
|
|
887
|
+
highlightTitleCellColor: Ink(0.08),
|
|
888
|
+
verticalScrollWidth: 20,
|
|
889
|
+
verticalScrollMargin: 2,
|
|
890
|
+
btnScrollDownIconFile: libPath + "comp/smart-table/down.png",
|
|
891
|
+
btnScrollUpIconFile: libPath + "comp/smart-table/up.png",
|
|
892
|
+
btnScrollCenterIconFile: libPath + "comp/smart-table/scroll.png",
|
|
893
|
+
sortIconFile: libPath + "comp/smart-table/sort.png",
|
|
894
|
+
// WHY: Varsayılan tik ikonu koyu renkli; koyu menüde görünmüyordu.
|
|
895
|
+
searchTitleCheckIconFile: "data:image/svg+xml," + encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="' + S.ACCENT_COLOR + '" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.5 10 17.5 19 7"/></svg>'),
|
|
896
|
+
loadingIconFile: libPath + "comp/smart-table/clock.png",
|
|
897
|
+
invertIconColor: T.invertIcon,
|
|
898
|
+
box: { color: S.CARD_COLOR },
|
|
899
|
+
boxBorder: { border: 1, borderColor: S.CARD_BORDER_COLOR },
|
|
900
|
+
boxTitleLine: { color: S.FIELD_COLOR },
|
|
901
|
+
boxTitleCell: { padding: [10, 0], borderRight: "1px solid " + Ink(0.06), borderBottom: "1px solid " + Ink(0.12) },
|
|
902
|
+
lblTitleCell: { fontSize: 13, fontFamily: "opensans", textColor: Ink(0.6) },
|
|
903
|
+
boxItemCell: { borderBottom: "1px solid " + Ink(0.05), borderRight: "1px solid " + Ink(0.03), padding: [10, 0] },
|
|
904
|
+
lblItemCell: { fontSize: 14, textColor: Ink(0.75), fontFamily: "opensans" },
|
|
905
|
+
boxInfoLine: { color: S.CARD_COLOR, borderTop: "1px solid " + Ink(0.08) },
|
|
906
|
+
lblBoxInfoLine: { fontSize: 13, textColor: Ink(0.55) },
|
|
907
|
+
lblNoDataFound: { color: T.surface3, textColor: Ink(0.6), padding: [8, 2], fontSize: 13, round: 8, border: 1, borderColor: Ink(0.15) },
|
|
908
|
+
// Filtre kutusunun içindeki sütun etiketi: Kutunun içinde durduğu için daha hafif bir chip.
|
|
909
|
+
lblSearchTitle: { color: Ink(0.08), textColor: Ink(0.6), padding: [8, 1], fontSize: 12, round: 6, border: 1, borderColor: Ink(0.14) },
|
|
910
|
+
btnScrollCenter: { color: T.surface3, round: 100, borderColor: Ink(0.2), border: 1 },
|
|
911
|
+
btnScrollUp: { color: T.surface4, round: 100, border: 1, borderColor: Ink(0.3) },
|
|
912
|
+
btnScrollDown: { color: T.surface4, round: 100, border: 1, borderColor: Ink(0.3) },
|
|
913
|
+
boxSort: { color: S.PRIMARY_COLOR },
|
|
914
|
+
},
|
|
915
|
+
};
|
|
916
|
+
};
|
|
917
|
+
|
|
918
|
+
// *** STATIC: TEST DATA
|
|
919
|
+
|
|
920
|
+
// Panel users (from the Roles page, if it is loaded)
|
|
921
|
+
ActivityPage.getUsers = function() {
|
|
922
|
+
if (typeof RolesPage !== "undefined") return RolesPage.load().users;
|
|
923
|
+
return [
|
|
924
|
+
{ id: 1, name: "Bugra Ozden", email: "demo@example.com" },
|
|
925
|
+
{ id: 2, name: "Alper Kaya", email: "a.kaya@company.net" },
|
|
926
|
+
{ id: 3, name: "Deniz Arslan", email: "deniz_arslan@studio.com" },
|
|
927
|
+
];
|
|
928
|
+
};
|
|
929
|
+
|
|
930
|
+
ActivityPage._events = null;
|
|
931
|
+
ActivityPage._nextId = 1;
|
|
932
|
+
ActivityPage._random = null;
|
|
933
|
+
|
|
934
|
+
// Random numbers with a seed: the same test data every time. (mulberry32)
|
|
935
|
+
ActivityPage.random = function() {
|
|
936
|
+
if (!ActivityPage._random) {
|
|
937
|
+
let seed = 20260916;
|
|
938
|
+
ActivityPage._random = function() {
|
|
939
|
+
seed = (seed + 0x6D2B79F5) | 0;
|
|
940
|
+
let t = seed;
|
|
941
|
+
t = Math.imul(t ^ (t >>> 15), t | 1);
|
|
942
|
+
t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
|
|
943
|
+
return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
|
|
944
|
+
};
|
|
945
|
+
}
|
|
946
|
+
return ActivityPage._random();
|
|
947
|
+
};
|
|
948
|
+
|
|
949
|
+
ActivityPage.pick = function(list) {
|
|
950
|
+
return list[Math.floor(ActivityPage.random() * list.length)];
|
|
951
|
+
};
|
|
952
|
+
|
|
953
|
+
// One test event. { id, time, userId, userName, userEmail, action, module, target, ip, location, device, requestId, changes }
|
|
954
|
+
ActivityPage.createEvent = function(time, user) {
|
|
955
|
+
|
|
956
|
+
const pick = ActivityPage.pick;
|
|
957
|
+
const rnd = ActivityPage.random;
|
|
958
|
+
|
|
959
|
+
// Weighted action
|
|
960
|
+
const r = rnd();
|
|
961
|
+
const action = (r < 0.22) ? "login" : (r < 0.46) ? "update" : (r < 0.64) ? "create" : (r < 0.74) ? "delete" : (r < 0.86) ? "export" : (r < 0.93) ? "login_failed" : "permission";
|
|
962
|
+
|
|
963
|
+
const CONTENT_TITLES = ["About us", "Summer sale", "Shipping policy", "How to choose headphones", "Careers", "Contact"];
|
|
964
|
+
const MEDIA_FILES = ["summer-sale-hero.jpg", "product-catalog.pdf", "team-photo-2026.jpg", "promo-video.mp4", "price-list-2026.pdf"];
|
|
965
|
+
const ROLE_NAMES = ["Editor", "Support", "Marketing", "Viewer"];
|
|
966
|
+
const CUSTOMERS = ["Selin Koc", "Emre Gunes", "Yasemin Dogan", "Tarik Yilmaz", "Hakan Bulut"];
|
|
967
|
+
|
|
968
|
+
let module, target, changes = [];
|
|
969
|
+
|
|
970
|
+
switch (action) {
|
|
971
|
+
|
|
972
|
+
case "login":
|
|
973
|
+
case "login_failed":
|
|
974
|
+
module = "Auth";
|
|
975
|
+
target = (action == "login") ? "Panel" : "Password sign-in";
|
|
976
|
+
break;
|
|
977
|
+
|
|
978
|
+
case "permission": {
|
|
979
|
+
module = "Roles";
|
|
980
|
+
target = "Role \"" + pick(ROLE_NAMES) + "\"";
|
|
981
|
+
changes = [{ field: pick(["users.edit", "contents.delete", "media.create", "settings.view"]), before: "Off", after: "On" }];
|
|
982
|
+
break;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
case "export":
|
|
986
|
+
module = pick(["Reports", "Users"]);
|
|
987
|
+
target = (module == "Reports") ? "Sales report (" + pick(["7 days", "30 days", "This year"]) + ")" : "Users list (CSV)";
|
|
988
|
+
break;
|
|
989
|
+
|
|
990
|
+
default:
|
|
991
|
+
module = pick(["Users", "Contents", "Contents", "Media Library", "Settings"]);
|
|
992
|
+
if (module == "Settings" && action != "update") module = "Contents"; // Settings are only updated
|
|
993
|
+
if (module == "Users") target = "Customer \"" + pick(CUSTOMERS) + "\"";
|
|
994
|
+
if (module == "Contents") target = "Page \"" + pick(CONTENT_TITLES) + "\"";
|
|
995
|
+
if (module == "Media Library") target = pick(MEDIA_FILES);
|
|
996
|
+
if (module == "Settings") target = pick(["Panel name", "Panel color", "Session timeout"]);
|
|
997
|
+
if (action == "update") {
|
|
998
|
+
const UPDATES = {
|
|
999
|
+
"Users": [{ field: "email", before: "old@mail.com", after: "new@mail.com" }, { field: "status", before: "Active", after: "Blocked" }],
|
|
1000
|
+
"Contents": [{ field: "title", before: "Summer Sale", after: "Summer Sale 2026" }, { field: "status", before: "Draft", after: "Published" }],
|
|
1001
|
+
"Media Library": [{ field: "folder", before: "Products", after: "Banners" }, { field: "alt text", before: "", after: "Summer sale banner" }],
|
|
1002
|
+
"Settings": [{ field: "value", before: "30 min", after: "60 min" }],
|
|
1003
|
+
};
|
|
1004
|
+
changes = UPDATES[module].slice(0, 1 + Math.floor(rnd() * UPDATES[module].length));
|
|
1005
|
+
}
|
|
1006
|
+
break;
|
|
1007
|
+
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
const isStrange = action == "login_failed" && rnd() < 0.5;
|
|
1011
|
+
|
|
1012
|
+
return {
|
|
1013
|
+
id: ActivityPage._nextId++,
|
|
1014
|
+
time: time,
|
|
1015
|
+
userId: user.id,
|
|
1016
|
+
userName: user.name,
|
|
1017
|
+
userEmail: user.email,
|
|
1018
|
+
action: action,
|
|
1019
|
+
module: module,
|
|
1020
|
+
target: target,
|
|
1021
|
+
ip: (isStrange) ? "185." + Math.floor(rnd() * 255) + "." + Math.floor(rnd() * 255) + "." + Math.floor(rnd() * 255) : "85.105.12." + (10 + user.id),
|
|
1022
|
+
location: (isStrange) ? pick(["Unknown (VPN)", "Frankfurt, DE", "Singapore, SG"]) : pick(["Istanbul, TR", "Istanbul, TR", "Ankara, TR"]),
|
|
1023
|
+
device: pick(["Chrome · macOS", "Safari · iOS", "Edge · Windows", "Firefox · Linux"]),
|
|
1024
|
+
requestId: "req_" + Math.floor(rnd() * 1e12).toString(36),
|
|
1025
|
+
changes: changes,
|
|
1026
|
+
};
|
|
1027
|
+
|
|
1028
|
+
};
|
|
1029
|
+
|
|
1030
|
+
// Events of the last 90 days, newest first. Created one time and kept while the panel is open.
|
|
1031
|
+
ActivityPage.getEvents = function() {
|
|
1032
|
+
|
|
1033
|
+
if (ActivityPage._events) return ActivityPage._events;
|
|
1034
|
+
|
|
1035
|
+
const users = ActivityPage.getUsers();
|
|
1036
|
+
const now = Date.now();
|
|
1037
|
+
const list = [];
|
|
1038
|
+
|
|
1039
|
+
for (let day = 89; day >= 0; day--) {
|
|
1040
|
+
const count = 40 + Math.floor(ActivityPage.random() * 35);
|
|
1041
|
+
for (let i = 0; i < count; i++) {
|
|
1042
|
+
// Work hours are busier
|
|
1043
|
+
const hour = (ActivityPage.random() < 0.8) ? 8 + Math.floor(ActivityPage.random() * 11) : Math.floor(ActivityPage.random() * 24);
|
|
1044
|
+
const time = now - day * 86400000 - (now % 86400000) + hour * 3600000 + Math.floor(ActivityPage.random() * 3600000);
|
|
1045
|
+
if (time > now) continue;
|
|
1046
|
+
list.push(ActivityPage.createEvent(time, ActivityPage.pick(users)));
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
// TEST: A few failed sign-ins in the last hour, so the security alert can be seen.
|
|
1051
|
+
const target = users[users.length - 1];
|
|
1052
|
+
for (let i = 0; i < 4; i++) {
|
|
1053
|
+
const event = ActivityPage.createEvent(now - (i * 11 + 3) * 60000, target);
|
|
1054
|
+
event.action = "login_failed";
|
|
1055
|
+
event.module = "Auth";
|
|
1056
|
+
event.target = "Password sign-in";
|
|
1057
|
+
event.changes = [];
|
|
1058
|
+
event.ip = "185.220.101." + (40 + i);
|
|
1059
|
+
event.location = "Unknown (VPN)";
|
|
1060
|
+
list.push(event);
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
list.sort(function(a, b) { return b.time - a.time; });
|
|
1064
|
+
ActivityPage._events = list;
|
|
1065
|
+
return list;
|
|
1066
|
+
|
|
1067
|
+
};
|
|
1068
|
+
|
|
1069
|
+
// TEST: A new event for the live mode.
|
|
1070
|
+
ActivityPage.createLiveEvent = function() {
|
|
1071
|
+
return ActivityPage.createEvent(Date.now(), ActivityPage.pick(ActivityPage.getUsers()));
|
|
1072
|
+
};
|