@contractspec/example.analytics-dashboard 1.56.1 → 1.58.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/browser/dashboard/dashboard.enum.js +34 -0
- package/dist/browser/dashboard/dashboard.operation.js +289 -0
- package/dist/browser/dashboard/dashboard.presentation.js +197 -0
- package/dist/browser/dashboard/dashboard.schema.js +126 -0
- package/dist/browser/dashboard/dashboard.test-spec.js +213 -0
- package/dist/browser/dashboard/index.js +299 -0
- package/dist/browser/dashboard.feature.js +84 -0
- package/dist/browser/datasource/posthog-datasource.js +289 -0
- package/dist/browser/docs/analytics-dashboard.docblock.js +103 -0
- package/dist/browser/docs/index.js +103 -0
- package/dist/browser/events.js +81 -0
- package/dist/browser/example.js +42 -0
- package/dist/browser/handlers/analytics.handlers.js +278 -0
- package/dist/browser/handlers/index.js +571 -0
- package/dist/browser/handlers/query.handlers.js +294 -0
- package/dist/browser/index.js +1677 -0
- package/dist/browser/query/index.js +159 -0
- package/dist/browser/query/query.enum.js +11 -0
- package/dist/browser/query/query.operation.js +154 -0
- package/dist/browser/query/query.presentation.js +119 -0
- package/dist/browser/query/query.schema.js +70 -0
- package/dist/browser/query/query.test-spec.js +113 -0
- package/dist/browser/query-engine/index.js +491 -0
- package/dist/browser/seeders/index.js +20 -0
- package/dist/browser/ui/AnalyticsDashboard.js +394 -0
- package/dist/browser/ui/hooks/index.js +69 -0
- package/dist/browser/ui/hooks/useAnalyticsData.js +66 -0
- package/dist/browser/ui/index.js +671 -0
- package/dist/browser/ui/renderers/analytics.markdown.js +275 -0
- package/dist/browser/ui/renderers/index.js +275 -0
- package/dist/dashboard/dashboard.enum.d.ts +3 -8
- package/dist/dashboard/dashboard.enum.d.ts.map +1 -1
- package/dist/dashboard/dashboard.enum.js +31 -39
- package/dist/dashboard/dashboard.operation.d.ts +444 -450
- package/dist/dashboard/dashboard.operation.d.ts.map +1 -1
- package/dist/dashboard/dashboard.operation.js +284 -207
- package/dist/dashboard/dashboard.presentation.d.ts +3 -8
- package/dist/dashboard/dashboard.presentation.d.ts.map +1 -1
- package/dist/dashboard/dashboard.presentation.js +193 -85
- package/dist/dashboard/dashboard.schema.d.ts +289 -294
- package/dist/dashboard/dashboard.schema.d.ts.map +1 -1
- package/dist/dashboard/dashboard.schema.js +119 -228
- package/dist/dashboard/dashboard.test-spec.d.ts +4 -9
- package/dist/dashboard/dashboard.test-spec.d.ts.map +1 -1
- package/dist/dashboard/dashboard.test-spec.js +209 -228
- package/dist/dashboard/index.d.ts +7 -4
- package/dist/dashboard/index.d.ts.map +1 -0
- package/dist/dashboard/index.js +299 -4
- package/dist/dashboard.feature.d.ts +1 -7
- package/dist/dashboard.feature.d.ts.map +1 -1
- package/dist/dashboard.feature.js +83 -175
- package/dist/datasource/posthog-datasource.d.ts +18 -0
- package/dist/datasource/posthog-datasource.d.ts.map +1 -0
- package/dist/datasource/posthog-datasource.js +290 -0
- package/dist/docs/analytics-dashboard.docblock.d.ts +2 -1
- package/dist/docs/analytics-dashboard.docblock.d.ts.map +1 -0
- package/dist/docs/analytics-dashboard.docblock.js +46 -56
- package/dist/docs/index.d.ts +2 -1
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +104 -1
- package/dist/events.d.ts +109 -115
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +74 -120
- package/dist/example.d.ts +2 -6
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +40 -55
- package/dist/handlers/analytics.handlers.d.ts +110 -110
- package/dist/handlers/analytics.handlers.d.ts.map +1 -1
- package/dist/handlers/analytics.handlers.js +267 -298
- package/dist/handlers/index.d.ts +3 -2
- package/dist/handlers/index.d.ts.map +1 -0
- package/dist/handlers/index.js +571 -2
- package/dist/handlers/query.handlers.d.ts +9 -0
- package/dist/handlers/query.handlers.d.ts.map +1 -0
- package/dist/handlers/query.handlers.js +295 -0
- package/dist/index.d.ts +12 -12
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1678 -13
- package/dist/node/dashboard/dashboard.enum.js +34 -0
- package/dist/node/dashboard/dashboard.operation.js +289 -0
- package/dist/node/dashboard/dashboard.presentation.js +197 -0
- package/dist/node/dashboard/dashboard.schema.js +126 -0
- package/dist/node/dashboard/dashboard.test-spec.js +213 -0
- package/dist/node/dashboard/index.js +299 -0
- package/dist/node/dashboard.feature.js +84 -0
- package/dist/node/datasource/posthog-datasource.js +289 -0
- package/dist/node/docs/analytics-dashboard.docblock.js +103 -0
- package/dist/node/docs/index.js +103 -0
- package/dist/node/events.js +81 -0
- package/dist/node/example.js +42 -0
- package/dist/node/handlers/analytics.handlers.js +278 -0
- package/dist/node/handlers/index.js +571 -0
- package/dist/node/handlers/query.handlers.js +294 -0
- package/dist/node/index.js +1677 -0
- package/dist/node/query/index.js +159 -0
- package/dist/node/query/query.enum.js +11 -0
- package/dist/node/query/query.operation.js +154 -0
- package/dist/node/query/query.presentation.js +119 -0
- package/dist/node/query/query.schema.js +70 -0
- package/dist/node/query/query.test-spec.js +113 -0
- package/dist/node/query-engine/index.js +491 -0
- package/dist/node/seeders/index.js +20 -0
- package/dist/node/ui/AnalyticsDashboard.js +394 -0
- package/dist/node/ui/hooks/index.js +69 -0
- package/dist/node/ui/hooks/useAnalyticsData.js +66 -0
- package/dist/node/ui/index.js +671 -0
- package/dist/node/ui/renderers/analytics.markdown.js +275 -0
- package/dist/node/ui/renderers/index.js +275 -0
- package/dist/query/index.d.ts +7 -4
- package/dist/query/index.d.ts.map +1 -0
- package/dist/query/index.js +159 -4
- package/dist/query/query.enum.d.ts +1 -6
- package/dist/query/query.enum.d.ts.map +1 -1
- package/dist/query/query.enum.js +10 -14
- package/dist/query/query.operation.d.ts +148 -154
- package/dist/query/query.operation.d.ts.map +1 -1
- package/dist/query/query.operation.js +151 -109
- package/dist/query/query.presentation.d.ts +2 -7
- package/dist/query/query.presentation.d.ts.map +1 -1
- package/dist/query/query.presentation.js +116 -56
- package/dist/query/query.schema.d.ts +121 -126
- package/dist/query/query.schema.d.ts.map +1 -1
- package/dist/query/query.schema.js +66 -152
- package/dist/query/query.test-spec.d.ts +2 -7
- package/dist/query/query.test-spec.d.ts.map +1 -1
- package/dist/query/query.test-spec.js +111 -121
- package/dist/query-engine/index.d.ts +84 -86
- package/dist/query-engine/index.d.ts.map +1 -1
- package/dist/query-engine/index.js +490 -187
- package/dist/seeders/index.d.ts +4 -8
- package/dist/seeders/index.d.ts.map +1 -1
- package/dist/seeders/index.js +18 -16
- package/dist/ui/AnalyticsDashboard.d.ts +1 -6
- package/dist/ui/AnalyticsDashboard.d.ts.map +1 -1
- package/dist/ui/AnalyticsDashboard.js +389 -259
- package/dist/ui/hooks/index.d.ts +2 -2
- package/dist/ui/hooks/index.d.ts.map +1 -0
- package/dist/ui/hooks/index.js +69 -4
- package/dist/ui/hooks/useAnalyticsData.d.ts +16 -20
- package/dist/ui/hooks/useAnalyticsData.d.ts.map +1 -1
- package/dist/ui/hooks/useAnalyticsData.js +63 -69
- package/dist/ui/index.d.ts +7 -6
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +671 -5
- package/dist/ui/renderers/analytics.markdown.d.ts +13 -15
- package/dist/ui/renderers/analytics.markdown.d.ts.map +1 -1
- package/dist/ui/renderers/analytics.markdown.js +266 -254
- package/dist/ui/renderers/index.d.ts +2 -2
- package/dist/ui/renderers/index.d.ts.map +1 -0
- package/dist/ui/renderers/index.js +275 -2
- package/package.json +329 -62
- package/dist/dashboard/dashboard.enum.js.map +0 -1
- package/dist/dashboard/dashboard.operation.js.map +0 -1
- package/dist/dashboard/dashboard.presentation.js.map +0 -1
- package/dist/dashboard/dashboard.schema.js.map +0 -1
- package/dist/dashboard/dashboard.test-spec.js.map +0 -1
- package/dist/dashboard.feature.js.map +0 -1
- package/dist/docs/analytics-dashboard.docblock.js.map +0 -1
- package/dist/events.js.map +0 -1
- package/dist/example.js.map +0 -1
- package/dist/handlers/analytics.handlers.js.map +0 -1
- package/dist/query/query.enum.js.map +0 -1
- package/dist/query/query.operation.js.map +0 -1
- package/dist/query/query.presentation.js.map +0 -1
- package/dist/query/query.schema.js.map +0 -1
- package/dist/query/query.test-spec.js.map +0 -1
- package/dist/query-engine/index.js.map +0 -1
- package/dist/seeders/index.js.map +0 -1
- package/dist/ui/AnalyticsDashboard.js.map +0 -1
- package/dist/ui/hooks/useAnalyticsData.js.map +0 -1
- package/dist/ui/renderers/analytics.markdown.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,67 +1,79 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/example.analytics-dashboard",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.58.0",
|
|
4
4
|
"description": "Analytics Dashboard example with widgets and query engine for ContractSpec",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
|
|
9
9
|
"publish:pkg:canary": "bun publish:pkg --tag canary",
|
|
10
|
-
"build": "bun build:
|
|
11
|
-
"build:bundle": "
|
|
12
|
-
"build:types": "
|
|
13
|
-
"dev": "bun
|
|
10
|
+
"build": "bun run prebuild && bun run build:bundle && bun run build:types",
|
|
11
|
+
"build:bundle": "contractspec-bun-build transpile",
|
|
12
|
+
"build:types": "contractspec-bun-build types",
|
|
13
|
+
"dev": "contractspec-bun-build dev",
|
|
14
14
|
"clean": "rimraf dist .turbo",
|
|
15
15
|
"lint": "bun lint:fix",
|
|
16
16
|
"lint:fix": "eslint src --fix",
|
|
17
|
-
"lint:check": "eslint src"
|
|
17
|
+
"lint:check": "eslint src",
|
|
18
|
+
"prebuild": "contractspec-bun-build prebuild",
|
|
19
|
+
"typecheck": "tsc --noEmit"
|
|
18
20
|
},
|
|
19
21
|
"dependencies": {
|
|
20
|
-
"@contractspec/lib.schema": "1.
|
|
21
|
-
"@contractspec/lib.contracts": "1.
|
|
22
|
-
"@contractspec/lib.example-shared-ui": "1.
|
|
23
|
-
"@contractspec/lib.design-system": "1.
|
|
24
|
-
"@contractspec/lib.runtime-sandbox": "0.
|
|
22
|
+
"@contractspec/lib.schema": "1.58.0",
|
|
23
|
+
"@contractspec/lib.contracts": "1.58.0",
|
|
24
|
+
"@contractspec/lib.example-shared-ui": "1.12.0",
|
|
25
|
+
"@contractspec/lib.design-system": "1.58.0",
|
|
26
|
+
"@contractspec/lib.runtime-sandbox": "0.13.0",
|
|
25
27
|
"react": "19.2.4",
|
|
26
28
|
"react-dom": "19.2.4"
|
|
27
29
|
},
|
|
28
30
|
"devDependencies": {
|
|
29
|
-
"@contractspec/tool.typescript": "1.
|
|
30
|
-
"@contractspec/tool.tsdown": "1.56.1",
|
|
31
|
+
"@contractspec/tool.typescript": "1.58.0",
|
|
31
32
|
"typescript": "^5.9.3",
|
|
32
|
-
"@types/react": "^19.2.
|
|
33
|
-
"@types/react-dom": "^19.2.2"
|
|
33
|
+
"@types/react": "^19.2.13",
|
|
34
|
+
"@types/react-dom": "^19.2.2",
|
|
35
|
+
"@contractspec/tool.bun": "1.57.0"
|
|
34
36
|
},
|
|
35
37
|
"exports": {
|
|
36
|
-
".": "./
|
|
37
|
-
"./dashboard": "./
|
|
38
|
-
"./dashboard.feature": "./
|
|
39
|
-
"./dashboard/dashboard.enum": "./
|
|
40
|
-
"./dashboard/dashboard.operation": "./
|
|
41
|
-
"./dashboard/dashboard.presentation": "./
|
|
42
|
-
"./dashboard/dashboard.schema": "./
|
|
43
|
-
"./dashboard/dashboard.test-spec": "./
|
|
44
|
-
"./
|
|
45
|
-
"./
|
|
46
|
-
"./
|
|
47
|
-
"./
|
|
48
|
-
"./
|
|
49
|
-
"./
|
|
50
|
-
"./
|
|
51
|
-
"./
|
|
52
|
-
"./
|
|
53
|
-
"./
|
|
54
|
-
"./
|
|
55
|
-
"./query
|
|
56
|
-
"./query
|
|
57
|
-
"./
|
|
58
|
-
"./
|
|
59
|
-
"./
|
|
60
|
-
"./
|
|
61
|
-
"./
|
|
62
|
-
"./
|
|
63
|
-
"./
|
|
64
|
-
"
|
|
38
|
+
".": "./src/index.ts",
|
|
39
|
+
"./dashboard": "./src/dashboard/index.ts",
|
|
40
|
+
"./dashboard.feature": "./src/dashboard.feature.ts",
|
|
41
|
+
"./dashboard/dashboard.enum": "./src/dashboard/dashboard.enum.ts",
|
|
42
|
+
"./dashboard/dashboard.operation": "./src/dashboard/dashboard.operation.ts",
|
|
43
|
+
"./dashboard/dashboard.presentation": "./src/dashboard/dashboard.presentation.ts",
|
|
44
|
+
"./dashboard/dashboard.schema": "./src/dashboard/dashboard.schema.ts",
|
|
45
|
+
"./dashboard/dashboard.test-spec": "./src/dashboard/dashboard.test-spec.ts",
|
|
46
|
+
"./dashboard/index": "./src/dashboard/index.ts",
|
|
47
|
+
"./datasource/posthog-datasource": "./src/datasource/posthog-datasource.ts",
|
|
48
|
+
"./docs": "./src/docs/index.ts",
|
|
49
|
+
"./docs/analytics-dashboard.docblock": "./src/docs/analytics-dashboard.docblock.ts",
|
|
50
|
+
"./docs/index": "./src/docs/index.ts",
|
|
51
|
+
"./events": "./src/events.ts",
|
|
52
|
+
"./example": "./src/example.ts",
|
|
53
|
+
"./handlers": "./src/handlers/index.ts",
|
|
54
|
+
"./handlers/analytics.handlers": "./src/handlers/analytics.handlers.ts",
|
|
55
|
+
"./handlers/index": "./src/handlers/index.ts",
|
|
56
|
+
"./handlers/query.handlers": "./src/handlers/query.handlers.ts",
|
|
57
|
+
"./query": "./src/query/index.ts",
|
|
58
|
+
"./query-engine": "./src/query-engine/index.ts",
|
|
59
|
+
"./query-engine/index": "./src/query-engine/index.ts",
|
|
60
|
+
"./query/index": "./src/query/index.ts",
|
|
61
|
+
"./query/query.enum": "./src/query/query.enum.ts",
|
|
62
|
+
"./query/query.operation": "./src/query/query.operation.ts",
|
|
63
|
+
"./query/query.presentation": "./src/query/query.presentation.ts",
|
|
64
|
+
"./query/query.schema": "./src/query/query.schema.ts",
|
|
65
|
+
"./query/query.test-spec": "./src/query/query.test-spec.ts",
|
|
66
|
+
"./seeders": "./src/seeders/index.ts",
|
|
67
|
+
"./seeders/index": "./src/seeders/index.ts",
|
|
68
|
+
"./ui": "./src/ui/index.ts",
|
|
69
|
+
"./ui/AnalyticsDashboard": "./src/ui/AnalyticsDashboard.tsx",
|
|
70
|
+
"./ui/hooks": "./src/ui/hooks/index.ts",
|
|
71
|
+
"./ui/hooks/index": "./src/ui/hooks/index.ts",
|
|
72
|
+
"./ui/hooks/useAnalyticsData": "./src/ui/hooks/useAnalyticsData.ts",
|
|
73
|
+
"./ui/index": "./src/ui/index.ts",
|
|
74
|
+
"./ui/renderers": "./src/ui/renderers/index.ts",
|
|
75
|
+
"./ui/renderers/analytics.markdown": "./src/ui/renderers/analytics.markdown.ts",
|
|
76
|
+
"./ui/renderers/index": "./src/ui/renderers/index.ts"
|
|
65
77
|
},
|
|
66
78
|
"files": [
|
|
67
79
|
"dist",
|
|
@@ -70,24 +82,279 @@
|
|
|
70
82
|
"publishConfig": {
|
|
71
83
|
"access": "public",
|
|
72
84
|
"exports": {
|
|
73
|
-
".":
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"./
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
"./
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
".": {
|
|
86
|
+
"types": "./dist/index.d.ts",
|
|
87
|
+
"bun": "./dist/index.js",
|
|
88
|
+
"node": "./dist/node/index.mjs",
|
|
89
|
+
"browser": "./dist/browser/index.js",
|
|
90
|
+
"default": "./dist/index.js"
|
|
91
|
+
},
|
|
92
|
+
"./dashboard": {
|
|
93
|
+
"types": "./dist/dashboard/index.d.ts",
|
|
94
|
+
"bun": "./dist/dashboard/index.js",
|
|
95
|
+
"node": "./dist/node/dashboard/index.mjs",
|
|
96
|
+
"browser": "./dist/browser/dashboard/index.js",
|
|
97
|
+
"default": "./dist/dashboard/index.js"
|
|
98
|
+
},
|
|
99
|
+
"./dashboard.feature": {
|
|
100
|
+
"types": "./dist/dashboard.feature.d.ts",
|
|
101
|
+
"bun": "./dist/dashboard.feature.js",
|
|
102
|
+
"node": "./dist/node/dashboard.feature.mjs",
|
|
103
|
+
"browser": "./dist/browser/dashboard.feature.js",
|
|
104
|
+
"default": "./dist/dashboard.feature.js"
|
|
105
|
+
},
|
|
106
|
+
"./dashboard/dashboard.enum": {
|
|
107
|
+
"types": "./dist/dashboard/dashboard.enum.d.ts",
|
|
108
|
+
"bun": "./dist/dashboard/dashboard.enum.js",
|
|
109
|
+
"node": "./dist/node/dashboard/dashboard.enum.mjs",
|
|
110
|
+
"browser": "./dist/browser/dashboard/dashboard.enum.js",
|
|
111
|
+
"default": "./dist/dashboard/dashboard.enum.js"
|
|
112
|
+
},
|
|
113
|
+
"./dashboard/dashboard.operation": {
|
|
114
|
+
"types": "./dist/dashboard/dashboard.operation.d.ts",
|
|
115
|
+
"bun": "./dist/dashboard/dashboard.operation.js",
|
|
116
|
+
"node": "./dist/node/dashboard/dashboard.operation.mjs",
|
|
117
|
+
"browser": "./dist/browser/dashboard/dashboard.operation.js",
|
|
118
|
+
"default": "./dist/dashboard/dashboard.operation.js"
|
|
119
|
+
},
|
|
120
|
+
"./dashboard/dashboard.presentation": {
|
|
121
|
+
"types": "./dist/dashboard/dashboard.presentation.d.ts",
|
|
122
|
+
"bun": "./dist/dashboard/dashboard.presentation.js",
|
|
123
|
+
"node": "./dist/node/dashboard/dashboard.presentation.mjs",
|
|
124
|
+
"browser": "./dist/browser/dashboard/dashboard.presentation.js",
|
|
125
|
+
"default": "./dist/dashboard/dashboard.presentation.js"
|
|
126
|
+
},
|
|
127
|
+
"./dashboard/dashboard.schema": {
|
|
128
|
+
"types": "./dist/dashboard/dashboard.schema.d.ts",
|
|
129
|
+
"bun": "./dist/dashboard/dashboard.schema.js",
|
|
130
|
+
"node": "./dist/node/dashboard/dashboard.schema.mjs",
|
|
131
|
+
"browser": "./dist/browser/dashboard/dashboard.schema.js",
|
|
132
|
+
"default": "./dist/dashboard/dashboard.schema.js"
|
|
133
|
+
},
|
|
134
|
+
"./dashboard/dashboard.test-spec": {
|
|
135
|
+
"types": "./dist/dashboard/dashboard.test-spec.d.ts",
|
|
136
|
+
"bun": "./dist/dashboard/dashboard.test-spec.js",
|
|
137
|
+
"node": "./dist/node/dashboard/dashboard.test-spec.mjs",
|
|
138
|
+
"browser": "./dist/browser/dashboard/dashboard.test-spec.js",
|
|
139
|
+
"default": "./dist/dashboard/dashboard.test-spec.js"
|
|
140
|
+
},
|
|
141
|
+
"./dashboard/index": {
|
|
142
|
+
"types": "./dist/dashboard/index.d.ts",
|
|
143
|
+
"bun": "./dist/dashboard/index.js",
|
|
144
|
+
"node": "./dist/node/dashboard/index.mjs",
|
|
145
|
+
"browser": "./dist/browser/dashboard/index.js",
|
|
146
|
+
"default": "./dist/dashboard/index.js"
|
|
147
|
+
},
|
|
148
|
+
"./datasource/posthog-datasource": {
|
|
149
|
+
"types": "./dist/datasource/posthog-datasource.d.ts",
|
|
150
|
+
"bun": "./dist/datasource/posthog-datasource.js",
|
|
151
|
+
"node": "./dist/node/datasource/posthog-datasource.mjs",
|
|
152
|
+
"browser": "./dist/browser/datasource/posthog-datasource.js",
|
|
153
|
+
"default": "./dist/datasource/posthog-datasource.js"
|
|
154
|
+
},
|
|
155
|
+
"./docs": {
|
|
156
|
+
"types": "./dist/docs/index.d.ts",
|
|
157
|
+
"bun": "./dist/docs/index.js",
|
|
158
|
+
"node": "./dist/node/docs/index.mjs",
|
|
159
|
+
"browser": "./dist/browser/docs/index.js",
|
|
160
|
+
"default": "./dist/docs/index.js"
|
|
161
|
+
},
|
|
162
|
+
"./docs/analytics-dashboard.docblock": {
|
|
163
|
+
"types": "./dist/docs/analytics-dashboard.docblock.d.ts",
|
|
164
|
+
"bun": "./dist/docs/analytics-dashboard.docblock.js",
|
|
165
|
+
"node": "./dist/node/docs/analytics-dashboard.docblock.mjs",
|
|
166
|
+
"browser": "./dist/browser/docs/analytics-dashboard.docblock.js",
|
|
167
|
+
"default": "./dist/docs/analytics-dashboard.docblock.js"
|
|
168
|
+
},
|
|
169
|
+
"./docs/index": {
|
|
170
|
+
"types": "./dist/docs/index.d.ts",
|
|
171
|
+
"bun": "./dist/docs/index.js",
|
|
172
|
+
"node": "./dist/node/docs/index.mjs",
|
|
173
|
+
"browser": "./dist/browser/docs/index.js",
|
|
174
|
+
"default": "./dist/docs/index.js"
|
|
175
|
+
},
|
|
176
|
+
"./events": {
|
|
177
|
+
"types": "./dist/events.d.ts",
|
|
178
|
+
"bun": "./dist/events.js",
|
|
179
|
+
"node": "./dist/node/events.mjs",
|
|
180
|
+
"browser": "./dist/browser/events.js",
|
|
181
|
+
"default": "./dist/events.js"
|
|
182
|
+
},
|
|
183
|
+
"./example": {
|
|
184
|
+
"types": "./dist/example.d.ts",
|
|
185
|
+
"bun": "./dist/example.js",
|
|
186
|
+
"node": "./dist/node/example.mjs",
|
|
187
|
+
"browser": "./dist/browser/example.js",
|
|
188
|
+
"default": "./dist/example.js"
|
|
189
|
+
},
|
|
190
|
+
"./handlers": {
|
|
191
|
+
"types": "./dist/handlers/index.d.ts",
|
|
192
|
+
"bun": "./dist/handlers/index.js",
|
|
193
|
+
"node": "./dist/node/handlers/index.mjs",
|
|
194
|
+
"browser": "./dist/browser/handlers/index.js",
|
|
195
|
+
"default": "./dist/handlers/index.js"
|
|
196
|
+
},
|
|
197
|
+
"./handlers/analytics.handlers": {
|
|
198
|
+
"types": "./dist/handlers/analytics.handlers.d.ts",
|
|
199
|
+
"bun": "./dist/handlers/analytics.handlers.js",
|
|
200
|
+
"node": "./dist/node/handlers/analytics.handlers.mjs",
|
|
201
|
+
"browser": "./dist/browser/handlers/analytics.handlers.js",
|
|
202
|
+
"default": "./dist/handlers/analytics.handlers.js"
|
|
203
|
+
},
|
|
204
|
+
"./handlers/index": {
|
|
205
|
+
"types": "./dist/handlers/index.d.ts",
|
|
206
|
+
"bun": "./dist/handlers/index.js",
|
|
207
|
+
"node": "./dist/node/handlers/index.mjs",
|
|
208
|
+
"browser": "./dist/browser/handlers/index.js",
|
|
209
|
+
"default": "./dist/handlers/index.js"
|
|
210
|
+
},
|
|
211
|
+
"./handlers/query.handlers": {
|
|
212
|
+
"types": "./dist/handlers/query.handlers.d.ts",
|
|
213
|
+
"bun": "./dist/handlers/query.handlers.js",
|
|
214
|
+
"node": "./dist/node/handlers/query.handlers.mjs",
|
|
215
|
+
"browser": "./dist/browser/handlers/query.handlers.js",
|
|
216
|
+
"default": "./dist/handlers/query.handlers.js"
|
|
217
|
+
},
|
|
218
|
+
"./query": {
|
|
219
|
+
"types": "./dist/query/index.d.ts",
|
|
220
|
+
"bun": "./dist/query/index.js",
|
|
221
|
+
"node": "./dist/node/query/index.mjs",
|
|
222
|
+
"browser": "./dist/browser/query/index.js",
|
|
223
|
+
"default": "./dist/query/index.js"
|
|
224
|
+
},
|
|
225
|
+
"./query-engine": {
|
|
226
|
+
"types": "./dist/query-engine/index.d.ts",
|
|
227
|
+
"bun": "./dist/query-engine/index.js",
|
|
228
|
+
"node": "./dist/node/query-engine/index.mjs",
|
|
229
|
+
"browser": "./dist/browser/query-engine/index.js",
|
|
230
|
+
"default": "./dist/query-engine/index.js"
|
|
231
|
+
},
|
|
232
|
+
"./query-engine/index": {
|
|
233
|
+
"types": "./dist/query-engine/index.d.ts",
|
|
234
|
+
"bun": "./dist/query-engine/index.js",
|
|
235
|
+
"node": "./dist/node/query-engine/index.mjs",
|
|
236
|
+
"browser": "./dist/browser/query-engine/index.js",
|
|
237
|
+
"default": "./dist/query-engine/index.js"
|
|
238
|
+
},
|
|
239
|
+
"./query/index": {
|
|
240
|
+
"types": "./dist/query/index.d.ts",
|
|
241
|
+
"bun": "./dist/query/index.js",
|
|
242
|
+
"node": "./dist/node/query/index.mjs",
|
|
243
|
+
"browser": "./dist/browser/query/index.js",
|
|
244
|
+
"default": "./dist/query/index.js"
|
|
245
|
+
},
|
|
246
|
+
"./query/query.enum": {
|
|
247
|
+
"types": "./dist/query/query.enum.d.ts",
|
|
248
|
+
"bun": "./dist/query/query.enum.js",
|
|
249
|
+
"node": "./dist/node/query/query.enum.mjs",
|
|
250
|
+
"browser": "./dist/browser/query/query.enum.js",
|
|
251
|
+
"default": "./dist/query/query.enum.js"
|
|
252
|
+
},
|
|
253
|
+
"./query/query.operation": {
|
|
254
|
+
"types": "./dist/query/query.operation.d.ts",
|
|
255
|
+
"bun": "./dist/query/query.operation.js",
|
|
256
|
+
"node": "./dist/node/query/query.operation.mjs",
|
|
257
|
+
"browser": "./dist/browser/query/query.operation.js",
|
|
258
|
+
"default": "./dist/query/query.operation.js"
|
|
259
|
+
},
|
|
260
|
+
"./query/query.presentation": {
|
|
261
|
+
"types": "./dist/query/query.presentation.d.ts",
|
|
262
|
+
"bun": "./dist/query/query.presentation.js",
|
|
263
|
+
"node": "./dist/node/query/query.presentation.mjs",
|
|
264
|
+
"browser": "./dist/browser/query/query.presentation.js",
|
|
265
|
+
"default": "./dist/query/query.presentation.js"
|
|
266
|
+
},
|
|
267
|
+
"./query/query.schema": {
|
|
268
|
+
"types": "./dist/query/query.schema.d.ts",
|
|
269
|
+
"bun": "./dist/query/query.schema.js",
|
|
270
|
+
"node": "./dist/node/query/query.schema.mjs",
|
|
271
|
+
"browser": "./dist/browser/query/query.schema.js",
|
|
272
|
+
"default": "./dist/query/query.schema.js"
|
|
273
|
+
},
|
|
274
|
+
"./query/query.test-spec": {
|
|
275
|
+
"types": "./dist/query/query.test-spec.d.ts",
|
|
276
|
+
"bun": "./dist/query/query.test-spec.js",
|
|
277
|
+
"node": "./dist/node/query/query.test-spec.mjs",
|
|
278
|
+
"browser": "./dist/browser/query/query.test-spec.js",
|
|
279
|
+
"default": "./dist/query/query.test-spec.js"
|
|
280
|
+
},
|
|
281
|
+
"./seeders": {
|
|
282
|
+
"types": "./dist/seeders/index.d.ts",
|
|
283
|
+
"bun": "./dist/seeders/index.js",
|
|
284
|
+
"node": "./dist/node/seeders/index.mjs",
|
|
285
|
+
"browser": "./dist/browser/seeders/index.js",
|
|
286
|
+
"default": "./dist/seeders/index.js"
|
|
287
|
+
},
|
|
288
|
+
"./seeders/index": {
|
|
289
|
+
"types": "./dist/seeders/index.d.ts",
|
|
290
|
+
"bun": "./dist/seeders/index.js",
|
|
291
|
+
"node": "./dist/node/seeders/index.mjs",
|
|
292
|
+
"browser": "./dist/browser/seeders/index.js",
|
|
293
|
+
"default": "./dist/seeders/index.js"
|
|
294
|
+
},
|
|
295
|
+
"./ui": {
|
|
296
|
+
"types": "./dist/ui/index.d.ts",
|
|
297
|
+
"bun": "./dist/ui/index.js",
|
|
298
|
+
"node": "./dist/node/ui/index.mjs",
|
|
299
|
+
"browser": "./dist/browser/ui/index.js",
|
|
300
|
+
"default": "./dist/ui/index.js"
|
|
301
|
+
},
|
|
302
|
+
"./ui/AnalyticsDashboard": {
|
|
303
|
+
"types": "./dist/ui/AnalyticsDashboard.d.ts",
|
|
304
|
+
"bun": "./dist/ui/AnalyticsDashboard.js",
|
|
305
|
+
"node": "./dist/node/ui/AnalyticsDashboard.mjs",
|
|
306
|
+
"browser": "./dist/browser/ui/AnalyticsDashboard.js",
|
|
307
|
+
"default": "./dist/ui/AnalyticsDashboard.js"
|
|
308
|
+
},
|
|
309
|
+
"./ui/hooks": {
|
|
310
|
+
"types": "./dist/ui/hooks/index.d.ts",
|
|
311
|
+
"bun": "./dist/ui/hooks/index.js",
|
|
312
|
+
"node": "./dist/node/ui/hooks/index.mjs",
|
|
313
|
+
"browser": "./dist/browser/ui/hooks/index.js",
|
|
314
|
+
"default": "./dist/ui/hooks/index.js"
|
|
315
|
+
},
|
|
316
|
+
"./ui/hooks/index": {
|
|
317
|
+
"types": "./dist/ui/hooks/index.d.ts",
|
|
318
|
+
"bun": "./dist/ui/hooks/index.js",
|
|
319
|
+
"node": "./dist/node/ui/hooks/index.mjs",
|
|
320
|
+
"browser": "./dist/browser/ui/hooks/index.js",
|
|
321
|
+
"default": "./dist/ui/hooks/index.js"
|
|
322
|
+
},
|
|
323
|
+
"./ui/hooks/useAnalyticsData": {
|
|
324
|
+
"types": "./dist/ui/hooks/useAnalyticsData.d.ts",
|
|
325
|
+
"bun": "./dist/ui/hooks/useAnalyticsData.js",
|
|
326
|
+
"node": "./dist/node/ui/hooks/useAnalyticsData.mjs",
|
|
327
|
+
"browser": "./dist/browser/ui/hooks/useAnalyticsData.js",
|
|
328
|
+
"default": "./dist/ui/hooks/useAnalyticsData.js"
|
|
329
|
+
},
|
|
330
|
+
"./ui/index": {
|
|
331
|
+
"types": "./dist/ui/index.d.ts",
|
|
332
|
+
"bun": "./dist/ui/index.js",
|
|
333
|
+
"node": "./dist/node/ui/index.mjs",
|
|
334
|
+
"browser": "./dist/browser/ui/index.js",
|
|
335
|
+
"default": "./dist/ui/index.js"
|
|
336
|
+
},
|
|
337
|
+
"./ui/renderers": {
|
|
338
|
+
"types": "./dist/ui/renderers/index.d.ts",
|
|
339
|
+
"bun": "./dist/ui/renderers/index.js",
|
|
340
|
+
"node": "./dist/node/ui/renderers/index.mjs",
|
|
341
|
+
"browser": "./dist/browser/ui/renderers/index.js",
|
|
342
|
+
"default": "./dist/ui/renderers/index.js"
|
|
343
|
+
},
|
|
344
|
+
"./ui/renderers/analytics.markdown": {
|
|
345
|
+
"types": "./dist/ui/renderers/analytics.markdown.d.ts",
|
|
346
|
+
"bun": "./dist/ui/renderers/analytics.markdown.js",
|
|
347
|
+
"node": "./dist/node/ui/renderers/analytics.markdown.mjs",
|
|
348
|
+
"browser": "./dist/browser/ui/renderers/analytics.markdown.js",
|
|
349
|
+
"default": "./dist/ui/renderers/analytics.markdown.js"
|
|
350
|
+
},
|
|
351
|
+
"./ui/renderers/index": {
|
|
352
|
+
"types": "./dist/ui/renderers/index.d.ts",
|
|
353
|
+
"bun": "./dist/ui/renderers/index.js",
|
|
354
|
+
"node": "./dist/node/ui/renderers/index.mjs",
|
|
355
|
+
"browser": "./dist/browser/ui/renderers/index.js",
|
|
356
|
+
"default": "./dist/ui/renderers/index.js"
|
|
357
|
+
}
|
|
91
358
|
},
|
|
92
359
|
"registry": "https://registry.npmjs.org/"
|
|
93
360
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.enum.js","names":[],"sources":["../../src/dashboard/dashboard.enum.ts"],"sourcesContent":["import { defineEnum } from '@contractspec/lib.schema';\n\n/**\n * Dashboard status enum.\n */\nexport const DashboardStatusEnum = defineEnum('DashboardStatus', [\n 'DRAFT',\n 'PUBLISHED',\n 'ARCHIVED',\n]);\n\n/**\n * Widget type enum.\n */\nexport const WidgetTypeEnum = defineEnum('WidgetType', [\n 'LINE_CHART',\n 'BAR_CHART',\n 'PIE_CHART',\n 'AREA_CHART',\n 'SCATTER_PLOT',\n 'METRIC',\n 'TABLE',\n 'HEATMAP',\n 'FUNNEL',\n 'MAP',\n 'TEXT',\n 'EMBED',\n]);\n\n/**\n * Refresh interval enum.\n */\nexport const RefreshIntervalEnum = defineEnum('RefreshInterval', [\n 'NONE',\n 'MINUTE',\n 'FIVE_MINUTES',\n 'FIFTEEN_MINUTES',\n 'HOUR',\n 'DAY',\n]);\n"],"mappings":";;;;;;AAKA,MAAa,sBAAsB,WAAW,mBAAmB;CAC/D;CACA;CACA;CACD,CAAC;;;;AAKF,MAAa,iBAAiB,WAAW,cAAc;CACrD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;;;;AAKF,MAAa,sBAAsB,WAAW,mBAAmB;CAC/D;CACA;CACA;CACA;CACA;CACA;CACD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.operation.js","names":[],"sources":["../../src/dashboard/dashboard.operation.ts"],"sourcesContent":["import {\n defineCommand,\n defineQuery,\n} from '@contractspec/lib.contracts/operations';\nimport {\n DashboardModel,\n WidgetModel,\n CreateDashboardInputModel,\n AddWidgetInputModel,\n ListDashboardsInputModel,\n ListDashboardsOutputModel,\n GetDashboardInputModel,\n} from './dashboard.schema';\n\nconst OWNERS = ['@example.analytics-dashboard'] as const;\n\n/**\n * Create a new analytics dashboard.\n */\nexport const CreateDashboardContract = defineCommand({\n meta: {\n key: 'analytics.dashboard.create',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['analytics', 'dashboard', 'create'],\n description: 'Create a new analytics dashboard.',\n goal: 'Allow users to create custom dashboards.',\n context: 'Dashboard management.',\n },\n io: { input: CreateDashboardInputModel, output: DashboardModel },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'analytics.dashboard.created',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['analytics', 'dashboard', 'created'],\n when: 'Dashboard created',\n payload: DashboardModel,\n },\n ],\n audit: ['analytics.dashboard.created'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'create-dashboard-happy-path',\n given: ['User is authenticated'],\n when: ['User submits valid dashboard configuration'],\n then: ['Dashboard is created', 'DashboardCreated event is emitted'],\n },\n ],\n examples: [\n {\n key: 'create-basic',\n input: {\n name: 'Revenue Dashboard',\n description: 'Monthly revenue metrics',\n },\n output: { id: 'dash-123', name: 'Revenue Dashboard', widgets: [] },\n },\n ],\n },\n});\n\n/**\n * Add a widget to a dashboard.\n */\nexport const AddWidgetContract = defineCommand({\n meta: {\n key: 'analytics.widget.add',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['analytics', 'widget', 'add'],\n description: 'Add a widget to a dashboard.',\n goal: 'Allow users to add visualizations.',\n context: 'Dashboard editor.',\n },\n io: { input: AddWidgetInputModel, output: WidgetModel },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'analytics.widget.added',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['analytics', 'widget', 'added'],\n when: 'Widget added',\n payload: WidgetModel,\n },\n ],\n },\n acceptance: {\n scenarios: [\n {\n key: 'add-widget-happy-path',\n given: ['Dashboard exists'],\n when: ['User adds widget to dashboard'],\n then: ['Widget is created', 'WidgetAdded event is emitted'],\n },\n ],\n examples: [\n {\n key: 'add-chart-widget',\n input: {\n dashboardId: 'dash-123',\n type: 'chart',\n queryId: 'query-456',\n config: { chartType: 'bar' },\n },\n output: { id: 'widget-789', type: 'chart', dashboardId: 'dash-123' },\n },\n ],\n },\n});\n\n/**\n * List dashboards.\n */\nexport const ListDashboardsContract = defineQuery({\n meta: {\n key: 'analytics.dashboard.list',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['analytics', 'dashboard', 'list'],\n description: 'List dashboards.',\n goal: 'Browse available dashboards.',\n context: 'Dashboard listing.',\n },\n io: { input: ListDashboardsInputModel, output: ListDashboardsOutputModel },\n policy: { auth: 'user' },\n acceptance: {\n scenarios: [\n {\n key: 'list-dashboards-happy-path',\n given: ['User has dashboards'],\n when: ['User lists dashboards'],\n then: ['Paginated list of dashboards is returned'],\n },\n ],\n examples: [\n {\n key: 'list-basic',\n input: { limit: 10, offset: 0 },\n output: { items: [], total: 0, hasMore: false },\n },\n ],\n },\n});\n\n/**\n * Get a dashboard with widgets.\n */\nexport const GetDashboardContract = defineQuery({\n meta: {\n key: 'analytics.dashboard.get',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['analytics', 'dashboard', 'get'],\n description: 'Get a dashboard with widgets.',\n goal: 'Load dashboard for viewing.',\n context: 'Dashboard view.',\n },\n io: { input: GetDashboardInputModel, output: DashboardModel },\n policy: { auth: 'anonymous' },\n acceptance: {\n scenarios: [\n {\n key: 'get-dashboard-happy-path',\n given: ['Dashboard exists'],\n when: ['User requests dashboard by ID'],\n then: ['Dashboard with widgets is returned'],\n },\n ],\n examples: [\n {\n key: 'get-basic',\n input: { dashboardId: 'dash-123' },\n output: { id: 'dash-123', name: 'Revenue Dashboard', widgets: [] },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qCAAqC;GAC7C,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO,EAAE,aAAa,YAAY;GAClC,QAAQ;IAAE,IAAI;IAAY,MAAM;IAAqB,SAAS,EAAE;IAAE;GACnE,CACF;EACF;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.presentation.js","names":[],"sources":["../../src/dashboard/dashboard.presentation.ts"],"sourcesContent":["import { definePresentation, StabilityEnum } from '@contractspec/lib.contracts';\nimport { DashboardModel } from './dashboard.schema';\n\nexport const DashboardsListPresentation = definePresentation({\n meta: {\n key: 'analytics.dashboard.viewList',\n version: '1.0.0',\n title: 'Dashboards List',\n description: 'List of analytics dashboards',\n domain: 'analytics',\n owners: ['@analytics-dashboard'],\n tags: ['analytics', 'dashboards', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Show users available analytics dashboards.',\n context: 'The main dashboard management view.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'DashboardsList',\n props: DashboardModel,\n },\n targets: ['react', 'markdown', 'application/json'],\n policy: {\n flags: ['analytics.dashboards.enabled'],\n },\n});\n\nexport const DashboardViewPresentation = definePresentation({\n meta: {\n key: 'analytics.dashboard.view',\n version: '1.0.0',\n title: 'Dashboard View',\n description: 'View a single dashboard with widgets',\n domain: 'analytics',\n owners: ['@analytics-dashboard'],\n tags: ['analytics', 'dashboard', 'view'],\n stability: StabilityEnum.Experimental,\n goal: 'Render a dashboard with its visualizations and data.',\n context: 'The interactive viewing interface.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'DashboardView',\n props: DashboardModel,\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['analytics.dashboards.enabled'],\n },\n});\n\nexport const DashboardEditorPresentation = definePresentation({\n meta: {\n key: 'analytics.dashboard.editor',\n version: '1.0.0',\n title: 'Dashboard Editor',\n description: 'Edit dashboard configuration and widgets',\n domain: 'analytics',\n owners: ['@analytics-dashboard'],\n tags: ['analytics', 'dashboard', 'editor'],\n stability: StabilityEnum.Experimental,\n goal: 'Configure dashboard layout and widget settings.',\n context: 'Management tool for analysts.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'DashboardEditor',\n props: DashboardModel,\n },\n targets: ['react'],\n policy: {\n flags: ['analytics.dashboards.enabled'],\n },\n});\n"],"mappings":";;;;AAGA,MAAa,6BAA6B,mBAAmB;CAC3D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,uBAAuB;EAChC,MAAM;GAAC;GAAa;GAAc;GAAO;EACzC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS;EAAC;EAAS;EAAY;EAAmB;CAClD,QAAQ,EACN,OAAO,CAAC,+BAA+B,EACxC;CACF,CAAC;AAEF,MAAa,4BAA4B,mBAAmB;CAC1D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,uBAAuB;EAChC,MAAM;GAAC;GAAa;GAAa;GAAO;EACxC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,+BAA+B,EACxC;CACF,CAAC;AAEF,MAAa,8BAA8B,mBAAmB;CAC5D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,uBAAuB;EAChC,MAAM;GAAC;GAAa;GAAa;GAAS;EAC1C,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,QAAQ;CAClB,QAAQ,EACN,OAAO,CAAC,+BAA+B,EACxC;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.schema.js","names":[],"sources":["../../src/dashboard/dashboard.schema.ts"],"sourcesContent":["import { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';\nimport {\n DashboardStatusEnum,\n WidgetTypeEnum,\n RefreshIntervalEnum,\n} from './dashboard.enum';\n\n/**\n * A dashboard widget.\n */\nexport const WidgetModel = defineSchemaModel({\n name: 'WidgetModel',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n dashboardId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n type: { type: WidgetTypeEnum, isOptional: false },\n gridX: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n gridY: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n gridWidth: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n gridHeight: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n queryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n config: { type: ScalarTypeEnum.JSON(), isOptional: true },\n },\n});\n\n/**\n * An analytics dashboard.\n */\nexport const DashboardModel = defineSchemaModel({\n name: 'DashboardModel',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n status: { type: DashboardStatusEnum, isOptional: false },\n refreshInterval: { type: RefreshIntervalEnum, isOptional: false },\n isPublic: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n widgets: { type: WidgetModel, isArray: true, isOptional: true },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Input for creating a dashboard.\n */\nexport const CreateDashboardInputModel = defineSchemaModel({\n name: 'CreateDashboardInput',\n fields: {\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n slug: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n refreshInterval: { type: RefreshIntervalEnum, isOptional: true },\n dateRange: { type: ScalarTypeEnum.JSON(), isOptional: true },\n },\n});\n\n/**\n * Input for adding a widget.\n */\nexport const AddWidgetInputModel = defineSchemaModel({\n name: 'AddWidgetInput',\n fields: {\n dashboardId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n type: { type: WidgetTypeEnum, isOptional: false },\n gridX: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n gridY: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n gridWidth: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n gridHeight: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n queryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n config: { type: ScalarTypeEnum.JSON(), isOptional: true },\n },\n});\n\n/**\n * Input for listing dashboards.\n */\nexport const ListDashboardsInputModel = defineSchemaModel({\n name: 'ListDashboardsInput',\n fields: {\n status: { type: DashboardStatusEnum, isOptional: true },\n search: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n limit: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 20,\n },\n offset: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 0,\n },\n },\n});\n\n/**\n * Output for listing dashboards.\n */\nexport const ListDashboardsOutputModel = defineSchemaModel({\n name: 'ListDashboardsOutput',\n fields: {\n dashboards: { type: DashboardModel, isArray: true, isOptional: false },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n },\n});\n\n/**\n * Input for getting a dashboard.\n */\nexport const GetDashboardInputModel = defineSchemaModel({\n name: 'GetDashboardInput',\n fields: {\n dashboardId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n shareToken: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n"],"mappings":";;;;;;;AAUA,MAAa,cAAc,kBAAkB;CAC3C,MAAM;CACN,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EAC1E,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,MAAM;GAAE,MAAM;GAAgB,YAAY;GAAO;EACjD,OAAO;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAO;EACjE,OAAO;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAO;EACjE,WAAW;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAO;EACrE,YAAY;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAO;EACtE,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACrE,QAAQ;GAAE,MAAM,eAAe,MAAM;GAAE,YAAY;GAAM;EAC1D;CACF,CAAC;;;;AAKF,MAAa,iBAAiB,kBAAkB;CAC9C,MAAM;CACN,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACzE,QAAQ;GAAE,MAAM;GAAqB,YAAY;GAAO;EACxD,iBAAiB;GAAE,MAAM;GAAqB,YAAY;GAAO;EACjE,UAAU;GAAE,MAAM,eAAe,SAAS;GAAE,YAAY;GAAO;EAC/D,SAAS;GAAE,MA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D,QAAQ;GACN,MAAM,eAAe,cAAc;GACnC,YAAY;GACZ,cAAc;GACf;EACF;CACF,CAAC;;;;AAKF,MAAa,4BAA4B,kBAAkB;CACzD,MAAM;CACN,QAAQ;EACN,YAAY;GAAE,MAAM;GAAgB,SAAS;GAAM,YAAY;GAAO;EACtE,OAAO;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;;;;AAKF,MAAa,yBAAyB,kBAAkB;CACtD,MAAM;CACN,QAAQ;EACN,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACzE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EAClE,YAAY;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACzE;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.test-spec.js","names":[],"sources":["../../src/dashboard/dashboard.test-spec.ts"],"sourcesContent":["import { defineTestSpec } from '@contractspec/lib.contracts';\n\nexport const CreateDashboardTest = defineTestSpec({\n meta: {\n key: 'analytics.dashboard.create.test',\n version: '1.0.0',\n title: 'Create Dashboard Test',\n description: 'Verifies dashboard creation flow',\n owners: ['@example.analytics-dashboard'],\n tags: ['analytics', 'dashboard', 'test'],\n stability: 'stable',\n },\n target: {\n type: 'operation',\n operation: { key: 'analytics.dashboard.create', version: '1.0.0' },\n },\n scenarios: [\n {\n key: 'success',\n description: 'Successfully create a dashboard',\n when: {\n operation: { key: 'analytics.dashboard.create', version: '1.0.0' },\n input: {\n name: 'Test Dashboard',\n description: 'Test Description',\n },\n },\n then: [\n {\n type: 'expectOutput',\n match: {\n name: 'Test Dashboard',\n },\n },\n ],\n },\n {\n key: 'error-invalid-input',\n description: 'Fail to create dashboard with invalid input',\n when: {\n operation: { key: 'analytics.dashboard.create', version: '1.0.0' },\n input: {\n name: '',\n },\n },\n then: [\n {\n type: 'expectError',\n messageIncludes: 'VALIDATION_ERROR',\n },\n ],\n },\n ],\n});\n\nexport const ListDashboardsTest = defineTestSpec({\n meta: {\n key: 'analytics.dashboard.list.test',\n version: '1.0.0',\n title: 'List Dashboards Test',\n description: 'Verifies dashboard listing',\n owners: ['@example.analytics-dashboard'],\n tags: ['analytics', 'dashboard', 'test'],\n stability: 'stable',\n },\n target: {\n type: 'operation',\n operation: { key: 'analytics.dashboard.list', version: '1.0.0' },\n },\n scenarios: [\n {\n key: 'success',\n description: 'Successfully list dashboards',\n when: {\n operation: { key: 'analytics.dashboard.list', version: '1.0.0' },\n input: { limit: 10, offset: 0 },\n },\n then: [\n {\n type: 'expectOutput',\n match: {\n items: [],\n total: 0,\n },\n },\n ],\n },\n {\n key: 'error-invalid-format',\n description: 'Fail with invalid pagination',\n when: {\n operation: { key: 'analytics.dashboard.list', version: '1.0.0' },\n input: { limit: -1 },\n },\n then: [\n {\n type: 'expectError',\n messageIncludes: 'VALIDATION_ERROR',\n },\n ],\n },\n ],\n});\n\nexport const GetDashboardTest = defineTestSpec({\n meta: {\n key: 'analytics.dashboard.get.test',\n version: '1.0.0',\n title: 'Get Dashboard Test',\n description: 'Verifies dashboard retrieval',\n owners: ['@example.analytics-dashboard'],\n tags: ['analytics', 'dashboard', 'test'],\n stability: 'stable',\n },\n target: {\n type: 'operation',\n operation: { key: 'analytics.dashboard.get', version: '1.0.0' },\n },\n scenarios: [\n {\n key: 'success',\n description: 'Successfully get dashboard',\n when: {\n operation: { key: 'analytics.dashboard.get', version: '1.0.0' },\n input: { dashboardId: 'dash-123' },\n },\n then: [\n {\n type: 'expectOutput',\n match: {\n id: 'dash-123',\n },\n },\n ],\n },\n {\n key: 'error-not-found',\n description: 'Fail when dashboard not found',\n when: {\n operation: { key: 'analytics.dashboard.get', version: '1.0.0' },\n input: { dashboardId: 'dash-999' },\n },\n then: [\n {\n type: 'expectError',\n messageIncludes: 'NOT_FOUND',\n },\n ],\n },\n ],\n});\n\nexport const AddWidgetTest = defineTestSpec({\n meta: {\n key: 'analytics.widget.add.test',\n version: '1.0.0',\n title: 'Add Widget Test',\n description: 'Verifies adding widget to dashboard',\n owners: ['@example.analytics-dashboard'],\n tags: ['analytics', 'widget', 'test'],\n stability: 'stable',\n },\n target: {\n type: 'operation',\n operation: { key: 'analytics.widget.add', version: '1.0.0' },\n },\n scenarios: [\n {\n key: 'success',\n description: 'Successfully add widget',\n when: {\n operation: { key: 'analytics.widget.add', version: '1.0.0' },\n input: {\n dashboardId: 'dash-123',\n type: 'chart',\n queryId: 'q-1',\n config: {},\n },\n },\n then: [\n {\n type: 'expectOutput',\n match: {\n type: 'chart',\n dashboardId: 'dash-123',\n },\n },\n ],\n },\n {\n key: 'error-dashboard-not-found',\n description: 'Fail when dashboard does not exist',\n when: {\n operation: { key: 'analytics.widget.add', version: '1.0.0' },\n input: {\n dashboardId: 'dash-999',\n type: 'chart',\n queryId: 'q-1',\n config: {},\n },\n },\n then: [\n {\n type: 'expectError',\n messageIncludes: 'NOT_FOUND',\n },\n ],\n },\n ],\n});\n"],"mappings":";;;AAEA,MAAa,sBAAsB,eAAe;CAChD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ,CAAC,+BAA+B;EACxC,MAAM;GAAC;GAAa;GAAa;GAAO;EACxC,WAAW;EACZ;CACD,QAAQ;EACN,MAAM;EACN,WAAW;GAAE,KAAK;GAA8B,SAAS;GAAS;EACnE;CACD,WAAW,CACT;EACE,KAAK;EACL,aAAa;EACb,MAAM;GACJ,WAAW;IAAE,KAAK;IAA8B,SAAS;IAAS;GAClE,OAAO;IACL,MAAM;IACN,aAAa;IACd;GACF;EACD,MAAM,CACJ;GACE,MAAM;GACN,OAAO,EACL,MAAM,kBACP;GACF,CACF;EACF,EACD;EACE,KAAK;EACL,aAAa;EACb,MAAM;GACJ,WAAW;IAAE,KAAK;IAA8B,SAAS;IAAS;GAClE,OAAO,EACL,MAAM,IACP;GACF;EACD,MAAM,CACJ;GACE,MAAM;GACN,iBAAi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nC;EACD,MAAM,CACJ;GACE,MAAM;GACN,iBAAiB;GAClB,CACF;EACF,CACF;CACF,CAAC;AAEF,MAAa,gBAAgB,eAAe;CAC1C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ,CAAC,+BAA+B;EACxC,MAAM;GAAC;GAAa;GAAU;GAAO;EACrC,WAAW;EACZ;CACD,QAAQ;EACN,MAAM;EACN,WAAW;GAAE,KAAK;GAAwB,SAAS;GAAS;EAC7D;CACD,WAAW,CACT;EACE,KAAK;EACL,aAAa;EACb,MAAM;GACJ,WAAW;IAAE,KAAK;IAAwB,SAAS;IAAS;GAC5D,OAAO;IACL,aAAa;IACb,MAAM;IACN,SAAS;IACT,QAAQ,EAAE;IACX;GACF;EACD,MAAM,CACJ;GACE,MAAM;GACN,OAAO;IACL,MAAM;IACN,aAAa;IACd;GACF,CACF;EACF,EACD;EACE,KAAK;EACL,aAAa;EACb,MAAM;GACJ,WAAW;IAAE,KAAK;IAAwB,SAAS;IAAS;GAC5D,OAAO;IACL,aAAa;IACb,MAAM;IACN,SAAS;IACT,QAAQ,EAAE;IACX;GACF;EACD,MAAM,CACJ;GACE,MAAM;GACN,iBAAiB;GAClB,CACF;EACF,CACF;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.feature.js","names":[],"sources":["../src/dashboard.feature.ts"],"sourcesContent":["/**\n * Analytics Dashboard Feature Module\n *\n * Comprehensive analytics and dashboarding solution for data visualization\n * and reporting across the platform.\n *\n * This feature module bundles all dashboard and query operations, events,\n * and presentations into an installable feature following FeatureModuleSpec.\n */\n\nimport { defineFeature } from '@contractspec/lib.contracts';\n\n// ============ Feature Definition ============\n\nexport const AnalyticsDashboardFeature = defineFeature({\n meta: {\n key: 'analytics-dashboard',\n version: '1.0.0',\n title: 'Analytics Dashboard',\n description: 'Analytics dashboards with customizable widgets and queries',\n domain: 'analytics',\n owners: ['@analytics-dashboard'],\n tags: ['analytics', 'dashboards', 'widgets', 'queries'],\n stability: 'experimental',\n },\n\n // ============ Contract Operations ============\n // All contract operations included in this feature (OpRef[])\n operations: [\n // Dashboard operations\n { key: 'analytics.dashboard.create', version: '1.0.0' },\n { key: 'analytics.dashboard.list', version: '1.0.0' },\n { key: 'analytics.dashboard.get', version: '1.0.0' },\n\n // Widget operations\n { key: 'analytics.widget.add', version: '1.0.0' },\n\n // Query operations\n { key: 'analytics.query.create', version: '1.0.0' },\n { key: 'analytics.query.execute', version: '1.0.0' },\n ],\n\n // ============ Events ============\n // Events emitted by this feature (EventRef[])\n events: [\n // Dashboard events\n { key: 'analytics.dashboard.created', version: '1.0.0' },\n\n // Widget events\n { key: 'analytics.widget.added', version: '1.0.0' },\n\n // Query events\n { key: 'analytics.query.created', version: '1.0.0' },\n ],\n\n // ============ Presentations ============\n // Presentations associated with this feature (PresentationRef[])\n presentations: [\n // Dashboard presentations\n { key: 'analytics.dashboard.viewList', version: '1.0.0' },\n { key: 'analytics.dashboard.view', version: '1.0.0' },\n { key: 'analytics.dashboard.editor', version: '1.0.0' },\n\n // Query presentations\n { key: 'analytics.query.list', version: '1.0.0' },\n { key: 'analytics.query.builder', version: '1.0.0' },\n ],\n\n // ============ Op-to-Presentation Links ============\n // Links operations to their primary presentations\n opToPresentation: [\n {\n op: { key: 'analytics.dashboard.list', version: '1.0.0' },\n pres: { key: 'analytics.dashboard.viewList', version: '1.0.0' },\n },\n {\n op: { key: 'analytics.dashboard.get', version: '1.0.0' },\n pres: { key: 'analytics.dashboard.view', version: '1.0.0' },\n },\n {\n op: { key: 'analytics.dashboard.create', version: '1.0.0' },\n pres: { key: 'analytics.dashboard.editor', version: '1.0.0' },\n },\n {\n op: { key: 'analytics.query.create', version: '1.0.0' },\n pres: { key: 'analytics.query.builder', version: '1.0.0' },\n },\n ],\n\n // ============ Presentation Targets ============\n // Target requirements for multi-surface rendering\n presentationsTargets: [\n {\n key: 'analytics.dashboard.viewList',\n version: '1.0.0',\n targets: ['react', 'markdown', 'application/json'],\n },\n {\n key: 'analytics.dashboard.view',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n {\n key: 'analytics.dashboard.editor',\n version: '1.0.0',\n targets: ['react'],\n },\n {\n key: 'analytics.query.builder',\n version: '1.0.0',\n targets: ['react'],\n },\n ],\n\n // ============ Capabilities ============\n // Capability requirements for this feature\n capabilities: {\n requires: [\n { key: 'identity', version: '1.0.0' },\n { key: 'metering', version: '1.0.0' },\n { key: 'audit-trail', version: '1.0.0' },\n ],\n },\n});\n"],"mappings":";;;;;;;;;;;;AAcA,MAAa,4BAA4B,cAAc;CACrD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,uBAAuB;EAChC,MAAM;GAAC;GAAa;GAAc;GAAW;GAAU;EACvD,WAAW;EACZ;CAID,YAAY;EAEV;GAAE,KAAK;GAA8B,SAAS;GAAS;EACvD;GAAE,KAAK;GAA4B,SAAS;GAAS;EACrD;GAAE,KAAK;GAA2B,SAAS;GAAS;EAGpD;GAAE,KAAK;GAAwB,SAAS;GAAS;EAGjD;GAAE,KAAK;GAA0B,SAAS;GAAS;EACnD;GAAE,KAAK;GAA2B,SAAS;GAAS;EACrD;CAID,QAAQ;EAEN;GAAE,KAAK;GAA+B,SAAS;GAAS;EAGxD;GAAE,KAAK;GAA0B,SAAS;GAAS;EAGnD;GAAE,KAAK;GAA2B,SAAS;GAAS;EACrD;CAID,eAAe;EAEb;GAAE,KAAK;GAAgC,SAAS;GAAS;EACzD;GAAE,KAAK;GAA4B,SAAS;GAAS;EACrD;GAAE,KAAK;GAA8B,SAAS;GAAS;EAGvD;GAAE,KAAK;GAAwB,SAAS;GAAS;EACjD;GAAE,KAAK;GAA2B,SAAS;GAAS;EACrD;CAID,kBAAkB;EAChB;GACE,IAAI;IAAE,KAAK;IAA4B,SAAS;IAAS;GACzD,MAAM;IAAE,KAAK;IAAgC,SAAS;IAAS;GAChE;EACD;GACE,IAAI;IAAE,KAAK;IAA2B,SAAS;IAAS;GACxD,MAAM;IAAE,KAAK;IAA4B,SAAS;IAAS;GAC5D;EACD;GACE,IAAI;IAAE,KAAK;IAA8B,SAAS;IAAS;GAC3D,MAAM;IAAE,KAAK;IAA8B,SAAS;IAAS;GAC9D;EACD;GACE,IAAI;IAAE,KAAK;IAA0B,SAAS;IAAS;GACvD,MAAM;IAAE,KAAK;IAA2B,SAAS;IAAS;GAC3D;EACF;CAID,sBAAsB;EACpB;GACE,KAAK;GACL,SAAS;GACT,SAAS;IAAC;IAAS;IAAY;IAAmB;GACnD;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,SAAS,WAAW;GAC/B;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,QAAQ;GACnB;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,QAAQ;GACnB;EACF;CAID,cAAc,EACZ,UAAU;EACR;GAAE,KAAK;GAAY,SAAS;GAAS;EACrC;GAAE,KAAK;GAAY,SAAS;GAAS;EACrC;GAAE,KAAK;GAAe,SAAS;GAAS;EACzC,EACF;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"analytics-dashboard.docblock.js","names":[],"sources":["../../src/docs/analytics-dashboard.docblock.ts"],"sourcesContent":["import type { DocBlock } from '@contractspec/lib.contracts/docs';\nimport { registerDocBlocks } from '@contractspec/lib.contracts/docs';\n\nconst analyticsDashboardDocBlocks: DocBlock[] = [\n {\n id: 'docs.examples.analytics-dashboard',\n title: 'Analytics Dashboard',\n summary:\n 'Multi-tenant analytics with dashboards, widgets, query builder, and scheduled reports built on the Event Bus.',\n kind: 'reference',\n visibility: 'public',\n route: '/docs/examples/analytics-dashboard',\n tags: ['analytics', 'dashboards', 'bi', 'queries'],\n body: `## Entities\n\n- Dashboard, Widget, Query, Report.\n- Widget/query configs stay declarative for regeneration.\n\n## Contracts\n\n- \\`analytics.dashboard.create\\`, \\`analytics.widget.add\\`, \\`analytics.query.execute\\`, \\`analytics.dashboard.get\\`.\n- Metrics can source from Event Bus schemas and Usage/Metering module.\n\n## Events\n\n- dashboard.created/updated, widget.added, report.scheduled/sent.\n- Emitted for audit + notification hooks.\n\n## UI / Presentations\n\n- Dashboard list, dashboard view, query builder, widget gallery.\n- Registered under \\`analytics-dashboard\\` template in Template Registry.\n\n## Notes\n\n- Enforce org scoping for multi-tenant isolation.\n- Use Feature Flags for beta widgets; Metering to track query volume.\n`,\n },\n {\n id: 'docs.examples.analytics-dashboard.goal',\n title: 'Analytics Dashboard — Goal',\n summary: 'Why this template matters and what success looks like.',\n kind: 'goal',\n visibility: 'public',\n route: '/docs/examples/analytics-dashboard/goal',\n tags: ['analytics', 'goal'],\n body: `## Why it matters\n- Give teams a regenerable analytics workspace that stays in sync with Event Bus, Usage/Metering, and presentations.\n- Avoid dashboard drift by keeping schema-first widgets/queries.\n\n## Business/Product goal\n- Deliver tenant-scoped dashboards, governed queries, and scheduled reports with clear ownership and auditability.\n- Enable feature-flagged rollout of new widgets and sampling for cost control.\n\n## Success criteria\n- Dashboards can be regenerated safely from spec changes.\n- Queries/widgets have enforced validation; PII is redacted per policy.`,\n },\n {\n id: 'docs.examples.analytics-dashboard.usage',\n title: 'Analytics Dashboard — Usage',\n summary: 'How to seed, extend, and safely regenerate dashboards.',\n kind: 'usage',\n visibility: 'public',\n route: '/docs/examples/analytics-dashboard/usage',\n tags: ['analytics', 'usage'],\n body: `## Setup\n1) Seed dashboards/widgets (via template registry) to preload sample queries.\n2) Configure org/tenant scope and attach Usage/Metering for cost/sampling controls.\n\n## Extend & regenerate\n1) Add or modify widget/query schemas in the spec (inputs, validation, PII paths).\n2) Regenerate to update UI + API + events; review presentations for redaction.\n3) Use Feature Flags to roll out new widgets or sampling knobs gradually.\n\n## Guardrails\n- Keep all query inputs validated; mark PII paths in policy.\n- Use Audit Trail for report deliveries; Notifications for scheduled sends.`,\n },\n {\n id: 'docs.examples.analytics-dashboard.constraints',\n title: 'Analytics Dashboard — Constraints & Safety',\n summary: 'Internal guardrails for queries, widgets, and regeneration.',\n kind: 'reference',\n visibility: 'internal',\n route: '/docs/examples/analytics-dashboard/constraints',\n tags: ['analytics', 'constraints', 'internal'],\n body: `## Constraints\n- Queries and widgets must declare inputs/validation in spec; no ad-hoc query strings.\n- Regeneration must preserve sampling/windowing semantics; document changes explicitly.\n- Events/usage metrics should remain consistent with Metering/Audit wiring.\n\n## PII & Data\n- Mark PII paths (user ids, emails) in presentations for redaction.\n- Avoid exposing raw query payloads in MCP/web without policy checks.\n\n## Verification\n- Add fixtures for widget/query schema changes and scheduled reports.\n- Run regeneration diff when adjusting query builders; ensure UI/markdown targets updated.\n- Confirm feature-flagged widgets default to safe/off for new tenants.`,\n },\n];\n\nregisterDocBlocks(analyticsDashboardDocBlocks);\n"],"mappings":";;;AAwGA,kBArGgD;CAC9C;EACE,IAAI;EACJ,OAAO;EACP,SACE;EACF,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GAAC;GAAa;GAAc;GAAM;GAAU;EAClD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;EAyBP;CACD;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM,CAAC,aAAa,OAAO;EAC3B,MAAM;;;;;;;;;;;EAWP;CACD;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM,CAAC,aAAa,QAAQ;EAC5B,MAAM;;;;;;;;;;;;EAYP;CACD;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GAAC;GAAa;GAAe;GAAW;EAC9C,MAAM;;;;;;;;;;;;;EAaP;CACF,CAE6C"}
|
package/dist/events.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","names":[],"sources":["../src/events.ts"],"sourcesContent":["import { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';\nimport { defineEvent } from '@contractspec/lib.contracts';\n\nconst DashboardEventPayload = defineSchemaModel({\n name: 'DashboardEventPayload',\n description: 'Payload for dashboard events',\n fields: {\n dashboardId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n createdBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst WidgetEventPayload = defineSchemaModel({\n name: 'WidgetEventPayload',\n description: 'Payload for widget events',\n fields: {\n widgetId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n dashboardId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n widgetType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst QueryEventPayload = defineSchemaModel({\n name: 'QueryEventPayload',\n description: 'Payload for query events',\n fields: {\n queryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n queryType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n createdBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const DashboardCreatedEvent = defineEvent({\n meta: {\n key: 'analytics.dashboard.created',\n version: '1.0.0',\n description: 'A dashboard was created.',\n stability: 'stable',\n owners: ['@analytics-team'],\n tags: ['dashboard'],\n },\n payload: DashboardEventPayload,\n});\n\nexport const WidgetAddedEvent = defineEvent({\n meta: {\n key: 'analytics.widget.added',\n version: '1.0.0',\n description: 'A widget was added to a dashboard.',\n stability: 'stable',\n owners: ['@analytics-team'],\n tags: ['dashboard'],\n },\n payload: WidgetEventPayload,\n});\n\nexport const QueryCreatedEvent = defineEvent({\n meta: {\n key: 'analytics.query.created',\n version: '1.0.0',\n description: 'A query was created.',\n stability: 'stable',\n owners: ['@analytics-team'],\n tags: ['dashboard'],\n },\n payload: QueryEventPayload,\n});\n\nexport const AnalyticsDashboardEvents = {\n DashboardCreatedEvent,\n WidgetAddedEvent,\n QueryCreatedEvent,\n};\n"],"mappings":";;;;AAGA,MAAM,wBAAwB,kBAAkB;CAC9C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EAC1E,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;AAEF,MAAM,qBAAqB,kBAAkB;CAC3C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EAC1E,YAAY;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACzE,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;AAEF,MAAM,oBAAoB,kBAAkB;CAC1C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;AAEF,MAAa,wBAAwB,YAAY;CAC/C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,kBAAkB;EAC3B,MAAM,CAAC,YAAY;EACpB;CACD,SAAS;CACV,CAAC;AAEF,MAAa,mBAAmB,YAAY;CAC1C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,kBAAkB;EAC3B,MAAM,CAAC,YAAY;EACpB;CACD,SAAS;CACV,CAAC;AAEF,MAAa,oBAAoB,YAAY;CAC3C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,kBAAkB;EAC3B,MAAM,CAAC,YAAY;EACpB;CACD,SAAS;CACV,CAAC;AAEF,MAAa,2BAA2B;CACtC;CACA;CACA;CACD"}
|
package/dist/example.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example.js","names":[],"sources":["../src/example.ts"],"sourcesContent":["import { defineExample } from '@contractspec/lib.contracts';\n\nconst example = defineExample({\n meta: {\n key: 'analytics-dashboard',\n version: '1.0.0',\n title: 'Analytics Dashboard',\n description:\n 'Tenant-scoped dashboards, widgets, query builder, and scheduled reports (spec-first widgets/queries).',\n kind: 'template',\n visibility: 'public',\n stability: 'experimental',\n owners: ['@platform.core'],\n tags: ['analytics', 'dashboards', 'bi', 'queries'],\n },\n docs: {\n rootDocId: 'docs.examples.analytics-dashboard',\n goalDocId: 'docs.examples.analytics-dashboard.goal',\n usageDocId: 'docs.examples.analytics-dashboard.usage',\n constraintsDocId: 'docs.examples.analytics-dashboard.constraints',\n },\n entrypoints: {\n packageName: '@contractspec/example.analytics-dashboard',\n feature: './feature',\n contracts: './contracts',\n presentations: './presentations',\n handlers: './handlers',\n docs: './docs',\n },\n surfaces: {\n templates: true,\n sandbox: {\n enabled: true,\n modes: ['playground', 'specs', 'builder', 'markdown', 'evolution'],\n },\n studio: { enabled: true, installable: true },\n mcp: { enabled: true },\n },\n});\n\nexport default example;\n"],"mappings":";;;AAEA,MAAM,UAAU,cAAc;CAC5B,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,MAAM;EACN,YAAY;EACZ,WAAW;EACX,QAAQ,CAAC,iBAAiB;EAC1B,MAAM;GAAC;GAAa;GAAc;GAAM;GAAU;EACnD;CACD,MAAM;EACJ,WAAW;EACX,WAAW;EACX,YAAY;EACZ,kBAAkB;EACnB;CACD,aAAa;EACX,aAAa;EACb,SAAS;EACT,WAAW;EACX,eAAe;EACf,UAAU;EACV,MAAM;EACP;CACD,UAAU;EACR,WAAW;EACX,SAAS;GACP,SAAS;GACT,OAAO;IAAC;IAAc;IAAS;IAAW;IAAY;IAAY;GACnE;EACD,QAAQ;GAAE,SAAS;GAAM,aAAa;GAAM;EAC5C,KAAK,EAAE,SAAS,MAAM;EACvB;CACF,CAAC;AAEF,sBAAe"}
|