@carlonicora/nextjs-jsonapi 1.71.0 → 1.73.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BlockNoteEditor-NFMUHBKE.js → BlockNoteEditor-ETTYTXDX.js} +14 -14
- package/dist/{BlockNoteEditor-NFMUHBKE.js.map → BlockNoteEditor-ETTYTXDX.js.map} +1 -1
- package/dist/{BlockNoteEditor-JWTEY33V.mjs → BlockNoteEditor-MZ6G4XN4.mjs} +4 -4
- package/dist/billing/index.js +346 -346
- package/dist/billing/index.mjs +3 -3
- package/dist/{chunk-6ROMPIIP.js → chunk-5QTDS6V7.js} +11 -11
- package/dist/{chunk-6ROMPIIP.js.map → chunk-5QTDS6V7.js.map} +1 -1
- package/dist/{chunk-RSMG3K44.mjs → chunk-6O3YOOQM.mjs} +9 -7
- package/dist/chunk-6O3YOOQM.mjs.map +1 -0
- package/dist/{chunk-GZNHBAZF.mjs → chunk-73ANSE3J.mjs} +14 -1
- package/dist/chunk-73ANSE3J.mjs.map +1 -0
- package/dist/{chunk-WJYWWOTG.mjs → chunk-HP6AJBWE.mjs} +2 -2
- package/dist/{chunk-WBYS53RC.js → chunk-OPUWDWFH.js} +654 -652
- package/dist/chunk-OPUWDWFH.js.map +1 -0
- package/dist/{chunk-56VU7A4I.js → chunk-QLICTZL7.js} +14 -1
- package/dist/chunk-QLICTZL7.js.map +1 -0
- package/dist/client/index.js +4 -4
- package/dist/client/index.mjs +3 -3
- package/dist/components/index.d.mts +3 -1
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.js +4 -4
- package/dist/components/index.mjs +3 -3
- package/dist/contexts/index.d.mts +2 -0
- package/dist/contexts/index.d.ts +2 -0
- package/dist/contexts/index.js +4 -4
- package/dist/contexts/index.mjs +3 -3
- package/dist/core/index.d.mts +2 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +1 -1
- package/dist/index.js +3 -3
- package/dist/index.mjs +2 -2
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +1 -1
- package/package.json +1 -1
- package/src/components/containers/RoundPageContainerTitle.tsx +1 -1
- package/src/components/forms/EditorSheet.tsx +12 -6
- package/src/contexts/SharedContext.tsx +2 -0
- package/src/core/registry/ModuleRegistry.ts +17 -0
- package/dist/chunk-56VU7A4I.js.map +0 -1
- package/dist/chunk-GZNHBAZF.mjs.map +0 -1
- package/dist/chunk-RSMG3K44.mjs.map +0 -1
- package/dist/chunk-WBYS53RC.js.map +0 -1
- /package/dist/{BlockNoteEditor-JWTEY33V.mjs.map → BlockNoteEditor-MZ6G4XN4.mjs.map} +0 -0
- /package/dist/{chunk-WJYWWOTG.mjs.map → chunk-HP6AJBWE.mjs.map} +0 -0
|
@@ -39,6 +39,8 @@ export type EditorSheetProps<T extends FieldValues> = {
|
|
|
39
39
|
|
|
40
40
|
entityType: string;
|
|
41
41
|
entityName?: string;
|
|
42
|
+
title?: string;
|
|
43
|
+
description?: string;
|
|
42
44
|
|
|
43
45
|
isEdit: boolean;
|
|
44
46
|
module: ModuleWithPermissions;
|
|
@@ -66,6 +68,8 @@ export function EditorSheet<T extends FieldValues>({
|
|
|
66
68
|
isFormDirty: isFormDirtyProp,
|
|
67
69
|
entityType,
|
|
68
70
|
entityName,
|
|
71
|
+
title: titleOverride,
|
|
72
|
+
description: descriptionOverride,
|
|
69
73
|
isEdit,
|
|
70
74
|
module,
|
|
71
75
|
propagateChanges,
|
|
@@ -153,14 +157,16 @@ export function EditorSheet<T extends FieldValues>({
|
|
|
153
157
|
<SheetContent side="right" className={sizeClasses[size]}>
|
|
154
158
|
<SheetHeader className="border-b px-6 py-4">
|
|
155
159
|
<SheetTitle>
|
|
156
|
-
{
|
|
157
|
-
|
|
158
|
-
|
|
160
|
+
{titleOverride ??
|
|
161
|
+
(isEdit
|
|
162
|
+
? t("common.edit.update.title", { type: entityType })
|
|
163
|
+
: t("common.edit.create.title", { type: entityType }))}
|
|
159
164
|
</SheetTitle>
|
|
160
165
|
<SheetDescription>
|
|
161
|
-
{
|
|
162
|
-
|
|
163
|
-
|
|
166
|
+
{descriptionOverride ??
|
|
167
|
+
(isEdit
|
|
168
|
+
? t("common.edit.update.description", { type: entityType, name: entityName ?? "" })
|
|
169
|
+
: t("common.edit.create.description", { type: entityType }))}
|
|
164
170
|
</SheetDescription>
|
|
165
171
|
</SheetHeader>
|
|
166
172
|
<Form {...form}>
|
|
@@ -10,6 +10,7 @@ const SharedContext = createContext<{
|
|
|
10
10
|
element?: string;
|
|
11
11
|
functions?: ReactNode;
|
|
12
12
|
prioritizeFunctions?: boolean;
|
|
13
|
+
icon?: ReactNode;
|
|
13
14
|
};
|
|
14
15
|
} | null>(null);
|
|
15
16
|
|
|
@@ -22,6 +23,7 @@ interface SharedProviderProps {
|
|
|
22
23
|
element?: string;
|
|
23
24
|
functions?: ReactNode;
|
|
24
25
|
prioritizeFunctions?: boolean;
|
|
26
|
+
icon?: ReactNode;
|
|
25
27
|
};
|
|
26
28
|
};
|
|
27
29
|
}
|
|
@@ -158,6 +158,19 @@ class ModuleRegistryClass {
|
|
|
158
158
|
}
|
|
159
159
|
return module as ModuleWithPermissions;
|
|
160
160
|
}
|
|
161
|
+
|
|
162
|
+
findByFeature(feature: string): ModuleWithPermissions[] {
|
|
163
|
+
const response: ModuleWithPermissions[] = [];
|
|
164
|
+
|
|
165
|
+
for (const module of this._modules.values()) {
|
|
166
|
+
const m = module as ModuleWithPermissions;
|
|
167
|
+
if (m.feature === feature) {
|
|
168
|
+
response.push(m);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return response;
|
|
173
|
+
}
|
|
161
174
|
}
|
|
162
175
|
|
|
163
176
|
export const ModuleRegistry = new ModuleRegistryClass();
|
|
@@ -171,9 +184,13 @@ export const Modules = new Proxy({} as ModuleDefinitions, {
|
|
|
171
184
|
if (prop === "findByModelName") {
|
|
172
185
|
return (name: string) => ModuleRegistry.findByModelName(name);
|
|
173
186
|
}
|
|
187
|
+
if (prop === "findByFeature") {
|
|
188
|
+
return (feature: string) => ModuleRegistry.findByFeature(feature);
|
|
189
|
+
}
|
|
174
190
|
return ModuleRegistry.get(prop as keyof ModuleDefinitions);
|
|
175
191
|
},
|
|
176
192
|
}) as ModuleDefinitions & {
|
|
177
193
|
findByName: (name: string) => ModuleWithPermissions;
|
|
178
194
|
findByModelName: (name: string) => ModuleWithPermissions;
|
|
195
|
+
findByFeature: (feature: string) => ModuleWithPermissions[];
|
|
179
196
|
};
|