@plutonhq/core-frontend 0.1.22 → 0.1.24

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 (96) hide show
  1. package/dist-lib/@types/index.js +4 -1
  2. package/dist-lib/@types/index.js.map +1 -1
  3. package/dist-lib/@types/plans.d.ts +11 -20
  4. package/dist-lib/@types/plans.d.ts.map +1 -1
  5. package/dist-lib/@types/settings.d.ts +14 -0
  6. package/dist-lib/@types/settings.d.ts.map +1 -1
  7. package/dist-lib/@types/settings.js +34 -0
  8. package/dist-lib/@types/settings.js.map +1 -0
  9. package/dist-lib/components/Plan/PlanSettings/PlanAdvancedSettings.js +49 -47
  10. package/dist-lib/components/Plan/PlanSettings/PlanAdvancedSettings.js.map +1 -1
  11. package/dist-lib/components/Plan/PlanSettings/PlanNotificationSettings.d.ts +7 -4
  12. package/dist-lib/components/Plan/PlanSettings/PlanNotificationSettings.d.ts.map +1 -1
  13. package/dist-lib/components/Plan/PlanSettings/PlanNotificationSettings.js +235 -52
  14. package/dist-lib/components/Plan/PlanSettings/PlanNotificationSettings.js.map +1 -1
  15. package/dist-lib/components/Plan/PlanSettings/PlanNotificationSettingsTester.d.ts +9 -0
  16. package/dist-lib/components/Plan/PlanSettings/PlanNotificationSettingsTester.d.ts.map +1 -0
  17. package/dist-lib/components/Plan/PlanSettings/PlanNotificationSettingsTester.js +62 -0
  18. package/dist-lib/components/Plan/PlanSettings/PlanNotificationSettingsTester.js.map +1 -0
  19. package/dist-lib/components/Plan/PlanSettings/PlanPruneSettings.js +2 -2
  20. package/dist-lib/components/Plan/PlanSettings/PlanPruneSettings.js.map +1 -1
  21. package/dist-lib/components/Plan/PlanSettings/PlanSettings.module.scss.js +56 -40
  22. package/dist-lib/components/Plan/PlanSettings/PlanSettings.module.scss.js.map +1 -1
  23. package/dist-lib/components/Settings/GeneralSettings/GeneralSettings.d.ts.map +1 -1
  24. package/dist-lib/components/Settings/GeneralSettings/GeneralSettings.js +16 -8
  25. package/dist-lib/components/Settings/GeneralSettings/GeneralSettings.js.map +1 -1
  26. package/dist-lib/components/Settings/IntegrationSettings/IntegrationSettings.d.ts.map +1 -1
  27. package/dist-lib/components/Settings/IntegrationSettings/IntegrationSettings.js +52 -47
  28. package/dist-lib/components/Settings/IntegrationSettings/IntegrationSettings.js.map +1 -1
  29. package/dist-lib/components/Settings/IntegrationSettings/IntegrationSettings.module.scss.js +12 -6
  30. package/dist-lib/components/Settings/IntegrationSettings/IntegrationSettings.module.scss.js.map +1 -1
  31. package/dist-lib/components/Settings/IntegrationSettings/NtfySettings.d.ts +9 -0
  32. package/dist-lib/components/Settings/IntegrationSettings/NtfySettings.d.ts.map +1 -0
  33. package/dist-lib/components/Settings/IntegrationSettings/NtfySettings.js +79 -0
  34. package/dist-lib/components/Settings/IntegrationSettings/NtfySettings.js.map +1 -0
  35. package/dist-lib/components/Settings/IntegrationSettings/SMTPSettings.d.ts +4 -3
  36. package/dist-lib/components/Settings/IntegrationSettings/SMTPSettings.d.ts.map +1 -1
  37. package/dist-lib/components/Settings/IntegrationSettings/SMTPSettings.js +37 -35
  38. package/dist-lib/components/Settings/IntegrationSettings/SMTPSettings.js.map +1 -1
  39. package/dist-lib/components/Settings/IntegrationSettings/ValidateEmailIntegration.d.ts +10 -0
  40. package/dist-lib/components/Settings/IntegrationSettings/ValidateEmailIntegration.d.ts.map +1 -0
  41. package/dist-lib/components/Settings/IntegrationSettings/ValidateEmailIntegration.js +49 -0
  42. package/dist-lib/components/Settings/IntegrationSettings/ValidateEmailIntegration.js.map +1 -0
  43. package/dist-lib/components/Storage/EditStorage/EditStorage.js +10 -10
  44. package/dist-lib/components/Storage/EditStorage/EditStorage.js.map +1 -1
  45. package/dist-lib/components/common/Icon/Icon.d.ts.map +1 -1
  46. package/dist-lib/components/common/Icon/Icon.js +15 -1
  47. package/dist-lib/components/common/Icon/Icon.js.map +1 -1
  48. package/dist-lib/components/index.d.ts +3 -0
  49. package/dist-lib/components/index.d.ts.map +1 -1
  50. package/dist-lib/components.js +114 -108
  51. package/dist-lib/components.js.map +1 -1
  52. package/dist-lib/providers/s3compatible.png +0 -0
  53. package/dist-lib/services/plans.d.ts +13 -1
  54. package/dist-lib/services/plans.d.ts.map +1 -1
  55. package/dist-lib/services/plans.js +88 -61
  56. package/dist-lib/services/plans.js.map +1 -1
  57. package/dist-lib/services/settings.d.ts +3 -2
  58. package/dist-lib/services/settings.d.ts.map +1 -1
  59. package/dist-lib/services/settings.js +25 -25
  60. package/dist-lib/services/settings.js.map +1 -1
  61. package/dist-lib/services.js +102 -100
  62. package/dist-lib/styles/core-frontend.css +1 -1
  63. package/dist-lib/utils/constants.d.ts.map +1 -1
  64. package/dist-lib/utils/constants.js +28 -5
  65. package/dist-lib/utils/constants.js.map +1 -1
  66. package/dist-lib/utils/helpers.d.ts +1 -0
  67. package/dist-lib/utils/helpers.d.ts.map +1 -1
  68. package/dist-lib/utils/helpers.js +17 -10
  69. package/dist-lib/utils/helpers.js.map +1 -1
  70. package/dist-lib/utils.js +28 -27
  71. package/package.json +1 -1
  72. package/src/@types/plans.ts +11 -20
  73. package/src/@types/settings.ts +43 -0
  74. package/src/components/Plan/PlanSettings/PlanAdvancedSettings.tsx +4 -4
  75. package/src/components/Plan/PlanSettings/PlanNotificationSettings.tsx +244 -47
  76. package/src/components/Plan/PlanSettings/PlanNotificationSettingsTester.tsx +85 -0
  77. package/src/components/Plan/PlanSettings/PlanPruneSettings.tsx +2 -2
  78. package/src/components/Plan/PlanSettings/PlanSettings.module.scss +71 -0
  79. package/src/components/Settings/GeneralSettings/GeneralSettings.tsx +6 -1
  80. package/src/components/Settings/IntegrationSettings/IntegrationSettings.module.scss +16 -0
  81. package/src/components/Settings/IntegrationSettings/IntegrationSettings.tsx +45 -42
  82. package/src/components/Settings/IntegrationSettings/NtfySettings.tsx +106 -0
  83. package/src/components/Settings/IntegrationSettings/SMTPSettings.tsx +28 -19
  84. package/src/components/Settings/IntegrationSettings/ValidateEmailIntegration.tsx +58 -0
  85. package/src/components/Storage/EditStorage/EditStorage.tsx +1 -1
  86. package/src/components/common/Icon/Icon.tsx +16 -0
  87. package/src/components/index.ts +3 -0
  88. package/src/services/plans.ts +38 -1
  89. package/src/services/settings.ts +4 -4
  90. package/src/utils/constants.ts +23 -0
  91. package/src/utils/helpers.ts +9 -0
  92. /package/dist-lib/providers/{azureBlob.png → azureblob.png} +0 -0
  93. /package/dist-lib/providers/{azureFiles.png → azurefiles.png} +0 -0
  94. /package/dist-lib/providers/{files.png → filescom.png} +0 -0
  95. /package/dist-lib/providers/{oracle.png → oracleobjectstorage.png} +0 -0
  96. /package/dist-lib/providers/{proton.png → protondrive.png} +0 -0
@@ -1,62 +1,78 @@
1
- const t = "_field_p3quV", e = "_fieldErrorLabel_eZfCx", n = "_fieldNotice_55Tri", o = "_label_zW0YW", i = "_forgetByAgeField_eLTS9", c = "_customPolicyOption_94fdS", s = "_advancedTabContent_VNIEn", a = "_advancedTabs_Uhv1Q", r = "_advancedTabActive_Ab8AR", _ = "_advancedSettingsSelect_TJsh8", d = "_eventTabs_exCRP", p = "_eventTab_02VQB", T = "_eventTabHead_jSxQ5", l = "_eventTabHeadTitle_DyzgZ", b = "_eventTabContent_uz0W3", v = "_addScriptButton_RhlLa", u = "_scriptItem_gS3xT", S = "_scriptHeader_FU21B", m = "_scriptTitle_0if6d", g = "_scriptPositionControls_Wvb7h", f = "_scriptPathInput_08ovq", O = "_scriptFooter_JGxlJ", C = "_scriptOptions_R8S2e", h = "_scriptOptionCheckbox_bTY18", B = "_removeScriptButton_dmH7L", x = "_scriptOptionTimeout_AxGIu", H = "_hasTimeOutSettings_8H9x5", P = "_timeoutSettings_3kEBP", A = {
1
+ const t = "_field_mtlh9", i = "_fieldErrorLabel_Ydo80", e = "_fieldNotice_Gi8t0", n = "_label_ZF458", o = "_forgetByAgeField_FPhtE", c = "_customPolicyOption_XnYTh", s = "_advancedTabContent_lZsCo", a = "_advancedTabs_64uJh", _ = "_advancedTabActive_7Gdt2", d = "_advancedSettingsSelect_iG976", r = "_eventTabs_jx9ex", p = "_eventTab_pqCBd", l = "_eventTabHead_WfRJc", T = "_eventTabHeadTitle_Pxkrl", b = "_eventTabContent_5EcLX", f = "_addScriptButton_sngQZ", v = "_scriptItem_uike9", u = "_scriptHeader_Zr6xK", S = "_scriptTitle_je8nA", g = "_scriptPositionControls_wx8qF", O = "_scriptPathInput_FRbYR", m = "_scriptFooter_t9nVP", C = "_scriptOptions_yahN5", h = "_scriptOptionCheckbox_Xqn00", F = "_removeScriptButton_iTup8", B = "_scriptOptionTimeout_jRU1W", N = "_hasTimeOutSettings_7Vr2y", x = "_timeoutSettings_xbX9o", P = "_notificationTestField_7IXSB", H = "_notificationSettingsSection_Hf62u", y = "_notificationToggle_4xt2e", A = "_notificationSettings_X8F8e", I = "_testNotificationContainer_hS6w0", X = "_testNotificationButton_9tOKN", k = "_disabled_k7FZh", Z = "_testNotificationOptions_OX0Zx", E = {
2
2
  field: t,
3
- fieldErrorLabel: e,
4
- fieldNotice: n,
5
- label: o,
6
- forgetByAgeField: i,
3
+ fieldErrorLabel: i,
4
+ fieldNotice: e,
5
+ label: n,
6
+ forgetByAgeField: o,
7
7
  customPolicyOption: c,
8
8
  advancedTabContent: s,
9
9
  advancedTabs: a,
10
- advancedTabActive: r,
11
- advancedSettingsSelect: _,
12
- eventTabs: d,
10
+ advancedTabActive: _,
11
+ advancedSettingsSelect: d,
12
+ eventTabs: r,
13
13
  eventTab: p,
14
- eventTabHead: T,
15
- eventTabHeadTitle: l,
14
+ eventTabHead: l,
15
+ eventTabHeadTitle: T,
16
16
  eventTabContent: b,
17
- addScriptButton: v,
18
- scriptItem: u,
19
- scriptHeader: S,
20
- scriptTitle: m,
17
+ addScriptButton: f,
18
+ scriptItem: v,
19
+ scriptHeader: u,
20
+ scriptTitle: S,
21
21
  scriptPositionControls: g,
22
- scriptPathInput: f,
23
- scriptFooter: O,
22
+ scriptPathInput: O,
23
+ scriptFooter: m,
24
24
  scriptOptions: C,
25
25
  scriptOptionCheckbox: h,
26
- removeScriptButton: B,
27
- scriptOptionTimeout: x,
28
- hasTimeOutSettings: H,
29
- timeoutSettings: P
26
+ removeScriptButton: F,
27
+ scriptOptionTimeout: B,
28
+ hasTimeOutSettings: N,
29
+ timeoutSettings: x,
30
+ notificationTestField: P,
31
+ notificationSettingsSection: H,
32
+ notificationToggle: y,
33
+ notificationSettings: A,
34
+ testNotificationContainer: I,
35
+ testNotificationButton: X,
36
+ disabled: k,
37
+ testNotificationOptions: Z
30
38
  };
31
39
  export {
32
- v as addScriptButton,
33
- _ as advancedSettingsSelect,
34
- r as advancedTabActive,
40
+ f as addScriptButton,
41
+ d as advancedSettingsSelect,
42
+ _ as advancedTabActive,
35
43
  s as advancedTabContent,
36
44
  a as advancedTabs,
37
45
  c as customPolicyOption,
38
- A as default,
46
+ E as default,
47
+ k as disabled,
39
48
  p as eventTab,
40
49
  b as eventTabContent,
41
- T as eventTabHead,
42
- l as eventTabHeadTitle,
43
- d as eventTabs,
50
+ l as eventTabHead,
51
+ T as eventTabHeadTitle,
52
+ r as eventTabs,
44
53
  t as field,
45
- e as fieldErrorLabel,
46
- n as fieldNotice,
47
- i as forgetByAgeField,
48
- H as hasTimeOutSettings,
49
- o as label,
50
- B as removeScriptButton,
51
- O as scriptFooter,
52
- S as scriptHeader,
53
- u as scriptItem,
54
+ i as fieldErrorLabel,
55
+ e as fieldNotice,
56
+ o as forgetByAgeField,
57
+ N as hasTimeOutSettings,
58
+ n as label,
59
+ A as notificationSettings,
60
+ H as notificationSettingsSection,
61
+ P as notificationTestField,
62
+ y as notificationToggle,
63
+ F as removeScriptButton,
64
+ m as scriptFooter,
65
+ u as scriptHeader,
66
+ v as scriptItem,
54
67
  h as scriptOptionCheckbox,
55
- x as scriptOptionTimeout,
68
+ B as scriptOptionTimeout,
56
69
  C as scriptOptions,
57
- f as scriptPathInput,
70
+ O as scriptPathInput,
58
71
  g as scriptPositionControls,
59
- m as scriptTitle,
60
- P as timeoutSettings
72
+ S as scriptTitle,
73
+ X as testNotificationButton,
74
+ I as testNotificationContainer,
75
+ Z as testNotificationOptions,
76
+ x as timeoutSettings
61
77
  };
62
78
  //# sourceMappingURL=PlanSettings.module.scss.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlanSettings.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"PlanSettings.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"GeneralSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/Settings/GeneralSettings/GeneralSettings.tsx"],"names":[],"mappings":"AASA,UAAU,oBAAoB;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9B,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;CACpD;AAED,QAAA,MAAM,eAAe,GAAI,oCAAoC,oBAAoB,4CAmFhF,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"GeneralSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/Settings/GeneralSettings/GeneralSettings.tsx"],"names":[],"mappings":"AASA,UAAU,oBAAoB;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9B,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;CACpD;AAED,QAAA,MAAM,eAAe,GAAI,oCAAoC,oBAAoB,4CAwFhF,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -2,14 +2,14 @@ import { jsxs as F, jsx as a } from "react/jsx-runtime";
2
2
  import { useState as d } from "react";
3
3
  import S from "../../common/ActionModal/ActionModal.js";
4
4
  import t from "../../common/form/Input/Input.js";
5
- import v from "../../common/form/Toggle/Toggle.js";
6
- import w from "../../common/form/Tristate/Tristate.js";
5
+ import w from "../../common/form/Toggle/Toggle.js";
6
+ import v from "../../common/form/Tristate/Tristate.js";
7
7
  import T from "../TwoFactorSetup/TwoFactorSetup.js";
8
8
  import { useTheme as y } from "../../../context/ThemeContext.js";
9
9
  import i from "./GeneralSettings.module.scss.js";
10
10
  const L = ({ settings: e, settingsID: u, onUpdate: o }) => {
11
- var c;
12
- const { setTheme: f } = y(), [p, n] = d(!1), [h, m] = d(!1), { totp: r } = e || {}, s = r == null ? void 0 : r.secret, A = (l) => {
11
+ var m;
12
+ const { setTheme: f } = y(), [p, n] = d(!1), [h, c] = d(!1), { totp: r } = e || {}, s = r == null ? void 0 : r.secret, A = (l) => {
13
13
  if (l === !0 && !s) {
14
14
  n(!0);
15
15
  return;
@@ -49,7 +49,7 @@ const L = ({ settings: e, settingsID: u, onUpdate: o }) => {
49
49
  }
50
50
  ) }),
51
51
  /* @__PURE__ */ a("div", { className: i.field, children: /* @__PURE__ */ a(
52
- w,
52
+ v,
53
53
  {
54
54
  label: "Color Scheme",
55
55
  fieldValue: e.theme,
@@ -62,7 +62,15 @@ const L = ({ settings: e, settingsID: u, onUpdate: o }) => {
62
62
  inline: !1
63
63
  }
64
64
  ) }),
65
- /* @__PURE__ */ a("div", { className: i.field, children: /* @__PURE__ */ a(v, { label: "Enable 2FA", fieldValue: ((c = e == null ? void 0 : e.totp) == null ? void 0 : c.enabled) || !1, onUpdate: (l) => A(l), inline: !0 }) }),
65
+ /* @__PURE__ */ a("div", { className: i.field, children: /* @__PURE__ */ a(
66
+ w,
67
+ {
68
+ label: "Enable Two-Factor Authentication (2FA)",
69
+ fieldValue: ((m = e == null ? void 0 : e.totp) == null ? void 0 : m.enabled) || !1,
70
+ onUpdate: (l) => A(l),
71
+ inline: !1
72
+ }
73
+ ) }),
66
74
  p && /* @__PURE__ */ a(
67
75
  S,
68
76
  {
@@ -74,11 +82,11 @@ const L = ({ settings: e, settingsID: u, onUpdate: o }) => {
74
82
  title: "Yes, Enable 2FA",
75
83
  type: "default",
76
84
  isPending: !1,
77
- action: () => m(!0)
85
+ action: () => c(!0)
78
86
  }
79
87
  }
80
88
  ),
81
- h && /* @__PURE__ */ a(T, { id: u, close: () => m(!1) })
89
+ h && /* @__PURE__ */ a(T, { id: u, close: () => c(!1) })
82
90
  ] });
83
91
  };
84
92
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"GeneralSettings.js","sources":["../../../../src/components/Settings/GeneralSettings/GeneralSettings.tsx"],"sourcesContent":["import { useState } from 'react';\r\nimport { ActionModal } from '../..';\r\nimport { useTheme } from '../../../context/ThemeContext';\r\nimport Input from '../../common/form/Input/Input';\r\nimport Toggle from '../../common/form/Toggle/Toggle';\r\nimport Tristate from '../../common/form/Tristate/Tristate';\r\nimport TwoFactorSetup from '../TwoFactorSetup/TwoFactorSetup';\r\nimport classes from './GeneralSettings.module.scss';\r\n\r\ninterface GeneralSettingsProps {\r\n settingsID: number;\r\n settings: Record<string, any>;\r\n onUpdate: (settings: Record<string, any>) => void;\r\n}\r\n\r\nconst GeneralSettings = ({ settings, settingsID, onUpdate }: GeneralSettingsProps) => {\r\n const { setTheme } = useTheme();\r\n const [show2FASetupConfirm, setShow2FASetupConfirm] = useState(false);\r\n const [show2FASetup, setShow2FASetup] = useState(false);\r\n\r\n const { totp } = settings || {};\r\n const is2FASetupComplete = totp?.secret;\r\n\r\n const update2FASetting = (enabled: boolean) => {\r\n if (enabled === true && !is2FASetupComplete) {\r\n setShow2FASetupConfirm(true);\r\n return;\r\n } else {\r\n onUpdate({ ...settings, totp: { ...totp, enabled } });\r\n }\r\n };\r\n\r\n const handleThemeChange = (newThemeValue: 'auto' | 'light' | 'dark') => {\r\n setTheme(newThemeValue);\r\n onUpdate({ ...settings, theme: newThemeValue });\r\n };\r\n\r\n return (\r\n <div>\r\n <div className={classes.field}>\r\n <Input\r\n label=\"App Instance Title\"\r\n fieldValue={(settings?.title || '') as string}\r\n onUpdate={(val) => onUpdate({ ...settings, title: val })}\r\n inline={false}\r\n />\r\n </div>\r\n <div className={classes.field}>\r\n <Input\r\n label=\"App Instance Description\"\r\n fieldValue={(settings?.description || '') as string}\r\n onUpdate={(val) => onUpdate({ ...settings, description: val })}\r\n inline={false}\r\n />\r\n </div>\r\n <div className={classes.field}>\r\n <Input\r\n label=\"Admin Email\"\r\n fieldValue={settings.admin_email || ''}\r\n onUpdate={(val) => onUpdate({ ...settings, admin_email: val })}\r\n type=\"email\"\r\n placeholder=\"johndoe@mail.com\"\r\n inline={false}\r\n />\r\n </div>\r\n <div className={classes.field}>\r\n <Tristate\r\n label=\"Color Scheme\"\r\n fieldValue={settings.theme as string}\r\n options={[\r\n { label: 'Auto', value: 'auto' },\r\n { label: 'Dark', value: 'dark' },\r\n { label: 'Light', value: 'light' },\r\n ]}\r\n onUpdate={(val: string) => handleThemeChange(val as 'auto' | 'light' | 'dark')}\r\n inline={false}\r\n />\r\n </div>\r\n <div className={classes.field}>\r\n <Toggle label=\"Enable 2FA\" fieldValue={settings?.totp?.enabled || false} onUpdate={(val) => update2FASetting(val)} inline={true} />\r\n </div>\r\n {show2FASetupConfirm && (\r\n <ActionModal\r\n title={`Enable Two-Factor Authentication (2FA)`}\r\n message={`Are you sure you want to enable Two-Factor Authentication (2FA) to secure Pluton Login? You will be required to use an authenticator app to login if you enable this feature.`}\r\n closeModal={() => setShow2FASetupConfirm(false)}\r\n width=\"420px\"\r\n primaryAction={{\r\n title: `Yes, Enable 2FA`,\r\n type: 'default',\r\n isPending: false,\r\n action: () => setShow2FASetup(true),\r\n }}\r\n />\r\n )}\r\n {show2FASetup && <TwoFactorSetup id={settingsID} close={() => setShow2FASetup(false)} />}\r\n </div>\r\n );\r\n};\r\n\r\nexport default GeneralSettings;\r\n"],"names":["GeneralSettings","settings","settingsID","onUpdate","setTheme","useTheme","show2FASetupConfirm","setShow2FASetupConfirm","useState","show2FASetup","setShow2FASetup","totp","is2FASetupComplete","update2FASetting","enabled","handleThemeChange","newThemeValue","jsx","classes","Input","val","Tristate","Toggle","_a","ActionModal","TwoFactorSetup"],"mappings":";;;;;;;;;AAeA,MAAMA,IAAkB,CAAC,EAAE,UAAAC,GAAU,YAAAC,GAAY,UAAAC,QAAqC;;AACnF,QAAM,EAAE,UAAAC,EAAA,IAAaC,EAAA,GACf,CAACC,GAAqBC,CAAsB,IAAIC,EAAS,EAAK,GAC9D,CAACC,GAAcC,CAAe,IAAIF,EAAS,EAAK,GAEhD,EAAE,MAAAG,MAASV,KAAY,CAAA,GACvBW,IAAqBD,KAAA,gBAAAA,EAAM,QAE3BE,IAAmB,CAACC,MAAqB;AAC5C,QAAIA,MAAY,MAAQ,CAACF,GAAoB;AAC1C,MAAAL,EAAuB,EAAI;AAC3B;AAAA,IACH;AACG,MAAAJ,EAAS,EAAE,GAAGF,GAAU,MAAM,EAAE,GAAGU,GAAM,SAAAG,EAAA,GAAW;AAAA,EAE1D,GAEMC,IAAoB,CAACC,MAA6C;AACrE,IAAAZ,EAASY,CAAa,GACtBb,EAAS,EAAE,GAAGF,GAAU,OAAOe,GAAe;AAAA,EACjD;AAEA,2BACI,OAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAQ,OACrB,UAAA,gBAAAD;AAAA,MAACE;AAAA,MAAA;AAAA,QACE,OAAM;AAAA,QACN,aAAalB,KAAA,gBAAAA,EAAU,UAAS;AAAA,QAChC,UAAU,CAACmB,MAAQjB,EAAS,EAAE,GAAGF,GAAU,OAAOmB,GAAK;AAAA,QACvD,QAAQ;AAAA,MAAA;AAAA,IAAA,GAEd;AAAA,IACA,gBAAAH,EAAC,OAAA,EAAI,WAAWC,EAAQ,OACrB,UAAA,gBAAAD;AAAA,MAACE;AAAA,MAAA;AAAA,QACE,OAAM;AAAA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C9C,OAAM;AAAA,QACN,eAAe;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,UACN,WAAW;AAAA,UACX,QAAQ,MAAMG,EAAgB,EAAI;AAAA,QAAA;AAAA,MACrC;AAAA,IAAA;AAAA,IAGLD,uBAAiBgB,GAAA,EAAe,IAAIvB,GAAY,OAAO,MAAMQ,EAAgB,EAAK,EAAA,CAAG;AAAA,EAAA,GACzF;AAEN;"}
1
+ {"version":3,"file":"GeneralSettings.js","sources":["../../../../src/components/Settings/GeneralSettings/GeneralSettings.tsx"],"sourcesContent":["import { useState } from 'react';\r\nimport { ActionModal } from '../..';\r\nimport { useTheme } from '../../../context/ThemeContext';\r\nimport Input from '../../common/form/Input/Input';\r\nimport Toggle from '../../common/form/Toggle/Toggle';\r\nimport Tristate from '../../common/form/Tristate/Tristate';\r\nimport TwoFactorSetup from '../TwoFactorSetup/TwoFactorSetup';\r\nimport classes from './GeneralSettings.module.scss';\r\n\r\ninterface GeneralSettingsProps {\r\n settingsID: number;\r\n settings: Record<string, any>;\r\n onUpdate: (settings: Record<string, any>) => void;\r\n}\r\n\r\nconst GeneralSettings = ({ settings, settingsID, onUpdate }: GeneralSettingsProps) => {\r\n const { setTheme } = useTheme();\r\n const [show2FASetupConfirm, setShow2FASetupConfirm] = useState(false);\r\n const [show2FASetup, setShow2FASetup] = useState(false);\r\n\r\n const { totp } = settings || {};\r\n const is2FASetupComplete = totp?.secret;\r\n\r\n const update2FASetting = (enabled: boolean) => {\r\n if (enabled === true && !is2FASetupComplete) {\r\n setShow2FASetupConfirm(true);\r\n return;\r\n } else {\r\n onUpdate({ ...settings, totp: { ...totp, enabled } });\r\n }\r\n };\r\n\r\n const handleThemeChange = (newThemeValue: 'auto' | 'light' | 'dark') => {\r\n setTheme(newThemeValue);\r\n onUpdate({ ...settings, theme: newThemeValue });\r\n };\r\n\r\n return (\r\n <div>\r\n <div className={classes.field}>\r\n <Input\r\n label=\"App Instance Title\"\r\n fieldValue={(settings?.title || '') as string}\r\n onUpdate={(val) => onUpdate({ ...settings, title: val })}\r\n inline={false}\r\n />\r\n </div>\r\n <div className={classes.field}>\r\n <Input\r\n label=\"App Instance Description\"\r\n fieldValue={(settings?.description || '') as string}\r\n onUpdate={(val) => onUpdate({ ...settings, description: val })}\r\n inline={false}\r\n />\r\n </div>\r\n <div className={classes.field}>\r\n <Input\r\n label=\"Admin Email\"\r\n fieldValue={settings.admin_email || ''}\r\n onUpdate={(val) => onUpdate({ ...settings, admin_email: val })}\r\n type=\"email\"\r\n placeholder=\"johndoe@mail.com\"\r\n inline={false}\r\n />\r\n </div>\r\n <div className={classes.field}>\r\n <Tristate\r\n label=\"Color Scheme\"\r\n fieldValue={settings.theme as string}\r\n options={[\r\n { label: 'Auto', value: 'auto' },\r\n { label: 'Dark', value: 'dark' },\r\n { label: 'Light', value: 'light' },\r\n ]}\r\n onUpdate={(val: string) => handleThemeChange(val as 'auto' | 'light' | 'dark')}\r\n inline={false}\r\n />\r\n </div>\r\n <div className={classes.field}>\r\n <Toggle\r\n label=\"Enable Two-Factor Authentication (2FA)\"\r\n fieldValue={settings?.totp?.enabled || false}\r\n onUpdate={(val) => update2FASetting(val)}\r\n inline={false}\r\n />\r\n </div>\r\n {show2FASetupConfirm && (\r\n <ActionModal\r\n title={`Enable Two-Factor Authentication (2FA)`}\r\n message={`Are you sure you want to enable Two-Factor Authentication (2FA) to secure Pluton Login? You will be required to use an authenticator app to login if you enable this feature.`}\r\n closeModal={() => setShow2FASetupConfirm(false)}\r\n width=\"420px\"\r\n primaryAction={{\r\n title: `Yes, Enable 2FA`,\r\n type: 'default',\r\n isPending: false,\r\n action: () => setShow2FASetup(true),\r\n }}\r\n />\r\n )}\r\n {show2FASetup && <TwoFactorSetup id={settingsID} close={() => setShow2FASetup(false)} />}\r\n </div>\r\n );\r\n};\r\n\r\nexport default GeneralSettings;\r\n"],"names":["GeneralSettings","settings","settingsID","onUpdate","setTheme","useTheme","show2FASetupConfirm","setShow2FASetupConfirm","useState","show2FASetup","setShow2FASetup","totp","is2FASetupComplete","update2FASetting","enabled","handleThemeChange","newThemeValue","jsx","classes","Input","val","Tristate","Toggle","_a","ActionModal","TwoFactorSetup"],"mappings":";;;;;;;;;AAeA,MAAMA,IAAkB,CAAC,EAAE,UAAAC,GAAU,YAAAC,GAAY,UAAAC,QAAqC;;AACnF,QAAM,EAAE,UAAAC,EAAA,IAAaC,EAAA,GACf,CAACC,GAAqBC,CAAsB,IAAIC,EAAS,EAAK,GAC9D,CAACC,GAAcC,CAAe,IAAIF,EAAS,EAAK,GAEhD,EAAE,MAAAG,MAASV,KAAY,CAAA,GACvBW,IAAqBD,KAAA,gBAAAA,EAAM,QAE3BE,IAAmB,CAACC,MAAqB;AAC5C,QAAIA,MAAY,MAAQ,CAACF,GAAoB;AAC1C,MAAAL,EAAuB,EAAI;AAC3B;AAAA,IACH;AACG,MAAAJ,EAAS,EAAE,GAAGF,GAAU,MAAM,EAAE,GAAGU,GAAM,SAAAG,EAAA,GAAW;AAAA,EAE1D,GAEMC,IAAoB,CAACC,MAA6C;AACrE,IAAAZ,EAASY,CAAa,GACtBb,EAAS,EAAE,GAAGF,GAAU,OAAOe,GAAe;AAAA,EACjD;AAEA,2BACI,OAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAQ,OACrB,UAAA,gBAAAD;AAAA,MAACE;AAAA,MAAA;AAAA,QACE,OAAM;AAAA,QACN,aAAalB,KAAA,gBAAAA,EAAU,UAAS;AAAA,QAChC,UAAU,CAACmB,MAAQjB,EAAS,EAAE,GAAGF,GAAU,OAAOmB,GAAK;AAAA,QACvD,QAAQ;AAAA,MAAA;AAAA,IAAA,GAEd;AAAA,IACA,gBAAAH,EAAC,OAAA,EAAI,WAAWC,EAAQ,OACrB,UAAA,gBAAAD;AAAA,MAACE;AAAA,MAAA;AAAA,QACE,OAAM;AAAA,QACN,aAAalB,KAAA,gBAAAA,EAAU,gBAAe;AAAA,QACtC,UAAU,C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A,QACN,eAAe;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,UACN,WAAW;AAAA,UACX,QAAQ,MAAMG,EAAgB,EAAI;AAAA,QAAA;AAAA,MACrC;AAAA,IAAA;AAAA,IAGLD,uBAAiBgB,GAAA,EAAe,IAAIvB,GAAY,OAAO,MAAMQ,EAAgB,EAAK,EAAA,CAAG;AAAA,EAAA,GACzF;AAEN;"}
@@ -1 +1 @@
1
- {"version":3,"file":"IntegrationSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/Settings/IntegrationSettings/IntegrationSettings.tsx"],"names":[],"mappings":"AAOA,UAAU,wBAAwB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9B,QAAQ,EAAE,CAAC,QAAQ,EAAE,wBAAwB,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;CACrE;AAED,QAAA,MAAM,mBAAmB,GAAI,oCAAoC,wBAAwB,4CAqDxF,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"IntegrationSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/Settings/IntegrationSettings/IntegrationSettings.tsx"],"names":[],"mappings":"AAQA,UAAU,wBAAwB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9B,QAAQ,EAAE,CAAC,QAAQ,EAAE,wBAAwB,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;CACrE;AAED,QAAA,MAAM,mBAAmB,GAAI,oCAAoC,wBAAwB,4CAuDxF,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -1,56 +1,61 @@
1
- import { jsxs as M, jsx as e, Fragment as T } from "react/jsx-runtime";
2
- import { useState as m } from "react";
3
- import h from "./IntegrationSettings.module.scss.js";
4
- import S from "../../common/form/Input/Input.js";
5
- import I from "../../common/ActionModal/ActionModal.js";
6
- import { useValidateIntegration as E } from "../../../services/settings.js";
7
- import v from "./SMTPSettings.js";
8
- const V = ({ settingsID: c, settings: o, onUpdate: d }) => {
9
- var l;
10
- const [n, p] = m(""), [g, a] = m(""), i = (o == null ? void 0 : o.integration) || {}, { smtp: u } = i || {}, s = E(), f = (t, r) => {
11
- console.log("onIntegrationUpdate :", t, r), d({ ...i, [t]: { ...i[t], ...r } });
1
+ import { jsxs as o, jsx as e, Fragment as u } from "react/jsx-runtime";
2
+ import { useState as g } from "react";
3
+ import l from "./IntegrationSettings.module.scss.js";
4
+ import S from "./SMTPSettings.js";
5
+ import b from "./NtfySettings.js";
6
+ import c from "../../common/Icon/Icon.js";
7
+ import h from "../../common/form/Select/Select.js";
8
+ import { isMobile as N } from "../../../utils/helpers.js";
9
+ const P = ({ settingsID: p, settings: a, onUpdate: y }) => {
10
+ const [i, s] = g("smtp"), n = (a == null ? void 0 : a.integration) || {}, { smtp: r, ntfy: m } = n || {}, f = (t, d) => {
11
+ console.log("onIntegrationUpdate :", t, d), y({ ...n, [t]: { ...n[t], ...d } });
12
12
  };
13
- return /* @__PURE__ */ M("div", { className: h.integrations, children: [
14
- /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
15
- v,
13
+ return /* @__PURE__ */ o("div", { className: l.integrations, children: [
14
+ N() ? /* @__PURE__ */ e(
15
+ h,
16
16
  {
17
- settings: u,
18
- onUpdate: (t) => f("smtp", t),
19
- showTestModal: (t) => a(t)
17
+ customClasses: l.integrationSelect,
18
+ options: [
19
+ { label: "SMTP", value: "smtp", icon: "email" },
20
+ { label: "Ntfy", value: "ntfy", icon: "ntfy" }
21
+ ],
22
+ fieldValue: i,
23
+ full: !0,
24
+ onUpdate: (t) => s(t)
20
25
  }
21
- ) }),
22
- g && /* @__PURE__ */ e(
23
- I,
24
- {
25
- title: "Test SMTP Integration",
26
- message: /* @__PURE__ */ e(T, { children: /* @__PURE__ */ e(
27
- S,
28
- {
29
- label: "Send Test Email to this email",
30
- full: !0,
31
- fieldValue: n,
32
- onUpdate: (t) => p(t),
33
- type: "email",
34
- placeholder: "test@test.com"
35
- }
36
- ) }),
37
- errorMessage: (l = s.error) == null ? void 0 : l.message,
38
- successMessage: s.isSuccess ? "Test email sent. Integration validated successfully." : "",
39
- closeModal: () => a(""),
40
- width: "400px",
41
- secondaryAction: { title: "Close", action: () => a("") },
42
- primaryAction: {
43
- title: "Send Test Email",
44
- type: "default",
45
- icon: "email",
46
- isPending: s.isPending,
47
- action: () => s.mutate({ settingsID: c, type: "smtp", settings: o, test: { email: n } })
26
+ ) : /* @__PURE__ */ e(u, { children: /* @__PURE__ */ o("ul", { className: l.tabs, children: [
27
+ /* @__PURE__ */ o("li", { className: `${i === "smtp" ? l.tabActive : ""}`, onClick: () => s("smtp"), children: [
28
+ /* @__PURE__ */ e(c, { type: "email", size: 14 }),
29
+ " SMTP",
30
+ (r == null ? void 0 : r.connected) && /* @__PURE__ */ e(c, { type: "check-circle-filled", size: 12 })
31
+ ] }),
32
+ /* @__PURE__ */ o("li", { className: `${i === "ntfy" ? l.tabActive : ""}`, onClick: () => s("ntfy"), children: [
33
+ /* @__PURE__ */ e(c, { type: "ntfy", size: 14 }),
34
+ " Ntfy",
35
+ (m == null ? void 0 : m.connected) && /* @__PURE__ */ e(c, { type: "check-circle-filled", size: 12 })
36
+ ] })
37
+ ] }) }),
38
+ /* @__PURE__ */ o("div", { children: [
39
+ i === "smtp" && /* @__PURE__ */ e(
40
+ S,
41
+ {
42
+ settingsID: p,
43
+ settings: n,
44
+ onUpdate: (t) => f("smtp", t)
48
45
  }
49
- }
50
- )
46
+ ),
47
+ i === "ntfy" && /* @__PURE__ */ e(
48
+ b,
49
+ {
50
+ settingsID: p,
51
+ settings: n,
52
+ onUpdate: (t) => f("ntfy", t)
53
+ }
54
+ )
55
+ ] })
51
56
  ] });
52
57
  };
53
58
  export {
54
- V as default
59
+ P as default
55
60
  };
56
61
  //# sourceMappingURL=IntegrationSettings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IntegrationSettings.js","sources":["../../../../src/components/Settings/IntegrationSettings/IntegrationSettings.tsx"],"sourcesContent":["import { useState } from 'react';\r\nimport classes from './IntegrationSettings.module.scss';\r\nimport Input from '../../common/form/Input/Input';\r\nimport ActionModal from '../../common/ActionModal/ActionModal';\r\nimport { useValidateIntegration } from '../../../services/settings';\r\nimport SMTPSettings from './SMTPSettings';\r\n\r\ninterface IntegrationSettingsProps {\r\n settingsID: number;\r\n settings: Record<string, any>;\r\n onUpdate: (settings: IntegrationSettingsProps['settings']) => void;\r\n}\r\n\r\nconst IntegrationSettings = ({ settingsID, settings, onUpdate }: IntegrationSettingsProps) => {\r\n const [testEmail, setTestEmail] = useState('');\r\n const [showEmailTestModal, setShowEmailTestModal] = useState<'' | 'smtp'>('');\r\n const integrationSettings = settings?.integration || {};\r\n const { smtp } = integrationSettings || {};\r\n\r\n const validationMutation = useValidateIntegration();\r\n\r\n const onIntegrationUpdate = (key: string, intSettings: Record<string, any>) => {\r\n console.log('onIntegrationUpdate :', key, intSettings);\r\n onUpdate({ ...integrationSettings, [key]: { ...integrationSettings[key], ...intSettings } });\r\n };\r\n\r\n return (\r\n <div className={classes.integrations}>\r\n <div>\r\n <SMTPSettings\r\n settings={smtp}\r\n onUpdate={(iSettings) => onIntegrationUpdate('smtp', iSettings)}\r\n showTestModal={(type) => setShowEmailTestModal(type)}\r\n />\r\n </div>\r\n {showEmailTestModal && (\r\n <ActionModal\r\n title={`Test SMTP Integration`}\r\n message={\r\n <>\r\n <Input\r\n label=\"Send Test Email to this email\"\r\n full={true}\r\n fieldValue={testEmail}\r\n onUpdate={(val) => setTestEmail(val)}\r\n type=\"email\"\r\n placeholder=\"test@test.com\"\r\n />\r\n </>\r\n }\r\n errorMessage={validationMutation.error?.message}\r\n successMessage={validationMutation.isSuccess ? 'Test email sent. Integration validated successfully.' : ''}\r\n closeModal={() => setShowEmailTestModal('')}\r\n width=\"400px\"\r\n secondaryAction={{ title: 'Close', action: () => setShowEmailTestModal('') }}\r\n primaryAction={{\r\n title: `Send Test Email`,\r\n type: 'default',\r\n icon: 'email',\r\n isPending: validationMutation.isPending,\r\n action: () => validationMutation.mutate({ settingsID, type: 'smtp', settings: settings, test: { email: testEmail } }),\r\n }}\r\n />\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\nexport default IntegrationSettings;\r\n"],"names":["IntegrationSettings","settingsID","settings","onUpdate","testEmail","setTestEmail","useState","showEmailTestModal","setShowEmailTestModal","integrationSettings","smtp","validationMutation","useValidateIntegration","onIntegrationUpdate","key","intSettings","jsxs","classes","jsx","SMTPSettings","iSettings","type","ActionModal","Fragment","Input","val","_a"],"mappings":";;;;;;;AAaA,MAAMA,IAAsB,CAAC,EAAE,YAAAC,GAAY,UAAAC,GAAU,UAAAC,QAAyC;;AAC3F,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAS,EAAE,GACvC,CAACC,GAAoBC,CAAqB,IAAIF,EAAsB,EAAE,GACtEG,KAAsBP,KAAA,gBAAAA,EAAU,gBAAe,CAAA,GAC/C,EAAE,MAAAQ,MAASD,KAAuB,CAAA,GAElCE,IAAqBC,EAAA,GAErBC,IAAsB,CAACC,GAAaC,MAAqC;AAC5E,YAAQ,IAAI,yBAAyBD,GAAKC,CAAW,GACrDZ,EAAS,EAAE,GAAGM,GAAqB,CAACK,CAAG,GAAG,EAAE,GAAGL,EAAoBK,CAAG,GAAG,GAAGC,EAAA,GAAe;AAAA,EAC9F;AAEA,SACG,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAQ,cACrB,UAAA;AAAA,IAAA,gBAAAC,EAAC,OAAA,EACE,UAAA,gBAAAA;AAAA,MAACC;AAAA,MAAA;AAAA,QACE,UAAUT;AAAA,QACV,UAAU,CAACU,MAAcP,EAAoB,QAAQO,CAAS;AAAA,QAC9D,eAAe,CAACC,MAASb,EAAsBa,CAAI;AAAA,MAAA;AAAA,IAAA,GAEzD;AAAA,IACCd,KACE,gBAAAW;AAAA,MAACI;AAAA,MAAA;AAAA,QACE,OAAO;AAAA,QACP,SACG,gBAAAJ,EAAAK,GAAA,EACG,UAAA,gBAAAL;AAAA,UAACM;AAAA,UAAA;AAAA,YACE,OAAM;AAAA,YACN,MAAM;AAAA,YACN,YAAYpB;AAAA,YACZ,UAAU,CAACqB,MAAQpB,EAAaoB,CAAG;AAAA,YACnC,MAAK;AAAA,YACL,aAAY;AAAA,UAAA;AAAA,QAAA,GAElB;AAAA,QAEH,eAAcC,IAAAf,EAAmB,UAAnB,gBAAAe,EAA0B;AAAA,QACxC,gBAAgBf,EAAmB,YAAY,yDAAyD;AAAA,QACxG,YAAY,MAAMH,EAAsB,EAAE;AAAA,QAC1C,OAAM;AAAA,QACN,iBAAiB,EAAE,OAAO,SAAS,QAAQ,MAAMA,EAAsB,EAAE,EAAA;AAAA,QACzE,eAAe;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,UACN,MAAM;AAAA,UACN,WAAWG,EAAmB;AAAA,UAC9B,QAAQ,MAAMA,EAAmB,OAAO,EAAE,YAAAV,GAAY,MAAM,QAAQ,UAAAC,GAAoB,MAAM,EAAE,OAAOE,EAAA,GAAa;AAAA,QAAA;AAAA,MACvH;AAAA,IAAA;AAAA,EACH,GAEN;AAEN;"}
1
+ {"version":3,"file":"IntegrationSettings.js","sources":["../../../../src/components/Settings/IntegrationSettings/IntegrationSettings.tsx"],"sourcesContent":["import { useState } from 'react';\r\nimport classes from './IntegrationSettings.module.scss';\r\nimport SMTPSettings from './SMTPSettings';\r\nimport NtfySettings from './NtfySettings';\r\nimport Icon from '../../common/Icon/Icon';\r\nimport Select from '../../common/form/Select/Select';\r\nimport { isMobile } from '../../../utils';\r\n\r\ninterface IntegrationSettingsProps {\r\n settingsID: number;\r\n settings: Record<string, any>;\r\n onUpdate: (settings: IntegrationSettingsProps['settings']) => void;\r\n}\r\n\r\nconst IntegrationSettings = ({ settingsID, settings, onUpdate }: IntegrationSettingsProps) => {\r\n const [tab, setTab] = useState<'smtp' | 'ntfy'>('smtp');\r\n const integrationSettings = settings?.integration || {};\r\n const { smtp, ntfy } = integrationSettings || {};\r\n\r\n const onIntegrationUpdate = (key: string, intSettings: Record<string, any>) => {\r\n console.log('onIntegrationUpdate :', key, intSettings);\r\n onUpdate({ ...integrationSettings, [key]: { ...integrationSettings[key], ...intSettings } });\r\n };\r\n\r\n return (\r\n <div className={classes.integrations}>\r\n {isMobile() ? (\r\n <Select\r\n customClasses={classes.integrationSelect}\r\n options={[\r\n { label: 'SMTP', value: 'smtp', icon: 'email' },\r\n { label: 'Ntfy', value: 'ntfy', icon: 'ntfy' },\r\n ]}\r\n fieldValue={tab}\r\n full={true}\r\n onUpdate={(val) => setTab(val as 'smtp' | 'ntfy')}\r\n />\r\n ) : (\r\n <>\r\n <ul className={classes.tabs}>\r\n <li className={`${tab === 'smtp' ? classes.tabActive : ''}`} onClick={() => setTab('smtp')}>\r\n <Icon type=\"email\" size={14} /> SMTP\r\n {smtp?.connected && <Icon type=\"check-circle-filled\" size={12} />}\r\n </li>\r\n <li className={`${tab === 'ntfy' ? classes.tabActive : ''}`} onClick={() => setTab('ntfy')}>\r\n <Icon type=\"ntfy\" size={14} /> Ntfy\r\n {ntfy?.connected && <Icon type=\"check-circle-filled\" size={12} />}\r\n </li>\r\n </ul>\r\n </>\r\n )}\r\n <div>\r\n {tab === 'smtp' && (\r\n <SMTPSettings\r\n settingsID={settingsID}\r\n settings={integrationSettings}\r\n onUpdate={(iSettings) => onIntegrationUpdate('smtp', iSettings)}\r\n />\r\n )}\r\n {tab === 'ntfy' && (\r\n <NtfySettings\r\n settingsID={settingsID}\r\n settings={integrationSettings}\r\n onUpdate={(iSettings) => onIntegrationUpdate('ntfy', iSettings)}\r\n />\r\n )}\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default IntegrationSettings;\r\n"],"names":["IntegrationSettings","settingsID","settings","onUpdate","tab","setTab","useState","integrationSettings","smtp","ntfy","onIntegrationUpdate","key","intSettings","js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M,cAAa,gBAAAQ,EAACI,KAAK,MAAK,uBAAsB,MAAM,GAAA,CAAI;AAAA,MAAA,GAClE;AAAA,MACA,gBAAAP,EAAC,MAAA,EAAG,WAAW,GAAGT,MAAQ,SAASU,EAAQ,YAAY,EAAE,IAAI,SAAS,MAAMT,EAAO,MAAM,GACtF,UAAA;AAAA,QAAA,gBAAAW,EAACI,GAAA,EAAK,MAAK,QAAO,MAAM,IAAI;AAAA,QAAE;AAAA,SAC7BX,KAAA,gBAAAA,EAAM,cAAa,gBAAAO,EAACI,KAAK,MAAK,uBAAsB,MAAM,GAAA,CAAI;AAAA,MAAA,EAAA,CAClE;AAAA,IAAA,EAAA,CACH,EAAA,CACH;AAAA,sBAEF,OAAA,EACG,UAAA;AAAA,MAAAhB,MAAQ,UACN,gBAAAY;AAAA,QAACK;AAAA,QAAA;AAAA,UACE,YAAApB;AAAA,UACA,UAAUM;AAAA,UACV,UAAU,CAACe,MAAcZ,EAAoB,QAAQY,CAAS;AAAA,QAAA;AAAA,MAAA;AAAA,MAGnElB,MAAQ,UACN,gBAAAY;AAAA,QAACO;AAAA,QAAA;AAAA,UACE,YAAAtB;AAAA,UACA,UAAUM;AAAA,UACV,UAAU,CAACe,MAAcZ,EAAoB,QAAQY,CAAS;AAAA,QAAA;AAAA,MAAA;AAAA,IACjE,EAAA,CAEN;AAAA,EAAA,GACH;AAEN;"}
@@ -1,12 +1,18 @@
1
- const t = "_integrations_gdTNy", a = "_field_8lYva", n = "_validateBtn_xD7dP", e = {
1
+ const t = "_integrations_MpGgI", e = "_tabs_1kVp0", i = "_tabActive_XYBci", n = "_field_8kD7Y", a = "_validateBtn_uVx7f", s = "_integrationSelect_TiT6F", c = {
2
2
  integrations: t,
3
- field: a,
4
- validateBtn: n
3
+ tabs: e,
4
+ tabActive: i,
5
+ field: n,
6
+ validateBtn: a,
7
+ integrationSelect: s
5
8
  };
6
9
  export {
7
- e as default,
8
- a as field,
10
+ c as default,
11
+ n as field,
12
+ s as integrationSelect,
9
13
  t as integrations,
10
- n as validateBtn
14
+ i as tabActive,
15
+ e as tabs,
16
+ a as validateBtn
11
17
  };
12
18
  //# sourceMappingURL=IntegrationSettings.module.scss.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IntegrationSettings.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
1
+ {"version":3,"file":"IntegrationSettings.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,9 @@
1
+ import { IntegrationSettings, NtfySettingsType } from '../../../@types';
2
+ interface NtfySettingsProps {
3
+ settingsID: number;
4
+ settings: IntegrationSettings;
5
+ onUpdate: (settings: NtfySettingsType) => void;
6
+ }
7
+ declare const NtfySettings: ({ settingsID, settings, onUpdate }: NtfySettingsProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default NtfySettings;
9
+ //# sourceMappingURL=NtfySettings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NtfySettings.d.ts","sourceRoot":"","sources":["../../../../src/components/Settings/IntegrationSettings/NtfySettings.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAQxE,UAAU,iBAAiB;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,QAAQ,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,IAAI,CAAC;CACjD;AAED,QAAA,MAAM,YAAY,GAAI,oCAAoC,iBAAiB,4CAuF1E,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,79 @@
1
+ import { jsxs as p, jsx as o, Fragment as b } from "react/jsx-runtime";
2
+ import { useState as n } from "react";
3
+ import i from "./IntegrationSettings.module.scss.js";
4
+ import M from "../../common/Icon/Icon.js";
5
+ import w from "../../common/form/Select/Select.js";
6
+ import x from "../../common/form/Input/Input.js";
7
+ import A from "../../common/ActionModal/ActionModal.js";
8
+ import { useValidateIntegration as E } from "../../../services/settings.js";
9
+ import I from "../../common/form/PasswordField/PasswordField.js";
10
+ const D = ({ settingsID: h, settings: a, onUpdate: m }) => {
11
+ var f;
12
+ const [t, y] = n((a == null ? void 0 : a.ntfy) || { authType: "token", authToken: "", connected: !1 }), [l, T] = n({ authToken: "" }), [k, r] = n(!1), [c, v] = n(""), s = E(), N = t.authType || "token", u = (e) => {
13
+ y(e), m(e);
14
+ }, g = (e) => {
15
+ e.preventDefault();
16
+ const d = { authToken: "" };
17
+ t != null && t.authToken || (d.authToken = "Required"), T(d), Object.values(d).some((S) => S !== "") || r(!0);
18
+ };
19
+ return /* @__PURE__ */ p("div", { children: [
20
+ /* @__PURE__ */ o("div", { className: i.field, children: /* @__PURE__ */ o(
21
+ w,
22
+ {
23
+ label: "Auth Type*",
24
+ fieldValue: N,
25
+ options: [{ label: "Token", value: "token" }],
26
+ onUpdate: (e) => u({ ...t, authType: e }),
27
+ inline: !0
28
+ }
29
+ ) }),
30
+ /* @__PURE__ */ o("div", { className: i.field, children: /* @__PURE__ */ o(
31
+ I,
32
+ {
33
+ label: "Auth Token*",
34
+ fieldValue: t.authToken,
35
+ onUpdate: (e) => u({ ...t, authToken: e }),
36
+ error: l == null ? void 0 : l.authToken
37
+ }
38
+ ) }),
39
+ /* @__PURE__ */ o("div", { className: i.field, children: /* @__PURE__ */ p("button", { className: i.validateBtn, onClick: g, type: "button", children: [
40
+ /* @__PURE__ */ o(M, { type: "check", size: 10 }),
41
+ " ",
42
+ t.connected ? "Re-validate Ntfy" : "Validate Ntfy"
43
+ ] }) }),
44
+ k && /* @__PURE__ */ o(
45
+ A,
46
+ {
47
+ title: "Test Ntfy Integration",
48
+ message: /* @__PURE__ */ o(b, { children: /* @__PURE__ */ o(
49
+ x,
50
+ {
51
+ label: "Send Test Notification to this topic",
52
+ full: !0,
53
+ inline: !1,
54
+ fieldValue: c,
55
+ onUpdate: (e) => v(e),
56
+ type: "text",
57
+ placeholder: "test/topic url. Eg: https://ntfy.sh/testtopic"
58
+ }
59
+ ) }),
60
+ errorMessage: (f = s.error) == null ? void 0 : f.message,
61
+ successMessage: s.isSuccess ? "Test notification sent. Integration validated successfully." : "",
62
+ closeModal: () => r(!1),
63
+ width: "400px",
64
+ secondaryAction: { title: "Close", action: () => r(!1) },
65
+ primaryAction: {
66
+ title: "Send Test Notification",
67
+ type: "default",
68
+ icon: "send",
69
+ isPending: s.isPending,
70
+ action: () => c && s.mutate({ settingsID: h, type: "ntfy", settings: { ...a, ntfy: t }, test: { url: c } })
71
+ }
72
+ }
73
+ )
74
+ ] });
75
+ };
76
+ export {
77
+ D as default
78
+ };
79
+ //# sourceMappingURL=NtfySettings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NtfySettings.js","sources":["../../../../src/components/Settings/IntegrationSettings/NtfySettings.tsx"],"sourcesContent":["import { useState } from 'react';\r\nimport classes from './IntegrationSettings.module.scss';\r\nimport { IntegrationSettings, NtfySettingsType } from '../../../@types';\r\nimport Icon from '../../common/Icon/Icon';\r\nimport Select from '../../common/form/Select/Select';\r\nimport Input from '../../common/form/Input/Input';\r\nimport ActionModal from '../../common/ActionModal/ActionModal';\r\nimport { useValidateIntegration } from '../../../services';\r\nimport PasswordField from '../../common/form/PasswordField/PasswordField';\r\n\r\ninterface NtfySettingsProps {\r\n settingsID: number;\r\n settings: IntegrationSettings;\r\n onUpdate: (settings: NtfySettingsType) => void;\r\n}\r\n\r\nconst NtfySettings = ({ settingsID, settings, onUpdate }: NtfySettingsProps) => {\r\n const [ntfySettings, setNtfySettings] = useState<NtfySettingsType>(settings?.ntfy || { authType: 'token', authToken: '', connected: false });\r\n const [errorFields, setErrorFields] = useState<{ authToken: string }>({ authToken: '' });\r\n const [showTestModal, setShowTestModal] = useState(false);\r\n const [testUrl, setTestUrl] = useState('');\r\n const validationMutation = useValidateIntegration();\r\n\r\n const authType = ntfySettings.authType || 'token';\r\n\r\n const updateNtfySettings = (updated: NtfySettingsType) => {\r\n setNtfySettings(updated);\r\n onUpdate(updated);\r\n };\r\n\r\n const validateSettings = (e: React.FormEvent) => {\r\n e.preventDefault();\r\n\r\n const newErrors = { authToken: '' };\r\n\r\n if (!ntfySettings?.authToken) {\r\n newErrors.authToken = 'Required';\r\n }\r\n setErrorFields(newErrors);\r\n const hasErrors = Object.values(newErrors).some((error) => error !== '');\r\n if (!hasErrors) {\r\n setShowTestModal(true);\r\n }\r\n };\r\n\r\n return (\r\n <div>\r\n <div className={classes.field}>\r\n <Select\r\n label=\"Auth Type*\"\r\n fieldValue={authType}\r\n options={[{ label: 'Token', value: 'token' }]}\r\n onUpdate={(val) => updateNtfySettings({ ...ntfySettings, authType: val })}\r\n inline={true}\r\n />\r\n </div>\r\n <div className={classes.field}>\r\n <PasswordField\r\n label=\"Auth Token*\"\r\n fieldValue={ntfySettings.authToken}\r\n onUpdate={(val) => updateNtfySettings({ ...ntfySettings, authToken: val })}\r\n error={errorFields?.authToken}\r\n />\r\n </div>\r\n <div className={classes.field}>\r\n <button className={classes.validateBtn} onClick={validateSettings} type=\"button\">\r\n <Icon type=\"check\" size={10} /> {ntfySettings.connected ? 'Re-validate Ntfy' : 'Validate Ntfy'}\r\n </button>\r\n </div>\r\n {showTestModal && (\r\n <ActionModal\r\n title={`Test Ntfy Integration`}\r\n message={\r\n <>\r\n <Input\r\n label=\"Send Test Notification to this topic\"\r\n full={true}\r\n inline={false}\r\n fieldValue={testUrl}\r\n onUpdate={(val) => setTestUrl(val)}\r\n type=\"text\"\r\n placeholder=\"test/topic url. Eg: https://ntfy.sh/testtopic\"\r\n />\r\n </>\r\n }\r\n errorMessage={validationMutation.error?.message}\r\n successMessage={validationMutation.isSuccess ? 'Test notification sent. Integration validated successfully.' : ''}\r\n closeModal={() => setShowTestModal(false)}\r\n width=\"400px\"\r\n secondaryAction={{ title: 'Close', action: () => setShowTestModal(false) }}\r\n primaryAction={{\r\n title: `Send Test Notification`,\r\n type: 'default',\r\n icon: 'send',\r\n isPending: validationMutation.isPending,\r\n action: () =>\r\n testUrl &&\r\n validationMutation.mutate({ settingsID, type: 'ntfy', settings: { ...settings, ntfy: ntfySettings }, test: { url: testUrl } }),\r\n }}\r\n />\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\nexport default NtfySettings;\r\n"],"names":["NtfySettings","settingsID","settings","onUpdate","ntfySettings","setNtfySettings","useState","errorFields","setErrorFields","showTestModal","setShowTestModal","testUrl","setTestUrl","validationMutation","useValidateIntegration","authType","updateNtfySettings","updated","validateSettings","newErrors","error","jsx","classes","Select","val","PasswordField","jsxs","Icon","ActionModal","Fragment","Input","_a"],"mappings":";;;;;;;;;AAgBA,MAAMA,IAAe,CAAC,EAAE,YAAAC,GAAY,UAAAC,GAAU,UAAAC,QAAkC;;AAC7E,QAAM,CAACC,GAAcC,CAAe,IAAIC,GAA2BJ,KAAA,gBAAAA,EAAU,SAAQ,EAAE,UAAU,SAAS,WAAW,IAAI,WAAW,IAAO,GACrI,CAACK,GAAaC,CAAc,IAAIF,EAAgC,EAAE,WAAW,IAAI,GACjF,CAACG,GAAeC,CAAgB,IAAIJ,EAAS,EAAK,GAClD,CAACK,GAASC,CAAU,IAAIN,EAAS,EAAE,GACnCO,IAAqBC,EAAA,GAErBC,IAAWX,EAAa,YAAY,SAEpCY,IAAqB,CAACC,MAA8B;AACvD,IAAAZ,EAAgBY,CAAO,GACvBd,EAASc,CAAO;AAAA,EACnB,GAEMC,IAAmB,CAAC,MAAuB;AAC9C,MAAE,eAAA;AAEF,UAAMC,IAAY,EAAE,WAAW,GAAA;AAE/B,IAAKf,KAAA,QAAAA,EAAc,cAChBe,EAAU,YAAY,aAEzBX,EAAeW,CAAS,GACN,OAAO,OAAOA,CAAS,EAAE,KAAK,CAACC,MAAUA,MAAU,EAAE,KAEpEV,EAAiB,EAAI;AAAA,EAE3B;AAEA,2BACI,OAAA,EACE,UAAA;AAAA,IAAA,gBAAAW,EAAC,OAAA,EAAI,WAAWC,EAAQ,OACrB,UAAA,gBAAAD;AA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Y,gEAAgE;AAAA,QAC/G,YAAY,MAAMH,EAAiB,EAAK;AAAA,QACxC,OAAM;AAAA,QACN,iBAAiB,EAAE,OAAO,SAAS,QAAQ,MAAMA,EAAiB,EAAK,EAAA;AAAA,QACvE,eAAe;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,UACN,MAAM;AAAA,UACN,WAAWG,EAAmB;AAAA,UAC9B,QAAQ,MACLF,KACAE,EAAmB,OAAO,EAAE,YAAAZ,GAAY,MAAM,QAAQ,UAAU,EAAE,GAAGC,GAAU,MAAME,EAAA,GAAgB,MAAM,EAAE,KAAKO,IAAQ,CAAG;AAAA,QAAA;AAAA,MACnI;AAAA,IAAA;AAAA,EACH,GAEN;AAEN;"}
@@ -1,9 +1,10 @@
1
1
  import { SmtpSettingsType } from '../../../@types/settings';
2
+ import { IntegrationSettings } from '../../../@types';
2
3
  interface SMTPSettingsProps {
3
- settings: SmtpSettingsType;
4
+ settingsID: number;
5
+ settings: IntegrationSettings;
4
6
  onUpdate: (settings: SmtpSettingsType) => void;
5
- showTestModal: (type: 'smtp') => void;
6
7
  }
7
- declare const SMTPSettings: ({ settings, onUpdate, showTestModal }: SMTPSettingsProps) => import("react/jsx-runtime").JSX.Element;
8
+ declare const SMTPSettings: ({ settingsID, settings, onUpdate }: SMTPSettingsProps) => import("react/jsx-runtime").JSX.Element;
8
9
  export default SMTPSettings;
9
10
  //# sourceMappingURL=SMTPSettings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SMTPSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/Settings/IntegrationSettings/SMTPSettings.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,UAAU,iBAAiB;IACxB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,QAAQ,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC/C,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED,QAAA,MAAM,YAAY,GAAI,uCAAuC,iBAAiB,4CAiF7E,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"SMTPSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/Settings/IntegrationSettings/SMTPSettings.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAItD,UAAU,iBAAiB;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,QAAQ,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,IAAI,CAAC;CACjD;AAED,QAAA,MAAM,YAAY,GAAI,oCAAoC,iBAAiB,4CAwF1E,CAAC;AAEF,eAAe,YAAY,CAAC"}