@contractspec/example.saas-boilerplate 3.7.5 → 3.7.7
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 +8 -8
- package/AGENTS.md +50 -27
- package/CHANGELOG.md +16 -0
- package/README.md +64 -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 +931 -932
- package/dist/browser/project/index.js +209 -209
- package/dist/browser/project/project.event.js +1 -1
- package/dist/browser/ui/SaasDashboard.js +45 -45
- 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 +483 -484
- 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 +112 -112
- package/dist/browser/ui/renderers/project-list.renderer.js +7 -7
- package/dist/handlers/index.d.ts +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +931 -932
- package/dist/node/billing/billing.event.js +1 -1
- package/dist/node/billing/index.js +1 -1
- package/dist/node/index.js +931 -932
- package/dist/node/project/index.js +209 -209
- package/dist/node/project/project.event.js +1 -1
- package/dist/node/ui/SaasDashboard.js +45 -45
- 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 +483 -484
- 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 +112 -112
- package/dist/node/ui/renderers/project-list.renderer.js +7 -7
- 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/settings/index.d.ts +1 -1
- package/dist/ui/SaasDashboard.js +45 -45
- 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 +483 -484
- 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 +112 -112
- package/dist/ui/renderers/project-list.renderer.d.ts +1 -1
- package/dist/ui/renderers/project-list.renderer.js +7 -7
- package/package.json +14 -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 +40 -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 +100 -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 +270 -270
- 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 +204 -204
- package/src/ui/renderers/project-list.renderer.tsx +14 -13
- package/tsconfig.json +7 -8
- package/tsdown.config.js +7 -3
|
@@ -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;
|
|
@@ -152,8 +152,8 @@ function useProjectMutations(options = {}) {
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
// src/ui/modals/CreateProjectModal.tsx
|
|
155
|
-
import { useState as useState3 } from "react";
|
|
156
155
|
import { Button, Input } from "@contractspec/lib.design-system";
|
|
156
|
+
import { useState as useState3 } from "react";
|
|
157
157
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
158
158
|
"use client";
|
|
159
159
|
var TIERS = [
|
|
@@ -198,7 +198,7 @@ function CreateProjectModal({
|
|
|
198
198
|
className: "fixed inset-0 z-50 flex items-center justify-center",
|
|
199
199
|
children: [
|
|
200
200
|
/* @__PURE__ */ jsxDEV("div", {
|
|
201
|
-
className: "bg-background/80
|
|
201
|
+
className: "absolute inset-0 bg-background/80 backdrop-blur-sm",
|
|
202
202
|
onClick: onClose,
|
|
203
203
|
role: "button",
|
|
204
204
|
tabIndex: 0,
|
|
@@ -209,10 +209,10 @@ function CreateProjectModal({
|
|
|
209
209
|
"aria-label": "Close modal"
|
|
210
210
|
}, undefined, false, undefined, this),
|
|
211
211
|
/* @__PURE__ */ jsxDEV("div", {
|
|
212
|
-
className: "
|
|
212
|
+
className: "relative z-10 w-full max-w-md rounded-xl border border-border bg-card p-6 shadow-xl",
|
|
213
213
|
children: [
|
|
214
214
|
/* @__PURE__ */ jsxDEV("h2", {
|
|
215
|
-
className: "mb-4 text-xl
|
|
215
|
+
className: "mb-4 font-semibold text-xl",
|
|
216
216
|
children: "Create New Project"
|
|
217
217
|
}, undefined, false, undefined, this),
|
|
218
218
|
/* @__PURE__ */ jsxDEV("form", {
|
|
@@ -223,7 +223,7 @@ function CreateProjectModal({
|
|
|
223
223
|
children: [
|
|
224
224
|
/* @__PURE__ */ jsxDEV("label", {
|
|
225
225
|
htmlFor: "project-name",
|
|
226
|
-
className: "
|
|
226
|
+
className: "mb-1 block font-medium text-muted-foreground text-sm",
|
|
227
227
|
children: "Project Name *"
|
|
228
228
|
}, undefined, false, undefined, this),
|
|
229
229
|
/* @__PURE__ */ jsxDEV(Input, {
|
|
@@ -239,7 +239,7 @@ function CreateProjectModal({
|
|
|
239
239
|
children: [
|
|
240
240
|
/* @__PURE__ */ jsxDEV("label", {
|
|
241
241
|
htmlFor: "project-description",
|
|
242
|
-
className: "
|
|
242
|
+
className: "mb-1 block font-medium text-muted-foreground text-sm",
|
|
243
243
|
children: "Description"
|
|
244
244
|
}, undefined, false, undefined, this),
|
|
245
245
|
/* @__PURE__ */ jsxDEV("textarea", {
|
|
@@ -249,7 +249,7 @@ function CreateProjectModal({
|
|
|
249
249
|
placeholder: "Describe what this project is about...",
|
|
250
250
|
rows: 3,
|
|
251
251
|
disabled: isLoading,
|
|
252
|
-
className: "
|
|
252
|
+
className: "w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50"
|
|
253
253
|
}, undefined, false, undefined, this)
|
|
254
254
|
]
|
|
255
255
|
}, undefined, true, undefined, this),
|
|
@@ -257,7 +257,7 @@ function CreateProjectModal({
|
|
|
257
257
|
children: [
|
|
258
258
|
/* @__PURE__ */ jsxDEV("label", {
|
|
259
259
|
htmlFor: "project-tier",
|
|
260
|
-
className: "
|
|
260
|
+
className: "mb-1 block font-medium text-muted-foreground text-sm",
|
|
261
261
|
children: "Tier"
|
|
262
262
|
}, undefined, false, undefined, this),
|
|
263
263
|
/* @__PURE__ */ jsxDEV("select", {
|
|
@@ -265,7 +265,7 @@ function CreateProjectModal({
|
|
|
265
265
|
value: tier,
|
|
266
266
|
onChange: (e) => setTier(e.target.value),
|
|
267
267
|
disabled: isLoading,
|
|
268
|
-
className: "
|
|
268
|
+
className: "h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50",
|
|
269
269
|
children: TIERS.map((t) => /* @__PURE__ */ jsxDEV("option", {
|
|
270
270
|
value: t.value,
|
|
271
271
|
children: t.label
|
|
@@ -274,7 +274,7 @@ function CreateProjectModal({
|
|
|
274
274
|
]
|
|
275
275
|
}, undefined, true, undefined, this),
|
|
276
276
|
error && /* @__PURE__ */ jsxDEV("div", {
|
|
277
|
-
className: "bg-destructive/10
|
|
277
|
+
className: "rounded-md bg-destructive/10 p-3 text-destructive text-sm",
|
|
278
278
|
children: error
|
|
279
279
|
}, undefined, false, undefined, this),
|
|
280
280
|
/* @__PURE__ */ jsxDEV("div", {
|
|
@@ -303,8 +303,8 @@ function CreateProjectModal({
|
|
|
303
303
|
}
|
|
304
304
|
|
|
305
305
|
// src/ui/modals/ProjectActionsModal.tsx
|
|
306
|
-
import { useEffect as useEffect2, useState as useState4 } from "react";
|
|
307
306
|
import { Button as Button2, Input as Input2 } from "@contractspec/lib.design-system";
|
|
307
|
+
import { useEffect as useEffect2, useState as useState4 } from "react";
|
|
308
308
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
309
309
|
"use client";
|
|
310
310
|
function ProjectActionsModal({
|
|
@@ -397,7 +397,7 @@ function ProjectActionsModal({
|
|
|
397
397
|
className: "fixed inset-0 z-50 flex items-center justify-center",
|
|
398
398
|
children: [
|
|
399
399
|
/* @__PURE__ */ jsxDEV2("div", {
|
|
400
|
-
className: "bg-background/80
|
|
400
|
+
className: "absolute inset-0 bg-background/80 backdrop-blur-sm",
|
|
401
401
|
onClick: handleClose,
|
|
402
402
|
role: "button",
|
|
403
403
|
tabIndex: 0,
|
|
@@ -408,13 +408,13 @@ function ProjectActionsModal({
|
|
|
408
408
|
"aria-label": "Close modal"
|
|
409
409
|
}, undefined, false, undefined, this),
|
|
410
410
|
/* @__PURE__ */ jsxDEV2("div", {
|
|
411
|
-
className: "
|
|
411
|
+
className: "relative z-10 w-full max-w-md rounded-xl border border-border bg-card p-6 shadow-xl",
|
|
412
412
|
children: [
|
|
413
413
|
/* @__PURE__ */ jsxDEV2("div", {
|
|
414
|
-
className: "
|
|
414
|
+
className: "mb-4 border-border border-b pb-4",
|
|
415
415
|
children: [
|
|
416
416
|
/* @__PURE__ */ jsxDEV2("h2", {
|
|
417
|
-
className: "text-xl
|
|
417
|
+
className: "font-semibold text-xl",
|
|
418
418
|
children: project.name
|
|
419
419
|
}, undefined, false, undefined, this),
|
|
420
420
|
/* @__PURE__ */ jsxDEV2("p", {
|
|
@@ -496,7 +496,7 @@ function ProjectActionsModal({
|
|
|
496
496
|
children: [
|
|
497
497
|
/* @__PURE__ */ jsxDEV2("label", {
|
|
498
498
|
htmlFor: "edit-name",
|
|
499
|
-
className: "
|
|
499
|
+
className: "mb-1 block font-medium text-muted-foreground text-sm",
|
|
500
500
|
children: "Project Name *"
|
|
501
501
|
}, undefined, false, undefined, this),
|
|
502
502
|
/* @__PURE__ */ jsxDEV2(Input2, {
|
|
@@ -511,7 +511,7 @@ function ProjectActionsModal({
|
|
|
511
511
|
children: [
|
|
512
512
|
/* @__PURE__ */ jsxDEV2("label", {
|
|
513
513
|
htmlFor: "edit-description",
|
|
514
|
-
className: "
|
|
514
|
+
className: "mb-1 block font-medium text-muted-foreground text-sm",
|
|
515
515
|
children: "Description"
|
|
516
516
|
}, undefined, false, undefined, this),
|
|
517
517
|
/* @__PURE__ */ jsxDEV2("textarea", {
|
|
@@ -520,12 +520,12 @@ function ProjectActionsModal({
|
|
|
520
520
|
onChange: (e) => setDescription(e.target.value),
|
|
521
521
|
rows: 3,
|
|
522
522
|
disabled: isLoading,
|
|
523
|
-
className: "
|
|
523
|
+
className: "w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50"
|
|
524
524
|
}, undefined, false, undefined, this)
|
|
525
525
|
]
|
|
526
526
|
}, undefined, true, undefined, this),
|
|
527
527
|
error && /* @__PURE__ */ jsxDEV2("div", {
|
|
528
|
-
className: "bg-destructive/10
|
|
528
|
+
className: "rounded-md bg-destructive/10 p-3 text-destructive text-sm",
|
|
529
529
|
children: error
|
|
530
530
|
}, undefined, false, undefined, this),
|
|
531
531
|
/* @__PURE__ */ jsxDEV2("div", {
|
|
@@ -555,7 +555,7 @@ function ProjectActionsModal({
|
|
|
555
555
|
"Are you sure you want to archive",
|
|
556
556
|
" ",
|
|
557
557
|
/* @__PURE__ */ jsxDEV2("span", {
|
|
558
|
-
className: "text-foreground
|
|
558
|
+
className: "font-medium text-foreground",
|
|
559
559
|
children: project.name
|
|
560
560
|
}, undefined, false, undefined, this),
|
|
561
561
|
"?"
|
|
@@ -566,7 +566,7 @@ function ProjectActionsModal({
|
|
|
566
566
|
children: "Archived projects can be restored later."
|
|
567
567
|
}, undefined, false, undefined, this),
|
|
568
568
|
error && /* @__PURE__ */ jsxDEV2("div", {
|
|
569
|
-
className: "bg-destructive/10
|
|
569
|
+
className: "rounded-md bg-destructive/10 p-3 text-destructive text-sm",
|
|
570
570
|
children: error
|
|
571
571
|
}, undefined, false, undefined, this),
|
|
572
572
|
/* @__PURE__ */ jsxDEV2("div", {
|
|
@@ -596,7 +596,7 @@ function ProjectActionsModal({
|
|
|
596
596
|
"Are you sure you want to delete",
|
|
597
597
|
" ",
|
|
598
598
|
/* @__PURE__ */ jsxDEV2("span", {
|
|
599
|
-
className: "text-foreground
|
|
599
|
+
className: "font-medium text-foreground",
|
|
600
600
|
children: project.name
|
|
601
601
|
}, undefined, false, undefined, this),
|
|
602
602
|
"?"
|
|
@@ -607,7 +607,7 @@ function ProjectActionsModal({
|
|
|
607
607
|
children: "This action cannot be undone."
|
|
608
608
|
}, undefined, false, undefined, this),
|
|
609
609
|
error && /* @__PURE__ */ jsxDEV2("div", {
|
|
610
|
-
className: "bg-destructive/10
|
|
610
|
+
className: "rounded-md bg-destructive/10 p-3 text-destructive text-sm",
|
|
611
611
|
children: error
|
|
612
612
|
}, undefined, false, undefined, this),
|
|
613
613
|
/* @__PURE__ */ jsxDEV2("div", {
|
|
@@ -636,17 +636,17 @@ function ProjectActionsModal({
|
|
|
636
636
|
}
|
|
637
637
|
|
|
638
638
|
// src/ui/SaasDashboard.tsx
|
|
639
|
-
import { useState as useState5, useCallback as useCallback3 } from "react";
|
|
640
639
|
import {
|
|
641
|
-
|
|
642
|
-
StatCardGroup,
|
|
643
|
-
StatusChip,
|
|
644
|
-
EntityCard,
|
|
640
|
+
Button as Button3,
|
|
645
641
|
EmptyState,
|
|
646
|
-
|
|
642
|
+
EntityCard,
|
|
647
643
|
ErrorState,
|
|
648
|
-
|
|
644
|
+
LoaderBlock,
|
|
645
|
+
StatCard,
|
|
646
|
+
StatCardGroup,
|
|
647
|
+
StatusChip
|
|
649
648
|
} from "@contractspec/lib.design-system";
|
|
649
|
+
import { useCallback as useCallback3, useState as useState5 } from "react";
|
|
650
650
|
import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
|
|
651
651
|
"use client";
|
|
652
652
|
function getStatusTone(status) {
|
|
@@ -701,7 +701,7 @@ function SaasDashboard() {
|
|
|
701
701
|
className: "flex items-center justify-between",
|
|
702
702
|
children: [
|
|
703
703
|
/* @__PURE__ */ jsxDEV3("h2", {
|
|
704
|
-
className: "text-2xl
|
|
704
|
+
className: "font-bold text-2xl",
|
|
705
705
|
children: "SaaS Dashboard"
|
|
706
706
|
}, undefined, false, undefined, this),
|
|
707
707
|
activeTab === "projects" && /* @__PURE__ */ jsxDEV3(Button3, {
|
|
@@ -738,14 +738,14 @@ function SaasDashboard() {
|
|
|
738
738
|
]
|
|
739
739
|
}, undefined, true, undefined, this),
|
|
740
740
|
/* @__PURE__ */ jsxDEV3("nav", {
|
|
741
|
-
className: "
|
|
741
|
+
className: "flex gap-1 rounded-lg bg-muted p-1",
|
|
742
742
|
role: "tablist",
|
|
743
743
|
children: tabs.map((tab) => /* @__PURE__ */ jsxDEV3("button", {
|
|
744
744
|
type: "button",
|
|
745
745
|
role: "tab",
|
|
746
746
|
"aria-selected": activeTab === tab.id,
|
|
747
747
|
onClick: () => setActiveTab(tab.id),
|
|
748
|
-
className: `flex flex-1 items-center justify-center gap-2 rounded-md px-4 py-2 text-sm
|
|
748
|
+
className: `flex flex-1 items-center justify-center gap-2 rounded-md px-4 py-2 font-medium text-sm transition-colors ${activeTab === tab.id ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"}`,
|
|
749
749
|
children: [
|
|
750
750
|
/* @__PURE__ */ jsxDEV3("span", {
|
|
751
751
|
children: tab.icon
|
|
@@ -848,7 +848,7 @@ function BillingTab({ subscription }) {
|
|
|
848
848
|
className: "space-y-6",
|
|
849
849
|
children: [
|
|
850
850
|
/* @__PURE__ */ jsxDEV3("div", {
|
|
851
|
-
className: "border-border bg-card
|
|
851
|
+
className: "rounded-xl border border-border bg-card p-6",
|
|
852
852
|
children: [
|
|
853
853
|
/* @__PURE__ */ jsxDEV3("div", {
|
|
854
854
|
className: "flex items-start justify-between",
|
|
@@ -856,7 +856,7 @@ function BillingTab({ subscription }) {
|
|
|
856
856
|
/* @__PURE__ */ jsxDEV3("div", {
|
|
857
857
|
children: [
|
|
858
858
|
/* @__PURE__ */ jsxDEV3("h3", {
|
|
859
|
-
className: "text-lg
|
|
859
|
+
className: "font-semibold text-lg",
|
|
860
860
|
children: [
|
|
861
861
|
subscription.plan,
|
|
862
862
|
" Plan"
|
|
@@ -906,9 +906,9 @@ function BillingTab({ subscription }) {
|
|
|
906
906
|
]
|
|
907
907
|
}, undefined, true, undefined, this),
|
|
908
908
|
subscription.cancelAtPeriodEnd && /* @__PURE__ */ jsxDEV3("div", {
|
|
909
|
-
className: "border-border bg-destructive/10 text-destructive
|
|
909
|
+
className: "rounded-xl border border-border bg-destructive/10 p-4 text-destructive",
|
|
910
910
|
children: /* @__PURE__ */ jsxDEV3("p", {
|
|
911
|
-
className: "text-sm
|
|
911
|
+
className: "font-medium text-sm",
|
|
912
912
|
children: "⚠️ Your subscription will be cancelled at the end of the current period."
|
|
913
913
|
}, undefined, false, undefined, this)
|
|
914
914
|
}, undefined, false, undefined, this)
|
|
@@ -919,10 +919,10 @@ function SettingsTab() {
|
|
|
919
919
|
return /* @__PURE__ */ jsxDEV3("div", {
|
|
920
920
|
className: "space-y-6",
|
|
921
921
|
children: /* @__PURE__ */ jsxDEV3("div", {
|
|
922
|
-
className: "border-border bg-card
|
|
922
|
+
className: "rounded-xl border border-border bg-card p-6",
|
|
923
923
|
children: [
|
|
924
924
|
/* @__PURE__ */ jsxDEV3("h3", {
|
|
925
|
-
className: "mb-4 text-lg
|
|
925
|
+
className: "mb-4 font-semibold text-lg",
|
|
926
926
|
children: "Organization Settings"
|
|
927
927
|
}, undefined, false, undefined, this),
|
|
928
928
|
/* @__PURE__ */ jsxDEV3("div", {
|
|
@@ -932,14 +932,14 @@ function SettingsTab() {
|
|
|
932
932
|
children: [
|
|
933
933
|
/* @__PURE__ */ jsxDEV3("label", {
|
|
934
934
|
htmlFor: "org-name",
|
|
935
|
-
className: "text-sm
|
|
935
|
+
className: "font-medium text-sm",
|
|
936
936
|
children: "Organization Name"
|
|
937
937
|
}, undefined, false, undefined, this),
|
|
938
938
|
/* @__PURE__ */ jsxDEV3("input", {
|
|
939
939
|
id: "org-name",
|
|
940
940
|
type: "text",
|
|
941
941
|
defaultValue: "Demo Organization",
|
|
942
|
-
className: "
|
|
942
|
+
className: "mt-1 block w-full rounded-md border border-input bg-background px-3 py-2"
|
|
943
943
|
}, undefined, false, undefined, this)
|
|
944
944
|
]
|
|
945
945
|
}, undefined, true, undefined, this),
|
|
@@ -947,12 +947,12 @@ function SettingsTab() {
|
|
|
947
947
|
children: [
|
|
948
948
|
/* @__PURE__ */ jsxDEV3("label", {
|
|
949
949
|
htmlFor: "timezone",
|
|
950
|
-
className: "text-sm
|
|
950
|
+
className: "font-medium text-sm",
|
|
951
951
|
children: "Default Timezone"
|
|
952
952
|
}, undefined, false, undefined, this),
|
|
953
953
|
/* @__PURE__ */ jsxDEV3("select", {
|
|
954
954
|
id: "timezone",
|
|
955
|
-
className: "
|
|
955
|
+
className: "mt-1 block w-full rounded-md border border-input bg-background px-3 py-2",
|
|
956
956
|
children: [
|
|
957
957
|
/* @__PURE__ */ jsxDEV3("option", {
|
|
958
958
|
children: "UTC"
|
|
@@ -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;
|