@tekkare/auriga 0.2.168 → 0.2.170

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.168"
7
+ "version": "0.2.170"
8
8
  }
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div v-if="!isLoadingQuery && sourceResults" class="oip_body oip_list gap-12">
3
3
  <ArgSourceCollapse
4
- v-for="(uuid, index) in uuids"
4
+ v-for="(uuid, index) in reorderedUuids"
5
5
  :key="index"
6
6
  :source-country="
7
7
  sourceResults?.find(
@@ -13,6 +13,7 @@
13
13
  :without-country="!showCountry"
14
14
  :source-id="uuid"
15
15
  :source-title="constructTitle(uuid)"
16
+ :default-open="openedSource === uuid"
16
17
  >
17
18
  <div class="oip_list gap-24">
18
19
  <div class="oip_row v-center gap-24">
@@ -43,7 +44,7 @@
43
44
  </template>
44
45
 
45
46
  <script>
46
- import { onMounted, ref, watch, defineComponent } from "vue";
47
+ import { onMounted, ref, watch, defineComponent, computed } from "vue";
47
48
  import ArgSourceCollapse from "./argSourceCollapse.vue";
48
49
  export default defineComponent({
49
50
  name: "argSourcesElastic",
@@ -54,12 +55,27 @@ export default defineComponent({
54
55
  index: { type: String },
55
56
  authKey: { type: String },
56
57
  cluster: { type: String, default: "new" },
57
- showCountry: { type: Boolean, default: true }
58
+ showCountry: { type: Boolean, default: true },
59
+ sourceToOpen: { type: String, default: null }
58
60
  },
59
61
  emits: ["updateSources"],
60
62
  setup(props, { emit }) {
61
63
  const sourceResults = ref(null);
62
64
  const isLoadingQuery = ref(false);
65
+ const openedSource = ref(null);
66
+ onMounted(async () => {
67
+ openedSource.value = props.sourceToOpen;
68
+ });
69
+ const reorderedUuids = computed(() => {
70
+ const uuids = props.uuids?.slice() ?? [];
71
+ if (props.sourceToOpen) {
72
+ return [
73
+ props.sourceToOpen,
74
+ ...uuids.filter((x) => x !== props.sourceToOpen)
75
+ ];
76
+ }
77
+ return uuids;
78
+ });
63
79
  function constructTitle(uuid) {
64
80
  const provider = sourceResults.value.find(
65
81
  (x) => x.provider_uuid === uuid || x?.sources?.some((y) => y?.source_id === uuid)
@@ -83,16 +99,16 @@ export default defineComponent({
83
99
  );
84
100
  const source = provider?.sources?.find((x) => x.source_id === uuid);
85
101
  return {
86
- update: source?.last_download_date ? new Date(source?.last_download_date)?.toLocaleDateString({
102
+ update: source?.last_download_date ? new Date(source?.last_download_date)?.toLocaleDateString("en-GB", {
87
103
  day: "numeric",
88
104
  month: "long",
89
105
  year: "numeric"
90
- }) : provider?.["@timestamp"] ? new Date(provider?.["@timestamp"])?.toLocaleDateString({
106
+ }) : provider?.["@timestamp"] ? new Date(provider?.["@timestamp"])?.toLocaleDateString("en-GB", {
91
107
  day: "numeric",
92
108
  month: "long",
93
109
  year: "numeric"
94
110
  }) : "-",
95
- visit: source?.source_last_visit ? new Date(source?.source_last_visit)?.toLocaleDateString({
111
+ visit: source?.source_last_visit ? new Date(source?.source_last_visit)?.toLocaleDateString("en-GB", {
96
112
  day: "numeric",
97
113
  month: "long",
98
114
  year: "numeric"
@@ -239,7 +255,9 @@ export default defineComponent({
239
255
  constructTitle,
240
256
  getDescriptions,
241
257
  getLastUpdate,
242
- isLoadingQuery
258
+ isLoadingQuery,
259
+ openedSource,
260
+ reorderedUuids
243
261
  };
244
262
  }
245
263
  });
@@ -19,6 +19,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
19
19
  type: BooleanConstructor;
20
20
  default: boolean;
21
21
  };
22
+ sourceToOpen: {
23
+ type: StringConstructor;
24
+ default: null;
25
+ };
22
26
  }>, {
23
27
  sourceResults: import("vue").Ref<null, null>;
24
28
  constructTitle: (uuid: string) => string;
@@ -32,6 +36,190 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
32
36
  frequency: any;
33
37
  };
34
38
  isLoadingQuery: import("vue").Ref<boolean, boolean>;
39
+ openedSource: import("vue").Ref<{
40
+ readonly [x: number]: string;
41
+ toString: () => string;
42
+ charAt: (pos: number) => string;
43
+ charCodeAt: (index: number) => number;
44
+ concat: (...strings: string[]) => string;
45
+ indexOf: (searchString: string, position?: number) => number;
46
+ lastIndexOf: (searchString: string, position?: number) => number;
47
+ localeCompare: {
48
+ (that: string): number;
49
+ (that: string, locales?: string | string[], options?: Intl.CollatorOptions): number;
50
+ (that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number;
51
+ };
52
+ match: {
53
+ (regexp: string | RegExp): RegExpMatchArray | null;
54
+ (matcher: {
55
+ [Symbol.match](string: string): RegExpMatchArray | null;
56
+ }): RegExpMatchArray | null;
57
+ };
58
+ replace: {
59
+ (searchValue: string | RegExp, replaceValue: string): string;
60
+ (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
61
+ (searchValue: {
62
+ [Symbol.replace](string: string, replaceValue: string): string;
63
+ }, replaceValue: string): string;
64
+ (searchValue: {
65
+ [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string;
66
+ }, replacer: (substring: string, ...args: any[]) => string): string;
67
+ };
68
+ search: {
69
+ (regexp: string | RegExp): number;
70
+ (searcher: {
71
+ [Symbol.search](string: string): number;
72
+ }): number;
73
+ };
74
+ slice: (start?: number, end?: number) => string;
75
+ split: {
76
+ (separator: string | RegExp, limit?: number): string[];
77
+ (splitter: {
78
+ [Symbol.split](string: string, limit?: number): string[];
79
+ }, limit?: number): string[];
80
+ };
81
+ substring: (start: number, end?: number) => string;
82
+ toLowerCase: () => string;
83
+ toLocaleLowerCase: {
84
+ (locales?: string | string[]): string;
85
+ (locales?: Intl.LocalesArgument): string;
86
+ };
87
+ toUpperCase: () => string;
88
+ toLocaleUpperCase: {
89
+ (locales?: string | string[]): string;
90
+ (locales?: Intl.LocalesArgument): string;
91
+ };
92
+ trim: () => string;
93
+ readonly length: number;
94
+ substr: (from: number, length?: number) => string;
95
+ valueOf: () => string;
96
+ codePointAt: (pos: number) => number | undefined;
97
+ includes: (searchString: string, position?: number) => boolean;
98
+ endsWith: (searchString: string, endPosition?: number) => boolean;
99
+ normalize: {
100
+ (form: "NFC" | "NFD" | "NFKC" | "NFKD"): string;
101
+ (form?: string): string;
102
+ };
103
+ repeat: (count: number) => string;
104
+ startsWith: (searchString: string, position?: number) => boolean;
105
+ anchor: (name: string) => string;
106
+ big: () => string;
107
+ blink: () => string;
108
+ bold: () => string;
109
+ fixed: () => string;
110
+ fontcolor: (color: string) => string;
111
+ fontsize: {
112
+ (size: number): string;
113
+ (size: string): string;
114
+ };
115
+ italics: () => string;
116
+ link: (url: string) => string;
117
+ small: () => string;
118
+ strike: () => string;
119
+ sub: () => string;
120
+ sup: () => string;
121
+ padStart: (maxLength: number, fillString?: string) => string;
122
+ padEnd: (maxLength: number, fillString?: string) => string;
123
+ trimEnd: () => string;
124
+ trimStart: () => string;
125
+ trimLeft: () => string;
126
+ trimRight: () => string;
127
+ matchAll: (regexp: RegExp) => RegExpStringIterator<RegExpExecArray>;
128
+ [Symbol.iterator]: () => StringIterator<string>;
129
+ at: (index: number) => string | undefined;
130
+ } | null, String | {
131
+ readonly [x: number]: string;
132
+ toString: () => string;
133
+ charAt: (pos: number) => string;
134
+ charCodeAt: (index: number) => number;
135
+ concat: (...strings: string[]) => string;
136
+ indexOf: (searchString: string, position?: number) => number;
137
+ lastIndexOf: (searchString: string, position?: number) => number;
138
+ localeCompare: {
139
+ (that: string): number;
140
+ (that: string, locales?: string | string[], options?: Intl.CollatorOptions): number;
141
+ (that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number;
142
+ };
143
+ match: {
144
+ (regexp: string | RegExp): RegExpMatchArray | null;
145
+ (matcher: {
146
+ [Symbol.match](string: string): RegExpMatchArray | null;
147
+ }): RegExpMatchArray | null;
148
+ };
149
+ replace: {
150
+ (searchValue: string | RegExp, replaceValue: string): string;
151
+ (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
152
+ (searchValue: {
153
+ [Symbol.replace](string: string, replaceValue: string): string;
154
+ }, replaceValue: string): string;
155
+ (searchValue: {
156
+ [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string;
157
+ }, replacer: (substring: string, ...args: any[]) => string): string;
158
+ };
159
+ search: {
160
+ (regexp: string | RegExp): number;
161
+ (searcher: {
162
+ [Symbol.search](string: string): number;
163
+ }): number;
164
+ };
165
+ slice: (start?: number, end?: number) => string;
166
+ split: {
167
+ (separator: string | RegExp, limit?: number): string[];
168
+ (splitter: {
169
+ [Symbol.split](string: string, limit?: number): string[];
170
+ }, limit?: number): string[];
171
+ };
172
+ substring: (start: number, end?: number) => string;
173
+ toLowerCase: () => string;
174
+ toLocaleLowerCase: {
175
+ (locales?: string | string[]): string;
176
+ (locales?: Intl.LocalesArgument): string;
177
+ };
178
+ toUpperCase: () => string;
179
+ toLocaleUpperCase: {
180
+ (locales?: string | string[]): string;
181
+ (locales?: Intl.LocalesArgument): string;
182
+ };
183
+ trim: () => string;
184
+ readonly length: number;
185
+ substr: (from: number, length?: number) => string;
186
+ valueOf: () => string;
187
+ codePointAt: (pos: number) => number | undefined;
188
+ includes: (searchString: string, position?: number) => boolean;
189
+ endsWith: (searchString: string, endPosition?: number) => boolean;
190
+ normalize: {
191
+ (form: "NFC" | "NFD" | "NFKC" | "NFKD"): string;
192
+ (form?: string): string;
193
+ };
194
+ repeat: (count: number) => string;
195
+ startsWith: (searchString: string, position?: number) => boolean;
196
+ anchor: (name: string) => string;
197
+ big: () => string;
198
+ blink: () => string;
199
+ bold: () => string;
200
+ fixed: () => string;
201
+ fontcolor: (color: string) => string;
202
+ fontsize: {
203
+ (size: number): string;
204
+ (size: string): string;
205
+ };
206
+ italics: () => string;
207
+ link: (url: string) => string;
208
+ small: () => string;
209
+ strike: () => string;
210
+ sub: () => string;
211
+ sup: () => string;
212
+ padStart: (maxLength: number, fillString?: string) => string;
213
+ padEnd: (maxLength: number, fillString?: string) => string;
214
+ trimEnd: () => string;
215
+ trimStart: () => string;
216
+ trimLeft: () => string;
217
+ trimRight: () => string;
218
+ matchAll: (regexp: RegExp) => RegExpStringIterator<RegExpExecArray>;
219
+ [Symbol.iterator]: () => StringIterator<string>;
220
+ at: (index: number) => string | undefined;
221
+ } | null>;
222
+ reorderedUuids: import("vue").ComputedRef<unknown[]>;
35
223
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "updateSources"[], "updateSources", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
36
224
  fields: {
37
225
  type: ArrayConstructor;
@@ -53,11 +241,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
53
241
  type: BooleanConstructor;
54
242
  default: boolean;
55
243
  };
244
+ sourceToOpen: {
245
+ type: StringConstructor;
246
+ default: null;
247
+ };
56
248
  }>> & Readonly<{
57
249
  onUpdateSources?: ((...args: any[]) => any) | undefined;
58
250
  }>, {
59
251
  cluster: string;
60
252
  showCountry: boolean;
253
+ sourceToOpen: string;
61
254
  }, {}, {
62
255
  ArgSourceCollapse: any;
63
256
  }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekkare/auriga",
3
- "version": "0.2.168",
3
+ "version": "0.2.170",
4
4
  "description": "Aurgia is a UI kit developped by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",