@pequity/squirrel 6.0.5 → 6.0.6
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.
|
@@ -11,10 +11,7 @@ const text = require("../text.js");
|
|
|
11
11
|
const lodashEs = require("lodash-es");
|
|
12
12
|
const _imports_0 = "data:image/svg+xml,%3csvg%20width='18'%20height='12'%20viewBox='0%200%2018%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M16.1383%200.166992L6.30411%209.83366L1.69828%205.27533L0.526611%206.46033L5.71578%2011.597C5.87174%2011.7509%206.08205%2011.8372%206.3012%2011.8372C6.52034%2011.8372%206.73065%2011.7509%206.88661%2011.597L17.3033%201.35366L16.1383%200.166992Z'%20fill='%231A123B'%20/%3e%3c/svg%3e";
|
|
13
13
|
const _hoisted_1 = ["data-has-error"];
|
|
14
|
-
const _hoisted_2 = {
|
|
15
|
-
key: 0,
|
|
16
|
-
class: "truncate text-left text-p-gray-40"
|
|
17
|
-
};
|
|
14
|
+
const _hoisted_2 = { class: "truncate text-left text-p-gray-40" };
|
|
18
15
|
const _hoisted_3 = { class: "truncate text-left" };
|
|
19
16
|
const _hoisted_4 = {
|
|
20
17
|
key: 0,
|
|
@@ -415,7 +412,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
415
412
|
"aria-haspopup": "listbox",
|
|
416
413
|
onClick: _cache[1] || (_cache[1] = ($event) => dropdownShow.value = !dropdownShow.value)
|
|
417
414
|
}), [
|
|
418
|
-
!vue.unref(internalValue).length || !vue.unref(selectedItems).length ?
|
|
415
|
+
!vue.unref(internalValue).length || !vue.unref(selectedItems).length ? vue.renderSlot(_ctx.$slots, "placeholder", { key: 0 }, () => [
|
|
416
|
+
vue.createElementVNode("div", _hoisted_2, vue.toDisplayString(__props.placeholder || " "), 1)
|
|
417
|
+
]) : vue.renderSlot(_ctx.$slots, "selected-item", {
|
|
419
418
|
key: 1,
|
|
420
419
|
item: __props.multiple ? vue.unref(selectedItems) : vue.unref(selectedItems)[0]
|
|
421
420
|
}, () => [
|
|
@@ -10,10 +10,7 @@ import { splitStringForHighlight } from "../text.js";
|
|
|
10
10
|
import { omit } from "lodash-es";
|
|
11
11
|
const _imports_0 = "data:image/svg+xml,%3csvg%20width='18'%20height='12'%20viewBox='0%200%2018%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M16.1383%200.166992L6.30411%209.83366L1.69828%205.27533L0.526611%206.46033L5.71578%2011.597C5.87174%2011.7509%206.08205%2011.8372%206.3012%2011.8372C6.52034%2011.8372%206.73065%2011.7509%206.88661%2011.597L17.3033%201.35366L16.1383%200.166992Z'%20fill='%231A123B'%20/%3e%3c/svg%3e";
|
|
12
12
|
const _hoisted_1 = ["data-has-error"];
|
|
13
|
-
const _hoisted_2 = {
|
|
14
|
-
key: 0,
|
|
15
|
-
class: "truncate text-left text-p-gray-40"
|
|
16
|
-
};
|
|
13
|
+
const _hoisted_2 = { class: "truncate text-left text-p-gray-40" };
|
|
17
14
|
const _hoisted_3 = { class: "truncate text-left" };
|
|
18
15
|
const _hoisted_4 = {
|
|
19
16
|
key: 0,
|
|
@@ -414,7 +411,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
414
411
|
"aria-haspopup": "listbox",
|
|
415
412
|
onClick: _cache[1] || (_cache[1] = ($event) => dropdownShow.value = !dropdownShow.value)
|
|
416
413
|
}), [
|
|
417
|
-
!unref(internalValue).length || !unref(selectedItems).length ? (
|
|
414
|
+
!unref(internalValue).length || !unref(selectedItems).length ? renderSlot(_ctx.$slots, "placeholder", { key: 0 }, () => [
|
|
415
|
+
createElementVNode("div", _hoisted_2, toDisplayString(__props.placeholder || " "), 1)
|
|
416
|
+
]) : renderSlot(_ctx.$slots, "selected-item", {
|
|
418
417
|
key: 1,
|
|
419
418
|
item: __props.multiple ? unref(selectedItems) : unref(selectedItems)[0]
|
|
420
419
|
}, () => [
|
|
@@ -8,6 +8,7 @@ declare function __VLS_template(): {
|
|
|
8
8
|
'selected-item'(props: {
|
|
9
9
|
item: any;
|
|
10
10
|
}): unknown;
|
|
11
|
+
placeholder(): unknown;
|
|
11
12
|
'no-items'(): unknown;
|
|
12
13
|
item(props: {
|
|
13
14
|
item: any;
|
|
@@ -18,6 +19,7 @@ declare function __VLS_template(): {
|
|
|
18
19
|
'selected-item'(props: {
|
|
19
20
|
item: any;
|
|
20
21
|
}): unknown;
|
|
22
|
+
placeholder(): unknown;
|
|
21
23
|
'no-items'(): unknown;
|
|
22
24
|
item(props: {
|
|
23
25
|
item: any;
|
package/package.json
CHANGED
|
@@ -24,9 +24,11 @@
|
|
|
24
24
|
aria-haspopup="listbox"
|
|
25
25
|
@click="dropdownShow = !dropdownShow"
|
|
26
26
|
>
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
<slot v-if="!internalValue.length || !selectedItems.length" name="placeholder">
|
|
28
|
+
<div class="truncate text-left text-p-gray-40">
|
|
29
|
+
{{ placeholder || ' ' }}
|
|
30
|
+
</div>
|
|
31
|
+
</slot>
|
|
30
32
|
<slot v-else name="selected-item" :item="multiple ? selectedItems : selectedItems[0]">
|
|
31
33
|
<div class="truncate text-left">
|
|
32
34
|
{{
|
|
@@ -189,6 +191,7 @@ defineOptions({
|
|
|
189
191
|
defineSlots<{
|
|
190
192
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
191
193
|
'selected-item'(props: { item: any }): unknown;
|
|
194
|
+
'placeholder'(): unknown;
|
|
192
195
|
'no-items'(): unknown;
|
|
193
196
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
194
197
|
item(props: { item: any; isItemSelected: boolean; itemTextSplit: string[] }): unknown;
|