UNPKG

@elastic-suite/gally-admin-shared

Version:
1 lines 582 kB
{"version":3,"sources":["../src/constants/api.ts","../src/constants/category.ts","../src/constants/cmsPage.ts","../src/types/aggregation.ts","../src/types/sortingOption.ts","../src/types/customTables.ts","../src/types/extraBundle.ts","../src/types/fetch.ts","../src/types/hydra.ts","../src/types/network.ts","../src/types/products.ts","../src/types/rules.ts","../src/types/requestType.ts","../src/types/user.ts","../src/constants/customTable.ts","../src/constants/graphql.ts","../src/constants/hydra.ts","../src/constants/product.ts","../src/constants/rules.ts","../src/constants/theme.tsx","../src/constants/url.ts","../src/constants/user.ts","../src/contexts/schema.ts","../src/hooks/useSchemaLoader.ts","../src/services/fetch.ts","../src/services/hydra.ts","../src/services/network.ts","../src/services/storage.ts","../src/services/url.ts","../src/services/api.ts","../src/services/breadcrumb.ts","../src/services/bundle.ts","../src/services/catalog.ts","../src/services/category.ts","../src/services/explain.ts","../src/services/field.ts","../src/services/form.ts","../src/services/format.ts","../src/services/graphql.ts","../src/services/hoc.ts","../src/services/local.ts","../src/services/log.ts","../src/services/options.ts","../src/services/parser.ts","../src/services/product.ts","../src/services/rules.ts","../src/services/style.ts","../src/services/table.ts","../src/services/user.ts","../src/mocks/api.ts","../src/mocks/expandedDocs.ts","../src/mocks/rules.ts"],"sourcesContent":["export const defaultApiRootPrefix = 'api'\n\nlet url =\n process.env.NODE_ENV === 'test'\n ? 'http://localhost/'\n : process.env.NEXT_PUBLIC_API_URL\n ? process.env.NEXT_PUBLIC_API_URL\n : process.env.REACT_APP_API_URL\n ? process.env.REACT_APP_API_URL\n : `${typeof window !== 'undefined' ? window.location.origin : ''}/${\n process.env.NEXT_PUBLIC_API_ROUTE_PREFIX\n ? process.env.NEXT_PUBLIC_API_ROUTE_PREFIX\n : defaultApiRootPrefix\n }`\n\nif (url && String(url).endsWith('/')) {\n url = url.slice(0, -1)\n}\nexport const apiUrl = url\nexport const gqlUrl = `${url}/graphql`\nexport const searchableAttributeUrl = '?isSearchable=true'\n\nexport const authHeader = 'Authorization'\nexport const languageHeader = 'Gally-Language'\nexport const contentTypeHeader = 'Content-Type'\n\nexport const authErrorCodes = [401, 403]\n\n// URL parameters\nexport const currentPage = 'currentPage'\nexport const pageSize = 'pageSize'\nexport const usePagination = 'pagination'\nexport const searchParameter = 'search'\n\nexport const defaultPageSize = 50\n","export const categoryEntityType = 'category'\n","export const cmsPageEntityType = 'cms_page'\n","export enum AggregationType {\n CATEGORY = 'category',\n CHECKBOX = 'checkbox',\n SLIDER = 'slider',\n BOOLEAN = 'boolean',\n HISTOGRAM = 'histogram',\n HISTOGRAM_DATE = 'date_histogram',\n}\nexport interface IGraphqlAggregation {\n count: number\n field: string\n label: string\n type: AggregationType\n options: IGraphqlAggregationOption[]\n hasMore: boolean | null\n date_format?: string\n date_range_interval?: string\n}\n\nexport interface IGraphqlAggregationOption {\n count: number\n label: string\n value: string\n}\n","import { IJsonldBase } from './jsonld'\n\nexport enum SortOrder {\n ASC = 'asc',\n DESC = 'desc',\n}\n\nexport interface ISortingOption extends IJsonldBase {\n label: string\n code: string\n}\n\nexport interface IGraphqlSortingOptions {\n sortingOptions: ISortingOption[]\n}\n","import { IFieldConfig, IFieldState } from './field'\nimport { ICustomDialog } from './popin'\n\nexport enum MassiveSelectionType {\n ALL = 'massiveselection.all',\n ALL_ON_CURRENT_PAGE = 'massiveselection.allOnCurrentPage',\n NONE = 'massiveselection.none',\n}\n\nexport enum DataContentType {\n BOOLEAN = 'boolean',\n IMAGE = 'image',\n LABEL = 'label',\n NUMBER = 'number',\n PRICE = 'price',\n RANGE = 'range',\n SCORE = 'score',\n SELECT = 'select',\n STOCK = 'stock',\n STRING = 'string',\n TAG = 'tag',\n BUTTON = 'button',\n OPTGROUP = 'optgroup',\n RANGEDATE = 'rangeDate',\n REQUESTTYPE = 'requestType',\n RULEENGINE = 'ruleEngine',\n SLIDER = 'slider',\n MULTIPLEINPUT = 'multipleInput',\n SYNONYM = 'synonym',\n EXPANSION = 'expansion',\n PRODUCTINFO = 'productInfo',\n BOOSTPREVIEW = 'boostPreview',\n POSITIONEFFECT = 'positionEffect',\n PROPARTIONALTOATTRIBUTE = 'proportionalToAttribute',\n}\n\nexport interface ITableHeader extends IFieldConfig {\n sticky?: boolean\n}\n\nexport interface IBaseStyle {\n left: string\n backgroundColor: string\n zIndex: string\n}\n\nexport interface INonStickyStyle {\n borderBottomColor: string\n backgroundColor: string\n overflow?: string\n}\n\nexport interface ISelectionStyle extends IBaseStyle {\n stickyBorderStyle?: IStickyBorderStyle\n}\n\nexport interface IStickyStyle extends IBaseStyle {\n minWidth: string\n stickyBorderStyle?: IStickyBorderStyle\n overflow?: string\n}\nexport interface IDraggableColumnStyle extends IBaseStyle {\n minWidth: string\n borderRight?: string\n stickyBorderStyle?: IStickyBorderStyle\n}\n\nexport interface IStickyBorderStyle {\n borderBottomColor: string\n borderRight: string\n borderRightColor: string\n boxShadow?: string\n clipPath?: string\n}\n\nexport interface ITableRow {\n id: string | number\n popIn?: ICustomDialog\n [key: string]:\n | string\n | boolean\n | number\n | IScore\n | IImage\n | IStock\n | IPrice[]\n | IProductInfo\n | ICustomDialog\n | IPositionEffect\n}\n\nexport interface IHorizontalOverflow {\n isOverflow: boolean\n shadow: boolean\n}\n\nexport interface ITableHeaderSticky extends ITableHeader {\n isLastSticky: boolean\n}\n\nexport type ITableConfig = Record<string, IFieldState>\n\nexport type BoostType = 'up' | 'down' | 'straight'\n\nexport type PositionEffectType = 'up' | 'down' | 'straight'\n\nexport enum ImageIcon {\n PIN = 'push-pin',\n}\n\nexport interface IBoost {\n type: BoostType\n boostNumber?: number\n boostMultiplicator?: number\n}\n\nexport interface IStock {\n status: boolean\n qty?: number\n}\n\nexport interface IScore {\n scoreValue: number\n boostInfos?: IBoost\n}\n\nexport interface IImage {\n path: string\n icons?: ImageIcon[]\n}\n\nexport interface IPrice {\n price: number\n}\n\nexport interface IProductInfo {\n productName: string\n price: IPrice['price']\n stockStatus: IStock['status']\n}\n\nexport interface IPositionEffect {\n type: PositionEffectType\n}\n","export enum Bundle {\n VIRTUAL_CATEGORY = 'GallyVirtualCategoryBundle',\n BOOST = 'GallyBoostBundle',\n THESAURUS = 'GallyThesaurusBundle',\n VECTOR_SEARCH = 'GallyVectorSearchBundle',\n}\n\nexport interface IExtraBundle {\n id: Bundle\n name: Bundle\n}\n","import { IResource } from './api'\nimport { IError } from './network'\n\nexport enum LoadStatus {\n FAILED,\n IDLE,\n LOADING,\n SUCCEEDED,\n}\n\nexport interface IFetch<D> {\n data?: D\n error?: Error\n status: LoadStatus\n}\n\nexport interface IGraphqlResponse<D> {\n data: D\n}\n\nexport type ISearchParameters = Record<\n string,\n string | number | boolean | (string | number | boolean)[]\n>\n\nexport type IFetchApi = <T extends object>(\n resource: IResource | string,\n searchParameters?: ISearchParameters,\n options?: RequestInit\n) => Promise<T | IError>\n","import { Method } from './network'\nimport {\n IJsonldBase,\n IJsonldBoolean,\n IJsonldContext,\n IJsonldId,\n IJsonldNumber,\n IJsonldRange,\n IJsonldString,\n IJsonldType,\n} from './jsonld'\nimport { IOptions } from './option'\nimport { IHydraSimpleCatalog } from './catalog'\nimport { IFieldDepends, IFieldGuesserProps } from './field'\n\nexport enum HydraType {\n ARRAY = 'array',\n BOOLEAN = 'boolean',\n INTEGER = 'integer',\n OBJECT = 'object',\n STRING = 'string',\n}\n\nexport interface IHydraPropertyTypeRef {\n $ref?: string\n}\n\nexport interface IHydraPropertyTypeArray {\n type: HydraType.ARRAY\n items: HydraPropertyType\n}\n\nexport interface IHydraPropertyTypeBoolean {\n type: HydraType.BOOLEAN\n}\n\nexport interface IHydraPropertyTypeInteger {\n type: HydraType.INTEGER\n default?: number\n minimum?: number\n maximum?: number\n}\n\nexport interface IHydraPropertyTypeObject {\n type: HydraType.OBJECT\n properties: Record<string, HydraPropertyType>\n required?: string[]\n}\n\nexport interface IHydraPropertyTypeString {\n type: HydraType.STRING\n format?: string\n nullable?: boolean\n}\n\nexport type HydraPropertyType =\n | IHydraPropertyTypeRef\n | IHydraPropertyTypeArray\n | IHydraPropertyTypeBoolean\n | IHydraPropertyTypeInteger\n | IHydraPropertyTypeObject\n | IHydraPropertyTypeString\n\nexport interface IOwlEquivalentClass {\n 'owl:onProperty': IJsonldId\n 'owl:allValuesFrom': IJsonldId\n}\n\nexport interface IRdfsRange {\n 'owl:equivalentClass': IOwlEquivalentClass\n}\n\nexport interface IHydraSupportedOperation extends IJsonldType {\n expects?: string\n 'hydra:method': Method\n 'hydra:title'?: string\n 'rdfs:label': string\n returns: string\n}\n\nexport interface IHydraProperty extends IJsonldBase {\n domain: string\n 'hydra:supportedOperation'?:\n | IHydraSupportedOperation\n | IHydraSupportedOperation[]\n 'owl:maxCardinality'?: number\n range?: string\n 'rdfs:label': string\n 'rdfs:range'?: (IJsonldId | IRdfsRange)[]\n}\n\nexport interface IDependsForm {\n field?: string\n value?: string\n}\n\nexport interface IInputDependencies {\n field: string\n value: string\n input: string\n jsonKeyValue: string\n fieldProps: IFieldGuesserProps\n}\nexport interface IMultipleInputConfiguration {\n inputDependencies: IInputDependencies[]\n}\n\nexport interface IMultipleValueFormat {\n separator?: string\n maxCount?: number\n}\n\nexport interface IGallyProperty {\n context?: Record<string, IGallyProperty>\n depends?: IFieldDepends\n editable?: boolean\n input?: string\n options?: IDropdownOptions & (IDropdownStaticOptions | IDropdownApiOptions)\n position?: number\n required?: boolean\n type?: string\n validation?: Record<string, string | number | boolean>\n visible?: boolean\n alias?: string\n multipleValueFormat?: IMultipleValueFormat\n fieldset?: string\n rangeDateType?: string\n rangeDateId?: number | string\n requestTypeConfigurations?: Record<string, string>\n form?: IGallyProperty\n grid?: IGallyProperty\n infoTooltip?: string\n multipleInputConfiguration?: IMultipleInputConfiguration\n placeholder?: string\n defaultValue?: unknown\n showError?: boolean\n gridHeaderInfoTooltip?: string\n}\nexport interface IDropdownOptions {\n objectKeyValue?: string\n}\n\nexport interface IDropdownStaticOptions {\n values: IOptions<string>\n}\n\nexport interface IDropdownApiOptions {\n api_rest: string\n api_graphql: string\n}\n\nexport interface IHydraSupportedProperty extends IJsonldType {\n 'hydra:description'?: string\n 'hydra:property': IHydraProperty\n 'hydra:readable': boolean\n 'hydra:required'?: boolean\n 'hydra:title': string\n 'hydra:writeable': boolean\n gally?: IGallyProperty\n}\n\nexport interface IHydraSupportedClass extends IJsonldBase {\n 'hydra:description'?: string\n 'hydra:supportedOperation'?:\n | IHydraSupportedOperation\n | IHydraSupportedOperation[]\n 'hydra:supportedProperty': IHydraSupportedProperty[]\n 'hydra:title': string\n 'rdfs:label'?: string\n subClassOf?: string\n}\n\nexport interface IHydraMember extends IJsonldBase {\n id: number | string\n}\n\nexport interface IHydraLabelMember extends IHydraMember {\n localizedCatalog: IHydraSimpleCatalog\n label: string\n}\n\nexport interface IHydraTrace {\n args: [string, unknown][]\n class: string\n file: string\n function: string\n line: number\n namespace: string\n short_class: string\n type: string\n}\n\nexport interface IHydraError extends IJsonldType, IJsonldContext {\n '@context': '/contexts/Error'\n '@type': 'hydra:Error'\n 'hydra:description': string\n 'hydra:title': string\n trace: IHydraTrace[]\n}\n\nexport interface IHydraMapping extends IJsonldType {\n variable: string\n property: string\n required: boolean\n}\n\nexport interface IHydraSearch extends IJsonldType {\n 'hydra:mapping': IHydraMapping[]\n 'hydra:template': string\n 'hydra:variableRepresentation': string\n}\n\nexport interface IHydraResponse<Member>\n extends IJsonldContext,\n IJsonldType,\n IJsonldId {\n 'hydra:member': Member[]\n 'hydra:search'?: IHydraSearch\n 'hydra:totalItems': number\n}\n\nexport interface IExpandedHydraSupportedOperation extends IJsonldType {\n 'http://www.w3.org/2000/01/rdf-schema#label': [IJsonldString]\n 'http://www.w3.org/ns/hydra/core#expects'?: [IJsonldString]\n 'http://www.w3.org/ns/hydra/core#method': [IJsonldString]\n 'http://www.w3.org/ns/hydra/core#returns': [IJsonldId]\n 'http://www.w3.org/ns/hydra/core#title'?: [IJsonldString]\n}\n\nexport interface IExpandedHydraProperty extends IJsonldBase {\n 'http://www.w3.org/2000/01/rdf-schema#domain': [IJsonldId]\n 'http://www.w3.org/2000/01/rdf-schema#label': [IJsonldString]\n 'http://www.w3.org/2000/01/rdf-schema#range':\n | [IJsonldId]\n | [IJsonldId, IJsonldRange]\n 'http://www.w3.org/2002/07/owl#maxCardinality'?: [IJsonldNumber]\n 'http://www.w3.org/ns/hydra/core#supportedOperation'?: IExpandedHydraSupportedOperation[]\n}\n\nexport interface IExpandedGallyProperty {\n 'https://localhost/docs.jsonld#editable'?: [IJsonldBoolean]\n 'https://localhost/docs.jsonld#position'?: [IJsonldNumber]\n 'https://localhost/docs.jsonld#visible'?: [IJsonldBoolean]\n 'https://localhost/docs.jsonld#context'?: [\n Record<string, [IExpandedGallyProperty]>\n ]\n}\n\nexport interface IExpandedHydraSupportedProperty extends IJsonldType {\n 'http://www.w3.org/ns/hydra/core#property': IExpandedHydraProperty[]\n 'http://www.w3.org/ns/hydra/core#readable': [IJsonldBoolean]\n 'http://www.w3.org/ns/hydra/core#required'?: [IJsonldBoolean]\n 'http://www.w3.org/ns/hydra/core#title': [IJsonldString]\n 'http://www.w3.org/ns/hydra/core#writeable': [IJsonldBoolean]\n 'https://localhost/docs.jsonld#gally'?: IExpandedGallyProperty\n}\n\nexport interface IExpandedHydraSupportedClass extends IJsonldBase {\n 'http://www.w3.org/2000/01/rdf-schema#label'?: [IJsonldString]\n 'http://www.w3.org/ns/hydra/core#supportedOperation': IExpandedHydraSupportedOperation[]\n 'http://www.w3.org/ns/hydra/core#supportedProperty': IExpandedHydraSupportedProperty[]\n 'http://www.w3.org/ns/hydra/core#title': [IJsonldString]\n}\n","import { ApiError } from '../services/api'\nimport { GraphqlError } from '../services/graphql'\nimport { AuthError } from '../services/network'\n\nexport enum HttpCode {\n OK = '200',\n CREATED = '201',\n NO_CONTENT = '204',\n BAD_REQUEST = '400',\n NOT_FOUND = '404',\n UNPROCESSABLE_ENTITY = '422',\n}\n\nexport enum Method {\n DELETE = 'DELETE',\n GET = 'GET',\n PATCH = 'PATCH',\n POST = 'POST',\n PUT = 'PUT',\n}\n\nexport interface IError {\n error?: Error\n violations?: any\n}\n\nexport type NetworkError = Error | ApiError | AuthError | GraphqlError | string\n","import { ISortingOption, SortOrder } from './sortingOption'\nimport { IPrice, IStock } from './customTables'\nimport { ISearchParameters } from './fetch'\nimport { IGraphqlAggregation } from './aggregation'\nimport {\n IGraphqlViewMoreFacetOption,\n IGraphqlViewMoreFacetOptionsVariables,\n} from './facet'\n\nexport enum ProductRequestType {\n CATALOG = 'product_catalog',\n SEARCH = 'product_search',\n COVERAGE_RATE = 'product_coverage_rate',\n AUTOCOMPLETE = 'product_autocomplete',\n}\n\nexport interface IGraphqlSearchProductsVariables {\n localizedCatalog: string\n currentCategoryId?: string\n currentPage?: number\n filter?: IProductFieldFilterInput[] | IProductFieldFilterInput\n pageSize?: number\n requestType: ProductRequestType\n search?: string\n sort?: Record<string, SortOrder>\n}\n\nexport interface IGraphqlSearchProducts {\n products: IGraphqlSearchProduct\n}\n\nexport interface IGraphqlSearchProduct {\n collection: IGraphqlProduct[]\n paginationInfo: IGraphqlProductPaginationInfo\n sortInfo: IGraphqlProductSortInfo\n aggregations?: IGraphqlAggregation[]\n}\n\nexport interface IGraphqlProduct {\n id: string\n price?: IPrice[]\n sku: string\n name: string\n brand?: string\n stock: IStock\n score: number\n}\n\nexport interface IGraphqlProductPaginationInfo {\n lastPage: number\n totalCount: number\n}\n\nexport interface IGraphqlProductSortInfo {\n current: IGraphqlProductSortInfoCurrent[]\n}\n\nexport interface IGraphqlProductSortInfoCurrent {\n field: string\n direction: SortOrder\n}\n\nexport interface IFetchParams {\n options: RequestInit\n searchParameters: ISearchParameters\n}\n\nexport interface IProductBoolFilterInput {\n _must?: IProductFieldFilterInput[]\n _should?: IProductFieldFilterInput[]\n _not?: IProductFieldFilterInput[]\n}\n\nexport interface ICategoryTypeDefaultFilterInputType {\n eq: string\n}\n\nexport interface IStockTypeDefaultFilterInputType {\n eq?: boolean\n exist?: boolean\n}\n\nexport interface ISelectTypeDefaultFilterInputType {\n eq?: string\n in?: string[]\n exist?: boolean\n}\n\nexport interface IEntityTextTypeFilterInput\n extends ISelectTypeDefaultFilterInputType {\n match?: string\n}\n\nexport interface IEntityIntegerTypeFilterInput {\n eq?: number\n in?: number[]\n gte?: number | string\n gt?: number | string\n lt?: number | string\n lte?: number | string\n exist?: boolean\n}\n\nexport type ITypeFilterInput =\n | IEntityIntegerTypeFilterInput\n | IEntityTextTypeFilterInput\n | ISelectTypeDefaultFilterInputType\n | IStockTypeDefaultFilterInputType\n | ICategoryTypeDefaultFilterInputType\n | IProductBoolFilterInput\n\nexport interface IProductFieldFilterInput {\n boolFilter?: IProductBoolFilterInput\n [key: string]: ITypeFilterInput\n}\n\nexport interface IGraphqlViewMoreProductFacetOptionsVariables\n extends Omit<IGraphqlViewMoreFacetOptionsVariables, 'entityType'> {\n currentCategoryId?: string\n filter?: IProductFieldFilterInput[] | IProductFieldFilterInput\n}\n\nexport interface IGraphqlViewMoreProductFacetOptions {\n viewMoreProductFacetOptions: IGraphqlViewMoreFacetOption[]\n}\n\nexport interface IGraphqlProductSortingOptions {\n productSortingOptions: ISortingOption[]\n}\n","import { IOptions } from './option'\nimport { IOperatorsValueType } from './ruleEngineOperators'\nimport { ITreeItem } from './tree'\n\nexport enum RuleType {\n ATTRIBUTE = 'attribute',\n COMBINATION = 'combination',\n}\n\nexport enum RuleAttributeType {\n BOOLEAN = 'boolean',\n CATEGORY = 'category',\n FLOAT = 'float',\n INT = 'int',\n REFERENCE = 'reference',\n SELECT = 'select',\n TEXT = 'text',\n DATE = 'date',\n}\n\nexport enum RuleValueType {\n BOOLEAN = 'Boolean',\n FLOAT = 'Float',\n INT = 'Int',\n STRING = 'String',\n BOOLEAN_MULTIPLE = '[Boolean]',\n FLOAT_MULTIPLE = '[Float]',\n INT_MULTIPLE = '[Int]',\n STRING_MULTIPLE = '[String]',\n STRING_REQUIRED = 'String!',\n}\n\nexport enum RuleCombinationOperator {\n ALL = 'all',\n ANY = 'any',\n}\n\nexport interface IRule {\n type: RuleType\n value: string | string[] | number | number[] | boolean\n}\n\nexport interface IRuleAttribute extends IRule {\n type: RuleType.ATTRIBUTE\n field: string\n operator: string\n attribute_type: RuleAttributeType\n}\n\nexport interface IRuleCombination extends IRule {\n type: RuleType.COMBINATION\n operator: RuleCombinationOperator\n children: IRule[]\n}\n\nexport type IRuleOptions = Map<string, IOptions<unknown> | ITreeItem[]>\n\nexport interface IRuleOptionsContext {\n getAttributeOperatorOptions: (field: string) => IOptions<string>\n getAttributeType: (field: string) => RuleAttributeType\n loadAttributeValueOptions: (field: string) => void\n operatorsValueType: IOperatorsValueType\n options: IRuleOptions\n}\n","import { ISearchLimitations } from './textFieldTagsMultiple'\n\nexport enum LimitationType {\n SEARCH = 'search',\n CATEGORY = 'category',\n}\n\nexport interface ILimitationsTypes {\n label: string\n id?: string\n value: string\n labelAll: string\n}\n\nexport interface IRequestTypesOptions {\n label: string\n previewLabel: string\n limitationType: string\n id: string\n value: string\n}\nexport interface IRequestTypes {\n '@id'?: string\n '@type'?: string\n requestType: string\n applyToAll: boolean\n}\n\nexport interface ICategoryLimitations {\n '@id'?: string\n '@type'?: string\n category: string\n}\n\nexport interface IRequestType {\n requestTypes: IRequestTypes[]\n categoryLimitations: ICategoryLimitations[]\n searchLimitations: ISearchLimitations[]\n createdAt?: string\n updatedAt?: string\n}\n","export enum Role {\n ADMIN = 'ROLE_ADMIN',\n CONTRIBUTOR = 'ROLE_CONTRIBUTOR',\n}\n\nexport interface IUser {\n exp: number\n iat: number\n roles: Role[]\n username: string\n}\n","import { DataContentType, ITableHeader, ImageIcon } from '../types'\n\nexport const reorderingColumnWidth = 48 // 48px provide by Figma\nexport const selectionColumnWidth = 80 // 68px provide by Figma ( TODO : dicuss with Morgane to rework this part if needed to be exactly like figma )\nexport const stickyColunWidth = 180 // 180px, fixed width for sticky column width ( TODO : add a table )\n\nexport const productTableheader: ITableHeader[] = [\n {\n id: 'sku',\n input: DataContentType.STRING,\n name: 'sku',\n label: 'Code',\n type: DataContentType.STRING,\n },\n {\n id: 'image',\n input: DataContentType.IMAGE,\n name: 'image',\n label: 'Image',\n type: DataContentType.IMAGE,\n },\n {\n id: 'name',\n input: DataContentType.STRING,\n name: 'name',\n label: 'Name',\n type: DataContentType.STRING,\n },\n {\n id: 'score',\n input: DataContentType.SCORE,\n name: 'score',\n label: 'Score',\n type: DataContentType.SCORE,\n },\n {\n id: 'stock',\n input: DataContentType.STOCK,\n name: 'stock',\n label: 'Stock',\n type: DataContentType.STOCK,\n },\n {\n id: 'price',\n input: DataContentType.PRICE,\n name: 'price',\n label: 'Price',\n type: DataContentType.PRICE,\n },\n]\n\nexport const defaultRowsPerPageOptions = [10, 25, 50]\n\nexport const imageIconLabels = {\n [ImageIcon.PIN]: 'Pinned',\n}\n","import { VariableType, jsonToGraphQLQuery } from 'json-to-graphql-query'\n\nimport { IGraphqlQueryContent, IProductFieldFilterInput } from '../types'\nimport { IDocumentFieldFilterInput } from '../types/documents'\nimport { categoryEntityType } from './category'\n\nexport const getPreviewBoost = `query preview($localizedCatalog: String!, $search: String) {\n previewBoost(\n localizedCatalog: $localizedCatalog\n requestType: product_search\n search: $search\n ) {\n id,\n resultsBefore,\n resultsAfter\n }\n }`\n\nexport function getPreviewBoostQuery(): string {\n return jsonToGraphQLQuery({\n query: {\n __name: 'getPreview',\n __variables: {\n localizedCatalog: 'String!',\n requestType: 'ProductRequestTypeEnum!',\n currentBoost: 'String!',\n search: 'String',\n category: 'String',\n currentPage: 'Int',\n pageSize: 'Int',\n },\n previewBoost: {\n __args: {\n localizedCatalog: new VariableType('localizedCatalog'),\n requestType: new VariableType('requestType'),\n currentBoost: new VariableType('currentBoost'),\n search: new VariableType('search'),\n currentCategoryId: new VariableType('category'),\n currentPage: new VariableType('currentPage'),\n pageSize: new VariableType('pageSize'),\n },\n id: true,\n resultsBefore: true,\n resultsAfter: true,\n lastPage: true,\n itemsPerPage: true,\n totalItems: true,\n },\n },\n })\n}\n\nexport function getSearchProductsQuery(\n filter: IProductFieldFilterInput | IProductFieldFilterInput[] = null,\n withAggregations = false\n): string {\n const productQueryContent = getSearchProductsQueryContent(\n filter,\n withAggregations\n )\n return jsonToGraphQLQuery({\n query: {\n __name: 'getProducts',\n __variables: { ...productQueryContent.variables },\n products: {\n __aliasFor: 'products',\n __args: { ...productQueryContent.args },\n ...productQueryContent.fields,\n },\n },\n })\n}\n\nexport function getSearchPreviewProductsQuery(\n filter: IProductFieldFilterInput | IProductFieldFilterInput[] = null,\n withAggregations = false\n): string {\n const productQueryContent = getSearchProductsQueryContent(\n filter,\n withAggregations\n )\n return jsonToGraphQLQuery({\n query: {\n __name: 'getPreviewProducts',\n __variables: {\n ...productQueryContent.variables,\n currentCategoryConfiguration: 'String',\n },\n products: {\n __aliasFor: 'previewProducts',\n __args: {\n ...productQueryContent.args,\n currentCategoryConfiguration: new VariableType(\n 'currentCategoryConfiguration'\n ),\n },\n ...productQueryContent.fields,\n },\n },\n })\n}\n\nfunction getSearchProductsQueryContent(\n filter: IProductFieldFilterInput | IProductFieldFilterInput[] = null,\n withAggregations = false,\n collectionEntityType = 'Product',\n collectionExtraFields = {},\n extraFields = {}\n): IGraphqlQueryContent {\n return {\n variables: {\n requestType: 'ProductRequestTypeEnum!',\n localizedCatalog: 'String!',\n currentPage: 'Int',\n currentCategoryId: 'String',\n pageSize: 'Int',\n search: 'String',\n sort: 'ProductSortInput',\n },\n args: {\n requestType: new VariableType('requestType'),\n localizedCatalog: new VariableType('localizedCatalog'),\n currentPage: new VariableType('currentPage'),\n currentCategoryId: new VariableType('currentCategoryId'),\n pageSize: new VariableType('pageSize'),\n search: new VariableType('search'),\n sort: new VariableType('sort'),\n filter,\n },\n fields: {\n collection: {\n __on: {\n __typeName: collectionEntityType,\n id: true,\n sku: true,\n name: true,\n description: true,\n score: true,\n image: true,\n\n stock: {\n status: true,\n },\n price: {\n price: true,\n },\n ...collectionExtraFields,\n },\n },\n paginationInfo: {\n lastPage: true,\n itemsPerPage: true,\n totalCount: true,\n },\n sortInfo: {\n current: {\n field: true,\n direction: true,\n },\n },\n ...(withAggregations && {\n aggregations: {\n field: true,\n label: true,\n type: true,\n date_format: true,\n date_range_interval: true,\n options: {\n count: true,\n label: true,\n value: true,\n },\n hasMore: true,\n },\n }),\n ...extraFields,\n },\n }\n}\n\nexport function getSearchCategoryQueryContent(\n filter: IDocumentFieldFilterInput | IDocumentFieldFilterInput[] = null,\n withAggregations = false\n): IGraphqlQueryContent {\n return getSearchDocumentQueryContent(\n filter,\n withAggregations,\n categoryEntityType\n )\n}\n\nexport function getSearchDocumentsQuery(\n entityType: string,\n filter: IDocumentFieldFilterInput | IDocumentFieldFilterInput[] = null,\n withAggregations = false\n): string {\n const documentQueryContent = getSearchDocumentQueryContent(\n filter,\n withAggregations,\n entityType\n )\n return jsonToGraphQLQuery({\n query: {\n __name: 'getDocuments',\n __variables: { ...documentQueryContent.variables },\n documents: {\n __aliasFor: 'documents',\n __args: { ...documentQueryContent.args },\n ...documentQueryContent.fields,\n },\n },\n })\n}\n\nexport function getVectorSearchDocumentsQuery(\n entityType: string,\n filter: IDocumentFieldFilterInput | IDocumentFieldFilterInput[] = null,\n withAggregations = false\n): string {\n const documentQueryContent = getSearchDocumentQueryContent(\n filter,\n withAggregations,\n entityType,\n 'VectorDocument'\n )\n\n return jsonToGraphQLQuery({\n query: {\n __name: 'getVectorSearchDocuments',\n __variables: { ...documentQueryContent.variables },\n vectorSearchDocuments: {\n __aliasFor: 'vectorSearchDocuments',\n __args: { ...documentQueryContent.args },\n ...documentQueryContent.fields,\n },\n },\n })\n}\n\nexport function getSearchDocumentQueryContent(\n filter: IDocumentFieldFilterInput | IDocumentFieldFilterInput[] = null,\n withAggregations = false,\n variablePrefix = 'document',\n collectionEntityType = 'Document'\n): IGraphqlQueryContent {\n return {\n variables: {\n [`${variablePrefix}EntityType`]: 'String!',\n [`${variablePrefix}LocalizedCatalog`]: 'String!',\n [`${variablePrefix}CurrentPage`]: 'Int',\n [`${variablePrefix}PageSize`]: 'Int',\n [`${variablePrefix}Search`]: 'String',\n [`${variablePrefix}Sort`]: 'SortInput',\n },\n args: {\n entityType: new VariableType(`${variablePrefix}EntityType`),\n localizedCatalog: new VariableType(`${variablePrefix}LocalizedCatalog`),\n currentPage: new VariableType(`${variablePrefix}CurrentPage`),\n pageSize: new VariableType(`${variablePrefix}PageSize`),\n search: new VariableType(`${variablePrefix}Search`),\n sort: new VariableType(`${variablePrefix}Sort`),\n filter,\n },\n fields: {\n collection: {\n __on: {\n __typeName: collectionEntityType,\n id: true,\n score: true,\n source: true,\n },\n },\n paginationInfo: {\n lastPage: true,\n itemsPerPage: true,\n totalCount: true,\n },\n sortInfo: {\n current: {\n field: true,\n direction: true,\n },\n },\n ...(withAggregations && {\n aggregations: {\n field: true,\n label: true,\n type: true,\n date_format: true,\n date_range_interval: true,\n options: {\n count: true,\n label: true,\n value: true,\n },\n hasMore: true,\n },\n }),\n },\n }\n}\n\nexport function getAutoCompleteSearchQuery(\n productFilter: IProductFieldFilterInput | IProductFieldFilterInput[] = null,\n categoryFilter:\n | IDocumentFieldFilterInput\n | IDocumentFieldFilterInput[] = null,\n withAggregations = false\n): string {\n const productQueryContent = getSearchProductsQueryContent(\n productFilter,\n withAggregations\n )\n const categoryQueryContent = getSearchCategoryQueryContent(\n categoryFilter,\n withAggregations\n )\n return jsonToGraphQLQuery({\n query: {\n __name: 'getAutoCompleteDocuments',\n __variables: {\n ...productQueryContent.variables,\n ...categoryQueryContent.variables,\n },\n products: {\n __aliasFor: 'products',\n __args: { ...productQueryContent.args },\n ...productQueryContent.fields,\n },\n categories: {\n __aliasFor: 'documents',\n __args: { ...categoryQueryContent.args },\n ...categoryQueryContent.fields,\n },\n },\n })\n}\n\nexport function getMoreFacetOptionsQuery(\n filter: IDocumentFieldFilterInput | IDocumentFieldFilterInput[] = null\n): string {\n return jsonToGraphQLQuery({\n query: {\n __name: 'viewMoreFacetOptions',\n __variables: {\n entityType: 'String!',\n localizedCatalog: 'String!',\n aggregation: 'String!',\n search: 'String',\n },\n viewMoreFacetOptions: {\n __args: {\n entityType: new VariableType('entityType'),\n localizedCatalog: new VariableType('localizedCatalog'),\n aggregation: new VariableType('aggregation'),\n search: new VariableType('search'),\n filter,\n },\n id: true,\n value: true,\n label: true,\n count: true,\n },\n },\n })\n}\n\nexport function getMoreFacetProductOptionsQuery(\n filter: IProductFieldFilterInput | IProductFieldFilterInput[] = null\n): string {\n return jsonToGraphQLQuery({\n query: {\n __name: 'viewMoreProductFacetOptions',\n __variables: {\n localizedCatalog: 'String!',\n aggregation: 'String!',\n currentCategoryId: 'String',\n search: 'String',\n },\n viewMoreProductFacetOptions: {\n __args: {\n localizedCatalog: new VariableType('localizedCatalog'),\n aggregation: new VariableType('aggregation'),\n currentCategoryId: new VariableType('currentCategoryId'),\n search: new VariableType('search'),\n filter,\n },\n id: true,\n value: true,\n label: true,\n count: true,\n },\n },\n })\n}\n\nexport const getProductPosition = `query getPosition( $categoryId: String!, $localizedCatalogId : Int! ) {\n getPositionsCategoryProductMerchandising(categoryId: $categoryId, localizedCatalogId : $localizedCatalogId ) {\n result\n }\n}\n`\n\nexport const savePositions = `mutation savePositionsCategoryProductMerchandising( $categoryId: String!, $savePositionsCategory : String! ){\n savePositionsCategoryProductMerchandising (\n input: {\n categoryId: $categoryId\n positions: $savePositionsCategory\n }\n )\n {categoryProductMerchandising {result}}\n}\n`\n\nexport function getSearchExplainProductsQuery(\n filter: IProductFieldFilterInput | IProductFieldFilterInput[] = null,\n withAggregations = false\n): string {\n const productQueryContent = getSearchProductsQueryContent(\n filter,\n withAggregations,\n 'ExplainProduct',\n {\n explanation: true,\n sort: true,\n boosts: true,\n matches: true,\n highlights: true,\n legends: true,\n fieldHighlights: true,\n },\n {\n explainData: {\n elasticSearchQuery: {\n index: true,\n query: true,\n },\n isSpellchecked: true,\n extraData: true,\n },\n }\n )\n return jsonToGraphQLQuery({\n query: {\n __name: 'getExplainProducts',\n __variables: { ...productQueryContent.variables },\n explain: {\n __aliasFor: 'explain',\n __args: { ...productQueryContent.args },\n ...productQueryContent.fields,\n },\n },\n })\n}\n","export const booleanRegexp = /^is([A-Z][a-zA-Z]+)/\nexport const headerRegexp =\n /<(.+)>; rel=\"http:\\/\\/www.w3.org\\/ns\\/hydra\\/core#apiDocumentation\"/\n","export const productEntityType = 'product'\n","import {\n IRuleAttribute,\n IRuleCombination,\n RuleAttributeType,\n RuleCombinationOperator,\n RuleType,\n RuleValueType,\n} from '../types'\n\nexport const emptyCombinationRule: IRuleCombination = {\n type: RuleType.COMBINATION,\n operator: RuleCombinationOperator.ALL,\n value: true,\n children: [],\n}\n\nexport const emptyAttributeRule: IRuleAttribute = {\n type: RuleType.ATTRIBUTE,\n field: '',\n operator: '',\n attribute_type: RuleAttributeType.TEXT,\n value: '',\n}\n\nexport const ruleValueNumberTypes = [RuleValueType.INT, RuleValueType.FLOAT]\nexport const ruleArrayValueSeparator = ','\n","import { createTheme } from '@mui/material/styles'\nimport { keyframes } from '@emotion/react'\n\nexport const buttonEnterKeyframe = keyframes`\n 0% {\n transform: scale(0);\n opacity: 0.3;\n }\n 100% {\n transform: scale(1);\n opacity: 0.6;\n }\n `\n\n/* Creation of custom light theme\n * There is always scss assets to scss modifications but here is to be used by Material UI\n * see : https://mui.com/customization/theming/\n */\nexport const theme = createTheme({\n palette: {\n background: {\n page: '#FAFBFE',\n },\n primary: {\n light: '#FBC0B9',\n main: '#ED7465',\n dark: '#A02213',\n },\n secondary: {\n light: '#BABDFC',\n main: '#2C19CD',\n dark: '#1812A0',\n },\n neutral: {\n light: '#F4F7FF',\n main: '#B5B9D9',\n dark: '#2F3674',\n contrastText: '#FFFFFF',\n },\n error: {\n light: '#FFE7E4',\n main: '#A02213',\n },\n warning: {\n light: '#FEF9D0',\n main: '#60590D',\n },\n success: {\n light: '#E7F4EC',\n main: '#18753C',\n },\n menu: {\n text500: '#424880',\n text600: '#212250',\n hover: '#E7E8FF',\n active: '#2C19CD',\n },\n colors: {\n white: '#FFF',\n black: '#000',\n primary: {\n main: '#ED7465',\n 100: '#FFE7E4',\n 200: '#FBC0B9',\n 300: '#F3978C',\n 400: '#ED7465',\n 500: '#E64733',\n 600: '#CC2D19',\n 700: '#A02213',\n 800: '#73170C',\n 900: '#460C05',\n },\n secondary: {\n main: '#2C19CD',\n 100: '#E7E8FF',\n 200: '#BABDFC',\n 300: '#8D8DF3',\n 400: '#6460ED',\n 500: '#3F32E6',\n 600: '#2C19CD',\n 700: '#1812A0',\n 800: '#0D1274',\n 900: '#070F47',\n },\n neutral: {\n 100: '#FAFBFE',\n 200: '#F4F7FF',\n 300: '#E2E6F3',\n 400: '#B5B9D9',\n 500: '#8187B9',\n 600: '#424880',\n 700: '#2F3674',\n 800: '#212250',\n 900: '#151A47',\n },\n gradient: {\n default: 'linear-gradient(46.78deg, #E64733 1.79%, #ED7465 98.88%)',\n darken: 'linear-gradient(46.78deg, #CC2D19 1.79%, #E64733 98.88%)',\n },\n shadow: {\n neutral: {\n sm: '4px 4px 14px rgba(226, 230, 243, 0.5)',\n md: '0px -8px 8px rgba(226, 230, 243, 0.2), 0px 5px 8px rgba(107, 113, 166, 0.1), 4px 4px 14px rgba(226, 230, 243, 0.5)',\n lg: '0px -8px 8px rgba(226, 230, 243, 0.2), 0px 8px 8px rgba(107, 113, 166, 0.2), 4px 4px 14px rgba(226, 230, 243, 0.5)',\n },\n primaryButton: {\n sm: '0px -8px 8px rgba(255, 231, 228, 0.2), 0px 8px 8px rgba(243, 151, 140, 0.2), 4px 4px 14px rgba(255, 231, 228, 0.5)',\n md: '0px -8px 8px rgba(255, 231, 228, 0.2), 0px 16px 16px rgba(243, 151, 140, 0.2), 4px 4px 14px rgba(255, 231, 228, 0.5)',\n lg: '0px -8px 8px rgba(255, 231, 228, 0.2), 0px 16px 36px rgba(243, 151, 140, 0.2), 4px 4px 14px rgba(255, 231, 228, 0.5)',\n },\n secondaryButton: {\n sm: '0px -8px 8px rgba(231, 232, 255, 0.2), 0px 8px 8px rgba(186, 189, 252, 0.05), 4px 4px 14px rgba(231, 232, 255, 0.5)',\n md: '0px -8px 8px rgba(231, 232, 255, 0.2), 0px 16px 16px rgba(186, 189, 252, 0.2), 4px 4px 14px rgba(231, 232, 255, 0.5)',\n lg: '0px -8px 8px rgba(231, 232, 255, 0.2), 0px 16px 36px rgba(186, 189, 252, 0.4), 4px 4px 14px rgba(231, 232, 255, 0.5)',\n },\n },\n },\n mode: 'light',\n },\n shape: {\n borderRadius: 8,\n },\n typography: {\n h1: {\n fontSize: 36,\n lineHeight: '44px',\n fontWeight: 600,\n },\n h2: {\n fontSize: 28,\n lineHeight: '38px',\n fontWeight: 600,\n },\n h3: {\n fontSize: 24,\n lineHeight: '32px',\n fontWeight: 600,\n },\n h4: {\n fontSize: 20,\n lineHeight: '30px',\n fontWeight: 600,\n },\n h5: {\n fontSize: 18,\n lineHeight: '28px',\n fontWeight: 600,\n },\n h6: {\n fontSize: 16,\n lineHeight: '24px',\n fontWeight: 600,\n },\n body1: {\n fontSize: 14,\n lineHeight: '20px',\n fontWeight: 500,\n },\n body2: {\n fontSize: 14,\n lineHeight: '20px',\n fontWeight: 400,\n },\n caption: {\n fontSize: 12,\n lineHeight: '18px',\n fontWeight: 400,\n },\n },\n components: {\n MuiCollapse: {\n styleOverrides: {\n wrapper: {\n width: '100%',\n },\n wrapperInner: {\n width: '100%',\n },\n },\n },\n MuiButtonBase: {\n defaultProps: {\n disableRipple: false,\n },\n },\n MuiButton: {\n styleOverrides: {\n root: {\n minWidth: 32,\n },\n },\n },\n MuiCheckbox: {\n styleOverrides: {\n root: {\n transform: 'scale(0.9)',\n color: '#B5B9D9',\n transition: 'all 0.3s linear',\n '&:hover': {\n backgroundColor: 'rgba(21, 26, 71, 0.08)',\n },\n '&:focus': {\n backgroundColor: 'rgba(21, 26, 71, 0.12)',\n },\n '.MuiTouchRipple-child': {\n backgroundColor: 'rgba(21, 26, 71)',\n },\n '&.Mui-checked, &.MuiCheckbox-indeterminate': {\n '&:hover': {\n backgroundColor: 'rgba(237, 116, 101, 0.08)',\n },\n '&:focus': {\n backgroundColor: 'rgba(237, 116, 101, 0.12)',\n },\n '.MuiTouchRipple-child': {\n backgroundColor: 'rgba(237, 116, 101)',\n },\n },\n '&.Mui-disabled': {\n color: '#E2E6F3',\n },\n },\n },\n },\n MuiRadio: {\n styleOverrides: {\n root: {\n transform: 'scale(0.9)',\n color: '#B5B9D9',\n transition: 'all 0.3s linear',\n '&:hover': {\n backgroundColor: 'rgba(21, 26, 71, 0.08)',\n },\n '&:focus': {\n backgroundColor: 'rgba(21, 26, 71, 0.12)',\n },\n '.MuiTouchRipple-child': {\n backgroundColor: 'rgba(21, 26, 71)',\n },\n '&.Mui-checked': {\n '&:hover': {\n backgroundColor: 'rgba(237, 116, 101, 0.08)',\n },\n '&:focus': {\n backgroundColor: 'rgba(237, 116, 101, 0.12)',\n },\n '.MuiTouchRipple-child': {\n backgroundColor: 'rgba(237, 116, 101)',\n },\n },\n '&.Mui-disabled': {\n color: '#E2E6F3',\n },\n },\n },\n },\n MuiSwitch: {\n styleOverrides: {\n thumb: {\n background: '#FFF',\n border: '1px solid #B5B9D9',\n boxSizing: 'border-box',\n boxShadow: '0px 6px 10px rgba(0, 0, 0, 0.05)',\n borderRadius: '22px',\n width: '19px',\n height: '19px',\n },\n track: {\n backgroundColor: '#B5B9D9',\n borderRadius: '22px',\n opacity: '1',\n height: '13px',\n },\n switchBase: {\n transition: 'all 0.3s linear',\n '&:hover': {\n backgroundColor: 'rgba(21, 26, 71, 0.08)',\n },\n '&:focus': {\n backgroundColor: 'rgba(21, 26, 71, 0.12)',\n },\n '.MuiTouchRipple-child': {\n backgroundColor: 'rgba(21, 26, 71)',\n },\n '&.Mui-checked': {\n '&:hover': {\n backgroundColor: 'rgba(237, 116, 101, 0.08)',\n },\n '&:focus': {\n backgroundColor: 'rgba(237, 116, 101, 0.12)',\n },\n '.MuiTouchRipple-child': {\n backgroundColor: 'rgba(237, 116, 101)',\n },\n '& .MuiSwitch-thumb': {\n border: '0',\n background:\n 'linear-gradient(46.78deg, #E64733 1.79%, #ED7465 98.88%)',\n boxShadow: '0px 6px 10px rgba(237, 116, 101, 0.1)',\n },\n '& + .MuiSwitch-track': {\n backgroundColor: '#E64733',\n opacity: '0.2',\n },\n },\n '&.Mui-disabled': {\n '+ .MuiSwitch-track': {\n opacity: 1,\n backgroundColor: 'rgba(181, 185, 217, 0.3)',\n },\n '& .MuiSwitch-thumb': {\n border: '1px solid rgba(181, 185, 217, 0.3)',\n },\n '&.Mui-checked': {\n '+ .MuiSwitch-track': {\n opacity: 0.2,\n backgroundColor: 'rgba(230, 71, 51, 0.3)',\n },\n '& .MuiSwitch-thumb': {\n boxShadow: 'none',\n opacity: 0.3,\n },\n },\n },\n },\n },\n },\n MuiFab: {\n styleOverrides: {\n root: {\n color: '#FFF',\n fontSize: '26px',\n background:\n 'linear-gradient(46.78deg, #E64733 1.79%, #ED7465 98.88%)',\n boxShadow:\n '0px -8px 8px rgba(255, 231, 228, 0.2), 0px 16px 16px rgba(243, 151, 140, 0.2), 4px 4px 14px rgba(255, 231, 228, 0.5)',\n width: '56px',\n height: '56px',\n zIndex: 1,\n '&::before': {\n position: 'absolute',\n content: '\"\"',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: '50%',\n background:\n 'linear-gradient(46.78deg, #CC2D19 1.79%, #E64733 98.88%)',\n boxShadow:\n '0px -8px 8px rgba(255, 231, 228, 0.2), 0px 16px 36px rgba(243, 151, 140, 0.2), 4px 4px 14px rgba(255, 231, 228, 0.5)',\n zIndex: -1,\n transition: 'opacity 0.3s linear',\n opacity: 0,\n },\n '&:hover::before': {\n opacity: 1,\n },\n '&:hover': {\n background:\n 'linear-gradient(46.78deg, #E64733 1.79%, #ED7465 98.88%)',\n boxShadow:\n '0px -8px 8px rgba(255, 231, 228, 0.2), 0px 16px 16px rgba(243, 151, 140, 0.2), 4px 4px 14px rgba(255, 231, 228, 0.5)',\n },\n '&& .MuiTouchRipple-child': {\n backgroundColor: '#CC2D19',\n opacity: 1,\n },\n '&& .MuiTouchRipple-rippleVisible': {\n animationName: `${buttonEnterKeyframe}`,\n },\n '&.Mui-disabled': {\n color: '#8187B9',\n background: '#E2E6F3',\n },\n },\n },\n },\n MuiFormControlLabel: {\n styleOverrides: {\n root: {\n color: '#151A47',\n fontSize: '14px',\n lineHeight: '20px',\n fontWeight: 400,\n },\n label: {\n '&.Mui-disabled': {\n color: '#8187B9',\n },\n },\n },\n },\n MuiInputLabel: {\n styleOverrides: {\n root: {\n WebkitTransform: 'none',\n transform: 'none',\n fontWeight: 500,\n lineHeight: '20px',\n color: '#151A47',\n fontFamily: 'var(--gally-font)',\n '&.Mui-focused': {\n color: '#151A47',\n },\n },\n shrink: {\n fontSize: 14,\n color: '#151A47',\n },\n asterisk: {\n color: '#CC2D19',\n },\n },\n },\n MuiFormHelperText: {\n styleOverrides: {\n root: {\n display: 'flex',\n color: '#424880',\n fontWeight: 400,\n fontSize: '12px',\n lineHeight: '18px',\n margin: '8px 0 0 0',\n '.MuiInputBase-colorSuccess + &': {\n color: '#18753C',\n },\n '.MuiInputBase-colorError + &, .textarea--error + &': {\n color: '#A02213',\n },\n },\n },\n },\n MuiInputBase: {\n styleOverrides: { root: { fontFamily: 'var(--gally-font)' } },\n },\n MuiFormControl: {\n styleOverrides: {\n root: {\n textarea: {\n borderColor: '#E2E6F3',\n borderStyle: 'solid',\n borderWidth: '1px',\n borderRadius: 8,\n background: '#FFF',\n color: '#151A47',\n fontWeight: 400,\n fontSize: 14,\n lineHeight: '20px',\n padding: 16,\n transition: 'border-color 0.3s linear',\n '&:hover': {\n borderColor: '#B5B9D9',\n },\n '&.textarea--filled': {\n borderColor: '#B5B9D9',\n },\n '&:focus': {\n borderColor: '#424880',\n },\n '&.textarea--error': {\n borderColor: '#A02213',\n },\n '&:disabled': {\n pointerEvents: 'none',\n color: '#424880',\n background: '#E2E6F3',\n borderColor: '#E2E6F3',\n },\n '&:focus-visible': {\n outline: 'none',\n },\n '&::placeholder': {\n color: '#424880',\n opacity: 1,\n },\n '&::-webkit-resizer': {\n background: `no-repeat 100% 100%/150% url(/images/corner-expand.svg)`,\n },\n },\n 'label + textarea': {\n marginTop: 24,\n },\n },\n },\n },\n MuiDialog: {\n styleOverrides: {\n paper: {\n borderRadius: 8,\n padding: 32,\n width: '600px',\n },\n },\n },\n MuiBackdrop: {\n styleOverrides: {\n root: {\n background: 'rgba(21, 26, 71, 0.6)',\n },\n },\n },\n MuiDialogActions: {\n styleOverrides: {\n root: {\n '> :not(:first-of-type)': {\n marginLeft: 0,\n },\n },\n },\n },\n MuiTab: {\n styleOverrides: {\n root: {\n textTransform: 'none',\n fontSize: '16px',\n line