
* create Apps view * create more app components, generate types and messages * apps refactor, update snapshots * show error message in tooltip when app installation fail * update apps components and view, add apps list to storybook * update defaultMessages * create app details view * update AppListPage with Skeleton component * create app activate/deactivate dialogs, create app details stories * add AppHeader to AppDetailsPage * update defaultMessages * update AppDetails view and components after review * create custom app details view * refactor webhooks * update webhooks fixtures * update WebhookDetailsPage story * update strings * create CustomAppCreate view and components * update AppListPage story * create AppInstall view and page * handle errors in AppInstall view * update defaultMessages * add AppInstallPage to storybook * add status prop to MessageManager * update defaultMessages * remove service account section * remove service account routes * remove as operator from notify status * add notifications for app installations * update styles for deactivated app * update app installations with local storage * update defaultMessages * AppInstall update * dd delete button to ongoin installations table * fix active installations condition * fix error messages in AppsList * update defaultMessages * add iframe to AppDetailsPage * create AppDetailsSettingsPage * install macaw-ui * apps styles clean up * update schema, fixtures * few apps updates * WebhookCreate - fix onBack button name * WebhookCreatePage story update * rename apps table from external to thirdparty * update defaultMessages * fix test, update snapshots * AppDetailsSettings - add token to headers * fix first number in local apps query * app details settings - use shop domain host * add onSettingsRowClick to InstalledApps * resolve conflicts * update changelog and messages * add noopener noreferrer do app privacy link * update snapshots * update snapshots * updates after review * update defaultMessages * CustomAppDetails - add missing notify status
98 lines
2.6 KiB
TypeScript
98 lines
2.6 KiB
TypeScript
import packageInfo from "../package.json";
|
|
import { SearchVariables } from "./hooks/makeSearch";
|
|
import { ListSettings, ListViews, Pagination } from "./types";
|
|
|
|
export const APP_MOUNT_URI = process.env.APP_MOUNT_URI;
|
|
export const API_URI = process.env.API_URI;
|
|
|
|
export const DEFAULT_INITIAL_SEARCH_DATA: SearchVariables = {
|
|
after: null,
|
|
first: 20,
|
|
query: ""
|
|
};
|
|
|
|
export const DEFAULT_INITIAL_PAGINATION_DATA: Pagination = {
|
|
after: undefined,
|
|
before: undefined
|
|
};
|
|
|
|
export const PAGINATE_BY = 20;
|
|
|
|
export type ProductListColumns = "productType" | "isPublished" | "price";
|
|
export interface AppListViewSettings {
|
|
[ListViews.APPS_LIST]: ListSettings;
|
|
[ListViews.CATEGORY_LIST]: ListSettings;
|
|
[ListViews.COLLECTION_LIST]: ListSettings;
|
|
[ListViews.CUSTOMER_LIST]: ListSettings;
|
|
[ListViews.DRAFT_LIST]: ListSettings;
|
|
[ListViews.NAVIGATION_LIST]: ListSettings;
|
|
[ListViews.ORDER_LIST]: ListSettings;
|
|
[ListViews.PAGES_LIST]: ListSettings;
|
|
[ListViews.PLUGINS_LIST]: ListSettings;
|
|
[ListViews.PRODUCT_LIST]: ListSettings<ProductListColumns>;
|
|
[ListViews.SALES_LIST]: ListSettings;
|
|
[ListViews.SHIPPING_METHODS_LIST]: ListSettings;
|
|
[ListViews.STAFF_MEMBERS_LIST]: ListSettings;
|
|
[ListViews.PERMISSION_GROUP_LIST]: ListSettings;
|
|
[ListViews.VOUCHER_LIST]: ListSettings;
|
|
[ListViews.WAREHOUSE_LIST]: ListSettings;
|
|
[ListViews.WEBHOOK_LIST]: ListSettings;
|
|
}
|
|
export const defaultListSettings: AppListViewSettings = {
|
|
[ListViews.APPS_LIST]: {
|
|
rowNumber: 10
|
|
},
|
|
[ListViews.CATEGORY_LIST]: {
|
|
rowNumber: PAGINATE_BY
|
|
},
|
|
[ListViews.COLLECTION_LIST]: {
|
|
rowNumber: PAGINATE_BY
|
|
},
|
|
[ListViews.CUSTOMER_LIST]: {
|
|
rowNumber: PAGINATE_BY
|
|
},
|
|
[ListViews.DRAFT_LIST]: {
|
|
rowNumber: PAGINATE_BY
|
|
},
|
|
[ListViews.NAVIGATION_LIST]: {
|
|
rowNumber: PAGINATE_BY
|
|
},
|
|
[ListViews.ORDER_LIST]: {
|
|
rowNumber: PAGINATE_BY
|
|
},
|
|
[ListViews.PAGES_LIST]: {
|
|
rowNumber: PAGINATE_BY
|
|
},
|
|
[ListViews.PLUGINS_LIST]: {
|
|
rowNumber: PAGINATE_BY
|
|
},
|
|
[ListViews.PRODUCT_LIST]: {
|
|
columns: ["isPublished", "price", "productType"],
|
|
rowNumber: PAGINATE_BY
|
|
},
|
|
[ListViews.SALES_LIST]: {
|
|
rowNumber: PAGINATE_BY
|
|
},
|
|
[ListViews.SHIPPING_METHODS_LIST]: {
|
|
rowNumber: PAGINATE_BY
|
|
},
|
|
[ListViews.STAFF_MEMBERS_LIST]: {
|
|
rowNumber: PAGINATE_BY
|
|
},
|
|
[ListViews.PERMISSION_GROUP_LIST]: {
|
|
rowNumber: PAGINATE_BY
|
|
},
|
|
[ListViews.VOUCHER_LIST]: {
|
|
rowNumber: PAGINATE_BY
|
|
},
|
|
[ListViews.WAREHOUSE_LIST]: {
|
|
rowNumber: PAGINATE_BY
|
|
},
|
|
[ListViews.WEBHOOK_LIST]: {
|
|
rowNumber: PAGINATE_BY
|
|
}
|
|
};
|
|
|
|
export const APP_VERSION = packageInfo.version;
|
|
export const DEMO_MODE = process.env.DEMO_MODE === "true";
|
|
export const GTM_ID = process.env.GTM_ID;
|