@pega/custom-dx-components 0.23.32 → 0.23.34
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/README.md +2 -2
- package/package.json +1 -1
- package/src/constants.js +2 -2
- package/src/tasks/create/templates/Constellation/Field/Boolean/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Date/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/DateTime/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Decimal/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Integer/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Picklist/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Text/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Text-Email/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Text-Input/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Text-URL/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Template/DETAILS/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Template/FORM/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Template/FORM-region/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Template/PAGE/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Widget/CASE/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Widget/PAGE/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/index.tsx.mustache +0 -2
- package/src/tasks/init/template/package.json.mustache +1 -1
- package/tests/assets/components/create/Pega_DXIL_MyTestText/index.tsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/index.tsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/index.tsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/index.tsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/index.tsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/index.tsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/index.tsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/index.tsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/index.tsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/index.tsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/index.tsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/index.tsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/index.tsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/index.tsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/index.tsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/index.tsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/index.tsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.tsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/config.json +4 -4
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/demo.stories.tsx +5 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/index.tsx +7 -9
- package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyAutocomplete → Constellation/Pega_DXIL_MySearchbox}/config.json +4 -4
- package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyAutocomplete → Constellation/Pega_DXIL_MySearchbox}/demo.stories.tsx +5 -5
- package/tests/assets/components/createAll/Constellation/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/index.tsx +12 -14
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/index.tsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/index.tsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/index.tsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/index.tsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/index.tsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/index.tsx +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/index.tsx +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/index.tsx +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/index.tsx +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/index.tsx +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/index.tsx +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/index.tsx +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/index.tsx +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/index.tsx +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/index.tsx +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/index.tsx +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/index.tsx +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/index.tsx +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/index.tsx +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/index.tsx +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/index.tsx +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/index.tsx +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/config.json +4 -4
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/demo.stories.tsx +5 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/index.tsx +7 -9
- package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyAutocomplete → Launchpad/Pega_DXIL_MySearchbox}/config.json +4 -4
- package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyAutocomplete → Launchpad/Pega_DXIL_MySearchbox}/demo.stories.tsx +5 -5
- package/tests/assets/components/createAll/Launchpad/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/index.tsx +12 -14
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/index.tsx +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/index.tsx +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/index.tsx +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/index.tsx +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/index.tsx +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/index.tsx +0 -2
- /package/tests/assets/components/createAll/Constellation/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/PConnProps.d.ts +0 -0
- /package/tests/assets/components/createAll/Constellation/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/component-constants.js +0 -0
- /package/tests/assets/components/createAll/Constellation/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/date.js +0 -0
- /package/tests/assets/components/createAll/Constellation/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/embed-utils.js +0 -0
- /package/tests/assets/components/createAll/Constellation/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/event-utils.ts +0 -0
- /package/tests/assets/components/createAll/Constellation/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/format-constants.js +0 -0
- /package/tests/assets/components/createAll/Constellation/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/mock.ts +0 -0
- /package/tests/assets/components/createAll/Constellation/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/picklist-utils.js +0 -0
- /package/tests/assets/components/createAll/Constellation/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/repeat-constants.js +0 -0
- /package/tests/assets/components/createAll/Constellation/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/repeat-utils.js +0 -0
- /package/tests/assets/components/createAll/Constellation/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/styles.ts +0 -0
- /package/tests/assets/components/createAll/Constellation/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/suggestions-handler.ts +0 -0
- /package/tests/assets/components/createAll/Constellation/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/textformat-utils.jsx +0 -0
- /package/tests/assets/components/createAll/Constellation/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/utils.ts +0 -0
- /package/tests/assets/components/createAll/Launchpad/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/PConnProps.d.ts +0 -0
- /package/tests/assets/components/createAll/Launchpad/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/component-constants.js +0 -0
- /package/tests/assets/components/createAll/Launchpad/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/date.js +0 -0
- /package/tests/assets/components/createAll/Launchpad/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/embed-utils.js +0 -0
- /package/tests/assets/components/createAll/Launchpad/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/event-utils.ts +0 -0
- /package/tests/assets/components/createAll/Launchpad/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/format-constants.js +0 -0
- /package/tests/assets/components/createAll/Launchpad/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/mock.ts +0 -0
- /package/tests/assets/components/createAll/Launchpad/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/picklist-utils.js +0 -0
- /package/tests/assets/components/createAll/Launchpad/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/repeat-constants.js +0 -0
- /package/tests/assets/components/createAll/Launchpad/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/repeat-utils.js +0 -0
- /package/tests/assets/components/createAll/Launchpad/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/styles.ts +0 -0
- /package/tests/assets/components/createAll/Launchpad/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/suggestions-handler.ts +0 -0
- /package/tests/assets/components/createAll/Launchpad/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/textformat-utils.jsx +0 -0
- /package/tests/assets/components/createAll/Launchpad/{Pega_DXIL_MyAutocomplete → Pega_DXIL_MySearchbox}/utils.ts +0 -0
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
-
import React from 'react';
|
|
3
1
|
import { useEffect, useState, useRef } from 'react';
|
|
4
2
|
import { Input, FieldValueList, Text, EmailDisplay, PhoneDisplay, URLDisplay } from '@pega/cosmos-react-core';
|
|
5
3
|
import PropTypes from 'prop-types';
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
-
import React from 'react';
|
|
3
1
|
import { useEffect, useState } from 'react';
|
|
4
2
|
import { DateTimeInput, FieldValueList, DateTimeDisplay, Text } from "@pega/cosmos-react-core";
|
|
5
3
|
import PropTypes from "prop-types";
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
-
import React from 'react';
|
|
3
1
|
import { useState, useEffect, useRef } from 'react';
|
|
4
2
|
import { NumberInput, NumberDisplay, CurrencyDisplay, FieldValueList, Text } from '@pega/cosmos-react-core';
|
|
5
3
|
import PropTypes from 'prop-types';
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
-
import React from 'react';
|
|
3
1
|
import { useState, useEffect, useRef } from 'react';
|
|
4
2
|
import { Input, EmailDisplay, FieldValueList, Text, URLDisplay, PhoneDisplay } from '@pega/cosmos-react-core';
|
|
5
3
|
import PropTypes from 'prop-types';
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
-
import React from 'react';
|
|
3
1
|
import { useState, useEffect, useRef } from 'react';
|
|
4
2
|
import { NumberInput, NumberDisplay, Slider, FieldValueList, CurrencyDisplay, Text } from '@pega/cosmos-react-core';
|
|
5
3
|
import PropTypes from 'prop-types';
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
-
import React from 'react';
|
|
3
1
|
import { useState, useEffect, useRef } from 'react';
|
|
4
2
|
import { TextArea as CosmosTextArea, FieldValueList, ParagraphDisplay, Text, EmailDisplay, PhoneDisplay, URLDisplay } from '@pega/cosmos-react-core';
|
|
5
3
|
import PropTypes from 'prop-types';
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3
|
-
import React from 'react';
|
|
4
2
|
// @ts-nocheck
|
|
5
3
|
import { useState, useEffect, useRef } from 'react';
|
|
6
4
|
import { Select, Option, FieldValueList, Text } from '@pega/cosmos-react-core';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"label": "My Radio
|
|
4
|
-
"description": "My Radio
|
|
2
|
+
"name": "Pega_DXIL_MyRadiobuttons",
|
|
3
|
+
"label": "My Radio buttons",
|
|
4
|
+
"description": "My Radio buttons",
|
|
5
5
|
"organization": "Pega",
|
|
6
6
|
"version": "0.0.1",
|
|
7
7
|
"library": "DXIL",
|
|
8
8
|
"allowedApplications": [],
|
|
9
|
-
"componentKey": "
|
|
9
|
+
"componentKey": "Pega_DXIL_MyRadiobuttons",
|
|
10
10
|
"type": "Field",
|
|
11
11
|
"subtype": "Picklist",
|
|
12
12
|
"icon": "images/pz-dropdown-active.svg",
|
package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/demo.stories.tsx
CHANGED
|
@@ -6,15 +6,15 @@ import { withKnobs } from '@storybook/addon-knobs';
|
|
|
6
6
|
|
|
7
7
|
import { configProps, rawMetadata, fieldMetadata, stateProps } from './mock';
|
|
8
8
|
|
|
9
|
-
import
|
|
9
|
+
import PegaDxilMyRadiobuttons from './index';
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
|
-
title: '
|
|
12
|
+
title: 'PegaDxilMyRadiobuttons',
|
|
13
13
|
decorators: [withKnobs],
|
|
14
|
-
component:
|
|
14
|
+
component: PegaDxilMyRadiobuttons
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
export const
|
|
17
|
+
export const BasePegaDxilMyRadiobuttons = () => {
|
|
18
18
|
|
|
19
19
|
const [value, setValue] = useState(configProps.value);
|
|
20
20
|
|
|
@@ -79,7 +79,7 @@ export const BasePegaDxilMyRadioButtons = () => {
|
|
|
79
79
|
|
|
80
80
|
return (
|
|
81
81
|
<>
|
|
82
|
-
<
|
|
82
|
+
<PegaDxilMyRadiobuttons {...props} />
|
|
83
83
|
</>
|
|
84
84
|
);
|
|
85
85
|
};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
/* eslint-disable no-nested-ternary */
|
|
2
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3
|
-
import React from 'react';
|
|
4
2
|
import { useMemo } from 'react';
|
|
5
3
|
import PropTypes from 'prop-types';
|
|
6
4
|
import { RadioButton, RadioButtonGroup } from '@pega/cosmos-react-core';
|
|
@@ -10,11 +8,11 @@ import type { PConnFieldProps } from './PConnProps';
|
|
|
10
8
|
import { formatExists, textFormatter } from './textformat-utils.jsx';
|
|
11
9
|
import handleEvent from './event-utils';
|
|
12
10
|
|
|
13
|
-
import
|
|
11
|
+
import StyledPegaDxilMyRadiobuttonsWrapper from './styles';
|
|
14
12
|
|
|
15
13
|
|
|
16
14
|
// interface for props
|
|
17
|
-
interface
|
|
15
|
+
interface PegaDxilMyRadiobuttonsProps extends PConnFieldProps {
|
|
18
16
|
// If any, enter additional props that only exist on TextInput here
|
|
19
17
|
isTableFormatter?: boolean;
|
|
20
18
|
hasSuggestions?: boolean;
|
|
@@ -55,7 +53,7 @@ const getDisplayValue = (dataSource: any, value: any, isDatapage: boolean) => {
|
|
|
55
53
|
|
|
56
54
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
57
55
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
58
|
-
export default function
|
|
56
|
+
export default function PegaDxilMyRadiobuttons(props: PegaDxilMyRadiobuttonsProps) {
|
|
59
57
|
const {
|
|
60
58
|
getPConnect,
|
|
61
59
|
value,
|
|
@@ -167,7 +165,7 @@ export default function PegaDxilMyRadioButtons(props: PegaDxilMyRadioButtonsProp
|
|
|
167
165
|
}
|
|
168
166
|
|
|
169
167
|
return (
|
|
170
|
-
<
|
|
168
|
+
<StyledPegaDxilMyRadiobuttonsWrapper>
|
|
171
169
|
<RadioButtonGroup
|
|
172
170
|
{...additionalProps}
|
|
173
171
|
label={label}
|
|
@@ -195,12 +193,12 @@ export default function PegaDxilMyRadioButtons(props: PegaDxilMyRadioButtonsProp
|
|
|
195
193
|
>
|
|
196
194
|
{items}
|
|
197
195
|
</RadioButtonGroup>
|
|
198
|
-
</
|
|
196
|
+
</StyledPegaDxilMyRadiobuttonsWrapper>
|
|
199
197
|
);
|
|
200
198
|
}
|
|
201
199
|
|
|
202
200
|
|
|
203
|
-
|
|
201
|
+
PegaDxilMyRadiobuttons.defaultProps = {
|
|
204
202
|
value: '',
|
|
205
203
|
validatemessage: '',
|
|
206
204
|
helperText: '',
|
|
@@ -221,7 +219,7 @@ PegaDxilMyRadioButtons.defaultProps = {
|
|
|
221
219
|
isTableFormatter: false
|
|
222
220
|
};
|
|
223
221
|
|
|
224
|
-
|
|
222
|
+
PegaDxilMyRadiobuttons.propTypes = {
|
|
225
223
|
getPConnect: PropTypes.func.isRequired,
|
|
226
224
|
value: PropTypes.string,
|
|
227
225
|
label: PropTypes.string.isRequired,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"label": "My
|
|
4
|
-
"description": "My
|
|
2
|
+
"name": "Pega_DXIL_MySearchbox",
|
|
3
|
+
"label": "My Search box",
|
|
4
|
+
"description": "My Search box",
|
|
5
5
|
"organization": "Pega",
|
|
6
6
|
"version": "0.0.1",
|
|
7
7
|
"library": "DXIL",
|
|
8
8
|
"allowedApplications": [],
|
|
9
|
-
"componentKey": "
|
|
9
|
+
"componentKey": "Pega_DXIL_MySearchbox",
|
|
10
10
|
"type": "Field",
|
|
11
11
|
"subtype": "Picklist",
|
|
12
12
|
"icon": "images/pz-dropdown-active.svg",
|
|
@@ -6,15 +6,15 @@ import { withKnobs } from '@storybook/addon-knobs';
|
|
|
6
6
|
|
|
7
7
|
import { configProps, rawMetadata, fieldMetadata, stateProps } from './mock';
|
|
8
8
|
|
|
9
|
-
import
|
|
9
|
+
import PegaDxilMySearchbox from './index';
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
|
-
title: '
|
|
12
|
+
title: 'PegaDxilMySearchbox',
|
|
13
13
|
decorators: [withKnobs],
|
|
14
|
-
component:
|
|
14
|
+
component: PegaDxilMySearchbox
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
export const
|
|
17
|
+
export const BasePegaDxilMySearchbox = () => {
|
|
18
18
|
|
|
19
19
|
const [value, setValue] = useState(configProps.value);
|
|
20
20
|
const datasourceMetadata = fieldMetadata;
|
|
@@ -84,7 +84,7 @@ export const BasePegaDxilMyAutocomplete = () => {
|
|
|
84
84
|
|
|
85
85
|
return (
|
|
86
86
|
<>
|
|
87
|
-
<
|
|
87
|
+
<PegaDxilMySearchbox {...props} />
|
|
88
88
|
</>
|
|
89
89
|
);
|
|
90
90
|
};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2
2
|
/* eslint-disable sonarjs/cognitive-complexity */
|
|
3
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4
|
-
import React from 'react';
|
|
5
3
|
import { useEffect, useRef, useState, memo, useMemo, type MutableRefObject, type SetStateAction } from 'react';
|
|
6
4
|
import { ComboBox, menuHelpers, debounce, throttle, Button, Icon, type MenuGroupProps, type MenuItemProps } from '@pega/cosmos-react-core';
|
|
7
5
|
import PropTypes from 'prop-types';
|
|
@@ -19,10 +17,10 @@ import { getFieldNameFromEmbeddedFieldName } from './embed-utils.js';
|
|
|
19
17
|
|
|
20
18
|
import { usePaginate, useDeepMemo, useIsMount, updatePropertiesForNewRecord } from './utils';
|
|
21
19
|
|
|
22
|
-
import
|
|
20
|
+
import StyledPegaDxilMySearchboxWrapper from './styles';
|
|
23
21
|
|
|
24
22
|
// interface for props
|
|
25
|
-
interface
|
|
23
|
+
interface PegaDxilMySearchboxProps extends PConnFieldProps {
|
|
26
24
|
// If any, enter additional props that only exist on TextInput here
|
|
27
25
|
isTableFormatter?: boolean;
|
|
28
26
|
hasSuggestions?: boolean;
|
|
@@ -49,7 +47,7 @@ interface PegaDxilMyAutocompleteProps extends PConnFieldProps {
|
|
|
49
47
|
isSearchableOnKey: boolean;
|
|
50
48
|
}
|
|
51
49
|
|
|
52
|
-
interface
|
|
50
|
+
interface PegaDxilMySearchboxPropsSubSet {
|
|
53
51
|
selected: any;
|
|
54
52
|
actualValue: any;
|
|
55
53
|
isTableFormatter?: boolean;
|
|
@@ -363,7 +361,7 @@ export const setValueToAssocProp = (
|
|
|
363
361
|
return retValue;
|
|
364
362
|
};
|
|
365
363
|
|
|
366
|
-
const DisplayComponent = (props:
|
|
364
|
+
const DisplayComponent = (props: PegaDxilMySearchboxPropsSubSet) => {
|
|
367
365
|
const { selected, actualValue, isTableFormatter, formatter } = props;
|
|
368
366
|
|
|
369
367
|
const displayCompValue = selected ? selected.primary : actualValue;
|
|
@@ -380,7 +378,7 @@ const DisplayComponent = (props: PegaDxilMyAutocompletePropsSubSet) => {
|
|
|
380
378
|
|
|
381
379
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
382
380
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
383
|
-
export function
|
|
381
|
+
export function PegaDxilMySearchbox(props: PegaDxilMySearchboxProps) {
|
|
384
382
|
const {
|
|
385
383
|
getPConnect,
|
|
386
384
|
value,
|
|
@@ -1074,9 +1072,9 @@ export function PegaDxilMyAutocomplete(props: PegaDxilMyAutocompleteProps) {
|
|
|
1074
1072
|
};
|
|
1075
1073
|
|
|
1076
1074
|
const displayComponent = useMemo(() => {
|
|
1077
|
-
return <
|
|
1075
|
+
return <StyledPegaDxilMySearchboxWrapper>
|
|
1078
1076
|
<DisplayComponent {...{ selected, actualValue, isTableFormatter, formatter }} />
|
|
1079
|
-
</
|
|
1077
|
+
</StyledPegaDxilMySearchboxWrapper>;
|
|
1080
1078
|
}, [selected, actualValue, isTableFormatter, formatter]);
|
|
1081
1079
|
|
|
1082
1080
|
if (displayMode) {
|
|
@@ -1124,7 +1122,7 @@ export function PegaDxilMyAutocomplete(props: PegaDxilMyAutocompleteProps) {
|
|
|
1124
1122
|
|
|
1125
1123
|
|
|
1126
1124
|
return (
|
|
1127
|
-
<
|
|
1125
|
+
<StyledPegaDxilMySearchboxWrapper>
|
|
1128
1126
|
<ComboBox
|
|
1129
1127
|
{...additionalProps}
|
|
1130
1128
|
testId={testId ?? label}
|
|
@@ -1170,13 +1168,13 @@ export function PegaDxilMyAutocomplete(props: PegaDxilMyAutocompleteProps) {
|
|
|
1170
1168
|
mode={AC_TYPE}
|
|
1171
1169
|
onResolveSuggestion={onResolveSuggestionHandler}
|
|
1172
1170
|
/>
|
|
1173
|
-
</
|
|
1171
|
+
</StyledPegaDxilMySearchboxWrapper>
|
|
1174
1172
|
);
|
|
1175
1173
|
}
|
|
1176
1174
|
|
|
1177
|
-
export default memo(
|
|
1175
|
+
export default memo(PegaDxilMySearchbox);
|
|
1178
1176
|
|
|
1179
|
-
|
|
1177
|
+
PegaDxilMySearchbox.defaultProps = {
|
|
1180
1178
|
value: '',
|
|
1181
1179
|
matchPosition: 'contains',
|
|
1182
1180
|
maxResultsDisplay: '',
|
|
@@ -1205,7 +1203,7 @@ PegaDxilMyAutocomplete.defaultProps = {
|
|
|
1205
1203
|
hasSuggestions: false
|
|
1206
1204
|
};
|
|
1207
1205
|
|
|
1208
|
-
|
|
1206
|
+
PegaDxilMySearchbox.propTypes = {
|
|
1209
1207
|
value: PropTypes.string,
|
|
1210
1208
|
maxResultsDisplay: PropTypes.string,
|
|
1211
1209
|
matchPosition: PropTypes.string,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
-
import React from 'react';
|
|
3
1
|
import { useEffect, useState, useRef } from 'react';
|
|
4
2
|
import { Input, FieldValueList, Text, EmailDisplay, PhoneDisplay, URLDisplay } from '@pega/cosmos-react-core';
|
|
5
3
|
import PropTypes from 'prop-types';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|