@feedmepos/mf-hrm-portal 2.2.1-dev → 2.2.1-dev.2
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-BgPrC2H1.js → ApprovalCodeList-DZajn7xx.js} +2 -2
- package/dist/{AuditLogList-B9k56ux1.js → AuditLogList-CpKIq8I0.js} +3 -3
- package/dist/{ConditionFormHost.vue_vue_type_script_setup_true_lang-BKxQPhjZ.js → ConditionFormHost.vue_vue_type_script_setup_true_lang-DCfvikJB.js} +10 -10
- package/dist/{EmployeeList-f05XEwMS.js → EmployeeList-DDuxDdlJ.js} +4 -4
- package/dist/{GrantUserList-Db4_e87R.js → GrantUserList-735upmIE.js} +3 -3
- package/dist/{Main-CZoUt9IM.js → Main-CHHR0r5b.js} +2 -2
- package/dist/{Main-DPmBwatV.js → Main-DyZ6dJ2d.js} +5 -5
- package/dist/{Main-C83-6ZYQ.js → Main-tQ6MrkkP.js} +9 -9
- package/dist/{PermissionSetList-CqcbzdXp.js → PermissionSetList-ZxLNYPEB.js} +17 -17
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DMS04nsd.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-MoFevdmL.js} +721 -721
- package/dist/{RoleList-DsINcxpz.js → RoleList-BZbEGpCi.js} +7 -7
- package/dist/{TeamMemberList-DuP1QWAS.js → TeamMemberList-B58boeR9.js} +6 -6
- package/dist/{TimesheetList-D_Xq4ESR.js → TimesheetList-DMnNVVlB.js} +5 -5
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-O2_M0Ktw.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-Ch8Ng6wi.js} +2 -2
- package/dist/{app-3bHRu-TD.js → app-CtuaUGnw.js} +167 -156
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-BjrK6J3b.js → dayjs.min-9pRWRTS9.js} +1 -1
- package/dist/{employee-Ck_DJyl9.js → employee-JmfN-rQF.js} +3 -3
- package/dist/{iteration-Bl07BT2c.js → iteration-CkzTvtOv.js} +1 -1
- package/dist/{lodash-CwAowwGK.js → lodash-BNBzabCH.js} +1 -1
- package/dist/{role-Z1BT4HFT.js → role-R_9sO2QD.js} +1 -1
- package/dist/{rule-DYmHm3nE.js → rule-D1pKbnKR.js} +2 -2
- package/dist/src/views/team/locales/index.d.ts +4 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useReportPermissions-DCF1U1Us.js → useReportPermissions-ByxRc3kz.js} +3 -3
- package/package.json +2 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var Rn = Object.defineProperty;
|
|
2
2
|
var Xn = (e, t, s) => t in e ? Rn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
3
|
var xt = (e, t, s) => Xn(e, typeof t != "symbol" ? t + "" : t, s);
|
|
4
|
-
import { isRef as Qn, ref as Qe, shallowRef as kn, watchEffect as ir, computed as Os, h as zs, defineComponent as it, createBlock as zt, renderSlot as cr, createCommentVNode as Tn, unref as
|
|
4
|
+
import { isRef as Qn, ref as Qe, shallowRef as kn, watchEffect as ir, computed as Os, h as zs, defineComponent as it, createBlock as zt, renderSlot as cr, createCommentVNode as Tn, unref as ze, openBlock as ct, createElementBlock as lr, createElementVNode as Ue, toDisplayString as Ws, watch as Sn, nextTick as Nn, onMounted as ur, onBeforeUnmount as Zn, normalizeStyle as Un, resolveComponent as Fs, withCtx as zn, createVNode as Wn, defineAsyncComponent as Ln, readonly as vs } from "vue";
|
|
5
5
|
import { useBreakpoints as Kn } from "@feedmepos/ui-library";
|
|
6
6
|
import { useRoute as Jn, useRouter as _n } from "vue-router";
|
|
7
7
|
import { useCoreStore as Ar, useI18n as dr } from "@feedmepos/mf-common";
|
|
8
|
-
var o = /* @__PURE__ */ ((e) => (e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete", e))(o || {}), d = /* @__PURE__ */ ((e) => (e.miniProgram_profile = "business::miniProgram::profile", e.miniProgram_brandkit = "business::miniProgram::brandkit", e.miniProgram_template = "business::miniProgram::template", e.miniProgram_publish = "business::miniProgram::publish", e.miniProgram_assets = "business::miniProgram::assets", e.miniProgram_nativeCredentials = "business::miniProgram::nativeCredentials", e.crm = "business::crm", e.crm_promotion = "business::crm::promotion", e.crm_voucher = "business::crm::voucher", e.crm_membership = "business::crm::membership", e.crm_analytic = "business::crm::analytic", e.crm_tier = "business::crm::tier", e.crm_title = "business::crm::title", e.crm_broadcast = "business::crm::broadcast", e.crm_point = "business::crm::point", e.crm_credit = "business::crm::credit", e.crm_experience = "business::crm::experience", e.crm_game = "business::crm::game", e.crm_mission = "business::crm::mission", e.crm_loyaltyMember = "business::crm::loyaltyMember", e.crm_loyaltySegment = "business::crm::loyaltySegment", e.crm_loyaltyCard = "business::crm::loyaltyCard", e.crm_referral = "business::crm::referral", e.crm_store = "business::crm::store", e.crm_transaction = "business::crm::transaction", e.crm_setting = "business::crm::setting", e.crm_bin = "business::crm::bin", e.crm_marketingMaterial = "business::crm::marketingMaterial", e.payment = "business::payment", e.payment_payoutAccount = "business::payment::payoutAccount", e.payment_paymentOnboarding = "business::payment::paymentOnboarding", e.payment_transactions = "business::payment::transactions", e.payment_settlements = "business::payment::settlements", e.inventory_stock = "business::inventory::stock", e.inventory_stockBalance = "business::inventory::stockBalance", e.inventory_stockAdjustment = "business::inventory::stockAdjustment", e.inventory_unitCostHistory = "business::inventory::unitCostHistory", e.inventory_wastageTemplate = "business::inventory::wastageTemplate", e.inventory_closingHistory = "business::inventory::closingHistory", e.inventory_closingTemplate = "business::inventory::closingTemplate", e.inventory_closingDraft = "business::inventory::closingDraft", e.inventory_ingredient = "business::inventory::ingredient", e.inventory_ingredientGroup = "business::inventory::ingredientGroup", e.inventory_recipe = "business::inventory::recipe", e.inventory_unit = "business::inventory::unit", e.inventory_purchaseTransfer = "business::inventory::purchaseTransfer", e.inventory_orderDraftApproval = "business::inventory::orderDraftApproval", e.inventory_transferOut = "business::inventory::transferOut", e.inventory_surcharge = "business::inventory::surcharge", e.inventory_orderTemplate = "business::inventory::orderTemplate", e.inventory_supplier = "business::inventory::supplier", e.inventory_warehouse = "business::inventory::warehouse", e.inventory_publish = "business::inventory::publish", e.inventory_import = "business::inventory::import", e.inventory_integration = "business::inventory::integration", e.hrm = "business::hrm", e.hrm_employee = "business::hrm::employee", e.hrm_teamMember = "business::hrm::teamMember", e.hrm_auditLog = "business::hrm::auditLog", e.hrm_approvalCode = "business::hrm::approvalCode", e.menu = "business::menu", e.menu_item = "business::menu::item", e.menu_catalog = "business::menu::catalog", e.menu_category = "business::menu::category", e.menu_subCategory = "business::menu::subCategory", e.menu_group = "business::menu::group", e.menu_takeaway = "business::menu::takeaway", e.menu_scheduler = "business::menu::scheduler", e.menu_variant = "business::menu::variant", e.menu_cookingGuide = "business::menu::cookingGuide", e.menu_printRoute = "business::menu::printRoute", e.menu_servingSequence = "business::menu::servingSequence", e.menu_settings = "business::menu::settings", e.menu_publish = "business::menu::publish", e.menu_menuManagement = "business::menu::menuManagement", e.menu_importExport = "business::menu::importExport", e.menu_unit = "business::menu::unit", e.menu_ingredient = "business::menu::ingredient", e.menu_recipe = "business::menu::recipe", e.restaurant = "business::restaurant", e.role = "business::role", e.mdm_deviceManagement = "business::mdm::deviceManagement", e.mdm_createDevice = "business::mdm::createDevice", e.mdm_deviceBinding = "business::mdm::deviceBinding", e.mdm_customerDisplay = "business::mdm::customerDisplay", e.kiosk_deviceManagement = "business::kiosk::deviceManagement", e.kiosk_deviceBinding = "business::kiosk::deviceBinding", e.eInvoice_management = "business::eInvoice::management", e.eInvoice_integration = "business::eInvoice::integration", e.profile = "business::profile", e.report_createReport = "business::report::createReport", e.report_accessInsight = "business::report::accessInsight", e.report_accessSetting = "business::report::accessSetting", e.report_accessIntegration = "business::report::accessIntegration", e.report_accessOverview = "business::report::accessOverview", e.report_reports_allDefaultReports = "business::report::allDefaultReports", e.report_reports_allCustomReports = "business::report::allCustomReports", e.operation_receipt = "business::operation::receipt", e.operation_tableManagement = "business::operation::tableManagement", e.operation_offlinePayment = "business::operation::offlinePayment", e.operation_reasonTemplate = "business::operation::reasonTemplate", e.operation_discountRule = "business::operation::discountRule", e.operation_serviceCharge = "business::operation::serviceCharge", e.operation_kitchenPrintTemplate = "business::operation::kitchenPrintTemplate", e.operation_orderSetting = "business::operation::orderSetting", e.media_assets = "business::media::assets", e))(d || {}), ee = /* @__PURE__ */ ((e) => (e.profile = "business::profile", e.restaurant = "business::restaurant", e.menu = "business::menu", e.promotion = "business::promotion", e.voucher = "business::voucher", e.membership = "business::membership", e.stock = "business::stock", e.permission = "business::permission", e.role = "business::role", e.wastageTemplate = "business::wastageTemplate", e.closingTemplate = "business::closingTemplate", e.orderTemplate = "business::orderTemplate", e.ingredient = "business::ingredient", e.recipe = "business::recipe", e.unit = "business::unit", e.supplier = "business::supplier", e.warehouse = "business::warehouse", e.publish = "business::publish", e.integration = "business::integration", e.orderDraft = "business::orderDraft", e.unitCostHistory = "business::unitCostHistory", e))(ee || {}), mr = /* @__PURE__ */ ((e) => (e.restaurant = "restaurant", e))(mr || {});
|
|
8
|
+
var o = /* @__PURE__ */ ((e) => (e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete", e))(o || {}), d = /* @__PURE__ */ ((e) => (e.miniProgram_profile = "business::miniProgram::profile", e.miniProgram_brandkit = "business::miniProgram::brandkit", e.miniProgram_template = "business::miniProgram::template", e.miniProgram_publish = "business::miniProgram::publish", e.miniProgram_assets = "business::miniProgram::assets", e.miniProgram_nativeCredentials = "business::miniProgram::nativeCredentials", e.crm = "business::crm", e.crm_promotion = "business::crm::promotion", e.crm_voucher = "business::crm::voucher", e.crm_membership = "business::crm::membership", e.crm_analytic = "business::crm::analytic", e.crm_tier = "business::crm::tier", e.crm_title = "business::crm::title", e.crm_broadcast = "business::crm::broadcast", e.crm_point = "business::crm::point", e.crm_credit = "business::crm::credit", e.crm_experience = "business::crm::experience", e.crm_game = "business::crm::game", e.crm_mission = "business::crm::mission", e.crm_loyaltyMember = "business::crm::loyaltyMember", e.crm_loyaltySegment = "business::crm::loyaltySegment", e.crm_loyaltyCard = "business::crm::loyaltyCard", e.crm_referral = "business::crm::referral", e.crm_store = "business::crm::store", e.crm_transaction = "business::crm::transaction", e.crm_setting = "business::crm::setting", e.crm_bin = "business::crm::bin", e.crm_marketingMaterial = "business::crm::marketingMaterial", e.payment = "business::payment", e.payment_payoutAccount = "business::payment::payoutAccount", e.payment_paymentOnboarding = "business::payment::paymentOnboarding", e.payment_transactions = "business::payment::transactions", e.payment_settlements = "business::payment::settlements", e.inventory_stock = "business::inventory::stock", e.inventory_stockBalance = "business::inventory::stockBalance", e.inventory_stockAdjustment = "business::inventory::stockAdjustment", e.inventory_unitCostHistory = "business::inventory::unitCostHistory", e.inventory_wastageTemplate = "business::inventory::wastageTemplate", e.inventory_closingHistory = "business::inventory::closingHistory", e.inventory_closingTemplate = "business::inventory::closingTemplate", e.inventory_closingDraft = "business::inventory::closingDraft", e.inventory_ingredient = "business::inventory::ingredient", e.inventory_ingredientGroup = "business::inventory::ingredientGroup", e.inventory_recipe = "business::inventory::recipe", e.inventory_unit = "business::inventory::unit", e.inventory_purchaseTransfer = "business::inventory::purchaseTransfer", e.inventory_orderDraftApproval = "business::inventory::orderDraftApproval", e.inventory_transferOut = "business::inventory::transferOut", e.inventory_surcharge = "business::inventory::surcharge", e.inventory_orderTemplate = "business::inventory::orderTemplate", e.inventory_supplier = "business::inventory::supplier", e.inventory_warehouse = "business::inventory::warehouse", e.inventory_publish = "business::inventory::publish", e.inventory_import = "business::inventory::import", e.inventory_integration = "business::inventory::integration", e.hrm = "business::hrm", e.hrm_employee = "business::hrm::employee", e.hrm_teamMember = "business::hrm::teamMember", e.hrm_auditLog = "business::hrm::auditLog", e.hrm_approvalCode = "business::hrm::approvalCode", e.menu = "business::menu", e.menu_item = "business::menu::item", e.menu_catalog = "business::menu::catalog", e.menu_category = "business::menu::category", e.menu_subCategory = "business::menu::subCategory", e.menu_group = "business::menu::group", e.menu_takeaway = "business::menu::takeaway", e.menu_scheduler = "business::menu::scheduler", e.menu_variant = "business::menu::variant", e.menu_cookingGuide = "business::menu::cookingGuide", e.menu_printRoute = "business::menu::printRoute", e.menu_servingSequence = "business::menu::servingSequence", e.menu_settings = "business::menu::settings", e.menu_publish = "business::menu::publish", e.menu_menuManagement = "business::menu::menuManagement", e.menu_importExport = "business::menu::importExport", e.menu_unit = "business::menu::unit", e.menu_ingredient = "business::menu::ingredient", e.menu_recipe = "business::menu::recipe", e.restaurant = "business::restaurant", e.role = "business::role", e.mdm_deviceManagement = "business::mdm::deviceManagement", e.mdm_createDevice = "business::mdm::createDevice", e.mdm_deviceBinding = "business::mdm::deviceBinding", e.mdm_customerDisplay = "business::mdm::customerDisplay", e.kiosk_deviceManagement = "business::kiosk::deviceManagement", e.kiosk_deviceBinding = "business::kiosk::deviceBinding", e.eInvoice_management = "business::eInvoice::management", e.eInvoice_integration = "business::eInvoice::integration", e.profile = "business::profile", e.report_createReport = "business::report::createReport", e.report_accessOsDashboard = "business::report::accessOsDashboard", e.report_accessInsight = "business::report::accessInsight", e.report_accessSetting = "business::report::accessSetting", e.report_accessIntegration = "business::report::accessIntegration", e.report_accessOverview = "business::report::accessOverview", e.report_reports_allDefaultReports = "business::report::allDefaultReports", e.report_reports_allCustomReports = "business::report::allCustomReports", e.operation_receipt = "business::operation::receipt", e.operation_tableManagement = "business::operation::tableManagement", e.operation_offlinePayment = "business::operation::offlinePayment", e.operation_reasonTemplate = "business::operation::reasonTemplate", e.operation_discountRule = "business::operation::discountRule", e.operation_serviceCharge = "business::operation::serviceCharge", e.operation_kitchenPrintTemplate = "business::operation::kitchenPrintTemplate", e.operation_orderSetting = "business::operation::orderSetting", e.media_assets = "business::media::assets", e))(d || {}), ee = /* @__PURE__ */ ((e) => (e.profile = "business::profile", e.restaurant = "business::restaurant", e.menu = "business::menu", e.promotion = "business::promotion", e.voucher = "business::voucher", e.membership = "business::membership", e.stock = "business::stock", e.permission = "business::permission", e.role = "business::role", e.wastageTemplate = "business::wastageTemplate", e.closingTemplate = "business::closingTemplate", e.orderTemplate = "business::orderTemplate", e.ingredient = "business::ingredient", e.recipe = "business::recipe", e.unit = "business::unit", e.supplier = "business::supplier", e.warehouse = "business::warehouse", e.publish = "business::publish", e.integration = "business::integration", e.orderDraft = "business::orderDraft", e.unitCostHistory = "business::unitCostHistory", e))(ee || {}), mr = /* @__PURE__ */ ((e) => (e.restaurant = "restaurant", e))(mr || {});
|
|
9
9
|
const v = {
|
|
10
10
|
general: "General",
|
|
11
11
|
inventory: "Inventory",
|
|
@@ -21,7 +21,7 @@ const v = {
|
|
|
21
21
|
miniProgram: "Mini Program",
|
|
22
22
|
media: "Media"
|
|
23
23
|
}, $n = "access-denied";
|
|
24
|
-
var
|
|
24
|
+
var N;
|
|
25
25
|
(function(e) {
|
|
26
26
|
function t(n) {
|
|
27
27
|
}
|
|
@@ -55,8 +55,8 @@ var S;
|
|
|
55
55
|
return n.map((c) => typeof c == "string" ? `'${c}'` : c).join(a);
|
|
56
56
|
}
|
|
57
57
|
e.joinValues = r;
|
|
58
|
-
})(
|
|
59
|
-
const x =
|
|
58
|
+
})(N || (N = {}));
|
|
59
|
+
const x = N.arrayToEnum([
|
|
60
60
|
"string",
|
|
61
61
|
"nan",
|
|
62
62
|
"number",
|
|
@@ -96,7 +96,7 @@ const x = S.arrayToEnum([
|
|
|
96
96
|
default:
|
|
97
97
|
return x.unknown;
|
|
98
98
|
}
|
|
99
|
-
}, C =
|
|
99
|
+
}, C = N.arrayToEnum([
|
|
100
100
|
"invalid_type",
|
|
101
101
|
"invalid_literal",
|
|
102
102
|
"custom",
|
|
@@ -179,16 +179,16 @@ const wt = (e, t) => {
|
|
|
179
179
|
s = `Invalid literal value, expected ${JSON.stringify(e.expected, qs)}`;
|
|
180
180
|
break;
|
|
181
181
|
case C.unrecognized_keys:
|
|
182
|
-
s = `Unrecognized key(s) in object: ${
|
|
182
|
+
s = `Unrecognized key(s) in object: ${N.joinValues(e.keys, ", ")}`;
|
|
183
183
|
break;
|
|
184
184
|
case C.invalid_union:
|
|
185
185
|
s = "Invalid input";
|
|
186
186
|
break;
|
|
187
187
|
case C.invalid_union_discriminator:
|
|
188
|
-
s = `Invalid discriminator value. Expected ${
|
|
188
|
+
s = `Invalid discriminator value. Expected ${N.joinValues(e.options)}`;
|
|
189
189
|
break;
|
|
190
190
|
case C.invalid_enum_value:
|
|
191
|
-
s = `Invalid enum value. Expected ${
|
|
191
|
+
s = `Invalid enum value. Expected ${N.joinValues(e.options)}, received '${e.received}'`;
|
|
192
192
|
break;
|
|
193
193
|
case C.invalid_arguments:
|
|
194
194
|
s = "Invalid function arguments";
|
|
@@ -200,7 +200,7 @@ const wt = (e, t) => {
|
|
|
200
200
|
s = "Invalid date";
|
|
201
201
|
break;
|
|
202
202
|
case C.invalid_string:
|
|
203
|
-
typeof e.validation == "object" ? "startsWith" in e.validation ? s = `Invalid input: must start with "${e.validation.startsWith}"` : "endsWith" in e.validation ? s = `Invalid input: must start with "${e.validation.endsWith}"` :
|
|
203
|
+
typeof e.validation == "object" ? "startsWith" in e.validation ? s = `Invalid input: must start with "${e.validation.startsWith}"` : "endsWith" in e.validation ? s = `Invalid input: must start with "${e.validation.endsWith}"` : N.assertNever(e.validation) : e.validation !== "regex" ? s = `Invalid ${e.validation}` : s = "Invalid";
|
|
204
204
|
break;
|
|
205
205
|
case C.too_small:
|
|
206
206
|
e.type === "array" ? s = `Array must contain ${e.inclusive ? "at least" : "more than"} ${e.minimum} element(s)` : e.type === "string" ? s = `String must contain ${e.inclusive ? "at least" : "over"} ${e.minimum} character(s)` : e.type === "number" ? s = `Number must be greater than ${e.inclusive ? "or equal to " : ""}${e.minimum}` : e.type === "date" ? s = `Date must be greater than ${e.inclusive ? "or equal to " : ""}${new Date(e.minimum)}` : s = "Invalid input";
|
|
@@ -218,7 +218,7 @@ const wt = (e, t) => {
|
|
|
218
218
|
s = `Number must be a multiple of ${e.multipleOf}`;
|
|
219
219
|
break;
|
|
220
220
|
default:
|
|
221
|
-
s = t.defaultError,
|
|
221
|
+
s = t.defaultError, N.assertNever(e);
|
|
222
222
|
}
|
|
223
223
|
return { message: s };
|
|
224
224
|
};
|
|
@@ -437,7 +437,7 @@ class X {
|
|
|
437
437
|
return Ee.create(this);
|
|
438
438
|
}
|
|
439
439
|
nullable() {
|
|
440
|
-
return
|
|
440
|
+
return Je.create(this);
|
|
441
441
|
}
|
|
442
442
|
nullish() {
|
|
443
443
|
return this.optional().nullable();
|
|
@@ -567,7 +567,7 @@ class ke extends X {
|
|
|
567
567
|
code: C.invalid_string,
|
|
568
568
|
validation: { endsWith: a.value },
|
|
569
569
|
message: a.message
|
|
570
|
-
}), r.dirty()) :
|
|
570
|
+
}), r.dirty()) : N.assertNever(a);
|
|
571
571
|
return { status: r.value, value: t.data };
|
|
572
572
|
}
|
|
573
573
|
_addCheck(t) {
|
|
@@ -660,7 +660,7 @@ function ia(e, t) {
|
|
|
660
660
|
const s = (e.toString().split(".")[1] || "").length, r = (t.toString().split(".")[1] || "").length, n = s > r ? s : r, a = parseInt(e.toFixed(n).replace(".", "")), c = parseInt(t.toFixed(n).replace(".", ""));
|
|
661
661
|
return a % c / Math.pow(10, n);
|
|
662
662
|
}
|
|
663
|
-
class
|
|
663
|
+
class We extends X {
|
|
664
664
|
constructor() {
|
|
665
665
|
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
666
666
|
}
|
|
@@ -676,7 +676,7 @@ class ze extends X {
|
|
|
676
676
|
let r;
|
|
677
677
|
const n = new ae();
|
|
678
678
|
for (const a of this._def.checks)
|
|
679
|
-
a.kind === "int" ?
|
|
679
|
+
a.kind === "int" ? N.isInteger(t.data) || (r = this._getOrReturnCtx(t, r), P(r, {
|
|
680
680
|
code: C.invalid_type,
|
|
681
681
|
expected: "integer",
|
|
682
682
|
received: "float",
|
|
@@ -697,7 +697,7 @@ class ze extends X {
|
|
|
697
697
|
code: C.not_multiple_of,
|
|
698
698
|
multipleOf: a.value,
|
|
699
699
|
message: a.message
|
|
700
|
-
}), n.dirty()) :
|
|
700
|
+
}), n.dirty()) : N.assertNever(a);
|
|
701
701
|
return { status: n.value, value: t.data };
|
|
702
702
|
}
|
|
703
703
|
gte(t, s) {
|
|
@@ -713,7 +713,7 @@ class ze extends X {
|
|
|
713
713
|
return this.setLimit("max", t, !1, T.toString(s));
|
|
714
714
|
}
|
|
715
715
|
setLimit(t, s, r, n) {
|
|
716
|
-
return new
|
|
716
|
+
return new We({
|
|
717
717
|
...this._def,
|
|
718
718
|
checks: [
|
|
719
719
|
...this._def.checks,
|
|
@@ -727,7 +727,7 @@ class ze extends X {
|
|
|
727
727
|
});
|
|
728
728
|
}
|
|
729
729
|
_addCheck(t) {
|
|
730
|
-
return new
|
|
730
|
+
return new We({
|
|
731
731
|
...this._def,
|
|
732
732
|
checks: [...this._def.checks, t]
|
|
733
733
|
});
|
|
@@ -793,7 +793,7 @@ class ze extends X {
|
|
|
793
793
|
return !!this._def.checks.find((t) => t.kind === "int");
|
|
794
794
|
}
|
|
795
795
|
}
|
|
796
|
-
|
|
796
|
+
We.create = (e) => new We({
|
|
797
797
|
checks: [],
|
|
798
798
|
typeName: I.ZodNumber,
|
|
799
799
|
...Q(e)
|
|
@@ -863,7 +863,7 @@ class nt extends X {
|
|
|
863
863
|
inclusive: !0,
|
|
864
864
|
maximum: a.value,
|
|
865
865
|
type: "date"
|
|
866
|
-
}), r.dirty()) :
|
|
866
|
+
}), r.dirty()) : N.assertNever(a);
|
|
867
867
|
return {
|
|
868
868
|
status: r.value,
|
|
869
869
|
value: new Date(t.data.getTime())
|
|
@@ -1076,7 +1076,7 @@ function rt(e) {
|
|
|
1076
1076
|
...e._def,
|
|
1077
1077
|
shape: () => t
|
|
1078
1078
|
});
|
|
1079
|
-
} else return e instanceof Ye ? Ye.create(rt(e.element)) : e instanceof Ee ? Ee.create(rt(e.unwrap())) : e instanceof
|
|
1079
|
+
} else return e instanceof Ye ? Ye.create(rt(e.element)) : e instanceof Ee ? Ee.create(rt(e.unwrap())) : e instanceof Je ? Je.create(rt(e.unwrap())) : e instanceof Ge ? Ge.create(e.items.map((t) => rt(t))) : e;
|
|
1080
1080
|
}
|
|
1081
1081
|
class J extends X {
|
|
1082
1082
|
constructor() {
|
|
@@ -1085,7 +1085,7 @@ class J extends X {
|
|
|
1085
1085
|
_getCached() {
|
|
1086
1086
|
if (this._cached !== null)
|
|
1087
1087
|
return this._cached;
|
|
1088
|
-
const t = this._def.shape(), s =
|
|
1088
|
+
const t = this._def.shape(), s = N.objectKeys(t);
|
|
1089
1089
|
return this._cached = { shape: t, keys: s };
|
|
1090
1090
|
}
|
|
1091
1091
|
_parse(t) {
|
|
@@ -1206,7 +1206,7 @@ class J extends X {
|
|
|
1206
1206
|
}
|
|
1207
1207
|
pick(t) {
|
|
1208
1208
|
const s = {};
|
|
1209
|
-
return
|
|
1209
|
+
return N.objectKeys(t).map((r) => {
|
|
1210
1210
|
this.shape[r] && (s[r] = this.shape[r]);
|
|
1211
1211
|
}), new J({
|
|
1212
1212
|
...this._def,
|
|
@@ -1215,8 +1215,8 @@ class J extends X {
|
|
|
1215
1215
|
}
|
|
1216
1216
|
omit(t) {
|
|
1217
1217
|
const s = {};
|
|
1218
|
-
return
|
|
1219
|
-
|
|
1218
|
+
return N.objectKeys(this.shape).map((r) => {
|
|
1219
|
+
N.objectKeys(t).indexOf(r) === -1 && (s[r] = this.shape[r]);
|
|
1220
1220
|
}), new J({
|
|
1221
1221
|
...this._def,
|
|
1222
1222
|
shape: () => s
|
|
@@ -1228,8 +1228,8 @@ class J extends X {
|
|
|
1228
1228
|
partial(t) {
|
|
1229
1229
|
const s = {};
|
|
1230
1230
|
if (t)
|
|
1231
|
-
return
|
|
1232
|
-
|
|
1231
|
+
return N.objectKeys(this.shape).map((r) => {
|
|
1232
|
+
N.objectKeys(t).indexOf(r) === -1 ? s[r] = this.shape[r] : s[r] = this.shape[r].optional();
|
|
1233
1233
|
}), new J({
|
|
1234
1234
|
...this._def,
|
|
1235
1235
|
shape: () => s
|
|
@@ -1257,7 +1257,7 @@ class J extends X {
|
|
|
1257
1257
|
});
|
|
1258
1258
|
}
|
|
1259
1259
|
keyof() {
|
|
1260
|
-
return pr(
|
|
1260
|
+
return pr(N.objectKeys(this.shape));
|
|
1261
1261
|
}
|
|
1262
1262
|
}
|
|
1263
1263
|
J.create = (e, t) => new J({
|
|
@@ -1420,7 +1420,7 @@ function Cs(e, t) {
|
|
|
1420
1420
|
if (e === t)
|
|
1421
1421
|
return { valid: !0, data: e };
|
|
1422
1422
|
if (s === x.object && r === x.object) {
|
|
1423
|
-
const n =
|
|
1423
|
+
const n = N.objectKeys(t), a = N.objectKeys(e).filter((l) => n.indexOf(l) !== -1), c = { ...e, ...t };
|
|
1424
1424
|
for (const l of a) {
|
|
1425
1425
|
const y = Cs(e[l], t[l]);
|
|
1426
1426
|
if (!y.valid)
|
|
@@ -1605,7 +1605,7 @@ kt.create = (e, t, s) => new kt({
|
|
|
1605
1605
|
typeName: I.ZodMap,
|
|
1606
1606
|
...Q(s)
|
|
1607
1607
|
});
|
|
1608
|
-
class
|
|
1608
|
+
class Le extends X {
|
|
1609
1609
|
_parse(t) {
|
|
1610
1610
|
const { status: s, ctx: r } = this._processInputParams(t);
|
|
1611
1611
|
if (r.parsedType !== x.set)
|
|
@@ -1642,13 +1642,13 @@ class We extends X {
|
|
|
1642
1642
|
return r.common.async ? Promise.all(l).then((y) => c(y)) : c(l);
|
|
1643
1643
|
}
|
|
1644
1644
|
min(t, s) {
|
|
1645
|
-
return new
|
|
1645
|
+
return new Le({
|
|
1646
1646
|
...this._def,
|
|
1647
1647
|
minSize: { value: t, message: T.toString(s) }
|
|
1648
1648
|
});
|
|
1649
1649
|
}
|
|
1650
1650
|
max(t, s) {
|
|
1651
|
-
return new
|
|
1651
|
+
return new Le({
|
|
1652
1652
|
...this._def,
|
|
1653
1653
|
maxSize: { value: t, message: T.toString(s) }
|
|
1654
1654
|
});
|
|
@@ -1660,14 +1660,14 @@ class We extends X {
|
|
|
1660
1660
|
return this.min(1, t);
|
|
1661
1661
|
}
|
|
1662
1662
|
}
|
|
1663
|
-
|
|
1663
|
+
Le.create = (e, t) => new Le({
|
|
1664
1664
|
valueType: e,
|
|
1665
1665
|
minSize: null,
|
|
1666
1666
|
maxSize: null,
|
|
1667
1667
|
typeName: I.ZodSet,
|
|
1668
1668
|
...Q(t)
|
|
1669
1669
|
});
|
|
1670
|
-
class
|
|
1670
|
+
class Ke extends X {
|
|
1671
1671
|
constructor() {
|
|
1672
1672
|
super(...arguments), this.validate = this.implement;
|
|
1673
1673
|
}
|
|
@@ -1713,11 +1713,11 @@ class Le extends X {
|
|
|
1713
1713
|
}
|
|
1714
1714
|
const a = { errorMap: s.common.contextualErrorMap }, c = s.data;
|
|
1715
1715
|
return this._def.returns instanceof ot ? oe(async (...l) => {
|
|
1716
|
-
const y = new qe([]), h = await this._def.args.parseAsync(l, a).catch((
|
|
1717
|
-
throw y.addIssue(r(l,
|
|
1716
|
+
const y = new qe([]), h = await this._def.args.parseAsync(l, a).catch((S) => {
|
|
1717
|
+
throw y.addIssue(r(l, S)), y;
|
|
1718
1718
|
}), w = await c(...h);
|
|
1719
|
-
return await this._def.returns._def.type.parseAsync(w, a).catch((
|
|
1720
|
-
throw y.addIssue(n(w,
|
|
1719
|
+
return await this._def.returns._def.type.parseAsync(w, a).catch((S) => {
|
|
1720
|
+
throw y.addIssue(n(w, S)), y;
|
|
1721
1721
|
});
|
|
1722
1722
|
}) : oe((...l) => {
|
|
1723
1723
|
const y = this._def.args.safeParse(l, a);
|
|
@@ -1736,13 +1736,13 @@ class Le extends X {
|
|
|
1736
1736
|
return this._def.returns;
|
|
1737
1737
|
}
|
|
1738
1738
|
args(...t) {
|
|
1739
|
-
return new
|
|
1739
|
+
return new Ke({
|
|
1740
1740
|
...this._def,
|
|
1741
1741
|
args: Ge.create(t).rest(Xe.create())
|
|
1742
1742
|
});
|
|
1743
1743
|
}
|
|
1744
1744
|
returns(t) {
|
|
1745
|
-
return new
|
|
1745
|
+
return new Ke({
|
|
1746
1746
|
...this._def,
|
|
1747
1747
|
returns: t
|
|
1748
1748
|
});
|
|
@@ -1754,7 +1754,7 @@ class Le extends X {
|
|
|
1754
1754
|
return this.parse(t);
|
|
1755
1755
|
}
|
|
1756
1756
|
}
|
|
1757
|
-
|
|
1757
|
+
Ke.create = (e, t, s) => new Ke({
|
|
1758
1758
|
args: e ? e.rest(Xe.create()) : Ge.create([]).rest(Xe.create()),
|
|
1759
1759
|
returns: t || Xe.create(),
|
|
1760
1760
|
typeName: I.ZodFunction,
|
|
@@ -1774,7 +1774,7 @@ Tt.create = (e, t) => new Tt({
|
|
|
1774
1774
|
typeName: I.ZodLazy,
|
|
1775
1775
|
...Q(t)
|
|
1776
1776
|
});
|
|
1777
|
-
class
|
|
1777
|
+
class St extends X {
|
|
1778
1778
|
_parse(t) {
|
|
1779
1779
|
if (t.data !== this._def.value) {
|
|
1780
1780
|
const s = this._getOrReturnCtx(t);
|
|
@@ -1789,7 +1789,7 @@ class Nt extends X {
|
|
|
1789
1789
|
return this._def.value;
|
|
1790
1790
|
}
|
|
1791
1791
|
}
|
|
1792
|
-
|
|
1792
|
+
St.create = (e, t) => new St({
|
|
1793
1793
|
value: e,
|
|
1794
1794
|
typeName: I.ZodLiteral,
|
|
1795
1795
|
...Q(t)
|
|
@@ -1806,7 +1806,7 @@ class Lt extends X {
|
|
|
1806
1806
|
if (typeof t.data != "string") {
|
|
1807
1807
|
const s = this._getOrReturnCtx(t), r = this._def.values;
|
|
1808
1808
|
return P(s, {
|
|
1809
|
-
expected:
|
|
1809
|
+
expected: N.joinValues(r),
|
|
1810
1810
|
received: s.parsedType,
|
|
1811
1811
|
code: C.invalid_type
|
|
1812
1812
|
}), H;
|
|
@@ -1844,19 +1844,19 @@ class Lt extends X {
|
|
|
1844
1844
|
}
|
|
1845
1845
|
}
|
|
1846
1846
|
Lt.create = pr;
|
|
1847
|
-
class
|
|
1847
|
+
class Nt extends X {
|
|
1848
1848
|
_parse(t) {
|
|
1849
|
-
const s =
|
|
1849
|
+
const s = N.getValidEnumValues(this._def.values), r = this._getOrReturnCtx(t);
|
|
1850
1850
|
if (r.parsedType !== x.string && r.parsedType !== x.number) {
|
|
1851
|
-
const n =
|
|
1851
|
+
const n = N.objectValues(s);
|
|
1852
1852
|
return P(r, {
|
|
1853
|
-
expected:
|
|
1853
|
+
expected: N.joinValues(n),
|
|
1854
1854
|
received: r.parsedType,
|
|
1855
1855
|
code: C.invalid_type
|
|
1856
1856
|
}), H;
|
|
1857
1857
|
}
|
|
1858
1858
|
if (s.indexOf(t.data) === -1) {
|
|
1859
|
-
const n =
|
|
1859
|
+
const n = N.objectValues(s);
|
|
1860
1860
|
return P(r, {
|
|
1861
1861
|
received: r.data,
|
|
1862
1862
|
code: C.invalid_enum_value,
|
|
@@ -1869,7 +1869,7 @@ class St extends X {
|
|
|
1869
1869
|
return this._def.values;
|
|
1870
1870
|
}
|
|
1871
1871
|
}
|
|
1872
|
-
|
|
1872
|
+
Nt.create = (e, t) => new Nt({
|
|
1873
1873
|
values: e,
|
|
1874
1874
|
typeName: I.ZodNativeEnum,
|
|
1875
1875
|
...Q(t)
|
|
@@ -1955,7 +1955,7 @@ class Ve extends X {
|
|
|
1955
1955
|
return { status: s.value, value: l };
|
|
1956
1956
|
} else
|
|
1957
1957
|
return this._def.schema._parseAsync({ data: r.data, path: r.path, parent: r }).then((c) => Ft(c) ? Promise.resolve(n.transform(c.value, a)).then((l) => ({ status: s.value, value: l })) : c);
|
|
1958
|
-
|
|
1958
|
+
N.assertNever(n);
|
|
1959
1959
|
}
|
|
1960
1960
|
}
|
|
1961
1961
|
Ve.create = (e, t, s) => new Ve({
|
|
@@ -1983,7 +1983,7 @@ Ee.create = (e, t) => new Ee({
|
|
|
1983
1983
|
typeName: I.ZodOptional,
|
|
1984
1984
|
...Q(t)
|
|
1985
1985
|
});
|
|
1986
|
-
class
|
|
1986
|
+
class Je extends X {
|
|
1987
1987
|
_parse(t) {
|
|
1988
1988
|
return this._getType(t) === x.null ? oe(null) : this._def.innerType._parse(t);
|
|
1989
1989
|
}
|
|
@@ -1991,7 +1991,7 @@ class Ke extends X {
|
|
|
1991
1991
|
return this._def.innerType;
|
|
1992
1992
|
}
|
|
1993
1993
|
}
|
|
1994
|
-
|
|
1994
|
+
Je.create = (e, t) => new Je({
|
|
1995
1995
|
innerType: e,
|
|
1996
1996
|
typeName: I.ZodNullable,
|
|
1997
1997
|
...Q(t)
|
|
@@ -2046,7 +2046,7 @@ var I;
|
|
|
2046
2046
|
})(I || (I = {}));
|
|
2047
2047
|
const la = (e, t = {
|
|
2048
2048
|
message: `Input not instance of ${e.name}`
|
|
2049
|
-
}) => fr((s) => s instanceof e, t, !0), hr = ke.create, yr =
|
|
2049
|
+
}) => fr((s) => s instanceof e, t, !0), hr = ke.create, yr = We.create, ua = Zt.create, Aa = qt.create, br = It.create, da = nt.create, ma = Ht.create, ga = Rt.create, pa = at.create, fa = Xe.create, ha = Te.create, ya = Xt.create, ba = Ye.create, va = J.create, wa = J.strictCreate, Ba = Bt.create, Ma = Wt.create, Ca = Mt.create, Da = Ge.create, xa = Ct.create, ja = kt.create, Ea = Le.create, Pa = Ke.create, Ya = Tt.create, Ga = St.create, Va = Lt.create, Oa = Nt.create, Fa = ot.create, Js = Ve.create, qa = Ee.create, Ia = Je.create, Ha = Ve.createWithPreprocess, Ra = () => hr().optional(), Xa = () => yr().optional(), Qa = () => br().optional();
|
|
2050
2050
|
var ft = /* @__PURE__ */ Object.freeze({
|
|
2051
2051
|
__proto__: null,
|
|
2052
2052
|
getParsedType: Re,
|
|
@@ -2065,7 +2065,7 @@ var ft = /* @__PURE__ */ Object.freeze({
|
|
|
2065
2065
|
jsonStringifyReplacer: qs,
|
|
2066
2066
|
ZodType: X,
|
|
2067
2067
|
ZodString: ke,
|
|
2068
|
-
ZodNumber:
|
|
2068
|
+
ZodNumber: We,
|
|
2069
2069
|
ZodBigInt: qt,
|
|
2070
2070
|
ZodBoolean: It,
|
|
2071
2071
|
ZodDate: nt,
|
|
@@ -2086,17 +2086,17 @@ var ft = /* @__PURE__ */ Object.freeze({
|
|
|
2086
2086
|
ZodTuple: Ge,
|
|
2087
2087
|
ZodRecord: Ct,
|
|
2088
2088
|
ZodMap: kt,
|
|
2089
|
-
ZodSet:
|
|
2090
|
-
ZodFunction:
|
|
2089
|
+
ZodSet: Le,
|
|
2090
|
+
ZodFunction: Ke,
|
|
2091
2091
|
ZodLazy: Tt,
|
|
2092
|
-
ZodLiteral:
|
|
2092
|
+
ZodLiteral: St,
|
|
2093
2093
|
ZodEnum: Lt,
|
|
2094
|
-
ZodNativeEnum:
|
|
2094
|
+
ZodNativeEnum: Nt,
|
|
2095
2095
|
ZodPromise: ot,
|
|
2096
2096
|
ZodEffects: Ve,
|
|
2097
2097
|
ZodTransformer: Ve,
|
|
2098
2098
|
ZodOptional: Ee,
|
|
2099
|
-
ZodNullable:
|
|
2099
|
+
ZodNullable: Je,
|
|
2100
2100
|
ZodDefault: Is,
|
|
2101
2101
|
ZodNaN: Zt,
|
|
2102
2102
|
custom: fr,
|
|
@@ -2201,7 +2201,7 @@ function Ds(e, t) {
|
|
|
2201
2201
|
}
|
|
2202
2202
|
function xs(e, t, s, r) {
|
|
2203
2203
|
if (Hs(e))
|
|
2204
|
-
return
|
|
2204
|
+
return Sa(e.$form, t, s) ? (r[e.$form] = t, !0) : !1;
|
|
2205
2205
|
if (Array.isArray(e) || Array.isArray(t))
|
|
2206
2206
|
return !Array.isArray(e) || !Array.isArray(t) || e.length !== t.length ? !1 : e.every((n, a) => xs(n, t[a], s, r));
|
|
2207
2207
|
if (typeof e == "object" && e !== null) {
|
|
@@ -2218,11 +2218,11 @@ function xs(e, t, s, r) {
|
|
|
2218
2218
|
}
|
|
2219
2219
|
return e === t;
|
|
2220
2220
|
}
|
|
2221
|
-
function
|
|
2221
|
+
function Sa(e, t, s) {
|
|
2222
2222
|
const r = s.fields.find((n) => n.key === e);
|
|
2223
2223
|
return (r == null ? void 0 : r.kind) === "number" ? typeof t == "number" : (r == null ? void 0 : r.kind) === "switch" ? typeof t == "boolean" : typeof t == "number" || typeof t == "string" || typeof t == "boolean";
|
|
2224
2224
|
}
|
|
2225
|
-
function
|
|
2225
|
+
function Na(e) {
|
|
2226
2226
|
return "fields" in e;
|
|
2227
2227
|
}
|
|
2228
2228
|
function Za(e, t) {
|
|
@@ -2241,7 +2241,7 @@ function El(e, t) {
|
|
|
2241
2241
|
return s;
|
|
2242
2242
|
}
|
|
2243
2243
|
function za(e) {
|
|
2244
|
-
if (
|
|
2244
|
+
if (Na(e.form)) {
|
|
2245
2245
|
const s = new Set(e.form.fields.map((r) => r.key));
|
|
2246
2246
|
for (const r of e.form.fields)
|
|
2247
2247
|
if (r.visibleWhen && !s.has(r.visibleWhen.field))
|
|
@@ -2471,18 +2471,19 @@ const Ao = {
|
|
|
2471
2471
|
// onto the returned builder, so these survive untouched.
|
|
2472
2472
|
appliesToActions: co,
|
|
2473
2473
|
summarizeForm: uo
|
|
2474
|
-
}),
|
|
2475
|
-
[`prefix:${eo}`]:
|
|
2476
|
-
[d.report_reports_allDefaultReports]:
|
|
2477
|
-
[d.report_reports_allCustomReports]:
|
|
2474
|
+
}), Ze = [mo], go = {
|
|
2475
|
+
[`prefix:${eo}`]: Ze,
|
|
2476
|
+
[d.report_reports_allDefaultReports]: Ze,
|
|
2477
|
+
[d.report_reports_allCustomReports]: Ze,
|
|
2478
2478
|
// Overview / Insight are standalone page-access subjects with their own
|
|
2479
2479
|
// independent window each. They are NOT category covers and have no cover
|
|
2480
2480
|
// relationship, so CASL evaluates them in isolation — a per-report window on
|
|
2481
2481
|
// `reports::<key>` can never bleed into these page checks.
|
|
2482
|
-
[d.
|
|
2483
|
-
[d.
|
|
2482
|
+
[d.report_accessOsDashboard]: Ze,
|
|
2483
|
+
[d.report_accessOverview]: Ze,
|
|
2484
|
+
[d.report_accessInsight]: Ze,
|
|
2484
2485
|
// Flat POS report subject used by the restaurant role editor.
|
|
2485
|
-
report:
|
|
2486
|
+
report: Ze
|
|
2486
2487
|
};
|
|
2487
2488
|
Ka(go);
|
|
2488
2489
|
function Pl(e, t) {
|
|
@@ -4518,6 +4519,7 @@ const Br = {
|
|
|
4518
4519
|
"business::hrm::employee": "Employee Management",
|
|
4519
4520
|
"business::hrm::auditLog": "Audit Log Management",
|
|
4520
4521
|
"business::report::createReport": "Create Report",
|
|
4522
|
+
"business::report::accessOsDashboard": "Access FeedmeOS Dashboard",
|
|
4521
4523
|
"business::report::accessOverview": "Access Overview Page",
|
|
4522
4524
|
"business::report::accessInsight": "Access Insight Page",
|
|
4523
4525
|
"business::report::accessSetting": "Access Setting Page",
|
|
@@ -4531,12 +4533,12 @@ const Br = {
|
|
|
4531
4533
|
permissions: "Permissions"
|
|
4532
4534
|
}
|
|
4533
4535
|
}
|
|
4534
|
-
},
|
|
4536
|
+
}, So = {
|
|
4535
4537
|
team: Rr,
|
|
4536
4538
|
permissionSet: Xr
|
|
4537
|
-
},
|
|
4539
|
+
}, No = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4538
4540
|
__proto__: null,
|
|
4539
|
-
default:
|
|
4541
|
+
default: So,
|
|
4540
4542
|
permissionSet: Xr,
|
|
4541
4543
|
team: Rr
|
|
4542
4544
|
}, Symbol.toStringTag, { value: "Module" })), Qr = {
|
|
@@ -4773,6 +4775,7 @@ const Br = {
|
|
|
4773
4775
|
"business::hrm::employee": "จัดการพนักงาน",
|
|
4774
4776
|
"business::hrm::auditLog": "จัดการประวัติการใช้งาน",
|
|
4775
4777
|
"business::report::createReport": "สร้างรายงาน",
|
|
4778
|
+
"business::report::accessOsDashboard": "เข้าถึงแดชบอร์ด FeedmeOS",
|
|
4776
4779
|
"business::report::accessOverview": "เข้าถึงหน้าภาพรวม",
|
|
4777
4780
|
"business::report::accessInsight": "เข้าถึงหน้าข้อมูลเชิงลึก",
|
|
4778
4781
|
"business::report::accessSetting": "เข้าถึงหน้าการตั้งค่า",
|
|
@@ -4913,7 +4916,7 @@ const Br = {
|
|
|
4913
4916
|
selectPlaceholder: "选择权限角色"
|
|
4914
4917
|
}
|
|
4915
4918
|
}
|
|
4916
|
-
},
|
|
4919
|
+
}, Sr = {
|
|
4917
4920
|
title: "角色",
|
|
4918
4921
|
createButtonLabel: "创建角色",
|
|
4919
4922
|
search: {
|
|
@@ -5028,6 +5031,7 @@ const Br = {
|
|
|
5028
5031
|
"business::hrm::employee": "员工管理",
|
|
5029
5032
|
"business::hrm::auditLog": "审计日志管理",
|
|
5030
5033
|
"business::report::createReport": "创建报告",
|
|
5034
|
+
"business::report::accessOsDashboard": "访问 FeedmeOS 仪表板",
|
|
5031
5035
|
"business::report::accessOverview": "访问概览页面",
|
|
5032
5036
|
"business::report::accessInsight": "访问洞察页面",
|
|
5033
5037
|
"business::report::accessSetting": "访问设置页面",
|
|
@@ -5043,13 +5047,13 @@ const Br = {
|
|
|
5043
5047
|
}
|
|
5044
5048
|
}, zo = {
|
|
5045
5049
|
team: Tr,
|
|
5046
|
-
permissionSet:
|
|
5050
|
+
permissionSet: Sr
|
|
5047
5051
|
}, Wo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5048
5052
|
__proto__: null,
|
|
5049
5053
|
default: zo,
|
|
5050
|
-
permissionSet:
|
|
5054
|
+
permissionSet: Sr,
|
|
5051
5055
|
team: Tr
|
|
5052
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5056
|
+
}, Symbol.toStringTag, { value: "Module" })), Nr = {
|
|
5053
5057
|
title: "團隊成員",
|
|
5054
5058
|
subtitle: "管理可存取 Portal 和 POS 的團隊成員,指派 Portal 權限和 POS 角色。",
|
|
5055
5059
|
actions: {
|
|
@@ -5290,6 +5294,7 @@ const Br = {
|
|
|
5290
5294
|
"business::hrm::employee": "員工管理",
|
|
5291
5295
|
"business::hrm::auditLog": "審計日誌管理",
|
|
5292
5296
|
"business::report::createReport": "創建報告",
|
|
5297
|
+
"business::report::accessOsDashboard": "訪問 FeedmeOS 儀表板",
|
|
5293
5298
|
"business::report::accessOverview": "訪問概覽頁面",
|
|
5294
5299
|
"business::report::accessInsight": "訪問洞察頁面",
|
|
5295
5300
|
"business::report::accessSetting": "訪問設置頁面",
|
|
@@ -5304,15 +5309,15 @@ const Br = {
|
|
|
5304
5309
|
}
|
|
5305
5310
|
}
|
|
5306
5311
|
}, Lo = {
|
|
5307
|
-
team:
|
|
5312
|
+
team: Nr,
|
|
5308
5313
|
permissionSet: Zr
|
|
5309
5314
|
}, Ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5310
5315
|
__proto__: null,
|
|
5311
5316
|
default: Lo,
|
|
5312
5317
|
permissionSet: Zr,
|
|
5313
|
-
team:
|
|
5318
|
+
team: Nr
|
|
5314
5319
|
}, Symbol.toStringTag, { value: "Module" })), Jo = {
|
|
5315
|
-
"en-US":
|
|
5320
|
+
"en-US": No,
|
|
5316
5321
|
"zh-CN": Wo,
|
|
5317
5322
|
"th-TH": Uo,
|
|
5318
5323
|
"zh-Hant": Ko
|
|
@@ -6446,6 +6451,12 @@ const Br = {
|
|
|
6446
6451
|
actions: [o.manage],
|
|
6447
6452
|
category: v.report
|
|
6448
6453
|
},
|
|
6454
|
+
reportAccessOsDashboard: {
|
|
6455
|
+
label: "Access FeedmeOS Dashboard",
|
|
6456
|
+
subject: d.report_accessOsDashboard,
|
|
6457
|
+
actions: [o.manage],
|
|
6458
|
+
category: v.report
|
|
6459
|
+
},
|
|
6449
6460
|
reportAccessOverview: {
|
|
6450
6461
|
label: "Access Overview Page",
|
|
6451
6462
|
subject: d.report_accessOverview,
|
|
@@ -7014,11 +7025,11 @@ const L = [
|
|
|
7014
7025
|
dn,
|
|
7015
7026
|
mn,
|
|
7016
7027
|
gn
|
|
7017
|
-
),
|
|
7028
|
+
), Si = Ae(
|
|
7018
7029
|
ye,
|
|
7019
7030
|
cn,
|
|
7020
7031
|
ln
|
|
7021
|
-
),
|
|
7032
|
+
), Ni = Ae(
|
|
7022
7033
|
ye,
|
|
7023
7034
|
Qi
|
|
7024
7035
|
), Zi = Ae(ki), Ui = {
|
|
@@ -7030,12 +7041,12 @@ const L = [
|
|
|
7030
7041
|
[`set_${d.crm_promotion}`]: {
|
|
7031
7042
|
key: "sys:crm:promotion",
|
|
7032
7043
|
name: "CRM Promotion",
|
|
7033
|
-
permissions:
|
|
7044
|
+
permissions: Si
|
|
7034
7045
|
},
|
|
7035
7046
|
[`set_${d.crm_voucher}`]: {
|
|
7036
7047
|
key: "sys:crm:voucher",
|
|
7037
7048
|
name: "CRM Voucher",
|
|
7038
|
-
permissions:
|
|
7049
|
+
permissions: Ni
|
|
7039
7050
|
},
|
|
7040
7051
|
[`set_${d.crm_membership}`]: {
|
|
7041
7052
|
key: "sys:crm:membership",
|
|
@@ -7785,7 +7796,7 @@ var On = { exports: {} };
|
|
|
7785
7796
|
return !1;
|
|
7786
7797
|
};
|
|
7787
7798
|
}
|
|
7788
|
-
function
|
|
7799
|
+
function S(m) {
|
|
7789
7800
|
return function(p, B) {
|
|
7790
7801
|
if (!l(B) || !B.length) return m(p, B);
|
|
7791
7802
|
for (var D = 0, E = B.length; D < E; D++)
|
|
@@ -7800,7 +7811,7 @@ var On = { exports: {} };
|
|
|
7800
7811
|
$eq: O(function(m, p) {
|
|
7801
7812
|
return m(p);
|
|
7802
7813
|
}),
|
|
7803
|
-
$ne:
|
|
7814
|
+
$ne: S(function(m, p) {
|
|
7804
7815
|
return m(p);
|
|
7805
7816
|
}),
|
|
7806
7817
|
$gt: O(function(m, p) {
|
|
@@ -7942,7 +7953,7 @@ var On = { exports: {} };
|
|
|
7942
7953
|
},
|
|
7943
7954
|
$ne: function(m, p, B) {
|
|
7944
7955
|
var D = re.$eq(m, p, B);
|
|
7945
|
-
return
|
|
7956
|
+
return S(function(E, Y, q, R) {
|
|
7946
7957
|
return !D(E, Y, q, R);
|
|
7947
7958
|
});
|
|
7948
7959
|
},
|
|
@@ -8036,24 +8047,24 @@ var On = { exports: {} };
|
|
|
8036
8047
|
if (!y(_)) return se;
|
|
8037
8048
|
for (var f in _) se.push(f), R(_[f], se);
|
|
8038
8049
|
return se;
|
|
8039
|
-
}(q, []).join(",").search(/[$.]/) === -1 ? me(q,
|
|
8050
|
+
}(q, []).join(",").search(/[$.]/) === -1 ? me(q, Se) : E(q);
|
|
8040
8051
|
};
|
|
8041
8052
|
return function(q) {
|
|
8042
8053
|
return E(D(q));
|
|
8043
8054
|
};
|
|
8044
8055
|
}
|
|
8045
|
-
function
|
|
8056
|
+
function Se(m, p) {
|
|
8046
8057
|
if (Object.prototype.toString.call(m) !== Object.prototype.toString.call(p))
|
|
8047
8058
|
return !1;
|
|
8048
8059
|
if (y(m)) {
|
|
8049
8060
|
if (Object.keys(m).length !== Object.keys(p).length) return !1;
|
|
8050
|
-
for (var B in m) if (!
|
|
8061
|
+
for (var B in m) if (!Se(m[B], p[B])) return !1;
|
|
8051
8062
|
return !0;
|
|
8052
8063
|
}
|
|
8053
8064
|
if (l(m)) {
|
|
8054
8065
|
if (m.length !== p.length) return !1;
|
|
8055
8066
|
for (var D = 0, E = m.length; D < E; D++)
|
|
8056
|
-
if (!
|
|
8067
|
+
if (!Se(m[D], p[D])) return !1;
|
|
8057
8068
|
return !0;
|
|
8058
8069
|
}
|
|
8059
8070
|
return m === p;
|
|
@@ -8074,7 +8085,7 @@ var On = { exports: {} };
|
|
|
8074
8085
|
};
|
|
8075
8086
|
}
|
|
8076
8087
|
function ut(m, p) {
|
|
8077
|
-
if (
|
|
8088
|
+
if (Se(m, p)) return 0;
|
|
8078
8089
|
if (a(m) === a(p)) {
|
|
8079
8090
|
if (m > p) return 1;
|
|
8080
8091
|
if (m < p) return -1;
|
|
@@ -8281,14 +8292,14 @@ var jc = /* @__PURE__ */ function() {
|
|
|
8281
8292
|
return this[de].indexedRules = a.rules, this[de].hasPerFieldRules = a.hasPerFieldRules, this.emit("updated", n), this;
|
|
8282
8293
|
}, t.buildIndexFor = function(r) {
|
|
8283
8294
|
for (var n = /* @__PURE__ */ Object.create(null), a = this[de].RuleType, c = !0, l = !1, y = 0; y < r.length; y++) {
|
|
8284
|
-
var h = new a(r[y]), w = this.expandActions(h.actions), O = Ps(h.subject),
|
|
8295
|
+
var h = new a(r[y]), w = this.expandActions(h.actions), O = Ps(h.subject), S = r.length - y - 1;
|
|
8285
8296
|
c = !!(c && h.inverted), !l && h.fields && (l = !0);
|
|
8286
8297
|
for (var U = 0; U < O.length; U++) {
|
|
8287
8298
|
var $ = O[U];
|
|
8288
8299
|
n[$] = n[$] || /* @__PURE__ */ Object.create(null);
|
|
8289
8300
|
for (var re = 0; re < w.length; re++) {
|
|
8290
8301
|
var me = w[re];
|
|
8291
|
-
n[$][me] = n[$][me] || /* @__PURE__ */ Object.create(null), n[$][me][
|
|
8302
|
+
n[$][me] = n[$][me] || /* @__PURE__ */ Object.create(null), n[$][me][S] = h;
|
|
8292
8303
|
}
|
|
8293
8304
|
}
|
|
8294
8305
|
}
|
|
@@ -8438,7 +8449,7 @@ function Fc(e, t, s) {
|
|
|
8438
8449
|
if (!y.value)
|
|
8439
8450
|
return;
|
|
8440
8451
|
w++;
|
|
8441
|
-
const
|
|
8452
|
+
const S = w;
|
|
8442
8453
|
let U = !1;
|
|
8443
8454
|
a && Promise.resolve().then(() => {
|
|
8444
8455
|
a.value = !0;
|
|
@@ -8449,11 +8460,11 @@ function Fc(e, t, s) {
|
|
|
8449
8460
|
a && (a.value = !1), U || re();
|
|
8450
8461
|
});
|
|
8451
8462
|
});
|
|
8452
|
-
|
|
8463
|
+
S === w && (h.value = $);
|
|
8453
8464
|
} catch ($) {
|
|
8454
8465
|
l($);
|
|
8455
8466
|
} finally {
|
|
8456
|
-
a &&
|
|
8467
|
+
a && S === w && (a.value = !1), U = !0;
|
|
8457
8468
|
}
|
|
8458
8469
|
}), n ? Os(() => (y.value = !0, h.value)) : h;
|
|
8459
8470
|
}
|
|
@@ -8530,11 +8541,11 @@ const Rc = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
|
|
|
8530
8541
|
subtitle: "哎呀!您没有权限访问此页面。"
|
|
8531
8542
|
}, Tc = {
|
|
8532
8543
|
noPermission: kc
|
|
8533
|
-
},
|
|
8544
|
+
}, Sc = {
|
|
8534
8545
|
title: "存取被拒絕",
|
|
8535
8546
|
subtitle: "哎呀!您沒有權限存取此頁面。"
|
|
8536
|
-
},
|
|
8537
|
-
noPermission:
|
|
8547
|
+
}, Nc = {
|
|
8548
|
+
noPermission: Sc
|
|
8538
8549
|
}, Zc = {
|
|
8539
8550
|
title: "การเข้าถึงถูกปฏิเสธ",
|
|
8540
8551
|
subtitle: "โอ้! คุณไม่มีสิทธิ์เข้าถึงหน้านี้"
|
|
@@ -8547,21 +8558,21 @@ const Rc = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
|
|
|
8547
8558
|
messages: {
|
|
8548
8559
|
"en-US": Qc,
|
|
8549
8560
|
"zh-CN": Tc,
|
|
8550
|
-
"zh-Hant":
|
|
8561
|
+
"zh-Hant": Nc,
|
|
8551
8562
|
"th-TH": Uc
|
|
8552
8563
|
}
|
|
8553
8564
|
});
|
|
8554
8565
|
return (s, r) => (ct(), lr("div", zc, [
|
|
8555
|
-
|
|
8556
|
-
|
|
8557
|
-
|
|
8558
|
-
src:
|
|
8566
|
+
Ue("div", Wc, [
|
|
8567
|
+
Ue("div", Lc, [
|
|
8568
|
+
Ue("img", {
|
|
8569
|
+
src: ze(Rc),
|
|
8559
8570
|
class: "w-full h-full"
|
|
8560
8571
|
}, null, 8, Kc)
|
|
8561
8572
|
]),
|
|
8562
|
-
|
|
8563
|
-
|
|
8564
|
-
|
|
8573
|
+
Ue("div", null, [
|
|
8574
|
+
Ue("h1", Jc, Ws(ze(t)("noPermission.title")), 1),
|
|
8575
|
+
Ue("h2", _c, Ws(ze(t)("noPermission.subtitle")), 1)
|
|
8565
8576
|
])
|
|
8566
8577
|
])
|
|
8567
8578
|
]));
|
|
@@ -8570,7 +8581,7 @@ const Rc = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
|
|
|
8570
8581
|
__name: "PermissionWrapper",
|
|
8571
8582
|
setup(e) {
|
|
8572
8583
|
const t = Hc();
|
|
8573
|
-
return (s, r) =>
|
|
8584
|
+
return (s, r) => ze(t) === ze(Gs).Denied ? (ct(), zt($c, { key: 0 })) : ze(t) === ze(Gs).Allowed ? cr(s.$slots, "default", { key: 1 }) : Tn("", !0);
|
|
8574
8585
|
}
|
|
8575
8586
|
});
|
|
8576
8587
|
function Kt(e) {
|
|
@@ -8595,8 +8606,8 @@ function tl(e, t) {
|
|
|
8595
8606
|
}
|
|
8596
8607
|
}
|
|
8597
8608
|
let n = null;
|
|
8598
|
-
return
|
|
8599
|
-
a && (await
|
|
8609
|
+
return Sn(e, async (a) => {
|
|
8610
|
+
a && (await Nn(), r());
|
|
8600
8611
|
}), ur(() => {
|
|
8601
8612
|
window.addEventListener("resize", r), n = new ResizeObserver(r), n.observe(document.body);
|
|
8602
8613
|
}), Zn(() => {
|
|
@@ -8628,7 +8639,7 @@ const sl = /* @__PURE__ */ it({
|
|
|
8628
8639
|
const r = Fs("FmCircularProgress");
|
|
8629
8640
|
return ct(), zt(sl, null, {
|
|
8630
8641
|
default: zn(() => [
|
|
8631
|
-
|
|
8642
|
+
Ue("div", rl, [
|
|
8632
8643
|
Wn(r, { size: "xl" })
|
|
8633
8644
|
])
|
|
8634
8645
|
]),
|
|
@@ -8650,10 +8661,10 @@ const Et = (e) => ({
|
|
|
8650
8661
|
}
|
|
8651
8662
|
]
|
|
8652
8663
|
}
|
|
8653
|
-
}), al = Kt(Be(() => import("./Main-
|
|
8654
|
-
Be(() => import("./AuditLogList-
|
|
8655
|
-
), cl = Kt(Be(() => import("./Main-
|
|
8656
|
-
() => import("./PermissionSetList-
|
|
8664
|
+
}), al = Kt(Be(() => import("./Main-tQ6MrkkP.js"))), ol = Kt(Be(() => import("./Main-DyZ6dJ2d.js"))), il = Kt(
|
|
8665
|
+
Be(() => import("./AuditLogList-CpKIq8I0.js"))
|
|
8666
|
+
), cl = Kt(Be(() => import("./Main-CHHR0r5b.js"))), ll = Be(() => import("./ApprovalCodeList-DZajn7xx.js")), ul = Be(() => import("./GrantUserList-735upmIE.js")), Al = Be(() => import("./EmployeeList-DDuxDdlJ.js")), dl = Be(() => import("./RoleList-BZbEGpCi.js")), ml = Be(() => import("./TimesheetList-DMnNVVlB.js")), gl = Be(() => import("./TeamMemberList-B58boeR9.js")), pl = Be(
|
|
8667
|
+
() => import("./PermissionSetList-ZxLNYPEB.js")
|
|
8657
8668
|
), Fl = [
|
|
8658
8669
|
{
|
|
8659
8670
|
path: "/",
|
|
@@ -8976,7 +8987,7 @@ var Vs = { exports: {} };
|
|
|
8976
8987
|
}), Object.keys(i).length ? i : null;
|
|
8977
8988
|
}
|
|
8978
8989
|
var w, O;
|
|
8979
|
-
function
|
|
8990
|
+
function S(f, u, i) {
|
|
8980
8991
|
var g = "shortString", A = !0;
|
|
8981
8992
|
typeof i == "number" && (g = "javaDouble", A = !1), f[g] = f[g] || {}, f[g][u] = A ? i + "" : i;
|
|
8982
8993
|
}
|
|
@@ -8995,7 +9006,7 @@ var Vs = { exports: {} };
|
|
|
8995
9006
|
(function(f) {
|
|
8996
9007
|
f.NONE = "NONE", f.DEFAULT_FLAGS = "DEFAULT_FLAGS", f.CACHE = "CACHE", f.SERVER = "SERVER";
|
|
8997
9008
|
})(w || (w = {}));
|
|
8998
|
-
var me, ne = null, Jt = "FLAGSMITH_EVENT", be = Jt,
|
|
9009
|
+
var me, ne = null, Jt = "FLAGSMITH_EVENT", be = Jt, Se = "https://edge.api.flagsmith.com/api/v1/", lt = "flagsmith_value_", Dt = "flagsmith_enabled_", ut = "flagsmith_trait_", At = function() {
|
|
8999
9010
|
function f(u) {
|
|
9000
9011
|
var i = this;
|
|
9001
9012
|
this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
|
|
@@ -9019,8 +9030,8 @@ var Vs = { exports: {} };
|
|
|
9019
9030
|
Object.keys(((j = i.evaluationContext.identity) === null || j === void 0 ? void 0 : j.traits) || {}).map(function(W) {
|
|
9020
9031
|
mt[ut + W] = i.getTrait(W);
|
|
9021
9032
|
});
|
|
9022
|
-
var
|
|
9023
|
-
i.log("Setting Datadog user",
|
|
9033
|
+
var _e = n(n(n({}, i.datadogRum.client.getUser()), { id: i.datadogRum.client.getUser().id || ((z = i.evaluationContext.identity) === null || z === void 0 ? void 0 : z.identifier) }), mt);
|
|
9034
|
+
i.log("Setting Datadog user", _e), i.datadogRum.client.setUser(_e);
|
|
9024
9035
|
}
|
|
9025
9036
|
} catch (W) {
|
|
9026
9037
|
console.error(W);
|
|
@@ -9028,9 +9039,9 @@ var Vs = { exports: {} };
|
|
|
9028
9039
|
if (i.dtrum) try {
|
|
9029
9040
|
var le = { javaDouble: {}, date: {}, shortString: {}, javaLongOrObject: {} };
|
|
9030
9041
|
Object.keys(i.flags).map(function(W) {
|
|
9031
|
-
|
|
9042
|
+
S(le, lt + W, i.getValue(W, { skipAnalytics: !0 })), S(le, Dt + W, i.hasFeature(W, { skipAnalytics: !0 }));
|
|
9032
9043
|
}), Object.keys(((ce = i.evaluationContext.identity) === null || ce === void 0 ? void 0 : ce.traits) || {}).map(function(W) {
|
|
9033
|
-
|
|
9044
|
+
S(le, ut + W, i.getTrait(W));
|
|
9034
9045
|
}), i.log("Sending javaLongOrObject traits to dynatrace", le.javaLongOrObject), i.log("Sending date traits to dynatrace", le.date), i.log("Sending shortString traits to dynatrace", le.shortString), i.log("Sending javaDouble to dynatrace", le.javaDouble), i.dtrum.sendSessionProperties(le.javaLongOrObject, le.date, le.shortString, le.javaDouble);
|
|
9035
9046
|
} catch (W) {
|
|
9036
9047
|
console.error(W);
|
|
@@ -9143,32 +9154,32 @@ var Vs = { exports: {} };
|
|
|
9143
9154
|
return f.prototype.init = function(u) {
|
|
9144
9155
|
var i, g, A;
|
|
9145
9156
|
return a(this, void 0, void 0, function() {
|
|
9146
|
-
var b, M, G, F, k, j, z, ce, Me, ge, ve, pe, fe, Ce, dt, mt,
|
|
9157
|
+
var b, M, G, F, k, j, z, ce, Me, ge, ve, pe, fe, Ce, dt, mt, _e, le, W, _t, gt, Qs, $e, $t, ks, Ts, es, Ss, ts, pt, et, Ns, ue = this;
|
|
9147
9158
|
return c(this, function(we) {
|
|
9148
9159
|
switch (we.label) {
|
|
9149
9160
|
case 0:
|
|
9150
9161
|
b = re(u.evaluationContext || this.evaluationContext), we.label = 1;
|
|
9151
9162
|
case 1:
|
|
9152
|
-
if (we.trys.push([1, 13, , 14]), M = u.environmentID, G = u.api, F = G === void 0 ?
|
|
9163
|
+
if (we.trys.push([1, 13, , 14]), M = u.environmentID, G = u.api, F = G === void 0 ? Se : G, k = u.headers, j = u.onChange, z = u.cacheFlags, ce = u.datadogRum, Me = u.onError, ge = u.defaultFlags, ve = u.fetch, pe = u.preventFetch, fe = u.enableLogs, Ce = u.enableDynatrace, dt = u.enableAnalytics, mt = u.realtime, _e = u.eventSourceUrl, le = _e === void 0 ? "https://realtime.flagsmith.com/" : _e, W = u.AsyncStorage, _t = u.identity, gt = u.traits, Qs = u.state, $e = u.cacheOptions, $t = u.angularHttpClient, ks = u._trigger, Ts = u._triggerLoadingState, b.environment = M ? { apiKey: M } : b.environment, !b.environment || !b.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
|
|
9153
9164
|
if (b.identity = _t || gt ? { identifier: _t, traits: gt ? Object.fromEntries(Object.entries(gt).map(function(he) {
|
|
9154
9165
|
return [he[0], { value: he[1] }];
|
|
9155
9166
|
})) : {} } : b.identity, this.evaluationContext = b, this.api = F, this.headers = k, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = j, es = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = ks || this._trigger, this._triggerLoadingState = Ts || this._triggerLoadingState, this.onError = function(he) {
|
|
9156
9167
|
ue.setLoadingState(n(n({}, ue.loadingState), { isFetching: !1, isLoading: !1, error: he })), Me == null || Me(he);
|
|
9157
|
-
}, this.enableLogs = fe || !1, this.cacheOptions =
|
|
9168
|
+
}, this.enableLogs = fe || !1, this.cacheOptions = $e ? { skipAPI: !!$e.skipAPI, ttl: $e.ttl || 0, storageKey: $e.storageKey, loadStale: !!$e.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), ve && (O = ve), this.enableAnalytics = dt || !1, this.flags = Object.assign({}, ge) || {}, this.datadogRum = ce || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = ne !== void 0 && !!z, be = "FLAGSMITH_EVENT_" + b.environment.apiKey, W && (ne = W), mt && typeof window < "u" && this.setupRealtime(le, b.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = n(n({}, this.loadingState), { isLoading: !1, source: w.DEFAULT_FLAGS })), this.setState(Qs), this.log("Initialising with properties", u, this), Ce && (typeof dtrum > "u" ? console.error("You have attempted to enable dynatrace but dtrum is undefined, please check you have the Dynatrace RUM JavaScript API installed.") : this.dtrum = dtrum), $t && (O = /* @__PURE__ */ function(he) {
|
|
9158
9169
|
return function(De, xe) {
|
|
9159
|
-
var Ie = xe.headers, K = xe.method,
|
|
9160
|
-
return new Promise(function(
|
|
9170
|
+
var Ie = xe.headers, K = xe.method, tt = xe.body;
|
|
9171
|
+
return new Promise(function(Ne) {
|
|
9161
9172
|
switch (K) {
|
|
9162
9173
|
case "GET":
|
|
9163
9174
|
return he.get(De, { headers: Ie }).subscribe(function(Oe) {
|
|
9164
|
-
|
|
9175
|
+
Ne({ ok: !0, text: function() {
|
|
9165
9176
|
return Promise.resolve(Oe);
|
|
9166
9177
|
} });
|
|
9167
9178
|
});
|
|
9168
9179
|
case "POST":
|
|
9169
9180
|
case "PUT":
|
|
9170
|
-
return he.post(De,
|
|
9171
|
-
|
|
9181
|
+
return he.post(De, tt, { headers: Ie }).subscribe(function(Oe) {
|
|
9182
|
+
Ne({ ok: !0, text: function() {
|
|
9172
9183
|
return Promise.resolve(Oe);
|
|
9173
9184
|
} });
|
|
9174
9185
|
});
|
|
@@ -9192,16 +9203,16 @@ var Vs = { exports: {} };
|
|
|
9192
9203
|
}
|
|
9193
9204
|
})), !z) return [3, 9];
|
|
9194
9205
|
if (!ne || !this.canUseStorage) return [3, 8];
|
|
9195
|
-
|
|
9206
|
+
Ss = function(he, De) {
|
|
9196
9207
|
return a(ue, void 0, void 0, function() {
|
|
9197
|
-
var xe, Ie, K,
|
|
9208
|
+
var xe, Ie, K, tt, Ne, Oe, ss, Zs, rs, ns, as, os, is, cs, ls, us, As, ds, ms, gs, ps, fs, hs, ys, Us = this;
|
|
9198
9209
|
return c(this, function(He) {
|
|
9199
9210
|
switch (He.label) {
|
|
9200
9211
|
case 0:
|
|
9201
9212
|
if (!De) return [3, 7];
|
|
9202
9213
|
xe = null, Ie = null, He.label = 1;
|
|
9203
9214
|
case 1:
|
|
9204
|
-
return He.trys.push([1, 5, , 6]), K = JSON.parse(De),
|
|
9215
|
+
return He.trys.push([1, 5, , 6]), K = JSON.parse(De), tt = !1, Ne = !1, K && K.api === this.api && ((ns = (rs = K.evaluationContext) === null || rs === void 0 ? void 0 : rs.environment) === null || ns === void 0 ? void 0 : ns.apiKey) === ((as = this.evaluationContext.environment) === null || as === void 0 ? void 0 : as.apiKey) && (Oe = !0, this.evaluationContext.identity && ((is = (os = K.evaluationContext) === null || os === void 0 ? void 0 : os.identity) === null || is === void 0 ? void 0 : is.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((ls = (cs = K.evaluationContext) === null || cs === void 0 ? void 0 : cs.identity) === null || ls === void 0 ? void 0 : ls.identifier) + " to " + this.evaluationContext.identity.identifier), Oe = !1), this.cacheOptions.ttl && (!K.ts || (/* @__PURE__ */ new Date()).valueOf() - K.ts > this.cacheOptions.ttl) && (K.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + K.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - K.ts) + "ms"), Oe = !1) : K.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + K.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - K.ts) + "ms"), Ne = !0, Oe = !0)), Oe && (tt = !0, Ie = h((us = this.evaluationContext.identity) === null || us === void 0 ? void 0 : us.traits, (ds = (As = K.evaluationContext) === null || As === void 0 ? void 0 : As.identity) === null || ds === void 0 ? void 0 : ds.traits), xe = h(this.flags, K.flags), this.setState(n(n({}, K), { evaluationContext: re(n(n({}, K.evaluationContext), { identity: !((ms = K.evaluationContext) === null || ms === void 0) && ms.identity ? n(n({}, (gs = K.evaluationContext) === null || gs === void 0 ? void 0 : gs.identity), { traits: n(n({}, ((fs = (ps = K.evaluationContext) === null || ps === void 0 ? void 0 : ps.identity) === null || fs === void 0 ? void 0 : fs.traits) || {}), gt || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", K))), tt ? (ss = !pe && (!this.cacheOptions.skipAPI || Ne), this._onChange(null, { isFromServer: !1, flagsChanged: xe, traitsChanged: Ie }, this._loadedState(null, w.CACHE, ss)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && tt && !Ne && this.log("Skipping API, using cache"), ss && this.getFlags().catch(function(Hn) {
|
|
9205
9216
|
var bs;
|
|
9206
9217
|
(bs = Us.onError) === null || bs === void 0 || bs.call(Us, Hn);
|
|
9207
9218
|
}), [3, 4]) : [3, 2];
|
|
@@ -9239,7 +9250,7 @@ var Vs = { exports: {} };
|
|
|
9239
9250
|
case 4:
|
|
9240
9251
|
ts = we.sent(), we.label = 5;
|
|
9241
9252
|
case 5:
|
|
9242
|
-
return [4,
|
|
9253
|
+
return [4, Ss(null, ts)];
|
|
9243
9254
|
case 6:
|
|
9244
9255
|
case 7:
|
|
9245
9256
|
return we.sent(), [3, 8];
|
|
@@ -9256,7 +9267,7 @@ var Vs = { exports: {} };
|
|
|
9256
9267
|
case 12:
|
|
9257
9268
|
return [3, 14];
|
|
9258
9269
|
case 13:
|
|
9259
|
-
throw
|
|
9270
|
+
throw et = we.sent(), this.log("Error during initialisation ", et), Ns = et instanceof Error ? et : new Error("".concat(et)), (A = this.onError) === null || A === void 0 || A.call(this, Ns), et;
|
|
9260
9271
|
case 14:
|
|
9261
9272
|
return [2];
|
|
9262
9273
|
}
|
|
@@ -9272,7 +9283,7 @@ var Vs = { exports: {} };
|
|
|
9272
9283
|
}, f.prototype.getState = function() {
|
|
9273
9284
|
return { api: this.api, flags: this.flags, ts: this.ts, evaluationContext: this.evaluationContext, evaluationEvent: this.evaluationEvent };
|
|
9274
9285
|
}, f.prototype.setState = function(u) {
|
|
9275
|
-
u && (this.initialised = !0, this.api = u.api || this.api ||
|
|
9286
|
+
u && (this.initialised = !0, this.api = u.api || this.api || Se, this.flags = u.flags || this.flags, this.evaluationContext = u.evaluationContext || this.evaluationContext, this.evaluationEvent = u.evaluationEvent || this.evaluationEvent, this.log("setState called", this));
|
|
9276
9287
|
}, f.prototype.logout = function() {
|
|
9277
9288
|
return this.evaluationContext.identity = null, this.initialised ? this.getFlags() : Promise.resolve();
|
|
9278
9289
|
}, f.prototype.startListening = function(u) {
|
|
@@ -9584,8 +9595,8 @@ function wl(e = vl) {
|
|
|
9584
9595
|
}
|
|
9585
9596
|
try {
|
|
9586
9597
|
await e.init(w, O), Pt.value = await e.getFlags(), ht.value = !0, st.value = null;
|
|
9587
|
-
} catch (
|
|
9588
|
-
console.error("Failed to initialize feature flags:",
|
|
9598
|
+
} catch (S) {
|
|
9599
|
+
console.error("Failed to initialize feature flags:", S), st.value = S;
|
|
9589
9600
|
}
|
|
9590
9601
|
}, r = async (w) => {
|
|
9591
9602
|
if (t())
|
|
@@ -9594,28 +9605,28 @@ function wl(e = vl) {
|
|
|
9594
9605
|
} catch (O) {
|
|
9595
9606
|
console.error("Failed to set user:", O), st.value = O;
|
|
9596
9607
|
}
|
|
9597
|
-
}, n = async (w) => r(`${or}-${w}`), a = (w, O,
|
|
9598
|
-
if (!t()) return
|
|
9608
|
+
}, n = async (w) => r(`${or}-${w}`), a = (w, O, S = null) => {
|
|
9609
|
+
if (!t()) return S;
|
|
9599
9610
|
try {
|
|
9600
|
-
return e.getFlagValue(w, O) ??
|
|
9611
|
+
return e.getFlagValue(w, O) ?? S;
|
|
9601
9612
|
} catch (U) {
|
|
9602
|
-
return console.error(`Error getting flag value for ${w}:`, U),
|
|
9613
|
+
return console.error(`Error getting flag value for ${w}:`, U), S;
|
|
9603
9614
|
}
|
|
9604
9615
|
}, c = (w, O) => {
|
|
9605
9616
|
if (!t()) return O ?? null;
|
|
9606
9617
|
try {
|
|
9607
9618
|
return e.getFlag(w) ?? O ?? null;
|
|
9608
|
-
} catch (
|
|
9609
|
-
return console.error(`Error getting flag for ${w}:`,
|
|
9619
|
+
} catch (S) {
|
|
9620
|
+
return console.error(`Error getting flag for ${w}:`, S), O ?? null;
|
|
9610
9621
|
}
|
|
9611
|
-
}, l = async (w, O,
|
|
9612
|
-
if (!t()) return
|
|
9622
|
+
}, l = async (w, O, S = null, U) => {
|
|
9623
|
+
if (!t()) return S;
|
|
9613
9624
|
try {
|
|
9614
|
-
return await e.getUserFlagValue(w, O,
|
|
9625
|
+
return await e.getUserFlagValue(w, O, S, U);
|
|
9615
9626
|
} catch ($) {
|
|
9616
|
-
return console.error(`Error getting user flag value for ${O}:`, $),
|
|
9627
|
+
return console.error(`Error getting user flag value for ${O}:`, $), S;
|
|
9617
9628
|
}
|
|
9618
|
-
}, y = async (w, O,
|
|
9629
|
+
}, y = async (w, O, S = null, U) => l(`${or}-${w}`, O, S, U), h = () => {
|
|
9619
9630
|
try {
|
|
9620
9631
|
e.reset();
|
|
9621
9632
|
} catch (w) {
|
|
@@ -9676,16 +9687,17 @@ const ql = /* @__PURE__ */ it({
|
|
|
9676
9687
|
export {
|
|
9677
9688
|
Pl as A,
|
|
9678
9689
|
Vl as G,
|
|
9690
|
+
Ua as O,
|
|
9679
9691
|
ic as P,
|
|
9680
9692
|
te as R,
|
|
9681
9693
|
Yl as S,
|
|
9682
|
-
|
|
9694
|
+
Na as U,
|
|
9683
9695
|
sl as _,
|
|
9684
9696
|
nl as a,
|
|
9685
|
-
|
|
9697
|
+
v as b,
|
|
9686
9698
|
bt as c,
|
|
9687
|
-
|
|
9688
|
-
|
|
9699
|
+
Gl as d,
|
|
9700
|
+
yt as e,
|
|
9689
9701
|
El as f,
|
|
9690
9702
|
cc as g,
|
|
9691
9703
|
Ec as h,
|
|
@@ -9695,6 +9707,5 @@ export {
|
|
|
9695
9707
|
Ol as m,
|
|
9696
9708
|
o as n,
|
|
9697
9709
|
Fl as r,
|
|
9698
|
-
Bl as u
|
|
9699
|
-
v
|
|
9710
|
+
Bl as u
|
|
9700
9711
|
};
|