@pega/custom-dx-components 2.0.15 → 2.0.16
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 +2 -2
- package/src/cli.js +0 -18
- package/src/tasks/authenticate/index.js +1 -3
- package/src/tasks/create/index.js +3 -6
- package/src/tasks/create/templates/Constellation/Field/Boolean/boolean-format.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/Boolean/demo.stories.jsx.mustache +18 -29
- package/src/tasks/create/templates/Constellation/Field/Boolean/index.jsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Date/date.js.mustache +67 -179
- package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.jsx.mustache +16 -40
- package/src/tasks/create/templates/Constellation/Field/Date/index.jsx.mustache +1 -3
- package/src/tasks/create/templates/Constellation/Field/DateTime/date-time.js.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/{date-utils.js.mustache → date-utils.js} +0 -1
- package/src/tasks/create/templates/Constellation/Field/DateTime/date.js.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.jsx.mustache +15 -40
- package/src/tasks/create/templates/Constellation/Field/DateTime/index.jsx.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Decimal/demo.stories.jsx.mustache +17 -22
- package/src/tasks/create/templates/Constellation/Field/Decimal/index.jsx.mustache +1 -2
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.jsx.mustache +17 -25
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.jsx.mustache +4 -3
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.jsx.mustache +17 -22
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.jsx.mustache +2 -8
- package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.jsx.mustache +17 -22
- package/src/tasks/create/templates/Constellation/Field/Integer/index.jsx.mustache +1 -2
- package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.jsx.mustache +14 -42
- package/src/tasks/create/templates/Constellation/Field/Picklist/index.jsx.mustache +1 -44
- package/src/tasks/create/templates/Constellation/Field/Picklist/picklist.js.mustache +43 -0
- package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.jsx.mustache +16 -21
- package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.jsx.mustache +16 -20
- package/src/tasks/create/templates/Constellation/Field/Text-Email/index.jsx.mustache +2 -44
- package/src/tasks/create/templates/Constellation/Field/Text-Email/text-email.js.mustache +43 -0
- package/src/tasks/create/templates/Constellation/{Template/DETAILS/StatusWork.jsx.mustache → Field/Text-Input/StatusWork.js} +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.jsx.mustache +17 -21
- package/src/tasks/create/templates/Constellation/Field/Text-Input/index.jsx.mustache +3 -46
- package/src/tasks/create/templates/Constellation/Field/Text-Input/text-input.js.mustache +43 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.jsx.mustache +17 -21
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.jsx.mustache +2 -44
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/text-paragraph.js.mustache +43 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.jsx.mustache +17 -19
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.jsx.mustache +2 -46
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/text-phone.js.mustache +43 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.jsx.mustache +17 -19
- package/src/tasks/create/templates/Constellation/Field/Text-URL/index.jsx.mustache +3 -174
- package/src/tasks/create/templates/Constellation/Field/Text-URL/text-url.js.mustache +172 -0
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/demo.stories.jsx.mustache +16 -24
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/time-of-day.js.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS/index.jsx.mustache +29 -14
- package/src/tasks/create/templates/Constellation/Template/DETAILS/utils.js.mustache +77 -3
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.jsx.mustache +29 -14
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.js.mustache +74 -3
- package/src/tasks/create/templates/Constellation/Template/FORM/index.jsx.mustache +10 -6
- package/src/tasks/create/templates/Constellation/Template/FORM-region/index.jsx.mustache +8 -10
- package/src/tasks/create/templates/Constellation/Template/PAGE/{GetNextWork.jsx.mustache → GetNextWork.js.mustache} +0 -6
- package/src/tasks/create/templates/Constellation/Template/PAGE/index.jsx.mustache +7 -9
- package/src/tasks/create/templates/Constellation/Template/PAGE/utils.js.mustache +1 -4
- package/src/tasks/create/templates/Constellation/Widget/CASE/index.jsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Widget/PAGE/index.jsx.mustache +8 -8
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/{Avatar.jsx.mustache → Avatar.js.mustache} +0 -2
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/{Operator.jsx.mustache → Operator.js.mustache} +1 -2
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.jsx.mustache +9 -9
- package/src/tasks/delete/helper.js +0 -4
- package/src/tasks/delete/index.js +0 -4
- package/src/tasks/index.js +0 -3
- package/src/tasks/init/index.js +1 -1
- package/src/tasks/init/template/.eslintrc.json +5 -186
- package/src/tasks/init/template/package.json.mustache +4 -19
- package/src/tasks/init/template/tasks.config.json +0 -1
- package/src/tasks/list/index.js +0 -4
- package/src/tasks/{bundle → publish/bundle}/builder/index.js +0 -0
- package/src/tasks/{bundle → publish/bundle}/builder/modules.js +0 -0
- package/src/tasks/{bundle → publish/bundle}/builder/paths.js +0 -0
- package/src/tasks/{bundle → publish/bundle}/builder/webpack.config.js +2 -0
- package/src/tasks/{bundle → publish/bundle}/index.js +2 -2
- package/src/tasks/publish/index.js +1 -14
- package/src/util.js +0 -10
- package/src/tasks/build/helper.js +0 -123
- package/src/tasks/build/index.js +0 -54
- package/src/tasks/create/templates/Constellation/Field/Boolean/mock.stories.js.mustache +0 -21
- package/src/tasks/create/templates/Constellation/Field/Date/DateFormatter.js.mustache +0 -61
- package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.jsx.mustache +0 -41
- package/src/tasks/create/templates/Constellation/Field/Date/mock.stories.js.mustache +0 -23
- package/src/tasks/create/templates/Constellation/Field/DateTime/mock.stories.js.mustache +0 -23
- package/src/tasks/create/templates/Constellation/Field/Decimal/mock.stories.js.mustache +0 -21
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/mock.stories.js.mustache +0 -23
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/mock.stories.js.mustache +0 -21
- package/src/tasks/create/templates/Constellation/Field/Integer/mock.stories.js.mustache +0 -21
- package/src/tasks/create/templates/Constellation/Field/Picklist/mock.stories.js.mustache +0 -67
- package/src/tasks/create/templates/Constellation/Field/Text/mock.stories.js.mustache +0 -13
- package/src/tasks/create/templates/Constellation/Field/Text-Email/mock.stories.js.mustache +0 -22
- package/src/tasks/create/templates/Constellation/Field/Text-Input/StatusWork.jsx +0 -26
- package/src/tasks/create/templates/Constellation/Field/Text-Input/mock.stories.js.mustache +0 -21
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/mock.stories.js.mustache +0 -20
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/mock.stories.js.mustache +0 -37
- package/src/tasks/create/templates/Constellation/Field/Text-URL/mock.stories.js.mustache +0 -22
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/mock.stories.js.mustache +0 -20
- package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.jsx.mustache +0 -110
- package/src/tasks/create/templates/Constellation/Template/DETAILS/mock.stories.js.mustache +0 -179
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/StatusWork.jsx.mustache +0 -26
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.jsx.mustache +0 -118
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/mock.stories.js.mustache +0 -215
- package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.jsx.mustache +0 -89
- package/src/tasks/create/templates/Constellation/Template/FORM/mock.stories.js.mustache +0 -125
- package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.jsx.mustache +0 -100
- package/src/tasks/create/templates/Constellation/Template/FORM-region/mock.stories.js.mustache +0 -131
- package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.jsx.mustache +0 -102
- package/src/tasks/create/templates/Constellation/Template/PAGE/mock.stories.js.mustache +0 -94
- package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.jsx.mustache +0 -78
- package/src/tasks/create/templates/Constellation/Widget/CASE/mock.stories.js.mustache +0 -389
- package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.jsx.mustache +0 -30
- package/src/tasks/create/templates/Constellation/Widget/PAGE/mock.stories.js.mustache +0 -22
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.jsx.mustache +0 -68
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/mock.stories.js.mustache +0 -51
- package/src/tasks/delete-all/helper.js +0 -175
- package/src/tasks/delete-all/index.js +0 -49
- package/src/tasks/init/template/.eslintignore +0 -8
- package/src/tasks/linter/index.js +0 -46
- package/src/tasks/publish-all/helper.js +0 -139
- package/src/tasks/publish-all/index.js +0 -84
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export const configProps = {
|
|
2
|
-
value: '2023-01-31T12:23:00.000Z',
|
|
3
|
-
validatemessage: '',
|
|
4
|
-
label: 'Date Label',
|
|
5
|
-
hideLabel: false,
|
|
6
|
-
helperText: 'Date helper text',
|
|
7
|
-
nextYearRange: '10',
|
|
8
|
-
previousYearRange: '10',
|
|
9
|
-
showWeekNumber: true,
|
|
10
|
-
testId: '12345678',
|
|
11
|
-
showAsFormattedText: true,
|
|
12
|
-
additionalProps: {},
|
|
13
|
-
displayMode: '',
|
|
14
|
-
variant: '',
|
|
15
|
-
hasSuggestions: false,
|
|
16
|
-
readOnly: false,
|
|
17
|
-
required: false,
|
|
18
|
-
disabled: false
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const stateProps = {
|
|
22
|
-
value: '.DateLabel'
|
|
23
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export const configProps = {
|
|
2
|
-
value: '2023-01-24T16:45:00.000Z',
|
|
3
|
-
validatemessage: '',
|
|
4
|
-
label: 'DateTime Label',
|
|
5
|
-
hideLabel: false,
|
|
6
|
-
helperText: 'DateTime helper text',
|
|
7
|
-
withSeconds: false,
|
|
8
|
-
nextYearRange: 10,
|
|
9
|
-
previousYearRange: 5,
|
|
10
|
-
showWeekNumber: false,
|
|
11
|
-
testId: '12345678',
|
|
12
|
-
additionalProps: {},
|
|
13
|
-
displayMode: '',
|
|
14
|
-
variant: '',
|
|
15
|
-
hasSuggestions: false,
|
|
16
|
-
readOnly: false,
|
|
17
|
-
required: false,
|
|
18
|
-
disabled: false
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const stateProps = {
|
|
22
|
-
value: '.DateTimeLabel'
|
|
23
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export const configProps = {
|
|
2
|
-
value: '',
|
|
3
|
-
label: 'Decimal Sample',
|
|
4
|
-
showGroupSeparators: true,
|
|
5
|
-
placeholder: 'Decimal Placeholder',
|
|
6
|
-
helperText: 'Decimal Helper Text',
|
|
7
|
-
testId: 'decimal-12345678',
|
|
8
|
-
hasSuggestions: false
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export const stateProps = {
|
|
12
|
-
value: '.DecimalSample',
|
|
13
|
-
hasSuggestions: false
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const fieldMetadata = {
|
|
17
|
-
classID: 'DIXL-MediaCo-Work-NewService',
|
|
18
|
-
type: 'Decimal',
|
|
19
|
-
displayAs: 'pxNumber',
|
|
20
|
-
label: 'Decimal sample'
|
|
21
|
-
};
|
package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/mock.stories.js.mustache
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export const configProps = {
|
|
2
|
-
value: '',
|
|
3
|
-
label: 'Currency Sample',
|
|
4
|
-
currencyISOCode: 'USD',
|
|
5
|
-
allowDecimals: true,
|
|
6
|
-
alwaysShowISOCode: true,
|
|
7
|
-
placeholder: 'Currency Placeholder',
|
|
8
|
-
helperText: 'Currency Helper Text',
|
|
9
|
-
testId: 'currency-12345678',
|
|
10
|
-
hasSuggestions: false
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const stateProps = {
|
|
14
|
-
value: '.CurrencySample',
|
|
15
|
-
hasSuggestions: false
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const fieldMetadata = {
|
|
19
|
-
classID: 'DIXL-MediaCo-Work-NewService',
|
|
20
|
-
type: 'Decimal',
|
|
21
|
-
displayAs: 'pxCurrency',
|
|
22
|
-
label: 'Currency sample'
|
|
23
|
-
};
|
package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/mock.stories.js.mustache
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export const configProps = {
|
|
2
|
-
value: '',
|
|
3
|
-
label: 'Percentage Sample',
|
|
4
|
-
showGroupSeparators: true,
|
|
5
|
-
placeholder: 'Percentage Placeholder',
|
|
6
|
-
helperText: 'Percentage Helper Text',
|
|
7
|
-
testId: 'percentage-12345678',
|
|
8
|
-
hasSuggestions: false
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export const stateProps = {
|
|
12
|
-
value: '.PercentageSample',
|
|
13
|
-
hasSuggestions: false
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const fieldMetadata = {
|
|
17
|
-
classID: 'DIXL-MediaCo-Work-NewService',
|
|
18
|
-
type: 'Decimal',
|
|
19
|
-
displayAs: 'pxPercentage',
|
|
20
|
-
label: 'Percentage sample'
|
|
21
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export const configProps = {
|
|
2
|
-
value: '',
|
|
3
|
-
label: 'Integer Sample',
|
|
4
|
-
showGroupSeparators: true,
|
|
5
|
-
placeholder: 'Integer Placeholder',
|
|
6
|
-
helperText: 'Integer Helper Text',
|
|
7
|
-
testId: 'integer-12345678',
|
|
8
|
-
hasSuggestions: false
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export const stateProps = {
|
|
12
|
-
value: '.IntegerSample',
|
|
13
|
-
hasSuggestions: false
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const fieldMetadata = {
|
|
17
|
-
classID: 'DIXL-MediaCo-Work-NewService',
|
|
18
|
-
type: 'Integer',
|
|
19
|
-
displayAs: 'pxInteger',
|
|
20
|
-
label: 'Integer sample'
|
|
21
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
export const configProps = {
|
|
2
|
-
value: '',
|
|
3
|
-
label: 'Picklist Sample',
|
|
4
|
-
placeholder: 'Select...',
|
|
5
|
-
listType: 'associated',
|
|
6
|
-
datasource: [
|
|
7
|
-
{
|
|
8
|
-
key: 'Option 1',
|
|
9
|
-
value: 'Option 1'
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
key: 'Option 2',
|
|
13
|
-
value: 'Option 2'
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
key: 'Option 3',
|
|
17
|
-
value: 'Option 3'
|
|
18
|
-
}
|
|
19
|
-
],
|
|
20
|
-
helperText: 'Picklist Helper Text',
|
|
21
|
-
testId: 'picklist-12345678',
|
|
22
|
-
hasSuggestions: false
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const stateProps = {
|
|
26
|
-
value: '.PicklistSample',
|
|
27
|
-
placeholder: 'Select...',
|
|
28
|
-
datasource: '.PicklistSample',
|
|
29
|
-
hasSuggestions: false
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export const rawMetadata = {
|
|
33
|
-
type: 'Dropdown',
|
|
34
|
-
config: {
|
|
35
|
-
value: '@P .PicklistSample',
|
|
36
|
-
label: '@L Picklist Sample',
|
|
37
|
-
placeholder: '@L Select...',
|
|
38
|
-
listType: 'associated',
|
|
39
|
-
datasource: '@ASSOCIATED .PicklistSample',
|
|
40
|
-
helperText: '@L Picklist Helper Text',
|
|
41
|
-
testId: 'picklist-12345678'
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export const fieldMetadata = {
|
|
46
|
-
classID: 'DIXL-MediaCo-Work-NewService',
|
|
47
|
-
type: 'Text',
|
|
48
|
-
displayAs: 'pxDropdown',
|
|
49
|
-
label: 'Picklist sample',
|
|
50
|
-
datasource: {
|
|
51
|
-
tableType: 'PromptList',
|
|
52
|
-
records: [
|
|
53
|
-
{
|
|
54
|
-
key: 'Option 1',
|
|
55
|
-
value: 'Option 1'
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
key: 'Option 2',
|
|
59
|
-
value: 'Option 2'
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
key: 'Option 3',
|
|
63
|
-
value: 'Option 3'
|
|
64
|
-
}
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export const configProps = {
|
|
2
|
-
value: '',
|
|
3
|
-
label: 'Text Sample',
|
|
4
|
-
placeholder: 'Text Placeholder',
|
|
5
|
-
helperText: 'Text Helper Text',
|
|
6
|
-
testId: 'Text-12345678',
|
|
7
|
-
hasSuggestions: false
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const stateProps = {
|
|
11
|
-
value: '.TextSample',
|
|
12
|
-
hasSuggestions: false
|
|
13
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export const configProps = {
|
|
2
|
-
value: '',
|
|
3
|
-
label: 'Email Sample',
|
|
4
|
-
placeholder: 'Email Placeholder',
|
|
5
|
-
helperText: 'Email Helper Text',
|
|
6
|
-
testId: 'email-12345678',
|
|
7
|
-
hasSuggestions: false
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const stateProps = {
|
|
11
|
-
value: '.EmailSample',
|
|
12
|
-
hasSuggestions: false
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const fieldMetadata = {
|
|
16
|
-
classID: 'DIXL-MediaCo-Work-NewService',
|
|
17
|
-
type: 'Text',
|
|
18
|
-
maxLength: 256,
|
|
19
|
-
displayAs: 'pxEmail',
|
|
20
|
-
label: 'Email sample',
|
|
21
|
-
validateAs: 'ValidEmailAddress'
|
|
22
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Status } from "@pega/cosmos-react-core";
|
|
2
|
-
|
|
3
|
-
export default function StatusWorkRenderer({ value }) {
|
|
4
|
-
let variant = "info";
|
|
5
|
-
|
|
6
|
-
const warnStrings = ["fail", "cancel", "reject", "revoke", "stopped", "warn"];
|
|
7
|
-
const infoStrings = ["open", "hold", "info", "new"];
|
|
8
|
-
const successStrings = ["resolved", "completed", "success"];
|
|
9
|
-
const pendingStrings = ["pending"];
|
|
10
|
-
|
|
11
|
-
if (new RegExp(warnStrings.join("|"), "i").test(value)) {
|
|
12
|
-
variant = "warn";
|
|
13
|
-
} else if (new RegExp(infoStrings.join("|"), "i").test(value)) {
|
|
14
|
-
variant = "info";
|
|
15
|
-
} else if (new RegExp(successStrings.join("|"), "i").test(value)) {
|
|
16
|
-
variant = "success";
|
|
17
|
-
} else if (new RegExp(pendingStrings.join("|"), "i").test(value)) {
|
|
18
|
-
variant = "pending";
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<Status type="rectangle" variant={variant}>
|
|
23
|
-
{value}
|
|
24
|
-
</Status>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export const configProps = {
|
|
2
|
-
value: '',
|
|
3
|
-
label: 'TextInput Sample',
|
|
4
|
-
placeholder: 'TextInput Placeholder',
|
|
5
|
-
helperText: 'TextInput Helper Text',
|
|
6
|
-
testId: 'TextInput-12345678',
|
|
7
|
-
hasSuggestions: false
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const stateProps = {
|
|
11
|
-
value: '.TextInputSample',
|
|
12
|
-
hasSuggestions: false
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const fieldMetadata = {
|
|
16
|
-
classID: 'DIXL-MediaCo-Work-NewService',
|
|
17
|
-
type: 'Text',
|
|
18
|
-
maxLength: 256,
|
|
19
|
-
displayAs: 'pxTextInput',
|
|
20
|
-
label: 'TextInput Sample'
|
|
21
|
-
};
|
package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/mock.stories.js.mustache
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export const configProps = {
|
|
2
|
-
value: '',
|
|
3
|
-
label: 'Paragraph Sample',
|
|
4
|
-
placeholder: 'Paragraph Placeholder',
|
|
5
|
-
helperText: 'Paragraph Helper Text',
|
|
6
|
-
testId: 'paragraph-12345678',
|
|
7
|
-
hasSuggestions: false
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const fieldMetadata = {
|
|
11
|
-
classID: 'DIXL-MediaCo-Work-NewService',
|
|
12
|
-
type: 'Text',
|
|
13
|
-
displayAs: 'pxTextArea',
|
|
14
|
-
label: 'Paragraph sample'
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const stateProps = {
|
|
18
|
-
value: '.ParagraphSample',
|
|
19
|
-
hasSuggestions: false
|
|
20
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export const configProps = {
|
|
2
|
-
value: '',
|
|
3
|
-
label: 'Phone Sample',
|
|
4
|
-
datasource: {
|
|
5
|
-
source: [
|
|
6
|
-
{
|
|
7
|
-
value: '+1'
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
value: '+91'
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
value: '+48'
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
value: '+44'
|
|
17
|
-
}
|
|
18
|
-
],
|
|
19
|
-
fields: {}
|
|
20
|
-
},
|
|
21
|
-
showCountryCode: true,
|
|
22
|
-
placeholder: 'Phone Placeholder',
|
|
23
|
-
helperText: 'Phone Helper Text',
|
|
24
|
-
testId: 'phone-12345678',
|
|
25
|
-
hasSuggestions: false
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export const stateProps = {
|
|
29
|
-
value: '.PhoneSample',
|
|
30
|
-
datasource: {
|
|
31
|
-
source: 'D_pyCountryCallingCodeList.pxResults',
|
|
32
|
-
fields: {
|
|
33
|
-
value: '.pyCallingCode'
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
hasSuggestions: false
|
|
37
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export const configProps = {
|
|
2
|
-
value: '',
|
|
3
|
-
label: 'URL Sample',
|
|
4
|
-
placeholder: 'URL Placeholder',
|
|
5
|
-
helperText: 'URL Helper Text',
|
|
6
|
-
testId: 'url-12345678',
|
|
7
|
-
hasSuggestions: false
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const fieldMetadata = {
|
|
11
|
-
classID: 'DIXL-MediaCo-Work-NewService',
|
|
12
|
-
type: 'Text',
|
|
13
|
-
maxLength: 256,
|
|
14
|
-
displayAs: 'pxURL',
|
|
15
|
-
label: 'URL sample',
|
|
16
|
-
validateAs: 'pxIsValidURL'
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const stateProps = {
|
|
20
|
-
value: '.URLSample',
|
|
21
|
-
hasSuggestions: false
|
|
22
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export const configProps = {
|
|
2
|
-
value: '13:30',
|
|
3
|
-
validatemessage: '',
|
|
4
|
-
label: 'TimeOfDay Label',
|
|
5
|
-
hideLabel: false,
|
|
6
|
-
helperText: 'TimeOfDay helper text',
|
|
7
|
-
withSeconds: false,
|
|
8
|
-
testId: '12345678',
|
|
9
|
-
additionalProps: {},
|
|
10
|
-
displayMode: '',
|
|
11
|
-
variant: '',
|
|
12
|
-
hasSuggestions: false,
|
|
13
|
-
readOnly: false,
|
|
14
|
-
required: false,
|
|
15
|
-
disabled: false
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const stateProps = {
|
|
19
|
-
value: '.TimeOfDayLabel'
|
|
20
|
-
};
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { Text, FieldValueList, Button, DateTimeDisplay, useTheme } from '@pega/cosmos-react-core';
|
|
2
|
-
import {{COMPONENT_CLASS_NAME}} from './index';
|
|
3
|
-
import { pyReviewRaw, pyReviewResolved, regionChildrenResolved } from './mock.stories';
|
|
4
|
-
import StatusWorkRenderer from './StatusWork.jsx';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: '{{COMPONENT_CLASS_NAME}}',
|
|
8
|
-
component: {{COMPONENT_CLASS_NAME}}
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
const Template = args => {
|
|
12
|
-
const regionAChildren = pyReviewRaw.children[0].children.map(child => {
|
|
13
|
-
return Primary.args.getPConnect().createComponent(child);
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
return <{{COMPONENT_CLASS_NAME}} {...args}>{regionAChildren}</{{COMPONENT_CLASS_NAME}}>;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const Primary = Template.bind({});
|
|
20
|
-
|
|
21
|
-
Primary.args = {
|
|
22
|
-
template: 'MyCo_MyComponents_NewDetailsTemplate',
|
|
23
|
-
showHighlightedData: true,
|
|
24
|
-
label: 'Test Details',
|
|
25
|
-
showLabel: true,
|
|
26
|
-
getPConnect: () => {
|
|
27
|
-
return {
|
|
28
|
-
getChildren: () => {
|
|
29
|
-
return pyReviewRaw.children;
|
|
30
|
-
},
|
|
31
|
-
getRawMetadata: () => {
|
|
32
|
-
return pyReviewRaw;
|
|
33
|
-
},
|
|
34
|
-
getInheritedProps: () => {
|
|
35
|
-
return pyReviewRaw.config.inheritedProps;
|
|
36
|
-
},
|
|
37
|
-
createComponent: config => {
|
|
38
|
-
switch (config.config.value) {
|
|
39
|
-
case '@P .pyStatusWork':
|
|
40
|
-
return renderField(pyReviewResolved.highlightedData[0].config);
|
|
41
|
-
case '@P .pyID':
|
|
42
|
-
return renderField(pyReviewResolved.highlightedData[1].config);
|
|
43
|
-
case '@P .pxCreateDateTime':
|
|
44
|
-
return renderField(pyReviewResolved.highlightedData[2].config);
|
|
45
|
-
case '@USER .pxCreateOperator':
|
|
46
|
-
return renderField(pyReviewResolved.highlightedData[3].config);
|
|
47
|
-
case '@P .pySLADeadline':
|
|
48
|
-
return renderField(regionChildrenResolved[0]);
|
|
49
|
-
case '@P .pySLAGoal':
|
|
50
|
-
return renderField(regionChildrenResolved[1]);
|
|
51
|
-
case '@P .pySLAStartTime':
|
|
52
|
-
return renderField(regionChildrenResolved[2]);
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
setInheritedProp: () => {},
|
|
56
|
-
resolveConfigProps: () => {}
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
const renderField = resolvedProps => {
|
|
62
|
-
const {
|
|
63
|
-
displayAsStatus = false,
|
|
64
|
-
displayMode,
|
|
65
|
-
value = '',
|
|
66
|
-
label = '',
|
|
67
|
-
theme = useTheme()
|
|
68
|
-
} = resolvedProps;
|
|
69
|
-
|
|
70
|
-
const variant = displayMode === 'LABELS_LEFT' ? 'inline' : 'stacked';
|
|
71
|
-
|
|
72
|
-
let val =
|
|
73
|
-
value != '' ? (
|
|
74
|
-
<Text variant='h1' as='span'>
|
|
75
|
-
{value}
|
|
76
|
-
</Text>
|
|
77
|
-
) : (
|
|
78
|
-
''
|
|
79
|
-
);
|
|
80
|
-
|
|
81
|
-
if (label === 'Create date/time')
|
|
82
|
-
val = <DateTimeDisplay value={value} variant='datetime' format='long' clockFormat={null} />;
|
|
83
|
-
|
|
84
|
-
if (displayAsStatus === true) val = <StatusWorkRenderer value={value} />;
|
|
85
|
-
|
|
86
|
-
if (label === 'Create Operator')
|
|
87
|
-
val = (
|
|
88
|
-
<Button
|
|
89
|
-
variant='link'
|
|
90
|
-
style={
|
|
91
|
-
label !== null
|
|
92
|
-
? { width: 'max-content', height: theme.components.input.height }
|
|
93
|
-
: undefined
|
|
94
|
-
}
|
|
95
|
-
>
|
|
96
|
-
{value.userName}
|
|
97
|
-
</Button>
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
if (variant === 'inline') {
|
|
101
|
-
val = value || <span aria-hidden='true'>––</span>;
|
|
102
|
-
} else {
|
|
103
|
-
val = (
|
|
104
|
-
<Text variant='h1' as='span'>
|
|
105
|
-
{val}
|
|
106
|
-
</Text>
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
return <FieldValueList variant={variant} fields={[{ name: label, value: val }]} />;
|
|
110
|
-
};
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
export const pyReviewRaw = {
|
|
2
|
-
name: 'pyReview',
|
|
3
|
-
type: 'View',
|
|
4
|
-
config: {
|
|
5
|
-
template: 'Details',
|
|
6
|
-
ruleClass: 'MyCo-MyCompon-Work-MyComponents',
|
|
7
|
-
showLabel: true,
|
|
8
|
-
label: '@L Details',
|
|
9
|
-
localeReference: '@LR MYCO-MYCOMPON-WORK-MYCOMPONENTS!VIEW!PYREVIEW',
|
|
10
|
-
showHighlightedData: true,
|
|
11
|
-
highlightedData: [
|
|
12
|
-
{
|
|
13
|
-
type: 'TextInput',
|
|
14
|
-
config: {
|
|
15
|
-
value: '@P .pyStatusWork',
|
|
16
|
-
label: '@L Work Status',
|
|
17
|
-
displayMode: 'STACKED_LARGE_VAL',
|
|
18
|
-
displayAsStatus: true
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
type: 'TextInput',
|
|
23
|
-
config: {
|
|
24
|
-
value: '@P .pyID',
|
|
25
|
-
label: '@L Case ID',
|
|
26
|
-
displayMode: 'STACKED_LARGE_VAL'
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
type: 'DateTime',
|
|
31
|
-
config: {
|
|
32
|
-
value: '@P .pxCreateDateTime',
|
|
33
|
-
label: '@L Create date/time',
|
|
34
|
-
displayMode: 'STACKED_LARGE_VAL'
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
type: 'UserReference',
|
|
39
|
-
config: {
|
|
40
|
-
label: '@L Create Operator',
|
|
41
|
-
value: '@USER .pxCreateOperator',
|
|
42
|
-
placeholder: 'Select...',
|
|
43
|
-
displayMode: 'STACKED_LARGE_VAL'
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
],
|
|
47
|
-
inheritedProps: [
|
|
48
|
-
{
|
|
49
|
-
prop: 'label',
|
|
50
|
-
value: '@L Details'
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
prop: 'showLabel',
|
|
54
|
-
value: true
|
|
55
|
-
}
|
|
56
|
-
]
|
|
57
|
-
},
|
|
58
|
-
children: [
|
|
59
|
-
{
|
|
60
|
-
name: 'A',
|
|
61
|
-
type: 'Region',
|
|
62
|
-
getPConnect: () => {
|
|
63
|
-
return {
|
|
64
|
-
getRawMetadata: () => {
|
|
65
|
-
return pyReviewRaw.children[0];
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
},
|
|
69
|
-
children: [
|
|
70
|
-
{
|
|
71
|
-
type: 'DateTime',
|
|
72
|
-
config: {
|
|
73
|
-
value: '@P .pySLADeadline',
|
|
74
|
-
label: '@L SLA Deadline'
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
type: 'DateTime',
|
|
79
|
-
config: {
|
|
80
|
-
value: '@P .pySLAGoal',
|
|
81
|
-
label: '@L SLA Goal'
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
type: 'RadioButtons',
|
|
86
|
-
config: {
|
|
87
|
-
value: '@P .pySLAStartTime',
|
|
88
|
-
label: '@L SLA Start Time',
|
|
89
|
-
listType: 'associated',
|
|
90
|
-
datasource: '@ASSOCIATED .pySLAStartTime'
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
]
|
|
94
|
-
}
|
|
95
|
-
],
|
|
96
|
-
classID: 'MyCo-MyCompon-Work-MyComponents'
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
export const pyReviewResolved = {
|
|
100
|
-
readOnly: true,
|
|
101
|
-
template: 'Details',
|
|
102
|
-
ruleClass: 'MyCo-MyCompon-Work-MyComponents',
|
|
103
|
-
showLabel: true,
|
|
104
|
-
label: 'Details',
|
|
105
|
-
localeReference: 'MYCO-MYCOMPON-WORK-MYCOMPONENTS!VIEW!PYREVIEW',
|
|
106
|
-
showHighlightedData: true,
|
|
107
|
-
highlightedData: [
|
|
108
|
-
{
|
|
109
|
-
type: 'TextInput',
|
|
110
|
-
config: {
|
|
111
|
-
value: 'New',
|
|
112
|
-
label: 'Work Status',
|
|
113
|
-
displayMode: 'STACKED_LARGE_VAL',
|
|
114
|
-
displayAsStatus: true
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
type: 'TextInput',
|
|
119
|
-
config: {
|
|
120
|
-
value: 'M-1002',
|
|
121
|
-
label: 'Case ID',
|
|
122
|
-
displayMode: 'STACKED_LARGE_VAL'
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
type: 'DateTime',
|
|
127
|
-
config: {
|
|
128
|
-
value: '2022-12-11T20:06:27.232Z',
|
|
129
|
-
label: 'Create date/time',
|
|
130
|
-
displayMode: 'STACKED_LARGE_VAL'
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
type: 'UserReference',
|
|
135
|
-
config: {
|
|
136
|
-
label: 'Create Operator',
|
|
137
|
-
value: {
|
|
138
|
-
userId: 'conns',
|
|
139
|
-
userName: 'Sara Connor'
|
|
140
|
-
},
|
|
141
|
-
placeholder: 'Select...',
|
|
142
|
-
displayMode: 'STACKED_LARGE_VAL'
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
],
|
|
146
|
-
displayMode: 'LABELS_LEFT'
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
export const regionChildrenResolved = [
|
|
150
|
-
{
|
|
151
|
-
readOnly: true,
|
|
152
|
-
value: '',
|
|
153
|
-
label: 'SLA Deadline',
|
|
154
|
-
displayMode: 'LABELS_LEFT'
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
readOnly: true,
|
|
158
|
-
value: '',
|
|
159
|
-
label: 'SLA Goal',
|
|
160
|
-
displayMode: 'LABELS_LEFT'
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
readOnly: true,
|
|
164
|
-
value: '',
|
|
165
|
-
label: 'SLA Start Time',
|
|
166
|
-
listType: 'associated',
|
|
167
|
-
datasource: [
|
|
168
|
-
{
|
|
169
|
-
key: 'AssignmentCreation',
|
|
170
|
-
value: 'The creation time of the Assignment'
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
key: 'CurrentTime',
|
|
174
|
-
value: 'Current Date Time'
|
|
175
|
-
}
|
|
176
|
-
],
|
|
177
|
-
displayMode: 'LABELS_LEFT'
|
|
178
|
-
}
|
|
179
|
-
];
|