@pequity/squirrel 5.4.1 → 5.4.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/dist/cjs/chunks/p-action-bar.js +10 -11
- package/dist/cjs/chunks/p-date-picker.js +108 -0
- package/dist/cjs/chunks/p-dropdown-select.js +7 -8
- package/dist/cjs/chunks/p-inline-date-picker.js +112 -0
- package/dist/cjs/chunks/p-input-percent.js +3 -5
- package/dist/cjs/chunks/p-pagination-info.js +1 -1
- package/dist/cjs/chunks/p-pagination.js +12 -16
- package/dist/cjs/index.js +55 -53
- package/dist/cjs/p-btn.js +8 -5
- package/dist/cjs/p-chips.js +3 -5
- package/dist/cjs/p-date-picker.js +2 -138
- package/dist/cjs/p-info-icon.js +1 -3
- package/dist/cjs/p-inline-date-picker.js +2 -143
- package/dist/cjs/p-table-td.js +3 -5
- package/dist/es/chunks/p-action-bar.js +10 -11
- package/dist/es/chunks/p-date-picker.js +109 -0
- package/dist/es/chunks/p-dropdown-select.js +7 -8
- package/dist/es/chunks/p-inline-date-picker.js +113 -0
- package/dist/es/chunks/p-input-percent.js +3 -5
- package/dist/es/chunks/p-pagination-info.js +1 -1
- package/dist/es/chunks/p-pagination.js +12 -16
- package/dist/es/index.js +104 -102
- package/dist/es/p-btn.js +8 -5
- package/dist/es/p-chips.js +4 -6
- package/dist/es/p-date-picker.js +2 -138
- package/dist/es/p-info-icon.js +2 -4
- package/dist/es/p-inline-date-picker.js +2 -143
- package/dist/es/p-table-td.js +4 -6
- package/dist/squirrel/components/p-action-bar/p-action-bar.vue.d.ts +5 -14
- package/dist/squirrel/components/p-alert/p-alert.vue.d.ts +4 -4
- package/dist/squirrel/components/p-avatar/p-avatar.vue.d.ts +5 -5
- package/dist/squirrel/components/p-btn/p-btn.vue.d.ts +40 -5
- package/dist/squirrel/components/p-card/p-card.vue.d.ts +4 -4
- package/dist/squirrel/components/p-checkbox/p-checkbox.vue.d.ts +5 -5
- package/dist/squirrel/components/p-chips/p-chips.vue.d.ts +5 -5
- package/dist/squirrel/components/p-close-btn/p-close-btn.vue.d.ts +4 -4
- package/dist/squirrel/components/p-date-picker/p-date-picker.vue.d.ts +35 -128
- package/dist/squirrel/components/p-drawer/p-drawer.vue.d.ts +37 -5
- package/dist/squirrel/components/p-dropdown/p-dropdown.vue.d.ts +5 -5
- package/dist/squirrel/components/p-dropdown-select/p-dropdown-select.vue.d.ts +128 -29
- package/dist/squirrel/components/p-file-upload/p-file-upload.vue.d.ts +5 -5
- package/dist/squirrel/components/p-icon/p-icon.vue.d.ts +1 -10
- package/dist/squirrel/components/p-info-icon/p-info-icon.vue.d.ts +2 -23
- package/dist/squirrel/components/p-input/p-input.vue.d.ts +9 -9
- package/dist/squirrel/components/p-input-number/p-input-number.vue.d.ts +40 -10
- package/dist/squirrel/components/p-input-percent/p-input-percent.vue.d.ts +5 -5
- package/dist/squirrel/components/p-input-search/p-input-search.vue.d.ts +121 -5
- package/dist/squirrel/components/p-link/p-link.vue.d.ts +1 -10
- 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 -5
- package/dist/squirrel/components/p-pagination/p-pagination.vue.d.ts +5 -5
- package/dist/squirrel/components/p-pagination-info/p-pagination-info.vue.d.ts +4 -4
- package/dist/squirrel/components/p-progress-bar/p-progress-bar.vue.d.ts +3 -3
- package/dist/squirrel/components/p-ring-loader/p-ring-loader.vue.d.ts +4 -4
- package/dist/squirrel/components/p-select/p-select.vue.d.ts +5 -5
- package/dist/squirrel/components/p-select-btn/p-select-btn.vue.d.ts +4 -45
- package/dist/squirrel/components/p-select-list/p-select-list.vue.d.ts +143 -29
- package/dist/squirrel/components/p-select-list/useSelectList.d.ts +4 -4
- package/dist/squirrel/components/p-select-pill/p-select-pill.vue.d.ts +5 -5
- package/dist/squirrel/components/p-skeleton-loader/p-skeleton-loader.vue.d.ts +4 -4
- package/dist/squirrel/components/p-table/p-table.vue.d.ts +10 -47
- package/dist/squirrel/components/p-table/usePTableColResize.d.ts +4 -4
- package/dist/squirrel/components/p-table/usePTableRowVirtualizer.d.ts +10 -4
- package/dist/squirrel/components/p-table-header-cell/p-table-filter-icon.vue.d.ts +4 -4
- package/dist/squirrel/components/p-table-header-cell/p-table-header-cell.vue.d.ts +48 -5
- package/dist/squirrel/components/p-table-loader/p-table-loader.vue.d.ts +4 -4
- package/dist/squirrel/components/p-table-sort/p-table-sort.vue.d.ts +5 -5
- package/dist/squirrel/components/p-table-td/p-table-td.vue.d.ts +2 -25
- package/dist/squirrel/components/p-tabs/p-tabs.vue.d.ts +5 -5
- package/dist/squirrel/components/p-textarea/p-textarea.vue.d.ts +9 -9
- package/dist/squirrel/components/p-toggle/p-toggle.vue.d.ts +9 -9
- package/dist/squirrel/composables/useInputClasses.d.ts +1 -1
- package/dist/squirrel/utils/inputClassesMixin.d.ts +4 -4
- package/package.json +25 -25
- package/squirrel/components/p-btn/p-btn.spec.js +33 -4
- package/squirrel/components/p-btn/p-btn.vue +5 -2
- package/squirrel/components/p-date-picker/p-date-picker.vue +79 -86
- package/squirrel/components/p-inline-date-picker/p-inline-date-picker.spec.js +12 -14
- package/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue +87 -99
- package/squirrel/components/p-select-list/p-select-list.spec.js +26 -0
- package/squirrel/components/p-select-list/p-select-list.vue +8 -1
- package/dist/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue.d.ts +0 -154
package/dist/cjs/index.js
CHANGED
|
@@ -9,7 +9,7 @@ const pCard_vue_vue_type_script_setup_true_lang = require("./chunks/p-card.js");
|
|
|
9
9
|
const pCheckbox = require("./p-checkbox.js");
|
|
10
10
|
const pChips = require("./p-chips.js");
|
|
11
11
|
const pCloseBtn = require("./p-close-btn.js");
|
|
12
|
-
const
|
|
12
|
+
const pDatePicker_vue_vue_type_script_setup_true_lang = require("./chunks/p-date-picker.js");
|
|
13
13
|
const pDrawer = require("./p-drawer.js");
|
|
14
14
|
const pDropdown = require("./p-dropdown.js");
|
|
15
15
|
const pDropdownSelect_vue_vue_type_script_setup_true_lang = require("./chunks/p-dropdown-select.js");
|
|
@@ -21,7 +21,7 @@ const vueToastification = require("vue-toastification");
|
|
|
21
21
|
const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
|
|
22
22
|
const pTableFilterIcon = require("./p-table-filter-icon.js");
|
|
23
23
|
const pInfoIcon = require("./p-info-icon.js");
|
|
24
|
-
const
|
|
24
|
+
const pInlineDatePicker_vue_vue_type_script_setup_true_lang = require("./chunks/p-inline-date-picker.js");
|
|
25
25
|
const pInput = require("./p-input.js");
|
|
26
26
|
const pInputNumber = require("./p-input-number.js");
|
|
27
27
|
const pInputPercent_vue_vue_type_script_setup_true_lang = require("./chunks/p-input-percent.js");
|
|
@@ -66,7 +66,6 @@ const listKeyboardNavigation = require("./listKeyboardNavigation.js");
|
|
|
66
66
|
const number = require("./number.js");
|
|
67
67
|
const _imports_0$1 = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.8335%206.25016L10.0002%202.0835L14.1668%206.25016'%20stroke='%23767189'%20stroke-width='1.25'%20/%3e%3cpath%20d='M10%202.0835V13.7502'%20stroke='%23767189'%20stroke-width='1.25'%20/%3e%3cpath%20d='M2.91675%2015V18.3333H17.0834V15'%20stroke='%23767189'%20stroke-width='1.25'%20/%3e%3c/svg%3e";
|
|
68
68
|
const _imports_1$1 = "data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M33%2012H14V44H42V21L33%2012Z'%20stroke='%231A123B'%20stroke-width='3'%20/%3e%3cpath%20d='M9%2036H6V4H25L28%207'%20stroke='%231A123B'%20stroke-width='3'%20/%3e%3cpath%20d='M37%2030H19M28%2021V39'%20stroke='%231A123B'%20stroke-width='3'%20/%3e%3c/svg%3e";
|
|
69
|
-
const _withScopeId = (n) => (vue.pushScopeId("data-v-d07a8f64"), n = n(), vue.popScopeId(), n);
|
|
70
69
|
const _hoisted_1$3 = ["data-has-error"];
|
|
71
70
|
const _hoisted_2$3 = {
|
|
72
71
|
key: 0,
|
|
@@ -76,26 +75,18 @@ const _hoisted_3$3 = {
|
|
|
76
75
|
key: 0,
|
|
77
76
|
class: "flex flex-col items-center"
|
|
78
77
|
};
|
|
79
|
-
const _hoisted_4$3 =
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}, null, -1));
|
|
83
|
-
const _hoisted_5$3 = { class: "mt-2 text-p-gray-50" };
|
|
84
|
-
const _hoisted_6$3 = { class: "text-p-blue-60" };
|
|
85
|
-
const _hoisted_7$2 = {
|
|
78
|
+
const _hoisted_4$3 = { class: "mt-2 text-p-gray-50" };
|
|
79
|
+
const _hoisted_5$3 = { class: "text-p-blue-60" };
|
|
80
|
+
const _hoisted_6$3 = {
|
|
86
81
|
key: 1,
|
|
87
82
|
class: "flex flex-col items-center"
|
|
88
83
|
};
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
const
|
|
94
|
-
const
|
|
95
|
-
const _hoisted_11 = { class: "max-h-48 overflow-y-auto overflow-x-hidden" };
|
|
96
|
-
const _hoisted_12 = ["title"];
|
|
97
|
-
const _hoisted_13 = ["onClick"];
|
|
98
|
-
const _hoisted_14 = { class: "mt-1 text-xs text-p-gray-40" };
|
|
84
|
+
const _hoisted_7 = { class: "mt-2 text-p-purple-60" };
|
|
85
|
+
const _hoisted_8 = ["accept", "multiple", "disabled"];
|
|
86
|
+
const _hoisted_9 = { class: "max-h-48 overflow-y-auto overflow-x-hidden" };
|
|
87
|
+
const _hoisted_10 = ["title"];
|
|
88
|
+
const _hoisted_11 = ["onClick"];
|
|
89
|
+
const _hoisted_12 = { class: "mt-1 text-xs text-p-gray-40" };
|
|
99
90
|
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
100
91
|
...{
|
|
101
92
|
name: "PFileUpload"
|
|
@@ -266,14 +257,20 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
266
257
|
}, [
|
|
267
258
|
!maxFilesReached.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$3, [
|
|
268
259
|
!isDraggingOver.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$3, [
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
260
|
+
_cache[4] || (_cache[4] = vue.createElementVNode("img", {
|
|
261
|
+
src: _imports_0$1,
|
|
262
|
+
class: "h-8 w-8"
|
|
263
|
+
}, null, -1)),
|
|
264
|
+
vue.createElementVNode("div", _hoisted_4$3, [
|
|
265
|
+
_cache[3] || (_cache[3] = vue.createTextVNode(" Drag or ")),
|
|
266
|
+
vue.createElementVNode("span", _hoisted_5$3, "select " + vue.toDisplayString(fileWord.value), 1)
|
|
273
267
|
])
|
|
274
|
-
])) : (vue.openBlock(), vue.createElementBlock("div",
|
|
275
|
-
|
|
276
|
-
|
|
268
|
+
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$3, [
|
|
269
|
+
_cache[5] || (_cache[5] = vue.createElementVNode("img", {
|
|
270
|
+
src: _imports_1$1,
|
|
271
|
+
class: "h-8 w-8"
|
|
272
|
+
}, null, -1)),
|
|
273
|
+
vue.createElementVNode("div", _hoisted_7, "Drop " + vue.toDisplayString(fileWord.value), 1)
|
|
277
274
|
])),
|
|
278
275
|
vue.createElementVNode("input", {
|
|
279
276
|
ref_key: "fileInputRef",
|
|
@@ -286,9 +283,9 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
286
283
|
disabled: __props.disabled,
|
|
287
284
|
"aria-hidden": "true",
|
|
288
285
|
onChange: changeFieldValue
|
|
289
|
-
}, null, 40,
|
|
286
|
+
}, null, 40, _hoisted_8)
|
|
290
287
|
])) : vue.createCommentVNode("", true),
|
|
291
|
-
vue.createElementVNode("div",
|
|
288
|
+
vue.createElementVNode("div", _hoisted_9, [
|
|
292
289
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(files.value, (file, index) => {
|
|
293
290
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
294
291
|
key: index,
|
|
@@ -303,11 +300,11 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
303
300
|
vue.createElementVNode("div", {
|
|
304
301
|
class: "truncate",
|
|
305
302
|
title: file.name
|
|
306
|
-
}, vue.toDisplayString(file.name), 9,
|
|
303
|
+
}, vue.toDisplayString(file.name), 9, _hoisted_10),
|
|
307
304
|
vue.createElementVNode("button", {
|
|
308
305
|
class: "bg-file-upload-x-icon h-4 w-4 shrink-0 cursor-pointer",
|
|
309
306
|
onClick: vue.withModifiers(($event) => removeFile(index), ["stop"])
|
|
310
|
-
}, null, 8,
|
|
307
|
+
}, null, 8, _hoisted_11)
|
|
311
308
|
], 2);
|
|
312
309
|
}), 128))
|
|
313
310
|
])
|
|
@@ -317,7 +314,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
317
314
|
}, vue.toDisplayString(__props.errorMsg), 3), [
|
|
318
315
|
[vue.vShow, __props.errorMsg]
|
|
319
316
|
]),
|
|
320
|
-
vue.createElementVNode("div",
|
|
317
|
+
vue.createElementVNode("div", _hoisted_12, vue.toDisplayString(__props.multiple ? `Max ${__props.maxNumberOfFiles}` : "One") + " " + vue.toDisplayString(acceptFileTypes.value) + " " + vue.toDisplayString(__props.multiple ? "files" : "file") + " with size less than " + vue.toDisplayString(vue.unref(pFileUpload$1.formatBytes)(__props.maxSizeInBytes)) + " " + vue.toDisplayString(__props.multiple ? "each" : ""), 1)
|
|
321
318
|
], 10, _hoisted_1$3);
|
|
322
319
|
};
|
|
323
320
|
}
|
|
@@ -326,10 +323,9 @@ const pFileUpload = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_mai
|
|
|
326
323
|
const _hoisted_1$2 = ["data-has-error"];
|
|
327
324
|
const _hoisted_2$2 = { class: "text-p-purple-60" };
|
|
328
325
|
const _hoisted_3$2 = { class: "flex flex-row" };
|
|
329
|
-
const _hoisted_4$2 =
|
|
330
|
-
const _hoisted_5$2 = ["
|
|
331
|
-
const _hoisted_6$2 =
|
|
332
|
-
const _hoisted_7$1 = {
|
|
326
|
+
const _hoisted_4$2 = ["onClick"];
|
|
327
|
+
const _hoisted_5$2 = ["title"];
|
|
328
|
+
const _hoisted_6$2 = {
|
|
333
329
|
key: 0,
|
|
334
330
|
class: "ml-auto fill-p-purple-60 pl-2",
|
|
335
331
|
src: pDropdownSelect_vue_vue_type_script_setup_true_lang._imports_0
|
|
@@ -449,6 +445,13 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
449
445
|
closePopperOnSelect: {
|
|
450
446
|
type: Boolean,
|
|
451
447
|
default: true
|
|
448
|
+
},
|
|
449
|
+
/**
|
|
450
|
+
* Focus the search input on mount
|
|
451
|
+
*/
|
|
452
|
+
focusSearchOnMount: {
|
|
453
|
+
type: Boolean,
|
|
454
|
+
default: true
|
|
452
455
|
}
|
|
453
456
|
},
|
|
454
457
|
emits: ["update:modelValue", "select"],
|
|
@@ -491,7 +494,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
491
494
|
scrollerStyle.value = { maxHeight: `${computedItemSize.value * props.itemsVisible - actionsContainerHeight}px` };
|
|
492
495
|
putSelectedItemsOnTop();
|
|
493
496
|
if (props.searchable) {
|
|
494
|
-
(_b = inputSearch.value) == null ? void 0 : _b.$el.querySelector("input").focus();
|
|
497
|
+
props.focusSearchOnMount && ((_b = inputSearch.value) == null ? void 0 : _b.$el.querySelector("input").focus());
|
|
495
498
|
} else {
|
|
496
499
|
setupNavigationSvc();
|
|
497
500
|
}
|
|
@@ -541,7 +544,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
541
544
|
onClick: _cache[1] || (_cache[1] = //@ts-ignore
|
|
542
545
|
(...args) => vue.unref(selectAll) && vue.unref(selectAll)(...args))
|
|
543
546
|
}, " Select all filtered ", 2)),
|
|
544
|
-
|
|
547
|
+
_cache[6] || (_cache[6] = vue.createElementVNode("span", { class: "px-1 leading-none" }, ".", -1)),
|
|
545
548
|
vue.createElementVNode("a", {
|
|
546
549
|
class: vue.normalizeClass([vue.unref(selectedItems).length ? "cursor-pointer" : "pointer-events-none opacity-50"]),
|
|
547
550
|
onClick: _cache[2] || (_cache[2] = //@ts-ignore
|
|
@@ -611,11 +614,11 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
611
614
|
class: vue.normalizeClass({ "bg-p-blue-20": index === 1 })
|
|
612
615
|
}, vue.toDisplayString(str), 3);
|
|
613
616
|
}), 128))
|
|
614
|
-
], 8,
|
|
617
|
+
], 8, _hoisted_5$2)
|
|
615
618
|
]),
|
|
616
|
-
vue.unref(isSelected)(vue.unref(getValue)(row.index)) ? (vue.openBlock(), vue.createElementBlock("img",
|
|
619
|
+
vue.unref(isSelected)(vue.unref(getValue)(row.index)) ? (vue.openBlock(), vue.createElementBlock("img", _hoisted_6$2)) : vue.createCommentVNode("", true)
|
|
617
620
|
], 2)
|
|
618
|
-
], 14,
|
|
621
|
+
], 14, _hoisted_4$2)), [
|
|
619
622
|
[_directive_close_popper, __props.closePopperOnSelect && !__props.multiple]
|
|
620
623
|
])
|
|
621
624
|
], 4);
|
|
@@ -878,28 +881,27 @@ const _imports_1 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewB
|
|
|
878
881
|
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";
|
|
879
882
|
const _imports_3 = "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_80100)'%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='%23323CEB'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1019_80100'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
|
|
880
883
|
const _hoisted_1 = { class: "flex items-center justify-between" };
|
|
881
|
-
const _hoisted_2 =
|
|
882
|
-
const _hoisted_3 = {
|
|
883
|
-
const _hoisted_4 = {
|
|
884
|
+
const _hoisted_2 = { class: "mt-2" };
|
|
885
|
+
const _hoisted_3 = {
|
|
884
886
|
key: 0,
|
|
885
887
|
src: _imports_0
|
|
886
888
|
};
|
|
887
|
-
const
|
|
889
|
+
const _hoisted_4 = {
|
|
888
890
|
key: 1,
|
|
889
891
|
src: _imports_1
|
|
890
892
|
};
|
|
891
|
-
const
|
|
893
|
+
const _hoisted_5 = {
|
|
892
894
|
key: 0,
|
|
893
895
|
src: _imports_2
|
|
894
896
|
};
|
|
895
|
-
const
|
|
897
|
+
const _hoisted_6 = {
|
|
896
898
|
key: 1,
|
|
897
899
|
src: _imports_3
|
|
898
900
|
};
|
|
899
901
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
900
902
|
return vue.openBlock(), vue.createElementBlock("div", null, [
|
|
901
903
|
vue.createElementVNode("div", _hoisted_1, [
|
|
902
|
-
|
|
904
|
+
_cache[3] || (_cache[3] = vue.createElementVNode("div", { class: "px-4 text-xs font-semibold text-p-gray-40" }, "SORT", -1)),
|
|
903
905
|
vue.createElementVNode("div", {
|
|
904
906
|
class: vue.normalizeClass([
|
|
905
907
|
"px-4 text-xs font-semibold text-primary",
|
|
@@ -908,7 +910,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
908
910
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", _ctx.SORTING_TYPES.NO_SORTING))
|
|
909
911
|
}, " Clear ", 2)
|
|
910
912
|
]),
|
|
911
|
-
vue.createElementVNode("div",
|
|
913
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
912
914
|
vue.createElementVNode("div", {
|
|
913
915
|
class: "flex cursor-pointer items-center justify-between px-4 py-1 hover:bg-p-blue-10",
|
|
914
916
|
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:modelValue", _ctx.SORTING_TYPES.ASC))
|
|
@@ -917,7 +919,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
917
919
|
class: vue.normalizeClass(["text-sm font-semibold text-p-purple-60", { "text-primary": _ctx.modelValue === _ctx.SORTING_TYPES.ASC }])
|
|
918
920
|
}, " Sort ascending ", 2),
|
|
919
921
|
vue.createElementVNode("div", null, [
|
|
920
|
-
_ctx.modelValue === _ctx.SORTING_TYPES.NO_SORTING || _ctx.modelValue === _ctx.SORTING_TYPES.DESC ? (vue.openBlock(), vue.createElementBlock("img",
|
|
922
|
+
_ctx.modelValue === _ctx.SORTING_TYPES.NO_SORTING || _ctx.modelValue === _ctx.SORTING_TYPES.DESC ? (vue.openBlock(), vue.createElementBlock("img", _hoisted_3)) : (vue.openBlock(), vue.createElementBlock("img", _hoisted_4))
|
|
921
923
|
])
|
|
922
924
|
]),
|
|
923
925
|
vue.createElementVNode("div", {
|
|
@@ -928,7 +930,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
928
930
|
class: vue.normalizeClass(["text-sm font-semibold text-p-purple-60", { "text-primary": _ctx.modelValue === _ctx.SORTING_TYPES.DESC }])
|
|
929
931
|
}, " Sort descending ", 2),
|
|
930
932
|
vue.createElementVNode("div", null, [
|
|
931
|
-
_ctx.modelValue === _ctx.SORTING_TYPES.NO_SORTING || _ctx.modelValue === _ctx.SORTING_TYPES.ASC ? (vue.openBlock(), vue.createElementBlock("img",
|
|
933
|
+
_ctx.modelValue === _ctx.SORTING_TYPES.NO_SORTING || _ctx.modelValue === _ctx.SORTING_TYPES.ASC ? (vue.openBlock(), vue.createElementBlock("img", _hoisted_5)) : (vue.openBlock(), vue.createElementBlock("img", _hoisted_6))
|
|
932
934
|
])
|
|
933
935
|
])
|
|
934
936
|
])
|
|
@@ -945,14 +947,14 @@ exports.PCard = pCard_vue_vue_type_script_setup_true_lang._sfc_main;
|
|
|
945
947
|
exports.PCheckbox = pCheckbox;
|
|
946
948
|
exports.PChips = pChips;
|
|
947
949
|
exports.PCloseBtn = pCloseBtn;
|
|
948
|
-
exports.PDatePicker =
|
|
950
|
+
exports.PDatePicker = pDatePicker_vue_vue_type_script_setup_true_lang._sfc_main;
|
|
949
951
|
exports.PDrawer = pDrawer;
|
|
950
952
|
exports.PDropdown = pDropdown;
|
|
951
953
|
exports.PDropdownSelect = pDropdownSelect_vue_vue_type_script_setup_true_lang._sfc_main;
|
|
952
954
|
exports.useInputClasses = useInputClasses.useInputClasses;
|
|
953
955
|
exports.PFilterIcon = pTableFilterIcon;
|
|
954
956
|
exports.PInfoIcon = pInfoIcon;
|
|
955
|
-
exports.PInlineDatePicker =
|
|
957
|
+
exports.PInlineDatePicker = pInlineDatePicker_vue_vue_type_script_setup_true_lang._sfc_main;
|
|
956
958
|
exports.PInput = pInput;
|
|
957
959
|
exports.PInputNumber = pInputNumber;
|
|
958
960
|
exports.PInputPercent = pInputPercent_vue_vue_type_script_setup_true_lang._sfc_main;
|
package/dist/cjs/p-btn.js
CHANGED
|
@@ -19,7 +19,7 @@ const BUTTON_TYPES = {
|
|
|
19
19
|
SECONDARY_GHOST_DARK: "secondary-ghost-dark"
|
|
20
20
|
};
|
|
21
21
|
const BUTTON_NATIVE_TYPES = ["button", "submit", "reset"];
|
|
22
|
-
const DEFAULT_CLASSES = `relative inline-block outline-none disabled:opacity-50 disabled:cursor-default disabled:pointer-events-none`;
|
|
22
|
+
const DEFAULT_CLASSES = `relative inline-block outline-none disabled:opacity-50 disabled:cursor-default disabled:pointer-events-none aria-disabled:opacity-50 aria-disabled:cursor-default aria-disabled:pointer-events-none`;
|
|
23
23
|
const BUTTON_CLASSES = {
|
|
24
24
|
[BUTTON_TYPES.PRIMARY]: "text-surface bg-primary hover:bg-accent active:bg-p-blue-80",
|
|
25
25
|
[BUTTON_TYPES.SECONDARY]: "bg-p-gray-20 hover:bg-p-gray-30 active:bg-p-gray-40",
|
|
@@ -137,13 +137,15 @@ const _sfc_main = vue.defineComponent({
|
|
|
137
137
|
sanitizeUrl: sanitization.sanitizeUrl
|
|
138
138
|
}
|
|
139
139
|
});
|
|
140
|
-
const _hoisted_1 = ["href"];
|
|
140
|
+
const _hoisted_1 = ["href", "disabled", "aria-disabled"];
|
|
141
141
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
142
142
|
const _component_PRingLoader = vue.resolveComponent("PRingLoader");
|
|
143
143
|
return typeof _ctx.to === "string" && _ctx.isExternalLink(_ctx.to) ? (vue.openBlock(), vue.createElementBlock("a", vue.mergeProps({ key: 0 }, _ctx.$attrs, {
|
|
144
144
|
href: _ctx.sanitizeUrl(_ctx.to),
|
|
145
145
|
target: "_blank",
|
|
146
|
-
class: _ctx.classes
|
|
146
|
+
class: _ctx.classes,
|
|
147
|
+
disabled: !!_ctx.$attrs.disabled ? true : null,
|
|
148
|
+
"aria-disabled": !!_ctx.$attrs.disabled
|
|
147
149
|
}), [
|
|
148
150
|
vue.renderSlot(_ctx.$slots, "default")
|
|
149
151
|
], 16, _hoisted_1)) : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.to ? "RouterLink" : "button"), vue.mergeProps({
|
|
@@ -153,7 +155,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
153
155
|
"aria-selected": _ctx.selected,
|
|
154
156
|
class: _ctx.classes
|
|
155
157
|
}, _ctx.$attrs, {
|
|
156
|
-
disabled: _ctx.$attrs.disabled || _ctx.loading
|
|
158
|
+
disabled: !!_ctx.$attrs.disabled || _ctx.loading ? true : null,
|
|
159
|
+
"aria-disabled": _ctx.$attrs.disabled
|
|
157
160
|
}), {
|
|
158
161
|
default: vue.withCtx(() => [
|
|
159
162
|
vue.createElementVNode("div", {
|
|
@@ -170,7 +173,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
170
173
|
}, null, 8, ["style", "color", "size"])) : vue.createCommentVNode("", true)
|
|
171
174
|
]),
|
|
172
175
|
_: 3
|
|
173
|
-
}, 16, ["type", "to", "aria-selected", "class", "disabled"]));
|
|
176
|
+
}, 16, ["type", "to", "aria-selected", "class", "disabled", "aria-disabled"]));
|
|
174
177
|
}
|
|
175
178
|
const PBtn = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
176
179
|
module.exports = PBtn;
|
package/dist/cjs/p-chips.js
CHANGED
|
@@ -64,7 +64,6 @@ const _sfc_main = vue.defineComponent({
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
|
-
const _withScopeId = (n) => (vue.pushScopeId("data-v-cb511035"), n = n(), vue.popScopeId(), n);
|
|
68
67
|
const _hoisted_1 = {
|
|
69
68
|
ref: "filterChipsRow",
|
|
70
69
|
class: "flex w-full items-center"
|
|
@@ -76,8 +75,7 @@ const _hoisted_3 = {
|
|
|
76
75
|
};
|
|
77
76
|
const _hoisted_4 = ["onClick"];
|
|
78
77
|
const _hoisted_5 = { class: "inline-block truncate" };
|
|
79
|
-
const _hoisted_6 =
|
|
80
|
-
const _hoisted_7 = { ref: "afterSlotContainer" };
|
|
78
|
+
const _hoisted_6 = { ref: "afterSlotContainer" };
|
|
81
79
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
82
80
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
83
81
|
vue.createElementVNode("div", _hoisted_2, [
|
|
@@ -91,7 +89,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
91
89
|
onClick: ($event) => _ctx.$emit("click:chip", item)
|
|
92
90
|
}, [
|
|
93
91
|
vue.createElementVNode("div", _hoisted_5, vue.toDisplayString(_ctx.getItemText(item)), 1),
|
|
94
|
-
|
|
92
|
+
_cache[1] || (_cache[1] = vue.createElementVNode("i", { class: "bg-cross ml-2 inline-block h-1.5 w-1.5" }, null, -1))
|
|
95
93
|
], 8, _hoisted_4);
|
|
96
94
|
}), 128)),
|
|
97
95
|
vue.withDirectives(vue.createElementVNode("div", {
|
|
@@ -101,7 +99,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
101
99
|
[vue.vShow, _ctx.items.length > _ctx.maxChipsDisplayed]
|
|
102
100
|
])
|
|
103
101
|
], 512),
|
|
104
|
-
vue.createElementVNode("div",
|
|
102
|
+
vue.createElementVNode("div", _hoisted_6, [
|
|
105
103
|
vue.renderSlot(_ctx.$slots, "after", {}, void 0, true)
|
|
106
104
|
], 512)
|
|
107
105
|
], 512);
|
|
@@ -1,139 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
const vCalendar = require("v-calendar");
|
|
5
|
-
const vue = require("vue");
|
|
6
|
-
const lodashEs = require("lodash-es");
|
|
7
|
-
const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
|
|
8
|
-
const selectAttribute = { highlight: { class: "bg-primary", contentClass: "text-white" } };
|
|
9
|
-
const DEFAULT_MASKS = {
|
|
10
|
-
// The mask for the input
|
|
11
|
-
input: "DD-MMM-YYYY",
|
|
12
|
-
// The mask for the model value
|
|
13
|
-
data: "YYYY-MM-DD"
|
|
14
|
-
};
|
|
15
|
-
const _sfc_main = vue.defineComponent({
|
|
16
|
-
name: "PDatePicker",
|
|
17
|
-
components: {
|
|
18
|
-
DatePicker: vCalendar.DatePicker
|
|
19
|
-
},
|
|
20
|
-
mixins: [inputClassesMixin],
|
|
21
|
-
inheritAttrs: false,
|
|
22
|
-
props: {
|
|
23
|
-
modelValue: {
|
|
24
|
-
type: String,
|
|
25
|
-
default: ""
|
|
26
|
-
},
|
|
27
|
-
label: {
|
|
28
|
-
type: String,
|
|
29
|
-
default: ""
|
|
30
|
-
},
|
|
31
|
-
errorMsg: {
|
|
32
|
-
type: String,
|
|
33
|
-
default: ""
|
|
34
|
-
},
|
|
35
|
-
required: {
|
|
36
|
-
type: Boolean,
|
|
37
|
-
default: false
|
|
38
|
-
},
|
|
39
|
-
minDate: {
|
|
40
|
-
type: Date,
|
|
41
|
-
default: null
|
|
42
|
-
},
|
|
43
|
-
maxDate: {
|
|
44
|
-
type: Date,
|
|
45
|
-
default: null
|
|
46
|
-
},
|
|
47
|
-
timezone: {
|
|
48
|
-
type: String,
|
|
49
|
-
default: ""
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
emits: ["update:modelValue"],
|
|
53
|
-
data() {
|
|
54
|
-
return {
|
|
55
|
-
// innerValue is a Date object
|
|
56
|
-
innerValue: null,
|
|
57
|
-
stopWatch: false,
|
|
58
|
-
selectAttribute
|
|
59
|
-
};
|
|
60
|
-
},
|
|
61
|
-
computed: {
|
|
62
|
-
displayPlaceholder() {
|
|
63
|
-
return lodashEs.isString(this.$attrs.placeholder) ? this.$attrs.placeholder : this.masks.input;
|
|
64
|
-
},
|
|
65
|
-
masks() {
|
|
66
|
-
return Object.assign(DEFAULT_MASKS, this.$attrs.masks);
|
|
67
|
-
},
|
|
68
|
-
attrs() {
|
|
69
|
-
const { class: classes, style, ...rest } = this.$attrs;
|
|
70
|
-
return rest;
|
|
71
|
-
},
|
|
72
|
-
style() {
|
|
73
|
-
return this.$attrs.style;
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
watch: {
|
|
77
|
-
modelValue: {
|
|
78
|
-
handler(nV) {
|
|
79
|
-
if (!this.stopWatch) {
|
|
80
|
-
this.innerValue = nV ? dayjs(nV, this.masks.data).toDate() : null;
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
immediate: true
|
|
84
|
-
},
|
|
85
|
-
innerValue(nV) {
|
|
86
|
-
const toEmit = lodashEs.isDate(nV) && nV.toString() !== "Invalid Date" ? dayjs(nV).format(this.masks.data) : null;
|
|
87
|
-
this.stopWatch = true;
|
|
88
|
-
this.$emit("update:modelValue", toEmit);
|
|
89
|
-
this.$nextTick(() => {
|
|
90
|
-
this.stopWatch = false;
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
const _hoisted_1 = ["data-has-error"];
|
|
96
|
-
const _hoisted_2 = ["value", "placeholder"];
|
|
97
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
98
|
-
const _component_DatePicker = vue.resolveComponent("DatePicker");
|
|
99
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
100
|
-
class: vue.normalizeClass([{ hidden: _ctx.$attrs.hidden }, _ctx.$attrs.class]),
|
|
101
|
-
"data-has-error": !!_ctx.errorMsg,
|
|
102
|
-
style: vue.normalizeStyle(_ctx.style)
|
|
103
|
-
}, [
|
|
104
|
-
vue.renderSlot(_ctx.$slots, "label", {
|
|
105
|
-
label: _ctx.label,
|
|
106
|
-
labelClasses: _ctx.labelClasses
|
|
107
|
-
}, () => [
|
|
108
|
-
_ctx.label ? (vue.openBlock(), vue.createElementBlock("label", {
|
|
109
|
-
key: 0,
|
|
110
|
-
class: vue.normalizeClass(_ctx.labelClasses)
|
|
111
|
-
}, vue.toDisplayString(_ctx.label), 3)) : vue.createCommentVNode("", true)
|
|
112
|
-
]),
|
|
113
|
-
vue.createVNode(_component_DatePicker, {
|
|
114
|
-
modelValue: _ctx.innerValue,
|
|
115
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.innerValue = $event),
|
|
116
|
-
"select-attribute": _ctx.selectAttribute,
|
|
117
|
-
popover: { visibility: "click", placement: "auto" },
|
|
118
|
-
"min-date": _ctx.minDate || null,
|
|
119
|
-
"max-date": _ctx.maxDate || null,
|
|
120
|
-
masks: _ctx.masks,
|
|
121
|
-
timezone: _ctx.timezone
|
|
122
|
-
}, {
|
|
123
|
-
default: vue.withCtx(({ inputValue, inputEvents }) => [
|
|
124
|
-
vue.createElementVNode("input", vue.mergeProps({
|
|
125
|
-
class: [_ctx.inputClasses, { "cursor-pointer": !_ctx.attrs.disabled }],
|
|
126
|
-
value: inputValue
|
|
127
|
-
}, _ctx.attrs, { placeholder: _ctx.displayPlaceholder }, vue.toHandlers(inputEvents, true)), null, 16, _hoisted_2)
|
|
128
|
-
]),
|
|
129
|
-
_: 1
|
|
130
|
-
}, 8, ["modelValue", "select-attribute", "min-date", "max-date", "masks", "timezone"]),
|
|
131
|
-
vue.withDirectives(vue.createElementVNode("div", {
|
|
132
|
-
class: vue.normalizeClass(_ctx.errorMsgClasses)
|
|
133
|
-
}, vue.toDisplayString(_ctx.errorMsg), 3), [
|
|
134
|
-
[vue.vShow, _ctx.errorMsg]
|
|
135
|
-
])
|
|
136
|
-
], 14, _hoisted_1);
|
|
137
|
-
}
|
|
138
|
-
const pDatePicker = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
139
|
-
module.exports = pDatePicker;
|
|
2
|
+
const pDatePicker_vue_vue_type_script_setup_true_lang = require("./chunks/p-date-picker.js");
|
|
3
|
+
module.exports = pDatePicker_vue_vue_type_script_setup_true_lang._sfc_main;
|
package/dist/cjs/p-info-icon.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const vue = require("vue");
|
|
3
3
|
const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
|
|
4
|
-
const _withScopeId = (n) => (vue.pushScopeId("data-v-804e74f5"), n = n(), vue.popScopeId(), n);
|
|
5
|
-
const _hoisted_1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("i", { class: "bg-info-circle-icon block h-3 w-3" }, null, -1));
|
|
6
4
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
7
5
|
...{
|
|
8
6
|
name: "PInfoIcon"
|
|
@@ -25,7 +23,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
25
23
|
], true)
|
|
26
24
|
]),
|
|
27
25
|
default: vue.withCtx(() => [
|
|
28
|
-
|
|
26
|
+
_cache[0] || (_cache[0] = vue.createElementVNode("i", { class: "bg-info-circle-icon block h-3 w-3" }, null, -1))
|
|
29
27
|
]),
|
|
30
28
|
_: 3
|
|
31
29
|
}, 8, ["disabled"]);
|
|
@@ -1,144 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
const vCalendar = require("v-calendar");
|
|
5
|
-
const vue = require("vue");
|
|
6
|
-
const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
|
|
7
|
-
const selectAttribute = {
|
|
8
|
-
highlight: { class: "bg-primary", contentClass: "text-white" }
|
|
9
|
-
};
|
|
10
|
-
const DEFAULT_MASKS = {
|
|
11
|
-
// The mask for the input
|
|
12
|
-
input: "DD-MMM-YYYY",
|
|
13
|
-
// The mask for the model value
|
|
14
|
-
data: "YYYY-MM-DD"
|
|
15
|
-
};
|
|
16
|
-
const _sfc_main = vue.defineComponent({
|
|
17
|
-
name: "PInlineDatePicker",
|
|
18
|
-
components: {
|
|
19
|
-
DatePicker: vCalendar.DatePicker
|
|
20
|
-
},
|
|
21
|
-
mixins: [inputClassesMixin],
|
|
22
|
-
inheritAttrs: false,
|
|
23
|
-
props: {
|
|
24
|
-
modelValue: {
|
|
25
|
-
type: String,
|
|
26
|
-
default: ""
|
|
27
|
-
},
|
|
28
|
-
label: {
|
|
29
|
-
type: String,
|
|
30
|
-
default: ""
|
|
31
|
-
},
|
|
32
|
-
errorMsg: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: ""
|
|
35
|
-
},
|
|
36
|
-
required: {
|
|
37
|
-
type: Boolean,
|
|
38
|
-
default: false
|
|
39
|
-
},
|
|
40
|
-
minDate: {
|
|
41
|
-
type: Date,
|
|
42
|
-
default: null
|
|
43
|
-
},
|
|
44
|
-
maxDate: {
|
|
45
|
-
type: Date,
|
|
46
|
-
default: null
|
|
47
|
-
},
|
|
48
|
-
timezone: {
|
|
49
|
-
type: String,
|
|
50
|
-
default: ""
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
emits: ["update:modelValue"],
|
|
54
|
-
data() {
|
|
55
|
-
return {
|
|
56
|
-
// innerValue is a Date object
|
|
57
|
-
innerValue: null,
|
|
58
|
-
selectAttribute
|
|
59
|
-
};
|
|
60
|
-
},
|
|
61
|
-
computed: {
|
|
62
|
-
masks() {
|
|
63
|
-
return Object.assign(DEFAULT_MASKS, this.$attrs.masks);
|
|
64
|
-
},
|
|
65
|
-
attrs() {
|
|
66
|
-
const { class: classes, style, ...rest } = this.$attrs;
|
|
67
|
-
return rest;
|
|
68
|
-
},
|
|
69
|
-
listeners() {
|
|
70
|
-
return Object.keys(this.$attrs).reduce((acc, curr) => {
|
|
71
|
-
if (curr.startsWith("on")) {
|
|
72
|
-
return { ...acc, [curr]: this.$attrs[curr] };
|
|
73
|
-
} else {
|
|
74
|
-
return acc;
|
|
75
|
-
}
|
|
76
|
-
}, {});
|
|
77
|
-
},
|
|
78
|
-
style() {
|
|
79
|
-
return this.$attrs.style;
|
|
80
|
-
},
|
|
81
|
-
styleDatepicker() {
|
|
82
|
-
return this.errorMsg ? { border: "1px solid var(--color-on-error)" } : {};
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
watch: {
|
|
86
|
-
modelValue: {
|
|
87
|
-
async handler(nV) {
|
|
88
|
-
const date = dayjs(nV, this.masks.data).toDate();
|
|
89
|
-
if (nV && date.toString() === "Invalid Date") {
|
|
90
|
-
this.$emit("update:modelValue", null);
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
this.innerValue = nV ? dayjs(nV, this.masks.data).toDate() : null;
|
|
94
|
-
const datepicker = this.$refs.datepicker;
|
|
95
|
-
if (datepicker && typeof datepicker.move === "function" && this.innerValue) {
|
|
96
|
-
await datepicker.move(this.innerValue);
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
immediate: true
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
methods: {
|
|
103
|
-
dayclick(e) {
|
|
104
|
-
this.$emit("update:modelValue", e.id);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
const _hoisted_1 = ["data-has-error"];
|
|
109
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
110
|
-
const _component_DatePicker = vue.resolveComponent("DatePicker");
|
|
111
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
112
|
-
class: vue.normalizeClass([{ hidden: _ctx.$attrs.hidden }, _ctx.$attrs.class]),
|
|
113
|
-
"data-has-error": !!_ctx.errorMsg,
|
|
114
|
-
style: vue.normalizeStyle(_ctx.style)
|
|
115
|
-
}, [
|
|
116
|
-
vue.renderSlot(_ctx.$slots, "label", {
|
|
117
|
-
label: _ctx.label,
|
|
118
|
-
labelClasses: _ctx.labelClasses
|
|
119
|
-
}, () => [
|
|
120
|
-
_ctx.label ? (vue.openBlock(), vue.createElementBlock("label", {
|
|
121
|
-
key: 0,
|
|
122
|
-
class: vue.normalizeClass(_ctx.labelClasses)
|
|
123
|
-
}, vue.toDisplayString(_ctx.label), 3)) : vue.createCommentVNode("", true)
|
|
124
|
-
]),
|
|
125
|
-
vue.createVNode(_component_DatePicker, vue.mergeProps({
|
|
126
|
-
ref: "datepicker",
|
|
127
|
-
class: { "pointer-events-none opacity-70": _ctx.$attrs.disabled },
|
|
128
|
-
"model-value": _ctx.innerValue,
|
|
129
|
-
"select-attribute": _ctx.selectAttribute,
|
|
130
|
-
"min-date": _ctx.minDate || null,
|
|
131
|
-
"max-date": _ctx.maxDate || null,
|
|
132
|
-
masks: _ctx.masks,
|
|
133
|
-
style: _ctx.styleDatepicker,
|
|
134
|
-
timezone: _ctx.timezone
|
|
135
|
-
}, _ctx.listeners, { onDayclick: _ctx.dayclick }), null, 16, ["class", "model-value", "select-attribute", "min-date", "max-date", "masks", "style", "timezone", "onDayclick"]),
|
|
136
|
-
vue.withDirectives(vue.createElementVNode("div", {
|
|
137
|
-
class: vue.normalizeClass(_ctx.errorMsgClasses)
|
|
138
|
-
}, vue.toDisplayString(_ctx.errorMsg), 3), [
|
|
139
|
-
[vue.vShow, _ctx.errorMsg]
|
|
140
|
-
])
|
|
141
|
-
], 14, _hoisted_1);
|
|
142
|
-
}
|
|
143
|
-
const pInlineDatePicker = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
144
|
-
module.exports = pInlineDatePicker;
|
|
2
|
+
const pInlineDatePicker_vue_vue_type_script_setup_true_lang = require("./chunks/p-inline-date-picker.js");
|
|
3
|
+
module.exports = pInlineDatePicker_vue_vue_type_script_setup_true_lang._sfc_main;
|