@feedmepos/mf-connect 0.1.58-prod → 0.1.60-prod
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/Analytic-CB0xAr9Q.js +427 -0
- package/dist/App-fp_3oll7.js +4630 -0
- package/dist/Bin-CPEbn14A.js +166 -0
- package/dist/Broadcast-jKp2iB8c.js +233 -0
- package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CmJG893h.js +121 -0
- package/dist/Card-BaPJkgd2.js +911 -0
- package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
- package/dist/Collections-Bqsg-ON3.js +458 -0
- package/dist/Credit-C9zIva1h.js +228 -0
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CSMV8OwA.js +2194 -0
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-Doyw0pvU.js +348 -0
- package/dist/Experience-CCI_oesa.js +229 -0
- package/dist/FileSaver.min-NlMItPOc.js +74 -0
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
- package/dist/Game-CRMVz1JP.js +284 -0
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js +144 -0
- package/dist/Index-szNiSnjR.js +259 -0
- package/dist/JsonViewer-v8_C7l5N.js +87 -0
- package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js +18737 -0
- package/dist/MainLayout-B1aJoR95.js +41 -0
- package/dist/Marketing-AvEiNiD9.js +319 -0
- package/dist/Member-DIZwt6Hh.js +279 -0
- package/dist/MemberList-dxteIRWn.js +1607 -0
- package/dist/MemberOverview-wL_ailso.js +58 -0
- package/dist/MemberTransactions-Q3phmXfI.js +45 -0
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-BLk8rX-T.js +60553 -0
- package/dist/Mission-CZjySlcS.js +302 -0
- package/dist/Overview-BXbWEDy3.js +1079 -0
- package/dist/Point-CgjNc_Qn.js +232 -0
- package/dist/Promotion-COYo3qLi.js +289 -0
- package/dist/Queue-BLIStJth.js +260 -0
- package/dist/Record-BWoTvVEE.js +341 -0
- package/dist/Reward-Dq6GxHMP.js +442 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-CR1feHth.js +150 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DuYYfbOH.js +1763 -0
- package/dist/Segment-CUfn6k5R.js +882 -0
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-CxycOqNJ.js +181 -0
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-C7jqrfEj.js +188 -0
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-CMmdbYH4.js +147 -0
- package/dist/Setting-CC5AiQSy.js +1928 -0
- package/dist/SettingAdvertisements-DHQTaMC1.js +262 -0
- package/dist/Store-CEgv5aOD.js +1842 -0
- package/dist/StoreRewards-Dtzk_YG2.js +423 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Cwt8pmoM.js +995 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-BEU2u1-a.js +139 -0
- package/dist/Tier-1xqQvWzc.js +895 -0
- package/dist/Title-Da-G8plz.js +566 -0
- package/dist/Transaction-B0vuVZFZ.js +39 -0
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-e4-wNfrg.js +130 -0
- package/dist/Voucher-DLFjkXLu.js +384 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-5X7dGFD9.js +419 -0
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-BPTrvEwa.js +56 -0
- package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/app-Do_C3F_N.js +7094 -0
- package/dist/app-o7Kvv5aK.js +57962 -0
- package/dist/app-wDQR6dpb.js +39 -0
- package/dist/app.js +6 -0
- package/dist/business-BDi-QTa5.js +82 -0
- package/dist/campaign-BHqizYy6.js +1810 -0
- package/dist/campaign-CpzFl8Vr.js +4 -0
- package/dist/campaign-DNXI3K9c.js +94 -0
- package/dist/campaign.enum-BXDwYoeA.js +20 -0
- package/dist/campaign.fn-Rws4mJa5.js +758 -0
- package/dist/collectible.enum-cMc4fL1T.js +19 -0
- package/dist/collection.fn-F8FZ7Dnr.js +26 -0
- package/dist/dto-CAtf1jq0.js +216 -0
- package/dist/effect-Dhg1ZIrL.js +78 -0
- package/dist/email-addresses-BZJZwglQ.js +705 -0
- package/dist/export-B6yvRuct.js +97 -0
- package/dist/feedme.ico +0 -0
- package/dist/helper-VoErinsY.js +71 -0
- package/dist/index-B0Pzwzkd.js +31 -0
- package/dist/index-Bq6FwMwW.js +32 -0
- package/dist/index-BvE6Sbog.js +3 -0
- package/dist/index-BysJoGFD.js +146 -0
- package/dist/index-C8m_F_I4.js +121 -0
- package/dist/index-CQZinjc9.js +54 -0
- package/dist/index-Cq7s1Pk2.js +76 -0
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/index-DOGrOlB8.js +8859 -0
- package/dist/index-Di23nMJ7.js +38 -0
- package/dist/index-Dkyb4P6T.js +30076 -0
- package/dist/index-DvZiQOtl.js +3077 -0
- package/dist/index-Ved5V90A.js +2155 -0
- package/dist/index-d4A3r8kv.js +32269 -0
- package/dist/index-vh86FiIQ.js +10 -0
- package/dist/index-y7IqG-tl.js +44 -0
- package/dist/index.esm2017-CRTpUsW5.js +3069 -0
- package/dist/loading-CoUrS63J.js +71 -0
- package/dist/lodash-B5I3zXaY.js +3678 -0
- package/dist/membership-BiQwBHAA.js +235 -0
- package/dist/moment-D7p2TMB-.js +2583 -0
- package/dist/money-CA3gpWD3.js +15 -0
- package/dist/number-CgmVpwHm.js +12 -0
- package/dist/object-qECH92oz.js +26 -0
- package/dist/objectId-dwaoBfJX.js +7 -0
- package/dist/objectid-C80eoTvt.js +145 -0
- package/dist/plugins-BkWtR_R5.js +208 -0
- package/dist/reward-D7SKofYj.js +36 -0
- package/dist/rule-Cpxty5PH.js +1951 -0
- package/dist/rule-builder-d_TMgXEC.js +102 -0
- package/dist/style.css +4 -0
- package/dist/template-BB7bab5R.js +190 -0
- package/dist/tier-BJDhpH6X.js +4 -0
- package/dist/tiers/tier=1.png +0 -0
- package/dist/tiers/tier=2.png +0 -0
- package/dist/tiers/tier=3.png +0 -0
- package/dist/tiers/tier=4.png +0 -0
- package/dist/timezone-Dj3UaenF.js +1151 -0
- package/dist/titles/type=diamond.png +0 -0
- package/dist/titles/type=drinks.png +0 -0
- package/dist/titles/type=food.png +0 -0
- package/dist/titles/type=heart.png +0 -0
- package/dist/titles/type=medal.png +0 -0
- package/dist/titles/type=spend.png +0 -0
- package/dist/titles/type=thank-you.png +0 -0
- package/dist/titles/type=thumbs-up.png +0 -0
- package/dist/titles/type=years.png +0 -0
- package/dist/trigger-ZVR5eR1H.js +144 -0
- package/dist/tslib.es6-BCqqvLQ_.js +44 -0
- package/dist/type_drinks-D6jnpvwV.js +4 -0
- package/dist/usePagination-Ds-cuHop.js +223 -0
- package/dist/user-DjRqnFsC.js +54 -0
- package/dist/vue-i18n-BlCNfIcP.js +2365 -0
- package/dist/xlsx-CtNr_GAa.js +15491 -0
- package/dist/zod-Bg2FbC-D.js +90 -0
- package/package.json +1 -1
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { defineComponent as U, ref as g, watch as O, onMounted as I, resolveComponent as m, openBlock as b, createBlock as j, withCtx as P, createTextVNode as z, toDisplayString as B, createElementVNode as c, createVNode as o, unref as e, createElementBlock as F, createCommentVNode as W, normalizeClass as G, computed as L, Fragment as q, isRef as J } from "vue";
|
|
2
|
+
import { u as H } from "./vue-i18n-BlCNfIcP.js";
|
|
3
|
+
import "./index-BvE6Sbog.js";
|
|
4
|
+
import { useRouter as K } from "vue-router";
|
|
5
|
+
import { u as Q } from "./loading-CoUrS63J.js";
|
|
6
|
+
import { f as V, p as X } from "./plugins-BkWtR_R5.js";
|
|
7
|
+
import { u as Y, _ as Z } from "./RewardGroup.vue_vue_type_script_setup_true_lang-CR1feHth.js";
|
|
8
|
+
import { useDialog as ee, useSnackbar as ne, FmButtonVariant as p } from "@feedmepos/ui-library";
|
|
9
|
+
import { r as N } from "./index-Bq6FwMwW.js";
|
|
10
|
+
import { u as ae } from "./reward-D7SKofYj.js";
|
|
11
|
+
import { u as oe } from "./business-BDi-QTa5.js";
|
|
12
|
+
import { u as te } from "./membership-BiQwBHAA.js";
|
|
13
|
+
import { R as $ } from "./app-Do_C3F_N.js";
|
|
14
|
+
const re = { class: "space-y-24" }, le = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: /* @__PURE__ */ G([
|
|
17
|
+
"p-16 pl-24 space-x-8",
|
|
18
|
+
"bg-fm-color-primary-oats rounded-lg",
|
|
19
|
+
"flex items-center",
|
|
20
|
+
"justify-between"
|
|
21
|
+
])
|
|
22
|
+
}, ie = { key: 1 }, se = {
|
|
23
|
+
key: 2,
|
|
24
|
+
class: /* @__PURE__ */ G([
|
|
25
|
+
"flex items-center",
|
|
26
|
+
"border border-fm-color-neutral-gray-300",
|
|
27
|
+
"p-16 space-x-16 rounded-md"
|
|
28
|
+
])
|
|
29
|
+
}, ce = { class: "fm-typo-en-body-lg-400 flex-1 truncate" }, me = { class: "flex justify-end space-x-8 w-full" }, de = /* @__PURE__ */ U({
|
|
30
|
+
__name: "TermAndConditionDialog",
|
|
31
|
+
props: {
|
|
32
|
+
modelValue: { type: Boolean }
|
|
33
|
+
},
|
|
34
|
+
emits: ["update:modelValue"],
|
|
35
|
+
setup(k, { emit: T }) {
|
|
36
|
+
const y = k;
|
|
37
|
+
ee();
|
|
38
|
+
const s = ne(), { t } = H(), i = Y(), { minor: _ } = Q, d = g(!1), x = T, r = g(null), w = g(null);
|
|
39
|
+
async function h() {
|
|
40
|
+
if (!r.value) {
|
|
41
|
+
s.open({
|
|
42
|
+
type: "error",
|
|
43
|
+
title: "Please upload a file"
|
|
44
|
+
});
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
_(
|
|
48
|
+
async () => {
|
|
49
|
+
d.value = !0;
|
|
50
|
+
const a = await V.update(
|
|
51
|
+
V.referralTermAndConditionPath(),
|
|
52
|
+
r.value
|
|
53
|
+
), n = i.referralProgram;
|
|
54
|
+
n.term_and_condition = a, await N.update(n), d.value = !1, v();
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
successMessage: "Term and Condition uploaded successfully"
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
async function E() {
|
|
62
|
+
await X.confirm(
|
|
63
|
+
t("connect.referral.term_and_condition.confirm_remove"),
|
|
64
|
+
t("connect.common.confirm"),
|
|
65
|
+
t("connect.common.confirm"),
|
|
66
|
+
t("connect.common.cancel")
|
|
67
|
+
) && _(
|
|
68
|
+
async () => {
|
|
69
|
+
d.value = !0, await V.delete(
|
|
70
|
+
V.referralTermAndConditionPath()
|
|
71
|
+
);
|
|
72
|
+
const n = i.referralProgram;
|
|
73
|
+
n.term_and_condition = void 0, await N.update(n), d.value = !1, v();
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
successMessage: "Term and Condition removed successfully"
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
function v() {
|
|
81
|
+
r.value = null, x("update:modelValue", !1);
|
|
82
|
+
}
|
|
83
|
+
function l() {
|
|
84
|
+
var a;
|
|
85
|
+
window.open((a = i.referralProgram) == null ? void 0 : a.term_and_condition, "_blank");
|
|
86
|
+
}
|
|
87
|
+
return O(
|
|
88
|
+
() => y.modelValue,
|
|
89
|
+
(a) => {
|
|
90
|
+
r.value = null;
|
|
91
|
+
}
|
|
92
|
+
), I(() => {
|
|
93
|
+
}), (a, n) => {
|
|
94
|
+
const R = m("FmButton"), A = m("FmDropField"), u = m("fm-button"), S = m("fm-dialog");
|
|
95
|
+
return b(), j(S, {
|
|
96
|
+
"model-value": k.modelValue,
|
|
97
|
+
"onUpdate:modelValue": n[3] || (n[3] = (C) => a.$emit("update:modelValue", C)),
|
|
98
|
+
"dismiss-away": ""
|
|
99
|
+
}, {
|
|
100
|
+
"dialog-header": P(() => [
|
|
101
|
+
z(B(a.$t("connect.referral.actions.terms")), 1)
|
|
102
|
+
]),
|
|
103
|
+
"dialog-footer": P(() => [
|
|
104
|
+
c("div", me, [
|
|
105
|
+
o(u, {
|
|
106
|
+
variant: e(p).Tertiary,
|
|
107
|
+
label: e(t)("connect.common.cancel"),
|
|
108
|
+
onClick: v
|
|
109
|
+
}, null, 8, ["variant", "label"]),
|
|
110
|
+
o(u, {
|
|
111
|
+
variant: e(p).Primary,
|
|
112
|
+
class: "ml-auto mr-8",
|
|
113
|
+
label: e(t)("connect.common.save"),
|
|
114
|
+
loading: e(d),
|
|
115
|
+
onClick: h
|
|
116
|
+
}, null, 8, ["variant", "label", "loading"])
|
|
117
|
+
])
|
|
118
|
+
]),
|
|
119
|
+
default: P(() => {
|
|
120
|
+
var C;
|
|
121
|
+
return [
|
|
122
|
+
c("div", re, [
|
|
123
|
+
(C = e(i).referralProgram) != null && C.term_and_condition ? (b(), F("div", le, [
|
|
124
|
+
o(R, {
|
|
125
|
+
label: e(t)("View uploaded file"),
|
|
126
|
+
variant: e(p).Plain,
|
|
127
|
+
icon: "file_present",
|
|
128
|
+
onClick: l
|
|
129
|
+
}, null, 8, ["label", "variant"]),
|
|
130
|
+
o(R, {
|
|
131
|
+
variant: e(p).Plain,
|
|
132
|
+
icon: "delete",
|
|
133
|
+
onClick: E
|
|
134
|
+
}, null, 8, ["variant"])
|
|
135
|
+
])) : W("", !0),
|
|
136
|
+
e(r) ? (b(), F("div", se, [
|
|
137
|
+
o(u, {
|
|
138
|
+
variant: e(p).Tertiary,
|
|
139
|
+
"prepend-icon": "attach_file"
|
|
140
|
+
}, null, 8, ["variant"]),
|
|
141
|
+
c("p", ce, B(e(r).name), 1),
|
|
142
|
+
c("label", {
|
|
143
|
+
ref_key: "fileLabelRef",
|
|
144
|
+
ref: w,
|
|
145
|
+
htmlFor: "file"
|
|
146
|
+
}, [
|
|
147
|
+
o(u, {
|
|
148
|
+
variant: e(p).Plain,
|
|
149
|
+
label: e(t)("Replace File"),
|
|
150
|
+
onClick: n[1] || (n[1] = () => {
|
|
151
|
+
var f;
|
|
152
|
+
return (f = e(w)) == null ? void 0 : f.click();
|
|
153
|
+
})
|
|
154
|
+
}, null, 8, ["variant", "label"]),
|
|
155
|
+
c("input", {
|
|
156
|
+
id: "file",
|
|
157
|
+
accept: ".pdf",
|
|
158
|
+
class: "hidden",
|
|
159
|
+
type: "file",
|
|
160
|
+
onChange: n[2] || (n[2] = (f) => {
|
|
161
|
+
var D, M;
|
|
162
|
+
return r.value = ((M = (D = f.target) == null ? void 0 : D.files) == null ? void 0 : M[0]) ?? null;
|
|
163
|
+
})
|
|
164
|
+
}, null, 32)
|
|
165
|
+
], 512)
|
|
166
|
+
])) : (b(), F("div", ie, [
|
|
167
|
+
o(A, {
|
|
168
|
+
onFileUpload: n[0] || (n[0] = (f) => r.value = f),
|
|
169
|
+
accept: ".pdf",
|
|
170
|
+
"max-file-size": 8e6
|
|
171
|
+
})
|
|
172
|
+
]))
|
|
173
|
+
])
|
|
174
|
+
];
|
|
175
|
+
}),
|
|
176
|
+
_: 1
|
|
177
|
+
}, 8, ["model-value"]);
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
}), ue = { class: "flex items-center" }, fe = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, pe = { class: "px-24 flex flex-col gap-y-16 pb-24" }, xe = /* @__PURE__ */ U({
|
|
181
|
+
__name: "Index",
|
|
182
|
+
setup(k) {
|
|
183
|
+
const T = ae(), y = g(null), { t: s } = H(), t = K(), i = g(!1), _ = oe(), d = te(), x = L(() => _.isPremium ? [
|
|
184
|
+
{
|
|
185
|
+
label: s("connect.referral.actions.terms"),
|
|
186
|
+
value: "term_and_condition"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
label: s("connect.referral.actions.manage_reward"),
|
|
190
|
+
value: "manage_reward"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
label: s("connect.referral.actions.add_referral_tier"),
|
|
194
|
+
value: "add_referral_tier",
|
|
195
|
+
prependIcon: "add",
|
|
196
|
+
isPrimary: !0
|
|
197
|
+
}
|
|
198
|
+
] : []), r = [
|
|
199
|
+
{
|
|
200
|
+
label: s("connect.referral.tabs.overview"),
|
|
201
|
+
value: $["$connect-REFERRAL_OVERVIEW"],
|
|
202
|
+
actions: []
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
label: s("connect.referral.tabs.record"),
|
|
206
|
+
value: $["$connect-REFERRAL_RECORD"],
|
|
207
|
+
actions: []
|
|
208
|
+
}
|
|
209
|
+
], w = L(() => r.find((l) => l.value === t.currentRoute.value.name) ?? r[0]);
|
|
210
|
+
async function h(l) {
|
|
211
|
+
await t.push({ name: l });
|
|
212
|
+
}
|
|
213
|
+
async function E(l) {
|
|
214
|
+
var a;
|
|
215
|
+
l === "add_referral_tier" && ((a = y.value) == null || a.onManageRewardGroup(-1)), l === "manage_reward" && await t.push({ name: $["$connect-REWARD_TEMPLATE"] }), l === "term_and_condition" && v();
|
|
216
|
+
}
|
|
217
|
+
async function v() {
|
|
218
|
+
i.value = !0;
|
|
219
|
+
}
|
|
220
|
+
return I(async () => {
|
|
221
|
+
await T.readRewards(), await _.readPremium(), await d.readSegments();
|
|
222
|
+
}), (l, a) => {
|
|
223
|
+
const n = m("FmPill"), R = m("FmPageHead"), A = m("FmTabs"), u = m("RouterView");
|
|
224
|
+
return b(), F(q, null, [
|
|
225
|
+
o(R, {
|
|
226
|
+
actions: e(x),
|
|
227
|
+
"onClick:action": E
|
|
228
|
+
}, {
|
|
229
|
+
title: P(() => [
|
|
230
|
+
c("div", ue, [
|
|
231
|
+
c("span", fe, B(e(s)("connect.referral.title")), 1),
|
|
232
|
+
o(n, { variant: "premium" })
|
|
233
|
+
])
|
|
234
|
+
]),
|
|
235
|
+
_: 1
|
|
236
|
+
}, 8, ["actions"]),
|
|
237
|
+
c("div", pe, [
|
|
238
|
+
o(A, {
|
|
239
|
+
"model-value": e(w).value,
|
|
240
|
+
items: r,
|
|
241
|
+
"onUpdate:modelValue": h
|
|
242
|
+
}, null, 8, ["model-value"]),
|
|
243
|
+
o(u)
|
|
244
|
+
]),
|
|
245
|
+
o(de, {
|
|
246
|
+
modelValue: e(i),
|
|
247
|
+
"onUpdate:modelValue": a[0] || (a[0] = (S) => J(i) ? i.value = S : null)
|
|
248
|
+
}, null, 8, ["modelValue"]),
|
|
249
|
+
o(Z, {
|
|
250
|
+
ref_key: "rewardGroupRef",
|
|
251
|
+
ref: y
|
|
252
|
+
}, null, 512)
|
|
253
|
+
], 64);
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
export {
|
|
258
|
+
xe as default
|
|
259
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { defineComponent as x, ref as k, resolveComponent as _, openBlock as n, createElementBlock as r, unref as t, createBlock as A, toDisplayString as i, createCommentVNode as u, Fragment as w, renderList as C, createVNode as g, normalizeClass as J } from "vue";
|
|
2
|
+
import { u as B } from "./app-wDQR6dpb.js";
|
|
3
|
+
import { _ as O } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
const V = { class: "flex justify-start" }, $ = {
|
|
5
|
+
key: 1,
|
|
6
|
+
class: "ml-0"
|
|
7
|
+
}, F = {
|
|
8
|
+
key: 2,
|
|
9
|
+
class: "text-red-600"
|
|
10
|
+
}, S = { key: 3 }, q = { key: 4 }, I = { key: 0 }, z = /* @__PURE__ */ x({
|
|
11
|
+
__name: "JsonNode",
|
|
12
|
+
props: {
|
|
13
|
+
node: {
|
|
14
|
+
type: Object,
|
|
15
|
+
required: !0
|
|
16
|
+
},
|
|
17
|
+
keyName: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: !1,
|
|
20
|
+
default: ""
|
|
21
|
+
},
|
|
22
|
+
expanded: {
|
|
23
|
+
type: Boolean
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
setup(e) {
|
|
27
|
+
const s = e, c = typeof s.node == "object" && s.node !== null, y = c || Array.isArray(s.node), a = k(y && s.expanded || !1), d = k(), h = () => {
|
|
28
|
+
a.value = !a.value;
|
|
29
|
+
}, v = (o) => Array.isArray(o) ? `[Array(${o.length})]` : typeof o == "object" && o !== null ? `{${Object.keys(o).length ? "…" : ""}}` : "", m = (o) => typeof o == "string" ? `"${o}"` : String(o), p = typeof s.node == "function" && m(s.node) !== "function () { [native code] }" && !d.value;
|
|
30
|
+
return (o, l) => {
|
|
31
|
+
const b = _("FmIcon"), j = _("JsonNode", !0);
|
|
32
|
+
return n(), r("div", V, [
|
|
33
|
+
t(y) ? (n(), A(b, {
|
|
34
|
+
key: 0,
|
|
35
|
+
onClick: h,
|
|
36
|
+
class: "cursor-pointer mt-[2px]",
|
|
37
|
+
name: t(a) ? "arrow_drop_down" : "arrow_right",
|
|
38
|
+
size: "sm"
|
|
39
|
+
}, null, 8, ["name"])) : (n(), r("span", $)),
|
|
40
|
+
e.keyName || e.keyName == "0" ? (n(), r("span", F, i(e.keyName) + ": ", 1)) : u("", !0),
|
|
41
|
+
t(c) && !t(a) ? (n(), r("span", S, i(v(e.node)), 1)) : t(c) && t(a) ? (n(), r("div", q, [
|
|
42
|
+
(n(!0), r(w, null, C(e.node, (N, f) => (n(), r("div", { key: f }, [
|
|
43
|
+
g(j, {
|
|
44
|
+
node: N,
|
|
45
|
+
"key-name": f
|
|
46
|
+
}, null, 8, ["node", "key-name"])
|
|
47
|
+
]))), 128)),
|
|
48
|
+
Object.keys(e.node || {}).length == 0 ? (n(), r("div", I, i(Array.isArray(e.node) ? "[]" : "{}"), 1)) : u("", !0)
|
|
49
|
+
])) : (n(), r("span", {
|
|
50
|
+
key: 5,
|
|
51
|
+
class: J(["text-gray-800", {
|
|
52
|
+
"cursor-pointer text-blue-500": t(p) && !t(d)
|
|
53
|
+
}]),
|
|
54
|
+
onClick: l[0] || (l[0] = () => {
|
|
55
|
+
t(p) && typeof s.node == "function" && (d.value = s.node());
|
|
56
|
+
})
|
|
57
|
+
}, i(t(d) || m(e.node)), 3))
|
|
58
|
+
]);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}), E = {
|
|
62
|
+
key: 0,
|
|
63
|
+
class: "json-viewer"
|
|
64
|
+
}, D = /* @__PURE__ */ x({
|
|
65
|
+
__name: "JsonViewer",
|
|
66
|
+
props: {
|
|
67
|
+
json: {
|
|
68
|
+
type: Object,
|
|
69
|
+
required: !0
|
|
70
|
+
},
|
|
71
|
+
expand: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: !1
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
setup(e) {
|
|
77
|
+
return (s, c) => t(B)().debugMode ? (n(), r("div", E, [
|
|
78
|
+
g(z, {
|
|
79
|
+
node: e.json,
|
|
80
|
+
expanded: e.expand
|
|
81
|
+
}, null, 8, ["node", "expanded"])
|
|
82
|
+
])) : u("", !0);
|
|
83
|
+
}
|
|
84
|
+
}), R = /* @__PURE__ */ O(D, [["__scopeId", "data-v-d8502b13"]]);
|
|
85
|
+
export {
|
|
86
|
+
R as J
|
|
87
|
+
};
|