@myparcel-dev/pdk-admin-js 2.1.0 → 2.2.0

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-BA37Jyqh.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import { af as _sfc_main } from "./index-BA37Jyqh.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import { ag as _sfc_main } from "./index-BA37Jyqh.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import { ah as _sfc_main } from "./index-BA37Jyqh.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import { ai as _sfc_main } from "./index-BA37Jyqh.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-CwKPv7Cc.js";
2
- import { _ as _sfc_main$1, a as _sfc_main$2 } from "./ShipmentLabel.vue_vue_type_script_setup_true_lang-CLnMQblC.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-BA37Jyqh.js";
2
+ import { _ as _sfc_main$1, a as _sfc_main$2 } from "./ShipmentLabel.vue_vue_type_script_setup_true_lang-CVwm9DCC.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-BA37Jyqh.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-CwKPv7Cc.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-BA37Jyqh.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-BA37Jyqh.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-CwKPv7Cc.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-BA37Jyqh.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-CwKPv7Cc.js";
2
- import { _ as _sfc_main$1, a as _sfc_main$2 } from "./ShipmentLabel.vue_vue_type_script_setup_true_lang-CLnMQblC.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-BA37Jyqh.js";
2
+ import { _ as _sfc_main$1, a as _sfc_main$2 } from "./ShipmentLabel.vue_vue_type_script_setup_true_lang-CVwm9DCC.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-CwKPv7Cc.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-BA37Jyqh.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-CwKPv7Cc.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-BA37Jyqh.js";
2
2
  const useBulkSelectCheckbox = (options, emit) => {
3
3
  const selected = ref({});
4
4
  const bulkModel = computed({
@@ -19910,6 +19910,9 @@ const LABEL_AMOUNT = "labelAmount";
19910
19910
  const PACKAGE_TYPE = "packageType";
19911
19911
  const DELIVERY_TYPE = "deliveryType";
19912
19912
  const MANUAL_WEIGHT = "manualWeight";
19913
+ const LENGTH = "length";
19914
+ const WIDTH = "width";
19915
+ const HEIGHT = "height";
19913
19916
  const PROP_OPTIONS = "options";
19914
19917
  const KEY_DESCRIPTION = "description";
19915
19918
  const KEY_SUBTEXT = "subtext";
@@ -19918,6 +19921,9 @@ const FIELD_LABEL_AMOUNT = `${DELIVERY_OPTIONS_PREFIX}.${LABEL_AMOUNT}`;
19918
19921
  const FIELD_PACKAGE_TYPE = `${DELIVERY_OPTIONS_PREFIX}.${PACKAGE_TYPE}`;
19919
19922
  const FIELD_DELIVERY_TYPE = `${DELIVERY_OPTIONS_PREFIX}.${DELIVERY_TYPE}`;
19920
19923
  const FIELD_MANUAL_WEIGHT = `${PHYSICAL_PROPERTIES_PREFIX}.${MANUAL_WEIGHT}`;
19924
+ const FIELD_LENGTH = `${PHYSICAL_PROPERTIES_PREFIX}.${LENGTH}`;
19925
+ const FIELD_WIDTH = `${PHYSICAL_PROPERTIES_PREFIX}.${WIDTH}`;
19926
+ const FIELD_HEIGHT = `${PHYSICAL_PROPERTIES_PREFIX}.${HEIGHT}`;
19921
19927
  const FIELD_SHIPMENT_OPTIONS_PREFIX = `${DELIVERY_OPTIONS_PREFIX}.${SHIPMENT_OPTIONS}`;
19922
19928
  const resolveOrderInput = (form, order) => {
19923
19929
  var _a, _b, _c;
@@ -20347,6 +20353,20 @@ const createDigitalStampRangeField = (refs, order) => {
20347
20353
  }
20348
20354
  });
20349
20355
  };
20356
+ const DIMENSION_FIELDS = [
20357
+ [FIELD_LENGTH, "length_in_cm"],
20358
+ [FIELD_WIDTH, "width_in_cm"],
20359
+ [FIELD_HEIGHT, "height_in_cm"]
20360
+ ];
20361
+ const createDimensionFields = (refs) => DIMENSION_FIELDS.map(
20362
+ ([name, label]) => defineFormField({
20363
+ name,
20364
+ label,
20365
+ ref: createRef(refs, name),
20366
+ component: resolveFormComponent(AdminComponent.NumberInput),
20367
+ attributes: { min: 0 }
20368
+ })
20369
+ );
20350
20370
  const createInsuranceField = (refs, fieldName) => {
20351
20371
  const formatter = useLocalizedFormatter();
20352
20372
  const capabilities = useFormCapabilities();
@@ -20440,6 +20460,9 @@ const buildDynamicRefs = (order, optionKeys) => {
20440
20460
  refs[FIELD_PACKAGE_TYPE] = get(order, FIELD_PACKAGE_TYPE);
20441
20461
  refs[FIELD_DELIVERY_TYPE] = get(order, FIELD_DELIVERY_TYPE);
20442
20462
  refs[FIELD_MANUAL_WEIGHT] = get(order, FIELD_MANUAL_WEIGHT);
20463
+ refs[FIELD_LENGTH] = get(order, FIELD_LENGTH);
20464
+ refs[FIELD_WIDTH] = get(order, FIELD_WIDTH);
20465
+ refs[FIELD_HEIGHT] = get(order, FIELD_HEIGHT);
20443
20466
  for (const key of optionKeys) {
20444
20467
  const fieldName = `${FIELD_SHIPMENT_OPTIONS_PREFIX}.${key}`;
20445
20468
  refs[fieldName] = get(order, fieldName);
@@ -20452,7 +20475,8 @@ const createShipmentOptionsFields = (refs, order, optionKeys) => {
20452
20475
  createPackageTypeField(refs),
20453
20476
  createDeliveryTypeField(refs),
20454
20477
  createLabelAmountField(refs),
20455
- createDigitalStampRangeField(refs, order)
20478
+ createDigitalStampRangeField(refs, order),
20479
+ ...createDimensionFields(refs)
20456
20480
  ];
20457
20481
  const dynamicFields = optionKeys.map((key) => {
20458
20482
  const fieldName = `${FIELD_SHIPMENT_OPTIONS_PREFIX}.${key}`;
@@ -21226,13 +21250,13 @@ const setupAdminApp = (app, appConfig) => {
21226
21250
  app.directive("test", testIdDirective);
21227
21251
  };
21228
21252
  const renderMap = Object.freeze({
21229
- [AdminView.ChildProductSettings]: async () => import("./ChildProductSettings-CyKUVRaK.js"),
21230
- [AdminView.Modals]: async () => import("./Modals-NMhNPPic.js"),
21231
- [AdminView.Notifications]: async () => import("./Notifications-CEr-hfp0.js"),
21232
- [AdminView.OrderBox]: async () => import("./OrderBox-BeswqlPq.js"),
21233
- [AdminView.OrderListItem]: async () => import("./OrderListItem-DZBgN8DK.js"),
21234
- [AdminView.PluginSettings]: async () => import("./PluginSettings-BDBzENE7.js"),
21235
- [AdminView.ProductSettings]: async () => import("./ProductSettings-B5kBwk1B.js")
21253
+ [AdminView.ChildProductSettings]: async () => import("./ChildProductSettings-BuHi6Qtg.js"),
21254
+ [AdminView.Modals]: async () => import("./Modals-jUqEo5zC.js"),
21255
+ [AdminView.Notifications]: async () => import("./Notifications-DxHJCM3w.js"),
21256
+ [AdminView.OrderBox]: async () => import("./OrderBox-D7oI1aGH.js"),
21257
+ [AdminView.OrderListItem]: async () => import("./OrderListItem-73T1SMad.js"),
21258
+ [AdminView.PluginSettings]: async () => import("./PluginSettings-O6FZ_RPg.js"),
21259
+ [AdminView.ProductSettings]: async () => import("./ProductSettings-DseaZLeS.js")
21236
21260
  });
21237
21261
  const renderViewComponent = async (componentName) => {
21238
21262
  const renderMethod = renderMap[componentName];
@@ -23445,7 +23469,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
23445
23469
  const _sfc_main$e = /* @__PURE__ */ defineComponent({
23446
23470
  __name: "ShipmentOptionsModal",
23447
23471
  setup(__props) {
23448
- const ShipmentOptionsModalForm = /* @__PURE__ */ defineAsyncComponent(() => import("./ShipmentOptionsModalForm-BHKttVyQ.js"));
23472
+ const ShipmentOptionsModalForm = /* @__PURE__ */ defineAsyncComponent(() => import("./ShipmentOptionsModalForm-CFkr_En_.js"));
23449
23473
  const orderMode = useOrderMode();
23450
23474
  const ordersData = computed(() => useOrdersData());
23451
23475
  const orderIds = computed(() => toValue$1(ordersData).map((data) => {
@@ -23477,7 +23501,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
23477
23501
  __name: "PrintOptionsModal",
23478
23502
  setup(__props) {
23479
23503
  const modalKey = AdminModalKey.PrintOptions;
23480
- const PrintOptionsModalForm = /* @__PURE__ */ defineAsyncComponent(() => import("./PrintOptionsModalForm-Coh6mRx1.js"));
23504
+ const PrintOptionsModalForm = /* @__PURE__ */ defineAsyncComponent(() => import("./PrintOptionsModalForm-CPzlNB6P.js"));
23481
23505
  const actionStore = useActionStore();
23482
23506
  actionStore.register(modalSubmitFormAction);
23483
23507
  const actions = instantiateActions([modalCloseAction, modalSubmitFormAction]);
@@ -23601,7 +23625,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23601
23625
  const _sfc_main$9 = /* @__PURE__ */ defineComponent({
23602
23626
  __name: "OrderBox",
23603
23627
  setup(__props) {
23604
- const ShipmentTableBox = /* @__PURE__ */ defineAsyncComponent(() => import("./ShipmentTableBox-DskzPlmr.js"));
23628
+ const ShipmentTableBox = /* @__PURE__ */ defineAsyncComponent(() => import("./ShipmentTableBox-CKN2HkjR.js"));
23605
23629
  const queryStore = useQueryStore();
23606
23630
  queryStore.registerContextQueries();
23607
23631
  queryStore.registerOrderQueries();
@@ -23642,10 +23666,10 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
23642
23666
  __name: "OrderListItem",
23643
23667
  setup(__props) {
23644
23668
  const OrderModeOrderListItem = /* @__PURE__ */ defineAsyncComponent(() => {
23645
- return import("./OrderModeOrderListItem-DXF6TEy-.js");
23669
+ return import("./OrderModeOrderListItem-BC8ujqnV.js");
23646
23670
  });
23647
23671
  const ShipmentModeOrderListItem = /* @__PURE__ */ defineAsyncComponent(() => {
23648
- return import("./ShipmentModeOrderListItem-CmORFPYC.js");
23672
+ return import("./ShipmentModeOrderListItem-CG75Um12.js");
23649
23673
  });
23650
23674
  const queryStore = useQueryStore();
23651
23675
  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-CwKPv7Cc.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-BA37Jyqh.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.1.0",
3
+ "version": "2.2.0",
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.1.0"
32
+ "@myparcel-dev/pdk-admin": "^2.2.0"
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-CwKPv7Cc.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- import { af as _sfc_main } from "./index-CwKPv7Cc.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- import { ag as _sfc_main } from "./index-CwKPv7Cc.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- import { ah as _sfc_main } from "./index-CwKPv7Cc.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- import { ai as _sfc_main } from "./index-CwKPv7Cc.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- import { aj as _sfc_main } from "./index-CwKPv7Cc.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- import { ak as _sfc_main } from "./index-CwKPv7Cc.js";
2
- export {
3
- _sfc_main as default
4
- };