Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 0 additions & 66 deletions locale/defaultMessages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1982,10 +1982,6 @@
"context": "attribute properties regarding storefront",
"string": "Storefront Properties"
},
"AijtXU": {
"context": "table header configuration col label",
"string": "Configuration"
},
"AjInNW": {
"context": "dialog description",
"string": "Choose countries you want to add to shipping zone from list below"
Expand Down Expand Up @@ -2642,10 +2638,6 @@
"context": "VariantDetailsChannelsAvailabilityCard item subtitle hidden",
"string": "Hidden"
},
"EtGDeK": {
"context": "header",
"string": "{pluginName} Details"
},
"EuOXmr": {
"context": "add items title",
"string": "Add {itemsName}"
Expand Down Expand Up @@ -2702,9 +2694,6 @@
"context": "input placeholder",
"string": "Optional"
},
"FA+MRz": {
"string": "Set plugin as active"
},
"FBtqtl": {
"context": "payment status",
"string": "Unpaid"
Expand Down Expand Up @@ -3191,10 +3180,6 @@
"context": "table column header, sold units preorder quantity",
"string": "Sold units"
},
"HedXnw": {
"context": "plugin channel availability status title",
"string": "{activeChannelsCount,plural, =0 {Deactivated} other {Active in {activeChannelsCount}}}"
},
"Hgz44z": {
"context": "dialog header",
"string": "Delete Voucher"
Expand Down Expand Up @@ -3228,9 +3213,6 @@
"HqRNN8": {
"string": "Support"
},
"Hswqx2": {
"string": "Delete discounts"
},
"HvJPcU": {
"string": "Category deleted"
},
Expand Down Expand Up @@ -3578,10 +3560,6 @@
"context": "product availability publish date",
"string": "Publish on"
},
"JnzDrI": {
"context": "discount type",
"string": "Fixed Amount"
},
"Jo01VZ": {
"context": "bought by label",
"string": "Bought by"
Expand Down Expand Up @@ -4604,10 +4582,6 @@
"context": "number of products",
"string": "Products"
},
"QH74y5": {
"context": "table header name col label",
"string": "Name"
},
"QHDtwH": {
"string": "Has category"
},
Expand Down Expand Up @@ -5036,10 +5010,6 @@
"T4GOiX": {
"string": "End Date"
},
"T4wa2Y": {
"context": "global config plugin status popup title",
"string": "Global Plugin"
},
"T5nU7u": {
"context": "header",
"string": "Create Token"
Expand Down Expand Up @@ -5664,10 +5634,6 @@
"Wk00wL": {
"string": "Join the open source community"
},
"WkxE8/": {
"context": "percentage or fixed, header",
"string": "Discount Type"
},
"Wlc67M": {
"context": "error message",
"string": "Cannot choose a shipping method for an order without the shipping address"
Expand Down Expand Up @@ -7247,10 +7213,6 @@
"context": "button",
"string": "Deactivate"
},
"gz9v22": {
"context": "PluginChannelConfigurationCell channel title",
"string": "Per channel"
},
"gzM1em": {
"string": "Add rule"
},
Expand Down Expand Up @@ -8934,10 +8896,6 @@
"rbrahO": {
"string": "Close"
},
"reP5Uf": {
"context": "global config plugin status popup description",
"string": "Global plugins are set across all channels in your ecommerce. Only status is shown for those types of plugins"
},
"rfvBAF": {
"context": "select all options, button",
"string": "Select All"
Expand Down Expand Up @@ -9166,10 +9124,6 @@
"context": "voucher status",
"string": "Expired"
},
"tA5HJx": {
"context": "webhook input help text",
"string": "secret key is used to create a hash signature with each payload. *optional field"
},
"tCLTCb": {
"context": "tab name",
"string": "All products"
Expand Down Expand Up @@ -9722,10 +9676,6 @@
"wFVOKJ": {
"string": "Go to warehouses"
},
"wHdMAX": {
"context": "sale value, header",
"string": "Value"
},
"wJep/X": {
"context": "refund amounts were settled",
"string": "Settled"
Expand Down Expand Up @@ -9842,10 +9792,6 @@
"context": "Transaction event description",
"string": "Used in order"
},
"x3g4Ry": {
"context": "sale discount",
"string": "Discount Value"
},
"x3leH4": {
"context": "ProductTypeDeleteWarningDialog title",
"string": "Delete product {selectedTypesCount,plural,one{type} other{types}}"
Expand Down Expand Up @@ -9898,10 +9844,6 @@
"xRkj2h": {
"string": "Are you sure you want to delete {categoryName}?"
},
"xTIKA/": {
"context": "PluginChannelConfigurationCell global title",
"string": "Global"
},
"xTyg+p": {
"string": "No options to select"
},
Expand Down Expand Up @@ -10054,10 +9996,6 @@
"context": "error message",
"string": "Shipping method is required for this order"
},
"ycrTBX": {
"context": "table header channel col label",
"string": "Channel"
},
"yeX6fA": {
"context": "extensions page subheader",
"string": "Learn more about {extensions}"
Expand Down Expand Up @@ -10292,10 +10230,6 @@
"context": "cta button label",
"string": "Explore Updates"
},
"zpWcU5": {
"context": "Types",
"string": "Model types"
},
"zqarUF": {
"context": "modal information under title",
"string": "Select an address you want to use from the list below"
Expand Down
67 changes: 0 additions & 67 deletions src/apps/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import {
AppAvatarFragment,
AppInstallationFragment,
AppListItemFragment,
AppManifestFragment,
AppQuery,
AppTypeEnum,
JobStatusEnum,
PermissionEnum,
Expand Down Expand Up @@ -96,71 +94,6 @@ export const appsInProgress: AppInstallationFragment[] = [
successAppInProgress,
];

export const appDetails: NonNullable<AppQuery["app"]> = {
__typename: "App",
aboutApp: "Lorem ipsum",
accessToken: "token",
appUrl: "http://localhost:8888/app",
manifestUrl: "http://localhost:8888/api/manifest",
configurationUrl: "htpp://localhost:8888/configuration",
created: "2020-06-02T12:24:26.818138+00:00",
dataPrivacy: "Lorem ipsum",
dataPrivacyUrl: "http://localhost:8888/app-data-privacy",
homepageUrl: "http://localhost:8888/homepage",
id: "QXBwOjE4MQ==",
isActive: true,
metadata: [],
name: "app1",
author: "Saleor Commerce",
permissions: [
{
__typename: "Permission",
code: PermissionEnum.MANAGE_ORDERS,
name: "Manage orders.",
},
{
__typename: "Permission",
code: PermissionEnum.MANAGE_USERS,
name: "Manage customers.",
},
],
privateMetadata: [],
supportUrl: "http://localhost:8888/support",
tokens: [],
type: AppTypeEnum.THIRDPARTY,
version: "1.0.0",
webhooks: [],
brand: null,
};

export const installApp: AppManifestFragment = {
__typename: "Manifest",
about: "Lorem ipsum",
appUrl: null,
configurationUrl: null,
dataPrivacy: null,
dataPrivacyUrl: null,
homepageUrl: null,
identifier: "app",
name: "app",
permissions: [
{
__typename: "Permission",
code: PermissionEnum.MANAGE_USERS,
name: "Manage users",
},
{
__typename: "Permission",
code: PermissionEnum.MANAGE_ORDERS,
name: "Manage orders",
},
],
supportUrl: null,
tokenTargetUrl: null,
version: "1.0",
brand: null,
};

export const appAvatar: AppAvatarFragment = {
id: "QXBwOjE3Ng==",
name: "app",
Expand Down
13 changes: 1 addition & 12 deletions src/apps/urls.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { getApiUrl } from "@dashboard/config";
import { ExtensionsPaths } from "@dashboard/extensions/urls";
import { FlagList } from "@dashboard/featureFlags";
import { stringifyQs } from "@dashboard/utils/urls";
import { ThemeType } from "@saleor/app-sdk/app-bridge";
import urlJoin from "url-join";

import { Dialog, SingleAction } from "../types";

export type AppDetailsUrlDialog = "app-activate" | "app-deactivate" | "app-delete";
type AppDetailsUrlDialog = "app-activate" | "app-deactivate" | "app-delete";
export interface AppDetailsUrlMountQueryParams {
productId?: string;
productIds?: string[];
Expand Down Expand Up @@ -39,22 +38,12 @@ export const AppPaths = {
appListPath: AppSections.appsSection,
resolveAppPath: (id: string) => urlJoin(AppSections.appsSection, id, "app"),
resolveAppDetailsPath: (id: string) => urlJoin(AppSections.appsSection, id),
resolveAppDeepPath: (id: string, subPath: string) =>
urlJoin(AppPaths.resolveAppPath(id), subPath),
appInstallPath: urlJoin(AppSections.appsSection, "install"),
resolveRequestPermissionsPath: (id: string) =>
urlJoin(AppSections.appsSection, id, "permissions"),
};

export const AppUrls = {
resolveAppListUrl: () => ExtensionsPaths.installedExtensions,
resolveAppUrl: (id: string, params?: AppDetailsUrlQueryParams) =>
AppPaths.resolveAppPath(encodeURIComponent(id)) + "?" + stringifyQs(params),
resolveAppDetailsUrl: (id: string, params?: AppDetailsUrlQueryParams) =>
AppPaths.resolveAppDetailsPath(encodeURIComponent(id)) + "?" + stringifyQs(params),
resolveAppInstallUrl: (manifestUrl: string) =>
`${AppPaths.appInstallPath}?manifestUrl=${manifestUrl}`,

isAppDeepUrlChange: (appId: string, from: string, to: string) => {
const appCompletePath = AppPaths.resolveAppPath(encodeURIComponent(appId));

Expand Down
2 changes: 1 addition & 1 deletion src/attributes/utils/productVariantCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { SearchProductsQuery } from "@dashboard/graphql";
import { RelayToFlat } from "@dashboard/types";

export type CachedSearchProduct = RelayToFlat<NonNullable<SearchProductsQuery["search"]>>[0];
export type CachedSearchProductVariant = NonNullable<CachedSearchProduct["variants"]>[0];
type CachedSearchProductVariant = NonNullable<CachedSearchProduct["variants"]>[0];

/** Cache available variants in product in order to build fast labels based on selected values in the form */
export class ProductVariantCacheManagerSingleton {
Expand Down
Loading
Loading