@feedmepos/mf-hrm-portal 2.2.5-dev.4 → 2.2.5-dev.5
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/{ApprovalCodeList-D0B_X3Sf.js → ApprovalCodeList-DqR6ouRS.js} +4 -4
- package/dist/{AuditLogList-D9anf4YQ.js → AuditLogList-CG2BiQX6.js} +17 -18
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-4oENMRO3.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C7nMXx8R.js} +2 -2
- package/dist/{EmployeeList-DREDu3Ou.js → EmployeeList-CGZzol7v.js} +27 -29
- package/dist/{FormItem.vue_vue_type_script_setup_true_lang-CUnlKsxk.js → FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js} +1 -1
- package/dist/{GrantUserList-CLDshEN9.js → GrantUserList-D1fBv1KQ.js} +5 -5
- package/dist/{Main-lqlb8tPw.js → Main-BOt-Y1wv.js} +9 -9
- package/dist/{Main-QhQxU593.js → Main-CFoZot3K.js} +5 -5
- package/dist/{Main-DtMaG42L.js → Main-zg7fbEtx.js} +2 -2
- package/dist/{PermissionSetList-BK8yBpJJ.js → PermissionSetList-bJpwD62u.js} +10 -11
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-uSdvH81B.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-C4C8Cvf4.js} +911 -912
- package/dist/{RoleList-D6AX6BqB.js → RoleList-DUVZ7dkO.js} +7 -7
- package/dist/SelectFilter-ATOm0hdn.js +269 -0
- package/dist/{TeamMemberList-BM5JoR6J.js → TeamMemberList-DAnM-DSd.js} +34 -36
- package/dist/{TimesheetList-Ch_f_PD5.js → TimesheetList-5sdcWjEf.js} +53 -54
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-CxqxqwyD.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-GhPw_mCW.js} +2 -2
- package/dist/{app-tDHL6k4G.js → app-D-cQzgkr.js} +2299 -2884
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-B_XWc0Hu.js → dayjs.min-DqFS0ebn.js} +1 -1
- package/dist/employee-DvvnCQMK.js +204 -0
- package/dist/{index-jxRluZiW.js → iteration-BjW8Cs9e.js} +726 -698
- package/dist/{lodash-D5vM3paU.js → lodash-wjhSWqez.js} +1 -1
- package/dist/{role-7ccipEEe.js → role-CEUcSmA6.js} +3 -4
- package/dist/{rule-7faruCdz.js → rule-Df8LOhxm.js} +70 -71
- package/dist/src/router/shared.d.ts +1 -4
- package/dist/src/views/team/components/PortalConditionForm.vue.d.ts +2 -2
- package/dist/src/views/team/condition-builders/ConditionBuilderForm.vue.d.ts +2 -2
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useReportPermissions-FieO4EAD.js → useReportPermissions-4wm7pJcK.js} +3 -3
- package/package.json +1 -1
- package/dist/ScheduleGeneralPage-DAECTCDu.js +0 -242
- package/dist/SchedulePage-CdFR7JuO.js +0 -10751
- package/dist/SchedulePositionPage-DTtKg0sx.js +0 -220
- package/dist/ScheduleSelect.vue_vue_type_script_setup_true_lang-BiuUrr50.js +0 -199
- package/dist/SelectFilter-CG13h83-.js +0 -264
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/employee-Bs_2vqBY.js +0 -139
- package/dist/index-Cz2b95YF.js +0 -70
- package/dist/iteration-CcXrOMQe.js +0 -30
- package/dist/src/api/schedule/index.d.ts +0 -44
- package/dist/src/components/layout/AppSidebar.vue.d.ts +0 -2
- package/dist/src/components/layout/PortalShell.vue.d.ts +0 -12
- package/dist/src/components/layout/withShell.d.ts +0 -14
- package/dist/src/types/schedule.d.ts +0 -232
- package/dist/src/views/scheduling/ScheduleGeneralPage.vue.d.ts +0 -4
- package/dist/src/views/scheduling/SchedulePage.vue.d.ts +0 -4
- package/dist/src/views/scheduling/SchedulePositionPage.vue.d.ts +0 -4
- package/dist/src/views/scheduling/components/ScheduleAddEmployeeIdentitySection.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleAddEmployeeModal.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleAddEmployeeModeStep.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleAddEmployeePosAccessSection.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleAddEmployeePositionsSection.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleAddEmployeeSchedulingSection.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleAddPickPopover.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleAllShiftsRow.vue.d.ts +0 -22
- package/dist/src/views/scheduling/components/ScheduleAreaRows.vue.d.ts +0 -34
- package/dist/src/views/scheduling/components/ScheduleAssignEmployeePopover.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleAutoScheduleModal.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleChangeEmployeeModal.vue.d.ts +0 -8
- package/dist/src/views/scheduling/components/ScheduleConfirmModal.vue.d.ts +0 -24
- package/dist/src/views/scheduling/components/ScheduleCostRail.vue.d.ts +0 -8
- package/dist/src/views/scheduling/components/ScheduleDateRangePopover.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleDayNotePopover.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleDayTimeline.vue.d.ts +0 -12
- package/dist/src/views/scheduling/components/ScheduleDemandRow.vue.d.ts +0 -23
- package/dist/src/views/scheduling/components/ScheduleDemandSheet.vue.d.ts +0 -10
- package/dist/src/views/scheduling/components/ScheduleDotsIcon.vue.d.ts +0 -2
- package/dist/src/views/scheduling/components/ScheduleEmployeeDetailPanel.vue.d.ts +0 -12
- package/dist/src/views/scheduling/components/ScheduleEmployeeIdentity.vue.d.ts +0 -17
- package/dist/src/views/scheduling/components/ScheduleFilterBar.vue.d.ts +0 -18
- package/dist/src/views/scheduling/components/ScheduleGapPopover.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleGridHeader.vue.d.ts +0 -18
- package/dist/src/views/scheduling/components/ScheduleLeaveEditModal.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleLegendBar.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleOnboardingWelcome.vue.d.ts +0 -12
- package/dist/src/views/scheduling/components/ScheduleOnboardingWizard.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleOpenShiftCardMenu.vue.d.ts +0 -14
- package/dist/src/views/scheduling/components/SchedulePdfPreview.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/SchedulePublishModal.vue.d.ts +0 -8
- package/dist/src/views/scheduling/components/ScheduleReviewBar.vue.d.ts +0 -12
- package/dist/src/views/scheduling/components/ScheduleSelect.vue.d.ts +0 -24
- package/dist/src/views/scheduling/components/ScheduleSelectExistingEmployeeModal.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleShiftCardMenu.vue.d.ts +0 -12
- package/dist/src/views/scheduling/components/ScheduleShiftCell.vue.d.ts +0 -31
- package/dist/src/views/scheduling/components/ScheduleShiftHeadcountEditor.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleShiftImpact.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleShiftMoreOptions.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleShiftPopover.vue.d.ts +0 -14
- package/dist/src/views/scheduling/components/ScheduleShiftRepeatDaysRow.vue.d.ts +0 -8
- package/dist/src/views/scheduling/components/ScheduleShiftSegmentsEditor.vue.d.ts +0 -8
- package/dist/src/views/scheduling/components/ScheduleShiftWhoPicker.vue.d.ts +0 -25
- package/dist/src/views/scheduling/components/ScheduleStackPopover.vue.d.ts +0 -14
- package/dist/src/views/scheduling/components/ScheduleStaffRail.vue.d.ts +0 -16
- package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +0 -54
- package/dist/src/views/scheduling/components/ScheduleStatsRow.vue.d.ts +0 -12
- package/dist/src/views/scheduling/components/ScheduleSwapShiftsModal.vue.d.ts +0 -8
- package/dist/src/views/scheduling/components/ScheduleTimePickerPopover.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleTopbar.vue.d.ts +0 -22
- package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +0 -67
- package/dist/src/views/scheduling/composables/schedule-board-helpers.d.ts +0 -38
- package/dist/src/views/scheduling/composables/schedule-day-meta.d.ts +0 -29
- package/dist/src/views/scheduling/composables/schedule-employee-profile.d.ts +0 -7
- package/dist/src/views/scheduling/composables/schedule-shift-time.d.ts +0 -14
- package/dist/src/views/scheduling/composables/schedule-week-cache.d.ts +0 -10
- package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +0 -86
- package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +0 -66
- package/dist/src/views/scheduling/composables/useScheduleAllShiftsRow.d.ts +0 -77
- package/dist/src/views/scheduling/composables/useScheduleAreaBoard.d.ts +0 -50
- package/dist/src/views/scheduling/composables/useScheduleAreaDragDrop.d.ts +0 -18
- package/dist/src/views/scheduling/composables/useScheduleAssign.d.ts +0 -113
- package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +0 -136
- package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +0 -415
- package/dist/src/views/scheduling/composables/useScheduleCellState.d.ts +0 -27
- package/dist/src/views/scheduling/composables/useScheduleClashDetection.d.ts +0 -18
- package/dist/src/views/scheduling/composables/useScheduleCopyWeek.d.ts +0 -17
- package/dist/src/views/scheduling/composables/useScheduleCostRail.d.ts +0 -43
- package/dist/src/views/scheduling/composables/useScheduleDayNote.d.ts +0 -48
- package/dist/src/views/scheduling/composables/useScheduleDayTimeline.d.ts +0 -82
- package/dist/src/views/scheduling/composables/useScheduleDemand.d.ts +0 -68
- package/dist/src/views/scheduling/composables/useScheduleDemandRow.d.ts +0 -45
- package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +0 -139
- package/dist/src/views/scheduling/composables/useScheduleDragDrop.d.ts +0 -22
- package/dist/src/views/scheduling/composables/useScheduleEmployeeIdentity.d.ts +0 -32
- package/dist/src/views/scheduling/composables/useScheduleEmployeeProfile.d.ts +0 -16
- package/dist/src/views/scheduling/composables/useScheduleExport.d.ts +0 -26
- package/dist/src/views/scheduling/composables/useScheduleFilterBar.d.ts +0 -14
- package/dist/src/views/scheduling/composables/useScheduleGapPopover.d.ts +0 -80
- package/dist/src/views/scheduling/composables/useScheduleLeave.d.ts +0 -20
- package/dist/src/views/scheduling/composables/useScheduleLegend.d.ts +0 -15
- package/dist/src/views/scheduling/composables/useScheduleLegendBar.d.ts +0 -35
- package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +0 -179
- package/dist/src/views/scheduling/composables/useScheduleOpenShiftCard.d.ts +0 -23
- package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +0 -19
- package/dist/src/views/scheduling/composables/useSchedulePositions.d.ts +0 -32
- package/dist/src/views/scheduling/composables/useSchedulePublish.d.ts +0 -91
- package/dist/src/views/scheduling/composables/useScheduleRangeCalendar.d.ts +0 -18
- package/dist/src/views/scheduling/composables/useScheduleRoster.d.ts +0 -183
- package/dist/src/views/scheduling/composables/useScheduleSettings.d.ts +0 -54
- package/dist/src/views/scheduling/composables/useScheduleSetupBanner.d.ts +0 -18
- package/dist/src/views/scheduling/composables/useScheduleShiftActions.d.ts +0 -225
- package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +0 -174
- package/dist/src/views/scheduling/composables/useScheduleStaffRail.d.ts +0 -20
- package/dist/src/views/scheduling/composables/useScheduleStatsRow.d.ts +0 -25
- package/dist/src/views/scheduling/composables/useScheduleTimePicker.d.ts +0 -44
- package/dist/src/views/scheduling/composables/useScheduleTopbar.d.ts +0 -10
- package/dist/src/views/scheduling/data.d.ts +0 -105
- package/dist/src/views/scheduling/locales/index.d.ts +0 -496
- package/dist/src/views/scheduling/schedule-store.d.ts +0 -116
- package/dist/src/views/scheduling/types.d.ts +0 -311
- package/dist/useScheduleOutlet-CmIG5dwQ.js +0 -557
- package/dist/useSchedulePositions-DPVAgdB2.js +0 -103
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
import { defineComponent as y, onMounted as h, createElementBlock as a, openBlock as d, createElementVNode as s, toDisplayString as l, unref as t, normalizeClass as c, createTextVNode as g, createCommentVNode as _, withDirectives as m, withKeys as u, vModelText as p, Fragment as v, renderList as C, withModifiers as r } from "vue";
|
|
2
|
-
import { useRouter as w } from "vue-router";
|
|
3
|
-
import { R as $ } from "./app-tDHL6k4G.js";
|
|
4
|
-
import { x as D, y as A } from "./useScheduleOutlet-CmIG5dwQ.js";
|
|
5
|
-
import { u as N } from "./useSchedulePositions-DPVAgdB2.js";
|
|
6
|
-
import { _ as E } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
-
const x = { class: "sch9" }, M = { class: "main" }, S = {
|
|
8
|
-
id: "viewPositions",
|
|
9
|
-
class: "view"
|
|
10
|
-
}, P = { class: "sp-body" }, B = { class: "sp-content" }, F = { class: "sp-panel" }, V = { class: "cfg-head" }, I = { class: "cfg-count" }, K = { id: "skList" }, L = {
|
|
11
|
-
key: 0,
|
|
12
|
-
class: "cfg-empty"
|
|
13
|
-
}, R = {
|
|
14
|
-
key: 1,
|
|
15
|
-
class: "cfg-list"
|
|
16
|
-
}, U = {
|
|
17
|
-
key: 0,
|
|
18
|
-
class: "cfg-row"
|
|
19
|
-
}, W = { class: "cfg-main" }, j = ["disabled"], T = ["disabled"], q = {
|
|
20
|
-
key: 0,
|
|
21
|
-
class: "cfg-row"
|
|
22
|
-
}, z = { class: "cfg-main" }, H = ["onKeyup"], O = ["disabled", "onClick"], G = ["disabled"], J = ["onClick"], Q = { class: "cfg-main" }, X = { class: "cfg-name" }, Y = {
|
|
23
|
-
key: 0,
|
|
24
|
-
class: "cfg-confirm"
|
|
25
|
-
}, Z = { class: "q" }, ee = ["disabled", "onClick"], te = ["disabled"], se = ["onClick"], oe = ["aria-label", "onClick"], ne = /* @__PURE__ */ y({
|
|
26
|
-
__name: "SchedulePositionPage",
|
|
27
|
-
setup(ie) {
|
|
28
|
-
const f = w(), e = N(), b = D();
|
|
29
|
-
h(async () => {
|
|
30
|
-
await b.resolve() && await A(/* @__PURE__ */ new Date());
|
|
31
|
-
});
|
|
32
|
-
function k() {
|
|
33
|
-
f.push({ name: $.SCHEDULE });
|
|
34
|
-
}
|
|
35
|
-
return (ae, o) => (d(), a("div", x, [
|
|
36
|
-
s("div", M, [
|
|
37
|
-
s("div", S, [
|
|
38
|
-
s("div", { class: "sp-head" }, [
|
|
39
|
-
s("button", {
|
|
40
|
-
type: "button",
|
|
41
|
-
class: "sp-back",
|
|
42
|
-
onClick: k
|
|
43
|
-
}, [...o[10] || (o[10] = [
|
|
44
|
-
s("svg", {
|
|
45
|
-
width: "12",
|
|
46
|
-
height: "12",
|
|
47
|
-
viewBox: "0 0 16 16",
|
|
48
|
-
fill: "none",
|
|
49
|
-
"aria-hidden": "true"
|
|
50
|
-
}, [
|
|
51
|
-
s("path", {
|
|
52
|
-
d: "M10 3.5L5.5 8l4.5 4.5",
|
|
53
|
-
stroke: "currentColor",
|
|
54
|
-
"stroke-width": "1.7",
|
|
55
|
-
"stroke-linecap": "round",
|
|
56
|
-
"stroke-linejoin": "round"
|
|
57
|
-
})
|
|
58
|
-
], -1),
|
|
59
|
-
s("span", null, "Back to schedule", -1)
|
|
60
|
-
])]),
|
|
61
|
-
o[11] || (o[11] = s("div", { class: "sp-title" }, "Position", -1)),
|
|
62
|
-
o[12] || (o[12] = s("div", { class: "sp-sub" }, "What your staff can do — the same catalogue across every outlet.", -1))
|
|
63
|
-
]),
|
|
64
|
-
s("div", P, [
|
|
65
|
-
s("div", B, [
|
|
66
|
-
s("div", F, [
|
|
67
|
-
o[17] || (o[17] = s("div", { class: "cfg-lead" }, " What your staff can do. Positions drive who Auto-Schedule considers for a shift, and the top-ranked position on a person wins when more than one could cover it. ", -1)),
|
|
68
|
-
s("div", V, [
|
|
69
|
-
o[13] || (o[13] = s("div", { class: "cfg-title" }, "Configured positions", -1)),
|
|
70
|
-
s("span", I, l(t(e).count.value), 1),
|
|
71
|
-
o[14] || (o[14] = s("span", { class: "cfg-spacer" }, null, -1)),
|
|
72
|
-
s("button", {
|
|
73
|
-
type: "button",
|
|
74
|
-
class: "am-btn am-btn-primary",
|
|
75
|
-
onClick: o[0] || (o[0] = (n) => t(e).startAdd())
|
|
76
|
-
}, " + Add position ")
|
|
77
|
-
]),
|
|
78
|
-
s("div", {
|
|
79
|
-
class: c(["ce-err", { show: t(e).error.value }])
|
|
80
|
-
}, l(t(e).error.value), 3),
|
|
81
|
-
s("div", K, [
|
|
82
|
-
!t(e).positions.value.length && !t(e).isAdding.value ? (d(), a("div", L, [...o[15] || (o[15] = [
|
|
83
|
-
g(" No positions yet.", -1),
|
|
84
|
-
s("br", null, null, -1),
|
|
85
|
-
g(" Add one and it becomes assignable on every employee. ", -1)
|
|
86
|
-
])])) : (d(), a("div", R, [
|
|
87
|
-
t(e).isAdding.value ? (d(), a("div", U, [
|
|
88
|
-
s("div", W, [
|
|
89
|
-
m(s("input", {
|
|
90
|
-
"onUpdate:modelValue": o[1] || (o[1] = (n) => t(e).newName.value = n),
|
|
91
|
-
type: "text",
|
|
92
|
-
class: "cfg-name-input",
|
|
93
|
-
placeholder: "New position name",
|
|
94
|
-
autofocus: "",
|
|
95
|
-
onKeyup: [
|
|
96
|
-
o[2] || (o[2] = u((n) => t(e).confirmAdd(), ["enter"])),
|
|
97
|
-
o[3] || (o[3] = u((n) => t(e).cancelAdd(), ["esc"]))
|
|
98
|
-
]
|
|
99
|
-
}, null, 544), [
|
|
100
|
-
[p, t(e).newName.value]
|
|
101
|
-
])
|
|
102
|
-
]),
|
|
103
|
-
s("button", {
|
|
104
|
-
type: "button",
|
|
105
|
-
class: "cfg-btn",
|
|
106
|
-
disabled: !t(e).newName.value.trim() || t(e).saving.value,
|
|
107
|
-
onClick: o[4] || (o[4] = (n) => t(e).confirmAdd())
|
|
108
|
-
}, l(t(e).saving.value ? "Adding…" : "Add"), 9, j),
|
|
109
|
-
s("button", {
|
|
110
|
-
type: "button",
|
|
111
|
-
class: "cfg-btn",
|
|
112
|
-
disabled: t(e).saving.value,
|
|
113
|
-
onClick: o[5] || (o[5] = (n) => t(e).cancelAdd())
|
|
114
|
-
}, " Cancel ", 8, T)
|
|
115
|
-
])) : _("", !0),
|
|
116
|
-
(d(!0), a(v, null, C(t(e).positions.value, (n) => (d(), a(v, {
|
|
117
|
-
key: n.id
|
|
118
|
-
}, [
|
|
119
|
-
t(e).editingId.value === n.id ? (d(), a("div", q, [
|
|
120
|
-
s("div", z, [
|
|
121
|
-
m(s("input", {
|
|
122
|
-
"onUpdate:modelValue": o[6] || (o[6] = (i) => t(e).editingName.value = i),
|
|
123
|
-
type: "text",
|
|
124
|
-
class: "cfg-name-input",
|
|
125
|
-
autofocus: "",
|
|
126
|
-
onKeyup: [
|
|
127
|
-
u((i) => t(e).saveEdit(n.id), ["enter"]),
|
|
128
|
-
o[7] || (o[7] = u((i) => t(e).cancelEdit(), ["esc"]))
|
|
129
|
-
]
|
|
130
|
-
}, null, 40, H), [
|
|
131
|
-
[p, t(e).editingName.value]
|
|
132
|
-
])
|
|
133
|
-
]),
|
|
134
|
-
s("button", {
|
|
135
|
-
type: "button",
|
|
136
|
-
class: "cfg-btn",
|
|
137
|
-
disabled: !t(e).editingName.value.trim() || t(e).saving.value,
|
|
138
|
-
onClick: (i) => t(e).saveEdit(n.id)
|
|
139
|
-
}, l(t(e).saving.value ? "Saving…" : "Save"), 9, O),
|
|
140
|
-
s("button", {
|
|
141
|
-
type: "button",
|
|
142
|
-
class: "cfg-btn",
|
|
143
|
-
disabled: t(e).saving.value,
|
|
144
|
-
onClick: o[8] || (o[8] = (i) => t(e).cancelEdit())
|
|
145
|
-
}, " Cancel ", 8, G)
|
|
146
|
-
])) : (d(), a("div", {
|
|
147
|
-
key: 1,
|
|
148
|
-
class: c(["cfg-row", { "is-clickable": t(e).pendingDeleteId.value !== n.id }]),
|
|
149
|
-
onClick: (i) => t(e).pendingDeleteId.value !== n.id && t(e).startEdit(n.id)
|
|
150
|
-
}, [
|
|
151
|
-
s("div", Q, [
|
|
152
|
-
s("div", X, l(n.name), 1)
|
|
153
|
-
]),
|
|
154
|
-
t(e).pendingDeleteId.value === n.id ? (d(), a("div", Y, [
|
|
155
|
-
s("span", Z, l(t(e).usageCountFor(n.name) ? `Remove from ${t(e).usageCountFor(n.name)} staff?` : "Delete?"), 1),
|
|
156
|
-
s("button", {
|
|
157
|
-
type: "button",
|
|
158
|
-
class: "cfg-yes",
|
|
159
|
-
disabled: t(e).saving.value,
|
|
160
|
-
onClick: r((i) => t(e).confirmDelete(n.id), ["stop"])
|
|
161
|
-
}, l(t(e).saving.value ? "Deleting…" : "Delete"), 9, ee),
|
|
162
|
-
s("button", {
|
|
163
|
-
type: "button",
|
|
164
|
-
class: "cfg-no",
|
|
165
|
-
disabled: t(e).saving.value,
|
|
166
|
-
onClick: o[9] || (o[9] = r((i) => t(e).cancelDelete(), ["stop"]))
|
|
167
|
-
}, " Keep ", 8, te)
|
|
168
|
-
])) : (d(), a(v, { key: 1 }, [
|
|
169
|
-
s("span", {
|
|
170
|
-
class: c(["cfg-used", { none: !t(e).usageCountFor(n.name) }])
|
|
171
|
-
}, l(t(e).usageCountFor(n.name) ? `${t(e).usageCountFor(n.name)} staff` : "unused"), 3),
|
|
172
|
-
s("button", {
|
|
173
|
-
type: "button",
|
|
174
|
-
class: "cfg-btn",
|
|
175
|
-
onClick: r((i) => t(e).startEdit(n.id), ["stop"])
|
|
176
|
-
}, " Edit ", 8, se),
|
|
177
|
-
s("button", {
|
|
178
|
-
type: "button",
|
|
179
|
-
class: "cfg-del",
|
|
180
|
-
"aria-label": `Delete ${n.name}`,
|
|
181
|
-
onClick: r((i) => t(e).askDelete(n.id), ["stop"])
|
|
182
|
-
}, [...o[16] || (o[16] = [
|
|
183
|
-
s("svg", {
|
|
184
|
-
width: "14",
|
|
185
|
-
height: "14",
|
|
186
|
-
viewBox: "0 0 16 16",
|
|
187
|
-
fill: "none",
|
|
188
|
-
"aria-hidden": "true"
|
|
189
|
-
}, [
|
|
190
|
-
s("path", {
|
|
191
|
-
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",
|
|
192
|
-
stroke: "currentColor",
|
|
193
|
-
"stroke-width": "1.4",
|
|
194
|
-
"stroke-linecap": "round",
|
|
195
|
-
"stroke-linejoin": "round"
|
|
196
|
-
}),
|
|
197
|
-
s("path", {
|
|
198
|
-
d: "M6.6 7v4M9.4 7v4",
|
|
199
|
-
stroke: "currentColor",
|
|
200
|
-
"stroke-width": "1.3",
|
|
201
|
-
"stroke-linecap": "round"
|
|
202
|
-
})
|
|
203
|
-
], -1)
|
|
204
|
-
])], 8, oe)
|
|
205
|
-
], 64))
|
|
206
|
-
], 10, J))
|
|
207
|
-
], 64))), 128))
|
|
208
|
-
]))
|
|
209
|
-
])
|
|
210
|
-
])
|
|
211
|
-
])
|
|
212
|
-
])
|
|
213
|
-
])
|
|
214
|
-
])
|
|
215
|
-
]));
|
|
216
|
-
}
|
|
217
|
-
}), ge = /* @__PURE__ */ E(ne, [["__scopeId", "data-v-1c99a674"]]);
|
|
218
|
-
export {
|
|
219
|
-
ge as default
|
|
220
|
-
};
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import { ref as m, reactive as G, computed as h, defineComponent as K, useAttrs as q, onBeforeUnmount as Q, createElementBlock as p, openBlock as d, normalizeClass as L, createElementVNode as w, createBlock as X, mergeProps as Y, toDisplayString as O, Teleport as Z, createCommentVNode as ee, Fragment as J, renderList as te, createTextVNode as oe, nextTick as ne } from "vue";
|
|
2
|
-
import { b as a } from "./useScheduleOutlet-CmIG5dwQ.js";
|
|
3
|
-
const ue = [
|
|
4
|
-
{ key: "overtime", label: "Overtime" }
|
|
5
|
-
];
|
|
6
|
-
function C() {
|
|
7
|
-
return JSON.parse(
|
|
8
|
-
JSON.stringify({
|
|
9
|
-
salesForecast: a.salesForecast,
|
|
10
|
-
labourTarget: a.labourTarget,
|
|
11
|
-
budgetFromSales: a.budgetFromSales,
|
|
12
|
-
budget: a.budget,
|
|
13
|
-
payRate: a.payRate,
|
|
14
|
-
otCapHours: a.otCapHours,
|
|
15
|
-
otBudget: a.otBudget,
|
|
16
|
-
notify: a.notify
|
|
17
|
-
})
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
function ce() {
|
|
21
|
-
const l = m(!1), b = m("overtime"), n = G(C());
|
|
22
|
-
function y(f) {
|
|
23
|
-
Object.assign(n, C()), b.value = f ?? "overtime", l.value = !0;
|
|
24
|
-
}
|
|
25
|
-
const k = h(() => JSON.stringify(n) !== JSON.stringify(C()));
|
|
26
|
-
function M() {
|
|
27
|
-
return k.value ? !1 : (l.value = !1, !0);
|
|
28
|
-
}
|
|
29
|
-
function i() {
|
|
30
|
-
Object.assign(n, C()), l.value = !1;
|
|
31
|
-
}
|
|
32
|
-
function x() {
|
|
33
|
-
a.salesForecast = n.salesForecast, a.labourTarget = n.labourTarget, a.budgetFromSales = n.budgetFromSales, a.budget = n.budget, a.payRate = JSON.parse(JSON.stringify(n.payRate)), a.otCapHours = n.otCapHours, a.otBudget = n.otBudget, a.notify = JSON.parse(JSON.stringify(n.notify)), l.value = !1;
|
|
34
|
-
}
|
|
35
|
-
return { isOpen: l, activeSection: b, draft: n, dirty: k, open: y, close: M, discard: i, save: x };
|
|
36
|
-
}
|
|
37
|
-
const ae = ["disabled", "aria-expanded"], ie = {
|
|
38
|
-
key: 0,
|
|
39
|
-
class: "fx-grp"
|
|
40
|
-
}, se = ["aria-selected", "onClick"], de = /* @__PURE__ */ K({
|
|
41
|
-
inheritAttrs: !1,
|
|
42
|
-
__name: "ScheduleSelect",
|
|
43
|
-
props: {
|
|
44
|
-
modelValue: {},
|
|
45
|
-
options: {},
|
|
46
|
-
disabled: { type: Boolean }
|
|
47
|
-
},
|
|
48
|
-
emits: ["update:modelValue"],
|
|
49
|
-
setup(l, { emit: b }) {
|
|
50
|
-
const n = l, y = b, k = q(), M = h(() => k.class ?? ""), i = m(!1), x = m(null), f = m(null), S = m(null), $ = h(
|
|
51
|
-
() => {
|
|
52
|
-
var e;
|
|
53
|
-
return ((e = n.options.find((t) => t.value === n.modelValue)) == null ? void 0 : e.label) ?? "";
|
|
54
|
-
}
|
|
55
|
-
), A = h(() => {
|
|
56
|
-
const e = [];
|
|
57
|
-
let t;
|
|
58
|
-
for (const o of n.options)
|
|
59
|
-
o.group !== t && (t = o.group, t && e.push({ heading: t })), e.push({ option: o });
|
|
60
|
-
return e;
|
|
61
|
-
}), v = 5, r = 8;
|
|
62
|
-
function B() {
|
|
63
|
-
const e = S.value, t = f.value;
|
|
64
|
-
if (!e || !t) return;
|
|
65
|
-
const o = t.getBoundingClientRect(), u = window.innerWidth || document.documentElement.clientWidth, s = window.innerHeight || document.documentElement.clientHeight;
|
|
66
|
-
e.style.minWidth = `${Math.round(o.width)}px`, e.style.maxWidth = `${Math.max(180, Math.round(u - r * 2))}px`;
|
|
67
|
-
const g = s - o.bottom - v - r, z = o.top - v - r;
|
|
68
|
-
e.style.maxHeight = `${Math.max(120, Math.min(320, Math.max(g, z)))}px`;
|
|
69
|
-
const E = e.offsetHeight, P = e.offsetWidth;
|
|
70
|
-
let N = o.bottom + v;
|
|
71
|
-
N + E > s - r && (N = o.top - v - E >= r ? o.top - v - E : Math.max(r, s - E - r));
|
|
72
|
-
const U = Math.min(Math.max(r, o.left), Math.max(r, u - P - r));
|
|
73
|
-
e.style.top = `${Math.round(N)}px`, e.style.left = `${Math.round(U)}px`, e.style.visibility = "visible";
|
|
74
|
-
}
|
|
75
|
-
function H(e) {
|
|
76
|
-
var o;
|
|
77
|
-
const t = e.target;
|
|
78
|
-
t && ((o = x.value) != null && o.contains(t)) || c();
|
|
79
|
-
}
|
|
80
|
-
function T(e) {
|
|
81
|
-
const t = S.value, o = e.target;
|
|
82
|
-
if (t && o && o !== document && t.contains(o)) return;
|
|
83
|
-
const u = f.value;
|
|
84
|
-
if (!u) return;
|
|
85
|
-
const s = u.getBoundingClientRect(), g = window.innerHeight || document.documentElement.clientHeight;
|
|
86
|
-
if (s.bottom < 0 || s.top > g) {
|
|
87
|
-
c();
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
B();
|
|
91
|
-
}
|
|
92
|
-
function R() {
|
|
93
|
-
document.addEventListener("click", H), document.addEventListener("scroll", T, !0), window.addEventListener("resize", c);
|
|
94
|
-
}
|
|
95
|
-
function D() {
|
|
96
|
-
document.removeEventListener("click", H), document.removeEventListener("scroll", T, !0), window.removeEventListener("resize", c);
|
|
97
|
-
}
|
|
98
|
-
async function V() {
|
|
99
|
-
var e, t;
|
|
100
|
-
n.disabled || i.value || (i.value = !0, await ne(), B(), (t = (e = S.value) == null ? void 0 : e.querySelector(".fx-opt.is-on")) == null || t.scrollIntoView({ block: "nearest" }), R());
|
|
101
|
-
}
|
|
102
|
-
function c() {
|
|
103
|
-
i.value && (i.value = !1, D());
|
|
104
|
-
}
|
|
105
|
-
function F() {
|
|
106
|
-
i.value ? c() : V();
|
|
107
|
-
}
|
|
108
|
-
function _(e) {
|
|
109
|
-
e.disabled || (c(), e.value !== n.modelValue && y("update:modelValue", e.value));
|
|
110
|
-
}
|
|
111
|
-
const W = h(() => n.options.filter((e) => !e.disabled));
|
|
112
|
-
function I(e) {
|
|
113
|
-
const t = W.value;
|
|
114
|
-
if (!t.length) {
|
|
115
|
-
V();
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
const o = t.findIndex((g) => g.value === n.modelValue), u = e === "Home" ? 0 : e === "End" ? t.length - 1 : e === "ArrowDown" ? Math.min(t.length - 1, (o < 0 ? -1 : o) + 1) : Math.max(0, (o < 0 ? 1 : o) - 1), s = t[u];
|
|
119
|
-
s && s.value !== n.modelValue ? y("update:modelValue", s.value) : V();
|
|
120
|
-
}
|
|
121
|
-
function j(e) {
|
|
122
|
-
var t;
|
|
123
|
-
if (e.key === "Escape") {
|
|
124
|
-
if (!i.value) return;
|
|
125
|
-
e.preventDefault(), c(), (t = f.value) == null || t.focus();
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
129
|
-
e.preventDefault(), F();
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
e.key !== "ArrowDown" && e.key !== "ArrowUp" && e.key !== "Home" && e.key !== "End" || (e.preventDefault(), I(e.key));
|
|
133
|
-
}
|
|
134
|
-
return Q(D), (e, t) => (d(), p("div", {
|
|
135
|
-
ref_key: "rootEl",
|
|
136
|
-
ref: x,
|
|
137
|
-
class: L(["fx-sel", M.value])
|
|
138
|
-
}, [
|
|
139
|
-
w("button", Y({
|
|
140
|
-
ref_key: "btnEl",
|
|
141
|
-
ref: f
|
|
142
|
-
}, e.$attrs, {
|
|
143
|
-
type: "button",
|
|
144
|
-
class: ["fx-btn", { "is-open": i.value }],
|
|
145
|
-
disabled: l.disabled,
|
|
146
|
-
"aria-haspopup": "listbox",
|
|
147
|
-
"aria-expanded": i.value,
|
|
148
|
-
onClick: t[0] || (t[0] = (o) => F()),
|
|
149
|
-
onKeydown: j
|
|
150
|
-
}), O($.value), 17, ae),
|
|
151
|
-
(d(), X(Z, { to: "#sch9-teleport-root" }, [
|
|
152
|
-
i.value ? (d(), p("div", {
|
|
153
|
-
key: 0,
|
|
154
|
-
ref_key: "popEl",
|
|
155
|
-
ref: S,
|
|
156
|
-
class: "fx-pop",
|
|
157
|
-
role: "listbox",
|
|
158
|
-
style: { visibility: "hidden" }
|
|
159
|
-
}, [
|
|
160
|
-
(d(!0), p(J, null, te(A.value, (o, u) => (d(), p(J, { key: u }, [
|
|
161
|
-
"heading" in o ? (d(), p("div", ie, O(o.heading), 1)) : (d(), p("div", {
|
|
162
|
-
key: 1,
|
|
163
|
-
class: L(["fx-opt", { "is-on": o.option.value === l.modelValue, "is-off": o.option.disabled }]),
|
|
164
|
-
role: "option",
|
|
165
|
-
"aria-selected": o.option.value === l.modelValue,
|
|
166
|
-
onClick: (s) => _(o.option)
|
|
167
|
-
}, [
|
|
168
|
-
t[1] || (t[1] = w("span", {
|
|
169
|
-
class: "fx-tick",
|
|
170
|
-
"aria-hidden": "true"
|
|
171
|
-
}, [
|
|
172
|
-
w("svg", {
|
|
173
|
-
width: "11",
|
|
174
|
-
height: "11",
|
|
175
|
-
viewBox: "0 0 16 16",
|
|
176
|
-
fill: "none"
|
|
177
|
-
}, [
|
|
178
|
-
w("path", {
|
|
179
|
-
d: "m3.5 8.4 3 3 6-7",
|
|
180
|
-
stroke: "currentColor",
|
|
181
|
-
"stroke-width": "2.2",
|
|
182
|
-
"stroke-linecap": "round",
|
|
183
|
-
"stroke-linejoin": "round"
|
|
184
|
-
})
|
|
185
|
-
])
|
|
186
|
-
], -1)),
|
|
187
|
-
oe(" " + O(o.option.label), 1)
|
|
188
|
-
], 10, se))
|
|
189
|
-
], 64))), 128))
|
|
190
|
-
], 512)) : ee("", !0)
|
|
191
|
-
]))
|
|
192
|
-
], 2));
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
export {
|
|
196
|
-
ue as S,
|
|
197
|
-
de as _,
|
|
198
|
-
ce as u
|
|
199
|
-
};
|
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
import { ref as $, computed as v, defineComponent as X, watch as Y, nextTick as Z, resolveComponent as F, createElementBlock as d, openBlock as c, createElementVNode as A, createVNode as b, renderSlot as z, withCtx as O, createCommentVNode as x, normalizeStyle as ee, Fragment as S, createBlock as T, unref as k, renderList as R, toDisplayString as N, normalizeClass as le, withModifiers as te } from "vue";
|
|
2
|
-
import "@feedmepos/ui-library";
|
|
3
|
-
/* empty css */
|
|
4
|
-
import { _ as ae } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
-
function ue(r, u, _ = r) {
|
|
6
|
-
const t = $(!0), C = v(() => {
|
|
7
|
-
if (!t.value && !u.value)
|
|
8
|
-
return !0;
|
|
9
|
-
if (u.value && u.value.length > 0) {
|
|
10
|
-
const n = _.value.map((o) => o.value);
|
|
11
|
-
return u.value.length === n.length && u.value.every((o) => n.includes(o));
|
|
12
|
-
}
|
|
13
|
-
return !1;
|
|
14
|
-
}), l = v(() => {
|
|
15
|
-
var n, o, h, p;
|
|
16
|
-
return !!((n = u.value) != null && n.length && ((o = u.value) == null ? void 0 : o.length) > 0 && ((h = u.value) == null ? void 0 : h.length) < ((p = r.value) == null ? void 0 : p.length));
|
|
17
|
-
});
|
|
18
|
-
return { allCleared: t, allSelected: C, indeterminate: l, toggleAll: () => {
|
|
19
|
-
if (C.value) {
|
|
20
|
-
u.value = void 0, t.value = !0;
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
const n = _.value.map((o) => o.value);
|
|
24
|
-
n.length === r.value.length ? (u.value = void 0, t.value = !1) : (u.value = n, t.value = !1);
|
|
25
|
-
}, toggleOption: (n) => {
|
|
26
|
-
var h, p, B;
|
|
27
|
-
let o;
|
|
28
|
-
u.value === void 0 && t.value ? o = [n] : u.value === void 0 && !t.value ? o = (h = r.value.map((m) => m.value)) == null ? void 0 : h.filter((m) => m !== n) : (p = u.value) != null && p.includes(n) ? o = (B = u.value) == null ? void 0 : B.filter((m) => m !== n) : o = [...u.value || [], n], o.length === 0 ? (u.value = void 0, t.value = !0) : o.length === r.value.length ? (u.value = void 0, t.value = !1) : u.value = o;
|
|
29
|
-
} };
|
|
30
|
-
}
|
|
31
|
-
const ne = { class: "w-full flex flex-col gap-8" }, re = { class: "flex items-center gap-8" }, oe = { class: "inline-flex items-center" }, se = { class: "flex flex-col w-[360px] min-h-0 gap-8" }, ie = {
|
|
32
|
-
key: 0,
|
|
33
|
-
class: "flex gap-4 px-[6px] pt-4"
|
|
34
|
-
}, ce = { class: "flex-1" }, ve = {
|
|
35
|
-
key: 0,
|
|
36
|
-
class: "px-12 pt-8 pb-4 text-xs font-semibold text-fm-color-typo-secondary select-none"
|
|
37
|
-
}, de = /* @__PURE__ */ X({
|
|
38
|
-
__name: "SelectFilter",
|
|
39
|
-
props: {
|
|
40
|
-
items: { default: () => [] },
|
|
41
|
-
modelValue: {},
|
|
42
|
-
multiple: { type: Boolean, default: !1 },
|
|
43
|
-
placeholder: { default: "Select..." },
|
|
44
|
-
searchPlaceholder: { default: "Search" },
|
|
45
|
-
disabled: { type: Boolean, default: !1 },
|
|
46
|
-
variant: { default: "default" },
|
|
47
|
-
clearable: { type: Boolean, default: !1 },
|
|
48
|
-
searchable: { type: Boolean, default: !0 },
|
|
49
|
-
autoSelectFirst: { type: Boolean, default: !1 },
|
|
50
|
-
chipIcon: { default: "filter_list" },
|
|
51
|
-
showSelectAll: { type: Boolean, default: !0 },
|
|
52
|
-
maxHeight: { default: 300 },
|
|
53
|
-
selectedPrefix: { default: "Selected: " },
|
|
54
|
-
filterFn: {}
|
|
55
|
-
},
|
|
56
|
-
emits: ["update:modelValue", "change"],
|
|
57
|
-
setup(r, { expose: u, emit: _ }) {
|
|
58
|
-
const t = r, C = _, l = v({
|
|
59
|
-
get: () => t.modelValue,
|
|
60
|
-
set: (e) => {
|
|
61
|
-
C("update:modelValue", e), C("change", e);
|
|
62
|
-
}
|
|
63
|
-
}), V = $(""), f = v(() => t.items), n = v(() => {
|
|
64
|
-
const e = V.value.trim();
|
|
65
|
-
if (!t.searchable || !e) return f.value;
|
|
66
|
-
if (t.filterFn)
|
|
67
|
-
return f.value.filter((s) => t.filterFn(s, e));
|
|
68
|
-
const a = e.toLowerCase();
|
|
69
|
-
return f.value.filter((s) => s.label.toLowerCase().includes(a));
|
|
70
|
-
}), o = v(() => f.value.some((e) => !!e.group)), h = v(() => {
|
|
71
|
-
if (!o.value)
|
|
72
|
-
return [{ group: "", options: n.value }];
|
|
73
|
-
const e = [], a = /* @__PURE__ */ new Map();
|
|
74
|
-
for (const s of n.value) {
|
|
75
|
-
const w = s.group ?? "";
|
|
76
|
-
let y = a.get(w);
|
|
77
|
-
y || (y = [], a.set(w, y), e.push({ group: w, options: y })), y.push(s);
|
|
78
|
-
}
|
|
79
|
-
return e;
|
|
80
|
-
}), p = v(() => {
|
|
81
|
-
if (!l.value || Array.isArray(l.value) && l.value.length === 0)
|
|
82
|
-
return t.placeholder;
|
|
83
|
-
if (Array.isArray(l.value) && l.value.length === 1) {
|
|
84
|
-
const a = f.value.find((s) => s.value === l.value[0]);
|
|
85
|
-
return (a == null ? void 0 : a.label) || t.placeholder;
|
|
86
|
-
}
|
|
87
|
-
const e = Array.isArray(l.value) ? l.value.length : 0;
|
|
88
|
-
return `${t.selectedPrefix}${e}`;
|
|
89
|
-
}), B = v(() => {
|
|
90
|
-
if (l.value === void 0 || l.value === null || l.value === "")
|
|
91
|
-
return t.placeholder;
|
|
92
|
-
const e = f.value.find((a) => a.value === l.value);
|
|
93
|
-
return (e == null ? void 0 : e.label) || t.placeholder;
|
|
94
|
-
}), m = v(
|
|
95
|
-
() => t.multiple ? p.value : B.value
|
|
96
|
-
), I = v(() => t.disabled ? "neutral-gray-200" : t.variant === "dark" ? "neutral-black" : "neutral-gray-400"), U = v(() => t.disabled ? "text-fm-color-neutral-gray-200" : t.variant === "dark" ? "text-fm-color-neutral-black" : "text-fm-color-neutral-gray-400"), L = $(void 0), j = new Proxy(L, {
|
|
97
|
-
get(e, a) {
|
|
98
|
-
return a === "value" ? Array.isArray(l.value) ? l.value : l.value === void 0 ? void 0 : [l.value] : L[a];
|
|
99
|
-
},
|
|
100
|
-
set(e, a, s) {
|
|
101
|
-
return a === "value" ? (l.value = s, !0) : (L[a] = s, !0);
|
|
102
|
-
}
|
|
103
|
-
}), { allSelected: P, toggleAll: q, toggleOption: E, indeterminate: J } = ue(
|
|
104
|
-
f,
|
|
105
|
-
j,
|
|
106
|
-
n
|
|
107
|
-
);
|
|
108
|
-
function G(e) {
|
|
109
|
-
var a;
|
|
110
|
-
t.multiple || (l.value = e, (a = M.value) == null || a.toggleMenu(!1));
|
|
111
|
-
}
|
|
112
|
-
function Q(e) {
|
|
113
|
-
e.stopPropagation(), !t.disabled && (l.value = null);
|
|
114
|
-
}
|
|
115
|
-
Y(
|
|
116
|
-
() => t.autoSelectFirst,
|
|
117
|
-
async (e) => {
|
|
118
|
-
if (e && !t.multiple && (l.value === void 0 || l.value === null)) {
|
|
119
|
-
await Z();
|
|
120
|
-
const a = f.value[0];
|
|
121
|
-
a && (l.value = a.value);
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
{ immediate: !0 }
|
|
125
|
-
);
|
|
126
|
-
const M = $(null);
|
|
127
|
-
return u({
|
|
128
|
-
open: () => {
|
|
129
|
-
var e;
|
|
130
|
-
return (e = M.value) == null ? void 0 : e.toggleMenu(!0);
|
|
131
|
-
},
|
|
132
|
-
close: () => {
|
|
133
|
-
var e;
|
|
134
|
-
return (e = M.value) == null ? void 0 : e.toggleMenu(!1);
|
|
135
|
-
}
|
|
136
|
-
}), (e, a) => {
|
|
137
|
-
const s = F("FmIcon"), w = F("FmChip"), y = F("FmSearch"), H = F("FmMenuItem"), W = F("FmMenu");
|
|
138
|
-
return c(), d("div", ne, [
|
|
139
|
-
A("div", re, [
|
|
140
|
-
b(W, {
|
|
141
|
-
ref_key: "menuRef",
|
|
142
|
-
ref: M,
|
|
143
|
-
"close-on-click": !1,
|
|
144
|
-
disabled: r.disabled,
|
|
145
|
-
"z-index": 50,
|
|
146
|
-
"selector-for-dismiss-away-event-exclusion": ".fm-dialog, .fm-select__menu__wrapper"
|
|
147
|
-
}, {
|
|
148
|
-
"menu-button": O(() => [
|
|
149
|
-
z(e.$slots, "menu-button", {}, () => [
|
|
150
|
-
A("div", oe, [
|
|
151
|
-
b(w, { disabled: r.disabled }, {
|
|
152
|
-
default: O(() => [
|
|
153
|
-
b(s, {
|
|
154
|
-
color: I.value,
|
|
155
|
-
name: r.chipIcon,
|
|
156
|
-
outline: "",
|
|
157
|
-
size: "sm"
|
|
158
|
-
}, null, 8, ["color", "name"]),
|
|
159
|
-
m.value ? (c(), d("div", {
|
|
160
|
-
key: 0,
|
|
161
|
-
class: le([
|
|
162
|
-
"fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap",
|
|
163
|
-
U.value
|
|
164
|
-
])
|
|
165
|
-
}, N(m.value), 3)) : x("", !0),
|
|
166
|
-
b(s, {
|
|
167
|
-
color: I.value,
|
|
168
|
-
name: "keyboard_arrow_down",
|
|
169
|
-
size: "sm"
|
|
170
|
-
}, null, 8, ["color"]),
|
|
171
|
-
r.clearable && !r.multiple && l.value != null && l.value !== "" && !r.disabled ? (c(), d("button", {
|
|
172
|
-
key: 1,
|
|
173
|
-
class: "ml-4 focus:outline-none",
|
|
174
|
-
type: "button",
|
|
175
|
-
"aria-label": "Clear selection",
|
|
176
|
-
onClick: te(Q, ["stop"])
|
|
177
|
-
}, [
|
|
178
|
-
b(s, {
|
|
179
|
-
name: "close",
|
|
180
|
-
size: "sm",
|
|
181
|
-
color: I.value
|
|
182
|
-
}, null, 8, ["color"])
|
|
183
|
-
])) : x("", !0)
|
|
184
|
-
]),
|
|
185
|
-
_: 1
|
|
186
|
-
}, 8, ["disabled"])
|
|
187
|
-
])
|
|
188
|
-
], !0)
|
|
189
|
-
]),
|
|
190
|
-
default: O(() => [
|
|
191
|
-
A("div", se, [
|
|
192
|
-
r.searchable ? (c(), d("div", ie, [
|
|
193
|
-
A("div", ce, [
|
|
194
|
-
b(y, {
|
|
195
|
-
modelValue: V.value,
|
|
196
|
-
"onUpdate:modelValue": a[0] || (a[0] = (i) => V.value = i),
|
|
197
|
-
placeholder: r.searchPlaceholder
|
|
198
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
199
|
-
])
|
|
200
|
-
])) : x("", !0),
|
|
201
|
-
A("div", {
|
|
202
|
-
class: "flex-1 overflow-y-auto min-h-0",
|
|
203
|
-
style: ee({ maxHeight: typeof r.maxHeight == "number" ? r.maxHeight + "px" : r.maxHeight })
|
|
204
|
-
}, [
|
|
205
|
-
r.multiple ? (c(), d(S, { key: 0 }, [
|
|
206
|
-
r.showSelectAll ? (c(), T(H, {
|
|
207
|
-
key: 0,
|
|
208
|
-
label: "All",
|
|
209
|
-
"has-checkbox": "",
|
|
210
|
-
"model-value": k(P),
|
|
211
|
-
indeterminate: k(J),
|
|
212
|
-
onClick: k(q)
|
|
213
|
-
}, null, 8, ["model-value", "indeterminate", "onClick"])) : x("", !0),
|
|
214
|
-
n.value.length ? (c(!0), d(S, { key: 1 }, R(h.value, (i) => (c(), d(S, {
|
|
215
|
-
key: i.group
|
|
216
|
-
}, [
|
|
217
|
-
i.group ? (c(), d("div", ve, N(i.group) + " (" + N(i.options.length) + ") ", 1)) : x("", !0),
|
|
218
|
-
(c(!0), d(S, null, R(i.options, (g) => {
|
|
219
|
-
var K;
|
|
220
|
-
return z(e.$slots, "option", {
|
|
221
|
-
key: g.value,
|
|
222
|
-
option: g,
|
|
223
|
-
selected: k(P) || Array.isArray(l.value) && ((K = l.value) == null ? void 0 : K.includes(g.value)),
|
|
224
|
-
toggle: () => k(E)(g.value)
|
|
225
|
-
}, () => {
|
|
226
|
-
var D;
|
|
227
|
-
return [
|
|
228
|
-
b(H, {
|
|
229
|
-
label: g.label,
|
|
230
|
-
"has-checkbox": "",
|
|
231
|
-
"model-value": k(P) || Array.isArray(l.value) && ((D = l.value) == null ? void 0 : D.includes(g.value)),
|
|
232
|
-
onClick: (fe) => k(E)(g.value)
|
|
233
|
-
}, null, 8, ["label", "model-value", "onClick"])
|
|
234
|
-
];
|
|
235
|
-
}, !0);
|
|
236
|
-
}), 128))
|
|
237
|
-
], 64))), 128)) : x("", !0)
|
|
238
|
-
], 64)) : (c(), d(S, { key: 1 }, [
|
|
239
|
-
n.value.length ? (c(!0), d(S, { key: 0 }, R(n.value, (i) => z(e.$slots, "option", {
|
|
240
|
-
option: i,
|
|
241
|
-
selected: l.value === i.value,
|
|
242
|
-
toggle: () => G(i.value)
|
|
243
|
-
}, () => [
|
|
244
|
-
(c(), T(H, {
|
|
245
|
-
key: i.value,
|
|
246
|
-
label: i.label,
|
|
247
|
-
onClick: (g) => G(i.value)
|
|
248
|
-
}, null, 8, ["label", "onClick"]))
|
|
249
|
-
], !0)), 256)) : x("", !0)
|
|
250
|
-
], 64))
|
|
251
|
-
], 4)
|
|
252
|
-
])
|
|
253
|
-
]),
|
|
254
|
-
_: 3
|
|
255
|
-
}, 8, ["disabled"]),
|
|
256
|
-
z(e.$slots, "append-right", {}, void 0, !0)
|
|
257
|
-
])
|
|
258
|
-
]);
|
|
259
|
-
};
|
|
260
|
-
}
|
|
261
|
-
}), ye = /* @__PURE__ */ ae(de, [["__scopeId", "data-v-81cde2b9"]]);
|
|
262
|
-
export {
|
|
263
|
-
ye as S
|
|
264
|
-
};
|