vueless 1.1.1-beta.13 → 1.1.1-beta.15
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vueless",
|
|
3
|
-
"version": "1.1.1-beta.
|
|
3
|
+
"version": "1.1.1-beta.15",
|
|
4
4
|
"description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
|
|
5
5
|
"author": "Johnny Grid <hello@vueless.com> (https://vueless.com)",
|
|
6
6
|
"homepage": "https://vueless.com",
|
package/plugin-vite.js
CHANGED
|
@@ -81,7 +81,8 @@ export const Vueless = function (options = {}) {
|
|
|
81
81
|
/* if server stopped by developer (Ctrl+C) */
|
|
82
82
|
process.on("SIGINT", async () => {
|
|
83
83
|
if (isInternalEnv || isStorybookEnv) {
|
|
84
|
-
|
|
84
|
+
// TODO: Fix it later
|
|
85
|
+
// await showHiddenStories(vuelessSrcDir);
|
|
85
86
|
await removeCustomPropTypes(vuelessSrcDir);
|
|
86
87
|
}
|
|
87
88
|
|
|
@@ -116,7 +117,7 @@ export const Vueless = function (options = {}) {
|
|
|
116
117
|
"process.env": {},
|
|
117
118
|
},
|
|
118
119
|
optimizeDeps: {
|
|
119
|
-
include: ["vueless/directives/**/*.ts"],
|
|
120
|
+
include: ["vueless/directives/**/*.ts", "vueless/constants.js"],
|
|
120
121
|
},
|
|
121
122
|
}),
|
|
122
123
|
|
package/ui.data-table/UTable.vue
CHANGED
|
@@ -531,11 +531,15 @@ const {
|
|
|
531
531
|
:data-test="getDataTest('select-all')"
|
|
532
532
|
/>
|
|
533
533
|
|
|
534
|
-
<div
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
534
|
+
<div v-if="localSelectedRows.length" v-bind="stickyHeaderCounterAttrs">
|
|
535
|
+
<!--
|
|
536
|
+
@slot Use it to customize header counter.
|
|
537
|
+
@binding {number} total
|
|
538
|
+
-->
|
|
539
|
+
<slot name="header-counter" :total="localSelectedRows.length">
|
|
540
|
+
{{ localSelectedRows.length }}
|
|
541
|
+
</slot>
|
|
542
|
+
</div>
|
|
539
543
|
</div>
|
|
540
544
|
|
|
541
545
|
<!-- TODO: Remove any when key attrs are typed-->
|
|
@@ -657,11 +661,15 @@ const {
|
|
|
657
661
|
:data-test="getDataTest('select-all')"
|
|
658
662
|
/>
|
|
659
663
|
|
|
660
|
-
<div
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
664
|
+
<div v-if="localSelectedRows.length" v-bind="headerCounterAttrs">
|
|
665
|
+
<!--
|
|
666
|
+
@slot Use it to customize header counter.
|
|
667
|
+
@binding {number} total
|
|
668
|
+
-->
|
|
669
|
+
<slot name="header-counter" :total="localSelectedRows.length">
|
|
670
|
+
{{ localSelectedRows.length }}
|
|
671
|
+
</slot>
|
|
672
|
+
</div>
|
|
665
673
|
</th>
|
|
666
674
|
|
|
667
675
|
<th
|
|
@@ -474,6 +474,17 @@ DateDividerCustomLabel.parameters = {
|
|
|
474
474
|
},
|
|
475
475
|
};
|
|
476
476
|
|
|
477
|
+
export const HeaderCounterSlot = DefaultTemplate.bind({});
|
|
478
|
+
HeaderCounterSlot.args = {
|
|
479
|
+
selectable: true,
|
|
480
|
+
config: { headerCellCheckbox: "w-20" },
|
|
481
|
+
slotTemplate: `
|
|
482
|
+
<template #header-counter="{ total }">
|
|
483
|
+
Total: {{ total }}
|
|
484
|
+
</template>
|
|
485
|
+
`,
|
|
486
|
+
};
|
|
487
|
+
|
|
477
488
|
export const HeaderKeySlot = DefaultTemplate.bind({});
|
|
478
489
|
HeaderKeySlot.args = {
|
|
479
490
|
slotTemplate: `
|
|
@@ -294,6 +294,24 @@ describe("UTable.vue", () => {
|
|
|
294
294
|
});
|
|
295
295
|
|
|
296
296
|
describe("Slots", () => {
|
|
297
|
+
it("Header Counter Slot – renders custom header counter content", () => {
|
|
298
|
+
const customHeaderCounterContent = "Custom Header Counter";
|
|
299
|
+
|
|
300
|
+
const component = mountUTable(
|
|
301
|
+
getDefaultProps({
|
|
302
|
+
selectable: true,
|
|
303
|
+
selectedRows: [defaultRows[0]],
|
|
304
|
+
}),
|
|
305
|
+
{
|
|
306
|
+
slots: {
|
|
307
|
+
"header-counter": customHeaderCounterContent,
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
);
|
|
311
|
+
|
|
312
|
+
expect(component.text()).toContain(customHeaderCounterContent);
|
|
313
|
+
});
|
|
314
|
+
|
|
297
315
|
it("Header Slot – renders custom header content", () => {
|
|
298
316
|
const customHeaderContent = "Custom Name Header";
|
|
299
317
|
|