@happyvertical/smrt-projects 0.43.10 → 0.44.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/dist/index.js +1 -1
- package/dist/manifest.json +1 -1
- package/dist/smrt-knowledge.json +3 -3
- package/dist/svelte/AssistanceLauncher.svelte +5 -0
- package/dist/svelte/AssistanceLauncher.svelte.d.ts +5 -0
- package/dist/svelte/AssistanceLauncher.svelte.d.ts.map +1 -1
- package/dist/svelte/DeliveryStatus.svelte +1 -0
- package/dist/svelte/DeliveryStatus.svelte.d.ts +1 -0
- package/dist/svelte/DeliveryStatus.svelte.d.ts.map +1 -1
- package/dist/svelte/DevelopmentBoard.svelte +3 -0
- package/dist/svelte/DevelopmentBoard.svelte.d.ts +3 -0
- package/dist/svelte/DevelopmentBoard.svelte.d.ts.map +1 -1
- package/dist/svelte/DevelopmentRequestDetail.svelte +2 -0
- package/dist/svelte/DevelopmentRequestDetail.svelte.d.ts +2 -0
- package/dist/svelte/DevelopmentRequestDetail.svelte.d.ts.map +1 -1
- package/dist/svelte/PreviewApprovalPanel.svelte +3 -0
- package/dist/svelte/PreviewApprovalPanel.svelte.d.ts +3 -0
- package/dist/svelte/PreviewApprovalPanel.svelte.d.ts.map +1 -1
- package/dist/svelte/ServiceEvidenceList.svelte +1 -0
- package/dist/svelte/ServiceEvidenceList.svelte.d.ts +1 -0
- package/dist/svelte/ServiceEvidenceList.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ApprovalActions.svelte +9 -0
- package/dist/svelte/components/ApprovalActions.svelte.d.ts +9 -0
- package/dist/svelte/components/ApprovalActions.svelte.d.ts.map +1 -1
- package/dist/svelte/components/BulkActions.svelte +7 -0
- package/dist/svelte/components/BulkActions.svelte.d.ts +7 -0
- package/dist/svelte/components/BulkActions.svelte.d.ts.map +1 -1
- package/dist/svelte/components/DevelopmentRequestForm.svelte +2 -0
- package/dist/svelte/components/DevelopmentRequestForm.svelte.d.ts +2 -0
- package/dist/svelte/components/DevelopmentRequestForm.svelte.d.ts.map +1 -1
- package/dist/svelte/components/DevelopmentRequestList.svelte +3 -0
- package/dist/svelte/components/DevelopmentRequestList.svelte.d.ts +3 -0
- package/dist/svelte/components/DevelopmentRequestList.svelte.d.ts.map +1 -1
- package/dist/svelte/components/DurationDisplay.svelte +16 -3
- package/dist/svelte/components/DurationDisplay.svelte.d.ts +9 -0
- package/dist/svelte/components/DurationDisplay.svelte.d.ts.map +1 -1
- package/dist/svelte/components/RejectDialog.svelte +10 -0
- package/dist/svelte/components/RejectDialog.svelte.d.ts +10 -0
- package/dist/svelte/components/RejectDialog.svelte.d.ts.map +1 -1
- package/dist/svelte/components/TimeEntryCard.svelte +8 -0
- package/dist/svelte/components/TimeEntryCard.svelte.d.ts +8 -0
- package/dist/svelte/components/TimeEntryCard.svelte.d.ts.map +1 -1
- package/dist/svelte/components/TimeEntryList.svelte +7 -0
- package/dist/svelte/components/TimeEntryList.svelte.d.ts +7 -0
- package/dist/svelte/components/TimeEntryList.svelte.d.ts.map +1 -1
- package/dist/svelte/components/TimeSummary.svelte +11 -0
- package/dist/svelte/components/TimeSummary.svelte.d.ts +11 -0
- package/dist/svelte/components/TimeSummary.svelte.d.ts.map +1 -1
- package/dist/svelte/components/__tests__/DurationDisplay.test.js +34 -0
- package/package.json +12 -11
|
@@ -10,16 +10,27 @@ import { type Currency, formatCurrency, formatHours } from './utils.js';
|
|
|
10
10
|
|
|
11
11
|
/** Props for TimeSummary component */
|
|
12
12
|
export interface Props {
|
|
13
|
+
/** Total hours across all time entries. */
|
|
13
14
|
totalHours: number;
|
|
15
|
+
/** Total charged or invoiced amount. */
|
|
14
16
|
totalAmount: number;
|
|
17
|
+
/** Hours awaiting approval. */
|
|
15
18
|
pendingHours?: number;
|
|
19
|
+
/** Amount awaiting approval. */
|
|
16
20
|
pendingAmount?: number;
|
|
21
|
+
/** Hours that have been approved. */
|
|
17
22
|
approvedHours?: number;
|
|
23
|
+
/** Amount that has been approved. */
|
|
18
24
|
approvedAmount?: number;
|
|
25
|
+
/** Number of time entries included in the summary. */
|
|
19
26
|
entryCount?: number;
|
|
27
|
+
/** Currency code for formatting amounts. */
|
|
20
28
|
currency?: Currency;
|
|
29
|
+
/** Shows the pending hours and amount card when there are pending items. */
|
|
21
30
|
showPending?: boolean;
|
|
31
|
+
/** Shows the approved hours and amount card when there are approved items. */
|
|
22
32
|
showApproved?: boolean;
|
|
33
|
+
/** Arranges summary cards in a grid or flexbox layout. */
|
|
23
34
|
layout?: 'horizontal' | 'grid';
|
|
24
35
|
}
|
|
25
36
|
|
|
@@ -1,16 +1,27 @@
|
|
|
1
1
|
import { type Currency } from './utils.js';
|
|
2
2
|
/** Props for TimeSummary component */
|
|
3
3
|
export interface Props {
|
|
4
|
+
/** Total hours across all time entries. */
|
|
4
5
|
totalHours: number;
|
|
6
|
+
/** Total charged or invoiced amount. */
|
|
5
7
|
totalAmount: number;
|
|
8
|
+
/** Hours awaiting approval. */
|
|
6
9
|
pendingHours?: number;
|
|
10
|
+
/** Amount awaiting approval. */
|
|
7
11
|
pendingAmount?: number;
|
|
12
|
+
/** Hours that have been approved. */
|
|
8
13
|
approvedHours?: number;
|
|
14
|
+
/** Amount that has been approved. */
|
|
9
15
|
approvedAmount?: number;
|
|
16
|
+
/** Number of time entries included in the summary. */
|
|
10
17
|
entryCount?: number;
|
|
18
|
+
/** Currency code for formatting amounts. */
|
|
11
19
|
currency?: Currency;
|
|
20
|
+
/** Shows the pending hours and amount card when there are pending items. */
|
|
12
21
|
showPending?: boolean;
|
|
22
|
+
/** Shows the approved hours and amount card when there are approved items. */
|
|
13
23
|
showApproved?: boolean;
|
|
24
|
+
/** Arranges summary cards in a grid or flexbox layout. */
|
|
14
25
|
layout?: 'horizontal' | 'grid';
|
|
15
26
|
}
|
|
16
27
|
declare const TimeSummary: import("svelte").Component<Props, {}, "">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeSummary.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/TimeSummary.svelte.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,QAAQ,EAA+B,MAAM,YAAY,CAAC;AAGxE,sCAAsC;AACtC,MAAM,WAAW,KAAK;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC;CAChC;AA6DD,QAAA,MAAM,WAAW,2CAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"TimeSummary.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/TimeSummary.svelte.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,QAAQ,EAA+B,MAAM,YAAY,CAAC;AAGxE,sCAAsC;AACtC,MAAM,WAAW,KAAK;IACpB,2CAA2C;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,+BAA+B;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gCAAgC;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qCAAqC;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qCAAqC;IACrC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8EAA8E;IAC9E,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC;CAChC;AA6DD,QAAA,MAAM,WAAW,2CAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
|
|
@@ -14,6 +14,40 @@ describe('DurationDisplay', () => {
|
|
|
14
14
|
render(DurationDisplay, { props: { hours: 1.5, format: 'hhmm' } });
|
|
15
15
|
expect(screen.getByText('1:30')).toBeInTheDocument();
|
|
16
16
|
});
|
|
17
|
+
// #2605: `showLabel` used to be inert. `decimal` rendered `h` whatever the
|
|
18
|
+
// prop said, and `hhmm` rendered an empty `<span class="unit">` instead of a
|
|
19
|
+
// label. These pin the unit to the prop, and pin the unchanged defaults so a
|
|
20
|
+
// later change to them has to be deliberate.
|
|
21
|
+
describe('showLabel', () => {
|
|
22
|
+
it('renders the decimal unit by default', () => {
|
|
23
|
+
const { container } = render(DurationDisplay, { props: { hours: 2.5 } });
|
|
24
|
+
expect(container.querySelector('.unit')?.textContent).toBe('h');
|
|
25
|
+
});
|
|
26
|
+
it('renders the decimal unit when showLabel is set', () => {
|
|
27
|
+
const { container } = render(DurationDisplay, {
|
|
28
|
+
props: { hours: 2.5, showLabel: true },
|
|
29
|
+
});
|
|
30
|
+
expect(container.querySelector('.unit')?.textContent).toBe('h');
|
|
31
|
+
});
|
|
32
|
+
it('drops the decimal unit when showLabel is cleared', () => {
|
|
33
|
+
const { container } = render(DurationDisplay, {
|
|
34
|
+
props: { hours: 2.5, showLabel: false },
|
|
35
|
+
});
|
|
36
|
+
expect(container.querySelector('.unit')).toBeNull();
|
|
37
|
+
expect(container.textContent?.trim()).toBe('2.5');
|
|
38
|
+
});
|
|
39
|
+
it.each([
|
|
40
|
+
undefined,
|
|
41
|
+
true,
|
|
42
|
+
false,
|
|
43
|
+
])('renders no unit element in hhmm format with showLabel=%s', (showLabel) => {
|
|
44
|
+
const { container } = render(DurationDisplay, {
|
|
45
|
+
props: { hours: 1.5, format: 'hhmm', showLabel },
|
|
46
|
+
});
|
|
47
|
+
expect(container.querySelector('.unit')).toBeNull();
|
|
48
|
+
expect(container.textContent?.trim()).toBe('1:30');
|
|
49
|
+
});
|
|
50
|
+
});
|
|
17
51
|
it('is axe-clean', async () => {
|
|
18
52
|
const { container } = render(DurationDisplay, {
|
|
19
53
|
props: { hours: 8, showLabel: true },
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-projects",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.0",
|
|
4
|
+
"smrtJsdoc": "strict",
|
|
4
5
|
"description": "Provider-agnostic project management models (Issues, PRs, Repositories, Projects) for SMRT framework",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"smrtRawPrimitives": "strict",
|
|
@@ -40,14 +41,14 @@
|
|
|
40
41
|
"@happyvertical/repos": "^0.89.4",
|
|
41
42
|
"@happyvertical/sql": "^0.89.4",
|
|
42
43
|
"@happyvertical/utils": "^0.89.4",
|
|
43
|
-
"@happyvertical/smrt-config": "0.
|
|
44
|
-
"@happyvertical/smrt-
|
|
45
|
-
"@happyvertical/smrt-
|
|
46
|
-
"@happyvertical/smrt-
|
|
47
|
-
"@happyvertical/smrt-
|
|
48
|
-
"@happyvertical/smrt-
|
|
49
|
-
"@happyvertical/smrt-
|
|
50
|
-
"@happyvertical/smrt-
|
|
44
|
+
"@happyvertical/smrt-config": "0.44.0",
|
|
45
|
+
"@happyvertical/smrt-core": "0.44.0",
|
|
46
|
+
"@happyvertical/smrt-prompts": "0.44.0",
|
|
47
|
+
"@happyvertical/smrt-subscriptions": "0.44.0",
|
|
48
|
+
"@happyvertical/smrt-tenancy": "0.44.0",
|
|
49
|
+
"@happyvertical/smrt-svelte": "0.44.0",
|
|
50
|
+
"@happyvertical/smrt-ui": "0.44.0",
|
|
51
|
+
"@happyvertical/smrt-types": "0.44.0"
|
|
51
52
|
},
|
|
52
53
|
"peerDependencies": {
|
|
53
54
|
"svelte": "^5.56.4"
|
|
@@ -67,8 +68,8 @@
|
|
|
67
68
|
"typescript": "5.9.3",
|
|
68
69
|
"vite": "8.1.4",
|
|
69
70
|
"vitest": "4.1.10",
|
|
70
|
-
"@happyvertical/smrt-vitest": "0.
|
|
71
|
-
"@happyvertical/smrt-cli": "0.
|
|
71
|
+
"@happyvertical/smrt-vitest": "0.44.0",
|
|
72
|
+
"@happyvertical/smrt-cli": "0.44.0"
|
|
72
73
|
},
|
|
73
74
|
"keywords": [
|
|
74
75
|
"ai",
|