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