@pega/custom-dx-components 2.0.23 → 8.5.1
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 -2
- package/src/auth.js +20 -10
- package/src/cli.js +18 -0
- package/src/constants.js +35 -1
- package/src/tasks/authenticate/helper.js +39 -14
- package/src/tasks/authenticate/index.js +101 -48
- package/src/tasks/build/helper.js +3 -3
- package/src/tasks/build-all/helper.js +69 -0
- package/src/tasks/build-all/index.js +79 -0
- 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/config.json.mustache +14 -0
- 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-all/index.js +400 -0
- package/src/tasks/index.js +3 -0
- package/src/tasks/init/template/package.json.mustache +5 -2
- package/src/tasks/init/template/tasks.config.json +15 -6
- package/src/tasks/list/helper.js +19 -6
- package/src/tasks/publish/helper.js +3 -3
- package/src/tasks/publish-all/helper.js +20 -6
- package/src/tasks/publish-all/index.js +29 -18
- package/src/tasks/rename/index.js +315 -0
- package/src/tasks/validator/index.js +182 -7
- package/src/util.js +66 -3
- 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
|
@@ -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}};
|