@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
@@ -1,10 +1,10 @@
1
- import { defineComponent as he, ref as r, computed as i, onBeforeMount as ye, onBeforeUpdate as _e, onBeforeUnmount as ge, resolveComponent as d, createBlock as h, openBlock as n, createSlots as ve, withCtx as l, createElementBlock as p, createCommentVNode as C, unref as y, toDisplayString as m, resolveDynamicComponent as Ce, normalizeProps as Te, mergeProps as we, createVNode as f, createElementVNode as be, Fragment as T, renderList as F, withModifiers as Ae, createTextVNode as w, renderSlot as ke } from "vue";
2
- import { SelectableTableGenerator as Ie, TableConstants as b, CellType as A, HeaderType as Re, SortDetail as Pe, SortOrderTableHeader as xe, SortOrder as W, TABLE_ACTION_COLUMN as Ee, isOnlyOneItem as Oe, isLastItem as Ne } from "@sarafapp/iron_core";
3
- import Le from "../dataDisplay/tooltip/SarafTooltip.vue.es.js";
4
- const Be = { key: 0 }, De = {
1
+ import { defineComponent as Ce, ref as c, computed as s, onBeforeMount as Te, onBeforeUpdate as we, onBeforeUnmount as be, resolveComponent as d, createBlock as y, openBlock as l, createSlots as ke, withCtx as r, createElementBlock as p, createCommentVNode as C, unref as g, toDisplayString as m, resolveDynamicComponent as Ae, normalizeProps as Ie, mergeProps as Re, withModifiers as W, normalizeClass as xe, createVNode as f, createElementVNode as Pe, Fragment as T, renderList as j, createTextVNode as w, renderSlot as Ee } from "vue";
2
+ import { SelectableTableGenerator as Oe, TableConstants as b, CellType as k, HeaderType as Ne, SortDetail as Le, SortOrderTableHeader as Be, SortOrder as q, TABLE_ACTION_COLUMN as De, isOnlyOneItem as ze, isLastItem as Me } from "@sarafapp/iron_core";
3
+ import Ve from "../dataDisplay/tooltip/SarafTooltip.vue.es.js";
4
+ const He = { key: 0 }, Ue = ["onClick"], Ke = {
5
5
  key: 2,
6
6
  class: "action-column"
7
- }, Ue = /* @__PURE__ */ he({
7
+ }, je = /* @__PURE__ */ Ce({
8
8
  __name: "SarafTableGenerator",
9
9
  props: {
10
10
  dataSource: {},
@@ -12,9 +12,10 @@ const Be = { key: 0 }, De = {
12
12
  tableConfig: {},
13
13
  hasInitialLoad: { type: Boolean, default: !0 }
14
14
  },
15
- setup(j) {
16
- const t = j, k = r(""), u = r([]), I = r([]), R = r([]), S = r(), _ = i(() => t.dataSource instanceof Ie), P = i(() => u.value.length > b.MINIMAL_LOADABLE_HEADER_COUNT), x = r(0), E = r(0), O = r(0), N = r(!1), q = i(() => ({
17
- total: x.value,
15
+ emits: ["copy"],
16
+ setup(J, { emit: Q }) {
17
+ const t = J, X = Q, A = c(""), u = c([]), I = c([]), R = c([]), S = c(), _ = s(() => t.dataSource instanceof Oe), x = s(() => u.value.length > b.MINIMAL_LOADABLE_HEADER_COUNT), P = c(0), E = c(0), O = c(0), N = c(!1), Y = s(() => ({
18
+ total: P.value,
18
19
  current: E.value,
19
20
  showLessItems: !0,
20
21
  showTotal(e) {
@@ -23,162 +24,169 @@ const Be = { key: 0 }, De = {
23
24
  defaultPageSize: b.DEFAULT_ITEM_COUNT_PER_PAGE,
24
25
  pageSize: O.value,
25
26
  position: [b.PAGINATION_POSITION]
26
- })), L = i(() => {
27
+ })), L = s(() => {
27
28
  var e;
28
- return ((e = u.value[u.value.length - 1]) == null ? void 0 : e.cellType) === A.ACTION;
29
- }), J = i(() => _.value ? {
30
- onSelect: Y,
31
- onSelectAll: Z,
29
+ return ((e = u.value[u.value.length - 1]) == null ? void 0 : e.cellType) === k.ACTION;
30
+ }), Z = s(() => _.value ? {
31
+ onSelect: ne,
32
+ onSelectAll: oe,
32
33
  selectedRowKeys: R.value
33
- } : null), Q = i(() => !!S.value.summaryItems.length);
34
- function X(e) {
35
- const o = e.currentTarget;
36
- k.value = o.scrollWidth > o.clientWidth ? o.innerText : "";
34
+ } : null), ee = s(() => !!S.value.summaryItems.length);
35
+ function B(e) {
36
+ return String(e).length < 5;
37
37
  }
38
- function Y(e) {
38
+ async function te(e) {
39
+ !e || B(e) || (await navigator.clipboard.writeText(String(e)), X("copy", String(e)));
40
+ }
41
+ function ae(e) {
42
+ const n = e.currentTarget;
43
+ A.value = n.scrollWidth > n.clientWidth ? n.innerText : "";
44
+ }
45
+ function ne(e) {
39
46
  t.dataSource.selectRow(e);
40
47
  }
41
- function Z() {
48
+ function oe() {
42
49
  t.dataSource.selectAll();
43
50
  }
44
- async function ee(e, o, s) {
45
- if (e && await t.dataSource.paginate(e.current, e.pageSize), s != null && s.columnKey) {
46
- const g = new Pe(
47
- s.columnKey,
48
- te(s.order)
51
+ async function le(e, n, i) {
52
+ if (e && await t.dataSource.paginate(e.current, e.pageSize), i != null && i.columnKey) {
53
+ const v = new Le(
54
+ i.columnKey,
55
+ re(i.order)
49
56
  );
50
- await t.dataSource.sort(g);
57
+ await t.dataSource.sort(v);
51
58
  }
52
59
  }
53
- function te(e) {
54
- return e === xe.ASC ? W.ASC : W.DESC;
60
+ function re(e) {
61
+ return e === Be.ASC ? q.ASC : q.DESC;
55
62
  }
56
- async function ae() {
57
- t.hasInitialLoad && await t.dataSource.load(), B();
63
+ async function ce() {
64
+ t.hasInitialLoad && await t.dataSource.load(), D();
58
65
  }
59
- function B() {
66
+ function D() {
60
67
  const e = t.dataSource.hasAnyAction();
61
- e && !L.value && oe(), !e && L.value && ne();
68
+ e && !L.value && ue(), !e && L.value && ie();
62
69
  }
63
- function oe() {
64
- u.value.push(Ee);
70
+ function ue() {
71
+ u.value.push(De);
65
72
  }
66
- function ne() {
73
+ function ie() {
67
74
  u.value.pop();
68
75
  }
69
- function le(e) {
76
+ function se(e) {
70
77
  t.dataSource.handleClick(e);
71
78
  }
72
- function re(e) {
79
+ function de(e) {
73
80
  t.dataSource.handleMetaClick(e);
74
81
  }
75
- function ce(e) {
82
+ function pe(e) {
76
83
  t.dataSource.handleDoubleClick(e);
77
84
  }
78
- function ue(e) {
85
+ function me(e) {
79
86
  return {
80
- onClick(o) {
81
- o.metaKey ? re(e) : le(e);
87
+ onClick(n) {
88
+ n.metaKey ? de(e) : se(e);
82
89
  },
83
90
  onDblclick() {
84
- ce(e);
91
+ pe(e);
85
92
  }
86
93
  };
87
94
  }
88
- function se(e) {
95
+ function fe(e) {
89
96
  return e.id;
90
97
  }
91
- function ie(e, o) {
92
- return !Oe(e) && !Ne(e, o);
98
+ function Se(e, n) {
99
+ return !ze(e) && !Me(e, n);
93
100
  }
94
- function de(e, o) {
95
- return e.getProps ? e.getProps(o) : null;
101
+ function he(e, n) {
102
+ return e.getProps ? e.getProps(n) : null;
96
103
  }
97
- function D() {
104
+ function z() {
98
105
  S.value = t.dataSource.loadSummarySchema();
99
106
  }
100
107
  function M(e) {
101
108
  u.value = e;
102
109
  }
103
- function z(e) {
104
- I.value = e;
105
- }
106
110
  function V(e) {
107
- R.value = t.dataSource.getSelectedRowIds();
111
+ I.value = e;
108
112
  }
109
113
  function H(e) {
110
- x.value = e;
114
+ R.value = t.dataSource.getSelectedRowIds();
111
115
  }
112
116
  function U(e) {
113
- E.value = e;
117
+ P.value = e;
114
118
  }
115
119
  function K(e) {
116
- O.value = e;
120
+ E.value = e;
117
121
  }
118
122
  function G(e) {
123
+ O.value = e;
124
+ }
125
+ function $(e) {
119
126
  N.value = e;
120
127
  }
121
- return ye(() => {
122
- ae(), D(), t.dataSource.headerSchema.attach(M), t.dataSource.rows.attach(z), t.dataSource.currentPage.attach(U), t.dataSource.currentPageSize.attach(K), t.dataSource.totalItems.attach(H), t.dataSource.isExpandable.attach(G), _.value && t.dataSource.selectedRows.attach(V);
123
- }), _e(() => {
124
- B(), D();
125
- }), ge(() => {
126
- t.dataSource.onDestroy(), t.dataSource.headerSchema.detach(M), t.dataSource.rows.detach(z), t.dataSource.currentPage.detach(U), t.dataSource.currentPageSize.detach(K), t.dataSource.totalItems.detach(H), t.dataSource.isExpandable.detach(G), _.value && t.dataSource.selectedRows.detach(V);
127
- }), (e, o) => {
128
- const s = d("a-button"), g = d("a-divider"), $ = d("a-table-summary-cell"), pe = d("a-typography-text"), me = d("a-table-summary-row"), fe = d("a-table");
129
- return n(), h(fe, {
128
+ return Te(() => {
129
+ ce(), z(), t.dataSource.headerSchema.attach(M), t.dataSource.rows.attach(V), t.dataSource.currentPage.attach(K), t.dataSource.currentPageSize.attach(G), t.dataSource.totalItems.attach(U), t.dataSource.isExpandable.attach($), _.value && t.dataSource.selectedRows.attach(H);
130
+ }), we(() => {
131
+ D(), z();
132
+ }), be(() => {
133
+ t.dataSource.onDestroy(), t.dataSource.headerSchema.detach(M), t.dataSource.rows.detach(V), t.dataSource.currentPage.detach(K), t.dataSource.currentPageSize.detach(G), t.dataSource.totalItems.detach(U), t.dataSource.isExpandable.detach($), _.value && t.dataSource.selectedRows.detach(H);
134
+ }), (e, n) => {
135
+ const i = d("a-button"), v = d("a-divider"), F = d("a-table-summary-cell"), ye = d("a-typography-text"), ge = d("a-table-summary-row"), _e = d("a-table");
136
+ return l(), y(_e, {
130
137
  columns: u.value,
131
138
  "data-source": I.value,
132
- pagination: q.value,
133
- "custom-row": ue,
134
- "row-key": se,
139
+ pagination: Y.value,
140
+ "custom-row": me,
141
+ "row-key": fe,
135
142
  loading: t.isLoading,
136
143
  scroll: t.dataSource.scrollDetail,
137
- "row-selection": J.value,
144
+ "row-selection": Z.value,
138
145
  class: "saraf-table",
139
- onChange: ee
140
- }, ve({ _: 2 }, [
141
- P.value ? {
146
+ onChange: le
147
+ }, ke({ _: 2 }, [
148
+ x.value ? {
142
149
  name: "headerCell",
143
- fn: l(({ column: a }) => [
144
- a.headerType === y(Re).Text ? (n(), p("span", Be, m(a.title), 1)) : C("", !0)
150
+ fn: r(({ column: a }) => [
151
+ a.headerType === g(Ne).Text ? (l(), p("span", He, m(a.title), 1)) : C("", !0)
145
152
  ]),
146
153
  key: "0"
147
154
  } : void 0,
148
- P.value ? {
155
+ x.value ? {
149
156
  name: "bodyCell",
150
- fn: l(({ column: a, record: c }) => [
151
- t.tableConfig.getCellComponentRegistry().getRegisteredComponents().has(a.cellType) ? (n(), h(Ce(
157
+ fn: r(({ column: a, record: o }) => [
158
+ t.tableConfig.getCellComponentRegistry().getRegisteredComponents().has(a.cellType) ? (l(), y(Ae(
152
159
  t.tableConfig.getCellComponentRegistry().getRegisteredComponents().get(a.cellType)
153
- ), Te(we({ key: 0 }, { ...de(a, c), data: c[a.path] })), null, 16)) : a.cellType === y(A).Text ? (n(), p("div", {
160
+ ), Ie(Re({ key: 0 }, { ...he(a, o), data: o[a.path] })), null, 16)) : a.cellType === g(k).Text ? (l(), p("div", {
154
161
  key: 1,
155
162
  ref: "tooltipTarget",
156
- class: "ellipsis-cell",
157
- onMouseenter: X
163
+ class: xe(["ellipsis-cell", { "clickable-cell": !B(o[a.path]) }]),
164
+ onMouseenter: ae,
165
+ onClick: W((h) => te(o[a.path]), ["stop"])
158
166
  }, [
159
- f(y(Le), { title: k.value }, {
160
- default: l(() => [
161
- be("span", null, m(c[a.path]), 1)
167
+ f(g(Ve), { title: A.value }, {
168
+ default: r(() => [
169
+ Pe("span", null, m(o[a.path]), 1)
162
170
  ]),
163
171
  _: 2
164
172
  }, 1032, ["title"])
165
- ], 544)) : a.cellType === y(A).ACTION ? (n(), p("span", De, [
166
- (n(!0), p(T, null, F(t.dataSource.getRowActions(c), (v, Se) => (n(), p(T, {
167
- key: v.actionName
173
+ ], 42, Ue)) : a.cellType === g(k).ACTION ? (l(), p("span", Ke, [
174
+ (l(!0), p(T, null, j(t.dataSource.getRowActions(o), (h, ve) => (l(), p(T, {
175
+ key: h.actionName
168
176
  }, [
169
- f(s, {
177
+ f(i, {
170
178
  type: "link",
171
- onClick: Ae((Me) => v.handler(c), ["stop"])
179
+ onClick: W((Ge) => h.handler(o), ["stop"])
172
180
  }, {
173
- default: l(() => [
174
- w(m(v.actionName), 1)
181
+ default: r(() => [
182
+ w(m(h.actionName), 1)
175
183
  ]),
176
184
  _: 2
177
185
  }, 1032, ["onClick"]),
178
- ie(
179
- t.dataSource.getRowActions(c).length,
180
- Se
181
- ) ? (n(), h(g, {
186
+ Se(
187
+ t.dataSource.getRowActions(o).length,
188
+ ve
189
+ ) ? (l(), y(v, {
182
190
  key: 0,
183
191
  type: "vertical"
184
192
  })) : C("", !0)
@@ -189,31 +197,31 @@ const Be = { key: 0 }, De = {
189
197
  } : void 0,
190
198
  N.value ? {
191
199
  name: "expandedRowRender",
192
- fn: l(({ record: a }) => [
193
- ke(e.$slots, "expandedRowRender", {
200
+ fn: r(({ record: a }) => [
201
+ Ee(e.$slots, "expandedRowRender", {
194
202
  row: a
195
203
  }, void 0, !0)
196
204
  ]),
197
205
  key: "2"
198
206
  } : void 0,
199
- Q.value ? {
207
+ ee.value ? {
200
208
  name: "summary",
201
- fn: l(() => [
202
- f(me, null, {
203
- default: l(() => [
204
- f($, null, {
205
- default: l(() => [
209
+ fn: r(() => [
210
+ f(ge, null, {
211
+ default: r(() => [
212
+ f(F, null, {
213
+ default: r(() => [
206
214
  w(m(S.value.summaryTitle), 1)
207
215
  ]),
208
216
  _: 1
209
217
  }),
210
- (n(!0), p(T, null, F(S.value.summaryItems, (a, c) => (n(), h($, {
211
- key: c,
218
+ (l(!0), p(T, null, j(S.value.summaryItems, (a, o) => (l(), y(F, {
219
+ key: o,
212
220
  align: a.align
213
221
  }, {
214
- default: l(() => [
215
- f(pe, null, {
216
- default: l(() => [
222
+ default: r(() => [
223
+ f(ye, null, {
224
+ default: r(() => [
217
225
  w(m(a.data), 1)
218
226
  ]),
219
227
  _: 2
@@ -232,5 +240,5 @@ const Be = { key: 0 }, De = {
232
240
  }
233
241
  });
234
242
  export {
235
- Ue as default
243
+ je as default
236
244
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./SarafTradeSymbolPriceCell.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-60c1412e"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-8956da6c"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,32 +1,34 @@
1
- import { defineComponent as o, createElementBlock as t, openBlock as c, createElementVNode as e, toDisplayString as s, unref as a } from "vue";
2
- import { Symbols as i } from "@sarafapp/iron_core";
3
- const m = { class: "saraf-symbol-price-in-trade" }, d = ["src", "alt"], p = ["src", "alt"], T = /* @__PURE__ */ o({
1
+ import { defineComponent as l, createElementBlock as r, openBlock as s, Fragment as i, createElementVNode as o, toDisplayString as n, unref as a } from "vue";
2
+ import { Symbols as m } from "@sarafapp/iron_core";
3
+ const d = { class: "saraf-symbol-price-in-trade" }, y = { key: 0 }, b = ["src", "alt"], _ = { key: 1 }, p = { key: 2 }, P = ["src", "alt"], T = { key: 3 }, u = { key: 1 }, k = /* @__PURE__ */ l({
4
4
  __name: "SarafTradeSymbolPriceCell",
5
5
  props: {
6
6
  symbolPriceInTrade: {}
7
7
  },
8
- setup(n) {
9
- const r = n;
10
- return (u, l) => (c(), t("div", m, [
11
- e("div", null, [
12
- e("img", {
13
- src: r.symbolPriceInTrade.symbolImage,
14
- alt: r.symbolPriceInTrade.symobl
15
- }, null, 8, d),
16
- e("p", null, s(r.symbolPriceInTrade.truncatedSymbolPrice), 1),
17
- l[0] || (l[0] = e("p", { class: "currency" }, "دلار", -1))
18
- ]),
19
- e("div", null, [
20
- e("img", {
21
- src: r.symbolPriceInTrade.USDTImage,
22
- alt: a(i).USDT
23
- }, null, 8, p),
24
- e("p", null, s(r.symbolPriceInTrade.truncatedUSDTPrice), 1),
25
- l[1] || (l[1] = e("p", { class: "currency" }, "تومان", -1))
26
- ])
8
+ setup(c) {
9
+ const e = c;
10
+ return (I, t) => (s(), r("div", d, [
11
+ e.symbolPriceInTrade.USDTPrice || e.symbolPriceInTrade.symbolPrice ? (s(), r(i, { key: 0 }, [
12
+ e.symbolPriceInTrade.symbolPrice ? (s(), r("div", y, [
13
+ o("img", {
14
+ src: e.symbolPriceInTrade.symbolImage,
15
+ alt: e.symbolPriceInTrade.symobl
16
+ }, null, 8, b),
17
+ o("p", null, n(e.symbolPriceInTrade.truncatedSymbolPrice), 1),
18
+ t[0] || (t[0] = o("p", { class: "currency" }, "دلار", -1))
19
+ ])) : (s(), r("div", _, "-")),
20
+ e.symbolPriceInTrade.USDTPrice ? (s(), r("div", p, [
21
+ o("img", {
22
+ src: e.symbolPriceInTrade.USDTImage,
23
+ alt: a(m).USDT
24
+ }, null, 8, P),
25
+ o("p", null, n(e.symbolPriceInTrade.truncatedUSDTPrice), 1),
26
+ t[1] || (t[1] = o("p", { class: "currency" }, "تومان", -1))
27
+ ])) : (s(), r("div", T, "-"))
28
+ ], 64)) : (s(), r("p", u, "-"))
27
29
  ]));
28
30
  }
29
31
  });
30
32
  export {
31
- T as default
33
+ k as default
32
34
  };
@@ -1 +1,3 @@
1
1
  export { default as SarafCheckbox } from './checkbox/SarafCheckbox.vue';
2
+ export { default as SarafSwitch } from './switch/SarafSwitch.vue';
3
+ export { SwitchSize } from './switch/model/Constants.ts';
@@ -0,0 +1,22 @@
1
+ type __VLS_Props = {
2
+ isDisabled?: boolean;
3
+ size?: string;
4
+ isLoading?: boolean;
5
+ checkedChildren?: string;
6
+ unCheckedChildren?: string;
7
+ };
8
+ type __VLS_PublicProps = {
9
+ modelValue?: boolean;
10
+ } & __VLS_Props;
11
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
+ "update:modelValue": (value: boolean) => any;
13
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
14
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
15
+ }>, {
16
+ size: string;
17
+ isDisabled: boolean;
18
+ isLoading: boolean;
19
+ checkedChildren: string;
20
+ unCheckedChildren: string;
21
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
22
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import o from "./SarafSwitch.vue.es2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.es.js";
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-641863a4"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,35 @@
1
+ import { defineComponent as i, mergeModels as n, useModel as s, resolveComponent as t, createBlock as r, openBlock as h } from "vue";
2
+ import { SwitchSize as u } from "./model/Constants.es.js";
3
+ const k = /* @__PURE__ */ i({
4
+ __name: "SarafSwitch",
5
+ props: /* @__PURE__ */ n({
6
+ isDisabled: { type: Boolean, default: !1 },
7
+ size: { default: u.Default },
8
+ isLoading: { type: Boolean, default: !1 },
9
+ checkedChildren: { default: "" },
10
+ unCheckedChildren: { default: "" }
11
+ }, {
12
+ modelValue: { type: Boolean, default: !1 },
13
+ modelModifiers: {}
14
+ }),
15
+ emits: ["update:modelValue"],
16
+ setup(d) {
17
+ const e = d, l = s(d, "modelValue");
18
+ return (f, a) => {
19
+ const o = t("a-switch");
20
+ return h(), r(o, {
21
+ class: "saraf-switch",
22
+ checked: l.value,
23
+ "onUpdate:checked": a[0] || (a[0] = (c) => l.value = c),
24
+ disabled: e.isDisabled,
25
+ size: e.size,
26
+ loading: e.isLoading,
27
+ "checked-children": e.checkedChildren,
28
+ "un-checked-children": e.unCheckedChildren
29
+ }, null, 8, ["checked", "disabled", "size", "loading", "checked-children", "un-checked-children"]);
30
+ };
31
+ }
32
+ });
33
+ export {
34
+ k as default
35
+ };
@@ -0,0 +1,4 @@
1
+ export declare enum SwitchSize {
2
+ Default = "default",
3
+ Small = "small"
4
+ }
@@ -0,0 +1,4 @@
1
+ var a = /* @__PURE__ */ ((l) => (l.Default = "default", l.Small = "small", l))(a || {});
2
+ export {
3
+ a as SwitchSize
4
+ };
package/dist/index.es.js CHANGED
@@ -3,15 +3,15 @@ import { ComponentSize as o } from "./Constants.es.js";
3
3
  import { default as f } from "./baseForm/SarafSearchFiled.vue.es.js";
4
4
  import { default as p } from "./baseForm/SarafPasswordFiled.vue.es.js";
5
5
  import { default as s } from "./dataDisplay/chart/SarafChart.vue.es.js";
6
- import { default as d } from "./dataDisplay/tooltip/SarafTooltip.vue.es.js";
6
+ import { default as S } from "./dataDisplay/tooltip/SarafTooltip.vue.es.js";
7
7
  import { default as x } from "./icons/ArrowDownIcon.vue.es.js";
8
8
  import { default as i } from "./icons/ArrowUpIcon.vue.es.js";
9
9
  import { default as C } from "./icons/BurgerIcon.vue.es.js";
10
10
  import { default as b } from "./loaders/spinners/SarafDefaultSpinner.vue.es.js";
11
11
  import { default as h } from "./localProvider/ApplicationLocalProvider.vue.es.js";
12
- import { BasicInputNames as y, InputSizes as P, InputStatus as g, SarafInputTypes as w, SarafSelectMode as A } from "./baseForm/model/Constants.es.js";
12
+ import { BasicInputNames as y, InputSizes as P, InputStatus as w, SarafInputTypes as g, SarafSelectMode as A } from "./baseForm/model/Constants.es.js";
13
13
  import { SelectItem as F } from "./baseForm/model/Model.es.js";
14
- import { default as v } from "./baseForm/SarafTextFiled.vue.es.js";
14
+ import { default as z } from "./baseForm/SarafTextFiled.vue.es.js";
15
15
  import { default as R } from "./baseForm/SarafNumberFiled.vue.es.js";
16
16
  import { default as L } from "./baseForm/SarafSelect.vue.es.js";
17
17
  import { default as N } from "./baseForm/SarafFiledInvalidMessage.vue.es.js";
@@ -28,25 +28,27 @@ import { default as oa } from "./baseTable/SarafDynamicCurrencyPriceTableCell.vu
28
28
  import { default as fa } from "./baseTable/SarafTableGenerator.vue.es.js";
29
29
  import { default as pa } from "./dataDisplay/tag/SarafTag.vue.es.js";
30
30
  import { TagColors as sa } from "./dataDisplay/tag/model/Constants.es.js";
31
- import { default as da } from "./dataDisplay/tab/ui/SarafTabs.vue.es.js";
31
+ import { default as Sa } from "./dataDisplay/tab/ui/SarafTabs.vue.es.js";
32
32
  import { default as xa } from "./dataDisplay/tab/ui/SarafSecondaryTabs.vue.es.js";
33
33
  import { SarafTab as ia } from "./dataDisplay/tab/model/SarafTab.es.js";
34
34
  import { AreaChartDataSource as Ca } from "./dataDisplay/chart/model/AreaChartDataSource.es.js";
35
35
  import { DonutChartDataSource as ba } from "./dataDisplay/chart/model/DonutChartDataSource.es.js";
36
36
  import { ChartSeries as ha, ChartSettings as Da, ChartType as ya, RawChartDataPoint as Pa } from "./dataDisplay/chart/model/ChartTypes.es.js";
37
- import { TooltipDirective as wa } from "./dataDisplay/tooltip/model/tooltipDirective.es.js";
37
+ import { TooltipDirective as ga } from "./dataDisplay/tooltip/model/tooltipDirective.es.js";
38
38
  import { default as Ba } from "./dataEntry/checkbox/SarafCheckbox.vue.es.js";
39
- import { default as ka } from "./datePicker/SarafDatePicker.vue.es.js";
40
- import { default as za } from "./datePicker/SarafRangePicker.vue.es.js";
41
- import { default as Ga } from "./icons/SarafArrowIcon.vue.es.js";
42
- import { default as Ma } from "./icons/GiftCardIcon.vue.es.js";
43
- import { default as Ua } from "./icons/PlusIcon.vue.es.js";
44
- import { default as qa } from "./icons/ResetIcon.vue.es.js";
45
- import { default as Ha } from "./icons/SarafLogoIcon.vue.es.js";
46
- import { default as Ka } from "./icons/SearchIcon.vue.es.js";
47
- import { ButtonColor as Qa, ButtonType as Va } from "./general/button/model/Constants.es.js";
48
- import { default as Xa } from "./general/button/SarafButton.vue.es.js";
49
- import { SpinnerSizes as Za } from "./loaders/spinners/model/Constants.es.js";
39
+ import { default as ka } from "./dataEntry/switch/SarafSwitch.vue.es.js";
40
+ import { SwitchSize as va } from "./dataEntry/switch/model/Constants.es.js";
41
+ import { default as Ga } from "./datePicker/SarafDatePicker.vue.es.js";
42
+ import { default as Ma } from "./datePicker/SarafRangePicker.vue.es.js";
43
+ import { default as Ua } from "./icons/SarafArrowIcon.vue.es.js";
44
+ import { default as qa } from "./icons/GiftCardIcon.vue.es.js";
45
+ import { default as Ha } from "./icons/PlusIcon.vue.es.js";
46
+ import { default as Ka } from "./icons/ResetIcon.vue.es.js";
47
+ import { default as Qa } from "./icons/SarafLogoIcon.vue.es.js";
48
+ import { default as Wa } from "./icons/SearchIcon.vue.es.js";
49
+ import { ButtonColor as Ya, ButtonType as Za } from "./general/button/model/Constants.es.js";
50
+ import { default as $a } from "./general/button/SarafButton.vue.es.js";
51
+ import { SpinnerSizes as rr } from "./loaders/spinners/model/Constants.es.js";
50
52
  export {
51
53
  h as ApplicationLocalProvider,
52
54
  Ca as AreaChartDataSource,
@@ -54,54 +56,56 @@ export {
54
56
  i as ArrowUpIcon,
55
57
  y as BasicInputNames,
56
58
  C as BurgerIcon,
57
- Qa as ButtonColor,
58
- Va as ButtonType,
59
+ Ya as ButtonColor,
60
+ Za as ButtonType,
59
61
  ha as ChartSeries,
60
62
  Da as ChartSettings,
61
63
  ya as ChartType,
62
64
  o as ComponentSize,
63
65
  ba as DonutChartDataSource,
64
- Ma as GiftCardIcon,
66
+ qa as GiftCardIcon,
65
67
  P as InputSizes,
66
- g as InputStatus,
67
- Ua as PlusIcon,
68
+ w as InputStatus,
69
+ Ha as PlusIcon,
68
70
  Pa as RawChartDataPoint,
69
- qa as ResetIcon,
70
- Ga as SarafArrowIcon,
71
+ Ka as ResetIcon,
72
+ Ua as SarafArrowIcon,
71
73
  E as SarafBankCardTableCell,
72
- Xa as SarafButton,
74
+ $a as SarafButton,
73
75
  s as SarafChart,
74
76
  Ba as SarafCheckbox,
75
- ka as SarafDatePicker,
77
+ Ga as SarafDatePicker,
76
78
  b as SarafDefaultSpinner,
77
79
  oa as SarafDynamicCurrencyPriceTableCell,
78
80
  N as SarafFiledInvalidMessage,
79
81
  J as SarafIbanTableCell,
80
- w as SarafInputTypes,
81
- Ha as SarafLogoIcon,
82
+ g as SarafInputTypes,
83
+ Qa as SarafLogoIcon,
82
84
  R as SarafNumberFiled,
83
85
  p as SarafPasswordFiled,
84
86
  $ as SarafPriceTableCell,
85
- za as SarafRangePicker,
87
+ Ma as SarafRangePicker,
86
88
  f as SarafSearchFiled,
87
89
  xa as SarafSecondaryTabs,
88
90
  L as SarafSelect,
89
91
  A as SarafSelectMode,
92
+ ka as SarafSwitch,
90
93
  O as SarafSymbolTableCell,
91
94
  ia as SarafTab,
92
95
  j as SarafTable,
93
96
  fa as SarafTableGenerator,
94
- da as SarafTabs,
97
+ Sa as SarafTabs,
95
98
  pa as SarafTag,
96
- v as SarafTextFiled,
97
- d as SarafTooltip,
99
+ z as SarafTextFiled,
100
+ S as SarafTooltip,
98
101
  V as SarafTradeAmountTableCell,
99
102
  Z as SarafTradeDateCell,
100
103
  ra as SarafTradeSymbolCell,
101
104
  X as SarafTradeSymbolPriceCell,
102
- Ka as SearchIcon,
105
+ Wa as SearchIcon,
103
106
  F as SelectItem,
104
- Za as SpinnerSizes,
107
+ rr as SpinnerSizes,
108
+ va as SwitchSize,
105
109
  sa as TagColors,
106
- wa as TooltipDirective
110
+ ga as TooltipDirective
107
111
  };