@pequity/squirrel 8.4.5 → 8.5.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/README.md +29 -0
- package/dist/cjs/chunks/index.js +530 -179
- package/dist/cjs/chunks/p-alert.js +11 -16
- package/dist/cjs/chunks/p-btn.js +1 -1
- package/dist/cjs/chunks/p-input-percent.js +2 -2
- package/dist/cjs/index.js +33 -27
- package/dist/cjs/inputClasses.js +3 -3
- package/dist/cjs/p-icon.js +2 -1
- package/dist/cjs/p-loading.js +2 -2
- package/dist/cjs/p-modal.js +45 -43
- package/dist/cjs/p-table-header-cell.js +3 -2
- package/dist/cjs/p-table.js +2 -0
- package/dist/cjs/usePTableHeaderWrap.js +38 -0
- package/dist/es/chunks/index.js +530 -179
- package/dist/es/chunks/p-alert.js +11 -16
- package/dist/es/chunks/p-btn.js +2 -2
- package/dist/es/chunks/p-input-percent.js +2 -2
- package/dist/es/index.js +39 -33
- package/dist/es/inputClasses.js +4 -4
- package/dist/es/p-icon.js +2 -1
- package/dist/es/p-loading.js +2 -2
- package/dist/es/p-modal.js +45 -43
- package/dist/es/p-table-header-cell.js +3 -2
- package/dist/es/p-table.js +2 -0
- package/dist/es/usePTableHeaderWrap.js +38 -0
- package/dist/squirrel/components/p-action-bar/p-action-bar.vue.d.ts +1 -1
- package/dist/squirrel/components/p-alert/p-alert.vue.d.ts +2 -2
- package/dist/squirrel/components/p-avatar/p-avatar.vue.d.ts +1 -1
- package/dist/squirrel/components/p-btn/p-btn.vue.d.ts +3 -3
- package/dist/squirrel/components/p-card/p-card.vue.d.ts +1 -1
- package/dist/squirrel/components/p-checkbox/p-checkbox.vue.d.ts +1 -1
- package/dist/squirrel/components/p-close-btn/p-close-btn.vue.d.ts +1 -1
- package/dist/squirrel/components/p-date-picker/p-date-picker.vue.d.ts +1 -1
- package/dist/squirrel/components/p-drawer/p-drawer.vue.d.ts +12 -12
- package/dist/squirrel/components/p-dropdown-select/p-dropdown-select.vue.d.ts +1 -1
- package/dist/squirrel/components/p-file-upload/p-file-upload.vue.d.ts +1 -1
- package/dist/squirrel/components/p-icon/p-icon.types.d.ts +1 -0
- package/dist/squirrel/components/p-icon/p-icon.vue.d.ts +1 -1
- package/dist/squirrel/components/p-info-icon/p-info-icon.vue.d.ts +1 -1
- package/dist/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue.d.ts +1 -1
- package/dist/squirrel/components/p-input/p-input.vue.d.ts +1 -1
- package/dist/squirrel/components/p-input-percent/p-input-percent.vue.d.ts +1 -1
- package/dist/squirrel/components/p-input-search/p-input-search.vue.d.ts +1 -1
- package/dist/squirrel/components/p-link/p-link.vue.d.ts +1 -1
- package/dist/squirrel/components/p-loading/p-loading.vue.d.ts +1 -1
- package/dist/squirrel/components/p-modal/p-modal.vue.d.ts +5 -1
- package/dist/squirrel/components/p-pagination/p-pagination.vue.d.ts +1 -1
- package/dist/squirrel/components/p-pagination-info/p-pagination-info.vue.d.ts +1 -1
- package/dist/squirrel/components/p-progress-bar/p-progress-bar.vue.d.ts +1 -1
- package/dist/squirrel/components/p-ring-loader/p-ring-loader.vue.d.ts +1 -1
- package/dist/squirrel/components/p-select/p-select.vue.d.ts +1 -1
- package/dist/squirrel/components/p-select-btn/p-select-btn.vue.d.ts +1 -1
- package/dist/squirrel/components/p-select-list/p-select-list.vue.d.ts +1 -1
- package/dist/squirrel/components/p-steps/p-steps.vue.d.ts +1 -1
- package/dist/squirrel/components/p-table/p-table.types.d.ts +1 -0
- package/dist/squirrel/components/p-table/p-table.vue.d.ts +1 -1
- package/dist/squirrel/components/p-table/usePTableHeaderWrap.d.ts +4 -0
- package/dist/squirrel/components/p-table-header-cell/p-table-filter-icon.vue.d.ts +1 -1
- package/dist/squirrel/components/p-table-header-cell/p-table-header-cell.vue.d.ts +3 -3
- package/dist/squirrel/components/p-table-loader/p-table-loader.vue.d.ts +1 -1
- package/dist/squirrel/components/p-table-sort/p-table-sort.vue.d.ts +1 -1
- package/dist/squirrel/components/p-table-td/p-table-td.vue.d.ts +1 -1
- package/dist/squirrel/components/p-tabs/p-tabs.vue.d.ts +1 -1
- package/dist/squirrel/components/p-tabs-pills/p-tabs-pills.vue.d.ts +1 -1
- package/dist/squirrel/components/p-textarea/p-textarea.vue.d.ts +1 -1
- package/dist/squirrel/components/p-toggle/p-toggle.vue.d.ts +1 -1
- package/dist/squirrel.css +22 -22
- package/package.json +23 -21
- package/squirrel/components/p-alert/p-alert.spec.js +4 -4
- package/squirrel/components/p-alert/p-alert.stories.js +19 -13
- package/squirrel/components/p-alert/p-alert.vue +9 -11
- package/squirrel/components/p-icon/p-icon.types.ts +1 -0
- package/squirrel/components/p-modal/p-modal-basic.spec.js +29 -3
- package/squirrel/components/p-modal/p-modal.vue +44 -33
- package/squirrel/components/p-table/p-table.spec.js +51 -15
- package/squirrel/components/p-table/p-table.types.ts +2 -0
- package/squirrel/components/p-table/p-table.vue +7 -4
- package/squirrel/components/p-table/usePTableHeaderWrap.spec.js +118 -0
- package/squirrel/components/p-table/usePTableHeaderWrap.ts +45 -0
- package/squirrel/components/p-table-header-cell/p-table-header-cell.spec.js +5 -1
- package/squirrel/components/p-table-header-cell/p-table-header-cell.vue +2 -1
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { defineComponent, createElementBlock, openBlock, normalizeClass, createElementVNode, renderSlot, createVNode } from "vue";
|
|
2
2
|
import { _ as _sfc_main$1 } from "./p-icon.js";
|
|
3
|
-
const _hoisted_1 = { class: "flex" };
|
|
4
|
-
const _hoisted_2 = { class: "pr-2" };
|
|
3
|
+
const _hoisted_1 = { class: "flex items-center gap-4" };
|
|
5
4
|
const ALERT_TYPES = {
|
|
6
|
-
info: { classes: `bg-info text-on-info`, icon: "
|
|
7
|
-
warning: { classes: `bg-warning text-on-warning`, icon: "
|
|
8
|
-
error: { classes: `bg-error text-on-error`, icon: "
|
|
9
|
-
success: { classes: `bg-success text-on-success`, icon: "
|
|
5
|
+
info: { classes: `bg-info text-on-info`, icon: "material-symbols:info-outline" },
|
|
6
|
+
warning: { classes: `bg-warning text-on-warning`, icon: "warning" },
|
|
7
|
+
error: { classes: `bg-error text-on-error`, icon: "cancel-circle" },
|
|
8
|
+
success: { classes: `bg-success text-on-success`, icon: "ok-circle" }
|
|
10
9
|
};
|
|
11
10
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
11
|
...{
|
|
@@ -29,19 +28,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
29
28
|
const props = __props;
|
|
30
29
|
return (_ctx, _cache) => {
|
|
31
30
|
return openBlock(), createElementBlock("div", {
|
|
32
|
-
class: normalizeClass(["rounded p-4 text-xs font-semibold", ALERT_TYPES[props.type].classes]),
|
|
31
|
+
class: normalizeClass(["rounded-lg p-4 text-xs font-semibold", ALERT_TYPES[props.type].classes]),
|
|
33
32
|
role: "alert"
|
|
34
33
|
}, [
|
|
35
34
|
createElementVNode("div", _hoisted_1, [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
class: "-mb-0.5",
|
|
42
|
-
inline: ""
|
|
43
|
-
}, null, 8, ["icon"])
|
|
44
|
-
])
|
|
35
|
+
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
36
|
+
createVNode(_sfc_main$1, {
|
|
37
|
+
icon: ALERT_TYPES[props.type].icon,
|
|
38
|
+
width: "20"
|
|
39
|
+
}, null, 8, ["icon"])
|
|
45
40
|
]),
|
|
46
41
|
createElementVNode("div", null, [
|
|
47
42
|
renderSlot(_ctx.$slots, "default")
|
package/dist/es/chunks/p-btn.js
CHANGED
|
@@ -4,7 +4,7 @@ import { _ as _sfc_main$1 } from "./p-icon.js";
|
|
|
4
4
|
import { _ as _sfc_main$2 } from "./p-ring-loader.js";
|
|
5
5
|
import { isExternalLink } from "../link.js";
|
|
6
6
|
import { sanitizeUrl } from "../sanitization.js";
|
|
7
|
-
import {
|
|
7
|
+
import { T } from "./index.js";
|
|
8
8
|
const _hoisted_1 = { class: "slot-wrapper empty:hidden" };
|
|
9
9
|
const btnClasses = {
|
|
10
10
|
slots: {
|
|
@@ -68,7 +68,7 @@ const btnClasses = {
|
|
|
68
68
|
size: "md"
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
|
-
const btn =
|
|
71
|
+
const btn = T(btnClasses);
|
|
72
72
|
const BUTTON_TYPES = Object.keys(btnClasses.variants.type);
|
|
73
73
|
const BUTTON_NATIVE_TYPES = ["button", "submit", "reset"];
|
|
74
74
|
const LOADER_SIZES = { sm: 24, md: 30, lg: 40 };
|
|
@@ -49,9 +49,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
49
49
|
prefix: withCtx(() => [
|
|
50
50
|
createElementVNode("div", {
|
|
51
51
|
class: normalizeClass(["absolute flex items-center", prefixClasses[__props.size]])
|
|
52
|
-
}, _cache[1] || (_cache[1] = [
|
|
52
|
+
}, [..._cache[1] || (_cache[1] = [
|
|
53
53
|
createElementVNode("div", null, "%", -1)
|
|
54
|
-
]), 2)
|
|
54
|
+
])], 2)
|
|
55
55
|
]),
|
|
56
56
|
_: 1
|
|
57
57
|
}, 8, ["modelValue", "size"]);
|
package/dist/es/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { default as default5 } from "./p-drawer.js";
|
|
|
11
11
|
import { default as default6 } from "./p-dropdown.js";
|
|
12
12
|
import { _ as _imports_0$1 } from "./chunks/p-dropdown-select.js";
|
|
13
13
|
import { a } from "./chunks/p-dropdown-select.js";
|
|
14
|
-
import { defineComponent, shallowRef, ref, computed, onMounted, createElementBlock, openBlock, normalizeClass, createCommentVNode, createElementVNode, withDirectives, unref, toDisplayString, withModifiers, createVNode, createTextVNode, Fragment, renderList, vShow, useAttrs, resolveDirective, normalizeStyle, isRef, renderSlot, provide, onBeforeUnmount, watch, mergeProps, toHandlers, createBlock, withCtx } from "vue";
|
|
14
|
+
import { defineComponent, shallowRef, ref, computed, onMounted, createElementBlock, openBlock, normalizeClass, createCommentVNode, createElementVNode, withDirectives, unref, toDisplayString, withModifiers, createVNode, createTextVNode, Fragment, renderList, vShow, useAttrs, resolveDirective, normalizeStyle, isRef, renderSlot, provide, useTemplateRef, onBeforeUnmount, watch, mergeProps, toHandlers, createBlock, withCtx } from "vue";
|
|
15
15
|
import { formatBytes, getFileExtension } from "./p-file-upload.js";
|
|
16
16
|
import { _ as _sfc_main$4 } from "./chunks/p-icon.js";
|
|
17
17
|
import { useInputClasses } from "./useInputClasses.js";
|
|
@@ -45,6 +45,7 @@ import { _ as _19 } from "./chunks/p-steps.js";
|
|
|
45
45
|
import { colsInjectionKey, isFirstColFixedInjectionKey, isLastColFixedInjectionKey, isColsResizableInjectionKey } from "./p-table.js";
|
|
46
46
|
import { MIN_WIDTH_COL_RESIZE } from "./p-table.js";
|
|
47
47
|
import { usePTableColResize } from "./usePTableColResize.js";
|
|
48
|
+
import { usePTableHeaderWrap } from "./usePTableHeaderWrap.js";
|
|
48
49
|
import PTableHeaderCell from "./p-table-header-cell.js";
|
|
49
50
|
import PTableTd from "./p-table-td.js";
|
|
50
51
|
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
@@ -65,7 +66,7 @@ import { toNumberOrNull } from "./number.js";
|
|
|
65
66
|
import { isObject } from "./object.js";
|
|
66
67
|
import { createPagingRange } from "./pagination.js";
|
|
67
68
|
import { sanitizeUrl } from "./sanitization.js";
|
|
68
|
-
import {
|
|
69
|
+
import { i, u, C, Q, T } from "./chunks/index.js";
|
|
69
70
|
const _hoisted_1$3 = ["data-has-error"];
|
|
70
71
|
const _hoisted_2$3 = {
|
|
71
72
|
key: 0,
|
|
@@ -81,7 +82,7 @@ const _hoisted_6$3 = {
|
|
|
81
82
|
key: 1,
|
|
82
83
|
class: "flex flex-col items-center"
|
|
83
84
|
};
|
|
84
|
-
const _hoisted_7$
|
|
85
|
+
const _hoisted_7$1 = { class: "mt-2 text-p-purple-60" };
|
|
85
86
|
const _hoisted_8 = ["accept", "multiple", "disabled"];
|
|
86
87
|
const _hoisted_9 = { class: "max-h-48 overflow-y-auto overflow-x-hidden" };
|
|
87
88
|
const _hoisted_10 = ["title"];
|
|
@@ -230,11 +231,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
230
231
|
return res;
|
|
231
232
|
};
|
|
232
233
|
const uploadFile = (e) => {
|
|
233
|
-
const
|
|
234
|
-
if (!
|
|
234
|
+
const f = e.target?.files || e.dataTransfer?.files;
|
|
235
|
+
if (!f) {
|
|
235
236
|
return;
|
|
236
237
|
}
|
|
237
|
-
const validatedFiles = props.fileTypes ? validateFiles(Array.from(
|
|
238
|
+
const validatedFiles = props.fileTypes ? validateFiles(Array.from(f)) : Array.from(f);
|
|
238
239
|
files.value = props.multiple ? [...files.value, ...validatedFiles] : validatedFiles;
|
|
239
240
|
emit("file-added", validatedFiles);
|
|
240
241
|
};
|
|
@@ -305,7 +306,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
305
306
|
width: "32",
|
|
306
307
|
class: "text-primary"
|
|
307
308
|
}),
|
|
308
|
-
createElementVNode("div", _hoisted_7$
|
|
309
|
+
createElementVNode("div", _hoisted_7$1, "Drop " + toDisplayString(fileWord.value), 1)
|
|
309
310
|
])),
|
|
310
311
|
createElementVNode("input", {
|
|
311
312
|
ref_key: "fileInputRef",
|
|
@@ -370,7 +371,7 @@ const _hoisted_6$2 = {
|
|
|
370
371
|
class: "ml-auto fill-p-purple-60 pl-2",
|
|
371
372
|
src: _imports_0$1
|
|
372
373
|
};
|
|
373
|
-
const _hoisted_7
|
|
374
|
+
const _hoisted_7 = {
|
|
374
375
|
key: 1,
|
|
375
376
|
class: "ml-auto h-4 w-[26px] pl-2"
|
|
376
377
|
};
|
|
@@ -674,7 +675,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
674
675
|
}), 128))
|
|
675
676
|
], 8, _hoisted_5$2)
|
|
676
677
|
]),
|
|
677
|
-
unref(isSelected)(unref(getValue)(row.index)) ? (openBlock(), createElementBlock("img", _hoisted_6$2)) : (openBlock(), createElementBlock("div", _hoisted_7
|
|
678
|
+
unref(isSelected)(unref(getValue)(row.index)) ? (openBlock(), createElementBlock("img", _hoisted_6$2)) : (openBlock(), createElementBlock("div", _hoisted_7))
|
|
678
679
|
], 2)
|
|
679
680
|
], 14, _hoisted_4$2)), [
|
|
680
681
|
[_directive_close_popper, __props.closePopperOnSelect && !__props.multiple]
|
|
@@ -699,15 +700,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
699
700
|
}
|
|
700
701
|
});
|
|
701
702
|
const _hoisted_1$1 = ["data-col-id"];
|
|
702
|
-
const _hoisted_2$1 =
|
|
703
|
-
const _hoisted_3$1 =
|
|
704
|
-
const _hoisted_4$1 = {
|
|
703
|
+
const _hoisted_2$1 = ["onMousedown", "onDblclick"];
|
|
704
|
+
const _hoisted_3$1 = {
|
|
705
705
|
key: 0,
|
|
706
706
|
class: "min-w-[80px] bg-gradient-to-r from-white via-p-gray-10 to-p-gray-10"
|
|
707
707
|
};
|
|
708
|
-
const
|
|
709
|
-
const
|
|
710
|
-
const
|
|
708
|
+
const _hoisted_4$1 = { key: 0 };
|
|
709
|
+
const _hoisted_5$1 = { class: "py-2" };
|
|
710
|
+
const _hoisted_6$1 = { key: 1 };
|
|
711
711
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
712
712
|
...{ name: "PTable" },
|
|
713
713
|
__name: "p-table",
|
|
@@ -745,6 +745,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
745
745
|
computed(() => props.colsResizable)
|
|
746
746
|
);
|
|
747
747
|
const scrollWrapper = ref(null);
|
|
748
|
+
const theadRef = useTemplateRef("theadRef");
|
|
748
749
|
const ths = ref([]);
|
|
749
750
|
const {
|
|
750
751
|
isColResizing,
|
|
@@ -758,6 +759,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
758
759
|
enabled: computed(() => props.colsResizable),
|
|
759
760
|
ths
|
|
760
761
|
});
|
|
762
|
+
const { hasWrap } = usePTableHeaderWrap(theadRef);
|
|
761
763
|
const tbodyElement = ref(null);
|
|
762
764
|
const updateThsRefs = (el, index) => {
|
|
763
765
|
if (el instanceof Element) {
|
|
@@ -844,7 +846,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
844
846
|
{ "first-col-fixed": _ctx.isFirstColFixed }
|
|
845
847
|
]
|
|
846
848
|
}, toHandlers(_ctx.colsResizable ? { mousemove: unref(colResize) } : {}, true)), [
|
|
847
|
-
createElementVNode("thead",
|
|
849
|
+
createElementVNode("thead", {
|
|
850
|
+
ref_key: "theadRef",
|
|
851
|
+
ref: theadRef
|
|
852
|
+
}, [
|
|
848
853
|
createElementVNode("tr", null, [
|
|
849
854
|
(openBlock(true), createElementBlock(Fragment, null, renderList(props.cols, (col, i2) => {
|
|
850
855
|
return openBlock(), createElementBlock("th", mergeProps({
|
|
@@ -860,7 +865,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
860
865
|
class: normalizeClass(thDivClasses(i2)),
|
|
861
866
|
style: normalizeStyle(bgColorStyle(col))
|
|
862
867
|
}, [
|
|
863
|
-
createElementVNode("div",
|
|
868
|
+
createElementVNode("div", {
|
|
869
|
+
class: normalizeClass(["flex", { "h-10": unref(hasWrap) }])
|
|
870
|
+
}, [
|
|
864
871
|
renderSlot(_ctx.$slots, `prepend-header-cell-${unref(kebabCase)(col.name)}`, { col }, void 0, true),
|
|
865
872
|
createVNode(PTableHeaderCell, mergeProps({
|
|
866
873
|
text: col.title,
|
|
@@ -872,14 +879,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
872
879
|
}, { ref_for: true }, col.headerCellAttrs, {
|
|
873
880
|
onClickFilterIcon: ($event) => _ctx.$emit("click-filter-icon", $event, col)
|
|
874
881
|
}), null, 16, ["text", "filter-active", "show-filter-icon", "tooltip-text", "class", "text-color", "onClickFilterIcon"])
|
|
875
|
-
]),
|
|
882
|
+
], 2),
|
|
876
883
|
_ctx.colsResizable && i2 !== 0 && !(i2 === _ctx.cols.length - 1 && _ctx.isLastColFixed) ? (openBlock(), createElementBlock("div", {
|
|
877
884
|
key: 0,
|
|
878
|
-
class: normalizeClass(["absolute
|
|
885
|
+
class: normalizeClass(["absolute right-0 top-1/2 z-110 h-5 w-2 -translate-y-1/2 cursor-col-resize after:absolute after:bottom-0 after:z-110 after:block after:h-full after:w-2 after:cursor-col-resize after:border-r-2 after:border-dashed after:border-p-gray-30", i2 === _ctx.cols.length - 1 ? "after:right-0.5" : "after:right-0"]),
|
|
879
886
|
"data-resize-handle": "",
|
|
880
887
|
onMousedown: ($event) => unref(colResizeStart)($event, i2),
|
|
881
888
|
onDblclick: ($event) => unref(colResizeFitToData)(i2)
|
|
882
|
-
}, null, 42,
|
|
889
|
+
}, null, 42, _hoisted_2$1)) : createCommentVNode("", true)
|
|
883
890
|
], 6),
|
|
884
891
|
_ctx.subheader ? (openBlock(), createElementBlock("div", {
|
|
885
892
|
key: 0,
|
|
@@ -889,14 +896,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
889
896
|
], 2)) : createCommentVNode("", true)
|
|
890
897
|
], 16, _hoisted_1$1);
|
|
891
898
|
}), 128)),
|
|
892
|
-
_ctx.colsResizable && !_ctx.isLastColFixed ? (openBlock(), createElementBlock("th",
|
|
899
|
+
_ctx.colsResizable && !_ctx.isLastColFixed ? (openBlock(), createElementBlock("th", _hoisted_3$1)) : createCommentVNode("", true)
|
|
893
900
|
])
|
|
894
|
-
]),
|
|
901
|
+
], 512),
|
|
895
902
|
createElementVNode("tbody", {
|
|
896
903
|
ref_key: "tbodyElement",
|
|
897
904
|
ref: tbodyElement
|
|
898
905
|
}, [
|
|
899
|
-
_ctx.virtualizer.paddingTop > 0 ? (openBlock(), createElementBlock("tr",
|
|
906
|
+
_ctx.virtualizer.paddingTop > 0 ? (openBlock(), createElementBlock("tr", _hoisted_4$1, [
|
|
900
907
|
createElementVNode("td", {
|
|
901
908
|
style: normalizeStyle({ height: `${_ctx.virtualizer.paddingTop}px` })
|
|
902
909
|
}, null, 4)
|
|
@@ -915,7 +922,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
915
922
|
default: withCtx(() => [
|
|
916
923
|
renderSlot(_ctx.$slots, "cell", mergeProps({ ref_for: true }, { col, colIndex, rowData, rowIndex, cellData: rowData[col.name] }), () => [
|
|
917
924
|
renderSlot(_ctx.$slots, `cell-${unref(kebabCase)(col.name)}`, mergeProps({ ref_for: true }, { col, rowData, rowIndex, cellData: rowData[col.name] }), () => [
|
|
918
|
-
createElementVNode("div",
|
|
925
|
+
createElementVNode("div", _hoisted_5$1, toDisplayString(rowData[col.name]), 1)
|
|
919
926
|
], true)
|
|
920
927
|
], true)
|
|
921
928
|
]),
|
|
@@ -926,7 +933,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
926
933
|
]);
|
|
927
934
|
}), 128))
|
|
928
935
|
], true),
|
|
929
|
-
_ctx.virtualizer.paddingBottom > 0 ? (openBlock(), createElementBlock("tr",
|
|
936
|
+
_ctx.virtualizer.paddingBottom > 0 ? (openBlock(), createElementBlock("tr", _hoisted_6$1, [
|
|
930
937
|
createElementVNode("td", {
|
|
931
938
|
style: normalizeStyle({ height: `${_ctx.virtualizer.paddingBottom}px` })
|
|
932
939
|
}, null, 4)
|
|
@@ -937,7 +944,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
937
944
|
};
|
|
938
945
|
}
|
|
939
946
|
});
|
|
940
|
-
const pTable = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
947
|
+
const pTable = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-8af637b9"]]);
|
|
941
948
|
const _imports_0 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1019_75838)'%3e%3cpath%20d='M11.6533%203.37331L8.47329%200.18664C8.41131%200.124154%208.33758%200.074558%208.25634%200.0407122C8.1751%200.00686641%208.08796%20-0.0105591%207.99995%20-0.0105591C7.91194%20-0.0105591%207.82481%200.00686641%207.74357%200.0407122C7.66233%200.074558%207.58859%200.124154%207.52662%200.18664L4.34662%203.37331C4.253%203.46615%204.18902%203.58468%204.16277%203.71388C4.13651%203.84309%204.14916%203.97719%204.19911%204.09921C4.24906%204.22123%204.33407%204.3257%204.44339%204.39941C4.55271%204.47312%204.68144%204.51275%204.81329%204.51331H6.81329C6.83571%204.51054%206.85846%204.51235%206.88016%204.51865C6.90186%204.52494%206.92205%204.53559%206.93951%204.54993C6.95697%204.56427%206.97133%204.58201%206.98172%204.60207C6.99211%204.62214%206.99832%204.6441%206.99995%204.66664V14.9933C6.99995%2015.2585%207.10531%2015.5129%207.29285%2015.7004C7.48038%2015.888%207.73474%2015.9933%207.99995%2015.9933C8.26517%2015.9933%208.51952%2015.888%208.70706%2015.7004C8.8946%2015.5129%208.99995%2015.2585%208.99995%2014.9933V4.66664C8.99995%204.62244%209.01751%204.58004%209.04877%204.54879C9.08002%204.51753%209.12242%204.49997%209.16662%204.49997H11.1666C11.2985%204.49942%2011.4272%204.45978%2011.5365%204.38608C11.6458%204.31237%2011.7308%204.2079%2011.7808%204.08587C11.8307%203.96385%2011.8434%203.82976%2011.8171%203.70055C11.7909%203.57134%2011.7269%203.45282%2011.6333%203.35997L11.6533%203.37331Z'%20fill='%23424E6E'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1019_75838'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
|
|
942
949
|
const _imports_1 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1019_80096)'%3e%3cpath%20d='M11.6533%203.37331L8.47329%200.18664C8.41131%200.124154%208.33758%200.074558%208.25634%200.0407122C8.1751%200.00686641%208.08796%20-0.0105591%207.99995%20-0.0105591C7.91194%20-0.0105591%207.82481%200.00686641%207.74357%200.0407122C7.66233%200.074558%207.58859%200.124154%207.52662%200.18664L4.34662%203.37331C4.253%203.46615%204.18902%203.58468%204.16277%203.71388C4.13651%203.84309%204.14916%203.97719%204.19911%204.09921C4.24906%204.22123%204.33407%204.3257%204.44339%204.39941C4.55271%204.47312%204.68144%204.51275%204.81329%204.51331H6.81329C6.83571%204.51054%206.85846%204.51235%206.88016%204.51865C6.90186%204.52494%206.92205%204.53559%206.93951%204.54993C6.95697%204.56427%206.97133%204.58201%206.98172%204.60207C6.99211%204.62214%206.99832%204.6441%206.99995%204.66664V14.9933C6.99995%2015.2585%207.10531%2015.5129%207.29285%2015.7004C7.48038%2015.888%207.73474%2015.9933%207.99995%2015.9933C8.26517%2015.9933%208.51952%2015.888%208.70706%2015.7004C8.8946%2015.5129%208.99995%2015.2585%208.99995%2014.9933V4.66664C8.99995%204.62244%209.01751%204.58004%209.04877%204.54879C9.08002%204.51753%209.12242%204.49997%209.16662%204.49997H11.1666C11.2985%204.49942%2011.4272%204.45978%2011.5365%204.38608C11.6458%204.31237%2011.7308%204.2079%2011.7808%204.08587C11.8307%203.96385%2011.8434%203.82976%2011.8171%203.70055C11.7909%203.57134%2011.7269%203.45282%2011.6333%203.35997L11.6533%203.37331Z'%20fill='%23323CEB'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1019_80096'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
|
|
943
950
|
const _imports_2 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1019_75842)'%3e%3cpath%20d='M11.8%2011.8933C11.75%2011.7716%2011.665%2011.6674%2011.5559%2011.5938C11.4467%2011.5203%2011.3183%2011.4807%2011.1866%2011.48H9.18664C9.16473%2011.4828%209.14248%2011.4812%209.12119%2011.4753C9.0999%2011.4694%209.07999%2011.4594%209.06262%2011.4457C9.04525%2011.4321%209.03077%2011.4151%209.02001%2011.3958C9.00926%2011.3765%209.00245%2011.3553%208.99997%2011.3333V1C8.99997%200.734784%208.89462%200.48043%208.70708%200.292893C8.51954%200.105357%208.26519%200%207.99997%200C7.73476%200%207.4804%200.105357%207.29287%200.292893C7.10533%200.48043%206.99997%200.734784%206.99997%201V11.3333C6.99997%2011.3775%206.98241%2011.4199%206.95116%2011.4512C6.9199%2011.4824%206.87751%2011.5%206.83331%2011.5H4.83331C4.70146%2011.5006%204.57273%2011.5402%204.46341%2011.6139C4.35409%2011.6876%204.26908%2011.7921%204.21913%2011.9141C4.16918%2012.0361%204.15653%2012.1702%204.18279%2012.2994C4.20904%2012.4286%204.27302%2012.5472%204.36664%2012.64L7.54664%2015.8267C7.60861%2015.8892%207.68235%2015.9387%207.76359%2015.9726C7.84483%2016.0064%207.93196%2016.0239%208.01997%2016.0239C8.10798%2016.0239%208.19512%2016.0064%208.27636%2015.9726C8.3576%2015.9387%208.43133%2015.8892%208.49331%2015.8267L11.6733%2012.64C11.7677%2012.5431%2011.8303%2012.4198%2011.853%2012.2864C11.8756%2012.153%2011.8571%2012.0159%2011.8%2011.8933Z'%20fill='%23424E6E'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1019_75842'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
|
|
@@ -1070,12 +1077,12 @@ export {
|
|
|
1070
1077
|
P_ICON_ALIASES,
|
|
1071
1078
|
S as SIZES,
|
|
1072
1079
|
SORTING_TYPES,
|
|
1073
|
-
|
|
1074
|
-
|
|
1080
|
+
i as cn,
|
|
1081
|
+
u as cnBase,
|
|
1075
1082
|
colsInjectionKey,
|
|
1076
1083
|
createPagingRange,
|
|
1077
|
-
|
|
1078
|
-
|
|
1084
|
+
C as createTV,
|
|
1085
|
+
Q as defaultConfig,
|
|
1079
1086
|
getNextActiveElement,
|
|
1080
1087
|
isColsResizableInjectionKey,
|
|
1081
1088
|
isElement,
|
|
@@ -1089,12 +1096,11 @@ export {
|
|
|
1089
1096
|
squirrelTailwindConfig,
|
|
1090
1097
|
toNumberOrNull,
|
|
1091
1098
|
toString,
|
|
1092
|
-
|
|
1099
|
+
T as tv,
|
|
1093
1100
|
useInputClasses,
|
|
1094
1101
|
usePLoading,
|
|
1095
1102
|
usePModal,
|
|
1096
1103
|
usePTableColResize,
|
|
1097
1104
|
usePTableRowVirtualizer,
|
|
1098
|
-
useSelectList
|
|
1099
|
-
x as voidEmpty
|
|
1105
|
+
useSelectList
|
|
1100
1106
|
};
|
package/dist/es/inputClasses.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const inputClasses =
|
|
1
|
+
import { T } from "./chunks/index.js";
|
|
2
|
+
const inputClasses = T({
|
|
3
3
|
slots: {
|
|
4
4
|
input: "w-full rounded border-0 bg-surface text-night ring-1 ring-inset ring-p-gray-30 placeholder:text-p-gray-40 hover:ring-primary focus:outline-none focus:ring-2 focus:ring-primary disabled:cursor-default disabled:bg-p-blue-10 disabled:ring-p-gray-30 disabled:hover:ring-p-gray-30",
|
|
5
5
|
label: "mb-1 block font-medium",
|
|
@@ -90,7 +90,7 @@ const inputClasses = ce({
|
|
|
90
90
|
size: "md"
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
|
-
const textareaClasses =
|
|
93
|
+
const textareaClasses = T({
|
|
94
94
|
extend: inputClasses,
|
|
95
95
|
slots: {
|
|
96
96
|
input: "resize-y overflow-auto"
|
|
@@ -109,7 +109,7 @@ const textareaClasses = ce({
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
});
|
|
112
|
-
const selectClasses =
|
|
112
|
+
const selectClasses = T({
|
|
113
113
|
extend: inputClasses,
|
|
114
114
|
slots: {
|
|
115
115
|
input: "squirrel-bg-chevron-down appearance-none truncate bg-no-repeat"
|
package/dist/es/p-icon.js
CHANGED
|
@@ -34,7 +34,8 @@ const P_ICON_ALIASES = {
|
|
|
34
34
|
upload: "tdesign:upload",
|
|
35
35
|
info: "streamline:information-circle",
|
|
36
36
|
help: "ph:question",
|
|
37
|
-
search: "streamline:magnifying-glass-solid"
|
|
37
|
+
search: "streamline:magnifying-glass-solid",
|
|
38
|
+
warning: "ri:error-warning-line"
|
|
38
39
|
};
|
|
39
40
|
export {
|
|
40
41
|
P_ICON_ALIASES
|
package/dist/es/p-loading.js
CHANGED
|
@@ -9,7 +9,7 @@ const _hoisted_1$1 = {
|
|
|
9
9
|
viewBox: "0 0 24 24"
|
|
10
10
|
};
|
|
11
11
|
function render(_ctx, _cache) {
|
|
12
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$1, _cache[0] || (_cache[0] = [
|
|
12
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$1, [..._cache[0] || (_cache[0] = [
|
|
13
13
|
createElementVNode("path", {
|
|
14
14
|
fill: "currentColor",
|
|
15
15
|
d: "M12 1a11 11 0 1 0 11 11A11 11 0 0 0 12 1m0 19a8 8 0 1 1 8-8 8 8 0 0 1-8 8",
|
|
@@ -27,7 +27,7 @@ function render(_ctx, _cache) {
|
|
|
27
27
|
values: "0 12 12;360 12 12"
|
|
28
28
|
})
|
|
29
29
|
], -1)
|
|
30
|
-
]));
|
|
30
|
+
])]);
|
|
31
31
|
}
|
|
32
32
|
const PLoadingSpinner = { render };
|
|
33
33
|
const _hoisted_1 = {
|
package/dist/es/p-modal.js
CHANGED
|
@@ -71,7 +71,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
71
71
|
*/
|
|
72
72
|
modalBaseClass: {
|
|
73
73
|
type: [String, Object, Array],
|
|
74
|
-
default: "pm relative flex flex-col rounded-2xl
|
|
74
|
+
default: "pm relative flex flex-col rounded-2xl cursor-default bg-surface shadow-xl"
|
|
75
75
|
},
|
|
76
76
|
/**
|
|
77
77
|
* Additional CSS classes for the modal content.
|
|
@@ -189,7 +189,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
189
189
|
emits: ["before-open", "opening", "opened", "before-close", "closing", "closed", "update:modelValue", "click:overlay"],
|
|
190
190
|
setup(__props, { emit: __emit }) {
|
|
191
191
|
useCssVars((_ctx) => ({
|
|
192
|
-
"
|
|
192
|
+
"a8364442": __props.maxWidth
|
|
193
193
|
}));
|
|
194
194
|
let animatingZIndex = 0;
|
|
195
195
|
const emit = __emit;
|
|
@@ -389,49 +389,51 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
389
389
|
createElementVNode("div", {
|
|
390
390
|
ref: "pm",
|
|
391
391
|
"data-pm-id": id.value,
|
|
392
|
-
class: normalizeClass([__props.modalBaseClass, __props.modalClass]),
|
|
392
|
+
class: normalizeClass([__props.modalBaseClass, __props.modalClass, { "pb-6": !_ctx.$slots["modal-wrapper"] }]),
|
|
393
393
|
style: normalizeStyle(__props.modalStyle)
|
|
394
394
|
}, [
|
|
395
|
-
renderSlot(_ctx.$slots, "
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
395
|
+
renderSlot(_ctx.$slots, "modal-wrapper", {}, () => [
|
|
396
|
+
renderSlot(_ctx.$slots, "title-wrapper", {}, () => [
|
|
397
|
+
createElementVNode("div", _hoisted_4, [
|
|
398
|
+
__props.title ? (openBlock(), createElementBlock("h3", {
|
|
399
|
+
key: 0,
|
|
400
|
+
id: `${id.value}-title`,
|
|
401
|
+
class: "mr-auto pt-4 text-xl font-semibold"
|
|
402
|
+
}, toDisplayString(__props.title), 9, _hoisted_5)) : createCommentVNode("", true),
|
|
403
|
+
createElementVNode("div", _hoisted_6, [
|
|
404
|
+
createVNode(PCloseBtn, {
|
|
405
|
+
disabled: __props.disabled,
|
|
406
|
+
class: normalizeClass({ invisible: !__props.enableClose }),
|
|
407
|
+
"aria-label": __props.closeLabel,
|
|
408
|
+
onClick: withModifiers(close, ["prevent"])
|
|
409
|
+
}, null, 8, ["disabled", "class", "aria-label"])
|
|
410
|
+
])
|
|
409
411
|
])
|
|
410
|
-
])
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
],
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
]
|
|
412
|
+
], true),
|
|
413
|
+
__props.errorMsg ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
414
|
+
createVNode(_sfc_main$1, { type: "error" }, {
|
|
415
|
+
default: withCtx(() => [
|
|
416
|
+
createTextVNode(toDisplayString(__props.errorMsg), 1)
|
|
417
|
+
]),
|
|
418
|
+
_: 1
|
|
419
|
+
})
|
|
420
|
+
])) : createCommentVNode("", true),
|
|
421
|
+
renderSlot(_ctx.$slots, "content-wrapper", {}, () => [
|
|
422
|
+
createElementVNode("div", {
|
|
423
|
+
id: `${id.value}-content`,
|
|
424
|
+
class: normalizeClass([
|
|
425
|
+
"relative grow overflow-y-auto overflow-x-hidden px-8",
|
|
426
|
+
{ "pointer-events-none opacity-50": __props.disabled }
|
|
427
|
+
])
|
|
428
|
+
}, [
|
|
429
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
430
|
+
], 10, _hoisted_8)
|
|
431
|
+
], true),
|
|
432
|
+
renderSlot(_ctx.$slots, "footer-wrapper", {}, () => [
|
|
433
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_9, [
|
|
434
|
+
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
435
|
+
])) : createCommentVNode("", true)
|
|
436
|
+
], true)
|
|
435
437
|
], true)
|
|
436
438
|
], 14, _hoisted_3)
|
|
437
439
|
], 46, _hoisted_2), [
|
|
@@ -444,7 +446,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
444
446
|
};
|
|
445
447
|
}
|
|
446
448
|
});
|
|
447
|
-
const pModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
449
|
+
const pModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5c370dbc"]]);
|
|
448
450
|
export {
|
|
449
451
|
pModal as default
|
|
450
452
|
};
|
|
@@ -2,7 +2,7 @@ import { _ as _sfc_main$1 } from "./chunks/p-info-icon.js";
|
|
|
2
2
|
import PTableFilterIcon from "./p-table-filter-icon.js";
|
|
3
3
|
import { defineComponent, resolveComponent, createElementBlock, openBlock, createElementVNode, createCommentVNode, createVNode, normalizeStyle, normalizeClass, toDisplayString, createBlock } from "vue";
|
|
4
4
|
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
5
|
-
const DEFAULT_CLASSES = `text-xs leading-5 font-semibold
|
|
5
|
+
const DEFAULT_CLASSES = `text-xs leading-5 font-semibold line-clamp-2 break-words hyphens-auto whitespace-normal max-h-10 shrink`;
|
|
6
6
|
const _sfc_main = defineComponent({
|
|
7
7
|
name: "PTableHeaderCell",
|
|
8
8
|
components: {
|
|
@@ -97,7 +97,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
97
97
|
createElementVNode("div", {
|
|
98
98
|
class: normalizeClass([_ctx.DEFAULT_CLASSES, _ctx.textClass, _ctx.textColorClass, { "mr-auto": !_ctx.tooltipText }]),
|
|
99
99
|
style: normalizeStyle(_ctx.style),
|
|
100
|
-
title: _ctx.text
|
|
100
|
+
title: _ctx.text,
|
|
101
|
+
"data-p-table-header-text": ""
|
|
101
102
|
}, toDisplayString(_ctx.text), 15, _hoisted_2),
|
|
102
103
|
_ctx.tooltipText ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
103
104
|
_ctx.tooltipText ? (openBlock(), createBlock(_component_PInfoIcon, {
|
package/dist/es/p-table.js
CHANGED
|
@@ -3,7 +3,9 @@ const isFirstColFixedInjectionKey = Symbol("isFirstColFixed");
|
|
|
3
3
|
const isLastColFixedInjectionKey = Symbol("isLastColFixed");
|
|
4
4
|
const isColsResizableInjectionKey = Symbol("isColsResizable");
|
|
5
5
|
const MIN_WIDTH_COL_RESIZE = 80;
|
|
6
|
+
const HEADER_CELL_ONE_LINE_HEIGHT = 20;
|
|
6
7
|
export {
|
|
8
|
+
HEADER_CELL_ONE_LINE_HEIGHT,
|
|
7
9
|
MIN_WIDTH_COL_RESIZE,
|
|
8
10
|
colsInjectionKey,
|
|
9
11
|
isColsResizableInjectionKey,
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { HEADER_CELL_ONE_LINE_HEIGHT } from "./p-table.js";
|
|
2
|
+
import { ref, onMounted, onBeforeUnmount } from "vue";
|
|
3
|
+
const usePTableHeaderWrap = (theadRef) => {
|
|
4
|
+
let headerObserver = null;
|
|
5
|
+
const hasWrap = ref(false);
|
|
6
|
+
const setupObserver = () => {
|
|
7
|
+
if (!theadRef.value) return;
|
|
8
|
+
headerObserver = new ResizeObserver(() => {
|
|
9
|
+
if (theadRef.value) {
|
|
10
|
+
const textDivs = theadRef.value.querySelectorAll("[data-p-table-header-text]");
|
|
11
|
+
for (const div of textDivs) {
|
|
12
|
+
if (div.offsetHeight > HEADER_CELL_ONE_LINE_HEIGHT) {
|
|
13
|
+
hasWrap.value = true;
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
hasWrap.value = false;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
headerObserver.observe(theadRef.value);
|
|
21
|
+
};
|
|
22
|
+
const cleanupObserver = () => {
|
|
23
|
+
if (headerObserver) {
|
|
24
|
+
headerObserver.disconnect();
|
|
25
|
+
headerObserver = null;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
onMounted(() => {
|
|
29
|
+
setupObserver();
|
|
30
|
+
});
|
|
31
|
+
onBeforeUnmount(() => {
|
|
32
|
+
cleanupObserver();
|
|
33
|
+
});
|
|
34
|
+
return { hasWrap };
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
usePTableHeaderWrap
|
|
38
|
+
};
|
|
@@ -16,7 +16,7 @@ type Props = {
|
|
|
16
16
|
*/
|
|
17
17
|
actions: PActionBarAction[];
|
|
18
18
|
};
|
|
19
|
-
declare const _default: import("vue").DefineComponent<Props,
|
|
19
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
20
|
"click:dismiss": () => any;
|
|
21
21
|
"click:action": (name: string | undefined) => any;
|
|
22
22
|
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
@@ -26,7 +26,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<import("vu
|
|
|
26
26
|
default: string;
|
|
27
27
|
validator(value: keyof typeof ALERT_TYPES): boolean;
|
|
28
28
|
};
|
|
29
|
-
}>,
|
|
29
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
30
|
/**
|
|
31
31
|
* The type of the alert which determines its appearance and icon
|
|
32
32
|
*/
|
|
@@ -36,7 +36,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<import("vu
|
|
|
36
36
|
validator(value: keyof typeof ALERT_TYPES): boolean;
|
|
37
37
|
};
|
|
38
38
|
}>> & Readonly<{}>, {
|
|
39
|
-
type: "info" | "
|
|
39
|
+
type: "info" | "warning" | "error" | "success";
|
|
40
40
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
41
41
|
/**
|
|
42
42
|
* Custom icon slot - use this to override the default alert type icon.
|
|
@@ -42,7 +42,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
42
42
|
type: StringConstructor;
|
|
43
43
|
default: string;
|
|
44
44
|
};
|
|
45
|
-
}>,
|
|
45
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
46
46
|
/**
|
|
47
47
|
* The shape of the avatar
|
|
48
48
|
*/
|
|
@@ -282,7 +282,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<import("vu
|
|
|
282
282
|
type: PropType<Icon>;
|
|
283
283
|
default: string;
|
|
284
284
|
};
|
|
285
|
-
}>,
|
|
285
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
286
286
|
/**
|
|
287
287
|
* The button style e.g primary, secondary, primary-outline, secondary-outline, error, success, primary-link
|
|
288
288
|
*/
|
|
@@ -344,14 +344,14 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<import("vu
|
|
|
344
344
|
default: string;
|
|
345
345
|
};
|
|
346
346
|
}>> & Readonly<{}>, {
|
|
347
|
-
icon: "delete" | "edit" | "send" | "settings" | "empty" | "chevron-left" | "chevron-right" | "chevron-up" | "chevron-down" | "ok-circle" | "cancel-circle" | "ok" | "cancel" | "ok-bold" | "cancel-bold" | "archive" | "lock" | "drag-horizontal" | "email" | "location" | "calendar" | "save" | "copy" | "plus" | "add" | "more" | "filters" | "bar-chart" | "list" | "formula" | "refresh" | "download" | "upload" | "info" | "help" | "search" | (string & {});
|
|
347
|
+
icon: "delete" | "edit" | "send" | "settings" | "empty" | "chevron-left" | "chevron-right" | "chevron-up" | "chevron-down" | "ok-circle" | "cancel-circle" | "ok" | "cancel" | "ok-bold" | "cancel-bold" | "archive" | "lock" | "drag-horizontal" | "email" | "location" | "calendar" | "save" | "copy" | "plus" | "add" | "more" | "filters" | "bar-chart" | "list" | "formula" | "refresh" | "download" | "upload" | "info" | "help" | "search" | "warning" | (string & {});
|
|
348
348
|
size: "sm" | "md" | "lg";
|
|
349
349
|
type: ButtonType;
|
|
350
350
|
nativeType: "button" | "submit" | "reset";
|
|
351
351
|
loading: boolean;
|
|
352
352
|
selected: boolean;
|
|
353
353
|
to: string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric;
|
|
354
|
-
iconRight: "delete" | "edit" | "send" | "settings" | "empty" | "chevron-left" | "chevron-right" | "chevron-up" | "chevron-down" | "ok-circle" | "cancel-circle" | "ok" | "cancel" | "ok-bold" | "cancel-bold" | "archive" | "lock" | "drag-horizontal" | "email" | "location" | "calendar" | "save" | "copy" | "plus" | "add" | "more" | "filters" | "bar-chart" | "list" | "formula" | "refresh" | "download" | "upload" | "info" | "help" | "search" | (string & {});
|
|
354
|
+
iconRight: "delete" | "edit" | "send" | "settings" | "empty" | "chevron-left" | "chevron-right" | "chevron-up" | "chevron-down" | "ok-circle" | "cancel-circle" | "ok" | "cancel" | "ok-bold" | "cancel-bold" | "archive" | "lock" | "drag-horizontal" | "email" | "location" | "calendar" | "save" | "copy" | "plus" | "add" | "more" | "filters" | "bar-chart" | "list" | "formula" | "refresh" | "download" | "upload" | "info" | "help" | "search" | "warning" | (string & {});
|
|
355
355
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
356
356
|
/**
|
|
357
357
|
* Default slot - the content of the button.
|