@myparcel-dev/pdk-admin 1.13.1 → 1.14.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  <!-- MONOWEAVE:BELOW -->
4
4
 
5
+ ## [1.14.0](https://github.com/myparcelnl/js-pdk/compare/@myparcel-dev/pdk-admin@1.13.1...@myparcel-dev/pdk-admin@1.14.0) "@myparcel-dev/pdk-admin" (2026-02-06)
6
+
7
+
8
+ ### Features
9
+
10
+ * add priority mailbox delivery fields ([#290](https://github.com/myparcelnl/js-pdk/issues/290)) ([1bea145](https://github.com/myparcelnl/js-pdk/commit/1bea1454676e33f1364c401724b203f71404b672))
11
+
12
+
13
+
14
+
5
15
  ## [1.13.1](https://github.com/myparcelnl/js-pdk/compare/@myparcel-dev/pdk-admin@1.13.0...@myparcel-dev/pdk-admin@1.13.1) "@myparcel-dev/pdk-admin" (2026-02-05)
6
16
 
7
17
 
@@ -10,6 +10,7 @@ export * from './getInsuranceOptions';
10
10
  export * from './getPackageTypes';
11
11
  export * from './hasPostNlAgeCheck';
12
12
  export * from './hasShipmentOption';
13
+ export * from './isPackageTypeMailbox';
13
14
  export * from './isPackageTypePackage';
14
15
  export * from './isPackageTypePackageOrSmall';
15
16
  export * from './isPackageTypeSmallPackage';
@@ -0,0 +1,2 @@
1
+ import { type FormInstance } from '@myparcel-dev/vue-form-builder';
2
+ export declare const isPackageTypeMailbox: (form: FormInstance) => boolean;
@@ -13,6 +13,7 @@ export declare const ONLY_RECIPIENT = "onlyRecipient";
13
13
  export declare const SAME_DAY_DELIVERY = "sameDayDelivery";
14
14
  export declare const SIGNATURE = "signature";
15
15
  export declare const INSURANCE = "insurance";
16
+ export declare const PRIORITY_DELIVERY = "priorityDelivery";
16
17
  export declare const MANUAL_WEIGHT = "manualWeight";
17
18
  export declare const PROP_OPTIONS = "options";
18
19
  export declare const KEY_DESCRIPTION = "description";
@@ -29,6 +30,7 @@ export declare const FIELD_ONLY_RECIPIENT: FieldName;
29
30
  export declare const FIELD_SAME_DAY_DELIVERY: FieldName;
30
31
  export declare const FIELD_SIGNATURE: FieldName;
31
32
  export declare const FIELD_INSURANCE: FieldName;
33
+ export declare const FIELD_PRIORITY_DELIVERY: FieldName;
32
34
  export declare const FIELD_MANUAL_WEIGHT: FieldName;
33
35
  export declare const FIELD_RECEIPT_CODE: FieldName;
34
- export declare const ALL_FIELDS: readonly [string, string, string, string, string, string, string, string, string, string, string, string, string, string];
36
+ export declare const ALL_FIELDS: readonly [string, string, string, string, string, string, string, string, string, string, string, string, string, string, string];
@@ -0,0 +1,3 @@
1
+ import { type InteractiveElementConfiguration } from '@myparcel-dev/vue-form-builder';
2
+ import { type ShipmentOptionsRefs } from '../types';
3
+ export declare const createPriorityDeliveryField: (refs: ShipmentOptionsRefs) => InteractiveElementConfiguration;
@@ -7,6 +7,7 @@ export * from './createLabelAmountField';
7
7
  export * from './createLargeFormatField';
8
8
  export * from './createOnlyRecipientField';
9
9
  export * from './createPackageTypeField';
10
+ export * from './createPriorityDeliveryField';
10
11
  export * from './createRef';
11
12
  export * from './createSameDayDeliveryField';
12
13
  export * from './createShipmentOptionField';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myparcel-dev/pdk-admin",
3
- "version": "1.13.1",
3
+ "version": "1.14.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/myparcelnl/js-pdk.git",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@myparcel-dev/constants": "^2.7.0",
40
- "@myparcel-dev/pdk-common": "^1.11.1",
40
+ "@myparcel-dev/pdk-common": "^1.12.0",
41
41
  "@myparcel-dev/sdk": "^5.0.0",
42
42
  "@myparcel-dev/vue-form-builder": "1.0.0-beta.42.6",
43
43
  "@tanstack/vue-query": "~4.43.0",
@@ -10,6 +10,7 @@ export * from './getInsuranceOptions';
10
10
  export * from './getPackageTypes';
11
11
  export * from './hasPostNlAgeCheck';
12
12
  export * from './hasShipmentOption';
13
+ export * from './isPackageTypeMailbox';
13
14
  export * from './isPackageTypePackage';
14
15
  export * from './isPackageTypePackageOrSmall';
15
16
  export * from './isPackageTypeSmallPackage';
@@ -0,0 +1,7 @@
1
+ import {type FormInstance} from '@myparcel-dev/vue-form-builder';
2
+ import {PackageTypeName} from '@myparcel-dev/constants';
3
+ import {FIELD_PACKAGE_TYPE} from '../shipmentOptions';
4
+
5
+ export const isPackageTypeMailbox = (form: FormInstance): boolean => {
6
+ return PackageTypeName.Mailbox === form.getValue(FIELD_PACKAGE_TYPE);
7
+ };
@@ -20,6 +20,7 @@ import {
20
20
  createDigitalStampRangeField,
21
21
  createDirectReturnField,
22
22
  createInsuranceField,
23
+ createPriorityDeliveryField,
23
24
  createLabelAmountField,
24
25
  createLargeFormatField,
25
26
  createOnlyRecipientField,
@@ -78,6 +79,7 @@ export const createShipmentOptionsForm = (orders?: OneOrMore<Plugin.ModelPdkOrde
78
79
  createSameDayDeliveryField(refs),
79
80
  createReceiptCodeField(refs),
80
81
  createInsuranceField(refs),
82
+ createPriorityDeliveryField(refs),
81
83
  ],
82
84
  });
83
85
  };
@@ -36,6 +36,8 @@ export const SIGNATURE = 'signature' satisfies keyof Shipment.ModelShipmentOptio
36
36
 
37
37
  export const INSURANCE = 'insurance' satisfies keyof Shipment.ModelShipmentOptions;
38
38
 
39
+ export const PRIORITY_DELIVERY = 'priorityDelivery' satisfies keyof Shipment.ModelShipmentOptions;
40
+
39
41
  export const MANUAL_WEIGHT = 'manualWeight';
40
42
 
41
43
  export const PROP_OPTIONS = 'options';
@@ -68,6 +70,8 @@ export const FIELD_SIGNATURE: FieldName = `${SHIPMENT_OPTIONS_PREFIX}.${SIGNATUR
68
70
 
69
71
  export const FIELD_INSURANCE: FieldName = `${SHIPMENT_OPTIONS_PREFIX}.${INSURANCE}`;
70
72
 
73
+ export const FIELD_PRIORITY_DELIVERY: FieldName = `${SHIPMENT_OPTIONS_PREFIX}.${PRIORITY_DELIVERY}`;
74
+
71
75
  export const FIELD_MANUAL_WEIGHT: FieldName = `${PHYSICAL_PROPERTIES_PREFIX}.${MANUAL_WEIGHT}`;
72
76
 
73
77
  export const FIELD_RECEIPT_CODE: FieldName = `${SHIPMENT_OPTIONS_PREFIX}.${RECEIPT_CODE}`;
@@ -78,6 +82,7 @@ export const ALL_FIELDS = [
78
82
  FIELD_DIRECT_RETURN,
79
83
  FIELD_HIDE_SENDER,
80
84
  FIELD_INSURANCE,
85
+ FIELD_PRIORITY_DELIVERY,
81
86
  FIELD_LABEL_AMOUNT,
82
87
  FIELD_LARGE_FORMAT,
83
88
  FIELD_ONLY_RECIPIENT,
@@ -0,0 +1,12 @@
1
+ import {type InteractiveElementConfiguration} from '@myparcel-dev/vue-form-builder';
2
+ import {type ShipmentOptionsRefs} from '../types';
3
+ import {FIELD_PRIORITY_DELIVERY, PRIORITY_DELIVERY} from '../field';
4
+ import {createHasShipmentOptionWatcher, isPackageTypeMailbox} from '../../helpers';
5
+ import {createShipmentOptionField} from './createShipmentOptionField';
6
+
7
+ export const createPriorityDeliveryField = (refs: ShipmentOptionsRefs): InteractiveElementConfiguration => {
8
+ return createShipmentOptionField(refs, FIELD_PRIORITY_DELIVERY, {
9
+ visibleWhen: createHasShipmentOptionWatcher(PRIORITY_DELIVERY, false, isPackageTypeMailbox),
10
+ disabledWhen: createHasShipmentOptionWatcher(PRIORITY_DELIVERY, true, isPackageTypeMailbox),
11
+ });
12
+ };
@@ -7,6 +7,7 @@ export * from './createLabelAmountField';
7
7
  export * from './createLargeFormatField';
8
8
  export * from './createOnlyRecipientField';
9
9
  export * from './createPackageTypeField';
10
+ export * from './createPriorityDeliveryField';
10
11
  export * from './createRef';
11
12
  export * from './createSameDayDeliveryField';
12
13
  export * from './createShipmentOptionField';