@contractspec/example.saas-boilerplate 3.7.6 → 3.8.2
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/.turbo/turbo-build.log +39 -27
- package/AGENTS.md +50 -27
- package/CHANGELOG.md +36 -0
- package/README.md +65 -144
- package/dist/billing/billing.event.js +1 -1
- package/dist/billing/index.d.ts +6 -6
- package/dist/billing/index.js +1 -1
- package/dist/browser/billing/billing.event.js +1 -1
- package/dist/browser/billing/index.js +1 -1
- package/dist/browser/index.js +1147 -869
- package/dist/browser/project/index.js +209 -209
- package/dist/browser/project/project.event.js +1 -1
- package/dist/browser/saas-boilerplate.feature.js +208 -0
- package/dist/browser/ui/SaasDashboard.js +356 -105
- package/dist/browser/ui/SaasDashboard.visualizations.js +249 -0
- package/dist/browser/ui/SaasProjectList.js +7 -7
- package/dist/browser/ui/SaasSettingsPanel.js +12 -12
- package/dist/browser/ui/hooks/index.js +2 -2
- package/dist/browser/ui/hooks/useProjectList.js +1 -1
- package/dist/browser/ui/hooks/useProjectMutations.js +1 -1
- package/dist/browser/ui/index.js +790 -521
- package/dist/browser/ui/modals/CreateProjectModal.js +10 -10
- package/dist/browser/ui/modals/ProjectActionsModal.js +13 -13
- package/dist/browser/ui/modals/index.js +23 -23
- package/dist/browser/ui/renderers/index.js +341 -115
- package/dist/browser/ui/renderers/project-list.markdown.js +229 -3
- package/dist/browser/ui/renderers/project-list.renderer.js +7 -7
- package/dist/browser/visualizations/catalog.js +155 -0
- package/dist/browser/visualizations/index.js +217 -0
- package/dist/browser/visualizations/selectors.js +210 -0
- package/dist/handlers/index.d.ts +2 -2
- package/dist/index.d.ts +5 -4
- package/dist/index.js +1147 -869
- package/dist/node/billing/billing.event.js +1 -1
- package/dist/node/billing/index.js +1 -1
- package/dist/node/index.js +1147 -869
- package/dist/node/project/index.js +209 -209
- package/dist/node/project/project.event.js +1 -1
- package/dist/node/saas-boilerplate.feature.js +208 -0
- package/dist/node/ui/SaasDashboard.js +356 -105
- package/dist/node/ui/SaasDashboard.visualizations.js +249 -0
- package/dist/node/ui/SaasProjectList.js +7 -7
- package/dist/node/ui/SaasSettingsPanel.js +12 -12
- package/dist/node/ui/hooks/index.js +2 -2
- package/dist/node/ui/hooks/useProjectList.js +1 -1
- package/dist/node/ui/hooks/useProjectMutations.js +1 -1
- package/dist/node/ui/index.js +790 -521
- package/dist/node/ui/modals/CreateProjectModal.js +10 -10
- package/dist/node/ui/modals/ProjectActionsModal.js +13 -13
- package/dist/node/ui/modals/index.js +23 -23
- package/dist/node/ui/renderers/index.js +341 -115
- package/dist/node/ui/renderers/project-list.markdown.js +229 -3
- package/dist/node/ui/renderers/project-list.renderer.js +7 -7
- package/dist/node/visualizations/catalog.js +155 -0
- package/dist/node/visualizations/index.js +217 -0
- package/dist/node/visualizations/selectors.js +210 -0
- package/dist/presentations/index.d.ts +1 -1
- package/dist/project/index.d.ts +7 -7
- package/dist/project/index.js +209 -209
- package/dist/project/project.event.js +1 -1
- package/dist/saas-boilerplate.feature.js +208 -0
- package/dist/settings/index.d.ts +1 -1
- package/dist/ui/SaasDashboard.js +356 -105
- package/dist/ui/SaasDashboard.visualizations.d.ts +5 -0
- package/dist/ui/SaasDashboard.visualizations.js +250 -0
- package/dist/ui/SaasProjectList.js +7 -7
- package/dist/ui/SaasSettingsPanel.js +12 -12
- package/dist/ui/hooks/index.d.ts +2 -2
- package/dist/ui/hooks/index.js +2 -2
- package/dist/ui/hooks/useProjectList.d.ts +5 -0
- package/dist/ui/hooks/useProjectList.js +1 -1
- package/dist/ui/hooks/useProjectMutations.d.ts +8 -0
- package/dist/ui/hooks/useProjectMutations.js +1 -1
- package/dist/ui/index.d.ts +4 -4
- package/dist/ui/index.js +790 -521
- package/dist/ui/modals/CreateProjectModal.js +10 -10
- package/dist/ui/modals/ProjectActionsModal.js +13 -13
- package/dist/ui/modals/index.js +23 -23
- package/dist/ui/renderers/index.d.ts +1 -1
- package/dist/ui/renderers/index.js +341 -115
- package/dist/ui/renderers/project-list.markdown.js +229 -3
- package/dist/ui/renderers/project-list.renderer.d.ts +1 -1
- package/dist/ui/renderers/project-list.renderer.js +7 -7
- package/dist/visualizations/catalog.d.ts +11 -0
- package/dist/visualizations/catalog.js +156 -0
- package/dist/visualizations/index.d.ts +2 -0
- package/dist/visualizations/index.js +218 -0
- package/dist/visualizations/selectors.d.ts +8 -0
- package/dist/visualizations/selectors.js +211 -0
- package/dist/visualizations/selectors.test.d.ts +1 -0
- package/package.json +70 -14
- package/src/billing/billing.entity.ts +132 -132
- package/src/billing/billing.enum.ts +9 -9
- package/src/billing/billing.event.ts +71 -71
- package/src/billing/billing.handler.ts +87 -87
- package/src/billing/billing.operations.ts +158 -158
- package/src/billing/billing.presentation.ts +45 -45
- package/src/billing/billing.schema.ts +76 -76
- package/src/billing/index.ts +43 -48
- package/src/dashboard/dashboard.presentation.ts +45 -45
- package/src/dashboard/index.ts +2 -2
- package/src/docs/saas-boilerplate.docblock.ts +43 -43
- package/src/example.ts +32 -32
- package/src/handlers/index.ts +9 -9
- package/src/handlers/saas.handlers.ts +250 -249
- package/src/index.ts +41 -41
- package/src/presentations/index.ts +18 -20
- package/src/project/index.ts +45 -50
- package/src/project/project.entity.ts +68 -68
- package/src/project/project.enum.ts +8 -8
- package/src/project/project.event.ts +79 -79
- package/src/project/project.handler.ts +103 -103
- package/src/project/project.operations.ts +236 -236
- package/src/project/project.presentation.ts +46 -46
- package/src/project/project.schema.ts +90 -90
- package/src/saas-boilerplate.feature.ts +103 -100
- package/src/seeders/index.ts +20 -20
- package/src/settings/index.ts +2 -3
- package/src/settings/settings.entity.ts +65 -65
- package/src/settings/settings.enum.ts +4 -4
- package/src/shared/mock-data.ts +92 -92
- package/src/shared/overlay-types.ts +23 -23
- package/src/tests/operations.test-spec.ts +96 -96
- package/src/ui/SaasDashboard.tsx +278 -270
- package/src/ui/SaasDashboard.visualizations.tsx +41 -0
- package/src/ui/SaasProjectList.tsx +90 -90
- package/src/ui/SaasSettingsPanel.tsx +84 -84
- package/src/ui/hooks/index.ts +3 -3
- package/src/ui/hooks/useProjectList.ts +69 -68
- package/src/ui/hooks/useProjectMutations.ts +144 -143
- package/src/ui/index.ts +8 -12
- package/src/ui/modals/CreateProjectModal.tsx +154 -154
- package/src/ui/modals/ProjectActionsModal.tsx +321 -321
- package/src/ui/overlays/demo-overlays.ts +49 -49
- package/src/ui/renderers/index.ts +5 -4
- package/src/ui/renderers/project-list.markdown.ts +229 -205
- package/src/ui/renderers/project-list.renderer.tsx +14 -13
- package/src/visualizations/catalog.ts +153 -0
- package/src/visualizations/index.ts +2 -0
- package/src/visualizations/selectors.test.ts +25 -0
- package/src/visualizations/selectors.ts +85 -0
- package/tsconfig.json +7 -8
- package/tsdown.config.js +7 -3
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
// src/visualizations/catalog.ts
|
|
2
|
+
import {
|
|
3
|
+
defineVisualization,
|
|
4
|
+
VisualizationRegistry
|
|
5
|
+
} from "@contractspec/lib.contracts-spec/visualizations";
|
|
6
|
+
var PROJECT_LIST_REF = {
|
|
7
|
+
key: "saas.project.list",
|
|
8
|
+
version: "1.0.0"
|
|
9
|
+
};
|
|
10
|
+
var META = {
|
|
11
|
+
version: "1.0.0",
|
|
12
|
+
domain: "saas",
|
|
13
|
+
stability: "experimental",
|
|
14
|
+
owners: ["@example.saas-boilerplate"],
|
|
15
|
+
tags: ["saas", "visualization", "projects"]
|
|
16
|
+
};
|
|
17
|
+
var SaasProjectUsageVisualization = defineVisualization({
|
|
18
|
+
meta: {
|
|
19
|
+
...META,
|
|
20
|
+
key: "saas-boilerplate.visualization.project-usage",
|
|
21
|
+
title: "Project Capacity",
|
|
22
|
+
description: "Current project count against the current plan limit.",
|
|
23
|
+
goal: "Show usage against the active plan allowance.",
|
|
24
|
+
context: "SaaS account overview."
|
|
25
|
+
},
|
|
26
|
+
source: { primary: PROJECT_LIST_REF, resultPath: "data" },
|
|
27
|
+
visualization: {
|
|
28
|
+
kind: "metric",
|
|
29
|
+
measure: "totalProjects",
|
|
30
|
+
comparisonMeasure: "projectLimit",
|
|
31
|
+
measures: [
|
|
32
|
+
{
|
|
33
|
+
key: "totalProjects",
|
|
34
|
+
label: "Projects",
|
|
35
|
+
dataPath: "totalProjects",
|
|
36
|
+
format: "number"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
key: "projectLimit",
|
|
40
|
+
label: "Plan Limit",
|
|
41
|
+
dataPath: "projectLimit",
|
|
42
|
+
format: "number"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
table: { caption: "Current project count and plan limit." }
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
var SaasProjectStatusVisualization = defineVisualization({
|
|
49
|
+
meta: {
|
|
50
|
+
...META,
|
|
51
|
+
key: "saas-boilerplate.visualization.project-status",
|
|
52
|
+
title: "Project Status",
|
|
53
|
+
description: "Distribution of project states.",
|
|
54
|
+
goal: "Show the mix of active, draft, and archived projects.",
|
|
55
|
+
context: "Project portfolio overview."
|
|
56
|
+
},
|
|
57
|
+
source: { primary: PROJECT_LIST_REF, resultPath: "data" },
|
|
58
|
+
visualization: {
|
|
59
|
+
kind: "pie",
|
|
60
|
+
nameDimension: "status",
|
|
61
|
+
valueMeasure: "projects",
|
|
62
|
+
dimensions: [
|
|
63
|
+
{ key: "status", label: "Status", dataPath: "status", type: "category" }
|
|
64
|
+
],
|
|
65
|
+
measures: [
|
|
66
|
+
{
|
|
67
|
+
key: "projects",
|
|
68
|
+
label: "Projects",
|
|
69
|
+
dataPath: "projects",
|
|
70
|
+
format: "number"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
table: { caption: "Project counts by status." }
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
var SaasProjectTierVisualization = defineVisualization({
|
|
77
|
+
meta: {
|
|
78
|
+
...META,
|
|
79
|
+
key: "saas-boilerplate.visualization.project-tiers",
|
|
80
|
+
title: "Tier Comparison",
|
|
81
|
+
description: "Distribution of projects across tiers.",
|
|
82
|
+
goal: "Compare how the current portfolio is distributed by tier.",
|
|
83
|
+
context: "Plan and packaging overview."
|
|
84
|
+
},
|
|
85
|
+
source: { primary: PROJECT_LIST_REF, resultPath: "data" },
|
|
86
|
+
visualization: {
|
|
87
|
+
kind: "cartesian",
|
|
88
|
+
variant: "bar",
|
|
89
|
+
xDimension: "tier",
|
|
90
|
+
yMeasures: ["projects"],
|
|
91
|
+
dimensions: [
|
|
92
|
+
{ key: "tier", label: "Tier", dataPath: "tier", type: "category" }
|
|
93
|
+
],
|
|
94
|
+
measures: [
|
|
95
|
+
{
|
|
96
|
+
key: "projects",
|
|
97
|
+
label: "Projects",
|
|
98
|
+
dataPath: "projects",
|
|
99
|
+
format: "number",
|
|
100
|
+
color: "#1d4ed8"
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
table: { caption: "Project counts by tier." }
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
var SaasProjectActivityVisualization = defineVisualization({
|
|
107
|
+
meta: {
|
|
108
|
+
...META,
|
|
109
|
+
key: "saas-boilerplate.visualization.project-activity",
|
|
110
|
+
title: "Recent Project Activity",
|
|
111
|
+
description: "Daily project creation activity.",
|
|
112
|
+
goal: "Show recent project activity over time.",
|
|
113
|
+
context: "Project portfolio trend view."
|
|
114
|
+
},
|
|
115
|
+
source: { primary: PROJECT_LIST_REF, resultPath: "data" },
|
|
116
|
+
visualization: {
|
|
117
|
+
kind: "cartesian",
|
|
118
|
+
variant: "line",
|
|
119
|
+
xDimension: "day",
|
|
120
|
+
yMeasures: ["projects"],
|
|
121
|
+
dimensions: [{ key: "day", label: "Day", dataPath: "day", type: "time" }],
|
|
122
|
+
measures: [
|
|
123
|
+
{
|
|
124
|
+
key: "projects",
|
|
125
|
+
label: "Projects",
|
|
126
|
+
dataPath: "projects",
|
|
127
|
+
format: "number",
|
|
128
|
+
color: "#0f766e"
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
table: { caption: "Daily project creation counts." }
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
var SaasVisualizationSpecs = [
|
|
135
|
+
SaasProjectUsageVisualization,
|
|
136
|
+
SaasProjectStatusVisualization,
|
|
137
|
+
SaasProjectTierVisualization,
|
|
138
|
+
SaasProjectActivityVisualization
|
|
139
|
+
];
|
|
140
|
+
var SaasVisualizationRegistry = new VisualizationRegistry([
|
|
141
|
+
...SaasVisualizationSpecs
|
|
142
|
+
]);
|
|
143
|
+
var SaasVisualizationRefs = SaasVisualizationSpecs.map((spec) => ({
|
|
144
|
+
key: spec.meta.key,
|
|
145
|
+
version: spec.meta.version
|
|
146
|
+
}));
|
|
147
|
+
|
|
148
|
+
// src/visualizations/selectors.ts
|
|
149
|
+
function toDayKey(value) {
|
|
150
|
+
const date = value instanceof Date ? value : new Date(value);
|
|
151
|
+
return date.toISOString().slice(0, 10);
|
|
152
|
+
}
|
|
153
|
+
function createSaasVisualizationItems(projects, projectLimit = 10) {
|
|
154
|
+
const statusCounts = new Map;
|
|
155
|
+
const tierCounts = new Map;
|
|
156
|
+
const activityCounts = new Map;
|
|
157
|
+
for (const project of projects) {
|
|
158
|
+
statusCounts.set(project.status, (statusCounts.get(project.status) ?? 0) + 1);
|
|
159
|
+
tierCounts.set(project.tier, (tierCounts.get(project.tier) ?? 0) + 1);
|
|
160
|
+
const day = toDayKey(project.createdAt);
|
|
161
|
+
activityCounts.set(day, (activityCounts.get(day) ?? 0) + 1);
|
|
162
|
+
}
|
|
163
|
+
return [
|
|
164
|
+
{
|
|
165
|
+
key: "saas-capacity",
|
|
166
|
+
spec: SaasProjectUsageVisualization,
|
|
167
|
+
data: { data: [{ totalProjects: projects.length, projectLimit }] },
|
|
168
|
+
title: "Project Capacity",
|
|
169
|
+
description: "Current project count compared to the active limit.",
|
|
170
|
+
height: 220
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
key: "saas-status",
|
|
174
|
+
spec: SaasProjectStatusVisualization,
|
|
175
|
+
data: {
|
|
176
|
+
data: Array.from(statusCounts.entries()).map(([status, count]) => ({
|
|
177
|
+
status,
|
|
178
|
+
projects: count
|
|
179
|
+
}))
|
|
180
|
+
},
|
|
181
|
+
title: "Project Status",
|
|
182
|
+
description: "Status mix across the current project portfolio.",
|
|
183
|
+
height: 260
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
key: "saas-tier",
|
|
187
|
+
spec: SaasProjectTierVisualization,
|
|
188
|
+
data: {
|
|
189
|
+
data: Array.from(tierCounts.entries()).map(([tier, count]) => ({
|
|
190
|
+
tier,
|
|
191
|
+
projects: count
|
|
192
|
+
}))
|
|
193
|
+
},
|
|
194
|
+
title: "Tier Comparison",
|
|
195
|
+
description: "How projects are distributed across tiers."
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
key: "saas-activity",
|
|
199
|
+
spec: SaasProjectActivityVisualization,
|
|
200
|
+
data: {
|
|
201
|
+
data: Array.from(activityCounts.entries()).sort(([left], [right]) => left.localeCompare(right)).map(([day, count]) => ({ day, projects: count }))
|
|
202
|
+
},
|
|
203
|
+
title: "Recent Project Activity",
|
|
204
|
+
description: "Daily project creation activity."
|
|
205
|
+
}
|
|
206
|
+
];
|
|
207
|
+
}
|
|
208
|
+
// src/ui/SaasDashboard.visualizations.tsx
|
|
209
|
+
import {
|
|
210
|
+
VisualizationCard,
|
|
211
|
+
VisualizationGrid
|
|
212
|
+
} from "@contractspec/lib.design-system";
|
|
213
|
+
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
214
|
+
"use client";
|
|
215
|
+
function SaasVisualizationOverview({
|
|
216
|
+
projects,
|
|
217
|
+
projectLimit
|
|
218
|
+
}) {
|
|
219
|
+
const items = createSaasVisualizationItems(projects, projectLimit);
|
|
220
|
+
return /* @__PURE__ */ jsxDEV("section", {
|
|
221
|
+
className: "space-y-3",
|
|
222
|
+
children: [
|
|
223
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
224
|
+
children: [
|
|
225
|
+
/* @__PURE__ */ jsxDEV("h3", {
|
|
226
|
+
className: "font-semibold text-lg",
|
|
227
|
+
children: "Portfolio Visualizations"
|
|
228
|
+
}, undefined, false, undefined, this),
|
|
229
|
+
/* @__PURE__ */ jsxDEV("p", {
|
|
230
|
+
className: "text-muted-foreground text-sm",
|
|
231
|
+
children: "Contract-backed charts for project mix, capacity, and activity."
|
|
232
|
+
}, undefined, false, undefined, this)
|
|
233
|
+
]
|
|
234
|
+
}, undefined, true, undefined, this),
|
|
235
|
+
/* @__PURE__ */ jsxDEV(VisualizationGrid, {
|
|
236
|
+
children: items.map((item) => /* @__PURE__ */ jsxDEV(VisualizationCard, {
|
|
237
|
+
data: item.data,
|
|
238
|
+
description: item.description,
|
|
239
|
+
height: item.height,
|
|
240
|
+
spec: item.spec,
|
|
241
|
+
title: item.title
|
|
242
|
+
}, item.key, false, undefined, this))
|
|
243
|
+
}, undefined, false, undefined, this)
|
|
244
|
+
]
|
|
245
|
+
}, undefined, true, undefined, this);
|
|
246
|
+
}
|
|
247
|
+
export {
|
|
248
|
+
SaasVisualizationOverview
|
|
249
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/ui/hooks/useProjectList.ts
|
|
2
|
-
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
2
|
import { useTemplateRuntime } from "@contractspec/lib.example-shared-ui";
|
|
3
|
+
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
4
4
|
function useProjectList(options = {}) {
|
|
5
5
|
const { handlers, projectId } = useTemplateRuntime();
|
|
6
6
|
const { saas } = handlers;
|
|
@@ -64,14 +64,14 @@ function useProjectList(options = {}) {
|
|
|
64
64
|
|
|
65
65
|
// src/ui/SaasProjectList.tsx
|
|
66
66
|
import {
|
|
67
|
-
|
|
68
|
-
StatCardGroup,
|
|
69
|
-
StatusChip,
|
|
70
|
-
EntityCard,
|
|
67
|
+
Button,
|
|
71
68
|
EmptyState,
|
|
72
|
-
|
|
69
|
+
EntityCard,
|
|
73
70
|
ErrorState,
|
|
74
|
-
|
|
71
|
+
LoaderBlock,
|
|
72
|
+
StatCard,
|
|
73
|
+
StatCardGroup,
|
|
74
|
+
StatusChip
|
|
75
75
|
} from "@contractspec/lib.design-system";
|
|
76
76
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
77
77
|
"use client";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/ui/SaasSettingsPanel.tsx
|
|
2
|
-
import { useState } from "react";
|
|
3
2
|
import { Button } from "@contractspec/lib.design-system";
|
|
3
|
+
import { useState } from "react";
|
|
4
4
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
5
5
|
"use client";
|
|
6
6
|
function SaasSettingsPanel() {
|
|
@@ -10,10 +10,10 @@ function SaasSettingsPanel() {
|
|
|
10
10
|
className: "space-y-6",
|
|
11
11
|
children: [
|
|
12
12
|
/* @__PURE__ */ jsxDEV("div", {
|
|
13
|
-
className: "border-border bg-card
|
|
13
|
+
className: "rounded-xl border border-border bg-card p-6",
|
|
14
14
|
children: [
|
|
15
15
|
/* @__PURE__ */ jsxDEV("h3", {
|
|
16
|
-
className: "mb-4 text-lg
|
|
16
|
+
className: "mb-4 font-semibold text-lg",
|
|
17
17
|
children: "Organization Settings"
|
|
18
18
|
}, undefined, false, undefined, this),
|
|
19
19
|
/* @__PURE__ */ jsxDEV("div", {
|
|
@@ -23,7 +23,7 @@ function SaasSettingsPanel() {
|
|
|
23
23
|
children: [
|
|
24
24
|
/* @__PURE__ */ jsxDEV("label", {
|
|
25
25
|
htmlFor: "setting-org-name",
|
|
26
|
-
className: "block text-sm
|
|
26
|
+
className: "block font-medium text-sm",
|
|
27
27
|
children: "Organization Name"
|
|
28
28
|
}, undefined, false, undefined, this),
|
|
29
29
|
/* @__PURE__ */ jsxDEV("input", {
|
|
@@ -31,7 +31,7 @@ function SaasSettingsPanel() {
|
|
|
31
31
|
type: "text",
|
|
32
32
|
value: orgName,
|
|
33
33
|
onChange: (e) => setOrgName(e.target.value),
|
|
34
|
-
className: "
|
|
34
|
+
className: "mt-1 block w-full rounded-md border border-input bg-background px-3 py-2"
|
|
35
35
|
}, undefined, false, undefined, this)
|
|
36
36
|
]
|
|
37
37
|
}, undefined, true, undefined, this),
|
|
@@ -39,14 +39,14 @@ function SaasSettingsPanel() {
|
|
|
39
39
|
children: [
|
|
40
40
|
/* @__PURE__ */ jsxDEV("label", {
|
|
41
41
|
htmlFor: "setting-timezone",
|
|
42
|
-
className: "block text-sm
|
|
42
|
+
className: "block font-medium text-sm",
|
|
43
43
|
children: "Default Timezone"
|
|
44
44
|
}, undefined, false, undefined, this),
|
|
45
45
|
/* @__PURE__ */ jsxDEV("select", {
|
|
46
46
|
id: "setting-timezone",
|
|
47
47
|
value: timezone,
|
|
48
48
|
onChange: (e) => setTimezone(e.target.value),
|
|
49
|
-
className: "
|
|
49
|
+
className: "mt-1 block w-full rounded-md border border-input bg-background px-3 py-2",
|
|
50
50
|
children: [
|
|
51
51
|
/* @__PURE__ */ jsxDEV("option", {
|
|
52
52
|
value: "UTC",
|
|
@@ -80,10 +80,10 @@ function SaasSettingsPanel() {
|
|
|
80
80
|
]
|
|
81
81
|
}, undefined, true, undefined, this),
|
|
82
82
|
/* @__PURE__ */ jsxDEV("div", {
|
|
83
|
-
className: "border-border bg-card
|
|
83
|
+
className: "rounded-xl border border-border bg-card p-6",
|
|
84
84
|
children: [
|
|
85
85
|
/* @__PURE__ */ jsxDEV("h3", {
|
|
86
|
-
className: "mb-4 text-lg
|
|
86
|
+
className: "mb-4 font-semibold text-lg",
|
|
87
87
|
children: "Notifications"
|
|
88
88
|
}, undefined, false, undefined, this),
|
|
89
89
|
/* @__PURE__ */ jsxDEV("div", {
|
|
@@ -98,7 +98,7 @@ function SaasSettingsPanel() {
|
|
|
98
98
|
/* @__PURE__ */ jsxDEV("input", {
|
|
99
99
|
type: "checkbox",
|
|
100
100
|
defaultChecked: item.defaultChecked,
|
|
101
|
-
className: "
|
|
101
|
+
className: "h-4 w-4 rounded border-input"
|
|
102
102
|
}, undefined, false, undefined, this),
|
|
103
103
|
/* @__PURE__ */ jsxDEV("span", {
|
|
104
104
|
className: "text-sm",
|
|
@@ -113,11 +113,11 @@ function SaasSettingsPanel() {
|
|
|
113
113
|
className: "rounded-xl border border-red-200 bg-red-50 p-6 dark:border-red-900 dark:bg-red-950/20",
|
|
114
114
|
children: [
|
|
115
115
|
/* @__PURE__ */ jsxDEV("h3", {
|
|
116
|
-
className: "mb-2
|
|
116
|
+
className: "mb-2 font-semibold text-lg text-red-700 dark:text-red-400",
|
|
117
117
|
children: "Danger Zone"
|
|
118
118
|
}, undefined, false, undefined, this),
|
|
119
119
|
/* @__PURE__ */ jsxDEV("p", {
|
|
120
|
-
className: "mb-4 text-
|
|
120
|
+
className: "mb-4 text-red-600 text-sm dark:text-red-300",
|
|
121
121
|
children: "These actions are irreversible. Please proceed with caution."
|
|
122
122
|
}, undefined, false, undefined, this),
|
|
123
123
|
/* @__PURE__ */ jsxDEV("div", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/ui/hooks/useProjectList.ts
|
|
2
|
-
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
2
|
import { useTemplateRuntime } from "@contractspec/lib.example-shared-ui";
|
|
3
|
+
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
4
4
|
function useProjectList(options = {}) {
|
|
5
5
|
const { handlers, projectId } = useTemplateRuntime();
|
|
6
6
|
const { saas } = handlers;
|
|
@@ -63,8 +63,8 @@ function useProjectList(options = {}) {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
// src/ui/hooks/useProjectMutations.ts
|
|
66
|
-
import { useCallback as useCallback2, useState as useState2 } from "react";
|
|
67
66
|
import { useTemplateRuntime as useTemplateRuntime2 } from "@contractspec/lib.example-shared-ui";
|
|
67
|
+
import { useCallback as useCallback2, useState as useState2 } from "react";
|
|
68
68
|
function useProjectMutations(options = {}) {
|
|
69
69
|
const { handlers, projectId } = useTemplateRuntime2();
|
|
70
70
|
const { saas } = handlers;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/ui/hooks/useProjectList.ts
|
|
2
|
-
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
2
|
import { useTemplateRuntime } from "@contractspec/lib.example-shared-ui";
|
|
3
|
+
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
4
4
|
function useProjectList(options = {}) {
|
|
5
5
|
const { handlers, projectId } = useTemplateRuntime();
|
|
6
6
|
const { saas } = handlers;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/ui/hooks/useProjectMutations.ts
|
|
2
|
-
import { useCallback, useState } from "react";
|
|
3
2
|
import { useTemplateRuntime } from "@contractspec/lib.example-shared-ui";
|
|
3
|
+
import { useCallback, useState } from "react";
|
|
4
4
|
function useProjectMutations(options = {}) {
|
|
5
5
|
const { handlers, projectId } = useTemplateRuntime();
|
|
6
6
|
const { saas } = handlers;
|