@carlonicora/nextjs-jsonapi 1.63.0 → 1.64.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.
Files changed (47) hide show
  1. package/dist/{BlockNoteEditor-QQ4XFT4G.js → BlockNoteEditor-JF757BHH.js} +14 -14
  2. package/dist/{BlockNoteEditor-QQ4XFT4G.js.map → BlockNoteEditor-JF757BHH.js.map} +1 -1
  3. package/dist/{BlockNoteEditor-TS62AHRY.mjs → BlockNoteEditor-ZO3ZAPXU.mjs} +4 -4
  4. package/dist/billing/index.js +346 -346
  5. package/dist/billing/index.mjs +3 -3
  6. package/dist/{chunk-BQSMP4NU.js → chunk-2DFE325P.js} +11 -11
  7. package/dist/{chunk-BQSMP4NU.js.map → chunk-2DFE325P.js.map} +1 -1
  8. package/dist/{chunk-K3DKXOEU.mjs → chunk-55FJ5WKS.mjs} +1172 -1224
  9. package/dist/chunk-55FJ5WKS.mjs.map +1 -0
  10. package/dist/{chunk-ZRKQQLYI.js → chunk-5LZGQXBD.js} +769 -821
  11. package/dist/chunk-5LZGQXBD.js.map +1 -0
  12. package/dist/{chunk-NAST4OSM.js → chunk-6YKYRKVU.js} +8 -2
  13. package/dist/chunk-6YKYRKVU.js.map +1 -0
  14. package/dist/{chunk-HRG4EAOG.mjs → chunk-PBD6ZH46.mjs} +2 -2
  15. package/dist/{chunk-YHNDD34Z.mjs → chunk-REWN5GZP.mjs} +8 -2
  16. package/dist/{chunk-YHNDD34Z.mjs.map → chunk-REWN5GZP.mjs.map} +1 -1
  17. package/dist/client/index.js +4 -4
  18. package/dist/client/index.mjs +3 -3
  19. package/dist/components/index.d.mts +11 -8
  20. package/dist/components/index.d.ts +11 -8
  21. package/dist/components/index.js +4 -6
  22. package/dist/components/index.js.map +1 -1
  23. package/dist/components/index.mjs +3 -5
  24. package/dist/contexts/index.d.mts +2 -1
  25. package/dist/contexts/index.d.ts +2 -1
  26. package/dist/contexts/index.js +4 -4
  27. package/dist/contexts/index.mjs +3 -3
  28. package/dist/core/index.js +2 -2
  29. package/dist/core/index.mjs +1 -1
  30. package/dist/index.js +3 -3
  31. package/dist/index.mjs +2 -2
  32. package/dist/server/index.js +3 -3
  33. package/dist/server/index.mjs +1 -1
  34. package/package.json +1 -1
  35. package/src/features/company/company.module.ts +3 -1
  36. package/src/features/company/components/containers/CompanyContainer.tsx +7 -2
  37. package/src/features/company/components/details/CompanyDetails.tsx +16 -1
  38. package/src/features/company/components/forms/CompanyConfigurationEditor.tsx +19 -51
  39. package/src/features/company/components/forms/index.ts +0 -1
  40. package/src/features/company/contexts/CompanyContext.tsx +5 -3
  41. package/src/features/user/user.module.ts +3 -1
  42. package/dist/chunk-K3DKXOEU.mjs.map +0 -1
  43. package/dist/chunk-NAST4OSM.js.map +0 -1
  44. package/dist/chunk-ZRKQQLYI.js.map +0 -1
  45. package/src/features/company/components/forms/CompanyConfigurationSecurityForm.tsx +0 -83
  46. /package/dist/{BlockNoteEditor-TS62AHRY.mjs.map → BlockNoteEditor-ZO3ZAPXU.mjs.map} +0 -0
  47. /package/dist/{chunk-HRG4EAOG.mjs.map → chunk-PBD6ZH46.mjs.map} +0 -0
@@ -1,83 +0,0 @@
1
- "use client";
2
-
3
- import { useTranslations } from "next-intl";
4
- import { UseFormReturn } from "react-hook-form";
5
- import { FormFieldWrapper } from "../../../../components/forms";
6
- import { Checkbox, Input } from "../../../../shadcnui";
7
-
8
- type SecurityConfigurationFormProps = {
9
- form: UseFormReturn<any>;
10
- };
11
-
12
- type Fields = {
13
- fields: string[];
14
- defaults: Record<string, any>;
15
- };
16
-
17
- const providerConfig: Fields = {
18
- fields: ["isManagedKnowledge", "allowPublicBot"],
19
- defaults: {},
20
- };
21
-
22
- export function CompanyConfigurationSecurityForm({ form }: SecurityConfigurationFormProps) {
23
- const _t = useTranslations();
24
-
25
- const renderProviderFields = () => {
26
- const config = providerConfig;
27
- if (!config) return null;
28
-
29
- return config.fields.map((currentField) => {
30
- const isRequired = currentField === "";
31
-
32
- let label = "";
33
- let placeholder = "";
34
- let type = "text";
35
-
36
- switch (currentField) {
37
- case "isManagedKnowledge":
38
- label = "Limit Require structured knowledge management";
39
- placeholder =
40
- "Enforce single-nesting expertises, require expertise associations to content, and enable knowledge manager roles for better long-term organization.";
41
- type = "checkbox";
42
- break;
43
- case "allowPublicBot":
44
- label = "Allow Public Bot";
45
- placeholder = "Enable this to allow the public to access public information.";
46
- type = "checkbox";
47
- break;
48
- }
49
-
50
- return (
51
- <FormFieldWrapper
52
- key={currentField}
53
- form={form}
54
- name={currentField}
55
- label={label}
56
- description={type === "checkbox" ? placeholder : undefined}
57
- isRequired={isRequired}
58
- orientation={type === "checkbox" ? "horizontal" : "vertical"}
59
- >
60
- {(field) =>
61
- type === "checkbox" ? (
62
- <Checkbox
63
- id={currentField}
64
- checked={field.value}
65
- onCheckedChange={(checked) => {
66
- return checked ? field.onChange(true) : field.onChange(false);
67
- }}
68
- />
69
- ) : (
70
- <Input type={type} placeholder={placeholder} {...field} />
71
- )
72
- }
73
- </FormFieldWrapper>
74
- );
75
- });
76
- };
77
-
78
- return (
79
- <div className="space-y-4">
80
- <div className="space-y-4 border-t pt-4">{renderProviderFields()}</div>
81
- </div>
82
- );
83
- }