@myparcel-dev/pdk-admin-js 2.2.3 → 2.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ import { ae as _sfc_main } from "./index-BCHGsSUm.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import { af as _sfc_main } from "./index-BCHGsSUm.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import { ag as _sfc_main } from "./index-BCHGsSUm.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import { ah as _sfc_main } from "./index-BCHGsSUm.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import { ai as _sfc_main } from "./index-BCHGsSUm.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -1,5 +1,5 @@
1
- import { d as defineComponent, H as useOrderData, U as useOrderMode, c as computed, t as toValue, V as instantiateAction, W as orderViewInBackofficeAction, P as instantiateActions, X as LIST_ITEM_MODE_ACTIONS, s as resolveComponent, o as openBlock, L as createElementBlock, a as createBlock, b as unref, e as createCommentVNode, M as Fragment, O as renderList, y as createVNode, v as withCtx, Y as OrderMode, Z as _sfc_main$3, $ as Size } from "./index-ewBfyySn.js";
2
- import { _ as _sfc_main$1, a as _sfc_main$2 } from "./ShipmentLabel.vue_vue_type_script_setup_true_lang-Dx2lRHZw.js";
1
+ import { d as defineComponent, H as useOrderData, U as useOrderMode, c as computed, t as toValue, V as instantiateAction, W as orderViewInBackofficeAction, P as instantiateActions, X as LIST_ITEM_MODE_ACTIONS, s as resolveComponent, o as openBlock, L as createElementBlock, a as createBlock, b as unref, e as createCommentVNode, M as Fragment, O as renderList, y as createVNode, v as withCtx, Y as OrderMode, Z as _sfc_main$3, $ as Size } from "./index-BCHGsSUm.js";
2
+ import { _ as _sfc_main$1, a as _sfc_main$2 } from "./ShipmentLabel.vue_vue_type_script_setup_true_lang-Cpk2IaBC.js";
3
3
  const _sfc_main = /* @__PURE__ */ defineComponent({
4
4
  __name: "OrderModeOrderListItem",
5
5
  setup(__props) {
@@ -0,0 +1,4 @@
1
+ import { aj as _sfc_main } from "./index-BCHGsSUm.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -1,4 +1,4 @@
1
- import { d as defineComponent, f as useContext, g as usePluginSettings, h as useAdminConfig, r as ref, i as onMounted, m as markRaw, N as Ne, A as AdminModalKey, j as generateFormFields, o as openBlock, a as createBlock, b as unref, x as xe, e as createCommentVNode } from "./index-ewBfyySn.js";
1
+ import { d as defineComponent, f as useContext, g as usePluginSettings, h as useAdminConfig, r as ref, i as onMounted, m as markRaw, N as Ne, A as AdminModalKey, j as generateFormFields, o as openBlock, a as createBlock, b as unref, x as xe, e as createCommentVNode } from "./index-BCHGsSUm.js";
2
2
  const _sfc_main = /* @__PURE__ */ defineComponent({
3
3
  __name: "PrintOptionsModalForm",
4
4
  setup(__props) {
@@ -0,0 +1,4 @@
1
+ import { ak as _sfc_main } from "./index-BCHGsSUm.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -1,4 +1,4 @@
1
- import { d as defineComponent, l as useLocalizedFormatter, c as computed, F as Format, o as openBlock, L as createElementBlock, E as toDisplayString, I as useLanguage, s as resolveComponent, y as createVNode, D as createBaseVNode, b as unref, e as createCommentVNode, k as toRefs, a6 as useDigitalStampRanges, a7 as isOfType, a8 as _sfc_main$7, a9 as PackageTypeName, a as createBlock, aa as useFetchCarrier, t as toValue, ab as _sfc_main$8, M as Fragment, K as createTextVNode, H as useOrderData, h as useAdminConfig, G as normalizeClass, ac as getDynamicTranslation, n as useQueryStore, p as useShipmentData, v as withCtx, B as _sfc_main$9, C as _sfc_main$a, ad as withModifiers } from "./index-ewBfyySn.js";
1
+ import { d as defineComponent, l as useLocalizedFormatter, c as computed, F as Format, o as openBlock, L as createElementBlock, E as toDisplayString, I as useLanguage, s as resolveComponent, y as createVNode, D as createBaseVNode, b as unref, e as createCommentVNode, k as toRefs, a6 as useDigitalStampRanges, a7 as isOfType, a8 as _sfc_main$7, a9 as PackageTypeName, a as createBlock, aa as useFetchCarrier, t as toValue, ab as _sfc_main$8, M as Fragment, K as createTextVNode, H as useOrderData, h as useAdminConfig, G as normalizeClass, ac as getDynamicTranslation, n as useQueryStore, p as useShipmentData, v as withCtx, B as _sfc_main$9, C as _sfc_main$a, ad as withModifiers } from "./index-BCHGsSUm.js";
2
2
  const _hoisted_1$4 = ["title", "textContent"];
3
3
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
4
4
  __name: "DateRelative",
@@ -1,5 +1,5 @@
1
- import { d as defineComponent, h as useAdminConfig, H as useOrderData, c as computed, t as toValue, a0 as ordersPrintAction, a1 as ordersFetchAction, a2 as orderExportAction, a3 as ordersExportPrintShipmentsAction, a4 as ordersEditAction, P as instantiateActions, s as resolveComponent, o as openBlock, L as createElementBlock, a as createBlock, b as unref, e as createCommentVNode, y as createVNode, v as withCtx, M as Fragment, O as renderList, a5 as TransitionGroup, $ as Size } from "./index-ewBfyySn.js";
2
- import { _ as _sfc_main$1, a as _sfc_main$2 } from "./ShipmentLabel.vue_vue_type_script_setup_true_lang-Dx2lRHZw.js";
1
+ import { d as defineComponent, h as useAdminConfig, H as useOrderData, c as computed, t as toValue, a0 as ordersPrintAction, a1 as ordersFetchAction, a2 as orderExportAction, a3 as ordersExportPrintShipmentsAction, a4 as ordersEditAction, P as instantiateActions, s as resolveComponent, o as openBlock, L as createElementBlock, a as createBlock, b as unref, e as createCommentVNode, y as createVNode, v as withCtx, M as Fragment, O as renderList, a5 as TransitionGroup, $ as Size } from "./index-BCHGsSUm.js";
2
+ import { _ as _sfc_main$1, a as _sfc_main$2 } from "./ShipmentLabel.vue_vue_type_script_setup_true_lang-Cpk2IaBC.js";
3
3
  const _sfc_main = /* @__PURE__ */ defineComponent({
4
4
  __name: "ShipmentModeOrderListItem",
5
5
  setup(__props) {
@@ -1,4 +1,4 @@
1
- import { d as defineComponent, c as computed, u as useOrdersData, t as toValue, o as openBlock, a as createBlock, b as unref, _ as _sfc_main$1, e as createCommentVNode } from "./index-ewBfyySn.js";
1
+ import { d as defineComponent, c as computed, u as useOrdersData, t as toValue, o as openBlock, a as createBlock, b as unref, _ as _sfc_main$1, e as createCommentVNode } from "./index-BCHGsSUm.js";
2
2
  const _sfc_main = /* @__PURE__ */ defineComponent({
3
3
  __name: "ShipmentOptionsModalForm",
4
4
  props: {
@@ -1,4 +1,4 @@
1
- import { r as ref, c as computed, w as watch, d as defineComponent, k as toRefs, h as useAdminConfig, l as useLocalizedFormatter, n as useQueryStore, p as useShipmentData, q as useVModel, F as Format, s as resolveComponent, o as openBlock, a as createBlock, v as withCtx, y as createVNode, b as unref, z as isRef, B as _sfc_main$3, C as _sfc_main$4, D as createBaseVNode, E as toDisplayString, G as normalizeClass, H as useOrderData, t as toValue, I as useLanguage, J as _sfc_main$5, K as createTextVNode, L as createElementBlock, M as Fragment, O as renderList, P as instantiateActions, Q as toRaw, R as shipmentActions, S as AdminIcon, e as createCommentVNode, T as isDef } from "./index-ewBfyySn.js";
1
+ import { r as ref, c as computed, w as watch, d as defineComponent, k as toRefs, h as useAdminConfig, l as useLocalizedFormatter, n as useQueryStore, p as useShipmentData, q as useVModel, F as Format, s as resolveComponent, o as openBlock, a as createBlock, v as withCtx, y as createVNode, b as unref, z as isRef, B as _sfc_main$3, C as _sfc_main$4, D as createBaseVNode, E as toDisplayString, G as normalizeClass, H as useOrderData, t as toValue, I as useLanguage, J as _sfc_main$5, K as createTextVNode, L as createElementBlock, M as Fragment, O as renderList, P as instantiateActions, Q as toRaw, R as shipmentActions, S as AdminIcon, e as createCommentVNode, T as isDef } from "./index-BCHGsSUm.js";
2
2
  const useBulkSelectCheckbox = (options, emit) => {
3
3
  const selected = ref({});
4
4
  const bulkModel = computed({
@@ -21250,13 +21250,13 @@ const setupAdminApp = (app, appConfig) => {
21250
21250
  app.directive("test", testIdDirective);
21251
21251
  };
21252
21252
  const renderMap = Object.freeze({
21253
- [AdminView.ChildProductSettings]: async () => import("./ChildProductSettings-DO_cBxCy.js"),
21254
- [AdminView.Modals]: async () => import("./Modals-Bx4myhyo.js"),
21255
- [AdminView.Notifications]: async () => import("./Notifications-D1VM9y_y.js"),
21256
- [AdminView.OrderBox]: async () => import("./OrderBox-CytLxlDV.js"),
21257
- [AdminView.OrderListItem]: async () => import("./OrderListItem-9p_WSyc9.js"),
21258
- [AdminView.PluginSettings]: async () => import("./PluginSettings-BvEf33_D.js"),
21259
- [AdminView.ProductSettings]: async () => import("./ProductSettings-CSKyECD_.js")
21253
+ [AdminView.ChildProductSettings]: async () => import("./ChildProductSettings-CWdldjU8.js"),
21254
+ [AdminView.Modals]: async () => import("./Modals-CqhfaUfv.js"),
21255
+ [AdminView.Notifications]: async () => import("./Notifications-BsEoAoXb.js"),
21256
+ [AdminView.OrderBox]: async () => import("./OrderBox-Bn8AcI8b.js"),
21257
+ [AdminView.OrderListItem]: async () => import("./OrderListItem-DT_77Xo3.js"),
21258
+ [AdminView.PluginSettings]: async () => import("./PluginSettings-6qK6JuXL.js"),
21259
+ [AdminView.ProductSettings]: async () => import("./ProductSettings-D5kTD7jw.js")
21260
21260
  });
21261
21261
  const renderViewComponent = async (componentName) => {
21262
21262
  const renderMethod = renderMap[componentName];
@@ -23204,23 +23204,32 @@ const waitForLabelPrompt = ({
23204
23204
  const formBuilder = ne();
23205
23205
  const modalStore = useModalStore();
23206
23206
  return new Promise((resolve2, reject) => {
23207
- formBuilder.on("afterRegister", (form) => {
23208
- modalStore.context ?? (modalStore.context = {});
23209
- modalStore.context.form = markRaw(form);
23210
- if (form.name !== AdminModalKey.PrintOptions) {
23211
- return;
23212
- }
23213
- form.on(c.AfterSubmit, (instance) => {
23214
- resolve2({
23215
- ...parameters,
23216
- ...instance.getValues()
23217
- });
23218
- });
23219
- });
23207
+ const onAfterSubmit = (form) => {
23208
+ stopWatching();
23209
+ form.off(c.AfterSubmit, onAfterSubmit);
23210
+ resolve2({ ...parameters, ...form.getValues() });
23211
+ };
23212
+ modalStore.open(AdminModalKey.PrintOptions);
23213
+ const stopWatching = watch(
23214
+ () => formBuilder.getForm(AdminModalKey.PrintOptions),
23215
+ (form) => {
23216
+ if (!form) {
23217
+ return;
23218
+ }
23219
+ modalStore.context ?? (modalStore.context = {});
23220
+ modalStore.context.form = markRaw(form);
23221
+ form.on(c.AfterSubmit, onAfterSubmit);
23222
+ },
23223
+ // Immediate, because a modal that reuses its form already has one by the time we get
23224
+ // here, and the watcher would never fire for it.
23225
+ { immediate: true }
23226
+ );
23220
23227
  modalStore.onClose(() => {
23228
+ var _a;
23229
+ stopWatching();
23230
+ (_a = formBuilder.getForm(AdminModalKey.PrintOptions)) == null ? void 0 : _a.off(c.AfterSubmit, onAfterSubmit);
23221
23231
  reject(new StopActionHandler());
23222
23232
  });
23223
- modalStore.open(AdminModalKey.PrintOptions);
23224
23233
  });
23225
23234
  };
23226
23235
  const resolvePrintParameters = (context) => {
@@ -23482,7 +23491,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
23482
23491
  const _sfc_main$e = /* @__PURE__ */ defineComponent({
23483
23492
  __name: "ShipmentOptionsModal",
23484
23493
  setup(__props) {
23485
- const ShipmentOptionsModalForm = /* @__PURE__ */ defineAsyncComponent(() => import("./ShipmentOptionsModalForm-CKpQtW3_.js"));
23494
+ const ShipmentOptionsModalForm = /* @__PURE__ */ defineAsyncComponent(() => import("./ShipmentOptionsModalForm-cj7Pa1yh.js"));
23486
23495
  const orderMode = useOrderMode();
23487
23496
  const ordersData = computed(() => useOrdersData());
23488
23497
  const orderIds = computed(() => toValue$1(ordersData).map((data) => {
@@ -23514,7 +23523,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
23514
23523
  __name: "PrintOptionsModal",
23515
23524
  setup(__props) {
23516
23525
  const modalKey = AdminModalKey.PrintOptions;
23517
- const PrintOptionsModalForm = /* @__PURE__ */ defineAsyncComponent(() => import("./PrintOptionsModalForm-CkE6AgbO.js"));
23526
+ const PrintOptionsModalForm = /* @__PURE__ */ defineAsyncComponent(() => import("./PrintOptionsModalForm-BhshAOse.js"));
23518
23527
  const actionStore = useActionStore();
23519
23528
  actionStore.register(modalSubmitFormAction);
23520
23529
  const actions = instantiateActions([modalCloseAction, modalSubmitFormAction]);
@@ -23638,7 +23647,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23638
23647
  const _sfc_main$9 = /* @__PURE__ */ defineComponent({
23639
23648
  __name: "OrderBox",
23640
23649
  setup(__props) {
23641
- const ShipmentTableBox = /* @__PURE__ */ defineAsyncComponent(() => import("./ShipmentTableBox-ENqR5D-s.js"));
23650
+ const ShipmentTableBox = /* @__PURE__ */ defineAsyncComponent(() => import("./ShipmentTableBox-PwR7YMws.js"));
23642
23651
  const queryStore = useQueryStore();
23643
23652
  queryStore.registerContextQueries();
23644
23653
  queryStore.registerOrderQueries();
@@ -23679,10 +23688,10 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
23679
23688
  __name: "OrderListItem",
23680
23689
  setup(__props) {
23681
23690
  const OrderModeOrderListItem = /* @__PURE__ */ defineAsyncComponent(() => {
23682
- return import("./OrderModeOrderListItem-B2gCrfq5.js");
23691
+ return import("./OrderModeOrderListItem-BrBhUyyu.js");
23683
23692
  });
23684
23693
  const ShipmentModeOrderListItem = /* @__PURE__ */ defineAsyncComponent(() => {
23685
- return import("./ShipmentModeOrderListItem-BnxZ-r5D.js");
23694
+ return import("./ShipmentModeOrderListItem-wtNZ_vd8.js");
23686
23695
  });
23687
23696
  const queryStore = useQueryStore();
23688
23697
  queryStore.registerContextQueries();
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Z, as, at, cz, S, au, A, av, cn, cA, J, ae, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aM, cB, aQ, aR, X, aS, co, af, aw, al, ag, c0, ct, cu, Y, a8, aU, am, aj, ak, bL, bM, an, ao, cm, B, _, C, $, cy, cw, ap, cs, aq, ar, cx, cv, ax, aW, aY, c9, aZ, ca, cb, aV, aX, cc, cd, bP, bS, ce, bV, cf, cg, ch, ci, cj, bT, bU, a_, aT, bY, bZ, cp, ay, az, aA, a2, b_, W, a4, a3, a1, a0, b$, c1, a$, bR, aB, aL, ck, cq, cl, R, c4, c2, c5, c3, bW, bX, bQ, b0, h, b3, b4, bG, br, bB, bH, bt, b5, b6, b6 as b62, aN, b7, b8, bw, bC, bI, bJ, bK, bN, bO, aO, aP, b9, ba, bb, bc, I, bd, be, bf, bg, b1, bh, b2, H, U, u, bF, bx, bD, bi, n, bj, bk, bl, bm, bu, bv, bn, bo, bp, bs, by, bz, bA, bE, bq, cr, c7, c8, c6 } from "./index-ewBfyySn.js";
1
+ import { Z, as, at, cz, S, au, A, av, cn, cA, J, ae, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aM, cB, aQ, aR, X, aS, co, af, aw, al, ag, c0, ct, cu, Y, a8, aU, am, aj, ak, bL, bM, an, ao, cm, B, _, C, $, cy, cw, ap, cs, aq, ar, cx, cv, ax, aW, aY, c9, aZ, ca, cb, aV, aX, cc, cd, bP, bS, ce, bV, cf, cg, ch, ci, cj, bT, bU, a_, aT, bY, bZ, cp, ay, az, aA, a2, b_, W, a4, a3, a1, a0, b$, c1, a$, bR, aB, aL, ck, cq, cl, R, c4, c2, c5, c3, bW, bX, bQ, b0, h, b3, b4, bG, br, bB, bH, bt, b5, b6, b6 as b62, aN, b7, b8, bw, bC, bI, bJ, bK, bN, bO, aO, aP, b9, ba, bb, bc, I, bd, be, bf, bg, b1, bh, b2, H, U, u, bF, bx, bD, bi, n, bj, bk, bl, bm, bu, bv, bn, bo, bp, bs, by, bz, bA, bE, bq, cr, c7, c8, c6 } from "./index-BCHGsSUm.js";
2
2
  export {
3
3
  Z as ActionButton,
4
4
  as as AdminAction,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myparcel-dev/pdk-admin-js",
3
- "version": "2.2.3",
3
+ "version": "2.2.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/myparcelnl/js-pdk.git",
@@ -29,7 +29,7 @@
29
29
  "test:update": "run ws:test:update \"$(pwd)\""
30
30
  },
31
31
  "dependencies": {
32
- "@myparcel-dev/pdk-admin": "^2.2.3"
32
+ "@myparcel-dev/pdk-admin": "^2.2.4"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@myparcel-dev/pdk-build-vite": "1.0.0-alpha.0",
@@ -1,4 +0,0 @@
1
- import { ae as _sfc_main } from "./index-ewBfyySn.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- import { af as _sfc_main } from "./index-ewBfyySn.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- import { ag as _sfc_main } from "./index-ewBfyySn.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- import { ah as _sfc_main } from "./index-ewBfyySn.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- import { ai as _sfc_main } from "./index-ewBfyySn.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- import { aj as _sfc_main } from "./index-ewBfyySn.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- import { ak as _sfc_main } from "./index-ewBfyySn.js";
2
- export {
3
- _sfc_main as default
4
- };