@globalpayments-private/gpds-pattern-web-angular 0.0.0-stage → 0.1.1-dev.gf7ad966
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/dist/directives/angular-component-lib/boolean-attribute.d.ts +35 -0
- package/dist/directives/angular-component-lib/boolean-attribute.js +42 -0
- package/dist/directives/angular-component-lib/utils.d.ts +26 -0
- package/dist/directives/angular-component-lib/utils.js +106 -0
- package/dist/directives/index.d.ts +2 -0
- package/dist/directives/index.js +9 -0
- package/dist/directives/proxies.d.ts +107 -0
- package/dist/directives/proxies.js +211 -0
- package/package.json +40 -4
- package/README.md +0 -3
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transforms a value to a boolean so that boolean properties can be set by attribute presence,
|
|
3
|
+
* e.g. `<my-component disabled>` instead of `<my-component [disabled]="true">`.
|
|
4
|
+
*
|
|
5
|
+
* Strings are coerced the same way Angular's `booleanAttribute` coerces them, so `''` (a bare
|
|
6
|
+
* attribute) becomes `true` and `'false'` becomes `false`.
|
|
7
|
+
*
|
|
8
|
+
* Unlike Angular's `booleanAttribute`, `null` and `undefined` are passed through rather than
|
|
9
|
+
* coerced to `false`. Components frequently treat them as a state distinct from `false`:
|
|
10
|
+
*
|
|
11
|
+
* ```tsx
|
|
12
|
+
* // `undefined` means "decide based on the mode", which is not the same as `false`
|
|
13
|
+
* const showDetail = detail !== undefined ? detail : mode === 'ios';
|
|
14
|
+
*
|
|
15
|
+
* // a strict comparison also behaves differently for `null` than it does for `false`
|
|
16
|
+
* const showHandle = handle !== false;
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* Both values reach inputs routinely in Angular templates, from the `async` pipe before its
|
|
20
|
+
* first emission and from form control values, so coercing them would change the behavior of
|
|
21
|
+
* bindings that work today.
|
|
22
|
+
*
|
|
23
|
+
* This is implemented here rather than imported from `@angular/core` so that consumers on
|
|
24
|
+
* Angular versions without `booleanAttribute` are unaffected by this file being generated.
|
|
25
|
+
*
|
|
26
|
+
* The parameter type is what Angular derives `ngAcceptInputType_*` from, so it decides which
|
|
27
|
+
* template bindings compile. Widening it to `unknown` would let any expression through.
|
|
28
|
+
*
|
|
29
|
+
* Declared as a function rather than an arrow constant because Angular has to resolve input
|
|
30
|
+
* transforms statically when compiling a library in partial compilation mode.
|
|
31
|
+
*
|
|
32
|
+
* This lives in its own file, separate from `utils.ts`, so that it carries no runtime imports.
|
|
33
|
+
* That keeps it independently type-checkable without pulling `rxjs` in for `proxyOutputs`.
|
|
34
|
+
*/
|
|
35
|
+
export declare function nullableBooleanAttribute(value: boolean | string | null | undefined): boolean | null | undefined;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/**
|
|
4
|
+
* Transforms a value to a boolean so that boolean properties can be set by attribute presence,
|
|
5
|
+
* e.g. `<my-component disabled>` instead of `<my-component [disabled]="true">`.
|
|
6
|
+
*
|
|
7
|
+
* Strings are coerced the same way Angular's `booleanAttribute` coerces them, so `''` (a bare
|
|
8
|
+
* attribute) becomes `true` and `'false'` becomes `false`.
|
|
9
|
+
*
|
|
10
|
+
* Unlike Angular's `booleanAttribute`, `null` and `undefined` are passed through rather than
|
|
11
|
+
* coerced to `false`. Components frequently treat them as a state distinct from `false`:
|
|
12
|
+
*
|
|
13
|
+
* ```tsx
|
|
14
|
+
* // `undefined` means "decide based on the mode", which is not the same as `false`
|
|
15
|
+
* const showDetail = detail !== undefined ? detail : mode === 'ios';
|
|
16
|
+
*
|
|
17
|
+
* // a strict comparison also behaves differently for `null` than it does for `false`
|
|
18
|
+
* const showHandle = handle !== false;
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* Both values reach inputs routinely in Angular templates, from the `async` pipe before its
|
|
22
|
+
* first emission and from form control values, so coercing them would change the behavior of
|
|
23
|
+
* bindings that work today.
|
|
24
|
+
*
|
|
25
|
+
* This is implemented here rather than imported from `@angular/core` so that consumers on
|
|
26
|
+
* Angular versions without `booleanAttribute` are unaffected by this file being generated.
|
|
27
|
+
*
|
|
28
|
+
* The parameter type is what Angular derives `ngAcceptInputType_*` from, so it decides which
|
|
29
|
+
* template bindings compile. Widening it to `unknown` would let any expression through.
|
|
30
|
+
*
|
|
31
|
+
* Declared as a function rather than an arrow constant because Angular has to resolve input
|
|
32
|
+
* transforms statically when compiling a library in partial compilation mode.
|
|
33
|
+
*
|
|
34
|
+
* This lives in its own file, separate from `utils.ts`, so that it carries no runtime imports.
|
|
35
|
+
* That keeps it independently type-checkable without pulling `rxjs` in for `proxyOutputs`.
|
|
36
|
+
*/
|
|
37
|
+
export function nullableBooleanAttribute(value) {
|
|
38
|
+
if (value === null || value === undefined) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
return typeof value === 'boolean' ? value : value !== 'false';
|
|
42
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server rendering options (the output target's `ssrPropModule`).
|
|
3
|
+
*/
|
|
4
|
+
interface SsrOptions {
|
|
5
|
+
/** The component library's `ssrProp()`, which hands a value to Stencil's server render. */
|
|
6
|
+
ssrProp: (value: any) => any;
|
|
7
|
+
/** Inputs whose attribute isn't Stencil's dash-cased prop name. */
|
|
8
|
+
attributes?: Record<string, string>;
|
|
9
|
+
/** Inputs with no attribute: every value goes through `ssrProp()`. */
|
|
10
|
+
refs?: string[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Records a wrapper created during server rendering. Call from the constructor.
|
|
14
|
+
*/
|
|
15
|
+
export declare const markServer: (instance: object) => void;
|
|
16
|
+
export declare const proxyInputs: (Cmp: any, inputs: string[], ssr?: SsrOptions) => void;
|
|
17
|
+
export declare const proxyMethods: (Cmp: any, methods: string[]) => void;
|
|
18
|
+
export declare const proxyOutputs: (instance: any, el: any, events: string[]) => void;
|
|
19
|
+
export declare const defineCustomElement: (tagName: string, customElement: any) => void;
|
|
20
|
+
export declare function ProxyCmp(opts: {
|
|
21
|
+
defineCustomElementFn?: () => void;
|
|
22
|
+
inputs?: any;
|
|
23
|
+
methods?: any;
|
|
24
|
+
ssr?: SsrOptions;
|
|
25
|
+
}): (cls: any) => any;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
import { inject, PLATFORM_ID } from '@angular/core';
|
|
4
|
+
import { fromEvent } from 'rxjs';
|
|
5
|
+
const serverInstances = new WeakSet();
|
|
6
|
+
/**
|
|
7
|
+
* Records a wrapper created during server rendering. Call from the constructor.
|
|
8
|
+
*/
|
|
9
|
+
export const markServer = (instance) => {
|
|
10
|
+
// what `isPlatformServer()` from `@angular/common` checks
|
|
11
|
+
if (inject(PLATFORM_ID) === 'server') {
|
|
12
|
+
serverInstances.add(instance);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Stencil's own prop name to attribute name conversion (`prop1` -> `prop-1`).
|
|
17
|
+
*/
|
|
18
|
+
const toDashCase = (str) => str
|
|
19
|
+
.replace(/([A-Z0-9])/g, (match) => ` ${match[0]}`)
|
|
20
|
+
.trim()
|
|
21
|
+
.split(' ')
|
|
22
|
+
.join('-')
|
|
23
|
+
.toLowerCase();
|
|
24
|
+
/**
|
|
25
|
+
* Angular's server DOM never writes properties to the HTML, so on the server an input becomes an
|
|
26
|
+
* attribute, which Stencil's `renderToString()` reads:
|
|
27
|
+
* - a string or number as itself, and `true` as an empty attribute, so the component's first
|
|
28
|
+
* render in the browser sees them too;
|
|
29
|
+
* - `false`, anything that isn't a primitive, and any value for a prop with no attribute through
|
|
30
|
+
* `ssrProp()`, which gives the server render the exact value and leaves no attribute behind.
|
|
31
|
+
*/
|
|
32
|
+
const setServerAttribute = (el, item, val, ssr) => {
|
|
33
|
+
const name = ssr.attributes?.[item] ?? toDashCase(item);
|
|
34
|
+
if (val == null) {
|
|
35
|
+
el.removeAttribute(name);
|
|
36
|
+
}
|
|
37
|
+
else if (ssr.refs?.includes(item) ||
|
|
38
|
+
val === false ||
|
|
39
|
+
(typeof val !== 'string' && typeof val !== 'number' && val !== true)) {
|
|
40
|
+
el.setAttribute(name, ssr.ssrProp(val));
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
el.setAttribute(name, val === true ? '' : String(val));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
export const proxyInputs = (Cmp, inputs, ssr) => {
|
|
47
|
+
const Prototype = Cmp.prototype;
|
|
48
|
+
inputs.forEach((item) => {
|
|
49
|
+
Object.defineProperty(Prototype, item, {
|
|
50
|
+
get() {
|
|
51
|
+
return this.el[item];
|
|
52
|
+
},
|
|
53
|
+
set(val) {
|
|
54
|
+
if (ssr && serverInstances.has(this)) {
|
|
55
|
+
// kept on the element too, so reading the input back on the server works
|
|
56
|
+
this.el[item] = val;
|
|
57
|
+
setServerAttribute(this.el, item, val, ssr);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
this.z.runOutsideAngular(() => (this.el[item] = val));
|
|
61
|
+
},
|
|
62
|
+
/**
|
|
63
|
+
* In the event that proxyInputs is called
|
|
64
|
+
* multiple times re-defining these inputs
|
|
65
|
+
* will cause an error to be thrown. As a result
|
|
66
|
+
* we set configurable: true to indicate these
|
|
67
|
+
* properties can be changed.
|
|
68
|
+
*/
|
|
69
|
+
configurable: true,
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
export const proxyMethods = (Cmp, methods) => {
|
|
74
|
+
const Prototype = Cmp.prototype;
|
|
75
|
+
methods.forEach((methodName) => {
|
|
76
|
+
Prototype[methodName] = function () {
|
|
77
|
+
const args = arguments;
|
|
78
|
+
return this.z.runOutsideAngular(() => this.el[methodName].apply(this.el, args));
|
|
79
|
+
};
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
export const proxyOutputs = (instance, el, events) => {
|
|
83
|
+
events.forEach((eventName) => (instance[eventName] = fromEvent(el, eventName)));
|
|
84
|
+
};
|
|
85
|
+
export const defineCustomElement = (tagName, customElement) => {
|
|
86
|
+
if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {
|
|
87
|
+
customElements.define(tagName, customElement);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
// tslint:disable-next-line: only-arrow-functions
|
|
91
|
+
export function ProxyCmp(opts) {
|
|
92
|
+
const decorator = function (cls) {
|
|
93
|
+
const { defineCustomElementFn, inputs, methods, ssr } = opts;
|
|
94
|
+
if (defineCustomElementFn !== undefined) {
|
|
95
|
+
defineCustomElementFn();
|
|
96
|
+
}
|
|
97
|
+
if (inputs) {
|
|
98
|
+
proxyInputs(cls, inputs, ssr);
|
|
99
|
+
}
|
|
100
|
+
if (methods) {
|
|
101
|
+
proxyMethods(cls, methods);
|
|
102
|
+
}
|
|
103
|
+
return cls;
|
|
104
|
+
};
|
|
105
|
+
return decorator;
|
|
106
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, EventEmitter, NgZone } from '@angular/core';
|
|
2
|
+
import type { Components } from '@globalpayments-private/gpds-pattern-web/dist/components';
|
|
3
|
+
export declare class UdsPatternAdmin {
|
|
4
|
+
protected z: NgZone;
|
|
5
|
+
protected el: HTMLUdsPatternAdminElement;
|
|
6
|
+
udsRouteChange: EventEmitter<UdsPatternAdminCustomEvent<IUdsPatternAdminRouteChange>>;
|
|
7
|
+
udsLogin: EventEmitter<UdsPatternAdminCustomEvent<IUdsPatternAdminAdminUser>>;
|
|
8
|
+
udsLogout: EventEmitter<UdsPatternAdminCustomEvent<void>>;
|
|
9
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
|
|
10
|
+
}
|
|
11
|
+
import type { UdsPatternAdminCustomEvent } from '@globalpayments-private/gpds-pattern-web/dist/components';
|
|
12
|
+
import type { RouteChange as IUdsPatternAdminRouteChange } from '@globalpayments-private/gpds-pattern-web/dist/components';
|
|
13
|
+
import type { AdminUser as IUdsPatternAdminAdminUser } from '@globalpayments-private/gpds-pattern-web/dist/components';
|
|
14
|
+
export declare interface UdsPatternAdmin extends Components.UdsPatternAdmin {
|
|
15
|
+
/**
|
|
16
|
+
* The route changed. For `dashboard` and `custom` routes, render the page into the default slot.
|
|
17
|
+
*/
|
|
18
|
+
udsRouteChange: EventEmitter<UdsPatternAdminCustomEvent<IUdsPatternAdminRouteChange>>;
|
|
19
|
+
/**
|
|
20
|
+
* A user signed in.
|
|
21
|
+
*/
|
|
22
|
+
udsLogin: EventEmitter<UdsPatternAdminCustomEvent<IUdsPatternAdminAdminUser>>;
|
|
23
|
+
/**
|
|
24
|
+
* The user signed out.
|
|
25
|
+
*/
|
|
26
|
+
udsLogout: EventEmitter<UdsPatternAdminCustomEvent<void>>;
|
|
27
|
+
}
|
|
28
|
+
export declare class UdsPatternDashboard {
|
|
29
|
+
protected z: NgZone;
|
|
30
|
+
protected el: HTMLUdsPatternDashboardElement;
|
|
31
|
+
udsDashboardDrill: EventEmitter<UdsPatternDashboardCustomEvent<IUdsPatternDashboardUdsDashboardDrillContext>>;
|
|
32
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
|
|
33
|
+
}
|
|
34
|
+
import type { UdsPatternDashboardCustomEvent } from '@globalpayments-private/gpds-pattern-web/dist/components';
|
|
35
|
+
import type { UdsDashboardDrillContext as IUdsPatternDashboardUdsDashboardDrillContext } from '@globalpayments-private/gpds-pattern-web/dist/components';
|
|
36
|
+
export declare interface UdsPatternDashboard extends Components.UdsPatternDashboard {
|
|
37
|
+
/**
|
|
38
|
+
* A widget, one of its points or one of its series was activated (always fires, before any navigation).
|
|
39
|
+
*/
|
|
40
|
+
udsDashboardDrill: EventEmitter<UdsPatternDashboardCustomEvent<IUdsPatternDashboardUdsDashboardDrillContext>>;
|
|
41
|
+
}
|
|
42
|
+
export declare class UdsPatternList {
|
|
43
|
+
protected z: NgZone;
|
|
44
|
+
protected el: HTMLUdsPatternListElement;
|
|
45
|
+
udsListRowClick: EventEmitter<UdsPatternListCustomEvent<IUdsPatternListRaRecord>>;
|
|
46
|
+
udsListSelectionChange: EventEmitter<UdsPatternListCustomEvent<IUdsPatternListIdentifier[]>>;
|
|
47
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
|
|
48
|
+
}
|
|
49
|
+
import type { UdsPatternListCustomEvent } from '@globalpayments-private/gpds-pattern-web/dist/components';
|
|
50
|
+
import type { RaRecord as IUdsPatternListRaRecord } from '@globalpayments-private/gpds-pattern-web/dist/components';
|
|
51
|
+
import type { Identifier as IUdsPatternListIdentifier } from '@globalpayments-private/gpds-pattern-web/dist/components';
|
|
52
|
+
export declare interface UdsPatternList extends Components.UdsPatternList {
|
|
53
|
+
/**
|
|
54
|
+
* A row was activated (always fires, before any navigation).
|
|
55
|
+
*/
|
|
56
|
+
udsListRowClick: EventEmitter<UdsPatternListCustomEvent<IUdsPatternListRaRecord>>;
|
|
57
|
+
/**
|
|
58
|
+
* The selected record ids changed.
|
|
59
|
+
*/
|
|
60
|
+
udsListSelectionChange: EventEmitter<UdsPatternListCustomEvent<IUdsPatternListIdentifier[]>>;
|
|
61
|
+
}
|
|
62
|
+
export declare class UdsPatternLogin {
|
|
63
|
+
protected z: NgZone;
|
|
64
|
+
protected el: HTMLUdsPatternLoginElement;
|
|
65
|
+
udsLoginSuccess: EventEmitter<UdsPatternLoginCustomEvent<IUdsPatternAdminAdminUser>>;
|
|
66
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
|
|
67
|
+
}
|
|
68
|
+
import type { UdsPatternLoginCustomEvent } from '@globalpayments-private/gpds-pattern-web/dist/components';
|
|
69
|
+
import type { AdminUser as IUdsPatternLoginAdminUser } from '@globalpayments-private/gpds-pattern-web/dist/components';
|
|
70
|
+
export declare interface UdsPatternLogin extends Components.UdsPatternLogin {
|
|
71
|
+
/**
|
|
72
|
+
* Signed in: the user the provider returned.
|
|
73
|
+
*/
|
|
74
|
+
udsLoginSuccess: EventEmitter<UdsPatternLoginCustomEvent<IUdsPatternLoginAdminUser>>;
|
|
75
|
+
}
|
|
76
|
+
export declare class UdsPatternRecordForm {
|
|
77
|
+
protected z: NgZone;
|
|
78
|
+
protected el: HTMLUdsPatternRecordFormElement;
|
|
79
|
+
udsRecordSave: EventEmitter<UdsPatternRecordFormCustomEvent<IUdsPatternListRaRecord>>;
|
|
80
|
+
udsRecordDelete: EventEmitter<UdsPatternRecordFormCustomEvent<IUdsPatternListIdentifier>>;
|
|
81
|
+
udsRecordCancel: EventEmitter<UdsPatternRecordFormCustomEvent<void>>;
|
|
82
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
|
|
83
|
+
}
|
|
84
|
+
import type { UdsPatternRecordFormCustomEvent } from '@globalpayments-private/gpds-pattern-web/dist/components';
|
|
85
|
+
import type { RaRecord as IUdsPatternRecordFormRaRecord } from '@globalpayments-private/gpds-pattern-web/dist/components';
|
|
86
|
+
import type { Identifier as IUdsPatternRecordFormIdentifier } from '@globalpayments-private/gpds-pattern-web/dist/components';
|
|
87
|
+
export declare interface UdsPatternRecordForm extends Components.UdsPatternRecordForm {
|
|
88
|
+
/**
|
|
89
|
+
* Saved: the created or updated record.
|
|
90
|
+
*/
|
|
91
|
+
udsRecordSave: EventEmitter<UdsPatternRecordFormCustomEvent<IUdsPatternRecordFormRaRecord>>;
|
|
92
|
+
/**
|
|
93
|
+
* Deleted: the id of the record.
|
|
94
|
+
*/
|
|
95
|
+
udsRecordDelete: EventEmitter<UdsPatternRecordFormCustomEvent<IUdsPatternRecordFormIdentifier>>;
|
|
96
|
+
/**
|
|
97
|
+
* The user cancelled.
|
|
98
|
+
*/
|
|
99
|
+
udsRecordCancel: EventEmitter<UdsPatternRecordFormCustomEvent<void>>;
|
|
100
|
+
}
|
|
101
|
+
export declare class UdsPatternRecordShow {
|
|
102
|
+
protected z: NgZone;
|
|
103
|
+
protected el: HTMLUdsPatternRecordShowElement;
|
|
104
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
|
|
105
|
+
}
|
|
106
|
+
export declare interface UdsPatternRecordShow extends Components.UdsPatternRecordShow {
|
|
107
|
+
}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
/* tslint:disable */
|
|
11
|
+
/* auto-generated angular directive proxies */
|
|
12
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, Output, NgZone } from '@angular/core';
|
|
13
|
+
import { ProxyCmp } from './angular-component-lib/utils';
|
|
14
|
+
import { defineCustomElement as defineUdsPatternAdmin } from '@globalpayments-private/gpds-pattern-web/dist/components/uds-pattern-admin.js';
|
|
15
|
+
import { defineCustomElement as defineUdsPatternDashboard } from '@globalpayments-private/gpds-pattern-web/dist/components/uds-pattern-dashboard.js';
|
|
16
|
+
import { defineCustomElement as defineUdsPatternList } from '@globalpayments-private/gpds-pattern-web/dist/components/uds-pattern-list.js';
|
|
17
|
+
import { defineCustomElement as defineUdsPatternLogin } from '@globalpayments-private/gpds-pattern-web/dist/components/uds-pattern-login.js';
|
|
18
|
+
import { defineCustomElement as defineUdsPatternRecordForm } from '@globalpayments-private/gpds-pattern-web/dist/components/uds-pattern-record-form.js';
|
|
19
|
+
import { defineCustomElement as defineUdsPatternRecordShow } from '@globalpayments-private/gpds-pattern-web/dist/components/uds-pattern-record-show.js';
|
|
20
|
+
let UdsPatternAdmin = class UdsPatternAdmin {
|
|
21
|
+
constructor(c, r, z) {
|
|
22
|
+
this.z = z;
|
|
23
|
+
this.udsRouteChange = new EventEmitter();
|
|
24
|
+
this.udsLogin = new EventEmitter();
|
|
25
|
+
this.udsLogout = new EventEmitter();
|
|
26
|
+
c.detach();
|
|
27
|
+
this.el = r.nativeElement;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
__decorate([
|
|
31
|
+
Output(),
|
|
32
|
+
__metadata("design:type", Object)
|
|
33
|
+
], UdsPatternAdmin.prototype, "udsRouteChange", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
Output(),
|
|
36
|
+
__metadata("design:type", Object)
|
|
37
|
+
], UdsPatternAdmin.prototype, "udsLogin", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
Output(),
|
|
40
|
+
__metadata("design:type", Object)
|
|
41
|
+
], UdsPatternAdmin.prototype, "udsLogout", void 0);
|
|
42
|
+
UdsPatternAdmin = __decorate([
|
|
43
|
+
ProxyCmp({
|
|
44
|
+
defineCustomElementFn: defineUdsPatternAdmin,
|
|
45
|
+
inputs: ['appTitle', 'config', 'dashboard', 'defaultTheme', 'loginHeroImage', 'notifications', 'theme']
|
|
46
|
+
}),
|
|
47
|
+
Component({
|
|
48
|
+
selector: 'uds-pattern-admin',
|
|
49
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
50
|
+
template: '<ng-content></ng-content>',
|
|
51
|
+
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
52
|
+
inputs: ['appTitle', 'config', 'dashboard', 'defaultTheme', 'loginHeroImage', 'notifications', 'theme'],
|
|
53
|
+
outputs: ['udsRouteChange', 'udsLogin', 'udsLogout'],
|
|
54
|
+
}),
|
|
55
|
+
__metadata("design:paramtypes", [ChangeDetectorRef, ElementRef, NgZone])
|
|
56
|
+
], UdsPatternAdmin);
|
|
57
|
+
export { UdsPatternAdmin };
|
|
58
|
+
let UdsPatternDashboard = class UdsPatternDashboard {
|
|
59
|
+
constructor(c, r, z) {
|
|
60
|
+
this.z = z;
|
|
61
|
+
this.udsDashboardDrill = new EventEmitter();
|
|
62
|
+
c.detach();
|
|
63
|
+
this.el = r.nativeElement;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
__decorate([
|
|
67
|
+
Output(),
|
|
68
|
+
__metadata("design:type", Object)
|
|
69
|
+
], UdsPatternDashboard.prototype, "udsDashboardDrill", void 0);
|
|
70
|
+
UdsPatternDashboard = __decorate([
|
|
71
|
+
ProxyCmp({
|
|
72
|
+
defineCustomElementFn: defineUdsPatternDashboard,
|
|
73
|
+
inputs: ['config', 'description', 'embedded', 'heading'],
|
|
74
|
+
methods: ['refresh']
|
|
75
|
+
}),
|
|
76
|
+
Component({
|
|
77
|
+
selector: 'uds-pattern-dashboard',
|
|
78
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
79
|
+
template: '<ng-content></ng-content>',
|
|
80
|
+
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
81
|
+
inputs: ['config', 'description', 'embedded', 'heading'],
|
|
82
|
+
outputs: ['udsDashboardDrill'],
|
|
83
|
+
}),
|
|
84
|
+
__metadata("design:paramtypes", [ChangeDetectorRef, ElementRef, NgZone])
|
|
85
|
+
], UdsPatternDashboard);
|
|
86
|
+
export { UdsPatternDashboard };
|
|
87
|
+
let UdsPatternList = class UdsPatternList {
|
|
88
|
+
constructor(c, r, z) {
|
|
89
|
+
this.z = z;
|
|
90
|
+
this.udsListRowClick = new EventEmitter();
|
|
91
|
+
this.udsListSelectionChange = new EventEmitter();
|
|
92
|
+
c.detach();
|
|
93
|
+
this.el = r.nativeElement;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
__decorate([
|
|
97
|
+
Output(),
|
|
98
|
+
__metadata("design:type", Object)
|
|
99
|
+
], UdsPatternList.prototype, "udsListRowClick", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
Output(),
|
|
102
|
+
__metadata("design:type", Object)
|
|
103
|
+
], UdsPatternList.prototype, "udsListSelectionChange", void 0);
|
|
104
|
+
UdsPatternList = __decorate([
|
|
105
|
+
ProxyCmp({
|
|
106
|
+
defineCustomElementFn: defineUdsPatternList,
|
|
107
|
+
inputs: ['config', 'description', 'embedded', 'heading', 'perPage', 'resource', 'rowClick'],
|
|
108
|
+
methods: ['refresh']
|
|
109
|
+
}),
|
|
110
|
+
Component({
|
|
111
|
+
selector: 'uds-pattern-list',
|
|
112
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
113
|
+
template: '<ng-content></ng-content>',
|
|
114
|
+
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
115
|
+
inputs: ['config', 'description', 'embedded', 'heading', 'perPage', { name: 'resource', required: true }, 'rowClick'],
|
|
116
|
+
outputs: ['udsListRowClick', 'udsListSelectionChange'],
|
|
117
|
+
}),
|
|
118
|
+
__metadata("design:paramtypes", [ChangeDetectorRef, ElementRef, NgZone])
|
|
119
|
+
], UdsPatternList);
|
|
120
|
+
export { UdsPatternList };
|
|
121
|
+
let UdsPatternLogin = class UdsPatternLogin {
|
|
122
|
+
constructor(c, r, z) {
|
|
123
|
+
this.z = z;
|
|
124
|
+
this.udsLoginSuccess = new EventEmitter();
|
|
125
|
+
c.detach();
|
|
126
|
+
this.el = r.nativeElement;
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
__decorate([
|
|
130
|
+
Output(),
|
|
131
|
+
__metadata("design:type", Object)
|
|
132
|
+
], UdsPatternLogin.prototype, "udsLoginSuccess", void 0);
|
|
133
|
+
UdsPatternLogin = __decorate([
|
|
134
|
+
ProxyCmp({
|
|
135
|
+
defineCustomElementFn: defineUdsPatternLogin,
|
|
136
|
+
inputs: ['config', 'heroImage'],
|
|
137
|
+
methods: ['reset']
|
|
138
|
+
}),
|
|
139
|
+
Component({
|
|
140
|
+
selector: 'uds-pattern-login',
|
|
141
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
142
|
+
template: '<ng-content></ng-content>',
|
|
143
|
+
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
144
|
+
inputs: ['config', 'heroImage'],
|
|
145
|
+
outputs: ['udsLoginSuccess'],
|
|
146
|
+
}),
|
|
147
|
+
__metadata("design:paramtypes", [ChangeDetectorRef, ElementRef, NgZone])
|
|
148
|
+
], UdsPatternLogin);
|
|
149
|
+
export { UdsPatternLogin };
|
|
150
|
+
let UdsPatternRecordForm = class UdsPatternRecordForm {
|
|
151
|
+
constructor(c, r, z) {
|
|
152
|
+
this.z = z;
|
|
153
|
+
this.udsRecordSave = new EventEmitter();
|
|
154
|
+
this.udsRecordDelete = new EventEmitter();
|
|
155
|
+
this.udsRecordCancel = new EventEmitter();
|
|
156
|
+
c.detach();
|
|
157
|
+
this.el = r.nativeElement;
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
__decorate([
|
|
161
|
+
Output(),
|
|
162
|
+
__metadata("design:type", Object)
|
|
163
|
+
], UdsPatternRecordForm.prototype, "udsRecordSave", void 0);
|
|
164
|
+
__decorate([
|
|
165
|
+
Output(),
|
|
166
|
+
__metadata("design:type", Object)
|
|
167
|
+
], UdsPatternRecordForm.prototype, "udsRecordDelete", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
Output(),
|
|
170
|
+
__metadata("design:type", Object)
|
|
171
|
+
], UdsPatternRecordForm.prototype, "udsRecordCancel", void 0);
|
|
172
|
+
UdsPatternRecordForm = __decorate([
|
|
173
|
+
ProxyCmp({
|
|
174
|
+
defineCustomElementFn: defineUdsPatternRecordForm,
|
|
175
|
+
inputs: ['config', 'mode', 'recordId', 'redirect', 'resource'],
|
|
176
|
+
methods: ['refresh']
|
|
177
|
+
}),
|
|
178
|
+
Component({
|
|
179
|
+
selector: 'uds-pattern-record-form',
|
|
180
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
181
|
+
template: '<ng-content></ng-content>',
|
|
182
|
+
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
183
|
+
inputs: ['config', 'mode', 'recordId', 'redirect', { name: 'resource', required: true }],
|
|
184
|
+
outputs: ['udsRecordSave', 'udsRecordDelete', 'udsRecordCancel'],
|
|
185
|
+
}),
|
|
186
|
+
__metadata("design:paramtypes", [ChangeDetectorRef, ElementRef, NgZone])
|
|
187
|
+
], UdsPatternRecordForm);
|
|
188
|
+
export { UdsPatternRecordForm };
|
|
189
|
+
let UdsPatternRecordShow = class UdsPatternRecordShow {
|
|
190
|
+
constructor(c, r, z) {
|
|
191
|
+
this.z = z;
|
|
192
|
+
c.detach();
|
|
193
|
+
this.el = r.nativeElement;
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
UdsPatternRecordShow = __decorate([
|
|
197
|
+
ProxyCmp({
|
|
198
|
+
defineCustomElementFn: defineUdsPatternRecordShow,
|
|
199
|
+
inputs: ['config', 'recordId', 'resource'],
|
|
200
|
+
methods: ['refresh']
|
|
201
|
+
}),
|
|
202
|
+
Component({
|
|
203
|
+
selector: 'uds-pattern-record-show',
|
|
204
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
205
|
+
template: '<ng-content></ng-content>',
|
|
206
|
+
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
207
|
+
inputs: ['config', 'recordId', { name: 'resource', required: true }],
|
|
208
|
+
}),
|
|
209
|
+
__metadata("design:paramtypes", [ChangeDetectorRef, ElementRef, NgZone])
|
|
210
|
+
], UdsPatternRecordShow);
|
|
211
|
+
export { UdsPatternRecordShow };
|
package/package.json
CHANGED
|
@@ -1,6 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@globalpayments-private/gpds-pattern-web-angular",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1-dev.gf7ad966",
|
|
4
|
+
"description": "Angular bindings for GPDS pattern library for Web — standalone component wrappers.",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/globalpayments-internal/gpds-pattern-web.git",
|
|
9
|
+
"directory": "packages/angular"
|
|
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/directives/proxies.js",
|
|
22
|
+
"module": "dist/directives/proxies.js",
|
|
23
|
+
"types": "dist/directives/proxies.d.ts",
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./dist/directives/proxies.d.ts",
|
|
27
|
+
"import": "./dist/directives/proxies.js"
|
|
28
|
+
},
|
|
29
|
+
"./package.json": "./package.json"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"dist/"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.json",
|
|
36
|
+
"prepack": "npm run build"
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"@angular/core": ">=19",
|
|
40
|
+
"@globalpayments-private/gpds-pattern-web": "0.1.1-dev.gf7ad966"
|
|
41
|
+
}
|
|
42
|
+
}
|
package/README.md
DELETED