@ya-accelerators/nextjs-framework 0.0.0
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/@types/general.d.ts +1 -0
- package/@types/image.d.ts +8 -0
- package/@types/next-auth.d.ts +18 -0
- package/dist/env.client.d.ts +3 -0
- package/dist/env.client.js +9 -0
- package/dist/env.client.js.map +1 -0
- package/dist/env.d.ts +6 -0
- package/dist/env.js +18 -0
- package/dist/env.js.map +1 -0
- package/dist/hooks/date/index.d.ts +11 -0
- package/dist/hooks/date/index.js +14 -0
- package/dist/hooks/date/index.js.map +1 -0
- package/dist/hooks/dispatch/index.d.ts +9 -0
- package/dist/hooks/dispatch/index.jsx +25 -0
- package/dist/hooks/dispatch/index.jsx.map +1 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/index.js +7 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/loading/index.d.ts +10 -0
- package/dist/hooks/loading/index.jsx +22 -0
- package/dist/hooks/loading/index.jsx.map +1 -0
- package/dist/hooks/localStorage/index.d.ts +1 -0
- package/dist/hooks/localStorage/index.js +53 -0
- package/dist/hooks/localStorage/index.js.map +1 -0
- package/dist/hooks/modal/index.d.ts +26 -0
- package/dist/hooks/modal/index.jsx +63 -0
- package/dist/hooks/modal/index.jsx.map +1 -0
- package/dist/hooks/toast/index.d.ts +15 -0
- package/dist/hooks/toast/index.jsx +39 -0
- package/dist/hooks/toast/index.jsx.map +1 -0
- package/dist/i18n/index.d.ts +3 -0
- package/dist/i18n/index.js +40 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/strings/en-US.json +18 -0
- package/dist/i18n/strings/ja-JP.json +37 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/cookie/index.d.ts +9 -0
- package/dist/lib/cookie/index.js +66 -0
- package/dist/lib/cookie/index.js.map +1 -0
- package/dist/lib/index.d.ts +10 -0
- package/dist/lib/index.js +11 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/next-auth/index.d.ts +2 -0
- package/dist/lib/next-auth/index.js +62 -0
- package/dist/lib/next-auth/index.js.map +1 -0
- package/dist/lib/s3/index.d.ts +2 -0
- package/dist/lib/s3/index.js +17 -0
- package/dist/lib/s3/index.js.map +1 -0
- package/dist/lib/trpc/index.d.ts +8 -0
- package/dist/lib/trpc/index.js +32 -0
- package/dist/lib/trpc/index.js.map +1 -0
- package/dist/styles/globals.css +26 -0
- package/dist/styles/tailwind.config.d.ts +577 -0
- package/dist/styles/tailwind.config.js +671 -0
- package/dist/styles/tailwind.config.js.map +1 -0
- package/dist/styles/tailwind.config.ts +672 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/ui/component/button/base.d.ts +27 -0
- package/dist/ui/component/button/base.jsx +54 -0
- package/dist/ui/component/button/base.jsx.map +1 -0
- package/dist/ui/component/button/colored/index.d.ts +11 -0
- package/dist/ui/component/button/colored/index.jsx +7 -0
- package/dist/ui/component/button/colored/index.jsx.map +1 -0
- package/dist/ui/component/button/image/index.d.ts +4 -0
- package/dist/ui/component/button/image/index.jsx +5 -0
- package/dist/ui/component/button/image/index.jsx.map +1 -0
- package/dist/ui/component/button/index.d.ts +18 -0
- package/dist/ui/component/button/index.jsx +25 -0
- package/dist/ui/component/button/index.jsx.map +1 -0
- package/dist/ui/component/button/text/index.d.ts +11 -0
- package/dist/ui/component/button/text/index.jsx +8 -0
- package/dist/ui/component/button/text/index.jsx.map +1 -0
- package/dist/ui/component/card/index.d.ts +12 -0
- package/dist/ui/component/card/index.jsx +20 -0
- package/dist/ui/component/card/index.jsx.map +1 -0
- package/dist/ui/component/icon/index.d.ts +7 -0
- package/dist/ui/component/icon/index.jsx +3 -0
- package/dist/ui/component/icon/index.jsx.map +1 -0
- package/dist/ui/component/index.d.ts +95 -0
- package/dist/ui/component/index.js +15 -0
- package/dist/ui/component/index.js.map +1 -0
- package/dist/ui/component/loading/index.d.ts +5 -0
- package/dist/ui/component/loading/index.jsx +27 -0
- package/dist/ui/component/loading/index.jsx.map +1 -0
- package/dist/ui/component/ssr/index.d.ts +5 -0
- package/dist/ui/component/ssr/index.jsx +11 -0
- package/dist/ui/component/ssr/index.jsx.map +1 -0
- package/dist/ui/component/typography/H1/index.d.ts +7 -0
- package/dist/ui/component/typography/H1/index.jsx +13 -0
- package/dist/ui/component/typography/H1/index.jsx.map +1 -0
- package/dist/ui/component/typography/H2/index.d.ts +7 -0
- package/dist/ui/component/typography/H2/index.jsx +13 -0
- package/dist/ui/component/typography/H2/index.jsx.map +1 -0
- package/dist/ui/component/typography/H3/index.d.ts +7 -0
- package/dist/ui/component/typography/H3/index.jsx +13 -0
- package/dist/ui/component/typography/H3/index.jsx.map +1 -0
- package/dist/ui/component/typography/H4/index.d.ts +7 -0
- package/dist/ui/component/typography/H4/index.jsx +13 -0
- package/dist/ui/component/typography/H4/index.jsx.map +1 -0
- package/dist/ui/component/typography/H5/index.d.ts +7 -0
- package/dist/ui/component/typography/H5/index.jsx +13 -0
- package/dist/ui/component/typography/H5/index.jsx.map +1 -0
- package/dist/ui/component/typography/H6/index.d.ts +7 -0
- package/dist/ui/component/typography/H6/index.jsx +13 -0
- package/dist/ui/component/typography/H6/index.jsx.map +1 -0
- package/dist/ui/component/typography/Label/index.d.ts +7 -0
- package/dist/ui/component/typography/Label/index.jsx +13 -0
- package/dist/ui/component/typography/Label/index.jsx.map +1 -0
- package/dist/ui/component/typography/LinkText/index.d.ts +8 -0
- package/dist/ui/component/typography/LinkText/index.jsx +14 -0
- package/dist/ui/component/typography/LinkText/index.jsx.map +1 -0
- package/dist/ui/component/typography/P/index.d.ts +7 -0
- package/dist/ui/component/typography/P/index.jsx +13 -0
- package/dist/ui/component/typography/P/index.jsx.map +1 -0
- package/dist/ui/component/typography/Pre/index.d.ts +7 -0
- package/dist/ui/component/typography/Pre/index.jsx +13 -0
- package/dist/ui/component/typography/Pre/index.jsx.map +1 -0
- package/dist/ui/component/typography/index.d.ts +54 -0
- package/dist/ui/component/typography/index.jsx +23 -0
- package/dist/ui/component/typography/index.jsx.map +1 -0
- package/dist/ui/composite/button/index.d.ts +8 -0
- package/dist/ui/composite/button/index.jsx +45 -0
- package/dist/ui/composite/button/index.jsx.map +1 -0
- package/dist/ui/composite/dropdown/index.d.ts +12 -0
- package/dist/ui/composite/dropdown/index.jsx +102 -0
- package/dist/ui/composite/dropdown/index.jsx.map +1 -0
- package/dist/ui/composite/index.d.ts +342 -0
- package/dist/ui/composite/index.js +13 -0
- package/dist/ui/composite/index.js.map +1 -0
- package/dist/ui/composite/input/address/index.d.ts +33 -0
- package/dist/ui/composite/input/address/index.jsx +132 -0
- package/dist/ui/composite/input/address/index.jsx.map +1 -0
- package/dist/ui/composite/input/address/map.d.ts +64 -0
- package/dist/ui/composite/input/address/map.jsx +111 -0
- package/dist/ui/composite/input/address/map.jsx.map +1 -0
- package/dist/ui/composite/input/address/utils.d.ts +23 -0
- package/dist/ui/composite/input/address/utils.js +63 -0
- package/dist/ui/composite/input/address/utils.js.map +1 -0
- package/dist/ui/composite/input/checkbox/index.d.ts +22 -0
- package/dist/ui/composite/input/checkbox/index.jsx +38 -0
- package/dist/ui/composite/input/checkbox/index.jsx.map +1 -0
- package/dist/ui/composite/input/datePicker/index.d.ts +19 -0
- package/dist/ui/composite/input/datePicker/index.jsx +100 -0
- package/dist/ui/composite/input/datePicker/index.jsx.map +1 -0
- package/dist/ui/composite/input/dateRange/index.d.ts +14 -0
- package/dist/ui/composite/input/dateRange/index.jsx +46 -0
- package/dist/ui/composite/input/dateRange/index.jsx.map +1 -0
- package/dist/ui/composite/input/dateTimePicker/index.d.ts +15 -0
- package/dist/ui/composite/input/dateTimePicker/index.jsx +74 -0
- package/dist/ui/composite/input/dateTimePicker/index.jsx.map +1 -0
- package/dist/ui/composite/input/dateTimeRange/index.d.ts +14 -0
- package/dist/ui/composite/input/dateTimeRange/index.jsx +88 -0
- package/dist/ui/composite/input/dateTimeRange/index.jsx.map +1 -0
- package/dist/ui/composite/input/index.d.ts +216 -0
- package/dist/ui/composite/input/index.js +35 -0
- package/dist/ui/composite/input/index.js.map +1 -0
- package/dist/ui/composite/input/list/index.d.ts +20 -0
- package/dist/ui/composite/input/list/index.jsx +30 -0
- package/dist/ui/composite/input/list/index.jsx.map +1 -0
- package/dist/ui/composite/input/radio/index.d.ts +14 -0
- package/dist/ui/composite/input/radio/index.jsx +34 -0
- package/dist/ui/composite/input/radio/index.jsx.map +1 -0
- package/dist/ui/composite/input/search/index.d.ts +5 -0
- package/dist/ui/composite/input/search/index.jsx +38 -0
- package/dist/ui/composite/input/search/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/ClearIndicator/index.d.ts +4 -0
- package/dist/ui/composite/input/select/ClearIndicator/index.jsx +8 -0
- package/dist/ui/composite/input/select/ClearIndicator/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/Control/index.d.ts +4 -0
- package/dist/ui/composite/input/select/Control/index.jsx +23 -0
- package/dist/ui/composite/input/select/Control/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/DropdownIndicator/index.d.ts +4 -0
- package/dist/ui/composite/input/select/DropdownIndicator/index.jsx +8 -0
- package/dist/ui/composite/input/select/DropdownIndicator/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/GroupHeading/index.d.ts +4 -0
- package/dist/ui/composite/input/select/GroupHeading/index.jsx +9 -0
- package/dist/ui/composite/input/select/GroupHeading/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/Input/index.d.ts +4 -0
- package/dist/ui/composite/input/select/Input/index.jsx +7 -0
- package/dist/ui/composite/input/select/Input/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/Menu/index.d.ts +4 -0
- package/dist/ui/composite/input/select/Menu/index.jsx +19 -0
- package/dist/ui/composite/input/select/Menu/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/MultiValue/index.d.ts +4 -0
- package/dist/ui/composite/input/select/MultiValue/index.jsx +15 -0
- package/dist/ui/composite/input/select/MultiValue/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/Option/index.d.ts +4 -0
- package/dist/ui/composite/input/select/Option/index.jsx +79 -0
- package/dist/ui/composite/input/select/Option/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/Placeholder/index.d.ts +4 -0
- package/dist/ui/composite/input/select/Placeholder/index.jsx +7 -0
- package/dist/ui/composite/input/select/Placeholder/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/SelectContainer/index.d.ts +4 -0
- package/dist/ui/composite/input/select/SelectContainer/index.jsx +40 -0
- package/dist/ui/composite/input/select/SelectContainer/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/SingleValue/index.d.ts +4 -0
- package/dist/ui/composite/input/select/SingleValue/index.jsx +17 -0
- package/dist/ui/composite/input/select/SingleValue/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/index.d.ts +37 -0
- package/dist/ui/composite/input/select/index.jsx +242 -0
- package/dist/ui/composite/input/select/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/types.d.ts +16 -0
- package/dist/ui/composite/input/select/types.js +6 -0
- package/dist/ui/composite/input/select/types.js.map +1 -0
- package/dist/ui/composite/input/text/index.d.ts +15 -0
- package/dist/ui/composite/input/text/index.jsx +40 -0
- package/dist/ui/composite/input/text/index.jsx.map +1 -0
- package/dist/ui/composite/input/textarea/index.d.ts +11 -0
- package/dist/ui/composite/input/textarea/index.jsx +62 -0
- package/dist/ui/composite/input/textarea/index.jsx.map +1 -0
- package/dist/ui/composite/input/timePicker/index.d.ts +13 -0
- package/dist/ui/composite/input/timePicker/index.jsx +36 -0
- package/dist/ui/composite/input/timePicker/index.jsx.map +1 -0
- package/dist/ui/composite/input/timeRange/index.d.ts +16 -0
- package/dist/ui/composite/input/timeRange/index.jsx +54 -0
- package/dist/ui/composite/input/timeRange/index.jsx.map +1 -0
- package/dist/ui/composite/input/weekDaysSelector/index.d.ts +11 -0
- package/dist/ui/composite/input/weekDaysSelector/index.jsx +39 -0
- package/dist/ui/composite/input/weekDaysSelector/index.jsx.map +1 -0
- package/dist/ui/composite/input/weekdayPicker/index.d.ts +13 -0
- package/dist/ui/composite/input/weekdayPicker/index.jsx +49 -0
- package/dist/ui/composite/input/weekdayPicker/index.jsx.map +1 -0
- package/dist/ui/composite/label/index.d.ts +11 -0
- package/dist/ui/composite/label/index.jsx +18 -0
- package/dist/ui/composite/label/index.jsx.map +1 -0
- package/dist/ui/composite/pageTitle/index.d.ts +18 -0
- package/dist/ui/composite/pageTitle/index.jsx +62 -0
- package/dist/ui/composite/pageTitle/index.jsx.map +1 -0
- package/dist/ui/functional/index.d.ts +10 -0
- package/dist/ui/functional/index.js +9 -0
- package/dist/ui/functional/index.js.map +1 -0
- package/dist/ui/functional/notFound/index.d.ts +1 -0
- package/dist/ui/functional/notFound/index.jsx +13 -0
- package/dist/ui/functional/notFound/index.jsx.map +1 -0
- package/dist/ui/functional/signInForm/index.d.ts +4 -0
- package/dist/ui/functional/signInForm/index.jsx +45 -0
- package/dist/ui/functional/signInForm/index.jsx.map +1 -0
- package/dist/ui/functional/signOutForm/index.d.ts +3 -0
- package/dist/ui/functional/signOutForm/index.jsx +29 -0
- package/dist/ui/functional/signOutForm/index.jsx.map +1 -0
- package/dist/ui/index.d.ts +6 -0
- package/dist/ui/index.js +7 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/layout/app/component.d.ts +59 -0
- package/dist/ui/layout/app/component.jsx +224 -0
- package/dist/ui/layout/app/component.jsx.map +1 -0
- package/dist/ui/layout/app/content/index.d.ts +9 -0
- package/dist/ui/layout/app/content/index.jsx +18 -0
- package/dist/ui/layout/app/content/index.jsx.map +1 -0
- package/dist/ui/layout/app/index.d.ts +18 -0
- package/dist/ui/layout/app/index.jsx +40 -0
- package/dist/ui/layout/app/index.jsx.map +1 -0
- package/dist/ui/layout/form/index.d.ts +68 -0
- package/dist/ui/layout/form/index.jsx +558 -0
- package/dist/ui/layout/form/index.jsx.map +1 -0
- package/dist/ui/layout/index.d.ts +356 -0
- package/dist/ui/layout/index.js +19 -0
- package/dist/ui/layout/index.js.map +1 -0
- package/dist/ui/layout/modal/index.d.ts +7 -0
- package/dist/ui/layout/modal/index.jsx +11 -0
- package/dist/ui/layout/modal/index.jsx.map +1 -0
- package/dist/ui/layout/object/index.d.ts +30 -0
- package/dist/ui/layout/object/index.jsx +145 -0
- package/dist/ui/layout/object/index.jsx.map +1 -0
- package/dist/ui/layout/root/index.d.ts +10 -0
- package/dist/ui/layout/root/index.jsx +31 -0
- package/dist/ui/layout/root/index.jsx.map +1 -0
- package/dist/ui/layout/root/provider/index.d.ts +7 -0
- package/dist/ui/layout/root/provider/index.jsx +26 -0
- package/dist/ui/layout/root/provider/index.jsx.map +1 -0
- package/dist/ui/layout/tab/component.d.ts +4 -0
- package/dist/ui/layout/tab/component.jsx +16 -0
- package/dist/ui/layout/tab/component.jsx.map +1 -0
- package/dist/ui/layout/tab/content/index.d.ts +8 -0
- package/dist/ui/layout/tab/content/index.jsx +8 -0
- package/dist/ui/layout/tab/content/index.jsx.map +1 -0
- package/dist/ui/layout/tab/index.d.ts +11 -0
- package/dist/ui/layout/tab/index.jsx +25 -0
- package/dist/ui/layout/tab/index.jsx.map +1 -0
- package/dist/ui/layout/table/index.d.ts +33 -0
- package/dist/ui/layout/table/index.jsx +283 -0
- package/dist/ui/layout/table/index.jsx.map +1 -0
- package/dist/ui/layout/toast/index.d.ts +7 -0
- package/dist/ui/layout/toast/index.jsx +18 -0
- package/dist/ui/layout/toast/index.jsx.map +1 -0
- package/dist/ui/theme/border/index.d.ts +28 -0
- package/dist/ui/theme/border/index.js +67 -0
- package/dist/ui/theme/border/index.js.map +1 -0
- package/dist/ui/theme/color/index.d.ts +32 -0
- package/dist/ui/theme/color/index.js +106 -0
- package/dist/ui/theme/color/index.js.map +1 -0
- package/dist/ui/theme/index.d.ts +4 -0
- package/dist/ui/theme/index.js +5 -0
- package/dist/ui/theme/index.js.map +1 -0
- package/dist/ui/theme/rounded/index.d.ts +9 -0
- package/dist/ui/theme/rounded/index.js +14 -0
- package/dist/ui/theme/rounded/index.js.map +1 -0
- package/dist/ui/theme/size/index.d.ts +15 -0
- package/dist/ui/theme/size/index.js +55 -0
- package/dist/ui/theme/size/index.js.map +1 -0
- package/dist/ui/types/index.d.ts +113 -0
- package/dist/ui/types/index.js +33 -0
- package/dist/ui/types/index.js.map +1 -0
- package/dist/util/client.d.ts +2 -0
- package/dist/util/client.js +4 -0
- package/dist/util/client.js.map +1 -0
- package/dist/util/date/impl.d.ts +7 -0
- package/dist/util/date/impl.js +22 -0
- package/dist/util/date/impl.js.map +1 -0
- package/dist/util/date/index.d.ts +17 -0
- package/dist/util/date/index.js +16 -0
- package/dist/util/date/index.js.map +1 -0
- package/dist/util/index.d.ts +17 -0
- package/dist/util/index.js +143 -0
- package/dist/util/index.js.map +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
type Simplify<T> = { [K in keyof T]: T[K] } & {}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { DefaultSession } from 'next-auth'
|
|
2
|
+
|
|
3
|
+
declare module 'next-auth' {
|
|
4
|
+
interface User {
|
|
5
|
+
token?: string
|
|
6
|
+
headers?: Record<string, string>
|
|
7
|
+
}
|
|
8
|
+
interface Session extends DefaultSession {
|
|
9
|
+
token?: string
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare module 'next-auth/jwt' {
|
|
14
|
+
interface JWT {
|
|
15
|
+
token?: string
|
|
16
|
+
headers?: Record<string, string>
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { Util } from './util/index';
|
|
4
|
+
export const defaultClientEnv = Util.createEnvProxy(false, z.object({
|
|
5
|
+
NEXT_PUBLIC_DEPLOY_ENV: z.enum(['dev', 'stg', 'prd']).default('dev'),
|
|
6
|
+
}), () => ({
|
|
7
|
+
NEXT_PUBLIC_DEPLOY_ENV: process.env.NEXT_PUBLIC_DEPLOY_ENV,
|
|
8
|
+
}));
|
|
9
|
+
//# sourceMappingURL=env.client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.client.js","sourceRoot":"","sources":["../../src/env.client.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEnC,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,CACjD,KAAK,EACL,CAAC,CAAC,MAAM,CAAC;IACP,sBAAsB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;CACrE,CAAC,EACF,GAAG,EAAE,CAAC,CAAC;IACL,sBAAsB,EAAE,OAAO,CAAC,GAAG,CAAC,sBAAsB;CAC3D,CAAC,CACH,CAAA"}
|
package/dist/env.d.ts
ADDED
package/dist/env.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Util } from './util/index';
|
|
3
|
+
export const defaultServerEnv = Util.createEnvProxy(true, z.object({
|
|
4
|
+
// common
|
|
5
|
+
NODE_ENV: z.enum(['development', 'production']).default('development'),
|
|
6
|
+
DEPLOY_ENV: z.enum(['dev', 'stg', 'prd']).default('dev'),
|
|
7
|
+
// NextAuth
|
|
8
|
+
NEXTAUTH_SECRET: z.string().optional(),
|
|
9
|
+
NEXTAUTH_URL: z.string().optional(),
|
|
10
|
+
}), () => ({
|
|
11
|
+
// common
|
|
12
|
+
NODE_ENV: process.env.NODE_ENV,
|
|
13
|
+
DEPLOY_ENV: process.env.DEPLOY_ENV,
|
|
14
|
+
// NextAuth
|
|
15
|
+
NEXTAUTH_SECRET: process.env.NEXTAUTH_SECRET,
|
|
16
|
+
NEXTAUTH_URL: process.env.NEXTAUTH_URL,
|
|
17
|
+
}));
|
|
18
|
+
//# sourceMappingURL=env.js.map
|
package/dist/env.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/env.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEnC,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,CACjD,IAAI,EACJ,CAAC,CAAC,MAAM,CAAC;IACP,SAAS;IACT,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;IACtE,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IACxD,WAAW;IACX,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACpC,CAAC,EACF,GAAG,EAAE,CAAC,CAAC;IACL,SAAS;IACT,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ;IAC9B,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU;IAClC,WAAW;IACX,eAAe,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe;IAC5C,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY;CACvC,CAAC,CACH,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Weekday } from '../../util/date';
|
|
2
|
+
export declare const useDateFormat: () => {
|
|
3
|
+
dataFormat: string;
|
|
4
|
+
toLocalISOString: (date: Date) => string;
|
|
5
|
+
toString: (date: Date, options?: Intl.DateTimeFormatOptions) => string;
|
|
6
|
+
toDateString: (date?: Date | null, fallBack?: string) => string;
|
|
7
|
+
toDateTimeString: (date?: Date | null, fallBack?: string) => string;
|
|
8
|
+
};
|
|
9
|
+
export declare const useWeekdayString: () => {
|
|
10
|
+
toWeekdayString: (weekday: Weekday, short?: boolean) => string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useTranslations } from 'next-intl';
|
|
3
|
+
import { createDateFormat } from '../../util/date/impl';
|
|
4
|
+
export const useDateFormat = () => {
|
|
5
|
+
const t = useTranslations();
|
|
6
|
+
return createDateFormat(t);
|
|
7
|
+
};
|
|
8
|
+
export const useWeekdayString = () => {
|
|
9
|
+
const t = useTranslations();
|
|
10
|
+
return {
|
|
11
|
+
toWeekdayString: (weekday, short = true) => t(`${weekday}${short ? 'Short' : 'Long'}`),
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/date/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAG3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAEvD,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IAChC,MAAM,CAAC,GAAG,eAAe,EAAE,CAAA;IAC3B,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAA;AAC5B,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,MAAM,CAAC,GAAG,eAAe,EAAE,CAAA;IAC3B,OAAO;QACL,eAAe,EAAE,CAAC,OAAgB,EAAE,QAAiB,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;KACzG,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
interface IDispatchContext {
|
|
3
|
+
dispatch: <T>(promise: Promise<T>, requestShowLoading?: boolean) => Promise<T>;
|
|
4
|
+
}
|
|
5
|
+
export declare const useDispatchContext: () => IDispatchContext;
|
|
6
|
+
export declare const DispatchProvider: ({ children }: {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}) => import("react").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useRouter } from 'next/navigation';
|
|
3
|
+
import { createContext, useContext } from 'react';
|
|
4
|
+
import { useLoadingContext } from '../loading';
|
|
5
|
+
const DispatchContext = createContext({
|
|
6
|
+
dispatch(promise) {
|
|
7
|
+
return promise;
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
export const useDispatchContext = () => useContext(DispatchContext);
|
|
11
|
+
export const DispatchProvider = ({ children }) => {
|
|
12
|
+
const router = useRouter();
|
|
13
|
+
const { showLoading, dismissLoading } = useLoadingContext();
|
|
14
|
+
const dispatch = async function (promise, requestShowLoading) {
|
|
15
|
+
if (requestShowLoading !== false) {
|
|
16
|
+
showLoading();
|
|
17
|
+
}
|
|
18
|
+
const ret = await promise;
|
|
19
|
+
router.refresh();
|
|
20
|
+
dismissLoading();
|
|
21
|
+
return ret;
|
|
22
|
+
};
|
|
23
|
+
return <DispatchContext.Provider value={{ dispatch }}>{children}</DispatchContext.Provider>;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=index.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../src/hooks/dispatch/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAE,SAA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S,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
interface ILoadingContext {
|
|
3
|
+
showLoading: () => void;
|
|
4
|
+
dismissLoading: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const useLoadingContext: () => ILoadingContext;
|
|
7
|
+
export declare const LoadingProvider: ({ children }: {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}) => import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { usePathname } from 'next/navigation';
|
|
3
|
+
import { createContext, useContext, useState } from 'react';
|
|
4
|
+
import { LoadingOverlay } from '../../ui/component/loading';
|
|
5
|
+
const LoadingContext = createContext({ showLoading: () => { }, dismissLoading: () => { } });
|
|
6
|
+
export const useLoadingContext = () => useContext(LoadingContext);
|
|
7
|
+
export const LoadingProvider = ({ children }) => {
|
|
8
|
+
const [visible, setVisible] = useState(false);
|
|
9
|
+
const showLoading = () => setVisible(true);
|
|
10
|
+
const dismissLoading = () => setVisible(false);
|
|
11
|
+
const pathname = usePathname();
|
|
12
|
+
const [prevPathname, setPrevPathname] = useState(pathname);
|
|
13
|
+
if (pathname !== prevPathname) {
|
|
14
|
+
setVisible(false);
|
|
15
|
+
setPrevPathname(pathname);
|
|
16
|
+
}
|
|
17
|
+
return (<LoadingContext.Provider value={{ showLoading, dismissLoading }}>
|
|
18
|
+
{children}
|
|
19
|
+
{visible && <LoadingOverlay />}
|
|
20
|
+
</LoadingContext.Provider>);
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=index.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../src/hooks/loading/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAE7C,OAAO,EAAE,aAAa,EAAE,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((prev: T) => T)) => void];
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useCallback, useSyncExternalStore } from 'react';
|
|
3
|
+
const STORAGE_EVENT = 'localStorage-change';
|
|
4
|
+
export const useLocalStorage = (key, defaultValue) => {
|
|
5
|
+
const subscribe = useCallback((callback) => {
|
|
6
|
+
const onStorage = (e) => {
|
|
7
|
+
if (e.storageArea === window.localStorage && e.key === key) {
|
|
8
|
+
callback();
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
const onCustom = (e) => {
|
|
12
|
+
const ce = e;
|
|
13
|
+
if (ce.detail === key) {
|
|
14
|
+
callback();
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
window.addEventListener('storage', onStorage);
|
|
18
|
+
window.addEventListener(STORAGE_EVENT, onCustom);
|
|
19
|
+
return () => {
|
|
20
|
+
window.removeEventListener('storage', onStorage);
|
|
21
|
+
window.removeEventListener(STORAGE_EVENT, onCustom);
|
|
22
|
+
};
|
|
23
|
+
}, [key]);
|
|
24
|
+
const getSnapshot = useCallback(() => {
|
|
25
|
+
try {
|
|
26
|
+
const v = window.localStorage.getItem(key);
|
|
27
|
+
return (v === null ? defaultValue : v);
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
console.warn(`Failed to read from localStorage for key "${key}":`, error);
|
|
31
|
+
return defaultValue;
|
|
32
|
+
}
|
|
33
|
+
}, [key, defaultValue]);
|
|
34
|
+
const getServerSnapshot = useCallback(() => {
|
|
35
|
+
return defaultValue;
|
|
36
|
+
}, [defaultValue]);
|
|
37
|
+
const value = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
38
|
+
const notifyChange = useCallback(() => {
|
|
39
|
+
window.dispatchEvent(new CustomEvent(STORAGE_EVENT, { detail: key }));
|
|
40
|
+
}, [key]);
|
|
41
|
+
const setValue = useCallback((next) => {
|
|
42
|
+
try {
|
|
43
|
+
const resolved = typeof next === 'function' ? next(value) : next;
|
|
44
|
+
window.localStorage.setItem(key, resolved);
|
|
45
|
+
notifyChange();
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
console.warn(`Failed to write to localStorage for key "${key}":`, error);
|
|
49
|
+
}
|
|
50
|
+
}, [key, value, notifyChange]);
|
|
51
|
+
return [value, setValue];
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/localStorage/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAA;AAEzD,MAAM,aAAa,GAAG,qBAAqB,CAAA;AAE3C,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,GAAW,EACX,YAAe,EAC6B,EAAE;IAC9C,MAAM,SAAS,GAAG,WAAW,CAC3B,CAAC,QAAoB,EAAE,EAAE;QACvB,MAAM,SAAS,GAAG,CAAC,CAAe,EAAE,EAAE;YACpC,IAAI,CAAC,CAAC,WAAW,KAAK,MAAM,CAAC,YAAY,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,EAAE,CAAC;gBAC3D,QAAQ,EAAE,CAAA;YACZ,CAAC;QACH,CAAC,CAAA;QACD,MAAM,QAAQ,GAAG,CAAC,CAAQ,EAAE,EAAE;YAC5B,MAAM,EAAE,GAAG,CAAwB,CAAA;YACnC,IAAI,EAAE,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;gBACtB,QAAQ,EAAE,CAAA;YACZ,CAAC;QACH,CAAC,CAAA;QAED,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;QAC7C,MAAM,CAAC,gBAAgB,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAA;QAChD,OAAO,GAAG,EAAE;YACV,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,SAAS,CAAC,CAA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CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;YAC1C,YAAY,EAAE,CAAA;QAChB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,IAAI,CAAC,4CAA4C,GAAG,IAAI,EAAE,KAAK,CAAC,CAAA;QAC1E,CAAC;IACH,CAAC,EACD,CAAC,GAAG,EAAE,KAAK,EAAE,YAAY,CAAC,CAC3B,CAAA;IAED,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAU,CAAA;AACnC,CAAC,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Rounded } from '../../ui/theme';
|
|
3
|
+
import { ColorTypes } from '../../ui/theme';
|
|
4
|
+
export interface ModalProps {
|
|
5
|
+
rounded?: Rounded;
|
|
6
|
+
title?: string;
|
|
7
|
+
message?: string;
|
|
8
|
+
content?: ReactNode;
|
|
9
|
+
actions?: {
|
|
10
|
+
default?: boolean;
|
|
11
|
+
label: string;
|
|
12
|
+
color?: ColorTypes;
|
|
13
|
+
onClick?: () => void;
|
|
14
|
+
}[];
|
|
15
|
+
showCloseButton?: boolean;
|
|
16
|
+
dismissOnBarrierClick?: boolean;
|
|
17
|
+
}
|
|
18
|
+
interface IModalContext {
|
|
19
|
+
showModal: (props: ModalProps) => void;
|
|
20
|
+
dismissModal: (id?: string) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare const useModalContext: () => IModalContext;
|
|
23
|
+
export declare const ModalProvider: ({ children }: {
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
}) => import("react").JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { motion } from 'framer-motion';
|
|
4
|
+
import { usePathname } from 'next/navigation';
|
|
5
|
+
import { createContext, useCallback, useContext, useEffect, useState } from 'react';
|
|
6
|
+
import { Colored } from '../../ui/component/button/colored';
|
|
7
|
+
import { Typography } from '../../ui/component/typography';
|
|
8
|
+
import { Modal } from '../../ui/layout/modal';
|
|
9
|
+
import { BackgroundColorTypes, ColorTypes, ControlSize, getBackgroundColorTypeClassName, TextColorTypes, } from '../../ui/theme';
|
|
10
|
+
import { Util } from '../../util';
|
|
11
|
+
const ModalContext = createContext({
|
|
12
|
+
showModal: () => { },
|
|
13
|
+
dismissModal: () => { },
|
|
14
|
+
});
|
|
15
|
+
export const useModalContext = () => useContext(ModalContext);
|
|
16
|
+
export const ModalProvider = ({ children }) => {
|
|
17
|
+
const [props, setProps] = useState([]);
|
|
18
|
+
const showModal = (props) => setProps((e) => [...e, { ...props, id: new Date().getTime().toString() }]);
|
|
19
|
+
const dismissModal = useCallback((id) => {
|
|
20
|
+
if (id === undefined || !Util.isString(id) || !props.some((x) => x.id !== id)) {
|
|
21
|
+
setProps([]);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
setProps((e) => e.filter((x) => x.id !== id));
|
|
25
|
+
}
|
|
26
|
+
}, [props]);
|
|
27
|
+
const pathname = usePathname();
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
dismissModal();
|
|
30
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
31
|
+
}, [pathname]);
|
|
32
|
+
return (<ModalContext.Provider value={{ showModal, dismissModal }}>
|
|
33
|
+
{children}
|
|
34
|
+
{props.length > 0 && (<motion.div className={classNames('fixed inset-0 z-popup flex size-full items-center justify-center', getBackgroundColorTypeClassName(BackgroundColorTypes.overlay))} onClick={(e) => {
|
|
35
|
+
if (e.target === e.currentTarget) {
|
|
36
|
+
const latestModal = props[props.length - 1];
|
|
37
|
+
if (latestModal?.dismissOnBarrierClick !== false) {
|
|
38
|
+
dismissModal();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}}>
|
|
42
|
+
{props.map((x, i) => (<Modal key={x.id} id={x.id} rounded={x.rounded} showCloseButton={x.actions === undefined || x.showCloseButton !== false} onClickClose={dismissModal} className={i !== props.length - 1 ? 'hidden' : undefined}>
|
|
43
|
+
{x.title && (<Typography.H4 container={true} className='font-bold'>
|
|
44
|
+
{x.title}
|
|
45
|
+
</Typography.H4>)}
|
|
46
|
+
{x.message && (<Typography.Pre color={TextColorTypes.sub} container={true}>
|
|
47
|
+
{x.message}
|
|
48
|
+
</Typography.Pre>)}
|
|
49
|
+
{x.content}
|
|
50
|
+
{x.actions && (<form className='mt-control-padding-base gap-control-padding-md flex' onSubmit={(e) => {
|
|
51
|
+
e.preventDefault();
|
|
52
|
+
dismissModal(x.id);
|
|
53
|
+
}}>
|
|
54
|
+
{x.actions?.map((action, i) => (<Colored type={action.default != false ? 'submit' : 'button'} autoFocus={action.default != false} key={i} rounded={x.rounded} size={ControlSize.base} label={action.label} color={action.color ?? ColorTypes.primary} className='w-full' onClick={() => {
|
|
55
|
+
dismissModal(x.id);
|
|
56
|
+
action.onClick?.();
|
|
57
|
+
}}/>))}
|
|
58
|
+
</form>)}
|
|
59
|
+
</Modal>))}
|
|
60
|
+
</motion.div>)}
|
|
61
|
+
</ModalContext.Provider>);
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=index.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../src/hooks/modal/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAE7C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEnF,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAA;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAA;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,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AAC,CACnB,IAAI,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CACvB,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CACpB,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,IAAI,UAAU,CAAC,OAAO,CAAC,CAC1C,SAAS,CAAC,QAAQ,CAClB,OAAO,CAAC,CAAC,GAAG,EAAE;4BACZ,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;4BAClB,MAAM,CAAC,OAAO,EAAE,EAAE,CAAA;wBACpB,CAAC,CAAC,EACF,CACH,CAAC,CACJ;gBAAA,EAAE,IAAI,CAAC,CACR,CACH;YAAA,EAAE,KAAK,CAAC,CACT,CAAC,CACJ;QAAA,EAAE,MAAM,CAAC,GAAG,CAAC,CACd,CACH;IAAA,EAAE,YAAY,CAAC,QAAQ,CAAC,CACzB,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { ColorTypes } from '../../ui/theme/color';
|
|
3
|
+
interface IToastContext {
|
|
4
|
+
showToast: (p: {
|
|
5
|
+
content: ReactNode;
|
|
6
|
+
color?: ColorTypes;
|
|
7
|
+
length?: number;
|
|
8
|
+
}) => void;
|
|
9
|
+
dismissToast: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const useToastContext: () => IToastContext;
|
|
12
|
+
export declare const ToastProvider: ({ children }: {
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
}) => import("react").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createContext, useContext, useState } from 'react';
|
|
3
|
+
import { Toast } from '../../ui/layout/toast';
|
|
4
|
+
import { ColorTypes } from '../../ui/theme/color';
|
|
5
|
+
const ToastContext = createContext({
|
|
6
|
+
showToast: () => { },
|
|
7
|
+
dismissToast: () => { },
|
|
8
|
+
});
|
|
9
|
+
export const useToastContext = () => useContext(ToastContext);
|
|
10
|
+
export const ToastProvider = ({ children }) => {
|
|
11
|
+
const [content, setContent] = useState();
|
|
12
|
+
const [color, setColor] = useState(ColorTypes.success);
|
|
13
|
+
const [h, setH] = useState();
|
|
14
|
+
const showToast = ({ content, color, length }) => {
|
|
15
|
+
setContent(content);
|
|
16
|
+
setColor(color ?? ColorTypes.success);
|
|
17
|
+
if (h) {
|
|
18
|
+
clearTimeout(h);
|
|
19
|
+
setH(undefined);
|
|
20
|
+
}
|
|
21
|
+
if (length) {
|
|
22
|
+
setH(setTimeout(() => {
|
|
23
|
+
setContent(undefined);
|
|
24
|
+
setH(undefined);
|
|
25
|
+
}, length));
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const dismissToast = () => {
|
|
29
|
+
setContent(undefined);
|
|
30
|
+
setH(undefined);
|
|
31
|
+
};
|
|
32
|
+
return (<ToastContext.Provider value={{ showToast, dismissToast }}>
|
|
33
|
+
{children}
|
|
34
|
+
{content && (<Toast color={color} onClickClose={dismissToast}>
|
|
35
|
+
{content}
|
|
36
|
+
</Toast>)}
|
|
37
|
+
</ToastContext.Provider>);
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=index.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../src/hooks/toast/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAGZ,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE3D,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAMjD,MAAM,YAAY,GAAG,aAAa,CAAgB;IAChD,SAAS,EAAE,GAAG,EAAE,GAAE,CAAC;IACnB,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC;CACvB,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,eAAe,GAA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CAC9C;UAAA,CAAC,OAAO,CACV;QAAA,EAAE,KAAK,CAAC,CACT,CACH;IAAA,EAAE,YAAY,CAAC,QAAQ,CAAC,CACzB,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
type FlatMessages = Record<string, string>;
|
|
2
|
+
export declare const createRequestConfig: (getConsumerMessages: (locale: string) => Promise<FlatMessages>) => (params: import("next-intl/server").GetRequestConfigParams) => import("next-intl/server").RequestConfig | Promise<import("next-intl/server").RequestConfig>;
|
|
3
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { getRequestConfig } from 'next-intl/server';
|
|
2
|
+
import { getCookieValue } from '../lib/cookie';
|
|
3
|
+
const normalizeMessages = (flat) => {
|
|
4
|
+
const result = {};
|
|
5
|
+
for (const [key, value] of Object.entries(flat)) {
|
|
6
|
+
if (!key.includes('.')) {
|
|
7
|
+
result[key] = value;
|
|
8
|
+
continue;
|
|
9
|
+
}
|
|
10
|
+
const segments = key.split('.');
|
|
11
|
+
const last = segments.pop() ?? '';
|
|
12
|
+
let current = result;
|
|
13
|
+
for (const segment of segments) {
|
|
14
|
+
const existing = current[segment];
|
|
15
|
+
if (typeof existing === 'string') {
|
|
16
|
+
current[segment] = { '': existing };
|
|
17
|
+
}
|
|
18
|
+
if (!current[segment]) {
|
|
19
|
+
current[segment] = {};
|
|
20
|
+
}
|
|
21
|
+
current = current[segment];
|
|
22
|
+
}
|
|
23
|
+
current[last] = value;
|
|
24
|
+
}
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
export const createRequestConfig = (getConsumerMessages) => getRequestConfig(async () => {
|
|
28
|
+
const locale = (await getCookieValue('locale')) ?? 'ja-JP';
|
|
29
|
+
const frameworkMessagesFlat = (await import(`./strings/${locale}.json`)).default;
|
|
30
|
+
const consumerMessagesFlat = await getConsumerMessages(locale);
|
|
31
|
+
return {
|
|
32
|
+
locale,
|
|
33
|
+
messages: {
|
|
34
|
+
...normalizeMessages(frameworkMessagesFlat),
|
|
35
|
+
...normalizeMessages(consumerMessagesFlat),
|
|
36
|
+
},
|
|
37
|
+
onError: () => { },
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAK9C,MAAM,iBAAiB,GAAG,CAAC,IAAkB,EAAkB,EAAE;IAC/D,MAAM,MAAM,GAAmB,EAAE,CAAA;IACjC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QAChD,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACvB,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;YACnB,SAAQ;QACV,CAAC;QAED,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QAC/B,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,EAAE,IAAI,EAAE,CAAA;QACjC,IAAI,OAAO,GAAmB,MAAM,CAAA;QACpC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;YAC/B,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;YACjC,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;gBACjC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAA;YACrC,CAAC;YACD,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;gBACtB,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,CAAA;YACvB,CAAC;YACD,OAAO,GAAG,OAAO,CAAC,OAAO,CAAmB,CAAA;QAC9C,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAA;IACvB,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,mBAA8D,EAAE,EAAE,CACpG,gBAAgB,CAAC,KAAK,IAAI,EAAE;IAC1B,MAAM,MAAM,GAAG,CAAC,MAAM,cAAc,CAAC,QAAQ,CAAC,CAAC,IAAI,OAAO,CAAA;IAC1D,MAAM,qBAAqB,GAAiB,CAAC,MAAM,MAAM,CAAC,aAAa,MAAM,OAAO,CAAC,CAAC,CAAC,OAAO,CAAA;IAC9F,MAAM,oBAAoB,GAAG,MAAM,mBAAmB,CAAC,MAAM,CAAC,CAAA;IAC9D,OAAO;QACL,MAAM;QACN,QAAQ,EAAE;YACR,GAAG,iBAAiB,CAAC,qBAAqB,CAAC;YAC3C,GAAG,iBAAiB,CAAC,oBAAoB,CAAC;SAC3C;QACD,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC;KAClB,CAAA;AACH,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"locale": "en-US",
|
|
3
|
+
"dateFormat": "MM/dd/yyyy",
|
|
4
|
+
"monShort": "Mon",
|
|
5
|
+
"monLong": "Monday",
|
|
6
|
+
"tueShort": "Tue",
|
|
7
|
+
"tueLong": "Tuesday",
|
|
8
|
+
"wedShort": "Wed",
|
|
9
|
+
"wedLong": "Wednesday",
|
|
10
|
+
"thuShort": "Thu",
|
|
11
|
+
"thuLong": "Thursday",
|
|
12
|
+
"friShort": "Fri",
|
|
13
|
+
"friLong": "Friday",
|
|
14
|
+
"satShort": "Sat",
|
|
15
|
+
"satLong": "Saturday",
|
|
16
|
+
"sunShort": "Sun",
|
|
17
|
+
"sunLong": "Sunday"
|
|
18
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"locale": "ja-JP",
|
|
3
|
+
"dateFormat": "yyyy/MM/dd",
|
|
4
|
+
"monShort": "月",
|
|
5
|
+
"monLong": "月曜日",
|
|
6
|
+
"tueShort": "火",
|
|
7
|
+
"tueLong": "火曜日",
|
|
8
|
+
"wedShort": "水",
|
|
9
|
+
"wedLong": "水曜日",
|
|
10
|
+
"thuShort": "木",
|
|
11
|
+
"thuLong": "木曜日",
|
|
12
|
+
"friShort": "金",
|
|
13
|
+
"friLong": "金曜日",
|
|
14
|
+
"satShort": "土",
|
|
15
|
+
"satLong": "土曜日",
|
|
16
|
+
"sunShort": "日",
|
|
17
|
+
"sunLong": "日曜日",
|
|
18
|
+
"Error": "エラー",
|
|
19
|
+
"Please select": "選択してください",
|
|
20
|
+
"No options found": "選択肢が見つかりません",
|
|
21
|
+
"OK": "OK",
|
|
22
|
+
"Cancel": "キャンセル",
|
|
23
|
+
"Back": "戻る",
|
|
24
|
+
"Previous": "前へ",
|
|
25
|
+
"Next": "次へ",
|
|
26
|
+
"Yes": "はい",
|
|
27
|
+
"No": "いいえ",
|
|
28
|
+
"Email": "メールアドレス",
|
|
29
|
+
"Password": "パスワード",
|
|
30
|
+
"Sign in": "サインイン",
|
|
31
|
+
"Sign in failed. Please check your email and password.": "サインインに失敗しました。メールアドレスとパスワードを確認してください。",
|
|
32
|
+
"Sign in succeeded": "サインインしました",
|
|
33
|
+
"Page not found": "ページが見つかりません",
|
|
34
|
+
"The URL may be incorrect or the page may have been deleted.": "URLが間違っているか、ページが削除された可能性があります。",
|
|
35
|
+
"Go to home": "ホームに戻る",
|
|
36
|
+
"Search": "検索"
|
|
37
|
+
}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA;AACrB,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,OAAO,CAAA;AACrB,cAAc,MAAM,CAAA;AACpB,cAAc,QAAQ,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const setCookieValue: (cookieName: string, value: string, options?: {
|
|
2
|
+
httpOnly?: boolean;
|
|
3
|
+
secure?: boolean;
|
|
4
|
+
sameSite?: "strict" | "lax" | "none";
|
|
5
|
+
maxAge?: number;
|
|
6
|
+
}) => Promise<void>;
|
|
7
|
+
export declare const getCookieValue: (cookieName: string) => Promise<string | undefined>;
|
|
8
|
+
export declare const deleteCookieValue: (cookieName: string) => Promise<void>;
|
|
9
|
+
export declare const getAllCookieNames: () => Promise<string[]>;
|