arengibook 2.0.5-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 +43 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -44029,6 +44029,28 @@ var Table = function Table(_ref) {
|
|
|
44029
44029
|
}, text);
|
|
44030
44030
|
};
|
|
44031
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
|
+
}, []);
|
|
44032
44054
|
var selectMultipleTemplate = useCallback(function (col) {
|
|
44033
44055
|
return function (rowData) {
|
|
44034
44056
|
var vals = rowData[col.field];
|
|
@@ -44139,11 +44161,13 @@ var Table = function Table(_ref) {
|
|
|
44139
44161
|
return selectMultipleTemplate(col);
|
|
44140
44162
|
case 'colorText':
|
|
44141
44163
|
return colorTextTemplate(col);
|
|
44164
|
+
case 'picto':
|
|
44165
|
+
return pictoTemplate(col);
|
|
44142
44166
|
case 'text':
|
|
44143
44167
|
default:
|
|
44144
44168
|
return col.textTemplate ? textTemplate(col) : undefined;
|
|
44145
44169
|
}
|
|
44146
|
-
}, [linkTemplate, dateTemplate, selectTemplate, selectMultipleTemplate, colorTextTemplate, textTemplate]);
|
|
44170
|
+
}, [linkTemplate, dateTemplate, selectTemplate, selectMultipleTemplate, colorTextTemplate, pictoTemplate, textTemplate]);
|
|
44147
44171
|
var getSortField = useCallback(function (col) {
|
|
44148
44172
|
return col.field;
|
|
44149
44173
|
}, []);
|
|
@@ -44308,6 +44332,8 @@ var dataTyped = [{
|
|
|
44308
44332
|
statut: 'actif',
|
|
44309
44333
|
categorie: 'client',
|
|
44310
44334
|
categorieColor: '#2980B9',
|
|
44335
|
+
niveau: 'Élevé',
|
|
44336
|
+
niveauPicto: '/bundles/arengimain/img/picto/eleve.png',
|
|
44311
44337
|
competences: ['react', 'symfony']
|
|
44312
44338
|
}, {
|
|
44313
44339
|
id: 2,
|
|
@@ -44317,6 +44343,8 @@ var dataTyped = [{
|
|
|
44317
44343
|
statut: 'inactif',
|
|
44318
44344
|
categorie: 'prospect',
|
|
44319
44345
|
categorieColor: '#E67E22',
|
|
44346
|
+
niveau: 'Moyen',
|
|
44347
|
+
niveauPicto: '/bundles/arengimain/img/picto/moyen.png',
|
|
44320
44348
|
competences: ['sql']
|
|
44321
44349
|
}, {
|
|
44322
44350
|
id: 3,
|
|
@@ -44326,6 +44354,8 @@ var dataTyped = [{
|
|
|
44326
44354
|
statut: 'actif',
|
|
44327
44355
|
categorie: 'partenaire',
|
|
44328
44356
|
categorieColor: '#8E44AD',
|
|
44357
|
+
niveau: 'Faible',
|
|
44358
|
+
niveauPicto: '/bundles/arengimain/img/picto/faible.png',
|
|
44329
44359
|
competences: ['design', 'react']
|
|
44330
44360
|
}, {
|
|
44331
44361
|
id: 4,
|
|
@@ -44335,6 +44365,8 @@ var dataTyped = [{
|
|
|
44335
44365
|
statut: 'archive',
|
|
44336
44366
|
categorie: 'client',
|
|
44337
44367
|
categorieColor: '#2980B9',
|
|
44368
|
+
niveau: 'Élevé',
|
|
44369
|
+
niveauPicto: '/bundles/arengimain/img/picto/eleve.png',
|
|
44338
44370
|
competences: ['devops', 'sql', 'symfony']
|
|
44339
44371
|
}, {
|
|
44340
44372
|
id: 5,
|
|
@@ -44344,6 +44376,8 @@ var dataTyped = [{
|
|
|
44344
44376
|
statut: 'actif',
|
|
44345
44377
|
categorie: 'prospect',
|
|
44346
44378
|
categorieColor: '#E67E22',
|
|
44379
|
+
niveau: null,
|
|
44380
|
+
niveauPicto: null,
|
|
44347
44381
|
competences: []
|
|
44348
44382
|
}, {
|
|
44349
44383
|
id: 6,
|
|
@@ -44353,6 +44387,8 @@ var dataTyped = [{
|
|
|
44353
44387
|
statut: 'inactif',
|
|
44354
44388
|
categorie: 'client',
|
|
44355
44389
|
categorieColor: '#2980B9',
|
|
44390
|
+
niveau: 'Moyen',
|
|
44391
|
+
niveauPicto: '/bundles/arengimain/img/picto/moyen.png',
|
|
44356
44392
|
competences: ['react', 'devops', 'design']
|
|
44357
44393
|
}, {
|
|
44358
44394
|
id: 7,
|
|
@@ -44362,6 +44398,8 @@ var dataTyped = [{
|
|
|
44362
44398
|
statut: 'actif',
|
|
44363
44399
|
categorie: 'partenaire',
|
|
44364
44400
|
categorieColor: '#8E44AD',
|
|
44401
|
+
niveau: 'Faible',
|
|
44402
|
+
niveauPicto: '/bundles/arengimain/img/picto/faible.png',
|
|
44365
44403
|
competences: ['symfony', 'sql']
|
|
44366
44404
|
}];
|
|
44367
44405
|
var columnsTyped = [{
|
|
@@ -44389,6 +44427,10 @@ var columnsTyped = [{
|
|
|
44389
44427
|
field: 'categorie',
|
|
44390
44428
|
header: 'Catégorie',
|
|
44391
44429
|
type: 'colorText'
|
|
44430
|
+
}, {
|
|
44431
|
+
field: 'niveau',
|
|
44432
|
+
header: 'Niveau',
|
|
44433
|
+
type: 'picto'
|
|
44392
44434
|
}, {
|
|
44393
44435
|
field: 'competences',
|
|
44394
44436
|
header: 'Compétences',
|