@pega/cosmos-react-demos 3.0.0-dev.2.1 → 3.0.0-dev.3.0

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.
Files changed (115) hide show
  1. package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts +6 -0
  2. package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts.map +1 -0
  3. package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.jsx +64 -0
  4. package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.jsx.map +1 -0
  5. package/jsx/build/DynamicContentEditor/FieldSelector.d.ts +11 -0
  6. package/jsx/build/DynamicContentEditor/FieldSelector.d.ts.map +1 -0
  7. package/jsx/build/DynamicContentEditor/FieldSelector.jsx +80 -0
  8. package/jsx/build/DynamicContentEditor/FieldSelector.jsx.map +1 -0
  9. package/jsx/core/AppShell/AppShell.stories.jsx +1 -1
  10. package/jsx/core/AppShell/AppShell.stories.jsx.map +1 -1
  11. package/jsx/core/Card/Card.stories.jsx +1 -1
  12. package/jsx/core/Card/Card.stories.jsx.map +1 -1
  13. package/jsx/core/Checkbox/Checkbox.stories.jsx +1 -1
  14. package/jsx/core/Checkbox/Checkbox.stories.jsx.map +1 -1
  15. package/jsx/core/Currency/Currency.stories.d.ts +5 -2
  16. package/jsx/core/Currency/Currency.stories.d.ts.map +1 -1
  17. package/jsx/core/Currency/Currency.stories.jsx +30 -12
  18. package/jsx/core/Currency/Currency.stories.jsx.map +1 -1
  19. package/jsx/core/Form/Form.stories.jsx +2 -2
  20. package/jsx/core/Form/Form.stories.jsx.map +1 -1
  21. package/jsx/core/Modal/Modal.stories.d.ts.map +1 -1
  22. package/jsx/core/Modal/Modal.stories.jsx +29 -43
  23. package/jsx/core/Modal/Modal.stories.jsx.map +1 -1
  24. package/jsx/core/Number/Number.stories.d.ts +3 -3
  25. package/jsx/core/Number/Number.stories.d.ts.map +1 -1
  26. package/jsx/core/Number/Number.stories.jsx +14 -10
  27. package/jsx/core/Number/Number.stories.jsx.map +1 -1
  28. package/jsx/core/PageTemplates/PageTemplates.stories.d.ts +5 -3
  29. package/jsx/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  30. package/jsx/core/PageTemplates/PageTemplates.stories.jsx +102 -26
  31. package/jsx/core/PageTemplates/PageTemplates.stories.jsx.map +1 -1
  32. package/jsx/core/RadioButton/RadioButton.stories.jsx +1 -1
  33. package/jsx/core/RadioButton/RadioButton.stories.jsx.map +1 -1
  34. package/jsx/core/Rating/Rating.stories.jsx +1 -1
  35. package/jsx/core/Rating/Rating.stories.jsx.map +1 -1
  36. package/jsx/core/Sentiment/Sentiment.stories.jsx +4 -4
  37. package/jsx/core/Sentiment/Sentiment.stories.jsx.map +1 -1
  38. package/jsx/core/Table/Table.mocks.d.ts +6 -0
  39. package/jsx/core/Table/Table.mocks.d.ts.map +1 -1
  40. package/jsx/core/Table/Table.mocks.jsx +134 -0
  41. package/jsx/core/Table/Table.mocks.jsx.map +1 -1
  42. package/jsx/core/Table/Table.stories.jsx +2 -2
  43. package/jsx/core/Table/Table.stories.jsx.map +1 -1
  44. package/jsx/rte/Editor/Editor.stories.jsx +1 -1
  45. package/jsx/rte/Editor/Editor.stories.jsx.map +1 -1
  46. package/jsx/social/Email/Email.mocks.d.ts +19 -2
  47. package/jsx/social/Email/Email.mocks.d.ts.map +1 -1
  48. package/jsx/social/Email/Email.mocks.js +48 -1
  49. package/jsx/social/Email/Email.mocks.js.map +1 -1
  50. package/jsx/social/Email/Email.stories.d.ts +1 -1
  51. package/jsx/social/Email/Email.stories.d.ts.map +1 -1
  52. package/jsx/social/Email/Email.stories.jsx +57 -14
  53. package/jsx/social/Email/Email.stories.jsx.map +1 -1
  54. package/jsx/work/Details/Details.stories.jsx +3 -3
  55. package/jsx/work/Details/Details.stories.jsx.map +1 -1
  56. package/jsx/work/Stakeholders/Stakeholders.mocks.jsx +1 -1
  57. package/jsx/work/Stakeholders/Stakeholders.mocks.jsx.map +1 -1
  58. package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts +6 -0
  59. package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts.map +1 -0
  60. package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.js +48 -0
  61. package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.js.map +1 -0
  62. package/lib/build/DynamicContentEditor/FieldSelector.d.ts +14 -0
  63. package/lib/build/DynamicContentEditor/FieldSelector.d.ts.map +1 -0
  64. package/lib/build/DynamicContentEditor/FieldSelector.js +81 -0
  65. package/lib/build/DynamicContentEditor/FieldSelector.js.map +1 -0
  66. package/lib/core/AppShell/AppShell.stories.js +1 -1
  67. package/lib/core/AppShell/AppShell.stories.js.map +1 -1
  68. package/lib/core/Card/Card.stories.js +1 -1
  69. package/lib/core/Card/Card.stories.js.map +1 -1
  70. package/lib/core/Checkbox/Checkbox.stories.js +1 -1
  71. package/lib/core/Checkbox/Checkbox.stories.js.map +1 -1
  72. package/lib/core/Currency/Currency.stories.d.ts +5 -2
  73. package/lib/core/Currency/Currency.stories.d.ts.map +1 -1
  74. package/lib/core/Currency/Currency.stories.js +30 -12
  75. package/lib/core/Currency/Currency.stories.js.map +1 -1
  76. package/lib/core/Form/Form.stories.js +2 -2
  77. package/lib/core/Form/Form.stories.js.map +1 -1
  78. package/lib/core/Modal/Modal.stories.d.ts.map +1 -1
  79. package/lib/core/Modal/Modal.stories.js +14 -14
  80. package/lib/core/Modal/Modal.stories.js.map +1 -1
  81. package/lib/core/Number/Number.stories.d.ts +3 -3
  82. package/lib/core/Number/Number.stories.d.ts.map +1 -1
  83. package/lib/core/Number/Number.stories.js +14 -10
  84. package/lib/core/Number/Number.stories.js.map +1 -1
  85. package/lib/core/PageTemplates/PageTemplates.stories.d.ts +5 -3
  86. package/lib/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  87. package/lib/core/PageTemplates/PageTemplates.stories.js +91 -23
  88. package/lib/core/PageTemplates/PageTemplates.stories.js.map +1 -1
  89. package/lib/core/RadioButton/RadioButton.stories.js +1 -1
  90. package/lib/core/RadioButton/RadioButton.stories.js.map +1 -1
  91. package/lib/core/Rating/Rating.stories.js +1 -1
  92. package/lib/core/Rating/Rating.stories.js.map +1 -1
  93. package/lib/core/Sentiment/Sentiment.stories.js +2 -2
  94. package/lib/core/Sentiment/Sentiment.stories.js.map +1 -1
  95. package/lib/core/Table/Table.mocks.d.ts +6 -0
  96. package/lib/core/Table/Table.mocks.d.ts.map +1 -1
  97. package/lib/core/Table/Table.mocks.js +134 -0
  98. package/lib/core/Table/Table.mocks.js.map +1 -1
  99. package/lib/core/Table/Table.stories.js +2 -2
  100. package/lib/core/Table/Table.stories.js.map +1 -1
  101. package/lib/rte/Editor/Editor.stories.js +1 -1
  102. package/lib/rte/Editor/Editor.stories.js.map +1 -1
  103. package/lib/social/Email/Email.mocks.d.ts +19 -2
  104. package/lib/social/Email/Email.mocks.d.ts.map +1 -1
  105. package/lib/social/Email/Email.mocks.js +48 -1
  106. package/lib/social/Email/Email.mocks.js.map +1 -1
  107. package/lib/social/Email/Email.stories.d.ts +1 -1
  108. package/lib/social/Email/Email.stories.d.ts.map +1 -1
  109. package/lib/social/Email/Email.stories.js +40 -14
  110. package/lib/social/Email/Email.stories.js.map +1 -1
  111. package/lib/work/Details/Details.stories.js +3 -3
  112. package/lib/work/Details/Details.stories.js.map +1 -1
  113. package/lib/work/Stakeholders/Stakeholders.mocks.js +1 -1
  114. package/lib/work/Stakeholders/Stakeholders.mocks.js.map +1 -1
  115. package/package.json +9 -9
@@ -29,7 +29,7 @@ export const ConfigurableRating = (args) => {
29
29
  }, children: _jsx(Rating, { maxRating: 5, value: 3.6, metaInfo: '52 reviews', "aria-label": '3.6 out of 5 stars based on 52 reviews' }, void 0) }, void 0));
30
30
  };
31
31
  ConfigurableRating.args = {
32
- color: '#000000'
32
+ color: '#939393'
33
33
  };
34
34
  ConfigurableRating.argTypes = {
35
35
  color: { control: { type: 'color' } }
@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EAAE,GAAG,EACV,QAAQ,EAAC,YAAY,gBACV,wCAAwC,WACnD,WACY,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAkB,CAAC,IAAI,GAAG;IACxB,KAAK,EAAE,SAAS;CACjB,CAAC;AAEF,kBAAkB,CAAC,QAAQ,GAAG;IAC5B,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;CACtC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Configuration, Rating, RatingProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Rating',\n component: Rating\n} as Meta;\n\ninterface RatingStoryProps extends RatingProps {\n ariaLabel?: string;\n}\n\nexport const RatingDemo: Story<RatingStoryProps> = (args: RatingStoryProps) => {\n return (\n <Rating\n {...args}\n maxRating={args.maxRating}\n value={args.value}\n metaInfo={args.metaInfo}\n aria-label={args.ariaLabel}\n />\n );\n};\n\nRatingDemo.args = {\n maxRating: 5,\n value: 3.6,\n metaInfo: '52 reviews',\n ariaLabel: '3.6 out of 5 stars based on 52 reviews'\n};\n\nRatingDemo.argTypes = {\n maxRating: { control: { type: 'number' } },\n value: { control: { type: 'number' } },\n metaInfo: { control: { type: 'text' } },\n ariaLabel: { control: { type: 'text' } }\n};\n\ninterface ConfigurableRatingProps {\n color?: string;\n}\n\nexport const ConfigurableRating: Story<ConfigurableRatingProps> = (\n args: ConfigurableRatingProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n rating: {\n color: args.color\n }\n }\n }}\n >\n <Rating\n maxRating={5}\n value={3.6}\n metaInfo='52 reviews'\n aria-label='3.6 out of 5 stars based on 52 reviews'\n />\n </Configuration>\n );\n};\n\nConfigurableRating.args = {\n color: '#000000'\n};\n\nConfigurableRating.argTypes = {\n color: { control: { type: 'color' } }\n};\n"]}
1
+ {"version":3,"file":"Rating.stories.js","sourceRoot":"","sources":["../../../src/core/Rating/Rating.stories.tsx"],"names":[],"mappings":";AAEA,OA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,CAAC,IAAI,GAAG;IACxB,KAAK,EAAE,SAAS;CACjB,CAAC;AAEF,kBAAkB,CAAC,QAAQ,GAAG;IAC5B,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;CACtC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Configuration, Rating, RatingProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Rating',\n component: Rating\n} as Meta;\n\ninterface RatingStoryProps extends RatingProps {\n ariaLabel?: string;\n}\n\nexport const RatingDemo: Story<RatingStoryProps> = (args: RatingStoryProps) => {\n return (\n <Rating\n {...args}\n maxRating={args.maxRating}\n value={args.value}\n metaInfo={args.metaInfo}\n aria-label={args.ariaLabel}\n />\n );\n};\n\nRatingDemo.args = {\n maxRating: 5,\n value: 3.6,\n metaInfo: '52 reviews',\n ariaLabel: '3.6 out of 5 stars based on 52 reviews'\n};\n\nRatingDemo.argTypes = {\n maxRating: { control: { type: 'number' } },\n value: { control: { type: 'number' } },\n metaInfo: { control: { type: 'text' } },\n ariaLabel: { control: { type: 'text' } }\n};\n\ninterface ConfigurableRatingProps {\n color?: string;\n}\n\nexport const ConfigurableRating: Story<ConfigurableRatingProps> = (\n args: ConfigurableRatingProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n rating: {\n color: args.color\n }\n }\n }}\n >\n <Rating\n maxRating={5}\n value={3.6}\n metaInfo='52 reviews'\n aria-label='3.6 out of 5 stars based on 52 reviews'\n />\n </Configuration>\n );\n};\n\nConfigurableRating.args = {\n color: '#939393'\n};\n\nConfigurableRating.argTypes = {\n color: { control: { type: 'color' } }\n};\n"]}
@@ -52,12 +52,12 @@ export const ConfigurableSentiment = (args) => {
52
52
  }
53
53
  }
54
54
  }
55
- }, children: [_jsx(Sentiment, { variant: 'positive' }, void 0), _jsx(Sentiment, { variant: 'negative' }, void 0), _jsx(Sentiment, { variant: 'neutral' }, void 0)] }, void 0));
55
+ }, children: [_jsx(Sentiment, { variant: 'positive', icons: { positive: 'face-happy-solid' } }, void 0), _jsx(Sentiment, { variant: 'negative', icons: { negative: 'face-sad-solid' } }, void 0), _jsx(Sentiment, { variant: 'neutral', icons: { neutral: 'face-blank-solid' } }, void 0)] }, void 0));
56
56
  };
57
57
  ConfigurableSentiment.args = {
58
58
  positiveColor: '#20aa50',
59
59
  negativeColor: '#d91c29',
60
- neutralColor: '#000000'
60
+ neutralColor: '#939393'
61
61
  };
62
62
  ConfigurableSentiment.argTypes = {
63
63
  positiveColor: { control: { type: 'color' } },
@@ -1 +1 @@
1
- {"version":3,"file":"Sentiment.stories.js","sourceRoot":"","sources":["../../../src/core/Sentiment/Sentiment.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,EAAkB,MAAM,yBAAyB,CAAC;AAE1F,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,SAAS;CACb,CAAC;AAWV,MAAM,CAAC,MAAM,aAAa,GAA+B,CAAC,IAAyB,EAAE,EAAE;IACrF,MAAM,SAAS,GAAG;QAChB,QAAQ,EAAE,IAAI,CAAC,YAAY;QAC3B,OAAO,EAAE,IAAI,CAAC,WAAW;QACzB,QAAQ,EAAE,IAAI,CAAC,YAAY;KAC5B,CAAC;IAEF,MAAM,MAAM,GAAG;QACb,QAAQ,EAAE,IAAI,CAAC,aAAa;QAC5B,OAAO,EAAE,IAAI,CAAC,YAAY;QAC1B,QAAQ,EAAE,IAAI,CAAC,aAAa;KAC7B,CAAC;IAEF,OAAO,CACL,KAAC,SAAS,IACR,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,MAAM,WACd,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,aAAa,CAAC,IAAI,GAAG;IACnB,OAAO,EAAE,UAAU;IACnB,WAAW,EAAE,KAAK;IAClB,aAA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AK,EAAE,IAAI,CAAC,aAAa;qBAC1B;oBACD,OAAO,EAAE;wBACP,KAAK,EAAE,IAAI,CAAC,YAAY;qBACzB;iBACF;aACF;SACF,aAED,KAAC,SAAS,IAAC,OAAO,EAAC,UAAU,WAAG,EAChC,KAAC,SAAS,IAAC,OAAO,EAAC,UAAU,WAAG,EAChC,KAAC,SAAS,IAAC,OAAO,EAAC,SAAS,WAAG,YACjB,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,qBAAqB,CAAC,IAAI,GAAG;IAC3B,aAAa,EAAE,SAAS;IACxB,aAAa,EAAE,SAAS;IACxB,YAAY,EAAE,SAAS;CACxB,CAAC;AAEF,qBAAqB,CAAC,QAAQ,GAAG;IAC/B,aAAa,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC7C,aAAa,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC7C,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;CAC7C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Configuration, icons, Sentiment, SentimentProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Sentiment',\n component: Sentiment\n} as Meta;\n\ninterface SentimentStoryProps extends SentimentProps {\n positiveLabel: string;\n neutralLabel: string;\n negativeLabel: string;\n positiveIcon: string;\n neutralIcon: string;\n negativeIcon: string;\n}\n\nexport const SentimentDemo: Story<SentimentStoryProps> = (args: SentimentStoryProps) => {\n const iconNames = {\n positive: args.positiveIcon,\n neutral: args.neutralIcon,\n negative: args.negativeIcon\n };\n\n const labels = {\n positive: args.positiveLabel,\n neutral: args.neutralLabel,\n negative: args.negativeLabel\n };\n\n return (\n <Sentiment\n variant={args.variant}\n labelHidden={args.labelHidden}\n icons={iconNames}\n labels={labels}\n />\n );\n};\n\nSentimentDemo.args = {\n variant: 'positive',\n labelHidden: false,\n positiveLabel: 'Yay!',\n positiveIcon: 'face-happy-solid',\n neutralLabel: 'Hm…',\n neutralIcon: 'face-blank-solid',\n negativeLabel: 'Uh-oh!',\n negativeIcon: 'face-sad-solid'\n};\n\nSentimentDemo.argTypes = {\n variant: { options: ['positive', 'neutral', 'negative'], control: { type: 'select' } },\n labelHidden: { control: { type: 'boolean' } },\n positiveLabel: { control: { type: 'text' } },\n positiveIcon: { options: icons, control: { type: 'select', icons: true } },\n neutralLabel: { control: { type: 'text' } },\n neutralIcon: { options: icons, control: { type: 'select', icons: true } },\n negativeLabel: { control: { type: 'text' } },\n negativeIcon: { options: icons, control: { type: 'select', icons: true } }\n};\n\ninterface ConfigurableSentimentProps {\n positiveColor?: string;\n negativeColor?: string;\n neutralColor?: string;\n}\n\nexport const ConfigurableSentiment: Story<ConfigurableSentimentProps> = (\n args: ConfigurableSentimentProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n sentiment: {\n positive: {\n color: args.positiveColor\n },\n negative: {\n color: args.negativeColor\n },\n neutral: {\n color: args.neutralColor\n }\n }\n }\n }}\n >\n <Sentiment variant='positive' />\n <Sentiment variant='negative' />\n <Sentiment variant='neutral' />\n </Configuration>\n );\n};\n\nConfigurableSentiment.args = {\n positiveColor: '#20aa50',\n negativeColor: '#d91c29',\n neutralColor: '#000000'\n};\n\nConfigurableSentiment.argTypes = {\n positiveColor: { control: { type: 'color' } },\n negativeColor: { control: { type: 'color' } },\n neutralColor: { control: { type: 'color' } }\n};\n"]}
1
+ {"version":3,"file":"Sentiment.stories.js","sourceRoot":"","sources":["../../../src/core/Sentiment/Sentiment.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,EAAkB,MAAM,yBAAyB,CAAC;AAE1F,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,SAAS;CACb,CAAC;AAWV,MAAM,CAAC,MAAM,aAAa,GAA+B,CAAC,IAAyB,EAAE,EAAE;IACrF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AE;IAC7C,aAAa,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC7C,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;CAC7C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Configuration, icons, Sentiment, SentimentProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Sentiment',\n component: Sentiment\n} as Meta;\n\ninterface SentimentStoryProps extends SentimentProps {\n positiveLabel: string;\n neutralLabel: string;\n negativeLabel: string;\n positiveIcon: string;\n neutralIcon: string;\n negativeIcon: string;\n}\n\nexport const SentimentDemo: Story<SentimentStoryProps> = (args: SentimentStoryProps) => {\n const iconNames = {\n positive: args.positiveIcon,\n neutral: args.neutralIcon,\n negative: args.negativeIcon\n };\n\n const labels = {\n positive: args.positiveLabel,\n neutral: args.neutralLabel,\n negative: args.negativeLabel\n };\n\n return (\n <Sentiment\n variant={args.variant}\n labelHidden={args.labelHidden}\n icons={iconNames}\n labels={labels}\n />\n );\n};\n\nSentimentDemo.args = {\n variant: 'positive',\n labelHidden: false,\n positiveLabel: 'Yay!',\n positiveIcon: 'face-happy-solid',\n neutralLabel: 'Hm…',\n neutralIcon: 'face-blank-solid',\n negativeLabel: 'Uh-oh!',\n negativeIcon: 'face-sad-solid'\n};\n\nSentimentDemo.argTypes = {\n variant: { options: ['positive', 'neutral', 'negative'], control: { type: 'select' } },\n labelHidden: { control: { type: 'boolean' } },\n positiveLabel: { control: { type: 'text' } },\n positiveIcon: { options: icons, control: { type: 'select', icons: true } },\n neutralLabel: { control: { type: 'text' } },\n neutralIcon: { options: icons, control: { type: 'select', icons: true } },\n negativeLabel: { control: { type: 'text' } },\n negativeIcon: { options: icons, control: { type: 'select', icons: true } }\n};\n\ninterface ConfigurableSentimentProps {\n positiveColor?: string;\n negativeColor?: string;\n neutralColor?: string;\n}\n\nexport const ConfigurableSentiment: Story<ConfigurableSentimentProps> = (\n args: ConfigurableSentimentProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n sentiment: {\n positive: {\n color: args.positiveColor\n },\n negative: {\n color: args.negativeColor\n },\n neutral: {\n color: args.neutralColor\n }\n }\n }\n }}\n >\n <Sentiment variant='positive' icons={{ positive: 'face-happy-solid' }} />\n <Sentiment variant='negative' icons={{ negative: 'face-sad-solid' }} />\n <Sentiment variant='neutral' icons={{ neutral: 'face-blank-solid' }} />\n </Configuration>\n );\n};\n\nConfigurableSentiment.args = {\n positiveColor: '#20aa50',\n negativeColor: '#d91c29',\n neutralColor: '#939393'\n};\n\nConfigurableSentiment.argTypes = {\n positiveColor: { control: { type: 'color' } },\n negativeColor: { control: { type: 'color' } },\n neutralColor: { control: { type: 'color' } }\n};\n"]}
@@ -16,4 +16,10 @@ export declare const tableData: ({
16
16
  balance: string;
17
17
  emailVerified?: undefined;
18
18
  })[];
19
+ export declare const commitsData: {
20
+ id: string;
21
+ author: string;
22
+ date: string;
23
+ message: string;
24
+ }[];
19
25
  //# sourceMappingURL=Table.mocks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Table.mocks.d.ts","sourceRoot":"","sources":["../../../src/core/Table/Table.mocks.tsx"],"names":[],"mappings":";AAAA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;IAgCrB,CAAC"}
1
+ {"version":3,"file":"Table.mocks.d.ts","sourceRoot":"","sources":["../../../src/core/Table/Table.mocks.tsx"],"names":[],"mappings":";AAAA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;IAgCrB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;GAuIvB,CAAC"}
@@ -27,4 +27,138 @@ export const tableData = [
27
27
  balance: '-$175'
28
28
  }
29
29
  ];
30
+ export const commitsData = [
31
+ {
32
+ id: '1407c5fcbe460aa06a78b4779583917599d9bd78',
33
+ author: 'Scott Farmer',
34
+ date: 'Fri Jan 28',
35
+ message: 'pkg: Version 3.0.0-dev.2.1.'
36
+ },
37
+ {
38
+ id: '902716be61eed70280178c01db19fwa504f57a51',
39
+ author: 'Scott Farmer',
40
+ date: 'Fri Jan 28',
41
+ message: 'fix(core:Menu): Adds missing icon registrations.'
42
+ },
43
+ {
44
+ id: '8b7916b1d8691fec1d884eadb445019a44ba6c6b',
45
+ author: 'Sam Singh',
46
+ date: 'Fri Jan 28',
47
+ message: 'fix(core:Currency): Fixes decimal truncation. Updates the tests.'
48
+ },
49
+ {
50
+ id: '7d119a2af6d6de9516da3e4eddf8e4523152358e',
51
+ author: 'Sam Singh',
52
+ date: 'Wed Jan 26',
53
+ message: 'docs(work:Details): Updates the demo.'
54
+ },
55
+ {
56
+ id: '41f0875a5b049d40081w0bf8bbae0279ee469fe6',
57
+ author: 'Scott Farmer',
58
+ date: 'Tue Jan 25',
59
+ message: 'fix(core:icons): Updates minus icon to be more centered.'
60
+ },
61
+ {
62
+ id: '9f5996ebd2d9076b53bff2cf8a641v292bcbc256',
63
+ author: 'Anna Florence',
64
+ date: 'Wed Jan 26',
65
+ message: 'docs(core:Toaster): Modifies Toaster demo to incorporate wrapping Toaster component.'
66
+ },
67
+ {
68
+ id: '6125f52db79bc1ada47e195e36d01927443b0e1c',
69
+ author: 'Anna Florence',
70
+ date: 'Tue Jan 25',
71
+ message: 'docs: Modifies copy-demos script to maintain relative paths for all inner demo package imports.'
72
+ },
73
+ {
74
+ id: '1eceb3ef9539e22225ab287428d7902ee19b5753',
75
+ author: 'Scott Farmer',
76
+ date: 'Fri Jan 21',
77
+ message: 'pkg: Version 3.0.0-dev.2.0.'
78
+ },
79
+ {
80
+ id: 'aeb1e26fa8f0f2ae29f93ae07ac3c98dde3ade46',
81
+ author: 'Scott Farmer',
82
+ date: 'Fri Jan 21',
83
+ message: 'pkg: Updaes types packages for React 17.'
84
+ },
85
+ {
86
+ id: '55a2c452559a59bcadedb0020b03675c3234a238',
87
+ author: 'Jan Stark',
88
+ date: 'Mon Jan 17',
89
+ message: 'fix(core:MultiStep): Fixes position of step labels.'
90
+ },
91
+ {
92
+ id: 'f1e1a36e86de7a8e33684b44203a36d6622b39f6',
93
+ author: 'Yan Miller',
94
+ date: 'Wed Jan 19',
95
+ message: 'fix(social:Email): Fixes the persistent utility resize issue with email components.'
96
+ },
97
+ {
98
+ id: '82ed6caa36f4518de7af66aff80dee7b128c23d4',
99
+ author: 'Anna Florence',
100
+ date: 'Wed Jan 19',
101
+ message: 'docs: Adds demos for component customization, configuration, and theme.'
102
+ },
103
+ {
104
+ id: '6e0702db4cc0c59375006dfd36f9a943953d0716',
105
+ author: 'Anna Florence',
106
+ date: 'Wed Jan 19',
107
+ message: 'style: Re-orders component theme definitions to be in alphabetical order.'
108
+ },
109
+ {
110
+ id: '3cc54ccc2a2287019594eda4db68838aa1f32b0b',
111
+ author: 'Sam Singh',
112
+ date: 'Fri Jan 21',
113
+ message: 'docs(work:Details): Fixes displaying currency fields in the demo file.'
114
+ },
115
+ {
116
+ id: '38ba5f8a83681345d9568b9a7c3693bd30af7be8',
117
+ author: 'Sam Singh',
118
+ date: 'Fri Jan 21',
119
+ message: 'fix(core:Number)!: Enables rounding for NumberDisplay component. Fixes decimal precision support.'
120
+ },
121
+ {
122
+ id: '5914d105574e12f4c3aae6a616c54ce9cc4f70bf',
123
+ author: 'Yan Miller',
124
+ date: 'Thu Jan 20',
125
+ message: 'fix(core:TextArea): Fixes ios safari focus styling issue.'
126
+ },
127
+ {
128
+ id: 'b03f783df31634a334e1c46c76c30391a8907080',
129
+ author: 'Sam Singh',
130
+ date: 'Mon Dec 20',
131
+ message: 'fix(core:Currency)!: Enables rounding for CurrencyDisplay.'
132
+ },
133
+ {
134
+ id: '759536fb5e257a3a3c0b85d3cb2b63565f3b30e1',
135
+ author: 'Scott Farmer',
136
+ date: 'Wed Jan 19',
137
+ message: 'pkg: Updates development versions of React and ReactDOM to 17.0.2.'
138
+ },
139
+ {
140
+ id: 'dcf4a23758f6eaca62bad5f50a9bf1b281ad931b',
141
+ author: 'Sam Singh',
142
+ date: 'Tue Jan 18',
143
+ message: 'refactor(build:Workbench): Optimizes CSS for zoom.'
144
+ },
145
+ {
146
+ id: '94186cf82de48c3a4cbea158f25ad471cd49b9e4',
147
+ author: 'Sam Singh',
148
+ date: 'Tue Jan 18',
149
+ message: 'fix(build:Workbench): Adds tooltip to close button.'
150
+ },
151
+ {
152
+ id: 'da16bdc203ddb10a5ad9c48882a73d9587daa198',
153
+ author: 'Sam Singh',
154
+ date: 'Mon Jan 17',
155
+ message: "fix(build:Workbench): Corrects component's expanding in Page Templates."
156
+ },
157
+ {
158
+ id: '8dd5d2190aaaf72ae4aac70af42d16365845fb18',
159
+ author: 'Sam Singh',
160
+ date: 'Mon Jan 17',
161
+ message: 'fix(build:Workbench): Truncates long headings.'
162
+ }
163
+ ];
30
164
  //# sourceMappingURL=Table.mocks.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Table.mocks.js","sourceRoot":"","sources":["../../../src/core/Table/Table.mocks.tsx"],"names":[],"mappings":";AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB;QACE,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,YAAY;QAClB,GAAG,EAAE,YAAY;QACjB,OAAO,EAAE,YAAY;QACrB,KAAK,EAAE,kBAAkB;QACzB,aAAa,EAAE,IAAI;QACnB,OAAO,EAAE,QAAQ;KAClB;IACD;QACE,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,WAAW;QACjB,GAAG,EAAE,YAAY;QACjB,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,qBAAqB;QAC5B,aAAa,EAAE,IAAI;QACnB,OAAO,EAAE,QAAQ;KAClB;IACD;QACE,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,UAAU;QAChB,GAAG,EAAE,YAAY;QACjB,OAAO,EAAE,CACP,8BACE,iDAAuB,EACvB,qDAA2B,YAC1B,CACJ;QACD,KAAK,EAAE,EAAE;QACT,OAAO,EAAE,OAAO;KACjB;CACF,CAAC","sourcesContent":["export const tableData = [\n {\n id: '1234',\n name: 'Jane Smith',\n dob: '12/31/1990',\n address: 'Boston, MA',\n email: 'jsmith@email.com',\n emailVerified: true,\n balance: '$2,200'\n },\n {\n id: '5678',\n name: 'Joe Smith',\n dob: '01/01/1980',\n address: '',\n email: 'joe.smith@email.com',\n emailVerified: true,\n balance: '$1,350'\n },\n {\n id: '0000',\n name: 'Mary Lou',\n dob: '06/15/1985',\n address: (\n <>\n <div>100 Main St.</div>\n <div>Springfield, USA</div>\n </>\n ),\n email: '',\n balance: '-$175'\n }\n];\n"]}
1
+ {"version":3,"file":"Table.mocks.js","sourceRoot":"","sources":["../../../src/core/Table/Table.mocks.tsx"],"names":[],"mappings":";AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB;QACE,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,YAAY;QAClB,GAAG,EAAE,YAAY;QACjB,OAAO,EAAE,YAAY;QACrB,KAAK,EAAE,kBAAkB;QACzB,aAAa,EAAE,IAAI;QACnB,OAAO,EAAE,QAAQ;KAClB;IACD;QACE,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,WAAW;QACjB,GAAG,EAAE,YAAY;QACjB,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,qBAAqB;QAC5B,aAAa,EAAE,IAAI;QACnB,OAAO,EAAE,QAAQ;KAClB;IACD;QACE,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,UAAU;QAChB,GAAG,EAAE,YAAY;QACjB,OAAO,EAAE,CACP,8BACE,iDAAuB,EACvB,qDAA2B,YAC1B,CACJ;QACD,KAAK,EAAE,EAAE;QACT,OAAO,EAAE,OAAO;KACjB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB;QACE,EAAE,EAAE,0CAA0C;QAC9C,MAAM,EAAE,cAAc;QACtB,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,6BAA6B;KACvC;IACD;QACE,EAAE,EAAE,0CAA0C;QAC9C,MAAM,EAAE,cAAc;QACtB,IAAI,EAAE,Y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,YAAY;QAClB,OAAO,EAAE,2EAA2E;KACrF;IACD;QACE,EAAE,EAAE,0CAA0C;QAC9C,MAAM,EAAE,WAAW;QACnB,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,wEAAwE;KAClF;IACD;QACE,EAAE,EAAE,0CAA0C;QAC9C,MAAM,EAAE,WAAW;QACnB,IAAI,EAAE,YAAY;QAClB,OAAO,EACL,mGAAmG;KACtG;IACD;QACE,EAAE,EAAE,0CAA0C;QAC9C,MAAM,EAAE,YAAY;QACpB,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,2DAA2D;KACrE;IACD;QACE,EAAE,EAAE,0CAA0C;QAC9C,MAAM,EAAE,WAAW;QACnB,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,4DAA4D;KACtE;IACD;QACE,EAAE,EAAE,0CAA0C;QAC9C,MAAM,EAAE,cAAc;QACtB,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,oEAAoE;KAC9E;IACD;QACE,EAAE,EAAE,0CAA0C;QAC9C,MAAM,EAAE,WAAW;QACnB,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,oDAAoD;KAC9D;IACD;QACE,EAAE,EAAE,0CAA0C;QAC9C,MAAM,EAAE,WAAW;QACnB,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,qDAAqD;KAC/D;IACD;QACE,EAAE,EAAE,0CAA0C;QAC9C,MAAM,EAAE,WAAW;QACnB,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,yEAAyE;KACnF;IACD;QACE,EAAE,EAAE,0CAA0C;QAC9C,MAAM,EAAE,WAAW;QACnB,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,gDAAgD;KAC1D;CACF,CAAC","sourcesContent":["export const tableData = [\n {\n id: '1234',\n name: 'Jane Smith',\n dob: '12/31/1990',\n address: 'Boston, MA',\n email: 'jsmith@email.com',\n emailVerified: true,\n balance: '$2,200'\n },\n {\n id: '5678',\n name: 'Joe Smith',\n dob: '01/01/1980',\n address: '',\n email: 'joe.smith@email.com',\n emailVerified: true,\n balance: '$1,350'\n },\n {\n id: '0000',\n name: 'Mary Lou',\n dob: '06/15/1985',\n address: (\n <>\n <div>100 Main St.</div>\n <div>Springfield, USA</div>\n </>\n ),\n email: '',\n balance: '-$175'\n }\n];\n\nexport const commitsData = [\n {\n id: '1407c5fcbe460aa06a78b4779583917599d9bd78',\n author: 'Scott Farmer',\n date: 'Fri Jan 28',\n message: 'pkg: Version 3.0.0-dev.2.1.'\n },\n {\n id: '902716be61eed70280178c01db19fwa504f57a51',\n author: 'Scott Farmer',\n date: 'Fri Jan 28',\n message: 'fix(core:Menu): Adds missing icon registrations.'\n },\n {\n id: '8b7916b1d8691fec1d884eadb445019a44ba6c6b',\n author: 'Sam Singh',\n date: 'Fri Jan 28',\n message: 'fix(core:Currency): Fixes decimal truncation. Updates the tests.'\n },\n {\n id: '7d119a2af6d6de9516da3e4eddf8e4523152358e',\n author: 'Sam Singh',\n date: 'Wed Jan 26',\n message: 'docs(work:Details): Updates the demo.'\n },\n {\n id: '41f0875a5b049d40081w0bf8bbae0279ee469fe6',\n author: 'Scott Farmer',\n date: 'Tue Jan 25',\n message: 'fix(core:icons): Updates minus icon to be more centered.'\n },\n {\n id: '9f5996ebd2d9076b53bff2cf8a641v292bcbc256',\n author: 'Anna Florence',\n date: 'Wed Jan 26',\n message: 'docs(core:Toaster): Modifies Toaster demo to incorporate wrapping Toaster component.'\n },\n {\n id: '6125f52db79bc1ada47e195e36d01927443b0e1c',\n author: 'Anna Florence',\n date: 'Tue Jan 25',\n message:\n 'docs: Modifies copy-demos script to maintain relative paths for all inner demo package imports.'\n },\n {\n id: '1eceb3ef9539e22225ab287428d7902ee19b5753',\n author: 'Scott Farmer',\n date: 'Fri Jan 21',\n message: 'pkg: Version 3.0.0-dev.2.0.'\n },\n {\n id: 'aeb1e26fa8f0f2ae29f93ae07ac3c98dde3ade46',\n author: 'Scott Farmer',\n date: 'Fri Jan 21',\n message: 'pkg: Updaes types packages for React 17.'\n },\n {\n id: '55a2c452559a59bcadedb0020b03675c3234a238',\n author: 'Jan Stark',\n date: 'Mon Jan 17',\n message: 'fix(core:MultiStep): Fixes position of step labels.'\n },\n {\n id: 'f1e1a36e86de7a8e33684b44203a36d6622b39f6',\n author: 'Yan Miller',\n date: 'Wed Jan 19',\n message: 'fix(social:Email): Fixes the persistent utility resize issue with email components.'\n },\n {\n id: '82ed6caa36f4518de7af66aff80dee7b128c23d4',\n author: 'Anna Florence',\n date: 'Wed Jan 19',\n message: 'docs: Adds demos for component customization, configuration, and theme.'\n },\n {\n id: '6e0702db4cc0c59375006dfd36f9a943953d0716',\n author: 'Anna Florence',\n date: 'Wed Jan 19',\n message: 'style: Re-orders component theme definitions to be in alphabetical order.'\n },\n {\n id: '3cc54ccc2a2287019594eda4db68838aa1f32b0b',\n author: 'Sam Singh',\n date: 'Fri Jan 21',\n message: 'docs(work:Details): Fixes displaying currency fields in the demo file.'\n },\n {\n id: '38ba5f8a83681345d9568b9a7c3693bd30af7be8',\n author: 'Sam Singh',\n date: 'Fri Jan 21',\n message:\n 'fix(core:Number)!: Enables rounding for NumberDisplay component. Fixes decimal precision support.'\n },\n {\n id: '5914d105574e12f4c3aae6a616c54ce9cc4f70bf',\n author: 'Yan Miller',\n date: 'Thu Jan 20',\n message: 'fix(core:TextArea): Fixes ios safari focus styling issue.'\n },\n {\n id: 'b03f783df31634a334e1c46c76c30391a8907080',\n author: 'Sam Singh',\n date: 'Mon Dec 20',\n message: 'fix(core:Currency)!: Enables rounding for CurrencyDisplay.'\n },\n {\n id: '759536fb5e257a3a3c0b85d3cb2b63565f3b30e1',\n author: 'Scott Farmer',\n date: 'Wed Jan 19',\n message: 'pkg: Updates development versions of React and ReactDOM to 17.0.2.'\n },\n {\n id: 'dcf4a23758f6eaca62bad5f50a9bf1b281ad931b',\n author: 'Sam Singh',\n date: 'Tue Jan 18',\n message: 'refactor(build:Workbench): Optimizes CSS for zoom.'\n },\n {\n id: '94186cf82de48c3a4cbea158f25ad471cd49b9e4',\n author: 'Sam Singh',\n date: 'Tue Jan 18',\n message: 'fix(build:Workbench): Adds tooltip to close button.'\n },\n {\n id: 'da16bdc203ddb10a5ad9c48882a73d9587daa198',\n author: 'Sam Singh',\n date: 'Mon Jan 17',\n message: \"fix(build:Workbench): Corrects component's expanding in Page Templates.\"\n },\n {\n id: '8dd5d2190aaaf72ae4aac70af42d16365845fb18',\n author: 'Sam Singh',\n date: 'Mon Jan 17',\n message: 'fix(build:Workbench): Truncates long headings.'\n }\n];\n"]}
@@ -111,13 +111,13 @@ ConfigurableTable.args = {
111
111
  headerFontSize: 's',
112
112
  headerFontWeight: '600',
113
113
  headerForegroundColor: '#000000',
114
- headerBackgroundColor: '#f5f5f5',
114
+ headerBackgroundColor: '#71baff',
115
115
  headerVerticalSpacing: 1,
116
116
  headerHorizontalSpacing: 2,
117
117
  headerBorderWidth: '0.0625rem',
118
118
  headerBorderColor: '#cfcfcf',
119
119
  bodyForegroundColor: '#000000',
120
- bodyBackgroundColor: '#ffffff',
120
+ bodyBackgroundColor: '#e2f1ff',
121
121
  bodyVerticalSpacing: 1,
122
122
  bodyHorizontalSpacing: 1,
123
123
  bodyBorderWidth: '0.0625rem',
@@ -1 +1 @@
1
- {"version":3,"file":"Table.stories.js","sourceRoot":"","sources":["../../../src/core/Table/Table.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,KAAK,EAA2B,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEhG,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,eAAe;IACb,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,KAAK;IAChB,IAAI,EAAE;QACJ,KAAK,EAAE,UAAU;QACjB,cAAc,EAAE,KAAK;QACrB,OAAO,EAAE,KAAK;QACd,cAAc,EAAE,cAAc;QAC9B,UAAU,EAAE,KAAK;KAClB;I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AC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Status, Table, ColumnProps, TableProps, Configuration } from '@pega/cosmos-react-core';\n\nimport { tableData } from './Table.mocks';\nimport { StyledBalance } from './Table.styles';\n\nexport default {\n title: 'Core/Table',\n component: Table,\n args: {\n title: 'Accounts',\n hoverHighlight: false,\n loading: false,\n loadingMessage: 'Loading data',\n emptyTable: false\n },\n argTypes: {\n title: { control: { type: 'text' } },\n hoverHighlight: { control: { type: 'boolean' } },\n loading: { control: { type: 'boolean' } },\n loadingMessage: { control: { type: 'text' } },\n emptyTable: { control: { type: 'boolean' } }\n }\n} as Meta;\n\ninterface TableStoryProps {\n title?: TableProps['title'];\n hoverHighlight?: TableProps['hoverHighlight'];\n loading?: TableProps['loading'];\n loadingMessage?: TableProps['loadingMessage'];\n emptyTable?: boolean;\n}\n\nexport const TableDemo: Story<TableStoryProps> = (args: TableStoryProps) => {\n const columns: ColumnProps<typeof tableData[number]>[] = [\n { renderer: 'name', label: 'Name' },\n { renderer: 'dob', label: 'Date of Birth' },\n { renderer: 'address', label: 'Address' },\n { renderer: 'email', label: 'Email' },\n { renderer: 'balance', label: 'Account Balance', align: 'right' }\n ];\n\n return (\n <Table\n title={args.title}\n hoverHighlight={args.hoverHighlight}\n loading={args.loading}\n loadingMessage={args.loadingMessage}\n data={args.emptyTable ? [] : tableData}\n columns={columns}\n />\n );\n};\n\nexport const StyledTableDemo: Story<TableStoryProps> = (args: TableStoryProps) => {\n const columns: ColumnProps<typeof tableData[number]>[] = [\n { renderer: data => <b>{data.name}</b>, label: 'Name' },\n { renderer: 'dob', label: 'Date of Birth' },\n { renderer: 'address', label: 'Address' },\n {\n renderer: data => {\n return (\n <>\n {data.email && data.emailVerified && <Status variant='success'>{data.email}</Status>}\n {data.email && !data.emailVerified && <Status variant='urgent'>{data.email}</Status>}\n </>\n );\n },\n label: 'Email'\n },\n {\n renderer: data => {\n return (\n <StyledBalance negativeBalance={data.balance.startsWith('-')}>\n {data.balance}\n </StyledBalance>\n );\n },\n label: 'Account Balance',\n align: 'right'\n }\n ];\n\n return (\n <Table\n title={args.title}\n hoverHighlight={args.hoverHighlight}\n loading={args.loading}\n loadingMessage={args.loadingMessage}\n data={args.emptyTable ? [] : tableData}\n columns={columns}\n />\n );\n};\n\ninterface ConfigurableTableProps extends TableStoryProps {\n headerFontSize?: string;\n headerFontWeight?: string;\n headerForegroundColor?: string;\n headerBackgroundColor?: string;\n headerVerticalSpacing?: number;\n headerHorizontalSpacing?: number;\n headerBorderWidth?: string;\n headerBorderColor?: string;\n bodyForegroundColor?: string;\n bodyBackgroundColor?: string;\n bodyVerticalSpacing?: number;\n bodyHorizontalSpacing?: number;\n bodyBorderWidth?: string;\n bodyBorderColor?: string;\n borderHorizontalInner?: boolean;\n borderHorizontalOuter?: boolean;\n borderVerticalInner?: boolean;\n borderVerticalOuter?: boolean;\n spacingHorizontalInner?: boolean;\n spacingHorizontalOuter?: boolean;\n spacingVerticalInner?: boolean;\n spacingVerticalOuter?: boolean;\n}\n\nexport const ConfigurableTable: Story<ConfigurableTableProps> = (args: ConfigurableTableProps) => {\n const columns: ColumnProps<typeof tableData[number]>[] = [\n { renderer: data => <b>{data.name}</b>, label: 'Name' },\n { renderer: 'dob', label: 'Date of Birth' },\n { renderer: 'address', label: 'Address' },\n {\n renderer: data => {\n return (\n <>\n {data.email && data.emailVerified && <Status variant='success'>{data.email}</Status>}\n {data.email && !data.emailVerified && <Status variant='urgent'>{data.email}</Status>}\n </>\n );\n },\n label: 'Email'\n },\n {\n renderer: data => {\n return (\n <StyledBalance negativeBalance={data.balance.startsWith('-')}>\n {data.balance}\n </StyledBalance>\n );\n },\n label: 'Account Balance',\n align: 'right'\n }\n ];\n\n return (\n <Configuration\n theme={{\n components: {\n table: {\n header: {\n 'font-size': args.headerFontSize,\n 'font-weight': args.headerFontWeight,\n 'foreground-color': args.headerForegroundColor,\n 'background-color': args.headerBackgroundColor,\n 'vertical-spacing': args.headerVerticalSpacing,\n 'horizontal-spacing': args.headerHorizontalSpacing,\n 'border-width': args.headerBorderWidth,\n 'border-color': args.headerBorderColor\n },\n body: {\n 'foreground-color': args.bodyForegroundColor,\n 'background-color': args.bodyBackgroundColor,\n 'vertical-spacing': args.bodyVerticalSpacing,\n 'horizontal-spacing': args.bodyHorizontalSpacing,\n 'border-width': args.bodyBorderWidth,\n 'border-color': args.bodyBorderColor\n },\n border: {\n 'horizontal-inner': args.borderHorizontalInner,\n 'horizontal-outer': args.borderHorizontalOuter,\n 'vertical-inner': args.borderVerticalInner,\n 'vertical-outer': args.borderVerticalOuter\n },\n spacing: {\n 'horizontal-inner': args.spacingHorizontalInner,\n 'horizontal-outer': args.spacingHorizontalOuter,\n 'vertical-inner': args.spacingVerticalInner,\n 'vertical-outer': args.spacingVerticalOuter\n }\n }\n }\n }}\n >\n <Table title='Accounts' data={tableData} columns={columns} />\n </Configuration>\n );\n};\n\nConfigurableTable.args = {\n headerFontSize: 's',\n headerFontWeight: '600',\n headerForegroundColor: '#000000',\n headerBackgroundColor: '#f5f5f5',\n headerVerticalSpacing: 1,\n headerHorizontalSpacing: 2,\n headerBorderWidth: '0.0625rem',\n headerBorderColor: '#cfcfcf',\n bodyForegroundColor: '#000000',\n bodyBackgroundColor: '#ffffff',\n bodyVerticalSpacing: 1,\n bodyHorizontalSpacing: 1,\n bodyBorderWidth: '0.0625rem',\n bodyBorderColor: '#cfcfcf',\n borderHorizontalInner: true,\n borderHorizontalOuter: true,\n borderVerticalInner: true,\n borderVerticalOuter: true,\n spacingHorizontalInner: true,\n spacingHorizontalOuter: true,\n spacingVerticalInner: true,\n spacingVerticalOuter: true\n};\n\nConfigurableTable.argTypes = {\n headerFontSize: {\n options: ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'],\n control: { type: 'select' }\n },\n headerFontWeight: { control: { type: 'text' } },\n headerForegroundColor: { control: { type: 'color' } },\n headerBackgroundColor: { control: { type: 'color' } },\n headerVerticalSpacing: { control: { type: 'number' } },\n headerHorizontalSpacing: { control: { type: 'number' } },\n headerBorderWidth: { control: { type: 'text' } },\n headerBorderColor: { control: { type: 'color' } },\n bodyForegroundColor: { control: { type: 'color' } },\n bodyBackgroundColor: { control: { type: 'color' } },\n bodyVerticalSpacing: { control: { type: 'number' } },\n bodyHorizontalSpacing: { control: { type: 'number' } },\n bodyBorderWidth: { control: { type: 'text' } },\n bodyBorderColor: { control: { type: 'color' } },\n borderHorizontalInner: { control: { type: 'boolean' } },\n borderHorizontalOuter: { control: { type: 'boolean' } },\n borderVerticalInner: { control: { type: 'boolean' } },\n borderVerticalOuter: { control: { type: 'boolean' } },\n spacingHorizontalInner: { control: { type: 'boolean' } },\n spacingHorizontalOuter: { control: { type: 'boolean' } },\n spacingVerticalInner: { control: { type: 'boolean' } },\n spacingVerticalOuter: { control: { type: 'boolean' } },\n title: { table: { disable: true } },\n hoverHighlight: { table: { disable: true } },\n loading: { table: { disable: true } },\n loadingMessage: { table: { disable: true } },\n emptyTable: { table: { disable: true } }\n};\n"]}
1
+ {"version":3,"file":"Table.stories.js","sourceRoot":"","sources":["../../../src/core/Table/Table.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,KAAK,EAA2B,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEhG,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,eAAe;IACb,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,KAAK;IAChB,IAAI,EAAE;QACJ,KAAK,EAAE,UAAU;QACjB,cAAc,EAAE,KAAK;QACrB,OAAO,EAAE,KAAK;QACd,cAAc,EAAE,cAAc;QAC9B,UAAU,EAAE,KAAK;KAClB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACpC,cAAc,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS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EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC9C,eAAe,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC/C,qBAAqB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACvD,qBAAqB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACvD,mBAAmB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACrD,mBAAmB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACrD,sBAAsB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACxD,sBAAsB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACxD,oBAAoB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACtD,oBAAoB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACtD,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACnC,cAAc,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IAC5C,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACrC,cAAc,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IAC5C,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CACzC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Status, Table, ColumnProps, TableProps, Configuration } from '@pega/cosmos-react-core';\n\nimport { tableData } from './Table.mocks';\nimport { StyledBalance } from './Table.styles';\n\nexport default {\n title: 'Core/Table',\n component: Table,\n args: {\n title: 'Accounts',\n hoverHighlight: false,\n loading: false,\n loadingMessage: 'Loading data',\n emptyTable: false\n },\n argTypes: {\n title: { control: { type: 'text' } },\n hoverHighlight: { control: { type: 'boolean' } },\n loading: { control: { type: 'boolean' } },\n loadingMessage: { control: { type: 'text' } },\n emptyTable: { control: { type: 'boolean' } }\n }\n} as Meta;\n\ninterface TableStoryProps {\n title?: TableProps['title'];\n hoverHighlight?: TableProps['hoverHighlight'];\n loading?: TableProps['loading'];\n loadingMessage?: TableProps['loadingMessage'];\n emptyTable?: boolean;\n}\n\nexport const TableDemo: Story<TableStoryProps> = (args: TableStoryProps) => {\n const columns: ColumnProps<typeof tableData[number]>[] = [\n { renderer: 'name', label: 'Name' },\n { renderer: 'dob', label: 'Date of Birth' },\n { renderer: 'address', label: 'Address' },\n { renderer: 'email', label: 'Email' },\n { renderer: 'balance', label: 'Account Balance', align: 'right' }\n ];\n\n return (\n <Table\n title={args.title}\n hoverHighlight={args.hoverHighlight}\n loading={args.loading}\n loadingMessage={args.loadingMessage}\n data={args.emptyTable ? [] : tableData}\n columns={columns}\n />\n );\n};\n\nexport const StyledTableDemo: Story<TableStoryProps> = (args: TableStoryProps) => {\n const columns: ColumnProps<typeof tableData[number]>[] = [\n { renderer: data => <b>{data.name}</b>, label: 'Name' },\n { renderer: 'dob', label: 'Date of Birth' },\n { renderer: 'address', label: 'Address' },\n {\n renderer: data => {\n return (\n <>\n {data.email && data.emailVerified && <Status variant='success'>{data.email}</Status>}\n {data.email && !data.emailVerified && <Status variant='urgent'>{data.email}</Status>}\n </>\n );\n },\n label: 'Email'\n },\n {\n renderer: data => {\n return (\n <StyledBalance negativeBalance={data.balance.startsWith('-')}>\n {data.balance}\n </StyledBalance>\n );\n },\n label: 'Account Balance',\n align: 'right'\n }\n ];\n\n return (\n <Table\n title={args.title}\n hoverHighlight={args.hoverHighlight}\n loading={args.loading}\n loadingMessage={args.loadingMessage}\n data={args.emptyTable ? [] : tableData}\n columns={columns}\n />\n );\n};\n\ninterface ConfigurableTableProps extends TableStoryProps {\n headerFontSize?: string;\n headerFontWeight?: string;\n headerForegroundColor?: string;\n headerBackgroundColor?: string;\n headerVerticalSpacing?: number;\n headerHorizontalSpacing?: number;\n headerBorderWidth?: string;\n headerBorderColor?: string;\n bodyForegroundColor?: string;\n bodyBackgroundColor?: string;\n bodyVerticalSpacing?: number;\n bodyHorizontalSpacing?: number;\n bodyBorderWidth?: string;\n bodyBorderColor?: string;\n borderHorizontalInner?: boolean;\n borderHorizontalOuter?: boolean;\n borderVerticalInner?: boolean;\n borderVerticalOuter?: boolean;\n spacingHorizontalInner?: boolean;\n spacingHorizontalOuter?: boolean;\n spacingVerticalInner?: boolean;\n spacingVerticalOuter?: boolean;\n}\n\nexport const ConfigurableTable: Story<ConfigurableTableProps> = (args: ConfigurableTableProps) => {\n const columns: ColumnProps<typeof tableData[number]>[] = [\n { renderer: data => <b>{data.name}</b>, label: 'Name' },\n { renderer: 'dob', label: 'Date of Birth' },\n { renderer: 'address', label: 'Address' },\n {\n renderer: data => {\n return (\n <>\n {data.email && data.emailVerified && <Status variant='success'>{data.email}</Status>}\n {data.email && !data.emailVerified && <Status variant='urgent'>{data.email}</Status>}\n </>\n );\n },\n label: 'Email'\n },\n {\n renderer: data => {\n return (\n <StyledBalance negativeBalance={data.balance.startsWith('-')}>\n {data.balance}\n </StyledBalance>\n );\n },\n label: 'Account Balance',\n align: 'right'\n }\n ];\n\n return (\n <Configuration\n theme={{\n components: {\n table: {\n header: {\n 'font-size': args.headerFontSize,\n 'font-weight': args.headerFontWeight,\n 'foreground-color': args.headerForegroundColor,\n 'background-color': args.headerBackgroundColor,\n 'vertical-spacing': args.headerVerticalSpacing,\n 'horizontal-spacing': args.headerHorizontalSpacing,\n 'border-width': args.headerBorderWidth,\n 'border-color': args.headerBorderColor\n },\n body: {\n 'foreground-color': args.bodyForegroundColor,\n 'background-color': args.bodyBackgroundColor,\n 'vertical-spacing': args.bodyVerticalSpacing,\n 'horizontal-spacing': args.bodyHorizontalSpacing,\n 'border-width': args.bodyBorderWidth,\n 'border-color': args.bodyBorderColor\n },\n border: {\n 'horizontal-inner': args.borderHorizontalInner,\n 'horizontal-outer': args.borderHorizontalOuter,\n 'vertical-inner': args.borderVerticalInner,\n 'vertical-outer': args.borderVerticalOuter\n },\n spacing: {\n 'horizontal-inner': args.spacingHorizontalInner,\n 'horizontal-outer': args.spacingHorizontalOuter,\n 'vertical-inner': args.spacingVerticalInner,\n 'vertical-outer': args.spacingVerticalOuter\n }\n }\n }\n }}\n >\n <Table title='Accounts' data={tableData} columns={columns} />\n </Configuration>\n );\n};\n\nConfigurableTable.args = {\n headerFontSize: 's',\n headerFontWeight: '600',\n headerForegroundColor: '#000000',\n headerBackgroundColor: '#71baff',\n headerVerticalSpacing: 1,\n headerHorizontalSpacing: 2,\n headerBorderWidth: '0.0625rem',\n headerBorderColor: '#cfcfcf',\n bodyForegroundColor: '#000000',\n bodyBackgroundColor: '#e2f1ff',\n bodyVerticalSpacing: 1,\n bodyHorizontalSpacing: 1,\n bodyBorderWidth: '0.0625rem',\n bodyBorderColor: '#cfcfcf',\n borderHorizontalInner: true,\n borderHorizontalOuter: true,\n borderVerticalInner: true,\n borderVerticalOuter: true,\n spacingHorizontalInner: true,\n spacingHorizontalOuter: true,\n spacingVerticalInner: true,\n spacingVerticalOuter: true\n};\n\nConfigurableTable.argTypes = {\n headerFontSize: {\n options: ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'],\n control: { type: 'select' }\n },\n headerFontWeight: { control: { type: 'text' } },\n headerForegroundColor: { control: { type: 'color' } },\n headerBackgroundColor: { control: { type: 'color' } },\n headerVerticalSpacing: { control: { type: 'number' } },\n headerHorizontalSpacing: { control: { type: 'number' } },\n headerBorderWidth: { control: { type: 'text' } },\n headerBorderColor: { control: { type: 'color' } },\n bodyForegroundColor: { control: { type: 'color' } },\n bodyBackgroundColor: { control: { type: 'color' } },\n bodyVerticalSpacing: { control: { type: 'number' } },\n bodyHorizontalSpacing: { control: { type: 'number' } },\n bodyBorderWidth: { control: { type: 'text' } },\n bodyBorderColor: { control: { type: 'color' } },\n borderHorizontalInner: { control: { type: 'boolean' } },\n borderHorizontalOuter: { control: { type: 'boolean' } },\n borderVerticalInner: { control: { type: 'boolean' } },\n borderVerticalOuter: { control: { type: 'boolean' } },\n spacingHorizontalInner: { control: { type: 'boolean' } },\n spacingHorizontalOuter: { control: { type: 'boolean' } },\n spacingVerticalInner: { control: { type: 'boolean' } },\n spacingVerticalOuter: { control: { type: 'boolean' } },\n title: { table: { disable: true } },\n hoverHighlight: { table: { disable: true } },\n loading: { table: { disable: true } },\n loadingMessage: { table: { disable: true } },\n emptyTable: { table: { disable: true } }\n};\n"]}
@@ -59,7 +59,7 @@ export const CustomComponentDemo = () => {
59
59
  const onCustomAction = () => {
60
60
  editor.insertContent('<pega-custom>Inserted from toolbar</pega-custom>');
61
61
  };
62
- return (_jsx(Editor, { ref: editorRef, label: label, toolbar: ['inline-styling', 'lists', 'indentation', 'links', 'images'], defaultValue: '<body><p>Hi mom <a href="https://google.com">link</a></p><pega-custom>Hello from custom element.</pega-custom><p>hi</p></body>', customComponents: [{ customElement: PegaCustomElement, name: 'pega-custom' }], customActions: [
62
+ return (_jsx(Editor, { ref: editorRef, label: label, toolbar: ['inline-styling', 'lists', 'indentation', 'links', 'images'], 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>', customComponents: [{ customElement: PegaCustomElement, name: 'pega-custom' }], customActions: [
63
63
  {
64
64
  icon: 'pega',
65
65
  text: 'Insert a custom element',
@@ -1 +1 @@
1
- {"version":3,"file":"Editor.stories.js","sourceRoot":"","sources":["../../../src/rte/Editor/Editor.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OA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O,EAAE,aAAa,CAAC,WAC3F,YACG,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta } from '@storybook/react';\nimport { useState, useRef } from 'react';\nimport ReactDOM from 'react-dom';\nimport { action } from '@storybook/addon-actions';\nimport { Editor as TinymceEditor } from 'tinymce';\n\nimport {\n Button,\n Card,\n CardContent,\n CardFooter,\n Flex,\n Text,\n TextArea\n} from '@pega/cosmos-react-core';\nimport { EditorState, Editor } from '@pega/cosmos-react-rte';\n\nexport default {\n title: 'RTE/Editor',\n component: Editor\n} as Meta;\n\nconst label = 'Form field label';\n\nexport const EditorDemo = () => {\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={label}\n toolbar={['inline-styling', 'lists', 'indentation', 'images', 'links']}\n onFocus={action('Editor focused')}\n onBlur={action('Editor blurred')}\n onImageAdded={onImageAdded}\n defaultValue='<body><p>Hi mom <a href=\"https://google.com\">link</a></p></body>'\n />\n );\n};\n\nexport const EmptyEditorDemo = () => {\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={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 = () => {\n return (\n <Editor\n label={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>&lt;head&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/title\"><code>&lt;title&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/body\"><code>&lt;body&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/header\"><code>&lt;header&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/footer\"><code>&lt;footer&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/article\"><code>&lt;article&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/section\"><code>&lt;section&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/p\"><code>&lt;p&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/div\"><code>&lt;div&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/span\"><code>&lt;span&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/img\"><code>&lt;img&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/aside\"><code>&lt;aside&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/audio\"><code>&lt;audio&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/canvas\"><code>&lt;canvas&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/datalist\"><code>&lt;datalist&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/details\"><code>&lt;details&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/embed\"><code>&lt;embed&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/nav\"><code>&lt;nav&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/output\"><code>&lt;output&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/progress\"><code>&lt;progress&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/video\"><code>&lt;video&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/ul\"><code>&lt;ul&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/ol\"><code>&lt;ol&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/li\"><code>&lt;li&gt;</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>&lt;</code>\" and \"<code>&gt;</code>\".&nbsp; 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>&lt;title&gt;</code> tag can be written as <code>&lt;Title&gt;</code>, <code>&lt;TITLE&gt;</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&amp;title=Issue+with+%22HTML%3A+HyperText+Markup+Language%22%3A+%28short+summary+here+please%29&amp;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\nconst PegaCustom = ({ children }: { children: string }) => {\n return (\n <p\n style={{ color: 'blue', textTransform: 'uppercase' }}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{ __html: children }}\n />\n );\n};\n\nclass PegaCustomElement extends HTMLElement {\n removeElements() {\n while (this.firstChild) {\n this.removeChild(this.firstChild);\n }\n }\n\n connectedCallback() {\n const inner = this.innerHTML;\n this.removeElements();\n const mountPoint = document.createElement('span');\n this.appendChild(mountPoint);\n ReactDOM.render(<PegaCustom>{inner}</PegaCustom>, mountPoint);\n }\n}\n\nexport const CustomComponentDemo = () => {\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={label}\n toolbar={['inline-styling', 'lists', 'indentation', 'links', 'images']}\n defaultValue='<body><p>Hi mom <a href=\"https://google.com\">link</a></p><pega-custom>Hello from custom element.</pega-custom><p>hi</p></body>'\n customComponents={[{ customElement: PegaCustomElement, 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 = () => {\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 = () => {\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={label}\n toolbar={['inline-styling', 'headers', 'tables', 'links', 'images', 'lists', 'indentation']}\n />\n </Flex>\n );\n};\n"]}
1
+ {"version":3,"file":"Editor.stories.js","sourceRoot":"","sources":["../../../src/rte/Editor/Editor.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGlD,OAAO,EACL,MAAM,EACN,IAAI,EACJ,WAAW,EACX,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,QAAQ,EACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAe,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAE7D,eAAe;IACb,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,MAAM;CACV,CAAC;AAEV,MAAM,KAAK,GAAG,kBAAkB,CAAC;AAEjC,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,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,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAC/D,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,MAAM,IACL,GAAG,EAAE,SAAS,EACd,KAAK,EAAE,KAAK,EACZ,OAAO,EA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CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,WAAI,WACrD,EACd,KAAC,UAAU,cACT,KAAC,MAAM,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,oDAE3D,WACE,YACR,EACP,KAAC,MAAM,IACL,YAAY,EAAE,IAAI,EAClB,YAAY,EAAE,YAAY,EAC1B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,CAAC,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,CAAC,WAC3F,YACG,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta } from '@storybook/react';\nimport { useState, useRef } from 'react';\nimport ReactDOM from 'react-dom';\nimport { action } from '@storybook/addon-actions';\nimport { Editor as TinymceEditor } from 'tinymce';\n\nimport {\n Button,\n Card,\n CardContent,\n CardFooter,\n Flex,\n Text,\n TextArea\n} from '@pega/cosmos-react-core';\nimport { EditorState, Editor } from '@pega/cosmos-react-rte';\n\nexport default {\n title: 'RTE/Editor',\n component: Editor\n} as Meta;\n\nconst label = 'Form field label';\n\nexport const EditorDemo = () => {\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={label}\n toolbar={['inline-styling', 'lists', 'indentation', 'images', 'links']}\n onFocus={action('Editor focused')}\n onBlur={action('Editor blurred')}\n onImageAdded={onImageAdded}\n defaultValue='<body><p>Hi mom <a href=\"https://google.com\">link</a></p></body>'\n />\n );\n};\n\nexport const EmptyEditorDemo = () => {\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={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 = () => {\n return (\n <Editor\n label={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>&lt;head&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/title\"><code>&lt;title&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/body\"><code>&lt;body&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/header\"><code>&lt;header&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/footer\"><code>&lt;footer&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/article\"><code>&lt;article&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/section\"><code>&lt;section&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/p\"><code>&lt;p&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/div\"><code>&lt;div&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/span\"><code>&lt;span&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/img\"><code>&lt;img&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/aside\"><code>&lt;aside&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/audio\"><code>&lt;audio&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/canvas\"><code>&lt;canvas&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/datalist\"><code>&lt;datalist&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/details\"><code>&lt;details&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/embed\"><code>&lt;embed&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/nav\"><code>&lt;nav&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/output\"><code>&lt;output&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/progress\"><code>&lt;progress&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/video\"><code>&lt;video&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/ul\"><code>&lt;ul&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/ol\"><code>&lt;ol&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/li\"><code>&lt;li&gt;</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>&lt;</code>\" and \"<code>&gt;</code>\".&nbsp; 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>&lt;title&gt;</code> tag can be written as <code>&lt;Title&gt;</code>, <code>&lt;TITLE&gt;</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&amp;title=Issue+with+%22HTML%3A+HyperText+Markup+Language%22%3A+%28short+summary+here+please%29&amp;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\nconst PegaCustom = ({ children }: { children: string }) => {\n return (\n <p\n style={{ color: 'blue', textTransform: 'uppercase' }}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{ __html: children }}\n />\n );\n};\n\nclass PegaCustomElement extends HTMLElement {\n removeElements() {\n while (this.firstChild) {\n this.removeChild(this.firstChild);\n }\n }\n\n connectedCallback() {\n const inner = this.innerHTML;\n this.removeElements();\n const mountPoint = document.createElement('span');\n this.appendChild(mountPoint);\n ReactDOM.render(<PegaCustom>{inner}</PegaCustom>, mountPoint);\n }\n}\n\nexport const CustomComponentDemo = () => {\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={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={[{ customElement: PegaCustomElement, 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 = () => {\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 = () => {\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={label}\n toolbar={['inline-styling', 'headers', 'tables', 'links', 'images', 'lists', 'indentation']}\n />\n </Flex>\n );\n};\n"]}
@@ -1,11 +1,12 @@
1
- import { EmailComposerProps, ViewAnalysisProps } from '@pega/cosmos-react-social';
1
+ import { FieldValueListProps } from '@pega/cosmos-react-core';
2
+ import { EmailComposerProps, EntityListProps } from '@pega/cosmos-react-social';
2
3
  export declare const emailBodyContent = "<div>Hi, <br /> <br /><div>Can you please change my address in the SSN.</div> <br /> <br />Regards, <br />Sara Davis </div>";
3
4
  export declare const emailAttachments: EmailComposerProps['attachments'];
4
5
  export declare const participants: EmailComposerProps['participants'];
5
6
  export declare const toParticipants: string[];
6
7
  export declare const ccParticipants: string[];
7
8
  export declare const bccParticipants: string[];
8
- export declare const ViewAnalysisMockData: ViewAnalysisProps['content'];
9
+ export declare const EntityListMockData: EntityListProps['content'];
9
10
  export declare const EmailMockData: {
10
11
  emails: {
11
12
  'Sara Davis': {
@@ -83,4 +84,20 @@ export declare const EmailMockData: {
83
84
  content: string;
84
85
  }[];
85
86
  };
87
+ export declare const viewAnalysisEmailHeaderMock: FieldValueListProps['fields'];
88
+ export declare const topicListMock: ({
89
+ id: string;
90
+ primary: string;
91
+ secondary: {
92
+ indicator: string;
93
+ value: string;
94
+ };
95
+ } | {
96
+ id: string;
97
+ primary: string;
98
+ secondary: {
99
+ indicator: string;
100
+ value?: undefined;
101
+ };
102
+ })[];
86
103
  //# sourceMappingURL=Email.mocks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Email.mocks.d.ts","sourceRoot":"","sources":["../../../src/social/Email/Email.mocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAa,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE7F,eAAO,MAAM,gBAAgB,gIACkG,CAAC;AAEhI,eAAO,MAAM,gBAAgB,EAAE,kBAAkB,CAAC,aAAa,CAS9D,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,kBAAkB,CAAC,cAAc,CAgC3D,CAAC;AAEF,eAAO,MAAM,cAAc,UAEiC,CAAC;AAC7D,eAAO,MAAM,cAAc,UAEiC,CAAC;AAC7D,eAAO,MAAM,eAAe,UAEgC,CAAC;AAE7D,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,CAAC,SAAS,CAsL7D,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8GzB,CAAC"}
1
+ {"version":3,"file":"Email.mocks.d.ts","sourceRoot":"","sources":["../../../src/social/Email/Email.mocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAa,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE3F,eAAO,MAAM,gBAAgB,gIACkG,CAAC;AAEhI,eAAO,MAAM,gBAAgB,EAAE,kBAAkB,CAAC,aAAa,CAS9D,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,kBAAkB,CAAC,cAAc,CAgC3D,CAAC;AAEF,eAAO,MAAM,cAAc,UAEiC,CAAC;AAC7D,eAAO,MAAM,cAAc,UAEiC,CAAC;AAC7D,eAAO,MAAM,eAAe,UAEgC,CAAC;AAE7D,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAAC,SAAS,CAsLzD,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8GzB,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,mBAAmB,CAAC,QAAQ,CAarE,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;IAgCzB,CAAC"}
@@ -51,7 +51,7 @@ export const ccParticipants = participants
51
51
  export const bccParticipants = participants
52
52
  .slice(4, 9)
53
53
  .map((participant) => participant.emailAddress);
54
- export const ViewAnalysisMockData = [
54
+ export const EntityListMockData = [
55
55
  {
56
56
  name: 'Ticket number',
57
57
  value: [
@@ -345,4 +345,51 @@ export const EmailMockData = {
345
345
  }
346
346
  ]
347
347
  };
348
+ export const viewAnalysisEmailHeaderMock = [
349
+ {
350
+ name: 'Sender email',
351
+ value: 'robert.stanton@hotmail.com'
352
+ },
353
+ {
354
+ name: 'Sender name',
355
+ value: 'Robert stanton'
356
+ },
357
+ {
358
+ name: 'Subject',
359
+ value: 'I have a quick question on travel'
360
+ }
361
+ ];
362
+ export const topicListMock = [
363
+ {
364
+ id: '1',
365
+ primary: 'Missing ticket',
366
+ secondary: {
367
+ indicator: 'Confidence',
368
+ value: '50%'
369
+ }
370
+ },
371
+ {
372
+ id: '2',
373
+ primary: 'Missing baggage',
374
+ secondary: {
375
+ indicator: 'Confidence',
376
+ value: '80%'
377
+ }
378
+ },
379
+ {
380
+ id: '3',
381
+ primary: 'Ticket booking',
382
+ secondary: {
383
+ indicator: 'Confidence',
384
+ value: '30%'
385
+ }
386
+ },
387
+ {
388
+ id: '4',
389
+ primary: 'Language',
390
+ secondary: {
391
+ indicator: 'Confidence'
392
+ }
393
+ }
394
+ ];
348
395
  //# sourceMappingURL=Email.mocks.js.map