@synerise/ds-estimation 1.1.2 → 1.2.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,20 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.2.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-estimation@1.1.3...@synerise/ds-estimation@1.2.0) (2026-01-19)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **estimation:** type fix ([0b52d46](https://github.com/Synerise/synerise-design/commit/0b52d46842b9fb5ddd9bf13fa0b5baef6ef88ab0))
11
+
12
+ ### Features
13
+
14
+ - **core:** refresh relative date ([23d74a6](https://github.com/Synerise/synerise-design/commit/23d74a6855e082a6895d8799b61fa8b78fb27ae1))
15
+
16
+ ## [1.1.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-estimation@1.1.2...@synerise/ds-estimation@1.1.3) (2026-01-15)
17
+
18
+ **Note:** Version bump only for package @synerise/ds-estimation
19
+
6
20
  ## [1.1.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-estimation@1.1.1...@synerise/ds-estimation@1.1.2) (2026-01-12)
7
21
 
8
22
  **Note:** Version bump only for package @synerise/ds-estimation
@@ -2,10 +2,10 @@ var _excluded = ["value", "tooltip", "tooltipConfig", "label", "total", "footerB
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
3
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React from 'react';
5
- import { FormattedRelativeDateTimeTo } from '@synerise/ds-core';
6
5
  import { FormFieldLabel } from '@synerise/ds-form-field';
7
6
  import InlineAlert from '@synerise/ds-inline-alert';
8
7
  import * as S from './Estimation.styles';
8
+ import { EstimationCalculatedDate } from './components/EstimationCalculated';
9
9
  import { EstimationProgressBar } from './components/EstimationProgressBar';
10
10
  import { EstimationProgressBarSkeleton } from './components/EstimationProgressBarSkeleton';
11
11
  import { useDefaultTexts } from './hooks/useDefaultTexts';
@@ -23,15 +23,13 @@ var Estimation = function Estimation(_ref) {
23
23
  calculatedDate = _ref.calculatedDate,
24
24
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
25
25
  var texts = useDefaultTexts(customTexts);
26
- var estimationDate = calculatedDate instanceof Date ? /*#__PURE__*/React.createElement(FormattedRelativeDateTimeTo, {
27
- value: calculatedDate
28
- }) : calculatedDate;
29
26
  var footerLeftSide = errorMessage ? /*#__PURE__*/React.createElement(InlineAlert, {
30
27
  type: "alert",
31
28
  message: errorMessage
32
- }) : isLoading ? texts.loading : /*#__PURE__*/React.createElement(React.Fragment, null, texts.calculated, ' ', /*#__PURE__*/React.createElement(S.EstimationCalculatedDate, {
33
- level: 6
34
- }, estimationDate));
29
+ }) : isLoading ? texts.loading : /*#__PURE__*/React.createElement(EstimationCalculatedDate, {
30
+ label: texts.calculated,
31
+ calculatedDate: calculatedDate
32
+ });
35
33
  var loadingParts = typeof isLoading === 'object' ? isLoading : undefined;
36
34
  var showTotalSkeleton = loadingParts == null ? void 0 : loadingParts.total;
37
35
  var showProgressBarSkeleton = loadingParts == null ? void 0 : loadingParts.progressBar;
@@ -20,9 +20,8 @@ export type EstimationBaseProps = BaseLabelProps & {
20
20
  isLoading?: boolean | SkeletonConfig;
21
21
  /**
22
22
  * top right corner value / values. provide preformatted content here
23
- * provide any value to render skeleton in place of the total in loading mode
24
23
  */
25
- total?: number;
24
+ total?: ReactNode;
26
25
  /**
27
26
  * renders an inline alert in footer with this message
28
27
  */
@@ -51,4 +50,7 @@ export type EstimationTexts = {
51
50
  calculated: ReactNode;
52
51
  loading: ReactNode;
53
52
  };
53
+ export type EstimationCalculatedDateProps = {
54
+ label: ReactNode;
55
+ } & Pick<EstimationBaseProps, 'calculatedDate'>;
54
56
  export {};
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { type EstimationCalculatedDateProps } from '../Estimation.types';
3
+ export declare const EstimationCalculatedDate: ({ label, calculatedDate, }: EstimationCalculatedDateProps) => React.JSX.Element;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { FormattedRelativeDateTimeTo } from '@synerise/ds-core';
3
+ import * as S from '../Estimation.styles';
4
+ export var EstimationCalculatedDate = function EstimationCalculatedDate(_ref) {
5
+ var label = _ref.label,
6
+ calculatedDate = _ref.calculatedDate;
7
+ var estimationDate = calculatedDate instanceof Date ? /*#__PURE__*/React.createElement(FormattedRelativeDateTimeTo, {
8
+ value: calculatedDate
9
+ }) : calculatedDate;
10
+ return /*#__PURE__*/React.createElement(React.Fragment, null, label, ' ', /*#__PURE__*/React.createElement(S.EstimationCalculatedDate, {
11
+ level: 6
12
+ }, estimationDate));
13
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-estimation",
3
- "version": "1.1.2",
3
+ "version": "1.2.0",
4
4
  "description": "Estimation UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -35,12 +35,12 @@
35
35
  ],
36
36
  "types": "dist/index.d.ts",
37
37
  "dependencies": {
38
- "@synerise/ds-divider": "^1.2.5",
39
- "@synerise/ds-form-field": "^1.2.2",
40
- "@synerise/ds-inline-alert": "^1.1.4",
41
- "@synerise/ds-progress-bar": "^1.1.27",
42
- "@synerise/ds-skeleton": "^1.0.29",
43
- "@synerise/ds-typography": "^1.0.27",
38
+ "@synerise/ds-divider": "^1.2.6",
39
+ "@synerise/ds-form-field": "^1.2.3",
40
+ "@synerise/ds-inline-alert": "^1.1.5",
41
+ "@synerise/ds-progress-bar": "^1.1.28",
42
+ "@synerise/ds-skeleton": "^1.0.30",
43
+ "@synerise/ds-typography": "^1.0.28",
44
44
  "@synerise/ds-utils": "^1.5.3"
45
45
  },
46
46
  "peerDependencies": {
@@ -49,5 +49,5 @@
49
49
  "react-intl": ">=3.12.0 <= 6.8",
50
50
  "styled-components": "^5.3.3"
51
51
  },
52
- "gitHead": "70a5256c87ef38313eedb9a004d1c6980082b2f5"
52
+ "gitHead": "451fc5f79af6c42be89179a11374a78bdec1110f"
53
53
  }