@arbetsformedlingen/yrkesvaljaren 2.0.12 → 2.2.0

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 (98) hide show
  1. package/README.md +52 -21
  2. package/dist/cjs/{af-validation-message-Cy89nVEv.js → af-validation-message-BdR9X_qh.js} +1 -1
  3. package/dist/cjs/core-selector.cjs.entry.js +342 -23
  4. package/dist/cjs/digi-service-job-selector.cjs.entry.js +352 -61
  5. package/dist/cjs/{index-hZgOvC17.js → index-DMQDFAL7.js} +0 -22
  6. package/dist/cjs/index.cjs.js +4 -7
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/{esm/fuse-BPnhMTul.js → cjs/types-DdzCbiye.js} +965 -1
  9. package/dist/cjs/yrkesvaljaren.cjs.js +2 -2
  10. package/dist/collection/collection-manifest.json +0 -1
  11. package/dist/collection/components/core-selector/core-selector.css +70 -49
  12. package/dist/collection/components/core-selector/core-selector.js +309 -14
  13. package/dist/collection/components/design-compat/af-icon.js +8 -7
  14. package/dist/collection/components/job-selector/job-selector-controller.js +13 -3
  15. package/dist/collection/components/job-selector/job-selector.css +188 -34
  16. package/dist/collection/components/job-selector/job-selector.js +199 -10
  17. package/dist/components/core-selector2.js +1 -1
  18. package/dist/components/digi-service-job-selector.js +1 -1
  19. package/dist/components/index.js +1 -1
  20. package/dist/components/types.js +1 -1
  21. package/dist/esm/{af-validation-message-BgoGzzBf.js → af-validation-message-DMoOu-0k.js} +1 -1
  22. package/dist/esm/core-selector.entry.js +342 -23
  23. package/dist/esm/digi-service-job-selector.entry.js +310 -19
  24. package/dist/esm/{index-HNd02eQb.js → index-vJ-tamti.js} +1 -22
  25. package/dist/esm/index.js +2 -4
  26. package/dist/esm/loader.js +3 -3
  27. package/dist/{cjs/fuse-BTLNKxuL.js → esm/types-DVos4HHS.js} +948 -2
  28. package/dist/esm/yrkesvaljaren.js +3 -3
  29. package/dist/types/components/core-selector/core-selector.d.ts +68 -0
  30. package/dist/types/components/job-selector/job-selector-controller.d.ts +5 -0
  31. package/dist/types/components/job-selector/job-selector.d.ts +21 -3
  32. package/dist/types/components/job-selector/types.d.ts +12 -0
  33. package/dist/types/components.d.ts +20 -99
  34. package/dist/types/index.d.ts +1 -1
  35. package/dist/vendor/taxonomy-core/af-data-layer.d.ts +16 -0
  36. package/dist/vendor/taxonomy-core/af-data-layer.js +24 -0
  37. package/dist/vendor/taxonomy-core/index.d.ts +1 -1
  38. package/dist/vendor/taxonomy-core/index.js +1 -1
  39. package/dist/vendor/taxonomy-core/pii-sanitizer.d.ts +25 -0
  40. package/dist/vendor/taxonomy-core/pii-sanitizer.js +137 -0
  41. package/dist/vendor/taxonomy-core/selector-navigation.d.ts +9 -1
  42. package/dist/vendor/taxonomy-core/selector-navigation.js +28 -1
  43. package/dist/vendor/taxonomy-core/selector-types.d.ts +12 -0
  44. package/dist/yrkesvaljaren/index.esm.js +1 -1
  45. package/dist/yrkesvaljaren/p-0f19a308.entry.js +1 -0
  46. package/dist/yrkesvaljaren/{p-BUviBbwX.js → p-DHK95AvZ.js} +1 -1
  47. package/dist/yrkesvaljaren/p-DVos4HHS.js +1 -0
  48. package/dist/yrkesvaljaren/p-b81496c8.entry.js +1 -0
  49. package/dist/yrkesvaljaren/p-vJ-tamti.js +3 -0
  50. package/dist/yrkesvaljaren/yrkesvaljaren.esm.js +1 -1
  51. package/package.json +12 -10
  52. package/dist/cjs/geo-valjaren.cjs.entry.js +0 -14910
  53. package/dist/cjs/job-selector-demo.cjs.entry.js +0 -690
  54. package/dist/cjs/neobrutal-search.cjs.entry.js +0 -171
  55. package/dist/cjs/search.engine-D4cpbVzd.js +0 -504
  56. package/dist/cjs/taxonomy-registry-Dzt0SPzT.js +0 -454
  57. package/dist/cjs/types-CtHBl6Ra.js +0 -14
  58. package/dist/collection/components/geovaljaren/geovaljaren.css +0 -21
  59. package/dist/collection/components/geovaljaren/geovaljaren.js +0 -304
  60. package/dist/collection/components/geovaljaren/logic/adapter.utils.js +0 -20
  61. package/dist/collection/components/geovaljaren/logic/data.utils.js +0 -12
  62. package/dist/collection/components/geovaljaren/logic/history-service.js +0 -25
  63. package/dist/collection/components/geovaljaren/logic/search.engine.js +0 -28
  64. package/dist/collection/verkstad/verkstad.js +0 -408
  65. package/dist/components/fuse.js +0 -1
  66. package/dist/components/geo-valjaren.d.ts +0 -11
  67. package/dist/components/geo-valjaren.js +0 -1
  68. package/dist/components/job-selector-demo.d.ts +0 -11
  69. package/dist/components/job-selector-demo.js +0 -1
  70. package/dist/components/job-selector.js +0 -1
  71. package/dist/components/neobrutal-search.d.ts +0 -11
  72. package/dist/components/neobrutal-search.js +0 -1
  73. package/dist/components/search.engine.js +0 -1
  74. package/dist/esm/geo-valjaren.entry.js +0 -14908
  75. package/dist/esm/job-selector-demo.entry.js +0 -688
  76. package/dist/esm/neobrutal-search.entry.js +0 -169
  77. package/dist/esm/search.engine-BaWUTc3r.js +0 -493
  78. package/dist/esm/taxonomy-registry-C-pSh51L.js +0 -449
  79. package/dist/esm/types-DHUftoZJ.js +0 -12
  80. package/dist/types/components/geovaljaren/geovaljaren.d.ts +0 -24
  81. package/dist/types/components/geovaljaren/logic/adapter.utils.d.ts +0 -7
  82. package/dist/types/components/geovaljaren/logic/data.utils.d.ts +0 -7
  83. package/dist/types/components/geovaljaren/logic/history-service.d.ts +0 -6
  84. package/dist/types/components/geovaljaren/logic/search.engine.d.ts +0 -7
  85. package/dist/types/components/job-selector-demo/job-selector-demo.d.ts +0 -65
  86. package/dist/types/components/neobrutal-search/neobrutal-search.d.ts +0 -18
  87. package/dist/types/verkstad/verkstad.d.ts +0 -1
  88. package/dist/types/vitest-globals.d.ts +0 -1
  89. package/dist/yrkesvaljaren/p-5c3a5308.entry.js +0 -1
  90. package/dist/yrkesvaljaren/p-9ecd5177.entry.js +0 -1
  91. package/dist/yrkesvaljaren/p-BPnhMTul.js +0 -1
  92. package/dist/yrkesvaljaren/p-C-pSh51L.js +0 -1
  93. package/dist/yrkesvaljaren/p-CjMoDiZD.js +0 -1
  94. package/dist/yrkesvaljaren/p-DHUftoZJ.js +0 -1
  95. package/dist/yrkesvaljaren/p-HNd02eQb.js +0 -3
  96. package/dist/yrkesvaljaren/p-b6130085.entry.js +0 -1
  97. package/dist/yrkesvaljaren/p-dbbea724.entry.js +0 -1
  98. package/dist/yrkesvaljaren/p-df3fa43b.entry.js +0 -1
@@ -1,449 +0,0 @@
1
- function getDefaultExportFromCjs (x) {
2
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
3
- }
4
-
5
- var loglevel$1 = {exports: {}};
6
-
7
- /*
8
- * loglevel - https://github.com/pimterry/loglevel
9
- *
10
- * Copyright (c) 2013 Tim Perry
11
- * Licensed under the MIT license.
12
- */
13
- var loglevel = loglevel$1.exports;
14
-
15
- var hasRequiredLoglevel;
16
-
17
- function requireLoglevel () {
18
- if (hasRequiredLoglevel) return loglevel$1.exports;
19
- hasRequiredLoglevel = 1;
20
- (function (module) {
21
- (function (root, definition) {
22
- if (module.exports) {
23
- module.exports = definition();
24
- } else {
25
- root.log = definition();
26
- }
27
- }(loglevel, function () {
28
-
29
- // Slightly dubious tricks to cut down minimized file size
30
- var noop = function() {};
31
- var undefinedType = "undefined";
32
- var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (
33
- /Trident\/|MSIE /.test(window.navigator.userAgent)
34
- );
35
-
36
- var logMethods = [
37
- "trace",
38
- "debug",
39
- "info",
40
- "warn",
41
- "error"
42
- ];
43
-
44
- var _loggersByName = {};
45
- var defaultLogger = null;
46
-
47
- // Cross-browser bind equivalent that works at least back to IE6
48
- function bindMethod(obj, methodName) {
49
- var method = obj[methodName];
50
- if (typeof method.bind === 'function') {
51
- return method.bind(obj);
52
- } else {
53
- try {
54
- return Function.prototype.bind.call(method, obj);
55
- } catch (e) {
56
- // Missing bind shim or IE8 + Modernizr, fallback to wrapping
57
- return function() {
58
- return Function.prototype.apply.apply(method, [obj, arguments]);
59
- };
60
- }
61
- }
62
- }
63
-
64
- // Trace() doesn't print the message in IE, so for that case we need to wrap it
65
- function traceForIE() {
66
- if (console.log) {
67
- if (console.log.apply) {
68
- console.log.apply(console, arguments);
69
- } else {
70
- // In old IE, native console methods themselves don't have apply().
71
- Function.prototype.apply.apply(console.log, [console, arguments]);
72
- }
73
- }
74
- if (console.trace) console.trace();
75
- }
76
-
77
- // Build the best logging method possible for this env
78
- // Wherever possible we want to bind, not wrap, to preserve stack traces
79
- function realMethod(methodName) {
80
- if (methodName === 'debug') {
81
- methodName = 'log';
82
- }
83
-
84
- if (typeof console === undefinedType) {
85
- return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives
86
- } else if (methodName === 'trace' && isIE) {
87
- return traceForIE;
88
- } else if (console[methodName] !== undefined) {
89
- return bindMethod(console, methodName);
90
- } else if (console.log !== undefined) {
91
- return bindMethod(console, 'log');
92
- } else {
93
- return noop;
94
- }
95
- }
96
-
97
- // These private functions always need `this` to be set properly
98
-
99
- function replaceLoggingMethods() {
100
- /*jshint validthis:true */
101
- var level = this.getLevel();
102
-
103
- // Replace the actual methods.
104
- for (var i = 0; i < logMethods.length; i++) {
105
- var methodName = logMethods[i];
106
- this[methodName] = (i < level) ?
107
- noop :
108
- this.methodFactory(methodName, level, this.name);
109
- }
110
-
111
- // Define log.log as an alias for log.debug
112
- this.log = this.debug;
113
-
114
- // Return any important warnings.
115
- if (typeof console === undefinedType && level < this.levels.SILENT) {
116
- return "No console available for logging";
117
- }
118
- }
119
-
120
- // In old IE versions, the console isn't present until you first open it.
121
- // We build realMethod() replacements here that regenerate logging methods
122
- function enableLoggingWhenConsoleArrives(methodName) {
123
- return function () {
124
- if (typeof console !== undefinedType) {
125
- replaceLoggingMethods.call(this);
126
- this[methodName].apply(this, arguments);
127
- }
128
- };
129
- }
130
-
131
- // By default, we use closely bound real methods wherever possible, and
132
- // otherwise we wait for a console to appear, and then try again.
133
- function defaultMethodFactory(methodName, _level, _loggerName) {
134
- /*jshint validthis:true */
135
- return realMethod(methodName) ||
136
- enableLoggingWhenConsoleArrives.apply(this, arguments);
137
- }
138
-
139
- function Logger(name, factory) {
140
- // Private instance variables.
141
- var self = this;
142
- /**
143
- * The level inherited from a parent logger (or a global default). We
144
- * cache this here rather than delegating to the parent so that it stays
145
- * in sync with the actual logging methods that we have installed (the
146
- * parent could change levels but we might not have rebuilt the loggers
147
- * in this child yet).
148
- * @type {number}
149
- */
150
- var inheritedLevel;
151
- /**
152
- * The default level for this logger, if any. If set, this overrides
153
- * `inheritedLevel`.
154
- * @type {number|null}
155
- */
156
- var defaultLevel;
157
- /**
158
- * A user-specific level for this logger. If set, this overrides
159
- * `defaultLevel`.
160
- * @type {number|null}
161
- */
162
- var userLevel;
163
-
164
- var storageKey = "loglevel";
165
- if (typeof name === "string") {
166
- storageKey += ":" + name;
167
- } else if (typeof name === "symbol") {
168
- storageKey = undefined;
169
- }
170
-
171
- function persistLevelIfPossible(levelNum) {
172
- var levelName = (logMethods[levelNum] || 'silent').toUpperCase();
173
-
174
- if (typeof window === undefinedType || !storageKey) return;
175
-
176
- // Use localStorage if available
177
- try {
178
- window.localStorage[storageKey] = levelName;
179
- return;
180
- } catch (ignore) {}
181
-
182
- // Use session cookie as fallback
183
- try {
184
- window.document.cookie =
185
- encodeURIComponent(storageKey) + "=" + levelName + ";";
186
- } catch (ignore) {}
187
- }
188
-
189
- function getPersistedLevel() {
190
- var storedLevel;
191
-
192
- if (typeof window === undefinedType || !storageKey) return;
193
-
194
- try {
195
- storedLevel = window.localStorage[storageKey];
196
- } catch (ignore) {}
197
-
198
- // Fallback to cookies if local storage gives us nothing
199
- if (typeof storedLevel === undefinedType) {
200
- try {
201
- var cookie = window.document.cookie;
202
- var cookieName = encodeURIComponent(storageKey);
203
- var location = cookie.indexOf(cookieName + "=");
204
- if (location !== -1) {
205
- storedLevel = /^([^;]+)/.exec(
206
- cookie.slice(location + cookieName.length + 1)
207
- )[1];
208
- }
209
- } catch (ignore) {}
210
- }
211
-
212
- // If the stored level is not valid, treat it as if nothing was stored.
213
- if (self.levels[storedLevel] === undefined) {
214
- storedLevel = undefined;
215
- }
216
-
217
- return storedLevel;
218
- }
219
-
220
- function clearPersistedLevel() {
221
- if (typeof window === undefinedType || !storageKey) return;
222
-
223
- // Use localStorage if available
224
- try {
225
- window.localStorage.removeItem(storageKey);
226
- } catch (ignore) {}
227
-
228
- // Use session cookie as fallback
229
- try {
230
- window.document.cookie =
231
- encodeURIComponent(storageKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
232
- } catch (ignore) {}
233
- }
234
-
235
- function normalizeLevel(input) {
236
- var level = input;
237
- if (typeof level === "string" && self.levels[level.toUpperCase()] !== undefined) {
238
- level = self.levels[level.toUpperCase()];
239
- }
240
- if (typeof level === "number" && level >= 0 && level <= self.levels.SILENT) {
241
- return level;
242
- } else {
243
- throw new TypeError("log.setLevel() called with invalid level: " + input);
244
- }
245
- }
246
-
247
- /*
248
- *
249
- * Public logger API - see https://github.com/pimterry/loglevel for details
250
- *
251
- */
252
-
253
- self.name = name;
254
-
255
- self.levels = { "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3,
256
- "ERROR": 4, "SILENT": 5};
257
-
258
- self.methodFactory = factory || defaultMethodFactory;
259
-
260
- self.getLevel = function () {
261
- if (userLevel != null) {
262
- return userLevel;
263
- } else if (defaultLevel != null) {
264
- return defaultLevel;
265
- } else {
266
- return inheritedLevel;
267
- }
268
- };
269
-
270
- self.setLevel = function (level, persist) {
271
- userLevel = normalizeLevel(level);
272
- if (persist !== false) { // defaults to true
273
- persistLevelIfPossible(userLevel);
274
- }
275
-
276
- // NOTE: in v2, this should call rebuild(), which updates children.
277
- return replaceLoggingMethods.call(self);
278
- };
279
-
280
- self.setDefaultLevel = function (level) {
281
- defaultLevel = normalizeLevel(level);
282
- if (!getPersistedLevel()) {
283
- self.setLevel(level, false);
284
- }
285
- };
286
-
287
- self.resetLevel = function () {
288
- userLevel = null;
289
- clearPersistedLevel();
290
- replaceLoggingMethods.call(self);
291
- };
292
-
293
- self.enableAll = function(persist) {
294
- self.setLevel(self.levels.TRACE, persist);
295
- };
296
-
297
- self.disableAll = function(persist) {
298
- self.setLevel(self.levels.SILENT, persist);
299
- };
300
-
301
- self.rebuild = function () {
302
- if (defaultLogger !== self) {
303
- inheritedLevel = normalizeLevel(defaultLogger.getLevel());
304
- }
305
- replaceLoggingMethods.call(self);
306
-
307
- if (defaultLogger === self) {
308
- for (var childName in _loggersByName) {
309
- _loggersByName[childName].rebuild();
310
- }
311
- }
312
- };
313
-
314
- // Initialize all the internal levels.
315
- inheritedLevel = normalizeLevel(
316
- defaultLogger ? defaultLogger.getLevel() : "WARN"
317
- );
318
- var initialLevel = getPersistedLevel();
319
- if (initialLevel != null) {
320
- userLevel = normalizeLevel(initialLevel);
321
- }
322
- replaceLoggingMethods.call(self);
323
- }
324
-
325
- /*
326
- *
327
- * Top-level API
328
- *
329
- */
330
-
331
- defaultLogger = new Logger();
332
-
333
- defaultLogger.getLogger = function getLogger(name) {
334
- if ((typeof name !== "symbol" && typeof name !== "string") || name === "") {
335
- throw new TypeError("You must supply a name when creating a logger.");
336
- }
337
-
338
- var logger = _loggersByName[name];
339
- if (!logger) {
340
- logger = _loggersByName[name] = new Logger(
341
- name,
342
- defaultLogger.methodFactory
343
- );
344
- }
345
- return logger;
346
- };
347
-
348
- // Grab the current global log variable in case of overwrite
349
- var _log = (typeof window !== undefinedType) ? window.log : undefined;
350
- defaultLogger.noConflict = function() {
351
- if (typeof window !== undefinedType &&
352
- window.log === defaultLogger) {
353
- window.log = _log;
354
- }
355
-
356
- return defaultLogger;
357
- };
358
-
359
- defaultLogger.getLoggers = function getLoggers() {
360
- return _loggersByName;
361
- };
362
-
363
- // ES6 default export, for compatibility
364
- defaultLogger['default'] = defaultLogger;
365
-
366
- return defaultLogger;
367
- }));
368
- } (loglevel$1));
369
- return loglevel$1.exports;
370
- }
371
-
372
- var loglevelExports = requireLoglevel();
373
- var log = /*@__PURE__*/getDefaultExportFromCjs(loglevelExports);
374
-
375
- let registeredTaxonomy = [];
376
- let registeredVersion = null;
377
- function isRecord(value) {
378
- return typeof value === 'object' && value !== null && !Array.isArray(value);
379
- }
380
- function isNonEmptyString(value) {
381
- return typeof value === 'string' && value.trim().length > 0;
382
- }
383
- function isOptionalString(value) {
384
- return value === undefined || typeof value === 'string';
385
- }
386
- function isTaxonomyItem(value) {
387
- if (!isRecord(value))
388
- return false;
389
- return (isNonEmptyString(value.id)
390
- && (value.type === 'job-title' || value.type === 'occupation-name')
391
- && isNonEmptyString(value.preferred_label)
392
- && isOptionalString(value.ssyk_level_4_id)
393
- && isOptionalString(value.ssyk_code_2012)
394
- && isOptionalString(value.occupation_name_id)
395
- && isOptionalString(value.occupation_name_preferred_label)
396
- && (value.weight === undefined || (typeof value.weight === 'number' && Number.isFinite(value.weight)))
397
- && (value.search_aliases === undefined
398
- || (Array.isArray(value.search_aliases) && value.search_aliases.every((alias) => typeof alias === 'string'))));
399
- }
400
- function isTaxonomyRegistration(value) {
401
- if (!isRecord(value) || !Array.isArray(value.data) || value.data.length === 0) {
402
- return false;
403
- }
404
- return value.data.every((item) => isTaxonomyItem(item));
405
- }
406
- function normalizeTaxonomyData(data) {
407
- const seenRelationsByConceptId = new Map();
408
- return data.filter((item) => {
409
- const relationId = item.type === 'job-title'
410
- ? item.occupation_name_id ?? ''
411
- : '';
412
- const seenRelations = seenRelationsByConceptId.get(item.id) ?? new Set();
413
- if (seenRelations.has(relationId))
414
- return false;
415
- seenRelations.add(relationId);
416
- seenRelationsByConceptId.set(item.id, seenRelations);
417
- return true;
418
- });
419
- }
420
- /**
421
- * Registrerar validerad taxonomidata för webbkomponenten.
422
- * Ogiltig data ersätter aldrig en tidigare giltig registrering.
423
- */
424
- function registerTaxonomy(data) {
425
- if (!isTaxonomyRegistration(data)) {
426
- log.error('[TaxonomyRegistry] Felaktigt format på taxonomidata vid registrering.');
427
- return;
428
- }
429
- // Public data can repeat one SSYK 6 job-title Concept ID for distinct
430
- // SSYK 5 occupation-name relations. Keep those relation rows while
431
- // removing exact duplicates. The concept identity remains item.id.
432
- registeredTaxonomy = normalizeTaxonomyData(data.data).map((item) => ({ ...item }));
433
- const metadataVersion = isRecord(data.metadata)
434
- ? data.metadata.labour_market_taxonomy_version
435
- : undefined;
436
- registeredVersion = metadataVersion !== undefined
437
- ? String(metadataVersion)
438
- : (data.taxonomyVersion !== undefined ? String(data.taxonomyVersion) : 'unknown');
439
- log.debug(`[TaxonomyRegistry] Taxonomi version ${registeredVersion} registrerades med ${registeredTaxonomy.length} yrken.`);
440
- }
441
- /** Hämtar den registrerade taxonomin. */
442
- function getRegisteredTaxonomy() {
443
- if (registeredTaxonomy.length === 0) {
444
- log.warn('[TaxonomyRegistry] Ingen taxonomi är registrerad ännu! Anropa registerTaxonomy(data) först.');
445
- }
446
- return registeredTaxonomy;
447
- }
448
-
449
- export { getRegisteredTaxonomy as g, isTaxonomyRegistration as i, log as l, registerTaxonomy as r };
@@ -1,12 +0,0 @@
1
- class InvalidSelectionError extends Error {
2
- code;
3
- invalidIds;
4
- constructor(message, code, invalidIds) {
5
- super(message);
6
- this.name = 'InvalidSelectionError';
7
- this.code = code;
8
- this.invalidIds = invalidIds;
9
- }
10
- }
11
-
12
- export { InvalidSelectionError as I };
@@ -1,24 +0,0 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
2
- import { GenericItem, SelectorState } from '../core-selector/types';
3
- export declare class Geovaljaren {
4
- label: string;
5
- placeholder: string;
6
- selectorState: SelectorState;
7
- selectionEmitter: EventEmitter<GenericItem | null>;
8
- private config;
9
- private engine;
10
- private allGeoItems;
11
- componentWillLoad(): Promise<void>;
12
- private showHistory;
13
- private addToHistory;
14
- private clearHistory;
15
- handleInput(event: CustomEvent<string>): void;
16
- handleFocus(): void;
17
- handleRequestHistory(): void;
18
- handleSelect(event: CustomEvent<GenericItem>): void;
19
- handleBlur(): void;
20
- handleClear(): void;
21
- handleCsClearHistory(): void;
22
- handleEdit(): void;
23
- render(): any;
24
- }
@@ -1,7 +0,0 @@
1
- import { GenericItem } from '../../core-selector/types';
2
- export declare const GeoAdapter: {
3
- /**
4
- * Transforms the pendlingskommuner JSON data structure into GenericItems.
5
- */
6
- toGenericItems: (jsonData: any) => GenericItem[];
7
- };
@@ -1,7 +0,0 @@
1
- import { GenericItem } from '../../core-selector/types';
2
- export declare const GeoDataService: {
3
- /**
4
- * Simulates an async fetch of geo data
5
- */
6
- fetchAll: () => Promise<GenericItem[]>;
7
- };
@@ -1,6 +0,0 @@
1
- import { GenericItem } from '../../core-selector/types';
2
- export declare const GeoHistoryService: {
3
- saveHistory(history: GenericItem[]): void;
4
- loadHistory(): GenericItem[];
5
- clearHistory(): void;
6
- };
@@ -1,7 +0,0 @@
1
- import { GenericItem } from '../../core-selector/types';
2
- export declare class SearchEngine {
3
- private fuse;
4
- constructor(data: GenericItem[]);
5
- search(query: string, maxResults?: number): GenericItem[];
6
- updateIndex(newData: GenericItem[]): void;
7
- }
@@ -1,65 +0,0 @@
1
- export declare class YrkesvaljarenDemo {
2
- el: HTMLElement;
3
- variant: 'single' | 'multi';
4
- version: string;
5
- required: boolean;
6
- allowFreeText: boolean;
7
- history: boolean;
8
- size: 'small' | 'medium' | 'large';
9
- framework: 'html' | 'angular' | 'react';
10
- codeInstallationMode: 'latest' | 'versioned';
11
- afHideHeader: boolean;
12
- afHidePreamble: boolean;
13
- lastSingleSelection: string;
14
- lastMultiSelection: string;
15
- implementationCode: string;
16
- readmeMainContent: string;
17
- readmeCodeContent: any[];
18
- availableYvVersions: string[];
19
- latestYvDataVersion: string;
20
- latestVersion: string;
21
- latestDate: string;
22
- latestType: string;
23
- latestChanges: string;
24
- isTaxonomyLoading: boolean;
25
- private singleBox;
26
- private multiBox;
27
- private latestYvDataUrl;
28
- componentWillLoad(): Promise<void>;
29
- loadDataPackageManifest(): Promise<void>;
30
- getTaxonomyUrls(): string[];
31
- fetchFirstOk(urls: string[]): Promise<Response>;
32
- /** Datapaketet på npmjs: ett paket där major-versionen är taxonomiversionen. */
33
- getExampleDataPackageName(): string;
34
- /** Attribut som skiljer sig från komponentens standardvärden. */
35
- getExampleAttributes(): [string, string][];
36
- refreshTaxonomy(): Promise<void>;
37
- loadChangelog(): Promise<void>;
38
- componentDidLoad(): void;
39
- componentDidUpdate(): void;
40
- triggerHighlight(): void;
41
- handleSelection(event: CustomEvent): void;
42
- loadMarkdown(): Promise<void>;
43
- getCodeParts(versioned: boolean, version: string): {
44
- install: string;
45
- setup: string;
46
- usage: string;
47
- };
48
- getCodeLanguage(): "html" | "typescript";
49
- updateCodeBlock(): void;
50
- handleVariantChange(e: any): void;
51
- handleVersionChange(e: any): Promise<void>;
52
- handleRequiredChange(e: any): void;
53
- handleFreeTextChange(e: any): void;
54
- handleHistoryChange(e: any): void;
55
- handleSizeChange(e: any): void;
56
- handleFrameworkChange(e: any): void;
57
- handleCodeInstallationModeChange(e: any): void;
58
- handleCopyCode(): void;
59
- render(): any;
60
- getCodeTabParts(): {
61
- install: string;
62
- setup: string;
63
- usage: string;
64
- };
65
- }
@@ -1,18 +0,0 @@
1
- import { TaxonomySearchEngine } from '../job-selector/logic/search.engine';
2
- export declare class NeobrutalSearch {
3
- el: HTMLElement;
4
- engine: TaxonomySearchEngine | null;
5
- results: any[];
6
- inputValue: string;
7
- isLoading: boolean;
8
- error: string;
9
- selectedItem: any | null;
10
- isFlipped: boolean;
11
- componentWillLoad(): Promise<void>;
12
- componentDidUpdate(): void;
13
- highlightCode(): void;
14
- handleInput(event: Event): void;
15
- handleSelect(item: any): void;
16
- toggleFlip(): void;
17
- render(): any;
18
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- /// <reference types="vitest/globals" />