@citizenplane/pimp 18.13.0 → 18.13.1
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/components/CpMultiselect.vue.d.ts +9 -9
- package/dist/components/CpMultiselect.vue.d.ts.map +1 -1
- package/dist/pimp.es.js +27 -21
- package/dist/pimp.umd.js +23 -23
- package/package.json +1 -1
- package/src/components/CpMultiselect.vue +11 -0
- package/src/stories/CpMultiselect.stories.ts +1 -5
|
@@ -21,24 +21,24 @@ interface Props {
|
|
|
21
21
|
trackBy?: string;
|
|
22
22
|
withoutTypeahead?: boolean;
|
|
23
23
|
}
|
|
24
|
-
declare var
|
|
24
|
+
declare var __VLS_28: {}, __VLS_31: {
|
|
25
25
|
option: any;
|
|
26
26
|
remove: (event: Event) => void;
|
|
27
|
-
},
|
|
27
|
+
}, __VLS_42: {
|
|
28
28
|
option: any;
|
|
29
|
-
},
|
|
29
|
+
}, __VLS_45: {
|
|
30
30
|
option: any;
|
|
31
|
-
},
|
|
31
|
+
}, __VLS_48: {};
|
|
32
32
|
type __VLS_Slots = {} & {
|
|
33
|
-
empty?: (props: typeof
|
|
33
|
+
empty?: (props: typeof __VLS_28) => any;
|
|
34
34
|
} & {
|
|
35
|
-
tag?: (props: typeof
|
|
35
|
+
tag?: (props: typeof __VLS_31) => any;
|
|
36
36
|
} & {
|
|
37
|
-
'tag-leading-icon'?: (props: typeof
|
|
37
|
+
'tag-leading-icon'?: (props: typeof __VLS_42) => any;
|
|
38
38
|
} & {
|
|
39
|
-
option?: (props: typeof
|
|
39
|
+
option?: (props: typeof __VLS_45) => any;
|
|
40
40
|
} & {
|
|
41
|
-
prefix?: (props: typeof
|
|
41
|
+
prefix?: (props: typeof __VLS_48) => any;
|
|
42
42
|
};
|
|
43
43
|
declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
44
44
|
search: (query: string) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CpMultiselect.vue.d.ts","sourceRoot":"","sources":["../../src/components/CpMultiselect.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CpMultiselect.vue.d.ts","sourceRoot":"","sources":["../../src/components/CpMultiselect.vue"],"names":[],"mappings":"AA+FA;AAsnBA,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,MAAM,GAAG,WAAW,CAAA;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,EAAE,GAAG,IAAI,CAAA;IAClF,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,cAAc,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC,CAAA;IACxD,WAAW,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,OAAO,KAAK,MAAM,CAAC,CAAA;IACpD,OAAO,CAAC,EAAE,OAAO,EAAE,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IAClB,OAAO,CAAC,EAAE,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ACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
package/dist/pimp.es.js
CHANGED
|
@@ -32478,30 +32478,35 @@ var sF = {
|
|
|
32478
32478
|
loader: { class: "cpMultiselect__hidden" }
|
|
32479
32479
|
})), y = M(null), b = M(""), x = i(() => !n.withoutTypeahead), S = i(() => y.value?.overlayVisible), C = i(() => ({ "cpMultiselect__dropdownIcon--isRotated": S.value })), w = i(() => !!a.prefix), E = i(() => !n.multiple && n.isClearable && !dF(g.value)), D = i(() => n.onSearch !== void 0), O = (e) => {
|
|
32480
32480
|
if (D.value) return r("search", e.query);
|
|
32481
|
-
S.value ||
|
|
32482
|
-
}, A = i(() => D.value ? n.options : n.options.filter((e) => (typeof e == "object" && typeof n.optionLabel == "string" ? e[n.optionLabel] : e).toLowerCase().includes(b.value.toLowerCase()))), ee = () => g.value = null, te = () => r("overlayShown"), ne = () => r("overlayHidden"), re = (
|
|
32481
|
+
S.value || ue();
|
|
32482
|
+
}, A = i(() => D.value ? n.options : n.options.filter((e) => (typeof e == "object" && typeof n.optionLabel == "string" ? e[n.optionLabel] : e).toLowerCase().includes(b.value.toLowerCase()))), ee = () => g.value = null, te = () => r("overlayShown"), ne = () => r("overlayHidden"), re = () => {
|
|
32483
|
+
if (n.multiple) {
|
|
32484
|
+
let e = ae();
|
|
32485
|
+
e && (e.value = "");
|
|
32486
|
+
} else y.value?.writeValue(g.value);
|
|
32487
|
+
}, ie = (e) => {
|
|
32483
32488
|
typeof e == "string" && (b.value = e, e === "" && r("search", e));
|
|
32484
|
-
},
|
|
32485
|
-
let e =
|
|
32489
|
+
}, ae = () => y.value && y.value.$el?.querySelector("input") || null, N = () => {
|
|
32490
|
+
let e = ae();
|
|
32486
32491
|
e && e.select();
|
|
32487
|
-
}, N = () => {
|
|
32488
|
-
let e = ie();
|
|
32489
|
-
e && (e.focus(), ae());
|
|
32490
32492
|
}, se = () => {
|
|
32491
|
-
|
|
32493
|
+
let e = ae();
|
|
32494
|
+
e && (e.focus(), N());
|
|
32492
32495
|
}, I = () => {
|
|
32493
|
-
|
|
32496
|
+
ue(), N();
|
|
32494
32497
|
}, ce = () => {
|
|
32495
|
-
|
|
32498
|
+
ue(), se();
|
|
32496
32499
|
}, le = () => {
|
|
32500
|
+
if (!S.value) return ue();
|
|
32501
|
+
}, ue = () => {
|
|
32497
32502
|
S.value ? y.value?.hide() : y.value?.show();
|
|
32498
|
-
},
|
|
32499
|
-
y.value && (y.value.alignOverlay =
|
|
32500
|
-
},
|
|
32503
|
+
}, de = (e) => {}, fe = () => {
|
|
32504
|
+
y.value && (y.value.alignOverlay = me);
|
|
32505
|
+
}, me = () => {
|
|
32501
32506
|
let e = y.value?.$el;
|
|
32502
32507
|
!y.value?.overlay || !e || (y.value.overlay.style.width = `${Li(e)}px`, Fi(y.value.overlay, e));
|
|
32503
32508
|
};
|
|
32504
|
-
return k(() =>
|
|
32509
|
+
return k(() => fe()), (t, n) => {
|
|
32505
32510
|
let r = F("cp-badge"), i = F("cp-loader"), a = F("cp-icon"), b = oe("bind-once");
|
|
32506
32511
|
return j(), c("div", fF, [
|
|
32507
32512
|
e.label ? H((j(), o(Rk, {
|
|
@@ -32521,7 +32526,7 @@ var sF = {
|
|
|
32521
32526
|
ref_key: "multiselect",
|
|
32522
32527
|
ref: y,
|
|
32523
32528
|
modelValue: g.value,
|
|
32524
|
-
"onUpdate:modelValue": [n[0] ||= (e) => g.value = e,
|
|
32529
|
+
"onUpdate:modelValue": [n[0] ||= (e) => g.value = e, de],
|
|
32525
32530
|
"append-to": e.appendTo,
|
|
32526
32531
|
"aria-labelledby": h.value,
|
|
32527
32532
|
"auto-option-focus": "",
|
|
@@ -32539,17 +32544,18 @@ var sF = {
|
|
|
32539
32544
|
pt: v.value,
|
|
32540
32545
|
suggestions: A.value,
|
|
32541
32546
|
typeahead: x.value,
|
|
32542
|
-
|
|
32547
|
+
onBlur: re,
|
|
32548
|
+
onClick: I,
|
|
32543
32549
|
onComplete: O,
|
|
32544
32550
|
onHide: ne,
|
|
32545
32551
|
onKeydown: [
|
|
32546
|
-
xe(
|
|
32547
|
-
xe(
|
|
32548
|
-
xe(
|
|
32552
|
+
xe(le, ["arrow-down"]),
|
|
32553
|
+
xe(le, ["arrow-up"]),
|
|
32554
|
+
xe(ue, ["enter"]),
|
|
32549
32555
|
n[1] ||= xe(Se(() => {}, ["stop"]), ["esc"])
|
|
32550
32556
|
],
|
|
32551
32557
|
onShow: te,
|
|
32552
|
-
onValueChange:
|
|
32558
|
+
onValueChange: ie
|
|
32553
32559
|
}, u({
|
|
32554
32560
|
empty: V(() => [P(t.$slots, "empty", {}, () => [l("div", pF, L(e.emptyMessage), 1)])]),
|
|
32555
32561
|
chip: V(({ value: e, removeCallback: n }) => [P(t.$slots, "tag", {
|
|
@@ -32581,7 +32587,7 @@ var sF = {
|
|
|
32581
32587
|
disabled: e.disabled,
|
|
32582
32588
|
tabindex: "-1",
|
|
32583
32589
|
type: "button",
|
|
32584
|
-
onClick: Se(
|
|
32590
|
+
onClick: Se(ce, ["stop"])
|
|
32585
32591
|
}, [p(a, {
|
|
32586
32592
|
class: T(["cpMultiselect__dropdownIcon", C.value]),
|
|
32587
32593
|
type: "chevron-down"
|