techsbcn-storybook 0.16.0 → 0.17.0

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.
@@ -40,6 +40,9 @@ interface ColumnProps {
40
40
  };
41
41
  isCheck?: boolean;
42
42
  isPrice?: boolean;
43
+ priceFormat?: {
44
+ currency?: string;
45
+ };
43
46
  isImage?: {
44
47
  isUrl?: boolean;
45
48
  isGuid?: {
@@ -42,6 +42,9 @@ interface ColumnProps {
42
42
  isCheck?: boolean;
43
43
  noSort?: boolean;
44
44
  isPrice?: boolean;
45
+ priceFormat?: {
46
+ currency?: string;
47
+ };
45
48
  isImage?: {
46
49
  isUrl?: boolean;
47
50
  isGuid?: {
@@ -562,7 +562,7 @@ var TableComponent = function TableComponent(props) {
562
562
  }
563
563
 
564
564
  if (column.isDate && value) return new Date(value).toLocaleDateString('es-ES');
565
- if (column.isPrice && value) return Number(value).toFixed(2).replace('.', ',') + " " + props.values.SYMBOL_EURO;
565
+ if (column.isPrice && value) return Number(value).toFixed(2).replace('.', ',').toLocaleString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1.') + " " + props.values.SYMBOL_EURO;
566
566
 
567
567
  if (column.isImage && value) {
568
568
  if (column.isImage.isUrl) {
@@ -958,7 +958,7 @@ var SimpleTableComponent = function SimpleTableComponent(props) {
958
958
  }
959
959
 
960
960
  if (column.isDate && value) return new Date(value).toLocaleDateString('es-ES');
961
- if (column.isPrice && value) return Number(value).toFixed(2).replace('.', ',') + " " + props.values.SYMBOL_EURO;
961
+ if (column.isPrice && value) return Number(value).toFixed(2).replace('.', ',').toLocaleString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1.') + " " + props.values.SYMBOL_EURO;
962
962
 
963
963
  if (column.isImage && value) {
964
964
  if (column.isImage.isUrl) {