@happyvertical/smrt-timesheets 0.0.0-stage → 0.53.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/AGENTS.md +105 -0
- package/CLAUDE.md +1 -0
- package/LICENSE +7 -0
- package/README.md +242 -2
- package/dist/__smrt-register__.d.ts +2 -0
- package/dist/__smrt-register__.d.ts.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +495 -0
- package/dist/index.js.map +1 -0
- package/dist/manifest.json +1412 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/json.d.ts +6 -0
- package/dist/models/json.d.ts.map +1 -0
- package/dist/models/service-snapshots.d.ts +66 -0
- package/dist/models/service-snapshots.d.ts.map +1 -0
- package/dist/models/service-time-entry.d.ts +66 -0
- package/dist/models/service-time-entry.d.ts.map +1 -0
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/service-evidence-service.d.ts +67 -0
- package/dist/services/service-evidence-service.d.ts.map +1 -0
- package/dist/smrt-knowledge.json +1016 -0
- package/dist/svelte/components/DurationDisplay.svelte +81 -0
- package/dist/svelte/components/DurationDisplay.svelte.d.ts +20 -0
- package/dist/svelte/components/DurationDisplay.svelte.d.ts.map +1 -0
- package/dist/svelte/components/TimeEntryApprovalQueue.svelte +253 -0
- package/dist/svelte/components/TimeEntryApprovalQueue.svelte.d.ts +15 -0
- package/dist/svelte/components/TimeEntryApprovalQueue.svelte.d.ts.map +1 -0
- package/dist/svelte/components/TimeEntryCard.svelte +304 -0
- package/dist/svelte/components/TimeEntryCard.svelte.d.ts +25 -0
- package/dist/svelte/components/TimeEntryCard.svelte.d.ts.map +1 -0
- package/dist/svelte/components/TimeEntryList.svelte +360 -0
- package/dist/svelte/components/TimeEntryList.svelte.d.ts +24 -0
- package/dist/svelte/components/TimeEntryList.svelte.d.ts.map +1 -0
- package/dist/svelte/components/TimeSummary.svelte +176 -0
- package/dist/svelte/components/TimeSummary.svelte.d.ts +30 -0
- package/dist/svelte/components/TimeSummary.svelte.d.ts.map +1 -0
- package/dist/svelte/components/__tests__/DurationDisplay.test.js +57 -0
- package/dist/svelte/components/__tests__/TimeEntryApprovalQueue.test.js +114 -0
- package/dist/svelte/components/__tests__/TimeEntryCard.test.js +45 -0
- package/dist/svelte/components/__tests__/TimeEntryList.test.js +50 -0
- package/dist/svelte/components/__tests__/TimeSummary.test.js +39 -0
- package/dist/svelte/components/utils.d.ts +51 -0
- package/dist/svelte/components/utils.d.ts.map +1 -0
- package/dist/svelte/components/utils.js +58 -0
- package/dist/svelte/i18n.d.ts +31 -0
- package/dist/svelte/i18n.d.ts.map +1 -0
- package/dist/svelte/i18n.js +31 -0
- package/dist/svelte/index.d.ts +25 -0
- package/dist/svelte/index.d.ts.map +1 -0
- package/dist/svelte/index.js +27 -0
- package/dist/svelte/types.d.ts +41 -0
- package/dist/svelte/types.d.ts.map +1 -0
- package/dist/svelte/types.js +28 -0
- package/dist/types.d.ts +29 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +16 -0
- package/dist/types.js.map +1 -0
- package/dist/ui.d.ts +17 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +68 -0
- package/dist/ui.js.map +1 -0
- package/package.json +85 -3
package/dist/ui.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
//#region src/ui.ts
|
|
2
|
+
var TIMESHEETS_UI_SLOTS = {
|
|
3
|
+
"time-entry-card": {
|
|
4
|
+
id: "time-entry-card",
|
|
5
|
+
label: "Time Entry Card",
|
|
6
|
+
description: "Card component for displaying time entries",
|
|
7
|
+
icon: "clock",
|
|
8
|
+
category: "display",
|
|
9
|
+
order: 1,
|
|
10
|
+
propsInterface: "TimeEntryCardProps"
|
|
11
|
+
},
|
|
12
|
+
"time-entry-list": {
|
|
13
|
+
id: "time-entry-list",
|
|
14
|
+
label: "Time Entry List",
|
|
15
|
+
description: "List of time entries with optional selection",
|
|
16
|
+
icon: "list",
|
|
17
|
+
category: "list",
|
|
18
|
+
order: 2,
|
|
19
|
+
propsInterface: "TimeEntryListProps"
|
|
20
|
+
},
|
|
21
|
+
"time-summary": {
|
|
22
|
+
id: "time-summary",
|
|
23
|
+
label: "Time Summary",
|
|
24
|
+
description: "Summary statistics for time entries",
|
|
25
|
+
icon: "chart",
|
|
26
|
+
category: "display",
|
|
27
|
+
order: 3,
|
|
28
|
+
propsInterface: "TimeSummaryProps"
|
|
29
|
+
},
|
|
30
|
+
"duration-display": {
|
|
31
|
+
id: "duration-display",
|
|
32
|
+
label: "Duration Display",
|
|
33
|
+
description: "Formats hours for display in decimal or HH:MM format",
|
|
34
|
+
icon: "timer",
|
|
35
|
+
category: "display",
|
|
36
|
+
order: 4,
|
|
37
|
+
propsInterface: "DurationDisplayProps"
|
|
38
|
+
},
|
|
39
|
+
"time-entry-approval-queue": {
|
|
40
|
+
id: "time-entry-approval-queue",
|
|
41
|
+
label: "Time Entry Approval Queue",
|
|
42
|
+
description: "Review list with approve and reject-with-reason actions",
|
|
43
|
+
icon: "check",
|
|
44
|
+
category: "action",
|
|
45
|
+
order: 5,
|
|
46
|
+
propsInterface: "TimeEntryApprovalQueueProps"
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var TIMESHEETS_MODULE_META = {
|
|
50
|
+
name: "@happyvertical/smrt-timesheets",
|
|
51
|
+
displayName: "Timesheets",
|
|
52
|
+
description: "Shared time entries with approval, correction, and immutable commercial snapshots",
|
|
53
|
+
uiSlots: TIMESHEETS_UI_SLOTS,
|
|
54
|
+
models: [
|
|
55
|
+
"ServiceTimeEntry",
|
|
56
|
+
"ServiceChargeSnapshot",
|
|
57
|
+
"ServiceCompensationSnapshot"
|
|
58
|
+
],
|
|
59
|
+
collections: [
|
|
60
|
+
"ServiceTimeEntryCollection",
|
|
61
|
+
"ServiceChargeSnapshotCollection",
|
|
62
|
+
"ServiceCompensationSnapshotCollection"
|
|
63
|
+
]
|
|
64
|
+
};
|
|
65
|
+
//#endregion
|
|
66
|
+
export { TIMESHEETS_MODULE_META, TIMESHEETS_UI_SLOTS };
|
|
67
|
+
|
|
68
|
+
//# sourceMappingURL=ui.js.map
|
package/dist/ui.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui.js","names":[],"sources":["../src/ui.ts"],"sourcesContent":["/**\n * Timesheets Module UI Slot Declarations\n *\n * UI extension points for the timesheets module. Components are implemented in\n * the ./svelte subpath and are props-driven: hosts load entries and pass plain\n * view objects.\n */\n\nimport type { ModuleUISlot, SmrtModuleMeta } from '@happyvertical/smrt-types';\n\n/**\n * Timesheets module UI slots\n */\nexport const TIMESHEETS_UI_SLOTS: Record<string, ModuleUISlot> = {\n 'time-entry-card': {\n id: 'time-entry-card',\n label: 'Time Entry Card',\n description: 'Card component for displaying time entries',\n icon: 'clock',\n category: 'display',\n order: 1,\n propsInterface: 'TimeEntryCardProps',\n },\n 'time-entry-list': {\n id: 'time-entry-list',\n label: 'Time Entry List',\n description: 'List of time entries with optional selection',\n icon: 'list',\n category: 'list',\n order: 2,\n propsInterface: 'TimeEntryListProps',\n },\n 'time-summary': {\n id: 'time-summary',\n label: 'Time Summary',\n description: 'Summary statistics for time entries',\n icon: 'chart',\n category: 'display',\n order: 3,\n propsInterface: 'TimeSummaryProps',\n },\n 'duration-display': {\n id: 'duration-display',\n label: 'Duration Display',\n description: 'Formats hours for display in decimal or HH:MM format',\n icon: 'timer',\n category: 'display',\n order: 4,\n propsInterface: 'DurationDisplayProps',\n },\n 'time-entry-approval-queue': {\n id: 'time-entry-approval-queue',\n label: 'Time Entry Approval Queue',\n description: 'Review list with approve and reject-with-reason actions',\n icon: 'check',\n category: 'action',\n order: 5,\n propsInterface: 'TimeEntryApprovalQueueProps',\n },\n};\n\n/**\n * Timesheets module metadata\n */\nexport const TIMESHEETS_MODULE_META: SmrtModuleMeta = {\n name: '@happyvertical/smrt-timesheets',\n displayName: 'Timesheets',\n description:\n 'Shared time entries with approval, correction, and immutable commercial snapshots',\n uiSlots: TIMESHEETS_UI_SLOTS,\n models: [\n 'ServiceTimeEntry',\n 'ServiceChargeSnapshot',\n 'ServiceCompensationSnapshot',\n ],\n collections: [\n 'ServiceTimeEntryCollection',\n 'ServiceChargeSnapshotCollection',\n 'ServiceCompensationSnapshotCollection',\n ],\n};\n"],"mappings":";AAaO,IAAM,sBAAoD;CAC/D,mBAAmB;EACjB,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,UAAU;EACV,OAAO;EACP,gBAAgB;CAClB;CACA,mBAAmB;EACjB,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,UAAU;EACV,OAAO;EACP,gBAAgB;CAClB;CACA,gBAAgB;EACd,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,UAAU;EACV,OAAO;EACP,gBAAgB;CAClB;CACA,oBAAoB;EAClB,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,UAAU;EACV,OAAO;EACP,gBAAgB;CAClB;CACA,6BAA6B;EAC3B,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,UAAU;EACV,OAAO;EACP,gBAAgB;CAClB;AACF;AAKO,IAAM,yBAAyC;CACpD,MAAM;CACN,aAAa;CACb,aACE;CACF,SAAS;CACT,QAAQ;EACN;EACA;EACA;CACF;CACA,aAAa;EACX;EACA;EACA;CACF;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,88 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-timesheets",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
3
|
+
"version": "0.53.0",
|
|
4
|
+
"smrtJsdoc": "strict",
|
|
5
|
+
"description": "Shared time entries for the SMRT framework: who worked how long on what, approval and correction, with immutable charge and compensation snapshots",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"smrtRawPrimitives": "strict",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"CLAUDE.md",
|
|
13
|
+
"AGENTS.md"
|
|
14
|
+
],
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./ui": {
|
|
21
|
+
"types": "./dist/ui.d.ts",
|
|
22
|
+
"import": "./dist/ui.js"
|
|
23
|
+
},
|
|
24
|
+
"./svelte": {
|
|
25
|
+
"types": "./dist/svelte/index.d.ts",
|
|
26
|
+
"svelte": "./dist/svelte/index.js",
|
|
27
|
+
"import": "./dist/svelte/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./manifest": "./dist/manifest.json",
|
|
30
|
+
"./manifest.json": "./dist/manifest.json"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@happyvertical/smrt-core": "0.53.0",
|
|
34
|
+
"@happyvertical/smrt-tenancy": "0.53.0",
|
|
35
|
+
"@happyvertical/smrt-types": "0.53.0",
|
|
36
|
+
"@happyvertical/smrt-ui": "0.53.0"
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"svelte": "^5.57.0"
|
|
40
|
+
},
|
|
41
|
+
"peerDependenciesMeta": {
|
|
42
|
+
"svelte": {
|
|
43
|
+
"optional": true
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@happyvertical/smrt-vitest": "0.53.0",
|
|
48
|
+
"@happyvertical/sql": "^0.98.0",
|
|
49
|
+
"@sveltejs/package": "^2.5.8",
|
|
50
|
+
"@sveltejs/vite-plugin-svelte": "^7.3.0",
|
|
51
|
+
"@types/node": "24.13.6",
|
|
52
|
+
"svelte": "^5.57.1",
|
|
53
|
+
"svelte-check": "^4.7.6",
|
|
54
|
+
"typescript": "6.0.3",
|
|
55
|
+
"vite": "8.1.4",
|
|
56
|
+
"vitest": "4.1.10"
|
|
57
|
+
},
|
|
58
|
+
"keywords": [
|
|
59
|
+
"smrt",
|
|
60
|
+
"timesheets",
|
|
61
|
+
"time-tracking",
|
|
62
|
+
"time-entries",
|
|
63
|
+
"approval",
|
|
64
|
+
"multi-tenant"
|
|
65
|
+
],
|
|
66
|
+
"author": "HappyVertical",
|
|
67
|
+
"license": "MIT",
|
|
68
|
+
"publishConfig": {
|
|
69
|
+
"registry": "https://registry.npmjs.org",
|
|
70
|
+
"access": "public"
|
|
71
|
+
},
|
|
72
|
+
"repository": {
|
|
73
|
+
"type": "git",
|
|
74
|
+
"url": "https://github.com/happyvertical/smrt.git",
|
|
75
|
+
"directory": "packages/timesheets"
|
|
76
|
+
},
|
|
77
|
+
"scripts": {
|
|
78
|
+
"build": "vite build --mode library && svelte-package -i src/svelte -o dist/svelte --tsconfig tsconfig.svelte.json",
|
|
79
|
+
"build:watch": "vite build --mode library --watch",
|
|
80
|
+
"clean": "rm -rf dist",
|
|
81
|
+
"dev": "vite dev",
|
|
82
|
+
"test": "vitest run",
|
|
83
|
+
"test:postgres": "node ../../scripts/run-with-ci-postgres.mjs -- pnpm exec vitest run optional.test.ts",
|
|
84
|
+
"test:watch": "vitest",
|
|
85
|
+
"typecheck": "tsc --noEmit -p tsconfig.json && node ../../scripts/svelte-check-a11y.mjs --tsconfig ./tsconfig.svelte.json",
|
|
86
|
+
"verify:pack": "node ../../scripts/verify-package-types-exports.js ."
|
|
87
|
+
}
|
|
6
88
|
}
|