@contractspec/example.saas-boilerplate 3.8.8 → 3.8.10
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 +156 -156
- package/CHANGELOG.md +40 -0
- package/dist/billing/billing.entity.js +1 -113
- package/dist/billing/billing.enum.js +1 -19
- package/dist/billing/billing.event.js +1 -90
- package/dist/billing/billing.handler.js +1 -148
- package/dist/billing/billing.operations.js +1 -278
- package/dist/billing/billing.presentation.js +1 -55
- package/dist/billing/billing.schema.js +1 -121
- package/dist/billing/index.js +1 -691
- package/dist/browser/billing/billing.entity.js +1 -113
- package/dist/browser/billing/billing.enum.js +1 -19
- package/dist/browser/billing/billing.event.js +1 -90
- package/dist/browser/billing/billing.handler.js +1 -148
- package/dist/browser/billing/billing.operations.js +1 -278
- package/dist/browser/billing/billing.presentation.js +1 -55
- package/dist/browser/billing/billing.schema.js +1 -121
- package/dist/browser/billing/index.js +1 -691
- package/dist/browser/dashboard/dashboard.presentation.js +1 -55
- package/dist/browser/dashboard/index.js +1 -55
- package/dist/browser/docs/index.js +5 -49
- package/dist/browser/docs/saas-boilerplate.docblock.js +5 -49
- package/dist/browser/example.js +1 -39
- package/dist/browser/handlers/index.js +2 -358
- package/dist/browser/handlers/saas.handlers.js +2 -134
- package/dist/browser/index.js +9 -3591
- package/dist/browser/presentations/index.js +1 -299
- package/dist/browser/project/index.js +1 -793
- package/dist/browser/project/project.entity.js +1 -77
- package/dist/browser/project/project.enum.js +1 -18
- package/dist/browser/project/project.event.js +1 -103
- package/dist/browser/project/project.handler.js +1 -178
- package/dist/browser/project/project.operations.js +1 -372
- package/dist/browser/project/project.presentation.js +1 -180
- package/dist/browser/project/project.schema.js +1 -134
- package/dist/browser/saas-boilerplate.feature.js +1 -304
- package/dist/browser/seeders/index.js +2 -20
- package/dist/browser/settings/index.js +1 -75
- package/dist/browser/settings/settings.entity.js +1 -74
- package/dist/browser/settings/settings.enum.js +1 -11
- package/dist/browser/shared/mock-data.js +1 -104
- package/dist/browser/tests/operations.test-spec.js +1 -112
- package/dist/browser/ui/SaasDashboard.js +1 -1239
- package/dist/browser/ui/SaasDashboard.visualizations.js +1 -249
- package/dist/browser/ui/SaasProjectList.js +1 -162
- package/dist/browser/ui/SaasSettingsPanel.js +1 -145
- package/dist/browser/ui/hooks/index.js +1 -159
- package/dist/browser/ui/hooks/useProjectList.js +1 -66
- package/dist/browser/ui/hooks/useProjectMutations.js +1 -91
- package/dist/browser/ui/index.js +5 -2077
- package/dist/browser/ui/modals/CreateProjectModal.js +1 -153
- package/dist/browser/ui/modals/ProjectActionsModal.js +1 -335
- package/dist/browser/ui/modals/index.js +1 -487
- package/dist/browser/ui/overlays/demo-overlays.js +1 -61
- package/dist/browser/ui/overlays/index.js +1 -61
- package/dist/browser/ui/renderers/index.js +5 -901
- package/dist/browser/ui/renderers/project-list.markdown.js +5 -725
- package/dist/browser/ui/renderers/project-list.renderer.js +1 -177
- package/dist/browser/visualizations/catalog.js +1 -155
- package/dist/browser/visualizations/index.js +1 -217
- package/dist/browser/visualizations/selectors.js +1 -210
- package/dist/dashboard/dashboard.presentation.js +1 -55
- package/dist/dashboard/index.js +1 -55
- package/dist/docs/index.js +5 -49
- package/dist/docs/saas-boilerplate.docblock.js +5 -49
- package/dist/example.js +1 -39
- package/dist/handlers/index.js +2 -358
- package/dist/handlers/saas.handlers.js +2 -134
- package/dist/index.js +9 -3591
- package/dist/node/billing/billing.entity.js +1 -113
- package/dist/node/billing/billing.enum.js +1 -19
- package/dist/node/billing/billing.event.js +1 -90
- package/dist/node/billing/billing.handler.js +1 -148
- package/dist/node/billing/billing.operations.js +1 -278
- package/dist/node/billing/billing.presentation.js +1 -55
- package/dist/node/billing/billing.schema.js +1 -121
- package/dist/node/billing/index.js +1 -691
- package/dist/node/dashboard/dashboard.presentation.js +1 -55
- package/dist/node/dashboard/index.js +1 -55
- package/dist/node/docs/index.js +5 -49
- package/dist/node/docs/saas-boilerplate.docblock.js +5 -49
- package/dist/node/example.js +1 -39
- package/dist/node/handlers/index.js +2 -358
- package/dist/node/handlers/saas.handlers.js +2 -134
- package/dist/node/index.js +9 -3591
- package/dist/node/presentations/index.js +1 -299
- package/dist/node/project/index.js +1 -793
- package/dist/node/project/project.entity.js +1 -77
- package/dist/node/project/project.enum.js +1 -18
- package/dist/node/project/project.event.js +1 -103
- package/dist/node/project/project.handler.js +1 -178
- package/dist/node/project/project.operations.js +1 -372
- package/dist/node/project/project.presentation.js +1 -180
- package/dist/node/project/project.schema.js +1 -134
- package/dist/node/saas-boilerplate.feature.js +1 -304
- package/dist/node/seeders/index.js +2 -20
- package/dist/node/settings/index.js +1 -75
- package/dist/node/settings/settings.entity.js +1 -74
- package/dist/node/settings/settings.enum.js +1 -11
- package/dist/node/shared/mock-data.js +1 -104
- package/dist/node/tests/operations.test-spec.js +1 -112
- package/dist/node/ui/SaasDashboard.js +1 -1239
- package/dist/node/ui/SaasDashboard.visualizations.js +1 -249
- package/dist/node/ui/SaasProjectList.js +1 -162
- package/dist/node/ui/SaasSettingsPanel.js +1 -145
- package/dist/node/ui/hooks/index.js +1 -159
- package/dist/node/ui/hooks/useProjectList.js +1 -66
- package/dist/node/ui/hooks/useProjectMutations.js +1 -91
- package/dist/node/ui/index.js +5 -2077
- package/dist/node/ui/modals/CreateProjectModal.js +1 -153
- package/dist/node/ui/modals/ProjectActionsModal.js +1 -335
- package/dist/node/ui/modals/index.js +1 -487
- package/dist/node/ui/overlays/demo-overlays.js +1 -61
- package/dist/node/ui/overlays/index.js +1 -61
- package/dist/node/ui/renderers/index.js +5 -901
- package/dist/node/ui/renderers/project-list.markdown.js +5 -725
- package/dist/node/ui/renderers/project-list.renderer.js +1 -177
- package/dist/node/visualizations/catalog.js +1 -155
- package/dist/node/visualizations/index.js +1 -217
- package/dist/node/visualizations/selectors.js +1 -210
- package/dist/presentations/index.js +1 -299
- package/dist/project/index.js +1 -793
- package/dist/project/project.entity.js +1 -77
- package/dist/project/project.enum.js +1 -18
- package/dist/project/project.event.js +1 -103
- package/dist/project/project.handler.js +1 -178
- package/dist/project/project.operations.js +1 -372
- package/dist/project/project.presentation.js +1 -180
- package/dist/project/project.schema.js +1 -134
- package/dist/saas-boilerplate.feature.js +1 -304
- package/dist/seeders/index.js +2 -20
- package/dist/settings/index.js +1 -75
- package/dist/settings/settings.entity.js +1 -74
- package/dist/settings/settings.enum.js +1 -11
- package/dist/shared/mock-data.js +1 -104
- package/dist/tests/operations.test-spec.js +1 -112
- package/dist/ui/SaasDashboard.js +1 -1239
- package/dist/ui/SaasDashboard.visualizations.js +1 -249
- package/dist/ui/SaasProjectList.js +1 -162
- package/dist/ui/SaasSettingsPanel.js +1 -145
- package/dist/ui/hooks/index.js +1 -159
- package/dist/ui/hooks/useProjectList.js +1 -66
- package/dist/ui/hooks/useProjectMutations.js +1 -91
- package/dist/ui/index.js +5 -2077
- package/dist/ui/modals/CreateProjectModal.js +1 -153
- package/dist/ui/modals/ProjectActionsModal.js +1 -335
- package/dist/ui/modals/index.js +1 -487
- package/dist/ui/overlays/demo-overlays.js +1 -61
- package/dist/ui/overlays/index.js +1 -61
- package/dist/ui/renderers/index.js +5 -901
- package/dist/ui/renderers/project-list.markdown.js +5 -725
- package/dist/ui/renderers/project-list.renderer.js +1 -177
- package/dist/visualizations/catalog.js +1 -155
- package/dist/visualizations/index.js +1 -217
- package/dist/visualizations/selectors.js +1 -210
- package/package.json +15 -15
|
@@ -1,487 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { Button, Input } from "@contractspec/lib.design-system";
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
5
|
-
"use client";
|
|
6
|
-
var TIERS = [
|
|
7
|
-
{ value: "FREE", label: "Free" },
|
|
8
|
-
{ value: "PRO", label: "Pro" },
|
|
9
|
-
{ value: "ENTERPRISE", label: "Enterprise" }
|
|
10
|
-
];
|
|
11
|
-
function CreateProjectModal({
|
|
12
|
-
isOpen,
|
|
13
|
-
onClose,
|
|
14
|
-
onSubmit,
|
|
15
|
-
isLoading = false
|
|
16
|
-
}) {
|
|
17
|
-
const [name, setName] = useState("");
|
|
18
|
-
const [description, setDescription] = useState("");
|
|
19
|
-
const [tier, setTier] = useState("FREE");
|
|
20
|
-
const [error, setError] = useState(null);
|
|
21
|
-
const handleSubmit = async (e) => {
|
|
22
|
-
e.preventDefault();
|
|
23
|
-
setError(null);
|
|
24
|
-
if (!name.trim()) {
|
|
25
|
-
setError("Project name is required");
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
try {
|
|
29
|
-
await onSubmit({
|
|
30
|
-
name: name.trim(),
|
|
31
|
-
description: description.trim() || undefined,
|
|
32
|
-
tier
|
|
33
|
-
});
|
|
34
|
-
setName("");
|
|
35
|
-
setDescription("");
|
|
36
|
-
setTier("FREE");
|
|
37
|
-
onClose();
|
|
38
|
-
} catch (err) {
|
|
39
|
-
setError(err instanceof Error ? err.message : "Failed to create project");
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
if (!isOpen)
|
|
43
|
-
return null;
|
|
44
|
-
return /* @__PURE__ */ jsxDEV("div", {
|
|
45
|
-
className: "fixed inset-0 z-50 flex items-center justify-center",
|
|
46
|
-
children: [
|
|
47
|
-
/* @__PURE__ */ jsxDEV("div", {
|
|
48
|
-
className: "absolute inset-0 bg-background/80 backdrop-blur-sm",
|
|
49
|
-
onClick: onClose,
|
|
50
|
-
role: "button",
|
|
51
|
-
tabIndex: 0,
|
|
52
|
-
onKeyDown: (e) => {
|
|
53
|
-
if (e.key === "Enter" || e.key === " ")
|
|
54
|
-
onClose();
|
|
55
|
-
},
|
|
56
|
-
"aria-label": "Close modal"
|
|
57
|
-
}, undefined, false, undefined, this),
|
|
58
|
-
/* @__PURE__ */ jsxDEV("div", {
|
|
59
|
-
className: "relative z-10 w-full max-w-md rounded-xl border border-border bg-card p-6 shadow-xl",
|
|
60
|
-
children: [
|
|
61
|
-
/* @__PURE__ */ jsxDEV("h2", {
|
|
62
|
-
className: "mb-4 font-semibold text-xl",
|
|
63
|
-
children: "Create New Project"
|
|
64
|
-
}, undefined, false, undefined, this),
|
|
65
|
-
/* @__PURE__ */ jsxDEV("form", {
|
|
66
|
-
onSubmit: handleSubmit,
|
|
67
|
-
className: "space-y-4",
|
|
68
|
-
children: [
|
|
69
|
-
/* @__PURE__ */ jsxDEV("div", {
|
|
70
|
-
children: [
|
|
71
|
-
/* @__PURE__ */ jsxDEV("label", {
|
|
72
|
-
htmlFor: "project-name",
|
|
73
|
-
className: "mb-1 block font-medium text-muted-foreground text-sm",
|
|
74
|
-
children: "Project Name *"
|
|
75
|
-
}, undefined, false, undefined, this),
|
|
76
|
-
/* @__PURE__ */ jsxDEV(Input, {
|
|
77
|
-
id: "project-name",
|
|
78
|
-
value: name,
|
|
79
|
-
onChange: (e) => setName(e.target.value),
|
|
80
|
-
placeholder: "e.g., My Awesome Project",
|
|
81
|
-
disabled: isLoading
|
|
82
|
-
}, undefined, false, undefined, this)
|
|
83
|
-
]
|
|
84
|
-
}, undefined, true, undefined, this),
|
|
85
|
-
/* @__PURE__ */ jsxDEV("div", {
|
|
86
|
-
children: [
|
|
87
|
-
/* @__PURE__ */ jsxDEV("label", {
|
|
88
|
-
htmlFor: "project-description",
|
|
89
|
-
className: "mb-1 block font-medium text-muted-foreground text-sm",
|
|
90
|
-
children: "Description"
|
|
91
|
-
}, undefined, false, undefined, this),
|
|
92
|
-
/* @__PURE__ */ jsxDEV("textarea", {
|
|
93
|
-
id: "project-description",
|
|
94
|
-
value: description,
|
|
95
|
-
onChange: (e) => setDescription(e.target.value),
|
|
96
|
-
placeholder: "Describe what this project is about...",
|
|
97
|
-
rows: 3,
|
|
98
|
-
disabled: isLoading,
|
|
99
|
-
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"
|
|
100
|
-
}, undefined, false, undefined, this)
|
|
101
|
-
]
|
|
102
|
-
}, undefined, true, undefined, this),
|
|
103
|
-
/* @__PURE__ */ jsxDEV("div", {
|
|
104
|
-
children: [
|
|
105
|
-
/* @__PURE__ */ jsxDEV("label", {
|
|
106
|
-
htmlFor: "project-tier",
|
|
107
|
-
className: "mb-1 block font-medium text-muted-foreground text-sm",
|
|
108
|
-
children: "Tier"
|
|
109
|
-
}, undefined, false, undefined, this),
|
|
110
|
-
/* @__PURE__ */ jsxDEV("select", {
|
|
111
|
-
id: "project-tier",
|
|
112
|
-
value: tier,
|
|
113
|
-
onChange: (e) => setTier(e.target.value),
|
|
114
|
-
disabled: isLoading,
|
|
115
|
-
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",
|
|
116
|
-
children: TIERS.map((t) => /* @__PURE__ */ jsxDEV("option", {
|
|
117
|
-
value: t.value,
|
|
118
|
-
children: t.label
|
|
119
|
-
}, t.value, false, undefined, this))
|
|
120
|
-
}, undefined, false, undefined, this)
|
|
121
|
-
]
|
|
122
|
-
}, undefined, true, undefined, this),
|
|
123
|
-
error && /* @__PURE__ */ jsxDEV("div", {
|
|
124
|
-
className: "rounded-md bg-destructive/10 p-3 text-destructive text-sm",
|
|
125
|
-
children: error
|
|
126
|
-
}, undefined, false, undefined, this),
|
|
127
|
-
/* @__PURE__ */ jsxDEV("div", {
|
|
128
|
-
className: "flex justify-end gap-3 pt-2",
|
|
129
|
-
children: [
|
|
130
|
-
/* @__PURE__ */ jsxDEV(Button, {
|
|
131
|
-
type: "button",
|
|
132
|
-
variant: "ghost",
|
|
133
|
-
onPress: onClose,
|
|
134
|
-
disabled: isLoading,
|
|
135
|
-
children: "Cancel"
|
|
136
|
-
}, undefined, false, undefined, this),
|
|
137
|
-
/* @__PURE__ */ jsxDEV(Button, {
|
|
138
|
-
type: "submit",
|
|
139
|
-
disabled: isLoading,
|
|
140
|
-
children: isLoading ? "Creating..." : "Create Project"
|
|
141
|
-
}, undefined, false, undefined, this)
|
|
142
|
-
]
|
|
143
|
-
}, undefined, true, undefined, this)
|
|
144
|
-
]
|
|
145
|
-
}, undefined, true, undefined, this)
|
|
146
|
-
]
|
|
147
|
-
}, undefined, true, undefined, this)
|
|
148
|
-
]
|
|
149
|
-
}, undefined, true, undefined, this);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// src/ui/modals/ProjectActionsModal.tsx
|
|
153
|
-
import { Button as Button2, Input as Input2 } from "@contractspec/lib.design-system";
|
|
154
|
-
import { useEffect, useState as useState2 } from "react";
|
|
155
|
-
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
156
|
-
"use client";
|
|
157
|
-
function ProjectActionsModal({
|
|
158
|
-
isOpen,
|
|
159
|
-
project,
|
|
160
|
-
onClose,
|
|
161
|
-
onUpdate,
|
|
162
|
-
onArchive,
|
|
163
|
-
onActivate,
|
|
164
|
-
onDelete,
|
|
165
|
-
isLoading = false
|
|
166
|
-
}) {
|
|
167
|
-
const [mode, setMode] = useState2("menu");
|
|
168
|
-
const [name, setName] = useState2("");
|
|
169
|
-
const [description, setDescription] = useState2("");
|
|
170
|
-
const [error, setError] = useState2(null);
|
|
171
|
-
const resetForm = () => {
|
|
172
|
-
setMode("menu");
|
|
173
|
-
setError(null);
|
|
174
|
-
if (project) {
|
|
175
|
-
setName(project.name);
|
|
176
|
-
setDescription(project.description ?? "");
|
|
177
|
-
}
|
|
178
|
-
};
|
|
179
|
-
const handleClose = () => {
|
|
180
|
-
resetForm();
|
|
181
|
-
onClose();
|
|
182
|
-
};
|
|
183
|
-
useEffect(() => {
|
|
184
|
-
if (project) {
|
|
185
|
-
setName(project.name);
|
|
186
|
-
setDescription(project.description ?? "");
|
|
187
|
-
}
|
|
188
|
-
}, [project]);
|
|
189
|
-
const handleEdit = async () => {
|
|
190
|
-
if (!project)
|
|
191
|
-
return;
|
|
192
|
-
setError(null);
|
|
193
|
-
if (!name.trim()) {
|
|
194
|
-
setError("Project name is required");
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
try {
|
|
198
|
-
await onUpdate({
|
|
199
|
-
id: project.id,
|
|
200
|
-
name: name.trim(),
|
|
201
|
-
description: description.trim() || undefined
|
|
202
|
-
});
|
|
203
|
-
handleClose();
|
|
204
|
-
} catch (err) {
|
|
205
|
-
setError(err instanceof Error ? err.message : "Failed to update project");
|
|
206
|
-
}
|
|
207
|
-
};
|
|
208
|
-
const handleArchive = async () => {
|
|
209
|
-
if (!project)
|
|
210
|
-
return;
|
|
211
|
-
setError(null);
|
|
212
|
-
try {
|
|
213
|
-
await onArchive(project.id);
|
|
214
|
-
handleClose();
|
|
215
|
-
} catch (err) {
|
|
216
|
-
setError(err instanceof Error ? err.message : "Failed to archive project");
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
const handleActivate = async () => {
|
|
220
|
-
if (!project)
|
|
221
|
-
return;
|
|
222
|
-
setError(null);
|
|
223
|
-
try {
|
|
224
|
-
await onActivate(project.id);
|
|
225
|
-
handleClose();
|
|
226
|
-
} catch (err) {
|
|
227
|
-
setError(err instanceof Error ? err.message : "Failed to activate project");
|
|
228
|
-
}
|
|
229
|
-
};
|
|
230
|
-
const handleDelete = async () => {
|
|
231
|
-
if (!project)
|
|
232
|
-
return;
|
|
233
|
-
setError(null);
|
|
234
|
-
try {
|
|
235
|
-
await onDelete(project.id);
|
|
236
|
-
handleClose();
|
|
237
|
-
} catch (err) {
|
|
238
|
-
setError(err instanceof Error ? err.message : "Failed to delete project");
|
|
239
|
-
}
|
|
240
|
-
};
|
|
241
|
-
if (!isOpen || !project)
|
|
242
|
-
return null;
|
|
243
|
-
return /* @__PURE__ */ jsxDEV2("div", {
|
|
244
|
-
className: "fixed inset-0 z-50 flex items-center justify-center",
|
|
245
|
-
children: [
|
|
246
|
-
/* @__PURE__ */ jsxDEV2("div", {
|
|
247
|
-
className: "absolute inset-0 bg-background/80 backdrop-blur-sm",
|
|
248
|
-
onClick: handleClose,
|
|
249
|
-
role: "button",
|
|
250
|
-
tabIndex: 0,
|
|
251
|
-
onKeyDown: (e) => {
|
|
252
|
-
if (e.key === "Enter" || e.key === " ")
|
|
253
|
-
handleClose();
|
|
254
|
-
},
|
|
255
|
-
"aria-label": "Close modal"
|
|
256
|
-
}, undefined, false, undefined, this),
|
|
257
|
-
/* @__PURE__ */ jsxDEV2("div", {
|
|
258
|
-
className: "relative z-10 w-full max-w-md rounded-xl border border-border bg-card p-6 shadow-xl",
|
|
259
|
-
children: [
|
|
260
|
-
/* @__PURE__ */ jsxDEV2("div", {
|
|
261
|
-
className: "mb-4 border-border border-b pb-4",
|
|
262
|
-
children: [
|
|
263
|
-
/* @__PURE__ */ jsxDEV2("h2", {
|
|
264
|
-
className: "font-semibold text-xl",
|
|
265
|
-
children: project.name
|
|
266
|
-
}, undefined, false, undefined, this),
|
|
267
|
-
/* @__PURE__ */ jsxDEV2("p", {
|
|
268
|
-
className: "text-muted-foreground text-sm",
|
|
269
|
-
children: [
|
|
270
|
-
project.tier,
|
|
271
|
-
" · ",
|
|
272
|
-
project.status
|
|
273
|
-
]
|
|
274
|
-
}, undefined, true, undefined, this)
|
|
275
|
-
]
|
|
276
|
-
}, undefined, true, undefined, this),
|
|
277
|
-
mode === "menu" && /* @__PURE__ */ jsxDEV2("div", {
|
|
278
|
-
className: "space-y-3",
|
|
279
|
-
children: [
|
|
280
|
-
/* @__PURE__ */ jsxDEV2(Button2, {
|
|
281
|
-
className: "w-full justify-start",
|
|
282
|
-
variant: "ghost",
|
|
283
|
-
onPress: () => setMode("edit"),
|
|
284
|
-
children: [
|
|
285
|
-
/* @__PURE__ */ jsxDEV2("span", {
|
|
286
|
-
className: "mr-2",
|
|
287
|
-
children: "✏️"
|
|
288
|
-
}, undefined, false, undefined, this),
|
|
289
|
-
" Edit Project"
|
|
290
|
-
]
|
|
291
|
-
}, undefined, true, undefined, this),
|
|
292
|
-
project.status === "ACTIVE" || project.status === "DRAFT" ? /* @__PURE__ */ jsxDEV2(Button2, {
|
|
293
|
-
className: "w-full justify-start",
|
|
294
|
-
variant: "ghost",
|
|
295
|
-
onPress: () => setMode("archive"),
|
|
296
|
-
children: [
|
|
297
|
-
/* @__PURE__ */ jsxDEV2("span", {
|
|
298
|
-
className: "mr-2",
|
|
299
|
-
children: "\uD83D\uDCE6"
|
|
300
|
-
}, undefined, false, undefined, this),
|
|
301
|
-
" Archive Project"
|
|
302
|
-
]
|
|
303
|
-
}, undefined, true, undefined, this) : project.status === "ARCHIVED" ? /* @__PURE__ */ jsxDEV2(Button2, {
|
|
304
|
-
className: "w-full justify-start",
|
|
305
|
-
variant: "ghost",
|
|
306
|
-
onPress: handleActivate,
|
|
307
|
-
disabled: isLoading,
|
|
308
|
-
children: [
|
|
309
|
-
/* @__PURE__ */ jsxDEV2("span", {
|
|
310
|
-
className: "mr-2",
|
|
311
|
-
children: "\uD83D\uDD04"
|
|
312
|
-
}, undefined, false, undefined, this),
|
|
313
|
-
" Restore Project"
|
|
314
|
-
]
|
|
315
|
-
}, undefined, true, undefined, this) : null,
|
|
316
|
-
/* @__PURE__ */ jsxDEV2(Button2, {
|
|
317
|
-
className: "w-full justify-start text-red-500 hover:text-red-600",
|
|
318
|
-
variant: "ghost",
|
|
319
|
-
onPress: () => setMode("delete"),
|
|
320
|
-
children: [
|
|
321
|
-
/* @__PURE__ */ jsxDEV2("span", {
|
|
322
|
-
className: "mr-2",
|
|
323
|
-
children: "\uD83D\uDDD1️"
|
|
324
|
-
}, undefined, false, undefined, this),
|
|
325
|
-
" Delete Project"
|
|
326
|
-
]
|
|
327
|
-
}, undefined, true, undefined, this),
|
|
328
|
-
/* @__PURE__ */ jsxDEV2("div", {
|
|
329
|
-
className: "border-border border-t pt-3",
|
|
330
|
-
children: /* @__PURE__ */ jsxDEV2(Button2, {
|
|
331
|
-
className: "w-full",
|
|
332
|
-
variant: "outline",
|
|
333
|
-
onPress: handleClose,
|
|
334
|
-
children: "Close"
|
|
335
|
-
}, undefined, false, undefined, this)
|
|
336
|
-
}, undefined, false, undefined, this)
|
|
337
|
-
]
|
|
338
|
-
}, undefined, true, undefined, this),
|
|
339
|
-
mode === "edit" && /* @__PURE__ */ jsxDEV2("div", {
|
|
340
|
-
className: "space-y-4",
|
|
341
|
-
children: [
|
|
342
|
-
/* @__PURE__ */ jsxDEV2("div", {
|
|
343
|
-
children: [
|
|
344
|
-
/* @__PURE__ */ jsxDEV2("label", {
|
|
345
|
-
htmlFor: "edit-name",
|
|
346
|
-
className: "mb-1 block font-medium text-muted-foreground text-sm",
|
|
347
|
-
children: "Project Name *"
|
|
348
|
-
}, undefined, false, undefined, this),
|
|
349
|
-
/* @__PURE__ */ jsxDEV2(Input2, {
|
|
350
|
-
id: "edit-name",
|
|
351
|
-
value: name,
|
|
352
|
-
onChange: (e) => setName(e.target.value),
|
|
353
|
-
disabled: isLoading
|
|
354
|
-
}, undefined, false, undefined, this)
|
|
355
|
-
]
|
|
356
|
-
}, undefined, true, undefined, this),
|
|
357
|
-
/* @__PURE__ */ jsxDEV2("div", {
|
|
358
|
-
children: [
|
|
359
|
-
/* @__PURE__ */ jsxDEV2("label", {
|
|
360
|
-
htmlFor: "edit-description",
|
|
361
|
-
className: "mb-1 block font-medium text-muted-foreground text-sm",
|
|
362
|
-
children: "Description"
|
|
363
|
-
}, undefined, false, undefined, this),
|
|
364
|
-
/* @__PURE__ */ jsxDEV2("textarea", {
|
|
365
|
-
id: "edit-description",
|
|
366
|
-
value: description,
|
|
367
|
-
onChange: (e) => setDescription(e.target.value),
|
|
368
|
-
rows: 3,
|
|
369
|
-
disabled: isLoading,
|
|
370
|
-
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"
|
|
371
|
-
}, undefined, false, undefined, this)
|
|
372
|
-
]
|
|
373
|
-
}, undefined, true, undefined, this),
|
|
374
|
-
error && /* @__PURE__ */ jsxDEV2("div", {
|
|
375
|
-
className: "rounded-md bg-destructive/10 p-3 text-destructive text-sm",
|
|
376
|
-
children: error
|
|
377
|
-
}, undefined, false, undefined, this),
|
|
378
|
-
/* @__PURE__ */ jsxDEV2("div", {
|
|
379
|
-
className: "flex justify-end gap-3 pt-2",
|
|
380
|
-
children: [
|
|
381
|
-
/* @__PURE__ */ jsxDEV2(Button2, {
|
|
382
|
-
variant: "ghost",
|
|
383
|
-
onPress: () => setMode("menu"),
|
|
384
|
-
disabled: isLoading,
|
|
385
|
-
children: "Back"
|
|
386
|
-
}, undefined, false, undefined, this),
|
|
387
|
-
/* @__PURE__ */ jsxDEV2(Button2, {
|
|
388
|
-
onPress: handleEdit,
|
|
389
|
-
disabled: isLoading,
|
|
390
|
-
children: isLoading ? "Saving..." : "Save Changes"
|
|
391
|
-
}, undefined, false, undefined, this)
|
|
392
|
-
]
|
|
393
|
-
}, undefined, true, undefined, this)
|
|
394
|
-
]
|
|
395
|
-
}, undefined, true, undefined, this),
|
|
396
|
-
mode === "archive" && /* @__PURE__ */ jsxDEV2("div", {
|
|
397
|
-
className: "space-y-4",
|
|
398
|
-
children: [
|
|
399
|
-
/* @__PURE__ */ jsxDEV2("p", {
|
|
400
|
-
className: "text-muted-foreground",
|
|
401
|
-
children: [
|
|
402
|
-
"Are you sure you want to archive",
|
|
403
|
-
" ",
|
|
404
|
-
/* @__PURE__ */ jsxDEV2("span", {
|
|
405
|
-
className: "font-medium text-foreground",
|
|
406
|
-
children: project.name
|
|
407
|
-
}, undefined, false, undefined, this),
|
|
408
|
-
"?"
|
|
409
|
-
]
|
|
410
|
-
}, undefined, true, undefined, this),
|
|
411
|
-
/* @__PURE__ */ jsxDEV2("p", {
|
|
412
|
-
className: "text-muted-foreground text-sm",
|
|
413
|
-
children: "Archived projects can be restored later."
|
|
414
|
-
}, undefined, false, undefined, this),
|
|
415
|
-
error && /* @__PURE__ */ jsxDEV2("div", {
|
|
416
|
-
className: "rounded-md bg-destructive/10 p-3 text-destructive text-sm",
|
|
417
|
-
children: error
|
|
418
|
-
}, undefined, false, undefined, this),
|
|
419
|
-
/* @__PURE__ */ jsxDEV2("div", {
|
|
420
|
-
className: "flex justify-end gap-3 pt-2",
|
|
421
|
-
children: [
|
|
422
|
-
/* @__PURE__ */ jsxDEV2(Button2, {
|
|
423
|
-
variant: "ghost",
|
|
424
|
-
onPress: () => setMode("menu"),
|
|
425
|
-
disabled: isLoading,
|
|
426
|
-
children: "Cancel"
|
|
427
|
-
}, undefined, false, undefined, this),
|
|
428
|
-
/* @__PURE__ */ jsxDEV2(Button2, {
|
|
429
|
-
onPress: handleArchive,
|
|
430
|
-
disabled: isLoading,
|
|
431
|
-
children: isLoading ? "Archiving..." : "\uD83D\uDCE6 Archive"
|
|
432
|
-
}, undefined, false, undefined, this)
|
|
433
|
-
]
|
|
434
|
-
}, undefined, true, undefined, this)
|
|
435
|
-
]
|
|
436
|
-
}, undefined, true, undefined, this),
|
|
437
|
-
mode === "delete" && /* @__PURE__ */ jsxDEV2("div", {
|
|
438
|
-
className: "space-y-4",
|
|
439
|
-
children: [
|
|
440
|
-
/* @__PURE__ */ jsxDEV2("p", {
|
|
441
|
-
className: "text-muted-foreground",
|
|
442
|
-
children: [
|
|
443
|
-
"Are you sure you want to delete",
|
|
444
|
-
" ",
|
|
445
|
-
/* @__PURE__ */ jsxDEV2("span", {
|
|
446
|
-
className: "font-medium text-foreground",
|
|
447
|
-
children: project.name
|
|
448
|
-
}, undefined, false, undefined, this),
|
|
449
|
-
"?"
|
|
450
|
-
]
|
|
451
|
-
}, undefined, true, undefined, this),
|
|
452
|
-
/* @__PURE__ */ jsxDEV2("p", {
|
|
453
|
-
className: "text-destructive text-sm",
|
|
454
|
-
children: "This action cannot be undone."
|
|
455
|
-
}, undefined, false, undefined, this),
|
|
456
|
-
error && /* @__PURE__ */ jsxDEV2("div", {
|
|
457
|
-
className: "rounded-md bg-destructive/10 p-3 text-destructive text-sm",
|
|
458
|
-
children: error
|
|
459
|
-
}, undefined, false, undefined, this),
|
|
460
|
-
/* @__PURE__ */ jsxDEV2("div", {
|
|
461
|
-
className: "flex justify-end gap-3 pt-2",
|
|
462
|
-
children: [
|
|
463
|
-
/* @__PURE__ */ jsxDEV2(Button2, {
|
|
464
|
-
variant: "ghost",
|
|
465
|
-
onPress: () => setMode("menu"),
|
|
466
|
-
disabled: isLoading,
|
|
467
|
-
children: "Cancel"
|
|
468
|
-
}, undefined, false, undefined, this),
|
|
469
|
-
/* @__PURE__ */ jsxDEV2(Button2, {
|
|
470
|
-
variant: "destructive",
|
|
471
|
-
onPress: handleDelete,
|
|
472
|
-
disabled: isLoading,
|
|
473
|
-
children: isLoading ? "Deleting..." : "\uD83D\uDDD1️ Delete"
|
|
474
|
-
}, undefined, false, undefined, this)
|
|
475
|
-
]
|
|
476
|
-
}, undefined, true, undefined, this)
|
|
477
|
-
]
|
|
478
|
-
}, undefined, true, undefined, this)
|
|
479
|
-
]
|
|
480
|
-
}, undefined, true, undefined, this)
|
|
481
|
-
]
|
|
482
|
-
}, undefined, true, undefined, this);
|
|
483
|
-
}
|
|
484
|
-
export {
|
|
485
|
-
ProjectActionsModal,
|
|
486
|
-
CreateProjectModal
|
|
487
|
-
};
|
|
1
|
+
import{Button as f,Input as S}from"@contractspec/lib.design-system";import{useState as I}from"react";import{jsx as W,jsxs as V}from"react/jsx-runtime";var B=[{value:"FREE",label:"Free"},{value:"PRO",label:"Pro"},{value:"ENTERPRISE",label:"Enterprise"}];function h({isOpen:T,onClose:q,onSubmit:b,isLoading:$=!1}){let[F,R]=I(""),[U,Q]=I(""),[w,Y]=I("FREE"),[k,z]=I(null),y=async(K)=>{if(K.preventDefault(),z(null),!F.trim()){z("Project name is required");return}try{await b({name:F.trim(),description:U.trim()||void 0,tier:w}),R(""),Q(""),Y("FREE"),q()}catch(_){z(_ instanceof Error?_.message:"Failed to create project")}};if(!T)return null;return V("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[W("div",{className:"absolute inset-0 bg-background/80 backdrop-blur-sm",onClick:q,role:"button",tabIndex:0,onKeyDown:(K)=>{if(K.key==="Enter"||K.key===" ")q()},"aria-label":"Close modal"}),V("div",{className:"relative z-10 w-full max-w-md rounded-xl border border-border bg-card p-6 shadow-xl",children:[W("h2",{className:"mb-4 font-semibold text-xl",children:"Create New Project"}),V("form",{onSubmit:y,className:"space-y-4",children:[V("div",{children:[W("label",{htmlFor:"project-name",className:"mb-1 block font-medium text-muted-foreground text-sm",children:"Project Name *"}),W(S,{id:"project-name",value:F,onChange:(K)=>R(K.target.value),placeholder:"e.g., My Awesome Project",disabled:$})]}),V("div",{children:[W("label",{htmlFor:"project-description",className:"mb-1 block font-medium text-muted-foreground text-sm",children:"Description"}),W("textarea",{id:"project-description",value:U,onChange:(K)=>Q(K.target.value),placeholder:"Describe what this project is about...",rows:3,disabled:$,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"})]}),V("div",{children:[W("label",{htmlFor:"project-tier",className:"mb-1 block font-medium text-muted-foreground text-sm",children:"Tier"}),W("select",{id:"project-tier",value:w,onChange:(K)=>Y(K.target.value),disabled:$,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",children:B.map((K)=>W("option",{value:K.value,children:K.label},K.value))})]}),k&&W("div",{className:"rounded-md bg-destructive/10 p-3 text-destructive text-sm",children:k}),V("div",{className:"flex justify-end gap-3 pt-2",children:[W(f,{type:"button",variant:"ghost",onPress:q,disabled:$,children:"Cancel"}),W(f,{type:"submit",disabled:$,children:$?"Creating...":"Create Project"})]})]})]})]})}import{Button as X,Input as C}from"@contractspec/lib.design-system";import{useEffect as E,useState as O}from"react";import{jsx as G,jsxs as J}from"react/jsx-runtime";function m({isOpen:T,project:q,onClose:b,onUpdate:$,onArchive:F,onActivate:R,onDelete:U,isLoading:Q=!1}){let[w,Y]=O("menu"),[k,z]=O(""),[y,K]=O(""),[_,Z]=O(null),N=()=>{if(Y("menu"),Z(null),q)z(q.name),K(q.description??"")},H=()=>{N(),b()};E(()=>{if(q)z(q.name),K(q.description??"")},[q]);let v=async()=>{if(!q)return;if(Z(null),!k.trim()){Z("Project name is required");return}try{await $({id:q.id,name:k.trim(),description:y.trim()||void 0}),H()}catch(P){Z(P instanceof Error?P.message:"Failed to update project")}},A=async()=>{if(!q)return;Z(null);try{await F(q.id),H()}catch(P){Z(P instanceof Error?P.message:"Failed to archive project")}},D=async()=>{if(!q)return;Z(null);try{await R(q.id),H()}catch(P){Z(P instanceof Error?P.message:"Failed to activate project")}},M=async()=>{if(!q)return;Z(null);try{await U(q.id),H()}catch(P){Z(P instanceof Error?P.message:"Failed to delete project")}};if(!T||!q)return null;return J("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[G("div",{className:"absolute inset-0 bg-background/80 backdrop-blur-sm",onClick:H,role:"button",tabIndex:0,onKeyDown:(P)=>{if(P.key==="Enter"||P.key===" ")H()},"aria-label":"Close modal"}),J("div",{className:"relative z-10 w-full max-w-md rounded-xl border border-border bg-card p-6 shadow-xl",children:[J("div",{className:"mb-4 border-border border-b pb-4",children:[G("h2",{className:"font-semibold text-xl",children:q.name}),J("p",{className:"text-muted-foreground text-sm",children:[q.tier," · ",q.status]})]}),w==="menu"&&J("div",{className:"space-y-3",children:[J(X,{className:"w-full justify-start",variant:"ghost",onPress:()=>Y("edit"),children:[G("span",{className:"mr-2",children:"✏️"})," Edit Project"]}),q.status==="ACTIVE"||q.status==="DRAFT"?J(X,{className:"w-full justify-start",variant:"ghost",onPress:()=>Y("archive"),children:[G("span",{className:"mr-2",children:"\uD83D\uDCE6"})," Archive Project"]}):q.status==="ARCHIVED"?J(X,{className:"w-full justify-start",variant:"ghost",onPress:D,disabled:Q,children:[G("span",{className:"mr-2",children:"\uD83D\uDD04"})," Restore Project"]}):null,J(X,{className:"w-full justify-start text-red-500 hover:text-red-600",variant:"ghost",onPress:()=>Y("delete"),children:[G("span",{className:"mr-2",children:"\uD83D\uDDD1️"})," Delete Project"]}),G("div",{className:"border-border border-t pt-3",children:G(X,{className:"w-full",variant:"outline",onPress:H,children:"Close"})})]}),w==="edit"&&J("div",{className:"space-y-4",children:[J("div",{children:[G("label",{htmlFor:"edit-name",className:"mb-1 block font-medium text-muted-foreground text-sm",children:"Project Name *"}),G(C,{id:"edit-name",value:k,onChange:(P)=>z(P.target.value),disabled:Q})]}),J("div",{children:[G("label",{htmlFor:"edit-description",className:"mb-1 block font-medium text-muted-foreground text-sm",children:"Description"}),G("textarea",{id:"edit-description",value:y,onChange:(P)=>K(P.target.value),rows:3,disabled:Q,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"})]}),_&&G("div",{className:"rounded-md bg-destructive/10 p-3 text-destructive text-sm",children:_}),J("div",{className:"flex justify-end gap-3 pt-2",children:[G(X,{variant:"ghost",onPress:()=>Y("menu"),disabled:Q,children:"Back"}),G(X,{onPress:v,disabled:Q,children:Q?"Saving...":"Save Changes"})]})]}),w==="archive"&&J("div",{className:"space-y-4",children:[J("p",{className:"text-muted-foreground",children:["Are you sure you want to archive"," ",G("span",{className:"font-medium text-foreground",children:q.name}),"?"]}),G("p",{className:"text-muted-foreground text-sm",children:"Archived projects can be restored later."}),_&&G("div",{className:"rounded-md bg-destructive/10 p-3 text-destructive text-sm",children:_}),J("div",{className:"flex justify-end gap-3 pt-2",children:[G(X,{variant:"ghost",onPress:()=>Y("menu"),disabled:Q,children:"Cancel"}),G(X,{onPress:A,disabled:Q,children:Q?"Archiving...":"\uD83D\uDCE6 Archive"})]})]}),w==="delete"&&J("div",{className:"space-y-4",children:[J("p",{className:"text-muted-foreground",children:["Are you sure you want to delete"," ",G("span",{className:"font-medium text-foreground",children:q.name}),"?"]}),G("p",{className:"text-destructive text-sm",children:"This action cannot be undone."}),_&&G("div",{className:"rounded-md bg-destructive/10 p-3 text-destructive text-sm",children:_}),J("div",{className:"flex justify-end gap-3 pt-2",children:[G(X,{variant:"ghost",onPress:()=>Y("menu"),disabled:Q,children:"Cancel"}),G(X,{variant:"destructive",onPress:M,disabled:Q,children:Q?"Deleting...":"\uD83D\uDDD1️ Delete"})]})]})]})]})}export{m as ProjectActionsModal,h as CreateProjectModal};
|
|
@@ -1,61 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var saasFreeUserOverlay = {
|
|
3
|
-
overlayId: "saas-boilerplate.free-tier",
|
|
4
|
-
version: "1.0.0",
|
|
5
|
-
description: "Shows limitations for free tier users",
|
|
6
|
-
appliesTo: {
|
|
7
|
-
feature: "saas-boilerplate",
|
|
8
|
-
tier: "free"
|
|
9
|
-
},
|
|
10
|
-
modifications: [
|
|
11
|
-
{
|
|
12
|
-
type: "setLimit",
|
|
13
|
-
field: "projects",
|
|
14
|
-
max: 3,
|
|
15
|
-
message: "Upgrade to create more projects"
|
|
16
|
-
},
|
|
17
|
-
{ type: "hideField", field: "advancedSettings", reason: "Pro feature" },
|
|
18
|
-
{
|
|
19
|
-
type: "addBadge",
|
|
20
|
-
position: "header",
|
|
21
|
-
label: "Free Plan",
|
|
22
|
-
variant: "default"
|
|
23
|
-
}
|
|
24
|
-
]
|
|
25
|
-
};
|
|
26
|
-
var saasDemoOverlay = {
|
|
27
|
-
overlayId: "saas-boilerplate.demo-user",
|
|
28
|
-
version: "1.0.0",
|
|
29
|
-
description: "Demo mode for SaaS boilerplate",
|
|
30
|
-
appliesTo: {
|
|
31
|
-
feature: "saas-boilerplate",
|
|
32
|
-
role: "demo"
|
|
33
|
-
},
|
|
34
|
-
modifications: [
|
|
35
|
-
{
|
|
36
|
-
type: "hideField",
|
|
37
|
-
field: "billingSection",
|
|
38
|
-
reason: "Demo users cannot access billing"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
type: "hideField",
|
|
42
|
-
field: "deleteAccount",
|
|
43
|
-
reason: "Not available in demo"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
type: "addBadge",
|
|
47
|
-
position: "header",
|
|
48
|
-
label: "Demo Mode",
|
|
49
|
-
variant: "warning"
|
|
50
|
-
}
|
|
51
|
-
]
|
|
52
|
-
};
|
|
53
|
-
var saasOverlays = [
|
|
54
|
-
saasFreeUserOverlay,
|
|
55
|
-
saasDemoOverlay
|
|
56
|
-
];
|
|
57
|
-
export {
|
|
58
|
-
saasOverlays,
|
|
59
|
-
saasFreeUserOverlay,
|
|
60
|
-
saasDemoOverlay
|
|
61
|
-
};
|
|
1
|
+
var c={overlayId:"saas-boilerplate.free-tier",version:"1.0.0",description:"Shows limitations for free tier users",appliesTo:{feature:"saas-boilerplate",tier:"free"},modifications:[{type:"setLimit",field:"projects",max:3,message:"Upgrade to create more projects"},{type:"hideField",field:"advancedSettings",reason:"Pro feature"},{type:"addBadge",position:"header",label:"Free Plan",variant:"default"}]},d={overlayId:"saas-boilerplate.demo-user",version:"1.0.0",description:"Demo mode for SaaS boilerplate",appliesTo:{feature:"saas-boilerplate",role:"demo"},modifications:[{type:"hideField",field:"billingSection",reason:"Demo users cannot access billing"},{type:"hideField",field:"deleteAccount",reason:"Not available in demo"},{type:"addBadge",position:"header",label:"Demo Mode",variant:"warning"}]},g=[c,d];export{g as saasOverlays,c as saasFreeUserOverlay,d as saasDemoOverlay};
|
|
@@ -1,61 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var saasFreeUserOverlay = {
|
|
3
|
-
overlayId: "saas-boilerplate.free-tier",
|
|
4
|
-
version: "1.0.0",
|
|
5
|
-
description: "Shows limitations for free tier users",
|
|
6
|
-
appliesTo: {
|
|
7
|
-
feature: "saas-boilerplate",
|
|
8
|
-
tier: "free"
|
|
9
|
-
},
|
|
10
|
-
modifications: [
|
|
11
|
-
{
|
|
12
|
-
type: "setLimit",
|
|
13
|
-
field: "projects",
|
|
14
|
-
max: 3,
|
|
15
|
-
message: "Upgrade to create more projects"
|
|
16
|
-
},
|
|
17
|
-
{ type: "hideField", field: "advancedSettings", reason: "Pro feature" },
|
|
18
|
-
{
|
|
19
|
-
type: "addBadge",
|
|
20
|
-
position: "header",
|
|
21
|
-
label: "Free Plan",
|
|
22
|
-
variant: "default"
|
|
23
|
-
}
|
|
24
|
-
]
|
|
25
|
-
};
|
|
26
|
-
var saasDemoOverlay = {
|
|
27
|
-
overlayId: "saas-boilerplate.demo-user",
|
|
28
|
-
version: "1.0.0",
|
|
29
|
-
description: "Demo mode for SaaS boilerplate",
|
|
30
|
-
appliesTo: {
|
|
31
|
-
feature: "saas-boilerplate",
|
|
32
|
-
role: "demo"
|
|
33
|
-
},
|
|
34
|
-
modifications: [
|
|
35
|
-
{
|
|
36
|
-
type: "hideField",
|
|
37
|
-
field: "billingSection",
|
|
38
|
-
reason: "Demo users cannot access billing"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
type: "hideField",
|
|
42
|
-
field: "deleteAccount",
|
|
43
|
-
reason: "Not available in demo"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
type: "addBadge",
|
|
47
|
-
position: "header",
|
|
48
|
-
label: "Demo Mode",
|
|
49
|
-
variant: "warning"
|
|
50
|
-
}
|
|
51
|
-
]
|
|
52
|
-
};
|
|
53
|
-
var saasOverlays = [
|
|
54
|
-
saasFreeUserOverlay,
|
|
55
|
-
saasDemoOverlay
|
|
56
|
-
];
|
|
57
|
-
export {
|
|
58
|
-
saasOverlays,
|
|
59
|
-
saasFreeUserOverlay,
|
|
60
|
-
saasDemoOverlay
|
|
61
|
-
};
|
|
1
|
+
var x={overlayId:"saas-boilerplate.free-tier",version:"1.0.0",description:"Shows limitations for free tier users",appliesTo:{feature:"saas-boilerplate",tier:"free"},modifications:[{type:"setLimit",field:"projects",max:3,message:"Upgrade to create more projects"},{type:"hideField",field:"advancedSettings",reason:"Pro feature"},{type:"addBadge",position:"header",label:"Free Plan",variant:"default"}]},c={overlayId:"saas-boilerplate.demo-user",version:"1.0.0",description:"Demo mode for SaaS boilerplate",appliesTo:{feature:"saas-boilerplate",role:"demo"},modifications:[{type:"hideField",field:"billingSection",reason:"Demo users cannot access billing"},{type:"hideField",field:"deleteAccount",reason:"Not available in demo"},{type:"addBadge",position:"header",label:"Demo Mode",variant:"warning"}]},d=[x,c];export{d as saasOverlays,x as saasFreeUserOverlay,c as saasDemoOverlay};
|