@acmekit/admin-shared 2.13.1
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/README.md +1 -0
- package/dist/index.d.mts +83 -0
- package/dist/index.d.ts +83 -0
- package/dist/index.js +446 -0
- package/dist/index.mjs +391 -0
- package/package.json +22 -0
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# @acmekit/admin-shared
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
declare const PRODUCT_CUSTOM_FIELD_MODEL: "product";
|
|
2
|
+
declare const PRODUCT_CUSTOM_FIELD_FORM_ZONES: readonly ["create", "edit", "organize", "attributes"];
|
|
3
|
+
declare const PRODUCT_CUSTOM_FIELD_CREATE_FORM_TABS: readonly ["general", "organize"];
|
|
4
|
+
declare const PRODUCT_CUSTOM_FIELD_FORM_TABS: readonly ["general", "organize"];
|
|
5
|
+
declare const PRODUCT_CUSTOM_FIELD_DISPLAY_ZONES: readonly ["general", "organize", "attributes"];
|
|
6
|
+
declare const PRODUCT_CUSTOM_FIELD_LINK_PATHS: readonly ["product.$link"];
|
|
7
|
+
declare const PRODUCT_CUSTOM_FIELD_FORM_CONFIG_PATHS: readonly string[];
|
|
8
|
+
declare const PRODUCT_CUSTOM_FIELD_FORM_FIELD_PATHS: readonly string[];
|
|
9
|
+
declare const PRODUCT_CUSTOM_FIELD_DISPLAY_PATHS: readonly string[];
|
|
10
|
+
|
|
11
|
+
type ProductFormZone = (typeof PRODUCT_CUSTOM_FIELD_FORM_ZONES)[number];
|
|
12
|
+
type ProductFormTab = (typeof PRODUCT_CUSTOM_FIELD_FORM_TABS)[number];
|
|
13
|
+
type ProductDisplayZone = (typeof PRODUCT_CUSTOM_FIELD_DISPLAY_ZONES)[number];
|
|
14
|
+
|
|
15
|
+
declare const CUSTOM_FIELD_MODELS: readonly ["product"];
|
|
16
|
+
declare const CUSTOM_FIELD_CONTAINER_ZONES: readonly ["general", "organize", "attributes"];
|
|
17
|
+
declare const CUSTOM_FIELD_FORM_ZONES: readonly ["create", "edit", "organize", "attributes"];
|
|
18
|
+
declare const CUSTOM_FIELD_FORM_TABS: readonly ["general", "organize"];
|
|
19
|
+
|
|
20
|
+
type CustomFieldModel = (typeof CUSTOM_FIELD_MODELS)[number];
|
|
21
|
+
type CustomFieldFormZone = (typeof CUSTOM_FIELD_FORM_ZONES)[number];
|
|
22
|
+
type CustomFieldFormTab = (typeof CUSTOM_FIELD_FORM_TABS)[number];
|
|
23
|
+
type CustomFieldContainerZone = (typeof CUSTOM_FIELD_CONTAINER_ZONES)[number];
|
|
24
|
+
type CustomFieldZone = CustomFieldFormZone | CustomFieldContainerZone;
|
|
25
|
+
type CustomFieldImportType = "display" | "field" | "link" | "config";
|
|
26
|
+
interface CustomFieldModelFormMap {
|
|
27
|
+
product: ProductFormZone;
|
|
28
|
+
}
|
|
29
|
+
interface CustomFieldModelContainerMap {
|
|
30
|
+
product: ProductDisplayZone;
|
|
31
|
+
}
|
|
32
|
+
type CustomFieldModelFormTabsMap = {
|
|
33
|
+
product: {
|
|
34
|
+
create: ProductFormTab;
|
|
35
|
+
edit: never;
|
|
36
|
+
organize: never;
|
|
37
|
+
attributes: never;
|
|
38
|
+
};
|
|
39
|
+
customer: {
|
|
40
|
+
create: never;
|
|
41
|
+
edit: never;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
type CustomFieldFormKeys<T extends CustomFieldModel> = CustomFieldModelFormMap[T];
|
|
45
|
+
|
|
46
|
+
declare function isValidCustomFieldModel(id: any): id is CustomFieldModel;
|
|
47
|
+
declare function isValidCustomFieldFormZone(id: any): id is CustomFieldFormZone;
|
|
48
|
+
declare function isValidCustomFieldFormTab(id: any): id is CustomFieldFormTab;
|
|
49
|
+
declare function isValidCustomFieldDisplayZone(id: any): id is CustomFieldContainerZone;
|
|
50
|
+
declare function isValidCustomFieldDisplayPath(id: any): id is string;
|
|
51
|
+
declare function isValidCustomFieldFormConfigPath(id: any): id is string;
|
|
52
|
+
declare function isValidCustomFieldFormFieldPath(id: any): id is string;
|
|
53
|
+
declare function isValidCustomFieldLinkPath(id: any): id is string;
|
|
54
|
+
|
|
55
|
+
declare const NESTED_ROUTE_POSITIONS: readonly ["/orders", "/products", "/inventory", "/customers", "/promotions", "/price-lists"];
|
|
56
|
+
|
|
57
|
+
type NestedRoutePosition = (typeof NESTED_ROUTE_POSITIONS)[number];
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* All valid injection zones in the admin panel. An injection zone is a specific place
|
|
61
|
+
* in the admin panel where a plugin can inject custom widgets.
|
|
62
|
+
*/
|
|
63
|
+
declare const INJECTION_ZONES: readonly ["order.details.before", "order.details.after", "order.details.side.before", "order.details.side.after", "order.list.before", "order.list.after", "customer.details.before", "customer.details.after", "customer.details.side.before", "customer.details.side.after", "customer.list.before", "customer.list.after", "customer_group.details.before", "customer_group.details.after", "customer_group.list.before", "customer_group.list.after", "product.details.before", "product.details.after", "product.list.before", "product.list.after", "product.details.side.before", "product.details.side.after", "product_variant.details.before", "product_variant.details.after", "product_variant.details.side.before", "product_variant.details.side.after", "product_collection.details.before", "product_collection.details.after", "product_collection.list.before", "product_collection.list.after", "product_category.details.before", "product_category.details.after", "product_category.details.side.before", "product_category.details.side.after", "product_category.list.before", "product_category.list.after", "product_type.details.before", "product_type.details.after", "product_type.list.before", "product_type.list.after", "shipping_option_type.details.before", "shipping_option_type.details.after", "shipping_option_type.list.before", "shipping_option_type.list.after", "product_tag.details.before", "product_tag.details.after", "product_tag.list.before", "product_tag.list.after", "price_list.details.before", "price_list.details.after", "price_list.details.side.before", "price_list.details.side.after", "price_list.list.before", "price_list.list.after", "promotion.details.before", "promotion.details.after", "promotion.details.side.before", "promotion.details.side.after", "promotion.list.before", "promotion.list.after", "user.details.before", "user.details.after", "user.list.before", "user.list.after", "store.details.before", "store.details.after", "profile.details.before", "profile.details.after", "region.details.before", "region.details.after", "region.list.before", "region.list.after", "shipping_profile.details.before", "shipping_profile.details.after", "shipping_profile.list.before", "shipping_profile.list.after", "location.details.before", "location.details.after", "location.details.side.before", "location.details.side.after", "location.list.before", "location.list.after", "location.list.side.before", "location.list.side.after", "login.before", "login.after", "sales_channel.details.before", "sales_channel.details.after", "sales_channel.list.before", "sales_channel.list.after", "reservation.details.before", "reservation.details.after", "reservation.details.side.before", "reservation.details.side.after", "reservation.list.before", "reservation.list.after", "api_key.details.before", "api_key.details.after", "api_key.list.before", "api_key.list.after", "workflow.details.before", "workflow.details.after", "workflow.list.before", "workflow.list.after", "campaign.details.before", "campaign.details.after", "campaign.details.side.before", "campaign.details.side.after", "campaign.list.before", "campaign.list.after", "tax.details.before", "tax.details.after", "tax.list.before", "tax.list.after", "return_reason.list.before", "return_reason.list.after", "refund_reason.list.before", "refund_reason.list.after", "inventory_item.details.before", "inventory_item.details.after", "inventory_item.details.side.before", "inventory_item.details.side.after", "inventory_item.list.before", "inventory_item.list.after"];
|
|
64
|
+
|
|
65
|
+
type InjectionZone = (typeof INJECTION_ZONES)[number];
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Validates that the provided zone is a valid injection zone for a widget.
|
|
69
|
+
*/
|
|
70
|
+
declare function isValidInjectionZone(zone: any): zone is InjectionZone;
|
|
71
|
+
|
|
72
|
+
declare const LINK_VIRTUAL_MODULE = "virtual:acmekit/links";
|
|
73
|
+
declare const FORM_VIRTUAL_MODULE = "virtual:acmekit/forms";
|
|
74
|
+
declare const DISPLAY_VIRTUAL_MODULE = "virtual:acmekit/displays";
|
|
75
|
+
declare const ROUTE_VIRTUAL_MODULE = "virtual:acmekit/routes";
|
|
76
|
+
declare const MENU_ITEM_VIRTUAL_MODULE = "virtual:acmekit/menu-items";
|
|
77
|
+
declare const WIDGET_VIRTUAL_MODULE = "virtual:acmekit/widgets";
|
|
78
|
+
declare const I18N_VIRTUAL_MODULE = "virtual:acmekit/i18n";
|
|
79
|
+
declare const VIRTUAL_MODULES: readonly ["virtual:acmekit/links", "virtual:acmekit/forms", "virtual:acmekit/displays", "virtual:acmekit/routes", "virtual:acmekit/menu-items", "virtual:acmekit/widgets", "virtual:acmekit/i18n"];
|
|
80
|
+
|
|
81
|
+
declare function deepMerge(target: any, source: any): any;
|
|
82
|
+
|
|
83
|
+
export { type CustomFieldContainerZone, type CustomFieldFormKeys, type CustomFieldFormTab, type CustomFieldFormZone, type CustomFieldImportType, type CustomFieldModel, type CustomFieldModelContainerMap, type CustomFieldModelFormMap, type CustomFieldModelFormTabsMap, type CustomFieldZone, DISPLAY_VIRTUAL_MODULE, FORM_VIRTUAL_MODULE, I18N_VIRTUAL_MODULE, INJECTION_ZONES, type InjectionZone, LINK_VIRTUAL_MODULE, MENU_ITEM_VIRTUAL_MODULE, NESTED_ROUTE_POSITIONS, type NestedRoutePosition, PRODUCT_CUSTOM_FIELD_CREATE_FORM_TABS, PRODUCT_CUSTOM_FIELD_DISPLAY_PATHS, PRODUCT_CUSTOM_FIELD_DISPLAY_ZONES, PRODUCT_CUSTOM_FIELD_FORM_CONFIG_PATHS, PRODUCT_CUSTOM_FIELD_FORM_FIELD_PATHS, PRODUCT_CUSTOM_FIELD_FORM_TABS, PRODUCT_CUSTOM_FIELD_FORM_ZONES, PRODUCT_CUSTOM_FIELD_LINK_PATHS, PRODUCT_CUSTOM_FIELD_MODEL, type ProductDisplayZone, type ProductFormTab, type ProductFormZone, ROUTE_VIRTUAL_MODULE, VIRTUAL_MODULES, WIDGET_VIRTUAL_MODULE, deepMerge, isValidCustomFieldDisplayPath, isValidCustomFieldDisplayZone, isValidCustomFieldFormConfigPath, isValidCustomFieldFormFieldPath, isValidCustomFieldFormTab, isValidCustomFieldFormZone, isValidCustomFieldLinkPath, isValidCustomFieldModel, isValidInjectionZone };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
declare const PRODUCT_CUSTOM_FIELD_MODEL: "product";
|
|
2
|
+
declare const PRODUCT_CUSTOM_FIELD_FORM_ZONES: readonly ["create", "edit", "organize", "attributes"];
|
|
3
|
+
declare const PRODUCT_CUSTOM_FIELD_CREATE_FORM_TABS: readonly ["general", "organize"];
|
|
4
|
+
declare const PRODUCT_CUSTOM_FIELD_FORM_TABS: readonly ["general", "organize"];
|
|
5
|
+
declare const PRODUCT_CUSTOM_FIELD_DISPLAY_ZONES: readonly ["general", "organize", "attributes"];
|
|
6
|
+
declare const PRODUCT_CUSTOM_FIELD_LINK_PATHS: readonly ["product.$link"];
|
|
7
|
+
declare const PRODUCT_CUSTOM_FIELD_FORM_CONFIG_PATHS: readonly string[];
|
|
8
|
+
declare const PRODUCT_CUSTOM_FIELD_FORM_FIELD_PATHS: readonly string[];
|
|
9
|
+
declare const PRODUCT_CUSTOM_FIELD_DISPLAY_PATHS: readonly string[];
|
|
10
|
+
|
|
11
|
+
type ProductFormZone = (typeof PRODUCT_CUSTOM_FIELD_FORM_ZONES)[number];
|
|
12
|
+
type ProductFormTab = (typeof PRODUCT_CUSTOM_FIELD_FORM_TABS)[number];
|
|
13
|
+
type ProductDisplayZone = (typeof PRODUCT_CUSTOM_FIELD_DISPLAY_ZONES)[number];
|
|
14
|
+
|
|
15
|
+
declare const CUSTOM_FIELD_MODELS: readonly ["product"];
|
|
16
|
+
declare const CUSTOM_FIELD_CONTAINER_ZONES: readonly ["general", "organize", "attributes"];
|
|
17
|
+
declare const CUSTOM_FIELD_FORM_ZONES: readonly ["create", "edit", "organize", "attributes"];
|
|
18
|
+
declare const CUSTOM_FIELD_FORM_TABS: readonly ["general", "organize"];
|
|
19
|
+
|
|
20
|
+
type CustomFieldModel = (typeof CUSTOM_FIELD_MODELS)[number];
|
|
21
|
+
type CustomFieldFormZone = (typeof CUSTOM_FIELD_FORM_ZONES)[number];
|
|
22
|
+
type CustomFieldFormTab = (typeof CUSTOM_FIELD_FORM_TABS)[number];
|
|
23
|
+
type CustomFieldContainerZone = (typeof CUSTOM_FIELD_CONTAINER_ZONES)[number];
|
|
24
|
+
type CustomFieldZone = CustomFieldFormZone | CustomFieldContainerZone;
|
|
25
|
+
type CustomFieldImportType = "display" | "field" | "link" | "config";
|
|
26
|
+
interface CustomFieldModelFormMap {
|
|
27
|
+
product: ProductFormZone;
|
|
28
|
+
}
|
|
29
|
+
interface CustomFieldModelContainerMap {
|
|
30
|
+
product: ProductDisplayZone;
|
|
31
|
+
}
|
|
32
|
+
type CustomFieldModelFormTabsMap = {
|
|
33
|
+
product: {
|
|
34
|
+
create: ProductFormTab;
|
|
35
|
+
edit: never;
|
|
36
|
+
organize: never;
|
|
37
|
+
attributes: never;
|
|
38
|
+
};
|
|
39
|
+
customer: {
|
|
40
|
+
create: never;
|
|
41
|
+
edit: never;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
type CustomFieldFormKeys<T extends CustomFieldModel> = CustomFieldModelFormMap[T];
|
|
45
|
+
|
|
46
|
+
declare function isValidCustomFieldModel(id: any): id is CustomFieldModel;
|
|
47
|
+
declare function isValidCustomFieldFormZone(id: any): id is CustomFieldFormZone;
|
|
48
|
+
declare function isValidCustomFieldFormTab(id: any): id is CustomFieldFormTab;
|
|
49
|
+
declare function isValidCustomFieldDisplayZone(id: any): id is CustomFieldContainerZone;
|
|
50
|
+
declare function isValidCustomFieldDisplayPath(id: any): id is string;
|
|
51
|
+
declare function isValidCustomFieldFormConfigPath(id: any): id is string;
|
|
52
|
+
declare function isValidCustomFieldFormFieldPath(id: any): id is string;
|
|
53
|
+
declare function isValidCustomFieldLinkPath(id: any): id is string;
|
|
54
|
+
|
|
55
|
+
declare const NESTED_ROUTE_POSITIONS: readonly ["/orders", "/products", "/inventory", "/customers", "/promotions", "/price-lists"];
|
|
56
|
+
|
|
57
|
+
type NestedRoutePosition = (typeof NESTED_ROUTE_POSITIONS)[number];
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* All valid injection zones in the admin panel. An injection zone is a specific place
|
|
61
|
+
* in the admin panel where a plugin can inject custom widgets.
|
|
62
|
+
*/
|
|
63
|
+
declare const INJECTION_ZONES: readonly ["order.details.before", "order.details.after", "order.details.side.before", "order.details.side.after", "order.list.before", "order.list.after", "customer.details.before", "customer.details.after", "customer.details.side.before", "customer.details.side.after", "customer.list.before", "customer.list.after", "customer_group.details.before", "customer_group.details.after", "customer_group.list.before", "customer_group.list.after", "product.details.before", "product.details.after", "product.list.before", "product.list.after", "product.details.side.before", "product.details.side.after", "product_variant.details.before", "product_variant.details.after", "product_variant.details.side.before", "product_variant.details.side.after", "product_collection.details.before", "product_collection.details.after", "product_collection.list.before", "product_collection.list.after", "product_category.details.before", "product_category.details.after", "product_category.details.side.before", "product_category.details.side.after", "product_category.list.before", "product_category.list.after", "product_type.details.before", "product_type.details.after", "product_type.list.before", "product_type.list.after", "shipping_option_type.details.before", "shipping_option_type.details.after", "shipping_option_type.list.before", "shipping_option_type.list.after", "product_tag.details.before", "product_tag.details.after", "product_tag.list.before", "product_tag.list.after", "price_list.details.before", "price_list.details.after", "price_list.details.side.before", "price_list.details.side.after", "price_list.list.before", "price_list.list.after", "promotion.details.before", "promotion.details.after", "promotion.details.side.before", "promotion.details.side.after", "promotion.list.before", "promotion.list.after", "user.details.before", "user.details.after", "user.list.before", "user.list.after", "store.details.before", "store.details.after", "profile.details.before", "profile.details.after", "region.details.before", "region.details.after", "region.list.before", "region.list.after", "shipping_profile.details.before", "shipping_profile.details.after", "shipping_profile.list.before", "shipping_profile.list.after", "location.details.before", "location.details.after", "location.details.side.before", "location.details.side.after", "location.list.before", "location.list.after", "location.list.side.before", "location.list.side.after", "login.before", "login.after", "sales_channel.details.before", "sales_channel.details.after", "sales_channel.list.before", "sales_channel.list.after", "reservation.details.before", "reservation.details.after", "reservation.details.side.before", "reservation.details.side.after", "reservation.list.before", "reservation.list.after", "api_key.details.before", "api_key.details.after", "api_key.list.before", "api_key.list.after", "workflow.details.before", "workflow.details.after", "workflow.list.before", "workflow.list.after", "campaign.details.before", "campaign.details.after", "campaign.details.side.before", "campaign.details.side.after", "campaign.list.before", "campaign.list.after", "tax.details.before", "tax.details.after", "tax.list.before", "tax.list.after", "return_reason.list.before", "return_reason.list.after", "refund_reason.list.before", "refund_reason.list.after", "inventory_item.details.before", "inventory_item.details.after", "inventory_item.details.side.before", "inventory_item.details.side.after", "inventory_item.list.before", "inventory_item.list.after"];
|
|
64
|
+
|
|
65
|
+
type InjectionZone = (typeof INJECTION_ZONES)[number];
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Validates that the provided zone is a valid injection zone for a widget.
|
|
69
|
+
*/
|
|
70
|
+
declare function isValidInjectionZone(zone: any): zone is InjectionZone;
|
|
71
|
+
|
|
72
|
+
declare const LINK_VIRTUAL_MODULE = "virtual:acmekit/links";
|
|
73
|
+
declare const FORM_VIRTUAL_MODULE = "virtual:acmekit/forms";
|
|
74
|
+
declare const DISPLAY_VIRTUAL_MODULE = "virtual:acmekit/displays";
|
|
75
|
+
declare const ROUTE_VIRTUAL_MODULE = "virtual:acmekit/routes";
|
|
76
|
+
declare const MENU_ITEM_VIRTUAL_MODULE = "virtual:acmekit/menu-items";
|
|
77
|
+
declare const WIDGET_VIRTUAL_MODULE = "virtual:acmekit/widgets";
|
|
78
|
+
declare const I18N_VIRTUAL_MODULE = "virtual:acmekit/i18n";
|
|
79
|
+
declare const VIRTUAL_MODULES: readonly ["virtual:acmekit/links", "virtual:acmekit/forms", "virtual:acmekit/displays", "virtual:acmekit/routes", "virtual:acmekit/menu-items", "virtual:acmekit/widgets", "virtual:acmekit/i18n"];
|
|
80
|
+
|
|
81
|
+
declare function deepMerge(target: any, source: any): any;
|
|
82
|
+
|
|
83
|
+
export { type CustomFieldContainerZone, type CustomFieldFormKeys, type CustomFieldFormTab, type CustomFieldFormZone, type CustomFieldImportType, type CustomFieldModel, type CustomFieldModelContainerMap, type CustomFieldModelFormMap, type CustomFieldModelFormTabsMap, type CustomFieldZone, DISPLAY_VIRTUAL_MODULE, FORM_VIRTUAL_MODULE, I18N_VIRTUAL_MODULE, INJECTION_ZONES, type InjectionZone, LINK_VIRTUAL_MODULE, MENU_ITEM_VIRTUAL_MODULE, NESTED_ROUTE_POSITIONS, type NestedRoutePosition, PRODUCT_CUSTOM_FIELD_CREATE_FORM_TABS, PRODUCT_CUSTOM_FIELD_DISPLAY_PATHS, PRODUCT_CUSTOM_FIELD_DISPLAY_ZONES, PRODUCT_CUSTOM_FIELD_FORM_CONFIG_PATHS, PRODUCT_CUSTOM_FIELD_FORM_FIELD_PATHS, PRODUCT_CUSTOM_FIELD_FORM_TABS, PRODUCT_CUSTOM_FIELD_FORM_ZONES, PRODUCT_CUSTOM_FIELD_LINK_PATHS, PRODUCT_CUSTOM_FIELD_MODEL, type ProductDisplayZone, type ProductFormTab, type ProductFormZone, ROUTE_VIRTUAL_MODULE, VIRTUAL_MODULES, WIDGET_VIRTUAL_MODULE, deepMerge, isValidCustomFieldDisplayPath, isValidCustomFieldDisplayZone, isValidCustomFieldFormConfigPath, isValidCustomFieldFormFieldPath, isValidCustomFieldFormTab, isValidCustomFieldFormZone, isValidCustomFieldLinkPath, isValidCustomFieldModel, isValidInjectionZone };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
DISPLAY_VIRTUAL_MODULE: () => DISPLAY_VIRTUAL_MODULE,
|
|
24
|
+
FORM_VIRTUAL_MODULE: () => FORM_VIRTUAL_MODULE,
|
|
25
|
+
I18N_VIRTUAL_MODULE: () => I18N_VIRTUAL_MODULE,
|
|
26
|
+
INJECTION_ZONES: () => INJECTION_ZONES,
|
|
27
|
+
LINK_VIRTUAL_MODULE: () => LINK_VIRTUAL_MODULE,
|
|
28
|
+
MENU_ITEM_VIRTUAL_MODULE: () => MENU_ITEM_VIRTUAL_MODULE,
|
|
29
|
+
NESTED_ROUTE_POSITIONS: () => NESTED_ROUTE_POSITIONS,
|
|
30
|
+
PRODUCT_CUSTOM_FIELD_CREATE_FORM_TABS: () => PRODUCT_CUSTOM_FIELD_CREATE_FORM_TABS,
|
|
31
|
+
PRODUCT_CUSTOM_FIELD_DISPLAY_PATHS: () => PRODUCT_CUSTOM_FIELD_DISPLAY_PATHS,
|
|
32
|
+
PRODUCT_CUSTOM_FIELD_DISPLAY_ZONES: () => PRODUCT_CUSTOM_FIELD_DISPLAY_ZONES,
|
|
33
|
+
PRODUCT_CUSTOM_FIELD_FORM_CONFIG_PATHS: () => PRODUCT_CUSTOM_FIELD_FORM_CONFIG_PATHS,
|
|
34
|
+
PRODUCT_CUSTOM_FIELD_FORM_FIELD_PATHS: () => PRODUCT_CUSTOM_FIELD_FORM_FIELD_PATHS,
|
|
35
|
+
PRODUCT_CUSTOM_FIELD_FORM_TABS: () => PRODUCT_CUSTOM_FIELD_FORM_TABS,
|
|
36
|
+
PRODUCT_CUSTOM_FIELD_FORM_ZONES: () => PRODUCT_CUSTOM_FIELD_FORM_ZONES,
|
|
37
|
+
PRODUCT_CUSTOM_FIELD_LINK_PATHS: () => PRODUCT_CUSTOM_FIELD_LINK_PATHS,
|
|
38
|
+
PRODUCT_CUSTOM_FIELD_MODEL: () => PRODUCT_CUSTOM_FIELD_MODEL,
|
|
39
|
+
ROUTE_VIRTUAL_MODULE: () => ROUTE_VIRTUAL_MODULE,
|
|
40
|
+
VIRTUAL_MODULES: () => VIRTUAL_MODULES,
|
|
41
|
+
WIDGET_VIRTUAL_MODULE: () => WIDGET_VIRTUAL_MODULE,
|
|
42
|
+
deepMerge: () => deepMerge,
|
|
43
|
+
isValidCustomFieldDisplayPath: () => isValidCustomFieldDisplayPath,
|
|
44
|
+
isValidCustomFieldDisplayZone: () => isValidCustomFieldDisplayZone,
|
|
45
|
+
isValidCustomFieldFormConfigPath: () => isValidCustomFieldFormConfigPath,
|
|
46
|
+
isValidCustomFieldFormFieldPath: () => isValidCustomFieldFormFieldPath,
|
|
47
|
+
isValidCustomFieldFormTab: () => isValidCustomFieldFormTab,
|
|
48
|
+
isValidCustomFieldFormZone: () => isValidCustomFieldFormZone,
|
|
49
|
+
isValidCustomFieldLinkPath: () => isValidCustomFieldLinkPath,
|
|
50
|
+
isValidCustomFieldModel: () => isValidCustomFieldModel,
|
|
51
|
+
isValidInjectionZone: () => isValidInjectionZone
|
|
52
|
+
});
|
|
53
|
+
module.exports = __toCommonJS(index_exports);
|
|
54
|
+
|
|
55
|
+
// src/extensions/custom-fields/product/constants.ts
|
|
56
|
+
var PRODUCT_CUSTOM_FIELD_MODEL = "product";
|
|
57
|
+
var PRODUCT_CUSTOM_FIELD_FORM_ZONES = [
|
|
58
|
+
"create",
|
|
59
|
+
"edit",
|
|
60
|
+
"organize",
|
|
61
|
+
"attributes"
|
|
62
|
+
];
|
|
63
|
+
var PRODUCT_CUSTOM_FIELD_CREATE_FORM_TABS = [
|
|
64
|
+
"general",
|
|
65
|
+
"organize"
|
|
66
|
+
];
|
|
67
|
+
var PRODUCT_CUSTOM_FIELD_FORM_TABS = [
|
|
68
|
+
...PRODUCT_CUSTOM_FIELD_CREATE_FORM_TABS
|
|
69
|
+
];
|
|
70
|
+
var PRODUCT_CUSTOM_FIELD_DISPLAY_ZONES = [
|
|
71
|
+
"general",
|
|
72
|
+
"organize",
|
|
73
|
+
"attributes"
|
|
74
|
+
];
|
|
75
|
+
var PRODUCT_CUSTOM_FIELD_LINK_PATHS = [
|
|
76
|
+
`${PRODUCT_CUSTOM_FIELD_MODEL}.$link`
|
|
77
|
+
];
|
|
78
|
+
var PRODUCT_CUSTOM_FIELD_FORM_CONFIG_PATHS = [
|
|
79
|
+
...PRODUCT_CUSTOM_FIELD_FORM_ZONES.map(
|
|
80
|
+
(form) => `${PRODUCT_CUSTOM_FIELD_MODEL}.${form}.$config`
|
|
81
|
+
)
|
|
82
|
+
];
|
|
83
|
+
var PRODUCT_CUSTOM_FIELD_FORM_FIELD_PATHS = [
|
|
84
|
+
...PRODUCT_CUSTOM_FIELD_FORM_ZONES.flatMap((form) => {
|
|
85
|
+
return form === "create" ? PRODUCT_CUSTOM_FIELD_CREATE_FORM_TABS.map(
|
|
86
|
+
(tab) => `${PRODUCT_CUSTOM_FIELD_MODEL}.${form}.${tab}.$field`
|
|
87
|
+
) : [`${PRODUCT_CUSTOM_FIELD_MODEL}.${form}.$field`];
|
|
88
|
+
})
|
|
89
|
+
];
|
|
90
|
+
var PRODUCT_CUSTOM_FIELD_DISPLAY_PATHS = [
|
|
91
|
+
...PRODUCT_CUSTOM_FIELD_DISPLAY_ZONES.map(
|
|
92
|
+
(id) => `${PRODUCT_CUSTOM_FIELD_MODEL}.${id}.$display`
|
|
93
|
+
)
|
|
94
|
+
];
|
|
95
|
+
|
|
96
|
+
// src/extensions/custom-fields/constants.ts
|
|
97
|
+
var CUSTOM_FIELD_MODELS = [PRODUCT_CUSTOM_FIELD_MODEL];
|
|
98
|
+
var CUSTOM_FIELD_CONTAINER_ZONES = [
|
|
99
|
+
...PRODUCT_CUSTOM_FIELD_DISPLAY_ZONES
|
|
100
|
+
];
|
|
101
|
+
var CUSTOM_FIELD_FORM_ZONES = [
|
|
102
|
+
...PRODUCT_CUSTOM_FIELD_FORM_ZONES
|
|
103
|
+
];
|
|
104
|
+
var CUSTOM_FIELD_FORM_TABS = [
|
|
105
|
+
...PRODUCT_CUSTOM_FIELD_FORM_TABS
|
|
106
|
+
];
|
|
107
|
+
var CUSTOM_FIELD_FORM_CONFIG_PATHS = [
|
|
108
|
+
...PRODUCT_CUSTOM_FIELD_FORM_CONFIG_PATHS
|
|
109
|
+
];
|
|
110
|
+
var CUSTOM_FIELD_FORM_FIELD_PATHS = [
|
|
111
|
+
...PRODUCT_CUSTOM_FIELD_FORM_FIELD_PATHS
|
|
112
|
+
];
|
|
113
|
+
var CUSTOM_FIELD_DISPLAY_PATHS = [
|
|
114
|
+
...PRODUCT_CUSTOM_FIELD_DISPLAY_PATHS
|
|
115
|
+
];
|
|
116
|
+
var CUSTOM_FIELD_LINK_PATHS = [
|
|
117
|
+
...PRODUCT_CUSTOM_FIELD_LINK_PATHS
|
|
118
|
+
];
|
|
119
|
+
|
|
120
|
+
// src/extensions/custom-fields/utils.ts
|
|
121
|
+
function isValidCustomFieldModel(id) {
|
|
122
|
+
return CUSTOM_FIELD_MODELS.includes(id);
|
|
123
|
+
}
|
|
124
|
+
function isValidCustomFieldFormZone(id) {
|
|
125
|
+
return CUSTOM_FIELD_FORM_ZONES.includes(id);
|
|
126
|
+
}
|
|
127
|
+
function isValidCustomFieldFormTab(id) {
|
|
128
|
+
return CUSTOM_FIELD_FORM_TABS.includes(id);
|
|
129
|
+
}
|
|
130
|
+
function isValidCustomFieldDisplayZone(id) {
|
|
131
|
+
return CUSTOM_FIELD_CONTAINER_ZONES.includes(id);
|
|
132
|
+
}
|
|
133
|
+
function isValidCustomFieldDisplayPath(id) {
|
|
134
|
+
return CUSTOM_FIELD_DISPLAY_PATHS.includes(id);
|
|
135
|
+
}
|
|
136
|
+
function isValidCustomFieldFormConfigPath(id) {
|
|
137
|
+
return CUSTOM_FIELD_FORM_CONFIG_PATHS.includes(id);
|
|
138
|
+
}
|
|
139
|
+
function isValidCustomFieldFormFieldPath(id) {
|
|
140
|
+
return CUSTOM_FIELD_FORM_FIELD_PATHS.includes(id);
|
|
141
|
+
}
|
|
142
|
+
function isValidCustomFieldLinkPath(id) {
|
|
143
|
+
return CUSTOM_FIELD_LINK_PATHS.includes(id);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// src/extensions/routes/constants.ts
|
|
147
|
+
var NESTED_ROUTE_POSITIONS = [
|
|
148
|
+
"/orders",
|
|
149
|
+
"/products",
|
|
150
|
+
"/inventory",
|
|
151
|
+
"/customers",
|
|
152
|
+
"/promotions",
|
|
153
|
+
"/price-lists"
|
|
154
|
+
];
|
|
155
|
+
|
|
156
|
+
// src/extensions/widgets/constants.ts
|
|
157
|
+
var ORDER_INJECTION_ZONES = [
|
|
158
|
+
"order.details.before",
|
|
159
|
+
"order.details.after",
|
|
160
|
+
"order.details.side.before",
|
|
161
|
+
"order.details.side.after",
|
|
162
|
+
"order.list.before",
|
|
163
|
+
"order.list.after"
|
|
164
|
+
];
|
|
165
|
+
var CUSTOMER_INJECTION_ZONES = [
|
|
166
|
+
"customer.details.before",
|
|
167
|
+
"customer.details.after",
|
|
168
|
+
"customer.details.side.before",
|
|
169
|
+
"customer.details.side.after",
|
|
170
|
+
"customer.list.before",
|
|
171
|
+
"customer.list.after"
|
|
172
|
+
];
|
|
173
|
+
var CUSTOMER_GROUP_INJECTION_ZONES = [
|
|
174
|
+
"customer_group.details.before",
|
|
175
|
+
"customer_group.details.after",
|
|
176
|
+
"customer_group.list.before",
|
|
177
|
+
"customer_group.list.after"
|
|
178
|
+
];
|
|
179
|
+
var PRODUCT_INJECTION_ZONES = [
|
|
180
|
+
"product.details.before",
|
|
181
|
+
"product.details.after",
|
|
182
|
+
"product.list.before",
|
|
183
|
+
"product.list.after",
|
|
184
|
+
"product.details.side.before",
|
|
185
|
+
"product.details.side.after"
|
|
186
|
+
];
|
|
187
|
+
var PRODUCT_VARIANT_INJECTION_ZONES = [
|
|
188
|
+
"product_variant.details.before",
|
|
189
|
+
"product_variant.details.after",
|
|
190
|
+
"product_variant.details.side.before",
|
|
191
|
+
"product_variant.details.side.after"
|
|
192
|
+
];
|
|
193
|
+
var PRODUCT_COLLECTION_INJECTION_ZONES = [
|
|
194
|
+
"product_collection.details.before",
|
|
195
|
+
"product_collection.details.after",
|
|
196
|
+
"product_collection.list.before",
|
|
197
|
+
"product_collection.list.after"
|
|
198
|
+
];
|
|
199
|
+
var PRODUCT_CATEGORY_INJECTION_ZONES = [
|
|
200
|
+
"product_category.details.before",
|
|
201
|
+
"product_category.details.after",
|
|
202
|
+
"product_category.details.side.before",
|
|
203
|
+
"product_category.details.side.after",
|
|
204
|
+
"product_category.list.before",
|
|
205
|
+
"product_category.list.after"
|
|
206
|
+
];
|
|
207
|
+
var SHIPPING_OPTION_TYPE_INJECTION_ZONES = [
|
|
208
|
+
"shipping_option_type.details.before",
|
|
209
|
+
"shipping_option_type.details.after",
|
|
210
|
+
"shipping_option_type.list.before",
|
|
211
|
+
"shipping_option_type.list.after"
|
|
212
|
+
];
|
|
213
|
+
var PRODUCT_TYPE_INJECTION_ZONES = [
|
|
214
|
+
"product_type.details.before",
|
|
215
|
+
"product_type.details.after",
|
|
216
|
+
"product_type.list.before",
|
|
217
|
+
"product_type.list.after"
|
|
218
|
+
];
|
|
219
|
+
var PRODUCT_TAG_INJECTION_ZONES = [
|
|
220
|
+
"product_tag.details.before",
|
|
221
|
+
"product_tag.details.after",
|
|
222
|
+
"product_tag.list.before",
|
|
223
|
+
"product_tag.list.after"
|
|
224
|
+
];
|
|
225
|
+
var PRICE_LIST_INJECTION_ZONES = [
|
|
226
|
+
"price_list.details.before",
|
|
227
|
+
"price_list.details.after",
|
|
228
|
+
"price_list.details.side.before",
|
|
229
|
+
"price_list.details.side.after",
|
|
230
|
+
"price_list.list.before",
|
|
231
|
+
"price_list.list.after"
|
|
232
|
+
];
|
|
233
|
+
var PROMOTION_INJECTION_ZONES = [
|
|
234
|
+
"promotion.details.before",
|
|
235
|
+
"promotion.details.after",
|
|
236
|
+
"promotion.details.side.before",
|
|
237
|
+
"promotion.details.side.after",
|
|
238
|
+
"promotion.list.before",
|
|
239
|
+
"promotion.list.after"
|
|
240
|
+
];
|
|
241
|
+
var CAMPAIGN_INJECTION_ZONES = [
|
|
242
|
+
"campaign.details.before",
|
|
243
|
+
"campaign.details.after",
|
|
244
|
+
"campaign.details.side.before",
|
|
245
|
+
"campaign.details.side.after",
|
|
246
|
+
"campaign.list.before",
|
|
247
|
+
"campaign.list.after"
|
|
248
|
+
];
|
|
249
|
+
var USER_INJECTION_ZONES = [
|
|
250
|
+
"user.details.before",
|
|
251
|
+
"user.details.after",
|
|
252
|
+
"user.list.before",
|
|
253
|
+
"user.list.after"
|
|
254
|
+
];
|
|
255
|
+
var STORE_INJECTION_ZONES = [
|
|
256
|
+
"store.details.before",
|
|
257
|
+
"store.details.after"
|
|
258
|
+
];
|
|
259
|
+
var PROFILE_INJECTION_ZONES = [
|
|
260
|
+
"profile.details.before",
|
|
261
|
+
"profile.details.after"
|
|
262
|
+
];
|
|
263
|
+
var REGION_INJECTION_ZONES = [
|
|
264
|
+
"region.details.before",
|
|
265
|
+
"region.details.after",
|
|
266
|
+
"region.list.before",
|
|
267
|
+
"region.list.after"
|
|
268
|
+
];
|
|
269
|
+
var SHIPPING_PROFILE_INJECTION_ZONES = [
|
|
270
|
+
"shipping_profile.details.before",
|
|
271
|
+
"shipping_profile.details.after",
|
|
272
|
+
"shipping_profile.list.before",
|
|
273
|
+
"shipping_profile.list.after"
|
|
274
|
+
];
|
|
275
|
+
var LOCATION_INJECTION_ZONES = [
|
|
276
|
+
"location.details.before",
|
|
277
|
+
"location.details.after",
|
|
278
|
+
"location.details.side.before",
|
|
279
|
+
"location.details.side.after",
|
|
280
|
+
"location.list.before",
|
|
281
|
+
"location.list.after",
|
|
282
|
+
"location.list.side.before",
|
|
283
|
+
"location.list.side.after"
|
|
284
|
+
];
|
|
285
|
+
var LOGIN_INJECTION_ZONES = ["login.before", "login.after"];
|
|
286
|
+
var SALES_CHANNEL_INJECTION_ZONES = [
|
|
287
|
+
"sales_channel.details.before",
|
|
288
|
+
"sales_channel.details.after",
|
|
289
|
+
"sales_channel.list.before",
|
|
290
|
+
"sales_channel.list.after"
|
|
291
|
+
];
|
|
292
|
+
var RESERVATION_INJECTION_ZONES = [
|
|
293
|
+
"reservation.details.before",
|
|
294
|
+
"reservation.details.after",
|
|
295
|
+
"reservation.details.side.before",
|
|
296
|
+
"reservation.details.side.after",
|
|
297
|
+
"reservation.list.before",
|
|
298
|
+
"reservation.list.after"
|
|
299
|
+
];
|
|
300
|
+
var API_KEY_INJECTION_ZONES = [
|
|
301
|
+
"api_key.details.before",
|
|
302
|
+
"api_key.details.after",
|
|
303
|
+
"api_key.list.before",
|
|
304
|
+
"api_key.list.after"
|
|
305
|
+
];
|
|
306
|
+
var WORKFLOW_INJECTION_ZONES = [
|
|
307
|
+
"workflow.details.before",
|
|
308
|
+
"workflow.details.after",
|
|
309
|
+
"workflow.list.before",
|
|
310
|
+
"workflow.list.after"
|
|
311
|
+
];
|
|
312
|
+
var TAX_INJECTION_ZONES = [
|
|
313
|
+
"tax.details.before",
|
|
314
|
+
"tax.details.after",
|
|
315
|
+
"tax.list.before",
|
|
316
|
+
"tax.list.after"
|
|
317
|
+
];
|
|
318
|
+
var RETURN_REASON_INJECTION_ZONES = [
|
|
319
|
+
"return_reason.list.before",
|
|
320
|
+
"return_reason.list.after"
|
|
321
|
+
];
|
|
322
|
+
var REFUND_REASON_INJECTION_ZONES = [
|
|
323
|
+
"refund_reason.list.before",
|
|
324
|
+
"refund_reason.list.after"
|
|
325
|
+
];
|
|
326
|
+
var INVENTORY_ITEM_INJECTION_ZONES = [
|
|
327
|
+
"inventory_item.details.before",
|
|
328
|
+
"inventory_item.details.after",
|
|
329
|
+
"inventory_item.details.side.before",
|
|
330
|
+
"inventory_item.details.side.after",
|
|
331
|
+
"inventory_item.list.before",
|
|
332
|
+
"inventory_item.list.after"
|
|
333
|
+
];
|
|
334
|
+
var INJECTION_ZONES = [
|
|
335
|
+
...ORDER_INJECTION_ZONES,
|
|
336
|
+
...CUSTOMER_INJECTION_ZONES,
|
|
337
|
+
...CUSTOMER_GROUP_INJECTION_ZONES,
|
|
338
|
+
...PRODUCT_INJECTION_ZONES,
|
|
339
|
+
...PRODUCT_VARIANT_INJECTION_ZONES,
|
|
340
|
+
...PRODUCT_COLLECTION_INJECTION_ZONES,
|
|
341
|
+
...PRODUCT_CATEGORY_INJECTION_ZONES,
|
|
342
|
+
...PRODUCT_TYPE_INJECTION_ZONES,
|
|
343
|
+
...SHIPPING_OPTION_TYPE_INJECTION_ZONES,
|
|
344
|
+
...PRODUCT_TAG_INJECTION_ZONES,
|
|
345
|
+
...PRICE_LIST_INJECTION_ZONES,
|
|
346
|
+
...PROMOTION_INJECTION_ZONES,
|
|
347
|
+
...USER_INJECTION_ZONES,
|
|
348
|
+
...STORE_INJECTION_ZONES,
|
|
349
|
+
...PROFILE_INJECTION_ZONES,
|
|
350
|
+
...REGION_INJECTION_ZONES,
|
|
351
|
+
...SHIPPING_PROFILE_INJECTION_ZONES,
|
|
352
|
+
...LOCATION_INJECTION_ZONES,
|
|
353
|
+
...LOGIN_INJECTION_ZONES,
|
|
354
|
+
...SALES_CHANNEL_INJECTION_ZONES,
|
|
355
|
+
...RESERVATION_INJECTION_ZONES,
|
|
356
|
+
...API_KEY_INJECTION_ZONES,
|
|
357
|
+
...WORKFLOW_INJECTION_ZONES,
|
|
358
|
+
...CAMPAIGN_INJECTION_ZONES,
|
|
359
|
+
...TAX_INJECTION_ZONES,
|
|
360
|
+
...RETURN_REASON_INJECTION_ZONES,
|
|
361
|
+
...REFUND_REASON_INJECTION_ZONES,
|
|
362
|
+
...INVENTORY_ITEM_INJECTION_ZONES
|
|
363
|
+
];
|
|
364
|
+
|
|
365
|
+
// src/extensions/widgets/utils.ts
|
|
366
|
+
function isValidInjectionZone(zone) {
|
|
367
|
+
return INJECTION_ZONES.includes(zone);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
// src/virtual-modules/constants.ts
|
|
371
|
+
var LINK_VIRTUAL_MODULE = `virtual:acmekit/links`;
|
|
372
|
+
var FORM_VIRTUAL_MODULE = `virtual:acmekit/forms`;
|
|
373
|
+
var DISPLAY_VIRTUAL_MODULE = `virtual:acmekit/displays`;
|
|
374
|
+
var ROUTE_VIRTUAL_MODULE = `virtual:acmekit/routes`;
|
|
375
|
+
var MENU_ITEM_VIRTUAL_MODULE = `virtual:acmekit/menu-items`;
|
|
376
|
+
var WIDGET_VIRTUAL_MODULE = `virtual:acmekit/widgets`;
|
|
377
|
+
var I18N_VIRTUAL_MODULE = `virtual:acmekit/i18n`;
|
|
378
|
+
var VIRTUAL_MODULES = [
|
|
379
|
+
LINK_VIRTUAL_MODULE,
|
|
380
|
+
FORM_VIRTUAL_MODULE,
|
|
381
|
+
DISPLAY_VIRTUAL_MODULE,
|
|
382
|
+
ROUTE_VIRTUAL_MODULE,
|
|
383
|
+
MENU_ITEM_VIRTUAL_MODULE,
|
|
384
|
+
WIDGET_VIRTUAL_MODULE,
|
|
385
|
+
I18N_VIRTUAL_MODULE
|
|
386
|
+
];
|
|
387
|
+
|
|
388
|
+
// src/utils/is-object.ts
|
|
389
|
+
function isObject(obj) {
|
|
390
|
+
return obj != null && obj?.constructor?.name === "Object";
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
// src/utils/deep-merge.ts
|
|
394
|
+
function deepMerge(target, source) {
|
|
395
|
+
const recursive = (a, b) => {
|
|
396
|
+
if (!isObject(a)) {
|
|
397
|
+
return b;
|
|
398
|
+
}
|
|
399
|
+
if (!isObject(b)) {
|
|
400
|
+
return a;
|
|
401
|
+
}
|
|
402
|
+
Object.keys(b).forEach((key) => {
|
|
403
|
+
if (isObject(b[key])) {
|
|
404
|
+
a[key] ?? (a[key] = {});
|
|
405
|
+
a[key] = deepMerge(a[key], b[key]);
|
|
406
|
+
} else {
|
|
407
|
+
a[key] = b[key];
|
|
408
|
+
}
|
|
409
|
+
});
|
|
410
|
+
return a;
|
|
411
|
+
};
|
|
412
|
+
const copy = { ...target };
|
|
413
|
+
return recursive(copy, source);
|
|
414
|
+
}
|
|
415
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
416
|
+
0 && (module.exports = {
|
|
417
|
+
DISPLAY_VIRTUAL_MODULE,
|
|
418
|
+
FORM_VIRTUAL_MODULE,
|
|
419
|
+
I18N_VIRTUAL_MODULE,
|
|
420
|
+
INJECTION_ZONES,
|
|
421
|
+
LINK_VIRTUAL_MODULE,
|
|
422
|
+
MENU_ITEM_VIRTUAL_MODULE,
|
|
423
|
+
NESTED_ROUTE_POSITIONS,
|
|
424
|
+
PRODUCT_CUSTOM_FIELD_CREATE_FORM_TABS,
|
|
425
|
+
PRODUCT_CUSTOM_FIELD_DISPLAY_PATHS,
|
|
426
|
+
PRODUCT_CUSTOM_FIELD_DISPLAY_ZONES,
|
|
427
|
+
PRODUCT_CUSTOM_FIELD_FORM_CONFIG_PATHS,
|
|
428
|
+
PRODUCT_CUSTOM_FIELD_FORM_FIELD_PATHS,
|
|
429
|
+
PRODUCT_CUSTOM_FIELD_FORM_TABS,
|
|
430
|
+
PRODUCT_CUSTOM_FIELD_FORM_ZONES,
|
|
431
|
+
PRODUCT_CUSTOM_FIELD_LINK_PATHS,
|
|
432
|
+
PRODUCT_CUSTOM_FIELD_MODEL,
|
|
433
|
+
ROUTE_VIRTUAL_MODULE,
|
|
434
|
+
VIRTUAL_MODULES,
|
|
435
|
+
WIDGET_VIRTUAL_MODULE,
|
|
436
|
+
deepMerge,
|
|
437
|
+
isValidCustomFieldDisplayPath,
|
|
438
|
+
isValidCustomFieldDisplayZone,
|
|
439
|
+
isValidCustomFieldFormConfigPath,
|
|
440
|
+
isValidCustomFieldFormFieldPath,
|
|
441
|
+
isValidCustomFieldFormTab,
|
|
442
|
+
isValidCustomFieldFormZone,
|
|
443
|
+
isValidCustomFieldLinkPath,
|
|
444
|
+
isValidCustomFieldModel,
|
|
445
|
+
isValidInjectionZone
|
|
446
|
+
});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
// src/extensions/custom-fields/product/constants.ts
|
|
2
|
+
var PRODUCT_CUSTOM_FIELD_MODEL = "product";
|
|
3
|
+
var PRODUCT_CUSTOM_FIELD_FORM_ZONES = [
|
|
4
|
+
"create",
|
|
5
|
+
"edit",
|
|
6
|
+
"organize",
|
|
7
|
+
"attributes"
|
|
8
|
+
];
|
|
9
|
+
var PRODUCT_CUSTOM_FIELD_CREATE_FORM_TABS = [
|
|
10
|
+
"general",
|
|
11
|
+
"organize"
|
|
12
|
+
];
|
|
13
|
+
var PRODUCT_CUSTOM_FIELD_FORM_TABS = [
|
|
14
|
+
...PRODUCT_CUSTOM_FIELD_CREATE_FORM_TABS
|
|
15
|
+
];
|
|
16
|
+
var PRODUCT_CUSTOM_FIELD_DISPLAY_ZONES = [
|
|
17
|
+
"general",
|
|
18
|
+
"organize",
|
|
19
|
+
"attributes"
|
|
20
|
+
];
|
|
21
|
+
var PRODUCT_CUSTOM_FIELD_LINK_PATHS = [
|
|
22
|
+
`${PRODUCT_CUSTOM_FIELD_MODEL}.$link`
|
|
23
|
+
];
|
|
24
|
+
var PRODUCT_CUSTOM_FIELD_FORM_CONFIG_PATHS = [
|
|
25
|
+
...PRODUCT_CUSTOM_FIELD_FORM_ZONES.map(
|
|
26
|
+
(form) => `${PRODUCT_CUSTOM_FIELD_MODEL}.${form}.$config`
|
|
27
|
+
)
|
|
28
|
+
];
|
|
29
|
+
var PRODUCT_CUSTOM_FIELD_FORM_FIELD_PATHS = [
|
|
30
|
+
...PRODUCT_CUSTOM_FIELD_FORM_ZONES.flatMap((form) => {
|
|
31
|
+
return form === "create" ? PRODUCT_CUSTOM_FIELD_CREATE_FORM_TABS.map(
|
|
32
|
+
(tab) => `${PRODUCT_CUSTOM_FIELD_MODEL}.${form}.${tab}.$field`
|
|
33
|
+
) : [`${PRODUCT_CUSTOM_FIELD_MODEL}.${form}.$field`];
|
|
34
|
+
})
|
|
35
|
+
];
|
|
36
|
+
var PRODUCT_CUSTOM_FIELD_DISPLAY_PATHS = [
|
|
37
|
+
...PRODUCT_CUSTOM_FIELD_DISPLAY_ZONES.map(
|
|
38
|
+
(id) => `${PRODUCT_CUSTOM_FIELD_MODEL}.${id}.$display`
|
|
39
|
+
)
|
|
40
|
+
];
|
|
41
|
+
|
|
42
|
+
// src/extensions/custom-fields/constants.ts
|
|
43
|
+
var CUSTOM_FIELD_MODELS = [PRODUCT_CUSTOM_FIELD_MODEL];
|
|
44
|
+
var CUSTOM_FIELD_CONTAINER_ZONES = [
|
|
45
|
+
...PRODUCT_CUSTOM_FIELD_DISPLAY_ZONES
|
|
46
|
+
];
|
|
47
|
+
var CUSTOM_FIELD_FORM_ZONES = [
|
|
48
|
+
...PRODUCT_CUSTOM_FIELD_FORM_ZONES
|
|
49
|
+
];
|
|
50
|
+
var CUSTOM_FIELD_FORM_TABS = [
|
|
51
|
+
...PRODUCT_CUSTOM_FIELD_FORM_TABS
|
|
52
|
+
];
|
|
53
|
+
var CUSTOM_FIELD_FORM_CONFIG_PATHS = [
|
|
54
|
+
...PRODUCT_CUSTOM_FIELD_FORM_CONFIG_PATHS
|
|
55
|
+
];
|
|
56
|
+
var CUSTOM_FIELD_FORM_FIELD_PATHS = [
|
|
57
|
+
...PRODUCT_CUSTOM_FIELD_FORM_FIELD_PATHS
|
|
58
|
+
];
|
|
59
|
+
var CUSTOM_FIELD_DISPLAY_PATHS = [
|
|
60
|
+
...PRODUCT_CUSTOM_FIELD_DISPLAY_PATHS
|
|
61
|
+
];
|
|
62
|
+
var CUSTOM_FIELD_LINK_PATHS = [
|
|
63
|
+
...PRODUCT_CUSTOM_FIELD_LINK_PATHS
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
// src/extensions/custom-fields/utils.ts
|
|
67
|
+
function isValidCustomFieldModel(id) {
|
|
68
|
+
return CUSTOM_FIELD_MODELS.includes(id);
|
|
69
|
+
}
|
|
70
|
+
function isValidCustomFieldFormZone(id) {
|
|
71
|
+
return CUSTOM_FIELD_FORM_ZONES.includes(id);
|
|
72
|
+
}
|
|
73
|
+
function isValidCustomFieldFormTab(id) {
|
|
74
|
+
return CUSTOM_FIELD_FORM_TABS.includes(id);
|
|
75
|
+
}
|
|
76
|
+
function isValidCustomFieldDisplayZone(id) {
|
|
77
|
+
return CUSTOM_FIELD_CONTAINER_ZONES.includes(id);
|
|
78
|
+
}
|
|
79
|
+
function isValidCustomFieldDisplayPath(id) {
|
|
80
|
+
return CUSTOM_FIELD_DISPLAY_PATHS.includes(id);
|
|
81
|
+
}
|
|
82
|
+
function isValidCustomFieldFormConfigPath(id) {
|
|
83
|
+
return CUSTOM_FIELD_FORM_CONFIG_PATHS.includes(id);
|
|
84
|
+
}
|
|
85
|
+
function isValidCustomFieldFormFieldPath(id) {
|
|
86
|
+
return CUSTOM_FIELD_FORM_FIELD_PATHS.includes(id);
|
|
87
|
+
}
|
|
88
|
+
function isValidCustomFieldLinkPath(id) {
|
|
89
|
+
return CUSTOM_FIELD_LINK_PATHS.includes(id);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// src/extensions/routes/constants.ts
|
|
93
|
+
var NESTED_ROUTE_POSITIONS = [
|
|
94
|
+
"/orders",
|
|
95
|
+
"/products",
|
|
96
|
+
"/inventory",
|
|
97
|
+
"/customers",
|
|
98
|
+
"/promotions",
|
|
99
|
+
"/price-lists"
|
|
100
|
+
];
|
|
101
|
+
|
|
102
|
+
// src/extensions/widgets/constants.ts
|
|
103
|
+
var ORDER_INJECTION_ZONES = [
|
|
104
|
+
"order.details.before",
|
|
105
|
+
"order.details.after",
|
|
106
|
+
"order.details.side.before",
|
|
107
|
+
"order.details.side.after",
|
|
108
|
+
"order.list.before",
|
|
109
|
+
"order.list.after"
|
|
110
|
+
];
|
|
111
|
+
var CUSTOMER_INJECTION_ZONES = [
|
|
112
|
+
"customer.details.before",
|
|
113
|
+
"customer.details.after",
|
|
114
|
+
"customer.details.side.before",
|
|
115
|
+
"customer.details.side.after",
|
|
116
|
+
"customer.list.before",
|
|
117
|
+
"customer.list.after"
|
|
118
|
+
];
|
|
119
|
+
var CUSTOMER_GROUP_INJECTION_ZONES = [
|
|
120
|
+
"customer_group.details.before",
|
|
121
|
+
"customer_group.details.after",
|
|
122
|
+
"customer_group.list.before",
|
|
123
|
+
"customer_group.list.after"
|
|
124
|
+
];
|
|
125
|
+
var PRODUCT_INJECTION_ZONES = [
|
|
126
|
+
"product.details.before",
|
|
127
|
+
"product.details.after",
|
|
128
|
+
"product.list.before",
|
|
129
|
+
"product.list.after",
|
|
130
|
+
"product.details.side.before",
|
|
131
|
+
"product.details.side.after"
|
|
132
|
+
];
|
|
133
|
+
var PRODUCT_VARIANT_INJECTION_ZONES = [
|
|
134
|
+
"product_variant.details.before",
|
|
135
|
+
"product_variant.details.after",
|
|
136
|
+
"product_variant.details.side.before",
|
|
137
|
+
"product_variant.details.side.after"
|
|
138
|
+
];
|
|
139
|
+
var PRODUCT_COLLECTION_INJECTION_ZONES = [
|
|
140
|
+
"product_collection.details.before",
|
|
141
|
+
"product_collection.details.after",
|
|
142
|
+
"product_collection.list.before",
|
|
143
|
+
"product_collection.list.after"
|
|
144
|
+
];
|
|
145
|
+
var PRODUCT_CATEGORY_INJECTION_ZONES = [
|
|
146
|
+
"product_category.details.before",
|
|
147
|
+
"product_category.details.after",
|
|
148
|
+
"product_category.details.side.before",
|
|
149
|
+
"product_category.details.side.after",
|
|
150
|
+
"product_category.list.before",
|
|
151
|
+
"product_category.list.after"
|
|
152
|
+
];
|
|
153
|
+
var SHIPPING_OPTION_TYPE_INJECTION_ZONES = [
|
|
154
|
+
"shipping_option_type.details.before",
|
|
155
|
+
"shipping_option_type.details.after",
|
|
156
|
+
"shipping_option_type.list.before",
|
|
157
|
+
"shipping_option_type.list.after"
|
|
158
|
+
];
|
|
159
|
+
var PRODUCT_TYPE_INJECTION_ZONES = [
|
|
160
|
+
"product_type.details.before",
|
|
161
|
+
"product_type.details.after",
|
|
162
|
+
"product_type.list.before",
|
|
163
|
+
"product_type.list.after"
|
|
164
|
+
];
|
|
165
|
+
var PRODUCT_TAG_INJECTION_ZONES = [
|
|
166
|
+
"product_tag.details.before",
|
|
167
|
+
"product_tag.details.after",
|
|
168
|
+
"product_tag.list.before",
|
|
169
|
+
"product_tag.list.after"
|
|
170
|
+
];
|
|
171
|
+
var PRICE_LIST_INJECTION_ZONES = [
|
|
172
|
+
"price_list.details.before",
|
|
173
|
+
"price_list.details.after",
|
|
174
|
+
"price_list.details.side.before",
|
|
175
|
+
"price_list.details.side.after",
|
|
176
|
+
"price_list.list.before",
|
|
177
|
+
"price_list.list.after"
|
|
178
|
+
];
|
|
179
|
+
var PROMOTION_INJECTION_ZONES = [
|
|
180
|
+
"promotion.details.before",
|
|
181
|
+
"promotion.details.after",
|
|
182
|
+
"promotion.details.side.before",
|
|
183
|
+
"promotion.details.side.after",
|
|
184
|
+
"promotion.list.before",
|
|
185
|
+
"promotion.list.after"
|
|
186
|
+
];
|
|
187
|
+
var CAMPAIGN_INJECTION_ZONES = [
|
|
188
|
+
"campaign.details.before",
|
|
189
|
+
"campaign.details.after",
|
|
190
|
+
"campaign.details.side.before",
|
|
191
|
+
"campaign.details.side.after",
|
|
192
|
+
"campaign.list.before",
|
|
193
|
+
"campaign.list.after"
|
|
194
|
+
];
|
|
195
|
+
var USER_INJECTION_ZONES = [
|
|
196
|
+
"user.details.before",
|
|
197
|
+
"user.details.after",
|
|
198
|
+
"user.list.before",
|
|
199
|
+
"user.list.after"
|
|
200
|
+
];
|
|
201
|
+
var STORE_INJECTION_ZONES = [
|
|
202
|
+
"store.details.before",
|
|
203
|
+
"store.details.after"
|
|
204
|
+
];
|
|
205
|
+
var PROFILE_INJECTION_ZONES = [
|
|
206
|
+
"profile.details.before",
|
|
207
|
+
"profile.details.after"
|
|
208
|
+
];
|
|
209
|
+
var REGION_INJECTION_ZONES = [
|
|
210
|
+
"region.details.before",
|
|
211
|
+
"region.details.after",
|
|
212
|
+
"region.list.before",
|
|
213
|
+
"region.list.after"
|
|
214
|
+
];
|
|
215
|
+
var SHIPPING_PROFILE_INJECTION_ZONES = [
|
|
216
|
+
"shipping_profile.details.before",
|
|
217
|
+
"shipping_profile.details.after",
|
|
218
|
+
"shipping_profile.list.before",
|
|
219
|
+
"shipping_profile.list.after"
|
|
220
|
+
];
|
|
221
|
+
var LOCATION_INJECTION_ZONES = [
|
|
222
|
+
"location.details.before",
|
|
223
|
+
"location.details.after",
|
|
224
|
+
"location.details.side.before",
|
|
225
|
+
"location.details.side.after",
|
|
226
|
+
"location.list.before",
|
|
227
|
+
"location.list.after",
|
|
228
|
+
"location.list.side.before",
|
|
229
|
+
"location.list.side.after"
|
|
230
|
+
];
|
|
231
|
+
var LOGIN_INJECTION_ZONES = ["login.before", "login.after"];
|
|
232
|
+
var SALES_CHANNEL_INJECTION_ZONES = [
|
|
233
|
+
"sales_channel.details.before",
|
|
234
|
+
"sales_channel.details.after",
|
|
235
|
+
"sales_channel.list.before",
|
|
236
|
+
"sales_channel.list.after"
|
|
237
|
+
];
|
|
238
|
+
var RESERVATION_INJECTION_ZONES = [
|
|
239
|
+
"reservation.details.before",
|
|
240
|
+
"reservation.details.after",
|
|
241
|
+
"reservation.details.side.before",
|
|
242
|
+
"reservation.details.side.after",
|
|
243
|
+
"reservation.list.before",
|
|
244
|
+
"reservation.list.after"
|
|
245
|
+
];
|
|
246
|
+
var API_KEY_INJECTION_ZONES = [
|
|
247
|
+
"api_key.details.before",
|
|
248
|
+
"api_key.details.after",
|
|
249
|
+
"api_key.list.before",
|
|
250
|
+
"api_key.list.after"
|
|
251
|
+
];
|
|
252
|
+
var WORKFLOW_INJECTION_ZONES = [
|
|
253
|
+
"workflow.details.before",
|
|
254
|
+
"workflow.details.after",
|
|
255
|
+
"workflow.list.before",
|
|
256
|
+
"workflow.list.after"
|
|
257
|
+
];
|
|
258
|
+
var TAX_INJECTION_ZONES = [
|
|
259
|
+
"tax.details.before",
|
|
260
|
+
"tax.details.after",
|
|
261
|
+
"tax.list.before",
|
|
262
|
+
"tax.list.after"
|
|
263
|
+
];
|
|
264
|
+
var RETURN_REASON_INJECTION_ZONES = [
|
|
265
|
+
"return_reason.list.before",
|
|
266
|
+
"return_reason.list.after"
|
|
267
|
+
];
|
|
268
|
+
var REFUND_REASON_INJECTION_ZONES = [
|
|
269
|
+
"refund_reason.list.before",
|
|
270
|
+
"refund_reason.list.after"
|
|
271
|
+
];
|
|
272
|
+
var INVENTORY_ITEM_INJECTION_ZONES = [
|
|
273
|
+
"inventory_item.details.before",
|
|
274
|
+
"inventory_item.details.after",
|
|
275
|
+
"inventory_item.details.side.before",
|
|
276
|
+
"inventory_item.details.side.after",
|
|
277
|
+
"inventory_item.list.before",
|
|
278
|
+
"inventory_item.list.after"
|
|
279
|
+
];
|
|
280
|
+
var INJECTION_ZONES = [
|
|
281
|
+
...ORDER_INJECTION_ZONES,
|
|
282
|
+
...CUSTOMER_INJECTION_ZONES,
|
|
283
|
+
...CUSTOMER_GROUP_INJECTION_ZONES,
|
|
284
|
+
...PRODUCT_INJECTION_ZONES,
|
|
285
|
+
...PRODUCT_VARIANT_INJECTION_ZONES,
|
|
286
|
+
...PRODUCT_COLLECTION_INJECTION_ZONES,
|
|
287
|
+
...PRODUCT_CATEGORY_INJECTION_ZONES,
|
|
288
|
+
...PRODUCT_TYPE_INJECTION_ZONES,
|
|
289
|
+
...SHIPPING_OPTION_TYPE_INJECTION_ZONES,
|
|
290
|
+
...PRODUCT_TAG_INJECTION_ZONES,
|
|
291
|
+
...PRICE_LIST_INJECTION_ZONES,
|
|
292
|
+
...PROMOTION_INJECTION_ZONES,
|
|
293
|
+
...USER_INJECTION_ZONES,
|
|
294
|
+
...STORE_INJECTION_ZONES,
|
|
295
|
+
...PROFILE_INJECTION_ZONES,
|
|
296
|
+
...REGION_INJECTION_ZONES,
|
|
297
|
+
...SHIPPING_PROFILE_INJECTION_ZONES,
|
|
298
|
+
...LOCATION_INJECTION_ZONES,
|
|
299
|
+
...LOGIN_INJECTION_ZONES,
|
|
300
|
+
...SALES_CHANNEL_INJECTION_ZONES,
|
|
301
|
+
...RESERVATION_INJECTION_ZONES,
|
|
302
|
+
...API_KEY_INJECTION_ZONES,
|
|
303
|
+
...WORKFLOW_INJECTION_ZONES,
|
|
304
|
+
...CAMPAIGN_INJECTION_ZONES,
|
|
305
|
+
...TAX_INJECTION_ZONES,
|
|
306
|
+
...RETURN_REASON_INJECTION_ZONES,
|
|
307
|
+
...REFUND_REASON_INJECTION_ZONES,
|
|
308
|
+
...INVENTORY_ITEM_INJECTION_ZONES
|
|
309
|
+
];
|
|
310
|
+
|
|
311
|
+
// src/extensions/widgets/utils.ts
|
|
312
|
+
function isValidInjectionZone(zone) {
|
|
313
|
+
return INJECTION_ZONES.includes(zone);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
// src/virtual-modules/constants.ts
|
|
317
|
+
var LINK_VIRTUAL_MODULE = `virtual:acmekit/links`;
|
|
318
|
+
var FORM_VIRTUAL_MODULE = `virtual:acmekit/forms`;
|
|
319
|
+
var DISPLAY_VIRTUAL_MODULE = `virtual:acmekit/displays`;
|
|
320
|
+
var ROUTE_VIRTUAL_MODULE = `virtual:acmekit/routes`;
|
|
321
|
+
var MENU_ITEM_VIRTUAL_MODULE = `virtual:acmekit/menu-items`;
|
|
322
|
+
var WIDGET_VIRTUAL_MODULE = `virtual:acmekit/widgets`;
|
|
323
|
+
var I18N_VIRTUAL_MODULE = `virtual:acmekit/i18n`;
|
|
324
|
+
var VIRTUAL_MODULES = [
|
|
325
|
+
LINK_VIRTUAL_MODULE,
|
|
326
|
+
FORM_VIRTUAL_MODULE,
|
|
327
|
+
DISPLAY_VIRTUAL_MODULE,
|
|
328
|
+
ROUTE_VIRTUAL_MODULE,
|
|
329
|
+
MENU_ITEM_VIRTUAL_MODULE,
|
|
330
|
+
WIDGET_VIRTUAL_MODULE,
|
|
331
|
+
I18N_VIRTUAL_MODULE
|
|
332
|
+
];
|
|
333
|
+
|
|
334
|
+
// src/utils/is-object.ts
|
|
335
|
+
function isObject(obj) {
|
|
336
|
+
return obj != null && obj?.constructor?.name === "Object";
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
// src/utils/deep-merge.ts
|
|
340
|
+
function deepMerge(target, source) {
|
|
341
|
+
const recursive = (a, b) => {
|
|
342
|
+
if (!isObject(a)) {
|
|
343
|
+
return b;
|
|
344
|
+
}
|
|
345
|
+
if (!isObject(b)) {
|
|
346
|
+
return a;
|
|
347
|
+
}
|
|
348
|
+
Object.keys(b).forEach((key) => {
|
|
349
|
+
if (isObject(b[key])) {
|
|
350
|
+
a[key] ?? (a[key] = {});
|
|
351
|
+
a[key] = deepMerge(a[key], b[key]);
|
|
352
|
+
} else {
|
|
353
|
+
a[key] = b[key];
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
return a;
|
|
357
|
+
};
|
|
358
|
+
const copy = { ...target };
|
|
359
|
+
return recursive(copy, source);
|
|
360
|
+
}
|
|
361
|
+
export {
|
|
362
|
+
DISPLAY_VIRTUAL_MODULE,
|
|
363
|
+
FORM_VIRTUAL_MODULE,
|
|
364
|
+
I18N_VIRTUAL_MODULE,
|
|
365
|
+
INJECTION_ZONES,
|
|
366
|
+
LINK_VIRTUAL_MODULE,
|
|
367
|
+
MENU_ITEM_VIRTUAL_MODULE,
|
|
368
|
+
NESTED_ROUTE_POSITIONS,
|
|
369
|
+
PRODUCT_CUSTOM_FIELD_CREATE_FORM_TABS,
|
|
370
|
+
PRODUCT_CUSTOM_FIELD_DISPLAY_PATHS,
|
|
371
|
+
PRODUCT_CUSTOM_FIELD_DISPLAY_ZONES,
|
|
372
|
+
PRODUCT_CUSTOM_FIELD_FORM_CONFIG_PATHS,
|
|
373
|
+
PRODUCT_CUSTOM_FIELD_FORM_FIELD_PATHS,
|
|
374
|
+
PRODUCT_CUSTOM_FIELD_FORM_TABS,
|
|
375
|
+
PRODUCT_CUSTOM_FIELD_FORM_ZONES,
|
|
376
|
+
PRODUCT_CUSTOM_FIELD_LINK_PATHS,
|
|
377
|
+
PRODUCT_CUSTOM_FIELD_MODEL,
|
|
378
|
+
ROUTE_VIRTUAL_MODULE,
|
|
379
|
+
VIRTUAL_MODULES,
|
|
380
|
+
WIDGET_VIRTUAL_MODULE,
|
|
381
|
+
deepMerge,
|
|
382
|
+
isValidCustomFieldDisplayPath,
|
|
383
|
+
isValidCustomFieldDisplayZone,
|
|
384
|
+
isValidCustomFieldFormConfigPath,
|
|
385
|
+
isValidCustomFieldFormFieldPath,
|
|
386
|
+
isValidCustomFieldFormTab,
|
|
387
|
+
isValidCustomFieldFormZone,
|
|
388
|
+
isValidCustomFieldLinkPath,
|
|
389
|
+
isValidCustomFieldModel,
|
|
390
|
+
isValidInjectionZone
|
|
391
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@acmekit/admin-shared",
|
|
3
|
+
"description": "Shared code for AcmeKit admin packages.",
|
|
4
|
+
"version": "2.13.1",
|
|
5
|
+
"author": "Kasper Kristensen <kasper@acmekit.com>",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"module": "dist/index.mjs",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/acmekit/acmekit",
|
|
12
|
+
"directory": "packages/admin/admin-shared"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"package.json"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "yarn run -T tsup"
|
|
20
|
+
},
|
|
21
|
+
"packageManager": "yarn@3.2.1"
|
|
22
|
+
}
|