@codeleap/mobile 5.0.2 → 5.0.4
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TypeGuards } from '@codeleap/types';
|
|
3
|
-
import
|
|
3
|
+
import dayjs from 'dayjs';
|
|
4
4
|
// @ts-ignore
|
|
5
5
|
import { Calendar as RNCalendar } from 'react-native-calendars';
|
|
6
6
|
import { View } from '../View';
|
|
@@ -11,7 +11,7 @@ export const Calendar = (props) => {
|
|
|
11
11
|
const { style, calendarProps, value, onValueChange, ...viewProps } = props;
|
|
12
12
|
const styles = useStylesFor(Calendar.styleRegistryName, style);
|
|
13
13
|
const isDateObject = TypeGuards.isInstance(value, Date);
|
|
14
|
-
const stringValue = isDateObject ? format(
|
|
14
|
+
const stringValue = isDateObject ? dayjs(value).format('YYYY/MM/DD') : value;
|
|
15
15
|
function handleChange(date) {
|
|
16
16
|
if (!onValueChange)
|
|
17
17
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Calendar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Calendar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,aAAa;AACb,OAAO,EAAE,QAAQ,IAAI,UAAU,EAA8C,MAAM,wBAAwB,CAAA;AAC3G,OAAO,EAAE,IAAI,EAAa,MAAM,SAAS,CAAA;AAGzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAA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ACF,IAAI,aAAa,CAAC,EAEtB;EAAA,EAAE,IAAI,CAAC,CAAA;AACT,CAAC,CAAA;AAED,QAAQ,CAAC,iBAAiB,GAAG,UAAU,CAAA;AACvC,QAAQ,CAAC,QAAQ,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,CAAC,CAAA;AAChO,QAAQ,CAAC,WAAW,GAAG,SAAS,CAAA;AAEhC,QAAQ,CAAC,gBAAgB,GAAG,CAAsB,MAAS,EAAE,EAAE;IAC7D,OAAO,QAA+E,CAAA;AACxF,CAAC,CAAA;AAED,mBAAmB,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codeleap/mobile",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.4",
|
|
4
4
|
"main": "src/index.ts",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -9,28 +9,28 @@
|
|
|
9
9
|
"directory": "packages/mobile"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"@codeleap/types": "5.0.
|
|
13
|
-
"@codeleap/utils": "5.0.
|
|
14
|
-
"@codeleap/hooks": "5.0.
|
|
15
|
-
"@codeleap/form": "5.0.
|
|
16
|
-
"@codeleap/i18n": "5.0.
|
|
17
|
-
"@codeleap/query": "5.0.
|
|
18
|
-
"@codeleap/logger": "5.0.
|
|
19
|
-
"@codeleap/config": "5.0.
|
|
12
|
+
"@codeleap/types": "5.0.4",
|
|
13
|
+
"@codeleap/utils": "5.0.4",
|
|
14
|
+
"@codeleap/hooks": "5.0.4",
|
|
15
|
+
"@codeleap/form": "5.0.4",
|
|
16
|
+
"@codeleap/i18n": "5.0.4",
|
|
17
|
+
"@codeleap/query": "5.0.4",
|
|
18
|
+
"@codeleap/logger": "5.0.4",
|
|
19
|
+
"@codeleap/config": "5.0.4"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build": "tsc --build",
|
|
23
23
|
"lint": "eslint -c .eslintrc.js --fix \"./src/**/*.{ts,tsx,js,jsx}\""
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@codeleap/types": "5.0.
|
|
27
|
-
"@codeleap/utils": "5.0.
|
|
28
|
-
"@codeleap/hooks": "5.0.
|
|
29
|
-
"@codeleap/form": "5.0.
|
|
30
|
-
"@codeleap/i18n": "5.0.
|
|
31
|
-
"@codeleap/query": "5.0.
|
|
32
|
-
"@codeleap/logger": "5.0.
|
|
33
|
-
"@codeleap/styles": "5.0.
|
|
26
|
+
"@codeleap/types": "5.0.4",
|
|
27
|
+
"@codeleap/utils": "5.0.4",
|
|
28
|
+
"@codeleap/hooks": "5.0.4",
|
|
29
|
+
"@codeleap/form": "5.0.4",
|
|
30
|
+
"@codeleap/i18n": "5.0.4",
|
|
31
|
+
"@codeleap/query": "5.0.4",
|
|
32
|
+
"@codeleap/logger": "5.0.4",
|
|
33
|
+
"@codeleap/styles": "5.0.4",
|
|
34
34
|
"@d11/react-native-fast-image": "8.8.0",
|
|
35
35
|
"@react-native-firebase/messaging": "21.7.2",
|
|
36
36
|
"@react-navigation/bottom-tabs": "7.2.0",
|
package/package.json.bak
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { TypeGuards } from '@codeleap/types'
|
|
3
|
-
import
|
|
3
|
+
import dayjs from 'dayjs'
|
|
4
4
|
// @ts-ignore
|
|
5
5
|
import { Calendar as RNCalendar, CalendarProps as RNCalendarProps, DateData } from 'react-native-calendars'
|
|
6
6
|
import { View, ViewProps } from '../View'
|
|
@@ -32,7 +32,7 @@ export const Calendar = (props: CalendarProps) => {
|
|
|
32
32
|
const styles = useStylesFor(Calendar.styleRegistryName, style)
|
|
33
33
|
|
|
34
34
|
const isDateObject = TypeGuards.isInstance(value, Date)
|
|
35
|
-
const stringValue: string = isDateObject ? format(
|
|
35
|
+
const stringValue: string = isDateObject ? dayjs(value).format('YYYY/MM/DD') : value
|
|
36
36
|
|
|
37
37
|
function handleChange(date: DateData) {
|
|
38
38
|
if (!onValueChange) return
|