@orchidui/core 1.98.0 → 1.100.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/dist/DataDisplay/AccountVerificationContent/OcAccountVerificationContent.js +1 -1
- package/dist/DataDisplay/CustomerCard/OcCustomerCard.js +1 -1
- package/dist/DataDisplay/FloatContent/OcFloatContent.js +1 -1
- package/dist/DataDisplay/InfoCard/OcInfoCard.js +1 -1
- package/dist/DataDisplay/ListDetail/OcListDetail.js +1 -1
- package/dist/DataDisplay/ListItem/OcListItem.js +1 -1
- package/dist/DataDisplay/NewTable/OcNewTable.js +1 -1
- package/dist/DataDisplay/OnboardingListItem/OcOnboardingListItem.js +1 -1
- package/dist/DataDisplay/OnboardingRecap/OcOnboardingRecap.js +1 -1
- package/dist/DataDisplay/Overview/OcOverview.js +1 -1
- package/dist/DataDisplay/Pagination/OcPagination.js +1 -1
- package/dist/DataDisplay/RowItemData/OcRowItemData.js +1 -1
- package/dist/DataDisplay/Table/OcTable.js +1 -1
- package/dist/DataDisplay/TransferSummary/OcTransferSummary.js +1 -1
- package/dist/Disclosure/Accordion/OcAccordion.js +1 -1
- package/dist/Disclosure/OnboardingAccordion/OnboardingAccordion.js +1 -1
- package/dist/Disclosure/OnboardingProduct/OnboardingProductOption.js +1 -1
- package/dist/Disclosure/Steps/OcSteps.js +1 -1
- package/dist/Disclosure/Tabs/Tabs.js +1 -1
- package/dist/Disclosure/Variants/OcVariants.js +1 -1
- package/dist/Elements/AdditionalContent/OcAdditionalContent.js +1 -1
- package/dist/Elements/AuthenticationOption/AuthenticationOption.js +1 -1
- package/dist/Elements/Box/OcBox.js +1 -1
- package/dist/Elements/Checklist/OcChecklist.js +1 -1
- package/dist/Elements/EmptyPage/OcEmptyPage.js +1 -1
- package/dist/Elements/FeatureOverviewCard/OcFeatureOverviewCard.js +1 -1
- package/dist/Elements/Header/OcHeader.js +1 -1
- package/dist/Elements/PageTitle/OcPageTitle.js +1 -1
- package/dist/Elements/SandboxBanner/OcSandboxBanner.js +1 -1
- package/dist/Elements/Sidebar/OcSidebar.js +2 -2
- package/dist/Elements/SubSidebar/OcSubSidebar.js +1 -1
- package/dist/Elements/TopBanner/OcTopBanner.js +1 -1
- package/dist/Elements/VerificationOption/OcVerificationOption.js +1 -1
- package/dist/Feedback/Banner/OcBanner.js +1 -1
- package/dist/Feedback/Chip/OcChip.js +1 -1
- package/dist/Feedback/ShareIcon/OcShareIcon.js +1 -1
- package/dist/Feedback/Snackbar/OcSnackbar.js +1 -1
- package/dist/Form/BaseInput/OcBaseInput.js +1 -1
- package/dist/Form/Button/OcButton.js +1 -1
- package/dist/Form/Calendar/OcCalendar.js +1 -1
- package/dist/Form/CardInput/OcCardInput.js +1 -1
- package/dist/Form/Checkbox/OcCheckbox.js +1 -1
- package/dist/Form/CheckboxesGroup/OcCheckboxesGroup.js +1 -1
- package/dist/Form/Criteria/OcCriteria.js +1 -1
- package/dist/Form/Cropper/OcCropper.js +1 -1
- package/dist/Form/DatePicker/OcDatePicker.js +1 -1
- package/dist/Form/EmojiPicker/OcEmojiPicker.js +1 -1
- package/dist/Form/Input/OcInput.js +1 -1
- package/dist/Form/LinkInput/OcLinkInput.js +1 -1
- package/dist/Form/MultipleUploadFile/OcMultipleUploadFile.js +1 -1
- package/dist/Form/NumberInput/OcNumberInput.js +1 -1
- package/dist/Form/PhoneInput/OcPhoneInput.js +1 -1
- package/dist/Form/Radio/OcRadio.js +1 -1
- package/dist/Form/RadioGroup/OcRadioGroup.js +1 -1
- package/dist/Form/RangeInput/OcRangeInput.js +1 -1
- package/dist/Form/SectionItem/OcSectionItem.js +1 -1
- package/dist/Form/Select/OcSelect.js +1 -1
- package/dist/Form/SelectOptions/OcSelectOptions.js +1 -1
- package/dist/Form/SingleFileUpload/OcSingleFileUpload.js +1 -1
- package/dist/Form/Slider/OcSlider.js +1 -1
- package/dist/Form/TextArea/OcTextArea.js +1 -1
- package/dist/Form/index.js +1 -1
- package/dist/FormBuilder/OcFormBuilder.js +1 -1
- package/dist/{OcAccountSetupProgress-BoLET4GT.js → OcAccountSetupProgress-fTA45QKt.js} +1 -1
- package/dist/{OcComplexCalendar-D8wu2vLW.js → OcComplexCalendar-BwFQNEAh.js} +1 -1
- package/dist/{OcComplexDatePicker-BsHedj3D.js → OcComplexDatePicker-BZXRwTqC.js} +1 -1
- package/dist/{OcCropper-DnjqTglb.js → OcCropper-m-TxiHsp.js} +1 -1
- package/dist/OcDataTable-DPwZCrNW.js +640 -0
- package/dist/{OcDraggableList-GdjnUSzp.js → OcDraggableList-C7Gr4QKY.js} +1 -1
- package/dist/{OcEmojiPicker-6ofHBLOi.js → OcEmojiPicker-DFv9K_sW.js} +1 -1
- package/dist/{OcFilterForm-DSuc0a2A.js → OcFilterForm-B6DDioJ5.js} +1 -1
- package/dist/{OcFilterSearch-BWPyxAUb.js → OcFilterSearch-DgstuIRK.js} +1 -1
- package/dist/{OcFilterSearchFor-DhTPL0hB.js → OcFilterSearchFor-CRBFdflB.js} +1 -1
- package/dist/{OcModalCropper-Bj1x2-3a.js → OcModalCropper-BOtA6wdE.js} +2 -2
- package/dist/OcSort-CdCqVYLU.js +98 -0
- package/dist/{OcTimePicker-CWxOAR8m.js → OcTimePicker-C4MNrXpI.js} +1 -1
- package/dist/Overlay/ConfirmationModal/OcConfirmationModal.js +1 -1
- package/dist/Overlay/CopyTooltip/OcCopyTooltip.js +1 -1
- package/dist/Overlay/Dropdown/OcDropdown.js +1 -1
- package/dist/Overlay/Modal/OcModal.js +1 -1
- package/dist/Overlay/SupportMenu/OcSupportMenu.js +1 -1
- package/dist/Overlay/Tooltip/OcTooltip.js +1 -1
- package/dist/Overlay/Whitelist/OcWhiteList.js +1 -1
- package/dist/{SubPlanCard-B2SKufjG.js → SubPlanCard-E8zL9B-D.js} +1 -1
- package/dist/{ThumbnailSection-DLGxDFCH.js → ThumbnailSection-Dnd2K49p.js} +1 -1
- package/dist/{ThumbnailTheme-BtIZA-dK.js → ThumbnailTheme-D2ur0y7U.js} +1 -1
- package/dist/{index-DjJgcNHc.js → index-I7kkCShO.js} +3208 -3181
- package/dist/index.js +49 -48
- package/package.json +3 -3
- package/dist/OcDataTable-C8vKFXfq.js +0 -621
|
@@ -1,621 +0,0 @@
|
|
|
1
|
-
import { ref as P, onMounted as Ce, createBlock as L, openBlock as o, unref as n, withCtx as p, createVNode as I, createElementVNode as R, createElementBlock as x, createCommentVNode as f, mergeProps as we, Fragment as ue, renderList as ae, normalizeClass as ie, toDisplayString as xe, computed as D, watch as $e, toRaw as We, nextTick as Xe, renderSlot as C, resolveDynamicComponent as Ye, createSlots as Ze, normalizeProps as Se, guardReactiveProps as Oe } from "vue";
|
|
2
|
-
import { aG as Pe, B as je, C as He, E as _e, Q as el, a4 as ll, aR as al, aS as tl, aT as sl, K as ol, L as Ve, j as ul } from "./index-DjJgcNHc.js";
|
|
3
|
-
import { V as Fe } from "./vue-draggable-next.esm-bundler-QQ8zx__3.js";
|
|
4
|
-
import { getFromLocalStorage as Ae, formatHeadersFromLocalStorage as Ke, formatHeadersToLocalStorage as il, setInLocalStorage as rl } from "./DataTable/utils/editColumnsUtils.js";
|
|
5
|
-
import { _ as Ee } from "./OcIcon-CUKFUeB7.js";
|
|
6
|
-
import { formatFilterDisplay as nl, clearAllFilters as dl } from "./DataTable/utils/filterUtils.js";
|
|
7
|
-
import { formatCustomItemsPerPageOptions as vl, getItemsPerPageOptions as cl } from "./DataTable/utils/paginationUtils.js";
|
|
8
|
-
import "./dayjs.min-7xVZzECu.js";
|
|
9
|
-
const ml = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, pl = {
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "gap-y-2 flex flex-col border-b pb-3 border-oc-gray-200"
|
|
12
|
-
}, fl = { class: "gap-y-2 flex flex-col" }, yl = {
|
|
13
|
-
key: 0,
|
|
14
|
-
class: "flex items-center bg-white justify-between h-[26px]"
|
|
15
|
-
}, gl = { class: "flex items-center w-full gap-x-3" }, bl = { class: "truncate w-full max-w-[160px]" }, kl = {
|
|
16
|
-
__name: "ColumnEdit",
|
|
17
|
-
props: {
|
|
18
|
-
/** Initial active/visible state overrides for columns. Keyed by column key. */
|
|
19
|
-
options: {
|
|
20
|
-
type: Object,
|
|
21
|
-
default: () => ({})
|
|
22
|
-
},
|
|
23
|
-
/** Full list of column header objects — each with `key`, `label`, and optional `isActive`. */
|
|
24
|
-
headers: {
|
|
25
|
-
type: Array,
|
|
26
|
-
default: () => []
|
|
27
|
-
},
|
|
28
|
-
/** localStorage key used to persist the column order and visibility across sessions. */
|
|
29
|
-
localKey: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: ""
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
emits: {
|
|
35
|
-
/** A column's active state was toggled. Payload: column header object. */
|
|
36
|
-
"change-active": [],
|
|
37
|
-
/** A column was reordered via drag. Payload: move event. */
|
|
38
|
-
onMoved: [],
|
|
39
|
-
/** Column order or visibility changed. Payload: `{ fixedHeaders, activeHeaders, isOnMount }`. */
|
|
40
|
-
"update-order": []
|
|
41
|
-
},
|
|
42
|
-
setup($, { emit: oe }) {
|
|
43
|
-
const A = oe, k = $, m = P([]), S = P([]), O = P(!1), y = {
|
|
44
|
-
handle: ".drag-el",
|
|
45
|
-
filter: ".is-disabled",
|
|
46
|
-
group: "headers",
|
|
47
|
-
animation: 500,
|
|
48
|
-
forceFallback: !1,
|
|
49
|
-
move: (l) => l.to.dataset.activeHeaders ? !0 : !!l.draggedContext.futureIndex,
|
|
50
|
-
"onUpdate:modelValue": () => z()
|
|
51
|
-
}, z = (l = !1) => {
|
|
52
|
-
S.value = S.value.map((d) => ({
|
|
53
|
-
...d,
|
|
54
|
-
isActive: !0
|
|
55
|
-
})), A("update-order", {
|
|
56
|
-
fixedHeaders: S.value,
|
|
57
|
-
activeHeaders: m.value,
|
|
58
|
-
isOnMount: l
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
|
-
return Ce(() => {
|
|
62
|
-
const l = Ae(k.localKey), { fixed: d, active: v } = Ke(l, k.headers, k.localKey);
|
|
63
|
-
S.value = d || k.headers.slice(0, 1), m.value = v || k.headers.slice(1).map((g) => {
|
|
64
|
-
var t, U, j;
|
|
65
|
-
return {
|
|
66
|
-
...g,
|
|
67
|
-
isActive: ((j = (U = (t = k.options) == null ? void 0 : t.active) == null ? void 0 : U.find((Q) => Q.key === g.key)) == null ? void 0 : j.isActive) ?? !0
|
|
68
|
-
};
|
|
69
|
-
}), z(!0);
|
|
70
|
-
}), (l, d) => (o(), L(n(Pe), {
|
|
71
|
-
modelValue: O.value,
|
|
72
|
-
"onUpdate:modelValue": d[3] || (d[3] = (v) => O.value = v),
|
|
73
|
-
"is-attach-to-body": ""
|
|
74
|
-
}, {
|
|
75
|
-
menu: p(() => [
|
|
76
|
-
R("div", ml, [
|
|
77
|
-
S.value.length ? (o(), x("div", pl, [
|
|
78
|
-
d[4] || (d[4] = R("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
|
|
79
|
-
I(n(Fe), we({
|
|
80
|
-
key: "key",
|
|
81
|
-
modelValue: S.value,
|
|
82
|
-
"onUpdate:modelValue": d[0] || (d[0] = (v) => S.value = v)
|
|
83
|
-
}, y), {
|
|
84
|
-
default: p(() => [
|
|
85
|
-
(o(!0), x(ue, null, ae(S.value, (v, g) => (o(), x("div", {
|
|
86
|
-
key: v.key,
|
|
87
|
-
class: ie(["flex items-center justify-between h-[26px]", g ? "" : "is-disabled"])
|
|
88
|
-
}, [
|
|
89
|
-
R("span", null, xe(v.label), 1),
|
|
90
|
-
g ? (o(), L(n(Ee), {
|
|
91
|
-
key: 0,
|
|
92
|
-
width: "18",
|
|
93
|
-
height: "18",
|
|
94
|
-
class: "text-oc-text-400 drag-el cursor-move",
|
|
95
|
-
name: "draggable"
|
|
96
|
-
})) : f("", !0)
|
|
97
|
-
], 2))), 128))
|
|
98
|
-
]),
|
|
99
|
-
_: 1
|
|
100
|
-
}, 16, ["modelValue"])
|
|
101
|
-
])) : f("", !0),
|
|
102
|
-
R("div", fl, [
|
|
103
|
-
d[5] || (d[5] = R("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
|
|
104
|
-
I(n(Fe), we({
|
|
105
|
-
key: "key",
|
|
106
|
-
modelValue: m.value,
|
|
107
|
-
"onUpdate:modelValue": d[2] || (d[2] = (v) => m.value = v)
|
|
108
|
-
}, y, { "data-active-headers": "true" }), {
|
|
109
|
-
default: p(() => [
|
|
110
|
-
(o(!0), x(ue, null, ae(m.value, (v) => (o(), x(ue, {
|
|
111
|
-
key: v.key
|
|
112
|
-
}, [
|
|
113
|
-
v.key !== "actions" ? (o(), x("div", yl, [
|
|
114
|
-
R("div", gl, [
|
|
115
|
-
I(n(He), {
|
|
116
|
-
modelValue: v.isActive,
|
|
117
|
-
"onUpdate:modelValue": [
|
|
118
|
-
(g) => v.isActive = g,
|
|
119
|
-
d[1] || (d[1] = (g) => z())
|
|
120
|
-
],
|
|
121
|
-
class: "!w-fit"
|
|
122
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
123
|
-
R("div", bl, xe(v.label), 1)
|
|
124
|
-
]),
|
|
125
|
-
m.value.length > 1 ? (o(), L(n(Ee), {
|
|
126
|
-
key: 0,
|
|
127
|
-
width: "18",
|
|
128
|
-
height: "18",
|
|
129
|
-
class: "text-oc-text-400 drag-el cursor-move",
|
|
130
|
-
name: "draggable"
|
|
131
|
-
})) : f("", !0)
|
|
132
|
-
])) : f("", !0)
|
|
133
|
-
], 64))), 128))
|
|
134
|
-
]),
|
|
135
|
-
_: 1
|
|
136
|
-
}, 16, ["modelValue"])
|
|
137
|
-
])
|
|
138
|
-
])
|
|
139
|
-
]),
|
|
140
|
-
default: p(() => [
|
|
141
|
-
I(n(je), {
|
|
142
|
-
label: "Edit Column",
|
|
143
|
-
"left-icon": "setting",
|
|
144
|
-
size: "small",
|
|
145
|
-
class: "whitespace-nowrap",
|
|
146
|
-
variant: "secondary"
|
|
147
|
-
})
|
|
148
|
-
]),
|
|
149
|
-
_: 1
|
|
150
|
-
}, 8, ["modelValue"]));
|
|
151
|
-
}
|
|
152
|
-
}, hl = { class: "relative flex flex-col gap-9" }, wl = {
|
|
153
|
-
key: 0,
|
|
154
|
-
class: "flex items-center px-4 min-h-[44px]"
|
|
155
|
-
}, xl = {
|
|
156
|
-
key: 0,
|
|
157
|
-
class: "absolute flex items-center gap-5 left-5"
|
|
158
|
-
}, $l = {
|
|
159
|
-
key: 1,
|
|
160
|
-
class: "absolute flex gap-3 left-5"
|
|
161
|
-
}, Sl = {
|
|
162
|
-
key: 1,
|
|
163
|
-
class: "flex justify-center w-full gap-5 md:justify-start"
|
|
164
|
-
}, Ol = {
|
|
165
|
-
key: 2,
|
|
166
|
-
class: "items-center hidden md:flex"
|
|
167
|
-
}, Tl = {
|
|
168
|
-
__name: "OcDataTable",
|
|
169
|
-
props: {
|
|
170
|
-
/** Show skeleton loading rows while data is being fetched. */
|
|
171
|
-
isLoading: Boolean,
|
|
172
|
-
/**
|
|
173
|
-
* Unique ID for this table instance. Used as a localStorage namespace when columnEdit is enabled.
|
|
174
|
-
*/
|
|
175
|
-
id: {
|
|
176
|
-
type: String,
|
|
177
|
-
required: !0
|
|
178
|
-
},
|
|
179
|
-
/**
|
|
180
|
-
* Full configuration object for the table.
|
|
181
|
-
*
|
|
182
|
-
* `tableOptions` — table structure:
|
|
183
|
-
* - `headers` — array of `{ key, label, variant?, class?, isCopy?, stickyLeft?, stickyRight?, chipOptions?, disableClickRow? }`
|
|
184
|
-
* - `fields` — array of row data objects keyed to header keys
|
|
185
|
-
* - `isSelectable` — show row checkboxes
|
|
186
|
-
* - `isCursorPointer` — cursor:pointer on rows
|
|
187
|
-
* - `isSticky` — horizontal scroll with sticky first column
|
|
188
|
-
* - `isBorderless` — remove outer border
|
|
189
|
-
*
|
|
190
|
-
* `filterOptions` (optional) — filter toolbar config:
|
|
191
|
-
* - `search` — `{ key, options? }` enables search bar
|
|
192
|
-
* - `form` — FormBuilder jsonForm array rendered in the filter dropdown
|
|
193
|
-
* - `tabs` — `{ key, options }` tab bar above the table
|
|
194
|
-
* - `per_page` — `{ key }` controls which filter key holds items-per-page
|
|
195
|
-
* - `columnEdit` — `{ key, localStorageKey }` enables column show/hide editor
|
|
196
|
-
*
|
|
197
|
-
* `pagination` — `{ total, last_page }` for numbered pagination; omit for cursor mode.
|
|
198
|
-
* `cursor` — `{ prev, next }` cursor strings for cursor-based navigation.
|
|
199
|
-
* `perPageOptions` — custom per-page dropdown options.
|
|
200
|
-
* `hidePerPageDropdown` — hide the per-page selector.
|
|
201
|
-
*/
|
|
202
|
-
options: {
|
|
203
|
-
type: Object,
|
|
204
|
-
required: !0
|
|
205
|
-
},
|
|
206
|
-
/**
|
|
207
|
-
* Current filter state object (v-model:filter). Includes page, per_page, search query, tab value, etc.
|
|
208
|
-
* The component emits `update:filter` whenever filters change.
|
|
209
|
-
*/
|
|
210
|
-
filter: {
|
|
211
|
-
type: Object,
|
|
212
|
-
default: () => ({})
|
|
213
|
-
},
|
|
214
|
-
/** Currently selected rows array (v-model:selected). Each item is a row data object from fields. */
|
|
215
|
-
selected: {
|
|
216
|
-
type: Array,
|
|
217
|
-
required: !1
|
|
218
|
-
},
|
|
219
|
-
/** CSS class or function `(row, index) => string` applied to each data row element. */
|
|
220
|
-
rowClass: String,
|
|
221
|
-
/**
|
|
222
|
-
* Field name or function used to uniquely identify each row.
|
|
223
|
-
* If a string, `row[rowKey]` is used. If a function, receives the row and returns a key.
|
|
224
|
-
*/
|
|
225
|
-
rowKey: {
|
|
226
|
-
type: [String, Function],
|
|
227
|
-
default: "id"
|
|
228
|
-
},
|
|
229
|
-
/** Field name in each row data object containing the URL to navigate to on row click. */
|
|
230
|
-
rowLink: String,
|
|
231
|
-
/** Use the new table design (NewTable component) instead of the classic Table. */
|
|
232
|
-
isNewTable: {
|
|
233
|
-
type: Boolean,
|
|
234
|
-
default: !1
|
|
235
|
-
},
|
|
236
|
-
/** Highlight a specific row by index (0-based). Set -1 to clear. */
|
|
237
|
-
selectedIndex: {
|
|
238
|
-
type: Number,
|
|
239
|
-
default: -1
|
|
240
|
-
}
|
|
241
|
-
},
|
|
242
|
-
emits: {
|
|
243
|
-
/** Selected rows changed. Payload: array of selected row objects (v-model:selected). */
|
|
244
|
-
"update:selected": [],
|
|
245
|
-
/** Filter state changed. Payload: current filter object (v-model:filter). */
|
|
246
|
-
"update:filter": [],
|
|
247
|
-
/** Emitted alongside update:filter after every filter action. Payload: current filter object. */
|
|
248
|
-
"apply-filter": [],
|
|
249
|
-
/** A row cell was clicked. Payload: `{ field, header }`. */
|
|
250
|
-
"click:row": [],
|
|
251
|
-
/** A filter form field value changed. Payload: `{ form, value }`. */
|
|
252
|
-
"filter-fields-changed": [],
|
|
253
|
-
/** A filter tag was dismissed. Payload: the removed filter field key. */
|
|
254
|
-
"filter-removed": [],
|
|
255
|
-
/** Filter dropdown opened or closed. Payload: boolean. */
|
|
256
|
-
"filter-open": [],
|
|
257
|
-
/** Search query was submitted or cleared. Payload: query string. */
|
|
258
|
-
"search-query-changed": [],
|
|
259
|
-
/** A table cell was hovered. Payload: `{ item, key }`. */
|
|
260
|
-
"hover:cell": [],
|
|
261
|
-
/** Column visibility or order changed via the column editor. Payload: active headers array. */
|
|
262
|
-
"columns-changed": [],
|
|
263
|
-
/** Table has mounted and column order is initialized. */
|
|
264
|
-
"on-table-ready": []
|
|
265
|
-
},
|
|
266
|
-
setup($, { emit: oe }) {
|
|
267
|
-
var ve, ce, me, pe, fe, ye, ge, be, ke;
|
|
268
|
-
const A = $, k = oe, m = D(() => {
|
|
269
|
-
var e;
|
|
270
|
-
return (e = A.options) == null ? void 0 : e.cursor;
|
|
271
|
-
}), S = P(), O = D(() => {
|
|
272
|
-
var e;
|
|
273
|
-
return (e = A.options) == null ? void 0 : e.tableOptions;
|
|
274
|
-
}), y = P({
|
|
275
|
-
total: 0,
|
|
276
|
-
last_page: 1
|
|
277
|
-
});
|
|
278
|
-
$e(
|
|
279
|
-
() => {
|
|
280
|
-
var e;
|
|
281
|
-
return (e = A.options) == null ? void 0 : e.pagination;
|
|
282
|
-
},
|
|
283
|
-
(e) => {
|
|
284
|
-
y.value = e;
|
|
285
|
-
},
|
|
286
|
-
{ deep: !0, immediate: !0 }
|
|
287
|
-
);
|
|
288
|
-
const z = D(() => {
|
|
289
|
-
var a;
|
|
290
|
-
return {
|
|
291
|
-
...O.value,
|
|
292
|
-
headers: S.value ? S.value.map((u) => {
|
|
293
|
-
var r, i;
|
|
294
|
-
return u.class = ((i = (r = O.value) == null ? void 0 : r.headers.find((c) => c.key === u.key)) == null ? void 0 : i.class) ?? "", u;
|
|
295
|
-
}).filter((u) => u.isActive) : (a = O.value) == null ? void 0 : a.headers.filter((u) => Be(u.key))
|
|
296
|
-
};
|
|
297
|
-
}), l = D(() => {
|
|
298
|
-
var e;
|
|
299
|
-
return (e = A.options) == null ? void 0 : e.filterOptions;
|
|
300
|
-
}), d = D(() => {
|
|
301
|
-
var e;
|
|
302
|
-
return (e = A.options) == null ? void 0 : e.hidePerPageDropdown;
|
|
303
|
-
}), v = D(() => {
|
|
304
|
-
var e;
|
|
305
|
-
return ((e = y.value) == null ? void 0 : e.last_page) === 1;
|
|
306
|
-
}), g = JSON.parse(JSON.stringify(We(A.filter)));
|
|
307
|
-
!g && y.value ? g.page = 1 : !g && m && (g.cursor = "");
|
|
308
|
-
const t = P(g);
|
|
309
|
-
$e(
|
|
310
|
-
() => A.filter,
|
|
311
|
-
(e) => {
|
|
312
|
-
t.value = { ...e };
|
|
313
|
-
},
|
|
314
|
-
{ deep: !0 }
|
|
315
|
-
);
|
|
316
|
-
const U = P(!1), j = P(t.value[(ce = (ve = l.value) == null ? void 0 : ve.tabs) == null ? void 0 : ce.key]), Q = P(t.value.page), q = P(
|
|
317
|
-
(pe = (me = l.value) == null ? void 0 : me.per_page) != null && pe.key ? t.value[(ye = (fe = l.value) == null ? void 0 : fe.per_page) == null ? void 0 : ye.key] : t.value.per_page
|
|
318
|
-
), re = ((ke = t.value[t.value.selectedSearchOption || ((be = (ge = l.value) == null ? void 0 : ge.search) == null ? void 0 : be.key)]) == null ? void 0 : ke.trim()) ?? "", N = P(re ? re.split(",") : []), ne = P(!1), Te = D(
|
|
319
|
-
() => {
|
|
320
|
-
var e;
|
|
321
|
-
return vl((e = A.options) == null ? void 0 : e.perPageOptions);
|
|
322
|
-
}
|
|
323
|
-
), De = D(() => cl(Te.value, y.value)), Le = D(() => {
|
|
324
|
-
var e;
|
|
325
|
-
return ((e = A.selected) == null ? void 0 : e.length) > 0;
|
|
326
|
-
}), Ue = (e) => {
|
|
327
|
-
!e.trim() || !t.value.selectedSearchOption && N.value.includes(e) || (N.value = [e], K(), k("search-query-changed", e));
|
|
328
|
-
}, Ie = (e) => {
|
|
329
|
-
N.value = N.value.filter((a) => a !== e), K();
|
|
330
|
-
}, Ne = D(() => nl(t.value, l.value)), Be = (e) => {
|
|
331
|
-
var a, u, r, i, c, h;
|
|
332
|
-
return ((h = (c = (i = (r = t.value) == null ? void 0 : r[(u = (a = l.value) == null ? void 0 : a.columnEdit) == null ? void 0 : u.key]) == null ? void 0 : i.active) == null ? void 0 : c.find((V) => V.key === e)) == null ? void 0 : h.isActive) ?? !0;
|
|
333
|
-
}, Qe = ({ fixedHeaders: e, activeHeaders: a, isOnMount: u }) => {
|
|
334
|
-
var r, i, c, h, V, s, T, w;
|
|
335
|
-
if (t.value[(i = (r = l.value) == null ? void 0 : r.columnEdit) == null ? void 0 : i.key] || (t.value[(h = (c = l.value) == null ? void 0 : c.columnEdit) == null ? void 0 : h.key] = {}), t.value[(s = (V = l.value) == null ? void 0 : V.columnEdit) == null ? void 0 : s.key].fixed = e, t.value[(w = (T = l.value) == null ? void 0 : T.columnEdit) == null ? void 0 : w.key].active = a, S.value = [...e, ...a], !u) {
|
|
336
|
-
const F = il(e, a);
|
|
337
|
-
rl(l.value.columnEdit.localStorageKey, F);
|
|
338
|
-
}
|
|
339
|
-
k("columns-changed", a);
|
|
340
|
-
}, Re = () => {
|
|
341
|
-
var e, a, u, r, i, c;
|
|
342
|
-
if ((a = (e = l.value) == null ? void 0 : e.columnEdit) != null && a.localStorageKey) {
|
|
343
|
-
const h = Ae(l.value.columnEdit.localStorageKey);
|
|
344
|
-
if (h) {
|
|
345
|
-
const { fixed: V, active: s } = Ke(
|
|
346
|
-
h,
|
|
347
|
-
O.value.headers,
|
|
348
|
-
l.value.columnEdit.localStorageKey
|
|
349
|
-
);
|
|
350
|
-
t.value[(r = (u = l.value) == null ? void 0 : u.columnEdit) == null ? void 0 : r.key].fixed = V, t.value[(c = (i = l.value) == null ? void 0 : i.columnEdit) == null ? void 0 : c.key].active = s, S.value = [...V, ...s];
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
}, ze = (e) => {
|
|
354
|
-
t.value.selectedSearchOption = e;
|
|
355
|
-
}, qe = () => {
|
|
356
|
-
var a, u, r, i;
|
|
357
|
-
N.value = [], j.value = "";
|
|
358
|
-
const e = (u = (a = l.value) == null ? void 0 : a.tabs) != null && u.filter_name ? g[(i = (r = l.value) == null ? void 0 : r.tabs) == null ? void 0 : i.key] : j.value;
|
|
359
|
-
t.value = dl(
|
|
360
|
-
t.value,
|
|
361
|
-
l.value,
|
|
362
|
-
q.value,
|
|
363
|
-
e
|
|
364
|
-
), K();
|
|
365
|
-
}, Je = () => {
|
|
366
|
-
K(null, Q.value);
|
|
367
|
-
}, K = (e = null, a = !1, u = "", r = !1, i = !1) => {
|
|
368
|
-
var h, V, s, T, w, F, B, G, M, W, X, Y, Z, H, _, ee, le, b, te;
|
|
369
|
-
y.value && !a && (Q.value = 1), y.value ? t.value.page = Q.value : t.value.cursor = u, (h = l.value) != null && h.per_page ? t.value[l.value.per_page.key] = q.value : t.value.per_page = q.value, (V = l.value) != null && V.tabs && i && (t.value[l.value.tabs.key] = j.value), (T = (s = l.value) == null ? void 0 : s.tabs) != null && T.filter_name && (i ? t.value[(F = (w = l.value) == null ? void 0 : w.tabs) == null ? void 0 : F.filter_name] = null : e && (j.value = null)), (B = l.value) != null && B.search && ((M = (G = l.value.search) == null ? void 0 : G.options) != null && M.length ? (Object.keys(t.value).forEach((E) => {
|
|
370
|
-
var J;
|
|
371
|
-
(J = l.value.search.options) != null && J.map((se) => se.value).includes(E) && delete t.value[E];
|
|
372
|
-
}), t.value[((W = t.value) == null ? void 0 : W.selectedSearchOption) || ((Z = (Y = (X = l.value.search) == null ? void 0 : X.options) == null ? void 0 : Y[0]) == null ? void 0 : Z.value) || l.value.search.key] = N.value.join()) : t.value[l.value.search.key] = N.value.join()), e && (U.value = !1, t.value = { ...t.value, ...e }, Object.keys(t.value).forEach((E) => {
|
|
373
|
-
Array.isArray(t.value[E]) && t.value[E].length === 0 && delete t.value[E];
|
|
374
|
-
}));
|
|
375
|
-
let c = (_ = (H = l.value) == null ? void 0 : H.tabs) == null ? void 0 : _.key;
|
|
376
|
-
if (c && j.value !== t.value[c] && !((le = (ee = l.value) == null ? void 0 : ee.tabs) != null && le.filter_name)) {
|
|
377
|
-
const E = (te = (b = l.value.tabs) == null ? void 0 : b.options) == null ? void 0 : te.find(
|
|
378
|
-
(J) => {
|
|
379
|
-
var se, he;
|
|
380
|
-
return ((se = J.value) == null ? void 0 : se.toString()) === ((he = t.value[c]) == null ? void 0 : he.toString());
|
|
381
|
-
}
|
|
382
|
-
);
|
|
383
|
-
E != null && E.value && (j.value = E.value, i || K(null, !1, "", !1, !0));
|
|
384
|
-
}
|
|
385
|
-
Ge(r);
|
|
386
|
-
}, de = P(null), Ge = (e = !1) => {
|
|
387
|
-
clearTimeout(de.value), de.value = setTimeout(() => {
|
|
388
|
-
k("update:filter", { ...t.value }, e), k("apply-filter", { ...t.value }, e);
|
|
389
|
-
}, 50);
|
|
390
|
-
}, Me = (e, a) => {
|
|
391
|
-
(a === l.value.tabs.key || a === "tabs") && (j.value = ""), K(e), k("filter-removed", a);
|
|
392
|
-
};
|
|
393
|
-
return Ce(() => {
|
|
394
|
-
Re(), Xe(() => {
|
|
395
|
-
k("on-table-ready");
|
|
396
|
-
});
|
|
397
|
-
}), (e, a) => {
|
|
398
|
-
var u, r, i, c, h, V;
|
|
399
|
-
return o(), x("div", hl, [
|
|
400
|
-
z.value ? (o(), L(Ye($.isNewTable ? n(_e) : n(el)), {
|
|
401
|
-
key: 0,
|
|
402
|
-
selected: $.selected,
|
|
403
|
-
"row-key": $.rowKey,
|
|
404
|
-
options: z.value,
|
|
405
|
-
"is-loading": $.isLoading,
|
|
406
|
-
"loading-rows": q.value,
|
|
407
|
-
"row-class": $.rowClass,
|
|
408
|
-
"row-link": $.rowLink,
|
|
409
|
-
"selected-index": $.selectedIndex,
|
|
410
|
-
"is-sticky": O.value.isSticky,
|
|
411
|
-
"is-borderless": O.value.isBorderless,
|
|
412
|
-
"onUpdate:selected": a[8] || (a[8] = (s) => e.$emit("update:selected", s)),
|
|
413
|
-
"onClick:row": a[9] || (a[9] = (s) => e.$emit("click:row", s)),
|
|
414
|
-
"onHover:cell": a[10] || (a[10] = (s) => e.$emit("hover:cell", s))
|
|
415
|
-
}, Ze({
|
|
416
|
-
after: p(() => [
|
|
417
|
-
C(e.$slots, "after")
|
|
418
|
-
]),
|
|
419
|
-
empty: p(() => [
|
|
420
|
-
C(e.$slots, "empty")
|
|
421
|
-
]),
|
|
422
|
-
"table-header": p((s) => [
|
|
423
|
-
C(e.$slots, "table-header", Se(Oe(s)))
|
|
424
|
-
]),
|
|
425
|
-
"table-body": p((s) => [
|
|
426
|
-
C(e.$slots, "table-body", Se(Oe(s)))
|
|
427
|
-
]),
|
|
428
|
-
"after-rows": p(() => [
|
|
429
|
-
C(e.$slots, "after-rows")
|
|
430
|
-
]),
|
|
431
|
-
_: 2
|
|
432
|
-
}, [
|
|
433
|
-
e.$slots.before || (u = l.value) != null && u.search || (r = l.value) != null && r.form || (i = l.value) != null && i.tabs ? {
|
|
434
|
-
name: "before",
|
|
435
|
-
fn: p(() => {
|
|
436
|
-
var s, T, w, F;
|
|
437
|
-
return [
|
|
438
|
-
C(e.$slots, "before"),
|
|
439
|
-
(s = l.value) != null && s.search || (T = l.value) != null && T.form || (w = l.value) != null && w.tabs ? (o(), x("div", wl, [
|
|
440
|
-
Le.value ? (o(), x("div", xl, [
|
|
441
|
-
C(e.$slots, "bulk-actions", { selectedRows: $.selected })
|
|
442
|
-
])) : (o(), x("div", $l, [
|
|
443
|
-
(F = l.value) != null && F.tabs ? (o(), L(n(ll), {
|
|
444
|
-
key: 0,
|
|
445
|
-
modelValue: j.value,
|
|
446
|
-
"onUpdate:modelValue": [
|
|
447
|
-
a[0] || (a[0] = (B) => j.value = B),
|
|
448
|
-
a[1] || (a[1] = (B) => K(null, !1, "", !1, !0))
|
|
449
|
-
],
|
|
450
|
-
"is-disabled": $.isLoading,
|
|
451
|
-
tabs: l.value.tabs.options,
|
|
452
|
-
variant: "pills"
|
|
453
|
-
}, null, 8, ["modelValue", "is-disabled", "tabs"])) : f("", !0)
|
|
454
|
-
])),
|
|
455
|
-
C(e.$slots, "filter-options", {}, () => {
|
|
456
|
-
var B, G, M, W, X, Y, Z, H, _, ee, le;
|
|
457
|
-
return [
|
|
458
|
-
(B = l.value) != null && B.search || (G = l.value) != null && G.form || (M = l.value) != null && M.columnEdit ? (o(), x("div", {
|
|
459
|
-
key: 0,
|
|
460
|
-
class: ie([
|
|
461
|
-
"flex gap-3 absolute ml-auto items-center bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
|
|
462
|
-
l.value ? ne.value ? "md:w-fit w-full" : "" : "w-full justify-end"
|
|
463
|
-
])
|
|
464
|
-
}, [
|
|
465
|
-
(W = l.value) != null && W.search ? (o(), L(n(al), {
|
|
466
|
-
key: 0,
|
|
467
|
-
"is-search-only": !l.value.tabs || l.value.isSearchOnly,
|
|
468
|
-
"search-options": ((X = l.value.search) == null ? void 0 : X.options) ?? [],
|
|
469
|
-
"selected-option": (((Y = t.value) == null ? void 0 : Y.selectedSearchOption) || ((_ = (H = (Z = l.value.search) == null ? void 0 : Z.options) == null ? void 0 : H[0]) == null ? void 0 : _.value)) ?? "keywords",
|
|
470
|
-
onAddQuery: Ue,
|
|
471
|
-
onToggle: a[2] || (a[2] = (b) => ne.value = b),
|
|
472
|
-
onChangeSearchKey: ze
|
|
473
|
-
}, null, 8, ["is-search-only", "search-options", "selected-option"])) : f("", !0),
|
|
474
|
-
(ee = l.value) != null && ee.form ? (o(), L(n(Pe), {
|
|
475
|
-
key: 1,
|
|
476
|
-
modelValue: U.value,
|
|
477
|
-
"onUpdate:modelValue": [
|
|
478
|
-
a[6] || (a[6] = (b) => U.value = b),
|
|
479
|
-
a[7] || (a[7] = (b) => e.$emit("filter-open", b))
|
|
480
|
-
],
|
|
481
|
-
distance: 9,
|
|
482
|
-
placement: "bottom-end",
|
|
483
|
-
"is-attach-to-body": "",
|
|
484
|
-
"max-menu-height": 500
|
|
485
|
-
}, {
|
|
486
|
-
menu: p(() => [
|
|
487
|
-
U.value ? (o(), L(n(tl), {
|
|
488
|
-
key: 0,
|
|
489
|
-
id: $.id,
|
|
490
|
-
"json-form": l.value.form ?? [],
|
|
491
|
-
grid: l.value.grid ?? null,
|
|
492
|
-
values: t.value,
|
|
493
|
-
actions: l.value.actions,
|
|
494
|
-
onApplyFilter: a[3] || (a[3] = (b) => K(b)),
|
|
495
|
-
onFilterFieldsChanged: a[4] || (a[4] = (b) => k("filter-fields-changed", b)),
|
|
496
|
-
onCancel: a[5] || (a[5] = (b) => U.value = !1)
|
|
497
|
-
}, {
|
|
498
|
-
default: p(({ errors: b, values: te, jsonForm: E, updateForm: J }) => [
|
|
499
|
-
C(e.$slots, "custom-filter-form", {
|
|
500
|
-
errors: b,
|
|
501
|
-
values: te,
|
|
502
|
-
jsonForm: E,
|
|
503
|
-
updateFilter: J
|
|
504
|
-
})
|
|
505
|
-
]),
|
|
506
|
-
_: 3
|
|
507
|
-
}, 8, ["id", "json-form", "grid", "values", "actions"])) : f("", !0)
|
|
508
|
-
]),
|
|
509
|
-
default: p(() => [
|
|
510
|
-
I(n(je), {
|
|
511
|
-
"is-active": U.value,
|
|
512
|
-
variant: "secondary",
|
|
513
|
-
"left-icon": "filter",
|
|
514
|
-
size: "small",
|
|
515
|
-
class: "w-8",
|
|
516
|
-
"icon-class": "shrink-0"
|
|
517
|
-
}, null, 8, ["is-active"])
|
|
518
|
-
]),
|
|
519
|
-
_: 3
|
|
520
|
-
}, 8, ["modelValue"])) : f("", !0),
|
|
521
|
-
l.value.columnEdit ? (o(), L(kl, {
|
|
522
|
-
key: 2,
|
|
523
|
-
options: t.value.columnEdit,
|
|
524
|
-
headers: ((le = O.value) == null ? void 0 : le.headers) || [],
|
|
525
|
-
"local-key": l.value.columnEdit.localStorageKey,
|
|
526
|
-
onUpdateOrder: Qe
|
|
527
|
-
}, null, 8, ["options", "headers", "local-key"])) : f("", !0)
|
|
528
|
-
], 2)) : f("", !0)
|
|
529
|
-
];
|
|
530
|
-
})
|
|
531
|
-
])) : f("", !0),
|
|
532
|
-
I(n(sl), {
|
|
533
|
-
filters: Ne.value,
|
|
534
|
-
queries: N.value,
|
|
535
|
-
class: "border-t border-oc-gray-200",
|
|
536
|
-
onRemoveQuery: Ie,
|
|
537
|
-
onRemoveAll: qe,
|
|
538
|
-
onRemoveFilter: Me
|
|
539
|
-
}, null, 8, ["filters", "queries"])
|
|
540
|
-
];
|
|
541
|
-
}),
|
|
542
|
-
key: "0"
|
|
543
|
-
} : void 0,
|
|
544
|
-
ae((c = O.value) == null ? void 0 : c.headers, (s, T) => ({
|
|
545
|
-
name: s.key,
|
|
546
|
-
fn: p(({ data: w, item: F }) => [
|
|
547
|
-
C(e.$slots, s.key, {
|
|
548
|
-
data: w,
|
|
549
|
-
item: F
|
|
550
|
-
})
|
|
551
|
-
])
|
|
552
|
-
})),
|
|
553
|
-
ae((h = O.value) == null ? void 0 : h.headers, (s, T) => ({
|
|
554
|
-
name: `header-${s.key}-tooltip`,
|
|
555
|
-
fn: p(({ data: w, item: F }) => [
|
|
556
|
-
C(e.$slots, `header-${s.key}-tooltip`, {
|
|
557
|
-
data: w,
|
|
558
|
-
item: F
|
|
559
|
-
})
|
|
560
|
-
])
|
|
561
|
-
})),
|
|
562
|
-
ae((V = O.value) == null ? void 0 : V.headers, (s, T) => ({
|
|
563
|
-
name: `header-${s.key}-left-tooltip`,
|
|
564
|
-
fn: p(({ data: w, item: F }) => [
|
|
565
|
-
C(e.$slots, `header-${s.key}-left-tooltip`, {
|
|
566
|
-
data: w,
|
|
567
|
-
item: F
|
|
568
|
-
})
|
|
569
|
-
])
|
|
570
|
-
}))
|
|
571
|
-
]), 1064, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "selected-index", "is-sticky", "is-borderless"])) : f("", !0),
|
|
572
|
-
C(e.$slots, "before-pagination"),
|
|
573
|
-
y.value || m.value ? (o(), x("div", {
|
|
574
|
-
key: 1,
|
|
575
|
-
class: ie(["flex items-center gap-3", y.value && y.value.last_page === 1 ? "justify-end" : ""])
|
|
576
|
-
}, [
|
|
577
|
-
y.value && !v.value ? (o(), L(n(ol), {
|
|
578
|
-
key: 0,
|
|
579
|
-
modelValue: Q.value,
|
|
580
|
-
"onUpdate:modelValue": [
|
|
581
|
-
a[11] || (a[11] = (s) => Q.value = s),
|
|
582
|
-
Je
|
|
583
|
-
],
|
|
584
|
-
class: "justify-center text-[13px]",
|
|
585
|
-
"max-page": y.value.last_page,
|
|
586
|
-
strategy: y.value.strategy,
|
|
587
|
-
"total-visible": "5"
|
|
588
|
-
}, null, 8, ["modelValue", "max-page", "strategy"])) : f("", !0),
|
|
589
|
-
m.value ? (o(), x("div", Sl, [
|
|
590
|
-
I(n(Ve), {
|
|
591
|
-
disabled: !m.value.prev,
|
|
592
|
-
onClick: a[12] || (a[12] = (s) => m.value.prev ? K(null, !1, m.value.prev) : null)
|
|
593
|
-
}, null, 8, ["disabled"]),
|
|
594
|
-
I(n(Ve), {
|
|
595
|
-
disabled: !m.value.next,
|
|
596
|
-
"is-next": "",
|
|
597
|
-
onClick: a[13] || (a[13] = (s) => m.value.next ? K(null, !1, m.value.next) : null)
|
|
598
|
-
}, null, 8, ["disabled"])
|
|
599
|
-
])) : f("", !0),
|
|
600
|
-
d.value ? f("", !0) : (o(), x("div", Ol, [
|
|
601
|
-
I(n(ul), {
|
|
602
|
-
modelValue: q.value,
|
|
603
|
-
"onUpdate:modelValue": [
|
|
604
|
-
a[14] || (a[14] = (s) => q.value = s),
|
|
605
|
-
a[15] || (a[15] = (s) => K(null))
|
|
606
|
-
],
|
|
607
|
-
label: "Item per page",
|
|
608
|
-
"is-inline-label": "",
|
|
609
|
-
"popper-options": { placement: "auto" },
|
|
610
|
-
options: De.value,
|
|
611
|
-
"select-text-class": "!text-[13px]"
|
|
612
|
-
}, null, 8, ["modelValue", "options"])
|
|
613
|
-
]))
|
|
614
|
-
], 2)) : f("", !0)
|
|
615
|
-
]);
|
|
616
|
-
};
|
|
617
|
-
}
|
|
618
|
-
};
|
|
619
|
-
export {
|
|
620
|
-
Tl as default
|
|
621
|
-
};
|