@pepperi-addons/ngx-lib-react 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -0
- package/elements/3rdpartylicenses.txt +28 -0
- package/elements/main.js +1 -1
- package/http-helpers.d.ts +49 -0
- package/http-helpers.js +164 -0
- package/index.d.ts +15 -0
- package/index.js +17 -0
- package/package.json +1 -1
- package/pep-address.d.ts +38 -0
- package/pep-address.js +71 -0
- package/pep-attachment.d.ts +24 -0
- package/pep-attachment.js +76 -0
- package/pep-bread-crumbs.d.ts +16 -0
- package/pep-bread-crumbs.js +35 -0
- package/pep-carousel.d.ts +28 -0
- package/pep-carousel.js +80 -0
- package/pep-checkbox.d.ts +5 -0
- package/pep-checkbox.js +16 -1
- package/pep-chips.d.ts +6 -0
- package/pep-chips.js +13 -3
- package/pep-color-picker.d.ts +9 -0
- package/pep-color-picker.js +27 -0
- package/pep-color.d.ts +6 -0
- package/pep-color.js +14 -2
- package/pep-date.d.ts +25 -0
- package/pep-date.js +84 -7
- package/pep-dialog.d.ts +9 -0
- package/pep-dialog.js +34 -0
- package/pep-icon.d.ts +8 -0
- package/pep-icon.js +18 -0
- package/pep-image.d.ts +32 -0
- package/pep-image.js +89 -0
- package/pep-images-filmstrip.d.ts +16 -0
- package/pep-images-filmstrip.js +40 -0
- package/pep-link.d.ts +9 -0
- package/pep-link.js +21 -3
- package/pep-page-layout.d.ts +11 -0
- package/pep-page-layout.js +19 -0
- package/pep-search.d.ts +27 -0
- package/pep-search.js +59 -0
- package/pep-select.d.ts +14 -0
- package/pep-select.js +55 -7
- package/pep-separator.d.ts +2 -0
- package/pep-separator.js +6 -2
- package/pep-skeleton-loader.d.ts +8 -0
- package/pep-skeleton-loader.js +30 -0
- package/pep-snack-bar.d.ts +7 -0
- package/pep-snack-bar.js +33 -0
- package/pep-textarea.d.ts +14 -0
- package/pep-textarea.js +36 -8
- package/pep-textbox.d.ts +15 -0
- package/pep-textbox.js +46 -1
- package/services.d.ts +15 -0
- package/services.js +27 -0
- package/types.d.ts +9 -0
- package/types.js +9 -0
package/pep-checkbox.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
|
-
export const PepCheckbox = ({ keyProp, value, label, type, mandatory, disabled, readonly, xAlignment, rowSpan, additionalValue, visible, onValueChange, onValidationChange, className, ...rest }) => {
|
|
3
|
+
export const PepCheckbox = ({ keyProp, value, label, type, mandatory, disabled, readonly, xAlignment, rowSpan, additionalValue, visible, form, isActive, showTitle, renderTitle, layoutType, onValueChange, onValidationChange, className, ...rest }) => {
|
|
4
4
|
const ref = useRef(null);
|
|
5
5
|
// Sync props as properties on the custom element
|
|
6
6
|
useEffect(() => {
|
|
@@ -27,6 +27,16 @@ export const PepCheckbox = ({ keyProp, value, label, type, mandatory, disabled,
|
|
|
27
27
|
el.visible = !!visible;
|
|
28
28
|
if (typeof type !== 'undefined')
|
|
29
29
|
el.type = type;
|
|
30
|
+
if (typeof form !== 'undefined')
|
|
31
|
+
el.form = form;
|
|
32
|
+
if (typeof isActive !== 'undefined')
|
|
33
|
+
el.isActive = !!isActive;
|
|
34
|
+
if (typeof showTitle !== 'undefined')
|
|
35
|
+
el.showTitle = !!showTitle;
|
|
36
|
+
if (typeof renderTitle !== 'undefined')
|
|
37
|
+
el.renderTitle = !!renderTitle;
|
|
38
|
+
if (typeof layoutType !== 'undefined')
|
|
39
|
+
el.layoutType = layoutType;
|
|
30
40
|
}, [
|
|
31
41
|
keyProp,
|
|
32
42
|
value,
|
|
@@ -38,6 +48,11 @@ export const PepCheckbox = ({ keyProp, value, label, type, mandatory, disabled,
|
|
|
38
48
|
additionalValue,
|
|
39
49
|
visible,
|
|
40
50
|
type,
|
|
51
|
+
form,
|
|
52
|
+
isActive,
|
|
53
|
+
showTitle,
|
|
54
|
+
renderTitle,
|
|
55
|
+
layoutType,
|
|
41
56
|
]);
|
|
42
57
|
// Wire events
|
|
43
58
|
useEffect(() => {
|
package/pep-chips.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export interface IPepChipSelection {
|
|
|
10
10
|
isSelected: boolean;
|
|
11
11
|
}
|
|
12
12
|
export interface PepChipsProps extends React.HTMLAttributes<HTMLElement> {
|
|
13
|
+
keyProp?: string;
|
|
13
14
|
chips?: IPepChip[];
|
|
14
15
|
label?: string;
|
|
15
16
|
inline?: boolean;
|
|
@@ -19,6 +20,11 @@ export interface PepChipsProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
19
20
|
placeholder?: string;
|
|
20
21
|
mandatory?: boolean;
|
|
21
22
|
disabled?: boolean;
|
|
23
|
+
classNames?: string;
|
|
24
|
+
xAlignment?: string;
|
|
25
|
+
renderTitle?: boolean;
|
|
26
|
+
showTitle?: boolean;
|
|
27
|
+
layoutType?: string;
|
|
22
28
|
onFieldClick?: () => void;
|
|
23
29
|
onSelectionChange?: (e: IPepChipSelection) => void;
|
|
24
30
|
}
|
package/pep-chips.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
|
-
export const PepChips = ({ chips, label, inline, orientation, styleType, multiSelect, placeholder, mandatory, disabled, onFieldClick, onSelectionChange, className, ...rest }) => {
|
|
3
|
+
export const PepChips = ({ keyProp, chips, label, inline, orientation, styleType, multiSelect, placeholder, mandatory, disabled, classNames, xAlignment, renderTitle, showTitle, layoutType, onFieldClick, onSelectionChange, className, ...rest }) => {
|
|
4
4
|
const ref = useRef(null);
|
|
5
5
|
useEffect(() => {
|
|
6
6
|
const el = ref.current;
|
|
@@ -24,7 +24,17 @@ export const PepChips = ({ chips, label, inline, orientation, styleType, multiSe
|
|
|
24
24
|
el.disabled = !!disabled;
|
|
25
25
|
if (typeof label !== 'undefined')
|
|
26
26
|
el.label = label;
|
|
27
|
-
|
|
27
|
+
if (typeof classNames !== 'undefined')
|
|
28
|
+
el.classNames = classNames;
|
|
29
|
+
if (typeof xAlignment !== 'undefined')
|
|
30
|
+
el.xAlignment = xAlignment;
|
|
31
|
+
if (typeof renderTitle !== 'undefined')
|
|
32
|
+
el.renderTitle = !!renderTitle;
|
|
33
|
+
if (typeof showTitle !== 'undefined')
|
|
34
|
+
el.showTitle = !!showTitle;
|
|
35
|
+
if (typeof layoutType !== 'undefined')
|
|
36
|
+
el.layoutType = layoutType;
|
|
37
|
+
}, [chips, inline, orientation, styleType, multiSelect, placeholder, mandatory, disabled, label, classNames, xAlignment, renderTitle, showTitle, layoutType]);
|
|
28
38
|
useEffect(() => {
|
|
29
39
|
const el = ref.current;
|
|
30
40
|
if (!el)
|
|
@@ -37,6 +47,6 @@ export const PepChips = ({ chips, label, inline, orientation, styleType, multiSe
|
|
|
37
47
|
handlers.forEach(([n, h]) => el.addEventListener(n, h));
|
|
38
48
|
return () => handlers.forEach(([n, h]) => el.removeEventListener(n, h));
|
|
39
49
|
}, [onFieldClick, onSelectionChange]);
|
|
40
|
-
return (_jsx("pep-chips-element", { ref: ref, className: className, label: label, placeholder: placeholder, ...rest }));
|
|
50
|
+
return (_jsx("pep-chips-element", { ref: ref, className: className, label: label, placeholder: placeholder, ...rest }, keyProp));
|
|
41
51
|
};
|
|
42
52
|
//# sourceMappingURL=pep-chips.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare type InternalPepColorType = 'any' | 'solid' | 'gradient';
|
|
2
|
+
export interface OpenColorPickerOptions {
|
|
3
|
+
value?: string;
|
|
4
|
+
type?: InternalPepColorType;
|
|
5
|
+
showAAComplient?: boolean;
|
|
6
|
+
checkAAComplient?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function openPepColorPicker(options?: OpenColorPickerOptions): Promise<string | undefined>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export function openPepColorPicker(options = {}) {
|
|
2
|
+
return new Promise((resolve) => {
|
|
3
|
+
var _a, _b;
|
|
4
|
+
try {
|
|
5
|
+
const ref = (_b = (_a = window === null || window === void 0 ? void 0 : window.pepperi) === null || _a === void 0 ? void 0 : _a.openColorPicker) === null || _b === void 0 ? void 0 : _b.call(_a, {
|
|
6
|
+
value: options.value,
|
|
7
|
+
type: options.type,
|
|
8
|
+
showAAComplient: options.showAAComplient,
|
|
9
|
+
checkAAComplient: options.checkAAComplient,
|
|
10
|
+
});
|
|
11
|
+
if (ref && typeof ref.afterClosed === 'function') {
|
|
12
|
+
const sub = ref.afterClosed().subscribe((result) => {
|
|
13
|
+
var _a;
|
|
14
|
+
try {
|
|
15
|
+
(_a = sub === null || sub === void 0 ? void 0 : sub.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(sub);
|
|
16
|
+
}
|
|
17
|
+
catch (_) { /* noop */ }
|
|
18
|
+
resolve(result);
|
|
19
|
+
});
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
catch (_) { /* noop */ }
|
|
24
|
+
resolve(undefined);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=pep-color-picker.js.map
|
package/pep-color.d.ts
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare type PepColorType = 'any' | 'solid' | 'gradient';
|
|
3
3
|
export interface PepColorProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
|
+
keyProp?: string;
|
|
4
5
|
value?: string;
|
|
5
6
|
label?: string;
|
|
6
7
|
disabled?: boolean;
|
|
7
8
|
type?: PepColorType;
|
|
8
9
|
showAAComplient?: boolean;
|
|
9
10
|
checkAAComplient?: boolean;
|
|
11
|
+
xAlignment?: any;
|
|
12
|
+
rowSpan?: number;
|
|
13
|
+
showTitle?: boolean;
|
|
14
|
+
renderTitle?: boolean;
|
|
15
|
+
layoutType?: 'form' | 'table' | 'card' | string;
|
|
10
16
|
onValueChange?: (value: string) => void;
|
|
11
17
|
}
|
|
12
18
|
export declare const PepColor: React.FC<PepColorProps>;
|
package/pep-color.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
|
-
export const PepColor = ({ value, label, disabled, type, showAAComplient, checkAAComplient, onValueChange, className, ...rest }) => {
|
|
3
|
+
export const PepColor = ({ keyProp, value, label, disabled, type, showAAComplient, checkAAComplient, xAlignment, rowSpan, showTitle, renderTitle, layoutType, onValueChange, className, ...rest }) => {
|
|
4
4
|
const ref = useRef(null);
|
|
5
5
|
useEffect(() => {
|
|
6
6
|
const el = ref.current;
|
|
7
7
|
if (!el)
|
|
8
8
|
return;
|
|
9
|
+
if (typeof keyProp !== 'undefined')
|
|
10
|
+
el.key = keyProp;
|
|
9
11
|
if (typeof disabled !== 'undefined')
|
|
10
12
|
el.disabled = !!disabled;
|
|
11
13
|
if (typeof type !== 'undefined')
|
|
@@ -18,7 +20,17 @@ export const PepColor = ({ value, label, disabled, type, showAAComplient, checkA
|
|
|
18
20
|
el.value = value;
|
|
19
21
|
if (typeof label !== 'undefined')
|
|
20
22
|
el.label = label;
|
|
21
|
-
|
|
23
|
+
if (typeof xAlignment !== 'undefined')
|
|
24
|
+
el.xAlignment = xAlignment;
|
|
25
|
+
if (typeof rowSpan !== 'undefined')
|
|
26
|
+
el.rowSpan = rowSpan;
|
|
27
|
+
if (typeof showTitle !== 'undefined')
|
|
28
|
+
el.showTitle = !!showTitle;
|
|
29
|
+
if (typeof renderTitle !== 'undefined')
|
|
30
|
+
el.renderTitle = !!renderTitle;
|
|
31
|
+
if (typeof layoutType !== 'undefined')
|
|
32
|
+
el.layoutType = layoutType;
|
|
33
|
+
}, [keyProp, disabled, type, showAAComplient, checkAAComplient, value, label, xAlignment, rowSpan, showTitle, renderTitle, layoutType]);
|
|
22
34
|
useEffect(() => {
|
|
23
35
|
const el = ref.current;
|
|
24
36
|
if (!el || !onValueChange)
|
package/pep-date.d.ts
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
export declare type PepDateFieldType = 'date' | 'datetime';
|
|
2
3
|
export interface PepDateProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
|
+
keyProp?: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
type?: PepDateFieldType;
|
|
8
|
+
mandatory?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
readonly?: boolean;
|
|
11
|
+
textColor?: string;
|
|
12
|
+
xAlignment?: string;
|
|
13
|
+
rowSpan?: number;
|
|
14
|
+
chooseTime?: boolean;
|
|
15
|
+
visible?: boolean;
|
|
16
|
+
minValue?: number;
|
|
17
|
+
maxValue?: number;
|
|
18
|
+
minDateValue?: string;
|
|
19
|
+
maxDateValue?: string;
|
|
20
|
+
form?: any;
|
|
21
|
+
isActive?: boolean;
|
|
22
|
+
showTitle?: boolean;
|
|
23
|
+
renderTitle?: boolean;
|
|
24
|
+
renderError?: boolean;
|
|
25
|
+
renderSymbol?: boolean;
|
|
26
|
+
layoutType?: string;
|
|
3
27
|
onValueChange?: (value: any) => void;
|
|
28
|
+
onValidationChange?: (isValid: boolean) => void;
|
|
4
29
|
}
|
|
5
30
|
export declare const PepDate: React.FC<PepDateProps>;
|
package/pep-date.js
CHANGED
|
@@ -1,15 +1,92 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
|
-
export const PepDate = ({ onValueChange, className, ...rest }) => {
|
|
3
|
+
export const PepDate = ({ keyProp, value, label, type, mandatory, disabled, readonly, textColor, xAlignment, rowSpan, chooseTime, visible, minValue, maxValue, minDateValue, maxDateValue, form, isActive, showTitle, renderTitle, renderError, renderSymbol, layoutType, onValueChange, onValidationChange, className, ...rest }) => {
|
|
4
4
|
const ref = useRef(null);
|
|
5
|
+
// Sync inputs via element properties
|
|
5
6
|
useEffect(() => {
|
|
6
7
|
const el = ref.current;
|
|
7
|
-
if (!el
|
|
8
|
+
if (!el)
|
|
8
9
|
return;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
if (typeof value !== 'undefined')
|
|
11
|
+
el.value = value;
|
|
12
|
+
if (typeof label !== 'undefined')
|
|
13
|
+
el.label = label;
|
|
14
|
+
if (typeof type !== 'undefined')
|
|
15
|
+
el.type = type;
|
|
16
|
+
if (typeof mandatory !== 'undefined')
|
|
17
|
+
el.mandatory = !!mandatory;
|
|
18
|
+
if (typeof disabled !== 'undefined')
|
|
19
|
+
el.disabled = !!disabled;
|
|
20
|
+
if (typeof readonly !== 'undefined')
|
|
21
|
+
el.readonly = !!readonly;
|
|
22
|
+
if (typeof textColor !== 'undefined')
|
|
23
|
+
el.textColor = textColor;
|
|
24
|
+
if (typeof xAlignment !== 'undefined')
|
|
25
|
+
el.xAlignment = xAlignment;
|
|
26
|
+
if (typeof rowSpan !== 'undefined')
|
|
27
|
+
el.rowSpan = rowSpan;
|
|
28
|
+
if (typeof chooseTime !== 'undefined')
|
|
29
|
+
el.chooseTime = !!chooseTime;
|
|
30
|
+
if (typeof visible !== 'undefined')
|
|
31
|
+
el.visible = !!visible;
|
|
32
|
+
if (typeof minValue !== 'undefined')
|
|
33
|
+
el.minValue = minValue;
|
|
34
|
+
if (typeof maxValue !== 'undefined')
|
|
35
|
+
el.maxValue = maxValue;
|
|
36
|
+
if (typeof minDateValue !== 'undefined')
|
|
37
|
+
el.minDateValue = minDateValue;
|
|
38
|
+
if (typeof maxDateValue !== 'undefined')
|
|
39
|
+
el.maxDateValue = maxDateValue;
|
|
40
|
+
if (typeof form !== 'undefined')
|
|
41
|
+
el.form = form;
|
|
42
|
+
if (typeof isActive !== 'undefined')
|
|
43
|
+
el.isActive = !!isActive;
|
|
44
|
+
if (typeof showTitle !== 'undefined')
|
|
45
|
+
el.showTitle = !!showTitle;
|
|
46
|
+
if (typeof renderTitle !== 'undefined')
|
|
47
|
+
el.renderTitle = !!renderTitle;
|
|
48
|
+
if (typeof renderError !== 'undefined')
|
|
49
|
+
el.renderError = !!renderError;
|
|
50
|
+
if (typeof renderSymbol !== 'undefined')
|
|
51
|
+
el.renderSymbol = !!renderSymbol;
|
|
52
|
+
if (typeof layoutType !== 'undefined')
|
|
53
|
+
el.layoutType = layoutType;
|
|
54
|
+
}, [
|
|
55
|
+
value,
|
|
56
|
+
label,
|
|
57
|
+
type,
|
|
58
|
+
mandatory,
|
|
59
|
+
disabled,
|
|
60
|
+
readonly,
|
|
61
|
+
textColor,
|
|
62
|
+
xAlignment,
|
|
63
|
+
rowSpan,
|
|
64
|
+
chooseTime,
|
|
65
|
+
visible,
|
|
66
|
+
minValue,
|
|
67
|
+
maxValue,
|
|
68
|
+
minDateValue,
|
|
69
|
+
maxDateValue,
|
|
70
|
+
form,
|
|
71
|
+
isActive,
|
|
72
|
+
showTitle,
|
|
73
|
+
renderTitle,
|
|
74
|
+
renderError,
|
|
75
|
+
renderSymbol,
|
|
76
|
+
layoutType,
|
|
77
|
+
]);
|
|
78
|
+
useEffect(() => {
|
|
79
|
+
const el = ref.current;
|
|
80
|
+
if (!el)
|
|
81
|
+
return;
|
|
82
|
+
const handlers = [];
|
|
83
|
+
if (onValueChange)
|
|
84
|
+
handlers.push(['valueChange', (e) => { var _a, _b; return onValueChange((_a = e.detail) !== null && _a !== void 0 ? _a : (_b = e.target) === null || _b === void 0 ? void 0 : _b.value); }]);
|
|
85
|
+
if (onValidationChange)
|
|
86
|
+
handlers.push(['validationChange', (e) => { var _a, _b; return onValidationChange(!!((_a = e.detail) !== null && _a !== void 0 ? _a : (_b = e.target) === null || _b === void 0 ? void 0 : _b.value)); }]);
|
|
87
|
+
handlers.forEach(([n, h]) => el.addEventListener(n, h));
|
|
88
|
+
return () => handlers.forEach(([n, h]) => el.removeEventListener(n, h));
|
|
89
|
+
}, [onValueChange, onValidationChange]);
|
|
90
|
+
return (_jsx("pep-date-element", { ref: ref, className: className, value: value, label: label, type: type, ...rest }, keyProp));
|
|
14
91
|
};
|
|
15
92
|
//# sourceMappingURL=pep-date.js.map
|
package/pep-dialog.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface PepDialogProps extends React.HTMLAttributes<HTMLElement> {
|
|
3
|
+
title?: string;
|
|
4
|
+
showClose?: boolean;
|
|
5
|
+
showHeader?: boolean;
|
|
6
|
+
showFooter?: boolean;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const PepDialog: React.FC<PepDialogProps>;
|
package/pep-dialog.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef } from 'react';
|
|
3
|
+
export const PepDialog = ({ title, showClose, showHeader, showFooter, onClose, ...rest }) => {
|
|
4
|
+
const ref = useRef(null);
|
|
5
|
+
// Sync inputs as properties on the custom element
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
const el = ref.current;
|
|
8
|
+
if (!el)
|
|
9
|
+
return;
|
|
10
|
+
if (typeof title !== 'undefined')
|
|
11
|
+
el.title = title;
|
|
12
|
+
if (typeof showClose !== 'undefined')
|
|
13
|
+
el.showClose = !!showClose;
|
|
14
|
+
if (typeof showHeader !== 'undefined')
|
|
15
|
+
el.showHeader = !!showHeader;
|
|
16
|
+
if (typeof showFooter !== 'undefined')
|
|
17
|
+
el.showFooter = !!showFooter;
|
|
18
|
+
}, [title, showClose, showHeader, showFooter]);
|
|
19
|
+
// Wire events
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
const el = ref.current;
|
|
22
|
+
if (!el)
|
|
23
|
+
return;
|
|
24
|
+
const handlers = [];
|
|
25
|
+
if (onClose) {
|
|
26
|
+
const h = () => onClose();
|
|
27
|
+
handlers.push(['close', h]);
|
|
28
|
+
}
|
|
29
|
+
handlers.forEach(([n, h]) => el.addEventListener(n, h));
|
|
30
|
+
return () => handlers.forEach(([n, h]) => el.removeEventListener(n, h));
|
|
31
|
+
}, [onClose]);
|
|
32
|
+
return _jsx("pep-dialog-element", { ref: ref, ...rest });
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=pep-dialog.js.map
|
package/pep-icon.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type PepIconType = string;
|
|
3
|
+
export interface PepIconProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
|
+
name?: PepIconType;
|
|
5
|
+
fill?: string;
|
|
6
|
+
spin?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const PepIcon: React.FC<PepIconProps>;
|
package/pep-icon.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef } from 'react';
|
|
3
|
+
export const PepIcon = ({ name, fill, spin, className, ...rest }) => {
|
|
4
|
+
const ref = useRef(null);
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
const el = ref.current;
|
|
7
|
+
if (!el)
|
|
8
|
+
return;
|
|
9
|
+
if (typeof name !== 'undefined')
|
|
10
|
+
el.name = name;
|
|
11
|
+
if (typeof fill !== 'undefined')
|
|
12
|
+
el.fill = fill;
|
|
13
|
+
if (typeof spin !== 'undefined')
|
|
14
|
+
el.spin = !!spin;
|
|
15
|
+
}, [name, fill, spin]);
|
|
16
|
+
return (_jsx("pep-icon-element", { ref: ref, className: className, ...rest }));
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=pep-icon.js.map
|
package/pep-image.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface PepImageProps {
|
|
3
|
+
keyProp?: string;
|
|
4
|
+
srcLarge?: string;
|
|
5
|
+
src?: string;
|
|
6
|
+
options?: any[];
|
|
7
|
+
label?: string;
|
|
8
|
+
mandatory?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
readonly?: boolean;
|
|
11
|
+
xAlignment?: 'start' | 'center' | 'end';
|
|
12
|
+
rowSpan?: number;
|
|
13
|
+
indicatorsField?: any;
|
|
14
|
+
menuField?: any;
|
|
15
|
+
hasCampaignField?: any;
|
|
16
|
+
visible?: boolean;
|
|
17
|
+
form?: any;
|
|
18
|
+
uid?: string;
|
|
19
|
+
showTitle?: boolean;
|
|
20
|
+
renderTitle?: boolean;
|
|
21
|
+
layoutType?: 'form' | 'table' | 'card';
|
|
22
|
+
isActive?: boolean;
|
|
23
|
+
sizeLimitMB?: number;
|
|
24
|
+
acceptImagesType?: string;
|
|
25
|
+
handleActions?: boolean;
|
|
26
|
+
hint?: string;
|
|
27
|
+
onChooseFile?: () => void;
|
|
28
|
+
onFileChange?: (event: any) => void;
|
|
29
|
+
onElementClick?: (event: any) => void;
|
|
30
|
+
onValidationChange?: (isValid: boolean) => void;
|
|
31
|
+
}
|
|
32
|
+
export declare const PepImage: React.FC<PepImageProps>;
|
package/pep-image.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useEffect } from 'react';
|
|
3
|
+
export const PepImage = ({ keyProp, srcLarge, src, options, label, mandatory, disabled, readonly, xAlignment, rowSpan, indicatorsField, menuField, hasCampaignField, visible, form, uid, showTitle, renderTitle, layoutType, isActive, sizeLimitMB, acceptImagesType, handleActions, hint, onChooseFile, onFileChange, onElementClick, onValidationChange, }) => {
|
|
4
|
+
const elementRef = useRef(null);
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
const element = elementRef.current;
|
|
7
|
+
if (!element)
|
|
8
|
+
return;
|
|
9
|
+
// Set properties
|
|
10
|
+
if (keyProp !== undefined)
|
|
11
|
+
element.key = keyProp;
|
|
12
|
+
if (srcLarge !== undefined)
|
|
13
|
+
element.srcLarge = srcLarge;
|
|
14
|
+
if (src !== undefined)
|
|
15
|
+
element.src = src;
|
|
16
|
+
if (options !== undefined)
|
|
17
|
+
element.options = options;
|
|
18
|
+
if (label !== undefined)
|
|
19
|
+
element.label = label;
|
|
20
|
+
if (mandatory !== undefined)
|
|
21
|
+
element.mandatory = mandatory;
|
|
22
|
+
if (disabled !== undefined)
|
|
23
|
+
element.disabled = disabled;
|
|
24
|
+
if (readonly !== undefined)
|
|
25
|
+
element.readonly = readonly;
|
|
26
|
+
if (xAlignment !== undefined)
|
|
27
|
+
element.xAlignment = xAlignment;
|
|
28
|
+
if (rowSpan !== undefined)
|
|
29
|
+
element.rowSpan = rowSpan;
|
|
30
|
+
if (indicatorsField !== undefined)
|
|
31
|
+
element.indicatorsField = indicatorsField;
|
|
32
|
+
if (menuField !== undefined)
|
|
33
|
+
element.menuField = menuField;
|
|
34
|
+
if (hasCampaignField !== undefined)
|
|
35
|
+
element.hasCampaignField = hasCampaignField;
|
|
36
|
+
if (visible !== undefined)
|
|
37
|
+
element.visible = visible;
|
|
38
|
+
if (form !== undefined)
|
|
39
|
+
element.form = form;
|
|
40
|
+
if (uid !== undefined)
|
|
41
|
+
element.uid = uid;
|
|
42
|
+
if (showTitle !== undefined)
|
|
43
|
+
element.showTitle = showTitle;
|
|
44
|
+
if (renderTitle !== undefined)
|
|
45
|
+
element.renderTitle = renderTitle;
|
|
46
|
+
if (layoutType !== undefined)
|
|
47
|
+
element.layoutType = layoutType;
|
|
48
|
+
if (isActive !== undefined)
|
|
49
|
+
element.isActive = isActive;
|
|
50
|
+
if (sizeLimitMB !== undefined)
|
|
51
|
+
element.sizeLimitMB = sizeLimitMB;
|
|
52
|
+
if (acceptImagesType !== undefined)
|
|
53
|
+
element.acceptImagesType = acceptImagesType;
|
|
54
|
+
if (handleActions !== undefined)
|
|
55
|
+
element.handleActions = handleActions;
|
|
56
|
+
if (hint !== undefined)
|
|
57
|
+
element.hint = hint;
|
|
58
|
+
}, [keyProp, srcLarge, src, options, label, mandatory, disabled, readonly, xAlignment, rowSpan, indicatorsField, menuField, hasCampaignField, visible, form, uid, showTitle, renderTitle, layoutType, isActive, sizeLimitMB, acceptImagesType, handleActions, hint]);
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
const element = elementRef.current;
|
|
61
|
+
if (!element)
|
|
62
|
+
return;
|
|
63
|
+
// Event listeners
|
|
64
|
+
const handleChooseFile = () => onChooseFile === null || onChooseFile === void 0 ? void 0 : onChooseFile();
|
|
65
|
+
const handleFileChange = (e) => onFileChange === null || onFileChange === void 0 ? void 0 : onFileChange(e.detail);
|
|
66
|
+
const handleElementClick = (e) => onElementClick === null || onElementClick === void 0 ? void 0 : onElementClick(e.detail);
|
|
67
|
+
const handleValidationChange = (e) => onValidationChange === null || onValidationChange === void 0 ? void 0 : onValidationChange(e.detail);
|
|
68
|
+
if (onChooseFile)
|
|
69
|
+
element.addEventListener('chooseFile', handleChooseFile);
|
|
70
|
+
if (onFileChange)
|
|
71
|
+
element.addEventListener('fileChange', handleFileChange);
|
|
72
|
+
if (onElementClick)
|
|
73
|
+
element.addEventListener('elementClick', handleElementClick);
|
|
74
|
+
if (onValidationChange)
|
|
75
|
+
element.addEventListener('validationChange', handleValidationChange);
|
|
76
|
+
return () => {
|
|
77
|
+
if (onChooseFile)
|
|
78
|
+
element.removeEventListener('chooseFile', handleChooseFile);
|
|
79
|
+
if (onFileChange)
|
|
80
|
+
element.removeEventListener('fileChange', handleFileChange);
|
|
81
|
+
if (onElementClick)
|
|
82
|
+
element.removeEventListener('elementClick', handleElementClick);
|
|
83
|
+
if (onValidationChange)
|
|
84
|
+
element.removeEventListener('validationChange', handleValidationChange);
|
|
85
|
+
};
|
|
86
|
+
}, [onChooseFile, onFileChange, onElementClick, onValidationChange]);
|
|
87
|
+
return _jsx("pep-image-element", { ref: elementRef });
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=pep-image.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface PepImagesFilmstripProps {
|
|
3
|
+
keyProp?: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
xAlignment?: 'start' | 'center' | 'end';
|
|
7
|
+
rowSpan?: number;
|
|
8
|
+
form?: any;
|
|
9
|
+
uid?: string;
|
|
10
|
+
showTitle?: boolean;
|
|
11
|
+
renderTitle?: boolean;
|
|
12
|
+
layoutType?: 'form' | 'table' | 'card';
|
|
13
|
+
currIndex?: number;
|
|
14
|
+
showThumbnails?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const PepImagesFilmstrip: React.FC<PepImagesFilmstripProps>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useEffect } from 'react';
|
|
3
|
+
export const PepImagesFilmstrip = ({ keyProp, value, label, xAlignment, rowSpan, form, uid, showTitle, renderTitle, layoutType, currIndex, showThumbnails, }) => {
|
|
4
|
+
const elementRef = useRef(null);
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
const element = elementRef.current;
|
|
7
|
+
if (!element)
|
|
8
|
+
return;
|
|
9
|
+
// Defer property setting to ensure Angular component initialization completes
|
|
10
|
+
setTimeout(() => {
|
|
11
|
+
if (keyProp !== undefined)
|
|
12
|
+
element.key = keyProp;
|
|
13
|
+
if (value !== undefined)
|
|
14
|
+
element.value = value;
|
|
15
|
+
if (label !== undefined)
|
|
16
|
+
element.label = label;
|
|
17
|
+
if (xAlignment !== undefined)
|
|
18
|
+
element.xAlignment = xAlignment;
|
|
19
|
+
if (rowSpan !== undefined)
|
|
20
|
+
element.rowSpan = rowSpan;
|
|
21
|
+
if (form !== undefined)
|
|
22
|
+
element.form = form;
|
|
23
|
+
if (uid !== undefined)
|
|
24
|
+
element.uid = uid;
|
|
25
|
+
if (showTitle !== undefined)
|
|
26
|
+
element.showTitle = showTitle;
|
|
27
|
+
if (renderTitle !== undefined)
|
|
28
|
+
element.renderTitle = renderTitle;
|
|
29
|
+
if (layoutType !== undefined)
|
|
30
|
+
element.layoutType = layoutType;
|
|
31
|
+
if (currIndex !== undefined)
|
|
32
|
+
element.currIndex = currIndex;
|
|
33
|
+
if (showThumbnails !== undefined)
|
|
34
|
+
element.showThumbnails = showThumbnails;
|
|
35
|
+
console.log('PepImagesFilmstrip properties set:', { value, label, showThumbnails, currIndex, showTitle, renderTitle });
|
|
36
|
+
}, 0);
|
|
37
|
+
}, [keyProp, value, label, xAlignment, rowSpan, form, uid, showTitle, renderTitle, layoutType, currIndex, showThumbnails]);
|
|
38
|
+
return _jsx("pep-images-filmstrip-element", { ref: elementRef });
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=pep-images-filmstrip.js.map
|
package/pep-link.d.ts
CHANGED
|
@@ -10,6 +10,15 @@ export interface PepLinkProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
10
10
|
maxFieldCharacters?: number;
|
|
11
11
|
textColor?: string;
|
|
12
12
|
rowSpan?: number;
|
|
13
|
+
xAlignment?: string;
|
|
14
|
+
visible?: boolean;
|
|
15
|
+
form?: any;
|
|
16
|
+
isActive?: boolean;
|
|
17
|
+
showTitle?: boolean;
|
|
18
|
+
renderTitle?: boolean;
|
|
19
|
+
renderError?: boolean;
|
|
20
|
+
renderSymbol?: boolean;
|
|
21
|
+
layoutType?: string;
|
|
13
22
|
onValueChange?: (value: string) => void;
|
|
14
23
|
onElementClick?: (e: any) => void;
|
|
15
24
|
onKeyup?: (e: any) => void;
|
package/pep-link.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
|
-
export const PepLink = ({ keyProp, value, label, placeholder, mandatory, disabled, readonly, maxFieldCharacters, textColor, rowSpan, onValueChange, onElementClick, onKeyup, onValidationChange, className, ...rest }) => {
|
|
3
|
+
export const PepLink = ({ keyProp, value, label, placeholder, mandatory, disabled, readonly, maxFieldCharacters, textColor, rowSpan, xAlignment, visible, form, isActive, showTitle, renderTitle, renderError, renderSymbol, layoutType, onValueChange, onElementClick, onKeyup, onValidationChange, className, ...rest }) => {
|
|
4
4
|
const ref = useRef(null);
|
|
5
5
|
useEffect(() => {
|
|
6
6
|
const el = ref.current;
|
|
@@ -20,7 +20,25 @@ export const PepLink = ({ keyProp, value, label, placeholder, mandatory, disable
|
|
|
20
20
|
el.textColor = textColor;
|
|
21
21
|
if (typeof rowSpan !== 'undefined')
|
|
22
22
|
el.rowSpan = rowSpan;
|
|
23
|
-
|
|
23
|
+
if (typeof xAlignment !== 'undefined')
|
|
24
|
+
el.xAlignment = xAlignment;
|
|
25
|
+
if (typeof visible !== 'undefined')
|
|
26
|
+
el.visible = !!visible;
|
|
27
|
+
if (typeof form !== 'undefined')
|
|
28
|
+
el.form = form;
|
|
29
|
+
if (typeof isActive !== 'undefined')
|
|
30
|
+
el.isActive = !!isActive;
|
|
31
|
+
if (typeof showTitle !== 'undefined')
|
|
32
|
+
el.showTitle = !!showTitle;
|
|
33
|
+
if (typeof renderTitle !== 'undefined')
|
|
34
|
+
el.renderTitle = !!renderTitle;
|
|
35
|
+
if (typeof renderError !== 'undefined')
|
|
36
|
+
el.renderError = !!renderError;
|
|
37
|
+
if (typeof renderSymbol !== 'undefined')
|
|
38
|
+
el.renderSymbol = !!renderSymbol;
|
|
39
|
+
if (typeof layoutType !== 'undefined')
|
|
40
|
+
el.layoutType = layoutType;
|
|
41
|
+
}, [keyProp, mandatory, disabled, readonly, maxFieldCharacters, textColor, rowSpan, xAlignment, visible, form, isActive, showTitle, renderTitle, renderError, renderSymbol, layoutType]);
|
|
24
42
|
useEffect(() => {
|
|
25
43
|
const el = ref.current;
|
|
26
44
|
if (!el)
|
|
@@ -37,6 +55,6 @@ export const PepLink = ({ keyProp, value, label, placeholder, mandatory, disable
|
|
|
37
55
|
handlers.forEach(([n, h]) => el.addEventListener(n, h));
|
|
38
56
|
return () => handlers.forEach(([n, h]) => el.removeEventListener(n, h));
|
|
39
57
|
}, [onValueChange, onElementClick, onKeyup, onValidationChange]);
|
|
40
|
-
return (_jsx("pep-link-element", { ref: ref, className: className, value: value, label: label, placeholder: placeholder, ...rest }));
|
|
58
|
+
return (_jsx("pep-link-element", { ref: ref, className: className, value: value, label: label, placeholder: placeholder, ...rest }, keyProp));
|
|
41
59
|
};
|
|
42
60
|
//# sourceMappingURL=pep-link.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface PepPageLayoutProps {
|
|
3
|
+
addPadding?: boolean;
|
|
4
|
+
showShadow?: boolean;
|
|
5
|
+
headerArea?: React.ReactNode;
|
|
6
|
+
sideArea?: React.ReactNode;
|
|
7
|
+
topArea?: React.ReactNode;
|
|
8
|
+
mainArea?: React.ReactNode;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare const PepPageLayout: React.FC<PepPageLayoutProps>;
|