Fix retrocompat with React 16 and TypeScript 3 https://github.com/garronej/tss-react/issues/95
This commit is contained in:
parent
d79081dee4
commit
de53f1ff40
@ -1,4 +1,4 @@
|
|||||||
import { memo } from "react";
|
import React, { memo } from "react";
|
||||||
import Template from "./Template";
|
import Template from "./Template";
|
||||||
import type { KcProps } from "./KcProps";
|
import type { KcProps } from "./KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { memo } from "react";
|
import React, { memo } from "react";
|
||||||
import Template from "./Template";
|
import Template from "./Template";
|
||||||
import type { KcProps } from "./KcProps";
|
import type { KcProps } from "./KcProps";
|
||||||
import { assert } from "../tools/assert";
|
import { assert } from "../tools/assert";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { lazy, memo, Suspense } from "react";
|
import React, { lazy, memo, Suspense } from "react";
|
||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
||||||
import type { KcProps } from "./KcProps";
|
import type { KcProps } from "./KcProps";
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { useState, memo } from "react";
|
import React, { useState, memo } from "react";
|
||||||
import Template from "./Template";
|
import Template from "./Template";
|
||||||
import type { KcProps } from "./KcProps";
|
import type { KcProps } from "./KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { memo } from "react";
|
import React, { memo } from "react";
|
||||||
import Template from "./Template";
|
import Template from "./Template";
|
||||||
import type { KcProps } from "./KcProps";
|
import type { KcProps } from "./KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { memo } from "react";
|
import React, { memo } from "react";
|
||||||
import Template from "./Template";
|
import Template from "./Template";
|
||||||
import type { KcProps } from "./KcProps";
|
import type { KcProps } from "./KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { memo } from "react";
|
import React, { memo } from "react";
|
||||||
import Template from "./Template";
|
import Template from "./Template";
|
||||||
import type { KcProps } from "./KcProps";
|
import type { KcProps } from "./KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { useEffect, memo } from "react";
|
import React, { useEffect, memo } from "react";
|
||||||
import Template from "./Template";
|
import Template from "./Template";
|
||||||
import type { KcProps } from "./KcProps";
|
import type { KcProps } from "./KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { memo } from "react";
|
import React, { memo } from "react";
|
||||||
import Template from "./Template";
|
import Template from "./Template";
|
||||||
import type { KcProps } from "./KcProps";
|
import type { KcProps } from "./KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { memo } from "react";
|
import React, { memo } from "react";
|
||||||
import Template from "./Template";
|
import Template from "./Template";
|
||||||
import type { KcProps } from "./KcProps";
|
import type { KcProps } from "./KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { memo } from "react";
|
import React, { memo } from "react";
|
||||||
import Template from "./Template";
|
import Template from "./Template";
|
||||||
import type { KcProps } from "./KcProps";
|
import type { KcProps } from "./KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { memo } from "react";
|
import React, { memo } from "react";
|
||||||
import Template from "./Template";
|
import Template from "./Template";
|
||||||
import type { KcProps } from "./KcProps";
|
import type { KcProps } from "./KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { memo } from "react";
|
import React, { memo } from "react";
|
||||||
import Template from "./Template";
|
import Template from "./Template";
|
||||||
import type { KcProps } from "./KcProps";
|
import type { KcProps } from "./KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { memo } from "react";
|
import React, { memo } from "react";
|
||||||
import { useCssAndCx } from "tss-react";
|
import { useCssAndCx } from "tss-react";
|
||||||
|
|
||||||
import Template from "./Template";
|
import Template from "./Template";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { memo } from "react";
|
import React, { memo } from "react";
|
||||||
import Template from "./Template";
|
import Template from "./Template";
|
||||||
import type { KcProps } from "./KcProps";
|
import type { KcProps } from "./KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { useMemo, memo, useEffect, useState, Fragment } from "react";
|
import React, { useMemo, memo, useEffect, useState, Fragment } from "react";
|
||||||
import Template from "./Template";
|
import Template from "./Template";
|
||||||
import type { KcProps } from "./KcProps";
|
import type { KcProps } from "./KcProps";
|
||||||
import type { KcContextBase, Attribute } from "../getKcContext/KcContextBase";
|
import type { KcContextBase, Attribute } from "../getKcContext/KcContextBase";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { useReducer, useEffect, memo } from "react";
|
import React, { useReducer, useEffect, memo } from "react";
|
||||||
import type { ReactNode } from "react";
|
import type { ReactNode } from "react";
|
||||||
import { getMsg, getCurrentKcLanguageTag, changeLocale, getTagLabel } from "../i18n";
|
import { getMsg, getCurrentKcLanguageTag, changeLocale, getTagLabel } from "../i18n";
|
||||||
import type { KcLanguageTag } from "../i18n";
|
import type { KcLanguageTag } from "../i18n";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { useReducer, useEffect, memo } from "react";
|
import React, { useReducer, useEffect, memo } from "react";
|
||||||
import Template from "./Template";
|
import Template from "./Template";
|
||||||
import type { KcProps } from "./KcProps";
|
import type { KcProps } from "./KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import "minimal-polyfills/Object.fromEntries";
|
import "minimal-polyfills/Object.fromEntries";
|
||||||
//NOTE for later: https://github.com/remarkjs/react-markdown/blob/236182ecf30bd89c1e5a7652acaf8d0bf81e6170/src/renderers.js#L7-L35
|
//NOTE for later: https://github.com/remarkjs/react-markdown/blob/236182ecf30bd89c1e5a7652acaf8d0bf81e6170/src/renderers.js#L7-L35
|
||||||
|
import React from "react";
|
||||||
import ReactMarkdown from "react-markdown";
|
import ReactMarkdown from "react-markdown";
|
||||||
import memoize from "memoizee";
|
import memoize from "memoizee";
|
||||||
import { kcMessages as kcMessagesBase } from "./generated_kcMessages/18.0.1/login";
|
import { kcMessages as kcMessagesBase } from "./generated_kcMessages/18.0.1/login";
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"target": "ES2020",
|
"target": "ES2020",
|
||||||
"lib": ["es2015", "DOM", "ES2019.Object"],
|
"lib": ["es2015", "DOM", "ES2019.Object"],
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"jsx": "react-jsx",
|
"jsx": "react",
|
||||||
"allowSyntheticDefaultImports": true
|
"allowSyntheticDefaultImports": true
|
||||||
},
|
},
|
||||||
"references": [
|
"references": [
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import "./tools/Array.prototype.every";
|
import "./tools/Array.prototype.every";
|
||||||
import { useMemo, useReducer, Fragment } from "react";
|
import React, { useMemo, useReducer, Fragment } from "react";
|
||||||
import type { KcContextBase, Validators, Attribute } from "./getKcContext/KcContextBase";
|
import type { KcContextBase, Validators, Attribute } from "./getKcContext/KcContextBase";
|
||||||
import { getMsg } from "./i18n";
|
import { getMsg } from "./i18n";
|
||||||
import type { KcLanguageTag } from "./i18n";
|
import type { KcLanguageTag } from "./i18n";
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
"incremental": true,
|
"incremental": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"downlevelIteration": true,
|
"downlevelIteration": true,
|
||||||
"jsx": "react-jsx",
|
"jsx": "react",
|
||||||
"noFallthroughCasesInSwitch": true
|
"noFallthroughCasesInSwitch": true
|
||||||
},
|
},
|
||||||
"include": [".."]
|
"include": [".."]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user