@vc-shell/framework 1.0.154 → 1.0.155

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.
@@ -1 +1 @@
1
- {"version":3,"file":"vc-app-bar.vue.d.ts","sourceRoot":"","sources":["../../../../../../../ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAI/D,MAAM,WAAW,KAAK;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,KAAK;IACpB,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IAC5B,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAChC,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAClC,CAAC,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,GAAG,IAAI,CAAC;CACpD;;;;;;;;;;;;;;;AA2OD,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC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AAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vc-shell/framework",
3
- "version": "1.0.154",
3
+ "version": "1.0.155",
4
4
  "type": "module",
5
5
  "main": "./dist/framework.js",
6
6
  "types": "./dist/index.d.ts",
@@ -53,9 +53,9 @@
53
53
  "whatwg-fetch": "^3.6.19"
54
54
  },
55
55
  "devDependencies": {
56
- "@vc-shell/api-client-generator": "^1.0.154",
57
- "@vc-shell/config-generator": "^1.0.154",
58
- "@vc-shell/ts-config": "^1.0.154",
56
+ "@vc-shell/api-client-generator": "^1.0.155",
57
+ "@vc-shell/config-generator": "^1.0.155",
58
+ "@vc-shell/ts-config": "^1.0.155",
59
59
  "@vitejs/plugin-vue": "^5.0.3",
60
60
  "sass": "^1.69.6",
61
61
  "typescript": "^5.3.3",
@@ -5,7 +5,7 @@
5
5
  >
6
6
  <slot name="app-switcher"></slot>
7
7
 
8
- <template v-if="!$isMobile.value || blades.length === 0">
8
+ <template v-if="!$isMobile.value || quantity === 0">
9
9
  <!-- Logo -->
10
10
  <img
11
11
  class="tw-h-1/2 tw-cursor-pointer tw-mx-3"
@@ -26,15 +26,15 @@
26
26
  <template v-if="$isMobile.value">
27
27
  <!-- Show blades name when at least one blade is opened -->
28
28
  <div
29
- v-if="blades.length === 1"
29
+ v-if="quantity === 1"
30
30
  class="tw-overflow-ellipsis tw-overflow-hidden tw-whitespace-nowrap tw-text-2xl tw-leading-header tw-ml-2"
31
31
  >
32
- {{ toValue(blades[blades.length - 1]?.props?.navigation?.instance)?.title || "" }}
32
+ {{ viewTitle }}
33
33
  </div>
34
34
 
35
35
  <!-- Show back link when more than one blade is opened -->
36
36
  <VcLink
37
- v-else-if="blades.length > 1"
37
+ v-else-if="quantity > 1"
38
38
  class="tw-ml-3"
39
39
  @click="$emit('backlink:click')"
40
40
  >
@@ -70,7 +70,7 @@ import { useI18n } from "vue-i18n";
70
70
  import { VcIcon, VcLink } from "./../../../../";
71
71
  import { IBladeToolbar } from "./../../../../../../core/types";
72
72
  import { useBladeNavigation } from "./../../../../../../shared";
73
- import { toValue } from "vue";
73
+ import { Ref, nextTick, ref, toRef, unref, watch } from "vue";
74
74
 
75
75
  export interface Props {
76
76
  logo?: string;
@@ -92,6 +92,24 @@ defineEmits<Emits>();
92
92
  const { t } = useI18n({ useScope: "global" });
93
93
 
94
94
  const { blades } = useBladeNavigation();
95
+
96
+ let viewTitle: Ref<string>;
97
+ const quantity = ref();
98
+
99
+ watch(
100
+ () => blades,
101
+ async (newVal) => {
102
+ await nextTick().then(() => {
103
+ viewTitle = toRef(
104
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
105
+ unref(newVal.value[newVal.value.length - 1]?.props?.navigation?.instance) as Record<string, any>,
106
+ "title",
107
+ );
108
+ quantity.value = newVal.value.length;
109
+ });
110
+ },
111
+ { deep: true, immediate: true, flush: "post" },
112
+ );
95
113
  </script>
96
114
 
97
115
  <style lang="scss">