@myparcel-dev/pdk-admin-js 2.2.4 → 2.2.6
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 +10 -0
- package/dist/OrderModeOrderListItem-1aoX4NQq.js +43 -0
- package/dist/PrintOptionsModalForm-0jr34WqX.js +30 -0
- package/dist/ShipmentModeOrderListItem-yiwrWuD9.js +58 -0
- package/dist/ShipmentOptionsModalForm-Bz5XIh6B.js +21 -0
- package/dist/ShipmentTableBox-pZpaz3Lo.js +214 -0
- package/dist/{style.css → index.css} +1 -0
- package/dist/index.js +4001 -177
- package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/shared-DHuYOc8-.js +15405 -0
- package/package.json +4 -4
- package/vite.config.ts +10 -9
- package/dist/ChildProductSettings-CWdldjU8.js +0 -4
- package/dist/Modals-CqhfaUfv.js +0 -4
- package/dist/Notifications-BsEoAoXb.js +0 -4
- package/dist/OrderBox-Bn8AcI8b.js +0 -4
- package/dist/OrderListItem-DT_77Xo3.js +0 -4
- package/dist/OrderModeOrderListItem-BrBhUyyu.js +0 -60
- package/dist/PluginSettings-6qK6JuXL.js +0 -4
- package/dist/PrintOptionsModalForm-BhshAOse.js +0 -32
- package/dist/ProductSettings-D5kTD7jw.js +0 -4
- package/dist/ShipmentLabel.vue_vue_type_script_setup_true_lang-Cpk2IaBC.js +0 -212
- package/dist/ShipmentModeOrderListItem-wtNZ_vd8.js +0 -69
- package/dist/ShipmentOptionsModalForm-cj7Pa1yh.js +0 -25
- package/dist/ShipmentTableBox-PwR7YMws.js +0 -258
- package/dist/index-BCHGsSUm.js +0 -24316
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myparcel-dev/pdk-admin-js",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.6",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/myparcelnl/js-pdk.git",
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
"test:update": "run ws:test:update \"$(pwd)\""
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@myparcel-dev/pdk-admin": "^2.2.
|
|
32
|
+
"@myparcel-dev/pdk-admin": "^2.2.6"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@myparcel-dev/pdk-build-vite": "1.0.0-alpha.0",
|
|
36
36
|
"typescript": "^5.2.2",
|
|
37
|
-
"vite": "^
|
|
38
|
-
"vitest": "^
|
|
37
|
+
"vite": "^8.3.1",
|
|
38
|
+
"vitest": "^4.1.11"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"vue": "3.4.31"
|
package/vite.config.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import isCi from 'is-ci';
|
|
2
1
|
import {type BaseElementNode, type Node} from '@vue/compiler-core';
|
|
3
2
|
import vue from '@vitejs/plugin-vue';
|
|
4
3
|
import {createViteConfig} from '@myparcel-dev/pdk-build-vite';
|
|
5
4
|
import {isOfType} from '@myparcel-dev/ts-utils';
|
|
6
|
-
import {codecovVitePlugin} from '@codecov/vite-plugin';
|
|
7
|
-
import {name} from './package.json';
|
|
8
5
|
|
|
9
6
|
const PROP_TYPE_DIRECTIVE = 7;
|
|
10
7
|
|
|
8
|
+
const SHARED_CHUNK_MIN_IMPORTERS = 2;
|
|
9
|
+
|
|
11
10
|
const stripDirective = (name: string) => (node: Node) => {
|
|
12
11
|
if (!isOfType<BaseElementNode>(node, 'props')) {
|
|
13
12
|
return;
|
|
@@ -20,12 +19,6 @@ const stripDirective = (name: string) => (node: Node) => {
|
|
|
20
19
|
|
|
21
20
|
export default createViteConfig((env) => ({
|
|
22
21
|
plugins: [
|
|
23
|
-
codecovVitePlugin({
|
|
24
|
-
enableBundleAnalysis: isCi && process.env.CODECOV_TOKEN !== undefined,
|
|
25
|
-
bundleName: name,
|
|
26
|
-
uploadToken: process.env.CODECOV_TOKEN,
|
|
27
|
-
}),
|
|
28
|
-
|
|
29
22
|
vue({
|
|
30
23
|
template: {
|
|
31
24
|
compilerOptions: {
|
|
@@ -37,5 +30,13 @@ export default createViteConfig((env) => ({
|
|
|
37
30
|
|
|
38
31
|
build: {
|
|
39
32
|
minify: false,
|
|
33
|
+
rolldownOptions: {
|
|
34
|
+
output: {
|
|
35
|
+
// Unminified output keeps JSDoc by default, which adds about 100 KB of dependency comments.
|
|
36
|
+
comments: {jsdoc: false},
|
|
37
|
+
// Without this group, Rolldown splits the shared code into about 25 chunks that all load at startup.
|
|
38
|
+
codeSplitting: {groups: [{name: 'shared', minShareCount: SHARED_CHUNK_MIN_IMPORTERS}]},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
40
41
|
},
|
|
41
42
|
}));
|
package/dist/Modals-CqhfaUfv.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
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
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
-
__name: "OrderModeOrderListItem",
|
|
5
|
-
setup(__props) {
|
|
6
|
-
const { query, order } = useOrderData();
|
|
7
|
-
const orderMode = useOrderMode();
|
|
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 showExportedOrderAction = instantiateAction(orderViewInBackofficeAction);
|
|
14
|
-
const orderActions = computed(
|
|
15
|
-
() => {
|
|
16
|
-
var _a;
|
|
17
|
-
return instantiateActions(LIST_ITEM_MODE_ACTIONS[orderMode.value], {
|
|
18
|
-
orderIds: (_a = order.value) == null ? void 0 : _a.externalIdentifier
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
return (_ctx, _cache) => {
|
|
23
|
-
var _a;
|
|
24
|
-
const _component_PdkLink = resolveComponent("PdkLink");
|
|
25
|
-
const _component_PdkButtonGroup = resolveComponent("PdkButtonGroup");
|
|
26
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
27
|
-
shipments.value.length === 0 ? (openBlock(), createBlock(unref(_sfc_main$1), { key: 0 })) : createCommentVNode("", true),
|
|
28
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(((_a = data.value) == null ? void 0 : _a.shipments) ?? [], (shipment) => {
|
|
29
|
-
var _a2;
|
|
30
|
-
return openBlock(), createBlock(_sfc_main$2, {
|
|
31
|
-
key: `${(_a2 = data.value) == null ? void 0 : _a2.externalIdentifier}_${shipment.id}`,
|
|
32
|
-
"shipment-id": shipment.id
|
|
33
|
-
}, null, 8, ["shipment-id"]);
|
|
34
|
-
}), 128)),
|
|
35
|
-
createVNode(_component_PdkButtonGroup, null, {
|
|
36
|
-
default: withCtx(() => {
|
|
37
|
-
var _a2;
|
|
38
|
-
return [
|
|
39
|
-
unref(orderMode) === unref(OrderMode).OrderV1 && ((_a2 = unref(order)) == null ? void 0 : _a2.exported) ? (openBlock(), createBlock(_component_PdkLink, {
|
|
40
|
-
key: 0,
|
|
41
|
-
action: unref(showExportedOrderAction)
|
|
42
|
-
}, null, 8, ["action"])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(orderActions.value, (action) => {
|
|
43
|
-
return openBlock(), createBlock(unref(_sfc_main$3), {
|
|
44
|
-
key: action.id,
|
|
45
|
-
action,
|
|
46
|
-
size: unref(Size).Small,
|
|
47
|
-
"hide-text": ""
|
|
48
|
-
}, null, 8, ["action", "size"]);
|
|
49
|
-
}), 128))
|
|
50
|
-
];
|
|
51
|
-
}),
|
|
52
|
-
_: 1
|
|
53
|
-
})
|
|
54
|
-
], 64);
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
export {
|
|
59
|
-
_sfc_main as default
|
|
60
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
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
|
-
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
|
-
Ne(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(xe), {
|
|
24
|
-
key: 0,
|
|
25
|
-
form: form.value
|
|
26
|
-
}, null, 8, ["form"])) : createCommentVNode("", true);
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
export {
|
|
31
|
-
_sfc_main as default
|
|
32
|
-
};
|
|
@@ -1,212 +0,0 @@
|
|
|
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
|
-
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.carrier);
|
|
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
|
-
};
|
|
@@ -1,69 +0,0 @@
|
|
|
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
|
-
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
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
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
|
-
};
|