@feedmepos/mf-hrm-portal 2.1.1-dev.3 → 2.1.1-dev.4

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 (73) hide show
  1. package/dist/ApprovalCodeList-B0PLZwav.js +758 -0
  2. package/dist/AuditLogList-CRXwPImZ.js +1611 -0
  3. package/dist/ConditionFormHost.vue_vue_type_script_setup_true_lang-zJwkM_Xb.js +387 -0
  4. package/dist/EmployeeList-DN2pnXcS.js +884 -0
  5. package/dist/GrantUserList-DoyxknJZ.js +464 -0
  6. package/dist/{Main-cskEZ3k_.js → Main-B5BKGpLg.js} +1033 -1029
  7. package/dist/Main-BGONIxo8.js +122 -0
  8. package/dist/{Main-DLlpEU3j.js → Main-DQj4xtkB.js} +7 -7
  9. package/dist/PermissionSetList-4uIU9FvN.js +393 -0
  10. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-D0luaKDb.js +4122 -0
  11. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-BJp9hEfv.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DVVSBIx2.js} +1 -0
  12. package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js +42 -0
  13. package/dist/RoleList-Bj5Y5jd_.js +685 -0
  14. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js +16 -0
  15. package/dist/TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js +37 -0
  16. package/dist/TeamMemberList-Byjlca2Y.js +1216 -0
  17. package/dist/{TimesheetList-B1H_6zfP.js → TimesheetList-DwIcsOM-.js} +118 -112
  18. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_91afda4e_lang-DeTpbaRk.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-B9qlQ6KG.js} +2 -2
  19. package/dist/{app-DX-PG6wx.js → app-BZwE2coe.js} +5407 -2374
  20. package/dist/app.js +1 -1
  21. package/dist/{dayjs.min-BJrHE7oz.js → dayjs.min-BXBPls4m.js} +1 -1
  22. package/dist/{employee-BJcqtqLM.js → employee-CJTbs1f7.js} +3 -3
  23. package/dist/{iteration-Cfaqt-0s.js → iteration-BCbIbdHR.js} +1 -1
  24. package/dist/{lodash-ClKqCmlZ.js → lodash-CUIS1iIz.js} +1 -1
  25. package/dist/{role-CR_-nBDY.js → role-CzXchcSS.js} +1 -1
  26. package/dist/rule-BO6xj2Xa.js +1058 -0
  27. package/dist/src/api/audit-log/index.d.ts +6 -0
  28. package/dist/src/components/CheckboxInput.vue.d.ts +1 -1
  29. package/dist/src/components/button/ResponsiveFabButton.vue.d.ts +7 -1
  30. package/dist/src/components/table/TableEmptyState.vue.d.ts +7 -15
  31. package/dist/src/composables/useBasePermission.d.ts +2 -1
  32. package/dist/src/composables/useConditionDraft.d.ts +40 -0
  33. package/dist/src/composables/useCoverConditionOverride.d.ts +61 -0
  34. package/dist/src/helpers/business-timezone.d.ts +22 -0
  35. package/dist/src/helpers/filter.d.ts +15 -0
  36. package/dist/src/helpers/permission-reconcile.d.ts +15 -0
  37. package/dist/src/helpers/permission-reconcile.test.d.ts +1 -0
  38. package/dist/src/helpers/permission-set.d.ts +8 -4
  39. package/dist/src/helpers/rule.d.ts +2 -1
  40. package/dist/src/stores/permission-set.d.ts +12 -3
  41. package/dist/src/types/approval-code.d.ts +22 -7
  42. package/dist/src/types/audit-log.d.ts +1 -1
  43. package/dist/src/views/approval-code/components/ApprovalCodeCreatedDialog.vue.d.ts +9 -0
  44. package/dist/src/views/approval-code/components/ApprovalCodeForm.vue.d.ts +6 -1
  45. package/dist/src/views/approval-code/locales/index.d.ts +40 -0
  46. package/dist/src/views/audit-log/event-line.d.ts +13 -0
  47. package/dist/src/views/audit-log/locales/index.d.ts +296 -0
  48. package/dist/src/views/audit-log/snapshot-diff.d.ts +11 -0
  49. package/dist/src/views/hr/employee/EmployeeList.vue.d.ts +1 -0
  50. package/dist/src/views/team/components/BasePermission.vue.d.ts +13 -0
  51. package/dist/src/views/team/condition-builders/ConditionFormHost.vue.d.ts +22 -0
  52. package/dist/src/views/team/condition-builders/ConditionFormRenderer.vue.d.ts +23 -0
  53. package/dist/src/views/team/condition-builders/component-map.d.ts +4 -0
  54. package/dist/src/views/team/condition-builders/condition-form-dedupe.d.ts +23 -0
  55. package/dist/src/views/team/locales/index.d.ts +80 -0
  56. package/dist/style.css +1 -1
  57. package/dist/tsconfig.app.tsbuildinfo +1 -1
  58. package/dist/useDebounce-B8ZPVS5C.js +15 -0
  59. package/dist/{useReportPermissions-ybHA26cJ.js → useReportPermissions-Q-xLwz5N.js} +3 -3
  60. package/package.json +2 -2
  61. package/dist/ApprovalCodeList-BH5sgVMU.js +0 -638
  62. package/dist/AuditLogList-Q4L5Te8O.js +0 -1145
  63. package/dist/CollapsibleWrapper.vue_vue_type_script_setup_true_lang-BLJlmPVa.js +0 -58
  64. package/dist/EmployeeList-GtKmJZbf.js +0 -899
  65. package/dist/GrantUserList-CnLjOi5_.js +0 -468
  66. package/dist/Main-Cn7Dawg4.js +0 -120
  67. package/dist/PermissionSetList-C2fK2pTz.js +0 -357
  68. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CMh0DL1_.js +0 -3458
  69. package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js +0 -38
  70. package/dist/RoleList-CcuT1ERb.js +0 -567
  71. package/dist/TeamMemberList-Dfs2iNdC.js +0 -1131
  72. package/dist/rule-BB-3S-2R.js +0 -996
  73. package/dist/useDebounce-CWb5QR9G.js +0 -28
@@ -0,0 +1,387 @@
1
+ import { defineComponent as B, ref as N, onMounted as te, nextTick as ne, onUnmounted as oe, resolveComponent as h, createElementBlock as g, openBlock as s, Fragment as U, createElementVNode as x, renderSlot as P, createCommentVNode as E, toDisplayString as ae, createVNode as le, normalizeStyle as ue, watch as W, defineAsyncComponent as re, computed as I, renderList as A, createBlock as p, withCtx as G, unref as D, resolveDynamicComponent as ie } from "vue";
2
+ import { e as H, f as se, U as j } from "./app-BZwE2coe.js";
3
+ import { useI18n as de, useCoreStore as ce } from "@feedmepos/mf-common";
4
+ import { l as me } from "./lodash-CUIS1iIz.js";
5
+ const fe = { class: "flex items-center" }, ve = {
6
+ key: 0,
7
+ class: "ml-8 fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
8
+ }, be = { class: "ml-auto" }, Ne = /* @__PURE__ */ B({
9
+ __name: "CollapsibleWrapper",
10
+ props: {
11
+ title: { default: "" },
12
+ subtitle: { default: "" },
13
+ initiallyCollapsed: { type: Boolean, default: !1 }
14
+ },
15
+ setup(t) {
16
+ const l = N(t.initiallyCollapsed), c = N(), m = N(0);
17
+ let f;
18
+ function F() {
19
+ l.value = !l.value;
20
+ }
21
+ function v() {
22
+ c.value && (m.value = c.value.scrollHeight);
23
+ }
24
+ return te(async () => {
25
+ await ne(), c.value && (f = new ResizeObserver(() => {
26
+ v();
27
+ }), f.observe(c.value));
28
+ }), oe(() => {
29
+ f == null || f.disconnect();
30
+ }), (k, r) => {
31
+ const d = h("FmButton");
32
+ return s(), g(U, null, [
33
+ x("div", { onClick: F }, [
34
+ x("div", fe, [
35
+ P(k.$slots, "title"),
36
+ l.value && t.subtitle ? (s(), g("span", ve, ae(t.subtitle), 1)) : E("", !0),
37
+ x("div", be, [
38
+ le(d, {
39
+ icon: l.value ? "keyboard_arrow_down" : "keyboard_arrow_up",
40
+ "text-color": "neutral-gray-400",
41
+ variant: "tertiary",
42
+ size: "md"
43
+ }, null, 8, ["icon"])
44
+ ])
45
+ ])
46
+ ]),
47
+ x("div", {
48
+ ref_key: "contentRef",
49
+ ref: c,
50
+ class: "transition-all duration-300 ease-in-out overflow-hidden",
51
+ style: ue({ maxHeight: l.value ? "0" : m.value + "px" })
52
+ }, [
53
+ P(k.$slots, "default")
54
+ ], 4)
55
+ ], 64);
56
+ };
57
+ }
58
+ });
59
+ function O(t) {
60
+ return `${t.subject}::${t.builderKey}`;
61
+ }
62
+ function Se(t) {
63
+ const u = N(/* @__PURE__ */ new Map());
64
+ function l(r, d) {
65
+ const y = new Map(u.value);
66
+ y.set(O(r), d), u.value = y;
67
+ }
68
+ function c(r) {
69
+ return u.value.get(O(r));
70
+ }
71
+ function m(r) {
72
+ for (const d of u.value.keys())
73
+ if (d.startsWith(`${r}::`)) return !0;
74
+ return !1;
75
+ }
76
+ function f(r) {
77
+ const d = /* @__PURE__ */ new Map();
78
+ for (const [y, S] of u.value.entries())
79
+ y.startsWith(`${r}::`) && d.set(y, S);
80
+ return d;
81
+ }
82
+ function F(r) {
83
+ const d = new Map(u.value);
84
+ for (const y of Array.from(d.keys()))
85
+ y.startsWith(`${r}::`) && d.delete(y);
86
+ u.value = d;
87
+ }
88
+ function v() {
89
+ u.value = /* @__PURE__ */ new Map();
90
+ }
91
+ function k(r) {
92
+ const d = new Map(u.value);
93
+ d.delete(O(r)), u.value = d;
94
+ }
95
+ return t && W(
96
+ t,
97
+ () => {
98
+ v();
99
+ },
100
+ { deep: !0 }
101
+ ), {
102
+ drafts: u,
103
+ setDraft: l,
104
+ getDraft: c,
105
+ hasDraftsForSubject: m,
106
+ getDraftsForSubject: f,
107
+ clearDraftsForSubject: F,
108
+ clearAllDrafts: v,
109
+ clearDraft: k
110
+ };
111
+ }
112
+ const ye = {}, L = /* @__PURE__ */ new Map();
113
+ function pe(t) {
114
+ const u = L.get(t);
115
+ if (u) return u;
116
+ const l = ye[t];
117
+ if (!l) return;
118
+ const c = re(l);
119
+ return L.set(t, c), c;
120
+ }
121
+ function ke(t, u) {
122
+ return !me.isEqual(t, u);
123
+ }
124
+ const Ve = { class: "flex flex-col gap-8" }, he = { class: "flex flex-col gap-4" }, ge = "condition-form-select-menu", Z = 120, Fe = 220, Ce = /* @__PURE__ */ B({
125
+ __name: "ConditionFormRenderer",
126
+ props: {
127
+ config: {},
128
+ modelValue: {},
129
+ disabled: { type: Boolean, default: !1 },
130
+ optionProviders: { default: () => ({}) }
131
+ },
132
+ emits: ["update:modelValue"],
133
+ setup(t, { emit: u }) {
134
+ const l = t, c = u, { t: m } = de(), f = ce(), F = I(() => H(l.config, l.modelValue));
135
+ let v = l.modelValue;
136
+ W(
137
+ () => l.modelValue,
138
+ (e) => {
139
+ v = e;
140
+ }
141
+ );
142
+ function k(e) {
143
+ return "static" in e ? e.static.map((n) => ({ value: n.value, label: m(n.labelKey) })) : l.optionProviders[e.provider] ?? [];
144
+ }
145
+ function r(e, n) {
146
+ const a = d(
147
+ se(l.config, { ...l.modelValue, [e]: n })
148
+ );
149
+ ke(a, v) && (v = a, c("update:modelValue", a));
150
+ }
151
+ function d(e) {
152
+ const n = { ...e };
153
+ for (const a of H(l.config, n))
154
+ a.kind === "date" && !n[a.key] && (n[a.key] = K(J()));
155
+ return n;
156
+ }
157
+ function y() {
158
+ const e = f.currentBusiness.value;
159
+ if (e != null && e.timezone) return e.timezone;
160
+ if (e != null && e.timeZone) return e.timeZone;
161
+ const n = (e == null ? void 0 : e.country) ?? (f.currentCountry.value instanceof Object ? f.currentCountry.value.code : f.currentCountry.value);
162
+ return S(n);
163
+ }
164
+ function S(e) {
165
+ switch ((e || "").toUpperCase()) {
166
+ case "MY":
167
+ return "Asia/Kuala_Lumpur";
168
+ case "SG":
169
+ return "Asia/Singapore";
170
+ case "TH":
171
+ return "Asia/Bangkok";
172
+ case "ID":
173
+ return "Asia/Jakarta";
174
+ case "MO":
175
+ return "Asia/Macau";
176
+ case "BN":
177
+ return "Asia/Brunei";
178
+ case "PK":
179
+ return "Asia/Karachi";
180
+ case "MV":
181
+ return "Indian/Maldives";
182
+ case "VN":
183
+ return "Asia/Ho_Chi_Minh";
184
+ case "JP":
185
+ return "Asia/Tokyo";
186
+ case "AU":
187
+ return "Australia/Sydney";
188
+ case "AE":
189
+ return "Asia/Dubai";
190
+ case "UK":
191
+ return "Europe/London";
192
+ default:
193
+ return Intl.DateTimeFormat().resolvedOptions().timeZone;
194
+ }
195
+ }
196
+ function $(e, n) {
197
+ const a = new Intl.DateTimeFormat("en-CA", {
198
+ timeZone: n,
199
+ year: "numeric",
200
+ month: "2-digit",
201
+ day: "2-digit",
202
+ hour: "2-digit",
203
+ minute: "2-digit",
204
+ second: "2-digit",
205
+ hourCycle: "h23"
206
+ }).formatToParts(e), b = Object.fromEntries(
207
+ a.filter((V) => V.type !== "literal").map((V) => [V.type, V.value])
208
+ );
209
+ return {
210
+ year: Number(b.year),
211
+ month: Number(b.month),
212
+ day: Number(b.day),
213
+ hour: Number(b.hour),
214
+ minute: Number(b.minute),
215
+ second: Number(b.second)
216
+ };
217
+ }
218
+ function z(e, n) {
219
+ try {
220
+ const a = $(n, e);
221
+ return (Date.UTC(
222
+ a.year,
223
+ a.month - 1,
224
+ a.day,
225
+ a.hour,
226
+ a.minute,
227
+ a.second
228
+ ) - n.getTime()) / 6e4;
229
+ } catch {
230
+ return 0;
231
+ }
232
+ }
233
+ function K(e) {
234
+ const [n, a, b] = e.split("-").map(Number);
235
+ if (!n || !a || !b) return "";
236
+ const V = y(), C = new Date(Date.UTC(n, a - 1, b, 0, 0, 0, 0)), M = z(V, C), w = new Date(C.getTime() - M * 6e4), _ = z(V, w);
237
+ return new Date(C.getTime() - _ * 6e4).toISOString();
238
+ }
239
+ function R(e) {
240
+ const n = new Date(e);
241
+ if (Number.isNaN(n.getTime())) return "";
242
+ try {
243
+ const a = $(n, y());
244
+ return `${String(a.year).padStart(4, "0")}-${String(a.month).padStart(2, "0")}-${String(a.day).padStart(2, "0")}`;
245
+ } catch {
246
+ return e.slice(0, 10);
247
+ }
248
+ }
249
+ function J() {
250
+ return R((/* @__PURE__ */ new Date()).toISOString());
251
+ }
252
+ function T(e) {
253
+ return "options" in e ? k(e.options) : [];
254
+ }
255
+ function X(e) {
256
+ const n = l.modelValue[e];
257
+ return n == null ? "" : String(n);
258
+ }
259
+ function q(e) {
260
+ const n = l.modelValue[e];
261
+ return typeof n != "string" || !n ? "" : R(n);
262
+ }
263
+ function Y(e, n) {
264
+ r(e, n ? K(n) : "");
265
+ }
266
+ function Q(e, n) {
267
+ let a = Math.floor(Number(n) || (e.min ?? 0));
268
+ e.min !== void 0 && (a = Math.max(e.min, a)), e.max !== void 0 && (a = Math.min(e.max, a)), r(e.key, a);
269
+ }
270
+ return (e, n) => {
271
+ const a = h("FmRadio"), b = h("FmRadioGroup"), V = h("FmSelect"), C = h("FmTextField"), M = h("FmDatePicker"), w = h("FmCheckbox"), _ = h("FmFormGroup");
272
+ return s(), g("div", Ve, [
273
+ (s(!0), g(U, null, A(F.value, (o) => (s(), g(U, {
274
+ key: o.key
275
+ }, [
276
+ o.kind === "radio" ? (s(), p(b, {
277
+ key: 0,
278
+ "model-value": t.modelValue[o.key],
279
+ disabled: t.disabled,
280
+ "onUpdate:modelValue": (i) => r(o.key, i)
281
+ }, {
282
+ default: G(() => [
283
+ (s(!0), g(U, null, A(T(o), (i) => (s(), p(a, {
284
+ key: i.value,
285
+ value: i.value,
286
+ label: i.label
287
+ }, null, 8, ["value", "label"]))), 128))
288
+ ]),
289
+ _: 2
290
+ }, 1032, ["model-value", "disabled", "onUpdate:modelValue"])) : o.kind === "select" ? (s(), p(V, {
291
+ key: 1,
292
+ "model-value": t.modelValue[o.key],
293
+ label: D(m)(o.labelKey),
294
+ items: T(o),
295
+ "menu-id": ge,
296
+ "menu-z-index": Z,
297
+ "max-height": Fe,
298
+ "shift-menu": "",
299
+ placement: "bottom-start",
300
+ disabled: t.disabled,
301
+ "onUpdate:modelValue": (i) => r(o.key, i)
302
+ }, null, 8, ["model-value", "label", "items", "disabled", "onUpdate:modelValue"])) : o.kind === "number" ? (s(), p(C, {
303
+ key: 2,
304
+ "model-value": X(o.key),
305
+ type: "number",
306
+ class: "!w-[120px] ml-32",
307
+ label: D(m)(o.labelKey),
308
+ disabled: t.disabled,
309
+ "onUpdate:modelValue": (i) => Q(o, i)
310
+ }, null, 8, ["model-value", "label", "disabled", "onUpdate:modelValue"])) : o.kind === "text" ? (s(), p(C, {
311
+ key: 3,
312
+ "model-value": t.modelValue[o.key] ?? "",
313
+ label: D(m)(o.labelKey),
314
+ disabled: t.disabled,
315
+ "onUpdate:modelValue": (i) => r(o.key, i)
316
+ }, null, 8, ["model-value", "label", "disabled", "onUpdate:modelValue"])) : o.kind === "date" ? (s(), p(M, {
317
+ key: 4,
318
+ "model-value": q(o.key),
319
+ label: D(m)(o.labelKey),
320
+ "z-index": Z,
321
+ disabled: t.disabled,
322
+ "onUpdate:modelValue": (i) => Y(o.key, i)
323
+ }, null, 8, ["model-value", "label", "disabled", "onUpdate:modelValue"])) : o.kind === "switch" ? (s(), p(w, {
324
+ key: 5,
325
+ "model-value": !!t.modelValue[o.key],
326
+ value: !0,
327
+ label: D(m)(o.labelKey),
328
+ disabled: t.disabled,
329
+ "onUpdate:modelValue": (i) => r(o.key, i)
330
+ }, null, 8, ["model-value", "label", "disabled", "onUpdate:modelValue"])) : o.kind === "multiselect" ? (s(), p(_, {
331
+ key: 6,
332
+ "model-value": t.modelValue[o.key] ?? [],
333
+ "onUpdate:modelValue": (i) => r(o.key, i)
334
+ }, {
335
+ default: G(() => [
336
+ x("div", he, [
337
+ (s(!0), g(U, null, A(T(o), (i) => (s(), p(w, {
338
+ key: i.value,
339
+ "model-value": t.modelValue[o.key] ?? [],
340
+ value: i.value,
341
+ label: i.label,
342
+ disabled: t.disabled,
343
+ "onUpdate:modelValue": (ee) => r(o.key, ee)
344
+ }, null, 8, ["model-value", "value", "label", "disabled", "onUpdate:modelValue"]))), 128))
345
+ ])
346
+ ]),
347
+ _: 2
348
+ }, 1032, ["model-value", "onUpdate:modelValue"])) : E("", !0)
349
+ ], 64))), 128))
350
+ ]);
351
+ };
352
+ }
353
+ }), Te = /* @__PURE__ */ B({
354
+ __name: "ConditionFormHost",
355
+ props: {
356
+ builder: {},
357
+ modelValue: {},
358
+ disable: { type: Boolean, default: !1 },
359
+ optionProviders: { default: () => ({}) }
360
+ },
361
+ emits: ["update:modelValue"],
362
+ setup(t, { emit: u }) {
363
+ const l = t, c = u, m = I(
364
+ () => l.builder.form && j(l.builder.form) ? l.builder.form : void 0
365
+ ), f = I(
366
+ () => l.builder.form && !j(l.builder.form) ? pe(l.builder.form.component) : void 0
367
+ );
368
+ return (F, v) => m.value ? (s(), p(Ce, {
369
+ key: 0,
370
+ config: m.value,
371
+ "model-value": t.modelValue ?? m.value.defaults,
372
+ disabled: t.disable,
373
+ "option-providers": t.optionProviders,
374
+ "onUpdate:modelValue": v[0] || (v[0] = (k) => c("update:modelValue", k))
375
+ }, null, 8, ["config", "model-value", "disabled", "option-providers"])) : f.value ? (s(), p(ie(f.value), {
376
+ key: 1,
377
+ "model-value": t.modelValue,
378
+ disable: t.disable,
379
+ "onUpdate:modelValue": v[1] || (v[1] = (k) => c("update:modelValue", k))
380
+ }, null, 8, ["model-value", "disable"])) : E("", !0);
381
+ }
382
+ });
383
+ export {
384
+ Ne as _,
385
+ Te as a,
386
+ Se as u
387
+ };