@myparcel-dev/pdk-admin-js 1.13.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 +146 -0
- package/dist/ChildProductSettings-CKhUqQVI.js +4 -0
- package/dist/Modals-DYBR2g0V.js +4 -0
- package/dist/Notifications-DERmYtd-.js +4 -0
- package/dist/OrderBox-DsE9xCro.js +4 -0
- package/dist/OrderListItem-JNjMMXUW.js +4 -0
- package/dist/OrderModeOrderListItem-CbduAwbs.js +55 -0
- package/dist/PluginSettings-Dltdk1Bm.js +4 -0
- package/dist/PrintOptionsModalForm-Csh2eTf7.js +32 -0
- package/dist/ProductSettings-DtImXYYs.js +4 -0
- package/dist/ShipmentLabel.vue_vue_type_script_setup_true_lang-BzTDupXQ.js +212 -0
- package/dist/ShipmentModeOrderListItem-DY57TUzn.js +69 -0
- package/dist/ShipmentOptionsModalForm-DjhgLqgc.js +25 -0
- package/dist/ShipmentTableBox-BJ8Qq7Gf.js +258 -0
- package/dist/index-Btt7GCnO.js +23586 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +171 -0
- package/dist/style.css +4 -0
- package/dist/testing.d.ts +1 -0
- package/package.json +53 -0
- package/src/__tests__/__snapshots__/exports.spec.ts.snap +195 -0
- package/src/__tests__/exports.spec.ts +13 -0
- package/src/index.ts +1 -0
- package/src/testing.ts +1 -0
- package/tsconfig.base.json +4 -0
- package/vite.config.ts +41 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
<!-- MONOWEAVE:BELOW -->
|
|
4
|
+
|
|
5
|
+
## [1.13.0](https://github.com/myparcelnl/js-pdk/compare/@myparcel-dev/pdk-admin-js@1.12.0...@myparcel-dev/pdk-admin-js@1.13.0) "@myparcel-dev/pdk-admin-js" (2025-12-23)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* migrate to [@myparcel-dev](https://github.com/myparcel-dev) scope ([#289](https://github.com/myparcelnl/js-pdk/issues/289)) ([ca169be](https://github.com/myparcelnl/js-pdk/commit/ca169bec42dcf7174ce20b1bfb392ae620b6c7fd))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [1.11.5](https://github.com/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.11.4...@myparcel-pdk/admin-js@1.11.5) "@myparcel-pdk/admin-js" (2025-11-10)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## [1.5.3](https://github.com/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.3.1...@myparcel-pdk/admin-js@1.5.3) "@myparcel-pdk/admin-js" (2024-10-24)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [1.3.1](https://github.com/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.3.0...@myparcel-pdk/admin-js@1.3.1) "@myparcel-pdk/admin-js" (2024-10-24)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [1.3.0](https://github.com/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.2.0...@myparcel-pdk/admin-js@1.3.0) "@myparcel-pdk/admin-js" (2024-10-23)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Features
|
|
34
|
+
|
|
35
|
+
* **admin:** add download logs action ([#221](https://github.com/myparcelnl/js-pdk/issues/221)) ([ac60e73](https://github.com/myparcelnl/js-pdk/commit/ac60e734127fd94df454f002c632f43a48d2eb06))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## [1.2.0](https://github.com/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.1.4...@myparcel-pdk/admin-js@1.2.0) "@myparcel-pdk/admin-js" (2024-10-16)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Features
|
|
44
|
+
|
|
45
|
+
* **admin:** add useToggleInputContext composable ([#223](https://github.com/myparcelnl/js-pdk/issues/223)) ([c0e1f59](https://github.com/myparcelnl/js-pdk/commit/c0e1f59604e406cefa46451b756f4331f01c93bf))
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Bug Fixes
|
|
49
|
+
|
|
50
|
+
* **admin:** make shipping methods input optional to avoid error ([#220](https://github.com/myparcelnl/js-pdk/issues/220)) ([2f72250](https://github.com/myparcelnl/js-pdk/commit/2f722504dc99a10220416bf87b69821448a3507d))
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
## [1.1.4](https://github.com/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.1.3...@myparcel-pdk/admin-js@1.1.4) "@myparcel-pdk/admin-js" (2024-10-09)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
## [1.1.3](https://github.com/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.1.2...@myparcel-pdk/admin-js@1.1.3) "@myparcel-pdk/admin-js" (2024-10-04)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
## [1.1.0](https://github.com/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.0.0...@myparcel-pdk/admin-js@1.1.0) "@myparcel-pdk/admin-js" (2024-06-05)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
### Features
|
|
69
|
+
|
|
70
|
+
* **admin:** add shipping methods input ([#210](https://github.com/myparcelnl/js-pdk/issues/210)) ([79758ad](https://github.com/myparcelnl/js-pdk/commit/79758ad39bd9c0dd5d2258d79f379ac5f1ccc790))
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
## [1.0.0](https://github.com/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.0.0-alpha.1...@myparcel-pdk/admin-js@1.0.0) "@myparcel-pdk/admin-js" (2024-04-11)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
### ⚠ BREAKING CHANGES
|
|
79
|
+
|
|
80
|
+
* update node requirement to 20
|
|
81
|
+
|
|
82
|
+
### Miscellaneous Chores
|
|
83
|
+
|
|
84
|
+
* update node requirement to 20 ([e3f867f](https://github.com/myparcelnl/js-pdk/commit/e3f867fd3e19245154748a6858dbad4b56673fa3))
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
## [1.0.0-beta.3](https://github.com/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.0.0-beta.2...@myparcel-pdk/admin-js@1.0.0-beta.3) "@myparcel-pdk/admin-js" (2024-03-14)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
## [1.0.0-beta.1](https://github.com/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.0.0-beta.0...@myparcel-pdk/admin-js@1.0.0-beta.1) "@myparcel-pdk/admin-js" (2024-03-13)
|
|
95
|
+
|
|
96
|
+
## [1.0.0-beta.0](https://github.com/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.0.0-alpha.1...@myparcel-pdk/admin-js@1.0.0-beta.0) "@myparcel-pdk/admin-js" (2024-03-06)
|
|
97
|
+
|
|
98
|
+
## [1.0.0-alpha.58](https://github.com/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.0.0-alpha.57...@myparcel-pdk/admin-js@1.0.0-alpha.58) "@myparcel-pdk/admin-js" (2023-11-01)
|
|
99
|
+
|
|
100
|
+
## [1.0.0-alpha.48](https://github.com/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.0.0-alpha.47...@myparcel-pdk/admin-js@1.0.0-alpha.48) "@myparcel-pdk/admin-js" (2023-09-27)
|
|
101
|
+
|
|
102
|
+
### Features
|
|
103
|
+
|
|
104
|
+
- **admin-preset-bootstrap4:** improve components ([34181d0](https://github.com/myparcelnl/js-pdk/commit/34181d02a5328751746a72fdf9bea603d53d2f1b))
|
|
105
|
+
|
|
106
|
+
## [1.0.0-alpha.46](https://github.com/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.0.0-alpha.45...@myparcel-pdk/admin-js@1.0.0-alpha.46) "@myparcel-pdk/admin-js" (2023-09-13)
|
|
107
|
+
|
|
108
|
+
### Features
|
|
109
|
+
|
|
110
|
+
- **admin:** add useElementContext ([6e7f2d8](https://github.com/myparcelnl/js-pdk/commit/6e7f2d8b7e13e2dd47940d33c2e6fc5a7d537d8a))
|
|
111
|
+
|
|
112
|
+
## [1.0.0-alpha.42](https://github.com/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.0.0-alpha.41...@myparcel-pdk/admin-js@1.0.0-alpha.42) "@myparcel-pdk/admin-js" (2023-09-06)
|
|
113
|
+
|
|
114
|
+
### Bug Fixes
|
|
115
|
+
|
|
116
|
+
- **admin:** export form keys ([9ae7bb0](https://github.com/myparcelnl/js-pdk/commit/9ae7bb099d76d0eceebb6659afeee7b7b6607bad))
|
|
117
|
+
|
|
118
|
+
## [1.0.0-alpha.41](https://github.com/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.0.0-alpha.40...@myparcel-pdk/admin-js@1.0.0-alpha.41) "@myparcel-pdk/admin-js" (2023-09-06)
|
|
119
|
+
|
|
120
|
+
## [1.0.0-alpha.32](https://github.com/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.0.0-alpha.31...@myparcel-pdk/admin-js@1.0.0-alpha.32) "@myparcel-pdk/admin-js" (2023-08-04)
|
|
121
|
+
|
|
122
|
+
### Features
|
|
123
|
+
|
|
124
|
+
- **admin:** support child products ([f06fca0](https://github.com/myparcelnl/js-pdk/commit/f06fca08a3b2ec5575efb6b59978a75caca76b4d))
|
|
125
|
+
|
|
126
|
+
## [1.0.0-alpha.28](https://github.com/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.0.0-alpha.27...@myparcel-pdk/admin-js@1.0.0-alpha.28) "@myparcel-pdk/admin-js" (2023-08-03)
|
|
127
|
+
|
|
128
|
+
## [1.0.0-alpha.27](https://github.com/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.0.0-alpha.26...@myparcel-pdk/admin-js@1.0.0-alpha.27) "@myparcel-pdk/admin-js" (2023-08-02)
|
|
129
|
+
|
|
130
|
+
## [1.0.0-alpha.25](https://github.com/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.0.0-alpha.24...@myparcel-pdk/admin-js@1.0.0-alpha.25) "@myparcel-pdk/admin-js" (2023-07-26)
|
|
131
|
+
|
|
132
|
+
### Bug Fixes
|
|
133
|
+
|
|
134
|
+
- **npm:** update repository field ([e940854](https://github.com/myparcelnl/js-pdk/commit/e940854ba1d99c0fcdada8b66f88a7c7e6060272))
|
|
135
|
+
|
|
136
|
+
## [1.0.0-alpha.20](https://github/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.0.0-alpha.19...@myparcel-pdk/admin-js@1.0.0-alpha.20) "@myparcel-pdk/admin-js" (2023-07-11)
|
|
137
|
+
|
|
138
|
+
## [1.0.0-alpha.18](https://github/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.0.0-alpha.17...@myparcel-pdk/admin-js@1.0.0-alpha.18) "@myparcel-pdk/admin-js" (2023-07-04)
|
|
139
|
+
|
|
140
|
+
## [1.0.0-alpha.7](https://github/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.0.0-alpha.6...@myparcel-pdk/admin-js@1.0.0-alpha.7) "@myparcel-pdk/admin-js" (2023-06-06)
|
|
141
|
+
|
|
142
|
+
## [1.0.0-alpha.1](https://github/myparcelnl/js-pdk/compare/@myparcel-pdk/admin-js@1.0.0-alpha.0...@myparcel-pdk/admin-js@1.0.0-alpha.1) "@myparcel-pdk/admin-js" (2023-05-26)
|
|
143
|
+
|
|
144
|
+
### Bug Fixes
|
|
145
|
+
|
|
146
|
+
- restore missing types ([903cfb9](https://github/myparcelnl/js-pdk/commit/903cfb95f161bb5b49fbb91c4f96a7e44c524db8))
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { d as defineComponent, G as useOrderData, c as computed, t as toValue, T as instantiateAction, U as orderViewInBackofficeAction, O as instantiateActions, V as ordersEditAction, X as orderExportAction, s as resolveComponent, o as openBlock, K as createElementBlock, a as createBlock, b as unref, e as createCommentVNode, L as Fragment, M as renderList, x as createVNode, v as withCtx, Y as _sfc_main$3, Z as Size } from "./index-Btt7GCnO.js";
|
|
2
|
+
import { _ as _sfc_main$1, a as _sfc_main$2 } from "./ShipmentLabel.vue_vue_type_script_setup_true_lang-BzTDupXQ.js";
|
|
3
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
+
__name: "OrderModeOrderListItem",
|
|
5
|
+
setup(__props) {
|
|
6
|
+
var _a;
|
|
7
|
+
const { query, order } = useOrderData();
|
|
8
|
+
const data = computed(() => toValue(query.data));
|
|
9
|
+
const shipments = computed(() => {
|
|
10
|
+
var _a2;
|
|
11
|
+
return ((_a2 = toValue(data)) == null ? void 0 : _a2.shipments) ?? [];
|
|
12
|
+
});
|
|
13
|
+
const showExportedOrderAction = instantiateAction(orderViewInBackofficeAction);
|
|
14
|
+
const orderActions = instantiateActions([ordersEditAction, orderExportAction], {
|
|
15
|
+
orderIds: (_a = order.value) == null ? void 0 : _a.externalIdentifier
|
|
16
|
+
});
|
|
17
|
+
return (_ctx, _cache) => {
|
|
18
|
+
var _a2;
|
|
19
|
+
const _component_PdkLink = resolveComponent("PdkLink");
|
|
20
|
+
const _component_PdkButtonGroup = resolveComponent("PdkButtonGroup");
|
|
21
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
22
|
+
shipments.value.length === 0 ? (openBlock(), createBlock(unref(_sfc_main$1), { key: 0 })) : createCommentVNode("", true),
|
|
23
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(((_a2 = data.value) == null ? void 0 : _a2.shipments) ?? [], (shipment) => {
|
|
24
|
+
var _a3;
|
|
25
|
+
return openBlock(), createBlock(_sfc_main$2, {
|
|
26
|
+
key: `${(_a3 = data.value) == null ? void 0 : _a3.externalIdentifier}_${shipment.id}`,
|
|
27
|
+
"shipment-id": shipment.id
|
|
28
|
+
}, null, 8, ["shipment-id"]);
|
|
29
|
+
}), 128)),
|
|
30
|
+
createVNode(_component_PdkButtonGroup, null, {
|
|
31
|
+
default: withCtx(() => {
|
|
32
|
+
var _a3;
|
|
33
|
+
return [
|
|
34
|
+
((_a3 = unref(order)) == null ? void 0 : _a3.exported) ? (openBlock(), createBlock(_component_PdkLink, {
|
|
35
|
+
key: 0,
|
|
36
|
+
action: unref(showExportedOrderAction)
|
|
37
|
+
}, null, 8, ["action"])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(orderActions), (action) => {
|
|
38
|
+
return openBlock(), createBlock(unref(_sfc_main$3), {
|
|
39
|
+
key: action.id,
|
|
40
|
+
action,
|
|
41
|
+
size: unref(Size).Small,
|
|
42
|
+
"hide-text": ""
|
|
43
|
+
}, null, 8, ["action", "size"]);
|
|
44
|
+
}), 128))
|
|
45
|
+
];
|
|
46
|
+
}),
|
|
47
|
+
_: 1
|
|
48
|
+
})
|
|
49
|
+
], 64);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
export {
|
|
54
|
+
_sfc_main as default
|
|
55
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { d as defineComponent, f as useContext, g as usePluginSettings, h as useAdminConfig, r as ref, i as onMounted, m as markRaw, W as We, A as AdminModalKey, j as generateFormFields, o as openBlock, a as createBlock, b as unref, N as Ne, e as createCommentVNode } from "./index-Btt7GCnO.js";
|
|
2
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
3
|
+
__name: "PrintOptionsModalForm",
|
|
4
|
+
setup(__props) {
|
|
5
|
+
const context = useContext();
|
|
6
|
+
const pluginSettings = usePluginSettings();
|
|
7
|
+
const config = useAdminConfig();
|
|
8
|
+
const form = ref();
|
|
9
|
+
onMounted(() => {
|
|
10
|
+
var _a, _b;
|
|
11
|
+
form.value = markRaw(
|
|
12
|
+
We(AdminModalKey.PrintOptions, {
|
|
13
|
+
...(_a = config.formConfigOverrides) == null ? void 0 : _a.modal,
|
|
14
|
+
...(_b = config.formConfigOverrides) == null ? void 0 : _b[AdminModalKey.PrintOptions],
|
|
15
|
+
fields: generateFormFields({
|
|
16
|
+
fields: context.printOptionsView.elements,
|
|
17
|
+
values: pluginSettings.label
|
|
18
|
+
})
|
|
19
|
+
})
|
|
20
|
+
);
|
|
21
|
+
});
|
|
22
|
+
return (_ctx, _cache) => {
|
|
23
|
+
return form.value ? (openBlock(), createBlock(unref(Ne), {
|
|
24
|
+
key: 0,
|
|
25
|
+
form: form.value
|
|
26
|
+
}, null, 8, ["form"])) : createCommentVNode("", true);
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
export {
|
|
31
|
+
_sfc_main as default
|
|
32
|
+
};
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { d as defineComponent, l as useLocalizedFormatter, c as computed, F as Format, o as openBlock, K as createElementBlock, D as toDisplayString, H as useLanguage, s as resolveComponent, x as createVNode, C 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, L as Fragment, J as createTextVNode, G as useOrderData, h as useAdminConfig, E as normalizeClass, a9 as getDynamicTranslation, n as useQueryStore, p as useShipmentData, v as withCtx, z as _sfc_main$9, B as _sfc_main$a, aa as withModifiers } from "./index-Btt7GCnO.js";
|
|
2
|
+
const _hoisted_1$4 = ["title", "textContent"];
|
|
3
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
4
|
+
__name: "DateRelative",
|
|
5
|
+
props: {
|
|
6
|
+
date: {}
|
|
7
|
+
},
|
|
8
|
+
setup(__props) {
|
|
9
|
+
const props = __props;
|
|
10
|
+
const formatter = useLocalizedFormatter();
|
|
11
|
+
const longDate = computed(() => formatter.format(Format.DateLong, props.date));
|
|
12
|
+
const relativeDate = computed(() => formatter.format(Format.DateRelative, props.date));
|
|
13
|
+
return (_ctx, _cache) => {
|
|
14
|
+
return openBlock(), createElementBlock("span", {
|
|
15
|
+
title: longDate.value,
|
|
16
|
+
textContent: toDisplayString(relativeDate.value)
|
|
17
|
+
}, null, 8, _hoisted_1$4);
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
const _hoisted_1$3 = { key: 0 };
|
|
22
|
+
const _hoisted_2$1 = ["title", "textContent"];
|
|
23
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
24
|
+
__name: "DeliveryOptionsDeliveryType",
|
|
25
|
+
props: {
|
|
26
|
+
deliveryOptions: {}
|
|
27
|
+
},
|
|
28
|
+
setup(__props) {
|
|
29
|
+
const { translate } = useLanguage();
|
|
30
|
+
return (_ctx, _cache) => {
|
|
31
|
+
const _component_PdkIcon = resolveComponent("PdkIcon");
|
|
32
|
+
return _ctx.deliveryOptions.deliveryType ? (openBlock(), createElementBlock("span", _hoisted_1$3, [
|
|
33
|
+
createVNode(_component_PdkIcon, {
|
|
34
|
+
icon: _ctx.deliveryOptions.deliveryType
|
|
35
|
+
}, null, 8, ["icon"]),
|
|
36
|
+
createBaseVNode("span", {
|
|
37
|
+
title: unref(translate)(unref(getDeliveryTypeTranslation)()),
|
|
38
|
+
textContent: toDisplayString(unref(translate)(unref(getDeliveryTypeTranslation)(_ctx.deliveryOptions.deliveryType)))
|
|
39
|
+
}, null, 8, _hoisted_2$1)
|
|
40
|
+
])) : createCommentVNode("", true);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
const _hoisted_1$2 = ["textContent"];
|
|
45
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
46
|
+
__name: "DigitalStampWeightRange",
|
|
47
|
+
props: {
|
|
48
|
+
weight: {}
|
|
49
|
+
},
|
|
50
|
+
setup(__props) {
|
|
51
|
+
const props = __props;
|
|
52
|
+
const propRefs = toRefs(props);
|
|
53
|
+
const { currentRange } = useDigitalStampRanges(propRefs.weight);
|
|
54
|
+
return (_ctx, _cache) => {
|
|
55
|
+
return openBlock(), createElementBlock("span", {
|
|
56
|
+
textContent: toDisplayString(` ${unref(currentRange).plainLabel}`)
|
|
57
|
+
}, null, 8, _hoisted_1$2);
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
const _hoisted_1$1 = { key: 0 };
|
|
62
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
63
|
+
__name: "DeliveryOptionsPackageType",
|
|
64
|
+
props: {
|
|
65
|
+
shipmentOrOrder: {}
|
|
66
|
+
},
|
|
67
|
+
setup(__props) {
|
|
68
|
+
const props = __props;
|
|
69
|
+
const weight = computed(() => {
|
|
70
|
+
const { physicalProperties } = props.shipmentOrOrder;
|
|
71
|
+
return isOfType(physicalProperties, "weight") ? physicalProperties.weight : physicalProperties == null ? void 0 : physicalProperties.totalWeight;
|
|
72
|
+
});
|
|
73
|
+
return (_ctx, _cache) => {
|
|
74
|
+
var _a;
|
|
75
|
+
return ((_a = _ctx.shipmentOrOrder.deliveryOptions) == null ? void 0 : _a.packageType) ? (openBlock(), createElementBlock("span", _hoisted_1$1, [
|
|
76
|
+
createVNode(_sfc_main$7, {
|
|
77
|
+
"package-type": _ctx.shipmentOrOrder.deliveryOptions.packageType
|
|
78
|
+
}, null, 8, ["package-type"]),
|
|
79
|
+
weight.value && _ctx.shipmentOrOrder.deliveryOptions.packageType === unref(PackageTypeName).DigitalStamp ? (openBlock(), createBlock(_sfc_main$4, {
|
|
80
|
+
key: 0,
|
|
81
|
+
weight: weight.value
|
|
82
|
+
}, null, 8, ["weight"])) : createCommentVNode("", true)
|
|
83
|
+
])) : createCommentVNode("", true);
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
88
|
+
__name: "DeliveryOptionsExcerptCarrierName",
|
|
89
|
+
props: {
|
|
90
|
+
carrier: {}
|
|
91
|
+
},
|
|
92
|
+
setup(__props) {
|
|
93
|
+
const props = __props;
|
|
94
|
+
const propRefs = toRefs(props);
|
|
95
|
+
const carriersQuery = useFetchCarrier(propRefs.carrier.value.name);
|
|
96
|
+
const carrierData = computed(() => toValue(carriersQuery.data));
|
|
97
|
+
return (_ctx, _cache) => {
|
|
98
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
99
|
+
carrierData.value ? (openBlock(), createBlock(_sfc_main$8, {
|
|
100
|
+
key: 0,
|
|
101
|
+
carrier: carrierData.value
|
|
102
|
+
}, null, 8, ["carrier"])) : createCommentVNode("", true),
|
|
103
|
+
carrierData.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
104
|
+
createTextVNode(" ")
|
|
105
|
+
], 64)) : createCommentVNode("", true)
|
|
106
|
+
], 64);
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
const _hoisted_1 = { key: 0 };
|
|
111
|
+
const _hoisted_2 = { key: 0 };
|
|
112
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
113
|
+
__name: "DeliveryOptionsExcerpt",
|
|
114
|
+
setup(__props) {
|
|
115
|
+
const { query } = useOrderData();
|
|
116
|
+
const data = computed(() => toValue(query.data));
|
|
117
|
+
const deliveryOptions = computed(() => {
|
|
118
|
+
var _a;
|
|
119
|
+
return (_a = toValue(data)) == null ? void 0 : _a.deliveryOptions;
|
|
120
|
+
});
|
|
121
|
+
const config = useAdminConfig();
|
|
122
|
+
return (_ctx, _cache) => {
|
|
123
|
+
var _a, _b, _c, _d;
|
|
124
|
+
return data.value && deliveryOptions.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
125
|
+
createBaseVNode("span", {
|
|
126
|
+
class: normalizeClass((_a = unref(config).cssUtilities) == null ? void 0 : _a.displayFlex)
|
|
127
|
+
}, [
|
|
128
|
+
((_b = deliveryOptions.value) == null ? void 0 : _b.carrier) ? (openBlock(), createBlock(_sfc_main$2, {
|
|
129
|
+
key: 0,
|
|
130
|
+
carrier: (_c = deliveryOptions.value) == null ? void 0 : _c.carrier
|
|
131
|
+
}, null, 8, ["carrier"])) : createCommentVNode("", true),
|
|
132
|
+
createBaseVNode("ul", {
|
|
133
|
+
class: normalizeClass((_d = unref(config).cssUtilities) == null ? void 0 : _d.marginYAuto)
|
|
134
|
+
}, [
|
|
135
|
+
createBaseVNode("li", null, [
|
|
136
|
+
createVNode(_sfc_main$3, { "shipment-or-order": data.value }, null, 8, ["shipment-or-order"])
|
|
137
|
+
]),
|
|
138
|
+
createBaseVNode("li", null, [
|
|
139
|
+
createVNode(_sfc_main$5, { "delivery-options": deliveryOptions.value }, null, 8, ["delivery-options"])
|
|
140
|
+
]),
|
|
141
|
+
deliveryOptions.value.date ? (openBlock(), createElementBlock("li", _hoisted_2, [
|
|
142
|
+
createVNode(_sfc_main$6, {
|
|
143
|
+
date: deliveryOptions.value.date
|
|
144
|
+
}, null, 8, ["date"])
|
|
145
|
+
])) : createCommentVNode("", true)
|
|
146
|
+
], 2)
|
|
147
|
+
], 2)
|
|
148
|
+
])) : createCommentVNode("", true);
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
const getDeliveryTypeTranslation = (name) => getDynamicTranslation("delivery_type", name);
|
|
153
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
154
|
+
__name: "ShipmentLabel",
|
|
155
|
+
props: {
|
|
156
|
+
shipmentId: {}
|
|
157
|
+
},
|
|
158
|
+
setup(__props) {
|
|
159
|
+
const props = __props;
|
|
160
|
+
const { shipmentId } = toRefs(props);
|
|
161
|
+
useQueryStore().registerShipmentQueries(shipmentId);
|
|
162
|
+
const { loading, actions, shipment: data } = useShipmentData(shipmentId);
|
|
163
|
+
const config = useAdminConfig();
|
|
164
|
+
return (_ctx, _cache) => {
|
|
165
|
+
var _a, _b;
|
|
166
|
+
const _component_PdkDropdownButton = resolveComponent("PdkDropdownButton");
|
|
167
|
+
const _component_PdkShipmentLabelWrapper = resolveComponent("PdkShipmentLabelWrapper");
|
|
168
|
+
return openBlock(), createBlock(_component_PdkShipmentLabelWrapper, {
|
|
169
|
+
class: normalizeClass((_b = (_a = unref(config)) == null ? void 0 : _a.cssUtilities) == null ? void 0 : _b.cursorDefault),
|
|
170
|
+
loading: unref(loading),
|
|
171
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
172
|
+
}, ["stop"]))
|
|
173
|
+
}, {
|
|
174
|
+
default: withCtx(() => {
|
|
175
|
+
var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
176
|
+
return [
|
|
177
|
+
createBaseVNode("div", {
|
|
178
|
+
class: normalizeClass((_b2 = (_a2 = unref(config)) == null ? void 0 : _a2.cssUtilities) == null ? void 0 : _b2.displayFlex)
|
|
179
|
+
}, [
|
|
180
|
+
createVNode(unref(_sfc_main$9), { "shipment-id": unref(shipmentId) }, null, 8, ["shipment-id"]),
|
|
181
|
+
createVNode(_component_PdkDropdownButton, {
|
|
182
|
+
actions: unref(actions),
|
|
183
|
+
class: normalizeClass((_d = (_c = unref(config)) == null ? void 0 : _c.cssUtilities) == null ? void 0 : _d.marginLAuto),
|
|
184
|
+
disabled: unref(loading),
|
|
185
|
+
"hide-text": true,
|
|
186
|
+
size: "xs"
|
|
187
|
+
}, null, 8, ["actions", "class", "disabled"])
|
|
188
|
+
], 2),
|
|
189
|
+
createBaseVNode("div", {
|
|
190
|
+
class: normalizeClass((_f = (_e = unref(config)) == null ? void 0 : _e.cssUtilities) == null ? void 0 : _f.displayFlex)
|
|
191
|
+
}, [
|
|
192
|
+
createVNode(unref(_sfc_main$3), {
|
|
193
|
+
class: normalizeClass((_h = (_g = unref(config)) == null ? void 0 : _g.cssUtilities) == null ? void 0 : _h.flexGrow),
|
|
194
|
+
"shipment-or-order": unref(data)
|
|
195
|
+
}, null, 8, ["class", "shipment-or-order"]),
|
|
196
|
+
createBaseVNode("div", {
|
|
197
|
+
class: normalizeClass((_j = (_i = unref(config)) == null ? void 0 : _i.cssUtilities) == null ? void 0 : _j.flexGrow)
|
|
198
|
+
}, [
|
|
199
|
+
createVNode(unref(_sfc_main$a), { "shipment-id": unref(shipmentId) }, null, 8, ["shipment-id"])
|
|
200
|
+
], 2)
|
|
201
|
+
], 2)
|
|
202
|
+
];
|
|
203
|
+
}),
|
|
204
|
+
_: 1
|
|
205
|
+
}, 8, ["class", "loading"]);
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
export {
|
|
210
|
+
_sfc_main$1 as _,
|
|
211
|
+
_sfc_main as a
|
|
212
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { d as defineComponent, h as useAdminConfig, G as useOrderData, c as computed, t as toValue, $ as ordersPrintAction, a0 as ordersFetchAction, X as orderExportAction, a1 as ordersExportPrintShipmentsAction, V as ordersEditAction, O as instantiateActions, s as resolveComponent, o as openBlock, K as createElementBlock, a as createBlock, b as unref, e as createCommentVNode, x as createVNode, v as withCtx, L as Fragment, M as renderList, a2 as TransitionGroup, Z as Size } from "./index-Btt7GCnO.js";
|
|
2
|
+
import { _ as _sfc_main$1, a as _sfc_main$2 } from "./ShipmentLabel.vue_vue_type_script_setup_true_lang-BzTDupXQ.js";
|
|
3
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
+
__name: "ShipmentModeOrderListItem",
|
|
5
|
+
setup(__props) {
|
|
6
|
+
const config = useAdminConfig();
|
|
7
|
+
const { query, order } = useOrderData();
|
|
8
|
+
const data = computed(() => toValue(query.data));
|
|
9
|
+
const shipments = computed(() => {
|
|
10
|
+
var _a;
|
|
11
|
+
return ((_a = toValue(data)) == null ? void 0 : _a.shipments) ?? [];
|
|
12
|
+
});
|
|
13
|
+
const actions = computed(() => {
|
|
14
|
+
var _a, _b, _c;
|
|
15
|
+
const actions2 = [];
|
|
16
|
+
if ((_b = (_a = toValue(order)) == null ? void 0 : _a.shipments) == null ? void 0 : _b.some((item) => !item.deleted)) {
|
|
17
|
+
actions2.push(orderExportAction);
|
|
18
|
+
actions2.push({
|
|
19
|
+
...ordersPrintAction,
|
|
20
|
+
standalone: true
|
|
21
|
+
});
|
|
22
|
+
actions2.push(ordersFetchAction);
|
|
23
|
+
} else {
|
|
24
|
+
actions2.push({
|
|
25
|
+
...orderExportAction,
|
|
26
|
+
standalone: true
|
|
27
|
+
});
|
|
28
|
+
actions2.push(ordersExportPrintShipmentsAction);
|
|
29
|
+
}
|
|
30
|
+
actions2.push(ordersEditAction);
|
|
31
|
+
return instantiateActions(actions2, {
|
|
32
|
+
orderIds: (_c = toValue(order)) == null ? void 0 : _c.externalIdentifier,
|
|
33
|
+
form: false
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
return (_ctx, _cache) => {
|
|
37
|
+
var _a, _b;
|
|
38
|
+
const _component_PdkDropdownButton = resolveComponent("PdkDropdownButton");
|
|
39
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
40
|
+
shipments.value.length === 0 ? (openBlock(), createBlock(unref(_sfc_main$1), { key: 0 })) : createCommentVNode("", true),
|
|
41
|
+
createVNode(TransitionGroup, {
|
|
42
|
+
name: (_b = (_a = unref(config)) == null ? void 0 : _a.transitions) == null ? void 0 : _b.shipmentBox,
|
|
43
|
+
appear: ""
|
|
44
|
+
}, {
|
|
45
|
+
default: withCtx(() => {
|
|
46
|
+
var _a2;
|
|
47
|
+
return [
|
|
48
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(((_a2 = data.value) == null ? void 0 : _a2.shipments) ?? [], (shipment) => {
|
|
49
|
+
var _a3;
|
|
50
|
+
return openBlock(), createBlock(_sfc_main$2, {
|
|
51
|
+
key: `${(_a3 = data.value) == null ? void 0 : _a3.externalIdentifier}_${shipment.id}`,
|
|
52
|
+
"shipment-id": shipment.id
|
|
53
|
+
}, null, 8, ["shipment-id"]);
|
|
54
|
+
}), 128))
|
|
55
|
+
];
|
|
56
|
+
}),
|
|
57
|
+
_: 1
|
|
58
|
+
}, 8, ["name"]),
|
|
59
|
+
createVNode(_component_PdkDropdownButton, {
|
|
60
|
+
actions: actions.value,
|
|
61
|
+
size: unref(Size).Small
|
|
62
|
+
}, null, 8, ["actions", "size"])
|
|
63
|
+
], 64);
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
export {
|
|
68
|
+
_sfc_main as default
|
|
69
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
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-Btt7GCnO.js";
|
|
2
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
3
|
+
__name: "ShipmentOptionsModalForm",
|
|
4
|
+
props: {
|
|
5
|
+
order: {}
|
|
6
|
+
},
|
|
7
|
+
setup(__props) {
|
|
8
|
+
const props = __props;
|
|
9
|
+
const orderIds = computed(() => {
|
|
10
|
+
return useOrdersData(props.order).filter((data) => toValue(data.order)).map((data) => {
|
|
11
|
+
var _a;
|
|
12
|
+
return (_a = toValue(data.order)) == null ? void 0 : _a.externalIdentifier;
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
return (_ctx, _cache) => {
|
|
16
|
+
return orderIds.value.length ? (openBlock(), createBlock(unref(_sfc_main$1), {
|
|
17
|
+
key: 0,
|
|
18
|
+
order: orderIds.value
|
|
19
|
+
}, null, 8, ["order"])) : createCommentVNode("", true);
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
_sfc_main as default
|
|
25
|
+
};
|