@boltic/swirl 1.0.2-uat.75 → 1.0.2-uat.77

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/swirl.es.js CHANGED
@@ -9777,9 +9777,15 @@ const wC = {
9777
9777
  bolticStorageActivity: {
9778
9778
  event: "Select an event",
9779
9779
  file_content: "URL, content, or Base64-encoded data for the file.",
9780
+ file_path: "Path of the file in Boltic Storage.",
9781
+ file_paths: "Enter one or more file paths. Use comma or newline to pass multiple files.",
9780
9782
  folder_name: "The folder will be created exclusively at the root level.",
9781
9783
  folder_path: "If left blank, the file will be saved to the root location by default",
9782
- expire_in: "Enter minutes, If left blank, default is 60 minutes. Expiry should be between 1 minute to 43800 minutes"
9784
+ is_public_permanent: "Makes the uploaded file publicly accessible through its public URL.",
9785
+ expire_in: "Enter minutes, If left blank, default is 60 minutes. Expiry should be between 1 minute to 10080 minutes",
9786
+ ttl_seconds: "Optional cache TTL, in seconds, when making a file public.",
9787
+ page_size: "Maximum number of files/folders to return.",
9788
+ next_page_token: "Leave blank for the first page. To fetch the next page, pass next_page_token from the previous List Files/Folders result."
9783
9789
  },
9784
9790
  monitor: {
9785
9791
  events: "Choose monitoring event(s) to trigger your workflow.",
@@ -11793,12 +11799,32 @@ const ife = (e = c6, t) => {
11793
11799
  { value: 10, title: "10" }
11794
11800
  ], E6 = [
11795
11801
  {
11796
- title: "Make a folder",
11802
+ title: "Upload file",
11803
+ value: "upload_file"
11804
+ },
11805
+ {
11806
+ title: "Download file",
11807
+ value: "download_file"
11808
+ },
11809
+ {
11810
+ title: "Create folder",
11797
11811
  value: "create_folder"
11798
11812
  },
11799
11813
  {
11800
- title: "Upload file",
11801
- value: "upload_file"
11814
+ title: "List files and folders",
11815
+ value: "list_files"
11816
+ },
11817
+ {
11818
+ title: "Make files public",
11819
+ value: "make_file_public"
11820
+ },
11821
+ {
11822
+ title: "Make files private",
11823
+ value: "make_file_private"
11824
+ },
11825
+ {
11826
+ title: "Delete files or folders",
11827
+ value: "delete_file"
11802
11828
  }
11803
11829
  ], Mfe = [
11804
11830
  {
@@ -11958,7 +11984,11 @@ const ife = (e = c6, t) => {
11958
11984
  trigger: {
11959
11985
  events: {
11960
11986
  "storage.file.uploaded": "File Uploaded",
11961
- "storage.folder.created": "Folder Created"
11987
+ "storage.file.deleted": "File Deleted",
11988
+ "storage.file.public": "File Made Public",
11989
+ "storage.file.private": "File Made Private",
11990
+ "storage.folder.created": "Folder Created",
11991
+ "storage.folder.deleted": "Folder Deleted"
11962
11992
  },
11963
11993
  default: "Select an event"
11964
11994
  }
@@ -12256,8 +12286,13 @@ const ife = (e = c6, t) => {
12256
12286
  bolticStorageActivity: {
12257
12287
  integration: {
12258
12288
  event: {
12259
- create_folder: "Make a folder",
12260
- upload_file: "Upload file"
12289
+ upload_file: "Upload file",
12290
+ download_file: "Download file",
12291
+ create_folder: "Create folder",
12292
+ list_files: "List files and folders",
12293
+ make_file_public: "Make files public",
12294
+ make_file_private: "Make files private",
12295
+ delete_file: "Delete files or folders"
12261
12296
  },
12262
12297
  default: "Select an event"
12263
12298
  }
@@ -97437,8 +97472,16 @@ const Z$ = 40, B9e = 400, j9e = re.forwardRef(
97437
97472
  ] })
97438
97473
  ] });
97439
97474
  }), J$ = {
97440
- Folder: [{ name: "Created", value: "storage.folder.created" }],
97441
- File: [{ name: "Uploaded", value: "storage.file.uploaded" }]
97475
+ Folder: [
97476
+ { name: "Created", value: "storage.folder.created" },
97477
+ { name: "Deleted", value: "storage.folder.deleted" }
97478
+ ],
97479
+ File: [
97480
+ { name: "Uploaded", value: "storage.file.uploaded" },
97481
+ { name: "Deleted", value: "storage.file.deleted" },
97482
+ { name: "Made Public", value: "storage.file.public" },
97483
+ { name: "Made Private", value: "storage.file.private" }
97484
+ ]
97442
97485
  }, X9e = Ur((e, t) => {
97443
97486
  const { viewOnly: r = !1 } = e, { setValue: n } = nn(), { control: i } = nn(), o = {
97444
97487
  "storage.file.uploaded": "Workflow will be triggered when a new file is uploaded to the boltic storage.",
@@ -97493,25 +97536,41 @@ const Z$ = 40, B9e = 400, j9e = re.forwardRef(
97493
97536
  file_name: "",
97494
97537
  folder_path: "",
97495
97538
  overwrite: !1,
97496
- is_public: !1
97497
- }, { id: c, isLoop: u = !1, viewOnly: d = !1, type: p } = e, h = (g) => (m) => {
97539
+ is_public: !1,
97540
+ is_public_permanent: !1
97541
+ }, c = {
97542
+ file_paths: "",
97543
+ ttl_seconds: ""
97544
+ }, u = {
97545
+ file_path: ""
97546
+ }, d = {
97547
+ folder_path: "",
97548
+ page_size: "",
97549
+ next_page_token: ""
97550
+ }, { id: p, isLoop: h = !1, viewOnly: A = !1, type: g } = e, m = (O) => (y) => {
97498
97551
  if (s?.event === "upload_file") {
97499
- if (g === "file_name") {
97500
- if (m?.trim() === "")
97552
+ if (O === "file_name") {
97553
+ if (y?.trim() === "")
97501
97554
  return "File name is required";
97502
- if (m?.trim()?.includes("/"))
97555
+ if (y?.trim()?.includes("/"))
97503
97556
  return "'/' is not allowed in file name.";
97504
97557
  }
97505
- return g === "file_content" && m?.trim() === "" ? "File content is required" : g === "expire_in" && (m < 1 || m > 10080) ? "Expiry values between 1 to 10080 are accepted." : !0;
97506
- } else if (s?.event === "create_folder") {
97507
- if (m?.trim() === "")
97508
- return "Folder name can not be empty";
97509
- const E = /^[A-Za-z0-9 _-]*$/, O = /{{[^{}]+}}/g, y = m.replace(O, "");
97510
- if (!qfe(m) && !E.test(y))
97511
- return "Folder name should not contain special characters [!@#$%^&*()+{}[]:;<>,.?~/].";
97558
+ return O === "file_content" && y?.trim() === "" ? "File content is required" : O === "expire_in" && (y < 1 || y > 10080) ? "Expiry values between 1 to 10080 are accepted." : !0;
97559
+ } else {
97560
+ if (["delete_file", "make_file_public", "make_file_private"].includes(s?.event))
97561
+ return O === "file_paths" && y?.trim() === "" ? "File path is required" : !0;
97562
+ if (s?.event === "download_file")
97563
+ return O === "file_path" && y?.trim() === "" ? "File path is required" : !0;
97564
+ if (s?.event === "create_folder") {
97565
+ if (y?.trim() === "")
97566
+ return "Folder name can not be empty";
97567
+ const v = /^[A-Za-z0-9 _-]*$/, b = /{{[^{}]+}}/g, S = y.replace(b, "");
97568
+ if (!qfe(y) && !v.test(S))
97569
+ return "Folder name should not contain special characters [!@#$%^&*()+{}[]:;<>,.?~/].";
97570
+ }
97512
97571
  }
97513
97572
  return !0;
97514
- }, A = () => ({
97573
+ }, E = () => ({
97515
97574
  create_folder: [
97516
97575
  {
97517
97576
  required: !0,
@@ -97557,6 +97616,13 @@ const Z$ = 40, B9e = 400, j9e = re.forwardRef(
97557
97616
  fieldName: "is_public",
97558
97617
  placeholder: ""
97559
97618
  },
97619
+ {
97620
+ required: !1,
97621
+ type: "checkbox",
97622
+ label: "Make file public",
97623
+ fieldName: "is_public_permanent",
97624
+ placeholder: ""
97625
+ },
97560
97626
  {
97561
97627
  required: !1,
97562
97628
  type: "number",
@@ -97565,67 +97631,136 @@ const Z$ = 40, B9e = 400, j9e = re.forwardRef(
97565
97631
  placeholder: "Enter minute(s)",
97566
97632
  helperText: "Default is 60min"
97567
97633
  }
97634
+ ],
97635
+ download_file: [
97636
+ {
97637
+ required: !0,
97638
+ type: "text",
97639
+ label: "File Path",
97640
+ fieldName: "file_path",
97641
+ placeholder: "folder/file.csv",
97642
+ description: "Path of the file to download. The workflow output returns Base64 file content."
97643
+ }
97644
+ ],
97645
+ delete_file: [
97646
+ {
97647
+ required: !0,
97648
+ type: "text",
97649
+ label: "File Path(s)",
97650
+ fieldName: "file_paths",
97651
+ placeholder: "file.csv or folder/file.csv"
97652
+ }
97653
+ ],
97654
+ make_file_public: [
97655
+ {
97656
+ required: !0,
97657
+ type: "text",
97658
+ label: "File Path(s)",
97659
+ fieldName: "file_paths",
97660
+ placeholder: "file.csv or folder/file.csv"
97661
+ },
97662
+ {
97663
+ required: !1,
97664
+ type: "number",
97665
+ label: "Cache TTL seconds",
97666
+ fieldName: "ttl_seconds",
97667
+ placeholder: "300"
97668
+ }
97669
+ ],
97670
+ make_file_private: [
97671
+ {
97672
+ required: !0,
97673
+ type: "text",
97674
+ label: "File Path(s)",
97675
+ fieldName: "file_paths",
97676
+ placeholder: "file.csv or folder/file.csv"
97677
+ }
97678
+ ],
97679
+ list_files: [
97680
+ {
97681
+ required: !1,
97682
+ type: "text",
97683
+ label: "Folder Path or File Prefix",
97684
+ fieldName: "folder_path",
97685
+ placeholder: "reports/ or report.csv",
97686
+ description: "Use a trailing slash to list a folder (for example, reports/). Enter a file name or prefix to search files. Leave blank for root."
97687
+ },
97688
+ {
97689
+ required: !1,
97690
+ type: "number",
97691
+ label: "Page Size",
97692
+ fieldName: "page_size",
97693
+ placeholder: "100"
97694
+ },
97695
+ {
97696
+ required: !1,
97697
+ type: "text",
97698
+ label: "Next Page Token",
97699
+ fieldName: "next_page_token",
97700
+ placeholder: "{{listFiles1.files.next_page_token}}",
97701
+ description: "Leave blank for the first page. To fetch the next page, pass next_page_token from the previous List Files/Folders result."
97702
+ }
97568
97703
  ]
97569
- }[s.event] || []).map(({ label: E, fieldName: O, type: y, required: v, placeholder: b }) => {
97570
- if (y === "text")
97704
+ }[s.event] || []).map(({ label: v, fieldName: b, type: S, required: x, placeholder: C, description: w }) => {
97705
+ if (S === "text")
97571
97706
  return /* @__PURE__ */ f.jsx(
97572
97707
  on,
97573
97708
  {
97574
- name: `properties.${s.event}.${O}`,
97709
+ name: `properties.${s.event}.${b}`,
97575
97710
  control: i,
97576
97711
  meta: {
97577
- displayName: E,
97578
- description: Hn(p, O),
97579
- placeholder: b
97712
+ displayName: v,
97713
+ description: w || Hn(g, b),
97714
+ placeholder: C
97580
97715
  },
97581
97716
  validationRules: {
97582
- validate: h(O)
97717
+ validate: m(b)
97583
97718
  },
97584
- editorId: `${y}-bs-activity-${O}`,
97585
- id: c,
97586
- required: v,
97587
- isLoop: u,
97588
- viewOnly: d,
97719
+ editorId: `${S}-bs-activity-${b}`,
97720
+ id: p,
97721
+ required: x,
97722
+ isLoop: h,
97723
+ viewOnly: A,
97589
97724
  showSuggestions: !0
97590
97725
  },
97591
- O
97726
+ b
97592
97727
  );
97593
- if (y == "number" && s?.upload_file?.is_public)
97728
+ if (S == "number" && (s?.event !== "upload_file" || s?.upload_file?.is_public))
97594
97729
  return /* @__PURE__ */ f.jsx(
97595
97730
  on,
97596
97731
  {
97597
- name: `properties.${s.event}.${O}`,
97732
+ name: `properties.${s.event}.${b}`,
97598
97733
  control: i,
97599
97734
  meta: {
97600
- displayName: E,
97601
- description: Hn(p, O),
97602
- placeholder: b
97735
+ displayName: v,
97736
+ description: Hn(g, b),
97737
+ placeholder: C
97603
97738
  },
97604
97739
  validationRules: {
97605
- validate: h(O)
97740
+ validate: m(b)
97606
97741
  },
97607
- editorId: `${y}-bs-activity-${O}`,
97608
- id: c,
97742
+ editorId: `${S}-bs-activity-${b}`,
97743
+ id: p,
97609
97744
  fieldType: "number",
97610
- required: v,
97611
- isLoop: u,
97612
- viewOnly: d,
97745
+ required: x,
97746
+ isLoop: h,
97747
+ viewOnly: A,
97613
97748
  showSuggestions: !0
97614
97749
  },
97615
- O
97750
+ b
97616
97751
  );
97617
- if (y === "checkbox")
97752
+ if (S === "checkbox")
97618
97753
  return /* @__PURE__ */ f.jsx(Be, { sx: { width: "100%" }, children: /* @__PURE__ */ f.jsx(
97619
97754
  Rr,
97620
97755
  {
97621
- name: `properties.upload_file.${O}`,
97756
+ name: `properties.upload_file.${b}`,
97622
97757
  control: i,
97623
97758
  rules: {
97624
- validate: h(O)
97759
+ validate: m(b)
97625
97760
  },
97626
97761
  render: ({
97627
- field: { value: S, ...x },
97628
- fieldState: { error: C }
97762
+ field: { value: _, ...I },
97763
+ fieldState: { error: N }
97629
97764
  }) => /* @__PURE__ */ f.jsxs(FG, { children: [
97630
97765
  /* @__PURE__ */ f.jsx(
97631
97766
  ts,
@@ -97633,7 +97768,7 @@ const Z$ = 40, B9e = 400, j9e = re.forwardRef(
97633
97768
  control: /* @__PURE__ */ f.jsx(
97634
97769
  za,
97635
97770
  {
97636
- ...x,
97771
+ ...I,
97637
97772
  icon: /* @__PURE__ */ f.jsx(
97638
97773
  Qe,
97639
97774
  {
@@ -97651,20 +97786,20 @@ const Z$ = 40, B9e = 400, j9e = re.forwardRef(
97651
97786
  sx: {
97652
97787
  p: 0,
97653
97788
  "& .MuiSvgIcon-root": {
97654
- fontSize: (w) => w.typography.xlMedium.fontSize
97789
+ fontSize: (D) => D.typography.xlMedium.fontSize
97655
97790
  }
97656
97791
  },
97657
- readOnly: d,
97658
- checked: S
97792
+ readOnly: A,
97793
+ checked: _
97659
97794
  }
97660
97795
  ),
97661
- label: E
97796
+ label: v
97662
97797
  }
97663
97798
  ),
97664
- C?.message && /* @__PURE__ */ f.jsx(dn, { children: C.message })
97799
+ N?.message && /* @__PURE__ */ f.jsx(dn, { children: N.message })
97665
97800
  ] })
97666
97801
  }
97667
- ) }, O);
97802
+ ) }, b);
97668
97803
  });
97669
97804
  return /* @__PURE__ */ f.jsx(qn, { children: /* @__PURE__ */ f.jsxs(Pe, { container: !0, gap: 1.5, children: [
97670
97805
  /* @__PURE__ */ f.jsx(Pe, { item: !0, xs: 12, children: /* @__PURE__ */ f.jsx(
@@ -97683,28 +97818,40 @@ const Z$ = 40, B9e = 400, j9e = re.forwardRef(
97683
97818
  validationRules: {
97684
97819
  required: "Event is required"
97685
97820
  },
97686
- viewOnly: d,
97821
+ viewOnly: A,
97687
97822
  id: "event",
97688
- handleChange: (g) => {
97689
- const { value: m } = g;
97690
- m == "create_folder" ? n("properties", {
97823
+ handleChange: (O) => {
97824
+ const { value: y } = O;
97825
+ y == "create_folder" ? n("properties", {
97691
97826
  ...s,
97692
97827
  create_folder: a,
97693
- event: m
97694
- }) : n("properties", {
97828
+ event: y
97829
+ }) : y === "upload_file" ? n("properties", {
97695
97830
  ...s,
97696
97831
  upload_file: l,
97697
- event: m
97832
+ event: y
97833
+ }) : y === "download_file" ? n("properties", {
97834
+ ...s,
97835
+ download_file: u,
97836
+ event: y
97837
+ }) : y === "list_files" ? n("properties", {
97838
+ ...s,
97839
+ list_files: d,
97840
+ event: y
97841
+ }) : n("properties", {
97842
+ ...s,
97843
+ [y]: c,
97844
+ event: y
97698
97845
  });
97699
97846
  },
97700
- renderValueUi: (g) => {
97701
- const m = E6.find((E) => E.value === g);
97702
- return m ? m.title : "";
97847
+ renderValueUi: (O) => {
97848
+ const y = E6.find((v) => v.value === O);
97849
+ return y ? y.title : "";
97703
97850
  }
97704
97851
  }
97705
97852
  ) }),
97706
- A(),
97707
- !u && /* @__PURE__ */ f.jsx(Pe, { item: !0, xs: 12, children: /* @__PURE__ */ f.jsx(ro, { viewOnly: d, type: p }) })
97853
+ E(),
97854
+ !h && /* @__PURE__ */ f.jsx(Pe, { item: !0, xs: 12, children: /* @__PURE__ */ f.jsx(ro, { viewOnly: A, type: g }) })
97708
97855
  ] }) });
97709
97856
  }), g3 = ({
97710
97857
  type: e = "",
@@ -179511,7 +179658,7 @@ const WW = 1024 * 2, GW = 768 * 2, $dt = ({ nodes: e, edges: t, open: r, onClose
179511
179658
  isActiveWorkflow: l,
179512
179659
  currentSubscription: c
179513
179660
  }) => {
179514
- const u = Lr(), d = It(), { canvasWorkflow: p, selectedActivityId: h, publishLock: A } = Jt((P) => P.canvas), g = c?.[0], m = c?.metricData?.creation?.remaining, E = c?.metricData?.execution?.remaining, O = g?.status === "EXPIRED", y = g?.status === "CANCELLED", v = m == null || m <= 0, b = E == null || E <= 0, S = O || y || v || b, x = Kt(() => s?.find((P) => P.type === wt.TRIGGER), [s]), C = Kt(() => x ? Xg(x, s) : !1, [x, s]), w = ut(() => {
179661
+ const u = Lr(), d = It(), { canvasWorkflow: p, selectedActivityId: h, publishLock: A } = Jt((P) => P.canvas), g = Array.isArray(c) ? c[0] : c, m = g?.metricData?.creation?.remaining, E = g?.metricData?.execution?.remaining, O = g?.status === "EXPIRED", y = g?.status === "CANCELLED", v = m == null || m <= 0, b = E == null || E <= 0, S = O || y || v || b, x = Kt(() => s?.find((P) => P.type === wt.TRIGGER), [s]), C = Kt(() => x ? Xg(x, s) : !1, [x, s]), w = ut(() => {
179515
179662
  const P = hT(v6(i)), L = hT(
179516
179663
  v6({
179517
179664
  ...p,