@platforma-sdk/ui-vue 1.42.14 → 1.42.15

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 (29) hide show
  1. package/.turbo/turbo-build.log +15 -15
  2. package/.turbo/turbo-type-check.log +1 -1
  3. package/CHANGELOG.md +8 -0
  4. package/dist/components/PlAgDataTable/sources/table-source-v2.js +4 -4
  5. package/dist/components/PlAgDataTable/sources/table-state-v2.js +6 -6
  6. package/dist/components/PlMultiSequenceAlignment/data.js +5 -5
  7. package/dist/lib/model/common/dist/index.js +194 -171
  8. package/dist/lib/model/common/dist/index.js.map +1 -1
  9. package/dist/lib/ui/uikit/dist/components/PlAutocomplete/PlAutocomplete.vue.js +1 -1
  10. package/dist/lib/ui/uikit/dist/components/PlDropdown/PlDropdown.vue.js +1 -1
  11. package/dist/lib/ui/uikit/dist/components/PlDropdownLegacy/PlDropdownLegacy.vue.js +1 -1
  12. package/dist/lib/ui/uikit/dist/components/PlDropdownMulti/PlDropdownMulti.vue.js +1 -1
  13. package/dist/lib/ui/uikit/dist/components/PlFileInput/PlFileInput.vue.js +20 -20
  14. package/dist/lib/ui/uikit/dist/components/PlFileInput/PlFileInput.vue.js.map +1 -1
  15. package/dist/lib/ui/uikit/dist/components/PlTextArea/PlTextArea.vue.js +1 -1
  16. package/dist/lib/ui/uikit/dist/components/PlTextField/PlTextField.vue.js +1 -1
  17. package/dist/lib/ui/uikit/dist/generated/components/svg/images/{SvgRequired.vue2.js → SvgRequired.vue.js} +1 -1
  18. package/dist/lib/ui/uikit/dist/generated/components/svg/images/SvgRequired.vue.js.map +1 -0
  19. package/dist/lib/ui/uikit/dist/lib/model/common/dist/index.js +179 -156
  20. package/dist/lib/ui/uikit/dist/lib/model/common/dist/index.js.map +1 -1
  21. package/dist/lib/ui/uikit/dist/sdk/model/dist/index.js +358 -346
  22. package/dist/lib/ui/uikit/dist/sdk/model/dist/index.js.map +1 -1
  23. package/dist/sdk/model/dist/index.js +256 -244
  24. package/dist/sdk/model/dist/index.js.map +1 -1
  25. package/package.json +4 -4
  26. package/.turbo/turbo-test.log +0 -565
  27. package/dist/lib/ui/uikit/dist/components/PlAccordion/ExpandTransition.vue2.js +0 -27
  28. package/dist/lib/ui/uikit/dist/components/PlAccordion/ExpandTransition.vue2.js.map +0 -1
  29. package/dist/lib/ui/uikit/dist/generated/components/svg/images/SvgRequired.vue2.js.map +0 -1
@@ -10,7 +10,7 @@ import me from "../LongText.vue.js";
10
10
  import xe from "../PlIcon16/PlIcon16.vue.js";
11
11
  import be from "../PlIcon24/PlIcon24.vue.js";
12
12
  import { normalizeListOptions as ye } from "../../helpers/utils.js";
13
- import ke from "../../generated/components/svg/images/SvgRequired.vue2.js";
13
+ import ke from "../../generated/components/svg/images/SvgRequired.vue.js";
14
14
  import { getErrorMessage as _e } from "../../helpers/error.js";
15
15
  (function() {
16
16
  try {
@@ -9,7 +9,7 @@ import { deepEqual as _, deepIncludes as P } from "../../helpers/objects.js";
9
9
  import { normalizeListOptions as ho } from "../../helpers/utils.js";
10
10
  import mo from "../../utils/DropdownOverlay/DropdownOverlay.vue.js";
11
11
  import vo from "../PlIcon24/PlIcon24.vue.js";
12
- import wo from "../../generated/components/svg/images/SvgRequired.vue2.js";
12
+ import wo from "../../generated/components/svg/images/SvgRequired.vue.js";
13
13
  import { getErrorMessage as fo } from "../../helpers/error.js";
14
14
  (function() {
15
15
  try {
@@ -1,11 +1,11 @@
1
- import { defineComponent as $, reactive as M, useSlots as j, computed as i, watch as I, ref as q, createElementBlock as n, openBlock as o, Fragment as S, createElementVNode as u, createVNode as D, normalizeClass as B, createCommentVNode as s, withModifiers as N, withKeys as H, createBlock as p, normalizeStyle as K, toDisplayString as c, unref as r, withCtx as R, renderSlot as L, createTextVNode as Q } from "vue";
1
+ import { defineComponent as M, reactive as P, useSlots as q, computed as i, watch as j, ref as H, createElementBlock as n, openBlock as o, Fragment as S, createElementVNode as u, createVNode as D, normalizeClass as B, createCommentVNode as s, withModifiers as N, withKeys as I, createBlock as p, normalizeStyle as K, toDisplayString as c, unref as r, withCtx as J, renderSlot as L, createTextVNode as Q } from "vue";
2
2
  import { prettyBytes as x } from "../../lib/util/helpers/dist/index.js";
3
3
  import "../../sdk/model/dist/index.js";
4
- import U from "../../generated/components/svg/images/SvgRequired.vue2.js";
5
- import { getErrorMessage as Y } from "../../helpers/error.js";
6
- import A from "../../utils/DoubleContour.vue.js";
7
- import { useLabelNotch as G } from "../../utils/useLabelNotch.js";
8
- import J from "../PlFileDialog/PlFileDialog.vue.js";
4
+ import R from "../../generated/components/svg/images/SvgRequired.vue.js";
5
+ import { getErrorMessage as U } from "../../helpers/error.js";
6
+ import Y from "../../utils/DoubleContour.vue.js";
7
+ import { useLabelNotch as A } from "../../utils/useLabelNotch.js";
8
+ import G from "../PlFileDialog/PlFileDialog.vue.js";
9
9
  import f from "../PlIcon24/PlIcon24.vue.js";
10
10
  import W from "../PlTooltip/PlTooltip.vue.js";
11
11
  import { getFileNameFromHandle as X, getFilePathFromHandle as Z } from "../../lib/model/common/dist/index.js";
@@ -31,7 +31,7 @@ const ee = {
31
31
  }, re = {
32
32
  key: 1,
33
33
  class: "pl-file-input__helper"
34
- }, me = /* @__PURE__ */ $({
34
+ }, me = /* @__PURE__ */ M({
35
35
  __name: "PlFileInput",
36
36
  props: {
37
37
  modelValue: {},
@@ -49,17 +49,17 @@ const ee = {
49
49
  },
50
50
  emits: ["update:modelValue"],
51
51
  setup(h, { emit: v }) {
52
- const a = M({
52
+ const a = P({
53
53
  fileDialogOpen: !1,
54
54
  error: void 0
55
- }), _ = j(), g = v, l = h, b = (e, t) => {
55
+ }), _ = q(), g = v, l = h, b = (e, t) => {
56
56
  if (e)
57
57
  try {
58
58
  return t(e);
59
59
  } catch (d) {
60
60
  return a.error = d instanceof Error ? d.message : String(d), e;
61
61
  }
62
- }, y = i(() => b(l.modelValue, X)), w = i(() => b(l.modelValue, Z)), O = i(() => l.progress && !l.progress.done), T = i(() => l.progress && l.progress.done), k = i(() => Y(a.error, l.error)), m = i(() => typeof k.value == "string"), V = i(() => {
62
+ }, y = i(() => b(l.modelValue, X)), w = i(() => b(l.modelValue, Z)), O = i(() => l.progress && !l.progress.done), T = i(() => l.progress && l.progress.done), k = i(() => U(a.error, l.error)), m = i(() => typeof k.value == "string"), V = i(() => {
63
63
  const { status: e, done: t } = l.progress ?? {};
64
64
  return !e || !e.bytesTotal ? "" : e.bytesProcessed && !t ? x(e.bytesProcessed, {}) + " / " + x(e.bytesTotal, {}) : x(e.bytesTotal, {});
65
65
  }), E = i(() => {
@@ -72,14 +72,14 @@ const ee = {
72
72
  a.fileDialogOpen = !0;
73
73
  }, F = (e) => {
74
74
  e.files.length && g("update:modelValue", e.files[0]);
75
- }, P = () => g("update:modelValue", void 0);
76
- I(
75
+ }, $ = () => g("update:modelValue", void 0);
76
+ j(
77
77
  () => l.modelValue,
78
78
  () => a.error = void 0,
79
79
  { immediate: !0 }
80
80
  );
81
- const z = q();
82
- return l.cellStyle || G(z), (e, t) => (o(), n(S, null, [
81
+ const z = H();
82
+ return l.cellStyle || A(z), (e, t) => (o(), n(S, null, [
83
83
  u("div", {
84
84
  class: B([{ "pl-file-input__cell-style": !!e.cellStyle, "has-file": !!y.value }, "pl-file-input__envelope"])
85
85
  }, [
@@ -88,7 +88,7 @@ const ee = {
88
88
  ref: z,
89
89
  class: B([{ dashed: e.dashed, error: m.value }, "pl-file-input"]),
90
90
  tabindex: "0",
91
- onKeyup: H(C, ["enter"]),
91
+ onKeyup: I(C, ["enter"]),
92
92
  onClick: N(C, ["stop"])
93
93
  }, [
94
94
  u("div", {
@@ -96,14 +96,14 @@ const ee = {
96
96
  class: "pl-file-input__progress"
97
97
  }, null, 4),
98
98
  !e.cellStyle && e.label ? (o(), n("label", ee, [
99
- e.required ? (o(), p(U, { key: 0 })) : s("", !0),
99
+ e.required ? (o(), p(R, { key: 0 })) : s("", !0),
100
100
  u("span", null, c(e.label), 1),
101
101
  r(_).tooltip || w.value ? (o(), p(r(W), {
102
102
  key: 1,
103
103
  class: "info",
104
104
  position: "top"
105
105
  }, {
106
- tooltip: R(() => [
106
+ tooltip: J(() => [
107
107
  r(_).tooltip ? L(e.$slots, "tooltip", { key: 0 }) : (o(), n(S, { key: 1 }, [
108
108
  Q(c(w.value), 1)
109
109
  ], 64))
@@ -133,13 +133,13 @@ const ee = {
133
133
  key: 6,
134
134
  class: "pl-file-input__clear",
135
135
  name: "close",
136
- onClick: N(P, ["stop"])
136
+ onClick: N($, ["stop"])
137
137
  })) : s("", !0),
138
- D(A, { class: "pl-file-input__contour" })
138
+ D(Y, { class: "pl-file-input__contour" })
139
139
  ], 34),
140
140
  m.value ? (o(), n("div", te, c(k.value), 1)) : e.helper ? (o(), n("div", re, c(e.helper), 1)) : s("", !0)
141
141
  ], 2),
142
- D(r(J), {
142
+ D(r(G), {
143
143
  modelValue: a.fileDialogOpen,
144
144
  "onUpdate:modelValue": t[0] || (t[0] = (d) => a.fileDialogOpen = d),
145
145
  "close-on-outside-click": e.fileDialogCloseOnOutsideClick,
@@ -1 +1 @@
1
- {"version":3,"file":"PlFileInput.vue.js","sources":["../../../../../../../../../lib/ui/uikit/src/components/PlFileInput/PlFileInput.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { prettyBytes } from '@milaboratories/helpers';\nimport type { ImportFileHandle, ImportProgress } from '@platforma-sdk/model';\nimport { getFileNameFromHandle, getFilePathFromHandle } from '@platforma-sdk/model';\nimport { computed, reactive, ref, useSlots, watch } from 'vue';\nimport SvgRequired from '../../generated/components/svg/images/SvgRequired.vue';\nimport { getErrorMessage } from '../../helpers/error.ts';\nimport type { ImportedFiles } from '../../types';\nimport DoubleContour from '../../utils/DoubleContour.vue';\nimport { useLabelNotch } from '../../utils/useLabelNotch';\nimport { PlFileDialog } from '../PlFileDialog';\nimport { PlMaskIcon24 } from '../PlMaskIcon24';\nimport { PlTooltip } from '../PlTooltip';\nimport './pl-file-input.scss';\n\nconst data = reactive({\n fileDialogOpen: false,\n error: undefined as undefined | string,\n});\n\nconst slots = useSlots();\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: ImportFileHandle | undefined): void;\n}>();\n\nconst props = withDefaults(\n defineProps<{\n /**\n * The current import file handle.\n */\n modelValue: ImportFileHandle | undefined;\n /**\n * The label to display above the input field.\n */\n label?: string;\n /**\n * If `true`, the input field is marked as required.\n */\n required?: boolean;\n /**\n * If `true`, the component border is dashed.\n */\n dashed?: boolean;\n /**\n * Allowed file extensions (should start with `.`)\n */\n extensions?: string[];\n /**\n * Placeholder text\n */\n placeholder?: string;\n /**\n * Import/Upload progress\n */\n progress?: ImportProgress;\n /**\n * An error message to display below the input field.\n */\n error?: unknown;\n /**\n * A helper text to display below the input field when there are no errors.\n */\n helper?: string;\n /**\n * Remove rounded border and change styles\n */\n cellStyle?: boolean;\n /**\n * File dialog title\n */\n fileDialogTitle?: string;\n /**\n * If `true`, the file dialog window closes when clicking outside the modal area (default: `true`)\n */\n fileDialogCloseOnOutsideClick?: boolean;\n }>(),\n {\n label: undefined,\n extensions: undefined,\n fileDialogTitle: undefined,\n placeholder: undefined,\n progress: undefined,\n error: undefined,\n helper: undefined,\n cellStyle: false,\n fileDialogCloseOnOutsideClick: true,\n },\n);\n\nconst tryValue = <T extends ImportFileHandle>(v: T | undefined, cb: (v: T) => string | undefined) => {\n if (!v) {\n return undefined;\n }\n\n try {\n return cb(v);\n } catch (err) {\n data.error = err instanceof Error ? err.message : String(err);\n return v;\n }\n};\n\nconst fileName = computed(() => tryValue(props.modelValue, getFileNameFromHandle));\n\nconst filePath = computed(() => tryValue(props.modelValue, getFilePathFromHandle));\n\nconst isUploading = computed(() => props.progress && !props.progress.done);\n\nconst isUploaded = computed(() => props.progress && props.progress.done);\n\nconst computedErrorMessage = computed(() => getErrorMessage(data.error, props.error));\n\nconst hasErrors = computed(() => typeof computedErrorMessage.value === 'string');\n\nconst uploadStats = computed(() => {\n const { status, done } = props.progress ?? {};\n\n if (!status || !status.bytesTotal) {\n return '';\n }\n\n if (status.bytesProcessed && !done) {\n return prettyBytes(status.bytesProcessed, {}) + ' / ' + prettyBytes(status.bytesTotal, {});\n }\n\n return prettyBytes(status.bytesTotal, {});\n});\n\nconst progressStyle = computed(() => {\n const { progress } = props;\n\n if (!progress) {\n return {};\n }\n\n return {\n width: progress.done ? '100%' : Math.round((progress.status?.progress ?? 0) * 100) + '%',\n };\n});\n\nconst openFileDialog = () => {\n data.fileDialogOpen = true;\n};\n\nconst onImport = (v: ImportedFiles) => {\n if (v.files.length) {\n emit('update:modelValue', v.files[0]);\n }\n};\n\nconst clear = () => emit('update:modelValue', undefined);\n\nwatch(\n () => props.modelValue,\n () => (data.error = undefined),\n { immediate: true },\n);\n\nconst rootRef = ref();\n\nif (!props.cellStyle) {\n useLabelNotch(rootRef);\n}\n</script>\n\n<template>\n <div :class=\"{ 'pl-file-input__cell-style': !!cellStyle, 'has-file': !!fileName }\" class=\"pl-file-input__envelope\">\n <div\n ref=\"rootRef\"\n :class=\"{ dashed, error: hasErrors }\"\n class=\"pl-file-input\"\n tabindex=\"0\"\n @keyup.enter=\"openFileDialog\"\n @click.stop=\"openFileDialog\"\n >\n <div :style=\"progressStyle\" class=\"pl-file-input__progress\" />\n <label v-if=\"!cellStyle && label\" ref=\"label\">\n <SvgRequired v-if=\"required\" />\n <span>{{ label }}</span>\n <PlTooltip v-if=\"slots.tooltip || filePath\" class=\"info\" position=\"top\">\n <template #tooltip>\n <slot v-if=\"slots.tooltip\" name=\"tooltip\" />\n <template v-else>{{ filePath }}</template>\n </template>\n </PlTooltip>\n </label>\n <PlMaskIcon24 v-if=\"hasErrors\" name=\"restart\" />\n <PlMaskIcon24 v-else-if=\"isUploading\" name=\"cloud-upload\" />\n <PlMaskIcon24 v-else-if=\"isUploaded\" name=\"success\" />\n <PlMaskIcon24 v-else name=\"paper-clip\" />\n <div :data-placeholder=\"placeholder ?? 'Choose file'\" class=\"pl-file-input__filename\">\n {{ fileName }}\n </div>\n <div v-if=\"uploadStats\" class=\"pl-file-input__stats\">{{ uploadStats }}</div>\n <PlMaskIcon24 v-if=\"modelValue\" class=\"pl-file-input__clear\" name=\"close\" @click.stop=\"clear\" />\n <DoubleContour class=\"pl-file-input__contour\" />\n </div>\n <div v-if=\"hasErrors\" class=\"pl-file-input__error\">\n {{ computedErrorMessage }}\n </div>\n <div v-else-if=\"helper\" class=\"pl-file-input__helper\">{{ helper }}</div>\n </div>\n <PlFileDialog\n v-model=\"data.fileDialogOpen\"\n :close-on-outside-click=\"fileDialogCloseOnOutsideClick\"\n :extensions=\"extensions\"\n :title=\"fileDialogTitle\"\n @import:files=\"onImport\"\n />\n</template>\n"],"names":["F","N","K","useSlots","v","err","data","k","s","props","h","o","x","T","P","V","J","b","status","computed","y","t","e","progress","openFileDialog","emit","clear","watch","U","useLabelNotch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAeA,MAAAA,WAAsBC,EAAA,GAAA;AAAA,UACJ,IAAAC,EAAA;AAAA,MAChB,gBAAO;AAAA,MACR,OAEaC;AAAAA,IAuEPC,CAAAA,GAAAA,IAAAA,EAAAA,GAAAA,IAAAA,GAAAA,IAAAA,GAAAA,IAAAA,CAAAA,GAAAA,MAAAA;AAID,UAAA;AACF,YAAA;AAAW,iBACJC,EAAK,CAAA;AAAA,QACZC,SAAAA;AACO,iBAAA,EAAA,QAAA,aAAA,QAAA,EAAA,UAAA,OAAA,CAAA,GAAA;AAAA,QAAA;AAAA,IAiBH,GAAAC,IAAAC,EAAA,UAAU,YAASC,CAAAA,CAAAA,eAAmBC,EAAAC,EAAA,YAAAC,CAAA,CAAA,GAAAC,IAAAL,EAAA,MAAAG,EAAA,YAAA,CAAAA,EAAA,SAAA,IAAA,GAAAG,IAAAN,EAAA,MAAAG,EAAA,YAAAA,EAAA,SAAA,IAAA,GAAAI,IAAAP,EAAA,MAAAQ,EAAA,EAAA,OAAAL,EAAA,KAAA,CAAA,GAAA,IAAAH,EAAA,MAAA,OAAAO,EAAA,SAAA,QAAA,GAAAE,IAAAT,EAAA,MAAA;AAExC,YAAA,EAACU,QAAkB,GAAA,MAAA,oBAIZ,CAAA;AAKZ,aAEqBC,CAAS,KAAM,CAAA,EAAA,aAAA,KAAA,EAAA,kBAAA,CAAA,IAAAC,EAAA,EAAA,gBAAA,CAAA,CAAA,IAAA,QAAAA,EAAA,EAAA,YAAA,CAAA,CAAA,IAAAA,EAAA,EAAA,YAAA,CAAA,CAAA;AAAA;AAC7B,UAAAC;AAEN,YAAA,EAIO,UAAAC,EAAA,IAAAX;AAAA,aACEY,IAAS;AAAA,eAJRD,EAAA,OAAA,SAAA,KAAA,SAAAD,IAAAC,EAAA,WAAA,OAAA,SAAAD,EAAA,aAAA,KAAA,GAAA,IAAA;AAAA,MAAA,IAQNG,CAAiB;AAAA,IACrB,CAAA,GAAK,IAAiB,MAAA;AACxB,QAEiB,iBAAsB;AAAA,IACjC,GAAApB,WACFqB;AAIEC,QAAAA,MAAcD,iCAAmC,EAAA,MAAA,CAAA,CAAA;AAAA,IAEvDE,GAAAA,IAAAA,MAAAA,EAAAA,qBAAAA,MAAAA;AAAAC,IAAAA;AAAAA,MAEE,MAAOtB,EAAK;AAAA,MACZ,gBAAkB;AAAA,MACpB,EAAA,WAAA,GAAA;AAAA,IAEA;AAEKG,UAAAA,IACHoB,EAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"PlFileInput.vue.js","sources":["../../../../../../../../../lib/ui/uikit/src/components/PlFileInput/PlFileInput.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { prettyBytes } from '@milaboratories/helpers';\nimport type { ImportFileHandle, ImportProgress } from '@platforma-sdk/model';\nimport { getFileNameFromHandle, getFilePathFromHandle } from '@platforma-sdk/model';\nimport { computed, reactive, ref, useSlots, watch } from 'vue';\nimport SvgRequired from '../../generated/components/svg/images/SvgRequired.vue';\nimport { getErrorMessage } from '../../helpers/error.ts';\nimport type { ImportedFiles } from '../../types';\nimport DoubleContour from '../../utils/DoubleContour.vue';\nimport { useLabelNotch } from '../../utils/useLabelNotch';\nimport { PlFileDialog } from '../PlFileDialog';\nimport { PlMaskIcon24 } from '../PlMaskIcon24';\nimport { PlTooltip } from '../PlTooltip';\nimport './pl-file-input.scss';\n\nconst data = reactive({\n fileDialogOpen: false,\n error: undefined as undefined | string,\n});\n\nconst slots = useSlots();\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: ImportFileHandle | undefined): void;\n}>();\n\nconst props = withDefaults(\n defineProps<{\n /**\n * The current import file handle.\n */\n modelValue: ImportFileHandle | undefined;\n /**\n * The label to display above the input field.\n */\n label?: string;\n /**\n * If `true`, the input field is marked as required.\n */\n required?: boolean;\n /**\n * If `true`, the component border is dashed.\n */\n dashed?: boolean;\n /**\n * Allowed file extensions (should start with `.`)\n */\n extensions?: string[];\n /**\n * Placeholder text\n */\n placeholder?: string;\n /**\n * Import/Upload progress\n */\n progress?: ImportProgress;\n /**\n * An error message to display below the input field.\n */\n error?: unknown;\n /**\n * A helper text to display below the input field when there are no errors.\n */\n helper?: string;\n /**\n * Remove rounded border and change styles\n */\n cellStyle?: boolean;\n /**\n * File dialog title\n */\n fileDialogTitle?: string;\n /**\n * If `true`, the file dialog window closes when clicking outside the modal area (default: `true`)\n */\n fileDialogCloseOnOutsideClick?: boolean;\n }>(),\n {\n label: undefined,\n extensions: undefined,\n fileDialogTitle: undefined,\n placeholder: undefined,\n progress: undefined,\n error: undefined,\n helper: undefined,\n cellStyle: false,\n fileDialogCloseOnOutsideClick: true,\n },\n);\n\nconst tryValue = <T extends ImportFileHandle>(v: T | undefined, cb: (v: T) => string | undefined) => {\n if (!v) {\n return undefined;\n }\n\n try {\n return cb(v);\n } catch (err) {\n data.error = err instanceof Error ? err.message : String(err);\n return v;\n }\n};\n\nconst fileName = computed(() => tryValue(props.modelValue, getFileNameFromHandle));\n\nconst filePath = computed(() => tryValue(props.modelValue, getFilePathFromHandle));\n\nconst isUploading = computed(() => props.progress && !props.progress.done);\n\nconst isUploaded = computed(() => props.progress && props.progress.done);\n\nconst computedErrorMessage = computed(() => getErrorMessage(data.error, props.error));\n\nconst hasErrors = computed(() => typeof computedErrorMessage.value === 'string');\n\nconst uploadStats = computed(() => {\n const { status, done } = props.progress ?? {};\n\n if (!status || !status.bytesTotal) {\n return '';\n }\n\n if (status.bytesProcessed && !done) {\n return prettyBytes(status.bytesProcessed, {}) + ' / ' + prettyBytes(status.bytesTotal, {});\n }\n\n return prettyBytes(status.bytesTotal, {});\n});\n\nconst progressStyle = computed(() => {\n const { progress } = props;\n\n if (!progress) {\n return {};\n }\n\n return {\n width: progress.done ? '100%' : Math.round((progress.status?.progress ?? 0) * 100) + '%',\n };\n});\n\nconst openFileDialog = () => {\n data.fileDialogOpen = true;\n};\n\nconst onImport = (v: ImportedFiles) => {\n if (v.files.length) {\n emit('update:modelValue', v.files[0]);\n }\n};\n\nconst clear = () => emit('update:modelValue', undefined);\n\nwatch(\n () => props.modelValue,\n () => (data.error = undefined),\n { immediate: true },\n);\n\nconst rootRef = ref();\n\nif (!props.cellStyle) {\n useLabelNotch(rootRef);\n}\n</script>\n\n<template>\n <div :class=\"{ 'pl-file-input__cell-style': !!cellStyle, 'has-file': !!fileName }\" class=\"pl-file-input__envelope\">\n <div\n ref=\"rootRef\"\n :class=\"{ dashed, error: hasErrors }\"\n class=\"pl-file-input\"\n tabindex=\"0\"\n @keyup.enter=\"openFileDialog\"\n @click.stop=\"openFileDialog\"\n >\n <div :style=\"progressStyle\" class=\"pl-file-input__progress\" />\n <label v-if=\"!cellStyle && label\" ref=\"label\">\n <SvgRequired v-if=\"required\" />\n <span>{{ label }}</span>\n <PlTooltip v-if=\"slots.tooltip || filePath\" class=\"info\" position=\"top\">\n <template #tooltip>\n <slot v-if=\"slots.tooltip\" name=\"tooltip\" />\n <template v-else>{{ filePath }}</template>\n </template>\n </PlTooltip>\n </label>\n <PlMaskIcon24 v-if=\"hasErrors\" name=\"restart\" />\n <PlMaskIcon24 v-else-if=\"isUploading\" name=\"cloud-upload\" />\n <PlMaskIcon24 v-else-if=\"isUploaded\" name=\"success\" />\n <PlMaskIcon24 v-else name=\"paper-clip\" />\n <div :data-placeholder=\"placeholder ?? 'Choose file'\" class=\"pl-file-input__filename\">\n {{ fileName }}\n </div>\n <div v-if=\"uploadStats\" class=\"pl-file-input__stats\">{{ uploadStats }}</div>\n <PlMaskIcon24 v-if=\"modelValue\" class=\"pl-file-input__clear\" name=\"close\" @click.stop=\"clear\" />\n <DoubleContour class=\"pl-file-input__contour\" />\n </div>\n <div v-if=\"hasErrors\" class=\"pl-file-input__error\">\n {{ computedErrorMessage }}\n </div>\n <div v-else-if=\"helper\" class=\"pl-file-input__helper\">{{ helper }}</div>\n </div>\n <PlFileDialog\n v-model=\"data.fileDialogOpen\"\n :close-on-outside-click=\"fileDialogCloseOnOutsideClick\"\n :extensions=\"extensions\"\n :title=\"fileDialogTitle\"\n @import:files=\"onImport\"\n />\n</template>\n"],"names":["F","N","R","useSlots","v","err","data","k","s","props","h","o","x","T","P","V","J","b","status","computed","y","t","e","progress","openFileDialog","emit","clear","watch","$","useLabelNotch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAeA,MAAAA,WAAsBC,EAAA,GAAA;AAAA,UACJ,IAAAC,EAAA;AAAA,MAChB,gBAAO;AAAA,MACR,OAEaC;AAAAA,IAuEPC,CAAAA,GAAAA,IAAAA,EAAAA,GAAAA,IAAAA,GAAAA,IAAAA,GAAAA,IAAAA,CAAAA,GAAAA,MAAAA;AAID,UAAA;AACF,YAAA;AAAW,iBACJC,EAAK,CAAA;AAAA,QACZC,SAAAA;AACO,iBAAA,EAAA,QAAA,aAAA,QAAA,EAAA,UAAA,OAAA,CAAA,GAAA;AAAA,QAAA;AAAA,IAiBH,GAAAC,IAAAC,EAAA,UAAU,YAASC,CAAAA,CAAAA,eAAmBC,EAAAC,EAAA,YAAAC,CAAA,CAAA,GAAAC,IAAAL,EAAA,MAAAG,EAAA,YAAA,CAAAA,EAAA,SAAA,IAAA,GAAAG,IAAAN,EAAA,MAAAG,EAAA,YAAAA,EAAA,SAAA,IAAA,GAAAI,IAAAP,EAAA,MAAAQ,EAAA,EAAA,OAAAL,EAAA,KAAA,CAAA,GAAA,IAAAH,EAAA,MAAA,OAAAO,EAAA,SAAA,QAAA,GAAAE,IAAAT,EAAA,MAAA;AAExC,YAAA,EAACU,QAAkB,GAAA,MAAA,oBAIZ,CAAA;AAKZ,aAEqBC,CAAS,KAAM,CAAA,EAAA,aAAA,KAAA,EAAA,kBAAA,CAAA,IAAAC,EAAA,EAAA,gBAAA,CAAA,CAAA,IAAA,QAAAA,EAAA,EAAA,YAAA,CAAA,CAAA,IAAAA,EAAA,EAAA,YAAA,CAAA,CAAA;AAAA;AAC7B,UAAAC;AAEN,YAAA,EAIO,UAAAC,EAAA,IAAAX;AAAA,aACEY,IAAS;AAAA,eAJRD,EAAA,OAAA,SAAA,KAAA,SAAAD,IAAAC,EAAA,WAAA,OAAA,SAAAD,EAAA,aAAA,KAAA,GAAA,IAAA;AAAA,MAAA,IAQNG,CAAiB;AAAA,IACrB,CAAA,GAAK,IAAiB,MAAA;AACxB,QAEiB,iBAAsB;AAAA,IACjC,GAAApB,WACFqB;AAIEC,QAAAA,MAAcD,iCAAmC,EAAA,MAAA,CAAA,CAAA;AAAA,IAEvDE,GAAAA,IAAAA,MAAAA,EAAAA,qBAAAA,MAAAA;AAAAC,IAAAA;AAAAA,MAEE,MAAOtB,EAAK;AAAA,MACZ,gBAAkB;AAAA,MACpB,EAAA,WAAA,GAAA;AAAA,IAEA;AAEKG,UAAAA,IACHoB,EAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -3,7 +3,7 @@ import T from "../PlTooltip/PlTooltip.vue.js";
3
3
  import q from "../../utils/DoubleContour.vue.js";
4
4
  import { useLabelNotch as D } from "../../utils/useLabelNotch.js";
5
5
  import { useValidation as P } from "../../utils/useValidation.js";
6
- import U from "../../generated/components/svg/images/SvgRequired.vue2.js";
6
+ import U from "../../generated/components/svg/images/SvgRequired.vue.js";
7
7
  import { getErrorMessage as A } from "../../helpers/error.js";
8
8
  (function() {
9
9
  try {
@@ -5,7 +5,7 @@ import { useLabelNotch as I } from "../../utils/useLabelNotch.js";
5
5
  import { useValidation as J } from "../../utils/useValidation.js";
6
6
  import K from "../PlIcon16/PlIcon16.vue.js";
7
7
  import O from "../PlIcon24/PlIcon24.vue.js";
8
- import Q from "../../generated/components/svg/images/SvgRequired.vue2.js";
8
+ import Q from "../../generated/components/svg/images/SvgRequired.vue.js";
9
9
  import { getErrorMessage as W } from "../../helpers/error.js";
10
10
  (function() {
11
11
  try {
@@ -22,4 +22,4 @@ const L = /* @__PURE__ */ r(o, [["render", d]]);
22
22
  export {
23
23
  L as default
24
24
  };
25
- //# sourceMappingURL=SvgRequired.vue2.js.map
25
+ //# sourceMappingURL=SvgRequired.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SvgRequired.vue.js","sources":["../../../../../../../../../../../lib/ui/uikit/src/generated/components/svg/images/SvgRequired.vue"],"sourcesContent":["<!-- ⚠️ AUTOGENERATED. DO NOT EDIT. -->\n<script lang=\"ts\">\nimport '../svg-styles.css';\nexport default { name: 'SvgRequired' };\n</script>\n\n<template>\n <div class=\"svg-icon SvgRequired\" style=\"width: 5px; height: 12px\" />\n</template>\n\n<style>\n .SvgRequired { background-image: url(\"data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%225%22%20height%3D%2212%22%20viewBox%3D%220%200%205%2012%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M1.51685%204.8L2.5%203.34159L3.47612%204.8L4.39607%204.12743L3.31461%202.7469L5%202.25133L4.64888%201.16106L3.00562%201.77699L3.06882%200H1.93118L1.99438%201.77699L0.351124%201.16106L0%202.25133L1.68539%202.7469L0.59691%204.12743L1.51685%204.8Z%22%20fill%3D%22%23F1222F%22%2F%3E%3C%2Fsvg%3E\"); }\n</style>\n"],"names":[],"mappings":";;;;;;;;;;;;;AAOoC,MAAA,IAAA;AAAA,EAAA,OAAA;AAAA;;;;;;"}