@omniumretail/component-library 0.1.16 → 0.1.18
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/.storybook/preview.js +15 -1
- package/dist/bundle.js +102 -179
- package/dist/main.css +1 -0
- package/dist/types/components/Link/index.d.ts +1 -1
- package/dist/types/components/ModalConfirmation/ModalConfirmation.stories.d.ts +5 -0
- package/dist/types/components/ModalConfirmation/index.d.ts +9 -0
- package/dist/types/components/ModalWithTable/ModalWithTable.stories.d.ts +5 -0
- package/dist/types/components/ModalWithTable/index.d.ts +9 -0
- package/dist/types/components/Table/Table.stories.d.ts +1 -0
- package/dist/types/components/Table/index.d.ts +5 -0
- package/dist/types/constants/i18n.d.ts +1 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +2 -1
- package/src/components/Link/index.tsx +1 -3
- package/src/components/ModalConfirmation/ModalConfirmation.stories.tsx +17 -0
- package/src/components/ModalConfirmation/index.tsx +60 -0
- package/src/components/ModalConfirmation/styles.module.scss +62 -0
- package/src/components/ModalWithTable/ModalWithTable.stories.tsx +55 -0
- package/src/components/ModalWithTable/index.tsx +68 -0
- package/src/components/ModalWithTable/styles.module.scss +61 -0
- package/src/components/Table/Table.stories.tsx +59 -3
- package/src/components/Table/index.tsx +48 -26
- package/src/components/Tag/styles.module.scss +1 -0
- package/src/constants/i18n.ts +13 -3
- package/src/index.ts +1 -0
- package/src/locales/en.json +4 -0
- package/src/locales/es.json +4 -0
- package/src/locales/pt.json +4 -0
- package/webpack.config.js +1 -0
package/src/constants/i18n.ts
CHANGED
|
@@ -4,19 +4,29 @@ import { initReactI18next } from "react-i18next";
|
|
|
4
4
|
import en from '../locales/en.json';
|
|
5
5
|
import es from '../locales/es.json';
|
|
6
6
|
import pt from '../locales/pt.json';
|
|
7
|
+
var merge = require('lodash.merge');
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
export const mergei18n = (appResources: any) => {
|
|
10
|
+
debugger;
|
|
11
|
+
console.log(appResources, merge({
|
|
12
|
+
en: { translation: en },
|
|
13
|
+
pt: { translation: pt },
|
|
14
|
+
es: { translation: es },
|
|
15
|
+
}, appResources));
|
|
16
|
+
|
|
17
|
+
i18next
|
|
9
18
|
.use(initReactI18next)
|
|
10
19
|
.use(LanguageDetector)
|
|
11
20
|
.init({
|
|
12
|
-
resources: {
|
|
21
|
+
resources: merge({
|
|
13
22
|
en: { translation: en },
|
|
14
23
|
pt: { translation: pt },
|
|
15
24
|
es: { translation: es },
|
|
16
|
-
},
|
|
25
|
+
}, appResources),
|
|
17
26
|
detection: {
|
|
18
27
|
order: ['querystring', 'navigator', 'htmlTag'],
|
|
19
28
|
lookupQuerystring: 'lng',
|
|
20
29
|
htmlTag: document.documentElement,
|
|
21
30
|
},
|
|
22
31
|
});
|
|
32
|
+
}
|
package/src/index.ts
CHANGED
package/src/locales/en.json
CHANGED
package/src/locales/es.json
CHANGED
package/src/locales/pt.json
CHANGED