@frollo/frollo-web-ui 8.0.3 → 8.1.0
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 +187 -47
- package/esm/fw-accordion.js +1 -1
- package/esm/fw-animations.js +2 -2
- package/esm/{fw-button-D8GUq_wg.js → fw-button-DdxvSBFa.js} +1 -1
- package/esm/fw-button.js +3 -3
- package/esm/fw-date-picker.js +1 -1
- package/esm/fw-drawer.js +9 -9
- package/esm/{fw-dropdown-YXj5yyty.js → fw-dropdown-BcnKbaW1.js} +2 -2
- package/esm/fw-dropdown.js +3 -3
- package/esm/{fw-image-DAUZLkf4.js → fw-image-DedhILQL.js} +1 -1
- package/esm/fw-image.js +2 -2
- package/esm/{fw-input-CPU_C8IU.js → fw-input-BPFFMpc2.js} +7 -1
- package/esm/fw-input.js +1 -1
- package/esm/{fw-loading-spinner-AsWqai_A.js → fw-loading-spinner-BEzZf1xe.js} +1 -1
- package/esm/fw-modal.js +3 -3
- package/esm/fw-navigation-menu.js +3 -3
- package/esm/fw-provider-list.js +8 -8
- package/esm/fw-sidebar-menu.js +3 -3
- package/esm/{fw-table-row-7vke3KXB.js → fw-table-row-DhDvTJHm.js} +168 -32
- package/esm/fw-table.js +7 -2
- package/esm/{fw-tag-BVEv8PMh.js → fw-tag-508OLlZR.js} +2 -2
- package/esm/fw-tag.js +4 -4
- package/esm/fw-toast.js +1 -1
- package/esm/fw-transactions-card.js +2 -2
- package/esm/{index-B-9TSbb0.js → index-svDiDkSU.js} +1 -1
- package/esm/index.js +8 -8
- package/frollo-web-ui.esm.js +187 -47
- package/index.d.ts +36 -1
- package/package.json +1 -1
- package/types/components/fw-input/fw-input.vue.d.ts +9 -0
- package/types/components/fw-table/fw-table.vue.d.ts +25 -1
- package/types/components/fw-table/index.types.d.ts +2 -0
- package/web-components/index.js +189 -49
package/frollo-web-ui.esm.js
CHANGED
|
@@ -7016,6 +7016,10 @@ var script$m = defineComponent({
|
|
|
7016
7016
|
required: {
|
|
7017
7017
|
type: Boolean,
|
|
7018
7018
|
"default": false
|
|
7019
|
+
},
|
|
7020
|
+
centerAlignInput: {
|
|
7021
|
+
type: Boolean,
|
|
7022
|
+
"default": false
|
|
7019
7023
|
}
|
|
7020
7024
|
},
|
|
7021
7025
|
setup: function setup(props, ctx) {
|
|
@@ -7066,11 +7070,11 @@ var _hoisted_10$5 = {
|
|
|
7066
7070
|
key: 0,
|
|
7067
7071
|
"class": "text-left text-sm font-medium mt-2 min-h-[21px]"
|
|
7068
7072
|
};
|
|
7069
|
-
var _hoisted_11$
|
|
7073
|
+
var _hoisted_11$3 = {
|
|
7070
7074
|
key: 0,
|
|
7071
7075
|
"class": "text-error"
|
|
7072
7076
|
};
|
|
7073
|
-
var _hoisted_12$
|
|
7077
|
+
var _hoisted_12$3 = {
|
|
7074
7078
|
key: 1
|
|
7075
7079
|
};
|
|
7076
7080
|
function render$17(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -7110,7 +7114,9 @@ function render$17(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7110
7114
|
"class": ["border-blue-500", [{
|
|
7111
7115
|
'pl-10': !!_ctx.$slots.prefix,
|
|
7112
7116
|
'pr-20': !!_ctx.$slots.suffix
|
|
7113
|
-
}, (errorMessage || errors[0]) && meta.touched ? 'border-error text-error' : 'border-grey-40', _ctx.inputBaseClass, _ctx.rounded ? 'rounded-full' : 'rounded'
|
|
7117
|
+
}, (errorMessage || errors[0]) && meta.touched ? 'border-error text-error' : 'border-grey-40', _ctx.inputBaseClass, _ctx.rounded ? 'rounded-full' : 'rounded', {
|
|
7118
|
+
'text-center': _ctx.centerAlignInput
|
|
7119
|
+
}]]
|
|
7114
7120
|
}), null, 16, _hoisted_8$9), _ctx.$slots.suffix ? (openBlock(), createElementBlock("div", _hoisted_9$8, [renderSlot(_ctx.$slots, "suffix", {
|
|
7115
7121
|
"class": "h-full"
|
|
7116
7122
|
})])) : createCommentVNode("", true)]), _ctx.enableErrors ? (openBlock(), createElementBlock("div", _hoisted_10$5, [createVNode(Transition, {
|
|
@@ -7118,7 +7124,7 @@ function render$17(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7118
7124
|
mode: "out-in"
|
|
7119
7125
|
}, {
|
|
7120
7126
|
"default": withCtx(function () {
|
|
7121
|
-
return [(errorMessage || errors[0]) && meta.touched ? (openBlock(), createElementBlock("span", _hoisted_11$
|
|
7127
|
+
return [(errorMessage || errors[0]) && meta.touched ? (openBlock(), createElementBlock("span", _hoisted_11$3, toDisplayString(errorMessage || errors[0]), 1)) : _ctx.hint ? (openBlock(), createElementBlock("span", _hoisted_12$3, toDisplayString(_ctx.hint), 1)) : createCommentVNode("", true)];
|
|
7122
7128
|
}),
|
|
7123
7129
|
_: 2
|
|
7124
7130
|
}, 1024)])) : createCommentVNode("", true)])];
|
|
@@ -8294,12 +8300,12 @@ var _hoisted_9$6 = {
|
|
|
8294
8300
|
var _hoisted_10$4 = {
|
|
8295
8301
|
"class": ""
|
|
8296
8302
|
};
|
|
8297
|
-
var _hoisted_11$
|
|
8298
|
-
var _hoisted_12$
|
|
8299
|
-
var _hoisted_13$
|
|
8303
|
+
var _hoisted_11$2 = ["aria-labelledby"];
|
|
8304
|
+
var _hoisted_12$2 = ["onClick"];
|
|
8305
|
+
var _hoisted_13$2 = {
|
|
8300
8306
|
"class": "flex items-center gap-x-2"
|
|
8301
8307
|
};
|
|
8302
|
-
var _hoisted_14$
|
|
8308
|
+
var _hoisted_14$2 = {
|
|
8303
8309
|
"class": "flex flex-col text-left"
|
|
8304
8310
|
};
|
|
8305
8311
|
var _hoisted_15$1 = {
|
|
@@ -8358,12 +8364,12 @@ function render$p(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8358
8364
|
onClick: function onClick($event) {
|
|
8359
8365
|
return _ctx.selectOption(option);
|
|
8360
8366
|
}
|
|
8361
|
-
}, [createElementVNode("div", _hoisted_13$
|
|
8367
|
+
}, [createElementVNode("div", _hoisted_13$2, [option.image_url ? (openBlock(), createBlock(_component_FwImage, {
|
|
8362
8368
|
key: 0,
|
|
8363
8369
|
src: option.image_url,
|
|
8364
8370
|
"class": "w-[20px] h-[20px]"
|
|
8365
|
-
}, null, 8, ["src"])) : createCommentVNode("", true), createElementVNode("div", _hoisted_14$
|
|
8366
|
-
}), 128))], 10, _hoisted_11$
|
|
8371
|
+
}, null, 8, ["src"])) : createCommentVNode("", true), createElementVNode("div", _hoisted_14$2, [createElementVNode("span", null, toDisplayString(option.label), 1), option.description ? (openBlock(), createElementBlock("span", _hoisted_15$1, toDisplayString(option.description), 1)) : createCommentVNode("", true)])])], 10, _hoisted_12$2);
|
|
8372
|
+
}), 128))], 10, _hoisted_11$2), [[vShow, _ctx.isOpen]])];
|
|
8367
8373
|
}),
|
|
8368
8374
|
_: 1
|
|
8369
8375
|
}), _ctx.enableErrors ? (openBlock(), createElementBlock("div", _hoisted_16$1, [createVNode(Transition, {
|
|
@@ -9556,11 +9562,16 @@ var __default__$6 = defineComponent({
|
|
|
9556
9562
|
components: {
|
|
9557
9563
|
ArrowSortSvg: render$B,
|
|
9558
9564
|
ArrowDownSvg: render$A,
|
|
9559
|
-
|
|
9565
|
+
ChevronLeftSvg: render$O,
|
|
9566
|
+
ChevronRightSvg: render$P,
|
|
9567
|
+
FwLoadingBar: script$k,
|
|
9568
|
+
FwButton: script$f,
|
|
9569
|
+
FwInput: script$m
|
|
9560
9570
|
},
|
|
9561
9571
|
emits: [/** Fired when a row is clicked with row data */
|
|
9562
9572
|
'rowClicked', /** Fired when a column is sorted */
|
|
9563
|
-
'columnSorted'
|
|
9573
|
+
'columnSorted', /** Fired when a page number or arrow is clicked */
|
|
9574
|
+
'pageChanged'],
|
|
9564
9575
|
props: {
|
|
9565
9576
|
items: {
|
|
9566
9577
|
type: Array,
|
|
@@ -9584,6 +9595,13 @@ var __default__$6 = defineComponent({
|
|
|
9584
9595
|
},
|
|
9585
9596
|
autoSortColumn: {
|
|
9586
9597
|
type: Number
|
|
9598
|
+
},
|
|
9599
|
+
enablePagination: {
|
|
9600
|
+
type: Boolean,
|
|
9601
|
+
"default": false
|
|
9602
|
+
},
|
|
9603
|
+
totalAmount: {
|
|
9604
|
+
type: Number
|
|
9587
9605
|
}
|
|
9588
9606
|
},
|
|
9589
9607
|
setup: function setup(props, ctx) {
|
|
@@ -9593,6 +9611,35 @@ var __default__$6 = defineComponent({
|
|
|
9593
9611
|
var sortBy = ref('');
|
|
9594
9612
|
var sortDirection = ref('asc');
|
|
9595
9613
|
var currentSortedColumn = ref('');
|
|
9614
|
+
var currentPage = ref('1');
|
|
9615
|
+
var maxDisplayedPages = 7;
|
|
9616
|
+
var pages = computed(function () {
|
|
9617
|
+
if (!props.totalAmount) return;
|
|
9618
|
+
var currentPageNumber = Number(currentPage.value);
|
|
9619
|
+
var pageButtons = [];
|
|
9620
|
+
var pageNumberLimit = currentPageNumber + maxDisplayedPages - 1;
|
|
9621
|
+
var maxPageNumber = props.totalAmount - currentPageNumber < maxDisplayedPages ? props.totalAmount : pageNumberLimit + 1;
|
|
9622
|
+
for (var i = currentPageNumber; i < maxPageNumber + 1; i++) {
|
|
9623
|
+
pageButtons.push({
|
|
9624
|
+
pageNumber: i.toString(),
|
|
9625
|
+
selected: i.toString() === currentPage.value
|
|
9626
|
+
});
|
|
9627
|
+
}
|
|
9628
|
+
if (props.totalAmount === maxDisplayedPages) {
|
|
9629
|
+
return pageButtons;
|
|
9630
|
+
}
|
|
9631
|
+
if (props.totalAmount - currentPageNumber > maxDisplayedPages) {
|
|
9632
|
+
pageButtons.push({
|
|
9633
|
+
pageNumber: '...',
|
|
9634
|
+
selected: false
|
|
9635
|
+
}, {
|
|
9636
|
+
pageNumber: props.totalAmount.toString(),
|
|
9637
|
+
selected: false
|
|
9638
|
+
});
|
|
9639
|
+
}
|
|
9640
|
+
ctx.emit('pageChanged', currentPage.value);
|
|
9641
|
+
return pageButtons;
|
|
9642
|
+
});
|
|
9596
9643
|
onMounted(function () {
|
|
9597
9644
|
if (Number(props.autoSortColumn) >= 0) {
|
|
9598
9645
|
sortColumn(columns.value[Number(props.autoSortColumn)], false);
|
|
@@ -9666,6 +9713,16 @@ var __default__$6 = defineComponent({
|
|
|
9666
9713
|
var rowClicked = function rowClicked(row) {
|
|
9667
9714
|
if (props.clickableRows) ctx.emit('rowClicked', row);
|
|
9668
9715
|
};
|
|
9716
|
+
var pageNumberClick = function pageNumberClick(pageNumber) {
|
|
9717
|
+
if (pageNumber === '...') {
|
|
9718
|
+
currentPage.value = (Number(currentPage.value) + maxDisplayedPages + 1).toString();
|
|
9719
|
+
return;
|
|
9720
|
+
}
|
|
9721
|
+
currentPage.value = pageNumber;
|
|
9722
|
+
};
|
|
9723
|
+
var pageArrowClick = function pageArrowClick(next) {
|
|
9724
|
+
currentPage.value = Number(currentPage.value) + (next ? 1 : -1).toString();
|
|
9725
|
+
};
|
|
9669
9726
|
return {
|
|
9670
9727
|
columns: columns,
|
|
9671
9728
|
sortBy: sortBy,
|
|
@@ -9678,14 +9735,18 @@ var __default__$6 = defineComponent({
|
|
|
9678
9735
|
isColumnSortable: isColumnSortable,
|
|
9679
9736
|
isDisabled: isDisabled,
|
|
9680
9737
|
rowClicked: rowClicked,
|
|
9681
|
-
bgHoverColor: bgHoverColor
|
|
9738
|
+
bgHoverColor: bgHoverColor,
|
|
9739
|
+
currentPage: currentPage,
|
|
9740
|
+
pages: pages,
|
|
9741
|
+
pageNumberClick: pageNumberClick,
|
|
9742
|
+
pageArrowClick: pageArrowClick
|
|
9682
9743
|
};
|
|
9683
9744
|
}
|
|
9684
9745
|
});
|
|
9685
9746
|
var __injectCSSVars__$5 = function __injectCSSVars__() {
|
|
9686
9747
|
useCssVars(function (_ctx) {
|
|
9687
9748
|
return {
|
|
9688
|
-
"
|
|
9749
|
+
"c795d904": _ctx.bgHoverColor
|
|
9689
9750
|
};
|
|
9690
9751
|
});
|
|
9691
9752
|
};
|
|
@@ -9696,42 +9757,62 @@ __default__$6.setup = __setup__$5 ? function (props, ctx) {
|
|
|
9696
9757
|
} : __injectCSSVars__$5;
|
|
9697
9758
|
|
|
9698
9759
|
var _withScopeId$4 = function _withScopeId(n) {
|
|
9699
|
-
return pushScopeId("data-v-
|
|
9760
|
+
return pushScopeId("data-v-84c515f0"), n = n(), popScopeId(), n;
|
|
9761
|
+
};
|
|
9762
|
+
var _hoisted_1$p = {
|
|
9763
|
+
"class": "flex flex-col"
|
|
9700
9764
|
};
|
|
9701
|
-
var
|
|
9702
|
-
var
|
|
9765
|
+
var _hoisted_2$n = ["aria-busy"];
|
|
9766
|
+
var _hoisted_3$j = {
|
|
9703
9767
|
"class": "text-p2 border-b border-grey-40"
|
|
9704
9768
|
};
|
|
9705
|
-
var
|
|
9706
|
-
var
|
|
9769
|
+
var _hoisted_4$a = ["tabindex", "onKeydown", "onClick"];
|
|
9770
|
+
var _hoisted_5$8 = {
|
|
9707
9771
|
"class": "flex flex-row items-center"
|
|
9708
9772
|
};
|
|
9709
|
-
var
|
|
9773
|
+
var _hoisted_6$6 = {
|
|
9710
9774
|
key: 0,
|
|
9711
9775
|
"class": "ml-1 flex items-center justify-center w-5"
|
|
9712
9776
|
};
|
|
9713
|
-
var
|
|
9777
|
+
var _hoisted_7$5 = {
|
|
9714
9778
|
"class": "text-p2 bg-white font-light"
|
|
9715
9779
|
};
|
|
9716
|
-
var
|
|
9780
|
+
var _hoisted_8$4 = {
|
|
9717
9781
|
key: 0,
|
|
9718
9782
|
"class": "py-4 pl-5 pr-3 text-left"
|
|
9719
9783
|
};
|
|
9720
|
-
var
|
|
9784
|
+
var _hoisted_9$3 = {
|
|
9721
9785
|
key: 0,
|
|
9722
9786
|
"class": "py-4 pl-5 pr-3 text-left"
|
|
9723
9787
|
};
|
|
9724
|
-
var
|
|
9725
|
-
var
|
|
9788
|
+
var _hoisted_10$1 = ["onClick", "tabindex", "onKeydown"];
|
|
9789
|
+
var _hoisted_11$1 = ["innerHTML"];
|
|
9790
|
+
var _hoisted_12$1 = {
|
|
9791
|
+
key: 0,
|
|
9792
|
+
"class": "flex flex-row h-[44px] mt-8 px-64 space-x-2"
|
|
9793
|
+
};
|
|
9794
|
+
var _hoisted_13$1 = {
|
|
9795
|
+
"class": "h-4 w-4"
|
|
9796
|
+
};
|
|
9797
|
+
var _hoisted_14$1 = /*#__PURE__*/_withScopeId$4(function () {
|
|
9798
|
+
return /*#__PURE__*/createElementVNode("strong", {
|
|
9799
|
+
"class": "whitespace-nowrap px-4 self-center"
|
|
9800
|
+
}, "Go to", -1);
|
|
9801
|
+
});
|
|
9726
9802
|
function render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
9803
|
+
var _ctx$options;
|
|
9727
9804
|
var _component_ArrowSortSvg = resolveComponent("ArrowSortSvg");
|
|
9728
9805
|
var _component_ArrowDownSvg = resolveComponent("ArrowDownSvg");
|
|
9729
9806
|
var _component_FwLoadingBar = resolveComponent("FwLoadingBar");
|
|
9730
|
-
|
|
9731
|
-
|
|
9807
|
+
var _component_ChevronLeftSvg = resolveComponent("ChevronLeftSvg");
|
|
9808
|
+
var _component_FwButton = resolveComponent("FwButton");
|
|
9809
|
+
var _component_ChevronRightSvg = resolveComponent("ChevronRightSvg");
|
|
9810
|
+
var _component_FwInput = resolveComponent("FwInput");
|
|
9811
|
+
return openBlock(), createElementBlock("div", _hoisted_1$p, [createElementVNode("table", {
|
|
9812
|
+
"class": normalizeClass(["fw-table table-auto table-responsive rounded-md shadow-card flex-1", _ctx.loading ? 'cursor-wait' : '']),
|
|
9732
9813
|
"aria-live": "polite",
|
|
9733
9814
|
"aria-busy": _ctx.loading
|
|
9734
|
-
}, [createElementVNode("thead",
|
|
9815
|
+
}, [createElementVNode("thead", _hoisted_3$j, [createElementVNode("tr", null, [_ctx.$slots.preHead ? renderSlot(_ctx.$slots, "preHead", {
|
|
9735
9816
|
key: 0
|
|
9736
9817
|
}) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, function (column, thKey) {
|
|
9737
9818
|
return openBlock(), createElementBlock(Fragment, {
|
|
@@ -9746,9 +9827,9 @@ function render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9746
9827
|
onClick: function onClick($event) {
|
|
9747
9828
|
return _ctx.sortColumn(column);
|
|
9748
9829
|
}
|
|
9749
|
-
}, [createElementVNode("div",
|
|
9830
|
+
}, [createElementVNode("div", _hoisted_5$8, [createElementVNode("span", {
|
|
9750
9831
|
"class": normalizeClass(_ctx.sortedIcon('asc', column) || _ctx.sortedIcon('desc', column) ? 'text-primary' : '')
|
|
9751
|
-
}, toDisplayString(column), 3), _ctx.isColumnSortable(column) ? (openBlock(), createElementBlock("span",
|
|
9832
|
+
}, toDisplayString(column), 3), _ctx.isColumnSortable(column) ? (openBlock(), createElementBlock("span", _hoisted_6$6, [!_ctx.sortedIcon('asc', column) && !_ctx.sortedIcon('desc', column) ? (openBlock(), createBlock(_component_ArrowSortSvg, {
|
|
9752
9833
|
key: 0,
|
|
9753
9834
|
"class": "inline-block w-full text-grey-base"
|
|
9754
9835
|
})) : createCommentVNode("", true), _ctx.sortedIcon('asc', column) ? (openBlock(), createBlock(_component_ArrowDownSvg, {
|
|
@@ -9757,10 +9838,10 @@ function render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9757
9838
|
})) : createCommentVNode("", true), _ctx.sortedIcon('desc', column) ? (openBlock(), createBlock(_component_ArrowDownSvg, {
|
|
9758
9839
|
key: 2,
|
|
9759
9840
|
"class": "inline-block w-4 text-primary"
|
|
9760
|
-
})) : createCommentVNode("", true)])) : createCommentVNode("", true)])], 42,
|
|
9841
|
+
})) : createCommentVNode("", true)])) : createCommentVNode("", true)])], 42, _hoisted_4$a)) : createCommentVNode("", true)], 64);
|
|
9761
9842
|
}), 128)), _ctx.$slots.head ? renderSlot(_ctx.$slots, "head", {
|
|
9762
9843
|
key: 1
|
|
9763
|
-
}) : createCommentVNode("", true)])]), createElementVNode("tbody",
|
|
9844
|
+
}) : createCommentVNode("", true)])]), createElementVNode("tbody", _hoisted_7$5, [_ctx.loading ? (openBlock(true), createElementBlock(Fragment, {
|
|
9764
9845
|
key: 0
|
|
9765
9846
|
}, renderList(_ctx.sortedData, function (row, trKey) {
|
|
9766
9847
|
return openBlock(), createElementBlock("tr", {
|
|
@@ -9768,10 +9849,10 @@ function render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9768
9849
|
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, function (column, colKey) {
|
|
9769
9850
|
return openBlock(), createElementBlock(Fragment, {
|
|
9770
9851
|
key: colKey
|
|
9771
|
-
}, [!_ctx.isDisabled(column) ? (openBlock(), createElementBlock("td",
|
|
9852
|
+
}, [!_ctx.isDisabled(column) ? (openBlock(), createElementBlock("td", _hoisted_8$4, [createVNode(_component_FwLoadingBar, {
|
|
9772
9853
|
"class": "w-full h-7"
|
|
9773
9854
|
})])) : createCommentVNode("", true)], 64);
|
|
9774
|
-
}), 128)), _ctx.$slots.row ? (openBlock(), createElementBlock("td",
|
|
9855
|
+
}), 128)), _ctx.$slots.row ? (openBlock(), createElementBlock("td", _hoisted_9$3, [createVNode(_component_FwLoadingBar, {
|
|
9775
9856
|
"class": "w-full h-7"
|
|
9776
9857
|
})])) : createCommentVNode("", true)]);
|
|
9777
9858
|
}), 128)) : (openBlock(true), createElementBlock(Fragment, {
|
|
@@ -9797,20 +9878,79 @@ function render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9797
9878
|
key: 0,
|
|
9798
9879
|
"class": "py-2 pl-5 pr-3 text-left",
|
|
9799
9880
|
innerHTML: _ctx.formattedText(row, column)
|
|
9800
|
-
}, null, 8,
|
|
9881
|
+
}, null, 8, _hoisted_11$1)) : createCommentVNode("", true)], 64);
|
|
9801
9882
|
}), 128)), _ctx.$slots.row ? renderSlot(_ctx.$slots, "row", {
|
|
9802
9883
|
key: 1,
|
|
9803
9884
|
row: row
|
|
9804
|
-
}) : createCommentVNode("", true)], 42,
|
|
9805
|
-
}), 128))])], 10,
|
|
9885
|
+
}) : createCommentVNode("", true)], 42, _hoisted_10$1);
|
|
9886
|
+
}), 128))])], 10, _hoisted_2$n), _ctx.enablePagination || (_ctx$options = _ctx.options) !== null && _ctx$options !== void 0 && _ctx$options.enablePagination ? (openBlock(), createElementBlock("div", _hoisted_12$1, [createVNode(_component_FwButton, {
|
|
9887
|
+
variant: 'tertiary',
|
|
9888
|
+
disabled: _ctx.currentPage === '1',
|
|
9889
|
+
size: "sm",
|
|
9890
|
+
"class": "border-grey-40",
|
|
9891
|
+
onClick: _cache[0] || (_cache[0] = function ($event) {
|
|
9892
|
+
return _ctx.pageArrowClick(false);
|
|
9893
|
+
})
|
|
9894
|
+
}, {
|
|
9895
|
+
"default": withCtx(function () {
|
|
9896
|
+
return [createVNode(_component_ChevronLeftSvg, {
|
|
9897
|
+
"class": "h-4 w-4 text-red-500",
|
|
9898
|
+
"stroke-width": "3"
|
|
9899
|
+
})];
|
|
9900
|
+
}),
|
|
9901
|
+
_: 1
|
|
9902
|
+
}, 8, ["disabled"]), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.pages, function (page) {
|
|
9903
|
+
return openBlock(), createBlock(_component_FwButton, {
|
|
9904
|
+
rounded: "",
|
|
9905
|
+
size: "sm",
|
|
9906
|
+
key: page.pageNumber,
|
|
9907
|
+
variant: page.selected ? 'tertiary' : 'secondary',
|
|
9908
|
+
"class": normalizeClass({
|
|
9909
|
+
'border-none': !page.selected,
|
|
9910
|
+
'bg-transparent': true
|
|
9911
|
+
}),
|
|
9912
|
+
onClick: function onClick($event) {
|
|
9913
|
+
return _ctx.pageNumberClick(page.pageNumber);
|
|
9914
|
+
}
|
|
9915
|
+
}, {
|
|
9916
|
+
"default": withCtx(function () {
|
|
9917
|
+
return [createElementVNode("div", _hoisted_13$1, [createElementVNode("strong", null, toDisplayString(page.pageNumber), 1)])];
|
|
9918
|
+
}),
|
|
9919
|
+
_: 2
|
|
9920
|
+
}, 1032, ["variant", "class", "onClick"]);
|
|
9921
|
+
}), 128)), createVNode(_component_FwButton, {
|
|
9922
|
+
variant: 'tertiary',
|
|
9923
|
+
disabled: _ctx.totalAmount && Number(_ctx.currentPage) === _ctx.totalAmount,
|
|
9924
|
+
size: "sm",
|
|
9925
|
+
"class": "border-grey-40",
|
|
9926
|
+
onClick: _cache[1] || (_cache[1] = function ($event) {
|
|
9927
|
+
return _ctx.pageArrowClick(true);
|
|
9928
|
+
})
|
|
9929
|
+
}, {
|
|
9930
|
+
"default": withCtx(function () {
|
|
9931
|
+
return [createVNode(_component_ChevronRightSvg, {
|
|
9932
|
+
"class": "h-4 w-4"
|
|
9933
|
+
})];
|
|
9934
|
+
}),
|
|
9935
|
+
_: 1
|
|
9936
|
+
}, 8, ["disabled"]), _hoisted_14$1, createVNode(_component_FwInput, {
|
|
9937
|
+
"center-align-input": "",
|
|
9938
|
+
"class": "max-w-[66px] p-0 text-center",
|
|
9939
|
+
name: "page",
|
|
9940
|
+
modelValue: _ctx.currentPage,
|
|
9941
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = function ($event) {
|
|
9942
|
+
return _ctx.currentPage = $event;
|
|
9943
|
+
}),
|
|
9944
|
+
type: "tel"
|
|
9945
|
+
}, null, 8, ["modelValue"])])) : createCommentVNode("", true)]);
|
|
9806
9946
|
}
|
|
9807
9947
|
|
|
9808
|
-
var css_248z$a = ".fw-table-head--sortable[data-v-
|
|
9809
|
-
var stylesheet$a = ".fw-table-head--sortable[data-v-
|
|
9948
|
+
var css_248z$a = ".fw-table-head--sortable[data-v-84c515f0]:hover{background-color:var(--c795d904)}.fw-table-row[data-v-84c515f0]:hover{background-color:var(--c795d904)}";
|
|
9949
|
+
var stylesheet$a = ".fw-table-head--sortable[data-v-84c515f0]:hover{background-color:var(--c795d904)}.fw-table-row[data-v-84c515f0]:hover{background-color:var(--c795d904)}";
|
|
9810
9950
|
styleInject(css_248z$a);
|
|
9811
9951
|
|
|
9812
9952
|
__default__$6.render = render$f;
|
|
9813
|
-
__default__$6.__scopeId = "data-v-
|
|
9953
|
+
__default__$6.__scopeId = "data-v-84c515f0";
|
|
9814
9954
|
|
|
9815
9955
|
var script$9 = defineComponent({
|
|
9816
9956
|
name: 'FwTableHead'
|
|
@@ -25891,7 +26031,7 @@ var script$1 = defineComponent({
|
|
|
25891
26031
|
},
|
|
25892
26032
|
setup: function setup(props, ctx) {
|
|
25893
26033
|
var baseDrawerClass = "fixed shadow-card top-0 right-0 z-40 h-screen bg-white";
|
|
25894
|
-
var drawerFooterClass = "\n sticky bottom-0 w-full shadow-card bg-white p-
|
|
26034
|
+
var drawerFooterClass = "\n sticky bottom-0 w-full shadow-card bg-white p-6 clip-top-shadow\n ";
|
|
25895
26035
|
var isMounted = ref(false);
|
|
25896
26036
|
var uuid = uniqueId();
|
|
25897
26037
|
var isOpen = computed({
|
|
@@ -25927,7 +26067,7 @@ var script$1 = defineComponent({
|
|
|
25927
26067
|
|
|
25928
26068
|
var _hoisted_1$f = ["id"];
|
|
25929
26069
|
var _hoisted_2$e = {
|
|
25930
|
-
"class": "flex flex-row justify-between items-center p-
|
|
26070
|
+
"class": "flex flex-row justify-between items-center p-6"
|
|
25931
26071
|
};
|
|
25932
26072
|
var _hoisted_3$c = ["id"];
|
|
25933
26073
|
var _hoisted_4$6 = ["id"];
|
|
@@ -25952,18 +26092,18 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25952
26092
|
"class": normalizeClass(["fw-drawer", _ctx.baseDrawerClass]),
|
|
25953
26093
|
tabindex: "-1",
|
|
25954
26094
|
"aria-labelledby": "drawer-label"
|
|
25955
|
-
}, [createElementVNode("div", _hoisted_2$e, [_ctx.$slots.header ? (openBlock(), createElementBlock("
|
|
26095
|
+
}, [createElementVNode("div", _hoisted_2$e, [_ctx.$slots.header ? (openBlock(), createElementBlock("h2", {
|
|
25956
26096
|
key: 0,
|
|
25957
26097
|
id: "drawer_".concat(_ctx.uuid, "_header"),
|
|
25958
|
-
"class": "inline-flex items-center mb-0 text-body font-
|
|
26098
|
+
"class": "inline-flex items-center mb-0 text-body font-bold"
|
|
25959
26099
|
}, [renderSlot(_ctx.$slots, "header")], 8, _hoisted_3$c)) : createCommentVNode("", true), createVNode(_component_FwButton, {
|
|
25960
|
-
variant: "
|
|
26100
|
+
variant: "transparent",
|
|
25961
26101
|
tabindex: "",
|
|
25962
26102
|
title: "Close drawer",
|
|
25963
26103
|
onClick: _cache[0] || (_cache[0] = function ($event) {
|
|
25964
26104
|
return _ctx.onCancelled();
|
|
25965
26105
|
}),
|
|
25966
|
-
"class": "inline-block w-9 h-9 !p-0
|
|
26106
|
+
"class": "inline-block w-9 h-9 !p-0 inline-flex items-center justify-center"
|
|
25967
26107
|
}, {
|
|
25968
26108
|
"default": withCtx(function () {
|
|
25969
26109
|
return [createVNode(_component_XMarkSvg, {
|
package/index.d.ts
CHANGED
|
@@ -123,6 +123,10 @@ declare const _default$m: vue.DefineComponent<{
|
|
|
123
123
|
type: BooleanConstructor;
|
|
124
124
|
default: boolean;
|
|
125
125
|
};
|
|
126
|
+
centerAlignInput: {
|
|
127
|
+
type: BooleanConstructor;
|
|
128
|
+
default: boolean;
|
|
129
|
+
};
|
|
126
130
|
}, {
|
|
127
131
|
uuid: string;
|
|
128
132
|
inputBaseClass: vue.Ref<string>;
|
|
@@ -225,6 +229,10 @@ declare const _default$m: vue.DefineComponent<{
|
|
|
225
229
|
type: BooleanConstructor;
|
|
226
230
|
default: boolean;
|
|
227
231
|
};
|
|
232
|
+
centerAlignInput: {
|
|
233
|
+
type: BooleanConstructor;
|
|
234
|
+
default: boolean;
|
|
235
|
+
};
|
|
228
236
|
}>> & {
|
|
229
237
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
230
238
|
}, {
|
|
@@ -235,6 +243,7 @@ declare const _default$m: vue.DefineComponent<{
|
|
|
235
243
|
tabindex: string;
|
|
236
244
|
rounded: boolean;
|
|
237
245
|
enableErrors: boolean;
|
|
246
|
+
centerAlignInput: boolean;
|
|
238
247
|
}, {}>;
|
|
239
248
|
|
|
240
249
|
declare const _default$l: vue.DefineComponent<{
|
|
@@ -1282,6 +1291,8 @@ declare interface FwTableProps {
|
|
|
1282
1291
|
loading?: boolean;
|
|
1283
1292
|
clickableRows?: boolean;
|
|
1284
1293
|
autoSortColumn?: number;
|
|
1294
|
+
enablePagination?: boolean;
|
|
1295
|
+
totalAmount?: number;
|
|
1285
1296
|
}
|
|
1286
1297
|
|
|
1287
1298
|
declare interface FwAccordionProps {
|
|
@@ -1485,6 +1496,10 @@ declare const __default__$6: vue.DefineComponent<{
|
|
|
1485
1496
|
dismissable: boolean;
|
|
1486
1497
|
}, {}>;
|
|
1487
1498
|
|
|
1499
|
+
interface PageButton {
|
|
1500
|
+
pageNumber: string;
|
|
1501
|
+
selected: boolean;
|
|
1502
|
+
}
|
|
1488
1503
|
declare const __default__$5: vue.DefineComponent<{
|
|
1489
1504
|
items: {
|
|
1490
1505
|
type: PropType<FwTableItem[]>;
|
|
@@ -1509,6 +1524,13 @@ declare const __default__$5: vue.DefineComponent<{
|
|
|
1509
1524
|
autoSortColumn: {
|
|
1510
1525
|
type: NumberConstructor;
|
|
1511
1526
|
};
|
|
1527
|
+
enablePagination: {
|
|
1528
|
+
type: BooleanConstructor;
|
|
1529
|
+
default: boolean;
|
|
1530
|
+
};
|
|
1531
|
+
totalAmount: {
|
|
1532
|
+
type: NumberConstructor;
|
|
1533
|
+
};
|
|
1512
1534
|
}, {
|
|
1513
1535
|
columns: vue.ComputedRef<string[]>;
|
|
1514
1536
|
sortBy: vue.Ref<string>;
|
|
@@ -1522,7 +1544,11 @@ declare const __default__$5: vue.DefineComponent<{
|
|
|
1522
1544
|
isDisabled: (column: string) => boolean;
|
|
1523
1545
|
rowClicked: (row: FwTableItem) => void;
|
|
1524
1546
|
bgHoverColor: string;
|
|
1525
|
-
|
|
1547
|
+
currentPage: vue.Ref<string>;
|
|
1548
|
+
pages: vue.ComputedRef<PageButton[] | undefined>;
|
|
1549
|
+
pageNumberClick: (pageNumber: string) => void;
|
|
1550
|
+
pageArrowClick: (next: boolean) => void;
|
|
1551
|
+
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("rowClicked" | "columnSorted" | "pageChanged")[], "rowClicked" | "columnSorted" | "pageChanged", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
1526
1552
|
items: {
|
|
1527
1553
|
type: PropType<FwTableItem[]>;
|
|
1528
1554
|
required: true;
|
|
@@ -1546,12 +1572,21 @@ declare const __default__$5: vue.DefineComponent<{
|
|
|
1546
1572
|
autoSortColumn: {
|
|
1547
1573
|
type: NumberConstructor;
|
|
1548
1574
|
};
|
|
1575
|
+
enablePagination: {
|
|
1576
|
+
type: BooleanConstructor;
|
|
1577
|
+
default: boolean;
|
|
1578
|
+
};
|
|
1579
|
+
totalAmount: {
|
|
1580
|
+
type: NumberConstructor;
|
|
1581
|
+
};
|
|
1549
1582
|
}>> & {
|
|
1550
1583
|
onRowClicked?: ((...args: any[]) => any) | undefined;
|
|
1551
1584
|
onColumnSorted?: ((...args: any[]) => any) | undefined;
|
|
1585
|
+
onPageChanged?: ((...args: any[]) => any) | undefined;
|
|
1552
1586
|
}, {
|
|
1553
1587
|
loading: boolean;
|
|
1554
1588
|
clickableRows: boolean;
|
|
1589
|
+
enablePagination: boolean;
|
|
1555
1590
|
}, {}>;
|
|
1556
1591
|
|
|
1557
1592
|
declare const _default$c: vue.DefineComponent<{}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{}>>, {}, {}>;
|
package/package.json
CHANGED
|
@@ -98,6 +98,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
98
98
|
type: BooleanConstructor;
|
|
99
99
|
default: boolean;
|
|
100
100
|
};
|
|
101
|
+
centerAlignInput: {
|
|
102
|
+
type: BooleanConstructor;
|
|
103
|
+
default: boolean;
|
|
104
|
+
};
|
|
101
105
|
}, {
|
|
102
106
|
uuid: string;
|
|
103
107
|
inputBaseClass: import("vue").Ref<string>;
|
|
@@ -200,6 +204,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
200
204
|
type: BooleanConstructor;
|
|
201
205
|
default: boolean;
|
|
202
206
|
};
|
|
207
|
+
centerAlignInput: {
|
|
208
|
+
type: BooleanConstructor;
|
|
209
|
+
default: boolean;
|
|
210
|
+
};
|
|
203
211
|
}>> & {
|
|
204
212
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
205
213
|
}, {
|
|
@@ -210,5 +218,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
210
218
|
tabindex: string;
|
|
211
219
|
rounded: boolean;
|
|
212
220
|
enableErrors: boolean;
|
|
221
|
+
centerAlignInput: boolean;
|
|
213
222
|
}, {}>;
|
|
214
223
|
export default _default;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { FwTableItem, FwTableSort } from './index.types';
|
|
3
|
+
interface PageButton {
|
|
4
|
+
pageNumber: string;
|
|
5
|
+
selected: boolean;
|
|
6
|
+
}
|
|
3
7
|
declare const __default__: import("vue").DefineComponent<{
|
|
4
8
|
items: {
|
|
5
9
|
type: PropType<FwTableItem[]>;
|
|
@@ -24,6 +28,13 @@ declare const __default__: import("vue").DefineComponent<{
|
|
|
24
28
|
autoSortColumn: {
|
|
25
29
|
type: NumberConstructor;
|
|
26
30
|
};
|
|
31
|
+
enablePagination: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
totalAmount: {
|
|
36
|
+
type: NumberConstructor;
|
|
37
|
+
};
|
|
27
38
|
}, {
|
|
28
39
|
columns: import("vue").ComputedRef<string[]>;
|
|
29
40
|
sortBy: import("vue").Ref<string>;
|
|
@@ -37,7 +48,11 @@ declare const __default__: import("vue").DefineComponent<{
|
|
|
37
48
|
isDisabled: (column: string) => boolean;
|
|
38
49
|
rowClicked: (row: FwTableItem) => void;
|
|
39
50
|
bgHoverColor: string;
|
|
40
|
-
|
|
51
|
+
currentPage: import("vue").Ref<string>;
|
|
52
|
+
pages: import("vue").ComputedRef<PageButton[] | undefined>;
|
|
53
|
+
pageNumberClick: (pageNumber: string) => void;
|
|
54
|
+
pageArrowClick: (next: boolean) => void;
|
|
55
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("rowClicked" | "columnSorted" | "pageChanged")[], "rowClicked" | "columnSorted" | "pageChanged", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
41
56
|
items: {
|
|
42
57
|
type: PropType<FwTableItem[]>;
|
|
43
58
|
required: true;
|
|
@@ -61,11 +76,20 @@ declare const __default__: import("vue").DefineComponent<{
|
|
|
61
76
|
autoSortColumn: {
|
|
62
77
|
type: NumberConstructor;
|
|
63
78
|
};
|
|
79
|
+
enablePagination: {
|
|
80
|
+
type: BooleanConstructor;
|
|
81
|
+
default: boolean;
|
|
82
|
+
};
|
|
83
|
+
totalAmount: {
|
|
84
|
+
type: NumberConstructor;
|
|
85
|
+
};
|
|
64
86
|
}>> & {
|
|
65
87
|
onRowClicked?: ((...args: any[]) => any) | undefined;
|
|
66
88
|
onColumnSorted?: ((...args: any[]) => any) | undefined;
|
|
89
|
+
onPageChanged?: ((...args: any[]) => any) | undefined;
|
|
67
90
|
}, {
|
|
68
91
|
loading: boolean;
|
|
69
92
|
clickableRows: boolean;
|
|
93
|
+
enablePagination: boolean;
|
|
70
94
|
}, {}>;
|
|
71
95
|
export default __default__;
|