@orchidui/core 1.8.1-5 → 1.8.1-53
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/CustomerCard/OcCustomerCard.js +2 -2
- 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/OnboardingListItem/OcOnboardingListItem.js +1 -1
- package/dist/DataDisplay/Overview/OcOverview.js +1 -1
- package/dist/DataDisplay/Pagination/OcPagination.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/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/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/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 +2 -2
- package/dist/Form/CardInput/OcCardInput.js +1 -1
- package/dist/Form/Checkbox/OcCheckbox.js +2 -2
- 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 +2 -2
- package/dist/Form/MultipleUploadFile/OcMultipleUploadFile.js +1 -1
- package/dist/Form/NumberInput/OcNumberInput.js +1 -1
- package/dist/Form/PhoneInput/OcPhoneInput.js +2 -2
- 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 +2 -2
- package/dist/Form/Select/OcSelect.js +1 -1
- package/dist/Form/SelectOptions/OcSelectOptions.js +2 -2
- package/dist/Form/SingleFileUpload/OcSingleFileUpload.js +1 -1
- package/dist/Form/Slider/OcSlider.js +1 -1
- package/dist/Form/TextArea/OcTextArea.js +2 -2
- package/dist/Form/Toggle/OcToggle.js +1 -1
- package/dist/Form/index.js +8 -8
- package/dist/FormBuilder/OcFormBuilder.js +1 -1
- package/dist/MediaAndIcons/Icon/OcIcon.js +1 -1
- package/dist/OcAccountSetupProgress-BVZMpCH1.js +54 -0
- package/dist/{OcComplexCalendar-BinW4hUS.js → OcComplexCalendar-CNh4w5-8.js} +1 -1
- package/dist/{OcComplexDatePicker-B3Dt8jiI.js → OcComplexDatePicker-CPGf6KY8.js} +1 -1
- package/dist/OcCropper-GuSoQNTZ.js +244 -0
- package/dist/OcDataTable-Bav6QpT4.js +586 -0
- package/dist/{OcDraggable-CA_BCbpl.js → OcDraggable-CZT2mJvO.js} +5 -4
- package/dist/{OcDraggableList-Dhvy3hNi.js → OcDraggableList-BV7BnryL.js} +2 -2
- package/dist/{OcEmojiPicker-KMCTpPvH.js → OcEmojiPicker-BBveu2YN.js} +1 -1
- package/dist/{OcFilterForm-W2PLi7Uq.js → OcFilterForm-CF_qfZwF.js} +8 -8
- package/dist/OcFilterSearch-CAz5iOWf.js +117 -0
- package/dist/{OcFilterSearchFor-CTgeJQ6e.js → OcFilterSearchFor-2biwJt7C.js} +3 -3
- package/dist/{OcIcon-CJgBICxh.js → OcIcon-CSpRxnwd.js} +7 -7
- package/dist/{OcModalCropper-Cqs3URT3.js → OcModalCropper-5BgWOMg_.js} +21 -18
- package/dist/{OcPopper-D0VfWOBI.js → OcPopper-Bc96YXbS.js} +16 -15
- package/dist/{OcTimePicker-BeMZblA7.js → OcTimePicker-QnKM5wvk.js} +1 -1
- package/dist/OcToggle-Cp5dJ5LN.js +58 -0
- 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/Popper/OcPopper.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-JwnWA0Bs.js → SubPlanCard-Caah6Zfy.js} +2 -2
- package/dist/{ThumbnailSection-DSaRzEcS.js → ThumbnailSection-mq6-n2bo.js} +1 -1
- package/dist/{ThumbnailTheme-BNYrb5PL.js → ThumbnailTheme-BY2_xOPf.js} +2 -2
- package/dist/{index-BfpnwrGw.js → index-DlZuf29d.js} +2979 -2855
- package/dist/index.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/OcAccountSetupProgress-BNdZGCC5.js +0 -46
- package/dist/OcCropper-DuSgG8Xj.js +0 -229
- package/dist/OcDataTable-CIXFbLmD.js +0 -578
- package/dist/OcFilterSearch-B6fNZbQr.js +0 -69
- package/dist/OcToggle-bIJaLDMZ.js +0 -53
@@ -0,0 +1,244 @@
|
|
1
|
+
import { ref as s, watch as N, nextTick as H, openBlock as n, createElementBlock as h, createElementVNode as d, createBlock as u, unref as a, Fragment as J, createVNode as f, createCommentVNode as r, withCtx as j } from "vue";
|
2
|
+
import { B as k, d as w, C as x, h as K, aD as M } from "./index-DlZuf29d.js";
|
3
|
+
import { Cropper as P } from "vue-advanced-cropper";
|
4
|
+
import { _ as Q } from "./OcIcon-CSpRxnwd.js";
|
5
|
+
const W = { class: "flex flex-col gap-y-5" }, X = ["src"], Y = { class: "flex gap-x-1 justify-center relative" }, Z = { class: "grid grid-cols-2 gap-4" }, _ = { class: "flex items-center gap-x-2 justify-normal" }, ee = { class: "w-auto" }, ne = {
|
6
|
+
__name: "OcCropper",
|
7
|
+
props: {
|
8
|
+
inputOptions: Array,
|
9
|
+
inputOptionValues: Object,
|
10
|
+
img: String,
|
11
|
+
maxSize: [String, Number],
|
12
|
+
isReplaceImage: {
|
13
|
+
type: Boolean,
|
14
|
+
default: !0
|
15
|
+
}
|
16
|
+
},
|
17
|
+
emits: ["changeImage", "update:input-options"],
|
18
|
+
setup(i, { emit: T }) {
|
19
|
+
const g = i, y = T, m = s(), V = s(), p = s(""), C = s(), O = s(!1), o = s(g.inputOptionValues ?? {});
|
20
|
+
N(
|
21
|
+
() => g.inputOptionValues,
|
22
|
+
() => {
|
23
|
+
o.value = g.inputOptionValues;
|
24
|
+
},
|
25
|
+
{
|
26
|
+
deep: !0
|
27
|
+
}
|
28
|
+
), N(
|
29
|
+
() => g.img,
|
30
|
+
(l) => {
|
31
|
+
l && H(() => {
|
32
|
+
try {
|
33
|
+
const e = new URL(l);
|
34
|
+
e.protocol === "http:" || e.protocol === "https:" ? p.value = `${l}?${Date.now()}` : p.value = l;
|
35
|
+
} catch {
|
36
|
+
p.value = l;
|
37
|
+
}
|
38
|
+
});
|
39
|
+
},
|
40
|
+
{ immediate: !0 }
|
41
|
+
);
|
42
|
+
const q = () => {
|
43
|
+
if (p.value && O.value) {
|
44
|
+
const { canvas: l } = m.value.getResult(), e = !(m.value.image.width === l.width && m.value.image.height === l.height && !m.value.imageTransforms.rotate);
|
45
|
+
y("changeImage", l.toDataURL(), {
|
46
|
+
isChanged: e,
|
47
|
+
file: C.value
|
48
|
+
});
|
49
|
+
}
|
50
|
+
O.value = !0;
|
51
|
+
}, z = (l) => {
|
52
|
+
var e;
|
53
|
+
return (e = m.value) == null ? void 0 : e.rotate(l);
|
54
|
+
}, U = (l) => {
|
55
|
+
var e;
|
56
|
+
return (e = m.value) == null ? void 0 : e.zoom(l);
|
57
|
+
}, F = () => {
|
58
|
+
V.value.click();
|
59
|
+
}, A = (l) => {
|
60
|
+
if (l.target.files[0] / (1024 * 1024) > +g.maxSize)
|
61
|
+
return l.preventDefault(), !1;
|
62
|
+
C.value = l.target.files[0], p.value = URL.createObjectURL(l.target.files[0]);
|
63
|
+
}, G = ({ imageSize: l, visibleArea: e }) => ({
|
64
|
+
width: (e || l).width,
|
65
|
+
height: (e || l).height
|
66
|
+
}), c = (l, e) => {
|
67
|
+
let v = o.value;
|
68
|
+
v[l] = e, y("update:input-options", v);
|
69
|
+
}, b = s(!!o.value.caption), I = s(!!o.value.lightbox), $ = s(!!o.value.new_tab);
|
70
|
+
return (l, e) => {
|
71
|
+
var v, L, R, B, S, D, E;
|
72
|
+
return n(), h("div", W, [
|
73
|
+
d("input", {
|
74
|
+
id: "cropper-file-input",
|
75
|
+
ref_key: "fileUploadEl",
|
76
|
+
ref: V,
|
77
|
+
accept: "image/*",
|
78
|
+
type: "file",
|
79
|
+
class: "hidden",
|
80
|
+
onChange: A
|
81
|
+
}, null, 544),
|
82
|
+
p.value ? (n(), u(a(P), {
|
83
|
+
key: 0,
|
84
|
+
ref_key: "cropper",
|
85
|
+
ref: m,
|
86
|
+
class: "w-full h-[300px]",
|
87
|
+
src: p.value,
|
88
|
+
"resize-image": { wheel: !1 },
|
89
|
+
"background-class": "cropper-background",
|
90
|
+
"default-size": G,
|
91
|
+
onChange: q
|
92
|
+
}, null, 8, ["src"])) : (n(), h("img", {
|
93
|
+
key: 1,
|
94
|
+
class: "w-full",
|
95
|
+
src: i.img
|
96
|
+
}, null, 8, X)),
|
97
|
+
d("div", Y, [
|
98
|
+
p.value ? (n(), h(J, { key: 0 }, [
|
99
|
+
f(a(k), {
|
100
|
+
variant: "secondary",
|
101
|
+
size: "small",
|
102
|
+
"left-icon": "backward",
|
103
|
+
onClick: e[0] || (e[0] = (t) => z(-90))
|
104
|
+
}),
|
105
|
+
f(a(k), {
|
106
|
+
variant: "secondary",
|
107
|
+
size: "small",
|
108
|
+
"left-icon": "zoom-out",
|
109
|
+
onClick: e[1] || (e[1] = (t) => U(0.8))
|
110
|
+
}),
|
111
|
+
f(a(k), {
|
112
|
+
variant: "secondary",
|
113
|
+
size: "small",
|
114
|
+
"left-icon": "zoom-in",
|
115
|
+
onClick: e[2] || (e[2] = (t) => U(1.2))
|
116
|
+
}),
|
117
|
+
f(a(k), {
|
118
|
+
variant: "secondary",
|
119
|
+
size: "small",
|
120
|
+
"left-icon": "forward",
|
121
|
+
onClick: e[3] || (e[3] = (t) => z(90))
|
122
|
+
})
|
123
|
+
], 64)) : r("", !0),
|
124
|
+
i.isReplaceImage ? (n(), u(a(k), {
|
125
|
+
key: 1,
|
126
|
+
class: "absolute right-0",
|
127
|
+
variant: "secondary",
|
128
|
+
size: "small",
|
129
|
+
label: "Replace image",
|
130
|
+
"left-icon": "refresh",
|
131
|
+
onClick: F
|
132
|
+
})) : r("", !0)
|
133
|
+
]),
|
134
|
+
d("div", Z, [
|
135
|
+
(v = i.inputOptions) != null && v.includes("description") ? (n(), u(a(w), {
|
136
|
+
key: 0,
|
137
|
+
modelValue: o.value.description,
|
138
|
+
"onUpdate:modelValue": [
|
139
|
+
e[4] || (e[4] = (t) => o.value.description = t),
|
140
|
+
e[5] || (e[5] = (t) => c("description", t))
|
141
|
+
],
|
142
|
+
label: "Describe Image",
|
143
|
+
placeholder: ""
|
144
|
+
}, null, 8, ["modelValue"])) : r("", !0),
|
145
|
+
(L = i.inputOptions) != null && L.includes("link") ? (n(), u(a(w), {
|
146
|
+
key: 1,
|
147
|
+
modelValue: o.value.link,
|
148
|
+
"onUpdate:modelValue": [
|
149
|
+
e[6] || (e[6] = (t) => o.value.link = t),
|
150
|
+
e[7] || (e[7] = (t) => c("link", t))
|
151
|
+
],
|
152
|
+
placeholder: "https://hitpayapp.com",
|
153
|
+
label: "Link to"
|
154
|
+
}, null, 8, ["modelValue"])) : r("", !0),
|
155
|
+
d("div", null, [
|
156
|
+
(R = i.inputOptions) != null && R.includes("caption") ? (n(), u(a(x), {
|
157
|
+
key: 0,
|
158
|
+
modelValue: b.value,
|
159
|
+
"onUpdate:modelValue": e[8] || (e[8] = (t) => b.value = t),
|
160
|
+
label: "Caption",
|
161
|
+
class: "mb-4"
|
162
|
+
}, null, 8, ["modelValue"])) : r("", !0),
|
163
|
+
(B = i.inputOptions) != null && B.includes("caption") && b.value ? (n(), u(a(w), {
|
164
|
+
key: 1,
|
165
|
+
modelValue: o.value.caption,
|
166
|
+
"onUpdate:modelValue": [
|
167
|
+
e[9] || (e[9] = (t) => o.value.caption = t),
|
168
|
+
e[10] || (e[10] = (t) => c("caption", t))
|
169
|
+
],
|
170
|
+
class: "mb-4",
|
171
|
+
placeholder: ""
|
172
|
+
}, null, 8, ["modelValue"])) : r("", !0),
|
173
|
+
(S = i.inputOptions) != null && S.includes("caption") && b.value ? (n(), u(a(K), {
|
174
|
+
key: 2,
|
175
|
+
"model-value": o.value.caption_variant,
|
176
|
+
"group-name": "caption_variant",
|
177
|
+
alignment: "horizontal",
|
178
|
+
radio: [
|
179
|
+
{
|
180
|
+
value: "hover",
|
181
|
+
label: "Show on hover"
|
182
|
+
},
|
183
|
+
{
|
184
|
+
value: "bottom",
|
185
|
+
label: "Show on bottom"
|
186
|
+
}
|
187
|
+
],
|
188
|
+
label: "Caption position",
|
189
|
+
"onUpdate:modelValue": e[11] || (e[11] = (t) => c("caption_variant", t))
|
190
|
+
}, null, 8, ["model-value"])) : r("", !0)
|
191
|
+
]),
|
192
|
+
d("div", null, [
|
193
|
+
(D = i.inputOptions) != null && D.includes("new_tab") ? (n(), u(a(x), {
|
194
|
+
key: 0,
|
195
|
+
modelValue: $.value,
|
196
|
+
"onUpdate:modelValue": [
|
197
|
+
e[12] || (e[12] = (t) => $.value = t),
|
198
|
+
e[13] || (e[13] = (t) => c("new_tab", t))
|
199
|
+
],
|
200
|
+
label: "Open link in a new tab",
|
201
|
+
class: "mb-4"
|
202
|
+
}, null, 8, ["modelValue"])) : r("", !0),
|
203
|
+
d("div", _, [
|
204
|
+
d("div", ee, [
|
205
|
+
(E = i.inputOptions) != null && E.includes("lightbox") ? (n(), u(a(x), {
|
206
|
+
key: 0,
|
207
|
+
modelValue: I.value,
|
208
|
+
"onUpdate:modelValue": [
|
209
|
+
e[14] || (e[14] = (t) => I.value = t),
|
210
|
+
e[15] || (e[15] = (t) => c("lightbox", t))
|
211
|
+
],
|
212
|
+
label: "Enable lightbox"
|
213
|
+
}, null, 8, ["modelValue"])) : r("", !0)
|
214
|
+
]),
|
215
|
+
f(a(M), {
|
216
|
+
trigger: "hover",
|
217
|
+
"popper-options": { strategy: "fixed" },
|
218
|
+
position: "bottom",
|
219
|
+
distance: 10,
|
220
|
+
"popper-class": "bg-oc-bg-light min-w-[125px]"
|
221
|
+
}, {
|
222
|
+
popper: j(() => e[16] || (e[16] = [
|
223
|
+
d("div", { class: "text-oc-text-400 text-sm px-3 py-2 font-medium text-center" }, " Show lightbox when click the image ", -1)
|
224
|
+
])),
|
225
|
+
default: j(() => [
|
226
|
+
f(a(Q), {
|
227
|
+
name: "question-mark",
|
228
|
+
width: "16",
|
229
|
+
height: "16",
|
230
|
+
class: "text-oc-accent-1-500"
|
231
|
+
})
|
232
|
+
]),
|
233
|
+
_: 1
|
234
|
+
})
|
235
|
+
])
|
236
|
+
])
|
237
|
+
])
|
238
|
+
]);
|
239
|
+
};
|
240
|
+
}
|
241
|
+
};
|
242
|
+
export {
|
243
|
+
ne as default
|
244
|
+
};
|