@kshon/draft-order 2.14.2

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
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // noop, for compiler options
4
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSw2QkFBNkIifQ==
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGF5bG9hZHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvdHlwZXMvaHR0cC9kcmFmdC1vcmRlcnMvcGF5bG9hZHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzcG9uc2VzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL3R5cGVzL2h0dHAvZHJhZnQtb3JkZXJzL3Jlc3BvbnNlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW50aXR5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL3R5cGVzL2h0dHAvb3JkZXJzL2VudGl0eS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVxdWVzdHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvdHlwZXMvaHR0cC9vcmRlcnMvcmVxdWVzdHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const ui_preset_1 = __importDefault(require("@medusajs/ui-preset"));
7
+ const config = {
8
+ content: ["./src/admin/**/*.{ts,tsx}"],
9
+ presets: [ui_preset_1.default],
10
+ };
11
+ exports.default = config;
12
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFpbHdpbmQuY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdGFpbHdpbmQuY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsb0VBQXlDO0FBR3pDLE1BQU0sTUFBTSxHQUFXO0lBQ3JCLE9BQU8sRUFBRSxDQUFDLDJCQUEyQixDQUFDO0lBQ3RDLE9BQU8sRUFBRSxDQUFDLG1CQUFNLENBQUM7Q0FDbEIsQ0FBQztBQUVGLGtCQUFlLE1BQU0sQ0FBQyJ9
package/README.md ADDED
@@ -0,0 +1,86 @@
1
+ <p align="center">
2
+ <a href="https://www.medusajs.com">
3
+ <picture>
4
+ <source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/59018053/229103275-b5e482bb-4601-46e6-8142-244f531cebdb.svg">
5
+ <source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/59018053/229103726-e5b529a3-9b3f-4970-8a1f-c6af37f087bf.svg">
6
+ <img alt="Medusa logo" src="https://user-images.githubusercontent.com/59018053/229103726-e5b529a3-9b3f-4970-8a1f-c6af37f087bf.svg">
7
+ </picture>
8
+ </a>
9
+ </p>
10
+ <h1 align="center">
11
+ Draft Order Plugin
12
+ </h1>
13
+
14
+ <h4 align="center">
15
+ <a href="https://docs.medusajs.com">Documentation</a> |
16
+ <a href="https://www.medusajs.com">Website</a>
17
+ </h4>
18
+
19
+ <p align="center">
20
+ Create and manage draft orders on behalf of customers in Medusa
21
+ </p>
22
+ <p align="center">
23
+ <a href="https://github.com/medusajs/medusa/blob/master/CONTRIBUTING.md">
24
+ <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat" alt="PRs welcome!" />
25
+ </a>
26
+ <a href="https://www.producthunt.com/posts/medusa"><img src="https://img.shields.io/badge/Product%20Hunt-%231%20Product%20of%20the%20Day-%23DA552E" alt="Product Hunt"></a>
27
+ <a href="https://discord.gg/xpCwq3Kfn8">
28
+ <img src="https://img.shields.io/badge/chat-on%20discord-7289DA.svg" alt="Discord Chat" />
29
+ </a>
30
+ <a href="https://twitter.com/intent/follow?screen_name=medusajs">
31
+ <img src="https://img.shields.io/twitter/follow/medusajs.svg?label=Follow%20@medusajs" alt="Follow @medusajs" />
32
+ </a>
33
+ </p>
34
+
35
+ ## Overview
36
+
37
+ The Draft Order Plugin enables admin users to create and manage orders on behalf of customers. This is particularly useful for customer support scenarios or when customers place orders offline.
38
+
39
+ ## Features
40
+
41
+ - **Create draft orders** from the Medusa Admin dashboard
42
+ - **Manage items** in draft orders (add, update, remove)
43
+ - **Add shipping methods** to draft orders
44
+ - **Associate customers** with draft orders
45
+ - **Convert draft orders** to regular orders for purchase completion
46
+
47
+
48
+ ## Installation
49
+
50
+ 1. Install the Draft Order plugin
51
+ ```
52
+ yarn add @medusajs/draft-order
53
+ ```
54
+ 2. Configure the plugin in your medusa-config.ts
55
+ ```
56
+ module.exports = defineConfig({
57
+ projectConfig: {
58
+ ...
59
+ },
60
+ plugins: [
61
+ {
62
+ resolve: "@medusajs/draft-order",
63
+ options: {},
64
+ },
65
+ ],
66
+ })
67
+ ```
68
+ 3. Start your server
69
+
70
+ ## Requirements
71
+ - Medusa application version >= 2.4.0
72
+
73
+ ## Support
74
+
75
+ ## Community & Contributions
76
+
77
+ The community and core team are available in [GitHub Discussions](https://github.com/medusajs/medusa/discussions), where you can ask for support, discuss roadmap, and share ideas.
78
+
79
+ Join our [Discord server](https://discord.com/invite/medusajs) to meet other community members.
80
+
81
+ ## Other channels
82
+
83
+ - [GitHub Issues](https://github.com/medusajs/medusa/issues)
84
+ - [Twitter](https://twitter.com/medusajs)
85
+ - [LinkedIn](https://www.linkedin.com/company/medusajs)
86
+ - [Medusa Blog](https://medusajs.com/blog/)
package/package.json ADDED
@@ -0,0 +1,106 @@
1
+ {
2
+ "name": "@kshon/draft-order",
3
+ "version": "2.14.2",
4
+ "description": "A draft order plugin for Medusa.",
5
+ "author": "Medusa (https://medusajs.com)",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/medusajs/medusa",
10
+ "directory": "packages/plugins/draft-order"
11
+ },
12
+ "files": [
13
+ ".medusa/server"
14
+ ],
15
+ "exports": {
16
+ "./package.json": "./package.json",
17
+ "./workflows": "./.medusa/server/src/workflows/index.js",
18
+ "./.medusa/server/src/modules/*": "./.medusa/server/src/modules/*/index.js",
19
+ "./modules/*": "./.medusa/server/src/modules/*/index.js",
20
+ "./providers/*": "./.medusa/server/src/providers/*/index.js",
21
+ "./*": "./.medusa/server/src/*.js",
22
+ "./admin": {
23
+ "import": "./.medusa/server/src/admin/index.mjs",
24
+ "require": "./.medusa/server/src/admin/index.js",
25
+ "default": "./.medusa/server/src/admin/index.js"
26
+ }
27
+ },
28
+ "keywords": [
29
+ "medusa",
30
+ "plugin",
31
+ "medusa-plugin-other",
32
+ "medusa-plugin",
33
+ "medusa-v2"
34
+ ],
35
+ "scripts": {
36
+ "build": "medusa plugin:build",
37
+ "dev": "medusa plugin:develop",
38
+ "prepare": "cross-env NODE_ENV=production yarn run build",
39
+ "link:watch": "medusa plugin:publish && medusa plugin:develop"
40
+ },
41
+ "dependencies": {
42
+ "@ariakit/react": "^0.4.15",
43
+ "@babel/runtime": "^7.26.10",
44
+ "@hookform/resolvers": "3.4.2",
45
+ "@kshon/js-sdk": "2.14.2",
46
+ "@tanstack/react-query": "5.64.2",
47
+ "@uiw/react-json-view": "^2.0.0-alpha.17",
48
+ "date-fns": "^3.6.0",
49
+ "lodash.debounce": "^4.0.8",
50
+ "lodash.isequal": "^4.5.0",
51
+ "match-sorter": "^6.3.4",
52
+ "radix-ui": "1.1.2",
53
+ "react-hook-form": "7.49.1"
54
+ },
55
+ "devDependencies": {
56
+ "@kshon/admin-sdk": "2.14.2",
57
+ "@kshon/cli": "2.14.2",
58
+ "@kshon/framework": "2.14.2",
59
+ "@kshon/icons": "2.14.2",
60
+ "@kshon/test-utils": "2.14.2",
61
+ "@kshon/types": "2.14.2",
62
+ "@kshon/ui": "4.1.9",
63
+ "@kshon/ui-preset": "2.14.2"
64
+ },
65
+ "peerDependencies": {
66
+ "@kshon/admin-sdk": "2.14.2",
67
+ "@kshon/cli": "2.14.2",
68
+ "@kshon/framework": "2.14.2",
69
+ "@kshon/icons": "2.14.2",
70
+ "@kshon/test-utils": "2.14.2",
71
+ "@kshon/ui": "4.1.9",
72
+ "react": "^18.3.1",
73
+ "react-dom": "^18.3.1",
74
+ "react-router-dom": "6.30.3"
75
+ },
76
+ "peerDependenciesMeta": {
77
+ "@kshon/admin-sdk": {
78
+ "optional": true
79
+ },
80
+ "@kshon/cli": {
81
+ "optional": true
82
+ },
83
+ "@kshon/icons": {
84
+ "optional": true
85
+ },
86
+ "@kshon/test-utils": {
87
+ "optional": true
88
+ },
89
+ "@kshon/ui": {
90
+ "optional": true
91
+ },
92
+ "react": {
93
+ "optional": true
94
+ },
95
+ "react-dom": {
96
+ "optional": true
97
+ },
98
+ "react-router-dom": {
99
+ "optional": true
100
+ }
101
+ },
102
+ "engines": {
103
+ "node": ">=20"
104
+ },
105
+ "packageManager": "yarn@3.2.1"
106
+ }