@pequity/squirrel 8.5.2 → 9.0.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 +1 -1
- package/dist/cjs/chunks/p-icon.js +1 -2058
- package/dist/cjs/chunks/p-table-header-cell.js +8 -10
- package/dist/cjs/index.js +7 -2
- package/dist/cjs/number.js +3 -2
- package/dist/es/chunks/p-icon.js +1 -2058
- package/dist/es/chunks/p-table-header-cell.js +9 -11
- package/dist/es/index.js +8 -3
- package/dist/es/number.js +3 -2
- package/dist/squirrel/components/p-table/p-table.vue.d.ts +4 -0
- package/dist/squirrel/components/p-table-header-cell/p-table-header-cell.vue.d.ts +11 -1
- package/dist/squirrel.css +8 -8
- package/package.json +16 -15
- package/squirrel/components/p-table/p-table.spec.js +26 -0
- package/squirrel/components/p-table/p-table.vue +5 -1
- package/squirrel/components/p-table-header-cell/p-table-header-cell.spec.js +17 -3
- package/squirrel/components/p-table-header-cell/p-table-header-cell.stories.js +31 -6
- package/squirrel/components/p-table-header-cell/p-table-header-cell.vue +8 -11
- package/squirrel/utils/number.spec.js +13 -3
- package/squirrel/utils/number.ts +5 -2
|
@@ -2,12 +2,8 @@
|
|
|
2
2
|
const vue = require("vue");
|
|
3
3
|
const pIcon_vue_vue_type_script_setup_true_lang = require("./p-icon.js");
|
|
4
4
|
const pInfoIcon_vue_vue_type_script_setup_true_lang = require("./p-info-icon.js");
|
|
5
|
-
const _hoisted_1 = { class: "flex items-center overflow-hidden" };
|
|
5
|
+
const _hoisted_1 = { class: "flex items-center gap-x-1 overflow-hidden" };
|
|
6
6
|
const _hoisted_2 = ["title"];
|
|
7
|
-
const _hoisted_3 = {
|
|
8
|
-
key: 0,
|
|
9
|
-
class: "relative ml-1 mr-auto h-3 w-3 shrink-0"
|
|
10
|
-
};
|
|
11
7
|
const DEFAULT_CLASSES = `text-xs font-semibold line-clamp-2 break-words hyphens-auto whitespace-normal max-h-10 shrink`;
|
|
12
8
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
13
9
|
...{
|
|
@@ -32,18 +28,20 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
32
28
|
return (_ctx, _cache) => {
|
|
33
29
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
34
30
|
vue.createElementVNode("div", {
|
|
35
|
-
class: vue.normalizeClass([DEFAULT_CLASSES, _ctx.textClass, textColorClass.value
|
|
31
|
+
class: vue.normalizeClass([DEFAULT_CLASSES, _ctx.textClass, textColorClass.value]),
|
|
36
32
|
style: vue.normalizeStyle(style.value),
|
|
37
33
|
title: _ctx.text,
|
|
38
34
|
"data-p-table-header-text": ""
|
|
39
35
|
}, vue.toDisplayString(_ctx.text), 15, _hoisted_2),
|
|
40
|
-
_ctx.tooltipText ? (vue.openBlock(), vue.
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
_ctx.tooltipText ? (vue.openBlock(), vue.createBlock(pInfoIcon_vue_vue_type_script_setup_true_lang._sfc_main, {
|
|
37
|
+
key: 0,
|
|
38
|
+
text: _ctx.tooltipText
|
|
39
|
+
}, null, 8, ["text"])) : vue.createCommentVNode("", true),
|
|
40
|
+
vue.renderSlot(_ctx.$slots, "icon"),
|
|
43
41
|
vue.createVNode(pIcon_vue_vue_type_script_setup_true_lang._sfc_main, {
|
|
44
42
|
icon: _ctx.filterActive ? "ph:funnel-fill" : "si:filter-list-alt-duotone",
|
|
45
43
|
class: vue.normalizeClass([
|
|
46
|
-
"ml-
|
|
44
|
+
"ml-auto cursor-pointer rounded-sm",
|
|
47
45
|
{ hidden: !_ctx.showFilterIcon },
|
|
48
46
|
_ctx.filterActive ? "text-active-blue hover:bg-p-blue-10 hover:text-p-blue-60 hover:ring-1 hover:ring-p-blue-10" : "text-p-gray-60 hover:bg-p-gray-10 hover:text-night hover:ring-1 hover:ring-p-gray-10"
|
|
49
47
|
]),
|
package/dist/cjs/index.js
CHANGED
|
@@ -881,7 +881,12 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
881
881
|
"text-color": headerCellTextColor(col)
|
|
882
882
|
}, { ref_for: true }, col.headerCellAttrs, {
|
|
883
883
|
onClickFilterIcon: ($event) => _ctx.$emit("click-filter-icon", $event, col)
|
|
884
|
-
}),
|
|
884
|
+
}), {
|
|
885
|
+
icon: vue.withCtx(() => [
|
|
886
|
+
vue.renderSlot(_ctx.$slots, `header-cell-icon-${vue.unref(lodashEs.kebabCase)(col.name)}`, { col }, void 0, true)
|
|
887
|
+
]),
|
|
888
|
+
_: 2
|
|
889
|
+
}, 1040, ["text", "filter-active", "show-filter-icon", "tooltip-text", "class", "text-color", "onClickFilterIcon"])
|
|
885
890
|
], 2),
|
|
886
891
|
_ctx.colsResizable && i !== 0 && !(i === _ctx.cols.length - 1 && _ctx.isLastColFixed) ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
887
892
|
key: 0,
|
|
@@ -947,7 +952,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
947
952
|
};
|
|
948
953
|
}
|
|
949
954
|
});
|
|
950
|
-
const pTable = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
955
|
+
const pTable = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main$1, [["__scopeId", "data-v-9bbf6a22"]]);
|
|
951
956
|
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";
|
|
952
957
|
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";
|
|
953
958
|
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";
|
package/dist/cjs/number.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const toNumberOrNull = (val) => {
|
|
4
|
-
if (val === "" || val === null
|
|
4
|
+
if (val === "" || val === null) {
|
|
5
5
|
return null;
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
const num = Number(val);
|
|
8
|
+
return isFinite(num) ? num : null;
|
|
8
9
|
};
|
|
9
10
|
exports.toNumberOrNull = toNumberOrNull;
|