Skip to content

Commit 2236a4d

Browse files
author
samgarasx
committed
Refactor code
1 parent 28e6f6b commit 2236a4d

File tree

112 files changed

+118
-128
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+118
-128
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
# Build
55
build/
66
out/
7-
.gradle/
7+
.gradle/

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,4 @@
199199
distributed under the License is distributed on an "AS IS" BASIS,
200200
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201201
See the License for the specific language governing permissions and
202-
limitations under the License.
202+
limitations under the License.

README.md

+1-1

gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
5-
zipStorePath=wrapper/dists
5+
zipStorePath=wrapper/dists

kotlin-react-intl/README.md

+1-1

kotlin-react-intl/react-intl-samples/src/main/kotlin/samples/Advanced.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,4 @@ val Advanced = FC<Props> {
106106
}
107107
}
108108
}
109-
}
109+
}

kotlin-react-intl/react-intl-samples/src/main/kotlin/samples/App.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ val App = FC<Props> {
3434
Advanced()
3535
Bug272()
3636
}
37-
}
37+
}

kotlin-react-intl/react-intl-samples/src/main/kotlin/samples/Bug2727.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ val Bug272 = FC<Props> {
5252
}
5353
}
5454
}
55-
}
55+
}

kotlin-react-intl/react-intl-samples/src/main/kotlin/samples/HandleChange.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ val HandleChange = FC<Props> {
6363
}.toTypedArray()
6464
}
6565
}
66-
}
66+
}

kotlin-react-intl/react-intl-samples/src/main/kotlin/samples/Hooks.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ val Hooks = FC<Props> {
7979
messages = providerMessages
8080
Demo { currentTime = Date() }
8181
}
82-
}
82+
}

kotlin-react-intl/react-intl-samples/src/main/kotlin/samples/Injected.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ val Injected = FC<Props> {
3636
child(injectIntl<Any, Comp2Props>(Comp2).create())
3737
}
3838
}
39-
}
39+
}

kotlin-react-intl/react-intl-samples/src/main/kotlin/samples/Main.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ import react.dom.client.createRoot
66

77
fun main() {
88
createRoot(document.getElementById("root")!!).render(App.create())
9-
}
9+
}

kotlin-react-intl/react-intl-samples/src/main/kotlin/samples/Messages.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,4 @@ val Messages = FC<Props> {
129129
}
130130
}
131131
}
132-
}
132+
}

kotlin-react-intl/react-intl-samples/src/main/kotlin/samples/Plural.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ val Plural = FC<Props> {
2121
+"Add dogs"
2222
}
2323
}
24-
}
24+
}

kotlin-react-intl/react-intl-samples/src/main/kotlin/samples/TimeZone.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ val TimeZone = FC<TimeZoneProps> { props ->
4747
}
4848
}
4949
}
50-
}
50+
}

kotlin-react-intl/react-intl-samples/src/main/resources/en.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,4 +213,4 @@
213213
]
214214
}
215215
]
216-
}
216+
}

kotlin-react-intl/react-intl-samples/src/main/resources/fr.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,4 +213,4 @@
213213
]
214214
}
215215
]
216-
}
216+
}

kotlin-react-intl/react-intl-samples/src/main/resources/index.html

+3-6
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,12 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8">
5-
65
<link rel="manifest" href="manifest.json">
76
<link rel="shortcut icon" href="favicon.ico">
8-
97
<title>Kotlin React Intl</title>
108
</head>
119
<body>
12-
<div id="root"></div>
13-
14-
<script src="react-intl-samples.js"></script>
10+
<div id="root"></div>
11+
<script src="react-intl-samples.js"></script>
1512
</body>
16-
</html>
13+
</html>

kotlin-react-intl/react-intl-samples/src/main/resources/manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
"display": "standalone",
1313
"theme_color": "#000000",
1414
"background_color": "#ffffff"
15-
}
15+
}

kotlin-react-intl/src/main/kotlin/reactintl/Elements.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ external interface NumberSkeleton {
7171
external interface NumberSkeletonToken {
7272
var stem: String
7373
var options: Array<String>
74-
}
74+
}

kotlin-react-intl/src/main/kotlin/reactintl/Errors.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ enum class IntlErrorCode {
88
MISSING_TRANSLATION
99
}
1010

11-
open class IntlError(val code: IntlErrorCode, message: String, exception: Error?) : Error(message, exception)
11+
open class IntlError(val code: IntlErrorCode, message: String, exception: Error?) : Error(message, exception)

kotlin-react-intl/src/main/kotlin/reactintl/Formatters.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,4 @@ external interface IntlFormatters<T> {
109109
value: Any /* String | Number | Record<String, Any> */,
110110
opts: FormatDisplayNameOptions? = definedExternally
111111
): String?
112-
}
112+
}

kotlin-react-intl/src/main/kotlin/reactintl/ReactIntl.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ external interface LocaleData<T> {
7777

7878
external interface LocaleFieldsData {
7979
var nu: Array<String>?
80-
}
80+
}

kotlin-react-intl/src/main/kotlin/reactintl/Types.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ typealias OnErrorFn = (err: IntlError) -> Unit
44
typealias MessageFormatElement = BaseElement<MessageType> /* ArgumentElement | DateElement | LiteralElement | NumberElement | PluralElement | PoundElement | SelectElement | TagElement | TimeElement */
55
typealias Skeleton = Any /* NumberSkeleton | DateTimeSkeleton */
66
typealias FormatXMLElementFn<T, R> = (parts: Array<Any /* String | T */>) -> R
7-
typealias Locale = String
7+
typealias Locale = String

kotlin-react-intl/src/main/kotlin/reactintl/Utils.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ external fun <T> getNamedFormat(
1010
type: T,
1111
name: String,
1212
onError: OnErrorFn
13-
): Any? /* IntlNumber.NumberFormatOptions | IntlDateTime.DateTimeFormatOptions | IntlRelativeTime.RelativeTimeFormatOptions */
13+
): Any? /* IntlNumber.NumberFormatOptions | IntlDateTime.DateTimeFormatOptions | IntlRelativeTime.RelativeTimeFormatOptions */

kotlin-react-intl/src/main/kotlin/reactintl/components/InjectIntl.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ external interface WrappedComponentProps<IntlPropName> : Props
3232

3333
external interface WithIntlProps<P> : Props {
3434
var forwardedRef: Ref<Any>?
35-
}
35+
}

kotlin-react-intl/src/main/kotlin/reactintl/components/UseIntl.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ package reactintl.components
66
import reactintl.IntlShape
77

88
@JsName("useIntl")
9-
external fun useIntl(): IntlShape
9+
external fun useIntl(): IntlShape

kotlin-react-intl/src/main/kotlin/reactintl/components/datetime/DateTimeTypes.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ typealias TimeZoneName = Record<String, TimeZoneNameData>
88
typealias UnpackedZoneData = Array<Any /* String | Number | Boolean */>
99
typealias DateTimeFormatPartType = Any /* IntlDateTimeFormatPartTypes | "ampm" | "relatedYear" | "yearName" | "unknown" | "fractionalSecondDigits" */
1010

11-
typealias IntlDateTimeFormatPartTypes = String /* "day" | "dayPeriod" | "era" | "hour" | "literal" | "minute" | "month" | "second" | "timeZoneName" | "weekday" | "year" */
11+
typealias IntlDateTimeFormatPartTypes = String /* "day" | "dayPeriod" | "era" | "hour" | "literal" | "minute" | "month" | "second" | "timeZoneName" | "weekday" | "year" */

kotlin-react-intl/src/main/kotlin/reactintl/components/datetime/FormattedDateTime.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,4 +234,4 @@ external object IntlDateTime {
234234
var second: String?
235235
var timeZoneName: String?
236236
}
237-
}
237+
}

kotlin-react-intl/src/main/kotlin/reactintl/components/displayname/FormattedDisplayName.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ external class DisplayNames(
3333
) {
3434
fun of(code: Any /* String | Number | Record<String, Any> */): String?
3535
fun resolvedOptions(): DisplayNamesResolvedOptions
36-
}
36+
}

kotlin-react-intl/src/main/kotlin/reactintl/components/list/FormattedList.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ external class ListFormat(locales: Any /* String | Array<String> */, options: Li
4646
fun format(elements: Array<String>): String
4747
fun formatToParts(elements: Array<String>): Array<Part<ElementPart<Any>>>
4848
fun resolvedOptions(): ResolvedListFormatOptions
49-
}
49+
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package reactintl.components.list
22

3-
typealias Part<T> = Any /* LiteralPart | ElementPart | ElementPart<T> */
3+
typealias Part<T> = Any /* LiteralPart | ElementPart | ElementPart<T> */

kotlin-react-intl/src/main/kotlin/reactintl/components/message/FormattedMessage.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ external class MessageFormat(
4242
interface ResolvedOptions {
4343
var locale: String
4444
}
45-
}
45+
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package reactintl.components.message
22

3-
typealias MessageFormatPart<T> = Any /* LiteralPart | ObjectPart<T> */
3+
typealias MessageFormatPart<T> = Any /* LiteralPart | ObjectPart<T> */

kotlin-react-intl/src/main/kotlin/reactintl/components/number/FormattedNumber.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,4 +200,4 @@ external object IntlNumber {
200200
var maximumSignificantDigits: Number?
201201
var useGrouping: Boolean
202202
}
203-
}
203+
}

kotlin-react-intl/src/main/kotlin/reactintl/components/number/NumberTypes.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ typealias NumberFormatOptionsUnitDisplay = String /* "long" | "short" | "narrow"
2020
typealias NumberFormatPartTypes = String /* IntlNumberFormatPartTypes | "exponentSeparator" | "exponentMinusSign" | "exponentInteger" | "compact" | "unit" | "literal" */
2121
typealias RawNumberLocaleData = LocaleData<NumberFormatLocaleInternalData>
2222

23-
typealias IntlNumberFormatPartTypes = String /* "exponentInteger" | "exponentMinusSign" | "exponentSeparator" | "fraction" | "group" | "infinity" | "integer" | "literal" | "minusSign" | "nan" | "plusSign" | "percentSign" | "unit" | "unknown" */
24-
23+
typealias IntlNumberFormatPartTypes = String /* "exponentInteger" | "exponentMinusSign" | "exponentSeparator" | "fraction" | "group" | "infinity" | "integer" | "literal" | "minusSign" | "nan" | "plusSign" | "percentSign" | "unit" | "unknown" */

kotlin-react-intl/src/main/kotlin/reactintl/components/plural/FormattedPlural.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ external object IntlPlural {
5050
fun resolvedOptions(): ResolvedPluralRulesOptions
5151
fun select(n: Number): IntlLDMLPluralRule
5252
}
53-
}
53+
}
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
package reactintl.components.plural
22

33
typealias IntlLDMLPluralRule = String /* "zero" | "one" | "two" | "few" | "many" | "other" */
4-
typealias IntlPluralRuleType = String /* "cardinal" | "ordinal" */
4+
typealias IntlPluralRuleType = String /* "cardinal" | "ordinal" */

kotlin-react-intl/src/main/kotlin/reactintl/components/provider/Provider.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ external interface ProviderState : State {
2222
var prevConfig: IntlConfig
2323
}
2424

25-
external val createIntl: CreateIntlFn<ReactNode, IntlConfig, IntlShape>
25+
external val createIntl: CreateIntlFn<ReactNode, IntlConfig, IntlShape>

kotlin-react-intl/src/main/kotlin/reactintl/components/provider/ProviderTypes.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ package reactintl.components.provider
22

33
import reactintl.IntlCache
44

5-
typealias CreateIntlFn<T, C, S> = (config: C, cache: IntlCache?) -> S
5+
typealias CreateIntlFn<T, C, S> = (config: C, cache: IntlCache?) -> S

kotlin-react-intl/src/main/kotlin/reactintl/components/relativetime/FormattedRelativeTime.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ external object IntlRelativeTime {
5757
fun formatToParts(value: Number, unit: IntlRelativeTimeFormatUnit): Array<RelativeTimeFormatPart>
5858
fun resolvedOptions(): ResolvedRelativeTimeFormatOptions
5959
}
60-
}
60+
}

kotlin-react-intl/src/main/kotlin/reactintl/components/relativetime/RelativeTimeTypes.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ typealias IntlUnicodeBCP47LocaleIdentifier = String
1111
typealias IntlRelativeTimeFormatUnit = String /* "year" | "years" | "quarter" | "quarters" | "month" | "months" | "week" | "weeks" | "day" | "days" | "hour" | "hours" | "minute" | "minutes" | "second" | "seconds" */
1212
typealias IntlRelativeTimeFormatLocaleMatcher = String /* "lookup" | "best fit" */
1313
typealias IntlRelativeTimeFormatNumeric = String /* "always" | "auto" */
14-
typealias IntlRelativeTimeFormatStyle = String /* "long" | "short" | "narrow" */
14+
typealias IntlRelativeTimeFormatStyle = String /* "long" | "short" | "narrow" */

kotlin-react-responsive/README.md

+1-1

kotlin-react-responsive/react-responsive-samples/src/main/kotlin/samples/App.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ val App = FC<Props> {
2828
WithHooks()
2929
WithComponents()
3030
}
31-
}
31+
}

kotlin-react-responsive/react-responsive-samples/src/main/kotlin/samples/Main.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ import react.dom.client.createRoot
66

77
fun main() {
88
createRoot(document.getElementById("root")!!).render(App.create())
9-
}
9+
}

kotlin-react-responsive/react-responsive-samples/src/main/kotlin/samples/WithComponents.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ val WithComponents = FC<Props> {
2727
}
2828
}
2929
}
30-
}
30+
}

kotlin-react-responsive/react-responsive-samples/src/main/kotlin/samples/WithHooks.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ val WithHooks = FC<Props> {
3737
p { +"You are retina" }
3838
}
3939
}
40-
}
40+
}

kotlin-react-responsive/react-responsive-samples/src/main/resources/index.html

+3-6
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,12 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8">
5-
65
<link rel="manifest" href="manifest.json">
76
<link rel="shortcut icon" href="favicon.ico">
8-
97
<title>Kotlin React Responsive</title>
108
</head>
119
<body>
12-
<div id="root"></div>
13-
14-
<script src="react-responsive-samples.js"></script>
10+
<div id="root"></div>
11+
<script src="react-responsive-samples.js"></script>
1512
</body>
16-
</html>
13+
</html>

kotlin-react-responsive/react-responsive-samples/src/main/resources/manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
"display": "standalone",
1313
"theme_color": "#000000",
1414
"background_color": "#ffffff"
15-
}
15+
}

kotlin-react-responsive/src/main/kotlin/reactresponsive/MediaQuery.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ external interface MediaQueryFeatures : MediaQueryMatchers {
7979
var maxResolution: Any? /* Number | String */
8080
}
8181

82-
external interface MediaQueryAllQueryable : MediaQueryFeatures, MediaQueryTypes
82+
external interface MediaQueryAllQueryable : MediaQueryFeatures, MediaQueryTypes

kotlin-react-responsive/src/main/kotlin/reactresponsive/MediaQueryHooks.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ external fun useMediaQuery(
1212

1313
external interface MediaQuerySettings : MediaQueryAllQueryable {
1414
var query: String?
15-
}
15+
}

kotlin-react-responsive/src/main/kotlin/reactresponsive/MediaQueryTypes.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ package reactresponsive
33
typealias MediaQueryType = String /* keyof MediaQueryTypes */
44

55
typealias MediaQueryMatcherOrientation = String /* "portrait" | "landscape" */
6-
typealias MediaQueryMatcherScan = String /* "progressive" | "interlace" */
6+
typealias MediaQueryMatcherScan = String /* "progressive" | "interlace" */

kotlin-uikit/README.md

+1-1

0 commit comments

Comments
 (0)