@semcore/core 16.4.0-prerelease.0 → 16.5.0-prerelease.3
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/CHANGELOG.md +8 -0
- package/lib/core-types/Component.js +2 -5
- package/lib/core-types/Component.js.map +1 -1
- package/lib/core-types/Component.mjs +1 -6
- package/lib/core-types/Component.mjs.map +1 -1
- package/lib/coreFactory.js +7 -11
- package/lib/coreFactory.js.map +1 -1
- package/lib/coreFactory.mjs +2 -13
- package/lib/coreFactory.mjs.map +1 -1
- package/lib/esm/core-types/Component.mjs +1 -6
- package/lib/esm/coreFactory.mjs +2 -13
- package/lib/esm/utils/createHoc.mjs +1 -6
- package/lib/esm/utils/enhances/WithI18n.mjs +1 -6
- package/lib/esm/utils/enhances/i18nEnhance.mjs +7 -10
- package/lib/theme/dark.json +41 -41
- package/lib/theme/light.json +41 -41
- package/lib/theme/processor.js +14 -15
- package/lib/theme/processor.js.map +1 -1
- package/lib/theme/processor.mjs +14 -15
- package/lib/theme/processor.mjs.map +1 -1
- package/lib/theme/themes/auto.css +20 -20
- package/lib/theme/themes/dark.css +11 -11
- package/lib/theme/themes/dark.d.ts +2 -2
- package/lib/theme/themes/dark.js +8 -8
- package/lib/theme/themes/dark.js.map +1 -1
- package/lib/theme/themes/dark.mjs +8 -8
- package/lib/theme/themes/dark.mjs.map +1 -1
- package/lib/theme/themes/default.css +9 -9
- package/lib/theme/themes/default.d.ts +2 -2
- package/lib/theme/themes/default.js +6 -6
- package/lib/theme/themes/default.js.map +1 -1
- package/lib/theme/themes/default.mjs +6 -6
- package/lib/theme/themes/default.mjs.map +1 -1
- package/lib/theme/themes/highlights-dark.css +1 -1
- package/lib/theme/themes/highlights-dark.js +1 -1
- package/lib/theme/themes/highlights-dark.js.map +1 -1
- package/lib/theme/themes/highlights-dark.mjs +1 -1
- package/lib/theme/themes/highlights-dark.mjs.map +1 -1
- package/lib/theme/themes/highlights-light.css +1 -1
- package/lib/theme/themes/highlights-light.js +1 -1
- package/lib/theme/themes/highlights-light.js.map +1 -1
- package/lib/theme/themes/highlights-light.mjs +1 -1
- package/lib/theme/themes/highlights-light.mjs.map +1 -1
- package/lib/theme/themes/light.css +9 -9
- package/lib/theme/themes/light.d.ts +2 -2
- package/lib/theme/themes/light.js +6 -6
- package/lib/theme/themes/light.js.map +1 -1
- package/lib/theme/themes/light.mjs +6 -6
- package/lib/theme/themes/light.mjs.map +1 -1
- package/lib/utils/createHoc.js +2 -5
- package/lib/utils/createHoc.js.map +1 -1
- package/lib/utils/createHoc.mjs +1 -6
- package/lib/utils/createHoc.mjs.map +1 -1
- package/lib/utils/enhances/WithAutoFocus.js +2 -5
- package/lib/utils/enhances/WithAutoFocus.js.map +1 -1
- package/lib/utils/enhances/WithAutoFocus.mjs +1 -4
- package/lib/utils/enhances/WithAutoFocus.mjs.map +1 -1
- package/lib/utils/enhances/WithCSS.js +2 -5
- package/lib/utils/enhances/WithCSS.js.map +1 -1
- package/lib/utils/enhances/WithCSS.mjs +1 -4
- package/lib/utils/enhances/WithCSS.mjs.map +1 -1
- package/lib/utils/enhances/WithI18n.js +2 -5
- package/lib/utils/enhances/WithI18n.js.map +1 -1
- package/lib/utils/enhances/WithI18n.mjs +1 -6
- package/lib/utils/enhances/WithI18n.mjs.map +1 -1
- package/lib/utils/enhances/WithKeyboardFocus.js +2 -5
- package/lib/utils/enhances/WithKeyboardFocus.js.map +1 -1
- package/lib/utils/enhances/WithKeyboardFocus.mjs +1 -4
- package/lib/utils/enhances/WithKeyboardFocus.mjs.map +1 -1
- package/lib/utils/enhances/i18nEnhance.js +7 -10
- package/lib/utils/enhances/i18nEnhance.js.map +1 -1
- package/lib/utils/enhances/i18nEnhance.mjs +7 -10
- package/lib/utils/enhances/i18nEnhance.mjs.map +1 -1
- package/lib/utils/injectStyle.js +1 -1
- package/lib/utils/injectStyle.mjs +1 -1
- package/package.json +1 -1
package/lib/utils/createHoc.mjs
CHANGED
|
@@ -3,18 +3,13 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
4
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
5
5
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
6
|
-
import
|
|
7
|
-
import _isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
|
|
8
|
-
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
6
|
+
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
9
7
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
10
8
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
11
9
|
import hoistNonReactStatics from "hoist-non-react-statics";
|
|
12
10
|
import React, { PureComponent } from "react";
|
|
13
11
|
import getDisplayName from "./getDisplayName.mjs";
|
|
14
12
|
var _excluded = ["forwardedRef"];
|
|
15
|
-
function _callSuper(t, o, e) {
|
|
16
|
-
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
17
|
-
}
|
|
18
13
|
function createHoc(EnhancedComponent) {
|
|
19
14
|
return function createWrapper() {
|
|
20
15
|
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createHoc.mjs","names":["hoistNonReactStatics","React","PureComponent","getDisplayName","createHoc","EnhancedComponent","createWrapper","options","arguments","length","undefined","WrappedComponent","Component","_PureComponent","_classCallCheck","_callSuper","_inherits","_createClass","key","value","render","_WrappedComponent$def","_objectSpread","defaultProps","props","forwardedRef","others","_objectWithoutProperties","_excluded","createElement","_extends","enhancedComponentProps","_defineProperty"],"sources":["../../src/utils/createHoc.tsx"],"sourcesContent":["import hoistNonReactStatics from 'hoist-non-react-statics';\nimport React, { type ComponentClass, type ComponentType, PureComponent } from 'react';\n\nimport getDisplayName from './getDisplayName';\n\nfunction createHoc(\n EnhancedComponent: any,\n): (options?: {}) => (WrappedComponent: ComponentType) => ComponentClass {\n return function createWrapper(options = {}) {\n return (WrappedComponent) => {\n class Component extends PureComponent {\n static displayName = getDisplayName(WrappedComponent);\n\n render() {\n // @ts-ignore\n const { forwardedRef, ...others } = { ...WrappedComponent.defaultProps, ...this.props };\n return (\n <EnhancedComponent {...options} {...this.props}>\n {(enhancedComponentProps: any) => (\n <WrappedComponent\n forwardedRef={forwardedRef}\n {...others}\n {...enhancedComponentProps}\n />\n )}\n </EnhancedComponent>\n );\n }\n }\n\n return hoistNonReactStatics(Component, WrappedComponent);\n };\n };\n}\n\nexport default createHoc;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"createHoc.mjs","names":["hoistNonReactStatics","React","PureComponent","getDisplayName","createHoc","EnhancedComponent","createWrapper","options","arguments","length","undefined","WrappedComponent","Component","_PureComponent","_classCallCheck","_callSuper","_inherits","_createClass","key","value","render","_WrappedComponent$def","_objectSpread","defaultProps","props","forwardedRef","others","_objectWithoutProperties","_excluded","createElement","_extends","enhancedComponentProps","_defineProperty"],"sources":["../../src/utils/createHoc.tsx"],"sourcesContent":["import hoistNonReactStatics from 'hoist-non-react-statics';\nimport React, { type ComponentClass, type ComponentType, PureComponent } from 'react';\n\nimport getDisplayName from './getDisplayName';\n\nfunction createHoc(\n EnhancedComponent: any,\n): (options?: {}) => (WrappedComponent: ComponentType) => ComponentClass {\n return function createWrapper(options = {}) {\n return (WrappedComponent) => {\n class Component extends PureComponent {\n static displayName = getDisplayName(WrappedComponent);\n\n render() {\n // @ts-ignore\n const { forwardedRef, ...others } = { ...WrappedComponent.defaultProps, ...this.props };\n return (\n <EnhancedComponent {...options} {...this.props}>\n {(enhancedComponentProps: any) => (\n <WrappedComponent\n forwardedRef={forwardedRef}\n {...others}\n {...enhancedComponentProps}\n />\n )}\n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CAA/BpB,SAAS,iBACQT,cAAc,CAACQ,gBAAgB,CAAC;MAmBvD,OAAOX,oBAAoB,CAACY,SAAS,EAAED,gBAAgB,CAAC;IAC1D,CAAC;EACH,CAAC;AACH;AAEA,eAAeP,SAAS","ignoreList":[]}
|
|
@@ -7,15 +7,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var
|
|
11
|
-
var _isNativeReflectConstruct2 = _interopRequireDefault(require("@babel/runtime/helpers/isNativeReflectConstruct"));
|
|
12
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
10
|
+
var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
|
|
13
11
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
13
|
var _react = require("react");
|
|
16
14
|
var _reactDom = require("react-dom");
|
|
17
15
|
var _createHoc = _interopRequireDefault(require("../createHoc"));
|
|
18
|
-
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, (0, _isNativeReflectConstruct2["default"])() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
19
16
|
/** @deprecated */
|
|
20
17
|
var EnhancedWithAutoFocus = /*#__PURE__*/function (_PureComponent) {
|
|
21
18
|
function EnhancedWithAutoFocus() {
|
|
@@ -24,7 +21,7 @@ var EnhancedWithAutoFocus = /*#__PURE__*/function (_PureComponent) {
|
|
|
24
21
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
25
22
|
args[_key] = arguments[_key];
|
|
26
23
|
}
|
|
27
|
-
_this =
|
|
24
|
+
_this = (0, _callSuper2["default"])(this, EnhancedWithAutoFocus, [].concat(args));
|
|
28
25
|
(0, _defineProperty2["default"])(_this, "timer", void 0);
|
|
29
26
|
return _this;
|
|
30
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WithAutoFocus.js","names":["_react","require","_reactDom","_createHoc","_interopRequireDefault","
|
|
1
|
+
{"version":3,"file":"WithAutoFocus.js","names":["_react","require","_reactDom","_createHoc","_interopRequireDefault","EnhancedWithAutoFocus","_PureComponent","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","_callSuper2","concat","_defineProperty2","_inherits2","_createClass2","key","value","notUsingNativeAutoFocus","autoFocus","props","componentDidMount","node","findDOMNode","timer","setTimeout","focus","componentWillUnmount","clearTimeout","render","_ref","children","undefined","PureComponent","_default","exports","createHoc"],"sources":["../../../src/utils/enhances/WithAutoFocus.tsx"],"sourcesContent":["import type React from 'react';\nimport { PureComponent } from 'react';\nimport { findDOMNode } from 'react-dom';\n\nimport type { UnknownProperties } from '../../core-types/UnknownProperties';\nimport createHoc from '../createHoc';\n\n/** @deprecated */\nexport interface IEnhancedWithAutoFocusProps\n extends EnhancedWithAutoFocusProps,\n UnknownProperties {}\nexport type EnhancedWithAutoFocusProps = {\n /**\n * @default undefined\n */\n autoFocus?: string | number | boolean;\n children?: (props: IEnhancedWithAutoFocusProps) => React.ReactNode;\n};\n\nclass EnhancedWithAutoFocus extends PureComponent<IEnhancedWithAutoFocusProps> {\n static displayName = 'EnhancedWithAutoFocus';\n\n static defaultProps = {\n autoFocus: undefined,\n };\n\n private timer: ReturnType<typeof setTimeout> | undefined;\n\n notUsingNativeAutoFocus() {\n const { autoFocus } = this.props;\n return typeof autoFocus === 'boolean' || typeof autoFocus === 'number';\n }\n\n componentDidMount() {\n if (this.notUsingNativeAutoFocus()) {\n const { autoFocus } = this.props;\n if (autoFocus === false) return;\n const node = findDOMNode(this);\n if (!node) return;\n // @ts-ignore\n this.timer = setTimeout(() => node.focus(), (autoFocus as number) || 0);\n }\n }\n\n componentWillUnmount() {\n clearTimeout(this.timer);\n }\n\n render() {\n const { children } = this.props as any;\n const props = {} as IEnhancedWithAutoFocusProps;\n if (this.notUsingNativeAutoFocus()) {\n props.autoFocus = undefined;\n }\n return children(props);\n }\n}\n\nexport default createHoc(EnhancedWithAutoFocus);\n"],"mappings":";;;;;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAGA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA;AAAA,IAYMI,qBAAqB,0BAAAC,cAAA;EAAA,SAAAD,sBAAA;IAAA,IAAAE,KAAA;IAAA,IAAAC,gBAAA,mBAAAH,qBAAA;IAAA,SAAAI,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IAAA;IAAAP,KAAA,OAAAQ,WAAA,mBAAAV,qBAAA,KAAAW,MAAA,CAAAJ,IAAA;IAAA,IAAAK,gBAAA,aAAAV,KAAA;IAAA,OAAAA,KAAA;EAAA;EAAA,IAAAW,UAAA,aAAAb,qBAAA,EAAAC,cAAA;EAAA,WAAAa,aAAA,aAAAd,qBAAA;IAAAe,GAAA;IAAAC,KAAA,EASzB,SAAAC,uBAAuBA,CAAA,EAAG;MACxB,IAAQC,SAAS,GAAK,IAAI,CAACC,KAAK,CAAxBD,SAAS;MACjB,OAAO,OAAOA,SAAS,KAAK,SAAS,IAAI,OAAOA,SAAS,KAAK,QAAQ;IACxE;EAAC;IAAAH,GAAA;IAAAC,KAAA,EAED,SAAAI,iBAAiBA,CAAA,EAAG;MAClB,IAAI,IAAI,CAACH,uBAAuB,CAAC,CAAC,EAAE;QAClC,IAAQC,SAAS,GAAK,IAAI,CAACC,KAAK,CAAxBD,SAAS;QACjB,IAAIA,SAAS,KAAK,KAAK,EAAE;QACzB,IAAMG,IAAI,GAAG,IAAAC,qBAAW,EAAC,IAAI,CAAC;QAC9B,IAAI,CAACD,IAAI,EAAE;QACX;QACA,IAAI,CAACE,KAAK,GAAGC,UAAU,CAAC;UAAA,OAAMH,IAAI,CAACI,KAAK,CAAC,CAAC;QAAA,GAAGP,SAAS,IAAe,CAAC,CAAC;MACzE;IACF;EAAC;IAAAH,GAAA;IAAAC,KAAA,EAED,SAAAU,oBAAoBA,CAAA,EAAG;MACrBC,YAAY,CAAC,IAAI,CAACJ,KAAK,CAAC;IAC1B;EAAC;IAAAR,GAAA;IAAAC,KAAA,EAED,SAAAY,MAAMA,CAAA,EAAG;MACP,IAAAC,IAAA,GAAqB,IAAI,CAACV,KAAK;QAAvBW,QAAQ,GAAAD,IAAA,CAARC,QAAQ;MAChB,IAAMX,KAAK,GAAG,CAAC,CAAgC;MAC/C,IAAI,IAAI,CAACF,uBAAuB,CAAC,CAAC,EAAE;QAClCE,KAAK,CAACD,SAAS,GAAGa,SAAS;MAC7B;MACA,OAAOD,QAAQ,CAACX,KAAK,CAAC;IACxB;EAAC;AAAA,EApCiCa,oBAAa;AAAA,IAAApB,gBAAA,aAA3CZ,qBAAqB,iBACJ,uBAAuB;AAAA,IAAAY,gBAAA,aADxCZ,qBAAqB,kBAGH;EACpBkB,SAAS,EAAEa;AACb,CAAC;AAAA,IAAAE,QAAA,GAAAC,OAAA,cAkCY,IAAAC,qBAAS,EAACnC,qBAAqB,CAAC","ignoreList":[]}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import
|
|
4
|
-
import _isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
|
|
5
|
-
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
3
|
+
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
6
4
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
7
5
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
6
|
import { PureComponent } from 'react';
|
|
10
7
|
import { findDOMNode } from 'react-dom';
|
|
11
8
|
import createHoc from "../createHoc.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WithAutoFocus.mjs","names":["PureComponent","findDOMNode","createHoc","EnhancedWithAutoFocus","_PureComponent","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","concat","_defineProperty","_inherits","_createClass","key","value","notUsingNativeAutoFocus","autoFocus","props","componentDidMount","node","timer","setTimeout","focus","componentWillUnmount","clearTimeout","render","_ref","children","undefined"],"sources":["../../../src/utils/enhances/WithAutoFocus.tsx"],"sourcesContent":["import type React from 'react';\nimport { PureComponent } from 'react';\nimport { findDOMNode } from 'react-dom';\n\nimport type { UnknownProperties } from '../../core-types/UnknownProperties';\nimport createHoc from '../createHoc';\n\n/** @deprecated */\nexport interface IEnhancedWithAutoFocusProps\n extends EnhancedWithAutoFocusProps,\n UnknownProperties {}\nexport type EnhancedWithAutoFocusProps = {\n /**\n * @default undefined\n */\n autoFocus?: string | number | boolean;\n children?: (props: IEnhancedWithAutoFocusProps) => React.ReactNode;\n};\n\nclass EnhancedWithAutoFocus extends PureComponent<IEnhancedWithAutoFocusProps> {\n static displayName = 'EnhancedWithAutoFocus';\n\n static defaultProps = {\n autoFocus: undefined,\n };\n\n private timer: ReturnType<typeof setTimeout> | undefined;\n\n notUsingNativeAutoFocus() {\n const { autoFocus } = this.props;\n return typeof autoFocus === 'boolean' || typeof autoFocus === 'number';\n }\n\n componentDidMount() {\n if (this.notUsingNativeAutoFocus()) {\n const { autoFocus } = this.props;\n if (autoFocus === false) return;\n const node = findDOMNode(this);\n if (!node) return;\n // @ts-ignore\n this.timer = setTimeout(() => node.focus(), (autoFocus as number) || 0);\n }\n }\n\n componentWillUnmount() {\n clearTimeout(this.timer);\n }\n\n render() {\n const { children } = this.props as any;\n const props = {} as IEnhancedWithAutoFocusProps;\n if (this.notUsingNativeAutoFocus()) {\n props.autoFocus = undefined;\n }\n return children(props);\n }\n}\n\nexport default createHoc(EnhancedWithAutoFocus);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"WithAutoFocus.mjs","names":["PureComponent","findDOMNode","createHoc","EnhancedWithAutoFocus","_PureComponent","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","concat","_defineProperty","_inherits","_createClass","key","value","notUsingNativeAutoFocus","autoFocus","props","componentDidMount","node","timer","setTimeout","focus","componentWillUnmount","clearTimeout","render","_ref","children","undefined"],"sources":["../../../src/utils/enhances/WithAutoFocus.tsx"],"sourcesContent":["import type React from 'react';\nimport { PureComponent } from 'react';\nimport { findDOMNode } from 'react-dom';\n\nimport type { UnknownProperties } from '../../core-types/UnknownProperties';\nimport createHoc from '../createHoc';\n\n/** @deprecated */\nexport interface IEnhancedWithAutoFocusProps\n extends EnhancedWithAutoFocusProps,\n UnknownProperties {}\nexport type EnhancedWithAutoFocusProps = {\n /**\n * @default undefined\n */\n autoFocus?: string | number | boolean;\n children?: (props: IEnhancedWithAutoFocusProps) => React.ReactNode;\n};\n\nclass EnhancedWithAutoFocus extends PureComponent<IEnhancedWithAutoFocusProps> {\n static displayName = 'EnhancedWithAutoFocus';\n\n static defaultProps = {\n autoFocus: undefined,\n };\n\n private timer: ReturnType<typeof setTimeout> | undefined;\n\n notUsingNativeAutoFocus() {\n const { autoFocus } = this.props;\n return typeof autoFocus === 'boolean' || typeof autoFocus === 'number';\n }\n\n componentDidMount() {\n if (this.notUsingNativeAutoFocus()) {\n const { autoFocus } = this.props;\n if (autoFocus === false) return;\n const node = findDOMNode(this);\n if (!node) return;\n // @ts-ignore\n this.timer = setTimeout(() => node.focus(), (autoFocus as number) || 0);\n }\n }\n\n componentWillUnmount() {\n clearTimeout(this.timer);\n }\n\n render() {\n const { children } = this.props as any;\n const props = {} as IEnhancedWithAutoFocusProps;\n if (this.notUsingNativeAutoFocus()) {\n props.autoFocus = undefined;\n }\n return children(props);\n }\n}\n\nexport default createHoc(EnhancedWithAutoFocus);\n"],"mappings":";;;;;AACA,SAASA,aAAa,QAAQ,OAAO;AACrC,SAASC,WAAW,QAAQ,WAAW;AAGvC,OAAOC,SAAS,MAAM,kBAAc;;AAEpC;AAAA,IAYMC,qBAAqB,0BAAAC,cAAA;EAAA,SAAAD,sBAAA;IAAA,IAAAE,KAAA;IAAAC,eAAA,OAAAH,qBAAA;IAAA,SAAAI,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IAAA;IAAAP,KAAA,GAAAQ,UAAA,OAAAV,qBAAA,KAAAW,MAAA,CAAAJ,IAAA;IAAAK,eAAA,CAAAV,KAAA;IAAA,OAAAA,KAAA;EAAA;EAAAW,SAAA,CAAAb,qBAAA,EAAAC,cAAA;EAAA,OAAAa,YAAA,CAAAd,qBAAA;IAAAe,GAAA;IAAAC,KAAA,EASzB,SAAAC,uBAAuBA,CAAA,EAAG;MACxB,IAAQC,SAAS,GAAK,IAAI,CAACC,KAAK,CAAxBD,SAAS;MACjB,OAAO,OAAOA,SAAS,KAAK,SAAS,IAAI,OAAOA,SAAS,KAAK,QAAQ;IACxE;EAAC;IAAAH,GAAA;IAAAC,KAAA,EAED,SAAAI,iBAAiBA,CAAA,EAAG;MAClB,IAAI,IAAI,CAACH,uBAAuB,CAAC,CAAC,EAAE;QAClC,IAAQC,SAAS,GAAK,IAAI,CAACC,KAAK,CAAxBD,SAAS;QACjB,IAAIA,SAAS,KAAK,KAAK,EAAE;QACzB,IAAMG,IAAI,GAAGvB,WAAW,CAAC,IAAI,CAAC;QAC9B,IAAI,CAACuB,IAAI,EAAE;QACX;QACA,IAAI,CAACC,KAAK,GAAGC,UAAU,CAAC;UAAA,OAAMF,IAAI,CAACG,KAAK,CAAC,CAAC;QAAA,GAAGN,SAAS,IAAe,CAAC,CAAC;MACzE;IACF;EAAC;IAAAH,GAAA;IAAAC,KAAA,EAED,SAAAS,oBAAoBA,CAAA,EAAG;MACrBC,YAAY,CAAC,IAAI,CAACJ,KAAK,CAAC;IAC1B;EAAC;IAAAP,GAAA;IAAAC,KAAA,EAED,SAAAW,MAAMA,CAAA,EAAG;MACP,IAAAC,IAAA,GAAqB,IAAI,CAACT,KAAK;QAAvBU,QAAQ,GAAAD,IAAA,CAARC,QAAQ;MAChB,IAAMV,KAAK,GAAG,CAAC,CAAgC;MAC/C,IAAI,IAAI,CAACF,uBAAuB,CAAC,CAAC,EAAE;QAClCE,KAAK,CAACD,SAAS,GAAGY,SAAS;MAC7B;MACA,OAAOD,QAAQ,CAACV,KAAK,CAAC;IACxB;EAAC;AAAA,EApCiCtB,aAAa;AAAAe,eAAA,CAA3CZ,qBAAqB,iBACJ,uBAAuB;AAAAY,eAAA,CADxCZ,qBAAqB,kBAGH;EACpBkB,SAAS,EAAEY;AACb,CAAC;AAkCH,eAAe/B,SAAS,CAACC,qBAAqB,CAAC","ignoreList":[]}
|
|
@@ -10,15 +10,12 @@ exports.initNanoCss = initNanoCss;
|
|
|
10
10
|
exports.normaliseCss = normaliseCss;
|
|
11
11
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
var
|
|
14
|
-
var _isNativeReflectConstruct2 = _interopRequireDefault(require("@babel/runtime/helpers/isNativeReflectConstruct"));
|
|
15
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
|
+
var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
|
|
16
14
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
19
17
|
var _createHoc = _interopRequireDefault(require("../createHoc"));
|
|
20
18
|
var _CSSinJS2 = _interopRequireDefault(require("../CSSinJS"));
|
|
21
|
-
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, (0, _isNativeReflectConstruct2["default"])() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
22
19
|
var getStylesheet = exports.getStylesheet = function getStylesheet() {
|
|
23
20
|
return (0, _CSSinJS2["default"])().raw;
|
|
24
21
|
};
|
|
@@ -49,7 +46,7 @@ var EnhancedWithCSS = exports.EnhancedWithCSS = /*#__PURE__*/function (_PureComp
|
|
|
49
46
|
function EnhancedWithCSS(props, context) {
|
|
50
47
|
var _this;
|
|
51
48
|
(0, _classCallCheck2["default"])(this, EnhancedWithCSS);
|
|
52
|
-
_this =
|
|
49
|
+
_this = (0, _callSuper2["default"])(this, EnhancedWithCSS, [props, context]);
|
|
53
50
|
(0, _defineProperty2["default"])(_this, "state", {
|
|
54
51
|
dynamicClassName: ''
|
|
55
52
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WithCSS.js","names":["_react","_interopRequireWildcard","require","_createHoc","_interopRequireDefault","_CSSinJS2","
|
|
1
|
+
{"version":3,"file":"WithCSS.js","names":["_react","_interopRequireWildcard","require","_createHoc","_interopRequireDefault","_CSSinJS2","getStylesheet","exports","CSSinJS","raw","normaliseCss","obj","Object","keys","reduce","acc","key","result","undefined","WithCssContext","React","createContext","Provider","initNanoCss","options","arguments","length","EnhancedWithCSS","_PureComponent","props","context","_this","_classCallCheck2","_callSuper2","_defineProperty2","dynamicClassName","_inherits2","_createClass2","value","render","_this$props","children","_this$props$className","className","state","getDerivedStateFromProps","_CSSinJS$cache","_CSSinJS","cleanCss","css","cache","call","PureComponent","_default","createHoc"],"sources":["../../../src/utils/enhances/WithCSS.tsx"],"sourcesContent":["import type { NanoOptions } from '@phytonmk/nano-css';\nimport type { CssLikeObject } from '@phytonmk/nano-css/types/common';\nimport React, { PureComponent } from 'react';\n\nimport type { UnknownProperties } from '../../core-types/UnknownProperties';\nimport createHoc from '../createHoc';\nimport CSSinJS from '../CSSinJS';\n\nconst getStylesheet = () => CSSinJS().raw;\n\n/**\n * Function to clear the nano CSS styles object from keys with undefined value\n * @param {Object} obj - nano CSS styles object\n * @returns {Object}\n */\nfunction normaliseCss(obj: CssLikeObject) {\n return Object.keys(obj).reduce((acc: any, key) => {\n const result = acc;\n if (obj[key] !== undefined) {\n result[key] = obj[key];\n }\n return result;\n }, {});\n}\n\nconst WithCssContext = React.createContext<NanoOptions>({});\nconst { Provider } = WithCssContext;\n\nfunction initNanoCss(options: NanoOptions = {}) {\n return CSSinJS(options);\n}\n\n/** @deprecated */\nexport interface IEnhancedWithCSSProps extends EnhancedWithCSSProps, UnknownProperties {}\nexport type EnhancedWithCSSProps = {\n className?: string;\n css?: {};\n\n children(props: { className: string | undefined }): React.ReactNode;\n};\n\nclass EnhancedWithCSS extends PureComponent<IEnhancedWithCSSProps> {\n static contextType = WithCssContext;\n\n static defaultProps = {\n css: {},\n };\n\n state = {\n dynamicClassName: '',\n };\n\n static getDerivedStateFromProps(props: any) {\n const cleanCss = normaliseCss(props.css);\n return {\n dynamicClassName: Object.keys(cleanCss).length ? CSSinJS().cache?.(cleanCss) : '',\n };\n }\n\n constructor(props: any, context: any) {\n super(props, context);\n\n initNanoCss(context);\n }\n\n render() {\n const { children, className = '' } = this.props;\n const { dynamicClassName } = this.state;\n return children({\n className: className + dynamicClassName || undefined,\n });\n }\n}\n\nexport { getStylesheet, EnhancedWithCSS, Provider, WithCssContext, initNanoCss, normaliseCss };\nexport default createHoc(EnhancedWithCSS);\n"],"mappings":";;;;;;;;;;;;;;;AAEA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAGA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,SAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAMI,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG,SAAhBA,aAAaA,CAAA;EAAA,OAAS,IAAAE,oBAAO,EAAC,CAAC,CAACC,GAAG;AAAA;;AAEzC;AACA;AACA;AACA;AACA;AACA,SAASC,YAAYA,CAACC,GAAkB,EAAE;EACxC,OAAOC,MAAM,CAACC,IAAI,CAACF,GAAG,CAAC,CAACG,MAAM,CAAC,UAACC,GAAQ,EAAEC,GAAG,EAAK;IAChD,IAAMC,MAAM,GAAGF,GAAG;IAClB,IAAIJ,GAAG,CAACK,GAAG,CAAC,KAAKE,SAAS,EAAE;MAC1BD,MAAM,CAACD,GAAG,CAAC,GAAGL,GAAG,CAACK,GAAG,CAAC;IACxB;IACA,OAAOC,MAAM;EACf,CAAC,EAAE,CAAC,CAAC,CAAC;AACR;AAEA,IAAME,cAAc,GAAAZ,OAAA,CAAAY,cAAA,gBAAGC,iBAAK,CAACC,aAAa,CAAc,CAAC,CAAC,CAAC;AAC3D,IAAQC,QAAQ,GAAAf,OAAA,CAAAe,QAAA,GAAKH,cAAc,CAA3BG,QAAQ;AAEhB,SAASC,WAAWA,CAAA,EAA4B;EAAA,IAA3BC,OAAoB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAP,SAAA,GAAAO,SAAA,MAAG,CAAC,CAAC;EAC5C,OAAO,IAAAjB,oBAAO,EAAC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A,cAAA,CAAAK,IAAA,CAAAJ,QAAA,EAAkBC,QAAQ,CAAC,GAAG;MACjF,CAAC;IACH;EAAC;AAAA,EAhB2BI,oBAAa;AAAA,IAAAlB,gBAAA,aAArCP,eAAe,iBACER,cAAc;AAAA,IAAAe,gBAAA,aAD/BP,eAAe,kBAGG;EACpBsB,GAAG,EAAE,CAAC;AACR,CAAC;AAAA,IAAAI,QAAA,GAAA9C,OAAA,cA6BY,IAAA+C,qBAAS,EAAC3B,eAAe,CAAC","ignoreList":[]}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import
|
|
4
|
-
import _isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
|
|
5
|
-
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
3
|
+
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
6
4
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
7
5
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
6
|
import React, { PureComponent } from 'react';
|
|
10
7
|
import createHoc from "../createHoc.mjs";
|
|
11
8
|
import CSSinJS from "../CSSinJS.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WithCSS.mjs","names":["React","PureComponent","createHoc","CSSinJS","getStylesheet","raw","normaliseCss","obj","Object","keys","reduce","acc","key","result","undefined","WithCssContext","createContext","Provider","initNanoCss","options","arguments","length","EnhancedWithCSS","_PureComponent","props","context","_this","_classCallCheck","_callSuper","_defineProperty","dynamicClassName","_inherits","_createClass","value","render","_this$props","children","_this$props$className","className","state","getDerivedStateFromProps","_CSSinJS$cache","_CSSinJS","cleanCss","css","cache","call"],"sources":["../../../src/utils/enhances/WithCSS.tsx"],"sourcesContent":["import type { NanoOptions } from '@phytonmk/nano-css';\nimport type { CssLikeObject } from '@phytonmk/nano-css/types/common';\nimport React, { PureComponent } from 'react';\n\nimport type { UnknownProperties } from '../../core-types/UnknownProperties';\nimport createHoc from '../createHoc';\nimport CSSinJS from '../CSSinJS';\n\nconst getStylesheet = () => CSSinJS().raw;\n\n/**\n * Function to clear the nano CSS styles object from keys with undefined value\n * @param {Object} obj - nano CSS styles object\n * @returns {Object}\n */\nfunction normaliseCss(obj: CssLikeObject) {\n return Object.keys(obj).reduce((acc: any, key) => {\n const result = acc;\n if (obj[key] !== undefined) {\n result[key] = obj[key];\n }\n return result;\n }, {});\n}\n\nconst WithCssContext = React.createContext<NanoOptions>({});\nconst { Provider } = WithCssContext;\n\nfunction initNanoCss(options: NanoOptions = {}) {\n return CSSinJS(options);\n}\n\n/** @deprecated */\nexport interface IEnhancedWithCSSProps extends EnhancedWithCSSProps, UnknownProperties {}\nexport type EnhancedWithCSSProps = {\n className?: string;\n css?: {};\n\n children(props: { className: string | undefined }): React.ReactNode;\n};\n\nclass EnhancedWithCSS extends PureComponent<IEnhancedWithCSSProps> {\n static contextType = WithCssContext;\n\n static defaultProps = {\n css: {},\n };\n\n state = {\n dynamicClassName: '',\n };\n\n static getDerivedStateFromProps(props: any) {\n const cleanCss = normaliseCss(props.css);\n return {\n dynamicClassName: Object.keys(cleanCss).length ? CSSinJS().cache?.(cleanCss) : '',\n };\n }\n\n constructor(props: any, context: any) {\n super(props, context);\n\n initNanoCss(context);\n }\n\n render() {\n const { children, className = '' } = this.props;\n const { dynamicClassName } = this.state;\n return children({\n className: className + dynamicClassName || undefined,\n });\n }\n}\n\nexport { getStylesheet, EnhancedWithCSS, Provider, WithCssContext, initNanoCss, normaliseCss };\nexport default createHoc(EnhancedWithCSS);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"WithCSS.mjs","names":["React","PureComponent","createHoc","CSSinJS","getStylesheet","raw","normaliseCss","obj","Object","keys","reduce","acc","key","result","undefined","WithCssContext","createContext","Provider","initNanoCss","options","arguments","length","EnhancedWithCSS","_PureComponent","props","context","_this","_classCallCheck","_callSuper","_defineProperty","dynamicClassName","_inherits","_createClass","value","render","_this$props","children","_this$props$className","className","state","getDerivedStateFromProps","_CSSinJS$cache","_CSSinJS","cleanCss","css","cache","call"],"sources":["../../../src/utils/enhances/WithCSS.tsx"],"sourcesContent":["import type { NanoOptions } from '@phytonmk/nano-css';\nimport type { CssLikeObject } from '@phytonmk/nano-css/types/common';\nimport React, { PureComponent } from 'react';\n\nimport type { UnknownProperties } from '../../core-types/UnknownProperties';\nimport createHoc from '../createHoc';\nimport CSSinJS from '../CSSinJS';\n\nconst getStylesheet = () => CSSinJS().raw;\n\n/**\n * Function to clear the nano CSS styles object from keys with undefined value\n * @param {Object} obj - nano CSS styles object\n * @returns {Object}\n */\nfunction normaliseCss(obj: CssLikeObject) {\n return Object.keys(obj).reduce((acc: any, key) => {\n const result = acc;\n if (obj[key] !== undefined) {\n result[key] = obj[key];\n }\n return result;\n }, {});\n}\n\nconst WithCssContext = React.createContext<NanoOptions>({});\nconst { Provider } = WithCssContext;\n\nfunction initNanoCss(options: NanoOptions = {}) {\n return CSSinJS(options);\n}\n\n/** @deprecated */\nexport interface IEnhancedWithCSSProps extends EnhancedWithCSSProps, UnknownProperties {}\nexport type EnhancedWithCSSProps = {\n className?: string;\n css?: {};\n\n children(props: { className: string | undefined }): React.ReactNode;\n};\n\nclass EnhancedWithCSS extends PureComponent<IEnhancedWithCSSProps> {\n static contextType = WithCssContext;\n\n static defaultProps = {\n css: {},\n };\n\n state = {\n dynamicClassName: '',\n };\n\n static getDerivedStateFromProps(props: any) {\n const cleanCss = normaliseCss(props.css);\n return {\n dynamicClassName: Object.keys(cleanCss).length ? CSSinJS().cache?.(cleanCss) : '',\n };\n }\n\n constructor(props: any, context: any) {\n super(props, context);\n\n initNanoCss(context);\n }\n\n render() {\n const { children, className = '' } = this.props;\n const { dynamicClassName } = this.state;\n return children({\n className: className + dynamicClassName || undefined,\n });\n }\n}\n\nexport { getStylesheet, EnhancedWithCSS, Provider, WithCssContext, initNanoCss, normaliseCss };\nexport default createHoc(EnhancedWithCSS);\n"],"mappings":";;;;;AAEA,OAAOA,KAAK,IAAIC,aAAa,QAAQ,OAAO;AAG5C,OAAOC,SAAS,MAAM,kBAAc;AACpC,OAAOC,OAAO,MAAM,gBAAY;AAEhC,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,CAAA;EAAA,OAASD,OAAO,CAAC,CAAC,CAACE,GAAG;AAAA;;AAEzC;AACA;AACA;AACA;AACA;AACA,SAASC,YAAYA,CAACC,GAAkB,EAAE;EACxC,OAAOC,MAAM,CAACC,IAAI,CAACF,GAAG,CAAC,CAACG,MAAM,CAAC,UAACC,GAAQ,EAAEC,GAAG,EAAK;IAChD,IAAMC,MAAM,GAAGF,GAAG;IAClB,IAAIJ,GAAG,CAACK,GAAG,CAAC,KAAKE,SAAS,EAAE;MAC1BD,MAAM,CAACD,GAAG,CAAC,GAAGL,GAAG,CAACK,GAAG,CAAC;IACxB;IACA,OAAOC,MAAM;EACf,CAAC,EAAE,CAAC,CAAC,CAAC;AACR;AAEA,IAAME,cAAc,gBAAGf,KAAK,CAACgB,aAAa,CAAc,CAAC,CAAC,CAAC;AAC3D,IAAQC,QAAQ,GAAKF,cAAc,CAA3BE,QAAQ;AAEhB,SAASC,WAAWA,CAAA,EAA4B;EAAA,IAA3BC,OAAoB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAN,SAAA,GAAAM,SAAA,MAAG,CAAC,CAAC;EAC5C,OAAOjB,OAAO,CAACgB,OAAO,CAAC;AACzB;;AAEA;AAAA,IASMG,eAAe,0BAAAC,cAAA;EAkBnB,SAAAD,gBAAYE,KAAU,EAAEC,OAAY,EAAE;IAAA,IAAAC,KAAA;IAAAC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BsB,GAAG,EAAE,CAAC;AACR,CAAC;AA4BH,SAASxC,aAAa,EAAEkB,eAAe,EAAEL,QAAQ,EAAEF,cAAc,EAAEG,WAAW,EAAEZ,YAAY;AAC5F,eAAeJ,SAAS,CAACoB,eAAe,CAAC","ignoreList":[]}
|
|
@@ -8,16 +8,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.useI18n = exports["default"] = exports.I18nProvider = exports.I18nConsumer = exports.Context = void 0;
|
|
9
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
-
var
|
|
12
|
-
var _isNativeReflectConstruct2 = _interopRequireDefault(require("@babel/runtime/helpers/isNativeReflectConstruct"));
|
|
13
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
11
|
+
var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
|
|
14
12
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
14
|
var _intl = require("@formatjs/intl");
|
|
17
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
18
16
|
var _createHoc = _interopRequireDefault(require("../createHoc"));
|
|
19
17
|
var _i18nEnhance = require("./i18nEnhance");
|
|
20
|
-
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, (0, _isNativeReflectConstruct2["default"])() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
21
18
|
var Context = exports.Context = /*#__PURE__*/(0, _react.createContext)(undefined);
|
|
22
19
|
var I18nProvider = exports.I18nProvider = Context.Provider,
|
|
23
20
|
I18nConsumer = exports.I18nConsumer = Context.Consumer;
|
|
@@ -42,7 +39,7 @@ var WithI18n = /*#__PURE__*/function (_Component) {
|
|
|
42
39
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
43
40
|
args[_key] = arguments[_key];
|
|
44
41
|
}
|
|
45
|
-
_this =
|
|
42
|
+
_this = (0, _callSuper2["default"])(this, WithI18n, [].concat(args));
|
|
46
43
|
/* @ts-ignore */
|
|
47
44
|
(0, _defineProperty2["default"])(_this, "context", void 0);
|
|
48
45
|
(0, _defineProperty2["default"])(_this, "getText", function (dictionary, selfLocale) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WithI18n.js","names":["_intl","require","_react","_interopRequireWildcard","_createHoc","_interopRequireDefault","_i18nEnhance","
|
|
1
|
+
{"version":3,"file":"WithI18n.js","names":["_intl","require","_react","_interopRequireWildcard","_createHoc","_interopRequireDefault","_i18nEnhance","Context","exports","createContext","undefined","I18nProvider","Provider","I18nConsumer","Consumer","messagesCache","createIntlCache","getText","dictionaries","locale","key","dictionary","WithI18n","_Component","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","_callSuper2","concat","_defineProperty2","selfLocale","_this$props","props","contextLocale","context","_inherits2","_createClass2","value","render","_ref","children","Component","useI18n","_React$useContext","fallbackDictionary","lang","React","useContext","resolvedDictionary","useAsyncI18nMessages","intl","useMemo","createIntl","messages","useCallback","messageId","variables","formatMessage","id","_default","createHoc"],"sources":["../../../src/utils/enhances/WithI18n.tsx"],"sourcesContent":["import { createIntl, createIntlCache } from '@formatjs/intl';\nimport React, { Component, createContext } from 'react';\n\nimport createHoc from '../createHoc';\nimport { useAsyncI18nMessages } from './i18nEnhance';\nimport type { UnknownProperties } from '../../core-types/UnknownProperties';\n\nexport type LocaleKeys = string;\nexport type DictionaryItem = { [key: string]: string };\nexport type Dictionary = { [locale: string]: DictionaryItem | (() => Promise<DictionaryItem>) };\nexport const Context = createContext<LocaleKeys | undefined>(undefined);\nconst { Provider: I18nProvider, Consumer: I18nConsumer } = Context;\nconst messagesCache = createIntlCache();\n\nfunction getText(dictionaries: Dictionary, locale: LocaleKeys) {\n return function (key: keyof DictionaryItem) {\n const dictionary = dictionaries[locale];\n return dictionary ? (dictionary as any)[key] : (dictionaries as any)['en'][key];\n };\n}\n\n/** @deprecated */\nexport interface IWithI18nInjectedProps extends WithI18nInjectedProps, UnknownProperties {}\nexport type WithI18nInjectedProps = {\n getText: WithI18n['getText'];\n};\n\n/** @deprecated */\nexport interface IWithI18nProps extends WithI18nProps, UnknownProperties {}\nexport type WithI18nProps = WithI18nInjectedProps & {\n locale?: LocaleKeys;\n\n children?(props: IWithI18nInjectedProps): React.ReactNode;\n};\n\n/**\n * @deprecated use `useI18n` instead\n */\nclass WithI18n extends Component<IWithI18nProps> {\n /* @ts-ignore */\n context: LocaleKeys;\n\n static contextType = Context;\n static defaultProps = {\n getText,\n };\n\n getText = (dictionary: Dictionary, selfLocale?: string): string => {\n const { locale, getText } = this.props;\n const contextLocale = this.context;\n return getText(dictionary, selfLocale || locale || contextLocale);\n };\n\n render() {\n const { children } = this.props as any;\n return children({\n getText: this.getText,\n });\n }\n}\n\nconst useI18n = (\n dictionary: Dictionary,\n locale: LocaleKeys = 'en',\n fallbackDictionary?: Dictionary,\n) => {\n const lang = React.useContext(Context) ?? locale;\n const resolvedDictionary = useAsyncI18nMessages(dictionary, lang, fallbackDictionary);\n const intl = React.useMemo(\n () => createIntl({ locale: lang, messages: resolvedDictionary }, messagesCache),\n [resolvedDictionary, lang],\n );\n\n return React.useCallback(\n (messageId: string, variables?: { [key: string]: string | number | undefined }) => {\n return intl.formatMessage({ id: messageId ?? '' }, variables);\n },\n [intl],\n );\n};\n\nexport default createHoc(WithI18n);\nexport { useI18n, I18nProvider, I18nConsumer };\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAC,sBAAA,CAAAJ,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AC;MAAEtC,MAAM,EAAE+B,IAAI;MAAEQ,QAAQ,EAAEL;IAAmB,CAAC,EAAEtC,aAAa,CAAC;EAAA,GAC/E,CAACsC,kBAAkB,EAAEH,IAAI,CAC3B,CAAC;EAED,OAAOC,iBAAK,CAACQ,WAAW,CACtB,UAACC,SAAiB,EAAEC,SAA0D,EAAK;IACjF,OAAON,IAAI,CAACO,aAAa,CAAC;MAAEC,EAAE,EAAEH,SAAS,aAATA,SAAS,cAATA,SAAS,GAAI;IAAG,CAAC,EAAEC,SAAS,CAAC;EAC/D,CAAC,EACD,CAACN,IAAI,CACP,CAAC;AACH,CAAC;AAAC,IAAAS,QAAA,GAAAxD,OAAA,cAEa,IAAAyD,qBAAS,EAAC3C,QAAQ,CAAC","ignoreList":[]}
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import
|
|
4
|
-
import _isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
|
|
5
|
-
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
3
|
+
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
6
4
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
7
5
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
6
|
import { createIntlCache, createIntl } from "@formatjs/intl";
|
|
9
7
|
import React, { createContext, Component } from "react";
|
|
10
8
|
import createHoc from "../createHoc.mjs";
|
|
11
9
|
import { useAsyncI18nMessages } from "./i18nEnhance.mjs";
|
|
12
|
-
function _callSuper(t, o, e) {
|
|
13
|
-
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
14
|
-
}
|
|
15
10
|
var Context = /* @__PURE__ */ createContext(void 0);
|
|
16
11
|
var I18nProvider = Context.Provider, I18nConsumer = Context.Consumer;
|
|
17
12
|
var messagesCache = createIntlCache();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WithI18n.mjs","names":["createIntl","createIntlCache","React","Component","createContext","createHoc","useAsyncI18nMessages","Context","undefined","I18nProvider","Provider","I18nConsumer","Consumer","messagesCache","getText","dictionaries","locale","key","dictionary","WithI18n","_Component","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","concat","_defineProperty","selfLocale","_this$props","props","contextLocale","context","_inherits","_createClass","value","render","_ref","children","useI18n","_React$useContext","fallbackDictionary","lang","useContext","resolvedDictionary","intl","useMemo","messages","useCallback","messageId","variables","formatMessage","id"],"sources":["../../../src/utils/enhances/WithI18n.tsx"],"sourcesContent":["import { createIntl, createIntlCache } from '@formatjs/intl';\nimport React, { Component, createContext } from 'react';\n\nimport createHoc from '../createHoc';\nimport { useAsyncI18nMessages } from './i18nEnhance';\nimport type { UnknownProperties } from '../../core-types/UnknownProperties';\n\nexport type LocaleKeys = string;\nexport type DictionaryItem = { [key: string]: string };\nexport type Dictionary = { [locale: string]: DictionaryItem | (() => Promise<DictionaryItem>) };\nexport const Context = createContext<LocaleKeys | undefined>(undefined);\nconst { Provider: I18nProvider, Consumer: I18nConsumer } = Context;\nconst messagesCache = createIntlCache();\n\nfunction getText(dictionaries: Dictionary, locale: LocaleKeys) {\n return function (key: keyof DictionaryItem) {\n const dictionary = dictionaries[locale];\n return dictionary ? (dictionary as any)[key] : (dictionaries as any)['en'][key];\n };\n}\n\n/** @deprecated */\nexport interface IWithI18nInjectedProps extends WithI18nInjectedProps, UnknownProperties {}\nexport type WithI18nInjectedProps = {\n getText: WithI18n['getText'];\n};\n\n/** @deprecated */\nexport interface IWithI18nProps extends WithI18nProps, UnknownProperties {}\nexport type WithI18nProps = WithI18nInjectedProps & {\n locale?: LocaleKeys;\n\n children?(props: IWithI18nInjectedProps): React.ReactNode;\n};\n\n/**\n * @deprecated use `useI18n` instead\n */\nclass WithI18n extends Component<IWithI18nProps> {\n /* @ts-ignore */\n context: LocaleKeys;\n\n static contextType = Context;\n static defaultProps = {\n getText,\n };\n\n getText = (dictionary: Dictionary, selfLocale?: string): string => {\n const { locale, getText } = this.props;\n const contextLocale = this.context;\n return getText(dictionary, selfLocale || locale || contextLocale);\n };\n\n render() {\n const { children } = this.props as any;\n return children({\n getText: this.getText,\n });\n }\n}\n\nconst useI18n = (\n dictionary: Dictionary,\n locale: LocaleKeys = 'en',\n fallbackDictionary?: Dictionary,\n) => {\n const lang = React.useContext(Context) ?? locale;\n const resolvedDictionary = useAsyncI18nMessages(dictionary, lang, fallbackDictionary);\n const intl = React.useMemo(\n () => createIntl({ locale: lang, messages: resolvedDictionary }, messagesCache),\n [resolvedDictionary, lang],\n );\n\n return React.useCallback(\n (messageId: string, variables?: { [key: string]: string | number | undefined }) => {\n return intl.formatMessage({ id: messageId ?? '' }, variables);\n },\n [intl],\n );\n};\n\nexport default createHoc(WithI18n);\nexport { useI18n, I18nProvider, I18nConsumer };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"WithI18n.mjs","names":["createIntl","createIntlCache","React","Component","createContext","createHoc","useAsyncI18nMessages","Context","undefined","I18nProvider","Provider","I18nConsumer","Consumer","messagesCache","getText","dictionaries","locale","key","dictionary","WithI18n","_Component","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","concat","_defineProperty","selfLocale","_this$props","props","contextLocale","context","_inherits","_createClass","value","render","_ref","children","useI18n","_React$useContext","fallbackDictionary","lang","useContext","resolvedDictionary","intl","useMemo","messages","useCallback","messageId","variables","formatMessage","id"],"sources":["../../../src/utils/enhances/WithI18n.tsx"],"sourcesContent":["import { createIntl, createIntlCache } from '@formatjs/intl';\nimport React, { Component, createContext } from 'react';\n\nimport createHoc from '../createHoc';\nimport { useAsyncI18nMessages } from './i18nEnhance';\nimport type { UnknownProperties } from '../../core-types/UnknownProperties';\n\nexport type LocaleKeys = string;\nexport type DictionaryItem = { [key: string]: string };\nexport type Dictionary = { [locale: string]: DictionaryItem | (() => Promise<DictionaryItem>) };\nexport const Context = createContext<LocaleKeys | undefined>(undefined);\nconst { Provider: I18nProvider, Consumer: I18nConsumer } = Context;\nconst messagesCache = createIntlCache();\n\nfunction getText(dictionaries: Dictionary, locale: LocaleKeys) {\n return function (key: keyof DictionaryItem) {\n const dictionary = dictionaries[locale];\n return dictionary ? (dictionary as any)[key] : (dictionaries as any)['en'][key];\n };\n}\n\n/** @deprecated */\nexport interface IWithI18nInjectedProps extends WithI18nInjectedProps, UnknownProperties {}\nexport type WithI18nInjectedProps = {\n getText: WithI18n['getText'];\n};\n\n/** @deprecated */\nexport interface IWithI18nProps extends WithI18nProps, UnknownProperties {}\nexport type WithI18nProps = WithI18nInjectedProps & {\n locale?: LocaleKeys;\n\n children?(props: IWithI18nInjectedProps): React.ReactNode;\n};\n\n/**\n * @deprecated use `useI18n` instead\n */\nclass WithI18n extends Component<IWithI18nProps> {\n /* @ts-ignore */\n context: LocaleKeys;\n\n static contextType = Context;\n static defaultProps = {\n getText,\n };\n\n getText = (dictionary: Dictionary, selfLocale?: string): string => {\n const { locale, getText } = this.props;\n const contextLocale = this.context;\n return getText(dictionary, selfLocale || locale || contextLocale);\n };\n\n render() {\n const { children } = this.props as any;\n return children({\n getText: this.getText,\n });\n }\n}\n\nconst useI18n = (\n dictionary: Dictionary,\n locale: LocaleKeys = 'en',\n fallbackDictionary?: Dictionary,\n) => {\n const lang = React.useContext(Context) ?? locale;\n const resolvedDictionary = useAsyncI18nMessages(dictionary, lang, fallbackDictionary);\n const intl = React.useMemo(\n () => createIntl({ locale: lang, messages: resolvedDictionary }, messagesCache),\n [resolvedDictionary, lang],\n );\n\n return React.useCallback(\n (messageId: string, variables?: { [key: string]: string | number | undefined }) => {\n return intl.formatMessage({ id: messageId ?? '' }, variables);\n },\n [intl],\n );\n};\n\nexport default createHoc(WithI18n);\nexport { useI18n, I18nProvider, I18nConsumer };\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EAAE8B,IAAI;MAAEK,QAAQ,EAAEH;IAAmB,CAAC,EAAEnC,aAAa,CAAC;EAAA,GAC/E,CAACmC,kBAAkB,EAAEF,IAAI,CAC3B,CAAC;EAED,OAAO5C,KAAK,CAACkD,WAAW,CACtB,UAACC,SAAiB,EAAEC,SAA0D,EAAK;IACjF,OAAOL,IAAI,CAACM,aAAa,CAAC;MAAEC,EAAE,EAAEH,SAAS,aAATA,SAAS,cAATA,SAAS,GAAI;IAAG,CAAC,EAAEC,SAAS,CAAC;EAC/D,CAAC,EACD,CAACL,IAAI,CACP,CAAC;AACH,CAAC;AAED,eAAe5C,SAAS,CAACc,QAAQ,CAAC;AAClC,SAASwB,OAAO,EAAElC,YAAY,EAAEE,YAAY","ignoreList":[]}
|
|
@@ -7,16 +7,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports["default"] = exports.EnhancedWithKeyboardFocus = void 0;
|
|
8
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var
|
|
11
|
-
var _isNativeReflectConstruct2 = _interopRequireDefault(require("@babel/runtime/helpers/isNativeReflectConstruct"));
|
|
12
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
10
|
+
var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
|
|
13
11
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
13
|
var _react = require("react");
|
|
16
14
|
var _createHoc = _interopRequireDefault(require("../createHoc"));
|
|
17
15
|
var _fire = _interopRequireDefault(require("../fire"));
|
|
18
16
|
var _uncontroll = require("../uncontroll");
|
|
19
|
-
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, (0, _isNativeReflectConstruct2["default"])() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
20
17
|
/** @deprecated */
|
|
21
18
|
|
|
22
19
|
/** @deprecated */
|
|
@@ -31,7 +28,7 @@ var EnhancedWithKeyboardFocus = exports.EnhancedWithKeyboardFocus = /*#__PURE__*
|
|
|
31
28
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
32
29
|
args[_key] = arguments[_key];
|
|
33
30
|
}
|
|
34
|
-
_this =
|
|
31
|
+
_this = (0, _callSuper2["default"])(this, EnhancedWithKeyboardFocus, [].concat(args));
|
|
35
32
|
(0, _defineProperty2["default"])(_this, "state", {
|
|
36
33
|
keyboardFocused: false
|
|
37
34
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WithKeyboardFocus.js","names":["_react","require","_createHoc","_interopRequireDefault","_fire","_uncontroll","
|
|
1
|
+
{"version":3,"file":"WithKeyboardFocus.js","names":["_react","require","_createHoc","_interopRequireDefault","_fire","_uncontroll","usingKeyBoard","EnhancedWithKeyboardFocus","exports","_PureComponent","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","_callSuper2","concat","_defineProperty2","keyboardFocused","e","fire","internalSetState","_inherits2","_createClass2","key","value","render","_this$props","props","children","tabIndex","disabled","state","onFocus","handlerFocus","onBlur","handlerBlur","onKeyDown","handlerKeyDown","onMouseDown","handlerMouseDown","getDerivedStateFromProps","undefined","PureComponent","_default","createHoc"],"sources":["../../../src/utils/enhances/WithKeyboardFocus.tsx"],"sourcesContent":["import type React from 'react';\nimport { PureComponent } from 'react';\n\nimport type { UnknownProperties } from '../../core-types/UnknownProperties';\nimport createHoc from '../createHoc';\nimport fire from '../fire';\nimport { internalSetState } from '../uncontroll';\n\n/** @deprecated */\nexport interface IEnhancedWithKeyboardFocusInjectedProps\n extends EnhancedWithKeyboardFocusInjectedProps {}\nexport type EnhancedWithKeyboardFocusInjectedProps = {\n tabIndex: number;\n keyboardFocused: boolean;\n\n onFocus(e: FocusEvent): void;\n\n onBlur(e: FocusEvent): void;\n\n onKeyDown(e: KeyboardEvent): void;\n\n onMouseDown(e: MouseEvent): void;\n};\n\n/** @deprecated */\nexport interface IEnhancedWithKeyboardFocusProps\n extends EnhancedWithKeyboardFocusProps,\n UnknownProperties {}\nexport type EnhancedWithKeyboardFocusProps = {\n keyboardFocused?: boolean;\n tabIndex?: number;\n disabled?: boolean;\n\n children(props: IEnhancedWithKeyboardFocusInjectedProps): React.ReactNode;\n};\n\n/** @deprecated */\nexport interface IEnhancedWithKeyboardFocusState\n extends EnhancedWithKeyboardFocusState,\n UnknownProperties {}\nexport type EnhancedWithKeyboardFocusState = {\n keyboardFocused: boolean;\n};\n\nlet usingKeyBoard = true;\n\nexport class EnhancedWithKeyboardFocus extends PureComponent<\n IEnhancedWithKeyboardFocusProps,\n IEnhancedWithKeyboardFocusState\n> {\n static displayName = 'EnhancedWithKeyboardFocus';\n\n static defaultProps = {\n tabIndex: 0,\n };\n\n static getDerivedStateFromProps(props: any, state: any) {\n if (props.keyboardFocused !== undefined) {\n return {\n keyboardFocused: props.keyboardFocused,\n };\n }\n return state;\n }\n\n state = {\n keyboardFocused: false,\n };\n\n handlerFocus = (e: FocusEvent) => {\n fire(this, 'onFocus', e);\n if (usingKeyBoard) {\n internalSetState(this, { keyboardFocused: true });\n }\n };\n\n handlerBlur = (e: FocusEvent) => {\n fire(this, 'onBlur', e);\n internalSetState(this, { keyboardFocused: false });\n };\n\n handlerKeyDown = (e: KeyboardEvent) => {\n fire(this, 'onKeyDown', e);\n usingKeyBoard = true;\n };\n\n handlerMouseDown = (e: MouseEvent) => {\n fire(this, 'onMouseDown', e);\n usingKeyBoard = false;\n };\n\n render() {\n const { children, tabIndex, disabled } = this.props;\n const { keyboardFocused } = this.state;\n return children({\n tabIndex: disabled ? -1 : tabIndex!,\n keyboardFocused,\n onFocus: this.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O;UACLxB,eAAe,EAAEU,KAAK,CAACV;QACzB,CAAC;MACH;MACA,OAAOc,KAAK;IACd;EAAC;AAAA,EAjB4CW,oBAAa;AAAA,IAAA1B,gBAAA,aAA/Cb,yBAAyB,iBAIf,2BAA2B;AAAA,IAAAa,gBAAA,aAJrCb,yBAAyB,kBAMd;EACpB0B,QAAQ,EAAE;AACZ,CAAC;AAAA,IAAAc,QAAA,GAAAvC,OAAA,cAmDY,IAAAwC,qBAAS,EAACzC,yBAAyB,CAAC","ignoreList":[]}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import
|
|
4
|
-
import _isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
|
|
5
|
-
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
3
|
+
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
6
4
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
7
5
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
6
|
import { PureComponent } from 'react';
|
|
10
7
|
import createHoc from "../createHoc.mjs";
|
|
11
8
|
import fire from "../fire.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WithKeyboardFocus.mjs","names":["PureComponent","createHoc","fire","internalSetState","usingKeyBoard","EnhancedWithKeyboardFocus","_PureComponent","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","concat","_defineProperty","keyboardFocused","e","_inherits","_createClass","key","value","render","_this$props","props","children","tabIndex","disabled","state","onFocus","handlerFocus","onBlur","handlerBlur","onKeyDown","handlerKeyDown","onMouseDown","handlerMouseDown","getDerivedStateFromProps","undefined"],"sources":["../../../src/utils/enhances/WithKeyboardFocus.tsx"],"sourcesContent":["import type React from 'react';\nimport { PureComponent } from 'react';\n\nimport type { UnknownProperties } from '../../core-types/UnknownProperties';\nimport createHoc from '../createHoc';\nimport fire from '../fire';\nimport { internalSetState } from '../uncontroll';\n\n/** @deprecated */\nexport interface IEnhancedWithKeyboardFocusInjectedProps\n extends EnhancedWithKeyboardFocusInjectedProps {}\nexport type EnhancedWithKeyboardFocusInjectedProps = {\n tabIndex: number;\n keyboardFocused: boolean;\n\n onFocus(e: FocusEvent): void;\n\n onBlur(e: FocusEvent): void;\n\n onKeyDown(e: KeyboardEvent): void;\n\n onMouseDown(e: MouseEvent): void;\n};\n\n/** @deprecated */\nexport interface IEnhancedWithKeyboardFocusProps\n extends EnhancedWithKeyboardFocusProps,\n UnknownProperties {}\nexport type EnhancedWithKeyboardFocusProps = {\n keyboardFocused?: boolean;\n tabIndex?: number;\n disabled?: boolean;\n\n children(props: IEnhancedWithKeyboardFocusInjectedProps): React.ReactNode;\n};\n\n/** @deprecated */\nexport interface IEnhancedWithKeyboardFocusState\n extends EnhancedWithKeyboardFocusState,\n UnknownProperties {}\nexport type EnhancedWithKeyboardFocusState = {\n keyboardFocused: boolean;\n};\n\nlet usingKeyBoard = true;\n\nexport class EnhancedWithKeyboardFocus extends PureComponent<\n IEnhancedWithKeyboardFocusProps,\n IEnhancedWithKeyboardFocusState\n> {\n static displayName = 'EnhancedWithKeyboardFocus';\n\n static defaultProps = {\n tabIndex: 0,\n };\n\n static getDerivedStateFromProps(props: any, state: any) {\n if (props.keyboardFocused !== undefined) {\n return {\n keyboardFocused: props.keyboardFocused,\n };\n }\n return state;\n }\n\n state = {\n keyboardFocused: false,\n };\n\n handlerFocus = (e: FocusEvent) => {\n fire(this, 'onFocus', e);\n if (usingKeyBoard) {\n internalSetState(this, { keyboardFocused: true });\n }\n };\n\n handlerBlur = (e: FocusEvent) => {\n fire(this, 'onBlur', e);\n internalSetState(this, { keyboardFocused: false });\n };\n\n handlerKeyDown = (e: KeyboardEvent) => {\n fire(this, 'onKeyDown', e);\n usingKeyBoard = true;\n };\n\n handlerMouseDown = (e: MouseEvent) => {\n fire(this, 'onMouseDown', e);\n usingKeyBoard = false;\n };\n\n render() {\n const { children, tabIndex, disabled } = this.props;\n const { keyboardFocused } = this.state;\n return children({\n tabIndex: disabled ? -1 : tabIndex!,\n keyboardFocused,\n onFocus: this.handlerFocus,\n onBlur: this.handlerBlur,\n onKeyDown: this.handlerKeyDown,\n onMouseDown: this.handlerMouseDown,\n });\n }\n}\n\nexport default createHoc(EnhancedWithKeyboardFocus);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"WithKeyboardFocus.mjs","names":["PureComponent","createHoc","fire","internalSetState","usingKeyBoard","EnhancedWithKeyboardFocus","_PureComponent","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","concat","_defineProperty","keyboardFocused","e","_inherits","_createClass","key","value","render","_this$props","props","children","tabIndex","disabled","state","onFocus","handlerFocus","onBlur","handlerBlur","onKeyDown","handlerKeyDown","onMouseDown","handlerMouseDown","getDerivedStateFromProps","undefined"],"sources":["../../../src/utils/enhances/WithKeyboardFocus.tsx"],"sourcesContent":["import type React from 'react';\nimport { PureComponent } from 'react';\n\nimport type { UnknownProperties } from '../../core-types/UnknownProperties';\nimport createHoc from '../createHoc';\nimport fire from '../fire';\nimport { internalSetState } from '../uncontroll';\n\n/** @deprecated */\nexport interface IEnhancedWithKeyboardFocusInjectedProps\n extends EnhancedWithKeyboardFocusInjectedProps {}\nexport type EnhancedWithKeyboardFocusInjectedProps = {\n tabIndex: number;\n keyboardFocused: boolean;\n\n onFocus(e: FocusEvent): void;\n\n onBlur(e: FocusEvent): void;\n\n onKeyDown(e: KeyboardEvent): void;\n\n onMouseDown(e: MouseEvent): void;\n};\n\n/** @deprecated */\nexport interface IEnhancedWithKeyboardFocusProps\n extends EnhancedWithKeyboardFocusProps,\n UnknownProperties {}\nexport type EnhancedWithKeyboardFocusProps = {\n keyboardFocused?: boolean;\n tabIndex?: number;\n disabled?: boolean;\n\n children(props: IEnhancedWithKeyboardFocusInjectedProps): React.ReactNode;\n};\n\n/** @deprecated */\nexport interface IEnhancedWithKeyboardFocusState\n extends EnhancedWithKeyboardFocusState,\n UnknownProperties {}\nexport type EnhancedWithKeyboardFocusState = {\n keyboardFocused: boolean;\n};\n\nlet usingKeyBoard = true;\n\nexport class EnhancedWithKeyboardFocus extends PureComponent<\n IEnhancedWithKeyboardFocusProps,\n IEnhancedWithKeyboardFocusState\n> {\n static displayName = 'EnhancedWithKeyboardFocus';\n\n static defaultProps = {\n tabIndex: 0,\n };\n\n static getDerivedStateFromProps(props: any, state: any) {\n if (props.keyboardFocused !== undefined) {\n return {\n keyboardFocused: props.keyboardFocused,\n };\n }\n return state;\n }\n\n state = {\n keyboardFocused: false,\n };\n\n handlerFocus = (e: FocusEvent) => {\n fire(this, 'onFocus', e);\n if (usingKeyBoard) {\n internalSetState(this, { keyboardFocused: true });\n }\n };\n\n handlerBlur = (e: FocusEvent) => {\n fire(this, 'onBlur', e);\n internalSetState(this, { keyboardFocused: false });\n };\n\n handlerKeyDown = (e: KeyboardEvent) => {\n fire(this, 'onKeyDown', e);\n usingKeyBoard = true;\n };\n\n handlerMouseDown = (e: MouseEvent) => {\n fire(this, 'onMouseDown', e);\n usingKeyBoard = false;\n };\n\n render() {\n const { children, tabIndex, disabled } = this.props;\n const { keyboardFocused } = this.state;\n return children({\n tabIndex: disabled ? -1 : tabIndex!,\n keyboardFocused,\n onFocus: this.handlerFocus,\n onBlur: this.handlerBlur,\n onKeyDown: this.handlerKeyDown,\n onMouseDown: this.handlerMouseDown,\n });\n }\n}\n\nexport default createHoc(EnhancedWithKeyboardFocus);\n"],"mappings":";;;;;AACA,SAASA,aAAa,QAAQ,OAAO;AAGrC,OAAOC,SAAS,MAAM,kBAAc;AACpC,OAAOC,IAAI,MAAM,aAAS;AA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
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
10
|
-
var
|
|
10
|
+
var _regenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/regenerator"));
|
|
11
11
|
var _objectSpread3 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
12
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
13
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
@@ -24,22 +24,19 @@ var useAsyncI18nMessages = exports.useAsyncI18nMessages = function useAsyncI18nM
|
|
|
24
24
|
var container = {};
|
|
25
25
|
var _loop = function _loop(_locale) {
|
|
26
26
|
if (typeof primaryContainer[_locale] === 'function' || typeof fallbackContainer[_locale] === 'function') {
|
|
27
|
-
container[_locale] = /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/(0,
|
|
27
|
+
container[_locale] = /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/(0, _regenerator2["default"])().m(function _callee() {
|
|
28
28
|
var _yield$Promise$all, _yield$Promise$all2, primary, fallback;
|
|
29
|
-
return (0,
|
|
30
|
-
while (1) switch (_context.
|
|
29
|
+
return (0, _regenerator2["default"])().w(function (_context) {
|
|
30
|
+
while (1) switch (_context.n) {
|
|
31
31
|
case 0:
|
|
32
|
-
_context.
|
|
32
|
+
_context.n = 1;
|
|
33
33
|
return Promise.all([primaryContainer[_locale], fallbackContainer[_locale]]);
|
|
34
34
|
case 1:
|
|
35
|
-
_yield$Promise$all = _context.
|
|
35
|
+
_yield$Promise$all = _context.v;
|
|
36
36
|
_yield$Promise$all2 = (0, _slicedToArray2["default"])(_yield$Promise$all, 2);
|
|
37
37
|
primary = _yield$Promise$all2[0];
|
|
38
38
|
fallback = _yield$Promise$all2[1];
|
|
39
|
-
return _context.
|
|
40
|
-
case 2:
|
|
41
|
-
case "end":
|
|
42
|
-
return _context.stop();
|
|
39
|
+
return _context.a(2, (0, _objectSpread3["default"])((0, _objectSpread3["default"])({}, primary), fallback));
|
|
43
40
|
}
|
|
44
41
|
}, _callee);
|
|
45
42
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18nEnhance.js","names":["_react","_interopRequireDefault","require","_WithI18n","useAsyncI18nMessages","exports","primaryContainer","locale","fallbackContainer","_store$locale","container","React","useMemo","_loop","_locale","_asyncToGenerator2","
|
|
1
|
+
{"version":3,"file":"i18nEnhance.js","names":["_react","_interopRequireDefault","require","_WithI18n","useAsyncI18nMessages","exports","primaryContainer","locale","fallbackContainer","_store$locale","container","React","useMemo","_loop","_locale","_asyncToGenerator2","_regenerator2","m","_callee","_yield$Promise$all","_yield$Promise$all2","primary","fallback","w","_context","n","Promise","all","v","_slicedToArray2","a","_objectSpread3","_primaryContainer$_lo","_fallbackContainer$_l","initStore","store","_typeof2","_React$useState","useState","_React$useState2","setStore","lastLoadedLocaleRef","useRef","current","fallbackMessages","Object","values","loadingLocaleRef","useEffect","asyncMessages","then","module","messages","_defineProperty2","err","console","error","_default","props","i18n","getI18nText","useI18n"],"sources":["../../../src/utils/enhances/i18nEnhance.tsx"],"sourcesContent":["import React from 'react';\n\nimport { type LocaleKeys, useI18n } from './WithI18n';\nimport type { UnknownProperties } from '../../core-types/UnknownProperties';\n\n/** @deprecated */\nexport interface IWithI18nEnhanceProps extends WithI18nEnhanceProps, UnknownProperties {}\nexport type WithI18nEnhanceProps = {\n /* Function for getting the required field from the translation dictionary */\n getI18nText?: (key?: string, variables?: {}) => any;\n /* Object with translations */\n i18n?: {\n [locale: string]: {\n [key: string]: string;\n };\n };\n /* Locale for translations */\n locale?: LocaleKeys;\n};\n\ntype Messages = { [messageId: string]: string };\ntype MessagesContainer = { [locale: string]: Messages | (() => Promise<Messages>) };\ntype MessagesStore = { [locale: string]: Messages };\nexport const useAsyncI18nMessages = (\n primaryContainer: MessagesContainer,\n locale: string,\n fallbackContainer?: MessagesContainer,\n) => {\n const container = React.useMemo(() => {\n if (!fallbackContainer) return primaryContainer;\n if (!primaryContainer) return fallbackContainer;\n if (primaryContainer === fallbackContainer) return primaryContainer;\n const container: MessagesContainer = {};\n for (const locale in primaryContainer) {\n if (\n typeof primaryContainer[locale] === 'function' ||\n typeof fallbackContainer[locale] === 'function'\n ) {\n container[locale] = async () => {\n const [primary, fallback] = await Promise.all([\n primaryContainer[locale],\n fallbackContainer[locale],\n ]);\n return { ...primary, ...fallback };\n };\n } else {\n container[locale] = {\n ...(primaryContainer[locale] ?? {}),\n ...(fallbackContainer[locale] ?? {}),\n };\n }\n }\n return container;\n }, [primaryContainer, fallbackContainer]);\n const initStore = React.useMemo(() => {\n const store: MessagesStore = {};\n for (const locale in container) {\n if (typeof container[locale] === 'object') {\n store[locale] = container[locale] as Messages;\n }\n }\n return store;\n }, [container]);\n const [store, setStore] = React.useState(initStore);\n const lastLoadedLocaleRef = React.useRef<string | null>(null);\n if (store[locale]) lastLoadedLocaleRef.current = locale;\n const fallbackMessages = React.useMemo(() => Object.values(store)[0], [store]);\n\n const loadingLocaleRef = React.useRef<string | null>(null);\n React.useEffect(() => {\n loadingLocaleRef.current = locale;\n const asyncMessages = container[locale];\n if (typeof asyncMessages === 'function') {\n asyncMessages()\n .then((module) => {\n if (loadingLocaleRef.current !== locale) return;\n let messages = module;\n if ('default' in module && typeof module.default === 'object') messages = module.default;\n setStore((store) => ({\n ...store,\n [locale]: messages,\n }));\n })\n\n .catch((err) => {\n // eslint-disable-next-line no-console\n console.error(err);\n });\n }\n }, [container, locale]);\n\n return store[locale] ?? fallbackMessages;\n};\nexport default (container?: MessagesContainer) => {\n return (props: any): { getI18nText: ReturnType<typeof useI18n> } => {\n const { i18n, locale } = props;\n const getI18nText = useI18n(i18n, locale, container);\n\n return { ...props, getI18nText };\n };\n};\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,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