@tekkare/auriga 0.2.12 → 0.2.14

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.12"
7
+ "version": "0.2.14"
8
8
  }
@@ -116,7 +116,7 @@ export default defineComponent({
116
116
  const hasPercentages = props.withPercentages;
117
117
  const compactMode = props.compactValues;
118
118
  const minValue = ref(0);
119
- const allValues = props.series.map((a) => a.data).flat();
119
+ const allValues = props.series.map((a) => a?.data).flat();
120
120
  if (Math.min(...allValues) > 0) {
121
121
  minValue.value = 0;
122
122
  } else
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="oip_table_card map_card-container" :id="`container_map-${title}`">
3
3
  <div class="p-24">
4
- <div class="oip_row v-center">
4
+ <div class="oip_row v-center oip_subtitle">
5
5
  {{ title ? title : "Your map title" }}
6
6
  <p class="blue">
7
7
  {{ withDynamicTitle && clickedRegion ? ", " + clickedRegion : "" }}
@@ -72,7 +72,7 @@
72
72
  @click="handleBackClick"
73
73
  >
74
74
  <ArgIcon name="CaretLeft" size="16" />
75
- <p>Retour aux régions</p>
75
+ <p>{{ getReturnText }}</p>
76
76
  </div>
77
77
 
78
78
  <svg
@@ -818,7 +818,10 @@ export default defineComponent({
818
818
  lang: {
819
819
  type: String,
820
820
  default: "en",
821
- required: false
821
+ required: false,
822
+ validator: (value) => {
823
+ return ["en", "fr"].includes(value);
824
+ }
822
825
  }
823
826
  },
824
827
  emits: ["openSource"],
@@ -1003,6 +1006,10 @@ export default defineComponent({
1003
1006
  width: 300
1004
1007
  };
1005
1008
  }
1009
+ const getReturnText = computed(() => {
1010
+ const returnText = { en: "Return to regions", fr: "Retour aux re\u0301gions" };
1011
+ return returnText[props.lang];
1012
+ });
1006
1013
  onMounted(() => {
1007
1014
  setupScale();
1008
1015
  setUpDepartementScale();
@@ -1118,7 +1125,8 @@ export default defineComponent({
1118
1125
  componentKey,
1119
1126
  Regions,
1120
1127
  getColor,
1121
- regionsPath
1128
+ regionsPath,
1129
+ getReturnText
1122
1130
  };
1123
1131
  }
1124
1132
  });
@@ -28,6 +28,7 @@ declare const _default: import("vue").DefineComponent<{
28
28
  type: StringConstructor;
29
29
  default: string;
30
30
  required: false;
31
+ validator: (value: string) => boolean;
31
32
  };
32
33
  }, {
33
34
  dptScale: import("vue").Ref<number[]>;
@@ -58,6 +59,7 @@ declare const _default: import("vue").DefineComponent<{
58
59
  Regions: typeof Regions;
59
60
  getColor: (value?: number) => "var(--lightest)" | "#3F1151" | "#432974" | "#404A85" | "#3F668A" | "#43808C" | "#4C9C8A" | "#5FB57E" | "#85CB68" | "#BDDD51" | "#F9E855" | undefined;
60
61
  regionsPath: any;
62
+ getReturnText: import("vue").ComputedRef<any>;
61
63
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "openSource"[], "openSource", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
62
64
  data: {
63
65
  type: PropType<Data[]>;
@@ -82,6 +84,7 @@ declare const _default: import("vue").DefineComponent<{
82
84
  type: StringConstructor;
83
85
  default: string;
84
86
  required: false;
87
+ validator: (value: string) => boolean;
85
88
  };
86
89
  }>> & {
87
90
  onOpenSource?: ((...args: any[]) => any) | undefined;
@@ -86,7 +86,15 @@
86
86
  >
87
87
  <tr
88
88
  :id="`${contIndex}-row`"
89
- :class="isOdd(contIndex) ? 'white_bg' : 'grey_bg'"
89
+ :class="
90
+ !alternateColor
91
+ ? whiteLines.includes(contIndex)
92
+ ? 'white_bg'
93
+ : 'grey_bg'
94
+ : isOdd(contIndex)
95
+ ? 'white_bg'
96
+ : 'grey_bg'
97
+ "
90
98
  >
91
99
  <td
92
100
  v-for="(value, valIndex) in content"
@@ -354,6 +362,10 @@ export default defineComponent({
354
362
  tableId: {
355
363
  type: String,
356
364
  default: "arg"
365
+ },
366
+ whiteLines: {
367
+ type: Array,
368
+ default: null
357
369
  }
358
370
  },
359
371
  emits: ["changeInputValue"],
@@ -376,6 +388,9 @@ export default defineComponent({
376
388
  const toggleCrop = ref(null);
377
389
  const hasReadMore = ref([]);
378
390
  const tableKey = ref(0);
391
+ const alternateColor = computed(() => {
392
+ return props.whiteLines === null ? true : false;
393
+ });
379
394
  watch(
380
395
  () => props.contents,
381
396
  (newContent) => {
@@ -728,7 +743,8 @@ export default defineComponent({
728
743
  toggleCrop,
729
744
  hasReadMore,
730
745
  applyToggleCrop,
731
- tableKey
746
+ tableKey,
747
+ alternateColor
732
748
  };
733
749
  }
734
750
  });
@@ -160,6 +160,10 @@ declare const _default: import("vue").DefineComponent<{
160
160
  type: StringConstructor;
161
161
  default: string;
162
162
  };
163
+ whiteLines: {
164
+ type: ArrayConstructor;
165
+ default: null;
166
+ };
163
167
  }, {
164
168
  sortCol: import("vue").Ref<any>;
165
169
  sortDir: import("vue").Ref<any>;
@@ -203,6 +207,7 @@ declare const _default: import("vue").DefineComponent<{
203
207
  hasReadMore: import("vue").Ref<string[]>;
204
208
  applyToggleCrop: (index: number, value: number) => void;
205
209
  tableKey: import("vue").Ref<number>;
210
+ alternateColor: import("vue").ComputedRef<boolean>;
206
211
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "changeInputValue"[], "changeInputValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
207
212
  heads: {
208
213
  type: {
@@ -365,6 +370,10 @@ declare const _default: import("vue").DefineComponent<{
365
370
  type: StringConstructor;
366
371
  default: string;
367
372
  };
373
+ whiteLines: {
374
+ type: ArrayConstructor;
375
+ default: null;
376
+ };
368
377
  }>> & {
369
378
  onChangeInputValue?: ((...args: any[]) => any) | undefined;
370
379
  }, {
@@ -387,5 +396,6 @@ declare const _default: import("vue").DefineComponent<{
387
396
  maxHeight: string | number;
388
397
  autoCrop: boolean;
389
398
  tableId: string;
399
+ whiteLines: unknown[];
390
400
  }, {}>;
391
401
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekkare/auriga",
3
- "version": "0.2.12",
3
+ "version": "0.2.14",
4
4
  "description": "Aurgia is a UI kit developped by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",