@pega/cosmos-react-demos 5.0.0-dev.9.2 → 5.0.0-dev.9.3
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/jsx/core/AdditionalInfo/AdditionalInfo.stories.d.ts +2 -2
- package/jsx/core/AdditionalInfo/AdditionalInfo.stories.d.ts.map +1 -1
- package/jsx/core/AdditionalInfo/AdditionalInfo.stories.jsx +1 -1
- package/jsx/core/AdditionalInfo/AdditionalInfo.stories.jsx.map +1 -1
- package/jsx/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/jsx/core/Checkbox/Checkbox.stories.jsx +0 -3
- package/jsx/core/Checkbox/Checkbox.stories.jsx.map +1 -1
- package/jsx/core/CheckboxGroup/CheckboxGroup.stories.d.ts.map +1 -1
- package/jsx/core/CheckboxGroup/CheckboxGroup.stories.jsx +0 -8
- package/jsx/core/CheckboxGroup/CheckboxGroup.stories.jsx.map +1 -1
- package/jsx/core/ColorPicker/ColorPicker.stories.d.ts.map +1 -1
- package/jsx/core/ColorPicker/ColorPicker.stories.jsx +0 -1
- package/jsx/core/ColorPicker/ColorPicker.stories.jsx.map +1 -1
- package/jsx/core/ComboBox/ComboBox.stories.d.ts.map +1 -1
- package/jsx/core/ComboBox/ComboBox.stories.jsx +0 -6
- package/jsx/core/ComboBox/ComboBox.stories.jsx.map +1 -1
- package/jsx/core/CompositeInput/CompositeInput.stories.d.ts.map +1 -1
- package/jsx/core/CompositeInput/CompositeInput.stories.jsx +1 -3
- package/jsx/core/CompositeInput/CompositeInput.stories.jsx.map +1 -1
- package/jsx/core/CreditCard/CreditCard.stories.d.ts.map +1 -1
- package/jsx/core/CreditCard/CreditCard.stories.jsx +0 -1
- package/jsx/core/CreditCard/CreditCard.stories.jsx.map +1 -1
- package/jsx/core/Currency/Currency.stories.d.ts.map +1 -1
- package/jsx/core/Currency/Currency.stories.jsx +0 -1
- package/jsx/core/Currency/Currency.stories.jsx.map +1 -1
- package/jsx/core/DateTime/DateTime.stories.d.ts.map +1 -1
- package/jsx/core/DateTime/DateTime.stories.jsx +0 -10
- package/jsx/core/DateTime/DateTime.stories.jsx.map +1 -1
- package/jsx/core/FieldGroup/FieldGroup.stories.d.ts.map +1 -1
- package/jsx/core/FieldGroup/FieldGroup.stories.jsx +6 -2
- package/jsx/core/FieldGroup/FieldGroup.stories.jsx.map +1 -1
- package/jsx/core/File/FileInput.stories.d.ts.map +1 -1
- package/jsx/core/File/FileInput.stories.jsx +0 -1
- package/jsx/core/File/FileInput.stories.jsx.map +1 -1
- package/jsx/core/Input/Input.stories.d.ts.map +1 -1
- package/jsx/core/Input/Input.stories.jsx +0 -1
- package/jsx/core/Input/Input.stories.jsx.map +1 -1
- package/jsx/core/ListToolbar/ListToolbar.stories.d.ts.map +1 -1
- package/jsx/core/ListToolbar/ListToolbar.stories.jsx +0 -1
- package/jsx/core/ListToolbar/ListToolbar.stories.jsx.map +1 -1
- package/jsx/core/Location/Location.stories.d.ts.map +1 -1
- package/jsx/core/Location/Location.stories.jsx +0 -1
- package/jsx/core/Location/Location.stories.jsx.map +1 -1
- package/jsx/core/Number/Number.stories.d.ts.map +1 -1
- package/jsx/core/Number/Number.stories.jsx +6 -2
- package/jsx/core/Number/Number.stories.jsx.map +1 -1
- package/jsx/core/Phone/Phone.stories.d.ts.map +1 -1
- package/jsx/core/Phone/Phone.stories.jsx +0 -1
- package/jsx/core/Phone/Phone.stories.jsx.map +1 -1
- package/jsx/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
- package/jsx/core/RadioButton/RadioButton.stories.jsx +0 -3
- package/jsx/core/RadioButton/RadioButton.stories.jsx.map +1 -1
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts.map +1 -1
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.jsx +0 -8
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.jsx.map +1 -1
- package/jsx/core/Select/Select.stories.d.ts.map +1 -1
- package/jsx/core/Select/Select.stories.jsx +0 -1
- package/jsx/core/Select/Select.stories.jsx.map +1 -1
- package/jsx/core/Slider/Slider.stories.d.ts.map +1 -1
- package/jsx/core/Slider/Slider.stories.jsx +0 -1
- package/jsx/core/Slider/Slider.stories.jsx.map +1 -1
- package/jsx/core/TextArea/TextArea.stories.d.ts.map +1 -1
- package/jsx/core/TextArea/TextArea.stories.jsx +0 -1
- package/jsx/core/TextArea/TextArea.stories.jsx.map +1 -1
- package/jsx/rte/Editor/Editor.stories.d.ts.map +1 -1
- package/jsx/rte/Editor/Editor.stories.jsx +0 -1
- package/jsx/rte/Editor/Editor.stories.jsx.map +1 -1
- package/jsx/social/Chat/Chat.mocks.d.ts +5 -17
- package/jsx/social/Chat/Chat.mocks.d.ts.map +1 -1
- package/jsx/social/Chat/Chat.mocks.js +1 -21
- package/jsx/social/Chat/Chat.mocks.js.map +1 -1
- package/jsx/social/Chat/Chat.stories.d.ts +2 -0
- package/jsx/social/Chat/Chat.stories.d.ts.map +1 -1
- package/jsx/social/Chat/Chat.stories.jsx +92 -38
- package/jsx/social/Chat/Chat.stories.jsx.map +1 -1
- package/jsx/work/Details/Details.stories.d.ts.map +1 -1
- package/jsx/work/Details/Details.stories.jsx +0 -1
- package/jsx/work/Details/Details.stories.jsx.map +1 -1
- package/lib/core/AdditionalInfo/AdditionalInfo.stories.d.ts +2 -2
- package/lib/core/AdditionalInfo/AdditionalInfo.stories.d.ts.map +1 -1
- package/lib/core/AdditionalInfo/AdditionalInfo.stories.js +1 -1
- package/lib/core/AdditionalInfo/AdditionalInfo.stories.js.map +1 -1
- package/lib/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/lib/core/Checkbox/Checkbox.stories.js +0 -3
- package/lib/core/Checkbox/Checkbox.stories.js.map +1 -1
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.d.ts.map +1 -1
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.js +0 -8
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.js.map +1 -1
- package/lib/core/ColorPicker/ColorPicker.stories.d.ts.map +1 -1
- package/lib/core/ColorPicker/ColorPicker.stories.js +0 -1
- package/lib/core/ColorPicker/ColorPicker.stories.js.map +1 -1
- package/lib/core/ComboBox/ComboBox.stories.d.ts.map +1 -1
- package/lib/core/ComboBox/ComboBox.stories.js +0 -6
- package/lib/core/ComboBox/ComboBox.stories.js.map +1 -1
- package/lib/core/CompositeInput/CompositeInput.stories.d.ts.map +1 -1
- package/lib/core/CompositeInput/CompositeInput.stories.js +1 -3
- package/lib/core/CompositeInput/CompositeInput.stories.js.map +1 -1
- package/lib/core/CreditCard/CreditCard.stories.d.ts.map +1 -1
- package/lib/core/CreditCard/CreditCard.stories.js +0 -1
- package/lib/core/CreditCard/CreditCard.stories.js.map +1 -1
- package/lib/core/Currency/Currency.stories.d.ts.map +1 -1
- package/lib/core/Currency/Currency.stories.js +0 -1
- package/lib/core/Currency/Currency.stories.js.map +1 -1
- package/lib/core/DateTime/DateTime.stories.d.ts.map +1 -1
- package/lib/core/DateTime/DateTime.stories.js +0 -10
- package/lib/core/DateTime/DateTime.stories.js.map +1 -1
- package/lib/core/FieldGroup/FieldGroup.stories.d.ts.map +1 -1
- package/lib/core/FieldGroup/FieldGroup.stories.js +6 -2
- package/lib/core/FieldGroup/FieldGroup.stories.js.map +1 -1
- package/lib/core/File/FileInput.stories.d.ts.map +1 -1
- package/lib/core/File/FileInput.stories.js +0 -1
- package/lib/core/File/FileInput.stories.js.map +1 -1
- package/lib/core/Input/Input.stories.d.ts.map +1 -1
- package/lib/core/Input/Input.stories.js +0 -1
- package/lib/core/Input/Input.stories.js.map +1 -1
- package/lib/core/ListToolbar/ListToolbar.stories.d.ts.map +1 -1
- package/lib/core/ListToolbar/ListToolbar.stories.js +0 -1
- package/lib/core/ListToolbar/ListToolbar.stories.js.map +1 -1
- package/lib/core/Location/Location.stories.d.ts.map +1 -1
- package/lib/core/Location/Location.stories.js +0 -1
- package/lib/core/Location/Location.stories.js.map +1 -1
- package/lib/core/Number/Number.stories.d.ts.map +1 -1
- package/lib/core/Number/Number.stories.js +6 -2
- package/lib/core/Number/Number.stories.js.map +1 -1
- package/lib/core/Phone/Phone.stories.d.ts.map +1 -1
- package/lib/core/Phone/Phone.stories.js +0 -1
- package/lib/core/Phone/Phone.stories.js.map +1 -1
- package/lib/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
- package/lib/core/RadioButton/RadioButton.stories.js +0 -3
- package/lib/core/RadioButton/RadioButton.stories.js.map +1 -1
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts.map +1 -1
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.js +0 -8
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.js.map +1 -1
- package/lib/core/Select/Select.stories.d.ts.map +1 -1
- package/lib/core/Select/Select.stories.js +0 -1
- package/lib/core/Select/Select.stories.js.map +1 -1
- package/lib/core/Slider/Slider.stories.d.ts.map +1 -1
- package/lib/core/Slider/Slider.stories.js +0 -1
- package/lib/core/Slider/Slider.stories.js.map +1 -1
- package/lib/core/TextArea/TextArea.stories.d.ts.map +1 -1
- package/lib/core/TextArea/TextArea.stories.js +0 -1
- package/lib/core/TextArea/TextArea.stories.js.map +1 -1
- package/lib/rte/Editor/Editor.stories.d.ts.map +1 -1
- package/lib/rte/Editor/Editor.stories.js +0 -1
- package/lib/rte/Editor/Editor.stories.js.map +1 -1
- package/lib/social/Chat/Chat.mocks.d.ts +5 -17
- package/lib/social/Chat/Chat.mocks.d.ts.map +1 -1
- package/lib/social/Chat/Chat.mocks.js +1 -21
- package/lib/social/Chat/Chat.mocks.js.map +1 -1
- package/lib/social/Chat/Chat.stories.d.ts +2 -0
- package/lib/social/Chat/Chat.stories.d.ts.map +1 -1
- package/lib/social/Chat/Chat.stories.js +93 -34
- package/lib/social/Chat/Chat.stories.js.map +1 -1
- package/lib/work/Details/Details.stories.d.ts.map +1 -1
- package/lib/work/Details/Details.stories.js +0 -1
- package/lib/work/Details/Details.stories.js.map +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Slider/Slider.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAItD,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;;AAEvE,wBAGU;AAGV,KAAK,gBAAgB,GAAG,UAAU,CAAC,WAAW,EAAE,OAAO,GAAG,UAAU,CAAC,GAAG;IACtE,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"Slider.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Slider/Slider.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAItD,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;;AAEvE,wBAGU;AAGV,KAAK,gBAAgB,GAAG,UAAU,CAAC,WAAW,EAAE,OAAO,GAAG,UAAU,CAAC,GAAG;IACtE,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,gBAAgB,CA2DhD,CAAC"}
|
|
@@ -19,7 +19,6 @@ export const SliderDemo = (args) => {
|
|
|
19
19
|
}
|
|
20
20
|
return (<Slider orientation={args.orientation} step={args.step} min={args.min} max={args.max} ticks={ticksObject} showProgress={args.showProgress} preview={args.preview} showInput={args.showInput} label={args.label} labelHidden={args.labelHidden} info={args.info} status={args.status} required={args.required} disabled={args.disabled} readOnly={args.readOnly} value={value} onChange={(changeValue) => setValue(changeValue)} additionalInfo={args.showAdditionalInfo
|
|
21
21
|
? {
|
|
22
|
-
heading: 'Additional Info',
|
|
23
22
|
content: (<Flex container={{ direction: 'column', alignItems: 'start', gap: 2 }}>
|
|
24
23
|
<p>
|
|
25
24
|
Lorem ipsum dolor sit amet, consectetur it, sed do tempor incididunt ut labore
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.stories.jsx","sourceRoot":"","sources":["../../../src/core/Slider/Slider.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAG7D,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;CACV,CAAC;AAWV,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,IAAsB,EAAE,EAAE;IAC9E,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;IACpD,IAAI,WAAW,GAAyB,IAAI,CAAC,KAAK,CAAC;IAEnD,IAAI,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE;QACvC,WAAW,GAAG,EAAE,CAAC;QACjB,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAA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AAE;IAC3C,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACpC,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC7C,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE;IACzD,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAC5F,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC1C,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC1C,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC1C,kBAAkB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CACrD,CAAC","sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport { useState } from 'react';\n\nimport { Flex, Link, Slider } from '@pega/cosmos-react-core';\nimport type { SliderProps, OmitStrict } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Slider',\n component: Slider\n} as Meta;\n\n// Necessary to prevent linting undefined errors since these will never be undefined in the demo\ntype SliderStoryProps = OmitStrict<SliderProps, 'value' | 'onChange'> & {\n min: number;\n max: number;\n step: number;\n value?: SliderProps['value'];\n showAdditionalInfo?: boolean;\n};\n\nexport const SliderDemo: StoryFn<SliderStoryProps> = (args: SliderStoryProps) => {\n const [value, setValue] = useState(args.value || 0);\n let ticksObject: SliderProps['ticks'] = args.ticks;\n\n if (args.max > args.min && !ticksObject) {\n ticksObject = {};\n const numTicks = Math.floor((args.max - args.min) / (args.step || 1)) + 1;\n Array(numTicks)\n .fill(0)\n .map((_, index) => args.min + index * args.step)\n .forEach(tick => {\n ticksObject![tick] = tick.toString();\n });\n }\n\n return (\n <Slider\n orientation={args.orientation}\n step={args.step}\n min={args.min}\n max={args.max}\n ticks={ticksObject}\n showProgress={args.showProgress}\n preview={args.preview}\n showInput={args.showInput}\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n value={value}\n onChange={(changeValue: number) => setValue(changeValue)}\n additionalInfo={\n args.showAdditionalInfo\n ? {\n content: (\n <Flex container={{ direction: 'column', alignItems: 'start', gap: 2 }}>\n <p>\n Lorem ipsum dolor sit amet, consectetur it, sed do tempor incididunt ut labore\n magna aliqua. Nibh praesent tristique magna sit amet. Nec tincidunt praesent\n semper feugiat nibh sed pulvinar proin gravida.\n </p>\n <p>\n Pharetra pharetra massa massa ultricies mi quis hendrerit dolor. Est velit\n egestas dui id ornare arcu odio ut. Varius sit amet mattis vulputate enim nulla\n aliquet porttitor lacus.\n </p>\n <Link href='/' target='_blank'>\n Neque vitae\n </Link>\n </Flex>\n )\n }\n : undefined\n }\n />\n );\n};\n\nSliderDemo.args = {\n orientation: 'vertical',\n step: 1,\n min: 0,\n max: 10,\n value: 5,\n ticks: undefined,\n showProgress: true,\n preview: false,\n showInput: true,\n label: 'Slider input',\n labelHidden: false,\n info: 'Pick a value',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false,\n showAdditionalInfo: false\n};\n\nSliderDemo.argTypes = {\n orientation: { options: ['vertical', 'horizontal'], control: { type: 'inline-radio' } },\n step: { control: { type: 'number' } },\n min: { control: { type: 'number' } },\n max: { control: { type: 'number' } },\n value: { control: { type: 'number' } },\n ticks: { control: { type: 'object' } },\n showProgress: { control: { type: 'boolean' } },\n preview: { control: { type: 'boolean' } },\n showInput: { control: { type: 'boolean' } },\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text', label: 'Helper text' } },\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } },\n showAdditionalInfo: { control: { type: 'boolean' } }\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.stories.d.ts","sourceRoot":"","sources":["../../../src/core/TextArea/TextArea.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAKtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;;AAE7D,wBAIU;AAEV,UAAU,kBAAmB,SAAQ,aAAa;IAChD,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,eAAO,MAAM,YAAY,EAAE,OAAO,CAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"TextArea.stories.d.ts","sourceRoot":"","sources":["../../../src/core/TextArea/TextArea.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAKtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;;AAE7D,wBAIU;AAEV,UAAU,kBAAmB,SAAQ,aAAa;IAChD,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,eAAO,MAAM,YAAY,EAAE,OAAO,CAAC,kBAAkB,CA+BpD,CAAC;AAsCF,UAAU,yBAAyB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,oBAAoB,EAAE,OAAO,CAAC,yBAAyB,CA2BnE,CAAC"}
|
|
@@ -9,7 +9,6 @@ export const TextAreaDemo = (args) => {
|
|
|
9
9
|
const [value, setValue] = useState('');
|
|
10
10
|
return (<TextArea additionalInfo={args.showAdditionalInfo
|
|
11
11
|
? {
|
|
12
|
-
heading: 'Additional Info',
|
|
13
12
|
content: 'Some additional info'
|
|
14
13
|
}
|
|
15
14
|
: undefined} id='text-area' value={value} onChange={(e) => setValue(e.target.value)} minLength={args.minLength} maxLength={args.maxLength} displayCharCount={args.displayCharCount} hardStop={args.hardStop} resizable={args.resizable} autoResize={args.autoResize} label={args.label} labelHidden={args.labelHidden} info={args.info} placeholder={args.placeholder} status={args.status} required={args.required} disabled={args.disabled} readOnly={args.readOnly}/>);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.stories.jsx","sourceRoot":"","sources":["../../../src/core/TextArea/TextArea.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGjC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAGlE,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,QAAQ;IACnB,cAAc,EAAE,CAAC,sBAAsB,CAAC;CACjC,CAAC;AAMV,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,IAAwB,EAAE,EAAE;IACpF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEvC,OAAO,CACL,CAAC,QAAQ,CACP,cAAc,CAAC,CACb,IAAI,CAAC,kBAAkB;YACrB,CAAC,CAAC;gBACE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"TextArea.stories.jsx","sourceRoot":"","sources":["../../../src/core/TextArea/TextArea.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGjC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAGlE,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,QAAQ;IACnB,cAAc,EAAE,CAAC,sBAAsB,CAAC;CACjC,CAAC;AAMV,MAAM,CAAC,MAAM,Y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AAE;IACxC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CACvC,CAAC","sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport { useState } from 'react';\nimport type { ChangeEvent } from 'react';\n\nimport { Configuration, TextArea } from '@pega/cosmos-react-core';\nimport type { TextAreaProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Textarea',\n component: TextArea,\n excludeStories: ['ConfigurableTextArea']\n} as Meta;\n\ninterface TextAreaStoryProps extends TextAreaProps {\n showAdditionalInfo?: boolean;\n}\n\nexport const TextAreaDemo: StoryFn<TextAreaStoryProps> = (args: TextAreaStoryProps) => {\n const [value, setValue] = useState('');\n\n return (\n <TextArea\n additionalInfo={\n args.showAdditionalInfo\n ? {\n content: 'Some additional info'\n }\n : undefined\n }\n id='text-area'\n value={value}\n onChange={(e: ChangeEvent<HTMLTextAreaElement>) => setValue(e.target.value)}\n minLength={args.minLength}\n maxLength={args.maxLength}\n displayCharCount={args.displayCharCount}\n hardStop={args.hardStop}\n resizable={args.resizable}\n autoResize={args.autoResize}\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n placeholder={args.placeholder}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n />\n );\n};\n\nTextAreaDemo.args = {\n minLength: 0,\n maxLength: 300,\n displayCharCount: false,\n hardStop: true,\n resizable: false,\n autoResize: true,\n label: 'Text Area',\n labelHidden: false,\n info: 'Enter a large amount of text',\n placeholder: 'Tell us a story…',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false,\n showAdditionalInfo: false\n};\n\nTextAreaDemo.argTypes = {\n minLength: { control: { type: 'number' } },\n maxLength: { control: { type: 'number' } },\n displayCharCount: { control: { type: 'boolean' } },\n hardStop: { control: { type: 'boolean' } },\n resizable: { control: { type: 'boolean' } },\n autoResize: { control: { type: 'boolean' } },\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text', label: 'Helper text' } },\n placeholder: { control: { type: 'text' } },\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } },\n showAdditionalInfo: { control: { type: 'boolean' } }\n};\n\ninterface ConfigurableTextAreaProps {\n minHeight?: string;\n padding?: string;\n}\n\nexport const ConfigurableTextArea: StoryFn<ConfigurableTextAreaProps> = (\n args: ConfigurableTextAreaProps\n) => {\n const [value, setValue] = useState('');\n\n return (\n <Configuration\n theme={{\n components: {\n 'text-area': {\n 'min-height': args.minHeight,\n padding: args.padding\n }\n }\n }}\n >\n <TextArea\n value={value}\n onChange={(e: ChangeEvent<HTMLTextAreaElement>) => setValue(e.target.value)}\n resizable\n autoResize\n label='Configurable Text Area'\n info='Enter a large amount of text'\n placeholder='Tell us a story…'\n />\n </Configuration>\n );\n};\n\nConfigurableTextArea.args = {\n minHeight: '3.75rem',\n padding: '0.5rem'\n};\n\nConfigurableTextArea.argTypes = {\n minHeight: { control: { type: 'text' } },\n padding: { control: { type: 'text' } }\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Editor.stories.d.ts","sourceRoot":"","sources":["../../../src/rte/Editor/Editor.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAgBtD,OAAO,KAAK,EAAE,WAAW,EAAe,MAAM,wBAAwB,CAAC;;AAIvE,wBAGU;AAEV,UAAU,gBAAiB,SAAQ,WAAW;IAC5C,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"Editor.stories.d.ts","sourceRoot":"","sources":["../../../src/rte/Editor/Editor.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAgBtD,OAAO,KAAK,EAAE,WAAW,EAAe,MAAM,wBAAwB,CAAC;;AAIvE,wBAGU;AAEV,UAAU,gBAAiB,SAAQ,WAAW;IAC5C,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,gBAAgB,CAwDhD,CAAC;AA2BF,eAAO,MAAM,eAAe,EAAE,OAmB7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,OAc/B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,OA6BjC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,OAkCpC,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,OA8B3C,CAAC"}
|
|
@@ -19,7 +19,6 @@ export const EditorDemo = (args) => {
|
|
|
19
19
|
};
|
|
20
20
|
return (<Editor ref={editorRef} label={args.label} labelHidden={args.labelHidden} info={args.info} status={args.status} required={args.required} disabled={args.disabled} readOnly={args.readOnly} toolbar={['inline-styling', 'lists', 'indentation', 'images', 'links']} onFocus={action('Editor focused')} onBlur={action('Editor blurred')} onChange={action('Editor changed')} onImageAdded={onImageAdded} defaultValue='<body><p>Hi mom <a href="https://google.com">link</a></p><img alt="Example alt text" src="http://via.placeholder.com/640x360"/></body>' additionalInfo={args.showAdditionalInfo
|
|
21
21
|
? {
|
|
22
|
-
heading: 'Additional Info',
|
|
23
22
|
content: (<Flex container={{ direction: 'column', alignItems: 'start', gap: 2 }}>
|
|
24
23
|
<p>
|
|
25
24
|
Lorem ipsum dolor sit amet, consectetur it, sed do tempor incididunt ut labore
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Editor.stories.jsx","sourceRoot":"","sources":["../../../src/rte/Editor/Editor.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAA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CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAChE;QAAA,EAAE,WAAW,CACb;QAAA,CAAC,UAAU,CACT;UAAA,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC,CACnE;;UACF,EAAE,MAAM,CACV;QAAA,EAAE,UAAU,CACd;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,MAAM,CACL,YAAY,CAAC,CAAC,IAAI,CAAC,CACnB,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,GAAG,CAAC,CAAC,MAAM,CAAC,CACZ,KAAK,CAAC,kBAAkB,CACxB,OAAO,CAAC,CAAC,CAAC,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC,EAEhG;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport { useState, useRef } from 'react';\nimport { action } from '@storybook/addon-actions';\nimport type { Editor as TinymceEditor } from 'tinymce';\n\nimport {\n Button,\n Card,\n CardContent,\n CardFooter,\n Flex,\n Link,\n Text,\n TextArea\n} from '@pega/cosmos-react-core';\nimport { Editor } from '@pega/cosmos-react-rte';\nimport type { EditorProps, EditorState } from '@pega/cosmos-react-rte';\n\nimport { createPegaCustomElement } from './Editor.mocks';\n\nexport default {\n title: 'RTE/Editor',\n component: Editor\n} as Meta;\n\ninterface EditorStoryProps extends EditorProps {\n showAdditionalInfo?: boolean;\n}\n\nexport const EditorDemo: StoryFn<EditorStoryProps> = (args: EditorStoryProps) => {\n const editorRef = useRef<EditorState>(null);\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage(\n {\n src,\n alt: image.name,\n attachmentId: 'sample-id'\n },\n id\n );\n };\n\n return (\n <Editor\n ref={editorRef}\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n toolbar={['inline-styling', 'lists', 'indentation', 'images', 'links']}\n onFocus={action('Editor focused')}\n onBlur={action('Editor blurred')}\n onChange={action('Editor changed')}\n onImageAdded={onImageAdded}\n defaultValue='<body><p>Hi mom <a href=\"https://google.com\">link</a></p><img alt=\"Example alt text\" src=\"http://via.placeholder.com/640x360\"/></body>'\n additionalInfo={\n args.showAdditionalInfo\n ? {\n heading: 'Additional Info',\n content: (\n <Flex container={{ direction: 'column', alignItems: 'start', gap: 2 }}>\n <p>\n Lorem ipsum dolor sit amet, consectetur it, sed do tempor incididunt ut labore\n magna aliqua. Nibh praesent tristique magna sit amet. Nec tincidunt praesent\n semper feugiat nibh sed pulvinar proin gravida.\n </p>\n <p>\n Pharetra pharetra massa massa ultricies mi quis hendrerit dolor. Est velit\n egestas dui id ornare arcu odio ut. Varius sit amet mattis vulputate enim nulla\n aliquet porttitor lacus.\n </p>\n <Link href='/' target='_blank'>\n Neque vitae\n </Link>\n </Flex>\n )\n }\n : undefined\n }\n />\n );\n};\n\nEditorDemo.args = {\n showAdditionalInfo: false,\n label: 'Form field label',\n labelHidden: false,\n info: 'Enter some value',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false\n};\n\nEditorDemo.argTypes = {\n showAdditionalInfo: { control: { type: 'boolean' } },\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text', label: 'Helper text' } },\n status: {\n options: [undefined, 'success', 'warning', 'error', 'pending'],\n control: { type: 'select' }\n },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } }\n};\n\nexport const EmptyEditorDemo: StoryFn = () => {\n const editorRef = useRef<EditorState>(null);\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n return (\n <Editor\n ref={editorRef}\n label='Form field label'\n toolbar={['inline-styling', 'lists', 'indentation', 'images', 'links']}\n onImageAdded={onImageAdded}\n onFocus={action('Editor has focus')}\n onBlur={action('Editor has blurred')}\n placeholder='Type some stuff in here'\n />\n );\n};\n\nexport const ReadonlyFormField: StoryFn = () => {\n return (\n <Editor\n label='Form field label'\n readOnly\n defaultValue={`<article class=\"main-page-content\" lang=\"en-US\"><h1>HTML: HyperText Markup Language</h1><div><p><strong>HTML</strong> (HyperText Markup Language) is the most basic building block of the Web. It defines the meaning and structure of web content. Other technologies besides HTML are generally used to describe a web page's appearance/presentation (<a href=\"/en-US/docs/Web/CSS\">CSS</a>) or functionality/behavior (<a href=\"/en-US/docs/Web/JavaScript\">JavaScript</a>).</p>\n <p>\"Hypertext\" refers to links that connect web pages to one another, either within a single website or between websites. Links are a fundamental aspect of the Web. By uploading content to the Internet and linking it to pages created by other people, you become an active participant in the World Wide Web.</p>\n <p>HTML uses \"markup\" to annotate text, images, and other content for display in a Web browser. HTML markup includes special \"elements\" such as <a href=\"/en-US/docs/Web/HTML/Element/head\"><code><head></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/title\"><code><title></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/body\"><code><body></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/header\"><code><header></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/footer\"><code><footer></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/article\"><code><article></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/section\"><code><section></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/p\"><code><p></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/div\"><code><div></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/span\"><code><span></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/img\"><code><img></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/aside\"><code><aside></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/audio\"><code><audio></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/canvas\"><code><canvas></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/datalist\"><code><datalist></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/details\"><code><details></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/embed\"><code><embed></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/nav\"><code><nav></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/output\"><code><output></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/progress\"><code><progress></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/video\"><code><video></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/ul\"><code><ul></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/ol\"><code><ol></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/li\"><code><li></code></a> and many others.</p>\n <p>An HTML element is set off from other text in a document by \"tags\", which consist of the element name surrounded by \"<code><</code>\" and \"<code>></code>\". The name of an element inside a tag is case insensitive. That is, it can be written in uppercase, lowercase, or a mixture. For example, the <code><title></code> tag can be written as <code><Title></code>, <code><TITLE></code>, or in any other way.</p>\n\n <div id=\"on-github\" class=\"on-github\"><h3>Found a problem with this page?</h3><ul><li><a href=\"https://github.com/mdn/content/edit/main/files/en-us/web/html/index.md\" title=\"You're going to need to sign in to GitHub first (Opens in a new tab)\" target=\"_blank\" rel=\"noopener noreferrer\">Edit on <b>GitHub</b></a></li><li><a href=\"https://github.com/mdn/content/blob/main/files/en-us/web/html/index.md\" title=\"Folder: en-us/web/html (Opens in a new tab)\" target=\"_blank\" rel=\"noopener noreferrer\">Source on <b>GitHub</b></a></li><li><a href=\"https://github.com/mdn/content/issues/new?body=MDN+URL%3A+https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FHTML%0A%0A%23%23%23%23+What+information+was+incorrect%2C+unhelpful%2C+or+incomplete%3F%0A%0A%0A%23%23%23%23+Specific+section+or+headline%3F%0A%0A%0A%23%23%23%23+What+did+you+expect+to+see%3F%0A%0A%0A%23%23%23%23+Did+you+test+this%3F+If+so%2C+how%3F%0A%0A%0A%3C%21--+Do+not+make+changes+below+this+line+--%3E%0A%3Cdetails%3E%0A%3Csummary%3EMDN+Content+page+report+details%3C%2Fsummary%3E%0A%0A*+Folder%3A+%60en-us%2Fweb%2Fhtml%60%0A*+MDN+URL%3A+https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FHTML%0A*+GitHub+URL%3A+https%3A%2F%2Fgithub.com%2Fmdn%2Fcontent%2Fblob%2Fmain%2Ffiles%2Fen-us%2Fweb%2Fhtml%2Findex.md%0A*+Last+commit%3A+https%3A%2F%2Fgithub.com%2Fmdn%2Fcontent%2Fcommit%2F775662998e66813a612e3ff27e02f2ada867bc17%0A*+Document+last+modified%3A+2021-10-03T00%3A01%3A51.000Z%0A%0A%3C%2Fdetails%3E&title=Issue+with+%22HTML%3A+HyperText+Markup+Language%22%3A+%28short+summary+here+please%29&labels=needs-triage%2CContent%3AHTML\" title=\"This will take you to https://github.com/mdn/content to file a new issue\" target=\"_blank\" rel=\"noopener noreferrer\">Report a problem with this content on <b>GitHub</b></a></li><li>Want to fix the problem yourself? See <a href=\"https://github.com/mdn/content/blob/main/README.md\" target=\"_blank\" rel=\"noopener noreferrer\">our Contribution guide</a>.</li></ul></div>\n `}\n />\n );\n};\n\nexport const CustomComponentDemo: StoryFn = () => {\n const editorRef = useRef<EditorState>(null);\n const [editor, setEditor] = useState({} as TinymceEditor);\n\n const onCustomAction = () => {\n editor.insertContent('<pega-custom>Inserted from toolbar</pega-custom>');\n };\n\n return (\n <Editor\n ref={editorRef}\n label='Form field label'\n toolbar={['inline-styling', 'lists', 'indentation', 'links', 'images']}\n defaultValue='<body><p>Hi mom <a href=\"https://google.com\">link</a></p><p>hi <pega-custom>Hello from custom element.</pega-custom></p></body>'\n customComponents={[{ createCustomElement: createPegaCustomElement, name: 'pega-custom' }]}\n customActions={[\n {\n icon: 'pega',\n text: 'Insert a custom element',\n onMouseDown: () => {\n onCustomAction();\n }\n }\n ]}\n onInit={initializedEditor => {\n setEditor(initializedEditor);\n }}\n />\n );\n};\n\nexport const RichTextEditorWithLogs: StoryFn = () => {\n const editorRef = useRef<EditorState>(null);\n const [content, setContent] = useState<string | undefined>();\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n const showContent = (type: 'html' | 'plain_text' | 'rich_text') => {\n if (type === 'html') setContent(editorRef.current?.getHtml());\n else if (type === 'plain_text') setContent(editorRef.current?.getPlainText());\n else if (type === 'rich_text') setContent(editorRef.current?.getRichText());\n };\n\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Editor\n ref={editorRef}\n toolbar={['inline-styling', 'headers', 'tables', 'links', 'images', 'lists', 'indentation']}\n onImageAdded={onImageAdded}\n label='Rich text editor with logs'\n info='Click on the buttons below to show the different formatted outputs of the RTE'\n />\n\n <Flex container={{ gap: 1 }}>\n <Button onClick={() => showContent('html')}>Show HTML</Button>\n <Button onClick={() => showContent('plain_text')}>Show plain text</Button>\n <Button onClick={() => showContent('rich_text')}>Show rich text</Button>\n </Flex>\n\n <Text>{content}</Text>\n </Flex>\n );\n};\n\nexport const RichTextEditorHtmlParsingDemo: StoryFn = () => {\n const [html, setHtml] = useState('<p>Hello world!</p>');\n const rteRef = useRef<EditorState>(null);\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n rteRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Card>\n <CardContent>\n <TextArea value={html} onChange={e => setHtml(e.target.value)} />\n </CardContent>\n <CardFooter>\n <Button onClick={() => rteRef.current?.insertHtml(html.trim(), true)}>\n Overwrite RTE with new HTML\n </Button>\n </CardFooter>\n </Card>\n <Editor\n defaultValue={html}\n onImageAdded={onImageAdded}\n ref={rteRef}\n label='Form field label'\n toolbar={['inline-styling', 'headers', 'tables', 'links', 'images', 'lists', 'indentation']}\n />\n </Flex>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Editor.stories.jsx","sourceRoot":"","sources":["../../../src/rte/Editor/Editor.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGlD,OAAO,EACL,MAAM,EACN,IAAI,EACJ,WAAW,EACX,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,QAAQ,EACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAGhD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,eAAe;IACb,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,MAAM;CACV,CAAC;AAMV,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,IAAsB,EAAE,EAAE;IAC9E,MAAM,SAAS,GAAG,MAAM,CAAc,IAAI,CAAC,CAAC;IAE5C,MAAM,YAAY,GAAG,CAAC,KAAW,EAAE,EAAU,EAAE,EAAE;QAC/C,MAAM,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QACvC,SAAS,CAAC,OAAO,EAAE,WAAW,CAC5B;YACE,GAAG;YACH,GAAG,EAAE,KAAK,CAAC,IAAI;YACf,YAAY,EAAE,WAAW;SAC1B,EACD,EAAE,CACH,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,MAAM,CACL,GAAG,CAAC,CAAC,SAAS,CAAC,CACf,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAClB,WAAW,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAC9B,IAAI,CAAC,CAAC,IAAI,CAAC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AC,CAAC;IAEF,OAAO,CACL,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAC/C;MAAA,CAAC,IAAI,CACH;QAAA,CAAC,WAAW,CACV;UAAA,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAChE;QAAA,EAAE,WAAW,CACb;QAAA,CAAC,UAAU,CACT;UAAA,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC,CACnE;;UACF,EAAE,MAAM,CACV;QAAA,EAAE,UAAU,CACd;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,MAAM,CACL,YAAY,CAAC,CAAC,IAAI,CAAC,CACnB,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,GAAG,CAAC,CAAC,MAAM,CAAC,CACZ,KAAK,CAAC,kBAAkB,CACxB,OAAO,CAAC,CAAC,CAAC,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC,EAEhG;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport { useState, useRef } from 'react';\nimport { action } from '@storybook/addon-actions';\nimport type { Editor as TinymceEditor } from 'tinymce';\n\nimport {\n Button,\n Card,\n CardContent,\n CardFooter,\n Flex,\n Link,\n Text,\n TextArea\n} from '@pega/cosmos-react-core';\nimport { Editor } from '@pega/cosmos-react-rte';\nimport type { EditorProps, EditorState } from '@pega/cosmos-react-rte';\n\nimport { createPegaCustomElement } from './Editor.mocks';\n\nexport default {\n title: 'RTE/Editor',\n component: Editor\n} as Meta;\n\ninterface EditorStoryProps extends EditorProps {\n showAdditionalInfo?: boolean;\n}\n\nexport const EditorDemo: StoryFn<EditorStoryProps> = (args: EditorStoryProps) => {\n const editorRef = useRef<EditorState>(null);\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage(\n {\n src,\n alt: image.name,\n attachmentId: 'sample-id'\n },\n id\n );\n };\n\n return (\n <Editor\n ref={editorRef}\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n toolbar={['inline-styling', 'lists', 'indentation', 'images', 'links']}\n onFocus={action('Editor focused')}\n onBlur={action('Editor blurred')}\n onChange={action('Editor changed')}\n onImageAdded={onImageAdded}\n defaultValue='<body><p>Hi mom <a href=\"https://google.com\">link</a></p><img alt=\"Example alt text\" src=\"http://via.placeholder.com/640x360\"/></body>'\n additionalInfo={\n args.showAdditionalInfo\n ? {\n content: (\n <Flex container={{ direction: 'column', alignItems: 'start', gap: 2 }}>\n <p>\n Lorem ipsum dolor sit amet, consectetur it, sed do tempor incididunt ut labore\n magna aliqua. Nibh praesent tristique magna sit amet. Nec tincidunt praesent\n semper feugiat nibh sed pulvinar proin gravida.\n </p>\n <p>\n Pharetra pharetra massa massa ultricies mi quis hendrerit dolor. Est velit\n egestas dui id ornare arcu odio ut. Varius sit amet mattis vulputate enim nulla\n aliquet porttitor lacus.\n </p>\n <Link href='/' target='_blank'>\n Neque vitae\n </Link>\n </Flex>\n )\n }\n : undefined\n }\n />\n );\n};\n\nEditorDemo.args = {\n showAdditionalInfo: false,\n label: 'Form field label',\n labelHidden: false,\n info: 'Enter some value',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false\n};\n\nEditorDemo.argTypes = {\n showAdditionalInfo: { control: { type: 'boolean' } },\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text', label: 'Helper text' } },\n status: {\n options: [undefined, 'success', 'warning', 'error', 'pending'],\n control: { type: 'select' }\n },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } }\n};\n\nexport const EmptyEditorDemo: StoryFn = () => {\n const editorRef = useRef<EditorState>(null);\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n return (\n <Editor\n ref={editorRef}\n label='Form field label'\n toolbar={['inline-styling', 'lists', 'indentation', 'images', 'links']}\n onImageAdded={onImageAdded}\n onFocus={action('Editor has focus')}\n onBlur={action('Editor has blurred')}\n placeholder='Type some stuff in here'\n />\n );\n};\n\nexport const ReadonlyFormField: StoryFn = () => {\n return (\n <Editor\n label='Form field label'\n readOnly\n defaultValue={`<article class=\"main-page-content\" lang=\"en-US\"><h1>HTML: HyperText Markup Language</h1><div><p><strong>HTML</strong> (HyperText Markup Language) is the most basic building block of the Web. It defines the meaning and structure of web content. Other technologies besides HTML are generally used to describe a web page's appearance/presentation (<a href=\"/en-US/docs/Web/CSS\">CSS</a>) or functionality/behavior (<a href=\"/en-US/docs/Web/JavaScript\">JavaScript</a>).</p>\n <p>\"Hypertext\" refers to links that connect web pages to one another, either within a single website or between websites. Links are a fundamental aspect of the Web. By uploading content to the Internet and linking it to pages created by other people, you become an active participant in the World Wide Web.</p>\n <p>HTML uses \"markup\" to annotate text, images, and other content for display in a Web browser. HTML markup includes special \"elements\" such as <a href=\"/en-US/docs/Web/HTML/Element/head\"><code><head></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/title\"><code><title></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/body\"><code><body></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/header\"><code><header></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/footer\"><code><footer></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/article\"><code><article></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/section\"><code><section></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/p\"><code><p></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/div\"><code><div></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/span\"><code><span></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/img\"><code><img></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/aside\"><code><aside></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/audio\"><code><audio></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/canvas\"><code><canvas></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/datalist\"><code><datalist></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/details\"><code><details></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/embed\"><code><embed></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/nav\"><code><nav></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/output\"><code><output></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/progress\"><code><progress></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/video\"><code><video></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/ul\"><code><ul></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/ol\"><code><ol></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/li\"><code><li></code></a> and many others.</p>\n <p>An HTML element is set off from other text in a document by \"tags\", which consist of the element name surrounded by \"<code><</code>\" and \"<code>></code>\". The name of an element inside a tag is case insensitive. That is, it can be written in uppercase, lowercase, or a mixture. For example, the <code><title></code> tag can be written as <code><Title></code>, <code><TITLE></code>, or in any other way.</p>\n\n <div id=\"on-github\" class=\"on-github\"><h3>Found a problem with this page?</h3><ul><li><a href=\"https://github.com/mdn/content/edit/main/files/en-us/web/html/index.md\" title=\"You're going to need to sign in to GitHub first (Opens in a new tab)\" target=\"_blank\" rel=\"noopener noreferrer\">Edit on <b>GitHub</b></a></li><li><a href=\"https://github.com/mdn/content/blob/main/files/en-us/web/html/index.md\" title=\"Folder: en-us/web/html (Opens in a new tab)\" target=\"_blank\" rel=\"noopener noreferrer\">Source on <b>GitHub</b></a></li><li><a href=\"https://github.com/mdn/content/issues/new?body=MDN+URL%3A+https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FHTML%0A%0A%23%23%23%23+What+information+was+incorrect%2C+unhelpful%2C+or+incomplete%3F%0A%0A%0A%23%23%23%23+Specific+section+or+headline%3F%0A%0A%0A%23%23%23%23+What+did+you+expect+to+see%3F%0A%0A%0A%23%23%23%23+Did+you+test+this%3F+If+so%2C+how%3F%0A%0A%0A%3C%21--+Do+not+make+changes+below+this+line+--%3E%0A%3Cdetails%3E%0A%3Csummary%3EMDN+Content+page+report+details%3C%2Fsummary%3E%0A%0A*+Folder%3A+%60en-us%2Fweb%2Fhtml%60%0A*+MDN+URL%3A+https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FHTML%0A*+GitHub+URL%3A+https%3A%2F%2Fgithub.com%2Fmdn%2Fcontent%2Fblob%2Fmain%2Ffiles%2Fen-us%2Fweb%2Fhtml%2Findex.md%0A*+Last+commit%3A+https%3A%2F%2Fgithub.com%2Fmdn%2Fcontent%2Fcommit%2F775662998e66813a612e3ff27e02f2ada867bc17%0A*+Document+last+modified%3A+2021-10-03T00%3A01%3A51.000Z%0A%0A%3C%2Fdetails%3E&title=Issue+with+%22HTML%3A+HyperText+Markup+Language%22%3A+%28short+summary+here+please%29&labels=needs-triage%2CContent%3AHTML\" title=\"This will take you to https://github.com/mdn/content to file a new issue\" target=\"_blank\" rel=\"noopener noreferrer\">Report a problem with this content on <b>GitHub</b></a></li><li>Want to fix the problem yourself? See <a href=\"https://github.com/mdn/content/blob/main/README.md\" target=\"_blank\" rel=\"noopener noreferrer\">our Contribution guide</a>.</li></ul></div>\n `}\n />\n );\n};\n\nexport const CustomComponentDemo: StoryFn = () => {\n const editorRef = useRef<EditorState>(null);\n const [editor, setEditor] = useState({} as TinymceEditor);\n\n const onCustomAction = () => {\n editor.insertContent('<pega-custom>Inserted from toolbar</pega-custom>');\n };\n\n return (\n <Editor\n ref={editorRef}\n label='Form field label'\n toolbar={['inline-styling', 'lists', 'indentation', 'links', 'images']}\n defaultValue='<body><p>Hi mom <a href=\"https://google.com\">link</a></p><p>hi <pega-custom>Hello from custom element.</pega-custom></p></body>'\n customComponents={[{ createCustomElement: createPegaCustomElement, name: 'pega-custom' }]}\n customActions={[\n {\n icon: 'pega',\n text: 'Insert a custom element',\n onMouseDown: () => {\n onCustomAction();\n }\n }\n ]}\n onInit={initializedEditor => {\n setEditor(initializedEditor);\n }}\n />\n );\n};\n\nexport const RichTextEditorWithLogs: StoryFn = () => {\n const editorRef = useRef<EditorState>(null);\n const [content, setContent] = useState<string | undefined>();\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n const showContent = (type: 'html' | 'plain_text' | 'rich_text') => {\n if (type === 'html') setContent(editorRef.current?.getHtml());\n else if (type === 'plain_text') setContent(editorRef.current?.getPlainText());\n else if (type === 'rich_text') setContent(editorRef.current?.getRichText());\n };\n\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Editor\n ref={editorRef}\n toolbar={['inline-styling', 'headers', 'tables', 'links', 'images', 'lists', 'indentation']}\n onImageAdded={onImageAdded}\n label='Rich text editor with logs'\n info='Click on the buttons below to show the different formatted outputs of the RTE'\n />\n\n <Flex container={{ gap: 1 }}>\n <Button onClick={() => showContent('html')}>Show HTML</Button>\n <Button onClick={() => showContent('plain_text')}>Show plain text</Button>\n <Button onClick={() => showContent('rich_text')}>Show rich text</Button>\n </Flex>\n\n <Text>{content}</Text>\n </Flex>\n );\n};\n\nexport const RichTextEditorHtmlParsingDemo: StoryFn = () => {\n const [html, setHtml] = useState('<p>Hello world!</p>');\n const rteRef = useRef<EditorState>(null);\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n rteRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Card>\n <CardContent>\n <TextArea value={html} onChange={e => setHtml(e.target.value)} />\n </CardContent>\n <CardFooter>\n <Button onClick={() => rteRef.current?.insertHtml(html.trim(), true)}>\n Overwrite RTE with new HTML\n </Button>\n </CardFooter>\n </Card>\n <Editor\n defaultValue={html}\n onImageAdded={onImageAdded}\n ref={rteRef}\n label='Form field label'\n toolbar={['inline-styling', 'headers', 'tables', 'links', 'images', 'lists', 'indentation']}\n />\n </Flex>\n );\n};\n"]}
|
|
@@ -1,25 +1,13 @@
|
|
|
1
|
-
import type { FieldValueListProps, MenuProps } from '@pega/cosmos-react-core';
|
|
2
|
-
import type { ChatBodyProps } from '@pega/cosmos-react-social';
|
|
1
|
+
import type { FieldValueListProps, FileUploadItemProps, MenuProps } from '@pega/cosmos-react-core';
|
|
2
|
+
import type { ChatBodyListItemProps, ChatBodyProps, SuggestedReply } from '@pega/cosmos-react-social';
|
|
3
3
|
export declare const BotConversation: ChatBodyProps['liveChat'];
|
|
4
4
|
export declare const ClaimsAgentConversation: ChatBodyProps['liveChat'];
|
|
5
5
|
export declare const LiveChatConversation: ChatBodyProps['liveChat'];
|
|
6
6
|
export declare const SimulatedConversation: ChatBodyProps['liveChat'];
|
|
7
7
|
export declare const ChatMockData: {
|
|
8
|
-
chatMessages:
|
|
9
|
-
defaultAttachments:
|
|
10
|
-
|
|
11
|
-
progress: number;
|
|
12
|
-
onDelete: () => void;
|
|
13
|
-
} | {
|
|
14
|
-
name: string;
|
|
15
|
-
onDelete: () => void;
|
|
16
|
-
progress?: undefined;
|
|
17
|
-
})[];
|
|
18
|
-
suggestedReplies: {
|
|
19
|
-
id: string;
|
|
20
|
-
message: string;
|
|
21
|
-
confidence: number;
|
|
22
|
-
}[];
|
|
8
|
+
chatMessages: ChatBodyListItemProps[];
|
|
9
|
+
defaultAttachments: FileUploadItemProps[];
|
|
10
|
+
suggestedReplies: SuggestedReply[];
|
|
23
11
|
};
|
|
24
12
|
export declare const phrasesDisplayNames: MenuProps['items'];
|
|
25
13
|
export declare const phrasesMessages: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chat.mocks.d.ts","sourceRoot":"","sources":["../../../src/social/Chat/Chat.mocks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"Chat.mocks.d.ts","sourceRoot":"","sources":["../../../src/social/Chat/Chat.mocks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACnG,OAAO,KAAK,EACV,qBAAqB,EACrB,aAAa,EACb,cAAc,EACf,MAAM,2BAA2B,CAAC;AAEnC,eAAO,MAAM,eAAe,EAAE,aAAa,CAAC,UAAU,CAwGrD,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,aAAa,CAAC,UAAU,CAqG7D,CAAC;AACF,eAAO,MAAM,oBAAoB,EAAE,aAAa,CAAC,UAAU,CAqG1D,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,UAAU,CA2N3D,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE;IACzB,YAAY,EAAE,qBAAqB,EAAE,CAAC;IACtC,kBAAkB,EAAE,mBAAmB,EAAE,CAAC;IAC1C,gBAAgB,EAAE,cAAc,EAAE,CAAC;CAqBpC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,SAAS,CAAC,OAAO,CAyDlD,CAAC;AAEF,eAAO,MAAM,eAAe;;;GAqC3B,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4DxB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,mBAAmB,CAAC,QAAQ,CAyBtD,CAAC"}
|
|
@@ -536,30 +536,10 @@ export const ChatMockData = {
|
|
|
536
536
|
}
|
|
537
537
|
],
|
|
538
538
|
suggestedReplies: [
|
|
539
|
-
{
|
|
540
|
-
id: createUID(),
|
|
541
|
-
message: 'Hello, Good morning Ginger Ventura. How can I help you today',
|
|
542
|
-
confidence: 94
|
|
543
|
-
},
|
|
544
|
-
{
|
|
545
|
-
id: createUID(),
|
|
546
|
-
message: 'Sorry to hear that. I will surely help you resolve the issue. Can you please provide the policy id, so that I can get more details',
|
|
547
|
-
confidence: 75
|
|
548
|
-
},
|
|
549
|
-
{
|
|
550
|
-
id: 'suggested_reply_3',
|
|
551
|
-
message: 'Hello! How can I assist you today?',
|
|
552
|
-
confidence: 40
|
|
553
|
-
},
|
|
554
539
|
{
|
|
555
540
|
id: 'suggested_reply_4',
|
|
556
541
|
message: 'Thanks for contacting our support team',
|
|
557
|
-
|
|
558
|
-
},
|
|
559
|
-
{
|
|
560
|
-
id: createUID(),
|
|
561
|
-
message: 'Happy to help. Is there anything else I can help with?',
|
|
562
|
-
confidence: 75
|
|
542
|
+
type: 'dialogue'
|
|
563
543
|
}
|
|
564
544
|
]
|
|
565
545
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chat.mocks.js","sourceRoot":"","sources":["../../../src/social/Chat/Chat.mocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAIpD,MAAM,CAAC,MAAM,eAAe,GAA8B;IACxD;QACE,EAAE,EAAE,SAAS,EAAE;QACf,IAAI,EAAE,SAAS;QACf,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,IAAI;QACf,QAAQ,EAAE,MAAM;QAChB,OAAO,EAAE,6CAA6C;QACtD,SAAS,EAAE,SAAS;KACrB;IACD;QACE,EAAE,EAAE,SAAS,EAAE;QACf,IAAI,EAAE,SAAS;QACf,UAAU,EAAE,UAAU;QACtB,SAAS,EAAE,IAA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C","sourcesContent":["import { createUID } from '@pega/cosmos-react-core';\nimport type { FieldValueListProps, MenuProps } from '@pega/cosmos-react-core';\nimport type { ChatBodyProps } from '@pega/cosmos-react-social';\n\nexport const BotConversation: ChatBodyProps['liveChat'] = [\n {\n id: createUID(),\n type: 'message',\n senderType: 'bot',\n direction: 'in',\n senderId: 'bot1',\n message: 'Hi, Welcome to u-plus. How can I help you ?',\n timestamp: '1:44 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'customer',\n direction: 'in',\n avatarInfo: {\n name: 'Ginger Ventura'\n },\n timestamp: '1:45 PM',\n senderId: 'gingerVentura',\n message: 'Hi, I would like to know the validity of my policy.'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'bot',\n direction: 'in',\n senderId: 'bot1',\n message: 'You have two policies.'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'bot',\n direction: 'in',\n senderId: 'bot1',\n message: '1457589, 1473284.'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'bot',\n direction: 'in',\n senderId: 'bot1',\n message: 'Which among these policies do you want to know the validity of?',\n timestamp: '1:45 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'customer',\n direction: 'in',\n avatarInfo: {\n name: 'Ginger Ventura'\n },\n timestamp: '1:47 PM',\n senderId: 'gingerVentura',\n message: 'Please give me validity of policy with number 1457589.'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'bot',\n direction: 'in',\n senderId: 'bot1',\n timestamp: '1:48 PM',\n message: 'Policy with number 1457589 is expiring on 12th December, 2023.'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'bot',\n direction: 'in',\n senderId: 'bot1',\n timestamp: '1:49 PM',\n message: 'Is there anything else that you need help with?'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'customer',\n direction: 'in',\n avatarInfo: {\n name: 'Ginger Ventura'\n },\n timestamp: '1:51 PM',\n senderId: 'gingerVentura',\n message: 'Yes, I would like to know about the claims process.'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'bot',\n direction: 'in',\n senderId: 'bot1',\n timestamp: '1:52 PM',\n message: 'Sure, I am transferring this chat to the concerned department.'\n },\n {\n id: createUID(),\n type: 'system',\n timestamp: '1:52 PM',\n message: 'Chat routed to a live agent.'\n }\n];\n\nexport const ClaimsAgentConversation: ChatBodyProps['liveChat'] = [\n {\n id: createUID(),\n type: 'system',\n timestamp: '1:54 PM',\n message: 'John Brown joined this conversation'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'in',\n avatarInfo: {\n name: 'John Brown'\n },\n senderId: 'agent1',\n message: 'Hi Ginger Ventura, I see that you want to know about the claims process.'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'in',\n avatarInfo: {\n name: 'John Brown'\n },\n senderId: 'agent1',\n message: 'Please go to link to get detailed information about claims process.',\n timestamp: '1:55 PM',\n mediaPageLinks: [\n {\n id: createUID(),\n href: 'https://collaborate.pega.com/',\n thumbnail:\n 'https://community.pega.com/sites/default/files/styles/480/public/media/images/2020-02/AskExpert.png?itok=ef2MVbOV',\n title: 'UPlus - Claims process'\n }\n ]\n },\n {\n id: createUID(),\n type: 'system',\n timestamp: '1:56 PM',\n message: 'Vernon Lee joined this conversation'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'in',\n avatarInfo: {\n name: 'Vernon Lee'\n },\n senderId: 'agent2',\n message:\n 'Hi Ginger Ventura, I am the supervisor. You may also contact the nearest branch for a physical copy of the claims process.',\n timestamp: '1:57 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'customer',\n direction: 'in',\n avatarInfo: {\n name: 'Ginger Ventura'\n },\n timestamp: '1:57 PM',\n senderId: 'gingerVentura',\n message:\n 'Thanks for the information. I would also like to update the mobile number of my policy.'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'in',\n avatarInfo: {\n name: 'John Brown'\n },\n senderId: 'agent1',\n message: 'Sure, I need to transfer you to a specialist to get you the needed help.',\n timestamp: '1:58 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'customer',\n direction: 'in',\n avatarInfo: {\n name: 'Ginger Ventura'\n },\n timestamp: '1:58 PM',\n senderId: 'gingerVentura',\n message: 'Okay.'\n },\n {\n id: createUID(),\n type: 'system',\n timestamp: '1:59 PM',\n message: 'Transfer request initiated'\n }\n];\nexport const LiveChatConversation: ChatBodyProps['liveChat'] = [\n {\n id: createUID(),\n type: 'system',\n timestamp: '2:01 PM',\n message: 'Edward Green joined the conversation'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n senderId: 'agent3',\n message: 'Hi Ginger Ventura, Please provide your phone number that needs to be updated.',\n timestamp: '2:02PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'customer',\n direction: 'in',\n avatarInfo: {\n name: 'Ginger Ventura'\n },\n timestamp: '2:03 PM',\n senderId: 'gingerVentura',\n message: 'Please update the policy with 9812764132.'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n senderId: 'agent3',\n message: 'Your mobile number is updated successfully.'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n senderId: 'agent3',\n message: 'This number will be used for all communcation regarding your policy',\n timestamp: '2:05 PM',\n status: 'delivered'\n },\n {\n id: createUID(),\n type: 'system',\n timestamp: '2:04 PM',\n message: 'Vernon Lee joined this conversation'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'in',\n avatarInfo: {\n name: 'Vernon Lee'\n },\n senderId: 'agent2',\n message: 'Please download the updated policy',\n attachments: [\n {\n id: createUID(),\n name: 'Policy',\n icon: 'document-pdf',\n meta: 'PDF 1.2 MB',\n thumbnail:\n 'https://pegasystems.github.io/uplus-wss/health_provider/img/secondary-options.jpg'\n },\n {\n id: createUID(),\n name: 'FAQ with detailed terms and conditions of the policy',\n icon: 'document-pdf',\n meta: 'PDF 0.7 MB'\n }\n ],\n timestamp: '2:05 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'customer',\n direction: 'in',\n avatarInfo: {\n name: 'Ginger Ventura'\n },\n timestamp: '2:06 PM',\n senderId: 'gingerVentura',\n message: 'Thank you'\n }\n];\n\nexport const SimulatedConversation: ChatBodyProps['liveChat'] = [\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n senderId: 'agent3',\n message: 'You are welcome, Is there anything else you need help with?',\n timestamp: '2:07 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'customer',\n direction: 'in',\n avatarInfo: {\n name: 'Ginger Ventura'\n },\n timestamp: '2:09 PM',\n senderId: 'gingerVentura',\n message: 'Can you please let me know the information about the newly launched policies?'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n senderId: 'agent3',\n message: 'We have new plans in term insurance and health insurance.'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n senderId: 'agent3',\n message: 'Do you want me to share the information on both?',\n timestamp: '2:10 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'customer',\n direction: 'in',\n avatarInfo: {\n name: 'Ginger Ventura'\n },\n senderId: 'gingerVentura',\n message: 'Yes, please.'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'customer',\n direction: 'in',\n avatarInfo: {\n name: 'Ginger Ventura'\n },\n senderId: 'gingerVentura',\n message: 'I am also interested in knowing endowment plans as well.',\n timestamp: '2:11 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n senderId: 'agent3',\n message: 'Okay, Let me find the relevant information for you.',\n timestamp: '2:12 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'in',\n avatarInfo: {\n name: 'Vernon Lee'\n },\n senderId: 'agent2',\n message: 'We have a newly launched pension plan as well. Would you be interested in it?',\n timestamp: '2:12 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'customer',\n direction: 'in',\n avatarInfo: {\n name: 'Ginger Ventura'\n },\n senderId: 'gingerVentura',\n message:\n 'I am not looking for a pension plan at the moment. However, share the details of this plan also.',\n timestamp: '2:13 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'in',\n avatarInfo: {\n name: 'Vernon Lee'\n },\n senderId: 'agent2',\n message: 'Sure, I share the details in a moment.',\n timestamp: '2:14 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n senderId: 'agent3',\n message: 'You can find details of the term insurance in this link',\n mediaPageLinks: [\n {\n id: createUID(),\n href: 'https://pegasystems.github.io/uplus-wss/insurance/index.html',\n thumbnail: 'https://pegasystems.github.io/uplus-wss/insurance/img/offer-promo-1.jpg',\n title: 'Ask the expert'\n }\n ]\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n senderId: 'agent3',\n message: 'Health insurance details can be found here',\n mediaPageLinks: [\n {\n id: createUID(),\n href: 'https://pegasystems.github.io/uplus-wss/insurance/offer.html',\n thumbnail: 'https://pegasystems.github.io/uplus-wss/insurance/img/offer-main.jpg',\n title: 'Ask the expert'\n }\n ],\n timestamp: '2:15 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'in',\n avatarInfo: {\n name: 'Vernon Lee'\n },\n senderId: 'agent2',\n message: 'Visit this link for details on pension plan',\n mediaPageLinks: [\n {\n id: createUID(),\n href: 'https://pegasystems.github.io/uplus-wss/retail_bank/index.html',\n thumbnail: 'https://pegasystems.github.io/uplus-wss/retail_bank/img/offer-main.jpg',\n title: 'Ask the expert'\n }\n ],\n timestamp: '2:15 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n senderId: 'agent3',\n message: 'Here are the details of endowment plans',\n attachments: [\n {\n id: createUID(),\n name: 'Policy',\n icon: 'document-pdf',\n meta: 'PDF 1.2 MB',\n thumbnail:\n 'https://pegasystems.github.io/uplus-wss/health_provider/img/secondary-options.jpg'\n }\n ],\n timestamp: '2:16 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'customer',\n direction: 'in',\n avatarInfo: {\n name: 'Ginger Ventura'\n },\n senderId: 'gingerVentura',\n message: 'Great, Thank you',\n timestamp: '2:17 PM'\n },\n {\n id: createUID(),\n type: 'system',\n message: 'Customer left this conversation',\n timestamp: '2:19 PM'\n }\n];\n\nexport const ChatMockData = {\n chatMessages: SimulatedConversation,\n defaultAttachments: [\n {\n name: 'Policy.doc',\n progress: 100,\n onDelete: () => {}\n },\n {\n name: 'E-Ticket',\n onDelete: () => {}\n }\n ],\n suggestedReplies: [\n {\n id: createUID(),\n message: 'Hello, Good morning Ginger Ventura. How can I help you today',\n confidence: 94\n },\n {\n id: createUID(),\n message:\n 'Sorry to hear that. I will surely help you resolve the issue. Can you please provide the policy id, so that I can get more details',\n confidence: 75\n },\n {\n id: 'suggested_reply_3',\n message: 'Hello! How can I assist you today?',\n confidence: 40\n },\n {\n id: 'suggested_reply_4',\n message: 'Thanks for contacting our support team',\n confidence: 20\n },\n {\n id: createUID(),\n message: 'Happy to help. Is there anything else I can help with?',\n confidence: 75\n }\n ]\n};\n\nexport const phrasesDisplayNames: MenuProps['items'] = [\n {\n id: '1',\n primary: 'Account',\n items: [\n {\n id: '1-1',\n primary: 'Account balance'\n }\n ]\n },\n {\n id: '2',\n primary: 'Agreement',\n items: [\n {\n id: '2-1',\n primary: 'End of a case/interaction'\n },\n {\n id: '2-2',\n primary: 'Mid interaction'\n }\n ]\n },\n {\n id: '3',\n primary: 'Apologize',\n items: [\n {\n id: '3-1',\n primary: 'Apologize - ask customer to'\n },\n {\n id: '3-2',\n primary: 'Thanks for patience'\n }\n ]\n },\n {\n id: '4',\n primary: 'Ask for transfer',\n items: [\n {\n id: '4-1',\n primary: 'Agent not available'\n },\n {\n id: '4-2',\n primary: 'Agent not available - call back'\n },\n {\n id: '4-3',\n primary: 'Agent not available - stall'\n }\n ]\n }\n];\n\nexport const phrasesMessages = [\n {\n id: '1-1',\n message: 'Ms. Ginger ventura your account balance is $5226.32'\n },\n {\n id: '2-1',\n message: 'My pleasure! Is there anything else I can do for you today?'\n },\n {\n id: '2-2',\n message: 'You are welcome!'\n },\n {\n id: '3-1',\n message:\n \"Ms.Ventura. We do not respond to that kind of language. I'm doing my best to help you. Please be civil.\"\n },\n {\n id: '3-2',\n message: 'Thanks for your patience. I am working on your request. I will be with you shortly.'\n },\n {\n id: '4-1',\n message:\n 'It looks like the agent we were looking to transfer you to will not be available. One moment please while I see whether someone else can assist.'\n },\n {\n id: '4-2',\n message:\n \"The agent I was looking to transfer you to isn't available. Would it be possible for us to call you when a specialist is available?\"\n },\n {\n id: '4-3',\n message:\n 'It looks like the agent we were looking to transfer you to will not be available. One moment please while I see whether someone else can assist.'\n }\n];\n\nexport const pagePushList = [\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n senderId: 'agent3',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n message: 'You may also reach us via',\n timestamp: '1:45 PM',\n mediaPageLinks: [\n {\n id: createUID(),\n href: 'https://collaborate.pega.com/',\n thumbnail:\n 'https://community.pega.com/sites/default/files/styles/480/public/media/images/2020-02/AskExpert.png?itok=ef2MVbOV',\n title: 'Ask the expert'\n }\n ]\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n senderId: 'agent3',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n message: 'Online Portal',\n timestamp: '1:45 PM',\n mediaPageLinks: [\n {\n id: createUID(),\n href: 'https://collaborate.pega.com/',\n title: 'Ask the expert'\n }\n ]\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n senderId: 'agent3',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n message: 'Contact center',\n timestamp: '1:45 PM',\n mediaPageLinks: [\n {\n id: createUID(),\n href: 'https://collaborate.pega.com/',\n title: 'Ask the expert'\n }\n ]\n }\n];\n\nexport const contextItems: FieldValueListProps['fields'] = [\n {\n id: 'Location',\n name: 'Location',\n value: 'New York, NY',\n variant: 'inline'\n },\n {\n id: 'Initiated from',\n name: 'Initiated from',\n value: 'Uplus.com/Products',\n variant: 'inline'\n },\n {\n id: 'Shopping cart',\n name: 'Shopping cart',\n value: '$155.25',\n variant: 'inline'\n },\n {\n id: 'Items in shopping cart',\n name: 'Items in shopping cart',\n value: 'Product name 01, Product name 02',\n variant: 'inline'\n }\n];\n"]}
|
|
1
|
+
{"version":3,"file":"Chat.mocks.js","sourceRoot":"","sources":["../../../src/social/Chat/Chat.mocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAQpD,MAAM,CAAC,MAAM,eAAe,GAA8B;IACxD;QACE,EAAE,EAAE,SAAS,EAAE;QACf,IAAI,EAAE,SAAS;QACf,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,IAAI;QACf,QAAQ,EAAE,MAAM;QAChB,OAAO,EAAE,6CAA6C;QACtD,SAAS,EAAE,SAAS;KACrB;IACD;QACE,EAAE,EAAE,SAAS,EAAE;QACf,IAAI,EAAE,SAAS;QACf,UAAU,EAAE,UAAU;QACtB,SAAS,EAAE,IAAI;QACf,UAAU,EAAE;YACV,IAAI,EAAE,gBAAgB;SACvB;QACD,SAAS,EAAE,SAAS;QACpB,QAAQ,EAAE,eAAe;QACzB,OAAO,EAAE,qDAAqD;KAC/D;IACD;QACE,EAAE,EAA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AE,KAAK;QAChB,UAAU,EAAE;YACV,IAAI,EAAE,cAAc;SACrB;QACD,OAAO,EAAE,gBAAgB;QACzB,SAAS,EAAE,SAAS;QACpB,cAAc,EAAE;YACd;gBACE,EAAE,EAAE,SAAS,EAAE;gBACf,IAAI,EAAE,+BAA+B;gBACrC,KAAK,EAAE,gBAAgB;aACxB;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAkC;IACzD;QACE,EAAE,EAAE,UAAU;QACd,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,cAAc;QACrB,OAAO,EAAE,QAAQ;KAClB;IACD;QACE,EAAE,EAAE,gBAAgB;QACpB,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,oBAAoB;QAC3B,OAAO,EAAE,QAAQ;KAClB;IACD;QACE,EAAE,EAAE,eAAe;QACnB,IAAI,EAAE,eAAe;QACrB,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,QAAQ;KAClB;IACD;QACE,EAAE,EAAE,wBAAwB;QAC5B,IAAI,EAAE,wBAAwB;QAC9B,KAAK,EAAE,kCAAkC;QACzC,OAAO,EAAE,QAAQ;KAClB;CACF,CAAC","sourcesContent":["import { createUID } from '@pega/cosmos-react-core';\nimport type { FieldValueListProps, FileUploadItemProps, MenuProps } from '@pega/cosmos-react-core';\nimport type {\n ChatBodyListItemProps,\n ChatBodyProps,\n SuggestedReply\n} from '@pega/cosmos-react-social';\n\nexport const BotConversation: ChatBodyProps['liveChat'] = [\n {\n id: createUID(),\n type: 'message',\n senderType: 'bot',\n direction: 'in',\n senderId: 'bot1',\n message: 'Hi, Welcome to u-plus. How can I help you ?',\n timestamp: '1:44 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'customer',\n direction: 'in',\n avatarInfo: {\n name: 'Ginger Ventura'\n },\n timestamp: '1:45 PM',\n senderId: 'gingerVentura',\n message: 'Hi, I would like to know the validity of my policy.'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'bot',\n direction: 'in',\n senderId: 'bot1',\n message: 'You have two policies.'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'bot',\n direction: 'in',\n senderId: 'bot1',\n message: '1457589, 1473284.'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'bot',\n direction: 'in',\n senderId: 'bot1',\n message: 'Which among these policies do you want to know the validity of?',\n timestamp: '1:45 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'customer',\n direction: 'in',\n avatarInfo: {\n name: 'Ginger Ventura'\n },\n timestamp: '1:47 PM',\n senderId: 'gingerVentura',\n message: 'Please give me validity of policy with number 1457589.'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'bot',\n direction: 'in',\n senderId: 'bot1',\n timestamp: '1:48 PM',\n message: 'Policy with number 1457589 is expiring on 12th December, 2023.'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'bot',\n direction: 'in',\n senderId: 'bot1',\n timestamp: '1:49 PM',\n message: 'Is there anything else that you need help with?'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'customer',\n direction: 'in',\n avatarInfo: {\n name: 'Ginger Ventura'\n },\n timestamp: '1:51 PM',\n senderId: 'gingerVentura',\n message: 'Yes, I would like to know about the claims process.'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'bot',\n direction: 'in',\n senderId: 'bot1',\n timestamp: '1:52 PM',\n message: 'Sure, I am transferring this chat to the concerned department.'\n },\n {\n id: createUID(),\n type: 'system',\n timestamp: '1:52 PM',\n message: 'Chat routed to a live agent.'\n }\n];\n\nexport const ClaimsAgentConversation: ChatBodyProps['liveChat'] = [\n {\n id: createUID(),\n type: 'system',\n timestamp: '1:54 PM',\n message: 'John Brown joined this conversation'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'in',\n avatarInfo: {\n name: 'John Brown'\n },\n senderId: 'agent1',\n message: 'Hi Ginger Ventura, I see that you want to know about the claims process.'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'in',\n avatarInfo: {\n name: 'John Brown'\n },\n senderId: 'agent1',\n message: 'Please go to link to get detailed information about claims process.',\n timestamp: '1:55 PM',\n mediaPageLinks: [\n {\n id: createUID(),\n href: 'https://collaborate.pega.com/',\n thumbnail:\n 'https://community.pega.com/sites/default/files/styles/480/public/media/images/2020-02/AskExpert.png?itok=ef2MVbOV',\n title: 'UPlus - Claims process'\n }\n ]\n },\n {\n id: createUID(),\n type: 'system',\n timestamp: '1:56 PM',\n message: 'Vernon Lee joined this conversation'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'in',\n avatarInfo: {\n name: 'Vernon Lee'\n },\n senderId: 'agent2',\n message:\n 'Hi Ginger Ventura, I am the supervisor. You may also contact the nearest branch for a physical copy of the claims process.',\n timestamp: '1:57 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'customer',\n direction: 'in',\n avatarInfo: {\n name: 'Ginger Ventura'\n },\n timestamp: '1:57 PM',\n senderId: 'gingerVentura',\n message:\n 'Thanks for the information. I would also like to update the mobile number of my policy.'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'in',\n avatarInfo: {\n name: 'John Brown'\n },\n senderId: 'agent1',\n message: 'Sure, I need to transfer you to a specialist to get you the needed help.',\n timestamp: '1:58 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'customer',\n direction: 'in',\n avatarInfo: {\n name: 'Ginger Ventura'\n },\n timestamp: '1:58 PM',\n senderId: 'gingerVentura',\n message: 'Okay.'\n },\n {\n id: createUID(),\n type: 'system',\n timestamp: '1:59 PM',\n message: 'Transfer request initiated'\n }\n];\nexport const LiveChatConversation: ChatBodyProps['liveChat'] = [\n {\n id: createUID(),\n type: 'system',\n timestamp: '2:01 PM',\n message: 'Edward Green joined the conversation'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n senderId: 'agent3',\n message: 'Hi Ginger Ventura, Please provide your phone number that needs to be updated.',\n timestamp: '2:02PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'customer',\n direction: 'in',\n avatarInfo: {\n name: 'Ginger Ventura'\n },\n timestamp: '2:03 PM',\n senderId: 'gingerVentura',\n message: 'Please update the policy with 9812764132.'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n senderId: 'agent3',\n message: 'Your mobile number is updated successfully.'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n senderId: 'agent3',\n message: 'This number will be used for all communcation regarding your policy',\n timestamp: '2:05 PM',\n status: 'delivered'\n },\n {\n id: createUID(),\n type: 'system',\n timestamp: '2:04 PM',\n message: 'Vernon Lee joined this conversation'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'in',\n avatarInfo: {\n name: 'Vernon Lee'\n },\n senderId: 'agent2',\n message: 'Please download the updated policy',\n attachments: [\n {\n id: createUID(),\n name: 'Policy',\n icon: 'document-pdf',\n meta: 'PDF 1.2 MB',\n thumbnail:\n 'https://pegasystems.github.io/uplus-wss/health_provider/img/secondary-options.jpg'\n },\n {\n id: createUID(),\n name: 'FAQ with detailed terms and conditions of the policy',\n icon: 'document-pdf',\n meta: 'PDF 0.7 MB'\n }\n ],\n timestamp: '2:05 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'customer',\n direction: 'in',\n avatarInfo: {\n name: 'Ginger Ventura'\n },\n timestamp: '2:06 PM',\n senderId: 'gingerVentura',\n message: 'Thank you'\n }\n];\n\nexport const SimulatedConversation: ChatBodyProps['liveChat'] = [\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n senderId: 'agent3',\n message: 'You are welcome, Is there anything else you need help with?',\n timestamp: '2:07 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'customer',\n direction: 'in',\n avatarInfo: {\n name: 'Ginger Ventura'\n },\n timestamp: '2:09 PM',\n senderId: 'gingerVentura',\n message: 'Can you please let me know the information about the newly launched policies?'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n senderId: 'agent3',\n message: 'We have new plans in term insurance and health insurance.'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n senderId: 'agent3',\n message: 'Do you want me to share the information on both?',\n timestamp: '2:10 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'customer',\n direction: 'in',\n avatarInfo: {\n name: 'Ginger Ventura'\n },\n senderId: 'gingerVentura',\n message: 'Yes, please.'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'customer',\n direction: 'in',\n avatarInfo: {\n name: 'Ginger Ventura'\n },\n senderId: 'gingerVentura',\n message: 'I am also interested in knowing endowment plans as well.',\n timestamp: '2:11 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n senderId: 'agent3',\n message: 'Okay, Let me find the relevant information for you.',\n timestamp: '2:12 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'in',\n avatarInfo: {\n name: 'Vernon Lee'\n },\n senderId: 'agent2',\n message: 'We have a newly launched pension plan as well. Would you be interested in it?',\n timestamp: '2:12 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'customer',\n direction: 'in',\n avatarInfo: {\n name: 'Ginger Ventura'\n },\n senderId: 'gingerVentura',\n message:\n 'I am not looking for a pension plan at the moment. However, share the details of this plan also.',\n timestamp: '2:13 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'in',\n avatarInfo: {\n name: 'Vernon Lee'\n },\n senderId: 'agent2',\n message: 'Sure, I share the details in a moment.',\n timestamp: '2:14 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n senderId: 'agent3',\n message: 'You can find details of the term insurance in this link',\n mediaPageLinks: [\n {\n id: createUID(),\n href: 'https://pegasystems.github.io/uplus-wss/insurance/index.html',\n thumbnail: 'https://pegasystems.github.io/uplus-wss/insurance/img/offer-promo-1.jpg',\n title: 'Ask the expert'\n }\n ]\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n senderId: 'agent3',\n message: 'Health insurance details can be found here',\n mediaPageLinks: [\n {\n id: createUID(),\n href: 'https://pegasystems.github.io/uplus-wss/insurance/offer.html',\n thumbnail: 'https://pegasystems.github.io/uplus-wss/insurance/img/offer-main.jpg',\n title: 'Ask the expert'\n }\n ],\n timestamp: '2:15 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'in',\n avatarInfo: {\n name: 'Vernon Lee'\n },\n senderId: 'agent2',\n message: 'Visit this link for details on pension plan',\n mediaPageLinks: [\n {\n id: createUID(),\n href: 'https://pegasystems.github.io/uplus-wss/retail_bank/index.html',\n thumbnail: 'https://pegasystems.github.io/uplus-wss/retail_bank/img/offer-main.jpg',\n title: 'Ask the expert'\n }\n ],\n timestamp: '2:15 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n senderId: 'agent3',\n message: 'Here are the details of endowment plans',\n attachments: [\n {\n id: createUID(),\n name: 'Policy',\n icon: 'document-pdf',\n meta: 'PDF 1.2 MB',\n thumbnail:\n 'https://pegasystems.github.io/uplus-wss/health_provider/img/secondary-options.jpg'\n }\n ],\n timestamp: '2:16 PM'\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'customer',\n direction: 'in',\n avatarInfo: {\n name: 'Ginger Ventura'\n },\n senderId: 'gingerVentura',\n message: 'Great, Thank you',\n timestamp: '2:17 PM'\n },\n {\n id: createUID(),\n type: 'system',\n message: 'Customer left this conversation',\n timestamp: '2:19 PM'\n }\n];\n\nexport const ChatMockData: {\n chatMessages: ChatBodyListItemProps[];\n defaultAttachments: FileUploadItemProps[];\n suggestedReplies: SuggestedReply[];\n} = {\n chatMessages: SimulatedConversation,\n defaultAttachments: [\n {\n name: 'Policy.doc',\n progress: 100,\n onDelete: () => {}\n },\n {\n name: 'E-Ticket',\n onDelete: () => {}\n }\n ],\n suggestedReplies: [\n {\n id: 'suggested_reply_4',\n message: 'Thanks for contacting our support team',\n type: 'dialogue'\n }\n ]\n};\n\nexport const phrasesDisplayNames: MenuProps['items'] = [\n {\n id: '1',\n primary: 'Account',\n items: [\n {\n id: '1-1',\n primary: 'Account balance'\n }\n ]\n },\n {\n id: '2',\n primary: 'Agreement',\n items: [\n {\n id: '2-1',\n primary: 'End of a case/interaction'\n },\n {\n id: '2-2',\n primary: 'Mid interaction'\n }\n ]\n },\n {\n id: '3',\n primary: 'Apologize',\n items: [\n {\n id: '3-1',\n primary: 'Apologize - ask customer to'\n },\n {\n id: '3-2',\n primary: 'Thanks for patience'\n }\n ]\n },\n {\n id: '4',\n primary: 'Ask for transfer',\n items: [\n {\n id: '4-1',\n primary: 'Agent not available'\n },\n {\n id: '4-2',\n primary: 'Agent not available - call back'\n },\n {\n id: '4-3',\n primary: 'Agent not available - stall'\n }\n ]\n }\n];\n\nexport const phrasesMessages = [\n {\n id: '1-1',\n message: 'Ms. Ginger ventura your account balance is $5226.32'\n },\n {\n id: '2-1',\n message: 'My pleasure! Is there anything else I can do for you today?'\n },\n {\n id: '2-2',\n message: 'You are welcome!'\n },\n {\n id: '3-1',\n message:\n \"Ms.Ventura. We do not respond to that kind of language. I'm doing my best to help you. Please be civil.\"\n },\n {\n id: '3-2',\n message: 'Thanks for your patience. I am working on your request. I will be with you shortly.'\n },\n {\n id: '4-1',\n message:\n 'It looks like the agent we were looking to transfer you to will not be available. One moment please while I see whether someone else can assist.'\n },\n {\n id: '4-2',\n message:\n \"The agent I was looking to transfer you to isn't available. Would it be possible for us to call you when a specialist is available?\"\n },\n {\n id: '4-3',\n message:\n 'It looks like the agent we were looking to transfer you to will not be available. One moment please while I see whether someone else can assist.'\n }\n];\n\nexport const pagePushList = [\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n senderId: 'agent3',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n message: 'You may also reach us via',\n timestamp: '1:45 PM',\n mediaPageLinks: [\n {\n id: createUID(),\n href: 'https://collaborate.pega.com/',\n thumbnail:\n 'https://community.pega.com/sites/default/files/styles/480/public/media/images/2020-02/AskExpert.png?itok=ef2MVbOV',\n title: 'Ask the expert'\n }\n ]\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n senderId: 'agent3',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n message: 'Online Portal',\n timestamp: '1:45 PM',\n mediaPageLinks: [\n {\n id: createUID(),\n href: 'https://collaborate.pega.com/',\n title: 'Ask the expert'\n }\n ]\n },\n {\n id: createUID(),\n type: 'message',\n senderType: 'agent',\n senderId: 'agent3',\n direction: 'out',\n avatarInfo: {\n name: 'Edward green'\n },\n message: 'Contact center',\n timestamp: '1:45 PM',\n mediaPageLinks: [\n {\n id: createUID(),\n href: 'https://collaborate.pega.com/',\n title: 'Ask the expert'\n }\n ]\n }\n];\n\nexport const contextItems: FieldValueListProps['fields'] = [\n {\n id: 'Location',\n name: 'Location',\n value: 'New York, NY',\n variant: 'inline'\n },\n {\n id: 'Initiated from',\n name: 'Initiated from',\n value: 'Uplus.com/Products',\n variant: 'inline'\n },\n {\n id: 'Shopping cart',\n name: 'Shopping cart',\n value: '$155.25',\n variant: 'inline'\n },\n {\n id: 'Items in shopping cart',\n name: 'Items in shopping cart',\n value: 'Product name 01, Product name 02',\n variant: 'inline'\n }\n];\n"]}
|
|
@@ -31,6 +31,7 @@ interface SuggestedReplyPickerDemoProps {
|
|
|
31
31
|
export declare const SuggestedReplyPickerDemo: StoryFn<SuggestedReplyPickerDemoProps>;
|
|
32
32
|
interface ChatComposerDemoProps {
|
|
33
33
|
maxAttachments?: number;
|
|
34
|
+
showSuggestReplyButton?: boolean;
|
|
34
35
|
}
|
|
35
36
|
export declare const ChatComposerDemo: StoryFn<ChatComposerDemoProps>;
|
|
36
37
|
interface StandardChatProps {
|
|
@@ -48,6 +49,7 @@ interface StandardChatProps {
|
|
|
48
49
|
loading?: boolean;
|
|
49
50
|
typingIndicator?: boolean;
|
|
50
51
|
showAttachments?: boolean;
|
|
52
|
+
genAIErrorState?: string;
|
|
51
53
|
}
|
|
52
54
|
export declare const StandardChat: StoryFn<StandardChatProps>;
|
|
53
55
|
//# sourceMappingURL=Chat.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chat.stories.d.ts","sourceRoot":"","sources":["../../../src/social/Chat/Chat.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAQ,OAAO,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Chat.stories.d.ts","sourceRoot":"","sources":["../../../src/social/Chat/Chat.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAQ,OAAO,EAAE,MAAM,kBAAkB,CAAC;AA6BtD,OAAO,KAAK,EAIV,UAAU,EACX,MAAM,yBAAyB,CAAC;AAiBjC,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EAIZ,kBAAkB,EAKlB,kBAAkB,EACnB,MAAM,2BAA2B,CAAC;;AAcnC,wBAGU;AAGV,UAAU,mBACR,SAAQ,UAAU,CAAC,eAAe,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;CAAG;AAE7E,eAAO,MAAM,cAAc,EAAE,OAAO,CAAC,mBAAmB,CAiCvD,CAAC;AAmBF,UAAU,gBAAiB,SAAQ,UAAU,CAAC,YAAY,EAAE,UAAU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