@davincihealthcare/elty-design-system-vue 1.72.2 → 1.73.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/dist/forms/ElInputCheckbox.vue.d.ts +22 -0
- package/dist/forms/ElInputDate.vue.d.ts +22 -0
- package/dist/forms/ElInputMeasureUnit.vue.d.ts +22 -0
- package/dist/forms/ElInputNumber.vue.cjs2.js +1 -1
- package/dist/forms/ElInputNumber.vue.cjs2.js.map +1 -1
- package/dist/forms/ElInputNumber.vue.d.ts +22 -0
- package/dist/forms/ElInputNumber.vue.esm2.js +1 -1
- package/dist/forms/ElInputNumber.vue.esm2.js.map +1 -1
- package/dist/forms/input.cjs.js +1 -1
- package/dist/forms/input.cjs.js.map +1 -1
- package/dist/forms/input.d.ts +10 -0
- package/dist/forms/input.esm.js +1 -1
- package/dist/forms/input.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -36,6 +36,16 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
36
36
|
default: number;
|
|
37
37
|
required: boolean;
|
|
38
38
|
};
|
|
39
|
+
min: {
|
|
40
|
+
type: NumberConstructor;
|
|
41
|
+
default: undefined;
|
|
42
|
+
required: boolean;
|
|
43
|
+
};
|
|
44
|
+
max: {
|
|
45
|
+
type: NumberConstructor;
|
|
46
|
+
default: undefined;
|
|
47
|
+
required: boolean;
|
|
48
|
+
};
|
|
39
49
|
name: {
|
|
40
50
|
type: StringConstructor;
|
|
41
51
|
required: boolean;
|
|
@@ -103,6 +113,16 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
103
113
|
default: number;
|
|
104
114
|
required: boolean;
|
|
105
115
|
};
|
|
116
|
+
min: {
|
|
117
|
+
type: NumberConstructor;
|
|
118
|
+
default: undefined;
|
|
119
|
+
required: boolean;
|
|
120
|
+
};
|
|
121
|
+
max: {
|
|
122
|
+
type: NumberConstructor;
|
|
123
|
+
default: undefined;
|
|
124
|
+
required: boolean;
|
|
125
|
+
};
|
|
106
126
|
name: {
|
|
107
127
|
type: StringConstructor;
|
|
108
128
|
required: boolean;
|
|
@@ -152,6 +172,8 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
152
172
|
modelValue: boolean | "indeterminate";
|
|
153
173
|
errorMessage: string | boolean;
|
|
154
174
|
hiddenErrorMessage: boolean;
|
|
175
|
+
min: number;
|
|
176
|
+
max: number;
|
|
155
177
|
inputClass: string;
|
|
156
178
|
validation: import('./validation-rules').InputValidation;
|
|
157
179
|
}, {}>, {
|
|
@@ -21,6 +21,16 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
21
21
|
default: number;
|
|
22
22
|
required: boolean;
|
|
23
23
|
};
|
|
24
|
+
min: {
|
|
25
|
+
type: NumberConstructor;
|
|
26
|
+
default: undefined;
|
|
27
|
+
required: boolean;
|
|
28
|
+
};
|
|
29
|
+
max: {
|
|
30
|
+
type: NumberConstructor;
|
|
31
|
+
default: undefined;
|
|
32
|
+
required: boolean;
|
|
33
|
+
};
|
|
24
34
|
name: {
|
|
25
35
|
type: StringConstructor;
|
|
26
36
|
required: boolean;
|
|
@@ -77,6 +87,16 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
77
87
|
default: number;
|
|
78
88
|
required: boolean;
|
|
79
89
|
};
|
|
90
|
+
min: {
|
|
91
|
+
type: NumberConstructor;
|
|
92
|
+
default: undefined;
|
|
93
|
+
required: boolean;
|
|
94
|
+
};
|
|
95
|
+
max: {
|
|
96
|
+
type: NumberConstructor;
|
|
97
|
+
default: undefined;
|
|
98
|
+
required: boolean;
|
|
99
|
+
};
|
|
80
100
|
name: {
|
|
81
101
|
type: StringConstructor;
|
|
82
102
|
required: boolean;
|
|
@@ -125,6 +145,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
125
145
|
step: number;
|
|
126
146
|
errorMessage: string | boolean;
|
|
127
147
|
hiddenErrorMessage: boolean;
|
|
148
|
+
min: number;
|
|
149
|
+
max: number;
|
|
128
150
|
validation: import('./validation-rules').InputValidation;
|
|
129
151
|
}, {}>;
|
|
130
152
|
export default _default;
|
|
@@ -34,6 +34,16 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
34
34
|
default: number;
|
|
35
35
|
required: boolean;
|
|
36
36
|
};
|
|
37
|
+
min: {
|
|
38
|
+
type: NumberConstructor;
|
|
39
|
+
default: undefined;
|
|
40
|
+
required: boolean;
|
|
41
|
+
};
|
|
42
|
+
max: {
|
|
43
|
+
type: NumberConstructor;
|
|
44
|
+
default: undefined;
|
|
45
|
+
required: boolean;
|
|
46
|
+
};
|
|
37
47
|
name: {
|
|
38
48
|
type: StringConstructor;
|
|
39
49
|
required: boolean;
|
|
@@ -100,6 +110,16 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
100
110
|
default: number;
|
|
101
111
|
required: boolean;
|
|
102
112
|
};
|
|
113
|
+
min: {
|
|
114
|
+
type: NumberConstructor;
|
|
115
|
+
default: undefined;
|
|
116
|
+
required: boolean;
|
|
117
|
+
};
|
|
118
|
+
max: {
|
|
119
|
+
type: NumberConstructor;
|
|
120
|
+
default: undefined;
|
|
121
|
+
required: boolean;
|
|
122
|
+
};
|
|
103
123
|
name: {
|
|
104
124
|
type: StringConstructor;
|
|
105
125
|
required: boolean;
|
|
@@ -147,6 +167,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
147
167
|
step: number;
|
|
148
168
|
errorMessage: string | boolean;
|
|
149
169
|
hiddenErrorMessage: boolean;
|
|
170
|
+
min: number;
|
|
171
|
+
max: number;
|
|
150
172
|
validation: import('./validation-rules').InputValidation;
|
|
151
173
|
availableUnitCategory: keyof MeasureUnitTypes;
|
|
152
174
|
defaultUnit: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("vue"),M=require("./ElInputContainer.vue.cjs2.js"),o=require("./input.cjs.js"),N=["id","name","type","step","min","max","placeholder","disabled","data-cy"],w=l.defineComponent({__name:"ElInputNumber",props:{...o.withNumberElInputProps(),isTwoDecimals:{type:Boolean,default:!1},defaultNullValueToZeroOnBlur:{type:Boolean,default:!0}},emits:["update:modelValue","overlayedBtnClicked","update:formattedAmount"],setup(d,{emit:m}){const r=d,n=m,p=l.ref(!1),f=l.computed(()=>r.modelValue),v=l.computed(()=>[r.validation]),{value:a,errorMessage:c,uuid:s,fieldContext:b}=o.useInput(f,v,r.name,e=>{n("update:modelValue",e),n("update:formattedAmount",u.value)}),u=l.computed({get:()=>a.value===null||a.value===void 0||typeof a.value=="string"&&a.value===""?null:typeof a.value=="string"?Number(a.value):r.isTwoDecimals?parseFloat((a.value/100).toFixed(2)):a.value,set:e=>{if(e===""||e===null){a.value=null;return}const t=Number(e);isNaN(t)||(r.isTwoDecimals?a.value=Math.round(t*100):a.value=t)}}),g=()=>{b.validate(),r.defaultNullValueToZeroOnBlur&&y()},y=()=>{a.value||(a.value=0)};return(e,t)=>(l.openBlock(),l.createBlock(M.default,l.mergeProps(e.$attrs,{name:l.unref(s),label:e.label,"error-message":r.errorMessage===!1?!1:r.errorMessage||l.unref(c),"hidden-error-message":e.hiddenErrorMessage,"set-required-mark":l.unref(o.showRequiredMark)([e.validation])}),{default:l.withCtx(({error:h})=>[l.withDirectives(l.createElementVNode("input",{id:l.unref(s),name:r.name,"onUpdate:modelValue":[t[0]||(t[0]=i=>u.value=i),t[1]||(t[1]=i=>p.value=!0)],type:r.isTwoDecimals?"text":"number",step:e.step,min:e.min,max:e.max,placeholder:e.placeholder,disabled:e.disabled,class:l.normalizeClass(["el-input",{error:h}]),"data-cy":e.label?`${e.label.trim().replaceAll(" ","")}-number-input`:"number-input",onBlur:g},null,42,N),[[l.vModelDynamic,u.value]])]),_:1},16,["name","label","error-message","hidden-error-message","set-required-mark"]))}});exports.default=w;
|
|
2
2
|
//# sourceMappingURL=ElInputNumber.vue.cjs2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElInputNumber.vue.cjs2.js","sources":["../../src/forms/ElInputNumber.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport ElInputContainer from '@/forms/ElInputContainer.vue';\nimport { useInput, NumberValueType, showRequiredMark, withNumberElInputProps } from '@/forms/input';\nimport { computed, ref } from 'vue';\n\nconst props = defineProps({\n ...withNumberElInputProps(),\n isTwoDecimals: {\n type: Boolean,\n default: false,\n },\n defaultNullValueToZeroOnBlur: {\n type: Boolean,\n default: true,\n },\n});\n\nconst emit = defineEmits<{\n (event: 'update:modelValue', value: NumberValueType): void;\n (event: 'overlayedBtnClicked'): void;\n (event: 'update:formattedAmount', value: NumberValueType): void;\n}>();\n\nconst showOverlayedIcon = ref(false);\nconst computedModelValue = computed(() => {\n return props.modelValue;\n});\n\nconst computedValidation = computed(() => [props.validation]);\n\nconst { value, errorMessage, uuid, fieldContext } = useInput(computedModelValue, computedValidation, props.name, newValue => {\n emit('update:modelValue', newValue);\n emit('update:formattedAmount', formattedAmount.value);\n});\n\nconst formattedAmount = computed<number | null>({\n get: () => {\n if (value.value === null || value.value === undefined) return null;\n if (typeof value.value === 'string' && value.value === '') return null;\n if (typeof value.value === 'string') return Number(value.value);\n\n if (props.isTwoDecimals) {\n return parseFloat((value.value / 100).toFixed(2));\n }\n\n return value.value;\n },\n set: (inputValue: number | null | string) => {\n if (inputValue === '' || inputValue === null) {\n value.value = null;\n return;\n }\n\n const numValue = Number(inputValue);\n if (!isNaN(numValue)) {\n if (props.isTwoDecimals) {\n value.value = Math.round(numValue * 100);\n } else {\n value.value = numValue;\n }\n }\n },\n});\n\nconst onBlur = () => {\n fieldContext.validate();\n\n if (props.defaultNullValueToZeroOnBlur) {\n resetNullValueToZero();\n }\n};\n\nconst resetNullValueToZero = () => {\n if (!value.value) {\n value.value = 0;\n }\n};\n</script>\n\n<template>\n <ElInputContainer\n v-bind=\"$attrs\"\n :name=\"uuid\"\n :label=\"label\"\n :error-message=\"props.errorMessage === false ? false : props.errorMessage || errorMessage\"\n :hidden-error-message=\"hiddenErrorMessage\"\n :set-required-mark=\"showRequiredMark([validation])\"\n >\n <template #default=\"{ error }\">\n <input\n :id=\"uuid\"\n :name=\"props.name\"\n v-model=\"formattedAmount\"\n :type=\"props.isTwoDecimals ? 'text' : 'number'\"\n :step=\"step\"\n :placeholder=\"placeholder\"\n :disabled=\"disabled\"\n class=\"el-input\"\n :class=\"{ error }\"\n :data-cy=\"label ? `${label.trim().replaceAll(' ', '')}-number-input` : `number-input`\"\n @blur=\"onBlur\"\n @update:model-value=\"showOverlayedIcon = true\"\n />\n </template>\n </ElInputContainer>\n</template>\n"],"names":["props","__props","emit","__emit","showOverlayedIcon","ref","computedModelValue","computed","computedValidation","value","errorMessage","uuid","fieldContext","useInput","newValue","formattedAmount","inputValue","numValue","onBlur","resetNullValueToZero"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ElInputNumber.vue.cjs2.js","sources":["../../src/forms/ElInputNumber.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport ElInputContainer from '@/forms/ElInputContainer.vue';\nimport { useInput, NumberValueType, showRequiredMark, withNumberElInputProps } from '@/forms/input';\nimport { computed, ref } from 'vue';\n\nconst props = defineProps({\n ...withNumberElInputProps(),\n isTwoDecimals: {\n type: Boolean,\n default: false,\n },\n defaultNullValueToZeroOnBlur: {\n type: Boolean,\n default: true,\n },\n});\n\nconst emit = defineEmits<{\n (event: 'update:modelValue', value: NumberValueType): void;\n (event: 'overlayedBtnClicked'): void;\n (event: 'update:formattedAmount', value: NumberValueType): void;\n}>();\n\nconst showOverlayedIcon = ref(false);\nconst computedModelValue = computed(() => {\n return props.modelValue;\n});\n\nconst computedValidation = computed(() => [props.validation]);\n\nconst { value, errorMessage, uuid, fieldContext } = useInput(computedModelValue, computedValidation, props.name, newValue => {\n emit('update:modelValue', newValue);\n emit('update:formattedAmount', formattedAmount.value);\n});\n\nconst formattedAmount = computed<number | null>({\n get: () => {\n if (value.value === null || value.value === undefined) return null;\n if (typeof value.value === 'string' && value.value === '') return null;\n if (typeof value.value === 'string') return Number(value.value);\n\n if (props.isTwoDecimals) {\n return parseFloat((value.value / 100).toFixed(2));\n }\n\n return value.value;\n },\n set: (inputValue: number | null | string) => {\n if (inputValue === '' || inputValue === null) {\n value.value = null;\n return;\n }\n\n const numValue = Number(inputValue);\n if (!isNaN(numValue)) {\n if (props.isTwoDecimals) {\n value.value = Math.round(numValue * 100);\n } else {\n value.value = numValue;\n }\n }\n },\n});\n\nconst onBlur = () => {\n fieldContext.validate();\n\n if (props.defaultNullValueToZeroOnBlur) {\n resetNullValueToZero();\n }\n};\n\nconst resetNullValueToZero = () => {\n if (!value.value) {\n value.value = 0;\n }\n};\n</script>\n\n<template>\n <ElInputContainer\n v-bind=\"$attrs\"\n :name=\"uuid\"\n :label=\"label\"\n :error-message=\"props.errorMessage === false ? false : props.errorMessage || errorMessage\"\n :hidden-error-message=\"hiddenErrorMessage\"\n :set-required-mark=\"showRequiredMark([validation])\"\n >\n <template #default=\"{ error }\">\n <input\n :id=\"uuid\"\n :name=\"props.name\"\n v-model=\"formattedAmount\"\n :type=\"props.isTwoDecimals ? 'text' : 'number'\"\n :step=\"step\"\n :min=\"min\"\n :max=\"max\"\n :placeholder=\"placeholder\"\n :disabled=\"disabled\"\n class=\"el-input\"\n :class=\"{ error }\"\n :data-cy=\"label ? `${label.trim().replaceAll(' ', '')}-number-input` : `number-input`\"\n @blur=\"onBlur\"\n @update:model-value=\"showOverlayedIcon = true\"\n />\n </template>\n </ElInputContainer>\n</template>\n"],"names":["props","__props","emit","__emit","showOverlayedIcon","ref","computedModelValue","computed","computedValidation","value","errorMessage","uuid","fieldContext","useInput","newValue","formattedAmount","inputValue","numValue","onBlur","resetNullValueToZero"],"mappings":"siBAKA,MAAMA,EAAQC,EAYRC,EAAOC,EAMPC,EAAoBC,MAAI,EAAK,EAC7BC,EAAqBC,EAAAA,SAAS,IAC3BP,EAAM,UACd,EAEKQ,EAAqBD,EAAAA,SAAS,IAAM,CAACP,EAAM,UAAU,CAAC,EAEtD,CAAE,MAAAS,EAAO,aAAAC,EAAc,KAAAC,EAAM,aAAAC,CAAiB,EAAAC,WAASP,EAAoBE,EAAoBR,EAAM,KAAkBc,GAAA,CAC3HZ,EAAK,oBAAqBY,CAAQ,EAC7BZ,EAAA,yBAA0Ba,EAAgB,KAAK,CAAA,CACrD,EAEKA,EAAkBR,EAAAA,SAAwB,CAC9C,IAAK,IACCE,EAAM,QAAU,MAAQA,EAAM,QAAU,QACxC,OAAOA,EAAM,OAAU,UAAYA,EAAM,QAAU,GAAW,KAC9D,OAAOA,EAAM,OAAU,SAAiB,OAAOA,EAAM,KAAK,EAE1DT,EAAM,cACD,YAAYS,EAAM,MAAQ,KAAK,QAAQ,CAAC,CAAC,EAG3CA,EAAM,MAEf,IAAMO,GAAuC,CACvC,GAAAA,IAAe,IAAMA,IAAe,KAAM,CAC5CP,EAAM,MAAQ,KACd,MACF,CAEM,MAAAQ,EAAW,OAAOD,CAAU,EAC7B,MAAMC,CAAQ,IACbjB,EAAM,cACRS,EAAM,MAAQ,KAAK,MAAMQ,EAAW,GAAG,EAEvCR,EAAM,MAAQQ,EAGpB,CAAA,CACD,EAEKC,EAAS,IAAM,CACnBN,EAAa,SAAS,EAElBZ,EAAM,8BACamB,GACvB,EAGIA,EAAuB,IAAM,CAC5BV,EAAM,QACTA,EAAM,MAAQ,EAChB"}
|
|
@@ -22,6 +22,16 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
22
22
|
default: number;
|
|
23
23
|
required: boolean;
|
|
24
24
|
};
|
|
25
|
+
min: {
|
|
26
|
+
type: NumberConstructor;
|
|
27
|
+
default: undefined;
|
|
28
|
+
required: boolean;
|
|
29
|
+
};
|
|
30
|
+
max: {
|
|
31
|
+
type: NumberConstructor;
|
|
32
|
+
default: undefined;
|
|
33
|
+
required: boolean;
|
|
34
|
+
};
|
|
25
35
|
name: {
|
|
26
36
|
type: StringConstructor;
|
|
27
37
|
required: boolean;
|
|
@@ -83,6 +93,16 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
83
93
|
default: number;
|
|
84
94
|
required: boolean;
|
|
85
95
|
};
|
|
96
|
+
min: {
|
|
97
|
+
type: NumberConstructor;
|
|
98
|
+
default: undefined;
|
|
99
|
+
required: boolean;
|
|
100
|
+
};
|
|
101
|
+
max: {
|
|
102
|
+
type: NumberConstructor;
|
|
103
|
+
default: undefined;
|
|
104
|
+
required: boolean;
|
|
105
|
+
};
|
|
86
106
|
name: {
|
|
87
107
|
type: StringConstructor;
|
|
88
108
|
required: boolean;
|
|
@@ -131,6 +151,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
131
151
|
step: number;
|
|
132
152
|
errorMessage: string | boolean;
|
|
133
153
|
hiddenErrorMessage: boolean;
|
|
154
|
+
min: number;
|
|
155
|
+
max: number;
|
|
134
156
|
validation: import('./validation-rules').InputValidation;
|
|
135
157
|
isTwoDecimals: boolean;
|
|
136
158
|
defaultNullValueToZeroOnBlur: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{defineComponent as N,ref as w,computed as u,openBlock as V,createBlock as B,mergeProps as M,unref as t,withCtx as T,withDirectives as k,createElementVNode as D,normalizeClass as C,vModelDynamic as A}from"vue";import E from"./ElInputContainer.vue.esm2.js";import{withNumberElInputProps as I,useInput as $,showRequiredMark as q}from"./input.esm.js";const O=["id","name","type","step","placeholder","disabled","data-cy"],z=N({__name:"ElInputNumber",props:{...I(),isTwoDecimals:{type:Boolean,default:!1},defaultNullValueToZeroOnBlur:{type:Boolean,default:!0}},emits:["update:modelValue","overlayedBtnClicked","update:formattedAmount"],setup(
|
|
1
|
+
import{defineComponent as N,ref as w,computed as u,openBlock as V,createBlock as B,mergeProps as M,unref as t,withCtx as T,withDirectives as k,createElementVNode as D,normalizeClass as C,vModelDynamic as A}from"vue";import E from"./ElInputContainer.vue.esm2.js";import{withNumberElInputProps as I,useInput as $,showRequiredMark as q}from"./input.esm.js";const O=["id","name","type","step","min","max","placeholder","disabled","data-cy"],z=N({__name:"ElInputNumber",props:{...I(),isTwoDecimals:{type:Boolean,default:!1},defaultNullValueToZeroOnBlur:{type:Boolean,default:!0}},emits:["update:modelValue","overlayedBtnClicked","update:formattedAmount"],setup(m,{emit:d}){const a=m,n=d,p=w(!1),f=u(()=>a.modelValue),v=u(()=>[a.validation]),{value:l,errorMessage:c,uuid:s,fieldContext:b}=$(f,v,a.name,e=>{n("update:modelValue",e),n("update:formattedAmount",o.value)}),o=u({get:()=>l.value===null||l.value===void 0||typeof l.value=="string"&&l.value===""?null:typeof l.value=="string"?Number(l.value):a.isTwoDecimals?parseFloat((l.value/100).toFixed(2)):l.value,set:e=>{if(e===""||e===null){l.value=null;return}const r=Number(e);isNaN(r)||(a.isTwoDecimals?l.value=Math.round(r*100):l.value=r)}}),g=()=>{b.validate(),a.defaultNullValueToZeroOnBlur&&y()},y=()=>{l.value||(l.value=0)};return(e,r)=>(V(),B(E,M(e.$attrs,{name:t(s),label:e.label,"error-message":a.errorMessage===!1?!1:a.errorMessage||t(c),"hidden-error-message":e.hiddenErrorMessage,"set-required-mark":t(q)([e.validation])}),{default:T(({error:h})=>[k(D("input",{id:t(s),name:a.name,"onUpdate:modelValue":[r[0]||(r[0]=i=>o.value=i),r[1]||(r[1]=i=>p.value=!0)],type:a.isTwoDecimals?"text":"number",step:e.step,min:e.min,max:e.max,placeholder:e.placeholder,disabled:e.disabled,class:C(["el-input",{error:h}]),"data-cy":e.label?`${e.label.trim().replaceAll(" ","")}-number-input`:"number-input",onBlur:g},null,42,O),[[A,o.value]])]),_:1},16,["name","label","error-message","hidden-error-message","set-required-mark"]))}});export{z as default};
|
|
2
2
|
//# sourceMappingURL=ElInputNumber.vue.esm2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElInputNumber.vue.esm2.js","sources":["../../src/forms/ElInputNumber.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport ElInputContainer from '@/forms/ElInputContainer.vue';\nimport { useInput, NumberValueType, showRequiredMark, withNumberElInputProps } from '@/forms/input';\nimport { computed, ref } from 'vue';\n\nconst props = defineProps({\n ...withNumberElInputProps(),\n isTwoDecimals: {\n type: Boolean,\n default: false,\n },\n defaultNullValueToZeroOnBlur: {\n type: Boolean,\n default: true,\n },\n});\n\nconst emit = defineEmits<{\n (event: 'update:modelValue', value: NumberValueType): void;\n (event: 'overlayedBtnClicked'): void;\n (event: 'update:formattedAmount', value: NumberValueType): void;\n}>();\n\nconst showOverlayedIcon = ref(false);\nconst computedModelValue = computed(() => {\n return props.modelValue;\n});\n\nconst computedValidation = computed(() => [props.validation]);\n\nconst { value, errorMessage, uuid, fieldContext } = useInput(computedModelValue, computedValidation, props.name, newValue => {\n emit('update:modelValue', newValue);\n emit('update:formattedAmount', formattedAmount.value);\n});\n\nconst formattedAmount = computed<number | null>({\n get: () => {\n if (value.value === null || value.value === undefined) return null;\n if (typeof value.value === 'string' && value.value === '') return null;\n if (typeof value.value === 'string') return Number(value.value);\n\n if (props.isTwoDecimals) {\n return parseFloat((value.value / 100).toFixed(2));\n }\n\n return value.value;\n },\n set: (inputValue: number | null | string) => {\n if (inputValue === '' || inputValue === null) {\n value.value = null;\n return;\n }\n\n const numValue = Number(inputValue);\n if (!isNaN(numValue)) {\n if (props.isTwoDecimals) {\n value.value = Math.round(numValue * 100);\n } else {\n value.value = numValue;\n }\n }\n },\n});\n\nconst onBlur = () => {\n fieldContext.validate();\n\n if (props.defaultNullValueToZeroOnBlur) {\n resetNullValueToZero();\n }\n};\n\nconst resetNullValueToZero = () => {\n if (!value.value) {\n value.value = 0;\n }\n};\n</script>\n\n<template>\n <ElInputContainer\n v-bind=\"$attrs\"\n :name=\"uuid\"\n :label=\"label\"\n :error-message=\"props.errorMessage === false ? false : props.errorMessage || errorMessage\"\n :hidden-error-message=\"hiddenErrorMessage\"\n :set-required-mark=\"showRequiredMark([validation])\"\n >\n <template #default=\"{ error }\">\n <input\n :id=\"uuid\"\n :name=\"props.name\"\n v-model=\"formattedAmount\"\n :type=\"props.isTwoDecimals ? 'text' : 'number'\"\n :step=\"step\"\n :placeholder=\"placeholder\"\n :disabled=\"disabled\"\n class=\"el-input\"\n :class=\"{ error }\"\n :data-cy=\"label ? `${label.trim().replaceAll(' ', '')}-number-input` : `number-input`\"\n @blur=\"onBlur\"\n @update:model-value=\"showOverlayedIcon = true\"\n />\n </template>\n </ElInputContainer>\n</template>\n"],"names":["props","__props","emit","__emit","showOverlayedIcon","ref","computedModelValue","computed","computedValidation","value","errorMessage","uuid","fieldContext","useInput","newValue","formattedAmount","inputValue","numValue","onBlur","resetNullValueToZero"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ElInputNumber.vue.esm2.js","sources":["../../src/forms/ElInputNumber.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport ElInputContainer from '@/forms/ElInputContainer.vue';\nimport { useInput, NumberValueType, showRequiredMark, withNumberElInputProps } from '@/forms/input';\nimport { computed, ref } from 'vue';\n\nconst props = defineProps({\n ...withNumberElInputProps(),\n isTwoDecimals: {\n type: Boolean,\n default: false,\n },\n defaultNullValueToZeroOnBlur: {\n type: Boolean,\n default: true,\n },\n});\n\nconst emit = defineEmits<{\n (event: 'update:modelValue', value: NumberValueType): void;\n (event: 'overlayedBtnClicked'): void;\n (event: 'update:formattedAmount', value: NumberValueType): void;\n}>();\n\nconst showOverlayedIcon = ref(false);\nconst computedModelValue = computed(() => {\n return props.modelValue;\n});\n\nconst computedValidation = computed(() => [props.validation]);\n\nconst { value, errorMessage, uuid, fieldContext } = useInput(computedModelValue, computedValidation, props.name, newValue => {\n emit('update:modelValue', newValue);\n emit('update:formattedAmount', formattedAmount.value);\n});\n\nconst formattedAmount = computed<number | null>({\n get: () => {\n if (value.value === null || value.value === undefined) return null;\n if (typeof value.value === 'string' && value.value === '') return null;\n if (typeof value.value === 'string') return Number(value.value);\n\n if (props.isTwoDecimals) {\n return parseFloat((value.value / 100).toFixed(2));\n }\n\n return value.value;\n },\n set: (inputValue: number | null | string) => {\n if (inputValue === '' || inputValue === null) {\n value.value = null;\n return;\n }\n\n const numValue = Number(inputValue);\n if (!isNaN(numValue)) {\n if (props.isTwoDecimals) {\n value.value = Math.round(numValue * 100);\n } else {\n value.value = numValue;\n }\n }\n },\n});\n\nconst onBlur = () => {\n fieldContext.validate();\n\n if (props.defaultNullValueToZeroOnBlur) {\n resetNullValueToZero();\n }\n};\n\nconst resetNullValueToZero = () => {\n if (!value.value) {\n value.value = 0;\n }\n};\n</script>\n\n<template>\n <ElInputContainer\n v-bind=\"$attrs\"\n :name=\"uuid\"\n :label=\"label\"\n :error-message=\"props.errorMessage === false ? false : props.errorMessage || errorMessage\"\n :hidden-error-message=\"hiddenErrorMessage\"\n :set-required-mark=\"showRequiredMark([validation])\"\n >\n <template #default=\"{ error }\">\n <input\n :id=\"uuid\"\n :name=\"props.name\"\n v-model=\"formattedAmount\"\n :type=\"props.isTwoDecimals ? 'text' : 'number'\"\n :step=\"step\"\n :min=\"min\"\n :max=\"max\"\n :placeholder=\"placeholder\"\n :disabled=\"disabled\"\n class=\"el-input\"\n :class=\"{ error }\"\n :data-cy=\"label ? `${label.trim().replaceAll(' ', '')}-number-input` : `number-input`\"\n @blur=\"onBlur\"\n @update:model-value=\"showOverlayedIcon = true\"\n />\n </template>\n </ElInputContainer>\n</template>\n"],"names":["props","__props","emit","__emit","showOverlayedIcon","ref","computedModelValue","computed","computedValidation","value","errorMessage","uuid","fieldContext","useInput","newValue","formattedAmount","inputValue","numValue","onBlur","resetNullValueToZero"],"mappings":"4pBAKA,MAAMA,EAAQC,EAYRC,EAAOC,EAMPC,EAAoBC,EAAI,EAAK,EAC7BC,EAAqBC,EAAS,IAC3BP,EAAM,UACd,EAEKQ,EAAqBD,EAAS,IAAM,CAACP,EAAM,UAAU,CAAC,EAEtD,CAAE,MAAAS,EAAO,aAAAC,EAAc,KAAAC,EAAM,aAAAC,CAAiB,EAAAC,EAASP,EAAoBE,EAAoBR,EAAM,KAAkBc,GAAA,CAC3HZ,EAAK,oBAAqBY,CAAQ,EAC7BZ,EAAA,yBAA0Ba,EAAgB,KAAK,CAAA,CACrD,EAEKA,EAAkBR,EAAwB,CAC9C,IAAK,IACCE,EAAM,QAAU,MAAQA,EAAM,QAAU,QACxC,OAAOA,EAAM,OAAU,UAAYA,EAAM,QAAU,GAAW,KAC9D,OAAOA,EAAM,OAAU,SAAiB,OAAOA,EAAM,KAAK,EAE1DT,EAAM,cACD,YAAYS,EAAM,MAAQ,KAAK,QAAQ,CAAC,CAAC,EAG3CA,EAAM,MAEf,IAAMO,GAAuC,CACvC,GAAAA,IAAe,IAAMA,IAAe,KAAM,CAC5CP,EAAM,MAAQ,KACd,MACF,CAEM,MAAAQ,EAAW,OAAOD,CAAU,EAC7B,MAAMC,CAAQ,IACbjB,EAAM,cACRS,EAAM,MAAQ,KAAK,MAAMQ,EAAW,GAAG,EAEvCR,EAAM,MAAQQ,EAGpB,CAAA,CACD,EAEKC,EAAS,IAAM,CACnBN,EAAa,SAAS,EAElBZ,EAAM,8BACamB,GACvB,EAGIA,EAAuB,IAAM,CAC5BV,EAAM,QACTA,EAAM,MAAQ,EAChB"}
|
package/dist/forms/input.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("vee-validate"),a=require("vue");let n=0;const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("vee-validate"),a=require("vue");let n=0;const f=()=>({getID:()=>(n++,`elty-input-${n.toString()}`)}),i=()=>({label:{type:String,required:!1,default:""},disabled:{type:Boolean,required:!1,default:!1},validation:{type:String,default:"",required:!1},hideRequiredMark:{type:Boolean,required:!1,default:!1},hiddenErrorMessage:{type:Boolean,required:!1,default:!1},helpTooltip:{type:Object,required:!1,default:void 0}}),m=()=>({...i(),modelValue:{type:String,default:""},placeholder:{type:String,default:"",required:!1}}),d=()=>({name:{type:String,required:!1,default:""},id:{type:String,required:!1,default:""},label:{type:String,required:!1,default:""},validation:{type:String,default:"",required:!1},disabled:{type:Boolean,required:!1,default:!1},errorMessage:{type:[String,Boolean],required:!1,default:void 0},hiddenErrorMessage:{type:Boolean,required:!1,default:!1}}),y=()=>({...d(),modelValue:{type:String,default:""},placeholder:{type:String,default:"",required:!1}}),c=()=>({...i(),modelValue:{type:Number},placeholder:{type:String,default:"",required:!1},step:{type:Number,default:1,required:!1}}),g=()=>({...d(),modelValue:{type:Number},placeholder:{type:String,default:"",required:!1},step:{type:Number,default:1,required:!1},min:{type:Number,default:void 0,required:!1},max:{type:Number,default:void 0,required:!1}});function h(t,r,u="",o){const s=f().getID(),p=a.computed(()=>r.value&&r.value.join("|")),e=q.useField(u||s,p,{initialValue:t,validateOnValueUpdate:!1});return a.watch(t,l=>{e.setValue(l)}),a.watch(e.value,l=>{o&&o(l),e.errorMessage.value&&e.validate()}),{fieldContext:e,errorMessage:e.errorMessage,value:e.value,uuid:s,meta:e.meta,setValue:e.setValue}}function I(t,r){if(r)return!1;for(const u of t)if(u.match(/(?:^required)|required\||(?:\|required$)/))return!0;return!1}exports.UniqueID=f;exports.showRequiredMark=I;exports.useInput=h;exports.withCommonElInputProps=d;exports.withCommonInputProps=i;exports.withNumberElInputProps=g;exports.withNumberInputProps=c;exports.withTextualElInputProps=y;exports.withTextualInputProps=m;
|
|
2
2
|
//# sourceMappingURL=input.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.cjs.js","sources":["../../src/forms/input.ts"],"sourcesContent":["import { InputValidation } from '@/forms/validation-rules';\nimport { useField } from 'vee-validate';\n\nlet UUID = 0;\n\nexport const UniqueID = () => {\n const getID = () => {\n UUID++;\n return `elty-input-${UUID.toString()}`;\n };\n return {\n getID,\n };\n};\n\nimport { computed, ComputedRef, PropType, Ref, watch } from 'vue';\n\nexport type TextualValueType = string | null | undefined;\nexport type NumberValueType = number | null | undefined;\n\nexport const withCommonInputProps = () => ({\n label: {\n type: String,\n required: false,\n default: '',\n },\n disabled: {\n type: Boolean,\n required: false,\n default: false,\n },\n validation: {\n type: String as PropType<InputValidation>,\n default: '',\n required: false,\n },\n hideRequiredMark: {\n type: Boolean,\n required: false,\n default: false,\n },\n hiddenErrorMessage: {\n type: Boolean,\n required: false,\n default: false,\n },\n helpTooltip: {\n type: Object as PropType<{\n title: string;\n text: string;\n }>,\n required: false,\n default: undefined,\n },\n});\n\nexport const withTextualInputProps = () => ({\n ...withCommonInputProps(),\n // v-model binding will always be done to a single string. every component will treat the string as he wishes\n modelValue: {\n type: String as PropType<TextualValueType>,\n default: '',\n },\n placeholder: {\n type: String,\n default: '',\n required: false,\n },\n});\n\nexport const withCommonElInputProps = () => ({\n name: {\n type: String,\n required: false,\n default: '',\n },\n id: {\n type: String,\n required: false,\n default: '',\n },\n label: {\n type: String,\n required: false,\n default: '',\n },\n validation: {\n type: String as PropType<InputValidation>,\n default: '',\n required: false,\n },\n disabled: {\n type: Boolean,\n required: false,\n default: false,\n },\n errorMessage: {\n type: [String, Boolean],\n required: false,\n default: undefined,\n },\n hiddenErrorMessage: {\n type: Boolean,\n required: false,\n default: false,\n },\n});\n\nexport const withTextualElInputProps = () => ({\n ...withCommonElInputProps(),\n // v-model binding will always be done to a single string. every component will treat the string as he wishes\n modelValue: {\n type: String as PropType<TextualValueType>,\n default: '',\n },\n placeholder: {\n type: String,\n default: '',\n required: false,\n },\n});\n\nexport const withNumberInputProps = () => ({\n ...withCommonInputProps(),\n modelValue: {\n type: Number as PropType<NumberValueType>,\n },\n placeholder: {\n type: String,\n default: '',\n required: false,\n },\n step: {\n type: Number,\n default: 1,\n required: false,\n },\n});\n\nexport const withNumberElInputProps = () => ({\n ...withCommonElInputProps(),\n modelValue: {\n type: Number as PropType<NumberValueType>,\n },\n placeholder: {\n type: String,\n default: '',\n required: false,\n },\n step: {\n type: Number,\n default: 1,\n required: false,\n },\n});\n\nexport function useInput<T = string>(\n initialValue: Ref<T>,\n validations: Ref<string[]> | ComputedRef<string[]>,\n inputName: string = '',\n onChange?: (value: T) => void,\n) {\n const uuid = UniqueID().getID();\n const validationsString = computed(() => validations.value && validations.value.join('|'));\n\n // if a name is not provided it generates a random one\n const field = useField<T>(inputName || uuid, validationsString, {\n // empty string counts as a forced blank value\n initialValue,\n // validation is performed manually on value change, only if there are errors\n validateOnValueUpdate: false,\n });\n\n watch(initialValue, newValue => {\n field.setValue(newValue);\n });\n\n watch(field.value, val => {\n if (onChange) {\n onChange(val);\n }\n if (field.errorMessage.value) {\n field.validate();\n }\n });\n\n return {\n fieldContext: field,\n errorMessage: field.errorMessage,\n value: field.value,\n uuid,\n meta: field.meta,\n setValue: field.setValue,\n };\n}\n\nexport function showRequiredMark(validations: string[], forceHideMark?: boolean | undefined): boolean {\n if (forceHideMark) return false;\n\n for (const v of validations) {\n if (v.match(/(?:^required)|required\\||(?:\\|required$)/)) {\n return true;\n }\n }\n return false;\n}\n"],"names":["UUID","UniqueID","withCommonInputProps","withTextualInputProps","withCommonElInputProps","withTextualElInputProps","withNumberInputProps","withNumberElInputProps","useInput","initialValue","validations","inputName","onChange","uuid","validationsString","computed","field","useField","watch","newValue","val","showRequiredMark","forceHideMark","v"],"mappings":"iIAGA,IAAIA,EAAO,EAEJ,MAAMC,EAAW,KAKf,CACL,MALY,KACZD,IACO,cAAcA,EAAK,SAAA,CAAU,GAGpC,GASSE,EAAuB,KAAO,CACzC,MAAO,CACL,KAAM,OACN,SAAU,GACV,QAAS,EACX,EACA,SAAU,CACR,KAAM,QACN,SAAU,GACV,QAAS,EACX,EACA,WAAY,CACV,KAAM,OACN,QAAS,GACT,SAAU,EACZ,EACA,iBAAkB,CAChB,KAAM,QACN,SAAU,GACV,QAAS,EACX,EACA,mBAAoB,CAClB,KAAM,QACN,SAAU,GACV,QAAS,EACX,EAC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SAAYN,GAAaE,EAAMC,EAAmB,CAE9D,aAAAL,EAEA,sBAAuB,EAAA,CACxB,EAEDS,OAAAA,QAAMT,EAA0BU,GAAA,CAC9BH,EAAM,SAASG,CAAQ,CAAA,CACxB,EAEKD,EAAAA,MAAAF,EAAM,MAAcI,GAAA,CACpBR,GACFA,EAASQ,CAAG,EAEVJ,EAAM,aAAa,OACrBA,EAAM,SAAS,CACjB,CACD,EAEM,CACL,aAAcA,EACd,aAAcA,EAAM,aACpB,MAAOA,EAAM,MACb,KAAAH,EACA,KAAMG,EAAM,KACZ,SAAUA,EAAM,QAAA,CAEpB,CAEgB,SAAAK,EAAiBX,EAAuBY,EAA8C,CAChG,GAAAA,EAAsB,MAAA,GAE1B,UAAWC,KAAKb,EACV,GAAAa,EAAE,MAAM,0CAA0C,EAC7C,MAAA,GAGJ,MAAA,EACT"}
|
|
1
|
+
{"version":3,"file":"input.cjs.js","sources":["../../src/forms/input.ts"],"sourcesContent":["import { InputValidation } from '@/forms/validation-rules';\nimport { useField } from 'vee-validate';\n\nlet UUID = 0;\n\nexport const UniqueID = () => {\n const getID = () => {\n UUID++;\n return `elty-input-${UUID.toString()}`;\n };\n return {\n getID,\n };\n};\n\nimport { computed, ComputedRef, PropType, Ref, watch } from 'vue';\n\nexport type TextualValueType = string | null | undefined;\nexport type NumberValueType = number | null | undefined;\n\nexport const withCommonInputProps = () => ({\n label: {\n type: String,\n required: false,\n default: '',\n },\n disabled: {\n type: Boolean,\n required: false,\n default: false,\n },\n validation: {\n type: String as PropType<InputValidation>,\n default: '',\n required: false,\n },\n hideRequiredMark: {\n type: Boolean,\n required: false,\n default: false,\n },\n hiddenErrorMessage: {\n type: Boolean,\n required: false,\n default: false,\n },\n helpTooltip: {\n type: Object as PropType<{\n title: string;\n text: string;\n }>,\n required: false,\n default: undefined,\n },\n});\n\nexport const withTextualInputProps = () => ({\n ...withCommonInputProps(),\n // v-model binding will always be done to a single string. every component will treat the string as he wishes\n modelValue: {\n type: String as PropType<TextualValueType>,\n default: '',\n },\n placeholder: {\n type: String,\n default: '',\n required: false,\n },\n});\n\nexport const withCommonElInputProps = () => ({\n name: {\n type: String,\n required: false,\n default: '',\n },\n id: {\n type: String,\n required: false,\n default: '',\n },\n label: {\n type: String,\n required: false,\n default: '',\n },\n validation: {\n type: String as PropType<InputValidation>,\n default: '',\n required: false,\n },\n disabled: {\n type: Boolean,\n required: false,\n default: false,\n },\n errorMessage: {\n type: [String, Boolean],\n required: false,\n default: undefined,\n },\n hiddenErrorMessage: {\n type: Boolean,\n required: false,\n default: false,\n },\n});\n\nexport const withTextualElInputProps = () => ({\n ...withCommonElInputProps(),\n // v-model binding will always be done to a single string. every component will treat the string as he wishes\n modelValue: {\n type: String as PropType<TextualValueType>,\n default: '',\n },\n placeholder: {\n type: String,\n default: '',\n required: false,\n },\n});\n\nexport const withNumberInputProps = () => ({\n ...withCommonInputProps(),\n modelValue: {\n type: Number as PropType<NumberValueType>,\n },\n placeholder: {\n type: String,\n default: '',\n required: false,\n },\n step: {\n type: Number,\n default: 1,\n required: false,\n },\n});\n\nexport const withNumberElInputProps = () => ({\n ...withCommonElInputProps(),\n modelValue: {\n type: Number as PropType<NumberValueType>,\n },\n placeholder: {\n type: String,\n default: '',\n required: false,\n },\n step: {\n type: Number,\n default: 1,\n required: false,\n },\n min: {\n type: Number,\n default: undefined,\n required: false,\n },\n max: {\n type: Number,\n default: undefined,\n required: false,\n },\n});\n\nexport function useInput<T = string>(\n initialValue: Ref<T>,\n validations: Ref<string[]> | ComputedRef<string[]>,\n inputName: string = '',\n onChange?: (value: T) => void,\n) {\n const uuid = UniqueID().getID();\n const validationsString = computed(() => validations.value && validations.value.join('|'));\n\n // if a name is not provided it generates a random one\n const field = useField<T>(inputName || uuid, validationsString, {\n // empty string counts as a forced blank value\n initialValue,\n // validation is performed manually on value change, only if there are errors\n validateOnValueUpdate: false,\n });\n\n watch(initialValue, newValue => {\n field.setValue(newValue);\n });\n\n watch(field.value, val => {\n if (onChange) {\n onChange(val);\n }\n if (field.errorMessage.value) {\n field.validate();\n }\n });\n\n return {\n fieldContext: field,\n errorMessage: field.errorMessage,\n value: field.value,\n uuid,\n meta: field.meta,\n setValue: field.setValue,\n };\n}\n\nexport function showRequiredMark(validations: string[], forceHideMark?: boolean | undefined): boolean {\n if (forceHideMark) return false;\n\n for (const v of validations) {\n if (v.match(/(?:^required)|required\\||(?:\\|required$)/)) {\n return true;\n }\n }\n return false;\n}\n"],"names":["UUID","UniqueID","withCommonInputProps","withTextualInputProps","withCommonElInputProps","withTextualElInputProps","withNumberInputProps","withNumberElInputProps","useInput","initialValue","validations","inputName","onChange","uuid","validationsString","computed","field","useField","watch","newValue","val","showRequiredMark","forceHideMark","v"],"mappings":"iIAGA,IAAIA,EAAO,EAEJ,MAAMC,EAAW,KAKf,CACL,MALY,KACZD,IACO,cAAcA,EAAK,SAAA,CAAU,GAGpC,GASSE,EAAuB,KAAO,CACzC,MAAO,CACL,KAAM,OACN,SAAU,GACV,QAAS,EACX,EACA,SAAU,CACR,KAAM,QACN,SAAU,GACV,QAAS,EACX,EACA,WAAY,CACV,KAAM,OACN,QAAS,GACT,SAAU,EACZ,EACA,iBAAkB,CAChB,KAAM,QACN,SAAU,GACV,QAAS,EACX,EACA,mBAAoB,CAClB,KAAM,QACN,SAAU,GACV,QAAS,EACX,EACA,YAAa,CACX,KAAM,OAIN,SAAU,GACV,QAAS,MACX,CACF,GAEaC,EAAwB,KAAO,CAC1C,GAAGD,EAAqB,EAExB,WAAY,CACV,KAAM,OACN,QAAS,EACX,EACA,YAAa,CACX,KAAM,OACN,QAAS,GACT,SAAU,EACZ,CACF,GAEaE,EAAyB,KAAO,CAC3C,KAAM,CACJ,KAAM,OACN,SAAU,GACV,QAAS,EACX,EACA,GAAI,CACF,KAAM,OACN,SAAU,GACV,QAAS,EACX,EACA,MAAO,CACL,KAAM,OACN,SAAU,GACV,QAAS,EACX,EACA,WAAY,CACV,KAAM,OACN,QAAS,GACT,SAAU,EACZ,EAC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AOA,EAAM,MACb,KAAAH,EACA,KAAMG,EAAM,KACZ,SAAUA,EAAM,QAAA,CAEpB,CAEgB,SAAAK,EAAiBX,EAAuBY,EAA8C,CAChG,GAAAA,EAAsB,MAAA,GAE1B,UAAWC,KAAKb,EACV,GAAAa,EAAE,MAAM,0CAA0C,EAC7C,MAAA,GAGJ,MAAA,EACT"}
|
package/dist/forms/input.d.ts
CHANGED
|
@@ -230,6 +230,16 @@ export declare const withNumberElInputProps: () => {
|
|
|
230
230
|
default: number;
|
|
231
231
|
required: boolean;
|
|
232
232
|
};
|
|
233
|
+
min: {
|
|
234
|
+
type: NumberConstructor;
|
|
235
|
+
default: undefined;
|
|
236
|
+
required: boolean;
|
|
237
|
+
};
|
|
238
|
+
max: {
|
|
239
|
+
type: NumberConstructor;
|
|
240
|
+
default: undefined;
|
|
241
|
+
required: boolean;
|
|
242
|
+
};
|
|
233
243
|
name: {
|
|
234
244
|
type: StringConstructor;
|
|
235
245
|
required: boolean;
|
package/dist/forms/input.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useField as p}from"vee-validate";import{computed as
|
|
1
|
+
import{useField as p}from"vee-validate";import{computed as m,watch as i}from"vue";let o=0;const q=()=>({getID:()=>(o++,`elty-input-${o.toString()}`)}),s=()=>({label:{type:String,required:!1,default:""},disabled:{type:Boolean,required:!1,default:!1},validation:{type:String,default:"",required:!1},hideRequiredMark:{type:Boolean,required:!1,default:!1},hiddenErrorMessage:{type:Boolean,required:!1,default:!1},helpTooltip:{type:Object,required:!1,default:void 0}}),c=()=>({...s(),modelValue:{type:String,default:""},placeholder:{type:String,default:"",required:!1}}),f=()=>({name:{type:String,required:!1,default:""},id:{type:String,required:!1,default:""},label:{type:String,required:!1,default:""},validation:{type:String,default:"",required:!1},disabled:{type:Boolean,required:!1,default:!1},errorMessage:{type:[String,Boolean],required:!1,default:void 0},hiddenErrorMessage:{type:Boolean,required:!1,default:!1}}),h=()=>({...f(),modelValue:{type:String,default:""},placeholder:{type:String,default:"",required:!1}}),v=()=>({...s(),modelValue:{type:Number},placeholder:{type:String,default:"",required:!1},step:{type:Number,default:1,required:!1}}),S=()=>({...f(),modelValue:{type:Number},placeholder:{type:String,default:"",required:!1},step:{type:Number,default:1,required:!1},min:{type:Number,default:void 0,required:!1},max:{type:Number,default:void 0,required:!1}});function b(t,r,l="",u){const d=q().getID(),n=m(()=>r.value&&r.value.join("|")),e=p(l||d,n,{initialValue:t,validateOnValueUpdate:!1});return i(t,a=>{e.setValue(a)}),i(e.value,a=>{u&&u(a),e.errorMessage.value&&e.validate()}),{fieldContext:e,errorMessage:e.errorMessage,value:e.value,uuid:d,meta:e.meta,setValue:e.setValue}}function I(t,r){if(r)return!1;for(const l of t)if(l.match(/(?:^required)|required\||(?:\|required$)/))return!0;return!1}export{q as UniqueID,I as showRequiredMark,b as useInput,f as withCommonElInputProps,s as withCommonInputProps,S as withNumberElInputProps,v as withNumberInputProps,h as withTextualElInputProps,c as withTextualInputProps};
|
|
2
2
|
//# sourceMappingURL=input.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.esm.js","sources":["../../src/forms/input.ts"],"sourcesContent":["import { InputValidation } from '@/forms/validation-rules';\nimport { useField } from 'vee-validate';\n\nlet UUID = 0;\n\nexport const UniqueID = () => {\n const getID = () => {\n UUID++;\n return `elty-input-${UUID.toString()}`;\n };\n return {\n getID,\n };\n};\n\nimport { computed, ComputedRef, PropType, Ref, watch } from 'vue';\n\nexport type TextualValueType = string | null | undefined;\nexport type NumberValueType = number | null | undefined;\n\nexport const withCommonInputProps = () => ({\n label: {\n type: String,\n required: false,\n default: '',\n },\n disabled: {\n type: Boolean,\n required: false,\n default: false,\n },\n validation: {\n type: String as PropType<InputValidation>,\n default: '',\n required: false,\n },\n hideRequiredMark: {\n type: Boolean,\n required: false,\n default: false,\n },\n hiddenErrorMessage: {\n type: Boolean,\n required: false,\n default: false,\n },\n helpTooltip: {\n type: Object as PropType<{\n title: string;\n text: string;\n }>,\n required: false,\n default: undefined,\n },\n});\n\nexport const withTextualInputProps = () => ({\n ...withCommonInputProps(),\n // v-model binding will always be done to a single string. every component will treat the string as he wishes\n modelValue: {\n type: String as PropType<TextualValueType>,\n default: '',\n },\n placeholder: {\n type: String,\n default: '',\n required: false,\n },\n});\n\nexport const withCommonElInputProps = () => ({\n name: {\n type: String,\n required: false,\n default: '',\n },\n id: {\n type: String,\n required: false,\n default: '',\n },\n label: {\n type: String,\n required: false,\n default: '',\n },\n validation: {\n type: String as PropType<InputValidation>,\n default: '',\n required: false,\n },\n disabled: {\n type: Boolean,\n required: false,\n default: false,\n },\n errorMessage: {\n type: [String, Boolean],\n required: false,\n default: undefined,\n },\n hiddenErrorMessage: {\n type: Boolean,\n required: false,\n default: false,\n },\n});\n\nexport const withTextualElInputProps = () => ({\n ...withCommonElInputProps(),\n // v-model binding will always be done to a single string. every component will treat the string as he wishes\n modelValue: {\n type: String as PropType<TextualValueType>,\n default: '',\n },\n placeholder: {\n type: String,\n default: '',\n required: false,\n },\n});\n\nexport const withNumberInputProps = () => ({\n ...withCommonInputProps(),\n modelValue: {\n type: Number as PropType<NumberValueType>,\n },\n placeholder: {\n type: String,\n default: '',\n required: false,\n },\n step: {\n type: Number,\n default: 1,\n required: false,\n },\n});\n\nexport const withNumberElInputProps = () => ({\n ...withCommonElInputProps(),\n modelValue: {\n type: Number as PropType<NumberValueType>,\n },\n placeholder: {\n type: String,\n default: '',\n required: false,\n },\n step: {\n type: Number,\n default: 1,\n required: false,\n },\n});\n\nexport function useInput<T = string>(\n initialValue: Ref<T>,\n validations: Ref<string[]> | ComputedRef<string[]>,\n inputName: string = '',\n onChange?: (value: T) => void,\n) {\n const uuid = UniqueID().getID();\n const validationsString = computed(() => validations.value && validations.value.join('|'));\n\n // if a name is not provided it generates a random one\n const field = useField<T>(inputName || uuid, validationsString, {\n // empty string counts as a forced blank value\n initialValue,\n // validation is performed manually on value change, only if there are errors\n validateOnValueUpdate: false,\n });\n\n watch(initialValue, newValue => {\n field.setValue(newValue);\n });\n\n watch(field.value, val => {\n if (onChange) {\n onChange(val);\n }\n if (field.errorMessage.value) {\n field.validate();\n }\n });\n\n return {\n fieldContext: field,\n errorMessage: field.errorMessage,\n value: field.value,\n uuid,\n meta: field.meta,\n setValue: field.setValue,\n };\n}\n\nexport function showRequiredMark(validations: string[], forceHideMark?: boolean | undefined): boolean {\n if (forceHideMark) return false;\n\n for (const v of validations) {\n if (v.match(/(?:^required)|required\\||(?:\\|required$)/)) {\n return true;\n }\n }\n return false;\n}\n"],"names":["UUID","UniqueID","withCommonInputProps","withTextualInputProps","withCommonElInputProps","withTextualElInputProps","withNumberInputProps","withNumberElInputProps","useInput","initialValue","validations","inputName","onChange","uuid","validationsString","computed","field","useField","watch","newValue","val","showRequiredMark","forceHideMark","v"],"mappings":"kFAGA,IAAIA,EAAO,EAEJ,MAAMC,EAAW,KAKf,CACL,MALY,KACZD,IACO,cAAcA,EAAK,SAAA,CAAU,GAGpC,GASSE,EAAuB,KAAO,CACzC,MAAO,CACL,KAAM,OACN,SAAU,GACV,QAAS,EACX,EACA,SAAU,CACR,KAAM,QACN,SAAU,GACV,QAAS,EACX,EACA,WAAY,CACV,KAAM,OACN,QAAS,GACT,SAAU,EACZ,EACA,iBAAkB,CAChB,KAAM,QACN,SAAU,GACV,QAAS,EACX,EACA,mBAAoB,CAClB,KAAM,QACN,SAAU,GACV,QAAS,EACX,EACA,YAAa,CACX,KAAM,OAIN,SAAU,GACV,QAAS,MACX,CACF,GAEaC,EAAwB,KAAO,CAC1C,GAAGD,EAAqB,EAExB,WAAY,CACV,KAAM,OACN,QAAS,EACX,EACA,YAAa,CACX,KAAM,OACN,QAAS,GACT,SAAU,EACZ,CACF,GAEaE,EAAyB,KAAO,CAC3C,KAAM,CACJ,KAAM,OACN,SAAU,GACV,QAAS,EACX,EACA,GAAI,CACF,KAAM,OACN,SAAU,GACV,QAAS,EACX,EACA,MAAO,CACL,KAAM,OACN,SAAU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,SAAUA,EAAM,QAAA,CAEpB,CAEgB,SAAAK,EAAiBX,EAAuBY,EAA8C,CAChG,GAAAA,EAAsB,MAAA,GAE1B,UAAWC,KAAKb,EACV,GAAAa,EAAE,MAAM,0CAA0C,EAC7C,MAAA,GAGJ,MAAA,EACT"}
|
|
1
|
+
{"version":3,"file":"input.esm.js","sources":["../../src/forms/input.ts"],"sourcesContent":["import { InputValidation } from '@/forms/validation-rules';\nimport { useField } from 'vee-validate';\n\nlet UUID = 0;\n\nexport const UniqueID = () => {\n const getID = () => {\n UUID++;\n return `elty-input-${UUID.toString()}`;\n };\n return {\n getID,\n };\n};\n\nimport { computed, ComputedRef, PropType, Ref, watch } from 'vue';\n\nexport type TextualValueType = string | null | undefined;\nexport type NumberValueType = number | null | undefined;\n\nexport const withCommonInputProps = () => ({\n label: {\n type: String,\n required: false,\n default: '',\n },\n disabled: {\n type: Boolean,\n required: false,\n default: false,\n },\n validation: {\n type: String as PropType<InputValidation>,\n default: '',\n required: false,\n },\n hideRequiredMark: {\n type: Boolean,\n required: false,\n default: false,\n },\n hiddenErrorMessage: {\n type: Boolean,\n required: false,\n default: false,\n },\n helpTooltip: {\n type: Object as PropType<{\n title: string;\n text: string;\n }>,\n required: false,\n default: undefined,\n },\n});\n\nexport const withTextualInputProps = () => ({\n ...withCommonInputProps(),\n // v-model binding will always be done to a single string. every component will treat the string as he wishes\n modelValue: {\n type: String as PropType<TextualValueType>,\n default: '',\n },\n placeholder: {\n type: String,\n default: '',\n required: false,\n },\n});\n\nexport const withCommonElInputProps = () => ({\n name: {\n type: String,\n required: false,\n default: '',\n },\n id: {\n type: String,\n required: false,\n default: '',\n },\n label: {\n type: String,\n required: false,\n default: '',\n },\n validation: {\n type: String as PropType<InputValidation>,\n default: '',\n required: false,\n },\n disabled: {\n type: Boolean,\n required: false,\n default: false,\n },\n errorMessage: {\n type: [String, Boolean],\n required: false,\n default: undefined,\n },\n hiddenErrorMessage: {\n type: Boolean,\n required: false,\n default: false,\n },\n});\n\nexport const withTextualElInputProps = () => ({\n ...withCommonElInputProps(),\n // v-model binding will always be done to a single string. every component will treat the string as he wishes\n modelValue: {\n type: String as PropType<TextualValueType>,\n default: '',\n },\n placeholder: {\n type: String,\n default: '',\n required: false,\n },\n});\n\nexport const withNumberInputProps = () => ({\n ...withCommonInputProps(),\n modelValue: {\n type: Number as PropType<NumberValueType>,\n },\n placeholder: {\n type: String,\n default: '',\n required: false,\n },\n step: {\n type: Number,\n default: 1,\n required: false,\n },\n});\n\nexport const withNumberElInputProps = () => ({\n ...withCommonElInputProps(),\n modelValue: {\n type: Number as PropType<NumberValueType>,\n },\n placeholder: {\n type: String,\n default: '',\n required: false,\n },\n step: {\n type: Number,\n default: 1,\n required: false,\n },\n min: {\n type: Number,\n default: undefined,\n required: false,\n },\n max: {\n type: Number,\n default: undefined,\n required: false,\n },\n});\n\nexport function useInput<T = string>(\n initialValue: Ref<T>,\n validations: Ref<string[]> | ComputedRef<string[]>,\n inputName: string = '',\n onChange?: (value: T) => void,\n) {\n const uuid = UniqueID().getID();\n const validationsString = computed(() => validations.value && validations.value.join('|'));\n\n // if a name is not provided it generates a random one\n const field = useField<T>(inputName || uuid, validationsString, {\n // empty string counts as a forced blank value\n initialValue,\n // validation is performed manually on value change, only if there are errors\n validateOnValueUpdate: false,\n });\n\n watch(initialValue, newValue => {\n field.setValue(newValue);\n });\n\n watch(field.value, val => {\n if (onChange) {\n onChange(val);\n }\n if (field.errorMessage.value) {\n field.validate();\n }\n });\n\n return {\n fieldContext: field,\n errorMessage: field.errorMessage,\n value: field.value,\n uuid,\n meta: field.meta,\n setValue: field.setValue,\n };\n}\n\nexport function showRequiredMark(validations: string[], forceHideMark?: boolean | undefined): boolean {\n if (forceHideMark) return false;\n\n for (const v of validations) {\n if (v.match(/(?:^required)|required\\||(?:\\|required$)/)) {\n return true;\n }\n }\n return false;\n}\n"],"names":["UUID","UniqueID","withCommonInputProps","withTextualInputProps","withCommonElInputProps","withTextualElInputProps","withNumberInputProps","withNumberElInputProps","useInput","initialValue","validations","inputName","onChange","uuid","validationsString","computed","field","useField","watch","newValue","val","showRequiredMark","forceHideMark","v"],"mappings":"kFAGA,IAAIA,EAAO,EAEJ,MAAMC,EAAW,KAKf,CACL,MALY,KACZD,IACO,cAAcA,EAAK,SAAA,CAAU,GAGpC,GASSE,EAAuB,KAAO,CACzC,MAAO,CACL,KAAM,OACN,SAAU,GACV,QAAS,EACX,EACA,SAAU,CACR,KAAM,QACN,SAAU,GACV,QAAS,EACX,EACA,WAAY,CACV,KAAM,OACN,QAAS,GACT,SAAU,EACZ,EACA,iBAAkB,CAChB,KAAM,QACN,SAAU,GACV,QAAS,EACX,EACA,mBAAoB,CAClB,KAAM,QACN,SAAU,GACV,QAAS,EACX,EACA,YAAa,CACX,KAAM,OAIN,SAAU,GACV,QAAS,MACX,CACF,GAEaC,EAAwB,KAAO,CAC1C,GAAGD,EAAqB,EAExB,WAAY,CACV,KAAM,OACN,QAAS,EACX,EACA,YAAa,CACX,KAAM,OACN,QAAS,GACT,SAAU,EACZ,CACF,GAEaE,EAAyB,KAAO,CAC3C,KAAM,CACJ,KAAM,OACN,SAAU,GACV,QAAS,EACX,EACA,GAAI,CACF,KAAM,OACN,SAAU,GACV,QAAS,EACX,EACA,MAAO,CACL,KAAM,OACN,SAAU,GACV,QAAS,EACX,EACA,WAAY,CACV,KAAM,OACN,QAAS,GACT,SAAU,EACZ,EACA,SAAU,CACR,KAAM,QACN,SAAU,GACV,QAAS,EACX,EACA,aAAc,CACZ,KAAM,CAAC,OAAQ,OAAO,EACtB,SAAU,GACV,QAAS,MACX,EACA,mBAAoB,CAClB,KAAM,QACN,SAAU,GACV,QAAS,EACX,CACF,GAEaC,EAA0B,KAAO,CAC5C,GAAGD,EAAuB,EAE1B,WAAY,CACV,KAAM,OACN,QAAS,EACX,EACA,YAAa,CACX,KAAM,OACN,QAAS,GACT,SAAU,EACZ,CACF,GAEaE,EAAuB,KAAO,CACzC,GAAGJ,EAAqB,EACxB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