@razaman2/reactive-view 0.1.0-beta.9 → 0.2.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/LICENSE +21 -21
- package/README.md +1 -1
- package/dist/Editor-BX8prqWt.mjs +364 -0
- package/dist/Editor-DKILsiST.js +1 -0
- package/dist/Label-B63BpiJm.mjs +49 -0
- package/dist/Label-ClklvtMk.js +1 -0
- package/dist/ReactiveView.d.mts +20 -0
- package/dist/ReactiveView.d.ts +20 -0
- package/dist/Select-CSA5Sk_b.mjs +238 -0
- package/dist/Select-CqG647qR.js +1 -0
- package/dist/Subscription.d.mts +17 -0
- package/dist/Subscription.d.ts +17 -0
- package/dist/Subscriptions.d.mts +5 -0
- package/dist/Subscriptions.d.ts +5 -0
- package/dist/Types.d.mts +28 -0
- package/dist/Types.d.ts +28 -0
- package/dist/components/Button.vue.d.mts +3 -0
- package/dist/components/Button.vue.d.ts +3 -0
- package/dist/components/ConfirmationModal.vue.d.mts +3 -0
- package/dist/components/ConfirmationModal.vue.d.ts +3 -0
- package/dist/components/CustomAlert.vue.d.mts +69 -0
- package/dist/components/CustomAlert.vue.d.ts +69 -0
- package/dist/components/CustomButton.vue.d.mts +3 -0
- package/dist/components/CustomButton.vue.d.ts +3 -0
- package/dist/components/CustomModal.vue.d.mts +3 -0
- package/dist/components/CustomModal.vue.d.ts +3 -0
- package/dist/components/CustomTable.vue.d.mts +3 -0
- package/dist/components/CustomTable.vue.d.ts +3 -0
- package/dist/components/CustomTableRow.vue.d.mts +3 -0
- package/dist/components/CustomTableRow.vue.d.ts +3 -0
- package/dist/components/Datetime.vue.d.mts +3 -0
- package/dist/components/Datetime.vue.d.ts +3 -0
- package/dist/components/DraggableList.vue.d.mts +3 -0
- package/dist/components/DraggableList.vue.d.ts +3 -0
- package/dist/components/Editor.vue.d.mts +3 -0
- package/dist/components/Editor.vue.d.ts +3 -0
- package/dist/components/Input.vue.d.mts +3 -0
- package/dist/components/Input.vue.d.ts +3 -0
- package/dist/components/ItemsList.vue.d.mts +3 -0
- package/dist/components/ItemsList.vue.d.ts +3 -0
- package/dist/components/Label.vue.d.mts +3 -0
- package/dist/components/Label.vue.d.ts +3 -0
- package/dist/components/ListPagination.vue.d.mts +3 -0
- package/dist/components/ListPagination.vue.d.ts +3 -0
- package/dist/components/Popover.vue.d.mts +3 -0
- package/dist/components/Popover.vue.d.ts +3 -0
- package/dist/components/Select.vue.d.mts +3 -0
- package/dist/components/Select.vue.d.ts +3 -0
- package/dist/components/drag.d.mts +1 -0
- package/dist/components/drag.d.ts +1 -0
- package/dist/components/index.d.mts +17 -0
- package/dist/components/index.d.ts +17 -0
- package/dist/components/masks.d.mts +22 -0
- package/dist/components/masks.d.ts +22 -0
- package/dist/components.js +1 -0
- package/dist/components.mjs +1660 -0
- package/dist/index.d.mts +42 -121
- package/dist/index.d.ts +42 -121
- package/dist/index.js +1 -963
- package/dist/index.mjs +2 -916
- package/dist/reactive-view.css +2 -0
- package/dist/rolldown-runtime-C-QNzSnW.mjs +11 -0
- package/dist/src-CB2Ym95H.js +1 -0
- package/dist/src-DgPt5VTg.mjs +523 -0
- package/package.json +126 -48
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-C-QNzSnW.mjs";
|
|
2
|
+
import { a as t, d as n, i as r, n as i, p as a, s as o, t as s } from "./src-DgPt5VTg.mjs";
|
|
3
|
+
import { t as c } from "./Label-B63BpiJm.mjs";
|
|
4
|
+
import { computed as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, isVNode as m, markRaw as h, mergeProps as g, onBeforeUnmount as _, openBlock as v, reactive as y, ref as b, unref as x, watch as S } from "vue";
|
|
5
|
+
import { twMerge as C } from "tailwind-merge";
|
|
6
|
+
import { MultiSelect as w, Select as T } from "primevue";
|
|
7
|
+
import { v4 as E } from "uuid";
|
|
8
|
+
//#region ~icons/mdi/check
|
|
9
|
+
var D = {
|
|
10
|
+
viewBox: "0 0 24 24",
|
|
11
|
+
width: "1.2em",
|
|
12
|
+
height: "1.2em"
|
|
13
|
+
};
|
|
14
|
+
function O(e, t) {
|
|
15
|
+
return v(), u("svg", D, [...t[0] ||= [d("path", {
|
|
16
|
+
fill: "currentColor",
|
|
17
|
+
d: "M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59z"
|
|
18
|
+
}, null, -1)]]);
|
|
19
|
+
}
|
|
20
|
+
var k = h({
|
|
21
|
+
name: "mdi-check",
|
|
22
|
+
render: O
|
|
23
|
+
});
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/components/Select.vue?vue&type=script&lang.jsx
|
|
26
|
+
function A(e) {
|
|
27
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !m(e);
|
|
28
|
+
}
|
|
29
|
+
var j = o({
|
|
30
|
+
modelName: "Select",
|
|
31
|
+
props: {
|
|
32
|
+
data: {},
|
|
33
|
+
defaultData: i(),
|
|
34
|
+
onShow: i({ type: Function }),
|
|
35
|
+
onFilter: i({ type: Function }),
|
|
36
|
+
multiple: i({ type: Boolean }),
|
|
37
|
+
filled: i({ type: Boolean }),
|
|
38
|
+
sorted: i({
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !0
|
|
41
|
+
}),
|
|
42
|
+
debounce: i({
|
|
43
|
+
type: [Number, String],
|
|
44
|
+
default: 200,
|
|
45
|
+
validator: (e) => /^\d+$/.test(e)
|
|
46
|
+
}),
|
|
47
|
+
placeholder: i({
|
|
48
|
+
type: [
|
|
49
|
+
Boolean,
|
|
50
|
+
Number,
|
|
51
|
+
String
|
|
52
|
+
],
|
|
53
|
+
default: "None"
|
|
54
|
+
}),
|
|
55
|
+
dropdown: i({
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: !0
|
|
58
|
+
}),
|
|
59
|
+
type: i({
|
|
60
|
+
type: String,
|
|
61
|
+
default: "select"
|
|
62
|
+
}),
|
|
63
|
+
options: i({
|
|
64
|
+
type: Array,
|
|
65
|
+
default: []
|
|
66
|
+
}),
|
|
67
|
+
optionLabel: i({ type: [
|
|
68
|
+
Function,
|
|
69
|
+
Number,
|
|
70
|
+
String
|
|
71
|
+
] }),
|
|
72
|
+
optionValue: i({ type: [
|
|
73
|
+
Function,
|
|
74
|
+
Number,
|
|
75
|
+
String
|
|
76
|
+
] }),
|
|
77
|
+
optionProperty: i({ type: [
|
|
78
|
+
Function,
|
|
79
|
+
Number,
|
|
80
|
+
String
|
|
81
|
+
] }),
|
|
82
|
+
filterInputClass: i(),
|
|
83
|
+
inputClass: i(),
|
|
84
|
+
class: i()
|
|
85
|
+
},
|
|
86
|
+
data: (e) => {
|
|
87
|
+
let n = x(e.data);
|
|
88
|
+
return t(n === void 0 ? x(e.defaultData) ?? (x(e.multiple) ? [] : {}) : n);
|
|
89
|
+
},
|
|
90
|
+
defaultData: (e) => x(e.defaultData) ?? (x(e.multiple) ? [] : {}),
|
|
91
|
+
setup(e, t, i) {
|
|
92
|
+
let o = `component_${E()}`, u = b(), d = b(), m = b([]), h = y({ status: !1 }), v = l(() => x(i.placeholder) === !1 || ["number", "string"].includes(typeof x(i.placeholder)) ? x(i.placeholder) : ["number", "string"].includes(typeof x(i.$attrs.label)) ? x(i.$attrs.label) : void 0), D = l(() => x(i.multiple) ? w : T), O = (t) => (x(m) ?? []).find((n) => r(e).getValue(n) === r(e).getValue(t)), j = l(() => {
|
|
93
|
+
try {
|
|
94
|
+
if (x(i.sorted) === !1) return x(m);
|
|
95
|
+
let t = r(e).model.getData();
|
|
96
|
+
if (!t || Array.isArray(t) && t.length === 0) return x(m);
|
|
97
|
+
let n = new Set((Array.isArray(t) ? t : [t]).map((t) => {
|
|
98
|
+
let n = O(t);
|
|
99
|
+
return n ? r(e).getValue(n) : r(e).getValue(t);
|
|
100
|
+
})), a = new Map(x(m).map((e, t) => [e, t]));
|
|
101
|
+
return x(m).toSorted((t, i) => {
|
|
102
|
+
let o = n.has(r(e).getValue(t)), s = n.has(r(e).getValue(i));
|
|
103
|
+
return o && !s ? -1 : !o && s ? 1 : o && s ? (a.get(i) ?? 0) - (a.get(t) ?? 0) : 0;
|
|
104
|
+
});
|
|
105
|
+
} catch {
|
|
106
|
+
return x(m);
|
|
107
|
+
}
|
|
108
|
+
}), M = l(() => {
|
|
109
|
+
let t = r(e).model.getData();
|
|
110
|
+
return (x(i.multiple) ? (Array.isArray(t) ? t : []).map((t) => r(e).getProperty(O(t))) : r(e).getProperty(O(t))) ?? t;
|
|
111
|
+
}), N = l(() => {
|
|
112
|
+
if (x(m).some((e) => typeof e == "object" && !!e)) return (t) => r(e).getLabel(t);
|
|
113
|
+
}), P = (e) => {
|
|
114
|
+
try {
|
|
115
|
+
return typeof i.optionValue == "function" ? i.optionValue(e) : ["Object"].includes(e.constructor.name) ? e[x(i.optionValue) ?? "id"] : e;
|
|
116
|
+
} catch {
|
|
117
|
+
return e;
|
|
118
|
+
}
|
|
119
|
+
}, F = (e) => {
|
|
120
|
+
try {
|
|
121
|
+
return typeof i.optionLabel == "function" ? i.optionLabel(e) : ["Object"].includes(e.constructor.name) ? e[x(i.optionLabel) ?? "name"] : e;
|
|
122
|
+
} catch {
|
|
123
|
+
return e;
|
|
124
|
+
}
|
|
125
|
+
}, I = (e) => {
|
|
126
|
+
try {
|
|
127
|
+
return typeof i.optionProperty == "function" ? i.optionProperty(e) : ["Object"].includes(e.constructor.name) && x(i.optionProperty) ? e[x(i.optionProperty)] : e;
|
|
128
|
+
} catch {
|
|
129
|
+
return e;
|
|
130
|
+
}
|
|
131
|
+
}, L = () => {
|
|
132
|
+
let t;
|
|
133
|
+
return x(i.$attrs.label) ? p(c, g(i.$attrs, { class: x(i.class) }), A(t = r(e).input()) ? t : { default: () => [t] }) : r(e).input();
|
|
134
|
+
}, R = () => p(D.value, g({
|
|
135
|
+
fluid: !0,
|
|
136
|
+
size: "small",
|
|
137
|
+
appendTo: "self",
|
|
138
|
+
autoFilterFocus: x(i.$attrs.filter),
|
|
139
|
+
resetFilterOnHide: !0,
|
|
140
|
+
resetFilterOnClear: !0,
|
|
141
|
+
loading: h.status,
|
|
142
|
+
options: x(j)
|
|
143
|
+
}, n(i.$attrs, "class"), ["number", "string"].includes(typeof x(v)) ? { placeholder: String(x(v)) } : {}, {
|
|
144
|
+
id: o,
|
|
145
|
+
ref: u,
|
|
146
|
+
class: C(s({ "bg-(--colors-F5F6F8)!": x(i.filled) }).string, s(x(i.inputClass)).string, x(i.$attrs.label) ? "" : s(x(i.class)).string),
|
|
147
|
+
modelValue: x(M),
|
|
148
|
+
onFilter: ({ value: e }) => {
|
|
149
|
+
typeof i.onFilter == "function" && H(() => {
|
|
150
|
+
a({
|
|
151
|
+
loading: h,
|
|
152
|
+
try: async () => {
|
|
153
|
+
let t = await i.onFilter({ query: e });
|
|
154
|
+
Array.isArray(t) ? m.value = t : typeof t == "function" && (m.value = t());
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
},
|
|
159
|
+
onShow: () => {
|
|
160
|
+
typeof i.onShow == "function" && H(() => {
|
|
161
|
+
a({
|
|
162
|
+
loading: h,
|
|
163
|
+
try: async () => {
|
|
164
|
+
let e = await i.onShow();
|
|
165
|
+
Array.isArray(e) ? m.value = e : typeof e == "function" && (m.value = e());
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
},
|
|
170
|
+
optionLabel: x(N),
|
|
171
|
+
pt: {
|
|
172
|
+
...x(i.$attrs.pt),
|
|
173
|
+
...x(i.multiple) ? { header: r(e).allRow() } : {},
|
|
174
|
+
pcFilter: {
|
|
175
|
+
...x(i.$attrs.pt)?.pcFilter,
|
|
176
|
+
root: {
|
|
177
|
+
...x(i.$attrs.pt)?.pcFilter?.root,
|
|
178
|
+
class: C(x(i.$attrs.pt)?.pcFilter?.root?.class, s(x(i.filterInputClass)).string)
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}, x(i.optionProperty) ? { optionValue: (t) => r(e).getProperty(t) } : {}, { "onUpdate:modelValue": (t) => {
|
|
183
|
+
H(() => {
|
|
184
|
+
r(e).model.replaceData(r(e).getProperty(t));
|
|
185
|
+
});
|
|
186
|
+
} }), {
|
|
187
|
+
...i.$slots,
|
|
188
|
+
...x(i.dropdown) ? {} : { dropdownicon: () => "" },
|
|
189
|
+
...x(i.multiple) ? { headercheckboxicon: (...t) => (i.$slots.headercheckboxicon || r(e).headerCheckboxIconSlot)(...t) } : {},
|
|
190
|
+
...r(e).valueSlot ? { value: (t, ...n) => i.$slots.value({
|
|
191
|
+
...t,
|
|
192
|
+
value: r(e).valueSlot(t, ...n)
|
|
193
|
+
}, ...n) } : {},
|
|
194
|
+
...r(e).optionSlot ? { option: (t, ...n) => i.$slots.option({
|
|
195
|
+
...t,
|
|
196
|
+
option: r(e).optionSlot(t, ...n)
|
|
197
|
+
}, ...n) } : {}
|
|
198
|
+
}), z = ({ class: t, checked: n }) => p("div", { class: "absolute flex items-center" }, [p(k, { class: {
|
|
199
|
+
[t]: !0,
|
|
200
|
+
invisible: !n,
|
|
201
|
+
"relative left-1/2 -translate-x-1/2": !0
|
|
202
|
+
} }, null), r(e).selectAllOptionText()]), B = () => ({
|
|
203
|
+
class: "m-(--p-multiselect-list-padding)! mb-0! p-(--p-multiselect-option-padding)! rounded-(--p-multiselect-option-border-radius)! cursor-pointer hover:bg-(--p-multiselect-option-focus-background)! hover:text-(--p-multiselect-option-focus-color)!",
|
|
204
|
+
onMouseenter: () => {
|
|
205
|
+
x(u) && (x(u).focusedOptionIndex = -1);
|
|
206
|
+
},
|
|
207
|
+
onClick: (e) => {
|
|
208
|
+
e.target.closest(".p-checkbox-input, .p-multiselect-filter-container") || e.currentTarget.querySelector(".p-checkbox-input")?.click();
|
|
209
|
+
}
|
|
210
|
+
}), V = () => p("div", { class: "relative left-5 text-(--p-multiselect-option-color)" }, [f("All")]), H = (e) => {
|
|
211
|
+
clearTimeout(d.value), d.value = setTimeout(e, x(i.debounce));
|
|
212
|
+
};
|
|
213
|
+
return S(() => x(i.options), (e) => {
|
|
214
|
+
m.value = e;
|
|
215
|
+
}, { immediate: !0 }), _(() => {
|
|
216
|
+
clearTimeout(d.value);
|
|
217
|
+
}), {
|
|
218
|
+
template: L,
|
|
219
|
+
input: R,
|
|
220
|
+
getLabel: F,
|
|
221
|
+
getValue: P,
|
|
222
|
+
getProperty: I,
|
|
223
|
+
getOption: O,
|
|
224
|
+
headerCheckboxIconSlot: z,
|
|
225
|
+
allRow: B,
|
|
226
|
+
selectAllOptionText: V,
|
|
227
|
+
debounce: H,
|
|
228
|
+
inputRef: u,
|
|
229
|
+
timeoutRef: d,
|
|
230
|
+
optionsRef: m,
|
|
231
|
+
computedOptionsRef: j,
|
|
232
|
+
computedSelectionsRef: M,
|
|
233
|
+
loadingRef: h
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
}), M = /* @__PURE__ */ e({ default: () => N }), N = j;
|
|
237
|
+
//#endregion
|
|
238
|
+
export { M as n, N as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./src-CB2Ym95H.js`),t=require(`./Label-ClklvtMk.js`);let n=require(`vue`),r=require(`tailwind-merge`),i=require(`primevue`),a=require(`uuid`);var o={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function s(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)(`svg`,o,[...t[0]||=[(0,n.createElementVNode)(`path`,{fill:`currentColor`,d:`M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59z`},null,-1)]])}var c=(0,n.markRaw)({name:`mdi-check`,render:s});function l(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Object]`&&!(0,n.isVNode)(e)}var u=e.s({modelName:`Select`,props:{data:{},defaultData:e.n(),onShow:e.n({type:Function}),onFilter:e.n({type:Function}),multiple:e.n({type:Boolean}),filled:e.n({type:Boolean}),sorted:e.n({type:Boolean,default:!0}),debounce:e.n({type:[Number,String],default:200,validator:e=>/^\d+$/.test(e)}),placeholder:e.n({type:[Boolean,Number,String],default:`None`}),dropdown:e.n({type:Boolean,default:!0}),type:e.n({type:String,default:`select`}),options:e.n({type:Array,default:[]}),optionLabel:e.n({type:[Function,Number,String]}),optionValue:e.n({type:[Function,Number,String]}),optionProperty:e.n({type:[Function,Number,String]}),filterInputClass:e.n(),inputClass:e.n(),class:e.n()},data:t=>{let r=(0,n.unref)(t.data);return e.a(r===void 0?(0,n.unref)(t.defaultData)??((0,n.unref)(t.multiple)?[]:{}):r)},defaultData:e=>(0,n.unref)(e.defaultData)??((0,n.unref)(e.multiple)?[]:{}),setup(o,s,u){let d=`component_${(0,a.v4)()}`,f=(0,n.ref)(),p=(0,n.ref)(),m=(0,n.ref)([]),h=(0,n.reactive)({status:!1}),g=(0,n.computed)(()=>(0,n.unref)(u.placeholder)===!1||[`number`,`string`].includes(typeof(0,n.unref)(u.placeholder))?(0,n.unref)(u.placeholder):[`number`,`string`].includes(typeof(0,n.unref)(u.$attrs.label))?(0,n.unref)(u.$attrs.label):void 0),_=(0,n.computed)(()=>(0,n.unref)(u.multiple)?i.MultiSelect:i.Select),v=t=>((0,n.unref)(m)??[]).find(n=>e.i(o).getValue(n)===e.i(o).getValue(t)),y=(0,n.computed)(()=>{try{if((0,n.unref)(u.sorted)===!1)return(0,n.unref)(m);let t=e.i(o).model.getData();if(!t||Array.isArray(t)&&t.length===0)return(0,n.unref)(m);let r=new Set((Array.isArray(t)?t:[t]).map(t=>{let n=v(t);return n?e.i(o).getValue(n):e.i(o).getValue(t)})),i=new Map((0,n.unref)(m).map((e,t)=>[e,t]));return(0,n.unref)(m).toSorted((t,n)=>{let a=r.has(e.i(o).getValue(t)),s=r.has(e.i(o).getValue(n));return a&&!s?-1:!a&&s?1:a&&s?(i.get(n)??0)-(i.get(t)??0):0})}catch{return(0,n.unref)(m)}}),b=(0,n.computed)(()=>{let t=e.i(o).model.getData();return((0,n.unref)(u.multiple)?(Array.isArray(t)?t:[]).map(t=>e.i(o).getProperty(v(t))):e.i(o).getProperty(v(t)))??t}),x=(0,n.computed)(()=>{if((0,n.unref)(m).some(e=>typeof e==`object`&&!!e))return t=>e.i(o).getLabel(t)}),S=e=>{try{return typeof u.optionValue==`function`?u.optionValue(e):[`Object`].includes(e.constructor.name)?e[(0,n.unref)(u.optionValue)??`id`]:e}catch{return e}},C=e=>{try{return typeof u.optionLabel==`function`?u.optionLabel(e):[`Object`].includes(e.constructor.name)?e[(0,n.unref)(u.optionLabel)??`name`]:e}catch{return e}},w=e=>{try{return typeof u.optionProperty==`function`?u.optionProperty(e):[`Object`].includes(e.constructor.name)&&(0,n.unref)(u.optionProperty)?e[(0,n.unref)(u.optionProperty)]:e}catch{return e}},T=()=>{let r;return(0,n.unref)(u.$attrs.label)?(0,n.createVNode)(t.t,(0,n.mergeProps)(u.$attrs,{class:(0,n.unref)(u.class)}),l(r=e.i(o).input())?r:{default:()=>[r]}):e.i(o).input()},E=()=>(0,n.createVNode)(_.value,(0,n.mergeProps)({fluid:!0,size:`small`,appendTo:`self`,autoFilterFocus:(0,n.unref)(u.$attrs.filter),resetFilterOnHide:!0,resetFilterOnClear:!0,loading:h.status,options:(0,n.unref)(y)},e.d(u.$attrs,`class`),[`number`,`string`].includes(typeof(0,n.unref)(g))?{placeholder:String((0,n.unref)(g))}:{},{id:d,ref:f,class:(0,r.twMerge)(e.t({"bg-(--colors-F5F6F8)!":(0,n.unref)(u.filled)}).string,e.t((0,n.unref)(u.inputClass)).string,(0,n.unref)(u.$attrs.label)?``:e.t((0,n.unref)(u.class)).string),modelValue:(0,n.unref)(b),onFilter:({value:t})=>{typeof u.onFilter==`function`&&A(()=>{e.p({loading:h,try:async()=>{let e=await u.onFilter({query:t});Array.isArray(e)?m.value=e:typeof e==`function`&&(m.value=e())}})})},onShow:()=>{typeof u.onShow==`function`&&A(()=>{e.p({loading:h,try:async()=>{let e=await u.onShow();Array.isArray(e)?m.value=e:typeof e==`function`&&(m.value=e())}})})},optionLabel:(0,n.unref)(x),pt:{...(0,n.unref)(u.$attrs.pt),...(0,n.unref)(u.multiple)?{header:e.i(o).allRow()}:{},pcFilter:{...(0,n.unref)(u.$attrs.pt)?.pcFilter,root:{...(0,n.unref)(u.$attrs.pt)?.pcFilter?.root,class:(0,r.twMerge)((0,n.unref)(u.$attrs.pt)?.pcFilter?.root?.class,e.t((0,n.unref)(u.filterInputClass)).string)}}}},(0,n.unref)(u.optionProperty)?{optionValue:t=>e.i(o).getProperty(t)}:{},{"onUpdate:modelValue":t=>{A(()=>{e.i(o).model.replaceData(e.i(o).getProperty(t))})}}),{...u.$slots,...(0,n.unref)(u.dropdown)?{}:{dropdownicon:()=>``},...(0,n.unref)(u.multiple)?{headercheckboxicon:(...t)=>(u.$slots.headercheckboxicon||e.i(o).headerCheckboxIconSlot)(...t)}:{},...e.i(o).valueSlot?{value:(t,...n)=>u.$slots.value({...t,value:e.i(o).valueSlot(t,...n)},...n)}:{},...e.i(o).optionSlot?{option:(t,...n)=>u.$slots.option({...t,option:e.i(o).optionSlot(t,...n)},...n)}:{}}),D=({class:t,checked:r})=>(0,n.createVNode)(`div`,{class:`absolute flex items-center`},[(0,n.createVNode)(c,{class:{[t]:!0,invisible:!r,"relative left-1/2 -translate-x-1/2":!0}},null),e.i(o).selectAllOptionText()]),O=()=>({class:`m-(--p-multiselect-list-padding)! mb-0! p-(--p-multiselect-option-padding)! rounded-(--p-multiselect-option-border-radius)! cursor-pointer hover:bg-(--p-multiselect-option-focus-background)! hover:text-(--p-multiselect-option-focus-color)!`,onMouseenter:()=>{(0,n.unref)(f)&&((0,n.unref)(f).focusedOptionIndex=-1)},onClick:e=>{e.target.closest(`.p-checkbox-input, .p-multiselect-filter-container`)||e.currentTarget.querySelector(`.p-checkbox-input`)?.click()}}),k=()=>(0,n.createVNode)(`div`,{class:`relative left-5 text-(--p-multiselect-option-color)`},[(0,n.createTextVNode)(`All`)]),A=e=>{clearTimeout(p.value),p.value=setTimeout(e,(0,n.unref)(u.debounce))};return(0,n.watch)(()=>(0,n.unref)(u.options),e=>{m.value=e},{immediate:!0}),(0,n.onBeforeUnmount)(()=>{clearTimeout(p.value)}),{template:T,input:E,getLabel:C,getValue:S,getProperty:w,getOption:v,headerCheckboxIconSlot:D,allRow:O,selectAllOptionText:k,debounce:A,inputRef:f,timeoutRef:p,optionsRef:m,computedOptionsRef:y,computedSelectionsRef:b,loadingRef:h}}}),d=e.b({default:()=>f}),f=u;Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return f}});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SubscriptionItem } from "./Types.mjs";
|
|
2
|
+
export default class Subscription {
|
|
3
|
+
private subscriptions;
|
|
4
|
+
private data;
|
|
5
|
+
static create(): Subscription;
|
|
6
|
+
subscribe(name: string, handler: () => void, data?: any): Subscription;
|
|
7
|
+
replace(name: string, handler: () => void, data?: any): Subscription;
|
|
8
|
+
unsubscribe(subscription?: string): Subscription;
|
|
9
|
+
unsubscribe(subscriptions?: Array<string>): Subscription;
|
|
10
|
+
size(): number;
|
|
11
|
+
hasSubscription(name: string): boolean;
|
|
12
|
+
private remove;
|
|
13
|
+
private find;
|
|
14
|
+
private isNameAvailable;
|
|
15
|
+
registrations(): Array<SubscriptionItem>;
|
|
16
|
+
get(name: string): SubscriptionItem;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SubscriptionItem } from "./Types";
|
|
2
|
+
export default class Subscription {
|
|
3
|
+
private subscriptions;
|
|
4
|
+
private data;
|
|
5
|
+
static create(): Subscription;
|
|
6
|
+
subscribe(name: string, handler: () => void, data?: any): Subscription;
|
|
7
|
+
replace(name: string, handler: () => void, data?: any): Subscription;
|
|
8
|
+
unsubscribe(subscription?: string): Subscription;
|
|
9
|
+
unsubscribe(subscriptions?: Array<string>): Subscription;
|
|
10
|
+
size(): number;
|
|
11
|
+
hasSubscription(name: string): boolean;
|
|
12
|
+
private remove;
|
|
13
|
+
private find;
|
|
14
|
+
private isNameAvailable;
|
|
15
|
+
registrations(): Array<SubscriptionItem>;
|
|
16
|
+
get(name: string): SubscriptionItem;
|
|
17
|
+
}
|
package/dist/Types.d.mts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { WatchOptions } from "vue";
|
|
2
|
+
export type StateUpdate = {
|
|
3
|
+
callback: (...args: any[]) => any;
|
|
4
|
+
beforeStateUpdate?: (...args: any[]) => any;
|
|
5
|
+
options?: WatchOptions;
|
|
6
|
+
};
|
|
7
|
+
export type ComponentExtension = {
|
|
8
|
+
parent?: ComponentExtension;
|
|
9
|
+
self?: Record<string | symbol, any>;
|
|
10
|
+
access?: () => ComponentExtension;
|
|
11
|
+
value?: ComponentExtension;
|
|
12
|
+
};
|
|
13
|
+
export type PropOptions = {
|
|
14
|
+
exclude: string | Array<string>;
|
|
15
|
+
include: Record<string, any>;
|
|
16
|
+
};
|
|
17
|
+
export type SubscriptionItem = {
|
|
18
|
+
name: string;
|
|
19
|
+
handler: () => void;
|
|
20
|
+
data?: any;
|
|
21
|
+
};
|
|
22
|
+
export type PropType = {
|
|
23
|
+
default: any;
|
|
24
|
+
required: boolean;
|
|
25
|
+
validator: (value: any) => boolean;
|
|
26
|
+
type: any | Array<any>;
|
|
27
|
+
};
|
|
28
|
+
export type PropExclusions = Array<string> | string;
|
package/dist/Types.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { WatchOptions } from "vue";
|
|
2
|
+
export type StateUpdate = {
|
|
3
|
+
callback: (...args: any[]) => any;
|
|
4
|
+
beforeStateUpdate?: (...args: any[]) => any;
|
|
5
|
+
options?: WatchOptions;
|
|
6
|
+
};
|
|
7
|
+
export type ComponentExtension = {
|
|
8
|
+
parent?: ComponentExtension;
|
|
9
|
+
self?: Record<string | symbol, any>;
|
|
10
|
+
access?: () => ComponentExtension;
|
|
11
|
+
value?: ComponentExtension;
|
|
12
|
+
};
|
|
13
|
+
export type PropOptions = {
|
|
14
|
+
exclude: string | Array<string>;
|
|
15
|
+
include: Record<string, any>;
|
|
16
|
+
};
|
|
17
|
+
export type SubscriptionItem = {
|
|
18
|
+
name: string;
|
|
19
|
+
handler: () => void;
|
|
20
|
+
data?: any;
|
|
21
|
+
};
|
|
22
|
+
export type PropType = {
|
|
23
|
+
default: any;
|
|
24
|
+
required: boolean;
|
|
25
|
+
validator: (value: any) => boolean;
|
|
26
|
+
type: any | Array<any>;
|
|
27
|
+
};
|
|
28
|
+
export type PropExclusions = Array<string> | string;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
setup: {
|
|
5
|
+
type: FunctionConstructor;
|
|
6
|
+
default: (_parent?: {}, self?: {}) => {};
|
|
7
|
+
ReactiveView: boolean;
|
|
8
|
+
};
|
|
9
|
+
title: {
|
|
10
|
+
default: any;
|
|
11
|
+
validator: (value: any) => boolean;
|
|
12
|
+
required?: boolean | undefined;
|
|
13
|
+
type?: any[] | undefined;
|
|
14
|
+
};
|
|
15
|
+
description: {
|
|
16
|
+
default: any;
|
|
17
|
+
validator: (value: any) => boolean;
|
|
18
|
+
required?: boolean | undefined;
|
|
19
|
+
type?: any[] | undefined;
|
|
20
|
+
};
|
|
21
|
+
close: {
|
|
22
|
+
default: any;
|
|
23
|
+
validator: (value: any) => boolean;
|
|
24
|
+
required?: boolean | undefined;
|
|
25
|
+
type?: any[] | undefined;
|
|
26
|
+
};
|
|
27
|
+
timeout: {
|
|
28
|
+
default: any;
|
|
29
|
+
validator: (value: any) => boolean;
|
|
30
|
+
required?: boolean | undefined;
|
|
31
|
+
type?: any[] | undefined;
|
|
32
|
+
};
|
|
33
|
+
}>, ($vue: any) => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
34
|
+
setup: {
|
|
35
|
+
type: FunctionConstructor;
|
|
36
|
+
default: (_parent?: {}, self?: {}) => {};
|
|
37
|
+
ReactiveView: boolean;
|
|
38
|
+
};
|
|
39
|
+
title: {
|
|
40
|
+
default: any;
|
|
41
|
+
validator: (value: any) => boolean;
|
|
42
|
+
required?: boolean | undefined;
|
|
43
|
+
type?: any[] | undefined;
|
|
44
|
+
};
|
|
45
|
+
description: {
|
|
46
|
+
default: any;
|
|
47
|
+
validator: (value: any) => boolean;
|
|
48
|
+
required?: boolean | undefined;
|
|
49
|
+
type?: any[] | undefined;
|
|
50
|
+
};
|
|
51
|
+
close: {
|
|
52
|
+
default: any;
|
|
53
|
+
validator: (value: any) => boolean;
|
|
54
|
+
required?: boolean | undefined;
|
|
55
|
+
type?: any[] | undefined;
|
|
56
|
+
};
|
|
57
|
+
timeout: {
|
|
58
|
+
default: any;
|
|
59
|
+
validator: (value: any) => boolean;
|
|
60
|
+
required?: boolean | undefined;
|
|
61
|
+
type?: any[] | undefined;
|
|
62
|
+
};
|
|
63
|
+
}>> & Readonly<{}>, {
|
|
64
|
+
setup: Function;
|
|
65
|
+
title: any;
|
|
66
|
+
description: any;
|
|
67
|
+
close: any;
|
|
68
|
+
timeout: any;
|
|
69
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
setup: {
|
|
5
|
+
type: FunctionConstructor;
|
|
6
|
+
default: (_parent?: {}, self?: {}) => {};
|
|
7
|
+
ReactiveView: boolean;
|
|
8
|
+
};
|
|
9
|
+
title: {
|
|
10
|
+
default: any;
|
|
11
|
+
validator: (value: any) => boolean;
|
|
12
|
+
required?: boolean | undefined;
|
|
13
|
+
type?: any[] | undefined;
|
|
14
|
+
};
|
|
15
|
+
description: {
|
|
16
|
+
default: any;
|
|
17
|
+
validator: (value: any) => boolean;
|
|
18
|
+
required?: boolean | undefined;
|
|
19
|
+
type?: any[] | undefined;
|
|
20
|
+
};
|
|
21
|
+
close: {
|
|
22
|
+
default: any;
|
|
23
|
+
validator: (value: any) => boolean;
|
|
24
|
+
required?: boolean | undefined;
|
|
25
|
+
type?: any[] | undefined;
|
|
26
|
+
};
|
|
27
|
+
timeout: {
|
|
28
|
+
default: any;
|
|
29
|
+
validator: (value: any) => boolean;
|
|
30
|
+
required?: boolean | undefined;
|
|
31
|
+
type?: any[] | undefined;
|
|
32
|
+
};
|
|
33
|
+
}>, ($vue: any) => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
34
|
+
setup: {
|
|
35
|
+
type: FunctionConstructor;
|
|
36
|
+
default: (_parent?: {}, self?: {}) => {};
|
|
37
|
+
ReactiveView: boolean;
|
|
38
|
+
};
|
|
39
|
+
title: {
|
|
40
|
+
default: any;
|
|
41
|
+
validator: (value: any) => boolean;
|
|
42
|
+
required?: boolean | undefined;
|
|
43
|
+
type?: any[] | undefined;
|
|
44
|
+
};
|
|
45
|
+
description: {
|
|
46
|
+
default: any;
|
|
47
|
+
validator: (value: any) => boolean;
|
|
48
|
+
required?: boolean | undefined;
|
|
49
|
+
type?: any[] | undefined;
|
|
50
|
+
};
|
|
51
|
+
close: {
|
|
52
|
+
default: any;
|
|
53
|
+
validator: (value: any) => boolean;
|
|
54
|
+
required?: boolean | undefined;
|
|
55
|
+
type?: any[] | undefined;
|
|
56
|
+
};
|
|
57
|
+
timeout: {
|
|
58
|
+
default: any;
|
|
59
|
+
validator: (value: any) => boolean;
|
|
60
|
+
required?: boolean | undefined;
|
|
61
|
+
type?: any[] | undefined;
|
|
62
|
+
};
|
|
63
|
+
}>> & Readonly<{}>, {
|
|
64
|
+
setup: Function;
|
|
65
|
+
title: any;
|
|
66
|
+
description: any;
|
|
67
|
+
close: any;
|
|
68
|
+
timeout: any;
|
|
69
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const hideDragImage: (dataTransfer?: DataTransfer | null) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const hideDragImage: (dataTransfer?: DataTransfer | null) => void;
|