@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
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { SelectableTableGenerator as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
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
|
-
},
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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 =
|
|
27
|
+
})), L = s(() => {
|
|
27
28
|
var e;
|
|
28
|
-
return ((e = u.value[u.value.length - 1]) == null ? void 0 : e.cellType) ===
|
|
29
|
-
}),
|
|
30
|
-
onSelect:
|
|
31
|
-
onSelectAll:
|
|
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),
|
|
34
|
-
function
|
|
35
|
-
|
|
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
|
|
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
|
|
48
|
+
function oe() {
|
|
42
49
|
t.dataSource.selectAll();
|
|
43
50
|
}
|
|
44
|
-
async function
|
|
45
|
-
if (e && await t.dataSource.paginate(e.current, e.pageSize),
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
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(
|
|
57
|
+
await t.dataSource.sort(v);
|
|
51
58
|
}
|
|
52
59
|
}
|
|
53
|
-
function
|
|
54
|
-
return e ===
|
|
60
|
+
function re(e) {
|
|
61
|
+
return e === Be.ASC ? q.ASC : q.DESC;
|
|
55
62
|
}
|
|
56
|
-
async function
|
|
57
|
-
t.hasInitialLoad && await t.dataSource.load(),
|
|
63
|
+
async function ce() {
|
|
64
|
+
t.hasInitialLoad && await t.dataSource.load(), D();
|
|
58
65
|
}
|
|
59
|
-
function
|
|
66
|
+
function D() {
|
|
60
67
|
const e = t.dataSource.hasAnyAction();
|
|
61
|
-
e && !L.value &&
|
|
68
|
+
e && !L.value && ue(), !e && L.value && ie();
|
|
62
69
|
}
|
|
63
|
-
function
|
|
64
|
-
u.value.push(
|
|
70
|
+
function ue() {
|
|
71
|
+
u.value.push(De);
|
|
65
72
|
}
|
|
66
|
-
function
|
|
73
|
+
function ie() {
|
|
67
74
|
u.value.pop();
|
|
68
75
|
}
|
|
69
|
-
function
|
|
76
|
+
function se(e) {
|
|
70
77
|
t.dataSource.handleClick(e);
|
|
71
78
|
}
|
|
72
|
-
function
|
|
79
|
+
function de(e) {
|
|
73
80
|
t.dataSource.handleMetaClick(e);
|
|
74
81
|
}
|
|
75
|
-
function
|
|
82
|
+
function pe(e) {
|
|
76
83
|
t.dataSource.handleDoubleClick(e);
|
|
77
84
|
}
|
|
78
|
-
function
|
|
85
|
+
function me(e) {
|
|
79
86
|
return {
|
|
80
|
-
onClick(
|
|
81
|
-
|
|
87
|
+
onClick(n) {
|
|
88
|
+
n.metaKey ? de(e) : se(e);
|
|
82
89
|
},
|
|
83
90
|
onDblclick() {
|
|
84
|
-
|
|
91
|
+
pe(e);
|
|
85
92
|
}
|
|
86
93
|
};
|
|
87
94
|
}
|
|
88
|
-
function
|
|
95
|
+
function fe(e) {
|
|
89
96
|
return e.id;
|
|
90
97
|
}
|
|
91
|
-
function
|
|
92
|
-
return !
|
|
98
|
+
function Se(e, n) {
|
|
99
|
+
return !ze(e) && !Me(e, n);
|
|
93
100
|
}
|
|
94
|
-
function
|
|
95
|
-
return e.getProps ? e.getProps(
|
|
101
|
+
function he(e, n) {
|
|
102
|
+
return e.getProps ? e.getProps(n) : null;
|
|
96
103
|
}
|
|
97
|
-
function
|
|
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
|
-
|
|
111
|
+
I.value = e;
|
|
108
112
|
}
|
|
109
113
|
function H(e) {
|
|
110
|
-
|
|
114
|
+
R.value = t.dataSource.getSelectedRowIds();
|
|
111
115
|
}
|
|
112
116
|
function U(e) {
|
|
113
|
-
|
|
117
|
+
P.value = e;
|
|
114
118
|
}
|
|
115
119
|
function K(e) {
|
|
116
|
-
|
|
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
|
|
122
|
-
|
|
123
|
-
}),
|
|
124
|
-
|
|
125
|
-
}),
|
|
126
|
-
t.dataSource.onDestroy(), t.dataSource.headerSchema.detach(M), t.dataSource.rows.detach(
|
|
127
|
-
}), (e,
|
|
128
|
-
const
|
|
129
|
-
return
|
|
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:
|
|
133
|
-
"custom-row":
|
|
134
|
-
"row-key":
|
|
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":
|
|
144
|
+
"row-selection": Z.value,
|
|
138
145
|
class: "saraf-table",
|
|
139
|
-
onChange:
|
|
140
|
-
},
|
|
141
|
-
|
|
146
|
+
onChange: le
|
|
147
|
+
}, ke({ _: 2 }, [
|
|
148
|
+
x.value ? {
|
|
142
149
|
name: "headerCell",
|
|
143
|
-
fn:
|
|
144
|
-
a.headerType ===
|
|
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
|
-
|
|
155
|
+
x.value ? {
|
|
149
156
|
name: "bodyCell",
|
|
150
|
-
fn:
|
|
151
|
-
t.tableConfig.getCellComponentRegistry().getRegisteredComponents().has(a.cellType) ? (
|
|
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
|
-
),
|
|
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:
|
|
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(
|
|
160
|
-
default:
|
|
161
|
-
|
|
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
|
-
],
|
|
166
|
-
(
|
|
167
|
-
key:
|
|
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(
|
|
177
|
+
f(i, {
|
|
170
178
|
type: "link",
|
|
171
|
-
onClick:
|
|
179
|
+
onClick: W((Ge) => h.handler(o), ["stop"])
|
|
172
180
|
}, {
|
|
173
|
-
default:
|
|
174
|
-
w(m(
|
|
181
|
+
default: r(() => [
|
|
182
|
+
w(m(h.actionName), 1)
|
|
175
183
|
]),
|
|
176
184
|
_: 2
|
|
177
185
|
}, 1032, ["onClick"]),
|
|
178
|
-
|
|
179
|
-
t.dataSource.getRowActions(
|
|
180
|
-
|
|
181
|
-
) ? (
|
|
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:
|
|
193
|
-
|
|
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
|
-
|
|
207
|
+
ee.value ? {
|
|
200
208
|
name: "summary",
|
|
201
|
-
fn:
|
|
202
|
-
f(
|
|
203
|
-
default:
|
|
204
|
-
f(
|
|
205
|
-
default:
|
|
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
|
-
(
|
|
211
|
-
key:
|
|
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:
|
|
215
|
-
f(
|
|
216
|
-
default:
|
|
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
|
-
|
|
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-
|
|
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
|
|
2
|
-
import { Symbols as
|
|
3
|
-
const
|
|
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(
|
|
9
|
-
const
|
|
10
|
-
return (
|
|
11
|
-
e(
|
|
12
|
-
e("
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
e("
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
33
|
+
k as default
|
|
32
34
|
};
|
|
@@ -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,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
|
+
};
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 "./
|
|
40
|
-
import {
|
|
41
|
-
import { default as Ga } from "./
|
|
42
|
-
import { default as Ma } from "./
|
|
43
|
-
import { default as Ua } from "./icons/
|
|
44
|
-
import { default as qa } from "./icons/
|
|
45
|
-
import { default as Ha } from "./icons/
|
|
46
|
-
import { default as Ka } from "./icons/
|
|
47
|
-
import {
|
|
48
|
-
import { default as
|
|
49
|
-
import {
|
|
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
|
-
|
|
58
|
-
|
|
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
|
-
|
|
66
|
+
qa as GiftCardIcon,
|
|
65
67
|
P as InputSizes,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
w as InputStatus,
|
|
69
|
+
Ha as PlusIcon,
|
|
68
70
|
Pa as RawChartDataPoint,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
Ka as ResetIcon,
|
|
72
|
+
Ua as SarafArrowIcon,
|
|
71
73
|
E as SarafBankCardTableCell,
|
|
72
|
-
|
|
74
|
+
$a as SarafButton,
|
|
73
75
|
s as SarafChart,
|
|
74
76
|
Ba as SarafCheckbox,
|
|
75
|
-
|
|
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
|
-
|
|
81
|
-
|
|
82
|
+
g as SarafInputTypes,
|
|
83
|
+
Qa as SarafLogoIcon,
|
|
82
84
|
R as SarafNumberFiled,
|
|
83
85
|
p as SarafPasswordFiled,
|
|
84
86
|
$ as SarafPriceTableCell,
|
|
85
|
-
|
|
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
|
-
|
|
97
|
+
Sa as SarafTabs,
|
|
95
98
|
pa as SarafTag,
|
|
96
|
-
|
|
97
|
-
|
|
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
|
-
|
|
105
|
+
Wa as SearchIcon,
|
|
103
106
|
F as SelectItem,
|
|
104
|
-
|
|
107
|
+
rr as SpinnerSizes,
|
|
108
|
+
va as SwitchSize,
|
|
105
109
|
sa as TagColors,
|
|
106
|
-
|
|
110
|
+
ga as TooltipDirective
|
|
107
111
|
};
|