@tekkare/auriga 0.1.27 → 0.1.29

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.
Files changed (43) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/allIcons.vue +4 -1
  3. package/dist/runtime/components/argActions.vue +57 -64
  4. package/dist/runtime/components/argActions.vue.d.ts +2 -16
  5. package/dist/runtime/components/argAdvancedSearchBar.vue.d.ts +2 -2
  6. package/dist/runtime/components/argBtn.vue +11 -4
  7. package/dist/runtime/components/argBtn.vue.d.ts +9 -0
  8. package/dist/runtime/components/argChart.vue +31 -3
  9. package/dist/runtime/components/argFileBtn.vue.d.ts +2 -2
  10. package/dist/runtime/components/argFlag.vue.d.ts +1 -1
  11. package/dist/runtime/components/argHomeAllBlocks.vue +201 -0
  12. package/dist/runtime/components/argHomeAllBlocks.vue.d.ts +89 -0
  13. package/dist/runtime/components/argHomeContent.vue +46 -0
  14. package/dist/runtime/components/argHomeContent.vue.d.ts +2 -0
  15. package/dist/runtime/components/argHomeHeader.vue +82 -0
  16. package/dist/runtime/components/argHomeHeader.vue.d.ts +33 -0
  17. package/dist/runtime/components/argHomeKpis.vue +73 -0
  18. package/dist/runtime/components/argHomeKpis.vue.d.ts +38 -0
  19. package/dist/runtime/components/argHomeLayout.vue +38 -0
  20. package/dist/runtime/components/argHomeLayout.vue.d.ts +2 -0
  21. package/dist/runtime/components/argHomeSelectedBlock.vue +94 -0
  22. package/dist/runtime/components/argHomeSelectedBlock.vue.d.ts +14 -0
  23. package/dist/runtime/components/argIcon.vue +2 -0
  24. package/dist/runtime/components/argIcon.vue.d.ts +1 -0
  25. package/dist/runtime/components/argLangSelect.vue +141 -0
  26. package/dist/runtime/components/argLangSelect.vue.d.ts +55 -0
  27. package/dist/runtime/components/argScopeHeader.vue +1 -5
  28. package/dist/runtime/components/argScopeHeader.vue.d.ts +0 -9
  29. package/dist/runtime/components/argScopeLayout.vue +2 -28
  30. package/dist/runtime/components/argScopeLayout.vue.d.ts +1 -13
  31. package/dist/runtime/components/argScopeManage.vue +248 -0
  32. package/dist/runtime/components/argScopeManage.vue.d.ts +32 -0
  33. package/dist/runtime/components/argScopeModal.vue +6 -4
  34. package/dist/runtime/components/argSimpleLabel.vue +8 -0
  35. package/dist/runtime/components/argSimpleLabel.vue.d.ts +1 -1
  36. package/dist/runtime/components/argStyle.vue +60 -20
  37. package/dist/runtime/components/argStyle.vue.d.ts +1 -1
  38. package/dist/runtime/components/argSubMenu.vue +3 -0
  39. package/dist/runtime/components/argTable.vue.d.ts +1 -1
  40. package/dist/runtime/components/argTextBtn.vue +13 -2
  41. package/dist/runtime/components/argTextBtn.vue.d.ts +9 -0
  42. package/dist/runtime/components/argTutoModal.vue +1 -1
  43. package/package.json +1 -1
package/dist/module.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "0.1.27"
7
+ "version": "0.1.29"
8
8
  }
@@ -701,6 +701,7 @@ export default defineComponent({
701
701
  "MinusSquareFill",
702
702
  "MinusSquareDisable",
703
703
  "Minus",
704
+ "Molecule",
704
705
  "Money",
705
706
  "MonitorPlay",
706
707
  "Monitor",
@@ -1098,7 +1099,9 @@ export default defineComponent({
1098
1099
  "YoutubeLogo"
1099
1100
  ];
1100
1101
  const filteredIcon = computed(() => {
1101
- return iconNames.filter((a) => a.includes(searchIcon.value));
1102
+ return iconNames.filter(
1103
+ (a) => a.toLowerCase().includes(searchIcon.value.toLowerCase())
1104
+ );
1102
1105
  });
1103
1106
  return {
1104
1107
  iconNames,
@@ -1,19 +1,40 @@
1
1
  <template>
2
- <div
3
- :class="[
4
- disable ? 'disable' : '',
5
- actionType === 'download' || actionType === 'see-analysis'
6
- ? 'download_action'
7
- : actionType === 'cancel' || actionType === 'close'
8
- ? 'cancel_action'
9
- : actionType === 'scope' || actionType === 'save-analysis'
10
- ? 'scope_action'
11
- : '',
12
- ]"
13
- @click="sendAction()"
14
- >
15
- <p v-if="!customize">{{ getActionText }}</p>
16
- <slot v-else name="custom" />
2
+ <div>
3
+ <div
4
+ v-if="actionType === 'cancel' || actionType === 'close'"
5
+ class="cancel_action"
6
+ @click="sendAction()"
7
+ >
8
+ <slot v-if="customize" name="custom" />
9
+ <span v-else>{{ getActionText }}</span>
10
+ </div>
11
+ <arg-text-btn
12
+ v-else-if="actionType === 'see-analysis'"
13
+ :disable="disable"
14
+ @onClick="sendAction()"
15
+ >
16
+ <slot v-if="customize" name="custom" />
17
+ <span v-else>{{ getActionText }}</span>
18
+ </arg-text-btn>
19
+ <arg-btn
20
+ v-else-if="
21
+ actionType === 'scope' ||
22
+ actionType === 'save-analysis' ||
23
+ actionType === 'download'
24
+ "
25
+ :btn-style="
26
+ disable
27
+ ? 'disable'
28
+ : actionType === 'download'
29
+ ? 'primary-stroke'
30
+ : 'primary-fill'
31
+ "
32
+ :round="actionType === 'save-analysis'"
33
+ @onClick="sendAction()"
34
+ >
35
+ <slot v-if="customize" name="custom" />
36
+ <span v-else>{{ getActionText }}</span>
37
+ </arg-btn>
17
38
  </div>
18
39
  </template>
19
40
 
@@ -22,17 +43,16 @@ import {
22
43
  computed,
23
44
  defineComponent
24
45
  } from "vue";
46
+ import argBtn from "./argBtn.vue";
47
+ import argTextBtn from "./argTextBtn.vue";
25
48
  export default defineComponent({
26
49
  name: "argActions",
50
+ components: { argBtn, argTextBtn },
27
51
  props: {
28
52
  actionType: {
29
53
  type: String,
30
54
  required: true
31
55
  },
32
- customText: {
33
- type: String,
34
- default: null
35
- },
36
56
  customize: {
37
57
  type: Boolean,
38
58
  default: false
@@ -49,61 +69,33 @@ export default defineComponent({
49
69
  }
50
70
  }
51
71
  },
52
- emits: [
53
- "onDownload",
54
- "onScope",
55
- "onCancel",
56
- "onClose",
57
- "onSeeAnalysis",
58
- "onSaveAnalysis"
59
- ],
72
+ emits: ["onAction"],
60
73
  setup(props, { emit }) {
61
74
  const getActionText = computed(() => {
62
- if (!props.customText) {
63
- let finalText = "";
64
- switch (props.actionType) {
65
- case "cancel":
66
- finalText = props.lang === "fr" ? "Annuler" : "Cancel";
67
- break;
68
- case "scope":
69
- finalText = props.lang === "fr" ? "Mon scope" : "My scope";
70
- break;
71
- case "see-analysis":
72
- finalText = props.lang === "fr" ? "Voir l'analyse" : "Go to analysis";
73
- break;
74
- case "save-analysis":
75
- finalText = props.lang === "fr" ? "Sauvegarder et continuer " : "Save and continue";
76
- break;
77
- case "download":
78
- finalText = props.lang === "fr" ? "Tout t\xE9l\xE9charger" : "Download all";
79
- break;
80
- case "close":
81
- finalText = props.lang === "fr" ? "Fermer" : "Close";
82
- }
83
- return finalText;
84
- } else
85
- return props.customText;
86
- });
87
- function sendAction() {
75
+ let finalText = "";
88
76
  switch (props.actionType) {
89
77
  case "cancel":
90
- emit("onCancel");
78
+ finalText = props.lang === "fr" ? "Annuler" : "Cancel";
91
79
  break;
92
80
  case "scope":
93
- emit("onScope");
94
- break;
95
- case "download":
96
- emit("onDownload");
81
+ finalText = props.lang === "fr" ? "Mon scope" : "My scope";
97
82
  break;
98
83
  case "see-analysis":
99
- emit("onSeeAnalysis");
84
+ finalText = props.lang === "fr" ? "Voir l'analyse" : "Go to analysis";
100
85
  break;
101
86
  case "save-analysis":
102
- emit("onSaveAnalysis");
87
+ finalText = props.lang === "fr" ? "Sauvegarder et continuer " : "Save and continue";
88
+ break;
89
+ case "download":
90
+ finalText = props.lang === "fr" ? "Tout t\xE9l\xE9charger" : "Download all";
103
91
  break;
104
92
  case "close":
105
- emit("onClose");
93
+ finalText = props.lang === "fr" ? "Fermer" : "Close";
106
94
  }
95
+ return finalText;
96
+ });
97
+ function sendAction() {
98
+ emit("onAction");
107
99
  }
108
100
  return {
109
101
  getActionText,
@@ -136,6 +128,7 @@ export default defineComponent({
136
128
  font-weight: 400;
137
129
  line-height: 160%;
138
130
  cursor: pointer;
131
+ width: fit-content;
139
132
  }
140
133
 
141
134
  .cancel_action:hover {
@@ -149,16 +142,16 @@ export default defineComponent({
149
142
  justify-content: center;
150
143
  align-items: center;
151
144
  gap: var(--s, 8px);
152
- border-radius: 16px;
145
+ border-radius: 8px;
153
146
  background: var(--primary-primary, #2176ff);
154
147
  font-size: 14px;
155
148
  font-style: normal;
156
149
  font-weight: 700;
157
150
  line-height: normal;
158
151
  color: var(--pure-white);
152
+ box-shadow: 4px 7px 12px 0px rgba(33, 118, 255, 0.2);
159
153
  }
160
-
161
- .scope_action.disable {
154
+ .s .scope_action.disable {
162
155
  background: var(--dividers) !important;
163
156
  color: var(--wild-blue-yonder) !important;
164
157
  }
@@ -3,10 +3,6 @@ declare const _default: import("vue").DefineComponent<{
3
3
  type: StringConstructor;
4
4
  required: true;
5
5
  };
6
- customText: {
7
- type: StringConstructor;
8
- default: null;
9
- };
10
6
  customize: {
11
7
  type: BooleanConstructor;
12
8
  default: boolean;
@@ -23,15 +19,11 @@ declare const _default: import("vue").DefineComponent<{
23
19
  }, {
24
20
  getActionText: import("vue").ComputedRef<string>;
25
21
  sendAction: () => void;
26
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onDownload" | "onScope" | "onCancel" | "onClose" | "onSeeAnalysis" | "onSaveAnalysis")[], "onDownload" | "onScope" | "onCancel" | "onClose" | "onSeeAnalysis" | "onSaveAnalysis", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
22
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "onAction"[], "onAction", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
27
23
  actionType: {
28
24
  type: StringConstructor;
29
25
  required: true;
30
26
  };
31
- customText: {
32
- type: StringConstructor;
33
- default: null;
34
- };
35
27
  customize: {
36
28
  type: BooleanConstructor;
37
29
  default: boolean;
@@ -46,14 +38,8 @@ declare const _default: import("vue").DefineComponent<{
46
38
  validator: (value: string) => boolean;
47
39
  };
48
40
  }>> & {
49
- onOnDownload?: ((...args: any[]) => any) | undefined;
50
- onOnScope?: ((...args: any[]) => any) | undefined;
51
- onOnCancel?: ((...args: any[]) => any) | undefined;
52
- onOnClose?: ((...args: any[]) => any) | undefined;
53
- onOnSeeAnalysis?: ((...args: any[]) => any) | undefined;
54
- onOnSaveAnalysis?: ((...args: any[]) => any) | undefined;
41
+ onOnAction?: ((...args: any[]) => any) | undefined;
55
42
  }, {
56
- customText: string;
57
43
  customize: boolean;
58
44
  disable: boolean;
59
45
  lang: string;
@@ -58,7 +58,7 @@ declare const _default: import("vue").DefineComponent<{
58
58
  iconColor: import("vue").ComputedRef<"var(--primary)" | "var(--wild-blue-yonder)">;
59
59
  hasShortcut: import("vue").ComputedRef<boolean>;
60
60
  infoHeight: import("vue").ComputedRef<boolean>;
61
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onClose" | "update:Value")[], "onClose" | "update:Value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
61
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:Value" | "onClose")[], "update:Value" | "onClose", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
62
62
  placeHolderValue: {
63
63
  type: StringConstructor;
64
64
  default: string;
@@ -81,8 +81,8 @@ declare const _default: import("vue").DefineComponent<{
81
81
  default: () => never[];
82
82
  };
83
83
  }>> & {
84
- onOnClose?: ((...args: any[]) => any) | undefined;
85
84
  "onUpdate:Value"?: ((...args: any[]) => any) | undefined;
85
+ onOnClose?: ((...args: any[]) => any) | undefined;
86
86
  }, {
87
87
  placeHolderValue: string;
88
88
  customShortcuts: any[];
@@ -1,11 +1,14 @@
1
1
  <template>
2
- <div :class="fullWidth ? 'full_width' : ''">
2
+ <div
3
+ :class="[fullWidth ? 'full_width' : 'fit_width', `oip_${btnStyle}_shadow`]"
4
+ >
3
5
  <span
4
6
  v-if="onlyIcon === false"
5
7
  :class="
6
8
  `oip_${btnStyle}_button oip_btn oip_btn_${size} ` +
7
9
  [becomeSmall === true ? 'prmt_button_big ' : ''] +
8
- [fullWidth === true ? 'oip_full_btn' : '']
10
+ [fullWidth === true ? 'oip_full_btn ' : ''] +
11
+ [round === true ? 'oip_round_btn' : '']
9
12
  "
10
13
  @click="send()"
11
14
  >
@@ -64,7 +67,7 @@ export default defineComponent({
64
67
  components: { argIcon },
65
68
  props: {
66
69
  btnStyle: { type: String, default: "primary" },
67
- becomeSmall: { type: Boolean, default: true },
70
+ becomeSmall: { type: Boolean, default: false },
68
71
  icon: { type: String, default: "Spinner" },
69
72
  onlyIcon: { type: Boolean, default: false },
70
73
  prefixIcon: { type: String, default: null },
@@ -77,7 +80,8 @@ export default defineComponent({
77
80
  validator: (value) => {
78
81
  return ["s", "m"].includes(value);
79
82
  }
80
- }
83
+ },
84
+ round: { type: Boolean, default: false }
81
85
  },
82
86
  emits: ["onClick"],
83
87
  setup(props, { emit }) {
@@ -125,4 +129,7 @@ export default defineComponent({
125
129
  .full_width {
126
130
  width: 100%;
127
131
  }
132
+ .fit_width {
133
+ width: fit-content;
134
+ }
128
135
  </style>
@@ -36,6 +36,10 @@ declare const _default: import("vue").DefineComponent<{
36
36
  default: string;
37
37
  validator: (value: string) => boolean;
38
38
  };
39
+ round: {
40
+ type: BooleanConstructor;
41
+ default: boolean;
42
+ };
39
43
  }, {
40
44
  getIconColor: import("vue").ComputedRef<string>;
41
45
  send: () => void;
@@ -77,6 +81,10 @@ declare const _default: import("vue").DefineComponent<{
77
81
  default: string;
78
82
  validator: (value: string) => boolean;
79
83
  };
84
+ round: {
85
+ type: BooleanConstructor;
86
+ default: boolean;
87
+ };
80
88
  }>> & {
81
89
  onOnClick?: ((...args: any[]) => any) | undefined;
82
90
  }, {
@@ -89,5 +97,6 @@ declare const _default: import("vue").DefineComponent<{
89
97
  loading: boolean;
90
98
  fullWidth: boolean;
91
99
  size: string;
100
+ round: boolean;
92
101
  }, {}>;
93
102
  export default _default;
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="prmt_chart" :class="`${type}_arg_chart`">
3
- <h1 class="prmt_chart_title"><slot name="title" /></h1>
4
- <div class="prmt_chart_source"><slot name="source" /></div>
3
+ <!--<h1 class="prmt_chart_title"><slot name="title" /></h1>
4
+ <div class="prmt_chart_source"><slot name="source" /></div>-->
5
5
  <apexchart
6
6
  :type="chartType"
7
7
  :options="chartOptions"
@@ -113,7 +113,35 @@ export default defineComponent({
113
113
  redrawOnParentResize: true,
114
114
  redrawOnWindowResize: true
115
115
  };
116
- props.options["title"] = { align: "center" };
116
+ props.options["title"] = {
117
+ text: "My Chart",
118
+ align: "left",
119
+ margin: 0,
120
+ offsetX: -10,
121
+ offsetY: 0,
122
+ floating: false,
123
+ style: {
124
+ fontSize: "18px",
125
+ fontWeight: "bold",
126
+ fontFamily: "Figtree, sans-serif",
127
+ color: "#263238",
128
+ lineHeight: "21px"
129
+ }
130
+ };
131
+ props.options["subtitle"] = {
132
+ text: "My source",
133
+ align: "left",
134
+ margin: 0,
135
+ offsetX: -10,
136
+ offsetY: 24,
137
+ floating: false,
138
+ style: {
139
+ fontSize: "12px",
140
+ fontWeight: "normal",
141
+ fontFamily: "Figtree, sans-serif",
142
+ color: "#2176ff"
143
+ }
144
+ };
117
145
  if (props.colors) {
118
146
  props.options["colors"] = props.colors;
119
147
  }
@@ -32,7 +32,7 @@ declare const _default: import("vue").DefineComponent<{
32
32
  }>;
33
33
  onPreview: () => void;
34
34
  onDownload: () => void;
35
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onDownload" | "onPreview")[], "onDownload" | "onPreview", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
35
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onPreview" | "onDownload")[], "onPreview" | "onDownload", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
36
36
  fileType: {
37
37
  type: StringConstructor;
38
38
  required: false;
@@ -60,8 +60,8 @@ declare const _default: import("vue").DefineComponent<{
60
60
  default: boolean;
61
61
  };
62
62
  }>> & {
63
- onOnDownload?: ((...args: any[]) => any) | undefined;
64
63
  onOnPreview?: ((...args: any[]) => any) | undefined;
64
+ onOnDownload?: ((...args: any[]) => any) | undefined;
65
65
  }, {
66
66
  download: boolean;
67
67
  preview: boolean;
@@ -251,8 +251,8 @@ declare const _default: import("vue").DefineComponent<{
251
251
  default: boolean;
252
252
  };
253
253
  }>>, {
254
- height: string;
255
254
  round: boolean;
255
+ height: string;
256
256
  emoji: boolean;
257
257
  }, {}>;
258
258
  export default _default;
@@ -0,0 +1,201 @@
1
+ <template>
2
+ <div class="arg_home_all_blocks">
3
+ <div v-if="hasGlobal" class="arg_home_all_blocks">
4
+ <h1 class="arg_home_blocks_title">{{ getGlobalTitle }}</h1>
5
+ <div class="oip_row v-start gap-16 wrap">
6
+ <div
7
+ v-for="(block, index) in globalBlocks"
8
+ :key="index"
9
+ class="oip_card block_card"
10
+ :class="selectedBlock?.title === block.title ? 'block_selected' : ''"
11
+ @click="selectBlock(block)"
12
+ >
13
+ <slot v-if="customizeBlocks" name="custom" v-bind:block="block" />
14
+ <div v-else class="block_content">
15
+ <p class="block_title">{{ block.title }}</p>
16
+ <p class="block_descr">{{ block.description }}</p>
17
+ </div>
18
+ </div>
19
+ </div>
20
+ </div>
21
+ <h1 class="arg_home_blocks_title">{{ getTitle }}</h1>
22
+ <arg-search-input
23
+ v-model:Value="searchBlocks"
24
+ :place-holder-value="getSearchPlaceholder"
25
+ />
26
+ <div class="oip_row v-start gap-16 wrap">
27
+ <div
28
+ v-for="(block, index) in filterBlocks"
29
+ :key="index"
30
+ class="oip_card block_card"
31
+ :class="selectedBlock?.title === block.title ? 'block_selected' : ''"
32
+ @click="selectBlock(block)"
33
+ >
34
+ <slot v-if="customizeBlocks" name="custom" v-bind:block="block" />
35
+ <div v-else class="block_content">
36
+ <p class="block_title">
37
+ <span v-if="block.country"
38
+ ><arg-flag
39
+ :slug="block.country.toLowerCase()"
40
+ height="14" /></span
41
+ >{{ block.title }}
42
+ </p>
43
+ <p class="block_descr">{{ block.description }}</p>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ </div>
48
+ </template>
49
+
50
+ <script>
51
+ import {
52
+ ref,
53
+ computed,
54
+ defineComponent
55
+ } from "vue";
56
+ import argSearchInput from "./argSearchInput.vue";
57
+ import argFlag from "./argFlag.vue";
58
+ export default defineComponent({
59
+ name: "argHomeAllBlocks",
60
+ components: { argSearchInput, argFlag },
61
+ props: {
62
+ title: {
63
+ type: String,
64
+ default: null
65
+ },
66
+ globalTitle: {
67
+ type: String,
68
+ default: null
69
+ },
70
+ searchPlaceholder: {
71
+ type: String,
72
+ default: null
73
+ },
74
+ appBlocks: {
75
+ type: Array,
76
+ required: true
77
+ },
78
+ globalBlocks: {
79
+ type: Array,
80
+ default: () => []
81
+ },
82
+ hasGlobal: {
83
+ type: Boolean,
84
+ default: false
85
+ },
86
+ customizeBlocks: {
87
+ type: Boolean,
88
+ default: false
89
+ },
90
+ lang: {
91
+ type: String,
92
+ default: "en",
93
+ validator: (value) => {
94
+ return ["en", "fr"].includes(value);
95
+ }
96
+ }
97
+ },
98
+ emits: ["onSelectBlock", "update:Block"],
99
+ setup(props, { emit }) {
100
+ const searchBlocks = ref("");
101
+ const selectedBlock = ref(null);
102
+ const getTitle = computed(() => {
103
+ if (props.title !== null) {
104
+ return props.title;
105
+ } else
106
+ return props.hasGlobal ? props.lang === "en" ? "Countries" : "Pays" : props.lang === "en" ? "All themes" : "Tous les th\xE8mes";
107
+ });
108
+ const getGlobalTitle = computed(() => {
109
+ if (props.globalTitle !== null) {
110
+ return props.globalTitle;
111
+ } else
112
+ return props.lang === "en" ? "Global Themes" : "Th\xE8mes Globaux";
113
+ });
114
+ const getSearchPlaceholder = computed(() => {
115
+ if (props.searchPlaceholder !== null) {
116
+ return props.searchPlaceholder;
117
+ } else
118
+ return props.lang === "en" ? "Search here..." : "Recherchez ici...";
119
+ });
120
+ const filterBlocks = computed(() => {
121
+ return props.appBlocks.filter((a) => includesValue(a));
122
+ });
123
+ function includesValue(a) {
124
+ const hasValue = ref(false);
125
+ for (const [key] of Object.entries(a)) {
126
+ const value = a[key];
127
+ if (typeof value === "string" && value.toLowerCase().includes(searchBlocks.value.toLowerCase())) {
128
+ hasValue.value = true;
129
+ }
130
+ }
131
+ return hasValue.value;
132
+ }
133
+ function selectBlock(block) {
134
+ selectedBlock.value = block;
135
+ emit("onSelectBlock", selectedBlock.value);
136
+ emit("update:Block", selectedBlock.value);
137
+ }
138
+ return {
139
+ searchBlocks,
140
+ getTitle,
141
+ getSearchPlaceholder,
142
+ selectedBlock,
143
+ selectBlock,
144
+ filterBlocks,
145
+ getGlobalTitle
146
+ };
147
+ }
148
+ });
149
+ </script>
150
+
151
+ <style scoped>
152
+ .arg_home_all_blocks {
153
+ display: flex;
154
+ flex-direction: column;
155
+ align-items: flex-start;
156
+ gap: 24px;
157
+ }
158
+ .block_card {
159
+ flex: 0 0 calc(50% - 59px);
160
+ margin: 0px !important;
161
+ padding: 24px !important;
162
+ cursor: pointer;
163
+ border: 1.5px solid transparent;
164
+ }
165
+ .block_card:hover {
166
+ border-color: rgba(33, 118, 255, 0.2) !important;
167
+ }
168
+ .block_card:not(.block_selected):hover .block_title {
169
+ color: var(--primary) !important;
170
+ }
171
+ .block_descr {
172
+ display: -webkit-box;
173
+ -webkit-line-clamp: 2;
174
+ -webkit-box-orient: vertical;
175
+ overflow: hidden;
176
+ font-size: 14px;
177
+ font-style: normal;
178
+ font-weight: 400;
179
+ line-height: 160%;
180
+ }
181
+ .block_content {
182
+ display: flex;
183
+ flex-direction: column;
184
+ gap: 12px;
185
+ align-items: flex-start;
186
+ }
187
+ .block_title {
188
+ font-size: 16px;
189
+ font-style: normal;
190
+ font-weight: 700;
191
+ line-height: normal;
192
+ display: flex;
193
+ flex-direction: row;
194
+ align-items: flex-end;
195
+ gap: 8px;
196
+ }
197
+ .block_selected {
198
+ background: var(--primary) !important;
199
+ color: var(--pure-white) !important;
200
+ }
201
+ </style>