@feedmepos/mf-hrm-portal 2.3.2-dev.17 → 2.3.2-dev.19

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.
Files changed (116) hide show
  1. package/dist/{ApprovalCodeList-Bo8IbNxV.js → ApprovalCodeList-CiZcp75s.js} +14 -15
  2. package/dist/{AuditLogList-C7CjPILA.js → AuditLogList-AVdhUk22.js} +823 -833
  3. package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-CGsOJ4bA.js +459 -0
  4. package/dist/EmployeeList-DmB3wCwv.js +896 -0
  5. package/dist/FormSection.vue_vue_type_script_setup_true_lang-Qsc3hk6l.js +90 -0
  6. package/dist/{GrantUserList-CXWGr3Wo.js → GrantUserList-CUWnDKaH.js} +15 -16
  7. package/dist/Main-CbJjQFFR.js +101 -0
  8. package/dist/{Main-bru10M5U.js → Main-D7CAtkiV.js} +2274 -2280
  9. package/dist/{Main-DeuWov9n.js → Main-DT4TJPRM.js} +5 -5
  10. package/dist/MyPosProfile-EWK8IPlZ.js +360 -0
  11. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-TXPEqa46.js +126 -0
  12. package/dist/{PermissionSetList--xt0piQz.js → PermissionSetList-D2HDsSFi.js} +136 -137
  13. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BUSup81G.js +4212 -0
  14. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-B1sb_3ow.js +1797 -0
  15. package/dist/RoleForm.vue_vue_type_script_setup_true_lang-D-Gve4l8.js +547 -0
  16. package/dist/RoleList-DRFTQcwP.js +274 -0
  17. package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-Cqo5kHcF.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-b96QQsiZ.js} +1 -1
  18. package/dist/{ScheduleGeneralPage-DxhgBLix.js → ScheduleGeneralPage-DO6ZO_7t.js} +2 -2
  19. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-DGPwmNQb.js → ScheduleModal.vue_vue_type_script_setup_true_lang-BG0-qg1-.js} +187 -186
  20. package/dist/{SchedulePage-oBdEvGWN.js → SchedulePage-m9fYfgEO.js} +20 -20
  21. package/dist/{SchedulePositionPage-BZps-kKs.js → SchedulePositionPage-B9M8bgu1.js} +3 -3
  22. package/dist/{SelectFilter-Bs_LCk3L.js → SelectFilter-qanI8DEh.js} +1 -1
  23. package/dist/TeamMemberList-D7PIM3xv.js +2082 -0
  24. package/dist/TimesheetList-C_XQe3jl.js +408 -0
  25. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-Dv66Af5C.js → TimesheetList.vue_vue_type_style_index_0_scoped_ffd7f807_lang-D6qTouaS.js} +7 -7
  26. package/dist/{app-B8xnhtVI.js → app-BuJGxfu4.js} +7973 -4103
  27. package/dist/app.js +3 -3
  28. package/dist/{approval-code-B0jU1bvk.js → approval-code-HPeWQne5.js} +1 -1
  29. package/dist/{dayjs.min-CdpSCqn1.js → dayjs.min-CLUgksBW.js} +34 -34
  30. package/dist/employee-DrsTtOKq.js +237 -0
  31. package/dist/{grant-user-C3C6glCk.js → grant-user-J6TSUXHn.js} +1 -1
  32. package/dist/{iteration-BM0iyDBd.js → index-Dl7XhjSB.js} +573 -558
  33. package/dist/{lodash-KK9U7NAy.js → lodash-CMqarlaS.js} +1 -1
  34. package/dist/member-grant-BeNgG3hd.js +54 -0
  35. package/dist/restaurant-9Y8x8pCL.js +49 -0
  36. package/dist/role-COuuwMES.js +91 -0
  37. package/dist/rule-50_hBJQJ.js +845 -0
  38. package/dist/src/api/my-pos-profile/index.d.ts +3 -0
  39. package/dist/src/api/sso-provider/index.d.ts +5 -0
  40. package/dist/src/api/staff-invite/index.d.ts +16 -0
  41. package/dist/src/components/CollapsibleWrapper.vue.d.ts +11 -3
  42. package/dist/src/components/form/SegmentedTabs.vue.d.ts +23 -0
  43. package/dist/src/composables/useMenuAccess.d.ts +56 -0
  44. package/dist/src/composables/useSsoProviders.d.ts +19 -0
  45. package/dist/src/composables/useStaffInviteProviders.d.ts +8 -0
  46. package/dist/src/composables/useTenant.d.ts +11 -0
  47. package/dist/src/helpers/employee-merge.d.ts +33 -0
  48. package/dist/src/helpers/iteration.d.ts +9 -2
  49. package/dist/src/helpers/member-grant.d.ts +36 -0
  50. package/dist/src/helpers/my-pos-profile.d.ts +37 -0
  51. package/dist/src/helpers/permission-set.d.ts +1 -102
  52. package/dist/src/helpers/pos-assignment-rows.d.ts +28 -0
  53. package/dist/src/helpers/restaurant-lookup.d.ts +19 -0
  54. package/dist/src/helpers/role-merge.d.ts +11 -0
  55. package/dist/src/helpers/rule.d.ts +2 -2
  56. package/dist/src/helpers/staff-invite.d.ts +54 -0
  57. package/dist/src/helpers/string.d.ts +10 -1
  58. package/dist/src/router/courtGuard.d.ts +4 -0
  59. package/dist/src/router/menu-access-guard.d.ts +17 -0
  60. package/dist/src/router/shared.d.ts +3 -1
  61. package/dist/src/stores/restaurant.d.ts +7 -7
  62. package/dist/src/stores/team.d.ts +31 -1
  63. package/dist/src/types/my-pos-profile.d.ts +24 -0
  64. package/dist/src/types/sso-provider.d.ts +10 -0
  65. package/dist/src/types/staff-invite.d.ts +100 -0
  66. package/dist/src/types/team.d.ts +17 -1
  67. package/dist/src/views/audit-log/locales/index.d.ts +12 -0
  68. package/dist/src/views/audit-log/useTraceIdDeepLink.d.ts +1 -1
  69. package/dist/src/views/hr/locales/index.d.ts +20 -0
  70. package/dist/src/views/hr/role/RoleForm.vue.d.ts +29 -2
  71. package/dist/src/views/hr/timesheet/timesheet-view.d.ts +29 -0
  72. package/dist/src/views/my-pos-profile/MyPosProfile.vue.d.ts +2 -0
  73. package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +4 -0
  74. package/dist/src/views/my-pos-profile/locales/index.d.ts +236 -0
  75. package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +1 -1
  76. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1 -1
  77. package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +1 -1
  78. package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +1 -1
  79. package/dist/src/views/team/components/BasePermission.vue.d.ts +11 -0
  80. package/dist/src/views/team/components/ConditionPermission.vue.d.ts +11 -0
  81. package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +51 -0
  82. package/dist/src/views/team/{member/MemberInfo.vue.d.ts → components/MemberStatusBadge.vue.d.ts} +2 -2
  83. package/dist/src/views/team/components/PortalPermissionEditor.vue.d.ts +21 -0
  84. package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +44 -0
  85. package/dist/src/views/team/components/PosRolePermission.vue.d.ts +11 -0
  86. package/dist/src/views/team/locales/index.d.ts +716 -0
  87. package/dist/src/views/team/member/AddMemberForm.vue.d.ts +48 -3
  88. package/dist/src/views/team/member/ExistingMemberNotice.vue.d.ts +11 -0
  89. package/dist/src/views/team/member/MemberDetailsCard.vue.d.ts +35 -0
  90. package/dist/src/views/team/member/MemberHeaderCard.vue.d.ts +19 -0
  91. package/dist/src/views/team/member/TeamMemberList.vue.d.ts +1 -0
  92. package/dist/string-DZQ1uNjn.js +22 -0
  93. package/dist/style.css +1 -1
  94. package/dist/tsconfig.app.tsbuildinfo +1 -1
  95. package/dist/{useAppStore-C1lk2Q2j.js → useAppStore-BCvZUxKY.js} +1 -1
  96. package/dist/{useLoading-CXdGsnHm.js → useLoading-BOt2Is3p.js} +1 -1
  97. package/dist/useReportPermissions-BVTpovDL.js +80 -0
  98. package/dist/useSsoProviders-Bec-WHC7.js +41 -0
  99. package/package.json +2 -2
  100. package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C-4BaMN-.js +0 -438
  101. package/dist/EmployeeList-BOP-gaTp.js +0 -776
  102. package/dist/FormItem.vue_vue_type_script_setup_true_lang-BEOR-8QD.js +0 -45
  103. package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +0 -49
  104. package/dist/Main-BrP1frfO.js +0 -96
  105. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js +0 -243
  106. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-D5nvRsW3.js +0 -4167
  107. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DiNDrCy0.js +0 -35
  108. package/dist/RoleList-BEE-8EQK.js +0 -740
  109. package/dist/TeamMemberList-DCgNcs4P.js +0 -1154
  110. package/dist/TimesheetList-BW6iCigo.js +0 -402
  111. package/dist/employee-DlFGiUgI.js +0 -209
  112. package/dist/restaurant-C7o2Yk6j.js +0 -2688
  113. package/dist/role-DYCorsOh.js +0 -92
  114. package/dist/rule-BhGHZqKO.js +0 -783
  115. package/dist/string-VNuQNweN.js +0 -15
  116. package/dist/useReportPermissions-D_I4rFVo.js +0 -82
@@ -0,0 +1,459 @@
1
+ import { defineComponent as B, ref as S, onMounted as le, nextTick as ue, onUnmounted as re, resolveComponent as g, createElementBlock as b, openBlock as u, Fragment as C, createElementVNode as U, createVNode as A, renderSlot as T, createCommentVNode as w, toDisplayString as E, normalizeStyle as se, normalizeClass as X, watch as q, defineAsyncComponent as ie, computed as K, renderList as M, createBlock as h, withCtx as j, unref as D, resolveDynamicComponent as de } from "vue";
2
+ import { useI18n as Y, useCoreStore as me } from "@feedmepos/mf-common";
3
+ import { O as L, G as ce, U as W } from "./app-BuJGxfu4.js";
4
+ import { l as fe } from "./lodash-CMqarlaS.js";
5
+ const ye = { class: "flex min-w-0 flex-col gap-4" }, be = {
6
+ key: 0,
7
+ class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
8
+ }, ve = { class: "flex items-center" }, pe = {
9
+ key: 0,
10
+ class: "ml-8 fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
11
+ }, ke = { class: "ml-auto" }, Ie = /* @__PURE__ */ B({
12
+ __name: "CollapsibleWrapper",
13
+ props: {
14
+ title: { default: "" },
15
+ subtitle: { default: "" },
16
+ initiallyCollapsed: { type: Boolean, default: !1 },
17
+ layout: { default: "trailing" }
18
+ },
19
+ setup(e) {
20
+ const o = S(e.initiallyCollapsed), c = S(), f = S(0);
21
+ let m;
22
+ function V() {
23
+ o.value = !o.value;
24
+ }
25
+ function d() {
26
+ c.value && (f.value = c.value.scrollHeight);
27
+ }
28
+ return le(async () => {
29
+ await ue(), c.value && (m = new ResizeObserver(() => {
30
+ d();
31
+ }), m.observe(c.value));
32
+ }), re(() => {
33
+ m == null || m.disconnect();
34
+ }), (v, s) => {
35
+ const y = g("FmIcon"), p = g("FmButton");
36
+ return u(), b(C, null, [
37
+ e.layout === "leading" ? (u(), b("div", {
38
+ key: 0,
39
+ class: "flex cursor-pointer items-start gap-8 py-4",
40
+ onClick: V
41
+ }, [
42
+ A(y, {
43
+ name: o.value ? "chevron_right" : "expand_more",
44
+ size: "md",
45
+ class: "shrink-0 text-fm-color-typo-primary"
46
+ }, null, 8, ["name"]),
47
+ U("div", ye, [
48
+ T(v.$slots, "title"),
49
+ e.subtitle ? (u(), b("span", be, E(e.subtitle), 1)) : w("", !0)
50
+ ])
51
+ ])) : (u(), b("div", {
52
+ key: 1,
53
+ onClick: V
54
+ }, [
55
+ U("div", ve, [
56
+ T(v.$slots, "title"),
57
+ o.value && e.subtitle ? (u(), b("span", pe, E(e.subtitle), 1)) : w("", !0),
58
+ U("div", ke, [
59
+ A(p, {
60
+ icon: o.value ? "keyboard_arrow_down" : "keyboard_arrow_up",
61
+ "text-color": "neutral-gray-400",
62
+ variant: "tertiary",
63
+ size: "md"
64
+ }, null, 8, ["icon"])
65
+ ])
66
+ ])
67
+ ])),
68
+ U("div", {
69
+ ref_key: "contentRef",
70
+ ref: c,
71
+ class: X(["transition-all duration-300 ease-in-out overflow-hidden", { "pl-32": e.layout === "leading" }]),
72
+ style: se({ maxHeight: o.value ? "0" : f.value + "px" })
73
+ }, [
74
+ T(v.$slots, "default")
75
+ ], 6)
76
+ ], 64);
77
+ };
78
+ }
79
+ });
80
+ function z(e) {
81
+ return `${e.subject}::${e.builderKey}`;
82
+ }
83
+ function $e(e) {
84
+ const r = S(/* @__PURE__ */ new Map());
85
+ function o(s, y) {
86
+ const p = new Map(r.value);
87
+ p.set(z(s), y), r.value = p;
88
+ }
89
+ function c(s) {
90
+ return r.value.get(z(s));
91
+ }
92
+ function f(s) {
93
+ for (const y of r.value.keys())
94
+ if (y.startsWith(`${s}::`)) return !0;
95
+ return !1;
96
+ }
97
+ function m(s) {
98
+ const y = /* @__PURE__ */ new Map();
99
+ for (const [p, O] of r.value.entries())
100
+ p.startsWith(`${s}::`) && y.set(p, O);
101
+ return y;
102
+ }
103
+ function V(s) {
104
+ const y = new Map(r.value);
105
+ for (const p of Array.from(y.keys()))
106
+ p.startsWith(`${s}::`) && y.delete(p);
107
+ r.value = y;
108
+ }
109
+ function d() {
110
+ r.value = /* @__PURE__ */ new Map();
111
+ }
112
+ function v(s) {
113
+ const y = new Map(r.value);
114
+ y.delete(z(s)), r.value = y;
115
+ }
116
+ return e && q(
117
+ e,
118
+ () => {
119
+ d();
120
+ },
121
+ { deep: !0 }
122
+ ), {
123
+ drafts: r,
124
+ setDraft: o,
125
+ getDraft: c,
126
+ hasDraftsForSubject: f,
127
+ getDraftsForSubject: m,
128
+ clearDraftsForSubject: V,
129
+ clearAllDrafts: d,
130
+ clearDraft: v
131
+ };
132
+ }
133
+ const he = {}, Z = /* @__PURE__ */ new Map();
134
+ function ge(e) {
135
+ const r = Z.get(e);
136
+ if (r) return r;
137
+ const o = he[e];
138
+ if (!o) return;
139
+ const c = ie(o);
140
+ return Z.set(e, c), c;
141
+ }
142
+ function Ve(e, r) {
143
+ return !fe.isEqual(e, r);
144
+ }
145
+ const Fe = { class: "flex flex-col gap-8" }, Ce = { class: "flex flex-col gap-4" }, xe = "condition-form-select-menu", J = 120, De = 220, Ue = /* @__PURE__ */ B({
146
+ __name: "ConditionFormRenderer",
147
+ props: {
148
+ config: {},
149
+ modelValue: {},
150
+ disabled: { type: Boolean, default: !1 },
151
+ optionProviders: { default: () => ({}) }
152
+ },
153
+ emits: ["update:modelValue"],
154
+ setup(e, { emit: r }) {
155
+ const o = e, c = r, { t: f } = Y(), m = me(), V = K(() => L(o.config, o.modelValue));
156
+ let d = o.modelValue;
157
+ q(
158
+ () => o.modelValue,
159
+ (t) => {
160
+ d = t;
161
+ }
162
+ );
163
+ function v(t) {
164
+ return "static" in t ? t.static.map((n) => ({ value: n.value, label: f(n.labelKey) })) : o.optionProviders[t.provider] ?? [];
165
+ }
166
+ function s(t, n) {
167
+ const l = y(
168
+ ce(o.config, { ...o.modelValue, [t]: n })
169
+ );
170
+ Ve(l, d) && (d = l, c("update:modelValue", l));
171
+ }
172
+ function y(t) {
173
+ const n = { ...t };
174
+ for (const l of L(o.config, n))
175
+ l.kind === "date" && !n[l.key] && (n[l.key] = G(Q()));
176
+ return n;
177
+ }
178
+ function p() {
179
+ const t = m.currentBusiness.value;
180
+ if (t != null && t.timezone) return t.timezone;
181
+ if (t != null && t.timeZone) return t.timeZone;
182
+ const n = (t == null ? void 0 : t.country) ?? (m.currentCountry.value instanceof Object ? m.currentCountry.value.code : m.currentCountry.value);
183
+ return O(n);
184
+ }
185
+ function O(t) {
186
+ switch ((t || "").toUpperCase()) {
187
+ case "MY":
188
+ return "Asia/Kuala_Lumpur";
189
+ case "SG":
190
+ return "Asia/Singapore";
191
+ case "TH":
192
+ return "Asia/Bangkok";
193
+ case "ID":
194
+ return "Asia/Jakarta";
195
+ case "MO":
196
+ return "Asia/Macau";
197
+ case "BN":
198
+ return "Asia/Brunei";
199
+ case "PK":
200
+ return "Asia/Karachi";
201
+ case "MV":
202
+ return "Indian/Maldives";
203
+ case "VN":
204
+ return "Asia/Ho_Chi_Minh";
205
+ case "JP":
206
+ return "Asia/Tokyo";
207
+ case "AU":
208
+ return "Australia/Sydney";
209
+ case "AE":
210
+ return "Asia/Dubai";
211
+ case "UK":
212
+ return "Europe/London";
213
+ default:
214
+ return Intl.DateTimeFormat().resolvedOptions().timeZone;
215
+ }
216
+ }
217
+ function R(t, n) {
218
+ const l = new Intl.DateTimeFormat("en-CA", {
219
+ timeZone: n,
220
+ year: "numeric",
221
+ month: "2-digit",
222
+ day: "2-digit",
223
+ hour: "2-digit",
224
+ minute: "2-digit",
225
+ second: "2-digit",
226
+ hourCycle: "h23"
227
+ }).formatToParts(t), k = Object.fromEntries(
228
+ l.filter((F) => F.type !== "literal").map((F) => [F.type, F.value])
229
+ );
230
+ return {
231
+ year: Number(k.year),
232
+ month: Number(k.month),
233
+ day: Number(k.day),
234
+ hour: Number(k.hour),
235
+ minute: Number(k.minute),
236
+ second: Number(k.second)
237
+ };
238
+ }
239
+ function P(t, n) {
240
+ try {
241
+ const l = R(n, t);
242
+ return (Date.UTC(
243
+ l.year,
244
+ l.month - 1,
245
+ l.day,
246
+ l.hour,
247
+ l.minute,
248
+ l.second
249
+ ) - n.getTime()) / 6e4;
250
+ } catch {
251
+ return 0;
252
+ }
253
+ }
254
+ function G(t) {
255
+ const [n, l, k] = t.split("-").map(Number);
256
+ if (!n || !l || !k) return "";
257
+ const F = p(), x = new Date(Date.UTC(n, l - 1, k, 0, 0, 0, 0)), $ = P(F, x), N = new Date(x.getTime() - $ * 6e4), _ = P(F, N);
258
+ return new Date(x.getTime() - _ * 6e4).toISOString();
259
+ }
260
+ function H(t) {
261
+ const n = new Date(t);
262
+ if (Number.isNaN(n.getTime())) return "";
263
+ try {
264
+ const l = R(n, p());
265
+ return `${String(l.year).padStart(4, "0")}-${String(l.month).padStart(2, "0")}-${String(l.day).padStart(2, "0")}`;
266
+ } catch {
267
+ return t.slice(0, 10);
268
+ }
269
+ }
270
+ function Q() {
271
+ return H((/* @__PURE__ */ new Date()).toISOString());
272
+ }
273
+ function I(t) {
274
+ return "options" in t ? v(t.options) : [];
275
+ }
276
+ function ee(t) {
277
+ const n = o.modelValue[t];
278
+ return n == null ? "" : String(n);
279
+ }
280
+ function te(t) {
281
+ const n = o.modelValue[t];
282
+ return typeof n != "string" || !n ? "" : H(n);
283
+ }
284
+ function ne(t, n) {
285
+ s(t, n ? G(n) : "");
286
+ }
287
+ function oe(t, n) {
288
+ let l = Math.floor(Number(n) || (t.min ?? 0));
289
+ t.min !== void 0 && (l = Math.max(t.min, l)), t.max !== void 0 && (l = Math.min(t.max, l)), s(t.key, l);
290
+ }
291
+ return (t, n) => {
292
+ const l = g("FmRadio"), k = g("FmRadioGroup"), F = g("FmSelect"), x = g("FmTextField"), $ = g("FmDatePicker"), N = g("FmCheckbox"), _ = g("FmFormGroup");
293
+ return u(), b("div", Fe, [
294
+ (u(!0), b(C, null, M(V.value, (a) => (u(), b(C, {
295
+ key: a.key
296
+ }, [
297
+ a.kind === "radio" ? (u(), h(k, {
298
+ key: 0,
299
+ "model-value": e.modelValue[a.key],
300
+ disabled: e.disabled,
301
+ "onUpdate:modelValue": (i) => s(a.key, i)
302
+ }, {
303
+ default: j(() => [
304
+ (u(!0), b(C, null, M(I(a), (i) => (u(), h(l, {
305
+ key: i.value,
306
+ value: i.value,
307
+ label: i.label
308
+ }, null, 8, ["value", "label"]))), 128))
309
+ ]),
310
+ _: 2
311
+ }, 1032, ["model-value", "disabled", "onUpdate:modelValue"])) : a.kind === "select" ? (u(), h(F, {
312
+ key: 1,
313
+ "model-value": e.modelValue[a.key],
314
+ label: D(f)(a.labelKey),
315
+ items: I(a),
316
+ "menu-id": xe,
317
+ "menu-z-index": J,
318
+ "max-height": De,
319
+ "shift-menu": "",
320
+ placement: "bottom-start",
321
+ disabled: e.disabled,
322
+ "onUpdate:modelValue": (i) => s(a.key, i)
323
+ }, null, 8, ["model-value", "label", "items", "disabled", "onUpdate:modelValue"])) : a.kind === "number" ? (u(), h(x, {
324
+ key: 2,
325
+ "model-value": ee(a.key),
326
+ type: "number",
327
+ class: "!w-[120px] ml-32",
328
+ label: D(f)(a.labelKey),
329
+ disabled: e.disabled,
330
+ "onUpdate:modelValue": (i) => oe(a, i)
331
+ }, null, 8, ["model-value", "label", "disabled", "onUpdate:modelValue"])) : a.kind === "text" ? (u(), h(x, {
332
+ key: 3,
333
+ "model-value": e.modelValue[a.key] ?? "",
334
+ label: D(f)(a.labelKey),
335
+ disabled: e.disabled,
336
+ "onUpdate:modelValue": (i) => s(a.key, i)
337
+ }, null, 8, ["model-value", "label", "disabled", "onUpdate:modelValue"])) : a.kind === "date" ? (u(), h($, {
338
+ key: 4,
339
+ "model-value": te(a.key),
340
+ label: D(f)(a.labelKey),
341
+ "z-index": J,
342
+ disabled: e.disabled,
343
+ "onUpdate:modelValue": (i) => ne(a.key, i)
344
+ }, null, 8, ["model-value", "label", "disabled", "onUpdate:modelValue"])) : a.kind === "switch" ? (u(), h(N, {
345
+ key: 5,
346
+ "model-value": !!e.modelValue[a.key],
347
+ value: !0,
348
+ label: D(f)(a.labelKey),
349
+ disabled: e.disabled,
350
+ "onUpdate:modelValue": (i) => s(a.key, i)
351
+ }, null, 8, ["model-value", "label", "disabled", "onUpdate:modelValue"])) : a.kind === "multiselect" ? (u(), h(_, {
352
+ key: 6,
353
+ "model-value": e.modelValue[a.key] ?? [],
354
+ "onUpdate:modelValue": (i) => s(a.key, i)
355
+ }, {
356
+ default: j(() => [
357
+ U("div", Ce, [
358
+ (u(!0), b(C, null, M(I(a), (i) => (u(), h(N, {
359
+ key: i.value,
360
+ "model-value": e.modelValue[a.key] ?? [],
361
+ value: i.value,
362
+ label: i.label,
363
+ disabled: e.disabled,
364
+ "onUpdate:modelValue": (ae) => s(a.key, ae)
365
+ }, null, 8, ["model-value", "value", "label", "disabled", "onUpdate:modelValue"]))), 128))
366
+ ])
367
+ ]),
368
+ _: 2
369
+ }, 1032, ["model-value", "onUpdate:modelValue"])) : w("", !0)
370
+ ], 64))), 128))
371
+ ]);
372
+ };
373
+ }
374
+ }), we = /* @__PURE__ */ B({
375
+ __name: "ConditionFormHost",
376
+ props: {
377
+ builder: {},
378
+ modelValue: {},
379
+ disable: { type: Boolean, default: !1 },
380
+ optionProviders: { default: () => ({}) }
381
+ },
382
+ emits: ["update:modelValue"],
383
+ setup(e, { emit: r }) {
384
+ const o = e, c = r, f = K(
385
+ () => o.builder.form && W(o.builder.form) ? o.builder.form : void 0
386
+ ), m = K(
387
+ () => o.builder.form && !W(o.builder.form) ? ge(o.builder.form.component) : void 0
388
+ );
389
+ return (V, d) => f.value ? (u(), h(Ue, {
390
+ key: 0,
391
+ config: f.value,
392
+ "model-value": e.modelValue ?? f.value.defaults,
393
+ disabled: e.disable,
394
+ "option-providers": e.optionProviders,
395
+ "onUpdate:modelValue": d[0] || (d[0] = (v) => c("update:modelValue", v))
396
+ }, null, 8, ["config", "model-value", "disabled", "option-providers"])) : m.value ? (u(), h(de(m.value), {
397
+ key: 1,
398
+ "model-value": e.modelValue,
399
+ disable: e.disable,
400
+ "onUpdate:modelValue": d[1] || (d[1] = (v) => c("update:modelValue", v))
401
+ }, null, 8, ["model-value", "disable"])) : w("", !0);
402
+ }
403
+ }), Ne = {
404
+ key: 0,
405
+ class: "fm-typo-en-title-sm-600"
406
+ }, Se = {
407
+ key: 0,
408
+ class: "h-px w-full bg-fm-color-neutral-gray-200"
409
+ }, Te = { class: "flex justify-end pt-8" }, _e = /* @__PURE__ */ B({
410
+ __name: "ConditionBuilderForm",
411
+ props: {
412
+ builders: {},
413
+ formValueFor: {},
414
+ hasChanges: { type: Boolean },
415
+ title: { default: "" },
416
+ disable: { type: Boolean, default: !1 },
417
+ fullWidth: { type: Boolean, default: !1 }
418
+ },
419
+ emits: ["update-form", "apply"],
420
+ setup(e, { emit: r }) {
421
+ const o = r, { t: c } = Y();
422
+ return (f, m) => {
423
+ const V = g("FmButton");
424
+ return u(), b("div", {
425
+ class: X(["flex flex-col gap-12 p-16", e.fullWidth ? "w-full" : "w-[320px]"])
426
+ }, [
427
+ e.title ? (u(), b("p", Ne, E(e.title), 1)) : w("", !0),
428
+ (u(!0), b(C, null, M(e.builders, (d, v) => (u(), b(C, {
429
+ key: d.builderKey
430
+ }, [
431
+ v > 0 ? (u(), b("div", Se)) : w("", !0),
432
+ T(f.$slots, "section", { builder: d }, () => [
433
+ A(we, {
434
+ builder: d,
435
+ "model-value": e.formValueFor(d),
436
+ disable: e.disable,
437
+ "onUpdate:modelValue": (s) => o("update-form", { builder: d, form: s })
438
+ }, null, 8, ["builder", "model-value", "disable", "onUpdate:modelValue"])
439
+ ])
440
+ ], 64))), 128)),
441
+ U("div", Te, [
442
+ A(V, {
443
+ label: D(c)("team.memberForm.permissions.conditionApply"),
444
+ size: "md",
445
+ variant: "primary",
446
+ disabled: e.disable || !e.hasChanges,
447
+ onClick: m[0] || (m[0] = (d) => o("apply"))
448
+ }, null, 8, ["label", "disabled"])
449
+ ])
450
+ ], 2);
451
+ };
452
+ }
453
+ });
454
+ export {
455
+ Ie as _,
456
+ _e as a,
457
+ we as b,
458
+ $e as u
459
+ };