@lodashventure/medusa-product-content 1.1.11 → 1.1.13

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/dist/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export { PRODUCT_CONTENT_MODULE } from "./modules/product-content";
package/dist/index.js DELETED
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PRODUCT_CONTENT_MODULE = void 0;
4
- // Export the module name for use in medusa-config
5
- var product_content_1 = require("./modules/product-content");
6
- Object.defineProperty(exports, "PRODUCT_CONTENT_MODULE", { enumerable: true, get: function () { return product_content_1.PRODUCT_CONTENT_MODULE; } });
@@ -1,21 +0,0 @@
1
- import ProductContentModuleService from "./service";
2
- export declare const PRODUCT_CONTENT_MODULE = "productContentCustom";
3
- declare const _default: import("@medusajs/types").ModuleExports<typeof ProductContentModuleService> & {
4
- linkable: {
5
- readonly productContent: {
6
- id: {
7
- serviceName: "productContentCustom";
8
- field: "productContent";
9
- linkable: "product_content_id";
10
- primaryKey: "id";
11
- };
12
- toJSON: () => {
13
- serviceName: "productContentCustom";
14
- field: "productContent";
15
- linkable: "product_content_id";
16
- primaryKey: "id";
17
- };
18
- };
19
- };
20
- };
21
- export default _default;
@@ -1,12 +0,0 @@
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
- exports.PRODUCT_CONTENT_MODULE = void 0;
7
- const utils_1 = require("@medusajs/framework/utils");
8
- const service_1 = __importDefault(require("./service"));
9
- exports.PRODUCT_CONTENT_MODULE = "productContentCustom";
10
- exports.default = (0, utils_1.Module)(exports.PRODUCT_CONTENT_MODULE, {
11
- service: service_1.default,
12
- });
@@ -1,7 +0,0 @@
1
- export declare const ProductContent: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
2
- id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
3
- product_id: import("@medusajs/framework/utils").TextProperty;
4
- long_description: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
5
- specifications: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
6
- metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
7
- }>, "product_content">;
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProductContent = void 0;
4
- const utils_1 = require("@medusajs/framework/utils");
5
- exports.ProductContent = utils_1.model
6
- .define("product_content", {
7
- id: utils_1.model.id().primaryKey(),
8
- product_id: utils_1.model.text().unique(),
9
- long_description: utils_1.model.json().nullable(),
10
- specifications: utils_1.model.json().nullable(),
11
- metadata: utils_1.model.json().nullable(),
12
- })
13
- .indexes([
14
- {
15
- on: ["product_id"],
16
- unique: true,
17
- },
18
- ]);
@@ -1,12 +0,0 @@
1
- declare const ProductContentModuleService_base: import("@medusajs/framework/utils").MedusaServiceReturnType<import("@medusajs/framework/utils").ModelConfigurationsToConfigTemplate<{
2
- readonly ProductContent: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
3
- id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
4
- product_id: import("@medusajs/framework/utils").TextProperty;
5
- long_description: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
6
- specifications: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
7
- metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
8
- }>, "product_content">;
9
- }>>;
10
- export default class ProductContentModuleService extends ProductContentModuleService_base {
11
- }
12
- export {};
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const utils_1 = require("@medusajs/framework/utils");
4
- const product_content_1 = require("./models/product-content");
5
- class ProductContentModuleService extends (0, utils_1.MedusaService)({
6
- ProductContent: product_content_1.ProductContent,
7
- }) {
8
- }
9
- exports.default = ProductContentModuleService;
@@ -1,173 +0,0 @@
1
- /**
2
- * Type definitions for Product Content Manager plugin
3
- */
4
- import type { ReactNode } from "react";
5
- export interface LongDescription {
6
- html: string;
7
- richjson?: Record<string, any>;
8
- locale: string;
9
- updated_by?: string;
10
- updated_at?: string;
11
- }
12
- export interface LongDescriptionVersion extends LongDescription {
13
- version: number;
14
- created_at: string;
15
- }
16
- export interface SpecI18n {
17
- key: string;
18
- value: string;
19
- }
20
- export interface SpecItem {
21
- position: number;
22
- i18n: Record<string, SpecI18n>;
23
- visible: boolean;
24
- }
25
- export interface SpecGroupI18n {
26
- label: string;
27
- }
28
- export interface SpecGroup {
29
- key: string;
30
- position: number;
31
- i18n: Record<string, SpecGroupI18n>;
32
- items: SpecItem[];
33
- }
34
- export interface ProductSpecs {
35
- default_locale: string;
36
- groups: SpecGroup[];
37
- }
38
- export interface ProductContentMetadata {
39
- long_description?: LongDescription;
40
- long_description_versions?: LongDescriptionVersion[];
41
- specs?: ProductSpecs;
42
- content_last_updated?: string;
43
- content_updated_by?: string;
44
- }
45
- export interface EnhancedProduct {
46
- id: string;
47
- title: string;
48
- subtitle?: string | null;
49
- handle: string;
50
- description?: string | null;
51
- status: string;
52
- type?: {
53
- id: string;
54
- value: string;
55
- } | null;
56
- variants?: any[];
57
- options?: any[];
58
- images?: any[];
59
- collection?: any;
60
- categories?: any[];
61
- tags?: any[];
62
- metadata: ProductContentMetadata;
63
- }
64
- export interface ImportExportConfig {
65
- format: "csv" | "json";
66
- encoding?: string;
67
- delimiter?: string;
68
- includeHeaders?: boolean;
69
- }
70
- export interface SpecImportRow {
71
- product_id?: string;
72
- group: string;
73
- [key: `key.${string}`]: string;
74
- [key: `value.${string}`]: string;
75
- position?: number;
76
- visible?: boolean;
77
- }
78
- export interface LocaleConfig {
79
- code: string;
80
- label: string;
81
- isDefault?: boolean;
82
- direction?: "ltr" | "rtl";
83
- }
84
- export interface EditorConfig {
85
- maxLength?: number;
86
- allowedTags?: string[];
87
- allowedAttributes?: Record<string, string[]>;
88
- uploadEndpoint?: string;
89
- placeholder?: string;
90
- }
91
- export interface PluginConfig {
92
- locales?: LocaleConfig[];
93
- defaultLocale?: string;
94
- editor?: EditorConfig;
95
- versioning?: {
96
- enabled?: boolean;
97
- maxVersions?: number;
98
- };
99
- sanitization?: {
100
- allowedTags?: string[];
101
- allowedAttributes?: Record<string, string[]>;
102
- removeScripts?: boolean;
103
- removeStyles?: boolean;
104
- };
105
- }
106
- export interface TabProps {
107
- product: EnhancedProduct;
108
- isLoading?: boolean;
109
- onUpdate?: (updates: Partial<ProductContentMetadata>) => Promise<void>;
110
- config?: PluginConfig;
111
- }
112
- export interface EditorToolbarButton {
113
- icon: ReactNode;
114
- label: string;
115
- command: string;
116
- isActive?: boolean;
117
- isDisabled?: boolean;
118
- }
119
- export interface SpecTableColumn {
120
- id: string;
121
- header: string;
122
- accessor: string | ((row: any) => any);
123
- width?: number | string;
124
- sortable?: boolean;
125
- editable?: boolean;
126
- }
127
- export interface ImportValidationError {
128
- row: number;
129
- field: string;
130
- message: string;
131
- value?: any;
132
- }
133
- export interface ImportValidationResult {
134
- isValid: boolean;
135
- errors: ImportValidationError[];
136
- warnings?: ImportValidationError[];
137
- processedRows?: number;
138
- }
139
- export type SortDirection = "asc" | "desc";
140
- export interface SortConfig {
141
- field: string;
142
- direction: SortDirection;
143
- }
144
- export interface FilterConfig {
145
- field: string;
146
- operator: "equals" | "contains" | "startsWith" | "endsWith";
147
- value: any;
148
- }
149
- export interface PaginationConfig {
150
- page: number;
151
- pageSize: number;
152
- total?: number;
153
- }
154
- export interface LocaleUtils {
155
- getLocaleLabel: (code: string) => string;
156
- parseLocaleCode: (code: string) => {
157
- language: string;
158
- region?: string;
159
- };
160
- getLanguageFromLocale: (code: string) => string;
161
- getFallbackLocale: (locale: string, availableLocales: string[], defaultLocale: string) => string;
162
- calculateLocaleCompleteness: (specs: ProductSpecs, locale: string) => number;
163
- }
164
- export interface DragEndEvent {
165
- destination?: {
166
- index: number;
167
- };
168
- source: {
169
- index: number;
170
- };
171
- draggableId: string;
172
- type: string;
173
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * Type definitions for Product Content Manager plugin
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });