@fullstackunicorn/create-root 1.0.23 → 1.0.24
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/assets/root.fullstackunicorn.dev/assets/index.def.js +32 -4
- package/assets/root.fullstackunicorn.dev/assets/modules/sync.js +164 -302
- package/assets/root.fullstackunicorn.dev/assets/modules/sync.tools.js +39 -6
- package/assets/root.fullstackunicorn.dev/assets/package.md +9 -2
- package/assets/root.fullstackunicorn.dev/assets/webapp.runner.js +42 -1
- package/assets/root.fullstackunicorn.dev/frontend/base/account/AccountCard.js +1 -1
- package/assets/root.fullstackunicorn.dev/frontend/base/cookies/@use.js +5 -93
- package/assets/root.fullstackunicorn.dev/frontend/base/cookies/CookiesCard.js +1 -1
- package/assets/root.fullstackunicorn.dev/frontend/base/language/@use.js +4 -69
- package/assets/root.fullstackunicorn.dev/frontend/base/language/LanguageCard.js +1 -1
- package/assets/root.fullstackunicorn.dev/frontend/base/layout/Layout.pod.js +2 -2
- package/assets/root.fullstackunicorn.dev/frontend/base/legals/LegalCard.js +1 -1
- package/assets/root.fullstackunicorn.dev/frontend/base/legals/LegalsCard.js +1 -1
- package/assets/root.fullstackunicorn.dev/frontend/base/resources/@use.js +15 -0
- package/assets/root.fullstackunicorn.dev/frontend/base/router/@use.js +2 -1
- package/assets/root.fullstackunicorn.dev/frontend/base/theme/ThemeCard.js +1 -1
- package/assets/root.fullstackunicorn.dev/frontend/config.style.js +21 -9
- package/assets/root.fullstackunicorn.dev/frontend/features/legal/Legal.js +1 -1
- package/assets/root.fullstackunicorn.dev/frontend/imports/animated/Root.js +4 -8
- package/assets/root.fullstackunicorn.dev/frontend/imports/core/Scrollable.js +7 -2
- package/assets/root.fullstackunicorn.dev/frontend/imports/core/Viewport.js +29 -0
- package/assets/root.fullstackunicorn.dev/frontend/imports/head/Head.js +16 -26
- package/assets/root.fullstackunicorn.dev/frontend/modals/cookies/cookies.api.js +25 -0
- package/assets/root.fullstackunicorn.dev/frontend/modals/cookies/cookies.js +88 -0
- package/assets/root.fullstackunicorn.dev/frontend/modals/countries/countries.api.js +22 -0
- package/assets/root.fullstackunicorn.dev/frontend/modals/countries/countries.js +58 -37
- package/assets/root.fullstackunicorn.dev/frontend/modals/languages/languages.api.js +23 -0
- package/assets/root.fullstackunicorn.dev/frontend/modals/languages/languages.js +81 -0
- package/assets/root.fullstackunicorn.dev/frontend/modules/base/Bottom.js +10 -0
- package/assets/root.fullstackunicorn.dev/frontend/{panels/layout → modules/base}/Bottom.pod.js +1 -4
- package/assets/root.fullstackunicorn.dev/frontend/modules/base/ComingSoon.js +7 -0
- package/assets/root.fullstackunicorn.dev/frontend/modules/base/ComingSoon.pod.js +17 -0
- package/assets/root.fullstackunicorn.dev/frontend/{panels/error → modules/base}/ErrorPage.js +4 -4
- package/assets/root.fullstackunicorn.dev/frontend/{panels/error → modules/base}/ErrorPage.pod.js +7 -7
- package/assets/root.fullstackunicorn.dev/frontend/{panels/layout → modules/base}/PageTitle.js +1 -1
- package/assets/root.fullstackunicorn.dev/frontend/{panels/layout → modules/base}/PageTitle.pod.js +4 -6
- package/assets/root.fullstackunicorn.dev/frontend/{panels → modules}/cards/Account.js +9 -8
- package/assets/root.fullstackunicorn.dev/frontend/{panels → modules}/cards/Account.pod.js +28 -18
- package/assets/root.fullstackunicorn.dev/frontend/{panels → modules}/cards/Launcher.js +4 -4
- package/assets/root.fullstackunicorn.dev/frontend/{panels → modules}/cards/Launcher.pod.js +10 -11
- package/assets/root.fullstackunicorn.dev/frontend/{panels → modules}/cards/Linker.js +4 -4
- package/assets/root.fullstackunicorn.dev/frontend/{panels → modules}/cards/Linker.pod.js +11 -12
- package/assets/root.fullstackunicorn.dev/frontend/{panels → modules}/cards/Slider.js +8 -7
- package/assets/root.fullstackunicorn.dev/frontend/{panels → modules}/cards/Slider.pod.js +14 -14
- package/assets/root.fullstackunicorn.dev/frontend/{panels/wrapper/fixed → modules/layout}/Wrapper.js +2 -2
- package/assets/root.fullstackunicorn.dev/frontend/{panels/wrapper/fixed → modules/layout}/Wrapper.pod.js +1 -1
- package/assets/root.fullstackunicorn.dev/frontend/{panels/selectors/actions → modules/modals/select}/Actions.js +1 -1
- package/assets/root.fullstackunicorn.dev/frontend/{panels/selectors → modules/modals}/select/SelectPage.js +2 -2
- package/assets/root.fullstackunicorn.dev/frontend/{panels/sliders → modules/modals}/slider/SliderPage.js +2 -2
- package/assets/root.fullstackunicorn.dev/frontend/{panels → modules}/page/PageScrollable.js +1 -1
- package/assets/root.fullstackunicorn.dev/frontend/modules/page/PageScrollable.pod.js +23 -0
- package/assets/root.fullstackunicorn.dev/frontend/modules/prose/@runs.js +52 -0
- package/assets/root.fullstackunicorn.dev/frontend/modules/prose/Prose.js +56 -0
- package/assets/root.fullstackunicorn.dev/frontend/{panels → modules}/prose/Prose.pod.js +2 -14
- package/assets/root.fullstackunicorn.dev/frontend/pages/@use.js +26 -11
- package/assets/root.fullstackunicorn.dev/frontend/pages/root/Callout.api.js +9 -25
- package/assets/root.fullstackunicorn.dev/frontend/pages/root/Callout.js +1 -1
- package/assets/root.fullstackunicorn.dev/frontend/pages/root/Legal.api.js +16 -24
- package/assets/root.fullstackunicorn.dev/frontend/pages/root/Legal.js +2 -2
- package/assets/root.fullstackunicorn.dev/frontend/pages/root/Legals.api.js +14 -8
- package/assets/root.fullstackunicorn.dev/frontend/pages/root/Legals.js +5 -5
- package/assets/root.fullstackunicorn.dev/frontend/pages/root/User.api.js +8 -11
- package/assets/root.fullstackunicorn.dev/frontend/pages/root/User.js +1 -1
- package/assets/root.fullstackunicorn.dev/frontend/pages/{app → scope}/Checkout.js +1 -1
- package/assets/root.fullstackunicorn.dev/frontend/pages/scope/Home.abs.js +18 -0
- package/assets/root.fullstackunicorn.dev/frontend/pages/scope/Home.api.js +15 -0
- package/assets/root.fullstackunicorn.dev/frontend/pages/scope/Home.js +24 -0
- package/assets/root.fullstackunicorn.dev/frontend/panels/{slider/Slider.js → slideshows/Slideshow.js} +34 -20
- package/assets/root.fullstackunicorn.dev/frontend/panels/slideshows/Slideshow.map.js +27 -0
- package/assets/root.fullstackunicorn.dev/frontend/panels/slideshows/Slideshow.md +90 -0
- package/assets/root.fullstackunicorn.dev/frontend/panels/{slider/Slider.pod.js → slideshows/Slideshow.pod.js} +14 -28
- package/assets/root.fullstackunicorn.dev/frontend/preloader/@use.js +4 -5
- package/assets/root.fullstackunicorn.dev/frontend/root/errors.root.js +1 -1
- package/assets/root.fullstackunicorn.dev/frontend/root/modals.root.js +8 -8
- package/assets/root.fullstackunicorn.dev/frontend/root/pages.scope.js +2 -2
- package/assets/root.fullstackunicorn.dev/frontend/root/preload.scope.js +1 -1
- package/assets/root.fullstackunicorn.dev/package.json +1 -1
- package/assets/root.fullstackunicorn.dev/workspace/config/tabulars_data_content/config/import.json +4 -26
- package/assets/root.fullstackunicorn.dev/workspace/config/tabulars_data_content/objs/A01.metadata.meta.json +72 -79
- package/assets/root.fullstackunicorn.dev/workspace/config/tabulars_data_content/objs/C01.home.data.json +25 -5
- package/assets/root.fullstackunicorn.dev/workspace/volume/data/lookups/cookies/en-US.json +3 -19
- package/assets/root.fullstackunicorn.dev/workspace/volume/data/lookups/cookies/it-IT.json +6 -22
- package/assets/root.fullstackunicorn.dev/workspace/volume/data/root/user/en-US.json +4 -6
- package/assets/root.fullstackunicorn.dev/workspace/volume/data/root/user/it-IT.json +5 -19
- package/package.json +1 -1
- package/assets/root.fullstackunicorn.dev/frontend/pages/app/Home.abs.js +0 -11
- package/assets/root.fullstackunicorn.dev/frontend/pages/app/Home.api.js +0 -18
- package/assets/root.fullstackunicorn.dev/frontend/pages/app/Home.js +0 -23
- package/assets/root.fullstackunicorn.dev/frontend/panels/card/book/BookCard.js +0 -58
- package/assets/root.fullstackunicorn.dev/frontend/panels/card/book/BookCard.pod.js +0 -37
- package/assets/root.fullstackunicorn.dev/frontend/panels/card/book/BookProse.js +0 -22
- package/assets/root.fullstackunicorn.dev/frontend/panels/grid/book/Grid.js +0 -115
- package/assets/root.fullstackunicorn.dev/frontend/panels/grid/book/Grid.pod.js +0 -65
- package/assets/root.fullstackunicorn.dev/frontend/panels/grid/book/Item.js +0 -3
- package/assets/root.fullstackunicorn.dev/frontend/panels/grid/book/Item.pod.js +0 -50
- package/assets/root.fullstackunicorn.dev/frontend/panels/layout/Bottom.js +0 -12
- package/assets/root.fullstackunicorn.dev/frontend/panels/page/PageScrollable.pod.js +0 -85
- package/assets/root.fullstackunicorn.dev/frontend/panels/prose/@use.js +0 -21
- package/assets/root.fullstackunicorn.dev/frontend/panels/prose/Prose.js +0 -84
- package/assets/root.fullstackunicorn.dev/frontend/panels/selectors/popup/PopupModal.js +0 -54
- package/assets/root.fullstackunicorn.dev/frontend/panels/selectors/select/SelectModal.js +0 -52
- package/assets/root.fullstackunicorn.dev/frontend/panels/shopper/bookstore/Buy.js +0 -19
- package/assets/root.fullstackunicorn.dev/frontend/panels/shopper/bookstore/Buy.pod.js +0 -17
- package/assets/root.fullstackunicorn.dev/frontend/panels/shopper/bookstore/Shopper.js +0 -39
- package/assets/root.fullstackunicorn.dev/frontend/panels/shopper/bookstore/Shopper.pod.js +0 -187
- package/assets/root.fullstackunicorn.dev/frontend/panels/sliders/slider/SliderModal.js +0 -39
- /package/assets/root.fullstackunicorn.dev/frontend/{panels/selectors/actions → modules/modals/select}/Actions.pod.js +0 -0
- /package/assets/root.fullstackunicorn.dev/frontend/{panels/selectors → modules/modals}/select/SelectItem.js +0 -0
- /package/assets/root.fullstackunicorn.dev/frontend/{panels/selectors → modules/modals}/select/SelectItem.pod.js +0 -0
- /package/assets/root.fullstackunicorn.dev/frontend/{panels/selectors → modules/modals}/select/SelectPage.pod.js +0 -0
- /package/assets/root.fullstackunicorn.dev/frontend/{panels/selectors/actions → modules/modals/select}/SelectPicked.js +0 -0
- /package/assets/root.fullstackunicorn.dev/frontend/{panels/selectors/actions → modules/modals/select}/SelectPicked.pod.js +0 -0
- /package/assets/root.fullstackunicorn.dev/frontend/{panels/sliders/actions → modules/modals/slider}/Actions.js +0 -0
- /package/assets/root.fullstackunicorn.dev/frontend/{panels/sliders/actions → modules/modals/slider}/Actions.pod.js +0 -0
- /package/assets/root.fullstackunicorn.dev/frontend/{panels/sliders → modules/modals}/slider/SliderItem.js +0 -0
- /package/assets/root.fullstackunicorn.dev/frontend/{panels/sliders → modules/modals}/slider/SliderItem.pod.js +0 -0
- /package/assets/root.fullstackunicorn.dev/frontend/{panels/sliders → modules/modals}/slider/SliderPage.pod.js +0 -0
- /package/assets/root.fullstackunicorn.dev/frontend/{panels → modules}/prose/@formatter.js +0 -0
- /package/assets/root.fullstackunicorn.dev/frontend/{panels → modules}/prose/Basic.js +0 -0
- /package/assets/root.fullstackunicorn.dev/frontend/{panels → modules}/prose/Basic.pod.js +0 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { useRef } from 'react'
|
|
2
|
+
import { storage } from '#@/imports/storage.js'
|
|
3
|
+
import { api } from '#@/client/@api.js'
|
|
4
|
+
import { constants } from '#@/root/constants.js'
|
|
5
|
+
import { tools } from '#@/base/cookies/@tools.js'
|
|
6
|
+
import { useGetStatics } from '#@/base/statics/@use.js'
|
|
7
|
+
import { useModalClose } from '#@/base/modals/@use.js'
|
|
8
|
+
import { useCookies, useGetConsent, useSetCookies, useSetConsent, useGetAgreement } from '#@/base/cookies/@use.js'
|
|
9
|
+
import { useSetAlerts } from '#@/base/alerts/@use.js'
|
|
10
|
+
import { Modal } from '#@/base/modals/Modal.js'
|
|
11
|
+
import { SliderPage } from '#@/modules/modals/slider/SliderPage.js'
|
|
12
|
+
import { Actions } from '#@/modules/modals/slider/Actions.js'
|
|
13
|
+
import { TextButton } from '#@/modules/buttons/TextButton.js'
|
|
14
|
+
import { useCookiesData } from '#@/modals/cookies/cookies.api.js'
|
|
15
|
+
|
|
16
|
+
const CookiesModal = ({ id }) => {
|
|
17
|
+
|
|
18
|
+
const data = useCookiesData()
|
|
19
|
+
const statics = useGetStatics()
|
|
20
|
+
const consent = useGetConsent()
|
|
21
|
+
const [cookieValues] = useCookies()
|
|
22
|
+
const setAlerts = useSetAlerts()
|
|
23
|
+
const setCookies = useSetCookies()
|
|
24
|
+
const setConsent = useSetConsent()
|
|
25
|
+
const modalClose = useModalClose()
|
|
26
|
+
const getAgreement = useGetAgreement()
|
|
27
|
+
|
|
28
|
+
const formResult = useRef({})
|
|
29
|
+
formResult.current = cookieValues
|
|
30
|
+
|
|
31
|
+
const isCloseDisabled = !consent
|
|
32
|
+
const isLanguageButton = !constants.services.IS_CARD_LANGUAGE_OFF
|
|
33
|
+
|
|
34
|
+
const onSetValue = async () => {
|
|
35
|
+
|
|
36
|
+
const device = storage.get('device')
|
|
37
|
+
const agreement = getAgreement({
|
|
38
|
+
agreement_type: statics.logic.cookies.type,
|
|
39
|
+
agreement_version: statics.logic.cookies.version,
|
|
40
|
+
agreement_subject_id: device,
|
|
41
|
+
agreement_subject_type: 'device_id',
|
|
42
|
+
agreement_agreed: formResult.current,
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
const agreements = { [statics.logic.cookies.type]: agreement }
|
|
46
|
+
const submit = await tools.getSubmit(device)
|
|
47
|
+
const consentPayload = [{ agreements, submit }]
|
|
48
|
+
const response = await api.cookies.set(consentPayload)
|
|
49
|
+
|
|
50
|
+
if (response.isOffline) setAlerts({ id: 'offline' })
|
|
51
|
+
else if (response.isError) setAlerts({ id: 'error-cookies-set' })
|
|
52
|
+
else if (response.isValid) {
|
|
53
|
+
setCookies(response.data)
|
|
54
|
+
setConsent(response.consent_id)
|
|
55
|
+
void api.cookies.get()
|
|
56
|
+
}
|
|
57
|
+
modalClose(id)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<Modal
|
|
62
|
+
id={id}
|
|
63
|
+
isCloseDisabled={isCloseDisabled}
|
|
64
|
+
title={data.itemVerbal.title}
|
|
65
|
+
svg={data.svg}
|
|
66
|
+
actions={
|
|
67
|
+
<Actions isLanguageButton={isLanguageButton}>
|
|
68
|
+
<TextButton
|
|
69
|
+
text={data.itemVerbal.action}
|
|
70
|
+
type='fill'
|
|
71
|
+
color='C1'
|
|
72
|
+
onPress={onSetValue}
|
|
73
|
+
/>
|
|
74
|
+
</Actions>
|
|
75
|
+
}
|
|
76
|
+
>
|
|
77
|
+
<SliderPage
|
|
78
|
+
formResult={formResult}
|
|
79
|
+
sliderLogic={data.itemLogic}
|
|
80
|
+
sliderVerbal={data.itemVerbal.data}
|
|
81
|
+
sliderVisual={data.itemVisual}
|
|
82
|
+
description={data.itemVerbal.description}
|
|
83
|
+
/>
|
|
84
|
+
</Modal>
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export const cookies = (modal={}) => <CookiesModal key={modal.id} {...modal}/>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { uri } from '#@/App.uri.js'
|
|
2
|
+
import { api } from '#@/client/@api.js'
|
|
3
|
+
import { useUrl } from '#@/base/router/@use.js'
|
|
4
|
+
import { useLoad } from '#@/pages/@use.js'
|
|
5
|
+
|
|
6
|
+
const path = 'countries'
|
|
7
|
+
|
|
8
|
+
const fetch = async params => {
|
|
9
|
+
const verbal = await api.statics.get(uri.lookups.verbal, params)
|
|
10
|
+
const visual = await api.statics.get(uri.lookups.visual, params)
|
|
11
|
+
return {
|
|
12
|
+
data: {
|
|
13
|
+
verbal: verbal.data['@data'],
|
|
14
|
+
visual: visual.data
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const useApiCountries = () => {
|
|
20
|
+
const { lang } = useUrl()
|
|
21
|
+
return useLoad(fetch, lang, path)
|
|
22
|
+
}
|
|
@@ -1,39 +1,60 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { useState } from 'react'
|
|
2
|
+
import { useGetStatics } from '#@/base/statics/@use.js'
|
|
3
|
+
import { useModalClose } from '#@/base/modals/@use.js'
|
|
4
|
+
import { Modal } from '#@/base/modals/Modal.js'
|
|
5
|
+
import { SelectPage } from '#@/modules/modals/select/SelectPage.js'
|
|
6
|
+
import { Actions } from '#@/modules/modals/select/Actions.js'
|
|
7
|
+
import { useApiCountries } from '#@/modals/countries/countries.api.js'
|
|
8
|
+
|
|
9
|
+
const CountriesModal = ({ id, data = {} }) => {
|
|
10
|
+
|
|
11
|
+
const { onSetValue, current } = data
|
|
12
|
+
|
|
13
|
+
const api = useApiCountries()
|
|
14
|
+
|
|
15
|
+
const statics = useGetStatics()
|
|
16
|
+
const modalClose = useModalClose()
|
|
17
|
+
|
|
18
|
+
const [value, setValue] = useState(current)
|
|
19
|
+
|
|
20
|
+
if (!api) return null
|
|
21
|
+
|
|
22
|
+
const itemLogic = { options: Object.keys(api.verbal.data.items) }
|
|
23
|
+
const itemVerbal = { options: api.verbal.data.items, title: api.verbal.views.modal.title }
|
|
24
|
+
const itemVisual = { options: api.visual }
|
|
25
|
+
|
|
26
|
+
const isDisabled = value?.slug === current?.slug
|
|
27
|
+
|
|
28
|
+
const onSave = async () => {
|
|
29
|
+
if (onSetValue) await onSetValue(value)
|
|
30
|
+
modalClose(id)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const onRestore = () => setValue(current)
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<Modal
|
|
37
|
+
id={id}
|
|
38
|
+
title={itemVerbal.title}
|
|
39
|
+
svg={statics.visual.svg.edit}
|
|
40
|
+
actions={
|
|
41
|
+
<Actions
|
|
42
|
+
selected={value}
|
|
43
|
+
onSave={onSave}
|
|
44
|
+
onRestore={onRestore}
|
|
45
|
+
isDisabled={isDisabled}
|
|
46
|
+
/>
|
|
47
|
+
}
|
|
48
|
+
>
|
|
49
|
+
<SelectPage
|
|
50
|
+
itemLogic={itemLogic}
|
|
51
|
+
itemVerbal={itemVerbal}
|
|
52
|
+
itemVisual={itemVisual}
|
|
53
|
+
selected={value}
|
|
54
|
+
setValue={setValue}
|
|
55
|
+
/>
|
|
56
|
+
</Modal>
|
|
57
|
+
)
|
|
17
58
|
}
|
|
18
59
|
|
|
19
|
-
|
|
20
|
-
// export const usePreloadCountriesList = () => {
|
|
21
|
-
// const { lang } = useUrl()
|
|
22
|
-
// const result = F3.fabUrl(uri.lookups.verbal, {lang, path})
|
|
23
|
-
// return result
|
|
24
|
-
// }
|
|
25
|
-
|
|
26
|
-
// // #3B define usePreload hook
|
|
27
|
-
// export const usePreloadCountries = () => {
|
|
28
|
-
// const { lang } = useUrl()
|
|
29
|
-
// const key = F3.fabUrl(uri.lookups.verbal, {lang, path})
|
|
30
|
-
// const result = usePreload(dataFetch, lang, path, key)
|
|
31
|
-
// return result
|
|
32
|
-
// }
|
|
33
|
-
|
|
34
|
-
// #4 define useApi hook
|
|
35
|
-
export const useApiCountries = () => {
|
|
36
|
-
const { lang } = useUrl()
|
|
37
|
-
const result = useLoad(dataFetch, lang, path)
|
|
38
|
-
return result
|
|
39
|
-
}
|
|
60
|
+
export const countries = (modal={}) => <CountriesModal key={modal.id} {...modal}/>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { tools } from '#@/base/language/@tools.js'
|
|
2
|
+
import { useGetStatics } from '#@/base/statics/@use.js'
|
|
3
|
+
import { useGetLookups } from '#@/base/lookups/@use.js'
|
|
4
|
+
import { useGetLanguage } from '#@/base/language/@use.js'
|
|
5
|
+
|
|
6
|
+
export const useLanguagesData = () => {
|
|
7
|
+
|
|
8
|
+
const statics = useGetStatics()
|
|
9
|
+
const lookups = useGetLookups()
|
|
10
|
+
const language = useGetLanguage()
|
|
11
|
+
|
|
12
|
+
const langs = [statics.logic['@lang'], ...F3.arr.safe(statics.logic['@langs'])]
|
|
13
|
+
const label = tools.getLanguageLabel(lookups, language.slug)
|
|
14
|
+
|
|
15
|
+
return {
|
|
16
|
+
current: { slug: language.slug, value: label },
|
|
17
|
+
itemLogic: { options: langs },
|
|
18
|
+
itemVerbal: {
|
|
19
|
+
options: tools.getLanguages(lookups, langs),
|
|
20
|
+
title: lookups.languages.verbal.views.modal.title
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { useState } from 'react'
|
|
2
|
+
import { useNavigate } from '#@/imports/router.js'
|
|
3
|
+
import { api } from '#@/client/@api.js'
|
|
4
|
+
import { uri } from '#@/App.uri.js'
|
|
5
|
+
import { tools } from '#@/base/language/@tools.js'
|
|
6
|
+
import { useUrl, useHistory } from '#@/base/router/@use.js'
|
|
7
|
+
import { useGetStatics, useSetVerbal } from '#@/base/statics/@use.js'
|
|
8
|
+
import { useLanguage } from '#@/base/language/@use.js'
|
|
9
|
+
import { useGetLookups } from '#@/base/lookups/@use.js'
|
|
10
|
+
import { useSetAlerts } from '#@/base/alerts/@use.js'
|
|
11
|
+
import { useModalClose } from '#@/base/modals/@use.js'
|
|
12
|
+
import { Modal } from '#@/base/modals/Modal.js'
|
|
13
|
+
import { SelectPage } from '#@/modules/modals/select/SelectPage.js'
|
|
14
|
+
import { Actions } from '#@/modules/modals/select/Actions.js'
|
|
15
|
+
import { useLanguagesData } from '#@/modals/languages/languages.api.js'
|
|
16
|
+
|
|
17
|
+
const LanguagesModal = ({ id }) => {
|
|
18
|
+
|
|
19
|
+
const data = useLanguagesData()
|
|
20
|
+
|
|
21
|
+
const [value, setValue] = useState(data.current)
|
|
22
|
+
|
|
23
|
+
const statics = useGetStatics()
|
|
24
|
+
const { path } = useUrl()
|
|
25
|
+
const navigate = useNavigate()
|
|
26
|
+
const [history, setHistory] = useHistory()
|
|
27
|
+
const setVerbal = useSetVerbal()
|
|
28
|
+
const [language, setLanguage] = useLanguage()
|
|
29
|
+
const lookups = useGetLookups()
|
|
30
|
+
const setAlerts = useSetAlerts({})
|
|
31
|
+
const modalClose = useModalClose()
|
|
32
|
+
|
|
33
|
+
const isDisabled = value.slug === data.current.slug
|
|
34
|
+
|
|
35
|
+
const onSave = async () => {
|
|
36
|
+
if (value.slug === language.slug) return modalClose(id)
|
|
37
|
+
if (!data.itemLogic.options.includes(value.slug)) return
|
|
38
|
+
|
|
39
|
+
const localVerbal = await api.statics.get(uri.data.root.verbal, { lang: value.slug })
|
|
40
|
+
|
|
41
|
+
const result = {}
|
|
42
|
+
result.verbal = localVerbal['@data']
|
|
43
|
+
result.language = tools.getLanguage(value.slug, statics.logic)
|
|
44
|
+
|
|
45
|
+
if (!result.language || !result.verbal) {
|
|
46
|
+
return setAlerts({ id: 'no-language', params: { language: tools.getLanguageLabel(lookups, value.slug) } })
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
setHistory(tools.getNewHistory(history, value.slug))
|
|
50
|
+
setVerbal(result.verbal)
|
|
51
|
+
setLanguage(result.language)
|
|
52
|
+
navigate(`/${value.slug}/${path}`)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const onRestore = () => setValue(data.current)
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<Modal
|
|
59
|
+
id={id}
|
|
60
|
+
title={data.itemVerbal.title}
|
|
61
|
+
svg={statics.visual.svg.edit}
|
|
62
|
+
actions={
|
|
63
|
+
<Actions
|
|
64
|
+
selected={value}
|
|
65
|
+
onSave={onSave}
|
|
66
|
+
onRestore={onRestore}
|
|
67
|
+
isDisabled={isDisabled}
|
|
68
|
+
/>
|
|
69
|
+
}
|
|
70
|
+
>
|
|
71
|
+
<SelectPage
|
|
72
|
+
itemLogic={data.itemLogic}
|
|
73
|
+
itemVerbal={data.itemVerbal}
|
|
74
|
+
selected={value}
|
|
75
|
+
setValue={setValue}
|
|
76
|
+
/>
|
|
77
|
+
</Modal>
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export const languages = (modal={}) => <LanguagesModal key={modal.id} {...modal}/>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BottomPod } from '#@/modules/base/Bottom.pod.js'
|
|
2
|
+
|
|
3
|
+
export const Bottom = () => {
|
|
4
|
+
|
|
5
|
+
const year = new Date().getFullYear()
|
|
6
|
+
const minderable = { href: 'https://websites.minderable.com', text: 'Powered by Minderable' }
|
|
7
|
+
const text = `Copyright © ${year}`
|
|
8
|
+
|
|
9
|
+
return <BottomPod text={text} minderable={minderable} />
|
|
10
|
+
}
|
package/assets/root.fullstackunicorn.dev/frontend/{panels/layout → modules/base}/Bottom.pod.js
RENAMED
|
@@ -11,13 +11,11 @@ export const BottomPod = ({ text, minderable }) => {
|
|
|
11
11
|
F.text = [s.fs14, s.lh24, s.fw400]
|
|
12
12
|
|
|
13
13
|
S.bottom = [s.row_cXcY, s.Xc]
|
|
14
|
-
S.space = [s.Yc]
|
|
15
14
|
S.box = [s.row_cXcY, s.Xc, s.Y48]
|
|
16
15
|
S.textBox = [s.row_cXcY, s.Y48]
|
|
17
16
|
S.text = [...F.text, c.item_NN_B400]
|
|
18
17
|
S.dotBox = [s.row_cXcY, s.Y48, s.X20]
|
|
19
18
|
S.dot = [s.XY4, s.radiusRound, c.base_NN_B400]
|
|
20
|
-
// S.line = [s.Y2, s.Xc, c.base_NN_W700]
|
|
21
19
|
|
|
22
20
|
I.bottom = { marginTop: 'auto' }
|
|
23
21
|
|
|
@@ -28,7 +26,7 @@ export const BottomPod = ({ text, minderable }) => {
|
|
|
28
26
|
<Textline classes={S.text} text={text} />
|
|
29
27
|
</Link>
|
|
30
28
|
<View classes={S.dotBox}>
|
|
31
|
-
<View classes={S.dot}
|
|
29
|
+
<View classes={S.dot} />
|
|
32
30
|
</View>
|
|
33
31
|
<Href classes={S.textBox} linkTo={minderable.href} isExternal>
|
|
34
32
|
<Textline classes={S.text} text={minderable.text} />
|
|
@@ -37,4 +35,3 @@ export const BottomPod = ({ text, minderable }) => {
|
|
|
37
35
|
</View>
|
|
38
36
|
)
|
|
39
37
|
}
|
|
40
|
-
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useStyle } from '#@/style/@use.js'
|
|
2
|
+
import { View } from '#@/imports/core/View.js'
|
|
3
|
+
import { Img } from '#@/imports/core/Img.js'
|
|
4
|
+
|
|
5
|
+
export const ComingSoonPod = ({ picture }) => {
|
|
6
|
+
|
|
7
|
+
const { s, c, f, t, F, B, S, I, H } = useStyle()
|
|
8
|
+
|
|
9
|
+
S.box = [s.col_cXsY, s.XY, s.marginB8]
|
|
10
|
+
S.image = [s.X, s.radiusB16]
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<View classes={S.box}>
|
|
14
|
+
<Img classes={S.image} picture={picture} />
|
|
15
|
+
</View>
|
|
16
|
+
)
|
|
17
|
+
}
|
package/assets/root.fullstackunicorn.dev/frontend/{panels/error → modules/base}/ErrorPage.js
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Logo } from '#@/modules/trademarks/Logo'
|
|
2
|
-
import { ErrorPagePod } from '
|
|
1
|
+
import { Logo } from '#@/modules/trademarks/Logo.js'
|
|
2
|
+
import { ErrorPagePod } from '#@/modules/base/ErrorPage.pod.js'
|
|
3
3
|
|
|
4
4
|
export const ErrorPage = ({ title, text }) => {
|
|
5
5
|
return (
|
|
6
6
|
<ErrorPagePod
|
|
7
7
|
title={title}
|
|
8
8
|
text={text}
|
|
9
|
-
logo={<Logo/>}
|
|
9
|
+
logo={<Logo />}
|
|
10
10
|
/>
|
|
11
11
|
)
|
|
12
|
-
}
|
|
12
|
+
}
|
package/assets/root.fullstackunicorn.dev/frontend/{panels/error → modules/base}/ErrorPage.pod.js
RENAMED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { useStyle } from '#@/style/@use'
|
|
2
|
-
import { View } from '#@/imports/core/View'
|
|
3
|
-
import { Text } from '#@/imports/core/Text'
|
|
1
|
+
import { useStyle } from '#@/style/@use.js'
|
|
2
|
+
import { View } from '#@/imports/core/View.js'
|
|
3
|
+
import { Text } from '#@/imports/core/Text.js'
|
|
4
4
|
|
|
5
|
-
export const ErrorPagePod = ({ logo, title, text}) => {
|
|
5
|
+
export const ErrorPagePod = ({ logo, title, text }) => {
|
|
6
6
|
|
|
7
7
|
const { s, c, f, t, F, B, S, I, H } = useStyle()
|
|
8
8
|
|
|
9
9
|
S.box = [s.col, s.Xc]
|
|
10
10
|
S.title = [...t.root.main.title, s.paddingX6]
|
|
11
11
|
S.text = [...t.root.main.description]
|
|
12
|
-
S.boxText = [s.col_cY, s.paddingX6, s.marginT8]
|
|
12
|
+
S.boxText = [s.col_cY, s.paddingX6, s.marginT8]
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
15
|
<View classes={S.box}>
|
|
16
16
|
{logo}
|
|
17
17
|
<Text classes={S.title} text={title} />
|
|
18
18
|
<View classes={S.boxText}>
|
|
19
|
-
<Text classes={S.text} font={f.f1} text={text} />
|
|
19
|
+
<Text classes={S.text} font={f.f1} text={text} />
|
|
20
20
|
</View>
|
|
21
21
|
</View>
|
|
22
22
|
)
|
|
23
|
-
}
|
|
23
|
+
}
|
package/assets/root.fullstackunicorn.dev/frontend/{panels/layout → modules/base}/PageTitle.pod.js
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useStyle } from '#@/style/@use'
|
|
1
|
+
import { useStyle } from '#@/style/@use.js'
|
|
2
2
|
import { View } from '#@/imports/core/View.js'
|
|
3
3
|
import { Text } from '#@/imports/core/Text.js'
|
|
4
4
|
|
|
@@ -6,16 +6,14 @@ export const PageTitlePod = ({ title }) => {
|
|
|
6
6
|
|
|
7
7
|
const { s, c, f, t, F, B, S, I, H } = useStyle()
|
|
8
8
|
|
|
9
|
-
F.text = [s.fs18, s.lh24, s.fw400, c.item_NN_B400]
|
|
10
|
-
|
|
11
9
|
S.textbox = [s.row_cXcY, s.Y48, s.X]
|
|
12
|
-
S.text =
|
|
10
|
+
S.text = t.root.page.title
|
|
13
11
|
|
|
14
12
|
if (!title) return null
|
|
15
|
-
|
|
13
|
+
|
|
16
14
|
return (
|
|
17
15
|
<View classes={S.textbox}>
|
|
18
|
-
<Text classes={S.text} text={title}/>
|
|
16
|
+
<Text classes={S.text} text={title} />
|
|
19
17
|
</View>
|
|
20
18
|
)
|
|
21
19
|
}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { useState } from 'react'
|
|
2
|
-
import { AccountPod } from '
|
|
2
|
+
import { AccountPod } from '#@/modules/cards/Account.pod.js'
|
|
3
3
|
|
|
4
|
-
export const Account = ({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
export const Account = ({
|
|
5
|
+
logo_src, logo_alt, svg, onPress,
|
|
6
|
+
title, description, descriptionPress, label, onPressAction,
|
|
7
|
+
}) => {
|
|
8
8
|
|
|
9
|
+
const [isHover, setIsHover] = useState(false)
|
|
9
10
|
const splitted = description.split('{{action}}')
|
|
10
|
-
|
|
11
|
+
|
|
11
12
|
return (
|
|
12
|
-
<AccountPod
|
|
13
|
+
<AccountPod
|
|
13
14
|
title={title}
|
|
14
|
-
description={{ one:splitted[0].trim(), two:splitted[1].trim() }}
|
|
15
|
+
description={{ one: splitted[0].trim(), two: splitted[1].trim() }}
|
|
15
16
|
descriptionPress={descriptionPress}
|
|
16
17
|
label={label}
|
|
17
18
|
onPressAction={onPressAction}
|
|
@@ -1,16 +1,26 @@
|
|
|
1
|
-
import { useStyle } from '#@/style/@use'
|
|
2
|
-
import { View } from '#@/imports/core/View'
|
|
3
|
-
import { Pressable } from '#@/imports/core/Pressable'
|
|
1
|
+
import { useStyle } from '#@/style/@use.js'
|
|
2
|
+
import { View } from '#@/imports/core/View.js'
|
|
3
|
+
import { Pressable } from '#@/imports/core/Pressable.js'
|
|
4
4
|
import { ImgData } from '#@/imports/core/Img.js'
|
|
5
|
-
import { Icon } from '#@/modules/core/Icon'
|
|
6
|
-
import { Textline } from '#@/imports/core/Text'
|
|
7
|
-
import { Text } from '#@/imports/core/Text'
|
|
5
|
+
import { Icon } from '#@/modules/core/Icon.js'
|
|
6
|
+
import { Textline, Text } from '#@/imports/core/Text.js'
|
|
8
7
|
|
|
9
|
-
export const AccountPod = ({
|
|
10
|
-
|
|
8
|
+
export const AccountPod = ({
|
|
9
|
+
title,
|
|
10
|
+
description = {},
|
|
11
|
+
descriptionPress,
|
|
12
|
+
label,
|
|
13
|
+
onPressAction,
|
|
14
|
+
logo_src,
|
|
15
|
+
logo_alt,
|
|
16
|
+
svg,
|
|
17
|
+
onPress,
|
|
18
|
+
isHover,
|
|
19
|
+
setIsHover,
|
|
20
|
+
}) => {
|
|
11
21
|
|
|
12
22
|
const { s, c, f, t, F, B, S, I, H } = useStyle()
|
|
13
|
-
|
|
23
|
+
|
|
14
24
|
B.hover = isHover ? c.base_C1_W600_50 : c.base_NN_W600_50
|
|
15
25
|
|
|
16
26
|
S.box = t.root.cards.box
|
|
@@ -25,24 +35,24 @@ export const AccountPod = ({ title, description={}, descriptionPress, label, onP
|
|
|
25
35
|
S.img = [s.row_cXcY, s.XY32, s.margin8, s.radius6]
|
|
26
36
|
S.label = [...t.root.cards.text.label, s.row_sXcY, s.Xr, c.item_NN_B400]
|
|
27
37
|
S.icon = t.root.cards.icon
|
|
28
|
-
|
|
38
|
+
|
|
29
39
|
return (
|
|
30
40
|
<View classes={S.box}>
|
|
31
41
|
<View classes={S.top}>
|
|
32
|
-
<Textline classes={S.title} font={f.f1} text={title}/>
|
|
42
|
+
<Textline classes={S.title} font={f.f1} text={title} />
|
|
33
43
|
<View classes={S.wrap}>
|
|
34
|
-
{description.one ? <Text classes={S.descriptionOne} font={f.f1} text={description.one}/> : null}
|
|
44
|
+
{description.one ? <Text classes={S.descriptionOne} font={f.f1} text={description.one} /> : null}
|
|
35
45
|
<Pressable classes={S.actionBox} onPress={onPressAction}>
|
|
36
|
-
<Text classes={S.descriptionPress} font={f.f1} text={descriptionPress}/>
|
|
46
|
+
<Text classes={S.descriptionPress} font={f.f1} text={descriptionPress} />
|
|
37
47
|
</Pressable>
|
|
38
|
-
{description.two ? <Text classes={S.descriptionTwo} font={f.f1} text={description.two}/> : null
|
|
48
|
+
{description.two ? <Text classes={S.descriptionTwo} font={f.f1} text={description.two} /> : null}
|
|
39
49
|
</View>
|
|
40
50
|
</View>
|
|
41
51
|
<Pressable classes={S.pressable} onPress={onPress} setIsHover={setIsHover}>
|
|
42
|
-
<ImgData classes={S.img} src={logo_src} alt={logo_alt}/>
|
|
43
|
-
<Textline classes={S.label} font={f.f1} text={label}/>
|
|
44
|
-
<Icon classes={S.icon} svg={svg}/>
|
|
52
|
+
<ImgData classes={S.img} src={logo_src} alt={logo_alt} />
|
|
53
|
+
<Textline classes={S.label} font={f.f1} text={label} />
|
|
54
|
+
<Icon classes={S.icon} svg={svg} />
|
|
45
55
|
</Pressable>
|
|
46
56
|
</View>
|
|
47
57
|
)
|
|
48
|
-
}
|
|
58
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useState } from 'react'
|
|
2
|
-
import { LauncherPod } from '
|
|
2
|
+
import { LauncherPod } from '#@/modules/cards/Launcher.pod.js'
|
|
3
3
|
|
|
4
4
|
export const Launcher = ({ svg, title, description, label, onPress }) => {
|
|
5
5
|
|
|
6
|
-
const [isHover, setIsHover
|
|
6
|
+
const [isHover, setIsHover] = useState(false)
|
|
7
7
|
|
|
8
8
|
return (
|
|
9
|
-
<LauncherPod
|
|
9
|
+
<LauncherPod
|
|
10
10
|
svg={svg}
|
|
11
11
|
title={title}
|
|
12
12
|
description={description}
|
|
@@ -16,4 +16,4 @@ export const Launcher = ({ svg, title, description, label, onPress }) => {
|
|
|
16
16
|
setIsHover={setIsHover}
|
|
17
17
|
/>
|
|
18
18
|
)
|
|
19
|
-
}
|
|
19
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { useStyle } from '#@/style/@use'
|
|
2
|
-
import { View } from '#@/imports/core/View'
|
|
3
|
-
import { Pressable } from '#@/imports/core/Pressable'
|
|
4
|
-
import { Icon } from '#@/modules/core/Icon'
|
|
5
|
-
import { Textline } from '#@/imports/core/Text'
|
|
6
|
-
import { Text } from '#@/imports/core/Text'
|
|
1
|
+
import { useStyle } from '#@/style/@use.js'
|
|
2
|
+
import { View } from '#@/imports/core/View.js'
|
|
3
|
+
import { Pressable } from '#@/imports/core/Pressable.js'
|
|
4
|
+
import { Icon } from '#@/modules/core/Icon.js'
|
|
5
|
+
import { Textline, Text } from '#@/imports/core/Text.js'
|
|
7
6
|
|
|
8
|
-
export const LauncherPod = ({
|
|
9
|
-
svg, title, description, label,
|
|
10
|
-
isHover, setIsHover, onPress
|
|
7
|
+
export const LauncherPod = ({
|
|
8
|
+
svg, title, description, label,
|
|
9
|
+
isHover, setIsHover, onPress,
|
|
10
|
+
}) => {
|
|
11
11
|
|
|
12
12
|
const { s, c, f, t, F, B, S, I, H } = useStyle()
|
|
13
13
|
|
|
@@ -20,7 +20,6 @@ export const LauncherPod = ({
|
|
|
20
20
|
S.pressable = [...t.root.cards.pressable, B.hover]
|
|
21
21
|
S.icon = t.root.cards.icon
|
|
22
22
|
S.label = t.root.cards.label
|
|
23
|
-
S.slider = t.root.cards.slider
|
|
24
23
|
|
|
25
24
|
return (
|
|
26
25
|
<View classes={S.box}>
|
|
@@ -35,4 +34,4 @@ export const LauncherPod = ({
|
|
|
35
34
|
</Pressable>
|
|
36
35
|
</View>
|
|
37
36
|
)
|
|
38
|
-
}
|
|
37
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useState } from 'react'
|
|
2
|
-
import { LinkerPod } from '
|
|
2
|
+
import { LinkerPod } from '#@/modules/cards/Linker.pod.js'
|
|
3
3
|
|
|
4
4
|
export const Linker = ({ svg, title, description, label, onPress, linkTo }) => {
|
|
5
5
|
|
|
6
|
-
const [isHover, setIsHover
|
|
6
|
+
const [isHover, setIsHover] = useState(false)
|
|
7
7
|
|
|
8
8
|
return (
|
|
9
|
-
<LinkerPod
|
|
9
|
+
<LinkerPod
|
|
10
10
|
svg={svg}
|
|
11
11
|
title={title}
|
|
12
12
|
description={description}
|
|
@@ -17,4 +17,4 @@ export const Linker = ({ svg, title, description, label, onPress, linkTo }) => {
|
|
|
17
17
|
setIsHover={setIsHover}
|
|
18
18
|
/>
|
|
19
19
|
)
|
|
20
|
-
}
|
|
20
|
+
}
|