@chayns-components/date 5.0.0-beta.433
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/LICENSE +21 -0
- package/README.md +34 -0
- package/lib/components/calendar/Calendar.d.ts +36 -0
- package/lib/components/calendar/Calendar.js +141 -0
- package/lib/components/calendar/Calendar.js.map +1 -0
- package/lib/components/calendar/Calendar.styles.d.ts +4 -0
- package/lib/components/calendar/Calendar.styles.js +20 -0
- package/lib/components/calendar/Calendar.styles.js.map +1 -0
- package/lib/components/calendar/month-wrapper/MonthWrapper.d.ts +17 -0
- package/lib/components/calendar/month-wrapper/MonthWrapper.js +137 -0
- package/lib/components/calendar/month-wrapper/MonthWrapper.js.map +1 -0
- package/lib/components/calendar/month-wrapper/MonthWrapper.styles.d.ts +271 -0
- package/lib/components/calendar/month-wrapper/MonthWrapper.styles.js +24 -0
- package/lib/components/calendar/month-wrapper/MonthWrapper.styles.js.map +1 -0
- package/lib/components/calendar/month-wrapper/month/Month.d.ts +14 -0
- package/lib/components/calendar/month-wrapper/month/Month.js +43 -0
- package/lib/components/calendar/month-wrapper/month/Month.js.map +1 -0
- package/lib/components/calendar/month-wrapper/month/Month.styles.d.ts +4 -0
- package/lib/components/calendar/month-wrapper/month/Month.styles.js +23 -0
- package/lib/components/calendar/month-wrapper/month/Month.styles.js.map +1 -0
- package/lib/components/calendar/month-wrapper/month/day-wrapper/DayWrapper.d.ts +12 -0
- package/lib/components/calendar/month-wrapper/month/day-wrapper/DayWrapper.js +60 -0
- package/lib/components/calendar/month-wrapper/month/day-wrapper/DayWrapper.js.map +1 -0
- package/lib/components/calendar/month-wrapper/month/day-wrapper/DayWrapper.styles.d.ts +2 -0
- package/lib/components/calendar/month-wrapper/month/day-wrapper/DayWrapper.styles.js +17 -0
- package/lib/components/calendar/month-wrapper/month/day-wrapper/DayWrapper.styles.js.map +1 -0
- package/lib/components/calendar/month-wrapper/month/day-wrapper/day/Day.d.ts +12 -0
- package/lib/components/calendar/month-wrapper/month/day-wrapper/day/Day.js +66 -0
- package/lib/components/calendar/month-wrapper/month/day-wrapper/day/Day.js.map +1 -0
- package/lib/components/calendar/month-wrapper/month/day-wrapper/day/Day.styles.d.ts +15 -0
- package/lib/components/calendar/month-wrapper/month/day-wrapper/day/Day.styles.js +75 -0
- package/lib/components/calendar/month-wrapper/month/day-wrapper/day/Day.styles.js.map +1 -0
- package/lib/components/calendar/month-wrapper/month/day-wrapper/day/category/Category.d.ts +6 -0
- package/lib/components/calendar/month-wrapper/month/day-wrapper/day/category/Category.js +20 -0
- package/lib/components/calendar/month-wrapper/month/day-wrapper/day/category/Category.js.map +1 -0
- package/lib/components/calendar/month-wrapper/month/day-wrapper/day/category/Category.styles.d.ts +7 -0
- package/lib/components/calendar/month-wrapper/month/day-wrapper/day/category/Category.styles.js +21 -0
- package/lib/components/calendar/month-wrapper/month/day-wrapper/day/category/Category.styles.js.map +1 -0
- package/lib/components/calendar/month-wrapper/month/weekday-wrapper/WeekdayWrapper.d.ts +7 -0
- package/lib/components/calendar/month-wrapper/month/weekday-wrapper/WeekdayWrapper.js +45 -0
- package/lib/components/calendar/month-wrapper/month/weekday-wrapper/WeekdayWrapper.js.map +1 -0
- package/lib/components/calendar/month-wrapper/month/weekday-wrapper/WeekdayWrapper.styles.d.ts +2 -0
- package/lib/components/calendar/month-wrapper/month/weekday-wrapper/WeekdayWrapper.styles.js +16 -0
- package/lib/components/calendar/month-wrapper/month/weekday-wrapper/WeekdayWrapper.styles.js.map +1 -0
- package/lib/components/calendar/month-wrapper/month/weekday-wrapper/weekday/Weekday.d.ts +6 -0
- package/lib/components/calendar/month-wrapper/month/weekday-wrapper/weekday/Weekday.js +18 -0
- package/lib/components/calendar/month-wrapper/month/weekday-wrapper/weekday/Weekday.js.map +1 -0
- package/lib/components/calendar/month-wrapper/month/weekday-wrapper/weekday/Weekday.styles.d.ts +4 -0
- package/lib/components/calendar/month-wrapper/month/weekday-wrapper/weekday/Weekday.styles.js +19 -0
- package/lib/components/calendar/month-wrapper/month/weekday-wrapper/weekday/Weekday.styles.js.map +1 -0
- package/lib/components/date-info/DateInfo.d.ts +37 -0
- package/lib/components/date-info/DateInfo.js +110 -0
- package/lib/components/date-info/DateInfo.js.map +1 -0
- package/lib/components/opening-times/OpeningTimes.d.ts +27 -0
- package/lib/components/opening-times/OpeningTimes.js +135 -0
- package/lib/components/opening-times/OpeningTimes.js.map +1 -0
- package/lib/components/opening-times/OpeningTimes.styles.d.ts +8 -0
- package/lib/components/opening-times/OpeningTimes.styles.js +19 -0
- package/lib/components/opening-times/OpeningTimes.styles.js.map +1 -0
- package/lib/components/opening-times/opening-inputs/OpeningInputs.d.ts +12 -0
- package/lib/components/opening-times/opening-inputs/OpeningInputs.js +94 -0
- package/lib/components/opening-times/opening-inputs/OpeningInputs.js.map +1 -0
- package/lib/components/opening-times/opening-inputs/OpeningInputs.styles.d.ts +2 -0
- package/lib/components/opening-times/opening-inputs/OpeningInputs.styles.js +13 -0
- package/lib/components/opening-times/opening-inputs/OpeningInputs.styles.js.map +1 -0
- package/lib/components/opening-times/opening-inputs/opening-input/OpeningInput.d.ts +14 -0
- package/lib/components/opening-times/opening-inputs/opening-input/OpeningInput.js +100 -0
- package/lib/components/opening-times/opening-inputs/opening-input/OpeningInput.js.map +1 -0
- package/lib/components/opening-times/opening-inputs/opening-input/OpeningInput.styles.d.ts +274 -0
- package/lib/components/opening-times/opening-inputs/opening-input/OpeningInput.styles.js +46 -0
- package/lib/components/opening-times/opening-inputs/opening-input/OpeningInput.styles.js.map +1 -0
- package/lib/constants/dateInfo.d.ts +22 -0
- package/lib/constants/dateInfo.js +629 -0
- package/lib/constants/dateInfo.js.map +1 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.js +28 -0
- package/lib/index.js.map +1 -0
- package/lib/types/calendar.d.ts +32 -0
- package/lib/types/calendar.js +22 -0
- package/lib/types/calendar.js.map +1 -0
- package/lib/types/openingTimes.d.ts +28 -0
- package/lib/types/openingTimes.js +13 -0
- package/lib/types/openingTimes.js.map +1 -0
- package/lib/utils/calendar.d.ts +15 -0
- package/lib/utils/calendar.js +58 -0
- package/lib/utils/calendar.js.map +1 -0
- package/lib/utils/dateInfo.d.ts +55 -0
- package/lib/utils/dateInfo.js +364 -0
- package/lib/utils/dateInfo.js.map +1 -0
- package/package.json +69 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dateInfo.js","names":["_dateFns","require","_dateInfo","_chaynsApi","_locale","getLanguage","getChaynsLanguage","translation","site","enGB","nl","fr","it","pl","pt","es","tr","uk","de","exports","getTimeString","_ref","language","isMorning","getYearFormat","_ref2","date","shouldShowThisYear","isThisYear","getMonthFormat","_ref3","shouldUseShortText","getFormattedDayOfWeek","_ref4","shouldShowRelativeDayOfWeek","shouldShowDayOfWeek","isToday","code","isTomorrow","isYesterday","format","locale","getFormattedTime","_ref5","shouldShowTime","timeFormat","hours","getHours","TimeType","getTimeTypeStrings","TIME_TYPE_STRINGS","getTimeTillNow","_ref6","currentDate","time","value","type","Years","isPast","elapsedMilliseconds","getTime","Math","floor","Seconds","Minutes","Hours","Days","Weeks","Months","getFormattedPastTimeString","remainingMilliseconds","getFormattedFutureTimeString","timeTypeStrings","isSingular","seconds","days","weeks","months","years","minutes","past","singular","plural","future"],"sources":["../../src/utils/dateInfo.ts"],"sourcesContent":["import { format, isPast, isThisYear, isToday, isTomorrow, isYesterday } from 'date-fns';\nimport { TIME_TYPE_STRINGS, type TimeTypeStringsRecord } from '../constants/dateInfo';\nimport { getLanguage as getChaynsLanguage } from 'chayns-api';\nimport { de, enGB, es, fr, it, nl, pl, pt, tr, uk } from 'date-fns/locale';\n\nexport const getLanguage = (): Locale => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n switch (getChaynsLanguage().translation || getChaynsLanguage().site) {\n case 'en':\n return enGB;\n case 'nl':\n return nl;\n case 'fr':\n return fr;\n case 'it':\n return it;\n case 'pl':\n return pl;\n case 'pt':\n return pt;\n case 'es':\n return es;\n case 'tr':\n return tr;\n case 'uk':\n return uk;\n default:\n return de;\n }\n};\n\ninterface GetTimeStringProps {\n language?: string;\n isMorning?: boolean;\n}\n\nexport const getTimeString = ({ language, isMorning }: GetTimeStringProps) => {\n switch (language) {\n case 'en-GB':\n case 'pt':\n return isMorning ? 'AM' : 'PM';\n case 'nl':\n return 'uur';\n case 'fr':\n return 'heures';\n case 'de':\n return 'Uhr';\n case 'es':\n return 'h';\n default:\n return '';\n }\n};\n\ninterface GetFormattedYearOptions {\n date: Date;\n shouldShowThisYear?: boolean;\n}\n\nexport const getYearFormat = ({ date, shouldShowThisYear }: GetFormattedYearOptions) => {\n if (shouldShowThisYear) {\n return ' yyyy';\n }\n\n return isThisYear(date) ? '' : ' yyyy';\n};\n\ninterface GetFormattedMonthOptions {\n shouldUseShortText?: boolean;\n}\n\nexport const getMonthFormat = ({ shouldUseShortText }: GetFormattedMonthOptions) => {\n if (shouldUseShortText) {\n return 'LLL.';\n }\n\n return 'LLLL';\n};\n\ninterface GetFormattedDayOfWeekOptions {\n shouldShowDayOfWeek?: boolean;\n shouldShowRelativeDayOfWeek?: boolean;\n shouldUseShortText?: boolean;\n date: Date;\n language?: Locale;\n}\n\nexport const getFormattedDayOfWeek = ({\n shouldShowRelativeDayOfWeek,\n shouldShowDayOfWeek,\n shouldUseShortText,\n date,\n language,\n}: GetFormattedDayOfWeekOptions) => {\n if (!shouldShowDayOfWeek && !shouldShowRelativeDayOfWeek) {\n return '';\n }\n\n if (shouldShowRelativeDayOfWeek) {\n if (isToday(date)) {\n switch (language?.code) {\n case 'en-GB':\n return 'Today, ';\n case 'nl':\n return 'Vandaag, ';\n case 'fr':\n return \"Aujourd'hui, \";\n case 'it':\n return 'Oggi, ';\n case 'pl':\n return 'Dzisiaj, ';\n case 'pt':\n return 'Hoje, ';\n case 'es':\n return 'Hoy, ';\n case 'tr':\n return 'Bugün, ';\n case 'uk':\n return 'Сьогодні, ';\n default:\n return 'Heute, ';\n }\n }\n\n if (isTomorrow(date)) {\n switch (language?.code) {\n case 'en-GB':\n return 'Tomorrow, ';\n case 'nl':\n return 'Morgen, ';\n case 'fr':\n return 'Demain, ';\n case 'it':\n return 'Domani, ';\n case 'pl':\n return 'Jutro, ';\n case 'pt':\n return 'Amanhã, ';\n case 'es':\n return 'Mañana, ';\n case 'tr':\n return 'Yarın, ';\n case 'uk':\n return 'Завтра, ';\n default:\n return 'Morgen, ';\n }\n }\n\n if (isYesterday(date)) {\n switch (language?.code) {\n case 'en-GB':\n return 'Yesterday, ';\n case 'nl':\n return 'Gisteren, ';\n case 'fr':\n return 'Hier, ';\n case 'it':\n return 'Ieri, ';\n case 'pl':\n return 'Wczoraj, ';\n case 'pt':\n return 'Ontem, ';\n case 'es':\n return 'Ayer, ';\n case 'tr':\n return 'Dün, ';\n case 'uk':\n return 'Вчора, ';\n default:\n return 'Gestern, ';\n }\n }\n }\n\n if (shouldUseShortText) {\n return format(date, 'E., ', { locale: language });\n }\n\n return format(date, 'EEEE, ', { locale: language });\n};\n\ninterface GetFormattedTimeOptions {\n shouldShowTime?: boolean;\n date: Date;\n language: Locale;\n}\n\nexport const getFormattedTime = ({ shouldShowTime, date, language }: GetFormattedTimeOptions) => {\n if (!shouldShowTime) {\n return '';\n }\n\n let timeFormat = 'HH:mm';\n\n if (language.code === 'en-GB' || language.code === 'pt') {\n timeFormat = 'KK:mm';\n }\n\n return `, ${format(date, timeFormat)} ${getTimeString({\n language: language.code,\n isMorning: isMorning(date),\n })}`;\n};\n\nexport const isMorning = (date: Date) => {\n const hours = date.getHours();\n\n return hours >= 0 && hours < 12;\n};\n\nexport interface Time {\n value: number;\n type: TimeType;\n isPast: boolean;\n}\n\nexport enum TimeType {\n Seconds,\n Minutes,\n Hours,\n Days,\n Weeks,\n Months,\n Years,\n}\n\nexport const getTimeTypeStrings = (language: string): TimeTypeStringsRecord | undefined =>\n TIME_TYPE_STRINGS[language === 'en-GB' ? 'en' : language];\n\ninterface GetTimeTillNowOptions {\n date: Date;\n currentDate: Date;\n language: Locale;\n}\n\nexport const getTimeTillNow = ({ date, currentDate, language }: GetTimeTillNowOptions): string => {\n const time: Time = {\n value: 0,\n type: TimeType.Years,\n isPast: false,\n };\n\n if (isPast(date)) {\n const elapsedMilliseconds = currentDate.getTime() - date.getTime();\n\n switch (true) {\n case elapsedMilliseconds < 60000:\n time.value = Math.floor(elapsedMilliseconds / 1000);\n time.type = TimeType.Seconds;\n break;\n case elapsedMilliseconds < 3600000:\n time.value = Math.floor(elapsedMilliseconds / 60000);\n time.type = TimeType.Minutes;\n break;\n case elapsedMilliseconds < 86400000:\n time.value = Math.floor(elapsedMilliseconds / 3600000);\n time.type = TimeType.Hours;\n break;\n case elapsedMilliseconds < 604800000:\n time.value = Math.floor(elapsedMilliseconds / 86400000);\n time.type = TimeType.Days;\n break;\n case elapsedMilliseconds < 2592000000:\n time.value = Math.floor(elapsedMilliseconds / 604800000);\n time.type = TimeType.Weeks;\n break;\n case elapsedMilliseconds < 31536000000:\n time.value = Math.floor(elapsedMilliseconds / 2592000000);\n time.type = TimeType.Months;\n break;\n default:\n time.value = Math.floor(elapsedMilliseconds / 31536000000);\n time.type = TimeType.Years;\n break;\n }\n\n return `${time.value} ${getFormattedPastTimeString(time, language)}`;\n }\n\n const remainingMilliseconds = date.getTime() - currentDate.getTime();\n\n switch (true) {\n case remainingMilliseconds < 60000:\n time.value = Math.floor(remainingMilliseconds / 1000);\n time.type = TimeType.Seconds;\n break;\n case remainingMilliseconds < 3600000:\n time.value = Math.floor(remainingMilliseconds / 60000);\n time.type = TimeType.Minutes;\n break;\n case remainingMilliseconds < 86400000:\n time.value = Math.floor(remainingMilliseconds / 3600000);\n time.type = TimeType.Hours;\n break;\n case remainingMilliseconds < 604800000:\n time.value = Math.floor(remainingMilliseconds / 86400000);\n time.type = TimeType.Days;\n break;\n case remainingMilliseconds < 2592000000:\n time.value = Math.floor(remainingMilliseconds / 604800000);\n time.type = TimeType.Weeks;\n break;\n case remainingMilliseconds < 31536000000:\n time.value = Math.floor(remainingMilliseconds / 2592000000);\n time.type = TimeType.Months;\n break;\n default:\n time.value = Math.floor(remainingMilliseconds / 31536000000);\n time.type = TimeType.Years;\n break;\n }\n\n return `${time.value} ${getFormattedFutureTimeString(time, language)}`;\n};\n\nexport const getFormattedPastTimeString = (time: Time, language: Locale): string => {\n const { value, type } = time;\n\n const timeTypeStrings = getTimeTypeStrings(language.code ?? 'de');\n const isSingular = value === 1;\n\n if (!timeTypeStrings) {\n return '';\n }\n\n const { seconds, days, weeks, months, years, minutes, hours } = timeTypeStrings.past;\n\n switch (true) {\n case type === TimeType.Seconds:\n return isSingular ? seconds.singular : seconds.plural;\n case type === TimeType.Minutes:\n return isSingular ? minutes.singular : minutes.plural;\n case type === TimeType.Hours:\n return isSingular ? hours.singular : hours.plural;\n case type === TimeType.Days:\n return isSingular ? days.singular : days.plural;\n case type === TimeType.Weeks:\n return isSingular ? weeks.singular : weeks.plural;\n case type === TimeType.Months:\n return isSingular ? months.singular : months.plural;\n default:\n return isSingular ? years.singular : years.plural;\n }\n};\n\nexport const getFormattedFutureTimeString = (time: Time, language: Locale): string => {\n const { value, type } = time;\n const timeTypeStrings = getTimeTypeStrings(language.code ?? 'de');\n const isSingular = value === 1;\n\n if (!timeTypeStrings) {\n return '';\n }\n\n const { seconds, days, weeks, months, years, minutes, hours } = timeTypeStrings.future;\n\n switch (true) {\n case type === TimeType.Seconds:\n return isSingular ? seconds.singular : seconds.plural;\n case type === TimeType.Minutes:\n return isSingular ? minutes.singular : minutes.plural;\n case type === TimeType.Hours:\n return isSingular ? hours.singular : hours.plural;\n case type === TimeType.Days:\n return isSingular ? days.singular : days.plural;\n case type === TimeType.Weeks:\n return isSingular ? weeks.singular : weeks.plural;\n case type === TimeType.Months:\n return isSingular ? months.singular : months.plural;\n default:\n return isSingular ? years.singular : years.plural;\n }\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,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QAAQ,CAACiB,KAAK;MACxB,OAAOQ,UAAU,GAAG3B,KAAK,CAACmC,QAAQ,GAAGnC,KAAK,CAACoC,MAAM;IACrD,KAAK1B,IAAI,KAAKR,QAAQ,CAACkB,IAAI;MACvB,OAAOO,UAAU,GAAGE,IAAI,CAACM,QAAQ,GAAGN,IAAI,CAACO,MAAM;IACnD,KAAK1B,IAAI,KAAKR,QAAQ,CAACmB,KAAK;MACxB,OAAOM,UAAU,GAAGG,KAAK,CAACK,QAAQ,GAAGL,KAAK,CAACM,MAAM;IACrD,KAAK1B,IAAI,KAAKR,QAAQ,CAACoB,MAAM;MACzB,OAAOK,UAAU,GAAGI,MAAM,CAACI,QAAQ,GAAGJ,MAAM,CAACK,MAAM;IACvD;MACI,OAAOT,UAAU,GAAGK,KAAK,CAACG,QAAQ,GAAGH,KAAK,CAACI,MAAM;EACzD;AACJ,CAAC;AAAC/D,OAAA,CAAAoD,4BAAA,GAAAA,4BAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@chayns-components/date",
|
|
3
|
+
"version": "5.0.0-beta.433",
|
|
4
|
+
"description": "A set of beautiful React components for developing your own applications with chayns.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"chayns",
|
|
7
|
+
"react",
|
|
8
|
+
"components"
|
|
9
|
+
],
|
|
10
|
+
"author": "Tobit.Software",
|
|
11
|
+
"homepage": "https://github.com/TobitSoftware/chayns-components/tree/main/packages/date#readme",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"main": "lib/index.js",
|
|
14
|
+
"types": "lib/index.d.ts",
|
|
15
|
+
"directories": {
|
|
16
|
+
"lib": "lib",
|
|
17
|
+
"test": "__tests__"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"lib"
|
|
21
|
+
],
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/TobitSoftware/chayns-components.git"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "npm run build:js && npm run build:types",
|
|
28
|
+
"build:js": "babel src --out-dir lib --extensions=.ts,.tsx --source-maps --ignore=src/stories",
|
|
29
|
+
"build:types": "tsc",
|
|
30
|
+
"prepublishOnly": "npm run build"
|
|
31
|
+
},
|
|
32
|
+
"bugs": {
|
|
33
|
+
"url": "https://github.com/TobitSoftware/chayns-components/issues"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@babel/cli": "^7.23.4",
|
|
37
|
+
"@babel/core": "^7.23.7",
|
|
38
|
+
"@babel/preset-env": "^7.23.8",
|
|
39
|
+
"@babel/preset-react": "^7.23.3",
|
|
40
|
+
"@babel/preset-typescript": "^7.23.3",
|
|
41
|
+
"@types/react": "^18.2.48",
|
|
42
|
+
"@types/react-dom": "^18.2.18",
|
|
43
|
+
"@types/styled-components": "^5.1.34",
|
|
44
|
+
"@types/uuid": "^9.0.7",
|
|
45
|
+
"babel-loader": "^9.1.3",
|
|
46
|
+
"lerna": "^8.0.2",
|
|
47
|
+
"react": "^18.2.0",
|
|
48
|
+
"react-dom": "^18.2.0",
|
|
49
|
+
"styled-components": "^6.1.8",
|
|
50
|
+
"typescript": "^5.3.3"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@chayns-components/core": "^5.0.0-beta.433",
|
|
54
|
+
"chayns-api": "^1.0.50",
|
|
55
|
+
"date-fns": "^2.30.0",
|
|
56
|
+
"framer-motion": "^10.18.0",
|
|
57
|
+
"uuid": "^9.0.1"
|
|
58
|
+
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"date-fns": "^2.30.0",
|
|
61
|
+
"react": ">=16.14.0",
|
|
62
|
+
"react-dom": ">=16.14.0",
|
|
63
|
+
"styled-components": "^5.3.11"
|
|
64
|
+
},
|
|
65
|
+
"publishConfig": {
|
|
66
|
+
"access": "public"
|
|
67
|
+
},
|
|
68
|
+
"gitHead": "c7d263ad6fb63db654408f2b56f15e6b04ab8f76"
|
|
69
|
+
}
|