@castlabs/ui 7.20.0 → 7.21.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.
@@ -9,6 +9,7 @@ declare module '@castlabs/ui/dist/castlabs-ui.module.js' {
9
9
  export function clModalShow (id: string, value?: any): void
10
10
  export function clModalValue (id: string): any
11
11
  export function clModalIsShown (id?: string): boolean
12
+ export function clModalBack (to: any): boolean
12
13
 
13
14
  export function clPaginate (array: any[], pageNo?: number, pageSize?: number): any[]
14
15
 
@@ -1,4 +1,4 @@
1
- /* @castlabs/ui v7.20.0 */
1
+ /* @castlabs/ui v7.21.0 */
2
2
 
3
3
  /*!
4
4
  * Bootstrap v5.3.8 (https://getbootstrap.com/)
@@ -385,10 +385,10 @@ const SERVICE = {
385
385
  PP_URN_REACTNATIVE: 'urn:janus:service:6efecac3ac04477e9b36d3d14e0ae257',
386
386
  PP_URN_WEBRTC: 'urn:janus:service:250402eb2e2d47118422ba4f2334ee54',
387
387
  VTK: 'Video Toolkit',
388
- VTK_TAGLINE: 'Cloud encoding, packaging, watermarking',
388
+ VTK_TAGLINE: 'Cloud content processing',
389
389
  VTK_URN: 'urn:janus:service:a50e21d6a5e246809b636854abfbd34d',
390
390
  VTKS: 'Video Toolkit Staging',
391
- VTKS_TAGLINE: 'Cloud encoding, packaging, watermarking',
391
+ VTKS_TAGLINE: 'Cloud content processing',
392
392
  VTKS_URN: 'urn:janus:service:ca5bb34e8f39459796778e74fa097248',
393
393
  WM: 'STARDUSTmark',
394
394
  WM_TAGLINE: 'Video & image forensic watermarking',
@@ -728,7 +728,6 @@ function basic (service) {
728
728
  title: service.title,
729
729
  subtitle: service.subtitle,
730
730
  url: '#',
731
- locked: false,
732
731
  disabled: false,
733
732
  badge: undefined
734
733
  }
@@ -738,7 +737,6 @@ function disabled (service) {
738
737
  // sidenav entry in org-unavailable mode
739
738
  return {
740
739
  ...basic(service),
741
- locked: true,
742
740
  disabled: true
743
741
  }
744
742
  }
@@ -764,8 +762,7 @@ function subscribe (service, oid, env) {
764
762
  return {
765
763
  ...basic(service),
766
764
  url: service.urlPlan(env, oid),
767
- badge: 'Subscribe',
768
- locked: true
765
+ badge: 'Subscribe'
769
766
  }
770
767
  }
771
768
 
@@ -774,8 +771,7 @@ function pending (service, oid, env) {
774
771
  return {
775
772
  ...basic(service),
776
773
  url: service.urlPlan(env, oid),
777
- badge: 'Pending',
778
- locked: true
774
+ badge: 'Pending'
779
775
  }
780
776
  }
781
777
 
@@ -1040,6 +1036,23 @@ export function clModalIsShown (modalId) {
1040
1036
  return modal.id === modalId && modal._isShown
1041
1037
  }
1042
1038
 
1039
+ /**
1040
+ * Handle navigation events for modals. Back closes modal.
1041
+ *
1042
+ * @param to Vue's to-route.
1043
+ * @returns True if a modal was closed instead of navigating away.
1044
+ */
1045
+ export function clModalBack (to) {
1046
+ if (clModalIsShown()) {
1047
+ clModalHide()
1048
+ if (to.meta?.ignoreModal) {
1049
+ return false
1050
+ }
1051
+ return true
1052
+ }
1053
+ return false
1054
+ }
1055
+
1043
1056
  // -----------------------------------------------------------------------------
1044
1057
  // --- paginator ---------------------------------------------------------------
1045
1058
  // -----------------------------------------------------------------------------