@frollo/frollo-web-ui 5.0.1 → 5.0.3
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/cjs/index.js +1169 -784
- package/esm/{add-to-unscopables-2400f45b.js → add-to-unscopables-31609885.js} +2 -2
- package/esm/{array-iteration-107f927f.js → array-iteration-ec356eb3.js} +2 -2
- package/esm/{array-method-has-species-support-3d413468.js → array-method-has-species-support-8a4b1310.js} +1 -1
- package/esm/{array-method-is-strict-055b1830.js → array-method-is-strict-fc2e0d8d.js} +1 -1
- package/esm/{array-species-create-a5f5503b.js → array-species-create-b125f4a4.js} +2 -2
- package/esm/{classof-39c30bd5.js → classof-ee4b3b5b.js} +1 -1
- package/esm/{create-property-534611fd.js → create-property-c70ecc08.js} +1 -1
- package/esm/{delete-property-or-throw-8032646c.js → delete-property-or-throw-cd4c57d6.js} +3 -3
- package/esm/{does-not-exceed-safe-integer-31d08811.js → does-not-exceed-safe-integer-8e0042ec.js} +1 -1
- package/esm/{es.array.concat-987938be.js → es.array.concat-fe990345.js} +6 -6
- package/esm/{es.array.find-dfa1f42f.js → es.array.find-67b3b514.js} +5 -5
- package/esm/{es.array.includes-91be7771.js → es.array.includes-a06445a5.js} +3 -3
- package/esm/es.array.map-ae6c9437.js +43 -0
- package/esm/{es.function.name-557cb1f9.js → es.function.name-6daefaeb.js} +1 -1
- package/esm/{es.number.constructor-d6ff8874.js → es.number.constructor-98bae04f.js} +2 -2
- package/esm/es.string.includes-ade04f96.js +66 -0
- package/esm/{es.string.iterator-590198a8.js → es.string.iterator-0992bb28.js} +8 -8
- package/esm/{export-a37ba078.js → export-8a363004.js} +1 -1
- package/esm/{function-apply-ce251590.js → function-apply-b908d7e6.js} +1 -1
- package/esm/fw-animations.js +5 -5
- package/esm/fw-bar-chart.js +17 -16
- package/esm/{fw-button-8d131219.js → fw-button-b7a12ae1.js} +2 -2
- package/esm/fw-button.js +9 -9
- package/esm/fw-checkbox.js +43 -22
- package/esm/fw-drawer.js +9 -9
- package/esm/fw-dropdown-765dbbba.js +223 -0
- package/esm/fw-dropdown.js +15 -222
- package/esm/{fw-image-4787a8bd.js → fw-image-660d3e75.js} +10 -10
- package/esm/fw-image.js +18 -18
- package/esm/fw-input-7d25de48.js +235 -0
- package/esm/fw-input.js +20 -245
- package/esm/{fw-loading-spinner-c394fafc.js → fw-loading-spinner-3fda633e.js} +1 -1
- package/esm/fw-loading.js +3 -3
- package/esm/fw-modal.js +9 -9
- package/esm/fw-navigation-menu.js +9 -9
- package/esm/fw-progress-bar.js +3 -3
- package/esm/fw-provider-list.js +36 -0
- package/esm/fw-sidebar-menu.js +9 -9
- package/esm/fw-table-row-d390fe77.js +492 -0
- package/esm/fw-table.js +14 -489
- package/esm/fw-tabs.js +10 -10
- package/esm/fw-tag-9ef5331a.js +157 -0
- package/esm/fw-tag.js +13 -162
- package/esm/fw-toast.js +24 -85
- package/esm/fw-transactions-card.js +18 -18
- package/esm/{index-e4a2f8b0.js → index-04d3cb23.js} +1 -1
- package/esm/index-8c78a422.js +417 -0
- package/esm/{index-2766bfe4.js → index-c15f5641.js} +18 -55
- package/esm/index.js +48 -54
- package/esm/{is-forced-752b5893.js → is-forced-fc680e39.js} +1 -1
- package/esm/{object-create-f6f3a673.js → object-create-bc771493.js} +2 -2
- package/esm/{object-keys-4f5bf4e7.js → object-keys-17f3b440.js} +1 -1
- package/esm/{web.timers-0f117224.js → web.timers-c5316125.js} +3 -3
- package/frollo-web-ui.esm.js +1255 -839
- package/index.d.ts +138 -22
- package/package.json +1 -1
- package/types/components/fw-checkbox/fw-checkbox.vue.d.ts +19 -0
- package/types/components/fw-checkbox/index.types.d.ts +1 -0
- package/types/components/fw-dropdown/fw-dropdown.vue.d.ts +17 -0
- package/types/components/fw-dropdown/index.types.d.ts +1 -0
- package/types/components/fw-provider-list/fw-provider-list.vue.d.ts +68 -0
- package/types/components/fw-provider-list/index.d.ts +2 -0
- package/types/components/fw-provider-list/index.types.d.ts +11 -0
- package/types/components/index.d.ts +1 -0
- package/types/components/index.types.d.ts +1 -0
- package/web-components/index.js +1300 -869
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
import { t as toString$1 } from './es.number.constructor-98bae04f.js';
|
|
2
|
+
import { d as deletePropertyOrThrow$1 } from './delete-property-or-throw-cd4c57d6.js';
|
|
3
|
+
import { i as toAbsoluteIndex$1, l as lengthOfArrayLike$2, j as engineUserAgent, f as functionUncurryThis, k as aCallable$1, e as toObject$1, h as fails$1, m as engineV8Version } from './is-forced-fc680e39.js';
|
|
4
|
+
import { _ as _export } from './export-8a363004.js';
|
|
5
|
+
import { c as createProperty$1 } from './create-property-c70ecc08.js';
|
|
6
|
+
import { a as arrayMethodIsStrict$1 } from './array-method-is-strict-fc2e0d8d.js';
|
|
7
|
+
import { d as render$3, e as render$4 } from './index-04d3cb23.js';
|
|
8
|
+
import { defineComponent, computed, ref, onMounted, useCssVars, pushScopeId, popScopeId, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createCommentVNode, Fragment, renderList, withKeys, toDisplayString, createBlock, createVNode } from 'vue';
|
|
9
|
+
import { u as useColours } from './get-root-colours-e2a1cb28.js';
|
|
10
|
+
import { s as script$2 } from './fw-loading-bar-f5ca605c.js';
|
|
11
|
+
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
12
|
+
|
|
13
|
+
var es_array_sort = {};
|
|
14
|
+
|
|
15
|
+
var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
16
|
+
var lengthOfArrayLike$1 = lengthOfArrayLike$2;
|
|
17
|
+
var createProperty = createProperty$1;
|
|
18
|
+
|
|
19
|
+
var $Array = Array;
|
|
20
|
+
var max = Math.max;
|
|
21
|
+
|
|
22
|
+
var arraySliceSimple = function (O, start, end) {
|
|
23
|
+
var length = lengthOfArrayLike$1(O);
|
|
24
|
+
var k = toAbsoluteIndex(start, length);
|
|
25
|
+
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
|
26
|
+
var result = $Array(max(fin - k, 0));
|
|
27
|
+
for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
|
|
28
|
+
result.length = n;
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
var arraySlice = arraySliceSimple;
|
|
33
|
+
|
|
34
|
+
var floor = Math.floor;
|
|
35
|
+
|
|
36
|
+
var mergeSort = function (array, comparefn) {
|
|
37
|
+
var length = array.length;
|
|
38
|
+
var middle = floor(length / 2);
|
|
39
|
+
return length < 8 ? insertionSort(array, comparefn) : merge(
|
|
40
|
+
array,
|
|
41
|
+
mergeSort(arraySlice(array, 0, middle), comparefn),
|
|
42
|
+
mergeSort(arraySlice(array, middle), comparefn),
|
|
43
|
+
comparefn
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
var insertionSort = function (array, comparefn) {
|
|
48
|
+
var length = array.length;
|
|
49
|
+
var i = 1;
|
|
50
|
+
var element, j;
|
|
51
|
+
|
|
52
|
+
while (i < length) {
|
|
53
|
+
j = i;
|
|
54
|
+
element = array[i];
|
|
55
|
+
while (j && comparefn(array[j - 1], element) > 0) {
|
|
56
|
+
array[j] = array[--j];
|
|
57
|
+
}
|
|
58
|
+
if (j !== i++) array[j] = element;
|
|
59
|
+
} return array;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
var merge = function (array, left, right, comparefn) {
|
|
63
|
+
var llength = left.length;
|
|
64
|
+
var rlength = right.length;
|
|
65
|
+
var lindex = 0;
|
|
66
|
+
var rindex = 0;
|
|
67
|
+
|
|
68
|
+
while (lindex < llength || rindex < rlength) {
|
|
69
|
+
array[lindex + rindex] = (lindex < llength && rindex < rlength)
|
|
70
|
+
? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
|
|
71
|
+
: lindex < llength ? left[lindex++] : right[rindex++];
|
|
72
|
+
} return array;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
var arraySort = mergeSort;
|
|
76
|
+
|
|
77
|
+
var userAgent$1 = engineUserAgent;
|
|
78
|
+
|
|
79
|
+
var firefox = userAgent$1.match(/firefox\/(\d+)/i);
|
|
80
|
+
|
|
81
|
+
var engineFfVersion = !!firefox && +firefox[1];
|
|
82
|
+
|
|
83
|
+
var UA = engineUserAgent;
|
|
84
|
+
|
|
85
|
+
var engineIsIeOrEdge = /MSIE|Trident/.test(UA);
|
|
86
|
+
|
|
87
|
+
var userAgent = engineUserAgent;
|
|
88
|
+
|
|
89
|
+
var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
|
|
90
|
+
|
|
91
|
+
var engineWebkitVersion = !!webkit && +webkit[1];
|
|
92
|
+
|
|
93
|
+
'use strict';
|
|
94
|
+
var $ = _export;
|
|
95
|
+
var uncurryThis = functionUncurryThis;
|
|
96
|
+
var aCallable = aCallable$1;
|
|
97
|
+
var toObject = toObject$1;
|
|
98
|
+
var lengthOfArrayLike = lengthOfArrayLike$2;
|
|
99
|
+
var deletePropertyOrThrow = deletePropertyOrThrow$1;
|
|
100
|
+
var toString = toString$1;
|
|
101
|
+
var fails = fails$1;
|
|
102
|
+
var internalSort = arraySort;
|
|
103
|
+
var arrayMethodIsStrict = arrayMethodIsStrict$1;
|
|
104
|
+
var FF = engineFfVersion;
|
|
105
|
+
var IE_OR_EDGE = engineIsIeOrEdge;
|
|
106
|
+
var V8 = engineV8Version;
|
|
107
|
+
var WEBKIT = engineWebkitVersion;
|
|
108
|
+
|
|
109
|
+
var test = [];
|
|
110
|
+
var un$Sort = uncurryThis(test.sort);
|
|
111
|
+
var push = uncurryThis(test.push);
|
|
112
|
+
|
|
113
|
+
// IE8-
|
|
114
|
+
var FAILS_ON_UNDEFINED = fails(function () {
|
|
115
|
+
test.sort(undefined);
|
|
116
|
+
});
|
|
117
|
+
// V8 bug
|
|
118
|
+
var FAILS_ON_NULL = fails(function () {
|
|
119
|
+
test.sort(null);
|
|
120
|
+
});
|
|
121
|
+
// Old WebKit
|
|
122
|
+
var STRICT_METHOD = arrayMethodIsStrict('sort');
|
|
123
|
+
|
|
124
|
+
var STABLE_SORT = !fails(function () {
|
|
125
|
+
// feature detection can be too slow, so check engines versions
|
|
126
|
+
if (V8) return V8 < 70;
|
|
127
|
+
if (FF && FF > 3) return;
|
|
128
|
+
if (IE_OR_EDGE) return true;
|
|
129
|
+
if (WEBKIT) return WEBKIT < 603;
|
|
130
|
+
|
|
131
|
+
var result = '';
|
|
132
|
+
var code, chr, value, index;
|
|
133
|
+
|
|
134
|
+
// generate an array with more 512 elements (Chakra and old V8 fails only in this case)
|
|
135
|
+
for (code = 65; code < 76; code++) {
|
|
136
|
+
chr = String.fromCharCode(code);
|
|
137
|
+
|
|
138
|
+
switch (code) {
|
|
139
|
+
case 66: case 69: case 70: case 72: value = 3; break;
|
|
140
|
+
case 68: case 71: value = 4; break;
|
|
141
|
+
default: value = 2;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
for (index = 0; index < 47; index++) {
|
|
145
|
+
test.push({ k: chr + index, v: value });
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
test.sort(function (a, b) { return b.v - a.v; });
|
|
150
|
+
|
|
151
|
+
for (index = 0; index < test.length; index++) {
|
|
152
|
+
chr = test[index].k.charAt(0);
|
|
153
|
+
if (result.charAt(result.length - 1) !== chr) result += chr;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
return result !== 'DGBEFHACIJK';
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
|
|
160
|
+
|
|
161
|
+
var getSortCompare = function (comparefn) {
|
|
162
|
+
return function (x, y) {
|
|
163
|
+
if (y === undefined) return -1;
|
|
164
|
+
if (x === undefined) return 1;
|
|
165
|
+
if (comparefn !== undefined) return +comparefn(x, y) || 0;
|
|
166
|
+
return toString(x) > toString(y) ? 1 : -1;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
// `Array.prototype.sort` method
|
|
171
|
+
// https://tc39.es/ecma262/#sec-array.prototype.sort
|
|
172
|
+
$({ target: 'Array', proto: true, forced: FORCED }, {
|
|
173
|
+
sort: function sort(comparefn) {
|
|
174
|
+
if (comparefn !== undefined) aCallable(comparefn);
|
|
175
|
+
|
|
176
|
+
var array = toObject(this);
|
|
177
|
+
|
|
178
|
+
if (STABLE_SORT) return comparefn === undefined ? un$Sort(array) : un$Sort(array, comparefn);
|
|
179
|
+
|
|
180
|
+
var items = [];
|
|
181
|
+
var arrayLength = lengthOfArrayLike(array);
|
|
182
|
+
var itemsLength, index;
|
|
183
|
+
|
|
184
|
+
for (index = 0; index < arrayLength; index++) {
|
|
185
|
+
if (index in array) push(items, array[index]);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
internalSort(items, getSortCompare(comparefn));
|
|
189
|
+
|
|
190
|
+
itemsLength = items.length;
|
|
191
|
+
index = 0;
|
|
192
|
+
|
|
193
|
+
while (index < itemsLength) array[index] = items[index++];
|
|
194
|
+
while (index < arrayLength) deletePropertyOrThrow(array, index++);
|
|
195
|
+
|
|
196
|
+
return array;
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
var __default__ = defineComponent({
|
|
201
|
+
name: 'FwTable',
|
|
202
|
+
components: {
|
|
203
|
+
ArrowSortSvg: render$3,
|
|
204
|
+
ArrowDownSvg: render$4,
|
|
205
|
+
FwLoadingBar: script$2
|
|
206
|
+
},
|
|
207
|
+
emits: ['rowClicked'],
|
|
208
|
+
props: {
|
|
209
|
+
items: {
|
|
210
|
+
type: Array,
|
|
211
|
+
required: true
|
|
212
|
+
},
|
|
213
|
+
options: {
|
|
214
|
+
type: Object,
|
|
215
|
+
required: false
|
|
216
|
+
},
|
|
217
|
+
loading: {
|
|
218
|
+
type: Boolean,
|
|
219
|
+
"default": false
|
|
220
|
+
},
|
|
221
|
+
/**
|
|
222
|
+
* Enable click events on rows.
|
|
223
|
+
* Emits row data when clicked
|
|
224
|
+
*/
|
|
225
|
+
clickableRows: {
|
|
226
|
+
type: Boolean,
|
|
227
|
+
"default": false
|
|
228
|
+
},
|
|
229
|
+
autoSortColumn: {
|
|
230
|
+
type: Number
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
setup: function setup(props, ctx) {
|
|
234
|
+
var columns = computed(function () {
|
|
235
|
+
return Object.keys(props.items[0]);
|
|
236
|
+
});
|
|
237
|
+
var sortBy = ref('');
|
|
238
|
+
var sortDirection = ref('asc');
|
|
239
|
+
var currentSortedColumn = ref('');
|
|
240
|
+
onMounted(function () {
|
|
241
|
+
if (Number(props.autoSortColumn) >= 0) {
|
|
242
|
+
sortColumn(columns.value[Number(props.autoSortColumn)]);
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
var _useColours = useColours(),
|
|
246
|
+
bgHoverColor = _useColours.primaryFade5;
|
|
247
|
+
var sortColumn = function sortColumn(column) {
|
|
248
|
+
if (!isColumnSortable(column)) return;
|
|
249
|
+
currentSortedColumn.value = column;
|
|
250
|
+
if (sortBy.value === column) {
|
|
251
|
+
sortDirection.value = sortDirection.value === 'asc' ? 'desc' : 'asc';
|
|
252
|
+
} else {
|
|
253
|
+
sortBy.value = column;
|
|
254
|
+
sortDirection.value = columnInitSort(column);
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
var sortedData = computed(function () {
|
|
258
|
+
if (!sortBy.value) {
|
|
259
|
+
return props.items;
|
|
260
|
+
}
|
|
261
|
+
var data = props.items;
|
|
262
|
+
data.sort(function (a, b) {
|
|
263
|
+
var sortVal = a[sortBy.value] > b[sortBy.value] ? 1 : -1;
|
|
264
|
+
return sortDirection.value === 'asc' ? sortVal : -sortVal;
|
|
265
|
+
});
|
|
266
|
+
return data;
|
|
267
|
+
});
|
|
268
|
+
var formattedText = function formattedText(row, column) {
|
|
269
|
+
var _props$options$column;
|
|
270
|
+
if (props.options && props.options[column] && (_props$options$column = props.options[column]) !== null && _props$options$column !== void 0 && _props$options$column.formatter) {
|
|
271
|
+
var _props$options$column2;
|
|
272
|
+
var colFormatter = (_props$options$column2 = props.options[column]) === null || _props$options$column2 === void 0 ? void 0 : _props$options$column2.formatter;
|
|
273
|
+
if (colFormatter) {
|
|
274
|
+
return colFormatter(row[column]);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
return row[column];
|
|
278
|
+
};
|
|
279
|
+
var sortedIcon = function sortedIcon(sortDir, column) {
|
|
280
|
+
if (currentSortedColumn.value === column) {
|
|
281
|
+
if (sortDirection.value === sortDir) {
|
|
282
|
+
return true;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
return false;
|
|
286
|
+
};
|
|
287
|
+
var isColumnSortable = function isColumnSortable(column) {
|
|
288
|
+
if (props.options && props.options[column]) {
|
|
289
|
+
var _props$options$column3;
|
|
290
|
+
return (_props$options$column3 = props.options[column]) === null || _props$options$column3 === void 0 ? void 0 : _props$options$column3.isSortable;
|
|
291
|
+
}
|
|
292
|
+
return false;
|
|
293
|
+
};
|
|
294
|
+
var columnInitSort = function columnInitSort(column) {
|
|
295
|
+
if (props.options && props.options[column]) {
|
|
296
|
+
var _props$options$column4;
|
|
297
|
+
return ((_props$options$column4 = props.options[column]) === null || _props$options$column4 === void 0 ? void 0 : _props$options$column4.initSortOrder) || 'asc';
|
|
298
|
+
}
|
|
299
|
+
return 'asc';
|
|
300
|
+
};
|
|
301
|
+
var isDisabled = function isDisabled(column) {
|
|
302
|
+
var _props$options$column5;
|
|
303
|
+
if (props.options && (_props$options$column5 = props.options[column]) !== null && _props$options$column5 !== void 0 && _props$options$column5.disabled) {
|
|
304
|
+
return true;
|
|
305
|
+
}
|
|
306
|
+
return false;
|
|
307
|
+
};
|
|
308
|
+
var rowClicked = function rowClicked(row) {
|
|
309
|
+
if (props.clickableRows) ctx.emit('rowClicked', row);
|
|
310
|
+
};
|
|
311
|
+
return {
|
|
312
|
+
columns: columns,
|
|
313
|
+
sortBy: sortBy,
|
|
314
|
+
sortDirection: sortDirection,
|
|
315
|
+
sortColumn: sortColumn,
|
|
316
|
+
sortedData: sortedData,
|
|
317
|
+
currentSortedColumn: currentSortedColumn,
|
|
318
|
+
sortedIcon: sortedIcon,
|
|
319
|
+
formattedText: formattedText,
|
|
320
|
+
isColumnSortable: isColumnSortable,
|
|
321
|
+
isDisabled: isDisabled,
|
|
322
|
+
rowClicked: rowClicked,
|
|
323
|
+
bgHoverColor: bgHoverColor
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
});
|
|
327
|
+
var __injectCSSVars__ = function __injectCSSVars__() {
|
|
328
|
+
useCssVars(function (_ctx) {
|
|
329
|
+
return {
|
|
330
|
+
"642aa671": _ctx.bgHoverColor
|
|
331
|
+
};
|
|
332
|
+
});
|
|
333
|
+
};
|
|
334
|
+
var __setup__ = __default__.setup;
|
|
335
|
+
__default__.setup = __setup__ ? function (props, ctx) {
|
|
336
|
+
__injectCSSVars__();
|
|
337
|
+
return __setup__(props, ctx);
|
|
338
|
+
} : __injectCSSVars__;
|
|
339
|
+
|
|
340
|
+
var _withScopeId = function _withScopeId(n) {
|
|
341
|
+
return pushScopeId("data-v-d2effa38"), n = n(), popScopeId(), n;
|
|
342
|
+
};
|
|
343
|
+
var _hoisted_1$2 = ["aria-busy"];
|
|
344
|
+
var _hoisted_2$1 = {
|
|
345
|
+
"class": "text-p2 border-b border-grey-40"
|
|
346
|
+
};
|
|
347
|
+
var _hoisted_3$1 = ["tabindex", "onKeydown", "onClick"];
|
|
348
|
+
var _hoisted_4 = {
|
|
349
|
+
"class": "flex flex-row items-center"
|
|
350
|
+
};
|
|
351
|
+
var _hoisted_5 = {
|
|
352
|
+
key: 0,
|
|
353
|
+
"class": "ml-1 flex items-center justify-center w-5"
|
|
354
|
+
};
|
|
355
|
+
var _hoisted_6 = {
|
|
356
|
+
"class": "text-p2 bg-white font-light"
|
|
357
|
+
};
|
|
358
|
+
var _hoisted_7 = {
|
|
359
|
+
key: 0,
|
|
360
|
+
"class": "py-4 pl-5 pr-3 text-left"
|
|
361
|
+
};
|
|
362
|
+
var _hoisted_8 = {
|
|
363
|
+
key: 0,
|
|
364
|
+
"class": "py-4 pl-5 pr-3 text-left"
|
|
365
|
+
};
|
|
366
|
+
var _hoisted_9 = ["onClick", "tabindex", "onKeydown"];
|
|
367
|
+
var _hoisted_10 = ["innerHTML"];
|
|
368
|
+
function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
369
|
+
var _component_ArrowSortSvg = resolveComponent("ArrowSortSvg");
|
|
370
|
+
var _component_ArrowDownSvg = resolveComponent("ArrowDownSvg");
|
|
371
|
+
var _component_FwLoadingBar = resolveComponent("FwLoadingBar");
|
|
372
|
+
return openBlock(), createElementBlock("table", {
|
|
373
|
+
"class": normalizeClass(["fw-table table-auto table-responsive rounded-md shadow-card", _ctx.loading ? 'cursor-wait' : '']),
|
|
374
|
+
"aria-live": "polite",
|
|
375
|
+
"aria-busy": _ctx.loading
|
|
376
|
+
}, [createElementVNode("thead", _hoisted_2$1, [createElementVNode("tr", null, [_ctx.$slots.preHead ? renderSlot(_ctx.$slots, "preHead", {
|
|
377
|
+
key: 0
|
|
378
|
+
}) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, function (column, thKey) {
|
|
379
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
380
|
+
key: thKey
|
|
381
|
+
}, [!_ctx.isDisabled(column) ? (openBlock(), createElementBlock("th", {
|
|
382
|
+
key: 0,
|
|
383
|
+
"class": normalizeClass(["fw-table-head py-6 pl-5 pr-3 text-left font-medium", _ctx.isColumnSortable(column) ? 'cursor-pointer fw-table-head--sortable' : '']),
|
|
384
|
+
tabindex: _ctx.isColumnSortable(column) ? 0 : -1,
|
|
385
|
+
onKeydown: withKeys(function ($event) {
|
|
386
|
+
return _ctx.sortColumn(column);
|
|
387
|
+
}, ["enter", "space"]),
|
|
388
|
+
onClick: function onClick($event) {
|
|
389
|
+
return _ctx.sortColumn(column);
|
|
390
|
+
}
|
|
391
|
+
}, [createElementVNode("div", _hoisted_4, [createElementVNode("span", {
|
|
392
|
+
"class": normalizeClass(_ctx.sortedIcon('asc', column) || _ctx.sortedIcon('desc', column) ? 'text-primary' : '')
|
|
393
|
+
}, toDisplayString(column), 3), _ctx.isColumnSortable(column) ? (openBlock(), createElementBlock("span", _hoisted_5, [!_ctx.sortedIcon('asc', column) && !_ctx.sortedIcon('desc', column) ? (openBlock(), createBlock(_component_ArrowSortSvg, {
|
|
394
|
+
key: 0,
|
|
395
|
+
"class": "inline-block w-full text-grey-base"
|
|
396
|
+
})) : createCommentVNode("", true), _ctx.sortedIcon('asc', column) ? (openBlock(), createBlock(_component_ArrowDownSvg, {
|
|
397
|
+
key: 1,
|
|
398
|
+
"class": "inline-block w-4 text-primary rotate-180"
|
|
399
|
+
})) : createCommentVNode("", true), _ctx.sortedIcon('desc', column) ? (openBlock(), createBlock(_component_ArrowDownSvg, {
|
|
400
|
+
key: 2,
|
|
401
|
+
"class": "inline-block w-4 text-primary"
|
|
402
|
+
})) : createCommentVNode("", true)])) : createCommentVNode("", true)])], 42, _hoisted_3$1)) : createCommentVNode("", true)], 64);
|
|
403
|
+
}), 128)), _ctx.$slots.head ? renderSlot(_ctx.$slots, "head", {
|
|
404
|
+
key: 1
|
|
405
|
+
}) : createCommentVNode("", true)])]), createElementVNode("tbody", _hoisted_6, [_ctx.loading ? (openBlock(true), createElementBlock(Fragment, {
|
|
406
|
+
key: 0
|
|
407
|
+
}, renderList(_ctx.sortedData, function (row, trKey) {
|
|
408
|
+
return openBlock(), createElementBlock("tr", {
|
|
409
|
+
key: trKey
|
|
410
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, function (column, colKey) {
|
|
411
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
412
|
+
key: colKey
|
|
413
|
+
}, [!_ctx.isDisabled(column) ? (openBlock(), createElementBlock("td", _hoisted_7, [createVNode(_component_FwLoadingBar, {
|
|
414
|
+
"class": "w-full h-7"
|
|
415
|
+
})])) : createCommentVNode("", true)], 64);
|
|
416
|
+
}), 128)), _ctx.$slots.row ? (openBlock(), createElementBlock("td", _hoisted_8, [createVNode(_component_FwLoadingBar, {
|
|
417
|
+
"class": "w-full h-7"
|
|
418
|
+
})])) : createCommentVNode("", true)]);
|
|
419
|
+
}), 128)) : (openBlock(true), createElementBlock(Fragment, {
|
|
420
|
+
key: 1
|
|
421
|
+
}, renderList(_ctx.sortedData, function (row, trKey) {
|
|
422
|
+
return openBlock(), createElementBlock("tr", {
|
|
423
|
+
"class": normalizeClass(["fw-table-row border-b border-grey-40", _ctx.clickableRows ? 'cursor-pointer' : '']),
|
|
424
|
+
onClick: function onClick($event) {
|
|
425
|
+
return _ctx.rowClicked(row);
|
|
426
|
+
},
|
|
427
|
+
tabindex: _ctx.clickableRows ? 0 : -1,
|
|
428
|
+
onKeydown: withKeys(function ($event) {
|
|
429
|
+
return _ctx.rowClicked(row);
|
|
430
|
+
}, ["enter", "space"]),
|
|
431
|
+
key: trKey
|
|
432
|
+
}, [_ctx.$slots.preRow ? renderSlot(_ctx.$slots, "preRow", {
|
|
433
|
+
key: 0,
|
|
434
|
+
row: row
|
|
435
|
+
}) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, function (column, colKey) {
|
|
436
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
437
|
+
key: colKey
|
|
438
|
+
}, [!_ctx.isDisabled(column) ? (openBlock(), createElementBlock("td", {
|
|
439
|
+
key: 0,
|
|
440
|
+
"class": "py-2 pl-5 pr-3 text-left",
|
|
441
|
+
innerHTML: _ctx.formattedText(row, column)
|
|
442
|
+
}, null, 8, _hoisted_10)) : createCommentVNode("", true)], 64);
|
|
443
|
+
}), 128)), _ctx.$slots.row ? renderSlot(_ctx.$slots, "row", {
|
|
444
|
+
key: 1,
|
|
445
|
+
row: row
|
|
446
|
+
}) : createCommentVNode("", true)], 42, _hoisted_9);
|
|
447
|
+
}), 128))])], 10, _hoisted_1$2);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
var css_248z = ".fw-table-head--sortable[data-v-d2effa38]:hover{background-color:var(--642aa671)}.fw-table-row[data-v-d2effa38]:hover{background-color:var(--642aa671)}";
|
|
451
|
+
var stylesheet = ".fw-table-head--sortable[data-v-d2effa38]:hover{background-color:var(--642aa671)}.fw-table-row[data-v-d2effa38]:hover{background-color:var(--642aa671)}";
|
|
452
|
+
styleInject(css_248z);
|
|
453
|
+
|
|
454
|
+
__default__.render = render$2;
|
|
455
|
+
__default__.__scopeId = "data-v-d2effa38";
|
|
456
|
+
|
|
457
|
+
var script$1 = defineComponent({
|
|
458
|
+
name: 'FwTableHead'
|
|
459
|
+
});
|
|
460
|
+
|
|
461
|
+
var _hoisted_1$1 = {
|
|
462
|
+
"class": "py-6 px-5 text-left font-medium"
|
|
463
|
+
};
|
|
464
|
+
var _hoisted_2 = {
|
|
465
|
+
"class": "flex flex-row"
|
|
466
|
+
};
|
|
467
|
+
var _hoisted_3 = {
|
|
468
|
+
key: 0,
|
|
469
|
+
"class": "w-full"
|
|
470
|
+
};
|
|
471
|
+
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
472
|
+
return openBlock(), createElementBlock("th", _hoisted_1$1, [createElementVNode("div", _hoisted_2, [_ctx.$slots["default"] ? (openBlock(), createElementBlock("div", _hoisted_3, [renderSlot(_ctx.$slots, "default")])) : createCommentVNode("", true)])]);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
script$1.render = render$1;
|
|
476
|
+
|
|
477
|
+
var script = defineComponent({
|
|
478
|
+
name: 'FwTableRow'
|
|
479
|
+
});
|
|
480
|
+
|
|
481
|
+
var _hoisted_1 = {
|
|
482
|
+
"class": "py-3 px-4 text-left whitespace-nowrap"
|
|
483
|
+
};
|
|
484
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
485
|
+
return openBlock(), createElementBlock("td", _hoisted_1, [_ctx.$slots["default"] ? renderSlot(_ctx.$slots, "default", {
|
|
486
|
+
key: 0
|
|
487
|
+
}) : createCommentVNode("", true)]);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
script.render = render;
|
|
491
|
+
|
|
492
|
+
export { __default__ as _, script as a, script$1 as s };
|