@tekkare/auriga 0.2.68 → 0.2.70

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.2.68"
7
+ "version": "0.2.70"
8
8
  }
@@ -280,7 +280,8 @@ export default defineComponent({
280
280
  "changeElement",
281
281
  "changeAddInputValue",
282
282
  "update:Selection",
283
- "openInfo"
283
+ "openInfo",
284
+ "onSelectAll"
284
285
  ],
285
286
  setup(props, { emit }) {
286
287
  const add_table = ref([]);
@@ -550,6 +551,7 @@ export default defineComponent({
550
551
  }
551
552
  }
552
553
  function add_all_element() {
554
+ emit("onSelectAll");
553
555
  smart_selection_selected.value = void 0;
554
556
  filterNameAdd.value.forEach((element) => {
555
557
  del_table.value.push(element);
@@ -180,7 +180,7 @@ declare const _default: import("vue").DefineComponent<{
180
180
  getAddText: import("vue").ComputedRef<any>;
181
181
  openInfo: () => void;
182
182
  langData: import("vue").Ref<any>;
183
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("changeElement" | "changeAddInputValue" | "update:Selection" | "openInfo")[], "changeElement" | "changeAddInputValue" | "update:Selection" | "openInfo", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
183
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("changeElement" | "changeAddInputValue" | "update:Selection" | "openInfo" | "onSelectAll")[], "changeElement" | "changeAddInputValue" | "update:Selection" | "openInfo" | "onSelectAll", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
184
184
  element_table: {
185
185
  type: {
186
186
  (arrayLength: number): string[];
@@ -327,6 +327,7 @@ declare const _default: import("vue").DefineComponent<{
327
327
  onChangeAddInputValue?: ((...args: any[]) => any) | undefined;
328
328
  "onUpdate:Selection"?: ((...args: any[]) => any) | undefined;
329
329
  onOpenInfo?: ((...args: any[]) => any) | undefined;
330
+ onOnSelectAll?: ((...args: any[]) => any) | undefined;
330
331
  }, {
331
332
  lang: string;
332
333
  fuzzyThreshold: number;
@@ -5,8 +5,8 @@
5
5
  <thead class="oip_hybrid_chart__header">
6
6
  <tr>
7
7
  <th
8
- class="oip_hybrid_chart__header_elem"
9
8
  v-for="(header, index) in heads"
9
+ class="oip_hybrid_chart__header_elem"
10
10
  :key="index"
11
11
  >
12
12
  {{ header }}
@@ -20,18 +20,18 @@
20
20
  :key="index"
21
21
  class="oip_hybrid_chart__td"
22
22
  >
23
- <div class="oip_hybrid_chart__bar_group" v-if="index === 0">
23
+ <div v-if="index === 0" class="oip_hybrid_chart__bar_group">
24
24
  <div
25
25
  class="oip_hybrid_chart__bar"
26
26
  :style="{
27
27
  background: barColor + '1a',
28
28
  width: `${getPercentage(row.values[1])}%`,
29
29
  }"
30
- ></div>
30
+ />
31
31
  <arg-tooltip
32
32
  :id="`tooltip-${val}`"
33
33
  :disable="isEllipsisActive(val)"
34
- :tooltipText="val"
34
+ :tooltip-text="val"
35
35
  :dir="tableIndex === tableBody.length - 1 ? 'bottom' : 'top'"
36
36
  class="oip_hybrid_chart__bar_content"
37
37
  >
@@ -40,7 +40,7 @@
40
40
  </div>
41
41
  </arg-tooltip>
42
42
  </div>
43
- <div class="oip_hybrid_chart__td_content" v-if="index === 1">
43
+ <div v-if="index === 1" class="oip_hybrid_chart__td_content">
44
44
  <p>
45
45
  {{
46
46
  new Intl.NumberFormat("fr-FR")
@@ -48,13 +48,14 @@
48
48
  .replace(",", ".")
49
49
  }}
50
50
  <span
51
- class="oip_hybrid_chart__bar_percentage"
52
51
  v-if="val.percentage"
53
- >({{ val.percentage }} %)</span
52
+ class="oip_hybrid_chart__bar_percentage"
54
53
  >
54
+ ({{ val.percentage }} %)
55
+ </span>
55
56
  </p>
56
57
  </div>
57
- <div class="oip_hybrid_chart__td_content" v-if="index > 1">
58
+ <div v-if="index > 1" class="oip_hybrid_chart__td_content">
58
59
  {{ val }}
59
60
  </div>
60
61
  </td>
@@ -62,34 +63,33 @@
62
63
  </tbody>
63
64
  </table>
64
65
  </client-only>
65
- <div class="oip_hybrid_chart__footer" v-if="limiter">
66
+ <div
67
+ v-if="limiter && tableBody.length > limiter"
68
+ class="oip_hybrid_chart__footer"
69
+ >
66
70
  <arg-btn
67
- btnStyle="secondary-stroke"
68
- prefixIcon="CornersOut"
69
- @onClick="changeShowState(true)"
70
71
  v-if="!showAll"
71
- >Show all</arg-btn
72
+ btn-style="secondary-stroke"
73
+ prefix-icon="CornersOut"
74
+ @on-click="changeShowState(true)"
72
75
  >
76
+ {{ lang === "fr" ? "Voir plus" : "Show more" }}
77
+ </arg-btn>
73
78
  <arg-btn
74
- btnStyle="secondary-stroke"
75
- prefixIcon="CornersIn"
76
- @onClick="changeShowState(false)"
77
79
  v-if="showAll"
78
- >Show less</arg-btn
80
+ btn-style="secondary-stroke"
81
+ prefix-icon="CornersIn"
82
+ @on-click="changeShowState(false)"
79
83
  >
84
+ {{ lang === "fr" ? "Voir moins" : "Show less" }}
85
+ </arg-btn>
80
86
  </div>
81
87
  </div>
82
88
  </template>
83
89
  <script>
84
90
  import argBtn from "./argBtn.vue";
85
91
  import argTooltip from "./argTooltip.vue";
86
- import {
87
- onMounted,
88
- ref,
89
- computed,
90
- watch,
91
- defineComponent
92
- } from "vue";
92
+ import { onMounted, ref, computed, watch, defineComponent } from "vue";
93
93
  export default defineComponent({
94
94
  name: "argHybridChart",
95
95
  components: { argBtn, argTooltip },
@@ -109,6 +109,13 @@ export default defineComponent({
109
109
  limiter: {
110
110
  type: Number,
111
111
  required: false
112
+ },
113
+ lang: {
114
+ type: String,
115
+ default: "en",
116
+ validator: (value) => {
117
+ return ["en", "fr"].includes(value);
118
+ }
112
119
  }
113
120
  },
114
121
  emits: ["showState"],
@@ -133,14 +140,14 @@ export default defineComponent({
133
140
  });
134
141
  watch(
135
142
  () => props.contents,
136
- (new_contents) => {
143
+ () => {
137
144
  maxValue.value = 0;
138
145
  getMaxValue();
139
146
  }
140
147
  );
141
148
  function isEllipsisActive(value) {
142
- let textValue = document?.getElementById(`text-value-${value}`);
143
- let tooltip = document?.getElementById(`tooltip-${value}`);
149
+ const textValue = document?.getElementById(`text-value-${value}`);
150
+ const tooltip = document?.getElementById(`tooltip-${value}`);
144
151
  if (textValue !== void 0 && textValue !== null && tooltip !== null) {
145
152
  tooltip.style.maxWidth = "12000px";
146
153
  textValue.style.overflow = "initial";
@@ -15,13 +15,18 @@ declare const _default: import("vue").DefineComponent<{
15
15
  type: NumberConstructor;
16
16
  required: false;
17
17
  };
18
+ lang: {
19
+ type: StringConstructor;
20
+ default: string;
21
+ validator: (value: string) => boolean;
22
+ };
18
23
  }, {
19
24
  maxValue: import("vue").Ref<number>;
20
25
  showAll: import("vue").Ref<boolean>;
21
26
  getMaxValue: () => void;
22
27
  changeShowState: (val: boolean) => void;
23
28
  getPercentage: (value: any) => any;
24
- tableBody: import("vue").ComputedRef<never[]>;
29
+ tableBody: any;
25
30
  isEllipsisActive: (value: string) => boolean | undefined;
26
31
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "showState"[], "showState", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
27
32
  heads: {
@@ -40,9 +45,15 @@ declare const _default: import("vue").DefineComponent<{
40
45
  type: NumberConstructor;
41
46
  required: false;
42
47
  };
48
+ lang: {
49
+ type: StringConstructor;
50
+ default: string;
51
+ validator: (value: string) => boolean;
52
+ };
43
53
  }>> & {
44
54
  onShowState?: ((...args: any[]) => any) | undefined;
45
55
  }, {
56
+ lang: string;
46
57
  barColor: string;
47
58
  }, {}>;
48
59
  export default _default;
@@ -176,9 +176,6 @@ export default defineComponent({
176
176
  emit("openSource");
177
177
  }
178
178
  onMounted(() => {
179
- console.log("on Mounted");
180
- console.log("Language: ", props.lang);
181
- console.log("Data: ", props.data);
182
179
  });
183
180
  function setupScale() {
184
181
  minimalValue.value = Math.floor(
@@ -118,14 +118,24 @@
118
118
  />
119
119
  <div v-if="autoCrop === true">
120
120
  <div v-if="columnTypeNonProps[valIndex] !== ''">
121
- <table-row-crop :key="cropKey" :value="value" custom>
121
+ <table-row-crop
122
+ :key="cropKey"
123
+ :value="value"
124
+ :max-lines="cellLines"
125
+ custom
126
+ >
122
127
  <slot
123
128
  :name="columnTypeNonProps[valIndex]"
124
129
  v-bind:value="value"
125
130
  ></slot>
126
131
  </table-row-crop>
127
132
  </div>
128
- <table-row-crop v-else :key="cropKey" :value="value" />
133
+ <table-row-crop
134
+ v-else
135
+ :key="cropKey"
136
+ :value="value"
137
+ :max-lines="cellLines"
138
+ />
129
139
  </div>
130
140
 
131
141
  <slot
@@ -385,6 +395,10 @@ export default defineComponent({
385
395
  type: Array,
386
396
  default: null
387
397
  },
398
+ cellLines: {
399
+ type: Number,
400
+ default: 3
401
+ },
388
402
  lang: {
389
403
  type: String,
390
404
  default: "en",
@@ -164,6 +164,10 @@ declare const _default: import("vue").DefineComponent<{
164
164
  type: ArrayConstructor;
165
165
  default: null;
166
166
  };
167
+ cellLines: {
168
+ type: NumberConstructor;
169
+ default: number;
170
+ };
167
171
  lang: {
168
172
  type: StringConstructor;
169
173
  default: string;
@@ -384,6 +388,10 @@ declare const _default: import("vue").DefineComponent<{
384
388
  type: ArrayConstructor;
385
389
  default: null;
386
390
  };
391
+ cellLines: {
392
+ type: NumberConstructor;
393
+ default: number;
394
+ };
387
395
  lang: {
388
396
  type: StringConstructor;
389
397
  default: string;
@@ -417,6 +425,7 @@ declare const _default: import("vue").DefineComponent<{
417
425
  autoCrop: boolean;
418
426
  tableId: string;
419
427
  whiteLines: unknown[];
428
+ cellLines: number;
420
429
  customPlaceholder: string;
421
430
  }, {}>;
422
431
  export default _default;
@@ -49,9 +49,6 @@ export default defineComponent({
49
49
  emit("mouseleave");
50
50
  }
51
51
  onMounted(() => {
52
- console.log("On mounted de la petite r\xE9gion");
53
- console.log("props.data", props.data);
54
- console.log("title", props.title);
55
52
  });
56
53
  return {
57
54
  regionsPathKr,
@@ -3,6 +3,11 @@
3
3
  <div
4
4
  v-if="custom"
5
5
  :class="custom && isBig && !showMore ? 'fix-height' : ''"
6
+ :style="
7
+ custom && isBig && !showMore
8
+ ? 'max-height: ' + maxLines * 16.6 + 'px'
9
+ : ''
10
+ "
6
11
  >
7
12
  <slot />
8
13
  </div>
@@ -10,6 +15,11 @@
10
15
  <p
11
16
  v-else-if="typeof value === 'string'"
12
17
  :class="isBig && !showMore ? 'crop' : ''"
18
+ :style="
19
+ isBig && !showMore
20
+ ? ` -webkit-line-clamp: ${maxLines}; line-clamp: {maxLines};`
21
+ : ''
22
+ "
13
23
  class="wrap-line"
14
24
  >
15
25
  {{ value }}
@@ -37,7 +47,8 @@ export default defineComponent({
37
47
  /* components: { argIcon, argStyle }, */
38
48
  props: {
39
49
  value: { default: "" },
40
- custom: { type: Boolean, default: false }
50
+ custom: { type: Boolean, default: false },
51
+ maxLines: { type: Number, default: 3 }
41
52
  },
42
53
  setup(props, { emit }) {
43
54
  const isBig = ref(false);
@@ -49,7 +60,7 @@ export default defineComponent({
49
60
  showMore.value = !showMore.value;
50
61
  }
51
62
  onMounted(() => {
52
- if (height.value > 65) {
63
+ if (height.value > props.maxLines * 16.6) {
53
64
  isBig.value = true;
54
65
  showReadMore.value = true;
55
66
  } else
@@ -58,7 +69,7 @@ export default defineComponent({
58
69
  watch(
59
70
  () => height.value,
60
71
  () => {
61
- if (height.value > 65) {
72
+ if (height.value > props.maxLines * 16.6) {
62
73
  isBig.value = true;
63
74
  showReadMore.value = true;
64
75
  } else
@@ -71,5 +82,5 @@ export default defineComponent({
71
82
  </script>
72
83
 
73
84
  <style scoped>
74
- .read_more{color:var(--primary);cursor:pointer;font-style:normal;text-decoration:underline}.read_more:hover{color:var(--primary-hover)}.crop{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.wrap-line{white-space:pre-line}.fix-height{max-height:50px;overflow:hidden}
85
+ .read_more{color:var(--primary);cursor:pointer;font-style:normal;text-decoration:underline}.read_more:hover{color:var(--primary-hover)}.crop{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}.wrap-line{white-space:pre-line}.fix-height{overflow:hidden}
75
86
  </style>
@@ -6,6 +6,10 @@ declare const _default: import("vue").DefineComponent<{
6
6
  type: BooleanConstructor;
7
7
  default: boolean;
8
8
  };
9
+ maxLines: {
10
+ type: NumberConstructor;
11
+ default: number;
12
+ };
9
13
  }, {
10
14
  isBig: import("vue").Ref<boolean>;
11
15
  element: import("vue").Ref<null>;
@@ -20,8 +24,13 @@ declare const _default: import("vue").DefineComponent<{
20
24
  type: BooleanConstructor;
21
25
  default: boolean;
22
26
  };
27
+ maxLines: {
28
+ type: NumberConstructor;
29
+ default: number;
30
+ };
23
31
  }>>, {
24
32
  value: string;
25
33
  custom: boolean;
34
+ maxLines: number;
26
35
  }, {}>;
27
36
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekkare/auriga",
3
- "version": "0.2.68",
3
+ "version": "0.2.70",
4
4
  "description": "Aurgia is a UI kit developped by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",