@dreamcommerce/aurora 0.3.4-181 → 0.3.4-182

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.
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React = require('react');
6
+ var context = require('./context.js');
7
+
8
+ function I18nextProvider(_ref) {
9
+ var i18n = _ref.i18n,
10
+ defaultNS = _ref.defaultNS,
11
+ children = _ref.children;
12
+ return React.createElement(context.I18nContext.Provider, {
13
+ value: {
14
+ i18n: i18n,
15
+ defaultNS: defaultNS
16
+ }
17
+ }, children);
18
+ }
19
+
20
+ exports.I18nextProvider = I18nextProvider;
21
+ //# sourceMappingURL=I18nextProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -14,6 +14,7 @@ var saturation_lightness_picker = require('./components/saturation_lightness_pic
14
14
  var hue_picker = require('./components/hue_picker.js');
15
15
  var buttons = require('./components/buttons.js');
16
16
  var use_color_picker = require('./use_color_picker.js');
17
+ var with_translation = require('../../utilities/translation/with_translation.js');
17
18
 
18
19
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
19
20
 
@@ -105,13 +106,14 @@ var PureColorPicker = function (_a) {
105
106
  React__default['default'].createElement(input['default'], { id: "color-picker-id", value: color === null || color === void 0 ? void 0 : color.hex, onChange: inputOnChange }))),
106
107
  !hideChooseCancelButtons && React__default['default'].createElement(buttons['default'], { restoreInitialColor: restoreInitialColor })));
107
108
  };
108
- var index = (function (_a) {
109
+ var ColorPickerWithContext = function (_a) {
109
110
  var initialColor = _a.initialColor, onChange = _a.onChange, hideChooseCancelButtons = _a.hideChooseCancelButtons, name = _a.name;
110
111
  var colorPickerContext = use_color_picker.useColorPicker({ initialColorHex: initialColor || '#ffffff', onChange: onChange });
111
112
  return (React__default['default'].createElement(context.ColorPickerContext.Provider, { value: colorPickerContext },
112
113
  React__default['default'].createElement("input", { type: "hidden", name: name }),
113
114
  React__default['default'].createElement(PureColorPicker, { hideChooseCancelButtons: hideChooseCancelButtons })));
114
- });
115
+ };
116
+ var index = with_translation['default'](ColorPickerWithContext);
115
117
 
116
118
  exports.PureColorPicker = PureColorPicker;
117
119
  exports.default = index;
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,yDAA6D;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,yDAA6D;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var i18next = require('../../../../../external/i18next/dist/esm/i18next.js');
6
+ var React = require('react');
7
+ var I18nextProvider = require('../../../../../external/react-i18next/dist/es/I18nextProvider.js');
8
+ require('../../i18n.js');
9
+ var _tslib = require('../../../../../_virtual/_tslib.js');
10
+
11
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
+
13
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
+
15
+ var withTranslation = function (ChildComponent) { return function (props) {
16
+ return (React__default['default'].createElement(I18nextProvider.I18nextProvider, { i18n: i18next['default'] },
17
+ React__default['default'].createElement(ChildComponent, _tslib.__assign({}, props))));
18
+ }; };
19
+
20
+ exports.default = withTranslation;
21
+ //# sourceMappingURL=with_translation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,sBAAsB,qDAAyD;AAC/E;AACA,8BAA8B,kEAAsE;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -0,0 +1,17 @@
1
+ import { createElement } from 'react';
2
+ import { I18nContext } from './context.js';
3
+
4
+ function I18nextProvider(_ref) {
5
+ var i18n = _ref.i18n,
6
+ defaultNS = _ref.defaultNS,
7
+ children = _ref.children;
8
+ return createElement(I18nContext.Provider, {
9
+ value: {
10
+ i18n: i18n,
11
+ defaultNS: defaultNS
12
+ }
13
+ }, children);
14
+ }
15
+
16
+ export { I18nextProvider };
17
+ //# sourceMappingURL=I18nextProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { IColorPickerProps, IPureColorPickerProps } from './types';
3
3
  export declare const PureColorPicker: React.FC<IPureColorPickerProps>;
4
- declare const _default: ({ initialColor, onChange, hideChooseCancelButtons, name }: IColorPickerProps) => JSX.Element;
4
+ declare const _default: React.FC<IColorPickerProps>;
5
5
  export default _default;
@@ -10,6 +10,7 @@ import SaturationLightnessPicker from './components/saturation_lightness_picker.
10
10
  import HuePicker from './components/hue_picker.js';
11
11
  import ColorPickerButtons from './components/buttons.js';
12
12
  import { useColorPicker } from './use_color_picker.js';
13
+ import withTranslation from '../../utilities/translation/with_translation.js';
13
14
 
14
15
  var useStyles = createUseStyles({
15
16
  saturationLightnessPanel: {
@@ -97,13 +98,14 @@ var PureColorPicker = function (_a) {
97
98
  React.createElement(Input, { id: "color-picker-id", value: color === null || color === void 0 ? void 0 : color.hex, onChange: inputOnChange }))),
98
99
  !hideChooseCancelButtons && React.createElement(ColorPickerButtons, { restoreInitialColor: restoreInitialColor })));
99
100
  };
100
- var index = (function (_a) {
101
+ var ColorPickerWithContext = function (_a) {
101
102
  var initialColor = _a.initialColor, onChange = _a.onChange, hideChooseCancelButtons = _a.hideChooseCancelButtons, name = _a.name;
102
103
  var colorPickerContext = useColorPicker({ initialColorHex: initialColor || '#ffffff', onChange: onChange });
103
104
  return (React.createElement(ColorPickerContext.Provider, { value: colorPickerContext },
104
105
  React.createElement("input", { type: "hidden", name: name }),
105
106
  React.createElement(PureColorPicker, { hideChooseCancelButtons: hideChooseCancelButtons })));
106
- });
107
+ };
108
+ var index = withTranslation(ColorPickerWithContext);
107
109
 
108
110
  export default index;
109
111
  export { PureColorPicker };
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA,gCAAgC,yDAA6D;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA,gCAAgC,yDAA6D;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare type TWithTranslation = <T>(children: React.FC<T>) => React.FC<T>;
@@ -0,0 +1,2 @@
1
+ import 'react';
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../src/utilities/translation/types.ts"],"names":[],"mappings":"AAAA,OAAkB,OAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { TWithTranslation } from "./types";
2
+ declare const withTranslation: TWithTranslation;
3
+ export default withTranslation;
@@ -0,0 +1,13 @@
1
+ import i18next from '../../../../../external/i18next/dist/esm/i18next.js';
2
+ import React from 'react';
3
+ import { I18nextProvider } from '../../../../../external/react-i18next/dist/es/I18nextProvider.js';
4
+ import '../../i18n.js';
5
+ import { __assign } from '../../../../../_virtual/_tslib.js';
6
+
7
+ var withTranslation = function (ChildComponent) { return function (props) {
8
+ return (React.createElement(I18nextProvider, { i18n: i18next },
9
+ React.createElement(ChildComponent, __assign({}, props))));
10
+ }; };
11
+
12
+ export default withTranslation;
13
+ //# sourceMappingURL=with_translation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,oBAAoB,qDAAyD;AAC7E;AACA,gCAAgC,kEAAsE;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@dreamcommerce/aurora",
3
3
  "packageManager": "yarn@3.1.1",
4
4
  "sideEffects": false,
5
- "version": "0.3.4-181",
5
+ "version": "0.3.4-182",
6
6
  "description": "aurora",
7
7
  "author": "k0ssak",
8
8
  "license": "MIT",