@plutonhq/core-frontend 0.1.12 → 0.1.13
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-lib/components/Plan/PlanSettings/PlanSourceSettings.d.ts.map +1 -1
- package/dist-lib/components/Plan/PlanSettings/PlanSourceSettings.js +29 -28
- package/dist-lib/components/Plan/PlanSettings/PlanSourceSettings.js.map +1 -1
- package/dist-lib/components/common/Icon/Icon.d.ts.map +1 -1
- package/dist-lib/components/common/Icon/Icon.js +151 -144
- package/dist-lib/components/common/Icon/Icon.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Plan/PlanSettings/PlanSourceSettings.tsx +1 -0
- package/src/components/common/Icon/Icon.tsx +8 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlanSourceSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/Plan/PlanSettings/PlanSourceSettings.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAKxD,UAAU,uBAAuB;IAC9B,IAAI,EAAE,eAAe,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IAC1C,KAAK,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,kBAAkB,GAAI,sCAAsC,uBAAuB,
|
|
1
|
+
{"version":3,"file":"PlanSourceSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/Plan/PlanSettings/PlanSourceSettings.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAKxD,UAAU,uBAAuB;IAC9B,IAAI,EAAE,eAAe,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IAC1C,KAAK,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,kBAAkB,GAAI,sCAAsC,uBAAuB,4CAwCxF,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,47 +1,48 @@
|
|
|
1
|
-
import { jsxs as o, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { jsxs as o, Fragment as n, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import l from "./PlanSettings.module.scss.js";
|
|
3
|
+
import u from "../../common/PathPicker/PathPicker.js";
|
|
4
4
|
import { useGetDevices as f } from "../../../services/devices.js";
|
|
5
5
|
import h from "../../common/form/Select/Select.js";
|
|
6
|
-
const
|
|
7
|
-
const { data:
|
|
8
|
-
return
|
|
9
|
-
...
|
|
10
|
-
label: `${
|
|
11
|
-
value:
|
|
6
|
+
const S = ({ plan: s, onUpdate: r, error: t, isEditing: m }) => {
|
|
7
|
+
const { data: c } = f(), a = [], d = s.sourceId || "main";
|
|
8
|
+
return c != null && c.success && c.result && a.push(
|
|
9
|
+
...c.result.map((e) => ({
|
|
10
|
+
label: `${e.name} ${e.id === "main" ? "(Main)" : ""}`,
|
|
11
|
+
value: e.id,
|
|
12
|
+
icon: e.id === "main" ? "computer" : "computer-remote"
|
|
12
13
|
// disabled: device.id === 'main' || device.connected ? false : true,
|
|
13
14
|
}))
|
|
14
|
-
), /* @__PURE__ */ o(
|
|
15
|
-
/* @__PURE__ */ o("div", { className:
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */
|
|
15
|
+
), /* @__PURE__ */ o(n, { children: [
|
|
16
|
+
/* @__PURE__ */ o("div", { className: l.field, children: [
|
|
17
|
+
/* @__PURE__ */ i("label", { className: l.label, children: "Select Device*" }),
|
|
18
|
+
/* @__PURE__ */ i(
|
|
18
19
|
h,
|
|
19
20
|
{
|
|
20
|
-
options:
|
|
21
|
-
fieldValue:
|
|
22
|
-
disabled:
|
|
21
|
+
options: a,
|
|
22
|
+
fieldValue: d,
|
|
23
|
+
disabled: m,
|
|
23
24
|
full: !0,
|
|
24
|
-
onUpdate: (
|
|
25
|
+
onUpdate: (e) => r({ ...s, sourceId: e })
|
|
25
26
|
}
|
|
26
27
|
)
|
|
27
28
|
] }),
|
|
28
|
-
/* @__PURE__ */ o("div", { className:
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
|
|
29
|
+
/* @__PURE__ */ o("div", { className: l.field, children: [
|
|
30
|
+
/* @__PURE__ */ i("label", { className: l.label, children: "Backup Sources*" }),
|
|
31
|
+
t && /* @__PURE__ */ i("span", { className: l.fieldErrorLabel, children: t }),
|
|
32
|
+
/* @__PURE__ */ i(
|
|
33
|
+
u,
|
|
33
34
|
{
|
|
34
|
-
paths: { includes:
|
|
35
|
-
onUpdate: (
|
|
36
|
-
deviceId:
|
|
37
|
-
single:
|
|
38
|
-
disallowChange:
|
|
35
|
+
paths: { includes: s.sourceConfig.includes, excludes: s.sourceConfig.excludes },
|
|
36
|
+
onUpdate: (e) => r({ ...s, sourceConfig: { ...e } }),
|
|
37
|
+
deviceId: d,
|
|
38
|
+
single: s.method === "sync",
|
|
39
|
+
disallowChange: s.method === "sync"
|
|
39
40
|
}
|
|
40
41
|
)
|
|
41
42
|
] })
|
|
42
43
|
] });
|
|
43
44
|
};
|
|
44
45
|
export {
|
|
45
|
-
|
|
46
|
+
S as default
|
|
46
47
|
};
|
|
47
48
|
//# sourceMappingURL=PlanSourceSettings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlanSourceSettings.js","sources":["../../../../src/components/Plan/PlanSettings/PlanSourceSettings.tsx"],"sourcesContent":["import classes from './PlanSettings.module.scss';\r\nimport PathPicker from '../../common/PathPicker/PathPicker';\r\nimport { NewPlanSettings } from '../../../@types/plans';\r\nimport { useGetDevices } from '../../../services/devices';\r\nimport Select from '../../common/form/Select/Select';\r\nimport { Device } from '../../../@types/devices';\r\n\r\ninterface PlanSourceSettingsProps {\r\n plan: NewPlanSettings;\r\n isEditing: boolean;\r\n onUpdate: (plan: NewPlanSettings) => void;\r\n error: string;\r\n}\r\n\r\nconst PlanSourceSettings = ({ plan, onUpdate, error, isEditing }: PlanSourceSettingsProps) => {\r\n const { data } = useGetDevices();\r\n const deviceList = [];\r\n const deviceId = plan.sourceId || 'main';\r\n if (data?.success && data.result) {\r\n deviceList.push(\r\n ...data.result.map((device: Device) => ({\r\n label: `${device.name} ${device.id === 'main' ? '(Main)' : ''}`,\r\n value: device.id,\r\n // disabled: device.id === 'main' || device.connected ? false : true,\r\n })),\r\n );\r\n }\r\n\r\n return (\r\n <>\r\n <div className={classes.field}>\r\n <label className={classes.label}>Select Device*</label>\r\n <Select\r\n options={deviceList}\r\n fieldValue={deviceId}\r\n disabled={isEditing}\r\n full={true}\r\n onUpdate={(val) => onUpdate({ ...plan, sourceId: val })}\r\n />\r\n </div>\r\n <div className={classes.field}>\r\n <label className={classes.label}>Backup Sources*</label>\r\n {error && <span className={classes.fieldErrorLabel}>{error}</span>}\r\n <PathPicker\r\n paths={{ includes: plan.sourceConfig.includes, excludes: plan.sourceConfig.excludes }}\r\n onUpdate={(paths) => onUpdate({ ...plan, sourceConfig: { ...paths } })}\r\n deviceId={deviceId}\r\n single={plan.method === 'sync'}\r\n disallowChange={plan.method === 'sync'}\r\n />\r\n </div>\r\n </>\r\n );\r\n};\r\n\r\nexport default PlanSourceSettings;\r\n"],"names":["PlanSourceSettings","plan","onUpdate","error","isEditing","data","useGetDevices","deviceList","deviceId","device","jsxs","Fragment","classes","jsx","Select","val","PathPicker","paths"],"mappings":";;;;;AAcA,MAAMA,IAAqB,CAAC,EAAE,MAAAC,GAAM,UAAAC,GAAU,OAAAC,GAAO,WAAAC,QAAyC;AAC3F,QAAM,EAAE,MAAAC,EAAA,IAASC,EAAA,GACXC,IAAa,CAAA,GACbC,IAAWP,EAAK,YAAY;AAClC,SAAII,KAAA,QAAAA,EAAM,WAAWA,EAAK,UACvBE,EAAW;AAAA,IACR,GAAGF,EAAK,OAAO,IAAI,CAACI,OAAoB;AAAA,MACrC,OAAO,GAAGA,EAAO,IAAI,IAAIA,EAAO,OAAO,SAAS,WAAW,EAAE;AAAA,MAC7D,OAAOA,EAAO;AAAA;AAAA,IAAA,
|
|
1
|
+
{"version":3,"file":"PlanSourceSettings.js","sources":["../../../../src/components/Plan/PlanSettings/PlanSourceSettings.tsx"],"sourcesContent":["import classes from './PlanSettings.module.scss';\r\nimport PathPicker from '../../common/PathPicker/PathPicker';\r\nimport { NewPlanSettings } from '../../../@types/plans';\r\nimport { useGetDevices } from '../../../services/devices';\r\nimport Select from '../../common/form/Select/Select';\r\nimport { Device } from '../../../@types/devices';\r\n\r\ninterface PlanSourceSettingsProps {\r\n plan: NewPlanSettings;\r\n isEditing: boolean;\r\n onUpdate: (plan: NewPlanSettings) => void;\r\n error: string;\r\n}\r\n\r\nconst PlanSourceSettings = ({ plan, onUpdate, error, isEditing }: PlanSourceSettingsProps) => {\r\n const { data } = useGetDevices();\r\n const deviceList = [];\r\n const deviceId = plan.sourceId || 'main';\r\n if (data?.success && data.result) {\r\n deviceList.push(\r\n ...data.result.map((device: Device) => ({\r\n label: `${device.name} ${device.id === 'main' ? '(Main)' : ''}`,\r\n value: device.id,\r\n icon: device.id === 'main' ? 'computer' : 'computer-remote',\r\n // disabled: device.id === 'main' || device.connected ? false : true,\r\n })),\r\n );\r\n }\r\n\r\n return (\r\n <>\r\n <div className={classes.field}>\r\n <label className={classes.label}>Select Device*</label>\r\n <Select\r\n options={deviceList}\r\n fieldValue={deviceId}\r\n disabled={isEditing}\r\n full={true}\r\n onUpdate={(val) => onUpdate({ ...plan, sourceId: val })}\r\n />\r\n </div>\r\n <div className={classes.field}>\r\n <label className={classes.label}>Backup Sources*</label>\r\n {error && <span className={classes.fieldErrorLabel}>{error}</span>}\r\n <PathPicker\r\n paths={{ includes: plan.sourceConfig.includes, excludes: plan.sourceConfig.excludes }}\r\n onUpdate={(paths) => onUpdate({ ...plan, sourceConfig: { ...paths } })}\r\n deviceId={deviceId}\r\n single={plan.method === 'sync'}\r\n disallowChange={plan.method === 'sync'}\r\n />\r\n </div>\r\n </>\r\n );\r\n};\r\n\r\nexport default PlanSourceSettings;\r\n"],"names":["PlanSourceSettings","plan","onUpdate","error","isEditing","data","useGetDevices","deviceList","deviceId","device","jsxs","Fragment","classes","jsx","Select","val","PathPicker","paths"],"mappings":";;;;;AAcA,MAAMA,IAAqB,CAAC,EAAE,MAAAC,GAAM,UAAAC,GAAU,OAAAC,GAAO,WAAAC,QAAyC;AAC3F,QAAM,EAAE,MAAAC,EAAA,IAASC,EAAA,GACXC,IAAa,CAAA,GACbC,IAAWP,EAAK,YAAY;AAClC,SAAII,KAAA,QAAAA,EAAM,WAAWA,EAAK,UACvBE,EAAW;AAAA,IACR,GAAGF,EAAK,OAAO,IAAI,CAACI,OAAoB;AAAA,MACrC,OAAO,GAAGA,EAAO,IAAI,IAAIA,EAAO,OAAO,SAAS,WAAW,EAAE;AAAA,MAC7D,OAAOA,EAAO;AAAA,MACd,MAAMA,EAAO,OAAO,SAAS,aAAa;AAAA;AAAA,IAAA,EAE3C;AAAA,EAAA,GAKL,gBAAAC,EAAAC,GAAA,EACG,UAAA;AAAA,IAAA,gBAAAD,EAAC,OAAA,EAAI,WAAWE,EAAQ,OACrB,UAAA;AAAA,MAAA,gBAAAC,EAAC,SAAA,EAAM,WAAWD,EAAQ,OAAO,UAAA,kBAAc;AAAA,MAC/C,gBAAAC;AAAA,QAACC;AAAA,QAAA;AAAA,UACE,SAASP;AAAA,UACT,YAAYC;AAAA,UACZ,UAAUJ;AAAA,UACV,MAAM;AAAA,UACN,UAAU,CAACW,MAAQb,EAAS,EAAE,GAAGD,GAAM,UAAUc,EAAA,CAAK;AAAA,QAAA;AAAA,MAAA;AAAA,IACzD,GACH;AAAA,IACA,gBAAAL,EAAC,OAAA,EAAI,WAAWE,EAAQ,OACrB,UAAA;AAAA,MAAA,gBAAAC,EAAC,SAAA,EAAM,WAAWD,EAAQ,OAAO,UAAA,mBAAe;AAAA,MAC/CT,KAAS,gBAAAU,EAAC,QAAA,EAAK,WAAWD,EAAQ,iBAAkB,UAAAT,GAAM;AAAA,MAC3D,gBAAAU;AAAA,QAACG;AAAA,QAAA;AAAA,UACE,OAAO,EAAE,UAAUf,EAAK,aAAa,UAAU,UAAUA,EAAK,aAAa,SAAA;AAAA,UAC3E,UAAU,CAACgB,MAAUf,EAAS,EAAE,GAAGD,GAAM,cAAc,EAAE,GAAGgB,EAAA,GAAS;AAAA,UACrE,UAAAT;AAAA,UACA,QAAQP,EAAK,WAAW;AAAA,UACxB,gBAAgBA,EAAK,WAAW;AAAA,QAAA;AAAA,MAAA;AAAA,IACnC,EAAA,CACH;AAAA,EAAA,GACH;AAEN;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../src/components/common/Icon/Icon.tsx"],"names":[],"mappings":"AAEA,KAAK,SAAS,GAAG;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAOF,QAAA,MAAM,IAAI,GAAI,uCAAuE,SAAS,
|
|
1
|
+
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../src/components/common/Icon/Icon.tsx"],"names":[],"mappings":"AAEA,KAAK,SAAS,GAAG;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAOF,QAAA,MAAM,IAAI,GAAI,uCAAuE,SAAS,4CA+8C7F,CAAC;AAmBF,eAAe,IAAI,CAAC"}
|