@pega/custom-dx-components 26.1.10-alpha-0.6 → 26.1.10
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/tasks/create/templates/Constellation/Template/PAGE/GetNextWork.tsx.mustache +1 -1
- package/src/tasks/init/template/package.json.mustache +1 -1
- package/src/tasks/init/template/src/globals.d.ts +5 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPage/GetNextWork.tsx +1 -1
- package/tests/assets/original/components/create/shared/PConnProps.d.ts +45 -0
- package/tests/assets/original/components/create/shared/create-nonce.ts +5 -0
- package/tests/assets/original/components/create/shared/suggestions-handler.ts +9 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPage/GetNextWork.tsx +1 -1
- package/tests/assets/original/components/createAll/Constellation/shared/PConnProps.d.ts +45 -0
- package/tests/assets/original/components/createAll/Constellation/shared/create-nonce.ts +5 -0
- package/tests/assets/original/components/createAll/Constellation/shared/suggestions-handler.ts +9 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPage/GetNextWork.tsx +1 -1
- package/tests/assets/original/components/createAll/Launchpad/shared/PConnProps.d.ts +45 -0
- package/tests/assets/original/components/createAll/Launchpad/shared/create-nonce.ts +5 -0
- package/tests/assets/original/components/createAll/Launchpad/shared/suggestions-handler.ts +9 -0
package/package.json
CHANGED
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"@babel/preset-typescript": "^7.27.1",
|
|
111
111
|
"@pega/configs": "^0.16.3",
|
|
112
112
|
"@pega/custom-dx-components": "~26.1.10",
|
|
113
|
-
"@pega/pcore-pconnect-typedefs": "^
|
|
113
|
+
"@pega/pcore-pconnect-typedefs": "^5.1.0",
|
|
114
114
|
"@storybook/addon-docs": "^9.1.7",
|
|
115
115
|
"@storybook/addon-essentials": "^9.0.0-alpha.12",
|
|
116
116
|
"@storybook/addon-links": "^9.1.7",
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { PConnect } from '@pega/pcore-pconnect-typedefs';
|
|
2
|
+
|
|
3
|
+
// PConnProps.d.ts
|
|
4
|
+
// This gives us a place to have each component (which is most DX Components) that is
|
|
5
|
+
// expected to have a getPConnect extend its props (from BaseProps)
|
|
6
|
+
// such that every component will be expected to have a getPConnect() function
|
|
7
|
+
// that returns a PConnect object. (new/better way of doing .propTypes).
|
|
8
|
+
// This PConnProps can be extended to include other props that we know are in every component
|
|
9
|
+
export interface PConnProps {
|
|
10
|
+
// getPConnect should exist for every C11n component. (add @ts-ignore in special cases where it isn't)
|
|
11
|
+
getPConnect: () => typeof PConnect;
|
|
12
|
+
|
|
13
|
+
// Allow any/all other key/value pairs in the BaseProps for now
|
|
14
|
+
// TODO: refine which other props are always expected for various component
|
|
15
|
+
// types and consider further interface "subclassing". For example, we may
|
|
16
|
+
// want to create a "BasePropsForm" that gives guidance on required, readonly, etc.
|
|
17
|
+
// and any other props that every Form component expects.
|
|
18
|
+
// For example, see the PConnFieldProps below.
|
|
19
|
+
// NOTE: if you uncomment the line below, the PConnProps type will allow
|
|
20
|
+
// otherwise undefined types to appear. This can be helpful for debugging
|
|
21
|
+
// or when adding new components whose types aren't yet known.
|
|
22
|
+
// [key: string]: any;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// PConnFieldProps extends PConnProps to bring in the common properties that are
|
|
26
|
+
// associated with most field components (ex: Dropdown, TextInput, etc.) in the
|
|
27
|
+
// components/field directory
|
|
28
|
+
export interface PConnFieldProps extends PConnProps {
|
|
29
|
+
label: string;
|
|
30
|
+
required: boolean;
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
value: any;
|
|
33
|
+
validatemessage: string;
|
|
34
|
+
status?: string;
|
|
35
|
+
onChange?: any;
|
|
36
|
+
onBlur?: any;
|
|
37
|
+
readOnly: boolean;
|
|
38
|
+
testId: string;
|
|
39
|
+
helperText: string;
|
|
40
|
+
displayMode?: string;
|
|
41
|
+
hideLabel: boolean;
|
|
42
|
+
placeholder?: string;
|
|
43
|
+
fieldMetadata?: any;
|
|
44
|
+
additionalProps?: any;
|
|
45
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { PConnect } from '@pega/pcore-pconnect-typedefs';
|
|
2
|
+
|
|
3
|
+
// PConnProps.d.ts
|
|
4
|
+
// This gives us a place to have each component (which is most DX Components) that is
|
|
5
|
+
// expected to have a getPConnect extend its props (from BaseProps)
|
|
6
|
+
// such that every component will be expected to have a getPConnect() function
|
|
7
|
+
// that returns a PConnect object. (new/better way of doing .propTypes).
|
|
8
|
+
// This PConnProps can be extended to include other props that we know are in every component
|
|
9
|
+
export interface PConnProps {
|
|
10
|
+
// getPConnect should exist for every C11n component. (add @ts-ignore in special cases where it isn't)
|
|
11
|
+
getPConnect: () => typeof PConnect;
|
|
12
|
+
|
|
13
|
+
// Allow any/all other key/value pairs in the BaseProps for now
|
|
14
|
+
// TODO: refine which other props are always expected for various component
|
|
15
|
+
// types and consider further interface "subclassing". For example, we may
|
|
16
|
+
// want to create a "BasePropsForm" that gives guidance on required, readonly, etc.
|
|
17
|
+
// and any other props that every Form component expects.
|
|
18
|
+
// For example, see the PConnFieldProps below.
|
|
19
|
+
// NOTE: if you uncomment the line below, the PConnProps type will allow
|
|
20
|
+
// otherwise undefined types to appear. This can be helpful for debugging
|
|
21
|
+
// or when adding new components whose types aren't yet known.
|
|
22
|
+
// [key: string]: any;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// PConnFieldProps extends PConnProps to bring in the common properties that are
|
|
26
|
+
// associated with most field components (ex: Dropdown, TextInput, etc.) in the
|
|
27
|
+
// components/field directory
|
|
28
|
+
export interface PConnFieldProps extends PConnProps {
|
|
29
|
+
label: string;
|
|
30
|
+
required: boolean;
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
value: any;
|
|
33
|
+
validatemessage: string;
|
|
34
|
+
status?: string;
|
|
35
|
+
onChange?: any;
|
|
36
|
+
onBlur?: any;
|
|
37
|
+
readOnly: boolean;
|
|
38
|
+
testId: string;
|
|
39
|
+
helperText: string;
|
|
40
|
+
displayMode?: string;
|
|
41
|
+
hideLabel: boolean;
|
|
42
|
+
placeholder?: string;
|
|
43
|
+
fieldMetadata?: any;
|
|
44
|
+
additionalProps?: any;
|
|
45
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { PConnect } from '@pega/pcore-pconnect-typedefs';
|
|
2
|
+
|
|
3
|
+
// PConnProps.d.ts
|
|
4
|
+
// This gives us a place to have each component (which is most DX Components) that is
|
|
5
|
+
// expected to have a getPConnect extend its props (from BaseProps)
|
|
6
|
+
// such that every component will be expected to have a getPConnect() function
|
|
7
|
+
// that returns a PConnect object. (new/better way of doing .propTypes).
|
|
8
|
+
// This PConnProps can be extended to include other props that we know are in every component
|
|
9
|
+
export interface PConnProps {
|
|
10
|
+
// getPConnect should exist for every C11n component. (add @ts-ignore in special cases where it isn't)
|
|
11
|
+
getPConnect: () => typeof PConnect;
|
|
12
|
+
|
|
13
|
+
// Allow any/all other key/value pairs in the BaseProps for now
|
|
14
|
+
// TODO: refine which other props are always expected for various component
|
|
15
|
+
// types and consider further interface "subclassing". For example, we may
|
|
16
|
+
// want to create a "BasePropsForm" that gives guidance on required, readonly, etc.
|
|
17
|
+
// and any other props that every Form component expects.
|
|
18
|
+
// For example, see the PConnFieldProps below.
|
|
19
|
+
// NOTE: if you uncomment the line below, the PConnProps type will allow
|
|
20
|
+
// otherwise undefined types to appear. This can be helpful for debugging
|
|
21
|
+
// or when adding new components whose types aren't yet known.
|
|
22
|
+
// [key: string]: any;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// PConnFieldProps extends PConnProps to bring in the common properties that are
|
|
26
|
+
// associated with most field components (ex: Dropdown, TextInput, etc.) in the
|
|
27
|
+
// components/field directory
|
|
28
|
+
export interface PConnFieldProps extends PConnProps {
|
|
29
|
+
label: string;
|
|
30
|
+
required: boolean;
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
value: any;
|
|
33
|
+
validatemessage: string;
|
|
34
|
+
status?: string;
|
|
35
|
+
onChange?: any;
|
|
36
|
+
onBlur?: any;
|
|
37
|
+
readOnly: boolean;
|
|
38
|
+
testId: string;
|
|
39
|
+
helperText: string;
|
|
40
|
+
displayMode?: string;
|
|
41
|
+
hideLabel: boolean;
|
|
42
|
+
placeholder?: string;
|
|
43
|
+
fieldMetadata?: any;
|
|
44
|
+
additionalProps?: any;
|
|
45
|
+
}
|