@tekkare/auriga 0.1.156 → 0.1.158

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/module.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "0.1.156"
7
+ "version": "0.1.158"
8
8
  }
@@ -18,16 +18,16 @@
18
18
  </div>
19
19
  </div>
20
20
  </div>
21
- <div
22
- v-if="filterBlocks !== null && filterBlocks.length > 0"
23
- class="arg_home_all_blocks"
24
- >
21
+ <div v-if="filterBlocks !== null" class="arg_home_all_blocks">
25
22
  <h1 class="arg_home_blocks_title">{{ getTitle }}</h1>
26
23
  <arg-search-input
27
24
  v-model:Value="searchBlocks"
28
25
  :place-holder-value="getSearchPlaceholder"
29
26
  />
30
- <div class="oip_row v-start gap-16 wrap full_stretch">
27
+ <div
28
+ v-if="filterBlocks.length > 0"
29
+ class="oip_row v-start gap-16 wrap full_stretch"
30
+ >
31
31
  <div
32
32
  v-for="(block, index) in filterBlocks"
33
33
  :key="index"
@@ -37,19 +37,45 @@
37
37
  >
38
38
  <slot v-if="customizeBlocks" name="custom" v-bind:block="block" />
39
39
  <div v-else class="block_content">
40
- <p class="block_title">
41
- <span v-if="block.country"
42
- ><arg-flag v-if="block.iso" :iso="block.iso" height="14" />
43
- <arg-flag
44
- v-else
45
- :slug="block.country.toLowerCase()"
46
- height="14" /></span
47
- >{{ block.title }}
48
- </p>
40
+ <div class="oip_row v-center space-between full_stretch">
41
+ <p class="block_title">
42
+ <span v-if="block.country"
43
+ ><arg-flag v-if="block.iso" :iso="block.iso" height="14" />
44
+ <arg-flag
45
+ v-else
46
+ :slug="block.country.toLowerCase()"
47
+ height="14" /></span
48
+ >{{ block.title }}
49
+ </p>
50
+ <div
51
+ v-if="block.population && block.population !== null"
52
+ class="oip_row v-center gap-8 population"
53
+ >
54
+ <arg-icon name="UsersThree" color="var(--medium)" size="14" />
55
+ <p>
56
+ {{ new Intl.NumberFormat("us-US").format(block.population) }}
57
+ </p>
58
+ </div>
59
+ </div>
49
60
  <p class="block_descr">{{ block.description }}</p>
50
61
  </div>
51
62
  </div>
52
63
  </div>
64
+ <div v-else class="oip_row v-center centered full_stretch">
65
+ <arg-errors
66
+ error-type="result"
67
+ :error-title="
68
+ lang === 'en'
69
+ ? 'No applications found'
70
+ : 'Aucune application trouvée'
71
+ "
72
+ :error-text="
73
+ lang === 'en'
74
+ ? 'No applications were found matching your search. Try changing your search terms or contact us fore more assistance.'
75
+ : `Aucune application n'a été trouvée pour votre recherche. Essayez de modifier notre recherche ou contactez-nous pour plus d'assistance.`
76
+ "
77
+ />
78
+ </div>
53
79
  </div>
54
80
  </div>
55
81
  </template>
@@ -125,7 +151,7 @@ export default defineComponent({
125
151
  return props.lang === "en" ? "Search here..." : "Recherchez ici...";
126
152
  });
127
153
  const filterBlocks = computed(() => {
128
- return props.appBlocks.filter((a) => includesValue(a));
154
+ return props.appBlocks.length > 0 ? props.appBlocks.filter((a) => includesValue(a)) : null;
129
155
  });
130
156
  function includesValue(a) {
131
157
  const hasValue = ref(false);
@@ -156,5 +182,5 @@ export default defineComponent({
156
182
  </script>
157
183
 
158
184
  <style scoped>
159
- .arg_home_all_blocks{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:24px}.block_card{cursor:pointer;flex:0 0 calc(50% - 59px);margin:0!important;padding:24px!important}.block_card:not(.block_selected):hover .block_title{color:var(--primary)!important}.block_descr{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:14px;font-style:normal;font-weight:400;line-height:160%;overflow:hidden}.block_content{align-items:flex-start;display:flex;flex-direction:column;gap:12px}.block_title{align-items:flex-end;display:flex;flex-direction:row;font-size:16px;font-style:normal;font-weight:700;gap:8px;line-height:normal}.block_selected{background:var(--primary)!important;border:1px solid var(--primary)!important;box-shadow:var(--large-shadow)!important;color:var(--white)!important}.full_stretch{align-self:stretch}
185
+ .arg_home_all_blocks{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:24px}.block_card{cursor:pointer;flex:0 0 calc(50% - 59px);margin:0!important;padding:24px!important}.block_card:not(.block_selected):hover .block_title{color:var(--primary)!important}.block_descr{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:14px;font-style:normal;font-weight:400;line-height:160%;overflow:hidden}.block_content{align-items:flex-start;display:flex;flex-direction:column;gap:12px}.block_title{align-items:flex-end;display:flex;flex-direction:row;font-size:16px;font-style:normal;font-weight:700;gap:8px;line-height:normal}.block_selected{background:var(--primary)!important;border:1px solid var(--primary)!important;box-shadow:var(--large-shadow)!important;color:var(--white)!important}.full_stretch{align-self:stretch}.population p{color:var(--medium);font-size:12px;font-weight:400;line-height:14px}
160
186
  </style>
@@ -38,7 +38,7 @@ declare const _default: import("vue").DefineComponent<{
38
38
  getSearchPlaceholder: import("vue").ComputedRef<string>;
39
39
  selectedBlock: import("vue").Ref<any>;
40
40
  selectBlock: (block: any) => void;
41
- filterBlocks: import("vue").ComputedRef<unknown[]>;
41
+ filterBlocks: import("vue").ComputedRef<unknown[] | null>;
42
42
  getGlobalTitle: import("vue").ComputedRef<string>;
43
43
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onSelectBlock" | "update:Block")[], "onSelectBlock" | "update:Block", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
44
44
  title: {
@@ -121,5 +121,5 @@ export default defineComponent({
121
121
  </script>
122
122
 
123
123
  <style scoped>
124
- .justify-between{justify-content:space-between}.width-100{width:100%}.language_container{border:none;border-radius:4px;cursor:pointer;display:flex;flex-direction:column;padding:8px;position:relative;transition:background-color .3s linear,overflow .3s linear;z-index:99}.language_container.in-sidebar.open{border-bottom-right-radius:0!important;border-top-right-radius:0!important}.language_container.close{background-color:transparent;max-height:42px;overflow:hidden}.language_container.open{overflow:visible}.language_container.open,.language_container.open.in-sidebar:hover,.language_container:not(.in-sidebar):hover{background:#fdfdff}.language_container.open{box-shadow:5px 5px 5px rgba(62,63,94,.06)}.language_container.in-sidebar:hover{background:var(--light)}.language_container:hover svg{color:var(--primary)!important}.lang_choice_container{background-color:#fdfdff;border-top:none!important;border:none;border-radius:4px;box-shadow:5px 5px 5px rgba(62,63,94,.06);display:flex;flex-direction:column;gap:4px;padding:8px 16px;position:absolute;transition:max-height .3s linear,max-width .3s linear,opacity .3s ease}.lang_choice_container.is_one{border-bottom-left-radius:0!important;border-top-left-radius:0!important}.lang_choice_container.in-sidebar{left:100%;top:50%;transform:translateY(-49%)}.lang_choice_container:not(.in-sidebar){border-top-left-radius:0!important;border-top-right-radius:0!important;left:0;right:0;top:32px}.lang_choice_container.in-sidebar.open{max-width:1000px;opacity:1}.lang_choice_container.in-sidebar.close{max-width:0;opacity:0}.lang_choice_container.open:not(.in-sidebar){max-height:100px;opacity:1}.lang_choice_container.close:not(.in-sidebar){max-height:0;opacity:0}.active_lang .lang_choice_container{border-top:none!important}.lang_choice:hover{color:var(--primary)!important}.lang_choice_icon{flex-shrink:0;transition:transform .3s}.icon-rotate{transform:rotate(-180deg)}p{font-size:14px;font-style:normal;font-weight:400;line-height:160%;white-space:nowrap}.lang-choice:hover p{color:var(--primary)!important}
124
+ .justify-between{justify-content:space-between}.width-100{width:100%}.language_container{border:none;border-radius:4px;cursor:pointer;display:flex;flex-direction:column;padding:8px;position:relative;transition:background-color .3s linear,overflow .3s linear;z-index:99}.language_container.in-sidebar.open{border-bottom-right-radius:0!important;border-top-right-radius:0!important}.language_container.close{background-color:transparent;max-height:42px;overflow:hidden}.language_container.open{overflow:visible}.language_container.open,.language_container.open.in-sidebar:hover,.language_container:not(.in-sidebar):hover{background:#fdfdff}.language_container.open{box-shadow:5px 5px 5px rgba(62,63,94,.06)}.language_container.in-sidebar:hover{background:var(--light)}.language_container:hover svg{color:var(--primary)!important}.lang_choice_container{background-color:#fdfdff;border-top:none!important;border:none;border-radius:4px;box-shadow:5px 5px 5px rgba(62,63,94,.06);display:flex;flex-direction:column;gap:4px;padding:8px 16px;position:absolute;transition:max-height .3s linear,max-width .3s linear,opacity .3s ease}.lang_choice_container.is_one{border-bottom-left-radius:0!important;border-top-left-radius:0!important}.lang_choice_container.in-sidebar{left:100%;top:50%;transform:translateY(-49%)}.lang_choice_container:not(.in-sidebar){border-top-left-radius:0!important;border-top-right-radius:0!important;left:0;padding:8px!important;right:0;top:32px}.lang_choice_container.in-sidebar.open{max-width:1000px;opacity:1}.lang_choice_container.in-sidebar.close{max-width:0;opacity:0}.lang_choice_container.open:not(.in-sidebar){max-height:100px;opacity:1}.lang_choice_container.close:not(.in-sidebar){max-height:0;opacity:0}.active_lang .lang_choice_container{border-top:none!important}.lang_choice:hover{color:var(--primary)!important}.lang_choice_icon{flex-shrink:0;transition:transform .3s}.icon-rotate{transform:rotate(-180deg)}p{font-size:14px;font-style:normal;font-weight:400;line-height:160%;white-space:nowrap}.lang-choice:hover p{color:var(--primary)!important}
125
125
  </style>
@@ -113,7 +113,10 @@
113
113
  :name="columnTypeNonProps[valIndex]"
114
114
  v-bind:value="value"
115
115
  ></slot>
116
- <div v-else-if="autoCrop === true" class="display_auto_crop">
116
+ <div v-else-if="autoCrop === true">
117
+ <TableCropRow :value="value" />
118
+ </div>
119
+ <!-- <div v-else-if="autoCrop === true" class="display_auto_crop">
117
120
  <p
118
121
  :class="
119
122
  toggleCrop !== null &&
@@ -143,8 +146,8 @@
143
146
  : "Read more"
144
147
  : "Read more"
145
148
  }}
146
- </p>
147
- </div>
149
+ </p>
150
+ </div>-->
148
151
  <p v-else>
149
152
  {{ value }}
150
153
  </p>
@@ -249,6 +252,7 @@ import argSearchInput from "./argSearchInput.vue";
249
252
  import argTooltip from "./argTooltip.vue";
250
253
  import argBtn from "./argBtn.vue";
251
254
  import argSortIcon from "./argSortIcon.vue";
255
+ import TableCropRow from "./TableCropRow.vue";
252
256
  import {
253
257
  onMounted,
254
258
  ref,
@@ -266,7 +270,8 @@ export default defineComponent({
266
270
  argSearchInput,
267
271
  argTooltip,
268
272
  argBtn,
269
- argSortIcon
273
+ argSortIcon,
274
+ TableCropRow
270
275
  },
271
276
  props: {
272
277
  heads: {
@@ -669,21 +674,6 @@ export default defineComponent({
669
674
  showToggle.value = props.toggleDisplay;
670
675
  }
671
676
  onMounted(() => {
672
- setTimeout(() => {
673
- if (props.autoCrop) {
674
- hasReadMore.value = [];
675
- const textCells = document.querySelectorAll(".text_cell");
676
- textCells.forEach((cell) => {
677
- cell.classList.remove("crop_text");
678
- const fullHeight = cell.clientHeight;
679
- cell.classList.add("crop_text");
680
- const originalHeight = cell.clientHeight;
681
- if (fullHeight > originalHeight) {
682
- hasReadMore.value.push(cell.id);
683
- }
684
- });
685
- }
686
- }, 100);
687
677
  });
688
678
  function applyToggleCrop(index, value) {
689
679
  if (toggleCrop.value !== null) {
@@ -0,0 +1,59 @@
1
+ <template>
2
+ <div ref="element" class="oip_list gap-6">
3
+ <p :class="isBig && typeof value === 'string' && !showMore ? 'crop' : ''">
4
+ {{ value }}
5
+ </p>
6
+ <p v-if="showReadMore" class="read_more" @click="toggleShowMore()">
7
+ {{ showMore ? "Show less" : "Show more" }}
8
+ </p>
9
+ </div>
10
+ </template>
11
+
12
+ <script>
13
+ import {
14
+ onMounted,
15
+ ref,
16
+ computed,
17
+ watch,
18
+ defineComponent
19
+ } from "vue";
20
+ export default defineComponent({
21
+ name: "TableCropRow",
22
+ /* components: { argIcon, argStyle }, */
23
+ props: {
24
+ value: { type: String, default: "" }
25
+ },
26
+ setup(props, { emit }) {
27
+ const isBig = ref(false);
28
+ const element = ref(null);
29
+ const height = computed(() => element.value?.offsetHeight);
30
+ const showMore = ref(false);
31
+ const showReadMore = ref(false);
32
+ function toggleShowMore() {
33
+ showMore.value = !showMore.value;
34
+ }
35
+ onMounted(() => {
36
+ if (height.value > 51) {
37
+ isBig.value = true;
38
+ showReadMore.value = true;
39
+ } else
40
+ showReadMore.value = false;
41
+ });
42
+ watch(
43
+ () => height.value,
44
+ () => {
45
+ if (height.value > 51) {
46
+ isBig.value = true;
47
+ showReadMore.value = true;
48
+ } else
49
+ showReadMore.value = false;
50
+ }
51
+ );
52
+ return { isBig, element, showMore, toggleShowMore, showReadMore };
53
+ }
54
+ });
55
+ </script>
56
+
57
+ <style scoped>
58
+ .read_more{color:var(--primary);cursor:pointer;text-decoration:underline}.crop{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
59
+ </style>
@@ -0,0 +1,20 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ value: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ }, {
7
+ isBig: import("vue").Ref<boolean>;
8
+ element: import("vue").Ref<null>;
9
+ showMore: import("vue").Ref<boolean>;
10
+ toggleShowMore: () => void;
11
+ showReadMore: import("vue").Ref<boolean>;
12
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
13
+ value: {
14
+ type: StringConstructor;
15
+ default: string;
16
+ };
17
+ }>>, {
18
+ value: string;
19
+ }, {}>;
20
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekkare/auriga",
3
- "version": "0.1.156",
3
+ "version": "0.1.158",
4
4
  "description": "Aurgia is a UI kit developped by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",