@krak-stack/auth 0.2.3 → 0.2.4
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/README.md +1 -1
- package/dist/api.d.ts +858 -858
- package/dist/components/admin-organization-form.js +0 -8
- package/dist/components/admin-organizations.js +0 -4
- package/package.json +31 -9
|
@@ -4,7 +4,6 @@ import { FormBuilder, FormReact } from "@lucas-barake/effect-form-react";
|
|
|
4
4
|
import { Effect, Schema } from "effect";
|
|
5
5
|
import { AsyncResult, Atom } from "effect/unstable/reactivity";
|
|
6
6
|
import { useState } from "react";
|
|
7
|
-
import { toast } from "sonner";
|
|
8
7
|
import { ImageField, SingleSearchableSelectField, SubmitButton, SubmitError, TextField, } from "@krak-stack/registry/effect-form";
|
|
9
8
|
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from "@/components/ui/dialog";
|
|
10
9
|
import { AdminCreateOrganizationPayload, } from "../admin/schema.js";
|
|
@@ -19,7 +18,6 @@ const defaultMessages = {
|
|
|
19
18
|
organization_create_description: "Create an organization that can be used for authentication membership.",
|
|
20
19
|
organization_create_error: "Unable to create organization.",
|
|
21
20
|
organization_create_title: "Create organization",
|
|
22
|
-
organization_created_toast: "Organization created.",
|
|
23
21
|
organization_edit_title: "Edit organization",
|
|
24
22
|
organization_field_logo_url: "Logo",
|
|
25
23
|
organization_parent: "Parent organization",
|
|
@@ -30,7 +28,6 @@ const defaultMessages = {
|
|
|
30
28
|
organization_slug: "Slug",
|
|
31
29
|
organization_slug_description: "Leave blank to generate one from the name.",
|
|
32
30
|
organization_update_error: "Unable to update organization.",
|
|
33
|
-
organization_updated_toast: "Organization updated.",
|
|
34
31
|
},
|
|
35
32
|
fr: {
|
|
36
33
|
admin_organization_edit_description: "Mettez à jour les détails canoniques de l'organisation {name}.",
|
|
@@ -39,7 +36,6 @@ const defaultMessages = {
|
|
|
39
36
|
organization_create_description: "Créez une organisation utilisable pour les adhésions d'authentification.",
|
|
40
37
|
organization_create_error: "Impossible de créer l'organisation.",
|
|
41
38
|
organization_create_title: "Créer une organisation",
|
|
42
|
-
organization_created_toast: "Organisation créée.",
|
|
43
39
|
organization_edit_title: "Modifier l'organisation",
|
|
44
40
|
organization_field_logo_url: "Logo",
|
|
45
41
|
organization_parent: "Organisation parente",
|
|
@@ -50,7 +46,6 @@ const defaultMessages = {
|
|
|
50
46
|
organization_slug: "Slug",
|
|
51
47
|
organization_slug_description: "Laissez vide pour en générer un à partir du nom.",
|
|
52
48
|
organization_update_error: "Impossible de mettre à jour l'organisation.",
|
|
53
|
-
organization_updated_toast: "Organisation mise à jour.",
|
|
54
49
|
},
|
|
55
50
|
};
|
|
56
51
|
const labels = (locale) => defaultMessages[locale];
|
|
@@ -127,9 +122,6 @@ export function AdminOrganizationForm({ organization, onClose, onSaved, }) {
|
|
|
127
122
|
useAtomSubscribe(form.submit, (result) => {
|
|
128
123
|
if (!AsyncResult.isSuccess(result))
|
|
129
124
|
return;
|
|
130
|
-
toast.success(organization
|
|
131
|
-
? m.organization_updated_toast
|
|
132
|
-
: m.organization_created_toast);
|
|
133
125
|
onSaved(result.value);
|
|
134
126
|
onClose();
|
|
135
127
|
});
|
|
@@ -4,7 +4,6 @@ import { Cause, Effect, Schema } from "effect";
|
|
|
4
4
|
import { Atom, AsyncResult } from "effect/unstable/reactivity";
|
|
5
5
|
import { Building2, Pencil, Trash2 } from "lucide-react";
|
|
6
6
|
import { useState } from "react";
|
|
7
|
-
import { toast } from "sonner";
|
|
8
7
|
import { DataTable, DataTableListSummary, } from "@krak-stack/registry/data-table";
|
|
9
8
|
import { SortParamsFromString, } from "@krak-stack/registry/query";
|
|
10
9
|
import { ErrorMessage } from "@krak-stack/registry/effect-form";
|
|
@@ -28,7 +27,6 @@ const defaultMessages = {
|
|
|
28
27
|
organization_delete_description: "Are you sure you want to delete {name}? This action cannot be undone.",
|
|
29
28
|
organization_delete_error: "Unable to delete organization.",
|
|
30
29
|
organization_delete_title: "Delete organization",
|
|
31
|
-
organization_deleted_toast: "Organization deleted.",
|
|
32
30
|
organization_fetch_error: "Unable to load organizations.",
|
|
33
31
|
},
|
|
34
32
|
fr: {
|
|
@@ -44,7 +42,6 @@ const defaultMessages = {
|
|
|
44
42
|
organization_delete_description: "Êtes-vous sûr de vouloir supprimer {name} ? Cette action est irréversible.",
|
|
45
43
|
organization_delete_error: "Impossible de supprimer l'organisation.",
|
|
46
44
|
organization_delete_title: "Supprimer l'organisation",
|
|
47
|
-
organization_deleted_toast: "Organisation supprimée.",
|
|
48
45
|
organization_fetch_error: "Impossible de charger les organisations.",
|
|
49
46
|
},
|
|
50
47
|
};
|
|
@@ -166,7 +163,6 @@ export function AdminOrganizationsTable({ onSearchChange, reloadKey = 0, search,
|
|
|
166
163
|
setLocalSearch(nextSearch);
|
|
167
164
|
}
|
|
168
165
|
}, status: { loading: isLoading } }), editingOrganization ? (_jsx(AdminOrganizationForm, { organization: editingOrganization, onClose: () => setEditingOrganization(null), onSaved: () => setRefreshKey((current) => current + 1) })) : null, deletingOrganization ? (_jsx(DeleteOrganizationDialog, { labels: m, organization: deletingOrganization, baseUrl: baseUrl, onClose: () => setDeletingOrganization(null), onDeleted: () => {
|
|
169
|
-
toast.success(m.organization_deleted_toast);
|
|
170
166
|
setDeletingOrganization(null);
|
|
171
167
|
setRefreshKey((current) => current + 1);
|
|
172
168
|
} })) : null] }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krak-stack/auth",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Effect HttpApi clients and schemas for KrakStack Auth.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -74,19 +74,41 @@
|
|
|
74
74
|
"prepack": "bun run build",
|
|
75
75
|
"type:check": "tsc -p tsconfig.json --noEmit"
|
|
76
76
|
},
|
|
77
|
-
"dependencies": {
|
|
78
|
-
"@krak-stack/registry": "0.1.24",
|
|
79
|
-
"react-qr-code": "^2.2.0"
|
|
80
|
-
},
|
|
81
77
|
"peerDependencies": {
|
|
82
78
|
"@effect/atom-react": "4.0.0-rc.112",
|
|
79
|
+
"@krak-stack/registry": "^0.1.25",
|
|
83
80
|
"@lucas-barake/effect-form-react": "^0.26.0-beta.5",
|
|
84
81
|
"@tanstack/react-router": "^1.170.15",
|
|
85
|
-
"@tanstack/react-table": "^9.1.2",
|
|
86
82
|
"effect": "4.0.0-rc.112",
|
|
87
83
|
"input-otp": "^1.4.2",
|
|
88
|
-
"lucide-react": "^1.
|
|
89
|
-
"react": "^19.2.
|
|
90
|
-
"
|
|
84
|
+
"lucide-react": "^1.18.0",
|
|
85
|
+
"react": "^19.2.0",
|
|
86
|
+
"react-qr-code": "^2.2.0"
|
|
87
|
+
},
|
|
88
|
+
"peerDependenciesMeta": {
|
|
89
|
+
"@effect/atom-react": {
|
|
90
|
+
"optional": true
|
|
91
|
+
},
|
|
92
|
+
"@krak-stack/registry": {
|
|
93
|
+
"optional": true
|
|
94
|
+
},
|
|
95
|
+
"@lucas-barake/effect-form-react": {
|
|
96
|
+
"optional": true
|
|
97
|
+
},
|
|
98
|
+
"@tanstack/react-router": {
|
|
99
|
+
"optional": true
|
|
100
|
+
},
|
|
101
|
+
"input-otp": {
|
|
102
|
+
"optional": true
|
|
103
|
+
},
|
|
104
|
+
"lucide-react": {
|
|
105
|
+
"optional": true
|
|
106
|
+
},
|
|
107
|
+
"react": {
|
|
108
|
+
"optional": true
|
|
109
|
+
},
|
|
110
|
+
"react-qr-code": {
|
|
111
|
+
"optional": true
|
|
112
|
+
}
|
|
91
113
|
}
|
|
92
114
|
}
|