@omniumretail/component-library 1.0.74 → 1.0.76
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/main.js +16 -16
- package/.storybook/preview-head.html +20 -20
- package/.storybook/preview.js +27 -27
- package/NPMPUBLISH.md +29 -29
- package/README.md +54 -54
- package/bitbucket-pipelines.yml +94 -94
- package/dist/bundle.js +247 -291
- package/dist/types/components/AnalyticsBar/AnalyticsBar.stories.d.ts +5 -5
- package/dist/types/components/AnalyticsBar/helpers/codeMutation.d.ts +4 -4
- package/dist/types/components/AnalyticsBar/index.d.ts +2 -2
- package/dist/types/components/AnalyticsBar/interfaces/analyticsBar.d.ts +12 -12
- package/dist/types/components/Button/Button.stories.d.ts +6 -6
- package/dist/types/components/Button/index.d.ts +7 -7
- package/dist/types/components/Category/Category.stories.d.ts +4 -4
- package/dist/types/components/Category/CategoryContent/index.d.ts +7 -7
- package/dist/types/components/Category/CategorySidebar/index.d.ts +26 -26
- package/dist/types/components/Category/index.d.ts +7 -7
- package/dist/types/components/CategoryReadOnly/CategoryReadOnly.stories.d.ts +4 -4
- package/dist/types/components/CategoryReadOnly/evaluationOptions.d.ts +10 -10
- package/dist/types/components/CategoryReadOnly/index.d.ts +9 -9
- package/dist/types/components/CategoryResponse/CategoryResponse.stories.d.ts +4 -4
- package/dist/types/components/CategoryResponse/evaluationOptions.d.ts +10 -10
- package/dist/types/components/CategoryResponse/index.d.ts +9 -9
- package/dist/types/components/DatePicker/DatePicker.stories.d.ts +5 -5
- package/dist/types/components/DatePicker/index.d.ts +8 -8
- package/dist/types/components/DatePickerTag/DatePickerTag.stories.d.ts +5 -5
- package/dist/types/components/DatePickerTag/index.d.ts +6 -6
- package/dist/types/components/Footer/Footer.stories.d.ts +5 -5
- package/dist/types/components/Footer/index.d.ts +4 -4
- package/dist/types/components/Input/Input.stories.d.ts +5 -5
- package/dist/types/components/Input/index.d.ts +10 -10
- package/dist/types/components/InputCountryCode/index.d.ts +10 -10
- package/dist/types/components/InputCountryCode/inputCountryCode.stories.d.ts +5 -5
- package/dist/types/components/Label/Label.stories.d.ts +6 -6
- package/dist/types/components/Label/index.d.ts +7 -7
- package/dist/types/components/Link/Link.stories.d.ts +7 -7
- package/dist/types/components/Link/index.d.ts +7 -7
- package/dist/types/components/Menu/Menu.stories.d.ts +5 -5
- package/dist/types/components/Menu/helpers/codeMutation.d.ts +4 -4
- package/dist/types/components/Menu/index.d.ts +3 -2
- package/dist/types/components/ModalConfirmation/ModalConfirmation.stories.d.ts +5 -5
- package/dist/types/components/ModalConfirmation/ModalStatusList.d.ts +5 -5
- package/dist/types/components/ModalConfirmation/index.d.ts +9 -9
- package/dist/types/components/ModalWithTable/ModalWithTable.stories.d.ts +5 -5
- package/dist/types/components/ModalWithTable/index.d.ts +13 -13
- package/dist/types/components/Navigation/Navigation.stories.d.ts +5 -5
- package/dist/types/components/Navigation/index.d.ts +10 -10
- package/dist/types/components/Notification/Notification.stories.d.ts +5 -5
- package/dist/types/components/Notification/index.d.ts +9 -9
- package/dist/types/components/Questions/Questions.stories.d.ts +4 -4
- package/dist/types/components/Questions/SingleQuestion/index.d.ts +1 -1
- package/dist/types/components/Questions/index.d.ts +5 -5
- package/dist/types/components/Radio/Radio.stories.d.ts +5 -5
- package/dist/types/components/Radio/index.d.ts +10 -10
- package/dist/types/components/Select/Select.stories.d.ts +6 -6
- package/dist/types/components/Select/index.d.ts +5 -5
- package/dist/types/components/Separator/Separator.stories.d.ts +6 -6
- package/dist/types/components/Separator/index.d.ts +11 -11
- package/dist/types/components/Sidebar/Sidebar.stories.d.ts +6 -6
- package/dist/types/components/Sidebar/index.d.ts +15 -15
- package/dist/types/components/Switch/Switch.stories.d.ts +5 -5
- package/dist/types/components/Switch/index.d.ts +2 -2
- package/dist/types/components/Table/Table.stories.d.ts +9 -9
- package/dist/types/components/Table/index.d.ts +37 -37
- package/dist/types/components/Tag/Tag.stories.d.ts +5 -5
- package/dist/types/components/Tag/index.d.ts +8 -8
- package/dist/types/components/Upload/Upload.stories.d.ts +4 -4
- package/dist/types/components/Upload/index.d.ts +8 -8
- package/dist/types/components/UserInfo/UserInfo.stories.d.ts +4 -4
- package/dist/types/components/UserInfo/index.d.ts +8 -8
- package/dist/types/components/index.d.ts +25 -25
- package/dist/types/constants/i18n.d.ts +1 -1
- package/dist/types/constants/translationHelper.d.ts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/package.json +198 -198
- package/src/assets/scss/_global.scss +89 -89
- package/src/assets/scss/index.scss +2 -2
- package/src/components/AnalyticsBar/AnalyticsBar.stories.tsx +236 -236
- package/src/components/AnalyticsBar/helpers/codeMutation.tsx +19 -19
- package/src/components/AnalyticsBar/index.tsx +76 -76
- package/src/components/AnalyticsBar/interfaces/analyticsBar.tsx +13 -13
- package/src/components/AnalyticsBar/styles.module.scss +108 -108
- package/src/components/Button/Button.stories.tsx +26 -26
- package/src/components/Button/index.tsx +24 -24
- package/src/components/Button/styles.module.scss +65 -65
- package/src/components/Category/Category.stories.tsx +88 -88
- package/src/components/Category/CategoryContent/index.tsx +188 -188
- package/src/components/Category/CategoryContent/styles.module.scss +51 -51
- package/src/components/Category/CategorySidebar/index.tsx +268 -268
- package/src/components/Category/CategorySidebar/styles.module.scss +28 -28
- package/src/components/Category/index.tsx +76 -76
- package/src/components/Category/styles.module.scss +13 -13
- package/src/components/CategoryReadOnly/CategoryReadOnly.stories.tsx +270 -270
- package/src/components/CategoryReadOnly/evaluationOptions.tsx +81 -81
- package/src/components/CategoryReadOnly/index.tsx +254 -254
- package/src/components/CategoryReadOnly/styles.module.scss +184 -184
- package/src/components/CategoryResponse/CategoryResponse.stories.tsx +251 -251
- package/src/components/CategoryResponse/evaluationOptions.tsx +81 -81
- package/src/components/CategoryResponse/index.tsx +277 -277
- package/src/components/CategoryResponse/styles.module.scss +180 -180
- package/src/components/DatePicker/DatePicker.stories.tsx +16 -16
- package/src/components/DatePicker/index.tsx +38 -38
- package/src/components/DatePicker/styles.module.scss +3 -3
- package/src/components/DatePickerTag/DatePickerTag.stories.tsx +19 -19
- package/src/components/DatePickerTag/index.tsx +89 -89
- package/src/components/DatePickerTag/styles.module.scss +31 -31
- package/src/components/Footer/Footer.stories.tsx +14 -14
- package/src/components/Footer/index.tsx +38 -38
- package/src/components/Footer/styles.module.scss +38 -38
- package/src/components/Input/Input.stories.tsx +13 -13
- package/src/components/Input/index.tsx +31 -31
- package/src/components/Input/styles.module.scss +8 -8
- package/src/components/InputCountryCode/index.tsx +75 -75
- package/src/components/InputCountryCode/inputCountryCode.stories.tsx +55 -55
- package/src/components/InputCountryCode/styles.module.scss +3 -3
- package/src/components/Label/Label.stories.tsx +21 -21
- package/src/components/Label/index.tsx +19 -19
- package/src/components/Label/styles.module.scss +16 -16
- package/src/components/Link/Link.stories.tsx +30 -30
- package/src/components/Link/index.tsx +21 -21
- package/src/components/Link/styles.module.scss +24 -24
- package/src/components/Menu/Menu.stories.tsx +178 -178
- package/src/components/Menu/helpers/codeMutation.tsx +19 -19
- package/src/components/Menu/index.tsx +23 -23
- package/src/components/ModalConfirmation/ModalConfirmation.stories.tsx +40 -40
- package/src/components/ModalConfirmation/ModalStatusList.tsx +5 -5
- package/src/components/ModalConfirmation/index.tsx +70 -70
- package/src/components/ModalConfirmation/styles.module.scss +62 -62
- package/src/components/ModalWithTable/ModalWithTable.stories.tsx +96 -96
- package/src/components/ModalWithTable/index.tsx +232 -232
- package/src/components/ModalWithTable/styles.module.scss +77 -77
- package/src/components/Navigation/Navigation.stories.tsx +17 -17
- package/src/components/Navigation/index.tsx +33 -33
- package/src/components/Navigation/styles.module.scss +59 -59
- package/src/components/Notification/Notification.stories.tsx +29 -29
- package/src/components/Notification/index.tsx +21 -21
- package/src/components/Questions/Questions.stories.tsx +37 -37
- package/src/components/Questions/SingleQuestion/index.tsx +84 -84
- package/src/components/Questions/SingleQuestion/styles.module.scss +81 -81
- package/src/components/Questions/index.tsx +78 -78
- package/src/components/Radio/Radio.stories.tsx +43 -43
- package/src/components/Radio/index.tsx +26 -26
- package/src/components/Radio/styles.module.scss +23 -23
- package/src/components/Select/Select.stories.tsx +39 -39
- package/src/components/Select/index.tsx +27 -27
- package/src/components/Select/styles.module.scss +13 -13
- package/src/components/Separator/Separator.stories.tsx +22 -22
- package/src/components/Separator/index.tsx +27 -27
- package/src/components/Separator/styles.module.scss +25 -25
- package/src/components/Sidebar/Sidebar.stories.tsx +85 -85
- package/src/components/Sidebar/index.tsx +103 -103
- package/src/components/Sidebar/styles.module.scss +85 -85
- package/src/components/Switch/Switch.stories.tsx +14 -14
- package/src/components/Switch/index.tsx +8 -8
- package/src/components/Switch/styles.module.scss +7 -7
- package/src/components/Table/Table.stories.tsx +222 -222
- package/src/components/Table/index.tsx +279 -275
- package/src/components/Table/styles.module.scss +75 -75
- package/src/components/Tag/Tag.stories.tsx +22 -22
- package/src/components/Tag/index.tsx +189 -189
- package/src/components/Tag/styles.module.scss +60 -60
- package/src/components/Upload/Upload.stories.tsx +45 -45
- package/src/components/Upload/index.tsx +91 -91
- package/src/components/UserInfo/UserInfo.stories.tsx +38 -37
- package/src/components/UserInfo/index.tsx +77 -62
- package/src/components/UserInfo/styles.module.scss +30 -29
- package/src/components/index.tsx +25 -25
- package/src/constants/i18n.ts +25 -25
- package/src/constants/translationHelper.ts +7 -7
- package/src/index.ts +2 -2
- package/src/locales/en.json +86 -86
- package/src/locales/es.json +86 -86
- package/src/locales/pt.json +86 -86
- package/src/types/Global.d.ts +4 -4
- package/tsconfig.json +29 -29
- package/webpack.config.js +51 -51
package/src/locales/pt.json
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
{
|
|
2
|
-
"tableHeadings": {
|
|
3
|
-
"key": "Chave",
|
|
4
|
-
"name": "Nome",
|
|
5
|
-
"mecanographicNumber": "Número Mecanográfico",
|
|
6
|
-
"store": "Loja",
|
|
7
|
-
"role": "Posição",
|
|
8
|
-
"type": "Tipo",
|
|
9
|
-
"id": "Id",
|
|
10
|
-
"action": "Ação"
|
|
11
|
-
},
|
|
12
|
-
"userInfoColumn": {
|
|
13
|
-
"Date": "Data",
|
|
14
|
-
"Store": "Loja",
|
|
15
|
-
"Team": "Equipa em Gestão",
|
|
16
|
-
"Supervisor": "Supervisor",
|
|
17
|
-
"TypeOfContract": "Tipo de contrato",
|
|
18
|
-
"Nationality": "Nacionalidade",
|
|
19
|
-
"CivilStatus": "Estado Civil",
|
|
20
|
-
"IdentificationDocument": "Doc.Identificação",
|
|
21
|
-
"NTaxpayer": "Nº Contribuinte",
|
|
22
|
-
"NIB": "NIB",
|
|
23
|
-
"SocialSecurity": "Nr Segurança Social",
|
|
24
|
-
"NChildren": "Nº Filhos",
|
|
25
|
-
"Workload": "Carga horária",
|
|
26
|
-
"Description": "Descrição",
|
|
27
|
-
"Comments": "Comentários"
|
|
28
|
-
},
|
|
29
|
-
"navigation": {
|
|
30
|
-
"back": "Voltar Atrás",
|
|
31
|
-
"logout": "Terminar Sessão",
|
|
32
|
-
"home": "Início"
|
|
33
|
-
},
|
|
34
|
-
"actions": {
|
|
35
|
-
"one": "one",
|
|
36
|
-
"two": "two"
|
|
37
|
-
},
|
|
38
|
-
"components": {
|
|
39
|
-
"category": {
|
|
40
|
-
"addQuestion": "Adicionar questão",
|
|
41
|
-
"placeholderInfo": "Informação da questão",
|
|
42
|
-
"errorInfo": "Informação da questão em falta",
|
|
43
|
-
"placeholderQuestion": "Questão",
|
|
44
|
-
"errorQuestion": "Questão em falta",
|
|
45
|
-
"placeholderGrade": "Ponderação",
|
|
46
|
-
"errorGrade": "Ponderação em falta",
|
|
47
|
-
"newCategory": "Nova categoria"
|
|
48
|
-
},
|
|
49
|
-
"categorySidBar": {
|
|
50
|
-
"addCategory": "Adicionar categoria",
|
|
51
|
-
"removeCategory": "Remover categoria"
|
|
52
|
-
},
|
|
53
|
-
"categoryContent": {
|
|
54
|
-
"message": "Por favor selecione uma categoria na barra lateral",
|
|
55
|
-
"categoryName": "Nome da categoria",
|
|
56
|
-
"categoryNameError": "Nome categoria em falta",
|
|
57
|
-
"weighting": "Ponderação",
|
|
58
|
-
"openAnswer": "Resposta aberta",
|
|
59
|
-
"answerOption": "Opção de resposta",
|
|
60
|
-
"answers": "Questões"
|
|
61
|
-
},
|
|
62
|
-
"categoryResponse": {
|
|
63
|
-
"notApplicable": "Não Aplicável",
|
|
64
|
-
"answer": "Resposta"
|
|
65
|
-
},
|
|
66
|
-
"categoryReadOnly": {
|
|
67
|
-
"categories": "
|
|
68
|
-
"categoryAverage": "
|
|
69
|
-
},
|
|
70
|
-
"analyticsBar": {
|
|
71
|
-
"desc": "Decrescente",
|
|
72
|
-
"asc": "Crescente"
|
|
73
|
-
},
|
|
74
|
-
"tag": {
|
|
75
|
-
"search": "Procurar",
|
|
76
|
-
"advancedFields": "
|
|
77
|
-
},
|
|
78
|
-
"table": {
|
|
79
|
-
"selectAll": "Selecionar todos",
|
|
80
|
-
"deselectAll": "Desselecionar Todos"
|
|
81
|
-
},
|
|
82
|
-
"datePickerTag": {
|
|
83
|
-
"placeholder": "Selecionar Data"
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"tableHeadings": {
|
|
3
|
+
"key": "Chave",
|
|
4
|
+
"name": "Nome",
|
|
5
|
+
"mecanographicNumber": "Número Mecanográfico",
|
|
6
|
+
"store": "Loja",
|
|
7
|
+
"role": "Posição",
|
|
8
|
+
"type": "Tipo",
|
|
9
|
+
"id": "Id",
|
|
10
|
+
"action": "Ação"
|
|
11
|
+
},
|
|
12
|
+
"userInfoColumn": {
|
|
13
|
+
"Date": "Data",
|
|
14
|
+
"Store": "Loja",
|
|
15
|
+
"Team": "Equipa em Gestão",
|
|
16
|
+
"Supervisor": "Supervisor",
|
|
17
|
+
"TypeOfContract": "Tipo de contrato",
|
|
18
|
+
"Nationality": "Nacionalidade",
|
|
19
|
+
"CivilStatus": "Estado Civil",
|
|
20
|
+
"IdentificationDocument": "Doc.Identificação",
|
|
21
|
+
"NTaxpayer": "Nº Contribuinte",
|
|
22
|
+
"NIB": "NIB",
|
|
23
|
+
"SocialSecurity": "Nr Segurança Social",
|
|
24
|
+
"NChildren": "Nº Filhos",
|
|
25
|
+
"Workload": "Carga horária",
|
|
26
|
+
"Description": "Descrição",
|
|
27
|
+
"Comments": "Comentários"
|
|
28
|
+
},
|
|
29
|
+
"navigation": {
|
|
30
|
+
"back": "Voltar Atrás",
|
|
31
|
+
"logout": "Terminar Sessão",
|
|
32
|
+
"home": "Início"
|
|
33
|
+
},
|
|
34
|
+
"actions": {
|
|
35
|
+
"one": "one",
|
|
36
|
+
"two": "two"
|
|
37
|
+
},
|
|
38
|
+
"components": {
|
|
39
|
+
"category": {
|
|
40
|
+
"addQuestion": "Adicionar questão",
|
|
41
|
+
"placeholderInfo": "Informação da questão",
|
|
42
|
+
"errorInfo": "Informação da questão em falta",
|
|
43
|
+
"placeholderQuestion": "Questão",
|
|
44
|
+
"errorQuestion": "Questão em falta",
|
|
45
|
+
"placeholderGrade": "Ponderação",
|
|
46
|
+
"errorGrade": "Ponderação em falta",
|
|
47
|
+
"newCategory": "Nova categoria"
|
|
48
|
+
},
|
|
49
|
+
"categorySidBar": {
|
|
50
|
+
"addCategory": "Adicionar categoria",
|
|
51
|
+
"removeCategory": "Remover categoria"
|
|
52
|
+
},
|
|
53
|
+
"categoryContent": {
|
|
54
|
+
"message": "Por favor selecione uma categoria na barra lateral",
|
|
55
|
+
"categoryName": "Nome da categoria",
|
|
56
|
+
"categoryNameError": "Nome categoria em falta",
|
|
57
|
+
"weighting": "Ponderação",
|
|
58
|
+
"openAnswer": "Resposta aberta",
|
|
59
|
+
"answerOption": "Opção de resposta",
|
|
60
|
+
"answers": "Questões"
|
|
61
|
+
},
|
|
62
|
+
"categoryResponse": {
|
|
63
|
+
"notApplicable": "Não Aplicável",
|
|
64
|
+
"answer": "Resposta"
|
|
65
|
+
},
|
|
66
|
+
"categoryReadOnly": {
|
|
67
|
+
"categories": "Categorias",
|
|
68
|
+
"categoryAverage": "Ponderação da categoria"
|
|
69
|
+
},
|
|
70
|
+
"analyticsBar": {
|
|
71
|
+
"desc": "Decrescente",
|
|
72
|
+
"asc": "Crescente"
|
|
73
|
+
},
|
|
74
|
+
"tag": {
|
|
75
|
+
"search": "Procurar",
|
|
76
|
+
"advancedFields": "Filtros avançados"
|
|
77
|
+
},
|
|
78
|
+
"table": {
|
|
79
|
+
"selectAll": "Selecionar todos",
|
|
80
|
+
"deselectAll": "Desselecionar Todos"
|
|
81
|
+
},
|
|
82
|
+
"datePickerTag": {
|
|
83
|
+
"placeholder": "Selecionar Data"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
package/src/types/Global.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare module "*.module.css";
|
|
2
|
-
declare module "*.module.scss";
|
|
3
|
-
declare module "*.png";
|
|
4
|
-
declare module "*.svg";
|
|
1
|
+
declare module "*.module.css";
|
|
2
|
+
declare module "*.module.scss";
|
|
3
|
+
declare module "*.png";
|
|
4
|
+
declare module "*.svg";
|
package/tsconfig.json
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "es5",
|
|
4
|
-
"lib": [
|
|
5
|
-
"dom",
|
|
6
|
-
"dom.iterable",
|
|
7
|
-
"esnext"
|
|
8
|
-
],
|
|
9
|
-
"allowJs": true,
|
|
10
|
-
"skipLibCheck": true,
|
|
11
|
-
"esModuleInterop": true,
|
|
12
|
-
"allowSyntheticDefaultImports": true,
|
|
13
|
-
"strict": true,
|
|
14
|
-
"forceConsistentCasingInFileNames": true,
|
|
15
|
-
"noFallthroughCasesInSwitch": true,
|
|
16
|
-
"module": "esnext",
|
|
17
|
-
"moduleResolution": "node",
|
|
18
|
-
"resolveJsonModule": true,
|
|
19
|
-
"isolatedModules": true,
|
|
20
|
-
"declaration": true,
|
|
21
|
-
"declarationDir": "./dist/types",
|
|
22
|
-
"noEmit": false,
|
|
23
|
-
"baseUrl": "src",
|
|
24
|
-
"jsx": "react-jsx"
|
|
25
|
-
},
|
|
26
|
-
"include": [
|
|
27
|
-
"src"
|
|
28
|
-
]
|
|
29
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es5",
|
|
4
|
+
"lib": [
|
|
5
|
+
"dom",
|
|
6
|
+
"dom.iterable",
|
|
7
|
+
"esnext"
|
|
8
|
+
],
|
|
9
|
+
"allowJs": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"esModuleInterop": true,
|
|
12
|
+
"allowSyntheticDefaultImports": true,
|
|
13
|
+
"strict": true,
|
|
14
|
+
"forceConsistentCasingInFileNames": true,
|
|
15
|
+
"noFallthroughCasesInSwitch": true,
|
|
16
|
+
"module": "esnext",
|
|
17
|
+
"moduleResolution": "node",
|
|
18
|
+
"resolveJsonModule": true,
|
|
19
|
+
"isolatedModules": true,
|
|
20
|
+
"declaration": true,
|
|
21
|
+
"declarationDir": "./dist/types",
|
|
22
|
+
"noEmit": false,
|
|
23
|
+
"baseUrl": "src",
|
|
24
|
+
"jsx": "react-jsx"
|
|
25
|
+
},
|
|
26
|
+
"include": [
|
|
27
|
+
"src"
|
|
28
|
+
]
|
|
29
|
+
}
|
package/webpack.config.js
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
|
3
|
-
|
|
4
|
-
module.exports = {
|
|
5
|
-
mode: 'development',
|
|
6
|
-
entry: './src/index.ts',
|
|
7
|
-
devtool: "eval-cheap-source-map",
|
|
8
|
-
output: {
|
|
9
|
-
path: path.resolve(__dirname, 'dist'),
|
|
10
|
-
filename: 'bundle.js',
|
|
11
|
-
libraryTarget: 'umd',
|
|
12
|
-
library: 'lib',
|
|
13
|
-
},
|
|
14
|
-
resolve: {
|
|
15
|
-
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
16
|
-
},
|
|
17
|
-
module: {
|
|
18
|
-
rules: [
|
|
19
|
-
{
|
|
20
|
-
test: /\.s?css$/,
|
|
21
|
-
use: [
|
|
22
|
-
{ loader: MiniCssExtractPlugin.loader },
|
|
23
|
-
{
|
|
24
|
-
loader: 'css-loader',
|
|
25
|
-
options: {
|
|
26
|
-
modules: true
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
{ loader: 'sass-loader' }
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
test: /\.(png|svg|jpg|gif)$/,
|
|
34
|
-
loader: 'url-loader',
|
|
35
|
-
options: {
|
|
36
|
-
limit: Infinity, // everything
|
|
37
|
-
name: '[name].[hash:7].[ext]',
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
{ test: /\.tsx?$/, use: 'ts-loader' },
|
|
41
|
-
],
|
|
42
|
-
},
|
|
43
|
-
plugins: [new MiniCssExtractPlugin()],
|
|
44
|
-
externals: {
|
|
45
|
-
react: "react",
|
|
46
|
-
"react-dom": "react-dom",
|
|
47
|
-
"react-router-dom": "react-router-dom",
|
|
48
|
-
"react-i18next": "react-i18next",
|
|
49
|
-
"i18next": "i18next",
|
|
50
|
-
},
|
|
51
|
-
};
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
|
3
|
+
|
|
4
|
+
module.exports = {
|
|
5
|
+
mode: 'development',
|
|
6
|
+
entry: './src/index.ts',
|
|
7
|
+
devtool: "eval-cheap-source-map",
|
|
8
|
+
output: {
|
|
9
|
+
path: path.resolve(__dirname, 'dist'),
|
|
10
|
+
filename: 'bundle.js',
|
|
11
|
+
libraryTarget: 'umd',
|
|
12
|
+
library: 'lib',
|
|
13
|
+
},
|
|
14
|
+
resolve: {
|
|
15
|
+
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
16
|
+
},
|
|
17
|
+
module: {
|
|
18
|
+
rules: [
|
|
19
|
+
{
|
|
20
|
+
test: /\.s?css$/,
|
|
21
|
+
use: [
|
|
22
|
+
{ loader: MiniCssExtractPlugin.loader },
|
|
23
|
+
{
|
|
24
|
+
loader: 'css-loader',
|
|
25
|
+
options: {
|
|
26
|
+
modules: true
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{ loader: 'sass-loader' }
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
test: /\.(png|svg|jpg|gif)$/,
|
|
34
|
+
loader: 'url-loader',
|
|
35
|
+
options: {
|
|
36
|
+
limit: Infinity, // everything
|
|
37
|
+
name: '[name].[hash:7].[ext]',
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{ test: /\.tsx?$/, use: 'ts-loader' },
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
plugins: [new MiniCssExtractPlugin()],
|
|
44
|
+
externals: {
|
|
45
|
+
react: "react",
|
|
46
|
+
"react-dom": "react-dom",
|
|
47
|
+
"react-router-dom": "react-router-dom",
|
|
48
|
+
"react-i18next": "react-i18next",
|
|
49
|
+
"i18next": "i18next",
|
|
50
|
+
},
|
|
51
|
+
};
|