@sarafapp/ant-design 1.0.24 → 1.0.26
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/baseForm/SarafNumberFiled.vue.d.ts +2 -0
- package/dist/baseForm/SarafNumberFiled.vue.es.js +1 -1
- package/dist/baseForm/SarafNumberFiled.vue.es2.js +39 -33
- package/dist/baseForm/SarafSearchFiled.vue.es.js +13 -12
- package/dist/baseForm/SarafSelect.vue.d.ts +2 -0
- package/dist/baseForm/SarafSelect.vue.es.js +1 -1
- package/dist/baseForm/SarafSelect.vue.es2.js +73 -69
- package/dist/baseForm/SarafTextFiled.vue.d.ts +2 -0
- package/dist/baseForm/SarafTextFiled.vue.es.js +2 -2
- package/dist/baseForm/SarafTextFiled.vue.es2.js +35 -29
- package/dist/baseTable/SarafPriceTableCell.vue.es.js +3 -3
- package/dist/baseTable/SarafPriceTableCell.vue.es2.js +10 -10
- package/dist/baseTable/SarafTable.vue.es.js +4 -4
- package/dist/baseTable/SarafTable.vue.es2.js +165 -152
- package/dist/baseTable/SarafTableGenerator.vue.d.ts +4 -2
- package/dist/baseTable/SarafTableGenerator.vue.es.js +1 -1
- package/dist/baseTable/SarafTableGenerator.vue.es2.js +114 -106
- package/dist/baseTable/SarafTradeSymbolPriceCell.vue.es.js +1 -1
- package/dist/baseTable/SarafTradeSymbolPriceCell.vue.es2.js +25 -23
- package/dist/dataEntry/index.d.ts +2 -0
- package/dist/dataEntry/switch/SarafSwitch.vue.d.ts +22 -0
- package/dist/dataEntry/switch/SarafSwitch.vue.es.js +7 -0
- package/dist/dataEntry/switch/SarafSwitch.vue.es2.js +35 -0
- package/dist/dataEntry/switch/model/Constants.d.ts +4 -0
- package/dist/dataEntry/switch/model/Constants.es.js +4 -0
- package/dist/index.es.js +38 -34
- package/dist/index.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -15,6 +15,8 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
15
15
|
type?: SarafInputTypes;
|
|
16
16
|
max?: number;
|
|
17
17
|
min?: number;
|
|
18
|
+
label?: string;
|
|
19
|
+
isPlaceholderAsLabel?: boolean;
|
|
18
20
|
}) & Partial<{}>> & import('vue').PublicProps;
|
|
19
21
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
20
22
|
attrs: any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SarafNumberFiled.vue.es2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../_virtual/_plugin-vue_export-helper.es.js";
|
|
4
|
-
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-a8bbcbfd"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,39 +1,45 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { InputStatus as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as M, mergeModels as f, useModel as I, useSlots as w, computed as t, resolveComponent as D, resolveDirective as A, withDirectives as L, createElementBlock as v, openBlock as b, normalizeClass as a, createCommentVNode as P, createVNode as x, toDisplayString as $, createSlots as F, withCtx as n, createElementVNode as i, renderSlot as r } from "vue";
|
|
2
|
+
import { InputStatus as C, SarafInputTypes as T, InputSizes as U } from "./model/Constants.es.js";
|
|
3
|
+
import j from "./SarafFiledInvalidMessage.vue.es.js";
|
|
4
|
+
const J = /* @__PURE__ */ M({
|
|
5
5
|
__name: "SarafNumberFiled",
|
|
6
|
-
props: /* @__PURE__ */
|
|
6
|
+
props: /* @__PURE__ */ f({
|
|
7
7
|
inputControl: {},
|
|
8
8
|
placeholder: {},
|
|
9
|
-
size: { default:
|
|
9
|
+
size: { default: U.Large },
|
|
10
10
|
disabled: { type: Boolean },
|
|
11
11
|
isClearable: { type: Boolean, default: !1 },
|
|
12
|
-
type: { default:
|
|
12
|
+
type: { default: T.Number },
|
|
13
13
|
max: {},
|
|
14
|
-
min: {}
|
|
14
|
+
min: {},
|
|
15
|
+
label: {},
|
|
16
|
+
isPlaceholderAsLabel: { type: Boolean, default: !0 }
|
|
15
17
|
}, {
|
|
16
18
|
modelValue: {},
|
|
17
19
|
modelModifiers: {}
|
|
18
20
|
}),
|
|
19
|
-
emits: /* @__PURE__ */
|
|
20
|
-
setup(
|
|
21
|
-
const e =
|
|
21
|
+
emits: /* @__PURE__ */ f(["buttonClick"], ["update:modelValue"]),
|
|
22
|
+
setup(u, { emit: y }) {
|
|
23
|
+
const e = u, d = I(u, "modelValue"), B = y, s = w(), _ = t(() => !!s.button), h = t(() => !!s.prefix), k = t(() => !!s.suffix), c = t(() => e.inputControl.getNotValidMessage()), S = t(() => !!c.value), g = t(() => S.value ? C.Error : C.Default), l = t(() => ({
|
|
22
24
|
disabled: e.disabled
|
|
23
|
-
}));
|
|
24
|
-
function
|
|
25
|
-
e.disabled ||
|
|
25
|
+
})), p = t(() => e.label ? e.label : e.isPlaceholderAsLabel ? e.placeholder : "");
|
|
26
|
+
function N() {
|
|
27
|
+
e.disabled || B("buttonClick");
|
|
26
28
|
}
|
|
27
|
-
return (
|
|
28
|
-
const
|
|
29
|
-
return
|
|
29
|
+
return (o, m) => {
|
|
30
|
+
const V = D("a-input-number"), z = A("touch-sensitive-control");
|
|
31
|
+
return L((b(), v("div", {
|
|
30
32
|
tabindex: "1",
|
|
31
|
-
class:
|
|
33
|
+
class: a(["input__container", l.value])
|
|
32
34
|
}, [
|
|
33
|
-
|
|
35
|
+
p.value ? (b(), v("label", {
|
|
36
|
+
key: 0,
|
|
37
|
+
class: a(["input-label", l.value])
|
|
38
|
+
}, $(p.value), 3)) : P("", !0),
|
|
39
|
+
x(V, {
|
|
34
40
|
value: d.value,
|
|
35
|
-
"onUpdate:value":
|
|
36
|
-
status:
|
|
41
|
+
"onUpdate:value": m[0] || (m[0] = (E) => d.value = E),
|
|
42
|
+
status: g.value,
|
|
37
43
|
size: e.size,
|
|
38
44
|
placeholder: e.placeholder,
|
|
39
45
|
disabled: e.disabled,
|
|
@@ -42,51 +48,51 @@ const q = /* @__PURE__ */ z({
|
|
|
42
48
|
max: e.max,
|
|
43
49
|
min: e.min
|
|
44
50
|
}, F({ _: 2 }, [
|
|
45
|
-
|
|
51
|
+
h.value ? {
|
|
46
52
|
name: "prefix",
|
|
47
53
|
fn: n(() => [
|
|
48
54
|
i("span", {
|
|
49
|
-
class:
|
|
55
|
+
class: a(["input--icon", l.value])
|
|
50
56
|
}, [
|
|
51
|
-
|
|
57
|
+
r(o.$slots, "prefix", {}, void 0, !0)
|
|
52
58
|
], 2)
|
|
53
59
|
]),
|
|
54
60
|
key: "0"
|
|
55
61
|
} : void 0,
|
|
56
|
-
|
|
62
|
+
k.value ? {
|
|
57
63
|
name: "suffix",
|
|
58
64
|
fn: n(() => [
|
|
59
65
|
i("span", {
|
|
60
|
-
class:
|
|
66
|
+
class: a(["input--icon", l.value])
|
|
61
67
|
}, [
|
|
62
|
-
|
|
68
|
+
r(o.$slots, "suffix", {}, void 0, !0)
|
|
63
69
|
], 2)
|
|
64
70
|
]),
|
|
65
71
|
key: "1"
|
|
66
72
|
} : void 0,
|
|
67
|
-
|
|
73
|
+
_.value ? {
|
|
68
74
|
name: "addonAfter",
|
|
69
75
|
fn: n(() => [
|
|
70
76
|
i("span", {
|
|
71
77
|
class: "input_button",
|
|
72
|
-
onClick:
|
|
78
|
+
onClick: N
|
|
73
79
|
}, [
|
|
74
|
-
|
|
80
|
+
r(o.$slots, "button", {}, void 0, !0)
|
|
75
81
|
])
|
|
76
82
|
]),
|
|
77
83
|
key: "2"
|
|
78
84
|
} : void 0
|
|
79
85
|
]), 1032, ["value", "status", "size", "placeholder", "disabled", "allow-clear", "type", "max", "min"]),
|
|
80
|
-
|
|
86
|
+
x(j, {
|
|
81
87
|
"invalid-message": c.value,
|
|
82
88
|
disabled: e.disabled
|
|
83
89
|
}, null, 8, ["invalid-message", "disabled"])
|
|
84
90
|
], 2)), [
|
|
85
|
-
[
|
|
91
|
+
[z, e.inputControl]
|
|
86
92
|
]);
|
|
87
93
|
};
|
|
88
94
|
}
|
|
89
95
|
});
|
|
90
96
|
export {
|
|
91
|
-
|
|
97
|
+
J as default
|
|
92
98
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as f, mergeModels as
|
|
1
|
+
import { defineComponent as f, mergeModels as r, useModel as h, createBlock as S, openBlock as b, unref as l, withCtx as v, createVNode as I } from "vue";
|
|
2
2
|
import V from "./SarafTextFiled.vue.es.js";
|
|
3
3
|
import { InputControl as x, DebounceService as z } from "@sarafapp/iron_core";
|
|
4
4
|
import { BasicInputNames as M, InputSizes as _ } from "./model/Constants.es.js";
|
|
5
5
|
import C from "../icons/SearchIcon.vue.es.js";
|
|
6
6
|
const F = /* @__PURE__ */ f({
|
|
7
7
|
__name: "SarafSearchFiled",
|
|
8
|
-
props: /* @__PURE__ */
|
|
8
|
+
props: /* @__PURE__ */ r({
|
|
9
9
|
debounceTime: { default: 500 },
|
|
10
10
|
size: { default: _.Large }
|
|
11
11
|
}, {
|
|
12
12
|
modelValue: {},
|
|
13
13
|
modelModifiers: {}
|
|
14
14
|
}),
|
|
15
|
-
emits: /* @__PURE__ */
|
|
16
|
-
setup(t, { emit:
|
|
17
|
-
const
|
|
15
|
+
emits: /* @__PURE__ */ r(["search"], ["update:modelValue"]),
|
|
16
|
+
setup(t, { emit: c }) {
|
|
17
|
+
const a = t, i = c, n = h(t, "modelValue"), u = new x(M.Search, "");
|
|
18
18
|
let o = "";
|
|
19
19
|
const m = new z(
|
|
20
20
|
{
|
|
@@ -25,27 +25,28 @@ const F = /* @__PURE__ */ f({
|
|
|
25
25
|
p(o);
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
|
-
|
|
28
|
+
a.debounceTime
|
|
29
29
|
);
|
|
30
30
|
function d(e) {
|
|
31
31
|
o = e, m.runAction();
|
|
32
32
|
}
|
|
33
33
|
function s(e) {
|
|
34
|
-
|
|
34
|
+
i("search", e);
|
|
35
35
|
}
|
|
36
36
|
function p(e) {
|
|
37
|
-
|
|
37
|
+
n.value = e;
|
|
38
38
|
}
|
|
39
39
|
return (e, g) => (b(), S(V, {
|
|
40
|
-
"model-value":
|
|
41
|
-
"input-control":
|
|
42
|
-
size:
|
|
40
|
+
"model-value": n.value,
|
|
41
|
+
"input-control": l(u),
|
|
42
|
+
size: a.size,
|
|
43
43
|
placeholder: "جستجو",
|
|
44
|
+
"is-placeholder-as-label": !1,
|
|
44
45
|
"is-clearable": "",
|
|
45
46
|
"onUpdate:modelValue": d
|
|
46
47
|
}, {
|
|
47
48
|
suffix: v(() => [
|
|
48
|
-
I(
|
|
49
|
+
I(l(C))
|
|
49
50
|
]),
|
|
50
51
|
_: 1
|
|
51
52
|
}, 8, ["model-value", "input-control", "size"]));
|
|
@@ -21,6 +21,8 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
21
21
|
isSearchable?: boolean;
|
|
22
22
|
isLoading?: boolean;
|
|
23
23
|
isClearable?: boolean;
|
|
24
|
+
label?: string;
|
|
25
|
+
isPlaceholderAsLabel?: boolean;
|
|
24
26
|
}) & Partial<{}>> & import('vue').PublicProps;
|
|
25
27
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
26
28
|
attrs: any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SarafSelect.vue.es2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.es.js";
|
|
4
|
-
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-85b59393"]]);
|
|
5
5
|
export {
|
|
6
6
|
f as default
|
|
7
7
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { DebounceService as
|
|
3
|
-
import { InputStatus as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { SpinnerSizes as
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as K, mergeModels as C, useModel as Q, ref as W, computed as a, useTemplateRef as X, watch as Y, onBeforeMount as Z, onBeforeUpdate as ee, onBeforeUnmount as ae, resolveComponent as z, createElementBlock as f, openBlock as s, normalizeClass as V, createCommentVNode as p, createVNode as r, toDisplayString as w, withCtx as i, createBlock as v, Fragment as te, renderList as le, createTextVNode as se, createElementVNode as A, unref as u } from "vue";
|
|
2
|
+
import { DebounceService as ne } from "@sarafapp/iron_core";
|
|
3
|
+
import { InputStatus as L, SarafSelectMode as k, InputSizes as oe } from "./model/Constants.es.js";
|
|
4
|
+
import re from "./SarafFiledInvalidMessage.vue.es.js";
|
|
5
|
+
import N from "../loaders/spinners/SarafDefaultSpinner.vue.es.js";
|
|
6
|
+
import { SpinnerSizes as T } from "../loaders/spinners/model/Constants.es.js";
|
|
7
|
+
const ie = {
|
|
8
8
|
ref: "spinner",
|
|
9
9
|
class: "spinner-container"
|
|
10
|
-
},
|
|
10
|
+
}, ue = { class: "spinner-container" }, he = /* @__PURE__ */ K({
|
|
11
11
|
__name: "SarafSelect",
|
|
12
|
-
props: /* @__PURE__ */
|
|
12
|
+
props: /* @__PURE__ */ C({
|
|
13
13
|
inputControl: {},
|
|
14
14
|
totalCount: {},
|
|
15
15
|
items: {},
|
|
@@ -19,129 +19,133 @@ const re = {
|
|
|
19
19
|
return [];
|
|
20
20
|
} },
|
|
21
21
|
placeholder: { default: "لطفا یک مورد را انتخاب کنید" },
|
|
22
|
-
size: { default:
|
|
22
|
+
size: { default: oe.Large },
|
|
23
23
|
isSearchable: { type: Boolean, default: !1 },
|
|
24
24
|
isLoading: { type: Boolean, default: !1 },
|
|
25
|
-
isClearable: { type: Boolean, default: !1 }
|
|
25
|
+
isClearable: { type: Boolean, default: !1 },
|
|
26
|
+
label: {},
|
|
27
|
+
isPlaceholderAsLabel: { type: Boolean, default: !0 }
|
|
26
28
|
}, {
|
|
27
29
|
modelValue: {},
|
|
28
30
|
modelModifiers: {}
|
|
29
31
|
}),
|
|
30
|
-
emits: /* @__PURE__ */
|
|
31
|
-
setup(
|
|
32
|
-
const e =
|
|
32
|
+
emits: /* @__PURE__ */ C(["fetchMore", "searchStart", "search"], ["update:modelValue"]),
|
|
33
|
+
setup(h, { emit: D }) {
|
|
34
|
+
const e = h, c = D;
|
|
33
35
|
let d = "";
|
|
34
|
-
const
|
|
35
|
-
/* @__PURE__ */ new Map()
|
|
36
|
-
), s = P("spinner"), L = new se(
|
|
36
|
+
const b = Q(h, "modelValue"), S = W(/* @__PURE__ */ new Map()), g = a(() => e.label ? e.label : e.isPlaceholderAsLabel ? e.placeholder : ""), n = X("spinner"), E = new ne(
|
|
37
37
|
{
|
|
38
38
|
runImmediate() {
|
|
39
|
-
|
|
39
|
+
j();
|
|
40
40
|
},
|
|
41
41
|
runDebounce() {
|
|
42
|
-
|
|
42
|
+
q();
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
500
|
|
46
|
-
),
|
|
47
|
-
(
|
|
48
|
-
|
|
46
|
+
), M = new IntersectionObserver(
|
|
47
|
+
(t) => {
|
|
48
|
+
t[0].isIntersecting && c("fetchMore");
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
threshold: 0.7
|
|
52
52
|
}
|
|
53
|
-
),
|
|
53
|
+
), x = a(() => e.items.length > 0), U = a(() => e.totalCount !== e.items.length), F = a(() => U.value && !e.isLoading), H = a(() => e.isLoading && !x.value), _ = a(() => e.inputControl.getNotValidMessage()), O = a(() => !_.value.length), P = a(() => O.value ? L.Default : L.Error), y = a(() => ({
|
|
54
54
|
disabled: e.disabled
|
|
55
|
-
})),
|
|
56
|
-
function
|
|
55
|
+
})), R = a(() => e.isMultiple ? k.Multi : k.Single), $ = a(() => Array.from(S.value.values()));
|
|
56
|
+
function j() {
|
|
57
57
|
c("searchStart", d);
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function q() {
|
|
60
60
|
c("search", d);
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
d =
|
|
62
|
+
function G(t) {
|
|
63
|
+
d = t, E.runAction();
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
for (const l of
|
|
67
|
-
|
|
65
|
+
function I(t) {
|
|
66
|
+
for (const l of t)
|
|
67
|
+
S.value.set(l.value, l);
|
|
68
68
|
}
|
|
69
|
-
|
|
70
|
-
() =>
|
|
69
|
+
Y(
|
|
70
|
+
() => n.value,
|
|
71
71
|
() => {
|
|
72
|
-
|
|
72
|
+
n.value && M.observe(n.value);
|
|
73
73
|
}
|
|
74
74
|
);
|
|
75
|
-
function
|
|
76
|
-
|
|
75
|
+
function B() {
|
|
76
|
+
I(e.items), I(e.initialItems);
|
|
77
77
|
}
|
|
78
|
-
return
|
|
79
|
-
|
|
80
|
-
}),
|
|
81
|
-
|
|
82
|
-
}),
|
|
83
|
-
|
|
84
|
-
}), (
|
|
85
|
-
const m =
|
|
86
|
-
return
|
|
87
|
-
class:
|
|
78
|
+
return Z(() => {
|
|
79
|
+
B();
|
|
80
|
+
}), ee(() => {
|
|
81
|
+
B();
|
|
82
|
+
}), ae(() => {
|
|
83
|
+
n.value && M.unobserve(n.value);
|
|
84
|
+
}), (t, l) => {
|
|
85
|
+
const m = z("a-select-option"), J = z("a-select");
|
|
86
|
+
return s(), f("div", {
|
|
87
|
+
class: V(["saraf-select", y.value])
|
|
88
88
|
}, [
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
g.value ? (s(), f("label", {
|
|
90
|
+
key: 0,
|
|
91
|
+
class: V(["input-label", y.value])
|
|
92
|
+
}, w(g.value), 3)) : p("", !0),
|
|
93
|
+
r(J, {
|
|
94
|
+
value: b.value,
|
|
95
|
+
"onUpdate:value": l[0] || (l[0] = (o) => b.value = o),
|
|
92
96
|
class: "saraf-select",
|
|
93
|
-
mode:
|
|
97
|
+
mode: R.value,
|
|
94
98
|
disabled: e.disabled,
|
|
95
99
|
"auto-clear-search-value": !1,
|
|
96
100
|
"filter-option": !1,
|
|
97
101
|
"show-search": e.isSearchable,
|
|
98
102
|
placeholder: e.placeholder,
|
|
99
|
-
status:
|
|
103
|
+
status: P.value,
|
|
100
104
|
size: e.size,
|
|
101
105
|
"allow-clear": e.isClearable,
|
|
102
|
-
onSearch:
|
|
106
|
+
onSearch: G
|
|
103
107
|
}, {
|
|
104
108
|
default: i(() => [
|
|
105
|
-
(
|
|
106
|
-
key:
|
|
107
|
-
value:
|
|
109
|
+
(s(!0), f(te, null, le($.value, (o) => (s(), v(m, {
|
|
110
|
+
key: o.value,
|
|
111
|
+
value: o.value
|
|
108
112
|
}, {
|
|
109
113
|
default: i(() => [
|
|
110
|
-
|
|
114
|
+
se(w(o.label), 1)
|
|
111
115
|
]),
|
|
112
116
|
_: 2
|
|
113
117
|
}, 1032, ["value"]))), 128)),
|
|
114
|
-
|
|
118
|
+
F.value ? (s(), v(m, {
|
|
115
119
|
key: 0,
|
|
116
120
|
disabled: ""
|
|
117
121
|
}, {
|
|
118
122
|
default: i(() => [
|
|
119
|
-
|
|
120
|
-
r(u(
|
|
121
|
-
size: u(
|
|
123
|
+
A("div", ie, [
|
|
124
|
+
r(u(N), {
|
|
125
|
+
size: u(T).Small
|
|
122
126
|
}, null, 8, ["size"])
|
|
123
127
|
], 512)
|
|
124
128
|
]),
|
|
125
129
|
_: 1
|
|
126
|
-
})) :
|
|
127
|
-
|
|
130
|
+
})) : p("", !0),
|
|
131
|
+
H.value ? (s(), v(m, {
|
|
128
132
|
key: 1,
|
|
129
133
|
disabled: ""
|
|
130
134
|
}, {
|
|
131
135
|
default: i(() => [
|
|
132
|
-
|
|
133
|
-
r(u(
|
|
134
|
-
size: u(
|
|
136
|
+
A("div", ue, [
|
|
137
|
+
r(u(N), {
|
|
138
|
+
size: u(T).Small
|
|
135
139
|
}, null, 8, ["size"])
|
|
136
140
|
])
|
|
137
141
|
]),
|
|
138
142
|
_: 1
|
|
139
|
-
})) :
|
|
143
|
+
})) : p("", !0)
|
|
140
144
|
]),
|
|
141
145
|
_: 1
|
|
142
146
|
}, 8, ["value", "mode", "disabled", "show-search", "placeholder", "status", "size", "allow-clear"]),
|
|
143
|
-
r(
|
|
144
|
-
"invalid-message":
|
|
147
|
+
r(re, {
|
|
148
|
+
"invalid-message": _.value,
|
|
145
149
|
disabled: e.disabled
|
|
146
150
|
}, null, 8, ["invalid-message", "disabled"])
|
|
147
151
|
], 2);
|
|
@@ -149,5 +153,5 @@ const re = {
|
|
|
149
153
|
}
|
|
150
154
|
});
|
|
151
155
|
export {
|
|
152
|
-
|
|
156
|
+
he as default
|
|
153
157
|
};
|
|
@@ -9,10 +9,12 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
9
9
|
} & {
|
|
10
10
|
inputControl: InputControl<string>;
|
|
11
11
|
placeholder: string;
|
|
12
|
+
label?: string;
|
|
12
13
|
size?: InputSizes;
|
|
13
14
|
disabled?: boolean;
|
|
14
15
|
isClearable?: boolean;
|
|
15
16
|
type?: SarafInputTypes;
|
|
17
|
+
isPlaceholderAsLabel?: boolean;
|
|
16
18
|
}) & Partial<{}>> & import('vue').PublicProps;
|
|
17
19
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
18
20
|
attrs: any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SarafTextFiled.vue.es2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.es.js";
|
|
4
|
-
const
|
|
4
|
+
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a9f01369"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,88 +1,94 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { InputStatus as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as N, mergeModels as v, useModel as I, useSlots as w, computed as t, resolveComponent as D, resolveDirective as A, withDirectives as L, createElementBlock as m, openBlock as b, normalizeClass as a, createCommentVNode as P, createVNode as C, toDisplayString as T, createSlots as $, withCtx as n, createElementVNode as i, renderSlot as r } from "vue";
|
|
2
|
+
import { InputStatus as x, SarafInputTypes as F, InputSizes as U } from "./model/Constants.es.js";
|
|
3
|
+
import j from "./SarafFiledInvalidMessage.vue.es.js";
|
|
4
|
+
const J = /* @__PURE__ */ N({
|
|
5
5
|
__name: "SarafTextFiled",
|
|
6
|
-
props: /* @__PURE__ */
|
|
6
|
+
props: /* @__PURE__ */ v({
|
|
7
7
|
inputControl: {},
|
|
8
8
|
placeholder: {},
|
|
9
|
-
|
|
9
|
+
label: {},
|
|
10
|
+
size: { default: U.Large },
|
|
10
11
|
disabled: { type: Boolean },
|
|
11
12
|
isClearable: { type: Boolean, default: !1 },
|
|
12
|
-
type: { default: F.Text }
|
|
13
|
+
type: { default: F.Text },
|
|
14
|
+
isPlaceholderAsLabel: { type: Boolean, default: !0 }
|
|
13
15
|
}, {
|
|
14
16
|
modelValue: {},
|
|
15
17
|
modelModifiers: {}
|
|
16
18
|
}),
|
|
17
|
-
emits: /* @__PURE__ */
|
|
18
|
-
setup(
|
|
19
|
-
const e =
|
|
19
|
+
emits: /* @__PURE__ */ v(["buttonClick"], ["update:modelValue"]),
|
|
20
|
+
setup(u, { emit: y }) {
|
|
21
|
+
const e = u, d = I(u, "modelValue"), _ = y, s = w(), B = t(() => !!s.button), h = t(() => !!s.prefix), k = t(() => !!s.suffix), c = t(() => e.inputControl.getNotValidMessage()), S = t(() => !!c.value), g = t(() => S.value ? x.Error : x.Default), l = t(() => ({
|
|
20
22
|
disabled: e.disabled
|
|
21
|
-
}));
|
|
22
|
-
function
|
|
23
|
-
e.disabled ||
|
|
23
|
+
})), p = t(() => e.label ? e.label : e.isPlaceholderAsLabel ? e.placeholder : "");
|
|
24
|
+
function V() {
|
|
25
|
+
e.disabled || _("buttonClick");
|
|
24
26
|
}
|
|
25
|
-
return (o,
|
|
26
|
-
const
|
|
27
|
-
return
|
|
27
|
+
return (o, f) => {
|
|
28
|
+
const z = D("a-input"), E = A("touch-sensitive-control");
|
|
29
|
+
return L((b(), m("div", {
|
|
28
30
|
tabindex: "1",
|
|
29
31
|
class: a(["input__container", l.value])
|
|
30
32
|
}, [
|
|
31
|
-
|
|
33
|
+
p.value ? (b(), m("label", {
|
|
34
|
+
key: 0,
|
|
35
|
+
class: a(["input__label", l.value])
|
|
36
|
+
}, T(p.value), 3)) : P("", !0),
|
|
37
|
+
C(z, {
|
|
32
38
|
value: d.value,
|
|
33
|
-
"onUpdate:value":
|
|
34
|
-
status:
|
|
39
|
+
"onUpdate:value": f[0] || (f[0] = (M) => d.value = M),
|
|
40
|
+
status: g.value,
|
|
35
41
|
size: e.size,
|
|
36
42
|
placeholder: e.placeholder,
|
|
37
43
|
disabled: e.disabled,
|
|
38
44
|
"allow-clear": e.isClearable,
|
|
39
45
|
type: e.type
|
|
40
46
|
}, $({ _: 2 }, [
|
|
41
|
-
|
|
47
|
+
h.value ? {
|
|
42
48
|
name: "prefix",
|
|
43
49
|
fn: n(() => [
|
|
44
50
|
i("span", {
|
|
45
51
|
class: a(["input--icon", l.value])
|
|
46
52
|
}, [
|
|
47
|
-
|
|
53
|
+
r(o.$slots, "prefix", {}, void 0, !0)
|
|
48
54
|
], 2)
|
|
49
55
|
]),
|
|
50
56
|
key: "0"
|
|
51
57
|
} : void 0,
|
|
52
|
-
|
|
58
|
+
k.value ? {
|
|
53
59
|
name: "suffix",
|
|
54
60
|
fn: n(() => [
|
|
55
61
|
i("span", {
|
|
56
62
|
class: a(["input--icon", l.value])
|
|
57
63
|
}, [
|
|
58
|
-
|
|
64
|
+
r(o.$slots, "suffix", {}, void 0, !0)
|
|
59
65
|
], 2)
|
|
60
66
|
]),
|
|
61
67
|
key: "1"
|
|
62
68
|
} : void 0,
|
|
63
|
-
|
|
69
|
+
B.value ? {
|
|
64
70
|
name: "addonAfter",
|
|
65
71
|
fn: n(() => [
|
|
66
72
|
i("span", {
|
|
67
73
|
class: "input_button",
|
|
68
|
-
onClick:
|
|
74
|
+
onClick: V
|
|
69
75
|
}, [
|
|
70
|
-
|
|
76
|
+
r(o.$slots, "button", {}, void 0, !0)
|
|
71
77
|
])
|
|
72
78
|
]),
|
|
73
79
|
key: "2"
|
|
74
80
|
} : void 0
|
|
75
81
|
]), 1032, ["value", "status", "size", "placeholder", "disabled", "allow-clear", "type"]),
|
|
76
|
-
|
|
82
|
+
C(j, {
|
|
77
83
|
"invalid-message": c.value,
|
|
78
84
|
disabled: e.disabled
|
|
79
85
|
}, null, 8, ["invalid-message", "disabled"])
|
|
80
86
|
], 2)), [
|
|
81
|
-
[
|
|
87
|
+
[E, e.inputControl]
|
|
82
88
|
]);
|
|
83
89
|
};
|
|
84
90
|
}
|
|
85
91
|
});
|
|
86
92
|
export {
|
|
87
|
-
|
|
93
|
+
J as default
|
|
88
94
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./SarafPriceTableCell.vue.es2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const f = /* @__PURE__ */ o
|
|
3
|
+
import r from "../_virtual/_plugin-vue_export-helper.es.js";
|
|
4
|
+
const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-84eb2293"]]);
|
|
5
5
|
export {
|
|
6
6
|
f as default
|
|
7
7
|
};
|