Skip to content

Commit

Permalink
Merge pull request #68 from pegasystems/feature/map
Browse files Browse the repository at this point in the history
add support for nonce for styled components
  • Loading branch information
ricmars authored Jul 9, 2024
2 parents bd1f640 + 82fdd25 commit 2a2bb8b
Show file tree
Hide file tree
Showing 29 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_ActionableButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { withConfiguration, Flex, Button } from '@pega/cosmos-react-core';
import '../create-nonce';

type ActionableButtonProps = {
label: string;
Expand Down
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_AutoSave/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useEffect } from 'react';
import '../create-nonce';

type AutoSaveProps = {
propertyName: string;
Expand Down
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_Banner/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { withConfiguration, Banner } from '@pega/cosmos-react-core';
import { useCallback, useEffect, useState } from 'react';
import MainContent from './styles';
import '../create-nonce';

type BannerProps = {
/** Display type of rendering
Expand Down
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_BarCode/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
} from '@pega/cosmos-react-core';
import { useEffect, useRef, useState } from 'react';
import StyledWrapper from './styles';
import '../create-nonce';

export enum BarcodeType {
CODE128 = 'CODE128',
Expand Down
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_Calendar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
} from '@pega/cosmos-react-core';
import StyledEventWrapper from './styles';
import * as plusIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/plus.icon';
import '../create-nonce';

registerIcon(plusIcon);

Expand Down
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_CardGallery/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
import { Task } from './Task';
import { loadDetails, getFilters } from './utils';
import { MainCard } from './styles';
import '../create-nonce';

import * as plusIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/plus.icon';
import * as pencilIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/pencil.icon';
Expand Down
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_CaseLauncher/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
Button
} from '@pega/cosmos-react-core';
import StyledCard from './styles';
import '../create-nonce';

// interface for props
export type CaseLauncherProps = {
Expand Down
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_CaseReference/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { type MouseEvent } from 'react';
import { withConfiguration, Link } from '@pega/cosmos-react-core';
import '../create-nonce';

type ActionableButtonProps = {
value: string;
Expand Down
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_ChatGenAI/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import * as sendIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/sen
import * as robotSolid from '@pega/cosmos-react-core/lib/components/Icon/icons/robot-solid.icon';

import { StyledCardContent, StyledGenAIComponent } from './styles';
import '../create-nonce';

type HistoryItem = {
id: string;
Expand Down
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_CheckboxTrigger/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useEffect, useState, useRef, type MouseEvent } from 'react';
import { withConfiguration, Checkbox, FieldValueList, Text } from '@pega/cosmos-react-core';
import '../create-nonce';

export type CheckboxTriggerProps = {
getPConnect?: any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
createUID
} from '@pega/cosmos-react-core';
import StyledPegaExtensionsCompareTableLayoutWrapper from './styles';
import '../create-nonce';

// includes in bundle
import getAllFields from './utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import type {
} from '@pega/cosmos-react-core';
import { downloadBlob, addAttachment, downloadFile } from './utils';
import StyledCardContent from './styles';
import '../create-nonce';

import * as polarisIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/polaris.icon';
import * as informationIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/information.icon';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
} from '@pega/cosmos-react-core';
import getAllFields from './utils';
import { MainContent, FixPopover } from './styles';
import '../create-nonce';

export interface DynamicHierarchicalFormProps {
/** Heading for this view */
Expand Down
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_FieldGroupAsRow/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { withConfiguration, FieldGroup, Flex, useTheme } from '@pega/cosmos-react-core';
import StyledPegaExtensionsFieldGroupAsRowWrapper from './styles';
import '../create-nonce';

type FieldGroupAsRowProps = {
heading: string;
Expand Down
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_FormFullWidth/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { withConfiguration, FieldGroup, Grid } from '@pega/cosmos-react-core';
import '../create-nonce';

type FormFullWidthProps = {
heading: string;
Expand Down
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_GanttChart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import * as pencilIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/p
import * as timesIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/times.icon';

import StyledGanttChartWrapper, { StyledHoverTooltipCard } from './styles';
import '../create-nonce';
import {
viewModeOptions,
type GanttChartProps,
Expand Down
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_ImageMagnify/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
MagnifierPreview,
MagnifierZoom
} from 'react-image-magnifiers';
import '../create-nonce';

type PegaExtensionsImageMagnifyProps = {
value: string;
Expand Down
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_KanbanBoard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { Column } from './Column';
import { MainCard } from './styles';
import * as plusIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/plus.icon';
import * as pencilIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/pencil.icon';
import '../create-nonce';

registerIcon(plusIcon, pencilIcon);
type KanbanBoardProps = {
Expand Down
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_Map/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import Sketch from '@arcgis/core/widgets/Sketch';
import { useEffect, useRef } from 'react';
import { StyledClearBtn, StyledPegaExtensionsMap } from './styles';
import { getAllFields, createGraphic, deletePoints, addPoint, addScreenShot } from './utils';
import '../create-nonce';

type MapProps = {
getPConnect?: any;
Expand Down
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_MaskedInput/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useEffect, useState, useRef, type MouseEvent } from 'react';
import { withConfiguration, Input, FieldValueList, Text } from '@pega/cosmos-react-core';
import IMask, { type FactoryArg, type InputMaskElement } from 'imask';
import '../create-nonce';

export type MaskedInputProps = {
getPConnect?: any;
Expand Down
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_NetworkDiagram/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import CustomNode from './CustomNode';
import CustomEdge from './CustomEdge';
import FloatingEdge from './FloatingEdge';
import * as resetIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/reset.icon';
import '../create-nonce';

registerIcon(resetIcon);
interface StringHashMap {
Expand Down
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_PasswordInput/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useEffect, useState, useRef, type MouseEvent } from 'react';
import { withConfiguration, Input, FieldValueList, Text } from '@pega/cosmos-react-core';
import '../create-nonce';

type PasswordInputProps = {
getPConnect: any;
Expand Down
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_QRCode/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useEffect, useState, type SyntheticEvent } from 'react';
import { withConfiguration, Flex, FormControl, FormField, QRCode } from '@pega/cosmos-react-core';
import StyledWrapper from './styles';
import '../create-nonce';

type QRCodeCompProps = {
label: string;
Expand Down
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_RatingLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { withConfiguration, FieldGroup, Flex, TabPanel, Tabs } from '@pega/cosmo
import RatingElem from './RatingElem';
import StyledWrapper from './styles';
import getAllFields from './utils';
import '../create-nonce';

type RatingLayoutProps = {
label?: string;
Expand Down
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_Scheduler/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { type EventContentArg } from '@fullcalendar/core';
import FullCalendar from '@fullcalendar/react';
import timeGridPlugin from '@fullcalendar/timegrid';
import { StyledCardContent, MainCard, GlobalStyle } from './styles';
import '../create-nonce';

type PegaExtensionsSchedulerProps = {
getPConnect: any;
Expand Down
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_Shortcuts/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
Flex
} from '@pega/cosmos-react-core';
import { SimpleContent, GroupedContent } from './styles';
import '../create-nonce';

type ShortcutsProps = {
/** Display type of rendering
Expand Down
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_SignatureCapture/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
StyledSignatureContent,
StyledSignatureReadOnlyContent
} from './styles';
import '../create-nonce';

type SignatureCaptureProps = {
getPConnect: any;
Expand Down
1 change: 1 addition & 0 deletions src/components/Pega_Extensions_UtilityList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import * as polarisIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/
import * as informationIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/information.icon';
import * as clipboardIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/clipboard.icon';
import { renderObjectField } from './utils';
import '../create-nonce';

type UtilityListProps = {
heading?: string;
Expand Down
6 changes: 6 additions & 0 deletions src/components/create-nonce.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* eslint-disable no-underscore-dangle */
// @ts-ignore
if (window?.__webpack_nonce__) {
// @ts-ignore
__webpack_nonce__ = window.__webpack_nonce__;
}

0 comments on commit 2a2bb8b

Please sign in to comment.