imbric-theme 0.3.4 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. package/atoms/Checkbox/Checkbox.js +26 -9
  2. package/atoms/Checkbox/Checkbox.module.css +51 -0
  3. package/atoms/Checkbox/Checkbox.stories.js +4 -2
  4. package/atoms/Icon/constants.js +1 -1
  5. package/atoms/Input/Input.js +1 -0
  6. package/atoms/LinkItem/LinkItem.js +36 -0
  7. package/atoms/{Link/Link.module.css → LinkItem/LinkItem.module.css} +6 -1
  8. package/atoms/{Link/Link.stories.js → LinkItem/LinkItem.stories.js} +5 -5
  9. package/atoms/{Link → LinkItem}/__snapshots__/Link.stories.js.snap +0 -0
  10. package/atoms/{Link → LinkItem}/constants.js +0 -0
  11. package/atoms/LinkItem/index.js +3 -0
  12. package/atoms/Modal/Modal.js +9 -1
  13. package/atoms/Modal/Modal.module.css +6 -6
  14. package/hook/useAddColumn.js +40 -0
  15. package/hook/useStateDate.js +25 -0
  16. package/hook/useTable.js +45 -0
  17. package/index.js +4 -2
  18. package/layout/DynamicTable/DynamicTable.js +87 -122
  19. package/layout/DynamicTable/DynamicTable.module.css +2 -1
  20. package/layout/DynamicTable/DynamicTable.stories.js +49 -2
  21. package/layout/DynamicTable/constants.js +50 -567
  22. package/layout/Navbar/Navbar.js +1 -1
  23. package/molecules/ColumnTable/ColumnTable.js +78 -73
  24. package/molecules/ColumnTable/ColumnTable.module.css +13 -0
  25. package/molecules/ColumnTable/ColumnTable.stories.js +4 -7
  26. package/molecules/ColumnTable/constants.js +111 -1
  27. package/molecules/DatePicker/DatePicker.js +27 -14
  28. package/molecules/DatePicker/DatePicker.module.css +1 -1
  29. package/molecules/DynamicSelect/DynamicSelect.js +9 -0
  30. package/molecules/FooterTable/FooterTable.js +47 -0
  31. package/molecules/FooterTable/FooterTable.module.css +37 -0
  32. package/molecules/FooterTable/FooterTable.stories.js +23 -0
  33. package/molecules/FooterTable/constants.js +1 -0
  34. package/molecules/FooterTable/index.js +3 -0
  35. package/molecules/RowTable/RowTable.js +70 -4
  36. package/molecules/RowTable/RowTable.module.css +21 -2
  37. package/molecules/RowTable/RowTable.stories.js +7 -4
  38. package/molecules/RowTable/constants.js +318 -1
  39. package/package.json +1 -1
  40. package/atoms/Icon/file-download-svgrepo-com.svg +0 -13
  41. package/atoms/Link/Link.js +0 -33
  42. package/atoms/Link/index.js +0 -3
@@ -1,3 +1,22 @@
1
- .row-table {
2
- display: flex;
1
+ .table {
2
+ width: 100%;
3
+ table-layout: fixed;
4
+
3
5
  }
6
+
7
+ .tbl-content {
8
+ height: max-content;
9
+ overflow-x: auto;
10
+ margin-top: 0px;
11
+ border: 1px solid rgba(0, 0, 0, 0.1);
12
+ }
13
+
14
+ .td {
15
+ padding: 15px;
16
+ text-align: left;
17
+ vertical-align: middle;
18
+ font-weight: 300;
19
+ font-size: 12px;
20
+ color: var(--color-font-base);
21
+ border-bottom: solid 1px rgba(0, 0, 0, 0.1);
22
+ }
@@ -12,12 +12,15 @@ const ListTemplate = getListTemplate(RowTable, styles)
12
12
  export default {
13
13
  title: 'Molecules/RowTable',
14
14
  component: RowTable,
15
- args: {},
15
+ args: {
16
+ slice: options.bookings,
17
+ columnsData: options.columns,
18
+ },
16
19
  argTypes: {
17
- types: getOptionsArgTypes(options.types),
20
+ // types: getOptionsArgTypes(options.types),
18
21
  },
19
22
  }
20
23
 
21
24
  export const Default = Template.bind({})
22
- export const List = ListTemplate.bind({})
23
- List.args = { items: options.types.map((type) => ({ type })) }
25
+ // export const List = ListTemplate.bind({})
26
+ // List.args = { items: options.types.map((type) => ({ type })) }
@@ -1 +1,318 @@
1
- export const options = { types: [] }
1
+ export const options = {
2
+
3
+ bookings: [
4
+ {
5
+ id: 346248956,
6
+ idUser: 146280,
7
+ idAuthorization: 817457,
8
+ status: 30,
9
+ origin: {
10
+ addressField: "Cines Embajadores, Glorieta Sta. María de la Cabeza, 5, 28045 Madrid",
11
+ lat: 40.40068,
12
+ lon: -3.698589
13
+ },
14
+ destination: {
15
+ addressField: "Estación de Chamartín, Madrid, España",
16
+ lat: 40.47237,
17
+ lon: -3.683141
18
+ },
19
+ timeBookingStartRealTimestamp: 1653559804000,
20
+ asap: true,
21
+ paymentMethod: 50,
22
+ entryChannel: 15,
23
+ idSupplierFleet: 57,
24
+ idSupplier: 57,
25
+ distanceMeters: 10501,
26
+ durationMinutes: 0,
27
+ location: "MADRID",
28
+ passengerName: "Alberto Alvarez Gonzalez",
29
+ phoneNumberPassenger: "453654654",
30
+ phoneNumberTaxiDriver: "600000000",
31
+ idSupplierTax: "11",
32
+ idSupplierServic: "15828",
33
+ cancelledWithCharg: false,
34
+ priceCustomer: "25.00000",
35
+ priceSupplier: "25.00000",
36
+ phoneNumberSupplier: "676800672",
37
+ idAuthorizationGroup: 335,
38
+ supplierTaxiDescription: "Seat León | 4",
39
+ subscriberCode: "6300",
40
+ userNumber: "93271095",
41
+ idService: 1946195318,
42
+ shared: false,
43
+ timeZone: "Europe/Madrid",
44
+ notes: "2022-05-26 10:10:03 | 11 | Laura | 150 | Servicio solicitado Portal - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML like Gecko) Chrome/101.0.4951.64 Safari/537.36. WL 4069\n2022-05-26 10:10:03 | 33 | SYSTEM | 114 | El número de vuelo es a.\n2022-05-26 10:10:03 | 33 | SYSTEM | 149 | Servicio enviado a MADRID_TAKSEE_TAXI (57)\n2022-05-26 10:10:12 | 44 | SYSTEM | 110 | Ha ocurrido un error enviando el email de confirmación al usuario\n2022-05-26 10:10:12 | 11 | SYSTEM | 130 | Confirmado por: MADRID_TAKSEE_TAXI (Taxi: 11). Num. servicio: 15828\n2022-05-26 10:10:44 | 33 | SYSTEM | 136 | Finalizado por SPARTAN. Importe 25 EUR establecido por SPARTAN (25.0 + 0.00 peaje)(40.4777 -3.7073)\n2022-05-26 10:10:44 | 33 | SYSTEM | 145 | Recibo enviado KO - 25€ + 0€ (peaje)",
45
+ tollCustomer: 0.00000,
46
+ tollSupplier: 0.00000,
47
+ paymentMethodCustomer: 4,
48
+ createdBy: 146280,
49
+ bookingBreakTitle1: "Evento",
50
+ bookingBreakTitle2: "Descripción actuación",
51
+ bookingBreakTitle3: "Centro de coste",
52
+ bookingBreakTitle4: "CIF visita comercial",
53
+ bookingBreakValue1: "Ev. Gen. - Acciones comerciales",
54
+ bookingBreakValue2: "a",
55
+ bookingBreakValue3: "",
56
+ bookingBreakValue4: "02661135N",
57
+ authorizationBreakTitle1: "Num.Empleado",
58
+ authorizationBreakTitle2: "Centro Empleado",
59
+ authorizationBreakTitle3: "ID Empresa",
60
+ authorizationBreakTitle7: "Nombre de la empresa",
61
+ authorizationBreakValue1: "U0193271",
62
+ authorizationBreakValue2: "5570",
63
+ authorizationBreakValue3: "95",
64
+ authorizationBreakValue5: "SC",
65
+ authorizationBreakValue6: "U0193271095",
66
+ authorizationBreakValue7: "FACILITIES"
67
+ },
68
+ {
69
+ id: 346248955,
70
+ idUser: 146280,
71
+ idAuthorization: 817457,
72
+ status: 30,
73
+ origin: {
74
+ addressField: "Estación de Chamartín, Madrid, España",
75
+ lat: 40.47237,
76
+ lon: -3.683141
77
+ },
78
+ destination: {
79
+ addressField: "Cines Embajadores, Glorieta Sta. María de la Cabeza, 5, 28045 Madrid",
80
+ lat: 40.40068,
81
+ lon: -3.698589
82
+ },
83
+ timeBookingStartRealTimestamp: 1653559749000,
84
+ asap: true,
85
+ paymentMethod: 50,
86
+ entryChannel: 15,
87
+ idSupplierFleet: 57,
88
+ idSupplier: 57,
89
+ distanceMeters: 10501,
90
+ durationMinutes: 0,
91
+ location: "MADRID",
92
+ passengerName: "Zombre Apellido1 Apellido2",
93
+ phoneNumberPassenger: "453654654",
94
+ phoneNumberTaxiDriver: "600000000",
95
+ idSupplierTaxi: "11",
96
+ idSupplierService: "15827",
97
+ cancelledWithCharge: false,
98
+ priceCustomer: "22.50000",
99
+ priceSupplier: "22.50000",
100
+ phoneNumberSupplier: "676800672",
101
+ idAuthorizationGroup: 335,
102
+ supplierTaxiDescription: "Seat León | 4",
103
+ subscriberCode: "6300",
104
+ userNumber: "93271095",
105
+ idService: 1946195317,
106
+ shared: false,
107
+ timeZone: "Europe/Madrid",
108
+ notes: "2022-05-26 10:09:09 | 11 | Laura | 150 | Servicio solicitado Portal - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML like Gecko) Chrome/101.0.4951.64 Safari/537.36. WL 4069\n2022-05-26 10:09:09 | 33 | SYSTEM | 114 | El número de vuelo es 1.\n2022-05-26 10:09:09 | 33 | SYSTEM | 149 | Servicio enviado a MADRID_TAKSEE_TAXI (57)\n2022-05-26 10:09:18 | 44 | SYSTEM | 110 | Ha ocurrido un error enviando el email de confirmación al usuario\n2022-05-26 10:09:18 | 11 | SYSTEM | 130 | Confirmado por: MADRID_TAKSEE_TAXI (Taxi: 11). Num. servicio: 15827\n2022-05-26 10:09:51 | 33 | SYSTEM | 136 | Finalizado por SPARTAN. Importe 22.5 EUR establecido por SPARTAN (22.5 + 0.00 peaje)(40.4777 -3.7073)\n2022-05-26 10:09:52 | 33 | SYSTEM | 145 | Recibo enviado KO - 22.5€ + 0€ (peaje)",
109
+ tollCustomer: 0.00000,
110
+ tollSupplier: 0.00000,
111
+ paymentMethodCustomer: 4,
112
+ createdBy: 146280,
113
+ bookingBreakTitle1: "Evento",
114
+ bookingBreakTitle2: "Descripción actuación",
115
+ bookingBreakTitle3: "Centro de coste",
116
+ bookingBreakTitle4: "CIF visita comercial",
117
+ bookingBreakValue1: "Ev. Gen. - Acciones comerciales",
118
+ bookingBreakValue2: "sasasa",
119
+ bookingBreakValue3: "",
120
+ bookingBreakValue4: "02661135N",
121
+ authorizationBreakTitle1: "Num.Empleado",
122
+ authorizationBreakTitle2: "Centro Empleado",
123
+ authorizationBreakTitle3: "ID Empresa",
124
+ authorizationBreakTitle7: "Nombre de la empresa",
125
+ authorizationBreakValue1: "U0193271",
126
+ authorizationBreakValue2: "5570",
127
+ authorizationBreakValue3: "95",
128
+ authorizationBreakValue5: "SC",
129
+ authorizationBreakValue6: "U0193271095",
130
+ authorizationBreakValue7: "FACILITIES"
131
+ },
132
+ {
133
+ id: 346248954,
134
+ idUser: 146280,
135
+ idAuthorization: 817457,
136
+ status: 30,
137
+ origin: {
138
+ addressField: "Cines Embajadores, Glorieta Sta. María de la Cabeza, 5, 28045 Madrid",
139
+ lat: 40.40068,
140
+ lon: -3.698589
141
+ },
142
+ destination: {
143
+ addressField: "Estación de Chamartín, Madrid, España",
144
+ lat: 40.47237,
145
+ lon: -3.683141
146
+ },
147
+ timeBookingStartRealTimestamp: 1653559603000,
148
+ asap: true,
149
+ paymentMethod: 50,
150
+ entryChannel: 15,
151
+ idSupplierFleet: 57,
152
+ idSupplier: 57,
153
+ distanceMeters: 10501,
154
+ durationMinutes: 0,
155
+ location: "MADRID",
156
+ passengerName: "Sandra Vicente Garcia",
157
+ phoneNumberPassenger: "453654654",
158
+ phoneNumberTaxiDriver: "600000000",
159
+ idSupplierTaxi: "11",
160
+ idSupplierService: "15826",
161
+ cancelledWithCharge: false,
162
+ priceCustomer: "23.00000",
163
+ priceSupplier: "23.00000",
164
+ phoneNumberSupplier: "676800672",
165
+ idAuthorizationGroup: 335,
166
+ supplierTaxiDescription: "Seat León | 4",
167
+ subscriberCode: "6300",
168
+ userNumber: "93271095",
169
+ idService: 1946195316,
170
+ shared: false,
171
+ timeZone: "Europe/Madrid",
172
+ notes: "2022-05-26 10:06:42 | 11 | Laura | 150 | Servicio solicitado Portal - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML like Gecko) Chrome/101.0.4951.64 Safari/537.36. WL 4069\n2022-05-26 10:06:42 | 33 | SYSTEM | 114 | El número de vuelo es 1.\n2022-05-26 10:06:42 | 33 | SYSTEM | 149 | Servicio enviado a MADRID_TAKSEE_TAXI (57)\n2022-05-26 10:06:51 | 44 | SYSTEM | 110 | Ha ocurrido un error enviando el email de confirmación al usuario\n2022-05-26 10:06:51 | 11 | SYSTEM | 130 | Confirmado por: MADRID_TAKSEE_TAXI (Taxi: 11). Num. servicio: 15826\n2022-05-26 10:08:15 | 33 | SYSTEM | 136 | Finalizado por SPARTAN. Importe 23 EUR establecido por SPARTAN (23.0 + 0.00 peaje)(40.4777 -3.7073)\n2022-05-26 10:08:16 | 33 | SYSTEM | 145 | Recibo enviado KO - 23€ + 0€ (peaje)",
173
+ tollCustomer: 0.00000,
174
+ tollSupplier: 0.00000,
175
+ paymentMethodCustomer: 4,
176
+ createdBy: 146280,
177
+ bookingBreakTitle1: "Evento",
178
+ bookingBreakTitle2: "Descripción actuación",
179
+ bookingBreakTitle3: "Centro de coste",
180
+ bookingBreakTitle4: "CIF visita comercial",
181
+ bookingBreakValue1: "Ev. Gen. - Acciones comerciales",
182
+ bookingBreakValue2: "sasasa",
183
+ bookingBreakValue3: "",
184
+ bookingBreakValue4: "02661135N",
185
+ authorizationBreakTitle1: "Num.Empleado",
186
+ authorizationBreakTitle2: "Centro Empleado",
187
+ authorizationBreakTitle3: "ID Empresa",
188
+ authorizationBreakTitle7: "Nombre de la empresa",
189
+ authorizationBreakValue1: "U0193271",
190
+ authorizationBreakValue2: "5570",
191
+ authorizationBreakValue3: "95",
192
+ authorizationBreakValue5: "SC",
193
+ authorizationBreakValue6: "U0193271095",
194
+ authorizationBreakValue7: "FACILITIES"
195
+ }
196
+ ],
197
+
198
+ columns: [
199
+ {
200
+ activeView: true,
201
+ sortable: true,
202
+ accessor: 'timeBookingStartRealTimestamp',
203
+ subAccessor: '',
204
+ title: 'Fecha',
205
+ viewIsFilter: true,
206
+ typeFilter: 'date',
207
+ subTypeFilter: false,
208
+ idInput: 'fecha',
209
+ nameInput: 'Fecha',
210
+ placeholder: 'Fecha'
211
+ },
212
+ {
213
+ activeView: true,
214
+ sortable: true,
215
+ accessor: 'passengerName',
216
+ subAccessor: '',
217
+ title: 'Pasajero',
218
+ viewIsFilter: true,
219
+ typeFilter: 'text',
220
+ subTypeFilter: false,
221
+ idInput: 'pasajero',
222
+ nameInput: 'Pasajero',
223
+ placeholder: 'Pasajero'
224
+ },
225
+ {
226
+ activeView: true,
227
+ sortable: true,
228
+ accessor: 'origin',
229
+ subAccessor: 'addressField',
230
+ title: 'Recogida',
231
+ viewIsFilter: true,
232
+ typeFilter: 'text',
233
+ subTypeFilter: false,
234
+ idInput: 'recogida',
235
+ nameInput: 'Recogida',
236
+ placeholder: 'Recogida'
237
+ },
238
+ {
239
+ activeView: true,
240
+ sortable: true,
241
+ accessor: 'destination',
242
+ subAccessor: 'addressField',
243
+ title: 'Destino',
244
+ viewIsFilter: true,
245
+ typeFilter: 'text',
246
+ subTypeFilter: false,
247
+ idInput: 'destino',
248
+ nameInput: 'Destino',
249
+ placeholder: 'Destino'
250
+ },
251
+ {
252
+ activeView: true,
253
+ sortable: true,
254
+ accessor: 'priceCustomer',
255
+ subAccessor: '',
256
+ title: 'Precio',
257
+ viewIsFilter: true,
258
+ typeFilter: 'text',
259
+ subTypeFilter: true,
260
+ idInput: 'precio',
261
+ nameInput: 'Precio',
262
+ placeholder: 'Precio'
263
+ },
264
+ {
265
+ activeView: false,
266
+ sortable: true,
267
+ accessor: 'id',
268
+ subAccessor: '',
269
+ title: 'ID',
270
+ viewIsFilter: true,
271
+ typeFilter: 'number',
272
+ subTypeFilter: false,
273
+ idInput: 'id',
274
+ nameInput: 'id',
275
+ placeholder: 'id'
276
+ },
277
+ {
278
+ activeView: false,
279
+ sortable: true,
280
+ accessor: 'idService',
281
+ subAccessor: '',
282
+ title: 'ID Reserva',
283
+ viewIsFilter: true,
284
+ typeFilter: 'number',
285
+ subTypeFilter: false,
286
+ idInput: 'IDReserva',
287
+ nameInput: 'ID Reserva',
288
+ placeholder: 'ID Reserva'
289
+ },
290
+ {
291
+ activeView: false,
292
+ sortable: true,
293
+ accessor: 'idSupplier',
294
+ subAccessor: '',
295
+ title: 'ID Proveedor',
296
+ viewIsFilter: true,
297
+ typeFilter: 'number',
298
+ subTypeFilter: false,
299
+ idInput: 'IDProveedor',
300
+ nameInput: 'ID Proveedor',
301
+ placeholder: 'ID Proveedor'
302
+ },
303
+ {
304
+ accessor: 'action',
305
+ subAccessor: 'action',
306
+ activeView: true,
307
+ idInput: 'action',
308
+ nameInput: 'Acciones',
309
+ placeholder: 'Acciones',
310
+ sortable: false,
311
+ subTypeFilter: false,
312
+ title: '',
313
+ typeFilter: 'text',
314
+ viewIsFilter: false,
315
+ },
316
+ ],
317
+
318
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imbric-theme",
3
- "version": "0.3.4",
3
+ "version": "0.3.8",
4
4
  "description": "Components library IMBRIC",
5
5
  "private": false,
6
6
  "main": "index.js",
@@ -1,13 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 25.4.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
- viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve">
5
- <g transform="translate(4 2)">
6
- <path d="M11.7,18.8H1.3c-1.7,0-3.1-1.4-3.1-3.1v-13c0-1.7,1.4-3.1,3.1-3.1h2.6c0.3,0,0.5,0.2,0.5,0.5S4.2,0.5,3.9,0.5H1.3
7
- c-1.2,0-2.1,0.9-2.1,2.1v13c0,1.2,0.9,2.1,2.1,2.1h10.4c1.2,0,2.1-0.9,2.1-2.1l0-10.2L8.8,0.4c-0.2-0.2-0.2-0.5,0-0.7
8
- s0.5-0.2,0.7,0l5.2,5.2c0.1,0.1,0.1,0.2,0.1,0.4l0,10.4C14.8,17.4,13.4,18.8,11.7,18.8z"/>
9
- <path d="M6.5,13.6c-0.1,0-0.3,0-0.3-0.1L2.2,9.6C2,9.4,2,9.1,2.2,8.9c0.2-0.2,0.5-0.2,0.7,0l3.6,3.5l3.6-3.5c0.2-0.2,0.5-0.2,0.7,0
10
- c0.2,0.2,0.2,0.5,0,0.7l-3.9,3.8C6.8,13.5,6.6,13.6,6.5,13.6z"/>
11
- <path d="M6.5,13.6c-0.3,0-0.5-0.2-0.5-0.5V-1.3c0-0.3,0.2-0.5,0.5-0.5S7-1.6,7-1.3v14.3C7,13.3,6.8,13.6,6.5,13.6z"/>
12
- </g>
13
- </svg>
@@ -1,33 +0,0 @@
1
- import React from 'react'
2
- import PropTypes from 'prop-types'
3
-
4
- import styles from './Link.module.css'
5
- import { options } from './constants'
6
- import withStyles from '../../hocs/withStyles'
7
-
8
- import Paragraph from '../Paragraph'
9
-
10
- export const Link = ({ children, size, color, getStyles }) => {
11
- return (
12
- <a className={getStyles('link', ['color'])}>
13
- <Paragraph size={size} color={color} weight="semibold" isInline>
14
- {children}
15
- </Paragraph>
16
- </a>
17
- )
18
- }
19
-
20
- Link.propTypes = {
21
- children: PropTypes.node.isRequired,
22
- getStyles: PropTypes.func.isRequired,
23
- color: PropTypes.oneOf(options.colors),
24
- size: PropTypes.oneOf(options.sizes),
25
- }
26
-
27
- Link.defaultProps = {
28
- getStyles: () => {},
29
- color: 'primary',
30
- size: 'md',
31
- }
32
-
33
- export default withStyles(styles)(Link)
@@ -1,3 +0,0 @@
1
- export { default, Link } from './Link'
2
- export { options } from './constants'
3
- export { default as styles } from './Link.module.css'