@myparcel-dev/pdk-admin-js 1.14.1 → 1.14.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.
@@ -0,0 +1,4 @@
1
+ import { ab as _sfc_main } from "./index-Dp-JKnen.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import { ac as _sfc_main } from "./index-Dp-JKnen.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import { ad as _sfc_main } from "./index-Dp-JKnen.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import { ae as _sfc_main } from "./index-Dp-JKnen.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import { af as _sfc_main } from "./index-Dp-JKnen.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -1,5 +1,5 @@
1
- import { d as defineComponent, H as useOrderData, c as computed, t as toValue, U as instantiateAction, V as orderViewInBackofficeAction, P as instantiateActions, W as ordersEditAction, X as orderExportAction, 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 _sfc_main$3, Z as Size } from "./index-CIMyA-y2.js";
2
- import { _ as _sfc_main$1, a as _sfc_main$2 } from "./ShipmentLabel.vue_vue_type_script_setup_true_lang-jyif6XLw.js";
1
+ import { d as defineComponent, H as useOrderData, c as computed, t as toValue, U as instantiateAction, V as orderViewInBackofficeAction, P as instantiateActions, W as ordersEditAction, X as orderExportAction, 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 _sfc_main$3, Z as Size } from "./index-Dp-JKnen.js";
2
+ import { _ as _sfc_main$1, a as _sfc_main$2 } from "./ShipmentLabel.vue_vue_type_script_setup_true_lang-LyXmsMB7.js";
3
3
  const _sfc_main = /* @__PURE__ */ defineComponent({
4
4
  __name: "OrderModeOrderListItem",
5
5
  setup(__props) {
@@ -0,0 +1,4 @@
1
+ import { ag as _sfc_main } from "./index-Dp-JKnen.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-CIMyA-y2.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-Dp-JKnen.js";
2
2
  const _sfc_main = /* @__PURE__ */ defineComponent({
3
3
  __name: "PrintOptionsModalForm",
4
4
  setup(__props) {
@@ -0,0 +1,4 @@
1
+ import { ah as _sfc_main } from "./index-Dp-JKnen.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, a3 as useDigitalStampRanges, a4 as isOfType, a5 as _sfc_main$7, a6 as PackageTypeName, a as createBlock, a7 as useFetchCarrier, t as toValue, a8 as _sfc_main$8, M as Fragment, K as createTextVNode, H as useOrderData, h as useAdminConfig, G as normalizeClass, a9 as getDynamicTranslation, n as useQueryStore, p as useShipmentData, v as withCtx, B as _sfc_main$9, C as _sfc_main$a, aa as withModifiers } from "./index-CIMyA-y2.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, a3 as useDigitalStampRanges, a4 as isOfType, a5 as _sfc_main$7, a6 as PackageTypeName, a as createBlock, a7 as useFetchCarrier, t as toValue, a8 as _sfc_main$8, M as Fragment, K as createTextVNode, H as useOrderData, h as useAdminConfig, G as normalizeClass, a9 as getDynamicTranslation, n as useQueryStore, p as useShipmentData, v as withCtx, B as _sfc_main$9, C as _sfc_main$a, aa as withModifiers } from "./index-Dp-JKnen.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, $ as ordersPrintAction, a0 as ordersFetchAction, X as orderExportAction, a1 as ordersExportPrintShipmentsAction, W 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, a2 as TransitionGroup, Z as Size } from "./index-CIMyA-y2.js";
2
- import { _ as _sfc_main$1, a as _sfc_main$2 } from "./ShipmentLabel.vue_vue_type_script_setup_true_lang-jyif6XLw.js";
1
+ import { d as defineComponent, h as useAdminConfig, H as useOrderData, c as computed, t as toValue, $ as ordersPrintAction, a0 as ordersFetchAction, X as orderExportAction, a1 as ordersExportPrintShipmentsAction, W 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, a2 as TransitionGroup, Z as Size } from "./index-Dp-JKnen.js";
2
+ import { _ as _sfc_main$1, a as _sfc_main$2 } from "./ShipmentLabel.vue_vue_type_script_setup_true_lang-LyXmsMB7.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-CIMyA-y2.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-Dp-JKnen.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-CIMyA-y2.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-Dp-JKnen.js";
2
2
  const useBulkSelectCheckbox = (options, emit) => {
3
3
  const selected = ref({});
4
4
  const bulkModel = computed({
@@ -15268,8 +15268,8 @@ const _ = (s, t) => {
15268
15268
  r.length && (s += `?${r.join("&")}`);
15269
15269
  }
15270
15270
  return s;
15271
- }, C = "https://api.myparcel.nl", A = ["POST", "PUT"];
15272
- class k {
15271
+ }, C = "https://api.myparcel.nl", E$1 = ["POST", "PUT"];
15272
+ class A {
15273
15273
  constructor(t) {
15274
15274
  e(this, "interceptors");
15275
15275
  e(this, "baseUrl");
@@ -15302,7 +15302,7 @@ class k {
15302
15302
  return this.getResponseBody(t, i);
15303
15303
  }
15304
15304
  getResponseBody(t, r) {
15305
- if (!u(r, "data"))
15305
+ if (!t.getUseDataEnvelope() || !u(r, "data"))
15306
15306
  return r;
15307
15307
  const a = t.getResponseProperty();
15308
15308
  if (!a)
@@ -15384,7 +15384,7 @@ class k {
15384
15384
  ...t.getParameters()
15385
15385
  },
15386
15386
  headers: {
15387
- ...A.includes(t.method) ? { "Content-Type": "application/json" } : {},
15387
+ ...E$1.includes(t.method) ? { "Content-Type": "application/json" } : {},
15388
15388
  ...this.getHeaders(),
15389
15389
  ...r.headers,
15390
15390
  ...t.getHeaders()
@@ -15394,23 +15394,23 @@ class k {
15394
15394
  const i = t.getProperty();
15395
15395
  if (r.body instanceof FormData)
15396
15396
  return a.body = r.body, delete a.headers["Content-Type"], a;
15397
- i === void 0 ? a.body = {
15397
+ t.getUseDataEnvelope() ? i === void 0 ? a.body = {
15398
15398
  data: r.body
15399
15399
  } : a.body = {
15400
15400
  data: { [i]: r.body }
15401
- };
15401
+ } : a.body = r.body;
15402
15402
  }
15403
15403
  return a;
15404
15404
  }
15405
15405
  }
15406
- const w = (s) => {
15406
+ const k = (s) => {
15407
15407
  try {
15408
15408
  return JSON.parse(s), true;
15409
15409
  } catch {
15410
15410
  return false;
15411
15411
  }
15412
15412
  };
15413
- class H extends k {
15413
+ class H extends A {
15414
15414
  constructor(r) {
15415
15415
  super(r);
15416
15416
  e(this, "request", async (r2, a) => {
@@ -15432,7 +15432,7 @@ class H extends k {
15432
15432
  if ((b = c2.headers.get("Content-Disposition")) != null && b.includes("attachment") || (g = c2.headers.get("Content-Type")) != null && g.includes("application/pdf"))
15433
15433
  return c2.blob();
15434
15434
  const l = await c2.text();
15435
- return (S = c2.headers.get("Content-Type")) != null && S.includes("application/json") && w(l) ? JSON.parse(l) : l;
15435
+ return (S = c2.headers.get("Content-Type")) != null && S.includes("application/json") && k(l) ? JSON.parse(l) : l;
15436
15436
  }
15437
15437
  } finally {
15438
15438
  d && clearTimeout(d);
@@ -15446,6 +15446,7 @@ let x$1 = class x {
15446
15446
  e(this, "property");
15447
15447
  e(this, "responseProperty");
15448
15448
  e(this, "timeout");
15449
+ e(this, "useDataEnvelope", true);
15449
15450
  e(this, "headers");
15450
15451
  e(this, "parameters");
15451
15452
  this.headers = (t == null ? void 0 : t.headers) ?? {}, this.parameters = (t == null ? void 0 : t.parameters) ?? {};
@@ -15468,6 +15469,9 @@ let x$1 = class x {
15468
15469
  getTimeout() {
15469
15470
  return this.timeout;
15470
15471
  }
15472
+ getUseDataEnvelope() {
15473
+ return this.useDataEnvelope;
15474
+ }
15471
15475
  };
15472
15476
  class m extends x$1 {
15473
15477
  }
@@ -15558,6 +15562,7 @@ var PackageTypeName = /* @__PURE__ */ ((PackageTypeName2) => {
15558
15562
  PackageTypeName2["DigitalStamp"] = "digital_stamp";
15559
15563
  PackageTypeName2["Pallet"] = "pallet";
15560
15564
  PackageTypeName2["PackageSmall"] = "package_small";
15565
+ PackageTypeName2["Envelope"] = "envelope";
15561
15566
  return PackageTypeName2;
15562
15567
  })(PackageTypeName || {});
15563
15568
  function createGlobalState(stateFactory) {
@@ -20679,13 +20684,13 @@ const setupAdminApp = (app, appConfig) => {
20679
20684
  app.directive("test", testIdDirective);
20680
20685
  };
20681
20686
  const renderMap = Object.freeze({
20682
- [AdminView.ChildProductSettings]: async () => import("./ChildProductSettings-rOdhioOc.js"),
20683
- [AdminView.Modals]: async () => import("./Modals-C8V_zTNK.js"),
20684
- [AdminView.Notifications]: async () => import("./Notifications-Bax2ygnw.js"),
20685
- [AdminView.OrderBox]: async () => import("./OrderBox-B901YmGC.js"),
20686
- [AdminView.OrderListItem]: async () => import("./OrderListItem-CvN_Uz7u.js"),
20687
- [AdminView.PluginSettings]: async () => import("./PluginSettings-FphY6rec.js"),
20688
- [AdminView.ProductSettings]: async () => import("./ProductSettings-COt7oF2i.js")
20687
+ [AdminView.ChildProductSettings]: async () => import("./ChildProductSettings-BPyPkZXH.js"),
20688
+ [AdminView.Modals]: async () => import("./Modals-9_68MyUT.js"),
20689
+ [AdminView.Notifications]: async () => import("./Notifications-D9VEVf0q.js"),
20690
+ [AdminView.OrderBox]: async () => import("./OrderBox-DZEddeXm.js"),
20691
+ [AdminView.OrderListItem]: async () => import("./OrderListItem-SuUMLy47.js"),
20692
+ [AdminView.PluginSettings]: async () => import("./PluginSettings-BCJWQyay.js"),
20693
+ [AdminView.ProductSettings]: async () => import("./ProductSettings-BQXxM91a.js")
20689
20694
  });
20690
20695
  const renderViewComponent = async (componentName) => {
20691
20696
  const renderMethod = renderMap[componentName];
@@ -22837,7 +22842,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
22837
22842
  const _sfc_main$e = /* @__PURE__ */ defineComponent({
22838
22843
  __name: "ShipmentOptionsModal",
22839
22844
  setup(__props) {
22840
- const ShipmentOptionsModalForm = /* @__PURE__ */ defineAsyncComponent(() => import("./ShipmentOptionsModalForm-ME-oncii.js"));
22845
+ const ShipmentOptionsModalForm = /* @__PURE__ */ defineAsyncComponent(() => import("./ShipmentOptionsModalForm-BJLbTAxc.js"));
22841
22846
  const pluginSettings = usePluginSettings();
22842
22847
  const { orderMode } = pluginSettings.order;
22843
22848
  const ordersData = computed(() => useOrdersData());
@@ -22875,7 +22880,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
22875
22880
  __name: "PrintOptionsModal",
22876
22881
  setup(__props) {
22877
22882
  const modalKey = AdminModalKey.PrintOptions;
22878
- const PrintOptionsModalForm = /* @__PURE__ */ defineAsyncComponent(() => import("./PrintOptionsModalForm-f7Ze8uNa.js"));
22883
+ const PrintOptionsModalForm = /* @__PURE__ */ defineAsyncComponent(() => import("./PrintOptionsModalForm-mNOwCJGu.js"));
22879
22884
  const actionStore = useActionStore();
22880
22885
  actionStore.register(modalSubmitFormAction);
22881
22886
  const actions = instantiateActions([modalCloseAction, modalSubmitFormAction]);
@@ -23004,7 +23009,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23004
23009
  const _sfc_main$9 = /* @__PURE__ */ defineComponent({
23005
23010
  __name: "OrderBox",
23006
23011
  setup(__props) {
23007
- const ShipmentTableBox = /* @__PURE__ */ defineAsyncComponent(() => import("./ShipmentTableBox-C0q9qBg1.js"));
23012
+ const ShipmentTableBox = /* @__PURE__ */ defineAsyncComponent(() => import("./ShipmentTableBox-DHjYGaMy.js"));
23008
23013
  const queryStore = useQueryStore();
23009
23014
  queryStore.registerContextQueries();
23010
23015
  queryStore.registerOrderQueries();
@@ -23046,10 +23051,10 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
23046
23051
  __name: "OrderListItem",
23047
23052
  setup(__props) {
23048
23053
  const OrderModeOrderListItem = /* @__PURE__ */ defineAsyncComponent(() => {
23049
- return import("./OrderModeOrderListItem-DdktQjCM.js");
23054
+ return import("./OrderModeOrderListItem-Df7qzieL.js");
23050
23055
  });
23051
23056
  const ShipmentModeOrderListItem = /* @__PURE__ */ defineAsyncComponent(() => {
23052
- return import("./ShipmentModeOrderListItem-Ca1M2iy0.js");
23057
+ return import("./ShipmentModeOrderListItem-1Fj_y2ET.js");
23053
23058
  });
23054
23059
  const queryStore = useQueryStore();
23055
23060
  queryStore.registerContextQueries();
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Y, ap, aq, cs, S, ar, A, as, ct, J, ab, az, aA, aB, aC, aD, aE, aF, aG, aH, aJ, cu, aN, aO, aP, ac, at, ai, ad, cm, cn, a5, aR, aj, ag, ah, bI, bJ, ak, al, B, _, C, Z, cr, cp, am, cl, an, ao, cq, co, au, aT, aV, c5, aW, c6, c7, aS, aU, c8, c9, bM, bP, ca, bS, cb, cc, cd, ce, cf, bQ, bR, aX, aQ, bV, bW, ci, av, aw, ax, X, bX, V, W, a1, a0, $, bY, bZ, aY, bO, ay, aI, cg, cj, ch, R, c0, b_, c1, b$, bT, bU, bN, aZ, h, b0, b1, bD, bo, by, bE, bq, b2, b3, b3 as b32, aK, b4, b5, bt, bz, bF, bG, bH, bK, bL, aL, aM, b6, b7, b8, b9, I, ba, bb, bc, bd, a_, be, a$, H, u, bC, bu, bA, bf, n, bg, bh, bi, bj, br, bs, bk, bl, bm, bp, bv, bw, bx, bB, bn, ck, c3, c4, c2 } from "./index-CIMyA-y2.js";
1
+ import { Y, ap, aq, cs, S, ar, A, as, ct, J, ab, az, aA, aB, aC, aD, aE, aF, aG, aH, aJ, cu, aN, aO, aP, ac, at, ai, ad, cm, cn, a5, aR, aj, ag, ah, bI, bJ, ak, al, B, _, C, Z, cr, cp, am, cl, an, ao, cq, co, au, aT, aV, c5, aW, c6, c7, aS, aU, c8, c9, bM, bP, ca, bS, cb, cc, cd, ce, cf, bQ, bR, aX, aQ, bV, bW, ci, av, aw, ax, X, bX, V, W, a1, a0, $, bY, bZ, aY, bO, ay, aI, cg, cj, ch, R, c0, b_, c1, b$, bT, bU, bN, aZ, h, b0, b1, bD, bo, by, bE, bq, b2, b3, b3 as b32, aK, b4, b5, bt, bz, bF, bG, bH, bK, bL, aL, aM, b6, b7, b8, b9, I, ba, bb, bc, bd, a_, be, a$, H, u, bC, bu, bA, bf, n, bg, bh, bi, bj, br, bs, bk, bl, bm, bp, bv, bw, bx, bB, bn, ck, c3, c4, c2 } from "./index-Dp-JKnen.js";
2
2
  export {
3
3
  Y as ActionButton,
4
4
  ap as AdminAction,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myparcel-dev/pdk-admin-js",
3
- "version": "1.14.1",
3
+ "version": "1.14.2",
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": "^1.14.1"
32
+ "@myparcel-dev/pdk-admin": "^1.14.2"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@myparcel-dev/pdk-build-vite": "1.0.0-alpha.0",
@@ -1,4 +0,0 @@
1
- import { ab as _sfc_main } from "./index-CIMyA-y2.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- import { ac as _sfc_main } from "./index-CIMyA-y2.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- import { ad as _sfc_main } from "./index-CIMyA-y2.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- import { ae as _sfc_main } from "./index-CIMyA-y2.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- import { af as _sfc_main } from "./index-CIMyA-y2.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- import { ag as _sfc_main } from "./index-CIMyA-y2.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- import { ah as _sfc_main } from "./index-CIMyA-y2.js";
2
- export {
3
- _sfc_main as default
4
- };