@feedmepos/mf-hrm-portal 2.2.5-dev → 2.2.5-dev.10

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 (167) hide show
  1. package/dist/{ApprovalCodeList-DgcWZ3SZ.js → ApprovalCodeList-BsDMMSIz.js} +4 -4
  2. package/dist/{AuditLogList-vWKMMGvd.js → AuditLogList-CGNZdtmn.js} +18 -17
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DuhXogXK.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C6MoToqi.js} +2 -2
  4. package/dist/EmployeeList-B_OuDWWQ.js +787 -0
  5. package/dist/{FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js → FormItem.vue_vue_type_script_setup_true_lang-CUnlKsxk.js} +1 -1
  6. package/dist/{GrantUserList-BAW0C1bA.js → GrantUserList-Bd0lXmFo.js} +5 -5
  7. package/dist/{Main-NzpdRNB3.js → Main-B66lSeOv.js} +5 -5
  8. package/dist/{Main-Wr6cTqfM.js → Main-CzHSNHsH.js} +2 -2
  9. package/dist/{Main-B7Nn8CLQ.js → Main-njRQ1tFk.js} +9 -9
  10. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js +243 -0
  11. package/dist/{PermissionSetList-D6AFOleD.js → PermissionSetList-GTI6Cwj5.js} +18 -18
  12. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Bzq2_BMn.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-C-QEQ-js.js} +1052 -1052
  13. package/dist/{RoleList-BuqpmXn_.js → RoleList-CmHgtM0m.js} +7 -7
  14. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-SFqxftRx.js +426 -0
  15. package/dist/ScheduleButton.vue_vue_type_script_setup_true_lang-CrWfo-zF.js +690 -0
  16. package/dist/ScheduleGeneralPage-DxFxJN5j.js +320 -0
  17. package/dist/SchedulePage-cJDI3-E7.js +14647 -0
  18. package/dist/SchedulePositionPage-n1wUShIM.js +293 -0
  19. package/dist/ScheduleSelect.vue_vue_type_script_setup_true_lang-B8W4sTsA.js +242 -0
  20. package/dist/SelectFilter-CG13h83-.js +264 -0
  21. package/dist/TeamMemberList-ByZt3VqN.js +1154 -0
  22. package/dist/{TimesheetList-B5FyVyCz.js → TimesheetList-Dv0-W--W.js} +54 -53
  23. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-C99Jr6Ax.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-DIo6h5-a.js} +2 -2
  24. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  25. package/dist/{app-8samJY5z.js → app-SCXGJ95F.js} +3146 -2553
  26. package/dist/app.js +1 -1
  27. package/dist/{dayjs.min-Ba4X_9nY.js → dayjs.min-DqMLPYv-.js} +1 -1
  28. package/dist/{employee-BcFgm8Rt.js → employee-DT_xYQkz.js} +3 -3
  29. package/dist/{iteration-Dhdew1jW.js → iteration-B5dB9ecy.js} +1 -1
  30. package/dist/{lodash-CJ3mHku0.js → lodash-CRHFapxI.js} +1 -1
  31. package/dist/{role-BViYS7RK.js → role-CJm8pXaw.js} +1 -1
  32. package/dist/{rule-Dxt1ZSQS.js → rule-AJm-eVzJ.js} +276 -272
  33. package/dist/src/api/schedule/index.d.ts +41 -0
  34. package/dist/src/components/form/OutletRoleAssignment.vue.d.ts +16 -0
  35. package/dist/src/components/layout/AppSidebar.vue.d.ts +2 -0
  36. package/dist/src/components/layout/PortalShell.vue.d.ts +12 -0
  37. package/dist/src/components/layout/withShell.d.ts +14 -0
  38. package/dist/src/helpers/outlet-role-assignment.d.ts +40 -0
  39. package/dist/src/helpers/rule.d.ts +15 -0
  40. package/dist/src/router/shared.d.ts +4 -1
  41. package/dist/src/types/schedule.d.ts +232 -0
  42. package/dist/src/views/scheduling/ScheduleGeneralPage.vue.d.ts +3 -0
  43. package/dist/src/views/scheduling/SchedulePage.vue.d.ts +3 -0
  44. package/dist/src/views/scheduling/SchedulePositionPage.vue.d.ts +3 -0
  45. package/dist/src/views/scheduling/components/ScheduleAddEmployeeIdentitySection.vue.d.ts +6 -0
  46. package/dist/src/views/scheduling/components/ScheduleAddEmployeeModal.vue.d.ts +10 -0
  47. package/dist/src/views/scheduling/components/ScheduleAddEmployeeModeStep.vue.d.ts +6 -0
  48. package/dist/src/views/scheduling/components/ScheduleAddEmployeePosAccessSection.vue.d.ts +6 -0
  49. package/dist/src/views/scheduling/components/ScheduleAddEmployeePositionsSection.vue.d.ts +10 -0
  50. package/dist/src/views/scheduling/components/ScheduleAddEmployeeSchedulingSection.vue.d.ts +6 -0
  51. package/dist/src/views/scheduling/components/ScheduleAddPickPopover.vue.d.ts +6 -0
  52. package/dist/src/views/scheduling/components/ScheduleAddPositionModal.vue.d.ts +6 -0
  53. package/dist/src/views/scheduling/components/ScheduleAllShiftsRow.vue.d.ts +22 -0
  54. package/dist/src/views/scheduling/components/ScheduleAreaRows.vue.d.ts +34 -0
  55. package/dist/src/views/scheduling/components/ScheduleAssignEmployeePopover.vue.d.ts +6 -0
  56. package/dist/src/views/scheduling/components/ScheduleAutoScheduleModal.vue.d.ts +10 -0
  57. package/dist/src/views/scheduling/components/ScheduleButton.vue.d.ts +23 -0
  58. package/dist/src/views/scheduling/components/ScheduleChangeEmployeeModal.vue.d.ts +8 -0
  59. package/dist/src/views/scheduling/components/ScheduleConfirmModal.vue.d.ts +24 -0
  60. package/dist/src/views/scheduling/components/ScheduleCostRail.vue.d.ts +8 -0
  61. package/dist/src/views/scheduling/components/ScheduleDateRangePopover.vue.d.ts +6 -0
  62. package/dist/src/views/scheduling/components/ScheduleDayNotePopover.vue.d.ts +6 -0
  63. package/dist/src/views/scheduling/components/ScheduleDayTimeline.vue.d.ts +12 -0
  64. package/dist/src/views/scheduling/components/ScheduleDemandRow.vue.d.ts +23 -0
  65. package/dist/src/views/scheduling/components/ScheduleDemandSheet.vue.d.ts +10 -0
  66. package/dist/src/views/scheduling/components/ScheduleDotsIcon.vue.d.ts +2 -0
  67. package/dist/src/views/scheduling/components/ScheduleEmployeeDetailPanel.vue.d.ts +12 -0
  68. package/dist/src/views/scheduling/components/ScheduleEmployeeIdentity.vue.d.ts +17 -0
  69. package/dist/src/views/scheduling/components/ScheduleEmployeeMenu.vue.d.ts +6 -0
  70. package/dist/src/views/scheduling/components/ScheduleFilterBar.vue.d.ts +18 -0
  71. package/dist/src/views/scheduling/components/ScheduleGapPopover.vue.d.ts +6 -0
  72. package/dist/src/views/scheduling/components/ScheduleGridHeader.vue.d.ts +18 -0
  73. package/dist/src/views/scheduling/components/ScheduleGridSkeleton.vue.d.ts +2 -0
  74. package/dist/src/views/scheduling/components/ScheduleLeaveEditModal.vue.d.ts +8 -0
  75. package/dist/src/views/scheduling/components/ScheduleLegendBar.vue.d.ts +6 -0
  76. package/dist/src/views/scheduling/components/ScheduleOnboardingWelcome.vue.d.ts +12 -0
  77. package/dist/src/views/scheduling/components/ScheduleOnboardingWizard.vue.d.ts +9 -0
  78. package/dist/src/views/scheduling/components/ScheduleOpenShiftCardMenu.vue.d.ts +14 -0
  79. package/dist/src/views/scheduling/components/SchedulePdfPreview.vue.d.ts +6 -0
  80. package/dist/src/views/scheduling/components/SchedulePublishModal.vue.d.ts +8 -0
  81. package/dist/src/views/scheduling/components/ScheduleReviewBar.vue.d.ts +12 -0
  82. package/dist/src/views/scheduling/components/ScheduleSelect.vue.d.ts +54 -0
  83. package/dist/src/views/scheduling/components/ScheduleSelectExistingEmployeeModal.vue.d.ts +6 -0
  84. package/dist/src/views/scheduling/components/ScheduleShiftCardMenu.vue.d.ts +12 -0
  85. package/dist/src/views/scheduling/components/ScheduleShiftCell.vue.d.ts +35 -0
  86. package/dist/src/views/scheduling/components/ScheduleShiftHeadcountEditor.vue.d.ts +10 -0
  87. package/dist/src/views/scheduling/components/ScheduleShiftImpact.vue.d.ts +6 -0
  88. package/dist/src/views/scheduling/components/ScheduleShiftMoreOptions.vue.d.ts +6 -0
  89. package/dist/src/views/scheduling/components/ScheduleShiftPopover.vue.d.ts +16 -0
  90. package/dist/src/views/scheduling/components/ScheduleShiftRepeatDaysRow.vue.d.ts +8 -0
  91. package/dist/src/views/scheduling/components/ScheduleShiftSegmentsEditor.vue.d.ts +8 -0
  92. package/dist/src/views/scheduling/components/ScheduleShiftWhoPicker.vue.d.ts +25 -0
  93. package/dist/src/views/scheduling/components/ScheduleStackPopover.vue.d.ts +14 -0
  94. package/dist/src/views/scheduling/components/ScheduleStaffRail.vue.d.ts +18 -0
  95. package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +60 -0
  96. package/dist/src/views/scheduling/components/ScheduleStatsRow.vue.d.ts +12 -0
  97. package/dist/src/views/scheduling/components/ScheduleSwapShiftsModal.vue.d.ts +8 -0
  98. package/dist/src/views/scheduling/components/ScheduleTimePickerPopover.vue.d.ts +6 -0
  99. package/dist/src/views/scheduling/components/ScheduleTopbar.vue.d.ts +20 -0
  100. package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +72 -0
  101. package/dist/src/views/scheduling/composables/schedule-board-helpers.d.ts +38 -0
  102. package/dist/src/views/scheduling/composables/schedule-day-meta.d.ts +29 -0
  103. package/dist/src/views/scheduling/composables/schedule-employee-profile.d.ts +7 -0
  104. package/dist/src/views/scheduling/composables/schedule-popover-position.d.ts +16 -0
  105. package/dist/src/views/scheduling/composables/schedule-shift-time.d.ts +14 -0
  106. package/dist/src/views/scheduling/composables/schedule-week-cache.d.ts +10 -0
  107. package/dist/src/views/scheduling/composables/scheduleAutoSolver.d.ts +21 -0
  108. package/dist/src/views/scheduling/composables/useCollapsedList.d.ts +9 -0
  109. package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +98 -0
  110. package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +73 -0
  111. package/dist/src/views/scheduling/composables/useScheduleAllShiftsRow.d.ts +77 -0
  112. package/dist/src/views/scheduling/composables/useScheduleAreaBoard.d.ts +50 -0
  113. package/dist/src/views/scheduling/composables/useScheduleAreaDragDrop.d.ts +18 -0
  114. package/dist/src/views/scheduling/composables/useScheduleAssign.d.ts +122 -0
  115. package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +143 -0
  116. package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +426 -0
  117. package/dist/src/views/scheduling/composables/useScheduleCellState.d.ts +27 -0
  118. package/dist/src/views/scheduling/composables/useScheduleClashDetection.d.ts +18 -0
  119. package/dist/src/views/scheduling/composables/useScheduleCopyWeek.d.ts +19 -0
  120. package/dist/src/views/scheduling/composables/useScheduleCostRail.d.ts +43 -0
  121. package/dist/src/views/scheduling/composables/useScheduleDayNote.d.ts +48 -0
  122. package/dist/src/views/scheduling/composables/useScheduleDayTimeline.d.ts +77 -0
  123. package/dist/src/views/scheduling/composables/useScheduleDemand.d.ts +76 -0
  124. package/dist/src/views/scheduling/composables/useScheduleDemandRow.d.ts +45 -0
  125. package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +145 -0
  126. package/dist/src/views/scheduling/composables/useScheduleDragDrop.d.ts +22 -0
  127. package/dist/src/views/scheduling/composables/useScheduleEmployeeIdentity.d.ts +41 -0
  128. package/dist/src/views/scheduling/composables/useScheduleEmployeeMenu.d.ts +35 -0
  129. package/dist/src/views/scheduling/composables/useScheduleEmployeeProfile.d.ts +16 -0
  130. package/dist/src/views/scheduling/composables/useScheduleExport.d.ts +26 -0
  131. package/dist/src/views/scheduling/composables/useScheduleFilterBar.d.ts +14 -0
  132. package/dist/src/views/scheduling/composables/useScheduleGapPopover.d.ts +82 -0
  133. package/dist/src/views/scheduling/composables/useScheduleLeave.d.ts +70 -0
  134. package/dist/src/views/scheduling/composables/useScheduleLegend.d.ts +15 -0
  135. package/dist/src/views/scheduling/composables/useScheduleLegendBar.d.ts +35 -0
  136. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1316 -0
  137. package/dist/src/views/scheduling/composables/useScheduleOpenShiftCard.d.ts +23 -0
  138. package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +20 -0
  139. package/dist/src/views/scheduling/composables/useSchedulePositionModal.d.ts +50 -0
  140. package/dist/src/views/scheduling/composables/useSchedulePositions.d.ts +32 -0
  141. package/dist/src/views/scheduling/composables/useSchedulePublish.d.ts +93 -0
  142. package/dist/src/views/scheduling/composables/useScheduleRangeCalendar.d.ts +27 -0
  143. package/dist/src/views/scheduling/composables/useScheduleRoster.d.ts +189 -0
  144. package/dist/src/views/scheduling/composables/useScheduleSettings.d.ts +54 -0
  145. package/dist/src/views/scheduling/composables/useScheduleSetupBanner.d.ts +18 -0
  146. package/dist/src/views/scheduling/composables/useScheduleShiftActions.d.ts +163 -0
  147. package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +181 -0
  148. package/dist/src/views/scheduling/composables/useScheduleStaffRail.d.ts +23 -0
  149. package/dist/src/views/scheduling/composables/useScheduleStatsRow.d.ts +25 -0
  150. package/dist/src/views/scheduling/composables/useScheduleTimePicker.d.ts +49 -0
  151. package/dist/src/views/scheduling/composables/useScheduleTopbar.d.ts +10 -0
  152. package/dist/src/views/scheduling/composables/useScheduleViewportFit.d.ts +9 -0
  153. package/dist/src/views/scheduling/data.d.ts +110 -0
  154. package/dist/src/views/scheduling/locales/index.d.ts +496 -0
  155. package/dist/src/views/scheduling/schedule-store.d.ts +151 -0
  156. package/dist/src/views/scheduling/types.d.ts +324 -0
  157. package/dist/src/views/team/components/PortalConditionForm.vue.d.ts +2 -2
  158. package/dist/src/views/team/condition-builders/ConditionBuilderForm.vue.d.ts +2 -2
  159. package/dist/src/views/team/member/TeamMemberMasterUser.vue.d.ts +12 -3
  160. package/dist/style.css +1 -1
  161. package/dist/tsconfig.app.tsbuildinfo +1 -1
  162. package/dist/{useReportPermissions-BiyAfGvZ.js → useReportPermissions-Cg3lV70m.js} +3 -3
  163. package/package.json +1 -1
  164. package/dist/EmployeeList-Cu4RxVQX.js +0 -889
  165. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-BUI0Xsgc.js +0 -85
  166. package/dist/SelectFilter-ATOm0hdn.js +0 -269
  167. package/dist/TeamMemberList-M6HA9BWu.js +0 -1248
@@ -0,0 +1,293 @@
1
+ import { defineComponent as $, ref as D, onMounted as N, createElementBlock as l, openBlock as d, createElementVNode as i, createVNode as o, withCtx as r, toDisplayString as v, unref as e, createTextVNode as u, normalizeClass as g, createCommentVNode as E, withDirectives as b, withKeys as m, vModelText as h, Fragment as p, renderList as z, withModifiers as f } from "vue";
2
+ import { useRouter as M } from "vue-router";
3
+ import { R as x } from "./app-SCXGJ95F.js";
4
+ import { H as A, I as S, y as P, _ as c } from "./ScheduleButton.vue_vue_type_script_setup_true_lang-CrWfo-zF.js";
5
+ import { u as V, a as F, _ as B } from "./ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-SFqxftRx.js";
6
+ import { _ as I } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
+ const K = { class: "main" }, L = {
8
+ id: "viewPositions",
9
+ class: "view"
10
+ }, R = { class: "sp-head" }, U = { class: "sp-body" }, j = { class: "sp-content" }, H = { class: "sp-panel" }, T = { class: "cfg-head" }, W = { class: "cfg-count" }, q = { id: "skList" }, O = {
11
+ key: 0,
12
+ class: "cfg-empty"
13
+ }, G = {
14
+ key: 1,
15
+ class: "cfg-list"
16
+ }, J = {
17
+ key: 0,
18
+ class: "cfg-row"
19
+ }, Q = { class: "cfg-main" }, X = {
20
+ key: 0,
21
+ class: "cfg-row"
22
+ }, Y = { class: "cfg-main" }, Z = ["onKeyup"], ee = ["onClick"], se = { class: "cfg-main" }, te = { class: "cfg-name" }, ie = {
23
+ key: 0,
24
+ class: "cfg-confirm"
25
+ }, ne = { class: "q" }, oe = /* @__PURE__ */ $({
26
+ __name: "SchedulePositionPage",
27
+ setup(ae) {
28
+ const y = D(null);
29
+ A(y);
30
+ const C = M(), s = V(), _ = S(), k = F();
31
+ N(async () => {
32
+ await _.resolve() && await P(/* @__PURE__ */ new Date());
33
+ });
34
+ function w() {
35
+ C.push({ name: x.SCHEDULE });
36
+ }
37
+ return (le, t) => (d(), l("div", {
38
+ ref_key: "rootEl",
39
+ ref: y,
40
+ class: "sch"
41
+ }, [
42
+ i("div", K, [
43
+ i("div", L, [
44
+ i("div", R, [
45
+ o(c, {
46
+ hierarchy: "ghost",
47
+ size: "sm",
48
+ class: "sp-back",
49
+ type: "button",
50
+ onClick: w
51
+ }, {
52
+ default: r(() => [...t[10] || (t[10] = [
53
+ i("svg", {
54
+ width: "12",
55
+ height: "12",
56
+ viewBox: "0 0 16 16",
57
+ fill: "none",
58
+ "aria-hidden": "true"
59
+ }, [
60
+ i("path", {
61
+ d: "M10 3.5L5.5 8l4.5 4.5",
62
+ stroke: "currentColor",
63
+ "stroke-width": "1.7",
64
+ "stroke-linecap": "round",
65
+ "stroke-linejoin": "round"
66
+ })
67
+ ], -1),
68
+ i("span", null, "Back to schedule", -1)
69
+ ])]),
70
+ _: 1
71
+ }),
72
+ t[11] || (t[11] = i("div", { class: "sp-title" }, "Position", -1)),
73
+ t[12] || (t[12] = i("div", { class: "sp-sub" }, "What your staff can do — the same catalogue across every outlet.", -1))
74
+ ]),
75
+ i("div", U, [
76
+ i("div", j, [
77
+ i("div", H, [
78
+ i("div", T, [
79
+ t[14] || (t[14] = i("div", { class: "cfg-title" }, "Configured positions", -1)),
80
+ i("span", W, v(e(s).count.value), 1),
81
+ t[15] || (t[15] = i("span", { class: "cfg-spacer" }, null, -1)),
82
+ o(c, {
83
+ hierarchy: "primary",
84
+ size: "sm",
85
+ class: "am-btn am-btn-primary",
86
+ type: "button",
87
+ onClick: t[0] || (t[0] = (n) => e(k).openNew())
88
+ }, {
89
+ default: r(() => [...t[13] || (t[13] = [
90
+ u(" + Add position ", -1)
91
+ ])]),
92
+ _: 1
93
+ })
94
+ ]),
95
+ i("div", {
96
+ class: g(["ce-err", { show: e(s).error.value }])
97
+ }, v(e(s).error.value), 3),
98
+ i("div", q, [
99
+ !e(s).positions.value.length && !e(s).isAdding.value ? (d(), l("div", O, [...t[16] || (t[16] = [
100
+ u(" No positions yet.", -1),
101
+ i("br", null, null, -1),
102
+ u(" Add one and it becomes assignable on every employee. ", -1)
103
+ ])])) : (d(), l("div", G, [
104
+ e(s).isAdding.value ? (d(), l("div", J, [
105
+ i("div", Q, [
106
+ b(i("input", {
107
+ "onUpdate:modelValue": t[1] || (t[1] = (n) => e(s).newName.value = n),
108
+ type: "text",
109
+ class: "cfg-name-input",
110
+ placeholder: "New position name",
111
+ autofocus: "",
112
+ onKeyup: [
113
+ t[2] || (t[2] = m((n) => e(s).confirmAdd(), ["enter"])),
114
+ t[3] || (t[3] = m((n) => e(s).cancelAdd(), ["esc"]))
115
+ ]
116
+ }, null, 544), [
117
+ [h, e(s).newName.value]
118
+ ])
119
+ ]),
120
+ o(c, {
121
+ hierarchy: "secondary",
122
+ size: "sm",
123
+ class: "cfg-btn",
124
+ type: "button",
125
+ disabled: !e(s).newName.value.trim() || e(s).saving.value,
126
+ onClick: t[4] || (t[4] = (n) => e(s).confirmAdd())
127
+ }, {
128
+ default: r(() => [
129
+ u(v(e(s).saving.value ? "Adding…" : "Add"), 1)
130
+ ]),
131
+ _: 1
132
+ }, 8, ["disabled"]),
133
+ o(c, {
134
+ hierarchy: "secondary",
135
+ size: "sm",
136
+ class: "cfg-btn",
137
+ type: "button",
138
+ disabled: e(s).saving.value,
139
+ onClick: t[5] || (t[5] = (n) => e(s).cancelAdd())
140
+ }, {
141
+ default: r(() => [...t[17] || (t[17] = [
142
+ u(" Cancel ", -1)
143
+ ])]),
144
+ _: 1
145
+ }, 8, ["disabled"])
146
+ ])) : E("", !0),
147
+ (d(!0), l(p, null, z(e(s).positions.value, (n) => (d(), l(p, {
148
+ key: n.id
149
+ }, [
150
+ e(s).editingId.value === n.id ? (d(), l("div", X, [
151
+ i("div", Y, [
152
+ b(i("input", {
153
+ "onUpdate:modelValue": t[6] || (t[6] = (a) => e(s).editingName.value = a),
154
+ type: "text",
155
+ class: "cfg-name-input",
156
+ autofocus: "",
157
+ onKeyup: [
158
+ m((a) => e(s).saveEdit(n.id), ["enter"]),
159
+ t[7] || (t[7] = m((a) => e(s).cancelEdit(), ["esc"]))
160
+ ]
161
+ }, null, 40, Z), [
162
+ [h, e(s).editingName.value]
163
+ ])
164
+ ]),
165
+ o(c, {
166
+ hierarchy: "secondary",
167
+ size: "sm",
168
+ class: "cfg-btn",
169
+ type: "button",
170
+ disabled: !e(s).editingName.value.trim() || e(s).saving.value,
171
+ onClick: (a) => e(s).saveEdit(n.id)
172
+ }, {
173
+ default: r(() => [
174
+ u(v(e(s).saving.value ? "Saving…" : "Save"), 1)
175
+ ]),
176
+ _: 1
177
+ }, 8, ["disabled", "onClick"]),
178
+ o(c, {
179
+ hierarchy: "secondary",
180
+ size: "sm",
181
+ class: "cfg-btn",
182
+ type: "button",
183
+ disabled: e(s).saving.value,
184
+ onClick: t[8] || (t[8] = (a) => e(s).cancelEdit())
185
+ }, {
186
+ default: r(() => [...t[18] || (t[18] = [
187
+ u(" Cancel ", -1)
188
+ ])]),
189
+ _: 1
190
+ }, 8, ["disabled"])
191
+ ])) : (d(), l("div", {
192
+ key: 1,
193
+ class: g(["cfg-row", { "is-clickable": e(s).pendingDeleteId.value !== n.id }]),
194
+ onClick: (a) => e(s).pendingDeleteId.value !== n.id && e(s).startEdit(n.id)
195
+ }, [
196
+ i("div", se, [
197
+ i("div", te, v(n.name), 1)
198
+ ]),
199
+ e(s).pendingDeleteId.value === n.id ? (d(), l("div", ie, [
200
+ i("span", ne, v(e(s).usageCountFor(n.name) ? `Remove from ${e(s).usageCountFor(n.name)} staff?` : "Delete?"), 1),
201
+ o(c, {
202
+ hierarchy: "danger",
203
+ size: "sm",
204
+ class: "cfg-yes",
205
+ type: "button",
206
+ disabled: e(s).saving.value,
207
+ onClick: f((a) => e(s).confirmDelete(n.id), ["stop"])
208
+ }, {
209
+ default: r(() => [
210
+ u(v(e(s).saving.value ? "Deleting…" : "Delete"), 1)
211
+ ]),
212
+ _: 1
213
+ }, 8, ["disabled", "onClick"]),
214
+ o(c, {
215
+ hierarchy: "secondary",
216
+ size: "sm",
217
+ class: "cfg-no",
218
+ type: "button",
219
+ disabled: e(s).saving.value,
220
+ onClick: t[9] || (t[9] = f((a) => e(s).cancelDelete(), ["stop"]))
221
+ }, {
222
+ default: r(() => [...t[19] || (t[19] = [
223
+ u(" Keep ", -1)
224
+ ])]),
225
+ _: 1
226
+ }, 8, ["disabled"])
227
+ ])) : (d(), l(p, { key: 1 }, [
228
+ i("span", {
229
+ class: g(["cfg-used", { none: !e(s).usageCountFor(n.name) }])
230
+ }, v(e(s).usageCountFor(n.name) ? `${e(s).usageCountFor(n.name)} staff` : "unused"), 3),
231
+ o(c, {
232
+ hierarchy: "secondary",
233
+ size: "sm",
234
+ class: "cfg-btn",
235
+ type: "button",
236
+ onClick: f((a) => e(s).startEdit(n.id), ["stop"])
237
+ }, {
238
+ default: r(() => [...t[20] || (t[20] = [
239
+ u(" Edit ", -1)
240
+ ])]),
241
+ _: 1
242
+ }, 8, ["onClick"]),
243
+ o(c, {
244
+ hierarchy: "ghost",
245
+ size: "sm",
246
+ "icon-only": "",
247
+ class: "cfg-del",
248
+ type: "button",
249
+ "aria-label": `Delete ${n.name}`,
250
+ onClick: f((a) => e(s).askDelete(n.id), ["stop"])
251
+ }, {
252
+ default: r(() => [...t[21] || (t[21] = [
253
+ i("svg", {
254
+ width: "14",
255
+ height: "14",
256
+ viewBox: "0 0 16 16",
257
+ fill: "none",
258
+ "aria-hidden": "true"
259
+ }, [
260
+ i("path", {
261
+ d: "M2.5 4.5h11M6 4.5V3a.8.8 0 0 1 .8-.8h2.4a.8.8 0 0 1 .8.8v1.5M4 4.5l.6 8.2a1 1 0 0 0 1 .93h4.8a1 1 0 0 0 1-.93l.6-8.2",
262
+ stroke: "currentColor",
263
+ "stroke-width": "1.4",
264
+ "stroke-linecap": "round",
265
+ "stroke-linejoin": "round"
266
+ }),
267
+ i("path", {
268
+ d: "M6.6 7v4M9.4 7v4",
269
+ stroke: "currentColor",
270
+ "stroke-width": "1.3",
271
+ "stroke-linecap": "round"
272
+ })
273
+ ], -1)
274
+ ])]),
275
+ _: 1
276
+ }, 8, ["aria-label", "onClick"])
277
+ ], 64))
278
+ ], 10, ee))
279
+ ], 64))), 128))
280
+ ]))
281
+ ])
282
+ ])
283
+ ])
284
+ ])
285
+ ])
286
+ ]),
287
+ o(B, { modal: e(k) }, null, 8, ["modal"])
288
+ ], 512));
289
+ }
290
+ }), fe = /* @__PURE__ */ I(oe, [["__scopeId", "data-v-5285df68"]]);
291
+ export {
292
+ fe as default
293
+ };
@@ -0,0 +1,242 @@
1
+ import { defineComponent as Z, useAttrs as ee, computed as m, ref as h, watch as te, nextTick as z, onBeforeUnmount as ne, createElementBlock as a, openBlock as i, normalizeClass as D, createElementVNode as p, createBlock as oe, mergeProps as le, toDisplayString as v, Teleport as ie, createCommentVNode as g, withDirectives as ae, vModelText as se, Fragment as _, renderList as ue, createTextVNode as re } from "vue";
2
+ const ce = ["disabled", "aria-expanded"], de = { class: "sch" }, pe = ["aria-multiselectable"], fe = {
3
+ key: 0,
4
+ class: "fx-pop-head"
5
+ }, me = {
6
+ key: 1,
7
+ class: "fx-pop-search"
8
+ }, he = {
9
+ key: 2,
10
+ class: "fx-opt is-off"
11
+ }, ve = {
12
+ key: 0,
13
+ class: "fx-grp"
14
+ }, ye = ["aria-selected", "onClick"], be = {
15
+ key: 0,
16
+ class: "fx-opt-text"
17
+ }, ke = { key: 0 }, ge = /* @__PURE__ */ Z({
18
+ inheritAttrs: !1,
19
+ __name: "ScheduleSelect",
20
+ props: {
21
+ modelValue: {},
22
+ options: {},
23
+ multiple: { type: Boolean },
24
+ selected: {},
25
+ placeholder: {},
26
+ disabled: { type: Boolean },
27
+ menuTitle: {},
28
+ searchable: { type: Boolean }
29
+ },
30
+ emits: ["update:modelValue", "toggle"],
31
+ setup(d, { emit: P }) {
32
+ const o = d, E = P, U = ee(), I = m(() => U.class ?? ""), u = h(!1), $ = h(null), y = h(null), b = h(null), O = m(() => {
33
+ var e, n;
34
+ if (o.multiple) {
35
+ const t = ((e = o.selected) == null ? void 0 : e.length) ?? 0;
36
+ return t ? `${t} selected` : o.placeholder ?? "";
37
+ }
38
+ return ((n = o.options.find((t) => t.value === o.modelValue)) == null ? void 0 : n.label) ?? "";
39
+ });
40
+ function B(e) {
41
+ var n;
42
+ return o.multiple ? !!((n = o.selected) != null && n.includes(e.value)) : e.value === o.modelValue;
43
+ }
44
+ const L = m(() => !!o.menuTitle || o.options.some((e) => e.hint)), f = h(""), H = h(null), S = m(() => {
45
+ const e = f.value.trim().toLowerCase();
46
+ return !o.searchable || !e ? o.options : o.options.filter((n) => `${n.label} ${n.hint ?? ""}`.toLowerCase().includes(e));
47
+ }), T = m(() => {
48
+ const e = [];
49
+ let n;
50
+ for (const t of S.value)
51
+ t.group !== n && (n = t.group, n && e.push({ heading: n })), e.push({ option: t });
52
+ return e;
53
+ }), k = 5, r = 8;
54
+ function M() {
55
+ const e = b.value, n = y.value;
56
+ if (!e || !n) return;
57
+ const t = n.getBoundingClientRect(), l = window.innerWidth || document.documentElement.clientWidth, s = window.innerHeight || document.documentElement.clientHeight;
58
+ e.style.minWidth = `${Math.round(t.width)}px`, e.style.maxWidth = `${Math.max(180, Math.round(l - r * 2))}px`;
59
+ const x = s - t.bottom - k - r, Q = t.top - k - r;
60
+ e.style.maxHeight = `${Math.max(120, Math.min(320, Math.max(x, Q)))}px`;
61
+ const w = e.offsetHeight, X = e.offsetWidth;
62
+ let C = t.bottom + k;
63
+ C + w > s - r && (C = t.top - k - w >= r ? t.top - k - w : Math.max(r, s - w - r));
64
+ const Y = Math.min(Math.max(r, t.left), Math.max(r, l - X - r));
65
+ e.style.top = `${Math.round(C)}px`, e.style.left = `${Math.round(Y)}px`, e.style.visibility = "visible";
66
+ }
67
+ function A(e) {
68
+ var t, l;
69
+ const n = e.target;
70
+ n && ((t = $.value) != null && t.contains(n) || (l = b.value) != null && l.contains(n)) || c();
71
+ }
72
+ function W(e) {
73
+ const n = b.value, t = e.target;
74
+ if (n && t && t !== document && n.contains(t)) return;
75
+ const l = y.value;
76
+ if (!l) return;
77
+ const s = l.getBoundingClientRect(), x = window.innerHeight || document.documentElement.clientHeight;
78
+ if (s.bottom < 0 || s.top > x) {
79
+ c();
80
+ return;
81
+ }
82
+ M();
83
+ }
84
+ function R() {
85
+ document.addEventListener("click", A), document.addEventListener("scroll", W, !0), window.addEventListener("resize", c);
86
+ }
87
+ function q() {
88
+ document.removeEventListener("click", A), document.removeEventListener("scroll", W, !0), window.removeEventListener("resize", c);
89
+ }
90
+ async function V() {
91
+ var e, n, t;
92
+ o.disabled || u.value || (f.value = "", u.value = !0, await z(), M(), (e = H.value) == null || e.focus(), (t = (n = b.value) == null ? void 0 : n.querySelector(".fx-opt.is-on")) == null || t.scrollIntoView({ block: "nearest" }), R());
93
+ }
94
+ function c() {
95
+ u.value && (u.value = !1, f.value = "", q());
96
+ }
97
+ te(f, async () => {
98
+ u.value && (await z(), M());
99
+ });
100
+ function j(e) {
101
+ var n;
102
+ if (e.key === "Escape")
103
+ e.preventDefault(), c(), (n = y.value) == null || n.focus();
104
+ else if (e.key === "Enter") {
105
+ e.preventDefault();
106
+ const t = S.value.find((l) => !l.disabled);
107
+ t && N(t);
108
+ }
109
+ }
110
+ function K() {
111
+ u.value ? c() : V();
112
+ }
113
+ function N(e) {
114
+ if (!e.disabled) {
115
+ if (o.multiple && !e.command) {
116
+ E("toggle", e.value);
117
+ return;
118
+ }
119
+ if (c(), o.multiple) {
120
+ E("update:modelValue", e.value);
121
+ return;
122
+ }
123
+ e.value !== o.modelValue && E("update:modelValue", e.value);
124
+ }
125
+ }
126
+ const F = m(() => o.options.filter((e) => !e.disabled));
127
+ function G(e) {
128
+ const n = F.value;
129
+ if (o.multiple || !n.length) {
130
+ V();
131
+ return;
132
+ }
133
+ const t = n.findIndex((x) => x.value === o.modelValue), l = e === "Home" ? 0 : e === "End" ? n.length - 1 : e === "ArrowDown" ? Math.min(n.length - 1, (t < 0 ? -1 : t) + 1) : Math.max(0, (t < 0 ? 1 : t) - 1), s = n[l];
134
+ s && s.value !== o.modelValue ? E("update:modelValue", s.value) : V();
135
+ }
136
+ function J(e) {
137
+ var n;
138
+ if (e.key === "Escape") {
139
+ if (!u.value) return;
140
+ e.preventDefault(), c(), (n = y.value) == null || n.focus();
141
+ return;
142
+ }
143
+ if (e.key === "Enter" || e.key === " ") {
144
+ e.preventDefault(), K();
145
+ return;
146
+ }
147
+ e.key !== "ArrowDown" && e.key !== "ArrowUp" && e.key !== "Home" && e.key !== "End" || (e.preventDefault(), G(e.key));
148
+ }
149
+ return ne(q), (e, n) => (i(), a("div", {
150
+ ref_key: "rootEl",
151
+ ref: $,
152
+ class: D(["fx-sel", I.value])
153
+ }, [
154
+ p("button", le({
155
+ ref_key: "btnEl",
156
+ ref: y
157
+ }, e.$attrs, {
158
+ type: "button",
159
+ class: ["sch-input fx-btn", { "is-open": u.value }],
160
+ disabled: d.disabled,
161
+ "aria-haspopup": "listbox",
162
+ "aria-expanded": u.value,
163
+ onClick: n[0] || (n[0] = (t) => K()),
164
+ onKeydown: J
165
+ }), v(O.value), 17, ce),
166
+ (i(), oe(ie, { to: "body" }, [
167
+ p("div", de, [
168
+ u.value ? (i(), a("div", {
169
+ key: 0,
170
+ ref_key: "popEl",
171
+ ref: b,
172
+ class: D(["fx-pop", { "fx-pop-rich": L.value }]),
173
+ role: "listbox",
174
+ "aria-multiselectable": d.multiple || void 0,
175
+ style: { visibility: "hidden" }
176
+ }, [
177
+ d.menuTitle ? (i(), a("div", fe, v(d.menuTitle), 1)) : g("", !0),
178
+ d.searchable ? (i(), a("div", me, [
179
+ ae(p("input", {
180
+ ref_key: "searchEl",
181
+ ref: H,
182
+ "onUpdate:modelValue": n[1] || (n[1] = (t) => f.value = t),
183
+ class: "sch-input fx-pop-q",
184
+ type: "search",
185
+ placeholder: "Search",
186
+ autocomplete: "off",
187
+ spellcheck: "false",
188
+ "aria-label": "Search",
189
+ onKeydown: j
190
+ }, null, 544), [
191
+ [se, f.value]
192
+ ])
193
+ ])) : g("", !0),
194
+ d.searchable && !T.value.length ? (i(), a("div", he, "No matches")) : g("", !0),
195
+ (i(!0), a(_, null, ue(T.value, (t, l) => (i(), a(_, { key: l }, [
196
+ "heading" in t ? (i(), a("div", ve, v(t.heading), 1)) : (i(), a("div", {
197
+ key: 1,
198
+ class: D(["fx-opt", {
199
+ "is-on": B(t.option),
200
+ "is-off": t.option.disabled,
201
+ "is-new": t.option.command
202
+ }]),
203
+ role: "option",
204
+ "aria-selected": B(t.option),
205
+ onClick: (s) => N(t.option)
206
+ }, [
207
+ n[2] || (n[2] = p("span", {
208
+ class: "fx-tick",
209
+ "aria-hidden": "true"
210
+ }, [
211
+ p("svg", {
212
+ width: "11",
213
+ height: "11",
214
+ viewBox: "0 0 16 16",
215
+ fill: "none"
216
+ }, [
217
+ p("path", {
218
+ d: "m3.5 8.4 3 3 6-7",
219
+ stroke: "currentColor",
220
+ "stroke-width": "2.2",
221
+ "stroke-linecap": "round",
222
+ "stroke-linejoin": "round"
223
+ })
224
+ ])
225
+ ], -1)),
226
+ L.value ? (i(), a("span", be, [
227
+ p("b", null, v(t.option.label), 1),
228
+ t.option.hint ? (i(), a("small", ke, v(t.option.hint), 1)) : g("", !0)
229
+ ])) : (i(), a(_, { key: 1 }, [
230
+ re(v(t.option.label), 1)
231
+ ], 64))
232
+ ], 10, ye))
233
+ ], 64))), 128))
234
+ ], 10, pe)) : g("", !0)
235
+ ])
236
+ ]))
237
+ ], 2));
238
+ }
239
+ });
240
+ export {
241
+ ge as _
242
+ };