@design-factory/design-factory 18.0.1 → 18.0.2
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/package.json
CHANGED
|
@@ -685,33 +685,33 @@ const fontAwesomeMapping = {
|
|
|
685
685
|
'wine-glass-alt': 'wine-glass-empty'
|
|
686
686
|
};
|
|
687
687
|
const dfIconsMapping = {
|
|
688
|
-
'
|
|
689
|
-
'
|
|
690
|
-
'
|
|
691
|
-
'
|
|
692
|
-
'
|
|
693
|
-
'
|
|
694
|
-
'
|
|
695
|
-
'
|
|
696
|
-
'
|
|
697
|
-
'
|
|
698
|
-
'
|
|
699
|
-
'
|
|
688
|
+
'amadeus-facebook': 'df-facebook',
|
|
689
|
+
'amadeus-linkedin': 'df-linkedin',
|
|
690
|
+
'amadeus-twitter': 'df-twitter',
|
|
691
|
+
'amadeus-youtube': 'df-youtube',
|
|
692
|
+
'df-icon-amadeus-insurance': 'df-insurance',
|
|
693
|
+
'amadeus-corporate': 'df-corporate',
|
|
694
|
+
'amadeus-download': 'df-download',
|
|
695
|
+
'amadeus-filter': 'df-filter',
|
|
696
|
+
'amadeus-hotel': 'df-hotel',
|
|
697
|
+
'amadeus-mob': 'df-amadeus-mob',
|
|
698
|
+
'amadeus-mobility': 'df-mobility',
|
|
699
|
+
'amadeus-railways': 'df-railways'
|
|
700
700
|
};
|
|
701
701
|
const updates = (mapping) => Object.keys(mapping).map((key) => ({
|
|
702
702
|
key,
|
|
703
|
-
regex: new RegExp(`(
|
|
703
|
+
regex: new RegExp(`(.*)icon-${key}(.*)`, 'g'),
|
|
704
704
|
replacement: mapping[key]
|
|
705
705
|
}));
|
|
706
706
|
function replaceHtmlContent(content) {
|
|
707
707
|
for (const update of updates(dfIconsMapping)) {
|
|
708
|
-
content = content.replace(update.regex, (_match, g1, g2
|
|
708
|
+
content = content.replace(update.regex, (_match, g1, g2) => `${g1}icon-${dfIconsMapping[update.key]}${g2}`);
|
|
709
709
|
}
|
|
710
710
|
for (const update of updates(fontAwesomeMapping)) {
|
|
711
|
-
content = content.replace(update.regex, (_match, g1, g2
|
|
711
|
+
content = content.replace(update.regex, (_match, g1, g2) => `${g1}icon-${fontAwesomeMapping[update.key]}${g2}`);
|
|
712
712
|
}
|
|
713
713
|
// update the icon- to fa- for the FW icons
|
|
714
|
-
content = content.replace(new RegExp(`(
|
|
714
|
+
content = content.replace(new RegExp(`(.*?[^df-])icon-(?!df-|amadeus-)(.*?)`, 'g'), (_match, g1, g2) => `${g1}fa-${g2}`);
|
|
715
715
|
// update df-icon-solid for the FW icons
|
|
716
716
|
content = content.replace(new RegExp(`(.*)(df-icon-solid)(.*fa-)`, 'g'), (_match, g1, _, g3) => `${g1}fa-solid${g3}`);
|
|
717
717
|
content = content.replace(new RegExp(`(.*fa-.*)(df-icon-solid)(.*)`, 'g'), (_match, g1, _, g3) => `${g1}fa-solid${g3}`);
|