@hipay/hipay-material-ui 2.0.0-beta.46 → 2.0.0-beta.47

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.
Files changed (39) hide show
  1. package/HiCell/CellIcon.js +14 -6
  2. package/HiCell/CellNumeric.js +3 -2
  3. package/HiCell/CellRate.js +2 -1
  4. package/HiCell/CellSentinel.js +2 -1
  5. package/HiChip/HiChip.js +8 -8
  6. package/HiSelect/HiSelect.js +8 -2
  7. package/HiSelectNew/HiSelect.js +37 -5
  8. package/HiSelectableList/HiSelectableListItem.js +9 -3
  9. package/HiTable/HiCellBuilder.js +229 -0
  10. package/HiTable/HiTable.js +155 -0
  11. package/HiTable/HiTableBody.js +90 -0
  12. package/HiTable/HiTableHeader.js +162 -0
  13. package/HiTable/HiTableRow.js +154 -0
  14. package/HiTable/constants.js +145 -0
  15. package/HiTable/index.js +15 -0
  16. package/es/HiCell/CellIcon.js +14 -6
  17. package/es/HiCell/CellNumeric.js +3 -2
  18. package/es/HiCell/CellRate.js +2 -1
  19. package/es/HiCell/CellSentinel.js +2 -1
  20. package/es/HiChip/HiChip.js +10 -10
  21. package/es/HiSelect/HiSelect.js +8 -2
  22. package/es/HiSelectNew/HiSelect.js +34 -4
  23. package/es/HiSelectableList/HiSelectableListItem.js +9 -3
  24. package/es/HiTable/HiCellBuilder.js +181 -0
  25. package/es/HiTable/HiTable.js +114 -0
  26. package/es/HiTable/HiTableBody.js +56 -0
  27. package/es/HiTable/HiTableHeader.js +108 -0
  28. package/es/HiTable/HiTableRow.js +103 -0
  29. package/es/HiTable/constants.js +182 -0
  30. package/es/HiTable/index.js +1 -0
  31. package/es/index.js +1 -0
  32. package/es/utils/helpers.js +1 -1
  33. package/index.es.js +2 -1
  34. package/index.js +9 -1
  35. package/package.json +1 -1
  36. package/umd/hipay-material-ui.development.js +16018 -13677
  37. package/umd/hipay-material-ui.production.min.js +2 -2
  38. package/utils/helpers.js +1 -1
  39. package/yarn-error.log +0 -109
@@ -0,0 +1,182 @@
1
+ /**
2
+ * Infinite scroll variables
3
+ */
4
+ export const MAX_ROWS = 50;
5
+ export const NB_ROWS_BACK_TO_TOP = 10;
6
+ /**
7
+ * Cell height (px)
8
+ */
9
+
10
+ export const CELL_HEIGHT = 40;
11
+ export const CELL_HEIGHT_DENSE = 32;
12
+ export const CELL_HEADER_HEIGHT = 48;
13
+ export const CELL_HEADER_HEIGHT_DENSE = 40;
14
+ /**
15
+ * Cell types
16
+ * @type {string}
17
+ */
18
+
19
+ export const TYPE_ACCOUNT = 'account';
20
+ export const TYPE_ACCOUNT_NUMBER = 'account_number';
21
+ export const TYPE_ADDRESS = 'address';
22
+ export const TYPE_CHECKBOX = 'checkbox';
23
+ export const TYPE_DATE = 'date';
24
+ export const TYPE_ICON = 'icon';
25
+ export const TYPE_IMAGE = 'image';
26
+ export const TYPE_NUMERIC = 'numeric';
27
+ export const TYPE_RATE = 'rate';
28
+ export const TYPE_SENTINEL = 'sentinel';
29
+ export const TYPE_STATUS = 'status';
30
+ export const TYPE_COUNTRY = 'country';
31
+ export const TYPE_TEXT = 'text';
32
+ export const TYPE_THIRD_PARTY_SECURITY = 'third_party_security';
33
+ export const TYPE_PIN_TO_ACTION = 'pin_to_action';
34
+ /**
35
+ * Cell size [L] / [M] / [S]
36
+ */
37
+
38
+ export const VIEWS = {
39
+ LARGE: 'l',
40
+ MEDIUM: 'm',
41
+ SMALL: 's'
42
+ };
43
+ /**
44
+ * Trendchip evolution
45
+ */
46
+
47
+ export const EVOLUTION_UP = 'up';
48
+ export const EVOLUTION_DOWN = 'down';
49
+ export const NO_EVOLUTION = 'equal';
50
+ /**
51
+ * Ellipsis
52
+ */
53
+
54
+ export const ELLIPSIS_AFTER_FIRST_WORD = 'after-first-word';
55
+ export const ELLIPSIS_LEFT = 'left';
56
+ export const ELLIPSIS_MIDDLE = 'middle';
57
+ export const ELLIPSIS_NAME = 'name';
58
+ export const ELLIPSIS_RIGHT = 'right';
59
+ /**
60
+ * Fraud Result
61
+ */
62
+
63
+ export const FRAUD_RESULT_ACCEPTED = 'ACCEPTED';
64
+ export const FRAUD_RESULT_BLOCKED = 'BLOCKED';
65
+ export const FRAUD_RESULT_CHALLENGED = 'CHALLENGED';
66
+ export const FRAUD_RESULT_PENDING = 'PENDING';
67
+ export const FRAUD_RESULT_FORCE_AUTHENTICATE = 'FORCE_AUTHENTICATE';
68
+ export const FRAUD_RESULT_ASK_AUTHENTICATE = 'ASK_AUTHENTICATE';
69
+ /**
70
+ * Cell default width for each views
71
+ * @type {{}}
72
+ */
73
+
74
+ export const DEFAULT_WIDTHS = {
75
+ [TYPE_ACCOUNT]: {
76
+ [VIEWS.LARGE]: 160,
77
+ [VIEWS.MEDIUM]: 120,
78
+ [VIEWS.SMALL]: 80
79
+ },
80
+ [TYPE_ACCOUNT_NUMBER]: {
81
+ [VIEWS.LARGE]: 100,
82
+ [VIEWS.MEDIUM]: 80,
83
+ [VIEWS.SMALL]: 60
84
+ },
85
+ [TYPE_ADDRESS]: {
86
+ [VIEWS.LARGE]: 120,
87
+ [VIEWS.MEDIUM]: 100,
88
+ [VIEWS.SMALL]: 80
89
+ },
90
+ [TYPE_CHECKBOX]: {
91
+ [VIEWS.LARGE]: 40,
92
+ [VIEWS.MEDIUM]: 40,
93
+ [VIEWS.SMALL]: 40
94
+ },
95
+ [TYPE_COUNTRY]: {
96
+ [VIEWS.LARGE]: 120,
97
+ [VIEWS.MEDIUM]: 80,
98
+ [VIEWS.SMALL]: 40
99
+ },
100
+ [TYPE_DATE]: {
101
+ [VIEWS.LARGE]: 220,
102
+ [VIEWS.MEDIUM]: 140,
103
+ [VIEWS.SMALL]: 120
104
+ },
105
+ [TYPE_ICON]: {
106
+ [VIEWS.LARGE]: 140,
107
+ [VIEWS.MEDIUM]: 100,
108
+ [VIEWS.SMALL]: 60
109
+ },
110
+ [TYPE_IMAGE]: {
111
+ [VIEWS.LARGE]: 140,
112
+ [VIEWS.MEDIUM]: 100,
113
+ [VIEWS.SMALL]: 60
114
+ },
115
+ [TYPE_NUMERIC]: {
116
+ [VIEWS.LARGE]: 120,
117
+ [VIEWS.MEDIUM]: 100,
118
+ [VIEWS.SMALL]: 80
119
+ },
120
+ [TYPE_RATE]: {
121
+ [VIEWS.LARGE]: 100,
122
+ [VIEWS.MEDIUM]: 90,
123
+ [VIEWS.SMALL]: 80
124
+ },
125
+ [TYPE_SENTINEL]: {
126
+ [VIEWS.LARGE]: 80,
127
+ [VIEWS.MEDIUM]: 80,
128
+ [VIEWS.SMALL]: 80
129
+ },
130
+ [TYPE_STATUS]: {
131
+ [VIEWS.LARGE]: 120,
132
+ [VIEWS.MEDIUM]: 100,
133
+ [VIEWS.SMALL]: 80
134
+ },
135
+ [TYPE_TEXT]: {
136
+ [VIEWS.LARGE]: 200,
137
+ [VIEWS.MEDIUM]: 120,
138
+ [VIEWS.SMALL]: 80
139
+ },
140
+ [TYPE_THIRD_PARTY_SECURITY]: {
141
+ [VIEWS.LARGE]: 40,
142
+ [VIEWS.MEDIUM]: 40,
143
+ [VIEWS.SMALL]: 40
144
+ }
145
+ };
146
+ /**
147
+ * Cell default width for each views
148
+ * @type {{}}
149
+ */
150
+
151
+ export const DEFAULT_VIEWS = {
152
+ [TYPE_ACCOUNT]: VIEWS.LARGE,
153
+ [TYPE_ACCOUNT_NUMBER]: VIEWS.LARGE,
154
+ [TYPE_ADDRESS]: VIEWS.LARGE,
155
+ [TYPE_CHECKBOX]: VIEWS.LARGE,
156
+ [TYPE_COUNTRY]: VIEWS.LARGE,
157
+ [TYPE_DATE]: VIEWS.LARGE,
158
+ [TYPE_ICON]: VIEWS.LARGE,
159
+ [TYPE_IMAGE]: VIEWS.LARGE,
160
+ [TYPE_NUMERIC]: VIEWS.LARGE,
161
+ [TYPE_RATE]: VIEWS.LARGE,
162
+ [TYPE_SENTINEL]: VIEWS.LARGE,
163
+ [TYPE_STATUS]: VIEWS.LARGE,
164
+ [TYPE_TEXT]: VIEWS.LARGE,
165
+ [TYPE_THIRD_PARTY_SECURITY]: VIEWS.LARGE
166
+ };
167
+ /**
168
+ * Cell default side padding (one side) for each views
169
+ * @type {{}}
170
+ */
171
+
172
+ export const DEFAULT_PADDING = {
173
+ [VIEWS.LARGE]: 8,
174
+ [VIEWS.MEDIUM]: 8,
175
+ [VIEWS.SMALL]: 8
176
+ };
177
+ /**
178
+ * Cell types which are align right by default
179
+ * @type {*[]}
180
+ */
181
+
182
+ export const ALIGN_RIGHT_TYPES = [TYPE_NUMERIC, TYPE_RATE, TYPE_SENTINEL];
@@ -0,0 +1 @@
1
+ export { default } from './HiTable';
package/es/index.js CHANGED
@@ -12,6 +12,7 @@ export { default as HiTextField } from './HiForm/HiTextField';
12
12
  export { default as HiPasswordField } from './HiForm/HiPasswordField';
13
13
  export { default as HiSwitch } from './HiSwitch';
14
14
  export { default as HiSwitchState } from './HiSwitch/HiSwitchState';
15
+ export { default as HiTable } from './HiTable/HiTable';
15
16
  export { default as withMobileDialog } from './withMobileDialog';
16
17
  export { default as withWidth } from './withWidth';
17
18
  export { default as HiDatePicker } from './HiDatePicker/HiDatePicker';
@@ -121,7 +121,7 @@ export function formatNumber(number, size = 'l', locale = 'en-EN', precision) {
121
121
  break;
122
122
  }
123
123
 
124
- const effectivePrecision = precision || (size === 'l' ? 2 : 0); // To locale
124
+ const effectivePrecision = precision !== undefined ? precision : size === 'l' ? 2 : 0; // To locale
125
125
 
126
126
  const options = {
127
127
  minimumFractionDigits: effectivePrecision,
package/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license HiPay-Material-UI v2.0.0-beta.46
1
+ /** @license HiPay-Material-UI v2.0.0-beta.47
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -17,6 +17,7 @@ export { default as HiTextField } from './HiForm/HiTextField';
17
17
  export { default as HiPasswordField } from './HiForm/HiPasswordField';
18
18
  export { default as HiSwitch } from './HiSwitch';
19
19
  export { default as HiSwitchState } from './HiSwitch/HiSwitchState';
20
+ export { default as HiTable } from './HiTable/HiTable';
20
21
  export { default as withMobileDialog } from './withMobileDialog';
21
22
  export { default as withWidth } from './withWidth';
22
23
  export { default as HiDatePicker } from './HiDatePicker/HiDatePicker';
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license HiPay-Material-UI v2.0.0-beta.46
1
+ /** @license HiPay-Material-UI v2.0.0-beta.47
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -130,6 +130,12 @@ Object.defineProperty(exports, "HiSwitchState", {
130
130
  return _HiSwitchState.default;
131
131
  }
132
132
  });
133
+ Object.defineProperty(exports, "HiTable", {
134
+ enumerable: true,
135
+ get: function get() {
136
+ return _HiTable.default;
137
+ }
138
+ });
133
139
  Object.defineProperty(exports, "withMobileDialog", {
134
140
  enumerable: true,
135
141
  get: function get() {
@@ -189,6 +195,8 @@ var _HiSwitch = _interopRequireDefault(require("./HiSwitch"));
189
195
 
190
196
  var _HiSwitchState = _interopRequireDefault(require("./HiSwitch/HiSwitchState"));
191
197
 
198
+ var _HiTable = _interopRequireDefault(require("./HiTable/HiTable"));
199
+
192
200
  var _withMobileDialog = _interopRequireDefault(require("./withMobileDialog"));
193
201
 
194
202
  var _withWidth = _interopRequireDefault(require("./withWidth"));
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@hipay/hipay-material-ui",
3
3
  "private": false,
4
4
  "author": "HiPay PSYCHE Team",
5
- "version": "2.0.0-beta.46",
5
+ "version": "2.0.0-beta.47",
6
6
  "description": "React components that implement Google's Material Design.",
7
7
  "keywords": [
8
8
  "react",