arengibook 2.0.4-table → 2.0.6-table
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/dist/index.js +52 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -44018,6 +44018,7 @@ var Table = function Table(_ref) {
|
|
|
44018
44018
|
return function (rowData) {
|
|
44019
44019
|
var text = rowData[col.field];
|
|
44020
44020
|
var color = rowData[col.field + 'Color'];
|
|
44021
|
+
console.log(rowData);
|
|
44021
44022
|
if (!color) return text !== null && text !== void 0 ? text : '';
|
|
44022
44023
|
return /*#__PURE__*/React__default.createElement("span", {
|
|
44023
44024
|
className: "tab_label",
|
|
@@ -44028,6 +44029,28 @@ var Table = function Table(_ref) {
|
|
|
44028
44029
|
}, text);
|
|
44029
44030
|
};
|
|
44030
44031
|
}, []);
|
|
44032
|
+
var pictoTemplate = useCallback(function (col) {
|
|
44033
|
+
return function (rowData) {
|
|
44034
|
+
console.log(col.field);
|
|
44035
|
+
var text = rowData[col.field];
|
|
44036
|
+
var picto = rowData[col.field + 'Picto'];
|
|
44037
|
+
if (!picto) return text !== null && text !== void 0 ? text : '';
|
|
44038
|
+
return /*#__PURE__*/React__default.createElement("span", {
|
|
44039
|
+
style: {
|
|
44040
|
+
display: 'flex',
|
|
44041
|
+
alignItems: 'center',
|
|
44042
|
+
gap: '0.35rem'
|
|
44043
|
+
}
|
|
44044
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
44045
|
+
src: picto,
|
|
44046
|
+
alt: text !== null && text !== void 0 ? text : '',
|
|
44047
|
+
style: {
|
|
44048
|
+
height: '1.25rem',
|
|
44049
|
+
width: 'auto'
|
|
44050
|
+
}
|
|
44051
|
+
}), text);
|
|
44052
|
+
};
|
|
44053
|
+
}, []);
|
|
44031
44054
|
var selectMultipleTemplate = useCallback(function (col) {
|
|
44032
44055
|
return function (rowData) {
|
|
44033
44056
|
var vals = rowData[col.field];
|
|
@@ -44138,11 +44161,13 @@ var Table = function Table(_ref) {
|
|
|
44138
44161
|
return selectMultipleTemplate(col);
|
|
44139
44162
|
case 'colorText':
|
|
44140
44163
|
return colorTextTemplate(col);
|
|
44164
|
+
case 'picto':
|
|
44165
|
+
return pictoTemplate(col);
|
|
44141
44166
|
case 'text':
|
|
44142
44167
|
default:
|
|
44143
44168
|
return col.textTemplate ? textTemplate(col) : undefined;
|
|
44144
44169
|
}
|
|
44145
|
-
}, [linkTemplate, dateTemplate, selectTemplate, selectMultipleTemplate, colorTextTemplate, textTemplate]);
|
|
44170
|
+
}, [linkTemplate, dateTemplate, selectTemplate, selectMultipleTemplate, colorTextTemplate, pictoTemplate, textTemplate]);
|
|
44146
44171
|
var getSortField = useCallback(function (col) {
|
|
44147
44172
|
return col.field;
|
|
44148
44173
|
}, []);
|
|
@@ -44278,16 +44303,6 @@ var statutOptions = [{
|
|
|
44278
44303
|
label: 'Archivé',
|
|
44279
44304
|
color: '#95A5A6'
|
|
44280
44305
|
}];
|
|
44281
|
-
var categorieOptions = [{
|
|
44282
|
-
value: 'client',
|
|
44283
|
-
label: 'Client'
|
|
44284
|
-
}, {
|
|
44285
|
-
value: 'prospect',
|
|
44286
|
-
label: 'Prospect'
|
|
44287
|
-
}, {
|
|
44288
|
-
value: 'partenaire',
|
|
44289
|
-
label: 'Partenaire'
|
|
44290
|
-
}];
|
|
44291
44306
|
var competencesOptions = [{
|
|
44292
44307
|
value: 'react',
|
|
44293
44308
|
label: 'React',
|
|
@@ -44316,6 +44331,9 @@ var dataTyped = [{
|
|
|
44316
44331
|
dateNaissance: '1990-07-22',
|
|
44317
44332
|
statut: 'actif',
|
|
44318
44333
|
categorie: 'client',
|
|
44334
|
+
categorieColor: '#2980B9',
|
|
44335
|
+
niveau: 'Élevé',
|
|
44336
|
+
niveauPicto: '/bundles/arengimain/img/picto/eleve.png',
|
|
44319
44337
|
competences: ['react', 'symfony']
|
|
44320
44338
|
}, {
|
|
44321
44339
|
id: 2,
|
|
@@ -44324,6 +44342,9 @@ var dataTyped = [{
|
|
|
44324
44342
|
dateNaissance: '1985-11-03',
|
|
44325
44343
|
statut: 'inactif',
|
|
44326
44344
|
categorie: 'prospect',
|
|
44345
|
+
categorieColor: '#E67E22',
|
|
44346
|
+
niveau: 'Moyen',
|
|
44347
|
+
niveauPicto: '/bundles/arengimain/img/picto/moyen.png',
|
|
44327
44348
|
competences: ['sql']
|
|
44328
44349
|
}, {
|
|
44329
44350
|
id: 3,
|
|
@@ -44332,6 +44353,9 @@ var dataTyped = [{
|
|
|
44332
44353
|
dateNaissance: '1995-02-14',
|
|
44333
44354
|
statut: 'actif',
|
|
44334
44355
|
categorie: 'partenaire',
|
|
44356
|
+
categorieColor: '#8E44AD',
|
|
44357
|
+
niveau: 'Faible',
|
|
44358
|
+
niveauPicto: '/bundles/arengimain/img/picto/faible.png',
|
|
44335
44359
|
competences: ['design', 'react']
|
|
44336
44360
|
}, {
|
|
44337
44361
|
id: 4,
|
|
@@ -44340,6 +44364,9 @@ var dataTyped = [{
|
|
|
44340
44364
|
dateNaissance: '1978-06-01',
|
|
44341
44365
|
statut: 'archive',
|
|
44342
44366
|
categorie: 'client',
|
|
44367
|
+
categorieColor: '#2980B9',
|
|
44368
|
+
niveau: 'Élevé',
|
|
44369
|
+
niveauPicto: '/bundles/arengimain/img/picto/eleve.png',
|
|
44343
44370
|
competences: ['devops', 'sql', 'symfony']
|
|
44344
44371
|
}, {
|
|
44345
44372
|
id: 5,
|
|
@@ -44348,6 +44375,9 @@ var dataTyped = [{
|
|
|
44348
44375
|
dateNaissance: '2001-12-09',
|
|
44349
44376
|
statut: 'actif',
|
|
44350
44377
|
categorie: 'prospect',
|
|
44378
|
+
categorieColor: '#E67E22',
|
|
44379
|
+
niveau: null,
|
|
44380
|
+
niveauPicto: null,
|
|
44351
44381
|
competences: []
|
|
44352
44382
|
}, {
|
|
44353
44383
|
id: 6,
|
|
@@ -44356,6 +44386,9 @@ var dataTyped = [{
|
|
|
44356
44386
|
dateNaissance: '1969-08-27',
|
|
44357
44387
|
statut: 'inactif',
|
|
44358
44388
|
categorie: 'client',
|
|
44389
|
+
categorieColor: '#2980B9',
|
|
44390
|
+
niveau: 'Moyen',
|
|
44391
|
+
niveauPicto: '/bundles/arengimain/img/picto/moyen.png',
|
|
44359
44392
|
competences: ['react', 'devops', 'design']
|
|
44360
44393
|
}, {
|
|
44361
44394
|
id: 7,
|
|
@@ -44364,6 +44397,9 @@ var dataTyped = [{
|
|
|
44364
44397
|
dateNaissance: '1993-03-18',
|
|
44365
44398
|
statut: 'actif',
|
|
44366
44399
|
categorie: 'partenaire',
|
|
44400
|
+
categorieColor: '#8E44AD',
|
|
44401
|
+
niveau: 'Faible',
|
|
44402
|
+
niveauPicto: '/bundles/arengimain/img/picto/faible.png',
|
|
44367
44403
|
competences: ['symfony', 'sql']
|
|
44368
44404
|
}];
|
|
44369
44405
|
var columnsTyped = [{
|
|
@@ -44390,8 +44426,11 @@ var columnsTyped = [{
|
|
|
44390
44426
|
}, {
|
|
44391
44427
|
field: 'categorie',
|
|
44392
44428
|
header: 'Catégorie',
|
|
44393
|
-
type: '
|
|
44394
|
-
|
|
44429
|
+
type: 'colorText'
|
|
44430
|
+
}, {
|
|
44431
|
+
field: 'niveau',
|
|
44432
|
+
header: 'Niveau',
|
|
44433
|
+
type: 'picto'
|
|
44395
44434
|
}, {
|
|
44396
44435
|
field: 'competences',
|
|
44397
44436
|
header: 'Compétences',
|