@fkui/vue-labs 5.36.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 (54) hide show
  1. package/LICENSE.md +7 -0
  2. package/README.md +3 -0
  3. package/dist/cjs/index.cjs.js +276 -0
  4. package/dist/cjs/index.cjs.js.map +1 -0
  5. package/dist/cjs/package.json +3 -0
  6. package/dist/esm/index.esm.js +258 -0
  7. package/dist/esm/index.esm.js.map +1 -0
  8. package/dist/esm/package.json +3 -0
  9. package/dist/style.css +18 -0
  10. package/dist/types/components/XSearchBar/XSearchBar.vue.d.ts +31 -0
  11. package/dist/types/components/XSearchBar/XSearchBar.vue.d.ts.map +1 -0
  12. package/dist/types/components/XSearchBar/index.d.ts +2 -0
  13. package/dist/types/components/XSearchBar/index.d.ts.map +1 -0
  14. package/dist/types/components/XTimeTextField/XTimeTextField.vue.d.ts +164 -0
  15. package/dist/types/components/XTimeTextField/XTimeTextField.vue.d.ts.map +1 -0
  16. package/dist/types/components/XTimeTextField/converters/HoursMinutesConverter.d.ts +5 -0
  17. package/dist/types/components/XTimeTextField/converters/HoursMinutesConverter.d.ts.map +1 -0
  18. package/dist/types/components/XTimeTextField/converters/index.d.ts +2 -0
  19. package/dist/types/components/XTimeTextField/converters/index.d.ts.map +1 -0
  20. package/dist/types/components/XTimeTextField/index.d.ts +5 -0
  21. package/dist/types/components/XTimeTextField/index.d.ts.map +1 -0
  22. package/dist/types/components/XTimeTextField/utils/HoursMinutesNumberUtils.d.ts +39 -0
  23. package/dist/types/components/XTimeTextField/utils/HoursMinutesNumberUtils.d.ts.map +1 -0
  24. package/dist/types/components/XTimeTextField/utils/HoursMinutesValidatorUtils.d.ts +6 -0
  25. package/dist/types/components/XTimeTextField/utils/HoursMinutesValidatorUtils.d.ts.map +1 -0
  26. package/dist/types/components/XTimeTextField/utils/constants.d.ts +3 -0
  27. package/dist/types/components/XTimeTextField/utils/constants.d.ts.map +1 -0
  28. package/dist/types/components/XTimeTextField/utils/index.d.ts +4 -0
  29. package/dist/types/components/XTimeTextField/utils/index.d.ts.map +1 -0
  30. package/dist/types/components/XTimeTextField/validators/GreaterThanTimeValidator.d.ts +3 -0
  31. package/dist/types/components/XTimeTextField/validators/GreaterThanTimeValidator.d.ts.map +1 -0
  32. package/dist/types/components/XTimeTextField/validators/HoursMinutesValidator.d.ts +3 -0
  33. package/dist/types/components/XTimeTextField/validators/HoursMinutesValidator.d.ts.map +1 -0
  34. package/dist/types/components/XTimeTextField/validators/LessThanTimeValidator.d.ts +3 -0
  35. package/dist/types/components/XTimeTextField/validators/LessThanTimeValidator.d.ts.map +1 -0
  36. package/dist/types/components/XTimeTextField/validators/MaxTimeValidator.d.ts +3 -0
  37. package/dist/types/components/XTimeTextField/validators/MaxTimeValidator.d.ts.map +1 -0
  38. package/dist/types/components/XTimeTextField/validators/MinTimeValidator.d.ts +3 -0
  39. package/dist/types/components/XTimeTextField/validators/MinTimeValidator.d.ts.map +1 -0
  40. package/dist/types/components/XTimeTextField/validators/index.d.ts +2 -0
  41. package/dist/types/components/XTimeTextField/validators/index.d.ts.map +1 -0
  42. package/dist/types/components/index.d.ts +3 -0
  43. package/dist/types/components/index.d.ts.map +1 -0
  44. package/dist/types/index.d.ts +2 -0
  45. package/dist/types/index.d.ts.map +1 -0
  46. package/dist/types/local.d.ts +7 -0
  47. package/dist/types/local.d.ts.map +1 -0
  48. package/dist/types/vite-dev/app.vue.d.ts +5 -0
  49. package/dist/types/vite-dev/app.vue.d.ts.map +1 -0
  50. package/package.json +97 -0
  51. package/pageobject/XDummy.pageobject.d.ts +14 -0
  52. package/pageobject/common.d.ts +13 -0
  53. package/pageobject/index.d.ts +2 -0
  54. package/pageobject/trimmedText.d.ts +28 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["HOURS_MINUTES_REGEXP","HOURS_MINUTES_WITHOUT_COLON_REGEXP","findMatch","regexps","value","regexp","match","padInitialZeros","maxLength","_value","padStart","hoursMinutesStringToMinutes","valueString","extraForgiving","isEmpty","trim","hours","minutes","splitHoursMinutes","map","parseInt","totalMinutes","isNaN","minutesToHoursMinutesString","safeValue","NaN","minutesToObject","value2","String","join","stripWhitespace","_a","groups","_b","minutesToUserFriendlyString","Number","TranslationService","provider","translate","minutesToHoursFloat","values","filter","isSet","reduce","sum","Math","floor","formatNumberToTime","parseTimeToNumberUsingConfig","_hoursMinutesStringTo","parsedValue","parseTimeToNumber","forgivingParseTimeToNumber","HoursMinutesValidatorUtils","validate","config","name","compare","limit","parseFunction","getParserFromConfig","limitAsNumber","Error","valueAsNumber","Array","isArray","parser","hoursMinutesValidator","validation","_element","greaterThanTimeValidator","lessThanTimeValidator","maxTimeValidator","minTimeValidator","validators","validator","ValidationService","registerValidator","_sfc_main$1","defineComponent","extends","FTextField","mixins","TranslationMixin","props","formatter","type","Function","required","default","setup","textFieldTableMode","inject","mounted","inputElement","$el","querySelector","id","addValidatorsToElement","length","hoursMinutes","setAttribute","validateElement","_sfc_main","components","FIcon","FSearchTextField","modelValue","emits","computed","get","set","$emit","_hoisted_1","class","_component_f_search_text_field","resolveComponent","openBlock","createBlock","_ctx","_cache","$event","maxlength","withCtx","renderSlot","$slots","tooltip","createElementVNode","createVNode","_component_f_icon","library","createTextVNode","_"],"sources":["../src/components/XTimeTextField/utils/constants.ts","../src/components/XTimeTextField/utils/HoursMinutesNumberUtils.ts","../src/components/XTimeTextField/converters/HoursMinutesConverter.ts","../src/components/XTimeTextField/utils/HoursMinutesValidatorUtils.ts","../src/components/XTimeTextField/validators/HoursMinutesValidator.ts","../src/components/XTimeTextField/validators/GreaterThanTimeValidator.ts","../src/components/XTimeTextField/validators/LessThanTimeValidator.ts","../src/components/XTimeTextField/validators/MaxTimeValidator.ts","../src/components/XTimeTextField/validators/MinTimeValidator.ts","../src/components/XTimeTextField/validators/index.ts","../src/components/XTimeTextField/XTimeTextField.vue","../src/components/XSearchBar/XSearchBar.vue"],"sourcesContent":["export const HOURS_MINUTES_REGEXP =\n /^(?<hours>[0-9]+)?(:(?<minutes>[0-5][0-9]))?$/;\nexport const HOURS_MINUTES_WITHOUT_COLON_REGEXP =\n /^(?<hours>[0-9]{2})(?<minutes>[0-5][0-9])$/;\n","import {\n TranslationService,\n isEmpty,\n isSet,\n stripWhitespace,\n} from \"@fkui/logic\";\nimport { HoursMinutesString } from \"../converters\";\nimport {\n HOURS_MINUTES_REGEXP,\n HOURS_MINUTES_WITHOUT_COLON_REGEXP,\n} from \"./constants\";\n\nfunction findMatch(regexps: RegExp[], value: string): RegExpMatchArray | null {\n for (const regexp of regexps) {\n const match = value.match(regexp);\n\n if (match) {\n return match;\n }\n }\n\n return null;\n}\n\nfunction padInitialZeros(value: string | undefined, maxLength = 2): string {\n value = value ?? \"\";\n return value.padStart(maxLength, \"0\");\n}\n\nexport function hoursMinutesStringToMinutes(\n valueString: string,\n extraForgiving = false,\n): number | undefined {\n if (isEmpty(valueString.trim())) {\n return undefined;\n }\n\n const [hours, minutes] = splitHoursMinutes(valueString, extraForgiving).map(\n (value) => parseInt(value, 10),\n );\n const totalMinutes = hours * 60 + minutes;\n\n return !isNaN(totalMinutes) ? totalMinutes : undefined;\n}\n\nexport function minutesToHoursMinutesString(\n value?: number,\n): HoursMinutesString {\n let valueString = \"\";\n const safeValue = value ?? NaN;\n if (!isNaN(safeValue)) {\n const { hours, minutes } = minutesToObject(safeValue);\n valueString = [hours, minutes]\n .map((value) => String(value).padStart(2, \"0\"))\n .join(\":\");\n }\n\n return stripWhitespace(valueString);\n}\n\nexport function splitHoursMinutes(\n valueString: string,\n extraForgiving = false,\n): string[] {\n const regexps = extraForgiving\n ? [HOURS_MINUTES_WITHOUT_COLON_REGEXP, HOURS_MINUTES_REGEXP]\n : [HOURS_MINUTES_REGEXP];\n const match = findMatch(regexps, stripWhitespace(valueString));\n\n if (!match) {\n return [\"\", \"\"];\n }\n\n const hours = padInitialZeros(match?.groups?.hours);\n const minutes = padInitialZeros(match?.groups?.minutes);\n\n return [hours, minutes];\n}\n\n/**\n * Accepts time as a number and returns a user friendly string (to be used in i.e. review mode)\n * Example:\n * Input: 13.5\n * Output: '13 timmar och 30 minuter'\n */\nexport function minutesToUserFriendlyString(value: number): string {\n const [hours, minutes] = splitHoursMinutes(\n minutesToHoursMinutesString(value),\n ).map(Number);\n\n return TranslationService.provider.translate(\n \"ARBE.RW.generell.etikett.timmarochminuter\",\n \"{{hours}} timmar och {{minutes}} minuter\",\n { hours, minutes },\n );\n}\n\n/**\n * Helper for converting AgeTimeTextField values into hours. For convienence,\n * it is possible to provide multiple values and get their sum. The actual\n * conversion will be performed as a last step, to minimize the amount of rounding\n * errors.\n *\n * Parameters that are undefined or NaN will be ignored and add 0 to the sum.\n *\n * @param values - Values in minutes, to be converted into a value in hours.\n * @returns The sum of all values divided by 60. E.g., `150` becomes `2.5`.\n */\nexport function minutesToHoursFloat(\n ...values: Array<number | undefined>\n): number {\n const minutes = values\n .filter((value): value is number => isSet(value) && !isNaN(value))\n .reduce((sum, value) => sum + value, 0);\n\n return minutes / 60;\n}\n\n/**\n * Helper for converting AgeTimeTextField values into an object. For\n * convenience, it is possible to provide multiple values and get their sum.\n *\n * Parameters that are undefined or NaN will be ignored and add 0 to the sum.\n *\n * @param values - Values in minutes, to be converted into a value into an\n * hour minute object.\n * @returns The sum of all values in an object representation. E.g.,\n * `150` becomes `{ hours: 2, minutes: 30 }`\n */\nexport function minutesToObject(...values: Array<number | undefined>): {\n hours: number;\n minutes: number;\n} {\n const minutes = values\n .filter((value): value is number => isSet(value) && !isNaN(value))\n .reduce((sum, value) => sum + value, 0);\n\n return {\n hours: Math.floor(minutes / 60),\n minutes: minutes % 60,\n };\n}\n","import {\n minutesToHoursMinutesString,\n hoursMinutesStringToMinutes,\n} from \"../utils\";\n\n// A string in the format hh:mm (hours may exceed two digits), e.g., 08:15, 16:00 and 900:12.\nexport type HoursMinutesString = string;\n\nexport function formatNumberToTime(\n value?: number,\n): HoursMinutesString | undefined {\n if (typeof value !== \"number\" || isNaN(value)) {\n return undefined;\n }\n\n return minutesToHoursMinutesString(value);\n}\n\nfunction parseTimeToNumberUsingConfig(\n value: string | null | undefined,\n extraForgiving: boolean,\n): number | undefined {\n if (typeof value !== \"string\") {\n return undefined;\n }\n\n const parsedValue =\n hoursMinutesStringToMinutes(value, extraForgiving) ?? NaN;\n\n return !isNaN(parsedValue) ? parsedValue : undefined;\n}\n\nexport function parseTimeToNumber(value?: string | null): number | undefined {\n return parseTimeToNumberUsingConfig(value, false);\n}\n\nexport function forgivingParseTimeToNumber(\n value?: string | null,\n): number | undefined {\n return parseTimeToNumberUsingConfig(value, true);\n}\n","import { type ValidatorConfig, isSet } from \"@fkui/logic\";\nimport { parseTimeToNumber } from \"../converters\";\n\n/* eslint-disable-next-line @typescript-eslint/no-extraneous-class -- technical\n * debt, should be refactored to vanilla functions */\nexport class HoursMinutesValidatorUtils {\n public static validate(\n value: string,\n config: ValidatorConfig,\n name: string,\n compare: (value: number, limit: number) => boolean,\n ): boolean {\n if (value === \"\") {\n return true;\n }\n\n const limit = config[name];\n if (!isSet(limit)) {\n return false;\n }\n\n const parseFunction =\n HoursMinutesValidatorUtils.getParserFromConfig(config);\n const limitAsNumber = parseFunction(String(config[name]));\n if (!isSet(limitAsNumber)) {\n throw new Error(`config.${name} must be a number`);\n }\n\n const valueAsNumber = parseFunction(value);\n if (!isSet(valueAsNumber)) {\n return false;\n }\n\n return compare(valueAsNumber, limitAsNumber);\n }\n\n public static getParserFromConfig(\n config?: ValidatorConfig,\n ): (viewValue: string | null | undefined) => number | undefined {\n if (\n !isSet(config) ||\n !Array.isArray(config.parser) ||\n !isSet(config.parser?.[0]) ||\n typeof config.parser[0] !== \"function\"\n ) {\n return parseTimeToNumber;\n }\n\n return config.parser[0] as (\n viewValue: string | null | undefined,\n ) => number | undefined;\n }\n}\n","import {\n type ValidatableHTMLElement,\n type Validator,\n type ValidatorName,\n type ValidatorConfig,\n isEmpty,\n isSet,\n} from \"@fkui/logic\";\nimport { HoursMinutesValidatorUtils } from \"../utils\";\n\nexport const hoursMinutesValidator: Validator = {\n name: \"hoursMinutes\" as ValidatorName,\n validation(\n value: string,\n _element: ValidatableHTMLElement,\n config: ValidatorConfig,\n ): boolean {\n return (\n isEmpty(value) ||\n isSet(HoursMinutesValidatorUtils.getParserFromConfig(config)(value))\n );\n },\n};\n","import {\n type Validator,\n type ValidatorName,\n type ValidatableHTMLElement,\n type ValidatorConfig,\n} from \"@fkui/logic\";\nimport { HoursMinutesValidatorUtils } from \"../utils\";\n\nexport const greaterThanTimeValidator: Validator = {\n name: \"greaterThanTime\" as ValidatorName,\n validation(\n value: string,\n _element: ValidatableHTMLElement,\n config: ValidatorConfig,\n ): boolean {\n return HoursMinutesValidatorUtils.validate(\n value,\n config,\n \"limit\",\n (value: number, limit: number) => {\n return value > limit;\n },\n );\n },\n};\n","import {\n type Validator,\n type ValidatorName,\n type ValidatableHTMLElement,\n type ValidatorConfig,\n} from \"@fkui/logic\";\nimport { HoursMinutesValidatorUtils } from \"../utils\";\n\nexport const lessThanTimeValidator: Validator = {\n name: \"lessThanTime\" as ValidatorName,\n validation(\n value: string,\n _element: ValidatableHTMLElement,\n config: ValidatorConfig,\n ): boolean {\n return HoursMinutesValidatorUtils.validate(\n value,\n config,\n \"limit\",\n (value: number, limit: number) => {\n return value < limit;\n },\n );\n },\n};\n","import {\n type Validator,\n type ValidatorName,\n type ValidatableHTMLElement,\n type ValidatorConfig,\n} from \"@fkui/logic\";\nimport { HoursMinutesValidatorUtils } from \"../utils\";\n\nexport const maxTimeValidator: Validator = {\n name: \"maxTime\" as ValidatorName,\n validation(\n value: string,\n _element: ValidatableHTMLElement,\n config: ValidatorConfig,\n ): boolean {\n return HoursMinutesValidatorUtils.validate(\n value,\n config,\n this.name,\n (value: number, limit: number) => {\n return value <= limit;\n },\n );\n },\n};\n","import {\n type Validator,\n type ValidatorName,\n type ValidatorConfig,\n type ValidatableHTMLElement,\n} from \"@fkui/logic\";\nimport { HoursMinutesValidatorUtils } from \"../utils\";\n\nexport const minTimeValidator: Validator = {\n name: \"minTime\" as ValidatorName,\n validation(\n value: string,\n _element: ValidatableHTMLElement,\n config: ValidatorConfig,\n ): boolean {\n return HoursMinutesValidatorUtils.validate(\n value,\n config,\n this.name,\n (value: number, limit: number) => {\n return value >= limit;\n },\n );\n },\n};\n","import { ValidationService, type Validator } from \"@fkui/logic\";\nimport { hoursMinutesValidator } from \"./HoursMinutesValidator\";\nimport { greaterThanTimeValidator } from \"./GreaterThanTimeValidator\";\nimport { lessThanTimeValidator } from \"./LessThanTimeValidator\";\nimport { maxTimeValidator } from \"./MaxTimeValidator\";\nimport { minTimeValidator } from \"./MinTimeValidator\";\n\nconst validators: Validator[] = [\n hoursMinutesValidator,\n greaterThanTimeValidator,\n lessThanTimeValidator,\n maxTimeValidator,\n minTimeValidator,\n];\n\nfor (const validator of validators) {\n ValidationService.registerValidator(validator);\n}\n","<script lang=\"ts\">\nimport { type PropType, defineComponent, inject } from \"vue\";\nimport { FTextField, TranslationMixin, type ParseFunction, type FormatFunction } from \"@fkui/vue\";\nimport { isSet, ValidationService } from \"@fkui/logic\";\nimport { HoursMinutesString, formatNumberToTime, parseTimeToNumber } from \"./converters\";\nimport \"./validators\";\n\nexport default defineComponent({\n name: \"XTimeTextField\",\n extends: FTextField,\n mixins: [TranslationMixin],\n props: {\n formatter: {\n type: Function as PropType<FormatFunction<HoursMinutesString>>,\n required: false,\n default: formatNumberToTime,\n },\n parser: {\n type: Function as PropType<ParseFunction<number>>,\n required: false,\n default: parseTimeToNumber,\n },\n },\n setup() {\n return {\n textFieldTableMode: inject(\"textFieldTableMode\", false) as boolean,\n };\n },\n mounted() {\n const inputElement: HTMLInputElement = this.$el.querySelector(\"input\");\n\n if (!isSet(inputElement)) {\n throw new Error(`Could not find input element in XTimeTextField with id ${this.$el.id}`);\n }\n\n ValidationService.addValidatorsToElement(\n inputElement,\n {\n maxLength: { length: 10 },\n hoursMinutes: {},\n },\n true,\n );\n\n inputElement.setAttribute(\"inputmode\", \"numeric\");\n\n ValidationService.validateElement(inputElement);\n },\n});\n</script>\n","<template>\n <f-search-text-field v-model=\"value\" class=\"x-search-bar\" :maxlength=\"maxLength\">\n <template #default>\n <!-- @slot Slot for input label -->\n <slot></slot>\n </template>\n <template #tooltip>\n <!-- @slot Slot for tooltip -->\n <slot name=\"tooltip\"></slot>\n </template>\n <template #input-right>\n <button class=\"button button--primary search-bar-button\" type=\"submit\" data-test=\"search-bar-submit\">\n <f-icon name=\"search\" library=\"f\"></f-icon>\n <span>\n <!-- @slot Slot for text in button -->\n <slot name=\"button-text\"> Sök </slot>\n </span>\n </button>\n </template>\n </f-search-text-field>\n</template>\n<script lang=\"ts\">\nimport { FIcon, FSearchTextField } from \"@fkui/vue\";\nimport { defineComponent } from \"vue\";\n\nexport default defineComponent({\n name: \"XSearchBar\",\n components: {\n FIcon,\n FSearchTextField,\n },\n props: {\n modelValue: {\n type: String,\n required: true,\n },\n maxLength: {\n type: Number,\n default: 20,\n },\n },\n emits: [\"update:modelValue\", \"changedValue\"],\n computed: {\n value: {\n get() {\n return this.modelValue;\n },\n set(value: string) {\n if (this.value !== value) {\n /**\n * Event that is dispatched when the value is changed and differs from the previous value.\n *\n * @event changedValue\n */\n this.$emit(\"changedValue\", [this.value, value]);\n }\n /**\n * V-model event.\n *\n * @event update:modelValue\n * @type {string}\n */\n this.$emit(\"update:modelValue\", value);\n },\n },\n },\n});\n</script>\n<style lang=\"scss\">\n@import \"./XSearchBar.scss\";\n</style>\n"],"mappings":";;;AAAO,MAAMA,oBAAA,GACT;AACG,MAAMC,kCAAA,GACT;ACSJ,SAASC,UAAUC,OAAA,EAAmBC,KAAA,EAAwC;EAC1E,WAAWC,MAAA,IAAUF,OAAA,EAAS;IACpB,MAAAG,KAAA,GAAQF,KAAA,CAAME,KAAA,CAAMD,MAAM;IAEhC,IAAIC,KAAA,EAAO;MACA,OAAAA,KAAA;IACX;EACJ;EAEO;AACX;AAEA,SAASC,gBAAgBH,KAAA,EAA2BI,SAAA,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AAA,EAAOH,IAAA,CAAA/G;EAAA;IAAAiF,OAAA,EAAAkC,OAAA,QAIPC,UAAA,CAAOL,IAAA,CAEcM,MAAA;IAAAC,OAAA,EAAAH,OAAA,QAErBC,UAAA,CAAWL,IAAA,CAOTM,MAAA;IAAA,eALLF,OAAA,CAA2C,OAAtBI,kBAAA,WAAAd,UAAA,GAAAe,WAAA,CAASC,iBAAA,EAAG;MAAAzE,IAAA;MAZjD0E,OAAA;IAAA,CAagB,GAEyCC,eAAA,IAAAJ,kBAAA,CAfzD,QAekD,OAAAH,UAAA,CAAAL,IAAA,CAAAM,MAAA,4BAAAM,eAAA,U,IAflD;IAAAC,CAAA","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
package/dist/style.css ADDED
@@ -0,0 +1,18 @@
1
+ .x-search-bar .text-field__input-wrapper {
2
+ gap: 0;
3
+ }
4
+ .x-search-bar input {
5
+ border-right: 0;
6
+ border-top-right-radius: 0;
7
+ border-bottom-right-radius: 0;
8
+ }
9
+ .x-search-bar .button.button--primary {
10
+ margin-bottom: 0;
11
+ margin-top: 0;
12
+ border-top-left-radius: 0;
13
+ border-bottom-left-radius: 0;
14
+ width: auto;
15
+ padding: 0.25rem 0.75rem;
16
+ height: var(--f-height-large);
17
+ min-width: 6rem;
18
+ }
@@ -0,0 +1,31 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ modelValue: {
3
+ type: StringConstructor;
4
+ required: true;
5
+ };
6
+ maxLength: {
7
+ type: NumberConstructor;
8
+ default: number;
9
+ };
10
+ }, unknown, unknown, {
11
+ value: {
12
+ get(): string;
13
+ set(value: string): void;
14
+ };
15
+ }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "changedValue")[], "update:modelValue" | "changedValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16
+ modelValue: {
17
+ type: StringConstructor;
18
+ required: true;
19
+ };
20
+ maxLength: {
21
+ type: NumberConstructor;
22
+ default: number;
23
+ };
24
+ }>> & {
25
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
26
+ onChangedValue?: ((...args: any[]) => any) | undefined;
27
+ }, {
28
+ maxLength: number;
29
+ }, {}>;
30
+ export default _default;
31
+ //# sourceMappingURL=XSearchBar.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XSearchBar.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/XSearchBar/XSearchBar.vue"],"names":[],"mappings":";;;;;;;;;;;;mBAkGuB,MAAM;;;;;;;;;;;;;;;;;AAtB7B,wBAyCG"}
@@ -0,0 +1,2 @@
1
+ export { default as XSearchBar } from "./XSearchBar.vue";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/XSearchBar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,164 @@
1
+ import { type PropType } from "vue";
2
+ import { type ParseFunction, type FormatFunction } from "@fkui/vue";
3
+ import { HoursMinutesString, formatNumberToTime, parseTimeToNumber } from "./converters";
4
+ import "./validators";
5
+ declare const _default: import("vue").DefineComponent<{
6
+ formatter: {
7
+ type: PropType<FormatFunction<HoursMinutesString>>;
8
+ required: false;
9
+ default: typeof formatNumberToTime;
10
+ };
11
+ parser: {
12
+ type: PropType<ParseFunction<number>>;
13
+ required: false;
14
+ default: typeof parseTimeToNumber;
15
+ };
16
+ }, {
17
+ textFieldTableMode: boolean;
18
+ }, unknown, {}, {}, import("vue").ComponentOptions, import("vue").DefineComponent<{
19
+ id: {
20
+ type: StringConstructor;
21
+ required: false;
22
+ default: () => string;
23
+ };
24
+ inline: {
25
+ type: BooleanConstructor;
26
+ required: false;
27
+ default: boolean;
28
+ };
29
+ modelValue: {
30
+ type: (StringConstructor | NumberConstructor)[];
31
+ required: false;
32
+ default: string;
33
+ };
34
+ type: {
35
+ type: StringConstructor;
36
+ required: false;
37
+ default: string;
38
+ };
39
+ formatter: {
40
+ type: PropType<FormatFunction<any>>;
41
+ required: false;
42
+ default: undefined;
43
+ };
44
+ parser: {
45
+ type: PropType<ParseFunction<any>>;
46
+ required: false;
47
+ default: undefined;
48
+ };
49
+ labelWidth: {
50
+ type: StringConstructor;
51
+ required: false;
52
+ default: string;
53
+ };
54
+ inputWidth: {
55
+ type: StringConstructor;
56
+ required: false;
57
+ default: string;
58
+ };
59
+ }, {
60
+ textFieldTableMode: boolean;
61
+ }, {
62
+ showErrorPopup: boolean;
63
+ viewValue: string;
64
+ lastModelValue: unknown;
65
+ validationMessage: string;
66
+ validityMode: string;
67
+ defaultText: string;
68
+ descriptionText: string;
69
+ descriptionScreenReaderText: string;
70
+ discreteDescriptionText: string;
71
+ discreteDescriptionScreenReaderText: string;
72
+ }, {
73
+ showPopupError(): boolean;
74
+ labelClass(): string;
75
+ isValid(): boolean;
76
+ hasError(): boolean;
77
+ rootClass(): Record<string, boolean>;
78
+ labelWrapperClass(): string | undefined;
79
+ inputWrapperClass(): string | undefined;
80
+ isModelUpdatedProgrammatically(): boolean;
81
+ }, {
82
+ getErrorPopupAnchor(): HTMLElement;
83
+ closePopupError(): void;
84
+ onChange(): Promise<void>;
85
+ onFocus(): void;
86
+ onBlur(): Promise<void>;
87
+ onValidity({ detail }: CustomEvent<import("@fkui/logic").ValidityEvent>): Promise<void>;
88
+ onPendingValidity(): void;
89
+ resolveNewModelValue(viewValue: string): unknown;
90
+ syncViewValueAfterModelUpdate(newModelValue: unknown): void | never;
91
+ triggerComponentValidityEvent(validityEvent: import("@fkui/logic").ValidityEvent): void;
92
+ setViewValueToFormattedValueOrFallbackToValue(): void;
93
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "blur" | "update")[], "update:modelValue" | "change" | "blur" | "update", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
94
+ id: {
95
+ type: StringConstructor;
96
+ required: false;
97
+ default: () => string;
98
+ };
99
+ inline: {
100
+ type: BooleanConstructor;
101
+ required: false;
102
+ default: boolean;
103
+ };
104
+ modelValue: {
105
+ type: (StringConstructor | NumberConstructor)[];
106
+ required: false;
107
+ default: string;
108
+ };
109
+ type: {
110
+ type: StringConstructor;
111
+ required: false;
112
+ default: string;
113
+ };
114
+ formatter: {
115
+ type: PropType<FormatFunction<any>>;
116
+ required: false;
117
+ default: undefined;
118
+ };
119
+ parser: {
120
+ type: PropType<ParseFunction<any>>;
121
+ required: false;
122
+ default: undefined;
123
+ };
124
+ labelWidth: {
125
+ type: StringConstructor;
126
+ required: false;
127
+ default: string;
128
+ };
129
+ inputWidth: {
130
+ type: StringConstructor;
131
+ required: false;
132
+ default: string;
133
+ };
134
+ }>> & {
135
+ onBlur?: ((...args: any[]) => any) | undefined;
136
+ onChange?: ((...args: any[]) => any) | undefined;
137
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
138
+ onUpdate?: ((...args: any[]) => any) | undefined;
139
+ }, {
140
+ type: string;
141
+ id: string;
142
+ modelValue: string | number;
143
+ inline: boolean;
144
+ labelWidth: string;
145
+ formatter: FormatFunction<any>;
146
+ parser: ParseFunction<any>;
147
+ inputWidth: string;
148
+ }, {}>, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
149
+ formatter: {
150
+ type: PropType<FormatFunction<HoursMinutesString>>;
151
+ required: false;
152
+ default: typeof formatNumberToTime;
153
+ };
154
+ parser: {
155
+ type: PropType<ParseFunction<number>>;
156
+ required: false;
157
+ default: typeof parseTimeToNumber;
158
+ };
159
+ }>>, {
160
+ parser: ParseFunction<number>;
161
+ formatter: FormatFunction<string>;
162
+ }, {}>;
163
+ export default _default;
164
+ //# sourceMappingURL=XTimeTextField.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XTimeTextField.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/XTimeTextField/XTimeTextField.vue"],"names":[],"mappings":"AAoDA,OAAO,EAAE,KAAK,QAAQ,EAA2B,MAAM,KAAK,CAAC;AAC7D,OAAO,EAAgC,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAElG,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACzF,OAAO,cAAc,CAAC;;;cAQQ,QAAQ,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC;;;;;cAK5C,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;;;;;wBAOU,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAwD48gK,GAAG;iBAA+C,GAAG;8BAA4D,GAAG;iBAA+C,GAAG;;;;;;;;;;;;cApElqhK,QAAQ,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC;;;;;cAK5C,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;;;;;;;;AAX7D,wBAyCG"}
@@ -0,0 +1,5 @@
1
+ export type HoursMinutesString = string;
2
+ export declare function formatNumberToTime(value?: number): HoursMinutesString | undefined;
3
+ export declare function parseTimeToNumber(value?: string | null): number | undefined;
4
+ export declare function forgivingParseTimeToNumber(value?: string | null): number | undefined;
5
+ //# sourceMappingURL=HoursMinutesConverter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HoursMinutesConverter.d.ts","sourceRoot":"","sources":["../../../../../src/components/XTimeTextField/converters/HoursMinutesConverter.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAExC,wBAAgB,kBAAkB,CAC9B,KAAK,CAAC,EAAE,MAAM,GACf,kBAAkB,GAAG,SAAS,CAMhC;AAgBD,wBAAgB,iBAAiB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAE3E;AAED,wBAAgB,0BAA0B,CACtC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GACtB,MAAM,GAAG,SAAS,CAEpB"}
@@ -0,0 +1,2 @@
1
+ export * from "./HoursMinutesConverter";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/XTimeTextField/converters/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from "./utils";
2
+ export * from "./converters";
3
+ export * from "./validators";
4
+ export { default as XTimeTextField } from "./XTimeTextField.vue";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/XTimeTextField/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { HoursMinutesString } from "../converters";
2
+ export declare function hoursMinutesStringToMinutes(valueString: string, extraForgiving?: boolean): number | undefined;
3
+ export declare function minutesToHoursMinutesString(value?: number): HoursMinutesString;
4
+ export declare function splitHoursMinutes(valueString: string, extraForgiving?: boolean): string[];
5
+ /**
6
+ * Accepts time as a number and returns a user friendly string (to be used in i.e. review mode)
7
+ * Example:
8
+ * Input: 13.5
9
+ * Output: '13 timmar och 30 minuter'
10
+ */
11
+ export declare function minutesToUserFriendlyString(value: number): string;
12
+ /**
13
+ * Helper for converting AgeTimeTextField values into hours. For convienence,
14
+ * it is possible to provide multiple values and get their sum. The actual
15
+ * conversion will be performed as a last step, to minimize the amount of rounding
16
+ * errors.
17
+ *
18
+ * Parameters that are undefined or NaN will be ignored and add 0 to the sum.
19
+ *
20
+ * @param values - Values in minutes, to be converted into a value in hours.
21
+ * @returns The sum of all values divided by 60. E.g., `150` becomes `2.5`.
22
+ */
23
+ export declare function minutesToHoursFloat(...values: Array<number | undefined>): number;
24
+ /**
25
+ * Helper for converting AgeTimeTextField values into an object. For
26
+ * convenience, it is possible to provide multiple values and get their sum.
27
+ *
28
+ * Parameters that are undefined or NaN will be ignored and add 0 to the sum.
29
+ *
30
+ * @param values - Values in minutes, to be converted into a value into an
31
+ * hour minute object.
32
+ * @returns The sum of all values in an object representation. E.g.,
33
+ * `150` becomes `{ hours: 2, minutes: 30 }`
34
+ */
35
+ export declare function minutesToObject(...values: Array<number | undefined>): {
36
+ hours: number;
37
+ minutes: number;
38
+ };
39
+ //# sourceMappingURL=HoursMinutesNumberUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HoursMinutesNumberUtils.d.ts","sourceRoot":"","sources":["../../../../../src/components/XTimeTextField/utils/HoursMinutesNumberUtils.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAuBnD,wBAAgB,2BAA2B,CACvC,WAAW,EAAE,MAAM,EACnB,cAAc,UAAQ,GACvB,MAAM,GAAG,SAAS,CAWpB;AAED,wBAAgB,2BAA2B,CACvC,KAAK,CAAC,EAAE,MAAM,GACf,kBAAkB,CAWpB;AAED,wBAAgB,iBAAiB,CAC7B,WAAW,EAAE,MAAM,EACnB,cAAc,UAAQ,GACvB,MAAM,EAAE,CAcV;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAUjE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAC/B,GAAG,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,GACrC,MAAM,CAMR;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,GAAG;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACnB,CASA"}
@@ -0,0 +1,6 @@
1
+ import { type ValidatorConfig } from "@fkui/logic";
2
+ export declare class HoursMinutesValidatorUtils {
3
+ static validate(value: string, config: ValidatorConfig, name: string, compare: (value: number, limit: number) => boolean): boolean;
4
+ static getParserFromConfig(config?: ValidatorConfig): (viewValue: string | null | undefined) => number | undefined;
5
+ }
6
+ //# sourceMappingURL=HoursMinutesValidatorUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HoursMinutesValidatorUtils.d.ts","sourceRoot":"","sources":["../../../../../src/components/XTimeTextField/utils/HoursMinutesValidatorUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAS,MAAM,aAAa,CAAC;AAK1D,qBAAa,0BAA0B;WACrB,QAAQ,CAClB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,GACnD,OAAO;WAyBI,mBAAmB,CAC7B,MAAM,CAAC,EAAE,eAAe,GACzB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,KAAK,MAAM,GAAG,SAAS;CAclE"}
@@ -0,0 +1,3 @@
1
+ export declare const HOURS_MINUTES_REGEXP: RegExp;
2
+ export declare const HOURS_MINUTES_WITHOUT_COLON_REGEXP: RegExp;
3
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/components/XTimeTextField/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,QACkB,CAAC;AACpD,eAAO,MAAM,kCAAkC,QACC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from "./constants";
2
+ export * from "./HoursMinutesNumberUtils";
3
+ export * from "./HoursMinutesValidatorUtils";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/XTimeTextField/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type Validator } from "@fkui/logic";
2
+ export declare const greaterThanTimeValidator: Validator;
3
+ //# sourceMappingURL=GreaterThanTimeValidator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GreaterThanTimeValidator.d.ts","sourceRoot":"","sources":["../../../../../src/components/XTimeTextField/validators/GreaterThanTimeValidator.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,SAAS,EAIjB,MAAM,aAAa,CAAC;AAGrB,eAAO,MAAM,wBAAwB,EAAE,SAgBtC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type Validator } from "@fkui/logic";
2
+ export declare const hoursMinutesValidator: Validator;
3
+ //# sourceMappingURL=HoursMinutesValidator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HoursMinutesValidator.d.ts","sourceRoot":"","sources":["../../../../../src/components/XTimeTextField/validators/HoursMinutesValidator.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,KAAK,SAAS,EAKjB,MAAM,aAAa,CAAC;AAGrB,eAAO,MAAM,qBAAqB,EAAE,SAYnC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type Validator } from "@fkui/logic";
2
+ export declare const lessThanTimeValidator: Validator;
3
+ //# sourceMappingURL=LessThanTimeValidator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LessThanTimeValidator.d.ts","sourceRoot":"","sources":["../../../../../src/components/XTimeTextField/validators/LessThanTimeValidator.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,SAAS,EAIjB,MAAM,aAAa,CAAC;AAGrB,eAAO,MAAM,qBAAqB,EAAE,SAgBnC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type Validator } from "@fkui/logic";
2
+ export declare const maxTimeValidator: Validator;
3
+ //# sourceMappingURL=MaxTimeValidator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MaxTimeValidator.d.ts","sourceRoot":"","sources":["../../../../../src/components/XTimeTextField/validators/MaxTimeValidator.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,SAAS,EAIjB,MAAM,aAAa,CAAC;AAGrB,eAAO,MAAM,gBAAgB,EAAE,SAgB9B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type Validator } from "@fkui/logic";
2
+ export declare const minTimeValidator: Validator;
3
+ //# sourceMappingURL=MinTimeValidator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MinTimeValidator.d.ts","sourceRoot":"","sources":["../../../../../src/components/XTimeTextField/validators/MinTimeValidator.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,SAAS,EAIjB,MAAM,aAAa,CAAC;AAGrB,eAAO,MAAM,gBAAgB,EAAE,SAgB9B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/XTimeTextField/validators/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export * from "./XTimeTextField";
2
+ export * from "./XSearchBar";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./components";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type SetupOptions } from "@forsakringskassan/vite-lib-config";
2
+ import "@fkui/icon-lib-default/dist/f";
3
+ import "@fkui/css-variables/dist/fkui-exp-css-variables.css";
4
+ import "@fkui/design/lib/fkui-exp.css";
5
+ import "@fkui/design/lib/fonts.css";
6
+ export declare function setup(options: SetupOptions): void;
7
+ //# sourceMappingURL=local.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local.d.ts","sourceRoot":"","sources":["../../src/local.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEvE,OAAO,+BAA+B,CAAC;AACvC,OAAO,qDAAqD,CAAC;AAC7D,OAAO,+BAA+B,CAAC;AACvC,OAAO,4BAA4B,CAAC;AASpC,wBAAgB,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAQjD"}
@@ -0,0 +1,5 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {
2
+ namn: string;
3
+ }, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
4
+ export default _default;
5
+ //# sourceMappingURL=app.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.vue.d.ts","sourceRoot":"","sources":["../../../src/vite-dev/app.vue"],"names":[],"mappings":";;;AAyBA,wBAOG"}
package/package.json ADDED
@@ -0,0 +1,97 @@
1
+ {
2
+ "name": "@fkui/vue-labs",
3
+ "version": "5.36.0",
4
+ "description": "Experimental and unstable FKUI components",
5
+ "keywords": [
6
+ "fkui",
7
+ "designsystem",
8
+ "vue"
9
+ ],
10
+ "homepage": "https://forsakringskassan.github.io/designsystem/",
11
+ "bugs": "https://github.com/Forsakringskassan/designsystem/issues",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/Forsakringskassan/designsystem.git",
15
+ "directory": "packages/vue-labs"
16
+ },
17
+ "license": "MIT",
18
+ "author": "Försäkringskassan",
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/types/index.d.ts",
22
+ "require": "./dist/cjs/index.cjs.js",
23
+ "import": "./dist/esm/index.esm.js"
24
+ },
25
+ "./pageobject/*": "./pageobject/*",
26
+ "./style.css": "./dist/style.css"
27
+ },
28
+ "main": "./dist/cjs/index.cjs.js",
29
+ "module": "./dist/esm/index.esm.js",
30
+ "types": "./dist/types/index.d.ts",
31
+ "files": [
32
+ "dist",
33
+ "htmlvalidate",
34
+ "pageobject/**/*.{js,js.map,d.ts}",
35
+ "!**/examples/**",
36
+ "!**/*.spec.{js,ts,d.ts,d.ts.map}",
37
+ "!**/.eslintrc.json"
38
+ ],
39
+ "scripts": {
40
+ "prebuild": "run-s clean",
41
+ "build": "run-s build:lib build:pageobject build:dts",
42
+ "build:docs": "node generate-docs.mjs",
43
+ "build:dts": "vue-tsc --emitDeclarationOnly",
44
+ "build:lib": "fk-build-vue-lib",
45
+ "build:pageobject": "tsc --build pageobject/",
46
+ "clean": "rimraf -g .jest-cache *.tsbuildinfo coverage dist public temp test-results",
47
+ "start": "vite --",
48
+ "start:docs": "fkui-serve public",
49
+ "test": "jest --coverage",
50
+ "unit": "jest",
51
+ "unit:watch": "jest --watch"
52
+ },
53
+ "jest": {
54
+ "preset": "@forsakringskassan/jest-config-vue",
55
+ "setupFilesAfterEnv": [
56
+ "./jest.setup.ts"
57
+ ]
58
+ },
59
+ "dependencies": {
60
+ "dayjs": "^1.11.0",
61
+ "lodash": "^4.17.20"
62
+ },
63
+ "devDependencies": {
64
+ "@fkui/css-variables": "5.36.0",
65
+ "@fkui/date": "5.36.0",
66
+ "@fkui/design": "5.36.0",
67
+ "@fkui/icon-lib-default": "5.36.0",
68
+ "@fkui/logic": "5.36.0",
69
+ "@fkui/test-utils": "5.36.0",
70
+ "@fkui/vue": "5.36.0",
71
+ "@forsakringskassan/docs-generator": "2.1.0",
72
+ "@forsakringskassan/vite-lib-config": "2.0.1",
73
+ "@vue/test-utils": "2.4.6",
74
+ "vite": "5.4.3",
75
+ "vue": "3.4.38",
76
+ "vue-router": "4.4.3"
77
+ },
78
+ "peerDependencies": {
79
+ "@fkui/date": "^5",
80
+ "@fkui/design": "^5",
81
+ "@fkui/logic": "^5",
82
+ "@fkui/vue": "^5",
83
+ "core-js": "^3.24",
84
+ "html-validate": ">= 7.9.0",
85
+ "vue": "^3"
86
+ },
87
+ "peerDependenciesMeta": {
88
+ "html-validate": {
89
+ "optional": true
90
+ }
91
+ },
92
+ "engines": {
93
+ "node": ">= 20",
94
+ "npm": ">= 7"
95
+ },
96
+ "gitHead": "098282a45f574bb15aba4c5db57d13e25bb07129"
97
+ }
@@ -0,0 +1,14 @@
1
+ import { type DefaultCypressChainable, type BasePageObject } from "./common";
2
+ export declare class XDummyPageObject implements BasePageObject {
3
+ selector: string;
4
+ el: () => DefaultCypressChainable;
5
+ /**
6
+ * @param selector - the root of the label, usually `<label class="label">...</label>`.
7
+ */
8
+ constructor(selector: string);
9
+ /**
10
+ * Heading
11
+ */
12
+ heading(): DefaultCypressChainable;
13
+ }
14
+ //# sourceMappingURL=XDummy.pageobject.d.ts.map
@@ -0,0 +1,13 @@
1
+ import "./trimmedText";
2
+ export type DefaultCypressChainable = Cypress.Chainable<JQuery<HTMLElement>>;
3
+ export interface BasePageObject {
4
+ /**
5
+ * The selector that is used.
6
+ */
7
+ selector: string;
8
+ /**
9
+ * The element.
10
+ */
11
+ el: () => DefaultCypressChainable;
12
+ }
13
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1,2 @@
1
+ export { XDummyPageObject } from "./XDummy.pageobject";
2
+ //# sourceMappingURL=index.d.ts.map