Finally got things mostly working.
This commit is contained in:
8
ae_app_svelte_tailwind_skeleton.code-workspace
Normal file
8
ae_app_svelte_tailwind_skeleton.code-workspace
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "."
|
||||
}
|
||||
],
|
||||
"settings": {}
|
||||
}
|
||||
215
package-lock.json
generated
215
package-lock.json
generated
@@ -866,9 +866,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/rollup-android-arm-eabi": {
|
||||
"version": "4.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.11.0.tgz",
|
||||
"integrity": "sha512-BV+u2QSfK3i1o6FucqJh5IK9cjAU6icjFFhvknzFgu472jzl0bBojfDAkJLBEsHFMo+YZg6rthBvBBt8z12IBQ==",
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.12.0.tgz",
|
||||
"integrity": "sha512-+ac02NL/2TCKRrJu2wffk1kZ+RyqxVUlbjSagNgPm94frxtr+XDL12E5Ll1enWskLrtrZ2r8L3wED1orIibV/w==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@@ -879,9 +879,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-android-arm64": {
|
||||
"version": "4.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.11.0.tgz",
|
||||
"integrity": "sha512-0ij3iw7sT5jbcdXofWO2NqDNjSVVsf6itcAkV2I6Xsq4+6wjW1A8rViVB67TfBEan7PV2kbLzT8rhOVWLI2YXw==",
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.12.0.tgz",
|
||||
"integrity": "sha512-OBqcX2BMe6nvjQ0Nyp7cC90cnumt8PXmO7Dp3gfAju/6YwG0Tj74z1vKrfRz7qAv23nBcYM8BCbhrsWqO7PzQQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -892,9 +892,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-darwin-arm64": {
|
||||
"version": "4.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.11.0.tgz",
|
||||
"integrity": "sha512-yPLs6RbbBMupArf6qv1UDk6dzZvlH66z6NLYEwqTU0VHtss1wkI4UYeeMS7TVj5QRVvaNAWYKP0TD/MOeZ76Zg==",
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.12.0.tgz",
|
||||
"integrity": "sha512-X64tZd8dRE/QTrBIEs63kaOBG0b5GVEd3ccoLtyf6IdXtHdh8h+I56C2yC3PtC9Ucnv0CpNFJLqKFVgCYe0lOQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -905,9 +905,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-darwin-x64": {
|
||||
"version": "4.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.11.0.tgz",
|
||||
"integrity": "sha512-OvqIgwaGAwnASzXaZEeoJY3RltOFg+WUbdkdfoluh2iqatd090UeOG3A/h0wNZmE93dDew9tAtXgm3/+U/B6bw==",
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.12.0.tgz",
|
||||
"integrity": "sha512-cc71KUZoVbUJmGP2cOuiZ9HSOP14AzBAThn3OU+9LcA1+IUqswJyR1cAJj3Mg55HbjZP6OLAIscbQsQLrpgTOg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -918,9 +918,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
|
||||
"version": "4.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.11.0.tgz",
|
||||
"integrity": "sha512-X17s4hZK3QbRmdAuLd2EE+qwwxL8JxyVupEqAkxKPa/IgX49ZO+vf0ka69gIKsaYeo6c1CuwY3k8trfDtZ9dFg==",
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.12.0.tgz",
|
||||
"integrity": "sha512-a6w/Y3hyyO6GlpKL2xJ4IOh/7d+APaqLYdMf86xnczU3nurFTaVN9s9jOXQg97BE4nYm/7Ga51rjec5nfRdrvA==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@@ -931,9 +931,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm64-gnu": {
|
||||
"version": "4.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.11.0.tgz",
|
||||
"integrity": "sha512-673Lu9EJwxVB9NfYeA4AdNu0FOHz7g9t6N1DmT7bZPn1u6bTF+oZjj+fuxUcrfxWXE0r2jxl5QYMa9cUOj9NFg==",
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.12.0.tgz",
|
||||
"integrity": "sha512-0fZBq27b+D7Ar5CQMofVN8sggOVhEtzFUwOwPppQt0k+VR+7UHMZZY4y+64WJ06XOhBTKXtQB/Sv0NwQMXyNAA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -944,9 +944,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm64-musl": {
|
||||
"version": "4.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.11.0.tgz",
|
||||
"integrity": "sha512-yFW2msTAQNpPJaMmh2NpRalr1KXI7ZUjlN6dY/FhWlOclMrZezm5GIhy3cP4Ts2rIAC+IPLAjNibjp1BsxCVGg==",
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.12.0.tgz",
|
||||
"integrity": "sha512-eTvzUS3hhhlgeAv6bfigekzWZjaEX9xP9HhxB0Dvrdbkk5w/b+1Sxct2ZuDxNJKzsRStSq1EaEkVSEe7A7ipgQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -957,9 +957,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
|
||||
"version": "4.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.11.0.tgz",
|
||||
"integrity": "sha512-kKT9XIuhbvYgiA3cPAGntvrBgzhWkGpBMzuk1V12Xuoqg7CI41chye4HU0vLJnGf9MiZzfNh4I7StPeOzOWJfA==",
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.12.0.tgz",
|
||||
"integrity": "sha512-ix+qAB9qmrCRiaO71VFfY8rkiAZJL8zQRXveS27HS+pKdjwUfEhqo2+YF2oI+H/22Xsiski+qqwIBxVewLK7sw==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
@@ -970,9 +970,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-x64-gnu": {
|
||||
"version": "4.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.11.0.tgz",
|
||||
"integrity": "sha512-6q4ESWlyTO+erp1PSCmASac+ixaDv11dBk1fqyIuvIUc/CmRAX2Zk+2qK1FGo5q7kyDcjHCFVwgGFCGIZGVwCA==",
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.12.0.tgz",
|
||||
"integrity": "sha512-TenQhZVOtw/3qKOPa7d+QgkeM6xY0LtwzR8OplmyL5LrgTWIXpTQg2Q2ycBf8jm+SFW2Wt/DTn1gf7nFp3ssVA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -983,9 +983,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-x64-musl": {
|
||||
"version": "4.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.11.0.tgz",
|
||||
"integrity": "sha512-vIAQUmXeMLmaDN78HSE4Kh6xqof2e3TJUKr+LPqXWU4NYNON0MDN9h2+t4KHrPAQNmU3w1GxBQ/n01PaWFwa5w==",
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.12.0.tgz",
|
||||
"integrity": "sha512-LfFdRhNnW0zdMvdCb5FNuWlls2WbbSridJvxOvYWgSBOYZtgBfW9UGNJG//rwMqTX1xQE9BAodvMH9tAusKDUw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -996,9 +996,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-arm64-msvc": {
|
||||
"version": "4.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.11.0.tgz",
|
||||
"integrity": "sha512-LVXo9dDTGPr0nezMdqa1hK4JeoMZ02nstUxGYY/sMIDtTYlli1ZxTXBYAz3vzuuvKO4X6NBETciIh7N9+abT1g==",
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.12.0.tgz",
|
||||
"integrity": "sha512-JPDxovheWNp6d7AHCgsUlkuCKvtu3RB55iNEkaQcf0ttsDU/JZF+iQnYcQJSk/7PtT4mjjVG8N1kpwnI9SLYaw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -1009,9 +1009,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-ia32-msvc": {
|
||||
"version": "4.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.11.0.tgz",
|
||||
"integrity": "sha512-xZVt6K70Gr3I7nUhug2dN6VRR1ibot3rXqXS3wo+8JP64t7djc3lBFyqO4GiVrhNaAIhUCJtwQ/20dr0h0thmQ==",
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.12.0.tgz",
|
||||
"integrity": "sha512-fjtuvMWRGJn1oZacG8IPnzIV6GF2/XG+h71FKn76OYFqySXInJtseAqdprVTDTyqPxQOG9Exak5/E9Z3+EJ8ZA==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
@@ -1022,9 +1022,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-x64-msvc": {
|
||||
"version": "4.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.11.0.tgz",
|
||||
"integrity": "sha512-f3I7h9oTg79UitEco9/2bzwdciYkWr8pITs3meSDSlr1TdvQ7IxkQaaYN2YqZXX5uZhiYL+VuYDmHwNzhx+HOg==",
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.12.0.tgz",
|
||||
"integrity": "sha512-ZYmr5mS2wd4Dew/JjT0Fqi2NPB/ZhZ2VvPp7SmvPZb4Y1CG/LRcS6tcRo2cYU7zLK5A7cdbhWnnWmUjoI4qapg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -1447,13 +1447,13 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@vitest/expect": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.2.2.tgz",
|
||||
"integrity": "sha512-3jpcdPAD7LwHUUiT2pZTj2U82I2Tcgg2oVPvKxhn6mDI2On6tfvPQTjAI4628GUGDZrCm4Zna9iQHm5cEexOAg==",
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.3.1.tgz",
|
||||
"integrity": "sha512-xofQFwIzfdmLLlHa6ag0dPV8YsnKOCP1KdAeVVh34vSjN2dcUiXYCD9htu/9eM7t8Xln4v03U9HLxLpPlsXdZw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@vitest/spy": "1.2.2",
|
||||
"@vitest/utils": "1.2.2",
|
||||
"@vitest/spy": "1.3.1",
|
||||
"@vitest/utils": "1.3.1",
|
||||
"chai": "^4.3.10"
|
||||
},
|
||||
"funding": {
|
||||
@@ -1461,12 +1461,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vitest/runner": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.2.2.tgz",
|
||||
"integrity": "sha512-JctG7QZ4LSDXr5CsUweFgcpEvrcxOV1Gft7uHrvkQ+fsAVylmWQvnaAr/HDp3LAH1fztGMQZugIheTWjaGzYIg==",
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.3.1.tgz",
|
||||
"integrity": "sha512-5FzF9c3jG/z5bgCnjr8j9LNq/9OxV2uEBAITOXfoe3rdZJTdO7jzThth7FXv/6b+kdY65tpRQB7WaKhNZwX+Kg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@vitest/utils": "1.2.2",
|
||||
"@vitest/utils": "1.3.1",
|
||||
"p-limit": "^5.0.0",
|
||||
"pathe": "^1.1.1"
|
||||
},
|
||||
@@ -1502,9 +1502,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vitest/snapshot": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.2.2.tgz",
|
||||
"integrity": "sha512-SmGY4saEw1+bwE1th6S/cZmPxz/Q4JWsl7LvbQIky2tKE35US4gd0Mjzqfr84/4OD0tikGWaWdMja/nWL5NIPA==",
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.3.1.tgz",
|
||||
"integrity": "sha512-EF++BZbt6RZmOlE3SuTPu/NfwBF6q4ABS37HHXzs2LUVPBLx2QoY/K0fKpRChSo8eLiuxcbCVfqKgx/dplCDuQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"magic-string": "^0.30.5",
|
||||
@@ -1516,9 +1516,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vitest/spy": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.2.2.tgz",
|
||||
"integrity": "sha512-k9Gcahssw8d7X3pSLq3e3XEu/0L78mUkCjivUqCQeXJm9clfXR/Td8+AP+VC1O6fKPIDLcHDTAmBOINVuv6+7g==",
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.3.1.tgz",
|
||||
"integrity": "sha512-xAcW+S099ylC9VLU7eZfdT9myV67Nor9w9zhf0mGCYJSO+zM2839tOeROTdikOi/8Qeusffvxb/MyBSOja1Uig==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"tinyspy": "^2.2.0"
|
||||
@@ -1528,9 +1528,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vitest/utils": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.2.2.tgz",
|
||||
"integrity": "sha512-WKITBHLsBHlpjnDQahr+XK6RE7MiAsgrIkr0pGhQ9ygoxBfUeG0lUG5iLlzqjmKSlBv3+j5EGsriBzh+C3Tq9g==",
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.3.1.tgz",
|
||||
"integrity": "sha512-d3Waie/299qqRyHTm2DjADeTaNdNSVsnwHPWrs20JMpjh6eiVq7ggggweO8rc4arhf6rRkWuHKwvxGvejUXZZQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"diff-sequences": "^29.6.3",
|
||||
@@ -1857,9 +1857,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001587",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001587.tgz",
|
||||
"integrity": "sha512-HMFNotUmLXn71BQxg8cijvqxnIAofforZOwGsxyXJ0qugTdspUF4sPSJ2vhgprHCB996tIDzEq1ubumPDV8ULA==",
|
||||
"version": "1.0.30001588",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001588.tgz",
|
||||
"integrity": "sha512-+hVY9jE44uKLkH0SrUTqxjxqNTOWHsbnQDIKjwkZ3lNTzUUVdBLBGXtj/q5Mp5u98r3droaZAewQuEDzjQdZlQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -2211,9 +2211,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.4.671",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.671.tgz",
|
||||
"integrity": "sha512-UUlE+/rWbydmp+FW8xlnnTA5WNA0ZZd2XL8CuMS72rh+k4y1f8+z6yk3UQhEwqHQWj6IBdL78DwWOdGMvYfQyA==",
|
||||
"version": "1.4.677",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.677.tgz",
|
||||
"integrity": "sha512-erDa3CaDzwJOpyvfKhOiJjBVNnMM0qxHq47RheVVwsSQrgBA9ZSGV9kdaOfZDPXcHzhG7lBxhj6A7KvfLJBd6Q==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/emoji-regex": {
|
||||
@@ -2668,9 +2668,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/flatted": {
|
||||
"version": "3.2.9",
|
||||
"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz",
|
||||
"integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==",
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.0.tgz",
|
||||
"integrity": "sha512-noqGuLw158+DuD9UPRKHpJ2hGxpFyDlYYrfM0mWt4XhT4n0lwzTLh70Tkdyy4kyTmyTT9Bv7bWAJqw7cgkEXDg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
@@ -3131,6 +3131,12 @@
|
||||
"jiti": "bin/jiti.js"
|
||||
}
|
||||
},
|
||||
"node_modules/js-tokens": {
|
||||
"version": "8.0.3",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-8.0.3.tgz",
|
||||
"integrity": "sha512-UfJMcSJc+SEXEl9lH/VLHSZbThQyLpw1vLO1Lb+j4RWDvG3N2f7yj3PVQA3cmkTBNldJ9eFnM+xEXxHIXrYiJw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/js-yaml": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
|
||||
@@ -4271,9 +4277,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/rollup": {
|
||||
"version": "4.11.0",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.11.0.tgz",
|
||||
"integrity": "sha512-2xIbaXDXjf3u2tajvA5xROpib7eegJ9Y/uPlSFhXLNpK9ampCczXAhLEb5yLzJyG3LAdI1NWtNjDXiLyniNdjQ==",
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.12.0.tgz",
|
||||
"integrity": "sha512-wz66wn4t1OHIJw3+XU7mJJQV/2NAfw5OAk6G6Hoo3zcvz/XOfQ52Vgi+AN4Uxoxi0KBBwk2g8zPrTDA4btSB/Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/estree": "1.0.5"
|
||||
@@ -4286,19 +4292,19 @@
|
||||
"npm": ">=8.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@rollup/rollup-android-arm-eabi": "4.11.0",
|
||||
"@rollup/rollup-android-arm64": "4.11.0",
|
||||
"@rollup/rollup-darwin-arm64": "4.11.0",
|
||||
"@rollup/rollup-darwin-x64": "4.11.0",
|
||||
"@rollup/rollup-linux-arm-gnueabihf": "4.11.0",
|
||||
"@rollup/rollup-linux-arm64-gnu": "4.11.0",
|
||||
"@rollup/rollup-linux-arm64-musl": "4.11.0",
|
||||
"@rollup/rollup-linux-riscv64-gnu": "4.11.0",
|
||||
"@rollup/rollup-linux-x64-gnu": "4.11.0",
|
||||
"@rollup/rollup-linux-x64-musl": "4.11.0",
|
||||
"@rollup/rollup-win32-arm64-msvc": "4.11.0",
|
||||
"@rollup/rollup-win32-ia32-msvc": "4.11.0",
|
||||
"@rollup/rollup-win32-x64-msvc": "4.11.0",
|
||||
"@rollup/rollup-android-arm-eabi": "4.12.0",
|
||||
"@rollup/rollup-android-arm64": "4.12.0",
|
||||
"@rollup/rollup-darwin-arm64": "4.12.0",
|
||||
"@rollup/rollup-darwin-x64": "4.12.0",
|
||||
"@rollup/rollup-linux-arm-gnueabihf": "4.12.0",
|
||||
"@rollup/rollup-linux-arm64-gnu": "4.12.0",
|
||||
"@rollup/rollup-linux-arm64-musl": "4.12.0",
|
||||
"@rollup/rollup-linux-riscv64-gnu": "4.12.0",
|
||||
"@rollup/rollup-linux-x64-gnu": "4.12.0",
|
||||
"@rollup/rollup-linux-x64-musl": "4.12.0",
|
||||
"@rollup/rollup-win32-arm64-msvc": "4.12.0",
|
||||
"@rollup/rollup-win32-ia32-msvc": "4.12.0",
|
||||
"@rollup/rollup-win32-x64-msvc": "4.12.0",
|
||||
"fsevents": "~2.3.2"
|
||||
}
|
||||
},
|
||||
@@ -4649,12 +4655,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/strip-literal": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-1.3.0.tgz",
|
||||
"integrity": "sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==",
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-2.0.0.tgz",
|
||||
"integrity": "sha512-f9vHgsCWBq2ugHAkGMiiYY+AYG0D/cbloKKg0nhaaaSNsujdGIpVXCNsrJpCKr5M0f4aI31mr13UjY6GAuXCKA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"acorn": "^8.10.0"
|
||||
"js-tokens": "^8.0.2"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/antfu"
|
||||
@@ -4977,9 +4983,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/tailwindcss/node_modules/postcss-load-config/node_modules/lilconfig": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.0.tgz",
|
||||
"integrity": "sha512-p3cz0JV5vw/XeouBU3Ldnp+ZkBjE+n8ydJ4mcwBrOiXXPqNlrzGBqWs9X4MWF7f+iKUBu794Y8Hh8yawiJbCjw==",
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.1.tgz",
|
||||
"integrity": "sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
@@ -5275,9 +5281,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vite-node": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.2.2.tgz",
|
||||
"integrity": "sha512-1as4rDTgVWJO3n1uHmUYqq7nsFgINQ9u+mRcXpjeOMJUmviqNKjcZB7UfRZrlM7MjYXMKpuWp5oGkjaFLnjawg==",
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.3.1.tgz",
|
||||
"integrity": "sha512-azbRrqRxlWTJEVbzInZCTchx0X69M/XPTCz4H+TLvlTcR/xH/3hkRqhOakT41fMJCMzXTu4UvegkZiEoJAWvng==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"cac": "^6.7.14",
|
||||
@@ -5347,18 +5353,17 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vitest": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/vitest/-/vitest-1.2.2.tgz",
|
||||
"integrity": "sha512-d5Ouvrnms3GD9USIK36KG8OZ5bEvKEkITFtnGv56HFaSlbItJuYr7hv2Lkn903+AvRAgSixiamozUVfORUekjw==",
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/vitest/-/vitest-1.3.1.tgz",
|
||||
"integrity": "sha512-/1QJqXs8YbCrfv/GPQ05wAZf2eakUPLPa18vkJAKE7RXOKfVHqMZZ1WlTjiwl6Gcn65M5vpNUB6EFLnEdRdEXQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@vitest/expect": "1.2.2",
|
||||
"@vitest/runner": "1.2.2",
|
||||
"@vitest/snapshot": "1.2.2",
|
||||
"@vitest/spy": "1.2.2",
|
||||
"@vitest/utils": "1.2.2",
|
||||
"@vitest/expect": "1.3.1",
|
||||
"@vitest/runner": "1.3.1",
|
||||
"@vitest/snapshot": "1.3.1",
|
||||
"@vitest/spy": "1.3.1",
|
||||
"@vitest/utils": "1.3.1",
|
||||
"acorn-walk": "^8.3.2",
|
||||
"cac": "^6.7.14",
|
||||
"chai": "^4.3.10",
|
||||
"debug": "^4.3.4",
|
||||
"execa": "^8.0.1",
|
||||
@@ -5367,11 +5372,11 @@
|
||||
"pathe": "^1.1.1",
|
||||
"picocolors": "^1.0.0",
|
||||
"std-env": "^3.5.0",
|
||||
"strip-literal": "^1.3.0",
|
||||
"strip-literal": "^2.0.0",
|
||||
"tinybench": "^2.5.1",
|
||||
"tinypool": "^0.8.2",
|
||||
"vite": "^5.0.0",
|
||||
"vite-node": "1.2.2",
|
||||
"vite-node": "1.3.1",
|
||||
"why-is-node-running": "^2.2.2"
|
||||
},
|
||||
"bin": {
|
||||
@@ -5386,8 +5391,8 @@
|
||||
"peerDependencies": {
|
||||
"@edge-runtime/vm": "*",
|
||||
"@types/node": "^18.0.0 || >=20.0.0",
|
||||
"@vitest/browser": "^1.0.0",
|
||||
"@vitest/ui": "^1.0.0",
|
||||
"@vitest/browser": "1.3.1",
|
||||
"@vitest/ui": "1.3.1",
|
||||
"happy-dom": "*",
|
||||
"jsdom": "*"
|
||||
},
|
||||
|
||||
@@ -38,6 +38,7 @@ export let ae_app_local_data_struct: key_val = {
|
||||
'account_id': ae_account_id, // OSIT Demo _XY7DXtc9MY
|
||||
'site_domain': null, // https://example.com, https://dev.example.com, etc.
|
||||
'administrator_access': true,
|
||||
'trusted_access': true,
|
||||
'ds': {},
|
||||
'hub': {
|
||||
'ds': {},
|
||||
|
||||
@@ -11,11 +11,11 @@ import type {
|
||||
} from '@skeletonlabs/skeleton';
|
||||
const drawerStore = getDrawerStore();
|
||||
|
||||
import ModalComponentEditSponsorshipObj from './sponsorships/10_edit_modal__sponsorship_obj.svelte';
|
||||
// import ModalComponentEditSponsorshipObj from './sponsorships/10_edit_modal__sponsorship_obj.svelte';
|
||||
|
||||
const modalRegistry: Record<string, ModalComponent> = {
|
||||
// Set a unique modal ID, then pass the component reference
|
||||
modalComponentEditSponsorshipObj: { ref: ModalComponentEditSponsorshipObj },
|
||||
// modalComponentEditSponsorshipObj: { ref: ModalComponentEditSponsorshipObj },
|
||||
// modalComponentTwo: { ref: ModalComponentTwo },
|
||||
// ...
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
export let data;
|
||||
</script>
|
||||
|
||||
<h1>Sponsorships Layout?</h1>
|
||||
<!-- <h1>Sponsorships Layout?</h1> -->
|
||||
|
||||
<!-- <div class="submenu">
|
||||
{#each data.sections as section}
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte';
|
||||
export let data;
|
||||
console.log(`Svelte Sponsorships page data:`, data);
|
||||
|
||||
// import { localStorageStore } from '@skeletonlabs/skeleton';
|
||||
// import type { Writable } from 'svelte/store';
|
||||
// const store_current_page: Writable<string> = localStorageStore('store_current_page', 'start');
|
||||
|
||||
// To retrieve the store, getModalStore must be invoked at the top level of your component!
|
||||
import { getDrawerStore, getModalStore } from '@skeletonlabs/skeleton';
|
||||
import { getDrawerStore, getModalStore, ProgressRadial } from '@skeletonlabs/skeleton';
|
||||
import type {
|
||||
DrawerSettings,
|
||||
ModalSettings
|
||||
, ModalComponent, ModalStore
|
||||
ModalSettings,
|
||||
ModalComponent,
|
||||
ModalStore
|
||||
} from '@skeletonlabs/skeleton';
|
||||
const modalStore = getModalStore();
|
||||
|
||||
@@ -18,22 +21,14 @@ import { api } from '$lib/api';
|
||||
import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores';
|
||||
|
||||
|
||||
// import Edit_sponsorship_obj from './10_edit__sponsorship_obj.svelte';
|
||||
import Edit_modal_sponsorship_obj from './10_edit_modal__sponsorship_obj.svelte';
|
||||
import List_sponsorship_obj from './10_list__sponsorship_obj.svelte';
|
||||
import View_modal_sponsorship_obj from './10_view_modal__sponsorship_obj.svelte';
|
||||
|
||||
// Viewing
|
||||
const modalComponentViewSponsorshipObj: ModalComponent = { ref: View_modal_sponsorship_obj };
|
||||
|
||||
const modal_view__sponsorship_obj: ModalSettings = {
|
||||
type: 'component',
|
||||
component: modalComponentViewSponsorshipObj,
|
||||
title: 'Viewing Sponsorship',
|
||||
position: '', // default is "items-center"
|
||||
type key_val = {
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
|
||||
// Editing
|
||||
const modalComponentEditSponsorshipObj: ModalComponent = { ref: Edit_modal_sponsorship_obj };
|
||||
|
||||
@@ -44,35 +39,50 @@ const modal_edit__sponsorship_obj: ModalSettings = {
|
||||
position: '', // default is "items-center"
|
||||
};
|
||||
|
||||
$: if ($ae_loc.mod.sponsorships.show_edit__sponsorship_obj) {
|
||||
console.log('Show Modal Edit');
|
||||
modalStore.trigger(modal_edit__sponsorship_obj);
|
||||
} else if ($ae_loc.mod.sponsorships.show_view__sponsorship_obj) {
|
||||
console.log('Show Modal View');
|
||||
modalStore.trigger(modal_view__sponsorship_obj);
|
||||
}
|
||||
// Viewing
|
||||
const modalComponentViewSponsorshipObj: ModalComponent = { ref: View_modal_sponsorship_obj };
|
||||
|
||||
const modal_view__sponsorship_obj: ModalSettings = {
|
||||
type: 'component',
|
||||
component: modalComponentViewSponsorshipObj,
|
||||
title: 'Viewing Sponsorship',
|
||||
position: '', // default is "items-center"
|
||||
};
|
||||
|
||||
// We don't want the edit or view to show up by default. Maybe if we see an object ID param in the URL, we can show the view modal.
|
||||
$ae_loc.mod.sponsorships.show_edit__sponsorship_obj = false;
|
||||
$ae_loc.mod.sponsorships.show_view__sponsorship_obj = false;
|
||||
|
||||
type key_val = {
|
||||
[key: string]: any;
|
||||
};
|
||||
$ae_loc.hostname = data.url.hostname;
|
||||
$ae_loc.site_domain = data.url.origin;
|
||||
|
||||
$: if ($slct_trigger == 'show_edit__sponsorship_obj' && $ae_loc.mod.sponsorships.show_edit__sponsorship_obj) {
|
||||
console.log('Show Modal Edit');
|
||||
$slct_trigger = null;
|
||||
// $ae_loc.mod.sponsorships.show_view__sponsorship_obj = false;
|
||||
modalStore.trigger(modal_edit__sponsorship_obj);
|
||||
}
|
||||
$: if ($slct_trigger == 'show_view__sponsorship_obj' && $ae_loc.mod.sponsorships.show_view__sponsorship_obj) {
|
||||
console.log('Show Modal View');
|
||||
$slct_trigger = null;
|
||||
// $ae_loc.mod.sponsorships.show_edit__sponsorship_obj = false;
|
||||
modalStore.trigger(modal_view__sponsorship_obj);
|
||||
}
|
||||
|
||||
export let data;
|
||||
// console.log(`Svelte Sponsorships page data:`, data);
|
||||
|
||||
let ae_account_obj_get_promise;
|
||||
let ae_sponsorship_obj_li_get_promise;
|
||||
|
||||
onMount(() => {
|
||||
console.log('Sponsorships: +page.svelte');
|
||||
let url = window.location.href;
|
||||
console.log(url);
|
||||
|
||||
$ae_loc.href_url = url;
|
||||
// console.log(`$ae_loc = `, $ae_loc);
|
||||
|
||||
let href_url = window.location.href;
|
||||
console.log(href_url);
|
||||
|
||||
$ae_loc.href_url = href_url;
|
||||
console.log(`$ae_loc.href_url = `, $ae_loc.href_url);
|
||||
});
|
||||
|
||||
|
||||
@@ -264,6 +274,12 @@ $: if ($slct_trigger == 'load__sponsorship_obj' && $slct.sponsorship_id) {
|
||||
|
||||
$slct_trigger = null;
|
||||
|
||||
// $ae_loc.mod.sponsorships.link = `${$ae_loc.href_url}/id/${$slct.sponsorship_id}`;
|
||||
|
||||
// $ae_loc.mod.sponsorships.link = `${data.url.origin}/sponsorships/${$slct.sponsorship_id}`;
|
||||
// console.log('Sponsorship link:', $ae_loc.mod.sponsorships.link);
|
||||
// $ae_loc = $ae_loc;
|
||||
|
||||
handle_load_ae_obj_id__sponsorship({sponsorship_id: $slct.sponsorship_id, try_cache: false});
|
||||
}
|
||||
|
||||
@@ -335,27 +351,27 @@ async function handle_load_ae_obj_id__sponsorship({sponsorship_id, try_cache=fal
|
||||
// modalStore.trigger(modal);
|
||||
|
||||
|
||||
const drawerStore = getDrawerStore();
|
||||
// const drawerStore = getDrawerStore();
|
||||
|
||||
const drawer_settings_edit: DrawerSettings = {
|
||||
id: 'sponsorships__edit',
|
||||
meta: { foo: 'bar', fizz: 'buzz', age: 40 }
|
||||
};
|
||||
// const drawer_settings_edit: DrawerSettings = {
|
||||
// id: 'sponsorships__edit',
|
||||
// meta: { foo: 'bar', fizz: 'buzz', age: 40 }
|
||||
// };
|
||||
|
||||
const drawer_settings_x: DrawerSettings = {
|
||||
id: 'example-1',
|
||||
meta: { foo: 'bar', fizz: 'buzz', age: 40 }
|
||||
};
|
||||
// const drawer_settings_x: DrawerSettings = {
|
||||
// id: 'example-1',
|
||||
// meta: { foo: 'bar', fizz: 'buzz', age: 40 }
|
||||
// };
|
||||
|
||||
const drawer_settings_y: DrawerSettings = {
|
||||
id: 'example-2',
|
||||
// Provide your property overrides:
|
||||
bgDrawer: 'bg-purple-900 text-white',
|
||||
bgBackdrop: 'bg-gradient-to-tr from-indigo-500/50 via-purple-500/50 to-pink-500/50',
|
||||
width: 'w-[280px] md:w-[480px]',
|
||||
padding: 'p-4',
|
||||
rounded: 'rounded-xl',
|
||||
};
|
||||
// const drawer_settings_y: DrawerSettings = {
|
||||
// id: 'example-2',
|
||||
// // Provide your property overrides:
|
||||
// bgDrawer: 'bg-purple-900 text-white',
|
||||
// bgBackdrop: 'bg-gradient-to-tr from-indigo-500/50 via-purple-500/50 to-pink-500/50',
|
||||
// width: 'w-[280px] md:w-[480px]',
|
||||
// padding: 'p-4',
|
||||
// rounded: 'rounded-xl',
|
||||
// };
|
||||
|
||||
</script>
|
||||
|
||||
@@ -364,38 +380,62 @@ const drawer_settings_y: DrawerSettings = {
|
||||
<div class="space-y-10 flex flex-col">
|
||||
|
||||
<h1 class="h1 text-center">Aether - Sponsorships (dev)</h1>
|
||||
<!-- <section>
|
||||
<section>
|
||||
<button
|
||||
class="btn variant-ghost-primary"
|
||||
on:click={() => {
|
||||
// $ae_loc.mod.sponsorships.show_edit__sponsorship_obj = true;
|
||||
$slct.sponsorship_id = null;
|
||||
$slct.sponsorship_obj = null;
|
||||
|
||||
// modalStore.trigger(modal_edit__sponsorship_obj);
|
||||
$ae_loc.mod.sponsorships.show_edit__sponsorship_obj = true;
|
||||
$slct_trigger = 'show_edit__sponsorship_obj';
|
||||
}}
|
||||
>
|
||||
<span class="fas fa-edit mx-1"></span>
|
||||
Start/Edit Sponsorship
|
||||
</button>
|
||||
|
||||
<!-- <button
|
||||
on:click={() => {
|
||||
console.log('Open drawer');
|
||||
drawerStore.open(drawer_settings_x);
|
||||
}}
|
||||
>
|
||||
Open Drawer X
|
||||
</button>
|
||||
</button> -->
|
||||
|
||||
<button
|
||||
<!-- <button
|
||||
on:click={() => {
|
||||
console.log('Open drawer');
|
||||
drawerStore.open(drawer_settings_y);
|
||||
}}
|
||||
>
|
||||
Open Drawer Y
|
||||
</button>
|
||||
</button> -->
|
||||
|
||||
<button
|
||||
<!-- <button
|
||||
on:click={() => {
|
||||
console.log('Open drawer');
|
||||
drawerStore.open(drawer_settings_edit);
|
||||
}}
|
||||
>
|
||||
Open Drawer Edit
|
||||
</button>
|
||||
</section> -->
|
||||
</button> -->
|
||||
</section>
|
||||
|
||||
<section class="sponsorships_list">
|
||||
{#await ae_sponsorship_obj_li_get_promise}
|
||||
<div class="modal-loading">
|
||||
<span class="fas fa-spinner fa-spin"></span>
|
||||
<span class="loading-text">
|
||||
Loading...
|
||||
</span>
|
||||
</div>
|
||||
{/await}
|
||||
{#if $slct.sponsorship_obj_li && $ae_loc.mod.sponsorships.show_list__sponsorship_obj_li}
|
||||
<p>Got a list!</p>
|
||||
<!-- <p>Got a list!</p> -->
|
||||
<List_sponsorship_obj />
|
||||
{/if}
|
||||
</section>
|
||||
|
||||
7
src/routes/sponsorships/.directory
Normal file
7
src/routes/sponsorships/.directory
Normal file
@@ -0,0 +1,7 @@
|
||||
[Dolphin]
|
||||
Timestamp=2024,2,20,11,41,17.124
|
||||
Version=4
|
||||
ViewMode=1
|
||||
|
||||
[Settings]
|
||||
HiddenFilesShown=true
|
||||
@@ -1,10 +1,10 @@
|
||||
<script lang="ts">
|
||||
import type { SvelteComponent } from 'svelte';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import { createEventDispatcher, onMount } from 'svelte';
|
||||
|
||||
// const dispatch = createEventDispatcher();
|
||||
|
||||
import { localStorageStore } from '@skeletonlabs/skeleton';
|
||||
import { clipboard, localStorageStore, ProgressRadial } from '@skeletonlabs/skeleton';
|
||||
import type { Writable } from 'svelte/store';
|
||||
// const store_current_tab: Writable<string> = localStorageStore('store_current_tab', 'start');
|
||||
let store_current_tab: string = 'start';
|
||||
@@ -29,6 +29,15 @@ type key_val = {
|
||||
};
|
||||
|
||||
|
||||
onMount(() => {
|
||||
console.log('** Component Mounted: ** View Modal - Sponsorship Obj');
|
||||
|
||||
if ($slct.sponsorship_id && $ae_loc.href_url) {
|
||||
$ae_loc.mod.sponsorships.link = `${$ae_loc.href_url}/load?ae_id=${$slct.sponsorship_id}`;
|
||||
console.log('Sponsorship link:', $ae_loc.mod.sponsorships.link);
|
||||
}
|
||||
});
|
||||
|
||||
// // Form Data
|
||||
// const formData = {
|
||||
// name: 'Jane Doe',
|
||||
@@ -67,6 +76,40 @@ let ae_promises_init: key_val = {};
|
||||
let ae_promises: key_val = {};
|
||||
// let ae_promises.api_create__sponsorship_obj: Promise<any>;
|
||||
|
||||
if ($slct.sponsorship_id) {
|
||||
console.log(`Sponsorship ID selected: ${$slct.sponsorship_id}`);
|
||||
console.log(`Sponsorship Object selected: ${$slct.sponsorship_obj}`)
|
||||
|
||||
// $slct_trigger = 'load__sponsorship_obj';
|
||||
|
||||
// $ae_loc.mod.sponsorships.link = `${$ae_loc.href_url}/load?ae_id=${$slct.sponsorship_id}`;
|
||||
// console.log('Sponsorship link:', $ae_loc.mod.sponsorships.link);
|
||||
} else {
|
||||
$slct.sponsorship_id = null;
|
||||
$slct.sponsorship_obj = {
|
||||
sponsorship_cfg_id_random: $ae_loc.mod.sponsorships.sponsorship_cfg_id,
|
||||
|
||||
name: null,
|
||||
description: null,
|
||||
|
||||
poc_person_id: null,
|
||||
|
||||
logo_li_json: null,
|
||||
media_li_json: null,
|
||||
|
||||
social_li_json: null,
|
||||
|
||||
guest_li_json: null,
|
||||
|
||||
level_num: null,
|
||||
level_str: null,
|
||||
amount: null,
|
||||
paid: null,
|
||||
enable: null,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
$: if ($slct.sponsorship_obj) {
|
||||
// Logo related
|
||||
@@ -102,17 +145,25 @@ async function handle_submit_form(event) {
|
||||
let sponsorship_do: key_val = {};
|
||||
|
||||
if (!$slct.sponsorship_id) {
|
||||
sponsorship_do['account_id_random'] = $ae_loc.account_id;
|
||||
// sponsorship_do['account_id_random'] = $ae_loc.account_id;
|
||||
sponsorship_do['sponsorship_cfg_id_random'] = $slct.sponsorship_cfg_id;
|
||||
// sponsorship_do['enable'] = true;
|
||||
}
|
||||
|
||||
sponsorship_do['name'] = sponsorship_di.name;
|
||||
// if (tinyMCE.get('description')) {
|
||||
// sponsorship_do['description'] = tinyMCE.get('description').getContent();
|
||||
// } else {
|
||||
if (sponsorship_di.poc_full_name || sponsorship_di.poc_email) {
|
||||
sponsorship_do['poc_json'] = {
|
||||
full_name: sponsorship_di.poc_full_name,
|
||||
email: sponsorship_di.poc_email,
|
||||
phone_mobile: sponsorship_di.poc_phone_mobile,
|
||||
};
|
||||
}
|
||||
|
||||
if (sponsorship_di.name) {
|
||||
sponsorship_do['name'] = sponsorship_di.name;
|
||||
}
|
||||
if (sponsorship_di.description) {
|
||||
sponsorship_do['description'] = sponsorship_di.description;
|
||||
// }
|
||||
}
|
||||
|
||||
if (sponsorship_di.level_num) {
|
||||
sponsorship_do['level_num'] = Number(sponsorship_di.level_num);
|
||||
@@ -126,6 +177,38 @@ async function handle_submit_form(event) {
|
||||
}
|
||||
}
|
||||
|
||||
// Loop through possible guest list (up to 20) and add to the guest_li_json array.
|
||||
|
||||
let temp_guest_li = [];
|
||||
for (let i = 0; i < 20; i++) {
|
||||
if (sponsorship_di[`guest_${i}_full_name`] || sponsorship_di[`guest_${i}_given_name`]) {
|
||||
let guest_x_full_name = sponsorship_di[`guest_${i}_given_name`] + ' ' + sponsorship_di[`guest_${i}_family_name`];
|
||||
temp_guest_li.push({
|
||||
given_name: sponsorship_di[`guest_${i}_given_name`],
|
||||
family_name: sponsorship_di[`guest_${i}_family_name`],
|
||||
full_name: guest_x_full_name,
|
||||
email: sponsorship_di[`guest_${i}_email`],
|
||||
phone_mobile: sponsorship_di[`guest_${i}_phone_mobile`],
|
||||
phone_home: sponsorship_di[`guest_${i}_phone_home`],
|
||||
phone_office: sponsorship_di[`guest_${i}_phone_office`],
|
||||
city: sponsorship_di[`guest_${i}_city`],
|
||||
other_text: sponsorship_di[`guest_${i}_other_text`],
|
||||
});
|
||||
}
|
||||
}
|
||||
if (temp_guest_li.length) {
|
||||
sponsorship_do['guest_li_json'] = temp_guest_li;
|
||||
}
|
||||
|
||||
if (sponsorship_di.social_media_facebook || sponsorship_di.social_media_twitter || sponsorship_di.social_media_instagram || sponsorship_di.social_media_linkedin) {
|
||||
sponsorship_do['social_li_json'] = {
|
||||
facebook: sponsorship_di.social_media_facebook,
|
||||
twitter: sponsorship_di.social_media_twitter,
|
||||
instagram: sponsorship_di.social_media_instagram,
|
||||
linkedin: sponsorship_di.social_media_linkedin,
|
||||
};
|
||||
}
|
||||
|
||||
sponsorship_do['hide'] = !!sponsorship_di.hide;
|
||||
sponsorship_do['priority'] = !!sponsorship_di.priority;
|
||||
if (sponsorship_di.sort) {
|
||||
@@ -156,7 +239,7 @@ async function handle_submit_form(event) {
|
||||
obj_type: 'sponsorship',
|
||||
data: sponsorship_do
|
||||
});
|
||||
|
||||
$ae_loc.mod.sponsorships.disable_submit__sponsorship_obj = false;
|
||||
|
||||
} else {
|
||||
ae_promises.update__sponsorship_obj = await handle_update__sponsorship({
|
||||
@@ -164,6 +247,7 @@ async function handle_submit_form(event) {
|
||||
obj_id: $slct.sponsorship_id,
|
||||
data: sponsorship_do
|
||||
});
|
||||
$ae_loc.mod.sponsorships.disable_submit__sponsorship_obj = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -366,7 +450,45 @@ async function handle_update__sponsorship({
|
||||
|
||||
{#if $modalStore[0]}
|
||||
<div class="modal-example-form {cBase}">
|
||||
<header class={cHeader}>{$modalStore[0].title ?? '-- No Title --'}</header>
|
||||
<header class={cHeader}>
|
||||
{$modalStore[0].title ?? '-- No Title --'}
|
||||
|
||||
|
||||
|
||||
{#await ae_promises.update__sponsorship_obj}
|
||||
<div class="modal-loading">
|
||||
<span class="fas fa-spinner fa-spin"></span>
|
||||
<span class="loading-text">
|
||||
<ProgressRadial value={undefined} />
|
||||
Saving...
|
||||
</span>
|
||||
</div>
|
||||
{:then update__sponsorship_obj_result}
|
||||
{#if update__sponsorship_obj_result}
|
||||
<div class="modal-loading">
|
||||
<span class="fas fa-check-circle"></span>
|
||||
<span class="loading-text">Successfully saved!</span>
|
||||
</div>
|
||||
{/if}
|
||||
{:catch error}
|
||||
<div class="modal-loading">
|
||||
<span class="fas fa-exclamation-triangle"></span>
|
||||
<span class="loading-text">Error: {error.message}</span>
|
||||
</div>
|
||||
{/await}
|
||||
</header>
|
||||
|
||||
{#if $ae_loc.mod.sponsorships.link}
|
||||
<div class="flex justify-end">
|
||||
<button
|
||||
class="btn variant-soft-secondary"
|
||||
use:clipboard={$ae_loc.mod.sponsorships.link}
|
||||
>
|
||||
<span class="fas fa-copy mx-1"></span>
|
||||
Copy link for {$slct.sponsorship_id}
|
||||
</button>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<TabGroup
|
||||
justify="justify-center"
|
||||
@@ -396,7 +518,11 @@ async function handle_update__sponsorship({
|
||||
|
||||
<!-- Tab Panels --->
|
||||
<svelte:fragment slot="panel">
|
||||
|
||||
|
||||
{#if store_current_tab === 'start'}
|
||||
|
||||
|
||||
<form
|
||||
class="modal-form {cForm}"
|
||||
on:submit|preventDefault={handle_submit_form}
|
||||
@@ -524,7 +650,10 @@ async function handle_update__sponsorship({
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
{:else if store_current_tab === 'files'}
|
||||
|
||||
|
||||
<form
|
||||
class="modal-form {cForm}"
|
||||
on:submit|preventDefault={handle_submit_form_files}
|
||||
@@ -630,49 +759,129 @@ async function handle_update__sponsorship({
|
||||
|
||||
</form>
|
||||
|
||||
{:else if store_current_tab === 'gala_guests'}
|
||||
<section>
|
||||
|
||||
{:else if store_current_tab === 'gala_guests'}
|
||||
|
||||
|
||||
<section class="gala_guests">
|
||||
{#if $slct.sponsorship_obj.guest_li_json && $slct.sponsorship_obj.guest_li_json.length && $slct.sponsorship_obj.guest_li_json[0].full_name}
|
||||
|
||||
<form
|
||||
class="modal-form {cForm}"
|
||||
on:submit|preventDefault={handle_submit_form}
|
||||
>
|
||||
{#each $slct.sponsorship_obj.guest_li_json as guest, index}
|
||||
<fieldset class="border border-gray-500/20 p-4">
|
||||
<legend class="legend">
|
||||
Guest {index} -
|
||||
Guest #{index+1} -
|
||||
{guest.full_name ?? `${guest.given_name} {guest.family_name}`}
|
||||
</legend>
|
||||
<div class="flex flex-wrap gap-4">
|
||||
<label for="guest_{index}_given_name" class="label max-w-64">Given name
|
||||
<input type="text" class="input" id="guest_{index}_given_name" name="guest_{index}_given_name" placeholder="First name" value={guest.given_name ?? ''} autocomplete="name">
|
||||
<div class="flex flex-wrap gap-2 p-1">
|
||||
<label for="guest_{index}_given_name" class="label max-w-64">
|
||||
<!-- Given name -->
|
||||
<input type="text" class="input text-xs" id="guest_{index}_given_name" name="guest_{index}_given_name" placeholder="First name" value={guest.given_name ?? ''} autocomplete="name">
|
||||
</label>
|
||||
<label for="guest_{index}_family_name" class="label max-w-64">Family name
|
||||
<input type="text" class="input" id="guest_{index}_family_name" name="guest_{index}_family_name" placeholder="Last name" value={guest.family_name ?? ''} autocomplete="name">
|
||||
<label for="guest_{index}_family_name" class="label max-w-64">
|
||||
<!-- Family name -->
|
||||
<input type="text" class="input text-xs" id="guest_{index}_family_name" name="guest_{index}_family_name" placeholder="Last name" value={guest.family_name ?? ''} autocomplete="name">
|
||||
</label>
|
||||
<label for="guest_{index}_email" class="label max-w-64">Email
|
||||
<input type="email" class="input" id="guest_{index}_email" name="guest_{index}_email" placeholder="Email" value={guest.email ?? ''} autocomplete="email">
|
||||
<label for="guest_{index}_email" class="label max-w-64">
|
||||
<!-- Email -->
|
||||
<input type="email" class="input text-xs" id="guest_{index}_email" name="guest_{index}_email" placeholder="Email" value={guest.email ?? ''} autocomplete="email">
|
||||
</label>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-4">
|
||||
<label for="guest_{index}_phone_mobile" class="label max-w-64">Mobile phone
|
||||
<input type="tel" class="input" id="guest_{index}_phone_mobile" name="guest_{index}_phone_mobile" placeholder="Mobile phone" value={guest.phone_mobile ?? ''} autocomplete="tel">
|
||||
<div class="flex flex-wrap gap-2 p-1">
|
||||
<label for="guest_{index}_phone_mobile" class="label max-w-64">
|
||||
<!-- Mobile phone -->
|
||||
<input type="tel" class="input text-xs" id="guest_{index}_phone_mobile" name="guest_{index}_phone_mobile" placeholder="Mobile phone" value={guest.phone_mobile ?? ''} autocomplete="tel">
|
||||
</label>
|
||||
<label for="guest_{index}_phone_office" class="label max-w-64">Office phone
|
||||
<input type="tel" class="input" id="guest_{index}_phone_office" name="guest_{index}_phone_office" placeholder="Office phone" value={guest.phone_office ?? ''} autocomplete="tel">
|
||||
<!-- <label for="guest_{index}_phone_office" class="label max-w-64">Office phone
|
||||
<input type="tel" class="input text-xs" id="guest_{index}_phone_office" name="guest_{index}_phone_office" placeholder="Office phone" value={guest.phone_office ?? ''} autocomplete="tel">
|
||||
</label> -->
|
||||
<label for="guest_{index}_city" class="label max-w-64">
|
||||
<!-- City -->
|
||||
<input type="text" class="input text-xs" id="guest_{index}_city" name="guest_{index}_city" placeholder="City" value={guest.city ?? ''} autocomplete="city">
|
||||
</label>
|
||||
<label for="guest_{index}_city" class="label max-w-64">City
|
||||
<input type="text" class="input" id="guest_{index}_city" name="guest_{index}_city" placeholder="City" value={guest.city ?? ''} autocomplete="city">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap gap-2 p-1">
|
||||
<button
|
||||
type="submit"
|
||||
class="btn {parent.buttonPositive} btn-sm"
|
||||
disabled={($ae_loc.mod.sponsorships.disable_submit__sponsorship_obj)}
|
||||
on:click={() => {
|
||||
console.log('*** Save button clicked ***');
|
||||
// if (!confirm('Are you sure you want to save this sponsorship?')) {return false;}
|
||||
// handle_submit_form();
|
||||
// handle_submit_form;
|
||||
}}
|
||||
>
|
||||
<span class="fas fa-check mx-1"></span>
|
||||
Save
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="btn {parent.buttonNegative} btn-sm"
|
||||
on:click={(event) => {
|
||||
console.log('*** Delete button clicked ***');
|
||||
if (!confirm('Are you sure you want to delete this guest?')) {return false;}
|
||||
|
||||
$slct.sponsorship_obj.guest_li_json.splice(index, 1);
|
||||
$slct = $slct;
|
||||
|
||||
// Now we are ready to submit the form
|
||||
event.target.form.dispatchEvent(new Event('submit', {cancelable: true}));
|
||||
}}
|
||||
>
|
||||
<span class="fas fa-minus mx-1"></span>
|
||||
Delete
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
{/each}
|
||||
</form>
|
||||
|
||||
{:else}
|
||||
<div class="ae_warning">No guest list found!</div>
|
||||
{/if}
|
||||
|
||||
<button
|
||||
class="btn {parent.buttonPositive} m-2"
|
||||
on:click={() => {
|
||||
console.log('*** Add new guest button clicked ***');
|
||||
// if (!confirm('Are you sure you want to add a new guest?')) {return false;}
|
||||
|
||||
console.log($slct.sponsorship_obj.guest_li_json);
|
||||
|
||||
if (!$slct.sponsorship_obj.guest_li_json) {
|
||||
$slct.sponsorship_obj.guest_li_json = [];
|
||||
}
|
||||
|
||||
$slct.sponsorship_obj.guest_li_json.push({
|
||||
given_name: null,
|
||||
family_name: null,
|
||||
full_name: 'New Guest',
|
||||
email: null,
|
||||
phone_mobile: null,
|
||||
// phone_office: null,
|
||||
city: null,
|
||||
});
|
||||
|
||||
$slct = $slct;
|
||||
}}
|
||||
>
|
||||
<span class="fas fa-plus mx-1"></span>
|
||||
Add New Guest
|
||||
</button>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
{:else if store_current_tab === 'options'}
|
||||
|
||||
|
||||
<form
|
||||
class="modal-form {cForm}"
|
||||
on:submit|preventDefault={handle_submit_form}
|
||||
@@ -682,16 +891,16 @@ async function handle_update__sponsorship({
|
||||
<legend class="legend">Social Media</legend>
|
||||
|
||||
<label for="social_media_twitter" class="label">Twitter
|
||||
<input type="url" id="social_media_twitter" name="social_media_twitter" class="input" placeholder="Twitter" value={$slct.sponsorship_obj.social_media_twitter ?? ''} autocomplete="url" />
|
||||
<input type="url" id="social_media_twitter" name="social_media_twitter" class="input" placeholder="Twitter" value={$slct.sponsorship_obj.social_li_json.twitter ?? ''} autocomplete="url" />
|
||||
</label>
|
||||
<label for="social_media_facebook" class="label">Facebook
|
||||
<input type="url" id="social_media_facebook" name="social_media_facebook" class="input" placeholder="Facebook" value={$slct.sponsorship_obj.social_media_facebook ?? ''} autocomplete="url" />
|
||||
<input type="url" id="social_media_facebook" name="social_media_facebook" class="input" placeholder="Facebook" value={$slct.sponsorship_obj.social_li_json.facebook ?? ''} autocomplete="url" />
|
||||
</label>
|
||||
<label for="social_media_instagram" class="label">Instagram
|
||||
<input type="url" id="social_media_instagram" name="social_media_instagram" class="input" placeholder="Instagram" value={$slct.sponsorship_obj.social_media_instagram ?? ''} autocomplete="url" />
|
||||
<input type="url" id="social_media_instagram" name="social_media_instagram" class="input" placeholder="Instagram" value={$slct.sponsorship_obj.social_li_json.instagram ?? ''} autocomplete="url" />
|
||||
</label>
|
||||
<label for="social_media_linkedin" class="label">LinkedIn
|
||||
<input type="url" id="social_media_linkedin" name="social_media_linkedin" class="input" placeholder="LinkedIn" value={$slct.sponsorship_obj.social_media_linkedin ?? ''} autocomplete="url" />
|
||||
<input type="url" id="social_media_linkedin" name="social_media_linkedin" class="input" placeholder="LinkedIn" value={$slct.sponsorship_obj.social_li_json.linkedin ?? ''} autocomplete="url" />
|
||||
</label>
|
||||
</fieldset>
|
||||
|
||||
@@ -724,7 +933,7 @@ async function handle_update__sponsorship({
|
||||
class="btn {parent.buttonPositive}"
|
||||
disabled={($ae_loc.mod.sponsorships.disable_submit__sponsorship_obj)}
|
||||
on:click={() => {
|
||||
console.log('*** Save button clicked ***');
|
||||
console.log('*** Save more button clicked ***');
|
||||
// if (!confirm('Are you sure you want to save this sponsorship?')) {return false;}
|
||||
// handle_submit_form();
|
||||
// handle_submit_form;
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
// *** Import Svelte core
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
// import { getDrawerStore, getModalStore } from '@skeletonlabs/skeleton';
|
||||
// const modalStore = getModalStore();
|
||||
|
||||
// *** Import Aether core variables and functions
|
||||
import { ae_util } from '$lib/ae_utils';
|
||||
// import { ae } from 'aether_npm_lib';
|
||||
@@ -48,12 +51,13 @@ onMount(() => {
|
||||
$slct.sponsorship_obj = ae_sponsorship_obj;
|
||||
console.log(`Selected Sponsorship ID: ${$slct.sponsorship_id}`);
|
||||
console.log(`Selected Sponsorship Object:`, $slct.sponsorship_obj);
|
||||
$slct_trigger = 'load__sponsorship_obj';
|
||||
// $slct_trigger = 'load__sponsorship_obj';
|
||||
|
||||
$ae_loc.mod.sponsorships.show_main__options = true;
|
||||
$ae_loc.mod.sponsorships.show_edit__sponsorship_obj = false;
|
||||
$ae_loc.mod.sponsorships.show_list__sponsorship_obj_li = true;
|
||||
$ae_loc.mod.sponsorships.show_view__sponsorship_obj = true;
|
||||
$ae_loc.mod.sponsorships.show_edit__sponsorship_obj = false;
|
||||
$slct_trigger = 'show_view__sponsorship_obj';
|
||||
}}
|
||||
class="variant-soft-primary"
|
||||
title={`Open to see details: ${ae_sponsorship_obj.name}`}
|
||||
@@ -68,12 +72,15 @@ onMount(() => {
|
||||
on:click={() => {
|
||||
$slct.sponsorship_id = ae_sponsorship_obj.sponsorship_id_random;
|
||||
$slct.sponsorship_obj = ae_sponsorship_obj;
|
||||
console.log(`Selected Sponsorship ID: ${$slct.sponsorship_id}`);
|
||||
console.log(`Selected Sponsorship Object:`, $slct.sponsorship_obj);
|
||||
// $slct_trigger = 'load__sponsorship_obj';
|
||||
|
||||
// $ae_loc.mod.sponsorships.show_main__options = true;
|
||||
// $ae_loc.mod.sponsorships.show_list__sponsorship_obj_li = true;
|
||||
$ae_loc.mod.sponsorships.show_view__sponsorship_obj = false;
|
||||
$ae_loc.mod.sponsorships.show_main__options = true;
|
||||
$ae_loc.mod.sponsorships.show_edit__sponsorship_obj = true;
|
||||
$ae_loc.mod.sponsorships.show_list__sponsorship_obj_li = true;
|
||||
$ae_loc.mod.sponsorships.show_view__sponsorship_obj = false;
|
||||
$slct_trigger = 'show_edit__sponsorship_obj';
|
||||
}}
|
||||
class="variant-soft-warning"
|
||||
title={`Edit meeting: ${ae_sponsorship_obj.name}`}
|
||||
@@ -125,8 +132,8 @@ onMount(() => {
|
||||
{/if}
|
||||
</span></td>
|
||||
|
||||
<td>{ae_util.iso_datetime_formatter(ae_sponsorship_obj.created_on, 'datetime_short')}</td>
|
||||
<td>{ae_util.iso_datetime_formatter(ae_sponsorship_obj.updated_on, 'datetime_short')}</td>
|
||||
<td><span class="text-xs">{ae_util.iso_datetime_formatter(ae_sponsorship_obj.created_on, 'datetime_short')}</span></td>
|
||||
<td><span class="text-xs">{ae_util.iso_datetime_formatter(ae_sponsorship_obj.updated_on, 'datetime_short')}</span></td>
|
||||
|
||||
</tr>
|
||||
{/each}
|
||||
|
||||
@@ -1,23 +1,19 @@
|
||||
<script lang="ts">
|
||||
import type { SvelteComponent } from 'svelte';
|
||||
import { createEventDispatcher, onMount } from 'svelte';
|
||||
|
||||
// Stores
|
||||
// import { getModalStore } from '@skeletonlabs/skeleton';
|
||||
|
||||
import { ae_util } from '$lib/ae_utils';
|
||||
import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores';
|
||||
|
||||
// Props
|
||||
/** Exposes parent props to this component. */
|
||||
export let parent: SvelteComponent;
|
||||
|
||||
import { createEventDispatcher, onMount } from 'svelte';
|
||||
import { fade } from 'svelte/transition';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
import { ae_util } from '$lib/ae_utils';
|
||||
import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores';
|
||||
|
||||
export let container_class_li = [];
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
// const dispatch = createEventDispatcher();
|
||||
|
||||
if ($slct.sponsorship_id) {
|
||||
console.log(`Sponsorship ID selected: ${$slct.sponsorship_id}`);
|
||||
@@ -53,7 +49,7 @@ const cHeader = 'card-header text-2xl font-bold';
|
||||
|
||||
<!-- @component This is the Sponsorships modal view form. -->
|
||||
|
||||
<section class="svelte_component ae_section ae_view sponsorship_obj view__sponsorship_obj {container_class_li.join(' ')} {cBase}">
|
||||
<section class="svelte_component ae_section ae_view sponsorship_obj view__sponsorship_obj {cBase}">
|
||||
|
||||
<header class={cHeader}>{@html $slct.sponsorship_obj.name}</header>
|
||||
|
||||
|
||||
@@ -1,24 +1,31 @@
|
||||
<script lang="ts">
|
||||
export let data;
|
||||
console.log(`Svelte page data:`, data);
|
||||
|
||||
import { onMount } from 'svelte';
|
||||
export let data;
|
||||
console.log(`Svelte Sponsorships [slug] page data:`, data);
|
||||
|
||||
|
||||
import { api } from '$lib/api';
|
||||
import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores';
|
||||
|
||||
|
||||
// To retrieve the store, getModalStore must be invoked at the top level of your component!
|
||||
import { getDrawerStore, getModalStore } from '@skeletonlabs/skeleton';
|
||||
import type {
|
||||
DrawerSettings,
|
||||
ModalSettings
|
||||
, ModalComponent, ModalStore
|
||||
ModalSettings,
|
||||
ModalComponent,
|
||||
ModalStore
|
||||
} from '@skeletonlabs/skeleton';
|
||||
const modalStore = getModalStore();
|
||||
|
||||
import { api } from '$lib/api';
|
||||
import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores';
|
||||
|
||||
import Edit_modal_sponsorship_obj from '../10_edit_modal__sponsorship_obj.svelte';
|
||||
|
||||
type key_val = {
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
// Editing
|
||||
const modalComponentEditSponsorshipObj: ModalComponent = { ref: Edit_modal_sponsorship_obj };
|
||||
|
||||
const modal_edit__sponsorship_obj: ModalSettings = {
|
||||
@@ -28,11 +35,14 @@ const modal_edit__sponsorship_obj: ModalSettings = {
|
||||
position: '', // default is "items-center"
|
||||
};
|
||||
|
||||
$ae_loc.hostname = data.url.hostname;
|
||||
$ae_loc.site_domain = data.url.origin;
|
||||
|
||||
|
||||
onMount(() => {
|
||||
console.log('Sponsorships [New/Edit]: +page.svelte');
|
||||
|
||||
console.log(`$ae_loc = `, $ae_loc);
|
||||
// console.log(`$ae_loc = `, $ae_loc);
|
||||
|
||||
let url = window.location.href;
|
||||
console.log(url);
|
||||
@@ -45,8 +55,6 @@ onMount(() => {
|
||||
// console.log(`$ae_loc.href_url = `, $ae_loc.href_url);
|
||||
|
||||
|
||||
|
||||
|
||||
// Load the Sponsorship Cfg Obj with ID based on the URL param.
|
||||
$slct.sponsorship_cfg_id = data.url.searchParams.get('sponsorship_cfg_id');
|
||||
$slct_trigger = 'load__sponsorship_cfg_obj';
|
||||
@@ -173,7 +181,7 @@ async function handle_load_ae_obj_id__sponsorship({sponsorship_id, try_cache=fal
|
||||
|
||||
<section>More information goes here.</section>
|
||||
|
||||
<section class="btn btn-group">
|
||||
<!-- <section class="btn btn-group"> -->
|
||||
<button
|
||||
class="btn variant-ghost-primary"
|
||||
on:click={() => {
|
||||
@@ -185,6 +193,6 @@ async function handle_load_ae_obj_id__sponsorship({sponsorship_id, try_cache=fal
|
||||
<span class="fas fa-edit mx-1"></span>
|
||||
Start/Edit Sponsorship
|
||||
</button>
|
||||
</section>
|
||||
<!-- </section> -->
|
||||
|
||||
</section>
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
<script lang="ts">
|
||||
import type { SvelteComponent } from 'svelte';
|
||||
import { createEventDispatcher, onMount } from 'svelte';
|
||||
|
||||
// const dispatch = createEventDispatcher();
|
||||
|
||||
// import { localStorageStore } from '@skeletonlabs/skeleton';
|
||||
// import type { Writable } from 'svelte/store';
|
||||
// const store_current_tab: Writable<string> = localStorageStore('store_current_tab', 'start');
|
||||
let store_current_tab: string = 'start';
|
||||
// console.log(`store_current_tab:`, $store_current_tab);
|
||||
|
||||
// Stores
|
||||
import { getModalStore, FileDropzone, TabGroup, Tab, TabAnchor } from '@skeletonlabs/skeleton';
|
||||
|
||||
|
||||
import { ae_util } from '$lib/ae_utils';
|
||||
import { api } from '$lib/api';
|
||||
import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores';
|
||||
|
||||
type key_val = {
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
|
||||
// Props
|
||||
/** Exposes parent props to this component. */
|
||||
export let parent: SvelteComponent;
|
||||
|
||||
// const modalStore = getModalStore();
|
||||
|
||||
|
||||
|
||||
|
||||
onMount(() => {
|
||||
console.log('** Component Mounted: ** Edit Modal - Sponsorship Obj');
|
||||
});
|
||||
|
||||
|
||||
|
||||
// // Form Data
|
||||
// const formData = {
|
||||
// name: 'Jane Doe',
|
||||
// tel: '214-555-1234',
|
||||
// email: 'jdoe@email.com'
|
||||
// };
|
||||
|
||||
// const form_data = $slct.sponsorship_obj;
|
||||
|
||||
// We've created a custom submit function to pass the response and close the modal.
|
||||
// function onFormSubmit(): void {
|
||||
// if ($modalStore[0].response) $modalStore[0].response(formData);
|
||||
// modalStore.close();
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
// let tab_set = $store_current_tab;
|
||||
let tab_set = store_current_tab;
|
||||
|
||||
$ae_loc.mod.sponsorships.disable_submit__sponsorship_obj = false;
|
||||
let placeholder_li: key_val = {
|
||||
file_logo_primary: '-- No File Selected --',
|
||||
file_logo_secondary: '-- No File Selected --',
|
||||
file_media_promo_video: '-- No File Selected --',
|
||||
};
|
||||
let ae_promises_init: key_val = {};
|
||||
let ae_promises: key_val = {};
|
||||
// let ae_promises.api_create__sponsorship_obj: Promise<any>;
|
||||
|
||||
if ($slct.sponsorship_id && $slct.sponsorship_obj) {
|
||||
console.log(`Sponsorship ID selected: ${$slct.sponsorship_id}`);
|
||||
console.log(`Sponsorship Object selected: ${$slct.sponsorship_obj}`)
|
||||
|
||||
// $slct_trigger = 'load__sponsorship_obj';
|
||||
} else {
|
||||
$slct.sponsorship_id = null;
|
||||
$slct.sponsorship_obj = {
|
||||
sponsorship_cfg_id_random: $ae_loc.mod.sponsorships.sponsorship_cfg_id,
|
||||
|
||||
name: null,
|
||||
description: null,
|
||||
|
||||
poc_person_id: null,
|
||||
|
||||
logo_li_json: null,
|
||||
media_li_json: null,
|
||||
|
||||
social_li_json: null,
|
||||
|
||||
guest_li_json: null,
|
||||
|
||||
level_num: null,
|
||||
level_str: null,
|
||||
amount: null,
|
||||
paid: null,
|
||||
enable: null,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Base Classes
|
||||
const cBase = 'card p-4 w-modal-wide shadow-xl space-y-4 ae_modal_scrollfix';
|
||||
// const cBase = 'bg-surface-100-800-token w-screen h-screen';
|
||||
// const cBase = 'card h-screen';
|
||||
// const cBase = 'card p-4 w-modal-wide h-screen shadow-xl space-y-4';
|
||||
|
||||
const cHeader = 'text-2xl font-bold';
|
||||
const cForm = 'border border-surface-500 p-4 space-y-4 rounded-container-token';
|
||||
</script>
|
||||
|
||||
<!-- @component This is the Sponsorships modal edit form. -->
|
||||
|
||||
<!-- {#if $modalStore[0]} -->
|
||||
<section class="modal-example-form {cBase}">
|
||||
<!-- <header class={cHeader}>{$modalStore[0].title ?? '-- No Title --'}</header> -->
|
||||
<header class={cHeader}>Start/Edit Sponsorship</header>
|
||||
|
||||
here....
|
||||
|
||||
<!-- </form> -->
|
||||
<!-- prettier-ignore -->
|
||||
<footer class="modal-footer {parent.regionFooter}">
|
||||
{#if $slct.sponsorship_id}
|
||||
<!-- {#if $ae_loc.administrator_access} -->
|
||||
<button
|
||||
on:click={() => {
|
||||
// if (!confirm('Are you sure you want to delete this sponsorship?')) {return false;}
|
||||
// handle_delete_sponsorship_obj({sponsorship_id: $slct.sponsorship_id, method: 'delete'});
|
||||
|
||||
// $slct.sponsorship_id = null;
|
||||
// $slct.sponsorship_obj = {};
|
||||
}}
|
||||
class="btn {parent.buttonNegative}"
|
||||
title="Delete record permanently"
|
||||
>
|
||||
<span class="fas fa-minus mx-1"></span> Delete
|
||||
</button>
|
||||
<!-- {/if} -->
|
||||
{/if}
|
||||
<button class="btn {parent.buttonNeutral}" on:click={parent.onClose}>
|
||||
<span class="fas fa-window-close mx-1"></span>
|
||||
{parent.buttonTextCancel}
|
||||
</button>
|
||||
</footer>
|
||||
</section>
|
||||
<!-- {/if} -->
|
||||
|
||||
|
||||
<style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user