@speckle/ui-components 2.21.2 → 2.22.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.
- package/.vscode/settings.json +3 -0
- package/dist/{AvatarEditor-f04b220d.cjs → AvatarEditor-1b6423eb.cjs} +2 -2
- package/dist/{AvatarEditor-f04b220d.cjs.map → AvatarEditor-1b6423eb.cjs.map} +1 -1
- package/dist/{AvatarEditor-911ee3da.js → AvatarEditor-664d2235.js} +2 -2
- package/dist/{AvatarEditor-911ee3da.js.map → AvatarEditor-664d2235.js.map} +1 -1
- package/dist/components/common/text/Link.vue.d.ts +3 -3
- package/dist/components/form/Checkbox.vue.d.ts +3 -3
- package/dist/components/form/Radio.vue.d.ts +4 -4
- package/dist/components/form/Switch.vue.d.ts +12 -12
- package/dist/components/form/TextArea.vue.d.ts +1 -1
- package/dist/components/form/TextInput.vue.d.ts +58 -5
- package/dist/components/form/select/Base.vue.d.ts +15 -12
- package/dist/components/form/select/SourceApps.vue.d.ts +2 -2
- package/dist/components/layout/Menu.vue.d.ts +1 -1
- package/dist/components/layout/sidebar/Promo.vue.d.ts +25 -0
- package/dist/components/layout/sidebar/Sidebar.vue.d.ts +1 -0
- package/dist/components/user/Avatar.vue.d.ts +2 -0
- package/dist/components/user/AvatarGroup.vue.d.ts +5 -0
- package/dist/composables/form/textInput.d.ts +2 -0
- package/dist/composables/user/avatar.d.ts +1 -1
- package/dist/lib.cjs +1 -1
- package/dist/lib.cjs.map +1 -1
- package/dist/lib.d.ts +2 -1
- package/dist/lib.js +1595 -1465
- package/dist/lib.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -4
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("@heroicons/vue/24/outline"),R=require("vue-advanced-cropper");require("vue-advanced-cropper/dist/style.css");const o=require("./lib.cjs"),c=require("vue-tippy");require("lodash");require("@heroicons/vue/
|
|
2
|
-
//# sourceMappingURL=AvatarEditor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("@heroicons/vue/24/outline"),R=require("vue-advanced-cropper");require("vue-advanced-cropper/dist/style.css");const o=require("./lib.cjs"),c=require("vue-tippy");require("lodash");require("@heroicons/vue/20/solid");require("@speckle/shared");require("vee-validate");require("nanoid");require("@vueuse/core");require("@headlessui/vue");require("@heroicons/vue/24/solid");require("v3-infinite-loading");const B={class:"flex flex-col space-y-2"},_={class:"flex"},F={class:"flex mx-14 space-x-2"},z=e.createElementVNode("div",{class:"grow"},null,-1),D=e.defineComponent({__name:"AvatarEditor",props:{user:null,disabled:{type:Boolean},size:null},emits:["cancel","save"],setup(s,{emit:h}){const m=h,d=s,i=e.ref(null),f=e.ref(null),a=e.ref(null),r=e.ref(null),u=e.computed(()=>{switch(d.size){case"xs":return{width:64,height:64};case"xxl":return{width:140,height:140};case"editable":return{width:240,height:240};case"base":default:return{width:32,height:32}}}),p=t=>{r.value&&URL.revokeObjectURL(r.value),r.value=t},x=t=>{const l=t.files[0];l&&(a.value=l)},g=t=>{var l;return t?"border-primary":(l=a.value)!=null&&l.error?"border-danger":"border-outline-2"},C=()=>{var t;return(t=i.value)==null?void 0:t.rotate(-90)},w=()=>{var t;return(t=i.value)==null?void 0:t.rotate(90)},k=()=>{var t;return(t=i.value)==null?void 0:t.flip(1,0)},N=()=>{var t;return(t=i.value)==null?void 0:t.flip(0,1)},V=()=>{var t;return(t=f.value)==null?void 0:t.triggerPicker()},b=()=>{a.value=null,r.value=null},y=()=>{var l;const t=((l=i.value)==null?void 0:l.getResult().canvas.toDataURL("image/jpeg",.85))||null;m("save",t)};return e.onUnmounted(()=>{p(null)}),e.watch(()=>d.user.avatar,t=>{r.value=t||null},{immediate:!0}),e.watch(a,t=>{r.value=t!=null&&t.file&&!t.error?URL.createObjectURL(t.file):null},{deep:!0}),(t,l)=>(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("div",_,[e.createElementVNode("div",{class:e.normalizeClass(["flex flex-col px-2 space-y-1",{invisible:!r.value}])},[e.withDirectives(e.createVNode(o.FormButton,{"icon-left":e.unref(n.ArrowUturnLeftIcon),"hide-text":"",color:"outline",onClick:C},null,8,["icon-left"]),[[e.unref(c.directive),"Rotate left"]]),e.withDirectives(e.createVNode(o.FormButton,{"icon-left":e.unref(n.ArrowUturnRightIcon),"hide-text":"",color:"outline",onClick:w},null,8,["icon-left"]),[[e.unref(c.directive),"Rotate right"]]),e.withDirectives(e.createVNode(o.FormButton,{"icon-left":e.unref(n.ArrowUpOnSquareIcon),"hide-text":"",color:"outline",onClick:N},null,8,["icon-left"]),[[e.unref(c.directive),"Flip vertically"]]),e.withDirectives(e.createVNode(o.FormButton,{"icon-left":e.unref(n.ArrowLeftOnRectangleIcon),"hide-text":"",color:"outline",onClick:k},null,8,["icon-left"]),[[e.unref(c.directive),"Flip horizontally"]])],2),r.value?(e.openBlock(),e.createBlock(e.unref(R.Cropper),{key:0,ref_key:"cropper",ref:i,class:"cropper",src:r.value,"stencil-props":{aspectRatio:1/1},canvas:u.value,style:e.normalizeStyle(`width: ${u.value.width}px; height: ${u.value.height}px`)},null,8,["src","canvas","style"])):e.createCommentVNode("",!0),e.createVNode(o.FormFileUploadZone,{ref_key:"uploadZone",ref:f,class:e.normalizeClass(["cropper flex items-center justify-center",{hidden:r.value}]),accept:"image/*","size-limit":5*1024*1024,onFilesSelected:x},{default:e.withCtx(({isDraggingFiles:v,activatorOn:q})=>[e.createElementVNode("div",e.mergeProps({class:["cursor-pointer text-center w-full h-full border-dashed border-2 rounded-md p-4 flex items-center justify-center text-sm text-foreground-2",[g(v)]]},e.toHandlers(q,!0))," Click here or drag and drop an image ",16)]),_:1},8,["class"]),e.createElementVNode("div",{class:e.normalizeClass(["flex flex-col px-2 space-y-1",{invisible:!r.value}])},[e.withDirectives(e.createVNode(o.FormButton,{"icon-left":e.unref(n.PhotoIcon),"hide-text":"",onClick:V},null,8,["icon-left"]),[[e.unref(c.directive),"Replace image"]]),e.withDirectives(e.createVNode(o.FormButton,{"icon-left":e.unref(n.XMarkIcon),"hide-text":"",color:"danger",onClick:b},null,8,["icon-left"]),[[e.unref(c.directive),"Remove"]])],2)]),e.createElementVNode("div",F,[z,e.createVNode(o.FormButton,{color:"outline",onClick:l[0]||(l[0]=v=>t.$emit("cancel"))},{default:e.withCtx(()=>[e.createTextVNode("Close")]),_:1}),e.createVNode(o.FormButton,{disabled:s.disabled,onClick:y},{default:e.withCtx(()=>[e.createTextVNode("Save")]),_:1},8,["disabled"])])]))}});exports.default=D;
|
|
2
|
+
//# sourceMappingURL=AvatarEditor-1b6423eb.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarEditor-
|
|
1
|
+
{"version":3,"file":"AvatarEditor-1b6423eb.cjs","sources":["../src/components/user/AvatarEditor.vue"],"sourcesContent":["<template>\n <div class=\"flex flex-col space-y-2\">\n <div class=\"flex\">\n <div class=\"flex flex-col px-2 space-y-1\" :class=\"{ invisible: !activeImageUrl }\">\n <FormButton\n v-tippy=\"'Rotate left'\"\n :icon-left=\"ArrowUturnLeftIcon\"\n hide-text\n color=\"outline\"\n @click=\"rotateLeft\"\n />\n <FormButton\n v-tippy=\"'Rotate right'\"\n :icon-left=\"ArrowUturnRightIcon\"\n hide-text\n color=\"outline\"\n @click=\"rotateRight\"\n />\n <FormButton\n v-tippy=\"'Flip vertically'\"\n :icon-left=\"ArrowUpOnSquareIcon\"\n hide-text\n color=\"outline\"\n @click=\"flipVertical\"\n />\n <FormButton\n v-tippy=\"'Flip horizontally'\"\n :icon-left=\"ArrowLeftOnRectangleIcon\"\n hide-text\n color=\"outline\"\n @click=\"flipHorizontal\"\n />\n </div>\n <Cropper\n v-if=\"activeImageUrl\"\n ref=\"cropper\"\n class=\"cropper\"\n :src=\"activeImageUrl\"\n :stencil-props=\"{\n aspectRatio: 1 / 1\n }\"\n :canvas=\"canvasSize\"\n :style=\"`width: ${canvasSize.width}px; height: ${canvasSize.height}px`\"\n />\n <FormFileUploadZone\n ref=\"uploadZone\"\n v-slot=\"{ isDraggingFiles, activatorOn }\"\n class=\"cropper flex items-center justify-center\"\n :class=\"{ hidden: activeImageUrl }\"\n accept=\"image/*\"\n :size-limit=\"5 * 1024 * 1024\"\n @files-selected=\"onFilesSelected\"\n >\n <div\n class=\"cursor-pointer text-center w-full h-full border-dashed border-2 rounded-md p-4 flex items-center justify-center text-sm text-foreground-2\"\n :class=\"[getDashedBorderClasses(isDraggingFiles)]\"\n v-on=\"activatorOn\"\n >\n Click here or drag and drop an image\n </div>\n </FormFileUploadZone>\n <div class=\"flex flex-col px-2 space-y-1\" :class=\"{ invisible: !activeImageUrl }\">\n <FormButton\n v-tippy=\"'Replace image'\"\n :icon-left=\"PhotoIcon\"\n hide-text\n @click=\"onReplace\"\n />\n <FormButton\n v-tippy=\"'Remove'\"\n :icon-left=\"XMarkIcon\"\n hide-text\n color=\"danger\"\n @click=\"onRemove\"\n />\n </div>\n </div>\n <div class=\"flex mx-14 space-x-2\">\n <div class=\"grow\" />\n <FormButton color=\"outline\" @click=\"$emit('cancel')\">Close</FormButton>\n <FormButton :disabled=\"disabled\" @click=\"onSave\">Save</FormButton>\n </div>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport {\n ArrowUturnLeftIcon,\n ArrowUturnRightIcon,\n ArrowLeftOnRectangleIcon,\n ArrowUpOnSquareIcon,\n XMarkIcon,\n PhotoIcon\n} from '@heroicons/vue/24/outline'\nimport type { Nullable } from '@speckle/shared'\nimport { onUnmounted, ref, watch, computed } from 'vue'\nimport { Cropper } from 'vue-advanced-cropper'\nimport 'vue-advanced-cropper/dist/style.css'\nimport FormButton from '~~/src/components/form/Button.vue'\nimport FormFileUploadZone from '~~/src/components/form/file-upload/Zone.vue'\nimport type { UploadableFileItem } from '~~/src/composables/form/fileUpload'\nimport type { AvatarUser, UserAvatarSize } from '~~/src/composables/user/avatar'\nimport { directive as vTippy } from 'vue-tippy'\n\n/**\n * Always try to lazy load this, as it's quite heavy\n */\n\nconst emit = defineEmits([\"cancel\", \"save\"])\n\nconst props = defineProps({\n user: null,\n disabled: { type: Boolean },\n size: null\n})\n\nconst cropper = ref(\n null as Nullable<{\n flip: (x: number, y: number) => void\n rotate: (angle: number) => void\n getResult: () => { canvas: HTMLCanvasElement }\n }>\n)\nconst uploadZone = ref(null as Nullable<{ triggerPicker: () => void }>)\nconst selectedUpload = ref(null as Nullable<UploadableFileItem>)\nconst activeImageUrl = ref(null as Nullable<string>)\n\nconst canvasSize = computed(() => {\n switch (props.size) {\n case 'xs' || 'sm' || 'lg' || 'xl':\n return { width: 64, height: 64 }\n case 'xxl':\n return { width: 140, height: 140 }\n case 'editable':\n return { width: 240, height: 240 }\n case 'base':\n default:\n return { width: 32, height: 32 }\n }\n})\n\nconst setNewActiveUrl = (url: Nullable<string>) => {\n if (activeImageUrl.value) {\n URL.revokeObjectURL(activeImageUrl.value)\n }\n\n activeImageUrl.value = url\n}\n\nconst onFilesSelected = (params: { files: UploadableFileItem[] }) => {\n const file = params.files[0]\n if (!file) return\n selectedUpload.value = file\n}\n\nconst getDashedBorderClasses = (isDraggingFiles: boolean) => {\n if (isDraggingFiles) return 'border-primary'\n if (selectedUpload.value?.error) return 'border-danger'\n\n return 'border-outline-2'\n}\n\nconst rotateLeft = () => cropper.value?.rotate(-90)\nconst rotateRight = () => cropper.value?.rotate(90)\nconst flipHorizontal = () => cropper.value?.flip(1, 0)\nconst flipVertical = () => cropper.value?.flip(0, 1)\n\nconst onReplace = () => uploadZone.value?.triggerPicker()\nconst onRemove = () => {\n selectedUpload.value = null\n activeImageUrl.value = null\n}\nconst onSave = () => {\n const newUrl = cropper.value?.getResult().canvas.toDataURL('image/jpeg', 0.85) || null\n emit('save', newUrl)\n}\n\nonUnmounted(() => {\n setNewActiveUrl(null)\n})\n\nwatch(\n () => props.user.avatar,\n (newAvatar) => {\n activeImageUrl.value = newAvatar || null\n },\n { immediate: true }\n)\n\nwatch(\n selectedUpload,\n (newUpload) => {\n activeImageUrl.value =\n newUpload?.file && !newUpload.error ? URL.createObjectURL(newUpload.file) : null\n },\n { deep: true }\n)\n</script>\n"],"names":["emit","__emit","props","__props","cropper","ref","uploadZone","selectedUpload","activeImageUrl","canvasSize","computed","setNewActiveUrl","url","onFilesSelected","params","file","getDashedBorderClasses","isDraggingFiles","_a","rotateLeft","rotateRight","flipHorizontal","flipVertical","onReplace","onRemove","onSave","newUrl","onUnmounted","watch","newAvatar","newUpload"],"mappings":"4xBA2GA,MAAMA,EAAOC,EAEPC,EAAQC,EAMRC,EAAUC,EAAA,IACd,IAAA,EAMIC,EAAaD,MAAI,IAA+C,EAChEE,EAAiBF,MAAI,IAAoC,EACzDG,EAAiBH,MAAI,IAAwB,EAE7CI,EAAaC,EAAAA,SAAS,IAAM,CAChC,OAAQR,EAAM,KAAM,CAClB,IAAK,KACH,MAAO,CAAE,MAAO,GAAI,OAAQ,EAAG,EACjC,IAAK,MACH,MAAO,CAAE,MAAO,IAAK,OAAQ,GAAI,EACnC,IAAK,WACH,MAAO,CAAE,MAAO,IAAK,OAAQ,GAAI,EACnC,IAAK,OACL,QACE,MAAO,CAAE,MAAO,GAAI,OAAQ,EAAG,CACnC,CAAA,CACD,EAEKS,EAAmBC,GAA0B,CAC7CJ,EAAe,OACb,IAAA,gBAAgBA,EAAe,KAAK,EAG1CA,EAAe,MAAQI,CAAA,EAGnBC,EAAmBC,GAA4C,CAC7D,MAAAC,EAAOD,EAAO,MAAM,CAAC,EACtBC,IACLR,EAAe,MAAQQ,EAAA,EAGnBC,EAA0BC,GAA6B,OACvD,OAAAA,EAAwB,kBACxBC,EAAAX,EAAe,QAAf,MAAAW,EAAsB,MAAc,gBAEjC,kBAAA,EAGHC,EAAa,IAAA,OAAM,OAAAD,EAAAd,EAAQ,QAAR,YAAAc,EAAe,OAAO,MACzCE,EAAc,IAAA,OAAM,OAAAF,EAAAd,EAAQ,QAAR,YAAAc,EAAe,OAAO,KAC1CG,EAAiB,IAAA,OAAM,OAAAH,EAAAd,EAAQ,QAAR,YAAAc,EAAe,KAAK,EAAG,IAC9CI,EAAe,IAAA,OAAM,OAAAJ,EAAAd,EAAQ,QAAR,YAAAc,EAAe,KAAK,EAAG,IAE5CK,EAAY,IAAM,OAAA,OAAAL,EAAAZ,EAAW,QAAX,YAAAY,EAAkB,iBACpCM,EAAW,IAAM,CACrBjB,EAAe,MAAQ,KACvBC,EAAe,MAAQ,IAAA,EAEnBiB,EAAS,IAAM,OACb,MAAAC,IAASR,EAAAd,EAAQ,QAAR,YAAAc,EAAe,YAAY,OAAO,UAAU,aAAc,OAAS,KAClFlB,EAAK,OAAQ0B,CAAM,CAAA,EAGrBC,OAAAA,EAAAA,YAAY,IAAM,CAChBhB,EAAgB,IAAI,CAAA,CACrB,EAEDiB,EAAA,MACE,IAAM1B,EAAM,KAAK,OAChB2B,GAAc,CACbrB,EAAe,MAAQqB,GAAa,IACtC,EACA,CAAE,UAAW,EAAK,CAAA,EAGpBD,EAAA,MACErB,EACCuB,GAAc,CACEtB,EAAA,MACbsB,GAAA,MAAAA,EAAW,MAAQ,CAACA,EAAU,MAAQ,IAAI,gBAAgBA,EAAU,IAAI,EAAI,IAChF,EACA,CAAE,KAAM,EAAK,CAAA"}
|
|
@@ -5,13 +5,13 @@ import "vue-advanced-cropper/dist/style.css";
|
|
|
5
5
|
import { FormButton as i, FormFileUploadZone as Q } from "./lib.js";
|
|
6
6
|
import { directive as a } from "vue-tippy";
|
|
7
7
|
import "lodash";
|
|
8
|
-
import "@heroicons/vue/24/solid";
|
|
9
8
|
import "@heroicons/vue/20/solid";
|
|
10
9
|
import "@speckle/shared";
|
|
11
10
|
import "vee-validate";
|
|
12
11
|
import "nanoid";
|
|
13
12
|
import "@vueuse/core";
|
|
14
13
|
import "@headlessui/vue";
|
|
14
|
+
import "@heroicons/vue/24/solid";
|
|
15
15
|
import "v3-infinite-loading";
|
|
16
16
|
const W = { class: "flex flex-col space-y-2" }, Y = { class: "flex" }, ee = { class: "flex mx-14 space-x-2" }, te = /* @__PURE__ */ s("div", { class: "grow" }, null, -1), xe = /* @__PURE__ */ j({
|
|
17
17
|
__name: "AvatarEditor",
|
|
@@ -192,4 +192,4 @@ const W = { class: "flex flex-col space-y-2" }, Y = { class: "flex" }, ee = { cl
|
|
|
192
192
|
export {
|
|
193
193
|
xe as default
|
|
194
194
|
};
|
|
195
|
-
//# sourceMappingURL=AvatarEditor-
|
|
195
|
+
//# sourceMappingURL=AvatarEditor-664d2235.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarEditor-
|
|
1
|
+
{"version":3,"file":"AvatarEditor-664d2235.js","sources":["../src/components/user/AvatarEditor.vue"],"sourcesContent":["<template>\n <div class=\"flex flex-col space-y-2\">\n <div class=\"flex\">\n <div class=\"flex flex-col px-2 space-y-1\" :class=\"{ invisible: !activeImageUrl }\">\n <FormButton\n v-tippy=\"'Rotate left'\"\n :icon-left=\"ArrowUturnLeftIcon\"\n hide-text\n color=\"outline\"\n @click=\"rotateLeft\"\n />\n <FormButton\n v-tippy=\"'Rotate right'\"\n :icon-left=\"ArrowUturnRightIcon\"\n hide-text\n color=\"outline\"\n @click=\"rotateRight\"\n />\n <FormButton\n v-tippy=\"'Flip vertically'\"\n :icon-left=\"ArrowUpOnSquareIcon\"\n hide-text\n color=\"outline\"\n @click=\"flipVertical\"\n />\n <FormButton\n v-tippy=\"'Flip horizontally'\"\n :icon-left=\"ArrowLeftOnRectangleIcon\"\n hide-text\n color=\"outline\"\n @click=\"flipHorizontal\"\n />\n </div>\n <Cropper\n v-if=\"activeImageUrl\"\n ref=\"cropper\"\n class=\"cropper\"\n :src=\"activeImageUrl\"\n :stencil-props=\"{\n aspectRatio: 1 / 1\n }\"\n :canvas=\"canvasSize\"\n :style=\"`width: ${canvasSize.width}px; height: ${canvasSize.height}px`\"\n />\n <FormFileUploadZone\n ref=\"uploadZone\"\n v-slot=\"{ isDraggingFiles, activatorOn }\"\n class=\"cropper flex items-center justify-center\"\n :class=\"{ hidden: activeImageUrl }\"\n accept=\"image/*\"\n :size-limit=\"5 * 1024 * 1024\"\n @files-selected=\"onFilesSelected\"\n >\n <div\n class=\"cursor-pointer text-center w-full h-full border-dashed border-2 rounded-md p-4 flex items-center justify-center text-sm text-foreground-2\"\n :class=\"[getDashedBorderClasses(isDraggingFiles)]\"\n v-on=\"activatorOn\"\n >\n Click here or drag and drop an image\n </div>\n </FormFileUploadZone>\n <div class=\"flex flex-col px-2 space-y-1\" :class=\"{ invisible: !activeImageUrl }\">\n <FormButton\n v-tippy=\"'Replace image'\"\n :icon-left=\"PhotoIcon\"\n hide-text\n @click=\"onReplace\"\n />\n <FormButton\n v-tippy=\"'Remove'\"\n :icon-left=\"XMarkIcon\"\n hide-text\n color=\"danger\"\n @click=\"onRemove\"\n />\n </div>\n </div>\n <div class=\"flex mx-14 space-x-2\">\n <div class=\"grow\" />\n <FormButton color=\"outline\" @click=\"$emit('cancel')\">Close</FormButton>\n <FormButton :disabled=\"disabled\" @click=\"onSave\">Save</FormButton>\n </div>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport {\n ArrowUturnLeftIcon,\n ArrowUturnRightIcon,\n ArrowLeftOnRectangleIcon,\n ArrowUpOnSquareIcon,\n XMarkIcon,\n PhotoIcon\n} from '@heroicons/vue/24/outline'\nimport type { Nullable } from '@speckle/shared'\nimport { onUnmounted, ref, watch, computed } from 'vue'\nimport { Cropper } from 'vue-advanced-cropper'\nimport 'vue-advanced-cropper/dist/style.css'\nimport FormButton from '~~/src/components/form/Button.vue'\nimport FormFileUploadZone from '~~/src/components/form/file-upload/Zone.vue'\nimport type { UploadableFileItem } from '~~/src/composables/form/fileUpload'\nimport type { AvatarUser, UserAvatarSize } from '~~/src/composables/user/avatar'\nimport { directive as vTippy } from 'vue-tippy'\n\n/**\n * Always try to lazy load this, as it's quite heavy\n */\n\nconst emit = defineEmits([\"cancel\", \"save\"])\n\nconst props = defineProps({\n user: null,\n disabled: { type: Boolean },\n size: null\n})\n\nconst cropper = ref(\n null as Nullable<{\n flip: (x: number, y: number) => void\n rotate: (angle: number) => void\n getResult: () => { canvas: HTMLCanvasElement }\n }>\n)\nconst uploadZone = ref(null as Nullable<{ triggerPicker: () => void }>)\nconst selectedUpload = ref(null as Nullable<UploadableFileItem>)\nconst activeImageUrl = ref(null as Nullable<string>)\n\nconst canvasSize = computed(() => {\n switch (props.size) {\n case 'xs' || 'sm' || 'lg' || 'xl':\n return { width: 64, height: 64 }\n case 'xxl':\n return { width: 140, height: 140 }\n case 'editable':\n return { width: 240, height: 240 }\n case 'base':\n default:\n return { width: 32, height: 32 }\n }\n})\n\nconst setNewActiveUrl = (url: Nullable<string>) => {\n if (activeImageUrl.value) {\n URL.revokeObjectURL(activeImageUrl.value)\n }\n\n activeImageUrl.value = url\n}\n\nconst onFilesSelected = (params: { files: UploadableFileItem[] }) => {\n const file = params.files[0]\n if (!file) return\n selectedUpload.value = file\n}\n\nconst getDashedBorderClasses = (isDraggingFiles: boolean) => {\n if (isDraggingFiles) return 'border-primary'\n if (selectedUpload.value?.error) return 'border-danger'\n\n return 'border-outline-2'\n}\n\nconst rotateLeft = () => cropper.value?.rotate(-90)\nconst rotateRight = () => cropper.value?.rotate(90)\nconst flipHorizontal = () => cropper.value?.flip(1, 0)\nconst flipVertical = () => cropper.value?.flip(0, 1)\n\nconst onReplace = () => uploadZone.value?.triggerPicker()\nconst onRemove = () => {\n selectedUpload.value = null\n activeImageUrl.value = null\n}\nconst onSave = () => {\n const newUrl = cropper.value?.getResult().canvas.toDataURL('image/jpeg', 0.85) || null\n emit('save', newUrl)\n}\n\nonUnmounted(() => {\n setNewActiveUrl(null)\n})\n\nwatch(\n () => props.user.avatar,\n (newAvatar) => {\n activeImageUrl.value = newAvatar || null\n },\n { immediate: true }\n)\n\nwatch(\n selectedUpload,\n (newUpload) => {\n activeImageUrl.value =\n newUpload?.file && !newUpload.error ? URL.createObjectURL(newUpload.file) : null\n },\n { deep: true }\n)\n</script>\n"],"names":["emit","__emit","props","__props","cropper","ref","uploadZone","selectedUpload","activeImageUrl","canvasSize","computed","setNewActiveUrl","url","onFilesSelected","params","file","getDashedBorderClasses","isDraggingFiles","_a","rotateLeft","rotateRight","flipHorizontal","flipVertical","onReplace","onRemove","onSave","newUrl","onUnmounted","watch","newAvatar","newUpload"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA2GA,UAAMA,IAAOC,GAEPC,IAAQC,GAMRC,IAAUC;AAAA,MACd;AAAA,IAAA,GAMIC,IAAaD,EAAI,IAA+C,GAChEE,IAAiBF,EAAI,IAAoC,GACzDG,IAAiBH,EAAI,IAAwB,GAE7CI,IAAaC,EAAS,MAAM;AAChC,cAAQR,EAAM,MAAM;AAAA,QAClB,KAAK;AACH,iBAAO,EAAE,OAAO,IAAI,QAAQ,GAAG;AAAA,QACjC,KAAK;AACH,iBAAO,EAAE,OAAO,KAAK,QAAQ,IAAI;AAAA,QACnC,KAAK;AACH,iBAAO,EAAE,OAAO,KAAK,QAAQ,IAAI;AAAA,QACnC,KAAK;AAAA,QACL;AACE,iBAAO,EAAE,OAAO,IAAI,QAAQ,GAAG;AAAA,MACnC;AAAA,IAAA,CACD,GAEKS,IAAkB,CAACC,MAA0B;AACjD,MAAIJ,EAAe,SACb,IAAA,gBAAgBA,EAAe,KAAK,GAG1CA,EAAe,QAAQI;AAAA,IAAA,GAGnBC,IAAkB,CAACC,MAA4C;AAC7D,YAAAC,IAAOD,EAAO,MAAM,CAAC;AAC3B,MAAKC,MACLR,EAAe,QAAQQ;AAAA,IAAA,GAGnBC,IAAyB,CAACC,MAA6B;;AACvD,aAAAA,IAAwB,oBACxBC,IAAAX,EAAe,UAAf,QAAAW,EAAsB,QAAc,kBAEjC;AAAA,IAAA,GAGHC,IAAa,MAAA;;AAAM,cAAAD,IAAAd,EAAQ,UAAR,gBAAAc,EAAe,OAAO;AAAA,OACzCE,IAAc,MAAA;;AAAM,cAAAF,IAAAd,EAAQ,UAAR,gBAAAc,EAAe,OAAO;AAAA,OAC1CG,IAAiB,MAAA;;AAAM,cAAAH,IAAAd,EAAQ,UAAR,gBAAAc,EAAe,KAAK,GAAG;AAAA,OAC9CI,IAAe,MAAA;;AAAM,cAAAJ,IAAAd,EAAQ,UAAR,gBAAAc,EAAe,KAAK,GAAG;AAAA,OAE5CK,IAAY,MAAM;;AAAA,cAAAL,IAAAZ,EAAW,UAAX,gBAAAY,EAAkB;AAAA,OACpCM,IAAW,MAAM;AACrB,MAAAjB,EAAe,QAAQ,MACvBC,EAAe,QAAQ;AAAA,IAAA,GAEnBiB,IAAS,MAAM;;AACb,YAAAC,MAASR,IAAAd,EAAQ,UAAR,gBAAAc,EAAe,YAAY,OAAO,UAAU,cAAc,UAAS;AAClF,MAAAlB,EAAK,QAAQ0B,CAAM;AAAA,IAAA;AAGrB,WAAAC,EAAY,MAAM;AAChB,MAAAhB,EAAgB,IAAI;AAAA,IAAA,CACrB,GAEDiB;AAAA,MACE,MAAM1B,EAAM,KAAK;AAAA,MACjB,CAAC2B,MAAc;AACb,QAAArB,EAAe,QAAQqB,KAAa;AAAA,MACtC;AAAA,MACA,EAAE,WAAW,GAAK;AAAA,IAAA,GAGpBD;AAAA,MACErB;AAAA,MACA,CAACuB,MAAc;AACE,QAAAtB,EAAA,QACbsB,KAAA,QAAAA,EAAW,QAAQ,CAACA,EAAU,QAAQ,IAAI,gBAAgBA,EAAU,IAAI,IAAI;AAAA,MAChF;AAAA,MACA,EAAE,MAAM,GAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -105,11 +105,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
105
105
|
}>> & {
|
|
106
106
|
onClick?: ((val: MouseEvent) => any) | undefined;
|
|
107
107
|
}, {
|
|
108
|
-
to: Optional<string>;
|
|
109
108
|
size: LinkSize;
|
|
110
|
-
external: Optional<boolean>;
|
|
111
|
-
disabled: Optional<boolean>;
|
|
112
109
|
iconLeft: Nullable<PropAnyComponent>;
|
|
110
|
+
disabled: Optional<boolean>;
|
|
111
|
+
to: Optional<string>;
|
|
112
|
+
external: Optional<boolean>;
|
|
113
113
|
iconRight: Nullable<PropAnyComponent>;
|
|
114
114
|
hideText: boolean;
|
|
115
115
|
foregroundLink: boolean;
|
|
@@ -190,16 +190,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
190
190
|
}>> & {
|
|
191
191
|
"onUpdate:modelValue"?: ((val: ValueType) => any) | undefined;
|
|
192
192
|
}, {
|
|
193
|
-
disabled: boolean;
|
|
194
|
-
id: Optional<string>;
|
|
195
|
-
description: Optional<string>;
|
|
196
193
|
label: Optional<string>;
|
|
197
194
|
modelValue: false | ValueType;
|
|
198
195
|
value: Optional<string | true>;
|
|
196
|
+
disabled: boolean;
|
|
197
|
+
description: Optional<string>;
|
|
199
198
|
inlineDescription: boolean;
|
|
200
199
|
rules: RuleExpression<ValueType>;
|
|
201
200
|
validateOnMount: boolean;
|
|
202
201
|
showRequired: boolean;
|
|
202
|
+
id: Optional<string>;
|
|
203
203
|
hideLabel: boolean;
|
|
204
204
|
labelPosition: LabelPosition;
|
|
205
205
|
}, {}>;
|
|
@@ -195,17 +195,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
195
195
|
}>> & {
|
|
196
196
|
"onUpdate:modelValue"?: ((val: ValueType) => any) | undefined;
|
|
197
197
|
}, {
|
|
198
|
-
disabled: boolean;
|
|
199
|
-
id: Optional<string>;
|
|
200
|
-
description: Optional<string>;
|
|
201
198
|
label: Optional<string>;
|
|
202
|
-
icon: ConcreteComponent;
|
|
203
199
|
modelValue: false | ValueType;
|
|
204
200
|
value: Optional<string | true>;
|
|
201
|
+
disabled: boolean;
|
|
202
|
+
description: Optional<string>;
|
|
205
203
|
inlineDescription: boolean;
|
|
206
204
|
rules: RuleExpression<ValueType>;
|
|
207
205
|
validateOnMount: boolean;
|
|
208
206
|
showRequired: boolean;
|
|
207
|
+
id: Optional<string>;
|
|
209
208
|
hideLabel: boolean;
|
|
209
|
+
icon: ConcreteComponent;
|
|
210
210
|
}, {}>;
|
|
211
211
|
export default _default;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
2
|
modelValue: import("vue").PropType<boolean>;
|
|
3
|
-
disabled: {
|
|
4
|
-
type: import("vue").PropType<boolean>;
|
|
5
|
-
};
|
|
6
|
-
id: {
|
|
7
|
-
type: import("vue").PropType<string>;
|
|
8
|
-
};
|
|
9
3
|
label: {
|
|
10
4
|
type: import("vue").PropType<string>;
|
|
11
5
|
};
|
|
@@ -13,18 +7,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13
7
|
type: import("vue").PropType<string>;
|
|
14
8
|
required: true;
|
|
15
9
|
};
|
|
16
|
-
showLabel: {
|
|
17
|
-
type: import("vue").PropType<boolean>;
|
|
18
|
-
default: boolean;
|
|
19
|
-
};
|
|
20
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
-
modelValue: import("vue").PropType<boolean>;
|
|
22
10
|
disabled: {
|
|
23
11
|
type: import("vue").PropType<boolean>;
|
|
24
12
|
};
|
|
25
13
|
id: {
|
|
26
14
|
type: import("vue").PropType<string>;
|
|
27
15
|
};
|
|
16
|
+
showLabel: {
|
|
17
|
+
type: import("vue").PropType<boolean>;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
modelValue: import("vue").PropType<boolean>;
|
|
28
22
|
label: {
|
|
29
23
|
type: import("vue").PropType<string>;
|
|
30
24
|
};
|
|
@@ -32,6 +26,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
32
26
|
type: import("vue").PropType<string>;
|
|
33
27
|
required: true;
|
|
34
28
|
};
|
|
29
|
+
disabled: {
|
|
30
|
+
type: import("vue").PropType<boolean>;
|
|
31
|
+
};
|
|
32
|
+
id: {
|
|
33
|
+
type: import("vue").PropType<string>;
|
|
34
|
+
};
|
|
35
35
|
showLabel: {
|
|
36
36
|
type: import("vue").PropType<boolean>;
|
|
37
37
|
default: boolean;
|
|
@@ -77,8 +77,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
77
77
|
"onUpdate:modelValue"?: ((val: string) => any) | undefined;
|
|
78
78
|
onClear?: (() => any) | undefined;
|
|
79
79
|
}, {
|
|
80
|
-
color: InputColor;
|
|
81
80
|
modelValue: string;
|
|
81
|
+
color: InputColor;
|
|
82
82
|
useLabelInErrors: boolean;
|
|
83
83
|
}, {}>;
|
|
84
84
|
export default _default;
|
|
@@ -69,6 +69,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
69
69
|
type: BooleanConstructor;
|
|
70
70
|
default: boolean;
|
|
71
71
|
};
|
|
72
|
+
/**
|
|
73
|
+
* Whether to disable editing the component, making it read only
|
|
74
|
+
*/
|
|
75
|
+
readOnly: {
|
|
76
|
+
type: BooleanConstructor;
|
|
77
|
+
default: boolean;
|
|
78
|
+
};
|
|
72
79
|
/**
|
|
73
80
|
* vee-validate validation rules
|
|
74
81
|
*/
|
|
@@ -131,10 +138,18 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
131
138
|
type: BooleanConstructor;
|
|
132
139
|
default: boolean;
|
|
133
140
|
};
|
|
141
|
+
loading: {
|
|
142
|
+
type: BooleanConstructor;
|
|
143
|
+
default: boolean;
|
|
144
|
+
};
|
|
134
145
|
hideErrorMessage: {
|
|
135
146
|
type: BooleanConstructor;
|
|
136
147
|
default: boolean;
|
|
137
148
|
};
|
|
149
|
+
customErrorMessage: {
|
|
150
|
+
type: StringConstructor;
|
|
151
|
+
default: null;
|
|
152
|
+
};
|
|
138
153
|
wrapperClasses: {
|
|
139
154
|
type: StringConstructor;
|
|
140
155
|
default: () => string;
|
|
@@ -147,6 +162,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
147
162
|
type: PropType<LabelPosition>;
|
|
148
163
|
default: string;
|
|
149
164
|
};
|
|
165
|
+
rightIcon: {
|
|
166
|
+
type: PropType<Optional<PropAnyComponent>>;
|
|
167
|
+
default: undefined;
|
|
168
|
+
};
|
|
169
|
+
rightIconTitle: {
|
|
170
|
+
type: StringConstructor;
|
|
171
|
+
default: undefined;
|
|
172
|
+
};
|
|
150
173
|
}, {
|
|
151
174
|
focus: () => void;
|
|
152
175
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -162,6 +185,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
162
185
|
clear: () => void;
|
|
163
186
|
focus: () => void;
|
|
164
187
|
blur: () => void;
|
|
188
|
+
rightIconClick: () => void;
|
|
165
189
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
166
190
|
/**
|
|
167
191
|
* Input "type" value (changes behaviour & look)
|
|
@@ -226,6 +250,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
226
250
|
type: BooleanConstructor;
|
|
227
251
|
default: boolean;
|
|
228
252
|
};
|
|
253
|
+
/**
|
|
254
|
+
* Whether to disable editing the component, making it read only
|
|
255
|
+
*/
|
|
256
|
+
readOnly: {
|
|
257
|
+
type: BooleanConstructor;
|
|
258
|
+
default: boolean;
|
|
259
|
+
};
|
|
229
260
|
/**
|
|
230
261
|
* vee-validate validation rules
|
|
231
262
|
*/
|
|
@@ -288,10 +319,18 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
288
319
|
type: BooleanConstructor;
|
|
289
320
|
default: boolean;
|
|
290
321
|
};
|
|
322
|
+
loading: {
|
|
323
|
+
type: BooleanConstructor;
|
|
324
|
+
default: boolean;
|
|
325
|
+
};
|
|
291
326
|
hideErrorMessage: {
|
|
292
327
|
type: BooleanConstructor;
|
|
293
328
|
default: boolean;
|
|
294
329
|
};
|
|
330
|
+
customErrorMessage: {
|
|
331
|
+
type: StringConstructor;
|
|
332
|
+
default: null;
|
|
333
|
+
};
|
|
295
334
|
wrapperClasses: {
|
|
296
335
|
type: StringConstructor;
|
|
297
336
|
default: () => string;
|
|
@@ -304,6 +343,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
304
343
|
type: PropType<LabelPosition>;
|
|
305
344
|
default: string;
|
|
306
345
|
};
|
|
346
|
+
rightIcon: {
|
|
347
|
+
type: PropType<Optional<PropAnyComponent>>;
|
|
348
|
+
default: undefined;
|
|
349
|
+
};
|
|
350
|
+
rightIconTitle: {
|
|
351
|
+
type: StringConstructor;
|
|
352
|
+
default: undefined;
|
|
353
|
+
};
|
|
307
354
|
}>> & {
|
|
308
355
|
onFocus?: (() => any) | undefined;
|
|
309
356
|
onBlur?: (() => any) | undefined;
|
|
@@ -317,30 +364,36 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
317
364
|
}) => any) | undefined;
|
|
318
365
|
"onUpdate:modelValue"?: ((val: string) => any) | undefined;
|
|
319
366
|
onClear?: (() => any) | undefined;
|
|
367
|
+
onRightIconClick?: (() => any) | undefined;
|
|
320
368
|
}, {
|
|
321
369
|
size: InputSize;
|
|
322
|
-
fullWidth: boolean;
|
|
323
|
-
color: InputColor;
|
|
324
|
-
disabled: boolean;
|
|
325
|
-
placeholder: Optional<string>;
|
|
326
370
|
type: string;
|
|
327
371
|
label: Optional<string>;
|
|
328
|
-
customIcon: Optional<PropAnyComponent>;
|
|
329
372
|
modelValue: string;
|
|
373
|
+
disabled: boolean;
|
|
330
374
|
rules: RuleExpression<string>;
|
|
331
375
|
validateOnMount: boolean;
|
|
332
376
|
showRequired: boolean;
|
|
333
377
|
labelPosition: LabelPosition;
|
|
334
378
|
validateOnValueUpdate: boolean;
|
|
379
|
+
color: InputColor;
|
|
335
380
|
help: Optional<string>;
|
|
336
381
|
showLabel: boolean;
|
|
337
382
|
autoFocus: boolean;
|
|
338
383
|
showClear: boolean;
|
|
339
384
|
useLabelInErrors: boolean;
|
|
385
|
+
customErrorMessage: string;
|
|
340
386
|
hideErrorMessage: boolean;
|
|
387
|
+
placeholder: Optional<string>;
|
|
388
|
+
fullWidth: boolean;
|
|
341
389
|
showOptional: boolean;
|
|
390
|
+
readOnly: boolean;
|
|
391
|
+
customIcon: Optional<PropAnyComponent>;
|
|
342
392
|
inputClasses: string;
|
|
393
|
+
loading: boolean;
|
|
343
394
|
wrapperClasses: string;
|
|
395
|
+
rightIcon: Optional<PropAnyComponent>;
|
|
396
|
+
rightIconTitle: string;
|
|
344
397
|
}, {}>, {
|
|
345
398
|
"input-right"?(_: {}): any;
|
|
346
399
|
}>;
|
|
@@ -3,11 +3,7 @@ import type { MaybeAsync, Optional } from '@speckle/shared';
|
|
|
3
3
|
import type { RuleExpression } from 'vee-validate';
|
|
4
4
|
declare const _default: <SingleItem extends string | number | Record<string, unknown>>(__VLS_props: {
|
|
5
5
|
size?: Optional<"sm" | "base" | "lg" | "xl">;
|
|
6
|
-
disabled?: Optional<boolean>;
|
|
7
|
-
readonly placeholder?: string | undefined;
|
|
8
6
|
readonly label: string;
|
|
9
|
-
search?: boolean | undefined;
|
|
10
|
-
readonly name: string;
|
|
11
7
|
modelValue?: ([{
|
|
12
8
|
type: PropType<SingleItem | SingleItem[] | undefined>;
|
|
13
9
|
default: undefined;
|
|
@@ -16,13 +12,17 @@ declare const _default: <SingleItem extends string | number | Record<string, unk
|
|
|
16
12
|
default: undefined;
|
|
17
13
|
}) | undefined;
|
|
18
14
|
"onUpdate:modelValue"?: ((v: SingleItem | SingleItem[] | undefined) => any) | undefined;
|
|
15
|
+
readonly name: string;
|
|
16
|
+
disabled?: Optional<boolean>;
|
|
19
17
|
rules?: RuleExpression<SingleItem | SingleItem[] | undefined>;
|
|
20
18
|
validateOnMount?: boolean | undefined;
|
|
21
19
|
showRequired?: boolean | undefined;
|
|
22
20
|
validateOnValueUpdate?: boolean | undefined;
|
|
21
|
+
search?: boolean | undefined;
|
|
23
22
|
help?: Optional<string>;
|
|
24
23
|
showLabel?: boolean | undefined;
|
|
25
24
|
useLabelInErrors?: boolean | undefined;
|
|
25
|
+
readonly placeholder?: string | undefined;
|
|
26
26
|
showOptional?: boolean | undefined;
|
|
27
27
|
multiple?: boolean | undefined;
|
|
28
28
|
items?: SingleItem[] | undefined;
|
|
@@ -50,6 +50,7 @@ declare const _default: <SingleItem extends string | number | Record<string, unk
|
|
|
50
50
|
}): any;
|
|
51
51
|
"nothing-found"?(_: {}): any;
|
|
52
52
|
option?(_: {
|
|
53
|
+
class: string;
|
|
53
54
|
item: SingleItem;
|
|
54
55
|
active: boolean;
|
|
55
56
|
selected: boolean;
|
|
@@ -62,11 +63,7 @@ declare const _default: <SingleItem extends string | number | Record<string, unk
|
|
|
62
63
|
}>) => void) | undefined, __VLS_setup?: Promise<{
|
|
63
64
|
props: {
|
|
64
65
|
size?: Optional<"sm" | "base" | "lg" | "xl">;
|
|
65
|
-
disabled?: Optional<boolean>;
|
|
66
|
-
readonly placeholder?: string | undefined;
|
|
67
66
|
readonly label: string;
|
|
68
|
-
search?: boolean | undefined;
|
|
69
|
-
readonly name: string;
|
|
70
67
|
modelValue?: ([{
|
|
71
68
|
type: PropType<SingleItem | SingleItem[] | undefined>;
|
|
72
69
|
default: undefined;
|
|
@@ -75,13 +72,17 @@ declare const _default: <SingleItem extends string | number | Record<string, unk
|
|
|
75
72
|
default: undefined;
|
|
76
73
|
}) | undefined;
|
|
77
74
|
"onUpdate:modelValue"?: ((v: SingleItem | SingleItem[] | undefined) => any) | undefined;
|
|
75
|
+
readonly name: string;
|
|
76
|
+
disabled?: Optional<boolean>;
|
|
78
77
|
rules?: RuleExpression<SingleItem | SingleItem[] | undefined>;
|
|
79
78
|
validateOnMount?: boolean | undefined;
|
|
80
79
|
showRequired?: boolean | undefined;
|
|
81
80
|
validateOnValueUpdate?: boolean | undefined;
|
|
81
|
+
search?: boolean | undefined;
|
|
82
82
|
help?: Optional<string>;
|
|
83
83
|
showLabel?: boolean | undefined;
|
|
84
84
|
useLabelInErrors?: boolean | undefined;
|
|
85
|
+
readonly placeholder?: string | undefined;
|
|
85
86
|
showOptional?: boolean | undefined;
|
|
86
87
|
multiple?: boolean | undefined;
|
|
87
88
|
items?: SingleItem[] | undefined;
|
|
@@ -112,6 +113,7 @@ declare const _default: <SingleItem extends string | number | Record<string, unk
|
|
|
112
113
|
}): any;
|
|
113
114
|
"nothing-found"?(_: {}): any;
|
|
114
115
|
option?(_: {
|
|
116
|
+
class: string;
|
|
115
117
|
item: SingleItem;
|
|
116
118
|
active: boolean;
|
|
117
119
|
selected: boolean;
|
|
@@ -125,11 +127,7 @@ declare const _default: <SingleItem extends string | number | Record<string, unk
|
|
|
125
127
|
__ctx?: {
|
|
126
128
|
props: {
|
|
127
129
|
size?: Optional<"sm" | "base" | "lg" | "xl">;
|
|
128
|
-
disabled?: Optional<boolean>;
|
|
129
|
-
readonly placeholder?: string | undefined;
|
|
130
130
|
readonly label: string;
|
|
131
|
-
search?: boolean | undefined;
|
|
132
|
-
readonly name: string;
|
|
133
131
|
modelValue?: ([{
|
|
134
132
|
type: PropType<SingleItem | SingleItem[] | undefined>;
|
|
135
133
|
default: undefined;
|
|
@@ -138,13 +136,17 @@ declare const _default: <SingleItem extends string | number | Record<string, unk
|
|
|
138
136
|
default: undefined;
|
|
139
137
|
}) | undefined;
|
|
140
138
|
"onUpdate:modelValue"?: ((v: SingleItem | SingleItem[] | undefined) => any) | undefined;
|
|
139
|
+
readonly name: string;
|
|
140
|
+
disabled?: Optional<boolean>;
|
|
141
141
|
rules?: RuleExpression<SingleItem | SingleItem[] | undefined>;
|
|
142
142
|
validateOnMount?: boolean | undefined;
|
|
143
143
|
showRequired?: boolean | undefined;
|
|
144
144
|
validateOnValueUpdate?: boolean | undefined;
|
|
145
|
+
search?: boolean | undefined;
|
|
145
146
|
help?: Optional<string>;
|
|
146
147
|
showLabel?: boolean | undefined;
|
|
147
148
|
useLabelInErrors?: boolean | undefined;
|
|
149
|
+
readonly placeholder?: string | undefined;
|
|
148
150
|
showOptional?: boolean | undefined;
|
|
149
151
|
multiple?: boolean | undefined;
|
|
150
152
|
items?: SingleItem[] | undefined;
|
|
@@ -175,6 +177,7 @@ declare const _default: <SingleItem extends string | number | Record<string, unk
|
|
|
175
177
|
}): any;
|
|
176
178
|
"nothing-found"?(_: {}): any;
|
|
177
179
|
option?(_: {
|
|
180
|
+
class: string;
|
|
178
181
|
item: SingleItem;
|
|
179
182
|
active: boolean;
|
|
180
183
|
selected: boolean;
|
|
@@ -140,9 +140,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
140
140
|
}>> & {
|
|
141
141
|
"onUpdate:modelValue"?: ((v: ValueType) => any) | undefined;
|
|
142
142
|
}, {
|
|
143
|
-
search: boolean;
|
|
144
|
-
name: Optional<string>;
|
|
145
143
|
modelValue: ValueType;
|
|
144
|
+
name: Optional<string>;
|
|
145
|
+
search: boolean;
|
|
146
146
|
showLabel: boolean;
|
|
147
147
|
multiple: boolean;
|
|
148
148
|
items: Optional<SourceAppDefinition[]>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
title?: string | undefined;
|
|
3
|
+
text?: string | undefined;
|
|
4
|
+
to?: string | undefined;
|
|
5
|
+
buttonText?: string | undefined;
|
|
6
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
onClick: (...args: any[]) => void;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
9
|
+
title?: string | undefined;
|
|
10
|
+
text?: string | undefined;
|
|
11
|
+
to?: string | undefined;
|
|
12
|
+
buttonText?: string | undefined;
|
|
13
|
+
}>>> & {
|
|
14
|
+
onOnClick?: ((...args: any[]) => any) | undefined;
|
|
15
|
+
}, {}, {}>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
18
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
19
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
20
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
21
|
+
} : {
|
|
22
|
+
type: import('vue').PropType<T[K]>;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, {
|
|
2
2
|
default?(_: {}): any;
|
|
3
|
+
promo?(_: {}): any;
|
|
3
4
|
}>;
|
|
4
5
|
export default _default;
|
|
5
6
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -7,6 +7,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
7
7
|
active?: boolean | undefined;
|
|
8
8
|
noBorder?: boolean | undefined;
|
|
9
9
|
noBg?: boolean | undefined;
|
|
10
|
+
hideTooltip?: boolean | undefined;
|
|
10
11
|
}>, {
|
|
11
12
|
size: string;
|
|
12
13
|
hoverEffect: boolean;
|
|
@@ -18,6 +19,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
18
19
|
active?: boolean | undefined;
|
|
19
20
|
noBorder?: boolean | undefined;
|
|
20
21
|
noBg?: boolean | undefined;
|
|
22
|
+
hideTooltip?: boolean | undefined;
|
|
21
23
|
}>, {
|
|
22
24
|
size: string;
|
|
23
25
|
hoverEffect: boolean;
|
|
@@ -4,26 +4,31 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
4
4
|
overlap?: boolean | undefined;
|
|
5
5
|
size?: UserAvatarSize | undefined;
|
|
6
6
|
maxCount?: number | undefined;
|
|
7
|
+
hideTooltips?: boolean | undefined;
|
|
7
8
|
}>, {
|
|
8
9
|
users: () => never[];
|
|
9
10
|
overlap: boolean;
|
|
10
11
|
size: string;
|
|
11
12
|
maxCount: undefined;
|
|
13
|
+
hideTooltips: boolean;
|
|
12
14
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
13
15
|
users: AvatarUserWithId[];
|
|
14
16
|
overlap?: boolean | undefined;
|
|
15
17
|
size?: UserAvatarSize | undefined;
|
|
16
18
|
maxCount?: number | undefined;
|
|
19
|
+
hideTooltips?: boolean | undefined;
|
|
17
20
|
}>, {
|
|
18
21
|
users: () => never[];
|
|
19
22
|
overlap: boolean;
|
|
20
23
|
size: string;
|
|
21
24
|
maxCount: undefined;
|
|
25
|
+
hideTooltips: boolean;
|
|
22
26
|
}>>>, {
|
|
23
27
|
size: UserAvatarSize;
|
|
24
28
|
users: AvatarUserWithId[];
|
|
25
29
|
overlap: boolean;
|
|
26
30
|
maxCount: number;
|
|
31
|
+
hideTooltips: boolean;
|
|
27
32
|
}, {}>;
|
|
28
33
|
export default _default;
|
|
29
34
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -19,6 +19,7 @@ export declare function useTextInputCore<V extends string | string[] = string>(p
|
|
|
19
19
|
autoFocus?: boolean;
|
|
20
20
|
showClear?: boolean;
|
|
21
21
|
useLabelInErrors?: boolean;
|
|
22
|
+
customErrorMessage?: string;
|
|
22
23
|
hideErrorMessage?: boolean;
|
|
23
24
|
color?: InputColor;
|
|
24
25
|
labelPosition?: LabelPosition;
|
|
@@ -48,6 +49,7 @@ export declare function useTextInputCore<V extends string | string[] = string>(p
|
|
|
48
49
|
focus: () => void;
|
|
49
50
|
labelClasses: import("vue").ComputedRef<string>;
|
|
50
51
|
shouldShowClear: import("vue").ComputedRef<boolean>;
|
|
52
|
+
hasError: import("vue").ComputedRef<boolean>;
|
|
51
53
|
};
|
|
52
54
|
type FormInputChangeEvent = {
|
|
53
55
|
event?: Event;
|