@orchidui/core 1.8.1-31 → 1.8.1-33
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 +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/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 +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/MediaAndIcons/Icon/OcIcon.js +1 -1
- package/dist/{OcAccountSetupProgress-D66jxOUH.js → OcAccountSetupProgress-DycpSU2w.js} +2 -2
- package/dist/{OcComplexCalendar-BVoQ--lx.js → OcComplexCalendar-C6G5TT7-.js} +1 -1
- package/dist/{OcComplexDatePicker-C4aTfb4e.js → OcComplexDatePicker-Dr-Pl_D7.js} +1 -1
- package/dist/OcCropper-mBvlE7_D.js +232 -0
- package/dist/OcDataTable-BF1EI1IU.js +586 -0
- package/dist/{OcDraggableList-CypsGEJi.js → OcDraggableList-UEv6yscC.js} +2 -2
- package/dist/{OcEmojiPicker-CXxHKkO_.js → OcEmojiPicker-JJzSACrK.js} +1 -1
- package/dist/{OcFilterForm-BRBY9Zke.js → OcFilterForm-B3uL2JJ7.js} +1 -1
- package/dist/OcFilterSearch-Bh8ErAW2.js +117 -0
- package/dist/{OcFilterSearchFor-CynR3OVE.js → OcFilterSearchFor-6aPHudKe.js} +1 -1
- package/dist/{OcIcon-CJgBICxh.js → OcIcon-CSpRxnwd.js} +7 -7
- package/dist/{OcModalCropper-DqfeiTML.js → OcModalCropper-B59KJKeY.js} +19 -17
- package/dist/{OcTimePicker-WOd_cWf6.js → OcTimePicker-BvoswwxY.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-D7l3bpCa.js → SubPlanCard-DDokRPRk.js} +2 -2
- package/dist/{ThumbnailSection-BYa1AF-0.js → ThumbnailSection-TRNxm6LB.js} +1 -1
- package/dist/{ThumbnailTheme-CYMBq-nS.js → ThumbnailTheme-8D0Jc2ex.js} +2 -2
- package/dist/{index-q8RYJmsu.js → index-BVDHN1Ak.js} +275 -275
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/OcCropper-oIpw2Krc.js +0 -229
- package/dist/OcDataTable-BP0i2PPd.js +0 -578
- package/dist/OcFilterSearch-BkOFdAto.js +0 -69
@@ -0,0 +1,232 @@
|
|
1
|
+
import { ref as u, watch as D, nextTick as A, openBlock as n, createElementBlock as b, createElementVNode as c, createBlock as r, unref as a, Fragment as G, createVNode as v, createCommentVNode as p, withCtx as x } from "vue";
|
2
|
+
import { B as k, d as y, C as E, h as H, aD as J } from "./index-BVDHN1Ak.js";
|
3
|
+
import { Cropper as K } from "vue-advanced-cropper";
|
4
|
+
import { _ as M } from "./OcIcon-CSpRxnwd.js";
|
5
|
+
const P = { class: "flex flex-col gap-y-5" }, Q = ["src"], W = { class: "flex gap-x-1 justify-center relative" }, X = { class: "grid grid-cols-2 gap-4" }, te = {
|
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: N }) {
|
19
|
+
const f = i, V = N, d = u(), w = u(), s = u(""), C = u(), O = u(!1), o = u(f.inputOptionValues ?? {});
|
20
|
+
D(
|
21
|
+
() => f.inputOptionValues,
|
22
|
+
() => {
|
23
|
+
o.value = f.inputOptionValues;
|
24
|
+
},
|
25
|
+
{
|
26
|
+
deep: !0
|
27
|
+
}
|
28
|
+
), D(
|
29
|
+
() => f.img,
|
30
|
+
(t) => {
|
31
|
+
t && A(() => {
|
32
|
+
try {
|
33
|
+
const e = new URL(t);
|
34
|
+
e.protocol === "http:" || e.protocol === "https:" ? s.value = `${t}?${Date.now()}` : s.value = t;
|
35
|
+
} catch {
|
36
|
+
s.value = t;
|
37
|
+
}
|
38
|
+
});
|
39
|
+
},
|
40
|
+
{ immediate: !0 }
|
41
|
+
);
|
42
|
+
const j = () => {
|
43
|
+
if (s.value && O.value) {
|
44
|
+
const { canvas: t } = d.value.getResult(), e = !(d.value.image.width === t.width && d.value.image.height === t.height && !d.value.imageTransforms.rotate);
|
45
|
+
V("changeImage", t.toDataURL(), {
|
46
|
+
isChanged: e,
|
47
|
+
file: C.value
|
48
|
+
});
|
49
|
+
}
|
50
|
+
O.value = !0;
|
51
|
+
}, z = (t) => {
|
52
|
+
var e;
|
53
|
+
return (e = d.value) == null ? void 0 : e.rotate(t);
|
54
|
+
}, U = (t) => {
|
55
|
+
var e;
|
56
|
+
return (e = d.value) == null ? void 0 : e.zoom(t);
|
57
|
+
}, T = () => {
|
58
|
+
w.value.click();
|
59
|
+
}, q = (t) => {
|
60
|
+
if (t.target.files[0] / (1024 * 1024) > +f.maxSize)
|
61
|
+
return t.preventDefault(), !1;
|
62
|
+
C.value = t.target.files[0], s.value = URL.createObjectURL(t.target.files[0]);
|
63
|
+
}, F = ({ imageSize: t, visibleArea: e }) => ({
|
64
|
+
width: (e || t).width,
|
65
|
+
height: (e || t).height
|
66
|
+
}), g = (t, e) => {
|
67
|
+
let m = o.value;
|
68
|
+
m[t] = e, V("update:input-options", m);
|
69
|
+
}, h = u(!!o.value.caption), I = u(!!o.value.lightbox);
|
70
|
+
return (t, e) => {
|
71
|
+
var m, L, $, R, B, S;
|
72
|
+
return n(), b("div", P, [
|
73
|
+
c("input", {
|
74
|
+
id: "cropper-file-input",
|
75
|
+
ref_key: "fileUploadEl",
|
76
|
+
ref: w,
|
77
|
+
accept: "image/*",
|
78
|
+
type: "file",
|
79
|
+
class: "hidden",
|
80
|
+
onChange: q
|
81
|
+
}, null, 544),
|
82
|
+
s.value ? (n(), r(a(K), {
|
83
|
+
key: 0,
|
84
|
+
ref_key: "cropper",
|
85
|
+
ref: d,
|
86
|
+
class: "w-full h-[300px]",
|
87
|
+
src: s.value,
|
88
|
+
"resize-image": { wheel: !1 },
|
89
|
+
"background-class": "cropper-background",
|
90
|
+
"default-size": F,
|
91
|
+
onChange: j
|
92
|
+
}, null, 8, ["src"])) : (n(), b("img", {
|
93
|
+
key: 1,
|
94
|
+
class: "w-full",
|
95
|
+
src: i.img
|
96
|
+
}, null, 8, Q)),
|
97
|
+
c("div", W, [
|
98
|
+
s.value ? (n(), b(G, { key: 0 }, [
|
99
|
+
v(a(k), {
|
100
|
+
variant: "secondary",
|
101
|
+
size: "small",
|
102
|
+
"left-icon": "backward",
|
103
|
+
onClick: e[0] || (e[0] = (l) => z(-90))
|
104
|
+
}),
|
105
|
+
v(a(k), {
|
106
|
+
variant: "secondary",
|
107
|
+
size: "small",
|
108
|
+
"left-icon": "zoom-out",
|
109
|
+
onClick: e[1] || (e[1] = (l) => U(0.8))
|
110
|
+
}),
|
111
|
+
v(a(k), {
|
112
|
+
variant: "secondary",
|
113
|
+
size: "small",
|
114
|
+
"left-icon": "zoom-in",
|
115
|
+
onClick: e[2] || (e[2] = (l) => U(1.2))
|
116
|
+
}),
|
117
|
+
v(a(k), {
|
118
|
+
variant: "secondary",
|
119
|
+
size: "small",
|
120
|
+
"left-icon": "forward",
|
121
|
+
onClick: e[3] || (e[3] = (l) => z(90))
|
122
|
+
})
|
123
|
+
], 64)) : p("", !0),
|
124
|
+
i.isReplaceImage ? (n(), r(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: T
|
132
|
+
})) : p("", !0)
|
133
|
+
]),
|
134
|
+
c("div", X, [
|
135
|
+
(m = i.inputOptions) != null && m.includes("description") ? (n(), r(a(y), {
|
136
|
+
key: 0,
|
137
|
+
modelValue: o.value.description,
|
138
|
+
"onUpdate:modelValue": [
|
139
|
+
e[4] || (e[4] = (l) => o.value.description = l),
|
140
|
+
e[5] || (e[5] = (l) => g("description", l))
|
141
|
+
],
|
142
|
+
label: "Describe Image",
|
143
|
+
placeholder: ""
|
144
|
+
}, null, 8, ["modelValue"])) : p("", !0),
|
145
|
+
(L = i.inputOptions) != null && L.includes("link") ? (n(), r(a(y), {
|
146
|
+
key: 1,
|
147
|
+
modelValue: o.value.link,
|
148
|
+
"onUpdate:modelValue": [
|
149
|
+
e[6] || (e[6] = (l) => o.value.link = l),
|
150
|
+
e[7] || (e[7] = (l) => g("link", l))
|
151
|
+
],
|
152
|
+
placeholder: "https://hitpayapp.com",
|
153
|
+
label: "Link to"
|
154
|
+
}, null, 8, ["modelValue"])) : p("", !0),
|
155
|
+
c("div", null, [
|
156
|
+
($ = i.inputOptions) != null && $.includes("caption") ? (n(), r(a(E), {
|
157
|
+
key: 0,
|
158
|
+
modelValue: h.value,
|
159
|
+
"onUpdate:modelValue": e[8] || (e[8] = (l) => h.value = l),
|
160
|
+
label: "Caption",
|
161
|
+
class: "mb-4"
|
162
|
+
}, null, 8, ["modelValue"])) : p("", !0),
|
163
|
+
(R = i.inputOptions) != null && R.includes("caption") && h.value ? (n(), r(a(y), {
|
164
|
+
key: 1,
|
165
|
+
modelValue: o.value.caption,
|
166
|
+
"onUpdate:modelValue": [
|
167
|
+
e[9] || (e[9] = (l) => o.value.caption = l),
|
168
|
+
e[10] || (e[10] = (l) => g("caption", l))
|
169
|
+
],
|
170
|
+
class: "mb-4",
|
171
|
+
placeholder: ""
|
172
|
+
}, null, 8, ["modelValue"])) : p("", !0),
|
173
|
+
(B = i.inputOptions) != null && B.includes("caption") && h.value ? (n(), r(a(H), {
|
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] = (l) => g("caption_variant", l))
|
190
|
+
}, null, 8, ["model-value"])) : p("", !0)
|
191
|
+
]),
|
192
|
+
c("div", null, [
|
193
|
+
(S = i.inputOptions) != null && S.includes("lightbox") ? (n(), r(a(E), {
|
194
|
+
key: 0,
|
195
|
+
modelValue: I.value,
|
196
|
+
"onUpdate:modelValue": [
|
197
|
+
e[12] || (e[12] = (l) => I.value = l),
|
198
|
+
e[13] || (e[13] = (l) => g("lightbox", l))
|
199
|
+
],
|
200
|
+
label: "Lightbox"
|
201
|
+
}, {
|
202
|
+
after: x(() => [
|
203
|
+
v(a(J), {
|
204
|
+
position: "bottom",
|
205
|
+
distance: 10,
|
206
|
+
"popper-class": "bg-oc-bg-light min-w-[125px]"
|
207
|
+
}, {
|
208
|
+
popper: x(() => e[14] || (e[14] = [
|
209
|
+
c("div", { class: "text-oc-text-400 text-sm px-3 py-2 font-medium text-center" }, " Show lightbox when click the image ", -1)
|
210
|
+
])),
|
211
|
+
default: x(() => [
|
212
|
+
v(a(M), {
|
213
|
+
name: "question-mark",
|
214
|
+
width: "16",
|
215
|
+
height: "16",
|
216
|
+
class: "text-oc-accent-1-500"
|
217
|
+
})
|
218
|
+
]),
|
219
|
+
_: 1
|
220
|
+
})
|
221
|
+
]),
|
222
|
+
_: 1
|
223
|
+
}, 8, ["modelValue"])) : p("", !0)
|
224
|
+
])
|
225
|
+
])
|
226
|
+
]);
|
227
|
+
};
|
228
|
+
}
|
229
|
+
};
|
230
|
+
export {
|
231
|
+
te as default
|
232
|
+
};
|