@bbl-digital/snorre 2.4.18 → 2.4.19

Sign up to get free protection for your applications and to get access to all the features.
package/dist/bundle.js CHANGED
@@ -25005,7 +25005,6 @@
25005
25005
  active,
25006
25006
  payload,
25007
25007
  label,
25008
- allowDecimals,
25009
25008
  ...rest
25010
25009
  }) => {
25011
25010
  const {
@@ -25060,7 +25059,7 @@
25060
25059
  children: [getTooltipItemName(item), ":"]
25061
25060
  })]
25062
25061
  }), /*#__PURE__*/jsxRuntime.jsx(Text, {
25063
- children: allowDecimals ? formatter ? formatter(getFormattedPrice(item.value, 2), getTooltipItemName(item), payload[index], index) : getFormattedPrice(item.value, 2) : Math.round(item.value)
25062
+ children: formatter ? formatter(getFormattedPrice(item.value, 2), getTooltipItemName(item), payload[index], index) : getFormattedPrice(item.value, 2)
25064
25063
  })]
25065
25064
  }, item.name));
25066
25065
  };
@@ -25156,12 +25155,6 @@
25156
25155
  allowDecimals = true,
25157
25156
  ...rest
25158
25157
  }) => {
25159
- const getTickFormatter = () => {
25160
- if (defaultFormatter && !tickFormatter) return undefined;
25161
- if (tickFormatter) return tickFormatter;
25162
- return formatAxisPrice;
25163
- };
25164
-
25165
25158
  return /*#__PURE__*/jsxRuntime.jsx(BarChartContainer, {
25166
25159
  width: width && width,
25167
25160
  height: height && height,
@@ -25188,7 +25181,7 @@
25188
25181
  tickMargin: 5,
25189
25182
  minTickGap: minTickGapX,
25190
25183
  allowDecimals: allowDecimals,
25191
- tickFormatter: getTickFormatter()
25184
+ tickFormatter: !defaultFormatter || !tickFormatter ? formatAxisPrice : tickFormatter
25192
25185
  }), /*#__PURE__*/jsxRuntime.jsx(recharts.YAxis, {
25193
25186
  dataKey: yAxisDataKey && yAxisDataKey,
25194
25187
  axisLine: yAxisLine && yAxisLine,
@@ -25196,7 +25189,7 @@
25196
25189
  type: layout === 'vertical' ? 'category' : 'number',
25197
25190
  minTickGap: minTickGapY,
25198
25191
  allowDecimals: allowDecimals,
25199
- tickFormatter: getTickFormatter()
25192
+ tickFormatter: !defaultFormatter || !tickFormatter ? formatAxisPrice : tickFormatter
25200
25193
  }), /*#__PURE__*/jsxRuntime.jsx(recharts.Tooltip, {
25201
25194
  content: /*#__PURE__*/jsxRuntime.jsx(CustomTooltip, {})
25202
25195
  }), /*#__PURE__*/jsxRuntime.jsx(recharts.Legend, {
@@ -31291,7 +31284,8 @@
31291
31284
  created,
31292
31285
  updated,
31293
31286
  hasAttachment,
31294
- hasEvent
31287
+ hasEvent,
31288
+ updatedBy
31295
31289
  }) => {
31296
31290
  return /*#__PURE__*/jsxRuntime.jsxs(NoticeMetaWrapper, {
31297
31291
  children: [/*#__PURE__*/jsxRuntime.jsxs(Group, {
@@ -31310,7 +31304,8 @@
31310
31304
  semibold: true,
31311
31305
  size: "14px",
31312
31306
  primary: true,
31313
- children: [created && getFormattedDate(created, ddmmyyyy), updated && updated !== created && ` (Oppdatert: ${getFormattedDate(updated, ddmmyyyy)})`]
31307
+ children: [created && getFormattedDate(created, ddmmyyyy), updated && updated !== created && ` (Oppdatert: ${getFormattedDate(updated, ddmmyyyy)})${updatedBy ? ` av ${updatedBy}` : ''} : ''
31308
+ } `]
31314
31309
  })]
31315
31310
  }), (hasAttachment || hasEvent) && /*#__PURE__*/jsxRuntime.jsxs(Group, {
31316
31311
  children: [hasAttachment && /*#__PURE__*/jsxRuntime.jsx(Div$1, {
@@ -10,7 +10,8 @@ const NoticeMetaInfo = ({
10
10
  created,
11
11
  updated,
12
12
  hasAttachment,
13
- hasEvent
13
+ hasEvent,
14
+ updatedBy
14
15
  }) => {
15
16
  return /*#__PURE__*/_jsxs(NoticeMetaWrapper, {
16
17
  children: [/*#__PURE__*/_jsxs(Group, {
@@ -29,7 +30,8 @@ const NoticeMetaInfo = ({
29
30
  semibold: true,
30
31
  size: "14px",
31
32
  primary: true,
32
- children: [created && getFormattedDate(created, ddmmyyyy), updated && updated !== created && ` (Oppdatert: ${getFormattedDate(updated, ddmmyyyy)})`]
33
+ children: [created && getFormattedDate(created, ddmmyyyy), updated && updated !== created && ` (Oppdatert: ${getFormattedDate(updated, ddmmyyyy)})${updatedBy ? ` av ${updatedBy}` : ''} : ''
34
+ } `]
33
35
  })]
34
36
  }), (hasAttachment || hasEvent) && /*#__PURE__*/_jsxs(Group, {
35
37
  children: [hasAttachment && /*#__PURE__*/_jsx(Div, {
@@ -30,12 +30,6 @@ const SimpleBarChart = ({
30
30
  allowDecimals = true,
31
31
  ...rest
32
32
  }) => {
33
- const getTickFormatter = () => {
34
- if (defaultFormatter && !tickFormatter) return undefined;
35
- if (tickFormatter) return tickFormatter;
36
- return formatAxisPrice;
37
- };
38
-
39
33
  return /*#__PURE__*/_jsx(BarChartContainer, {
40
34
  width: width && width,
41
35
  height: height && height,
@@ -62,7 +56,7 @@ const SimpleBarChart = ({
62
56
  tickMargin: 5,
63
57
  minTickGap: minTickGapX,
64
58
  allowDecimals: allowDecimals,
65
- tickFormatter: getTickFormatter()
59
+ tickFormatter: !defaultFormatter || !tickFormatter ? formatAxisPrice : tickFormatter
66
60
  }), /*#__PURE__*/_jsx(YAxis, {
67
61
  dataKey: yAxisDataKey && yAxisDataKey,
68
62
  axisLine: yAxisLine && yAxisLine,
@@ -70,7 +64,7 @@ const SimpleBarChart = ({
70
64
  type: layout === 'vertical' ? 'category' : 'number',
71
65
  minTickGap: minTickGapY,
72
66
  allowDecimals: allowDecimals,
73
- tickFormatter: getTickFormatter()
67
+ tickFormatter: !defaultFormatter || !tickFormatter ? formatAxisPrice : tickFormatter
74
68
  }), /*#__PURE__*/_jsx(Tooltip, {
75
69
  content: /*#__PURE__*/_jsx(CustomTooltip, {})
76
70
  }), /*#__PURE__*/_jsx(Legend, {
@@ -12,7 +12,6 @@ const CustomTooltip = ({
12
12
  active,
13
13
  payload,
14
14
  label,
15
- allowDecimals,
16
15
  ...rest
17
16
  }) => {
18
17
  const {
@@ -67,7 +66,7 @@ const CustomTooltip = ({
67
66
  children: [getTooltipItemName(item), ":"]
68
67
  })]
69
68
  }), /*#__PURE__*/_jsx(Text, {
70
- children: allowDecimals ? formatter ? formatter(getFormattedPrice(item.value, 2), getTooltipItemName(item), payload[index], index) : getFormattedPrice(item.value, 2) : Math.round(item.value)
69
+ children: formatter ? formatter(getFormattedPrice(item.value, 2), getTooltipItemName(item), payload[index], index) : getFormattedPrice(item.value, 2)
71
70
  })]
72
71
  }, item.name));
73
72
  };
@@ -5,6 +5,7 @@ interface IProps {
5
5
  updated: Date;
6
6
  hasAttachment?: boolean;
7
7
  hasEvent?: boolean;
8
+ updatedBy?: string;
8
9
  }
9
10
  declare const NoticeMetaInfo: React.FC<IProps>;
10
11
  export default NoticeMetaInfo;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/packages/core/NoticeCard/privateComponents/NoticeMetaInfo/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAYzB,UAAU,MAAM;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,IAAI,CAAA;IACb,OAAO,EAAE,IAAI,CAAA;IACb,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAwCpC,CAAA;AAED,eAAe,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/packages/core/NoticeCard/privateComponents/NoticeMetaInfo/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAYzB,UAAU,MAAM;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,IAAI,CAAA;IACb,OAAO,EAAE,IAAI,CAAA;IACb,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CA4CpC,CAAA;AAED,eAAe,cAAc,CAAA"}
@@ -10,7 +10,8 @@ const NoticeMetaInfo = ({
10
10
  created,
11
11
  updated,
12
12
  hasAttachment,
13
- hasEvent
13
+ hasEvent,
14
+ updatedBy
14
15
  }) => {
15
16
  return /*#__PURE__*/_jsxs(NoticeMetaWrapper, {
16
17
  children: [/*#__PURE__*/_jsxs(Group, {
@@ -29,7 +30,8 @@ const NoticeMetaInfo = ({
29
30
  semibold: true,
30
31
  size: "14px",
31
32
  primary: true,
32
- children: [created && getFormattedDate(created, ddmmyyyy), updated && updated !== created && ` (Oppdatert: ${getFormattedDate(updated, ddmmyyyy)})`]
33
+ children: [created && getFormattedDate(created, ddmmyyyy), updated && updated !== created && ` (Oppdatert: ${getFormattedDate(updated, ddmmyyyy)})${updatedBy ? ` av ${updatedBy}` : ''} : ''
34
+ } `]
33
35
  })]
34
36
  }), (hasAttachment || hasEvent) && /*#__PURE__*/_jsxs(Group, {
35
37
  children: [hasAttachment && /*#__PURE__*/_jsx(Div, {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/SimpleBarChart/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EACL,GAAG,EAQH,MAAM,EACN,qBAAqB,EACtB,MAAM,UAAU,CAAA;AAMjB,UAAU,MAAO,SAAQ,OAAO,CAAC,GAAG,CAAC;IACnC,wFAAwF;IACxF,IAAI,EAAE,GAAG,EAAE,CAAA;IACX,wMAAwM;IACxM,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IACvD,iHAAiH;IACjH,YAAY,EAAE,MAAM,CAAA;IACpB,gHAAgH;IAChH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,+BAA+B;IAC/B,MAAM,CAAC,EAA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IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,0DAA0D;IAC1D,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,+BAA+B;IAC/B,aAAa,CAAC,EAAE,qBAAqB,CAAA;CACtC;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAyFpC,CAAA;AACD,eAAe,cAAc,CAAA"}
@@ -30,12 +30,6 @@ const SimpleBarChart = ({
30
30
  allowDecimals = true,
31
31
  ...rest
32
32
  }) => {
33
- const getTickFormatter = () => {
34
- if (defaultFormatter && !tickFormatter) return undefined;
35
- if (tickFormatter) return tickFormatter;
36
- return formatAxisPrice;
37
- };
38
-
39
33
  return /*#__PURE__*/_jsx(BarChartContainer, {
40
34
  width: width && width,
41
35
  height: height && height,
@@ -62,7 +56,7 @@ const SimpleBarChart = ({
62
56
  tickMargin: 5,
63
57
  minTickGap: minTickGapX,
64
58
  allowDecimals: allowDecimals,
65
- tickFormatter: getTickFormatter()
59
+ tickFormatter: !defaultFormatter || !tickFormatter ? formatAxisPrice : tickFormatter
66
60
  }), /*#__PURE__*/_jsx(YAxis, {
67
61
  dataKey: yAxisDataKey && yAxisDataKey,
68
62
  axisLine: yAxisLine && yAxisLine,
@@ -70,7 +64,7 @@ const SimpleBarChart = ({
70
64
  type: layout === 'vertical' ? 'category' : 'number',
71
65
  minTickGap: minTickGapY,
72
66
  allowDecimals: allowDecimals,
73
- tickFormatter: getTickFormatter()
67
+ tickFormatter: !defaultFormatter || !tickFormatter ? formatAxisPrice : tickFormatter
74
68
  }), /*#__PURE__*/_jsx(Tooltip, {
75
69
  content: /*#__PURE__*/_jsx(CustomTooltip, {})
76
70
  }), /*#__PURE__*/_jsx(Legend, {
@@ -3,7 +3,6 @@ import { TooltipProps } from 'recharts';
3
3
  interface IProps extends TooltipProps {
4
4
  lineConfig?: any[];
5
5
  barConfig?: any[];
6
- allowDecimals?: boolean;
7
6
  }
8
7
  declare const CustomTooltip: React.FC<IProps>;
9
8
  export default CustomTooltip;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/packages/shared/recharts/CustomTooltip/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAIvC,UAAU,MAAO,SAAQ,YAAY;IACnC,UAAU,CAAC,EAAE,GAAG,EAAE,CAAA;IAClB,SAAS,CAAC,EAAE,GAAG,EAAE,CAAA;IACjB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CA4FnC,CAAA;AAED,eAAe,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/packages/shared/recharts/CustomTooltip/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAIvC,UAAU,MAAO,SAAQ,YAAY;IACnC,UAAU,CAAC,EAAE,GAAG,EAAE,CAAA;IAClB,SAAS,CAAC,EAAE,GAAG,EAAE,CAAA;CAClB;AACD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAyFnC,CAAA;AAED,eAAe,aAAa,CAAA"}
@@ -12,7 +12,6 @@ const CustomTooltip = ({
12
12
  active,
13
13
  payload,
14
14
  label,
15
- allowDecimals,
16
15
  ...rest
17
16
  }) => {
18
17
  const {
@@ -67,7 +66,7 @@ const CustomTooltip = ({
67
66
  children: [getTooltipItemName(item), ":"]
68
67
  })]
69
68
  }), /*#__PURE__*/_jsx(Text, {
70
- children: allowDecimals ? formatter ? formatter(getFormattedPrice(item.value, 2), getTooltipItemName(item), payload[index], index) : getFormattedPrice(item.value, 2) : Math.round(item.value)
69
+ children: formatter ? formatter(getFormattedPrice(item.value, 2), getTooltipItemName(item), payload[index], index) : getFormattedPrice(item.value, 2)
71
70
  })]
72
71
  }, item.name));
73
72
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbl-digital/snorre",
3
- "version": "2.4.18",
3
+ "version": "2.4.19",
4
4
  "description": "Design library for BBL Digital",
5
5
  "license": "MIT",
6
6
  "main": "./lib/index.js",