@pega/dx-component-builder-sdk 0.1.35 → 0.1.37
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/package.json +1 -1
- package/src/constants.js +12 -0
- package/src/tasks/authenticate/index.js +6 -3
- package/src/tasks/create/templates/Constellation/field/Boolean/styles.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/field/Date/styles.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/field/DateTime/styles.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/field/Decimal/styles.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/field/Decimal-Currency/styles.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/field/Decimal-Percentage/styles.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/field/Integer/styles.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/field/Picklist/styles.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/field/Text/styles.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/field/Text-Email/styles.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/field/Text-Input/styles.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/field/Text-Paragraph/styles.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/field/Text-Phone/styles.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/field/Text-URL/styles.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/field/TimeofDay/styles.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/template/DETAILS/styles.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/styles.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/template/FORM/styles.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/template/FORM-region/index.jsx.mustache +4 -1
- package/src/tasks/create/templates/Constellation/template/FORM-region/styles.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/template/PAGE/styles.js.mustache +1 -1
- package/src/tasks/create/template/config.json.mustache +0 -62
- package/src/tasks/create/template/demo.stories.jsx.mustache +0 -44
- package/src/tasks/create/template/index.jsx.mustache +0 -55
- package/src/tasks/create/template/styles.js.mustache +0 -7
package/package.json
CHANGED
package/src/constants.js
CHANGED
|
@@ -329,6 +329,10 @@ export const COMPONENT_SCHEMA = {
|
|
|
329
329
|
}
|
|
330
330
|
],
|
|
331
331
|
designSystemExtension: [
|
|
332
|
+
{
|
|
333
|
+
name: 'Banner',
|
|
334
|
+
value: 'Banner'
|
|
335
|
+
},
|
|
332
336
|
{
|
|
333
337
|
name: 'Case Summary Fields',
|
|
334
338
|
value: 'CaseSummaryFields'
|
|
@@ -409,6 +413,10 @@ export const COMPONENT_SCHEMA = {
|
|
|
409
413
|
name: 'App Shell',
|
|
410
414
|
value: 'AppShell'
|
|
411
415
|
},
|
|
416
|
+
{
|
|
417
|
+
name: 'Banner Page',
|
|
418
|
+
value: 'BannerPage'
|
|
419
|
+
},
|
|
412
420
|
{
|
|
413
421
|
name: 'Case Summary',
|
|
414
422
|
value: 'CaseSummary'
|
|
@@ -552,6 +560,10 @@ export const COMPONENT_SCHEMA = {
|
|
|
552
560
|
{
|
|
553
561
|
name: 'Wide Narrow Page',
|
|
554
562
|
value: 'WideNarrow/WideNarrowPage'
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
name: 'Wss Nav Bar',
|
|
566
|
+
value: 'WssNavBar'
|
|
555
567
|
}
|
|
556
568
|
],
|
|
557
569
|
widget: [
|
|
@@ -123,9 +123,12 @@ export default async options => {
|
|
|
123
123
|
let bWriteUpdate = false;
|
|
124
124
|
for (let i = 0; i < aProps.length; i += 1) {
|
|
125
125
|
const prop = aProps[i];
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
const configValue = serverConfig[prop];
|
|
127
|
+
const answerValue = answers[prop];
|
|
128
|
+
// Treat an empty serverConfig property value as same as an undefined answer response
|
|
129
|
+
if (configValue !== answerValue && !(configValue === '' && answerValue === undefined)) {
|
|
130
|
+
// console.log(`property ${prop} changed from ${configValue} to ${answerValue}`);
|
|
131
|
+
serverConfig[prop] = answerValue;
|
|
129
132
|
if (prop !== 'password' || isPwdNonEmpty) {
|
|
130
133
|
bWriteUpdate = true;
|
|
131
134
|
}
|
|
@@ -19,13 +19,16 @@ export default function {{COMPONENT_CLASS_NAME}}(props) {
|
|
|
19
19
|
gridContainer.cols = gridRepeat;
|
|
20
20
|
gridContainer.alignItems = 'start';
|
|
21
21
|
|
|
22
|
+
const flexContainer = {direction: 'column'};
|
|
23
|
+
flexContainer.gap = 2;
|
|
24
|
+
|
|
22
25
|
return (
|
|
23
26
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
24
27
|
{{! pick new delimiteres for mustache }}
|
|
25
28
|
{{=<% %>=}}
|
|
26
29
|
<Grid container={gridContainer}>
|
|
27
30
|
{children.map((child, i) => (
|
|
28
|
-
<Flex container={
|
|
31
|
+
<Flex container={flexContainer} key={`r-${i + 1}`}>
|
|
29
32
|
{child}
|
|
30
33
|
</Flex>
|
|
31
34
|
))}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{COMPONENT_KEY}}",
|
|
3
|
-
"label": "{{COMPONENT_LABEL}}",
|
|
4
|
-
"description": "{{DESCRIPTION}}",
|
|
5
|
-
"organization": "{{ORGANIZATION}}",
|
|
6
|
-
"version": "{{VERSION}}",
|
|
7
|
-
"library": "{{LIBRARY}}",
|
|
8
|
-
"allowedApplications": {{{ALLOWEDAPPS}}},
|
|
9
|
-
"componentKey": "{{COMPONENT_KEY}}",
|
|
10
|
-
"type": "{{TYPE}}",
|
|
11
|
-
"subtype": {{{SUB_TYPE}}},
|
|
12
|
-
{{#IS_TEMPLATE}}
|
|
13
|
-
"icon": "images/pz-text-input-active.svg",
|
|
14
|
-
{{/IS_TEMPLATE}}
|
|
15
|
-
"properties": [
|
|
16
|
-
{
|
|
17
|
-
"name": "label",
|
|
18
|
-
"label": "Label value",
|
|
19
|
-
"format": "TEXT"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"name": "placeholder",
|
|
23
|
-
"label": "Placeholder",
|
|
24
|
-
"format": "TEXT"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"name": "visibility",
|
|
28
|
-
"label": "Visible",
|
|
29
|
-
"format": "VISIBILITY"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"name": "disabled",
|
|
33
|
-
"label": "Disabled",
|
|
34
|
-
"format": "DISABLED"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"name": "required",
|
|
38
|
-
"label": "Required",
|
|
39
|
-
"format": "REQUIRED"
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
"defaultConfig": {
|
|
43
|
-
{{#IS_PICKLIST}}
|
|
44
|
-
"label": "@L $this.label",
|
|
45
|
-
"placeholder": "@L Select...",
|
|
46
|
-
"listType": "associated",
|
|
47
|
-
"datasource": "@ASSOCIATED .$this.name"
|
|
48
|
-
{{/IS_PICKLIST}}
|
|
49
|
-
{{#IS_BOOLEAN}}
|
|
50
|
-
"trueText": "True",
|
|
51
|
-
"falseText": "False"
|
|
52
|
-
{{/IS_BOOLEAN}}
|
|
53
|
-
{{#IS_PHONE}}
|
|
54
|
-
"datasource": {
|
|
55
|
-
"source": "@DATASOURCE D_pyCountryCallingCodeList.pxResults",
|
|
56
|
-
"fields": {
|
|
57
|
-
"value": "@P .pyCallingCode"
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
{{/IS_PHONE}}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
import { withKnobs, text, boolean } from '@storybook/addon-knobs';
|
|
3
|
-
|
|
4
|
-
import {{COMPONENT_CLASS_NAME}} from './index.jsx';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: '{{COMPONENT_CLASS_NAME}}',
|
|
8
|
-
decorators: [withKnobs],
|
|
9
|
-
component: {{COMPONENT_CLASS_NAME}}
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const base{{COMPONENT_CLASS_NAME}} = () => {
|
|
13
|
-
const [value, setValue] = useState('test value');
|
|
14
|
-
|
|
15
|
-
const props = {
|
|
16
|
-
getPConnect: () => {
|
|
17
|
-
return {
|
|
18
|
-
getActionsApi: () => {
|
|
19
|
-
return {
|
|
20
|
-
updateFieldValue: (propName, value) => {
|
|
21
|
-
setValue(value);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
},
|
|
25
|
-
getStateProps: () => {
|
|
26
|
-
return { value: '.name' };
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
},
|
|
30
|
-
value,
|
|
31
|
-
placeholder: text('Placeholder', 'Test placeholder'),
|
|
32
|
-
disabled: boolean('Disabled', false),
|
|
33
|
-
readOnly: boolean('Disabled', false),
|
|
34
|
-
required: boolean('Disabled', false),
|
|
35
|
-
label: text('Label', 'Sample Label'),
|
|
36
|
-
testId: text('Test id', 'text-12344566')
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
return (
|
|
40
|
-
<>
|
|
41
|
-
<{{COMPONENT_CLASS_NAME}} {...props} />
|
|
42
|
-
</>
|
|
43
|
-
);
|
|
44
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
import { Input, Label } from '@pega/cosmos-react-core';
|
|
3
|
-
|
|
4
|
-
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
5
|
-
|
|
6
|
-
const {{COMPONENT_CLASS_NAME}} = props => {
|
|
7
|
-
const { getPConnect, value, placeholder, disabled, readOnly, required, label, testId } = props;
|
|
8
|
-
|
|
9
|
-
const pConn = getPConnect();
|
|
10
|
-
const actions = pConn.getActionsApi();
|
|
11
|
-
const propName = pConn?.getStateProps()?.value;
|
|
12
|
-
|
|
13
|
-
const handleOnChange = event => {
|
|
14
|
-
const { value: updatedValue } = event.target;
|
|
15
|
-
actions.updateFieldValue(propName, updatedValue);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
20
|
-
<Label>{label}</Label>
|
|
21
|
-
<Input
|
|
22
|
-
type='text'
|
|
23
|
-
value={value}
|
|
24
|
-
placeholder={placeholder}
|
|
25
|
-
disabled={disabled}
|
|
26
|
-
readOnly={readOnly}
|
|
27
|
-
required={required}
|
|
28
|
-
onChange={handleOnChange}
|
|
29
|
-
testId={testId}
|
|
30
|
-
/>
|
|
31
|
-
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
32
|
-
);
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
{{COMPONENT_CLASS_NAME}}.defaultProps = {
|
|
36
|
-
value: '',
|
|
37
|
-
placeholder: '',
|
|
38
|
-
disabled: false,
|
|
39
|
-
readOnly: false,
|
|
40
|
-
required: false,
|
|
41
|
-
testId: null
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
{{COMPONENT_CLASS_NAME}}.propTypes = {
|
|
45
|
-
label: PropTypes.string,
|
|
46
|
-
value: PropTypes.string,
|
|
47
|
-
placeholder: PropTypes.string,
|
|
48
|
-
getPConnect: PropTypes.func.isRequired,
|
|
49
|
-
disabled: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
50
|
-
readOnly: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
51
|
-
required: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
52
|
-
testId: PropTypes.string
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export default {{COMPONENT_CLASS_NAME}};
|