@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.
@@ -0,0 +1 @@
1
+ export * from '@myparcel-dev/pdk-admin';
package/dist/index.js ADDED
@@ -0,0 +1,171 @@
1
+ import { Y, ap, aq, cs, R, ar, A, as, ct, I, 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, z, _, B, 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, U, V, a1, a0, $, bY, bZ, aY, bO, ay, aI, cg, cj, ch, Q, 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, H, ba, bb, bc, bd, a_, be, a$, G, 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-Btt7GCnO.js";
2
+ export {
3
+ Y as ActionButton,
4
+ ap as AdminAction,
5
+ aq as AdminComponent,
6
+ cs as AdminContextKey,
7
+ R as AdminIcon,
8
+ ar as AdminInstanceContextKey,
9
+ A as AdminModalKey,
10
+ as as AdminView,
11
+ ct as BackendEndpoint,
12
+ I as BulkSelectCheckbox,
13
+ ab as ChildProductSettingsView,
14
+ az as FORM_KEYS,
15
+ aA as FORM_KEY_ACCOUNT_SETTINGS,
16
+ aB as FORM_KEY_CHILD_PRODUCT_SETTINGS,
17
+ aC as FORM_KEY_MODAL,
18
+ aD as FORM_KEY_MODAL_PRINT_OPTIONS,
19
+ aE as FORM_KEY_MODAL_RETURN_OPTIONS,
20
+ aF as FORM_KEY_MODAL_SHIPMENT_OPTIONS,
21
+ aG as FORM_KEY_PLUGIN_SETTINGS,
22
+ aH as FORM_KEY_PRODUCT_SETTINGS,
23
+ aJ as FormHook,
24
+ cu as FrontendEndpoint,
25
+ aN as INJECT_ADMIN_INSTANCE,
26
+ aO as INJECT_GLOBAL_PDK_ADMIN,
27
+ aP as LogLevel,
28
+ ac as ModalsView,
29
+ at as NotificationCategory,
30
+ ai as NotificationContainer,
31
+ ad as NotificationsView,
32
+ cm as OrderBoxView,
33
+ cn as OrderListItemView,
34
+ a5 as PackageType,
35
+ aR as PdkAdmin,
36
+ aj as PlainElement,
37
+ ag as PluginSettingsView,
38
+ ah as ProductSettingsView,
39
+ bI as QUERY_KEY_ORDER,
40
+ bJ as QUERY_KEY_SHIPMENT,
41
+ ak as ResetButton,
42
+ al as ReturnsForm,
43
+ z as ShipmentBarcode,
44
+ _ as ShipmentOptionsForm,
45
+ B as ShipmentStatus,
46
+ Z as Size,
47
+ cr as SortType,
48
+ cp as Status,
49
+ am as StatusIndicator,
50
+ cl as StopActionHandler,
51
+ an as SubmitButton,
52
+ ao as TabNavigation,
53
+ cq as TriState,
54
+ co as Variant,
55
+ au as allAdminComponentNames,
56
+ aT as createAdminConfig,
57
+ aV as createFormElement,
58
+ c5 as createHandlerWithParameters,
59
+ aW as createLogger,
60
+ c6 as createMutationHandler,
61
+ c7 as createOrdersMutationHandler,
62
+ aS as createPdkAdmin,
63
+ aU as createPdkAdminPlugin,
64
+ c8 as createQueryHandler,
65
+ c9 as createShipmentsMutationHandler,
66
+ bM as defineAction,
67
+ bP as deleteAccountAction,
68
+ ca as doMutate,
69
+ bS as downloadLogsAction,
70
+ cb as executeAction,
71
+ cc as executeAfterHandle,
72
+ cd as executeBeforeHandle,
73
+ ce as executeHandler,
74
+ cf as executeNextAction,
75
+ bQ as fetchDynamicContextAction,
76
+ bR as fetchPluginSettingsViewContextAction,
77
+ aX as generateFieldId,
78
+ aQ as getActionIdentifier,
79
+ bV as modalCloseAction,
80
+ bW as modalSubmitFormAction,
81
+ ci as openOrPrintPdf,
82
+ av as optionalAdminActionContainerComponentNames,
83
+ aw as optionalAdminComponentNames,
84
+ ax as optionalAdminPlainWrapperComponentNames,
85
+ X as orderExportAction,
86
+ bX as orderExportToShipmentsAction,
87
+ U as orderViewInBackofficeAction,
88
+ V as ordersEditAction,
89
+ a1 as ordersExportPrintShipmentsAction,
90
+ a0 as ordersFetchAction,
91
+ $ as ordersPrintAction,
92
+ bY as ordersUpdateAction,
93
+ bZ as pluginSettingsUpdateAction,
94
+ aY as prefixComponent,
95
+ bO as refreshAccountAction,
96
+ ay as requiredAdminComponentNames,
97
+ aI as resolveFormComponent,
98
+ cg as resolveOrderParameters,
99
+ cj as resolvePrintParameters,
100
+ ch as resolveQuerySuffix,
101
+ Q as shipmentActions,
102
+ c0 as shipmentsDeleteAction,
103
+ b_ as shipmentsExportReturnAction,
104
+ c1 as shipmentsPrintAction,
105
+ b$ as shipmentsUpdateAction,
106
+ bT as switchToAcceptanceApiAction,
107
+ bU as switchToProductionApiAction,
108
+ bN as updateAccountAction,
109
+ aZ as useActionStore,
110
+ h as useAdminConfig,
111
+ b0 as useAppInfo,
112
+ b1 as useCheckboxGroupContext,
113
+ bD as useCreateWebhooksMutation,
114
+ bo as useDeleteAccountMutation,
115
+ by as useDeleteShipmentsMutation,
116
+ bE as useDeleteWebhooksMutation,
117
+ bq as useDownloadLogsMutation,
118
+ b2 as useDropOffInputContext,
119
+ b3 as useDropdownButtonContext,
120
+ b32 as useDropdownData,
121
+ aK as useElement,
122
+ b4 as useElementContext,
123
+ b5 as useElementOptions,
124
+ bt as useExportOrdersMutation,
125
+ bz as useExportReturnMutation,
126
+ bF as useFetchContextQuery,
127
+ bG as useFetchOrdersQuery,
128
+ bH as useFetchProductsQuery,
129
+ bK as useFetchShipmentsQuery,
130
+ bL as useFetchWebhooksQuery,
131
+ aL as useForm,
132
+ aM as useFormBuilder,
133
+ b6 as useFormatter,
134
+ b7 as useGlobalContext,
135
+ b8 as useGlobalPdkAdmin,
136
+ b9 as useInputWithOptionsContext,
137
+ H as useLanguage,
138
+ ba as useLoadMore,
139
+ bb as useLogger,
140
+ bc as useModalContext,
141
+ bd as useModalElementContext,
142
+ a_ as useModalStore,
143
+ be as useMultiSelectInputContext,
144
+ a$ as useNotificationStore,
145
+ G as useOrderData,
146
+ u as useOrdersData,
147
+ bC as usePdkMutation,
148
+ bu as usePrintOrdersMutation,
149
+ bA as usePrintShipmentsMutation,
150
+ bf as useProductData,
151
+ n as useQueryStore,
152
+ bg as useRadioGroupContext,
153
+ bh as useSelectInputContext,
154
+ bi as useShippingMethodsInputContext,
155
+ bj as useStoreQuery,
156
+ br as useSwitchToAcceptanceApiMutation,
157
+ bs as useSwitchToProductionApiMutation,
158
+ bk as useTableContext,
159
+ bl as useToggleInputContext,
160
+ bm as useTriStateInputContext,
161
+ bp as useUpdateAccountMutation,
162
+ bv as useUpdateOrdersMutation,
163
+ bw as useUpdatePluginSettingsMutation,
164
+ bx as useUpdateProductSettingsMutation,
165
+ bB as useUpdateShipmentsMutation,
166
+ bn as useWeekdays,
167
+ ck as waitForLabelPrompt,
168
+ c3 as webhooksCreateAction,
169
+ c4 as webhooksDeleteAction,
170
+ c2 as webhooksFetchAction
171
+ };
package/dist/style.css ADDED
@@ -0,0 +1,4 @@
1
+
2
+ .debug-hidden[data-v-9a3c93d5] {
3
+ display: none;
4
+ }
@@ -0,0 +1 @@
1
+ export * from '@myparcel-dev/pdk-admin/testing';
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@myparcel-dev/pdk-admin-js",
3
+ "version": "1.13.0",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "https://github.com/myparcelnl/js-pdk.git",
7
+ "directory": "apps/admin-js"
8
+ },
9
+ "license": "MIT",
10
+ "sideEffects": false,
11
+ "type": "module",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "default": "./src/index.ts"
16
+ },
17
+ "./testing": {
18
+ "types": "./dist/testing.d.ts",
19
+ "default": "./src/testing.ts"
20
+ }
21
+ },
22
+ "types": "./dist/index.d.ts",
23
+ "scripts": {
24
+ "build": "vite build",
25
+ "clean": "run ws:clean \"$(pwd)\"",
26
+ "test": "run ws:test \"$(pwd)\"",
27
+ "test:coverage": "run ws:test:coverage \"$(pwd)\"",
28
+ "test:run": "run ws:test:run \"$(pwd)\"",
29
+ "test:update": "run ws:test:update \"$(pwd)\""
30
+ },
31
+ "dependencies": {
32
+ "@myparcel-dev/pdk-admin": "^1.13.0"
33
+ },
34
+ "devDependencies": {
35
+ "@myparcel-dev/pdk-build-vite": "1.0.0-alpha.0",
36
+ "typescript": "^5.2.2",
37
+ "vite": "^5.4.10",
38
+ "vitest": "^2.1.3"
39
+ },
40
+ "peerDependencies": {
41
+ "vue": "^3"
42
+ },
43
+ "engines": {
44
+ "node": ">=20"
45
+ },
46
+ "volta": {
47
+ "extends": "../../package.json"
48
+ },
49
+ "publishConfig": {
50
+ "access": "public"
51
+ },
52
+ "deployGroup": "admin"
53
+ }
@@ -0,0 +1,195 @@
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
+
3
+ exports[`exports > exports from index.ts 1`] = `
4
+ [
5
+ "ActionButton",
6
+ "AdminAction",
7
+ "AdminComponent",
8
+ "AdminContextKey",
9
+ "AdminIcon",
10
+ "AdminInstanceContextKey",
11
+ "AdminModalKey",
12
+ "AdminView",
13
+ "BackendEndpoint",
14
+ "BulkSelectCheckbox",
15
+ "ChildProductSettingsView",
16
+ "FORM_KEYS",
17
+ "FORM_KEY_ACCOUNT_SETTINGS",
18
+ "FORM_KEY_CHILD_PRODUCT_SETTINGS",
19
+ "FORM_KEY_MODAL",
20
+ "FORM_KEY_MODAL_PRINT_OPTIONS",
21
+ "FORM_KEY_MODAL_RETURN_OPTIONS",
22
+ "FORM_KEY_MODAL_SHIPMENT_OPTIONS",
23
+ "FORM_KEY_PLUGIN_SETTINGS",
24
+ "FORM_KEY_PRODUCT_SETTINGS",
25
+ "FormHook",
26
+ "FrontendEndpoint",
27
+ "INJECT_ADMIN_INSTANCE",
28
+ "INJECT_GLOBAL_PDK_ADMIN",
29
+ "LogLevel",
30
+ "ModalsView",
31
+ "NotificationCategory",
32
+ "NotificationContainer",
33
+ "NotificationsView",
34
+ "OrderBoxView",
35
+ "OrderListItemView",
36
+ "PackageType",
37
+ "PdkAdmin",
38
+ "PlainElement",
39
+ "PluginSettingsView",
40
+ "ProductSettingsView",
41
+ "QUERY_KEY_ORDER",
42
+ "QUERY_KEY_SHIPMENT",
43
+ "ResetButton",
44
+ "ReturnsForm",
45
+ "ShipmentBarcode",
46
+ "ShipmentOptionsForm",
47
+ "ShipmentStatus",
48
+ "Size",
49
+ "SortType",
50
+ "Status",
51
+ "StatusIndicator",
52
+ "StopActionHandler",
53
+ "SubmitButton",
54
+ "TabNavigation",
55
+ "TriState",
56
+ "Variant",
57
+ "allAdminComponentNames",
58
+ "createAdminConfig",
59
+ "createFormElement",
60
+ "createHandlerWithParameters",
61
+ "createLogger",
62
+ "createMutationHandler",
63
+ "createOrdersMutationHandler",
64
+ "createPdkAdmin",
65
+ "createPdkAdminPlugin",
66
+ "createQueryHandler",
67
+ "createShipmentsMutationHandler",
68
+ "defineAction",
69
+ "deleteAccountAction",
70
+ "doMutate",
71
+ "downloadLogsAction",
72
+ "executeAction",
73
+ "executeAfterHandle",
74
+ "executeBeforeHandle",
75
+ "executeHandler",
76
+ "executeNextAction",
77
+ "fetchDynamicContextAction",
78
+ "fetchPluginSettingsViewContextAction",
79
+ "generateFieldId",
80
+ "getActionIdentifier",
81
+ "modalCloseAction",
82
+ "modalSubmitFormAction",
83
+ "openOrPrintPdf",
84
+ "optionalAdminActionContainerComponentNames",
85
+ "optionalAdminComponentNames",
86
+ "optionalAdminPlainWrapperComponentNames",
87
+ "orderExportAction",
88
+ "orderExportToShipmentsAction",
89
+ "orderViewInBackofficeAction",
90
+ "ordersEditAction",
91
+ "ordersExportPrintShipmentsAction",
92
+ "ordersFetchAction",
93
+ "ordersPrintAction",
94
+ "ordersUpdateAction",
95
+ "pluginSettingsUpdateAction",
96
+ "prefixComponent",
97
+ "refreshAccountAction",
98
+ "requiredAdminComponentNames",
99
+ "resolveFormComponent",
100
+ "resolveOrderParameters",
101
+ "resolvePrintParameters",
102
+ "resolveQuerySuffix",
103
+ "shipmentActions",
104
+ "shipmentsDeleteAction",
105
+ "shipmentsExportReturnAction",
106
+ "shipmentsPrintAction",
107
+ "shipmentsUpdateAction",
108
+ "switchToAcceptanceApiAction",
109
+ "switchToProductionApiAction",
110
+ "updateAccountAction",
111
+ "useActionStore",
112
+ "useAdminConfig",
113
+ "useAppInfo",
114
+ "useCheckboxGroupContext",
115
+ "useCreateWebhooksMutation",
116
+ "useDeleteAccountMutation",
117
+ "useDeleteShipmentsMutation",
118
+ "useDeleteWebhooksMutation",
119
+ "useDownloadLogsMutation",
120
+ "useDropOffInputContext",
121
+ "useDropdownButtonContext",
122
+ "useDropdownData",
123
+ "useElement",
124
+ "useElementContext",
125
+ "useElementOptions",
126
+ "useExportOrdersMutation",
127
+ "useExportReturnMutation",
128
+ "useFetchContextQuery",
129
+ "useFetchOrdersQuery",
130
+ "useFetchProductsQuery",
131
+ "useFetchShipmentsQuery",
132
+ "useFetchWebhooksQuery",
133
+ "useForm",
134
+ "useFormBuilder",
135
+ "useFormatter",
136
+ "useGlobalContext",
137
+ "useGlobalPdkAdmin",
138
+ "useInputWithOptionsContext",
139
+ "useLanguage",
140
+ "useLoadMore",
141
+ "useLogger",
142
+ "useModalContext",
143
+ "useModalElementContext",
144
+ "useModalStore",
145
+ "useMultiSelectInputContext",
146
+ "useNotificationStore",
147
+ "useOrderData",
148
+ "useOrdersData",
149
+ "usePdkMutation",
150
+ "usePrintOrdersMutation",
151
+ "usePrintShipmentsMutation",
152
+ "useProductData",
153
+ "useQueryStore",
154
+ "useRadioGroupContext",
155
+ "useSelectInputContext",
156
+ "useShippingMethodsInputContext",
157
+ "useStoreQuery",
158
+ "useSwitchToAcceptanceApiMutation",
159
+ "useSwitchToProductionApiMutation",
160
+ "useTableContext",
161
+ "useToggleInputContext",
162
+ "useTriStateInputContext",
163
+ "useUpdateAccountMutation",
164
+ "useUpdateOrdersMutation",
165
+ "useUpdatePluginSettingsMutation",
166
+ "useUpdateProductSettingsMutation",
167
+ "useUpdateShipmentsMutation",
168
+ "useWeekdays",
169
+ "waitForLabelPrompt",
170
+ "webhooksCreateAction",
171
+ "webhooksDeleteAction",
172
+ "webhooksFetchAction",
173
+ ]
174
+ `;
175
+
176
+ exports[`exports > exports from testing.ts 1`] = `
177
+ [
178
+ "doComponentTestSetup",
179
+ "doComponentTestTeardown",
180
+ "mockDefaultAccount",
181
+ "mockDefaultAppConfig",
182
+ "mockDefaultAppInfo",
183
+ "mockDefaultCarriers",
184
+ "mockDefaultConfig",
185
+ "mockDefaultDynamicContext",
186
+ "mockDefaultEndpoints",
187
+ "mockDefaultGlobalContext",
188
+ "mockDefaultLogger",
189
+ "mockDefaultPlatform",
190
+ "mockDefaultPluginSettings",
191
+ "mockDefaultPrintOptionsView",
192
+ "mockDefaultShop",
193
+ "mockDefaultTranslations",
194
+ ]
195
+ `;
@@ -0,0 +1,13 @@
1
+ import {describe, expect, it} from 'vitest';
2
+ import * as testing from '../testing';
3
+ import * as index from '../index';
4
+
5
+ describe('exports', () => {
6
+ it('exports from index.ts', () => {
7
+ expect(Object.keys(index).sort()).toMatchSnapshot();
8
+ });
9
+
10
+ it('exports from testing.ts', () => {
11
+ expect(Object.keys(testing).sort()).toMatchSnapshot();
12
+ });
13
+ });
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from '@myparcel-dev/pdk-admin';
package/src/testing.ts ADDED
@@ -0,0 +1 @@
1
+ export * from '@myparcel-dev/pdk-admin/testing';
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "include": ["./src"]
4
+ }
package/vite.config.ts ADDED
@@ -0,0 +1,41 @@
1
+ import isCi from 'is-ci';
2
+ import {type BaseElementNode, type Node} from '@vue/compiler-core';
3
+ import vue from '@vitejs/plugin-vue';
4
+ import {createViteConfig} from '@myparcel-dev/pdk-build-vite';
5
+ import {isOfType} from '@myparcel-dev/ts-utils';
6
+ import {codecovVitePlugin} from '@codecov/vite-plugin';
7
+ import {name} from './package.json';
8
+
9
+ const PROP_TYPE_DIRECTIVE = 7;
10
+
11
+ const stripDirective = (name: string) => (node: Node) => {
12
+ if (!isOfType<BaseElementNode>(node, 'props')) {
13
+ return;
14
+ }
15
+
16
+ node.props = node.props.filter((prop) => {
17
+ return !(prop?.type === PROP_TYPE_DIRECTIVE && prop?.name === name);
18
+ });
19
+ };
20
+
21
+ export default createViteConfig((env) => ({
22
+ plugins: [
23
+ codecovVitePlugin({
24
+ enableBundleAnalysis: isCi && process.env.CODECOV_TOKEN !== undefined,
25
+ bundleName: name,
26
+ uploadToken: process.env.CODECOV_TOKEN,
27
+ }),
28
+
29
+ vue({
30
+ template: {
31
+ compilerOptions: {
32
+ nodeTransforms: env.mode === 'production' ? [stripDirective('test')] : [],
33
+ },
34
+ },
35
+ }),
36
+ ],
37
+
38
+ build: {
39
+ minify: false,
40
+ },
41
+ }));