@globalpayments-private/gpds-pattern-web-react 0.0.0-stage → 0.1.28

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.
Files changed (40) hide show
  1. package/dist/components.d.ts +12 -0
  2. package/dist/components.js +13 -0
  3. package/dist/composition/admin.d.ts +60 -0
  4. package/dist/composition/admin.js +29 -0
  5. package/dist/composition/children.d.ts +3 -0
  6. package/dist/composition/children.js +7 -0
  7. package/dist/composition/custom-routes.d.ts +88 -0
  8. package/dist/composition/custom-routes.js +76 -0
  9. package/dist/composition/index.d.ts +55 -0
  10. package/dist/composition/index.js +48 -0
  11. package/dist/composition/list.d.ts +220 -0
  12. package/dist/composition/list.js +90 -0
  13. package/dist/composition/record.d.ts +137 -0
  14. package/dist/composition/record.js +257 -0
  15. package/dist/composition/reference-many.d.ts +86 -0
  16. package/dist/composition/reference-many.js +60 -0
  17. package/dist/composition/reference.d.ts +13 -0
  18. package/dist/composition/reference.js +17 -0
  19. package/dist/composition/resource.d.ts +36 -0
  20. package/dist/composition/resource.js +52 -0
  21. package/dist/composition/simple-form.d.ts +96 -0
  22. package/dist/composition/simple-form.js +82 -0
  23. package/dist/gp-admin.d.ts +9 -0
  24. package/dist/gp-admin.js +20 -0
  25. package/dist/gp-pattern-list.d.ts +11 -0
  26. package/dist/gp-pattern-list.js +22 -0
  27. package/dist/gp-pattern-record.d.ts +12 -0
  28. package/dist/gp-pattern-record.js +23 -0
  29. package/dist/gp-pattern-reference-input.d.ts +8 -0
  30. package/dist/gp-pattern-reference-input.js +19 -0
  31. package/dist/gp-pattern-wizard.d.ts +11 -0
  32. package/dist/gp-pattern-wizard.js +22 -0
  33. package/dist/gp-resource.d.ts +5 -0
  34. package/dist/gp-resource.js +17 -0
  35. package/dist/uds-pattern-login-card.d.ts +13 -0
  36. package/dist/uds-pattern-login-card.js +22 -0
  37. package/dist/uds-pattern-login-page.d.ts +5 -0
  38. package/dist/uds-pattern-login-page.js +17 -0
  39. package/package.json +54 -4
  40. package/README.md +0 -3
@@ -0,0 +1,36 @@
1
+ import { type ReactElement, type ReactNode } from 'react';
2
+ import type { UdsAdminResource } from '@globalpayments-private/gpds-pattern-web';
3
+ /**
4
+ * `Resource`: a thin rename of `gp-resource` (ADR 0012), named after real
5
+ * react-admin's `<Resource name="posts" list={PostList} />`
6
+ * (https://marmelab.com/react-admin/Tutorial.html). See
7
+ * `docs/specs/north-star-composition.md` §9 and §11.
8
+ *
9
+ * Unlike `Admin`, `Resource`'s children are **not** forwarded — they are a
10
+ * marker tree (a `<List>` and/or a `<SimpleForm>`), read once into a
11
+ * `UdsAdminResource.list` / `.record` / `.perPage` set and discarded.
12
+ * `gp-resource` has no slot for them; forwarding would just mount
13
+ * `null`-returning components for no reason.
14
+ *
15
+ * Written with `createElement` rather than JSX — see `admin.tsx`'s comment.
16
+ */
17
+ export interface ResourceProps {
18
+ name: string;
19
+ label?: string;
20
+ icon?: string;
21
+ children?: ReactNode;
22
+ }
23
+ export declare function Resource({ name, label, icon, children }: ResourceProps): ReactElement;
24
+ /**
25
+ * Pure: builds the `list`/`record`/`perPage` members of a `UdsAdminResource`
26
+ * from a `<Resource>`'s children, in any order, any of them present.
27
+ *
28
+ * Four kinds of child are read. A `<List>` gives the list config and
29
+ * `perPage`. A `<Show>`/`<Edit>`/`<Create>` gives the record config
30
+ * (`record.tsx`). A bare `<SimpleForm>` gives the same thing unwrapped — the
31
+ * shorter spelling this layer shipped before the wrappers existed, kept
32
+ * working because it is a published API and because react-admin's own
33
+ * `<SimpleForm>` is likewise usable wherever a form is. A
34
+ * `<ReferenceManyField>` replaces the list with a related panel.
35
+ */
36
+ export declare function resourceConfigFromChildren(children: ReactNode): Pick<UdsAdminResource, 'list' | 'record' | 'perPage'>;
@@ -0,0 +1,52 @@
1
+ import { createElement } from 'react';
2
+ // Relative, not the `./react` package subpath — see `admin.tsx`'s comment.
3
+ import { GpResource } from '@globalpayments-private/gpds-pattern-web-react';
4
+ import { List, listConfigFromChildren } from './list';
5
+ import { SimpleForm, fieldsFromChildren } from './simple-form';
6
+ import { recordConfigFromChildren } from './record';
7
+ import { findReferenceManyField, relatedListConfigFrom } from './reference-many';
8
+ import { reactChildrenToArray } from './children';
9
+ export function Resource({ name, label, icon, children }) {
10
+ const config = { name, label, icon, ...resourceConfigFromChildren(children) };
11
+ return createElement(GpResource, { name, label, icon, config });
12
+ }
13
+ /**
14
+ * Pure: builds the `list`/`record`/`perPage` members of a `UdsAdminResource`
15
+ * from a `<Resource>`'s children, in any order, any of them present.
16
+ *
17
+ * Four kinds of child are read. A `<List>` gives the list config and
18
+ * `perPage`. A `<Show>`/`<Edit>`/`<Create>` gives the record config
19
+ * (`record.tsx`). A bare `<SimpleForm>` gives the same thing unwrapped — the
20
+ * shorter spelling this layer shipped before the wrappers existed, kept
21
+ * working because it is a published API and because react-admin's own
22
+ * `<SimpleForm>` is likewise usable wherever a form is. A
23
+ * `<ReferenceManyField>` replaces the list with a related panel.
24
+ */
25
+ export function resourceConfigFromChildren(children) {
26
+ const config = {};
27
+ reactChildrenToArray(children).forEach((child) => {
28
+ if (isListElement(child)) {
29
+ const { perPage, filters, children: listChildren } = child.props;
30
+ config.list = { ...listConfigFromChildren(listChildren), filters };
31
+ config.perPage = perPage;
32
+ }
33
+ else if (isSimpleFormElement(child)) {
34
+ config.record = { fields: fieldsFromChildren(child.props.children) };
35
+ }
36
+ });
37
+ const record = recordConfigFromChildren(children);
38
+ if (record) {
39
+ config.record = record;
40
+ }
41
+ const related = findReferenceManyField(children);
42
+ if (related) {
43
+ config.list = relatedListConfigFrom(related);
44
+ }
45
+ return config;
46
+ }
47
+ function isListElement(node) {
48
+ return typeof node === 'object' && node !== null && 'type' in node && node.type === List;
49
+ }
50
+ function isSimpleFormElement(node) {
51
+ return (typeof node === 'object' && node !== null && 'type' in node && node.type === SimpleForm);
52
+ }
@@ -0,0 +1,96 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { UdsReference, UdsRecordField } from '@globalpayments-private/gpds-pattern-web';
3
+ /**
4
+ * `SimpleForm` and its input markers: non-rendering marker components read by
5
+ * `Resource` (`resource.tsx`) to build a `UdsAdminRecordConfig.fields` before
6
+ * anything reaches `gp-resource`/`gp-pattern-record`.
7
+ *
8
+ * Named after real react-admin's own tutorial form
9
+ * (https://marmelab.com/react-admin/Tutorial.html#editing-records):
10
+ *
11
+ * ```tsx
12
+ * <Edit>
13
+ * <SimpleForm>
14
+ * <TextInput source="title" />
15
+ * <ReferenceInput source="userId" reference="users" />
16
+ * </SimpleForm>
17
+ * </Edit>
18
+ * ```
19
+ *
20
+ * ## Why `<SimpleForm>` is still usable bare, now that `<Edit>`/`<Create>` exist
21
+ *
22
+ * `<Show>`, `<Edit>` and `<Create>` ship in `record.tsx` (ADR 0030) and may
23
+ * carry genuinely different field sets, merged into the shell's one
24
+ * `UdsRecordConfig.fields` array and gated per mode by `UdsRecordField.modes`
25
+ * (ADR 0031). A bare `<SimpleForm>` under `<Resource>` remains supported and
26
+ * unchanged: it declares one field set used by all three modes, which is both
27
+ * the simplest thing to author and what every tree written before the
28
+ * wrappers existed does. Reach for the wrappers when the modes differ; reach
29
+ * for `<SimpleForm>` alone when they do not. See
30
+ * `docs/specs/north-star-composition.md` §11 and §14.
31
+ *
32
+ * ## Why these never render
33
+ *
34
+ * Same reasoning as `list.tsx`'s marker components: each input is called with
35
+ * its props at read time (`fieldsFromChildren`, below) and the resulting
36
+ * `UdsRecordField[]` is handed to `<GpResource config>` — the same public
37
+ * prop a hand-written consumer uses. None of these functions is ever invoked
38
+ * by React; they only need a stable function identity.
39
+ */
40
+ interface BaseInputProps {
41
+ field: string;
42
+ label: string;
43
+ required?: boolean;
44
+ placeholder?: string;
45
+ /**
46
+ * Shows the value without offering to change it, mirroring react-admin's
47
+ * own [`readOnly`](https://marmelab.com/react-admin/Inputs.html#readonly)
48
+ * on every input.
49
+ *
50
+ * Needed for the same reason react-admin needs it: a detail view is mostly
51
+ * fields the application does not let you edit, and an `<Edit>` of nothing
52
+ * but writable fields is not the same screen. Without it a composition-
53
+ * authored resource could show a form or nothing, which is why this landed
54
+ * with the actions work (ADR 0032) rather than separately — merchant-ops
55
+ * has one writable field across four resources.
56
+ */
57
+ readOnly?: boolean;
58
+ }
59
+ export interface TextInputProps extends BaseInputProps {
60
+ /** Mirrors react-admin's own `multiline` — renders as `UdsRecordInput: 'textarea'`. */
61
+ multiline?: boolean;
62
+ /** `{ resource: 'merchants' }` shorthand — defaults the referenced field to `'name'`. */
63
+ reference?: string | UdsReference;
64
+ }
65
+ /** Marker component for a plain text field. Never rendered — see the module doc. */
66
+ export declare function TextInput(_props: TextInputProps): null;
67
+ export type NumberInputProps = BaseInputProps;
68
+ /** Marker component for a number field. Never rendered. */
69
+ export declare function NumberInput(_props: NumberInputProps): null;
70
+ export type BooleanInputProps = BaseInputProps;
71
+ /** Marker component for a checkbox field. Never rendered. */
72
+ export declare function BooleanInput(_props: BooleanInputProps): null;
73
+ export type DateInputProps = BaseInputProps;
74
+ /** Marker component for a date field. Never rendered. */
75
+ export declare function DateInput(_props: DateInputProps): null;
76
+ export interface SelectInputProps extends BaseInputProps {
77
+ options: UdsRecordField['options'];
78
+ }
79
+ /** Marker component for a `<select>`-backed field. Never rendered. */
80
+ export declare function SelectInput(_props: SelectInputProps): null;
81
+ export interface ReferenceInputProps extends BaseInputProps {
82
+ reference: string | UdsReference;
83
+ }
84
+ /** Marker component for a single foreign-key field. Never rendered. */
85
+ export declare function ReferenceInput(_props: ReferenceInputProps): null;
86
+ export interface SimpleFormProps {
87
+ children?: ReactNode;
88
+ }
89
+ /** Marker component for the record form. Never rendered — see the module doc. */
90
+ export declare function SimpleForm(_props: SimpleFormProps): null;
91
+ /**
92
+ * Reads a `<SimpleForm>` element's children into a `UdsRecordField[]` — the
93
+ * exact shape `GpResource`'s `config.record.fields` takes.
94
+ */
95
+ export declare function fieldsFromChildren(formChildren: ReactNode): UdsRecordField[];
96
+ export {};
@@ -0,0 +1,82 @@
1
+ import { resolveReference } from './reference';
2
+ import { reactChildrenToArray } from './children';
3
+ /** Marker component for a plain text field. Never rendered — see the module doc. */
4
+ export function TextInput(_props) {
5
+ return null;
6
+ }
7
+ /** Marker component for a number field. Never rendered. */
8
+ export function NumberInput(_props) {
9
+ return null;
10
+ }
11
+ /** Marker component for a checkbox field. Never rendered. */
12
+ export function BooleanInput(_props) {
13
+ return null;
14
+ }
15
+ /** Marker component for a date field. Never rendered. */
16
+ export function DateInput(_props) {
17
+ return null;
18
+ }
19
+ /** Marker component for a `<select>`-backed field. Never rendered. */
20
+ export function SelectInput(_props) {
21
+ return null;
22
+ }
23
+ /** Marker component for a single foreign-key field. Never rendered. */
24
+ export function ReferenceInput(_props) {
25
+ return null;
26
+ }
27
+ /** Marker component for the record form. Never rendered — see the module doc. */
28
+ export function SimpleForm(_props) {
29
+ return null;
30
+ }
31
+ function fieldFrom(element) {
32
+ const { type, props } = element;
33
+ const { field, label, required, placeholder, readOnly } = props;
34
+ const base = { field, label, required, placeholder, readOnly };
35
+ if (type === TextInput) {
36
+ const { multiline, reference } = props;
37
+ return { ...base, input: multiline ? 'textarea' : 'text', reference: resolveReference(reference) };
38
+ }
39
+ if (type === NumberInput) {
40
+ return { ...base, input: 'number' };
41
+ }
42
+ if (type === BooleanInput) {
43
+ return { ...base, input: 'checkbox' };
44
+ }
45
+ if (type === DateInput) {
46
+ return { ...base, input: 'date' };
47
+ }
48
+ if (type === SelectInput) {
49
+ return { ...base, input: 'select', options: props.options };
50
+ }
51
+ // ReferenceInput: `gp-pattern-record` renders the search control for any
52
+ // field with `reference` set (`vm.searchable`, see `record-field-renderer.tsx`)
53
+ // regardless of `input` — so a plain field carrying `reference` is enough.
54
+ return { ...base, reference: resolveReference(props.reference) };
55
+ }
56
+ /**
57
+ * Reads a `<SimpleForm>` element's children into a `UdsRecordField[]` — the
58
+ * exact shape `GpResource`'s `config.record.fields` takes.
59
+ */
60
+ export function fieldsFromChildren(formChildren) {
61
+ const nodes = [];
62
+ reactChildrenToArray(formChildren).forEach((child) => {
63
+ if (isInputElement(child)) {
64
+ nodes.push(child);
65
+ }
66
+ });
67
+ return nodes.map(fieldFrom);
68
+ }
69
+ const INPUT_TYPES = new Set([
70
+ TextInput,
71
+ NumberInput,
72
+ BooleanInput,
73
+ DateInput,
74
+ SelectInput,
75
+ ReferenceInput,
76
+ ]);
77
+ function isInputElement(node) {
78
+ return (typeof node === 'object' &&
79
+ node !== null &&
80
+ 'type' in node &&
81
+ INPUT_TYPES.has(node.type));
82
+ }
@@ -0,0 +1,9 @@
1
+ import type { Components } from '@globalpayments-private/gpds-pattern-web/dist/components';
2
+ import { GpAdmin as GpAdminElement } from '@globalpayments-private/gpds-pattern-web/dist/components/gp-admin.js';
3
+ import type { UdsAdminRouteChangeDetail, UdsAdminSignOutDetail, GpAdminCustomEvent } from '@globalpayments-private/gpds-pattern-web';
4
+ import type { StencilReactComponent, EventName } from '@stencil/react-output-target/runtime';
5
+ export type GpAdminEvents = {
6
+ onGpAdminRouteChange: EventName<GpAdminCustomEvent<UdsAdminRouteChangeDetail>>;
7
+ onGpAdminSignOut: EventName<GpAdminCustomEvent<UdsAdminSignOutDetail>>;
8
+ };
9
+ export declare const GpAdmin: StencilReactComponent<GpAdminElement, GpAdminEvents, Components.GpAdmin>;
@@ -0,0 +1,20 @@
1
+ 'use client';
2
+ /**
3
+ * This file was automatically generated by the Stencil React Output Target.
4
+ * Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
5
+ */
6
+ /* eslint-disable */
7
+ import React from 'react';
8
+ import { createComponent } from '@stencil/react-output-target/runtime';
9
+ import { GpAdmin as GpAdminElement, defineCustomElement as defineGpAdmin } from '@globalpayments-private/gpds-pattern-web/dist/components/gp-admin.js';
10
+ export const GpAdmin = /*@__PURE__*/ createComponent({
11
+ tagName: 'gp-admin',
12
+ elementClass: GpAdminElement,
13
+ // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
14
+ react: React,
15
+ events: {
16
+ onGpAdminRouteChange: 'gpAdminRouteChange',
17
+ onGpAdminSignOut: 'gpAdminSignOut'
18
+ },
19
+ defineCustomElement: defineGpAdmin,
20
+ });
@@ -0,0 +1,11 @@
1
+ import type { Components } from '@globalpayments-private/gpds-pattern-web/dist/components';
2
+ import { GpPatternList as GpPatternListElement } from '@globalpayments-private/gpds-pattern-web/dist/components/gp-pattern-list.js';
3
+ import type { UdsListRowClickDetail, UdsListCreateDetail, UdsListErrorDetail, UdsListSelectionChangeDetail, GpPatternListCustomEvent } from '@globalpayments-private/gpds-pattern-web';
4
+ import type { StencilReactComponent, EventName } from '@stencil/react-output-target/runtime';
5
+ export type GpPatternListEvents = {
6
+ onGpListRowClick: EventName<GpPatternListCustomEvent<UdsListRowClickDetail>>;
7
+ onGpListCreate: EventName<GpPatternListCustomEvent<UdsListCreateDetail>>;
8
+ onGpListError: EventName<GpPatternListCustomEvent<UdsListErrorDetail>>;
9
+ onGpListSelectionChange: EventName<GpPatternListCustomEvent<UdsListSelectionChangeDetail>>;
10
+ };
11
+ export declare const GpPatternList: StencilReactComponent<GpPatternListElement, GpPatternListEvents, Components.GpPatternList, 'resource'>;
@@ -0,0 +1,22 @@
1
+ 'use client';
2
+ /**
3
+ * This file was automatically generated by the Stencil React Output Target.
4
+ * Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
5
+ */
6
+ /* eslint-disable */
7
+ import React from 'react';
8
+ import { createComponent } from '@stencil/react-output-target/runtime';
9
+ import { GpPatternList as GpPatternListElement, defineCustomElement as defineGpPatternList } from '@globalpayments-private/gpds-pattern-web/dist/components/gp-pattern-list.js';
10
+ export const GpPatternList = /*@__PURE__*/ createComponent({
11
+ tagName: 'gp-pattern-list',
12
+ elementClass: GpPatternListElement,
13
+ // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
14
+ react: React,
15
+ events: {
16
+ onGpListRowClick: 'gpListRowClick',
17
+ onGpListCreate: 'gpListCreate',
18
+ onGpListError: 'gpListError',
19
+ onGpListSelectionChange: 'gpListSelectionChange'
20
+ },
21
+ defineCustomElement: defineGpPatternList,
22
+ });
@@ -0,0 +1,12 @@
1
+ import type { Components } from '@globalpayments-private/gpds-pattern-web/dist/components';
2
+ import { GpPatternRecord as GpPatternRecordElement } from '@globalpayments-private/gpds-pattern-web/dist/components/gp-pattern-record.js';
3
+ import type { UdsRecordSaveDetail, UdsRecordDeleteDetail, UdsRecordCancelDetail, UdsRecordDirtyChangeDetail, UdsRecordErrorDetail, GpPatternRecordCustomEvent } from '@globalpayments-private/gpds-pattern-web';
4
+ import type { StencilReactComponent, EventName } from '@stencil/react-output-target/runtime';
5
+ export type GpPatternRecordEvents = {
6
+ onGpRecordSave: EventName<GpPatternRecordCustomEvent<UdsRecordSaveDetail>>;
7
+ onGpRecordDelete: EventName<GpPatternRecordCustomEvent<UdsRecordDeleteDetail>>;
8
+ onGpRecordCancel: EventName<GpPatternRecordCustomEvent<UdsRecordCancelDetail>>;
9
+ onGpRecordDirtyChange: EventName<GpPatternRecordCustomEvent<UdsRecordDirtyChangeDetail>>;
10
+ onGpRecordError: EventName<GpPatternRecordCustomEvent<UdsRecordErrorDetail>>;
11
+ };
12
+ export declare const GpPatternRecord: StencilReactComponent<GpPatternRecordElement, GpPatternRecordEvents, Components.GpPatternRecord, 'resource'>;
@@ -0,0 +1,23 @@
1
+ 'use client';
2
+ /**
3
+ * This file was automatically generated by the Stencil React Output Target.
4
+ * Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
5
+ */
6
+ /* eslint-disable */
7
+ import React from 'react';
8
+ import { createComponent } from '@stencil/react-output-target/runtime';
9
+ import { GpPatternRecord as GpPatternRecordElement, defineCustomElement as defineGpPatternRecord } from '@globalpayments-private/gpds-pattern-web/dist/components/gp-pattern-record.js';
10
+ export const GpPatternRecord = /*@__PURE__*/ createComponent({
11
+ tagName: 'gp-pattern-record',
12
+ elementClass: GpPatternRecordElement,
13
+ // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
14
+ react: React,
15
+ events: {
16
+ onGpRecordSave: 'gpRecordSave',
17
+ onGpRecordDelete: 'gpRecordDelete',
18
+ onGpRecordCancel: 'gpRecordCancel',
19
+ onGpRecordDirtyChange: 'gpRecordDirtyChange',
20
+ onGpRecordError: 'gpRecordError'
21
+ },
22
+ defineCustomElement: defineGpPatternRecord,
23
+ });
@@ -0,0 +1,8 @@
1
+ import type { Components } from '@globalpayments-private/gpds-pattern-web/dist/components';
2
+ import { GpPatternReferenceInput as GpPatternReferenceInputElement } from '@globalpayments-private/gpds-pattern-web/dist/components/gp-pattern-reference-input.js';
3
+ import type { UdsReferenceChangeDetail, GpPatternReferenceInputCustomEvent } from '@globalpayments-private/gpds-pattern-web';
4
+ import type { StencilReactComponent, EventName } from '@stencil/react-output-target/runtime';
5
+ export type GpPatternReferenceInputEvents = {
6
+ onGpReferenceChange: EventName<GpPatternReferenceInputCustomEvent<UdsReferenceChangeDetail>>;
7
+ };
8
+ export declare const GpPatternReferenceInput: StencilReactComponent<GpPatternReferenceInputElement, GpPatternReferenceInputEvents, Components.GpPatternReferenceInput>;
@@ -0,0 +1,19 @@
1
+ 'use client';
2
+ /**
3
+ * This file was automatically generated by the Stencil React Output Target.
4
+ * Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
5
+ */
6
+ /* eslint-disable */
7
+ import React from 'react';
8
+ import { createComponent } from '@stencil/react-output-target/runtime';
9
+ import { GpPatternReferenceInput as GpPatternReferenceInputElement, defineCustomElement as defineGpPatternReferenceInput } from '@globalpayments-private/gpds-pattern-web/dist/components/gp-pattern-reference-input.js';
10
+ export const GpPatternReferenceInput = /*@__PURE__*/ createComponent({
11
+ tagName: 'gp-pattern-reference-input',
12
+ elementClass: GpPatternReferenceInputElement,
13
+ // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
14
+ react: React,
15
+ events: {
16
+ onGpReferenceChange: 'gpReferenceChange'
17
+ },
18
+ defineCustomElement: defineGpPatternReferenceInput,
19
+ });
@@ -0,0 +1,11 @@
1
+ import type { Components } from '@globalpayments-private/gpds-pattern-web/dist/components';
2
+ import { GpPatternWizard as GpPatternWizardElement } from '@globalpayments-private/gpds-pattern-web/dist/components/gp-pattern-wizard.js';
3
+ import type { UdsWizardStepChangeDetail, UdsWizardCompleteDetail, UdsWizardErrorDetail, UdsWizardValuesChangeDetail, GpPatternWizardCustomEvent } from '@globalpayments-private/gpds-pattern-web';
4
+ import type { StencilReactComponent, EventName } from '@stencil/react-output-target/runtime';
5
+ export type GpPatternWizardEvents = {
6
+ onGpWizardStepChange: EventName<GpPatternWizardCustomEvent<UdsWizardStepChangeDetail>>;
7
+ onGpWizardComplete: EventName<GpPatternWizardCustomEvent<UdsWizardCompleteDetail>>;
8
+ onGpWizardError: EventName<GpPatternWizardCustomEvent<UdsWizardErrorDetail>>;
9
+ onGpWizardValuesChange: EventName<GpPatternWizardCustomEvent<UdsWizardValuesChangeDetail>>;
10
+ };
11
+ export declare const GpPatternWizard: StencilReactComponent<GpPatternWizardElement, GpPatternWizardEvents, Components.GpPatternWizard>;
@@ -0,0 +1,22 @@
1
+ 'use client';
2
+ /**
3
+ * This file was automatically generated by the Stencil React Output Target.
4
+ * Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
5
+ */
6
+ /* eslint-disable */
7
+ import React from 'react';
8
+ import { createComponent } from '@stencil/react-output-target/runtime';
9
+ import { GpPatternWizard as GpPatternWizardElement, defineCustomElement as defineGpPatternWizard } from '@globalpayments-private/gpds-pattern-web/dist/components/gp-pattern-wizard.js';
10
+ export const GpPatternWizard = /*@__PURE__*/ createComponent({
11
+ tagName: 'gp-pattern-wizard',
12
+ elementClass: GpPatternWizardElement,
13
+ // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
14
+ react: React,
15
+ events: {
16
+ onGpWizardStepChange: 'gpWizardStepChange',
17
+ onGpWizardComplete: 'gpWizardComplete',
18
+ onGpWizardError: 'gpWizardError',
19
+ onGpWizardValuesChange: 'gpWizardValuesChange'
20
+ },
21
+ defineCustomElement: defineGpPatternWizard,
22
+ });
@@ -0,0 +1,5 @@
1
+ import type { Components } from '@globalpayments-private/gpds-pattern-web/dist/components';
2
+ import { GpResource as GpResourceElement } from '@globalpayments-private/gpds-pattern-web/dist/components/gp-resource.js';
3
+ import type { StencilReactComponent } from '@stencil/react-output-target/runtime';
4
+ export type GpResourceEvents = NonNullable<unknown>;
5
+ export declare const GpResource: StencilReactComponent<GpResourceElement, GpResourceEvents, Components.GpResource, 'name'>;
@@ -0,0 +1,17 @@
1
+ 'use client';
2
+ /**
3
+ * This file was automatically generated by the Stencil React Output Target.
4
+ * Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
5
+ */
6
+ /* eslint-disable */
7
+ import React from 'react';
8
+ import { createComponent } from '@stencil/react-output-target/runtime';
9
+ import { GpResource as GpResourceElement, defineCustomElement as defineGpResource } from '@globalpayments-private/gpds-pattern-web/dist/components/gp-resource.js';
10
+ export const GpResource = /*@__PURE__*/ createComponent({
11
+ tagName: 'gp-resource',
12
+ elementClass: GpResourceElement,
13
+ // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
14
+ react: React,
15
+ events: {},
16
+ defineCustomElement: defineGpResource,
17
+ });
@@ -0,0 +1,13 @@
1
+ import type { Components } from '@globalpayments-private/gpds-pattern-web/dist/components';
2
+ import { UdsPatternLoginCard as UdsPatternLoginCardElement } from '@globalpayments-private/gpds-pattern-web/dist/components/uds-pattern-login-card.js';
3
+ import type { UdsSession, UdsLoginStepChangeDetail, UdsLoginErrorDetail, UdsLoginActionDetail, UdsPatternLoginCardCustomEvent } from '@globalpayments-private/gpds-pattern-web';
4
+ import type { StencilReactComponent, EventName } from '@stencil/react-output-target/runtime';
5
+ export type UdsPatternLoginCardEvents = {
6
+ onUdsLoginSuccess: EventName<UdsPatternLoginCardCustomEvent<{
7
+ session?: UdsSession;
8
+ }>>;
9
+ onUdsLoginStepChange: EventName<UdsPatternLoginCardCustomEvent<UdsLoginStepChangeDetail>>;
10
+ onUdsLoginError: EventName<UdsPatternLoginCardCustomEvent<UdsLoginErrorDetail>>;
11
+ onUdsLoginAction: EventName<UdsPatternLoginCardCustomEvent<UdsLoginActionDetail>>;
12
+ };
13
+ export declare const UdsPatternLoginCard: StencilReactComponent<UdsPatternLoginCardElement, UdsPatternLoginCardEvents, Components.UdsPatternLoginCard>;
@@ -0,0 +1,22 @@
1
+ 'use client';
2
+ /**
3
+ * This file was automatically generated by the Stencil React Output Target.
4
+ * Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
5
+ */
6
+ /* eslint-disable */
7
+ import React from 'react';
8
+ import { createComponent } from '@stencil/react-output-target/runtime';
9
+ import { UdsPatternLoginCard as UdsPatternLoginCardElement, defineCustomElement as defineUdsPatternLoginCard } from '@globalpayments-private/gpds-pattern-web/dist/components/uds-pattern-login-card.js';
10
+ export const UdsPatternLoginCard = /*@__PURE__*/ createComponent({
11
+ tagName: 'uds-pattern-login-card',
12
+ elementClass: UdsPatternLoginCardElement,
13
+ // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
14
+ react: React,
15
+ events: {
16
+ onUdsLoginSuccess: 'udsLoginSuccess',
17
+ onUdsLoginStepChange: 'udsLoginStepChange',
18
+ onUdsLoginError: 'udsLoginError',
19
+ onUdsLoginAction: 'udsLoginAction'
20
+ },
21
+ defineCustomElement: defineUdsPatternLoginCard,
22
+ });
@@ -0,0 +1,5 @@
1
+ import type { Components } from '@globalpayments-private/gpds-pattern-web/dist/components';
2
+ import { UdsPatternLoginPage as UdsPatternLoginPageElement } from '@globalpayments-private/gpds-pattern-web/dist/components/uds-pattern-login-page.js';
3
+ import type { StencilReactComponent } from '@stencil/react-output-target/runtime';
4
+ export type UdsPatternLoginPageEvents = NonNullable<unknown>;
5
+ export declare const UdsPatternLoginPage: StencilReactComponent<UdsPatternLoginPageElement, UdsPatternLoginPageEvents, Components.UdsPatternLoginPage>;
@@ -0,0 +1,17 @@
1
+ 'use client';
2
+ /**
3
+ * This file was automatically generated by the Stencil React Output Target.
4
+ * Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
5
+ */
6
+ /* eslint-disable */
7
+ import React from 'react';
8
+ import { createComponent } from '@stencil/react-output-target/runtime';
9
+ import { UdsPatternLoginPage as UdsPatternLoginPageElement, defineCustomElement as defineUdsPatternLoginPage } from '@globalpayments-private/gpds-pattern-web/dist/components/uds-pattern-login-page.js';
10
+ export const UdsPatternLoginPage = /*@__PURE__*/ createComponent({
11
+ tagName: 'uds-pattern-login-page',
12
+ elementClass: UdsPatternLoginPageElement,
13
+ // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
14
+ react: React,
15
+ events: {},
16
+ defineCustomElement: defineUdsPatternLoginPage,
17
+ });
package/package.json CHANGED
@@ -1,6 +1,56 @@
1
1
  {
2
2
  "name": "@globalpayments-private/gpds-pattern-web-react",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.28",
4
+ "description": "React bindings for GPDS pattern library for Web — typed component wrappers and the JSX composition surface.",
5
+ "license": "UNLICENSED",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/globalpayments-internal/gpds-pattern-web.git",
9
+ "directory": "packages/react"
10
+ },
11
+ "homepage": "https://github.com/globalpayments-internal/gpds-pattern-web#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/globalpayments-internal/gpds-pattern-web/issues"
14
+ },
15
+ "publishConfig": {
16
+ "access": "public",
17
+ "registry": "https://registry.npmjs.org/"
18
+ },
19
+ "type": "module",
20
+ "sideEffects": false,
21
+ "main": "dist/components.js",
22
+ "module": "dist/components.js",
23
+ "types": "dist/components.d.ts",
24
+ "exports": {
25
+ ".": {
26
+ "types": "./dist/components.d.ts",
27
+ "import": "./dist/components.js"
28
+ },
29
+ "./composition": {
30
+ "types": "./dist/composition/index.d.ts",
31
+ "import": "./dist/composition/index.js"
32
+ },
33
+ "./package.json": "./package.json"
34
+ },
35
+ "files": [
36
+ "dist/"
37
+ ],
38
+ "scripts": {
39
+ "build": "tsc -p tsconfig.json && tsc -p tsconfig.composition.json",
40
+ "test": "jest",
41
+ "test:coverage": "jest --coverage",
42
+ "prepack": "npm run build"
43
+ },
44
+ "dependencies": {
45
+ "@stencil/react-output-target": "^1.8.1"
46
+ },
47
+ "peerDependencies": {
48
+ "@globalpayments-private/gpds-pattern-web": "0.1.28",
49
+ "react": ">=19",
50
+ "react-dom": ">=19"
51
+ },
52
+ "devDependencies": {
53
+ "@stencil/core": "^4.45.2",
54
+ "jest": "^29.7.0"
55
+ }
56
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.