@dragonmastery/dragoncore-vue 0.0.1
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/LICENSE +75 -0
- package/dist/AppLink-CHMMrSFI.js +54 -0
- package/dist/AppLink-CHMMrSFI.js.map +1 -0
- package/dist/Appearance-BfPdKMXw.js +70 -0
- package/dist/Appearance-BfPdKMXw.js.map +1 -0
- package/dist/Appearance-C3WguxT-.js +3 -0
- package/dist/ChangePasswordPage-Btu5lf-r.js +86 -0
- package/dist/ChangePasswordPage-Btu5lf-r.js.map +1 -0
- package/dist/ChangePasswordPage-mBBuQMkT.js +6 -0
- package/dist/CreateTeamForm-n2ut93vM.js +43 -0
- package/dist/CreateTeamMemberForm-CcH3AxNL.js +43 -0
- package/dist/CreateUserPage-CDrGuW9B.js +6 -0
- package/dist/CreateUserPage-Cmx8xjjv.js +76 -0
- package/dist/CreateUserPage-Cmx8xjjv.js.map +1 -0
- package/dist/CreditBalanceDashboard-DLz0ioP3.js +43 -0
- package/dist/CreditManagement-D3q5S-qc.js +43 -0
- package/dist/CustomerCreateSupportTicketForm-Ci7QYkG-.js +43 -0
- package/dist/CustomerEditSupportTicketForm-Dd5ZB74k.js +159 -0
- package/dist/CustomerEditSupportTicketForm-Dd5ZB74k.js.map +1 -0
- package/dist/CustomerEditSupportTicketForm-lLchVjnw.js +9 -0
- package/dist/CustomerSupportTicketAttachmentsTab-gBrVO97t.js +43 -0
- package/dist/CustomerSupportTicketCustomerNotesTab-D0jhzbOY.js +8 -0
- package/dist/CustomerSupportTicketCustomerNotesTab-D1aa9It7.js +23 -0
- package/dist/CustomerSupportTicketCustomerNotesTab-D1aa9It7.js.map +1 -0
- package/dist/CustomerSupportTicketHistoryTab-BNTf8EZq.js +6 -0
- package/dist/CustomerSupportTicketHistoryTab-CFYN_Sa4.js +17 -0
- package/dist/CustomerSupportTicketHistoryTab-CFYN_Sa4.js.map +1 -0
- package/dist/CustomerSupportTicketList-BkOzFxMP.js +6 -0
- package/dist/CustomerSupportTicketList-C2nUPawb.js +166 -0
- package/dist/CustomerSupportTicketList-C2nUPawb.js.map +1 -0
- package/dist/CustomerSupportTicketParent-2mONd9kL.js +66 -0
- package/dist/CustomerSupportTicketParent-2mONd9kL.js.map +1 -0
- package/dist/CustomerSupportTicketParent-N8ko1yFE.js +7 -0
- package/dist/CustomerSupportTicketSuccess-w_-9NXT4.js +43 -0
- package/dist/CustomerViewSupportTicket-CVwNH0lS.js +11 -0
- package/dist/CustomerViewSupportTicket-tZkxragu.js +363 -0
- package/dist/CustomerViewSupportTicket-tZkxragu.js.map +1 -0
- package/dist/EditTeamForm-BioqiTWE.js +43 -0
- package/dist/EditTeamMemberForm-DCq0Gsn_.js +7 -0
- package/dist/EditTeamMemberForm-ru4WgLz-.js +169 -0
- package/dist/EditTeamMemberForm-ru4WgLz-.js.map +1 -0
- package/dist/EditUserPage-BxJ5QvIM.js +112 -0
- package/dist/EditUserPage-BxJ5QvIM.js.map +1 -0
- package/dist/EditUserPage-XOBuxUxd.js +7 -0
- package/dist/FieldsetSection-CsHN38_o.js +27 -0
- package/dist/FieldsetSection-CsHN38_o.js.map +1 -0
- package/dist/ForgotPassword-CpqvcSFg.js +7 -0
- package/dist/ForgotPassword-CqhenzUG.js +73 -0
- package/dist/ForgotPassword-CqhenzUG.js.map +1 -0
- package/dist/InlineAttachments-I39rOvip.js +1351 -0
- package/dist/InlineAttachments-I39rOvip.js.map +1 -0
- package/dist/LoginForm-AM0qkfbU.js +7 -0
- package/dist/LoginForm-_PZ51Uwe.js +116 -0
- package/dist/LoginForm-_PZ51Uwe.js.map +1 -0
- package/dist/Logout-BMjiqHnS.js +38 -0
- package/dist/Logout-BMjiqHnS.js.map +1 -0
- package/dist/Logout-BfiBjlaH.js +6 -0
- package/dist/NoteList-C0hRPNMO.js +497 -0
- package/dist/NoteList-C0hRPNMO.js.map +1 -0
- package/dist/NotificationEmailsPage-BjRqtW95.js +141 -0
- package/dist/NotificationEmailsPage-BjRqtW95.js.map +1 -0
- package/dist/NotificationEmailsPage-bx-9rg3x.js +7 -0
- package/dist/ResetPassword-BQLkR9TZ.js +43 -0
- package/dist/Signup-CnCcQlB8.js +7 -0
- package/dist/Signup-c2-_yMOM.js +106 -0
- package/dist/Signup-c2-_yMOM.js.map +1 -0
- package/dist/StaffCreateSupportTicketForm-ChVFDJdA.js +43 -0
- package/dist/StaffEditSupportTicketForm-DY1Zkf5k.js +9 -0
- package/dist/StaffEditSupportTicketForm-DuUKuIGg.js +263 -0
- package/dist/StaffEditSupportTicketForm-DuUKuIGg.js.map +1 -0
- package/dist/StaffSupportTicketAttachmentsTab-DpDXsHXP.js +43 -0
- package/dist/StaffSupportTicketCustomerNotesTab-CusqQV2-.js +23 -0
- package/dist/StaffSupportTicketCustomerNotesTab-CusqQV2-.js.map +1 -0
- package/dist/StaffSupportTicketCustomerNotesTab-rbJHJ0_V.js +8 -0
- package/dist/StaffSupportTicketHistoryTab-D24myEm3.js +17 -0
- package/dist/StaffSupportTicketHistoryTab-D24myEm3.js.map +1 -0
- package/dist/StaffSupportTicketHistoryTab-nmVma5vp.js +6 -0
- package/dist/StaffSupportTicketInternalNotesTab-D8HM--dp.js +23 -0
- package/dist/StaffSupportTicketInternalNotesTab-D8HM--dp.js.map +1 -0
- package/dist/StaffSupportTicketInternalNotesTab-DihYd5XI.js +8 -0
- package/dist/StaffSupportTicketList-DelptSmK.js +43 -0
- package/dist/StaffSupportTicketParent-BCrj3ckV.js +7 -0
- package/dist/StaffSupportTicketParent-Cx1buQZw.js +66 -0
- package/dist/StaffSupportTicketParent-Cx1buQZw.js.map +1 -0
- package/dist/StaffSupportTicketSuccess-BYxtY5wZ.js +43 -0
- package/dist/StaffSupportTicketWorkflowTab-BrDDBeK9.js +9 -0
- package/dist/StaffSupportTicketWorkflowTab-DmVTPzxS.js +1234 -0
- package/dist/StaffSupportTicketWorkflowTab-DmVTPzxS.js.map +1 -0
- package/dist/SupportTicketHistoryTab-CLMopA7a.js +220 -0
- package/dist/SupportTicketHistoryTab-CLMopA7a.js.map +1 -0
- package/dist/SupportTicketStatusBadge-YdZzjvkh.js +163 -0
- package/dist/SupportTicketStatusBadge-YdZzjvkh.js.map +1 -0
- package/dist/TeamAttachmentsTab-BxUpTWYh.js +43 -0
- package/dist/TeamHistoryTab-CUCT9MRG.js +5 -0
- package/dist/TeamHistoryTab-gB3H2KZv.js +219 -0
- package/dist/TeamHistoryTab-gB3H2KZv.js.map +1 -0
- package/dist/TeamList-By6pzWm5.js +43 -0
- package/dist/TeamMemberList-CYV9fWEb.js +43 -0
- package/dist/TeamMemberParent-CVvGqpxD.js +43 -0
- package/dist/TeamMembersTab-4gmnP9sD.js +21 -0
- package/dist/TeamMembersTab-4gmnP9sD.js.map +1 -0
- package/dist/TeamMembersTab-CpE9BaCi.js +3 -0
- package/dist/TeamNotesTab-pfXTDhg6.js +23 -0
- package/dist/TeamNotesTab-pfXTDhg6.js.map +1 -0
- package/dist/TeamNotesTab-u4cDC67X.js +8 -0
- package/dist/TeamParent-BxT1KubK.js +43 -0
- package/dist/UserListPage-DsQdH2Sm.js +4 -0
- package/dist/UserListPage-WU56KiWj.js +153 -0
- package/dist/UserListPage-WU56KiWj.js.map +1 -0
- package/dist/UserProfilePage-B73JhjUu.js +7 -0
- package/dist/UserProfilePage-BtLUY1kt.js +125 -0
- package/dist/UserProfilePage-BtLUY1kt.js.map +1 -0
- package/dist/ViewTeam-DzX-obEl.js +43 -0
- package/dist/ViewTeamMember-PF6S_4Pb.js +43 -0
- package/dist/ZiniaContainer-C7c7Vwkh.js +18 -0
- package/dist/ZiniaContainer-C7c7Vwkh.js.map +1 -0
- package/dist/convertToLocalDateTime-D4IoNvRj.js +111 -0
- package/dist/convertToLocalDateTime-D4IoNvRj.js.map +1 -0
- package/dist/creditValueFormatter-DftEzu8d.js +128 -0
- package/dist/creditValueFormatter-DftEzu8d.js.map +1 -0
- package/dist/displayIdFormatter-Dz900Awr.js +13 -0
- package/dist/displayIdFormatter-Dz900Awr.js.map +1 -0
- package/dist/index.d.ts +6068 -0
- package/dist/index.js +45 -0
- package/dist/src-o5fMIo5_.js +6649 -0
- package/dist/src-o5fMIo5_.js.map +1 -0
- package/dist/useBreadcrumbs-DmgSucoe.js +41 -0
- package/dist/useBreadcrumbs-DmgSucoe.js.map +1 -0
- package/dist/useMutation-CFwe7H9j.js +50 -0
- package/dist/useMutation-CFwe7H9j.js.map +1 -0
- package/dist/useQuery-p7oJO7OD.js +107 -0
- package/dist/useQuery-p7oJO7OD.js.map +1 -0
- package/dist/useQueryCache-ByayvZgZ.js +254 -0
- package/dist/useQueryCache-ByayvZgZ.js.map +1 -0
- package/dist/useRpcAuth-BLlRSHy8.js +722 -0
- package/dist/useRpcAuth-BLlRSHy8.js.map +1 -0
- package/package.json +62 -0
- package/src/daisyui.css +63 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
DRAGONCORE VUE EVALUATION LICENSE
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 DragonMastery. All rights reserved.
|
|
4
|
+
|
|
5
|
+
================================================================================
|
|
6
|
+
|
|
7
|
+
NOTICE: This software and associated documentation files (the "Software") are
|
|
8
|
+
proprietary to DragonMastery.
|
|
9
|
+
|
|
10
|
+
GRANT OF EVALUATION LICENSE:
|
|
11
|
+
|
|
12
|
+
DragonMastery grants you a limited, non-exclusive, non-transferable, revocable
|
|
13
|
+
license to:
|
|
14
|
+
|
|
15
|
+
1. EVALUATION USE: Download and use the Software for evaluation and testing
|
|
16
|
+
purposes in non-production environments only.
|
|
17
|
+
|
|
18
|
+
2. DEVELOPMENT USE: Use the Software in local development environments for
|
|
19
|
+
proof-of-concept and evaluation purposes only.
|
|
20
|
+
|
|
21
|
+
3. INSPECTION: View and study the source code for evaluation purposes only.
|
|
22
|
+
|
|
23
|
+
RESTRICTIONS:
|
|
24
|
+
|
|
25
|
+
Without a separate commercial license from DragonMastery, you may NOT:
|
|
26
|
+
|
|
27
|
+
1. Use the Software in any production environment or live application
|
|
28
|
+
2. Use the Software in any commercial capacity or revenue-generating service
|
|
29
|
+
3. Modify, adapt, or create derivative works based on the Software
|
|
30
|
+
4. Redistribute, sublicense, sell, rent, lease, or transfer the Software
|
|
31
|
+
5. Remove or alter any copyright, trademark, or proprietary notices
|
|
32
|
+
6. Use the Software to develop competing products or services
|
|
33
|
+
7. Provide access to the Software to third parties for their use
|
|
34
|
+
|
|
35
|
+
PRODUCTION & COMMERCIAL LICENSE:
|
|
36
|
+
|
|
37
|
+
To use this Software in production environments or for commercial purposes, you
|
|
38
|
+
MUST obtain a separate commercial license from DragonMastery.
|
|
39
|
+
|
|
40
|
+
Contact for licensing:
|
|
41
|
+
|
|
42
|
+
- Repository: https://github.com/DragonMastery/zinia-forms
|
|
43
|
+
- Open a GitHub issue for licensing inquiries
|
|
44
|
+
|
|
45
|
+
TERMINATION:
|
|
46
|
+
|
|
47
|
+
This License is effective until terminated. Your rights under this License
|
|
48
|
+
terminate automatically without notice if you fail to comply with any term. Upon
|
|
49
|
+
termination, you must immediately cease all use and destroy all copies of the
|
|
50
|
+
Software.
|
|
51
|
+
|
|
52
|
+
DISCLAIMER OF WARRANTY:
|
|
53
|
+
|
|
54
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
55
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
56
|
+
FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. DRAGONMASTERY MAKES NO WARRANTY
|
|
57
|
+
THAT THE SOFTWARE WILL BE ERROR-FREE OR UNINTERRUPTED.
|
|
58
|
+
|
|
59
|
+
LIMITATION OF LIABILITY:
|
|
60
|
+
|
|
61
|
+
IN NO EVENT SHALL DRAGONMASTERY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
62
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
63
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
64
|
+
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
65
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
|
66
|
+
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
|
67
|
+
OF SUCH DAMAGE.
|
|
68
|
+
|
|
69
|
+
ACKNOWLEDGMENT:
|
|
70
|
+
|
|
71
|
+
By downloading, installing, or using the Software, you acknowledge that you have
|
|
72
|
+
read this License, understand it, and agree to be bound by its terms and
|
|
73
|
+
conditions.
|
|
74
|
+
|
|
75
|
+
================================================================================
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { computed, createBlock, createElementBlock, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from "vue";
|
|
2
|
+
import { RouterLink } from "vue-router";
|
|
3
|
+
|
|
4
|
+
//#region src/components/AppLink.vue
|
|
5
|
+
const _hoisted_1 = ["href"];
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "AppLink",
|
|
8
|
+
props: {
|
|
9
|
+
to: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: true
|
|
12
|
+
},
|
|
13
|
+
activeClass: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "active"
|
|
16
|
+
},
|
|
17
|
+
exactActiveClass: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "exact-active"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
setup(__props) {
|
|
23
|
+
const props = __props;
|
|
24
|
+
const isExternalLink = computed(() => {
|
|
25
|
+
return typeof props.to === "string" && props.to.startsWith("http");
|
|
26
|
+
});
|
|
27
|
+
return (_ctx, _cache) => {
|
|
28
|
+
return isExternalLink.value ? (openBlock(), createElementBlock("a", mergeProps({ key: 0 }, _ctx.$attrs, {
|
|
29
|
+
href: __props.to,
|
|
30
|
+
target: "_blank",
|
|
31
|
+
rel: "noopener noreferrer",
|
|
32
|
+
class: [_ctx.$attrs.class]
|
|
33
|
+
}), [renderSlot(_ctx.$slots, "default")], 16, _hoisted_1)) : (openBlock(), createBlock(unref(RouterLink), mergeProps({ key: 1 }, _ctx.$attrs, {
|
|
34
|
+
to: __props.to,
|
|
35
|
+
class: [_ctx.$attrs.class],
|
|
36
|
+
"active-class": __props.activeClass,
|
|
37
|
+
"exact-active-class": __props.exactActiveClass
|
|
38
|
+
}), {
|
|
39
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
40
|
+
_: 3
|
|
41
|
+
}, 16, [
|
|
42
|
+
"to",
|
|
43
|
+
"class",
|
|
44
|
+
"active-class",
|
|
45
|
+
"exact-active-class"
|
|
46
|
+
]));
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
var AppLink_default = _sfc_main;
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
53
|
+
export { AppLink_default as t };
|
|
54
|
+
//# sourceMappingURL=AppLink-CHMMrSFI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppLink-CHMMrSFI.js","names":["$attrs"],"sources":["../src/components/AppLink.vue"],"sourcesContent":["<template>\n <template v-if=\"isExternalLink\">\n <a\n v-bind=\"$attrs\"\n :href=\"to\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n :class=\"[$attrs.class]\"\n >\n <slot />\n </a>\n </template>\n <template v-else>\n <router-link\n v-bind=\"$attrs\"\n :to=\"to\"\n :class=\"[$attrs.class]\"\n :active-class=\"activeClass\"\n :exact-active-class=\"exactActiveClass\"\n >\n <slot />\n </router-link>\n </template>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { RouterLink } from 'vue-router';\n\nconst props = defineProps({\n to: {\n type: String,\n required: true,\n },\n activeClass: {\n type: String,\n default: 'active',\n },\n exactActiveClass: {\n type: String,\n default: 'exact-active',\n },\n});\n\nconst isExternalLink = computed(() => {\n return typeof props.to === 'string' && props.to.startsWith('http');\n});\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;EA6BA,MAAM,QAAQ;EAed,MAAM,iBAAiB,eAAe;AACpC,UAAO,OAAO,MAAM,OAAO,YAAY,MAAM,GAAG,WAAW,OAAO;IAClE;;UA7CgB,eAAA,SAAA,WAAA,EACd,mBAQI,KARJ,WAQI,EAAA,KAAA,GAAA,EAPMA,KAAAA,QAAM;IACb,MAAM,QAAA;IACP,QAAO;IACP,KAAI;IACH,OAAK,CAAGA,KAAAA,OAAO,MAAK;QAErB,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,IAAA,WAAA,KAAA,WAAA,EAIV,YAQc,MAAA,WAAA,EARd,WAQc,EAAA,KAAA,GAAA,EAPJA,KAAAA,QAAM;IACb,IAAI,QAAA;IACJ,OAAK,CAAGA,KAAAA,OAAO,MAAK;IACpB,gBAAc,QAAA;IACd,sBAAoB,QAAA;;2BAEb,CAAR,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, unref, watchEffect } from "vue";
|
|
2
|
+
import { useColorMode, useCycleList } from "@vueuse/core";
|
|
3
|
+
|
|
4
|
+
//#region src/components/ThemePref.vue
|
|
5
|
+
const _hoisted_1$1 = {
|
|
6
|
+
key: 0,
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
fill: "none",
|
|
9
|
+
viewBox: "0 0 24 24",
|
|
10
|
+
"stroke-width": "1.5",
|
|
11
|
+
stroke: "currentColor",
|
|
12
|
+
class: "h-6 w-6"
|
|
13
|
+
};
|
|
14
|
+
const _hoisted_2 = {
|
|
15
|
+
key: 1,
|
|
16
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17
|
+
fill: "none",
|
|
18
|
+
viewBox: "0 0 24 24",
|
|
19
|
+
"stroke-width": "1.5",
|
|
20
|
+
stroke: "currentColor",
|
|
21
|
+
class: "h-6 w-6"
|
|
22
|
+
};
|
|
23
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
24
|
+
__name: "ThemePref",
|
|
25
|
+
setup(__props) {
|
|
26
|
+
const colorMode = useColorMode({
|
|
27
|
+
emitAuto: true,
|
|
28
|
+
attribute: "data-theme",
|
|
29
|
+
initialValue: "dark",
|
|
30
|
+
modes: {
|
|
31
|
+
dark: "dark",
|
|
32
|
+
light: "light"
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
const { state, next } = useCycleList(["dark", "light"], { initialValue: colorMode });
|
|
36
|
+
watchEffect(() => colorMode.value = state.value);
|
|
37
|
+
return (_ctx, _cache) => {
|
|
38
|
+
return openBlock(), createElementBlock("div", {
|
|
39
|
+
class: "btn btn-ghost btn-circle",
|
|
40
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(next)())
|
|
41
|
+
}, [unref(colorMode) == "dark" ? (openBlock(), createElementBlock("svg", _hoisted_1$1, [..._cache[1] || (_cache[1] = [createElementVNode("path", {
|
|
42
|
+
"stroke-linecap": "round",
|
|
43
|
+
"stroke-linejoin": "round",
|
|
44
|
+
d: "M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z"
|
|
45
|
+
}, null, -1)])])) : (openBlock(), createElementBlock("svg", _hoisted_2, [..._cache[2] || (_cache[2] = [createElementVNode("path", {
|
|
46
|
+
"stroke-linecap": "round",
|
|
47
|
+
"stroke-linejoin": "round",
|
|
48
|
+
d: "M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z"
|
|
49
|
+
}, null, -1)])]))]);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
var ThemePref_default = _sfc_main$1;
|
|
54
|
+
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/slices/user/features/Appearance.vue
|
|
57
|
+
const _hoisted_1 = { class: "max-w-md mx-auto bg-base-200 p-6 rounded-xl shadow-md container" };
|
|
58
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
59
|
+
__name: "Appearance",
|
|
60
|
+
setup(__props) {
|
|
61
|
+
return (_ctx, _cache) => {
|
|
62
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", null, [createElementVNode("span", null, [_cache[0] || (_cache[0] = createTextVNode("Theme Preference: ", -1)), createVNode(ThemePref_default)])])]);
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
var Appearance_default = _sfc_main;
|
|
67
|
+
|
|
68
|
+
//#endregion
|
|
69
|
+
export { ThemePref_default as n, Appearance_default as t };
|
|
70
|
+
//# sourceMappingURL=Appearance-BfPdKMXw.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Appearance-BfPdKMXw.js","names":[],"sources":["../src/components/ThemePref.vue","../src/slices/user/features/Appearance.vue"],"sourcesContent":["<template>\n <div class=\"btn btn-ghost btn-circle\" @click=\"next()\">\n <template v-if=\"colorMode == 'dark'\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n class=\"h-6 w-6\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z\"\n />\n </svg>\n </template>\n <template v-else>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n class=\"h-6 w-6\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z\"\n />\n </svg>\n </template>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { useColorMode, useCycleList } from '@vueuse/core';\nimport { watchEffect } from 'vue';\n\nconst colorMode = useColorMode({\n emitAuto: true,\n attribute: 'data-theme',\n initialValue: 'dark',\n modes: {\n dark: 'dark',\n light: 'light',\n },\n});\n\nconst { state, next } = useCycleList(['dark', 'light'], {\n initialValue: colorMode,\n});\n\nwatchEffect(() => (colorMode.value = state.value as any));\n</script>\n","<template>\n <div class=\"max-w-md mx-auto bg-base-200 p-6 rounded-xl shadow-md container\">\n <div>\n <span>Theme Preference: <ThemePref /></span>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport ThemePref from '../../../components/ThemePref.vue';\n</script>\n\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EAwCA,MAAM,YAAY,aAAa;GAC7B,UAAU;GACV,WAAW;GACX,cAAc;GACd,OAAO;IACL,MAAM;IACN,OAAO;IACR;GACF,CAAC;EAEF,MAAM,EAAE,OAAO,SAAS,aAAa,CAAC,QAAQ,QAAQ,EAAE,EACtD,cAAc,WACf,CAAC;AAEF,oBAAmB,UAAU,QAAQ,MAAM,MAAc;;uBArDvD,mBAiCM,OAAA;IAjCD,OAAM;IAA4B,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,KAAI,EAAA;OAChC,MAAA,UAAS,IAAA,UAAA,WAAA,EACvB,mBAaM,OAbN,cAaM,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CALJ,mBAIE,QAAA;IAHA,kBAAe;IACf,mBAAgB;IAChB,GAAE;qCAKN,mBAaM,OAbN,YAaM,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CALJ,mBAIE,QAAA;IAHA,kBAAe;IACf,mBAAgB;IAChB,GAAE;;;;;;;;;;;;;;uBC7BV,mBAIM,OAJN,YAIM,CAHJ,mBAEM,OAAA,MAAA,CADJ,mBAA4C,QAAA,MAAA,CAAA,OAAA,OAAA,OAAA,KAAA,gBAAtC,sBAAkB,GAAA,GAAA,YAAa,kBAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { t as useMutation } from "./useMutation-CFwe7H9j.js";
|
|
2
|
+
import { createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, openBlock, unref, withCtx } from "vue";
|
|
3
|
+
import { changePasswordSchema } from "@dragonmastery/dragoncore-shared";
|
|
4
|
+
import { useForm, withMetadata } from "@dragonmastery/zinia-forms-core";
|
|
5
|
+
import { toast } from "vue3-toastify";
|
|
6
|
+
|
|
7
|
+
//#region src/slices/user/features/change_password/changePasswordSchema.ts
|
|
8
|
+
const changePasswordSchemaWithMetadata = withMetadata(changePasswordSchema, "changePasswordSchema", {
|
|
9
|
+
"passwords.current_password": {
|
|
10
|
+
inputType: "password",
|
|
11
|
+
placeholder: "Enter current password",
|
|
12
|
+
helpText: "Enter your current password",
|
|
13
|
+
autocomplete: "current-password"
|
|
14
|
+
},
|
|
15
|
+
"passwords.new_password": {
|
|
16
|
+
inputType: "password",
|
|
17
|
+
placeholder: "Enter new password",
|
|
18
|
+
helpText: "Enter your new password"
|
|
19
|
+
},
|
|
20
|
+
"passwords.new_password_confirm": {
|
|
21
|
+
inputType: "password",
|
|
22
|
+
placeholder: "Confirm new password",
|
|
23
|
+
helpText: "Confirm your new password"
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/slices/user/features/change_password/ChangePasswordPage.vue
|
|
29
|
+
const _hoisted_1 = { class: "max-w-md mx-auto bg-base-200 p-6 rounded-xl shadow-md container" };
|
|
30
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
31
|
+
__name: "ChangePasswordPage",
|
|
32
|
+
setup(__props) {
|
|
33
|
+
const { form, zinia, ZiniaForm, ZiniaSubmitButton } = useForm(changePasswordSchemaWithMetadata, {
|
|
34
|
+
storeName: "change-password-form",
|
|
35
|
+
persistToLocalStorage: false,
|
|
36
|
+
renderStyle: "daisy_ui"
|
|
37
|
+
});
|
|
38
|
+
const { mutate: changePasswordMutate } = useMutation((api, input) => api.passwordReset.changePassword(input));
|
|
39
|
+
const handleSubmit = async (data) => {
|
|
40
|
+
const result = await changePasswordMutate(data);
|
|
41
|
+
if (!result?.ok) throw new Error("Failed to change password");
|
|
42
|
+
return result;
|
|
43
|
+
};
|
|
44
|
+
const handleSuccess = async (_) => {
|
|
45
|
+
form.reset({ passwords: {
|
|
46
|
+
current_password: "",
|
|
47
|
+
new_password: "",
|
|
48
|
+
new_password_confirm: ""
|
|
49
|
+
} });
|
|
50
|
+
toast.success("Password changed successfully!");
|
|
51
|
+
};
|
|
52
|
+
const handleError = (error) => {
|
|
53
|
+
toast.error(error.message || "Failed to change password");
|
|
54
|
+
};
|
|
55
|
+
return (_ctx, _cache) => {
|
|
56
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [_cache[1] || (_cache[1] = createElementVNode("h1", { class: "text-2xl font-bold mb-6 text-center" }, "Change Password", -1)), createVNode(unref(ZiniaForm), {
|
|
57
|
+
onHandleSubmit: handleSubmit,
|
|
58
|
+
onSuccess: handleSuccess,
|
|
59
|
+
onError: handleError
|
|
60
|
+
}, {
|
|
61
|
+
default: withCtx(() => [
|
|
62
|
+
createCommentVNode(" hidden username "),
|
|
63
|
+
_cache[0] || (_cache[0] = createElementVNode("input", {
|
|
64
|
+
type: "text",
|
|
65
|
+
class: "hidden",
|
|
66
|
+
autocomplete: "username",
|
|
67
|
+
name: "username"
|
|
68
|
+
}, null, -1)),
|
|
69
|
+
createVNode(unref(zinia).PasswordsCurrentPasswordField),
|
|
70
|
+
createVNode(unref(zinia).PasswordsNewPasswordField),
|
|
71
|
+
createVNode(unref(zinia).PasswordsNewPasswordConfirmField),
|
|
72
|
+
createVNode(unref(ZiniaSubmitButton), {
|
|
73
|
+
submitText: "Change Password",
|
|
74
|
+
submittingText: "Changing Password..."
|
|
75
|
+
})
|
|
76
|
+
]),
|
|
77
|
+
_: 1
|
|
78
|
+
})]);
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
var ChangePasswordPage_default = _sfc_main;
|
|
83
|
+
|
|
84
|
+
//#endregion
|
|
85
|
+
export { changePasswordSchemaWithMetadata as n, ChangePasswordPage_default as t };
|
|
86
|
+
//# sourceMappingURL=ChangePasswordPage-Btu5lf-r.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChangePasswordPage-Btu5lf-r.js","names":[],"sources":["../src/slices/user/features/change_password/changePasswordSchema.ts","../src/slices/user/features/change_password/ChangePasswordPage.vue"],"sourcesContent":["import { withMetadata } from '@dragonmastery/zinia-forms-core';\nimport { changePasswordSchema } from '@dragonmastery/dragoncore-shared';\nimport { z } from 'zod';\n\n// Define the login form type\nexport type ChangePasswordForm = z.infer<typeof changePasswordSchema>;\n\n// Enhance the schema with metadata\nexport const changePasswordSchemaWithMetadata = withMetadata(\n changePasswordSchema,\n 'changePasswordSchema',\n {\n 'passwords.current_password': {\n inputType: 'password',\n placeholder: 'Enter current password',\n helpText: 'Enter your current password',\n autocomplete: 'current-password',\n },\n\n 'passwords.new_password': {\n inputType: 'password',\n placeholder: 'Enter new password',\n helpText: 'Enter your new password',\n },\n 'passwords.new_password_confirm': {\n inputType: 'password',\n placeholder: 'Confirm new password',\n helpText: 'Confirm your new password',\n },\n },\n);\n","<template>\n <div class=\"max-w-md mx-auto bg-base-200 p-6 rounded-xl shadow-md container\">\n <h1 class=\"text-2xl font-bold mb-6 text-center\">Change Password</h1>\n\n <ZiniaForm @handle-submit=\"handleSubmit\" @success=\"handleSuccess\" @error=\"handleError\">\n <!-- hidden username -->\n <input type=\"text\" class=\"hidden\" autocomplete=\"username\" name=\"username\" />\n <zinia.PasswordsCurrentPasswordField />\n <zinia.PasswordsNewPasswordField />\n <zinia.PasswordsNewPasswordConfirmField />\n\n <ZiniaSubmitButton submitText=\"Change Password\" submittingText=\"Changing Password...\" />\n </ZiniaForm>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { useForm } from '@dragonmastery/zinia-forms-core';\nimport { toast } from 'vue3-toastify';\nimport { z } from 'zod';\nimport { useMutation } from '../../../../composables/useMutation';\nimport { changePasswordSchemaWithMetadata } from './changePasswordSchema';\n\n// Create a type-safe form using our schema with metadata\nconst { form, zinia, ZiniaForm, ZiniaSubmitButton } = useForm(\n changePasswordSchemaWithMetadata,\n {\n storeName: 'change-password-form',\n persistToLocalStorage: false,\n renderStyle: 'daisy_ui',\n },\n);\n\nconst { mutate: changePasswordMutate } = useMutation(\n (api, input: z.infer<typeof changePasswordSchemaWithMetadata>) =>\n api.passwordReset.changePassword(input),\n);\n\n// Handle form submission\nconst handleSubmit = async (data: z.infer<typeof changePasswordSchemaWithMetadata>) => {\n const result = await changePasswordMutate(data);\n if (!result?.ok) throw new Error('Failed to change password');\n return result;\n};\n\n// Handle success\nconst handleSuccess = async (_: { ok: boolean }) => {\n form.reset({\n passwords: {\n current_password: '',\n new_password: '',\n new_password_confirm: '',\n },\n });\n toast.success('Password changed successfully!');\n};\n\n// Handle error\nconst handleError = (error: any) => {\n toast.error(error.message || 'Failed to change password');\n};\n</script>\n"],"mappings":";;;;;;;AAQA,MAAa,mCAAmC,aAC9C,sBACA,wBACA;CACE,8BAA8B;EAC5B,WAAW;EACX,aAAa;EACb,UAAU;EACV,cAAc;EACf;CAED,0BAA0B;EACxB,WAAW;EACX,aAAa;EACb,UAAU;EACX;CACD,kCAAkC;EAChC,WAAW;EACX,aAAa;EACb,UAAU;EACX;CACF,CACF;;;;;;;;ECND,MAAM,EAAE,MAAM,OAAO,WAAW,sBAAsB,QACpD,kCACA;GACE,WAAW;GACX,uBAAuB;GACvB,aAAa;GACd,CACF;EAED,MAAM,EAAE,QAAQ,yBAAyB,aACtC,KAAK,UACJ,IAAI,cAAc,eAAe,MAAM,CAC1C;EAGD,MAAM,eAAe,OAAO,SAA2D;GACrF,MAAM,SAAS,MAAM,qBAAqB,KAAK;AAC/C,OAAI,CAAC,QAAQ,GAAI,OAAM,IAAI,MAAM,4BAA4B;AAC7D,UAAO;;EAIT,MAAM,gBAAgB,OAAO,MAAuB;AAClD,QAAK,MAAM,EACT,WAAW;IACT,kBAAkB;IAClB,cAAc;IACd,sBAAsB;IACvB,EACF,CAAC;AACF,SAAM,QAAQ,iCAAiC;;EAIjD,MAAM,eAAe,UAAe;AAClC,SAAM,MAAM,MAAM,WAAW,4BAA4B;;;uBA1DzD,mBAYM,OAZN,YAYM,CAAA,OAAA,OAAA,OAAA,KAXJ,mBAAoE,MAAA,EAAhE,OAAM,uCAAqC,EAAC,mBAAe,GAAA,GAE/D,YAQY,MAAA,UAAA,EAAA;IARA,gBAAe;IAAe,WAAS;IAAgB,SAAO;;2BAChD;KAAxB,mBAAA,oBAAwB;+BACxB,mBAA4E,SAAA;MAArE,MAAK;MAAO,OAAM;MAAS,cAAa;MAAW,MAAK;;KAC/D,YAAuC,MAAA,MAAA,CAAA,8BAAA;KACvC,YAAmC,MAAA,MAAA,CAAA,0BAAA;KACnC,YAA0C,MAAA,MAAA,CAAA,iCAAA;KAE1C,YAAwF,MAAA,kBAAA,EAAA;MAArE,YAAW;MAAkB,gBAAe"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import "./useRpcAuth-BLlRSHy8.js";
|
|
2
|
+
import "./useQueryCache-ByayvZgZ.js";
|
|
3
|
+
import "./useMutation-CFwe7H9j.js";
|
|
4
|
+
import "./useQuery-p7oJO7OD.js";
|
|
5
|
+
import { X as CreateTeamForm_default } from "./src-o5fMIo5_.js";
|
|
6
|
+
import "./AppLink-CHMMrSFI.js";
|
|
7
|
+
import "./InlineAttachments-I39rOvip.js";
|
|
8
|
+
import "./TeamMembersTab-4gmnP9sD.js";
|
|
9
|
+
import "./Appearance-BfPdKMXw.js";
|
|
10
|
+
import "./useBreadcrumbs-DmgSucoe.js";
|
|
11
|
+
import "./FieldsetSection-CsHN38_o.js";
|
|
12
|
+
import "./ZiniaContainer-C7c7Vwkh.js";
|
|
13
|
+
import "./NoteList-C0hRPNMO.js";
|
|
14
|
+
import "./UserProfilePage-BtLUY1kt.js";
|
|
15
|
+
import "./ChangePasswordPage-Btu5lf-r.js";
|
|
16
|
+
import "./TeamHistoryTab-gB3H2KZv.js";
|
|
17
|
+
import "./TeamNotesTab-pfXTDhg6.js";
|
|
18
|
+
import "./EditTeamMemberForm-ru4WgLz-.js";
|
|
19
|
+
import "./SupportTicketStatusBadge-YdZzjvkh.js";
|
|
20
|
+
import "./creditValueFormatter-DftEzu8d.js";
|
|
21
|
+
import "./CustomerSupportTicketList-C2nUPawb.js";
|
|
22
|
+
import "./CustomerEditSupportTicketForm-Dd5ZB74k.js";
|
|
23
|
+
import "./CustomerViewSupportTicket-tZkxragu.js";
|
|
24
|
+
import "./CustomerSupportTicketParent-2mONd9kL.js";
|
|
25
|
+
import "./CustomerSupportTicketCustomerNotesTab-D1aa9It7.js";
|
|
26
|
+
import "./SupportTicketHistoryTab-CLMopA7a.js";
|
|
27
|
+
import "./CustomerSupportTicketHistoryTab-CFYN_Sa4.js";
|
|
28
|
+
import "./StaffSupportTicketWorkflowTab-DmVTPzxS.js";
|
|
29
|
+
import "./StaffEditSupportTicketForm-DuUKuIGg.js";
|
|
30
|
+
import "./StaffSupportTicketParent-Cx1buQZw.js";
|
|
31
|
+
import "./StaffSupportTicketCustomerNotesTab-CusqQV2-.js";
|
|
32
|
+
import "./StaffSupportTicketInternalNotesTab-D8HM--dp.js";
|
|
33
|
+
import "./StaffSupportTicketHistoryTab-D24myEm3.js";
|
|
34
|
+
import "./LoginForm-_PZ51Uwe.js";
|
|
35
|
+
import "./Signup-c2-_yMOM.js";
|
|
36
|
+
import "./ForgotPassword-CqhenzUG.js";
|
|
37
|
+
import "./Logout-BMjiqHnS.js";
|
|
38
|
+
import "./UserListPage-WU56KiWj.js";
|
|
39
|
+
import "./CreateUserPage-Cmx8xjjv.js";
|
|
40
|
+
import "./NotificationEmailsPage-BjRqtW95.js";
|
|
41
|
+
import "./EditUserPage-BxJ5QvIM.js";
|
|
42
|
+
|
|
43
|
+
export { CreateTeamForm_default as default };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import "./useRpcAuth-BLlRSHy8.js";
|
|
2
|
+
import "./useQueryCache-ByayvZgZ.js";
|
|
3
|
+
import "./useMutation-CFwe7H9j.js";
|
|
4
|
+
import "./useQuery-p7oJO7OD.js";
|
|
5
|
+
import { H as CreateTeamMemberForm_default } from "./src-o5fMIo5_.js";
|
|
6
|
+
import "./AppLink-CHMMrSFI.js";
|
|
7
|
+
import "./InlineAttachments-I39rOvip.js";
|
|
8
|
+
import "./TeamMembersTab-4gmnP9sD.js";
|
|
9
|
+
import "./Appearance-BfPdKMXw.js";
|
|
10
|
+
import "./useBreadcrumbs-DmgSucoe.js";
|
|
11
|
+
import "./FieldsetSection-CsHN38_o.js";
|
|
12
|
+
import "./ZiniaContainer-C7c7Vwkh.js";
|
|
13
|
+
import "./NoteList-C0hRPNMO.js";
|
|
14
|
+
import "./UserProfilePage-BtLUY1kt.js";
|
|
15
|
+
import "./ChangePasswordPage-Btu5lf-r.js";
|
|
16
|
+
import "./TeamHistoryTab-gB3H2KZv.js";
|
|
17
|
+
import "./TeamNotesTab-pfXTDhg6.js";
|
|
18
|
+
import "./EditTeamMemberForm-ru4WgLz-.js";
|
|
19
|
+
import "./SupportTicketStatusBadge-YdZzjvkh.js";
|
|
20
|
+
import "./creditValueFormatter-DftEzu8d.js";
|
|
21
|
+
import "./CustomerSupportTicketList-C2nUPawb.js";
|
|
22
|
+
import "./CustomerEditSupportTicketForm-Dd5ZB74k.js";
|
|
23
|
+
import "./CustomerViewSupportTicket-tZkxragu.js";
|
|
24
|
+
import "./CustomerSupportTicketParent-2mONd9kL.js";
|
|
25
|
+
import "./CustomerSupportTicketCustomerNotesTab-D1aa9It7.js";
|
|
26
|
+
import "./SupportTicketHistoryTab-CLMopA7a.js";
|
|
27
|
+
import "./CustomerSupportTicketHistoryTab-CFYN_Sa4.js";
|
|
28
|
+
import "./StaffSupportTicketWorkflowTab-DmVTPzxS.js";
|
|
29
|
+
import "./StaffEditSupportTicketForm-DuUKuIGg.js";
|
|
30
|
+
import "./StaffSupportTicketParent-Cx1buQZw.js";
|
|
31
|
+
import "./StaffSupportTicketCustomerNotesTab-CusqQV2-.js";
|
|
32
|
+
import "./StaffSupportTicketInternalNotesTab-D8HM--dp.js";
|
|
33
|
+
import "./StaffSupportTicketHistoryTab-D24myEm3.js";
|
|
34
|
+
import "./LoginForm-_PZ51Uwe.js";
|
|
35
|
+
import "./Signup-c2-_yMOM.js";
|
|
36
|
+
import "./ForgotPassword-CqhenzUG.js";
|
|
37
|
+
import "./Logout-BMjiqHnS.js";
|
|
38
|
+
import "./UserListPage-WU56KiWj.js";
|
|
39
|
+
import "./CreateUserPage-Cmx8xjjv.js";
|
|
40
|
+
import "./NotificationEmailsPage-BjRqtW95.js";
|
|
41
|
+
import "./EditUserPage-BxJ5QvIM.js";
|
|
42
|
+
|
|
43
|
+
export { CreateTeamMemberForm_default as default };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { t as useMutation } from "./useMutation-CFwe7H9j.js";
|
|
2
|
+
import { createElementBlock, createElementVNode, createVNode, defineComponent, openBlock, unref, withCtx } from "vue";
|
|
3
|
+
import { createUserSchema } from "@dragonmastery/dragoncore-shared";
|
|
4
|
+
import { useForm, withMetadata } from "@dragonmastery/zinia-forms-core";
|
|
5
|
+
import { toast } from "vue3-toastify";
|
|
6
|
+
|
|
7
|
+
//#region src/slices/admin/features/create_user/create_user_schema.ts
|
|
8
|
+
const createUserSchemaWithMetadata = withMetadata(createUserSchema, "createUserSchema", {
|
|
9
|
+
email: {
|
|
10
|
+
inputType: "email",
|
|
11
|
+
placeholder: "Enter email",
|
|
12
|
+
helpText: "Enter your email",
|
|
13
|
+
autocomplete: "email"
|
|
14
|
+
},
|
|
15
|
+
user_type: {
|
|
16
|
+
inputType: "select",
|
|
17
|
+
placeholder: "Select user type",
|
|
18
|
+
helpText: "Select your user type"
|
|
19
|
+
},
|
|
20
|
+
password: {
|
|
21
|
+
inputType: "password",
|
|
22
|
+
placeholder: "Enter password (optional)",
|
|
23
|
+
helpText: "If not provided, a random password will be generated and the user will need to use forgot password to set it",
|
|
24
|
+
autocomplete: "new-password"
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/slices/admin/features/create_user/CreateUserPage.vue
|
|
30
|
+
const _hoisted_1 = { class: "max-w-md mx-auto bg-base-200 p-6 rounded-xl shadow-md container" };
|
|
31
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
32
|
+
__name: "CreateUserPage",
|
|
33
|
+
setup(__props) {
|
|
34
|
+
const { form, zinia, ZiniaForm, ZiniaSubmitButton } = useForm(createUserSchemaWithMetadata, {
|
|
35
|
+
storeName: "create-user-form",
|
|
36
|
+
persistToLocalStorage: false,
|
|
37
|
+
renderStyle: "daisy_ui"
|
|
38
|
+
});
|
|
39
|
+
const { mutate: createUser } = useMutation((api, input) => api.users.createUser(input), { invalidate: /^users?:/ });
|
|
40
|
+
const handleSubmit = async (data) => {
|
|
41
|
+
const result = await createUser(data);
|
|
42
|
+
if (!result) throw new Error("Failed to create user");
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
const handleSuccess = async (_data) => {
|
|
46
|
+
form.reset();
|
|
47
|
+
toast.success("User created successfully!");
|
|
48
|
+
};
|
|
49
|
+
const handleError = (error) => {
|
|
50
|
+
toast.error(error.message || "Failed to create user");
|
|
51
|
+
};
|
|
52
|
+
return (_ctx, _cache) => {
|
|
53
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [_cache[0] || (_cache[0] = createElementVNode("h1", { class: "text-2xl font-bold mb-6 text-center" }, "Create User", -1)), createVNode(unref(ZiniaForm), {
|
|
54
|
+
onHandleSubmit: handleSubmit,
|
|
55
|
+
onSuccess: handleSuccess,
|
|
56
|
+
onError: handleError
|
|
57
|
+
}, {
|
|
58
|
+
default: withCtx(() => [
|
|
59
|
+
createVNode(unref(zinia).EmailField),
|
|
60
|
+
createVNode(unref(zinia).UserTypeField),
|
|
61
|
+
createVNode(unref(zinia).PasswordField),
|
|
62
|
+
createVNode(unref(ZiniaSubmitButton), {
|
|
63
|
+
submitText: "Create User",
|
|
64
|
+
submittingText: "Creating User..."
|
|
65
|
+
})
|
|
66
|
+
]),
|
|
67
|
+
_: 1
|
|
68
|
+
})]);
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
var CreateUserPage_default = _sfc_main;
|
|
73
|
+
|
|
74
|
+
//#endregion
|
|
75
|
+
export { createUserSchemaWithMetadata as n, CreateUserPage_default as t };
|
|
76
|
+
//# sourceMappingURL=CreateUserPage-Cmx8xjjv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateUserPage-Cmx8xjjv.js","names":[],"sources":["../src/slices/admin/features/create_user/create_user_schema.ts","../src/slices/admin/features/create_user/CreateUserPage.vue"],"sourcesContent":["import { createUserSchema } from '@dragonmastery/dragoncore-shared';\nimport { withMetadata } from '@dragonmastery/zinia-forms-core';\nimport { z } from 'zod';\n\n// Define the login form type\nexport type CreateUserForm = z.infer<typeof createUserSchema>;\n\n// Enhance the schema with metadata\nexport const createUserSchemaWithMetadata = withMetadata(\n createUserSchema,\n 'createUserSchema',\n {\n email: {\n inputType: 'email',\n placeholder: 'Enter email',\n helpText: 'Enter your email',\n autocomplete: 'email',\n },\n\n user_type: {\n inputType: 'select',\n placeholder: 'Select user type',\n helpText: 'Select your user type',\n },\n\n password: {\n inputType: 'password',\n placeholder: 'Enter password (optional)',\n helpText:\n 'If not provided, a random password will be generated and the user will need to use forgot password to set it',\n autocomplete: 'new-password',\n },\n },\n);\n","<template>\n <div class=\"max-w-md mx-auto bg-base-200 p-6 rounded-xl shadow-md container\">\n <h1 class=\"text-2xl font-bold mb-6 text-center\">Create User</h1>\n\n <ZiniaForm @handle-submit=\"handleSubmit\" @success=\"handleSuccess\" @error=\"handleError\">\n <zinia.EmailField />\n <zinia.UserTypeField />\n <zinia.PasswordField />\n\n <ZiniaSubmitButton submitText=\"Create User\" submittingText=\"Creating User...\" />\n </ZiniaForm>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { useMutation } from '../../../../composables/useMutation';\nimport { useForm } from '@dragonmastery/zinia-forms-core';\nimport { toast } from 'vue3-toastify';\nimport { z } from 'zod';\nimport { createUserSchemaWithMetadata } from './create_user_schema';\n\n// Create a type-safe form using our schema with metadata\nconst { form, zinia, ZiniaForm, ZiniaSubmitButton } = useForm(createUserSchemaWithMetadata, {\n storeName: 'create-user-form',\n persistToLocalStorage: false,\n renderStyle: 'daisy_ui',\n});\n\nconst { mutate: createUser } = useMutation(\n (api, input: z.infer<typeof createUserSchemaWithMetadata>) => api.users.createUser(input),\n { invalidate: /^users?:/ },\n);\n\n// Handle form submission\nconst handleSubmit = async (data: z.infer<typeof createUserSchemaWithMetadata>) => {\n const result = await createUser(data);\n if (!result) throw new Error('Failed to create user');\n return result;\n};\n\n// Handle success\nconst handleSuccess = async (_data: any) => {\n form.reset();\n toast.success('User created successfully!');\n};\n\n// Handle error\nconst handleError = (error: any) => {\n toast.error(error.message || 'Failed to create user');\n};\n</script>\n"],"mappings":";;;;;;;AAQA,MAAa,+BAA+B,aAC1C,kBACA,oBACA;CACE,OAAO;EACL,WAAW;EACX,aAAa;EACb,UAAU;EACV,cAAc;EACf;CAED,WAAW;EACT,WAAW;EACX,aAAa;EACb,UAAU;EACX;CAED,UAAU;EACR,WAAW;EACX,aAAa;EACb,UACE;EACF,cAAc;EACf;CACF,CACF;;;;;;;;ECXD,MAAM,EAAE,MAAM,OAAO,WAAW,sBAAsB,QAAQ,8BAA8B;GAC1F,WAAW;GACX,uBAAuB;GACvB,aAAa;GACd,CAAC;EAEF,MAAM,EAAE,QAAQ,eAAe,aAC5B,KAAK,UAAwD,IAAI,MAAM,WAAW,MAAM,EACzF,EAAE,YAAY,YAAY,CAC3B;EAGD,MAAM,eAAe,OAAO,SAAuD;GACjF,MAAM,SAAS,MAAM,WAAW,KAAK;AACrC,OAAI,CAAC,OAAQ,OAAM,IAAI,MAAM,wBAAwB;AACrD,UAAO;;EAIT,MAAM,gBAAgB,OAAO,UAAe;AAC1C,QAAK,OAAO;AACZ,SAAM,QAAQ,6BAA6B;;EAI7C,MAAM,eAAe,UAAe;AAClC,SAAM,MAAM,MAAM,WAAW,wBAAwB;;;uBA/CrD,mBAUM,OAVN,YAUM,CAAA,OAAA,OAAA,OAAA,KATJ,mBAAgE,MAAA,EAA5D,OAAM,uCAAqC,EAAC,eAAW,GAAA,GAE3D,YAMY,MAAA,UAAA,EAAA;IANA,gBAAe;IAAe,WAAS;IAAgB,SAAO;;2BACpD;KAApB,YAAoB,MAAA,MAAA,CAAA,WAAA;KACpB,YAAuB,MAAA,MAAA,CAAA,cAAA;KACvB,YAAuB,MAAA,MAAA,CAAA,cAAA;KAEvB,YAAgF,MAAA,kBAAA,EAAA;MAA7D,YAAW;MAAc,gBAAe"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import "./useRpcAuth-BLlRSHy8.js";
|
|
2
|
+
import "./useQueryCache-ByayvZgZ.js";
|
|
3
|
+
import "./useMutation-CFwe7H9j.js";
|
|
4
|
+
import "./useQuery-p7oJO7OD.js";
|
|
5
|
+
import { s as CreditBalanceDashboard_default } from "./src-o5fMIo5_.js";
|
|
6
|
+
import "./AppLink-CHMMrSFI.js";
|
|
7
|
+
import "./InlineAttachments-I39rOvip.js";
|
|
8
|
+
import "./TeamMembersTab-4gmnP9sD.js";
|
|
9
|
+
import "./Appearance-BfPdKMXw.js";
|
|
10
|
+
import "./useBreadcrumbs-DmgSucoe.js";
|
|
11
|
+
import "./FieldsetSection-CsHN38_o.js";
|
|
12
|
+
import "./ZiniaContainer-C7c7Vwkh.js";
|
|
13
|
+
import "./NoteList-C0hRPNMO.js";
|
|
14
|
+
import "./UserProfilePage-BtLUY1kt.js";
|
|
15
|
+
import "./ChangePasswordPage-Btu5lf-r.js";
|
|
16
|
+
import "./TeamHistoryTab-gB3H2KZv.js";
|
|
17
|
+
import "./TeamNotesTab-pfXTDhg6.js";
|
|
18
|
+
import "./EditTeamMemberForm-ru4WgLz-.js";
|
|
19
|
+
import "./SupportTicketStatusBadge-YdZzjvkh.js";
|
|
20
|
+
import "./creditValueFormatter-DftEzu8d.js";
|
|
21
|
+
import "./CustomerSupportTicketList-C2nUPawb.js";
|
|
22
|
+
import "./CustomerEditSupportTicketForm-Dd5ZB74k.js";
|
|
23
|
+
import "./CustomerViewSupportTicket-tZkxragu.js";
|
|
24
|
+
import "./CustomerSupportTicketParent-2mONd9kL.js";
|
|
25
|
+
import "./CustomerSupportTicketCustomerNotesTab-D1aa9It7.js";
|
|
26
|
+
import "./SupportTicketHistoryTab-CLMopA7a.js";
|
|
27
|
+
import "./CustomerSupportTicketHistoryTab-CFYN_Sa4.js";
|
|
28
|
+
import "./StaffSupportTicketWorkflowTab-DmVTPzxS.js";
|
|
29
|
+
import "./StaffEditSupportTicketForm-DuUKuIGg.js";
|
|
30
|
+
import "./StaffSupportTicketParent-Cx1buQZw.js";
|
|
31
|
+
import "./StaffSupportTicketCustomerNotesTab-CusqQV2-.js";
|
|
32
|
+
import "./StaffSupportTicketInternalNotesTab-D8HM--dp.js";
|
|
33
|
+
import "./StaffSupportTicketHistoryTab-D24myEm3.js";
|
|
34
|
+
import "./LoginForm-_PZ51Uwe.js";
|
|
35
|
+
import "./Signup-c2-_yMOM.js";
|
|
36
|
+
import "./ForgotPassword-CqhenzUG.js";
|
|
37
|
+
import "./Logout-BMjiqHnS.js";
|
|
38
|
+
import "./UserListPage-WU56KiWj.js";
|
|
39
|
+
import "./CreateUserPage-Cmx8xjjv.js";
|
|
40
|
+
import "./NotificationEmailsPage-BjRqtW95.js";
|
|
41
|
+
import "./EditUserPage-BxJ5QvIM.js";
|
|
42
|
+
|
|
43
|
+
export { CreditBalanceDashboard_default as default };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import "./useRpcAuth-BLlRSHy8.js";
|
|
2
|
+
import "./useQueryCache-ByayvZgZ.js";
|
|
3
|
+
import "./useMutation-CFwe7H9j.js";
|
|
4
|
+
import "./useQuery-p7oJO7OD.js";
|
|
5
|
+
import { t as CreditManagement_default } from "./src-o5fMIo5_.js";
|
|
6
|
+
import "./AppLink-CHMMrSFI.js";
|
|
7
|
+
import "./InlineAttachments-I39rOvip.js";
|
|
8
|
+
import "./TeamMembersTab-4gmnP9sD.js";
|
|
9
|
+
import "./Appearance-BfPdKMXw.js";
|
|
10
|
+
import "./useBreadcrumbs-DmgSucoe.js";
|
|
11
|
+
import "./FieldsetSection-CsHN38_o.js";
|
|
12
|
+
import "./ZiniaContainer-C7c7Vwkh.js";
|
|
13
|
+
import "./NoteList-C0hRPNMO.js";
|
|
14
|
+
import "./UserProfilePage-BtLUY1kt.js";
|
|
15
|
+
import "./ChangePasswordPage-Btu5lf-r.js";
|
|
16
|
+
import "./TeamHistoryTab-gB3H2KZv.js";
|
|
17
|
+
import "./TeamNotesTab-pfXTDhg6.js";
|
|
18
|
+
import "./EditTeamMemberForm-ru4WgLz-.js";
|
|
19
|
+
import "./SupportTicketStatusBadge-YdZzjvkh.js";
|
|
20
|
+
import "./creditValueFormatter-DftEzu8d.js";
|
|
21
|
+
import "./CustomerSupportTicketList-C2nUPawb.js";
|
|
22
|
+
import "./CustomerEditSupportTicketForm-Dd5ZB74k.js";
|
|
23
|
+
import "./CustomerViewSupportTicket-tZkxragu.js";
|
|
24
|
+
import "./CustomerSupportTicketParent-2mONd9kL.js";
|
|
25
|
+
import "./CustomerSupportTicketCustomerNotesTab-D1aa9It7.js";
|
|
26
|
+
import "./SupportTicketHistoryTab-CLMopA7a.js";
|
|
27
|
+
import "./CustomerSupportTicketHistoryTab-CFYN_Sa4.js";
|
|
28
|
+
import "./StaffSupportTicketWorkflowTab-DmVTPzxS.js";
|
|
29
|
+
import "./StaffEditSupportTicketForm-DuUKuIGg.js";
|
|
30
|
+
import "./StaffSupportTicketParent-Cx1buQZw.js";
|
|
31
|
+
import "./StaffSupportTicketCustomerNotesTab-CusqQV2-.js";
|
|
32
|
+
import "./StaffSupportTicketInternalNotesTab-D8HM--dp.js";
|
|
33
|
+
import "./StaffSupportTicketHistoryTab-D24myEm3.js";
|
|
34
|
+
import "./LoginForm-_PZ51Uwe.js";
|
|
35
|
+
import "./Signup-c2-_yMOM.js";
|
|
36
|
+
import "./ForgotPassword-CqhenzUG.js";
|
|
37
|
+
import "./Logout-BMjiqHnS.js";
|
|
38
|
+
import "./UserListPage-WU56KiWj.js";
|
|
39
|
+
import "./CreateUserPage-Cmx8xjjv.js";
|
|
40
|
+
import "./NotificationEmailsPage-BjRqtW95.js";
|
|
41
|
+
import "./EditUserPage-BxJ5QvIM.js";
|
|
42
|
+
|
|
43
|
+
export { CreditManagement_default as default };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import "./useRpcAuth-BLlRSHy8.js";
|
|
2
|
+
import "./useQueryCache-ByayvZgZ.js";
|
|
3
|
+
import "./useMutation-CFwe7H9j.js";
|
|
4
|
+
import "./useQuery-p7oJO7OD.js";
|
|
5
|
+
import { M as CustomerCreateSupportTicketForm_default } from "./src-o5fMIo5_.js";
|
|
6
|
+
import "./AppLink-CHMMrSFI.js";
|
|
7
|
+
import "./InlineAttachments-I39rOvip.js";
|
|
8
|
+
import "./TeamMembersTab-4gmnP9sD.js";
|
|
9
|
+
import "./Appearance-BfPdKMXw.js";
|
|
10
|
+
import "./useBreadcrumbs-DmgSucoe.js";
|
|
11
|
+
import "./FieldsetSection-CsHN38_o.js";
|
|
12
|
+
import "./ZiniaContainer-C7c7Vwkh.js";
|
|
13
|
+
import "./NoteList-C0hRPNMO.js";
|
|
14
|
+
import "./UserProfilePage-BtLUY1kt.js";
|
|
15
|
+
import "./ChangePasswordPage-Btu5lf-r.js";
|
|
16
|
+
import "./TeamHistoryTab-gB3H2KZv.js";
|
|
17
|
+
import "./TeamNotesTab-pfXTDhg6.js";
|
|
18
|
+
import "./EditTeamMemberForm-ru4WgLz-.js";
|
|
19
|
+
import "./SupportTicketStatusBadge-YdZzjvkh.js";
|
|
20
|
+
import "./creditValueFormatter-DftEzu8d.js";
|
|
21
|
+
import "./CustomerSupportTicketList-C2nUPawb.js";
|
|
22
|
+
import "./CustomerEditSupportTicketForm-Dd5ZB74k.js";
|
|
23
|
+
import "./CustomerViewSupportTicket-tZkxragu.js";
|
|
24
|
+
import "./CustomerSupportTicketParent-2mONd9kL.js";
|
|
25
|
+
import "./CustomerSupportTicketCustomerNotesTab-D1aa9It7.js";
|
|
26
|
+
import "./SupportTicketHistoryTab-CLMopA7a.js";
|
|
27
|
+
import "./CustomerSupportTicketHistoryTab-CFYN_Sa4.js";
|
|
28
|
+
import "./StaffSupportTicketWorkflowTab-DmVTPzxS.js";
|
|
29
|
+
import "./StaffEditSupportTicketForm-DuUKuIGg.js";
|
|
30
|
+
import "./StaffSupportTicketParent-Cx1buQZw.js";
|
|
31
|
+
import "./StaffSupportTicketCustomerNotesTab-CusqQV2-.js";
|
|
32
|
+
import "./StaffSupportTicketInternalNotesTab-D8HM--dp.js";
|
|
33
|
+
import "./StaffSupportTicketHistoryTab-D24myEm3.js";
|
|
34
|
+
import "./LoginForm-_PZ51Uwe.js";
|
|
35
|
+
import "./Signup-c2-_yMOM.js";
|
|
36
|
+
import "./ForgotPassword-CqhenzUG.js";
|
|
37
|
+
import "./Logout-BMjiqHnS.js";
|
|
38
|
+
import "./UserListPage-WU56KiWj.js";
|
|
39
|
+
import "./CreateUserPage-Cmx8xjjv.js";
|
|
40
|
+
import "./NotificationEmailsPage-BjRqtW95.js";
|
|
41
|
+
import "./EditUserPage-BxJ5QvIM.js";
|
|
42
|
+
|
|
43
|
+
export { CustomerCreateSupportTicketForm_default as default };
|