@pepperi-addons/ngx-composite-lib-react 0.0.4 → 0.5.0

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 (61) hide show
  1. package/README.md +79 -0
  2. package/elements/3rdpartylicenses.txt +0 -26
  3. package/elements/971.js +1 -1
  4. package/elements/index.html +5 -5
  5. package/elements/main.js +1 -1
  6. package/elements/polyfills.js +1 -1
  7. package/elements/runtime.js +1 -1
  8. package/elements/styles.css +16 -1
  9. package/index.d.ts +10 -19
  10. package/index.js +10 -19
  11. package/package.json +24 -23
  12. package/pep-color-settings.d.ts +17 -4
  13. package/pep-color-settings.js +33 -2
  14. package/pep-file-status-panel.d.ts +18 -4
  15. package/pep-file-status-panel.js +28 -2
  16. package/pep-flow-picker-button.d.ts +13 -4
  17. package/pep-flow-picker-button.js +29 -2
  18. package/pep-generic-list.d.ts +70 -4
  19. package/pep-generic-list.js +126 -2
  20. package/pep-group-buttons-settings.d.ts +25 -4
  21. package/pep-group-buttons-settings.js +45 -2
  22. package/pep-icon-picker.d.ts +18 -4
  23. package/pep-icon-picker.js +39 -2
  24. package/pep-padding-settings.d.ts +12 -4
  25. package/pep-padding-settings.js +23 -2
  26. package/pep-rich-text.d.ts +47 -4
  27. package/pep-rich-text.js +76 -2
  28. package/pep-shadow-settings.d.ts +15 -4
  29. package/pep-shadow-settings.js +22 -2
  30. package/pep-show-if-badge.d.ts +10 -4
  31. package/pep-show-if-badge.js +16 -2
  32. package/components/PepGroupButtonsSettings.d.ts +0 -14
  33. package/components/PepGroupButtonsSettings.js +0 -19
  34. package/components/PepGroupButtonsSettingsReact.d.ts +0 -14
  35. package/components/PepGroupButtonsSettingsReact.js +0 -104
  36. package/elements/register.auto.d.ts +0 -1
  37. package/elements/register.auto.js +0 -1
  38. package/elements/register.d.ts +0 -1
  39. package/elements/register.js +0 -1
  40. package/elements/register.polyfills.js +0 -1
  41. package/elements/register.runtime.js +0 -1
  42. package/pep-data-view-builder.d.ts +0 -4
  43. package/pep-data-view-builder.js +0 -3
  44. package/pep-field-container.d.ts +0 -4
  45. package/pep-field-container.js +0 -3
  46. package/pep-generic-form.d.ts +0 -4
  47. package/pep-generic-form.js +0 -3
  48. package/pep-group-buttons-settings-react.d.ts +0 -14
  49. package/pep-group-buttons-settings-react.js +0 -62
  50. package/pep-layout-builder-editor.d.ts +0 -4
  51. package/pep-layout-builder-editor.js +0 -3
  52. package/pep-layout-builder.d.ts +0 -4
  53. package/pep-layout-builder.js +0 -3
  54. package/pep-layout.d.ts +0 -4
  55. package/pep-layout.js +0 -3
  56. package/pep-manage-parameters.d.ts +0 -4
  57. package/pep-manage-parameters.js +0 -3
  58. package/pep-mapping-parameters.d.ts +0 -4
  59. package/pep-mapping-parameters.js +0 -3
  60. package/utils/create-wrapper.d.ts +0 -7
  61. package/utils/create-wrapper.js +0 -46
package/index.d.ts CHANGED
@@ -1,19 +1,10 @@
1
- export * from './pep-color-settings.js';
2
- export * from './pep-padding-settings.js';
3
- export * from './pep-shadow-settings.js';
4
- export * from './pep-rich-text.js';
5
- export * from './pep-icon-picker.js';
6
- export * from './pep-generic-form.js';
7
- export * from './pep-generic-list.js';
8
- export * from './pep-data-view-builder.js';
9
- export * from './pep-field-container.js';
10
- export * from './pep-file-status-panel.js';
11
- export * from './pep-manage-parameters.js';
12
- export * from './pep-mapping-parameters.js';
13
- export * from './pep-show-if-badge.js';
14
- export * from './pep-layout.js';
15
- export * from './pep-layout-builder.js';
16
- export * from './pep-layout-builder-editor.js';
17
- export * from './pep-flow-picker-button.js';
18
- export { PepGroupButtonsSettingsReact } from './components/PepGroupButtonsSettingsReact.js';
19
- export { PepGroupButtonsSettings as PepGroupButtonsSettingsWC } from './pep-group-buttons-settings.js';
1
+ export { PepColorSettings } from './pep-color-settings.js';
2
+ export { PepGroupButtonsSettings } from './pep-group-buttons-settings.js';
3
+ export { PepFlowPickerButton } from './pep-flow-picker-button.js';
4
+ export { PepIconPicker } from './pep-icon-picker.js';
5
+ export { PepPaddingSettings } from './pep-padding-settings.js';
6
+ export { PepShadowSettings } from './pep-shadow-settings.js';
7
+ export { PepRichText } from './pep-rich-text.js';
8
+ export { PepShowIfBadge } from './pep-show-if-badge.js';
9
+ export { PepGenericList } from './pep-generic-list.js';
10
+ export { PepFileStatusPanel } from './pep-file-status-panel.js';
package/index.js CHANGED
@@ -1,20 +1,11 @@
1
- export * from './pep-color-settings.js';
2
- export * from './pep-padding-settings.js';
3
- export * from './pep-shadow-settings.js';
4
- export * from './pep-rich-text.js';
5
- export * from './pep-icon-picker.js';
6
- export * from './pep-generic-form.js';
7
- export * from './pep-generic-list.js';
8
- export * from './pep-data-view-builder.js';
9
- export * from './pep-field-container.js';
10
- export * from './pep-file-status-panel.js';
11
- export * from './pep-manage-parameters.js';
12
- export * from './pep-mapping-parameters.js';
13
- export * from './pep-show-if-badge.js';
14
- export * from './pep-layout.js';
15
- export * from './pep-layout-builder.js';
16
- export * from './pep-layout-builder-editor.js';
17
- export * from './pep-flow-picker-button.js';
18
- export { PepGroupButtonsSettingsReact } from './components/PepGroupButtonsSettingsReact.js';
19
- export { PepGroupButtonsSettings as PepGroupButtonsSettingsWC } from './pep-group-buttons-settings.js';
1
+ export { PepColorSettings } from './pep-color-settings.js';
2
+ export { PepGroupButtonsSettings } from './pep-group-buttons-settings.js';
3
+ export { PepFlowPickerButton } from './pep-flow-picker-button.js';
4
+ export { PepIconPicker } from './pep-icon-picker.js';
5
+ export { PepPaddingSettings } from './pep-padding-settings.js';
6
+ export { PepShadowSettings } from './pep-shadow-settings.js';
7
+ export { PepRichText } from './pep-rich-text.js';
8
+ export { PepShowIfBadge } from './pep-show-if-badge.js';
9
+ export { PepGenericList } from './pep-generic-list.js';
10
+ export { PepFileStatusPanel } from './pep-file-status-panel.js';
20
11
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,40 +1,41 @@
1
1
  {
2
2
  "name": "@pepperi-addons/ngx-composite-lib-react",
3
- "version": "0.0.4",
4
- "description": "React wrappers for @pepperi-addons/ngx-composite-lib web components, plus registration bundles.",
5
- "type": "module",
3
+ "version": "0.5.0",
4
+ "description": "React wrappers for Pepperi ngx-composite-lib Angular Elements.",
5
+ "license": "MIT",
6
+ "author": "Pepperi",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://example.com/repo.git"
10
+ },
11
+ "keywords": [
12
+ "pepperi",
13
+ "react",
14
+ "angular-elements",
15
+ "web-components",
16
+ "composite"
17
+ ],
6
18
  "main": "index.js",
7
19
  "module": "index.js",
8
20
  "types": "index.d.ts",
21
+ "peerDependencies": {
22
+ "react": ">=17",
23
+ "react-dom": ">=17"
24
+ },
9
25
  "files": [
10
26
  "*.js",
11
27
  "*.d.ts",
12
- "components/*.js",
13
- "components/*.d.ts",
14
- "utils/*.js",
15
- "utils/*.d.ts",
16
- "elements/*",
17
- "README.md"
28
+ "README.md",
29
+ "elements/*"
18
30
  ],
19
31
  "exports": {
20
32
  ".": {
21
33
  "types": "./index.d.ts",
22
34
  "default": "./index.js"
23
35
  },
24
- "./components/PepGroupButtonsSettingsReact.js": "./components/PepGroupButtonsSettingsReact.js",
25
- "./elements/register.js": "./elements/register.js",
26
- "./elements/register.auto.js": "./elements/register.auto.js",
27
36
  "./elements/styles.css": "./elements/styles.css",
28
- "./elements/register.runtime.js": "./elements/register.runtime.js",
29
- "./elements/register.polyfills.js": "./elements/register.polyfills.js"
30
- },
31
- "peerDependencies": {
32
- "react": ">=17",
33
- "react-dom": ">=17",
34
- "@pepperi-addons/ngx-lib-react": ">=0.0.0"
35
- },
36
- "sideEffects": false,
37
- "publishConfig": {
38
- "access": "public"
37
+ "./elements/main.js": "./elements/main.js",
38
+ "./elements/runtime.js": "./elements/runtime.js",
39
+ "./elements/polyfills.js": "./elements/polyfills.js"
39
40
  }
40
41
  }
@@ -1,4 +1,17 @@
1
- /// <reference types="react" resolution-mode="require"/>
2
- export declare const PepColorSettings: import("react").ForwardRefExoticComponent<Pick<Record<string, any> & {
3
- children?: import("react").ReactNode;
4
- }, string> & import("react").RefAttributes<HTMLElement & Record<string, any>>>;
1
+ import React from 'react';
2
+ export interface PepColorSettingsValue {
3
+ value?: string;
4
+ opacity?: number;
5
+ use?: boolean;
6
+ }
7
+ export interface PepColorSettingsProps {
8
+ title?: string;
9
+ checkAAComplient?: boolean;
10
+ showAAComplient?: boolean;
11
+ titleSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | string;
12
+ color?: PepColorSettingsValue;
13
+ onColorChange?: (value: PepColorSettingsValue) => void;
14
+ className?: string;
15
+ style?: React.CSSProperties;
16
+ }
17
+ export declare const PepColorSettings: React.FC<PepColorSettingsProps>;
@@ -1,3 +1,34 @@
1
- import { createPepWrapper } from './utils/create-wrapper.js';
2
- export const PepColorSettings = createPepWrapper('pep-color-settings', 'PepColorSettings');
1
+ import React, { useEffect, useRef } from 'react';
2
+ export const PepColorSettings = ({ title, checkAAComplient, showAAComplient, titleSize, color, onColorChange, className, style, }) => {
3
+ const ref = useRef(null);
4
+ // Apply inputs as element properties (preferred for Angular Elements)
5
+ useEffect(() => {
6
+ const el = ref.current;
7
+ if (!el)
8
+ return;
9
+ if (title !== undefined)
10
+ el.title = title;
11
+ if (checkAAComplient !== undefined)
12
+ el.checkAAComplient = checkAAComplient;
13
+ if (showAAComplient !== undefined)
14
+ el.showAAComplient = showAAComplient;
15
+ if (titleSize !== undefined)
16
+ el.titleSize = titleSize;
17
+ if (color !== undefined)
18
+ el.color = color;
19
+ }, [title, checkAAComplient, showAAComplient, titleSize, color]);
20
+ // Wire outputs
21
+ useEffect(() => {
22
+ const el = ref.current;
23
+ if (!el)
24
+ return;
25
+ const handler = (e) => {
26
+ const ce = e;
27
+ onColorChange?.(ce.detail ?? el.color);
28
+ };
29
+ el.addEventListener('colorChange', handler);
30
+ return () => el.removeEventListener('colorChange', handler);
31
+ }, [onColorChange]);
32
+ return React.createElement('pep-color-settings-element', { ref, class: className, style });
33
+ };
3
34
  //# sourceMappingURL=pep-color-settings.js.map
@@ -1,4 +1,18 @@
1
- /// <reference types="react" resolution-mode="require"/>
2
- export declare const PepFileStatusPanel: import("react").ForwardRefExoticComponent<Pick<Record<string, any> & {
3
- children?: import("react").ReactNode;
4
- }, string> & import("react").RefAttributes<HTMLElement & Record<string, any>>>;
1
+ import React from 'react';
2
+ export interface PepSnackBarData {
3
+ title?: string;
4
+ content?: Array<{
5
+ key?: number;
6
+ name?: string;
7
+ status?: string;
8
+ statusMessage?: string;
9
+ }>;
10
+ }
11
+ export interface PepFileStatusPanelProps {
12
+ panelData?: PepSnackBarData;
13
+ openAsSnackBar?: boolean;
14
+ closeClick?: () => void;
15
+ className?: string;
16
+ style?: React.CSSProperties;
17
+ }
18
+ export declare const PepFileStatusPanel: React.FC<PepFileStatusPanelProps>;
@@ -1,3 +1,29 @@
1
- import { createPepWrapper } from './utils/create-wrapper.js';
2
- export const PepFileStatusPanel = createPepWrapper('pep-file-status-panel', 'PepFileStatusPanel');
1
+ import React, { useEffect, useRef } from 'react';
2
+ export const PepFileStatusPanel = (props) => {
3
+ const ref = useRef(null);
4
+ useEffect(() => {
5
+ const el = ref.current;
6
+ if (!el)
7
+ return;
8
+ if (props.panelData !== undefined)
9
+ el.panelData = props.panelData;
10
+ if (props.openAsSnackBar !== undefined)
11
+ el.openAsSnackBar = props.openAsSnackBar;
12
+ }, [props.panelData, props.openAsSnackBar]);
13
+ useEffect(() => {
14
+ const el = ref.current;
15
+ if (!el)
16
+ return;
17
+ const bind = (name, cb) => {
18
+ if (!cb)
19
+ return () => { };
20
+ const handler = () => cb();
21
+ el.addEventListener(name, handler);
22
+ return () => el.removeEventListener(name, handler);
23
+ };
24
+ const unsubs = [bind('closeClick', props.closeClick)];
25
+ return () => { unsubs.forEach((u) => u()); };
26
+ }, [props.closeClick]);
27
+ return React.createElement('pep-file-status-panel-element', { ref, class: props.className, style: props.style });
28
+ };
3
29
  //# sourceMappingURL=pep-file-status-panel.js.map
@@ -1,4 +1,13 @@
1
- /// <reference types="react" resolution-mode="require"/>
2
- export declare const PepFlowPickerButton: import("react").ForwardRefExoticComponent<Pick<Record<string, any> & {
3
- children?: import("react").ReactNode;
4
- }, string> & import("react").RefAttributes<HTMLElement & Record<string, any>>>;
1
+ import React from 'react';
2
+ export declare type PepStyleType = 'weak' | 'regular' | 'strong' | string;
3
+ export declare type PepDialogSizeType = 'regular' | 'full-screen' | 'medium' | 'large' | string;
4
+ export interface PepFlowPickerButtonProps {
5
+ flowHostObject?: any;
6
+ disabled?: boolean;
7
+ styleType?: PepStyleType;
8
+ flowDlgSize?: PepDialogSizeType;
9
+ onFlowChange?: (data: any) => void;
10
+ className?: string;
11
+ style?: React.CSSProperties;
12
+ }
13
+ export declare const PepFlowPickerButton: React.FC<PepFlowPickerButtonProps>;
@@ -1,3 +1,30 @@
1
- import { createPepWrapper } from './utils/create-wrapper.js';
2
- export const PepFlowPickerButton = createPepWrapper('pep-flow-picker-button', 'PepFlowPickerButton');
1
+ import React, { useEffect, useRef } from 'react';
2
+ export const PepFlowPickerButton = ({ flowHostObject, disabled, styleType, flowDlgSize, onFlowChange, className, style, }) => {
3
+ const ref = useRef(null);
4
+ useEffect(() => {
5
+ const el = ref.current;
6
+ if (!el)
7
+ return;
8
+ if (flowHostObject !== undefined)
9
+ el.flowHostObject = flowHostObject;
10
+ if (disabled !== undefined)
11
+ el.disabled = disabled;
12
+ if (styleType !== undefined)
13
+ el.styleType = styleType;
14
+ if (flowDlgSize !== undefined)
15
+ el.flowDlgSize = flowDlgSize;
16
+ }, [flowHostObject, disabled, styleType, flowDlgSize]);
17
+ useEffect(() => {
18
+ const el = ref.current;
19
+ if (!el)
20
+ return;
21
+ const handler = (e) => {
22
+ const ce = e;
23
+ onFlowChange?.(ce.detail);
24
+ };
25
+ el.addEventListener('flowChange', handler);
26
+ return () => el.removeEventListener('flowChange', handler);
27
+ }, [onFlowChange]);
28
+ return React.createElement('pep-flow-picker-button-element', { ref, class: className, style });
29
+ };
3
30
  //# sourceMappingURL=pep-flow-picker-button.js.map
@@ -1,4 +1,70 @@
1
- /// <reference types="react" resolution-mode="require"/>
2
- export declare const PepGenericList: import("react").ForwardRefExoticComponent<Pick<Record<string, any> & {
3
- children?: import("react").ReactNode;
4
- }, string> & import("react").RefAttributes<HTMLElement & Record<string, any>>>;
1
+ import React from 'react';
2
+ export declare type PepListSelectionType = 'multi' | 'single' | 'none' | string;
3
+ export declare type PepListTableViewType = 'regular' | 'grid' | string;
4
+ export interface IPepGenericListPager {
5
+ type: 'scroll' | 'pages';
6
+ size?: number;
7
+ index?: number;
8
+ }
9
+ export interface IPepGenericListEmptyState {
10
+ show?: boolean;
11
+ title?: string;
12
+ description?: string;
13
+ }
14
+ export interface IPepGenericListSortingData {
15
+ sortBy?: string;
16
+ isAsc?: boolean;
17
+ }
18
+ export interface IPepGenericListDataSource {
19
+ inputs?: Record<string, unknown>;
20
+ init: (params: Record<string, unknown>) => Promise<unknown> | unknown;
21
+ update?: (params: Record<string, unknown>) => Promise<unknown> | unknown;
22
+ }
23
+ export interface IPepGenericListActions {
24
+ get: (data: unknown) => Promise<Array<{
25
+ title: string;
26
+ handler: (obj: unknown) => Promise<void>;
27
+ }>> | Array<{
28
+ title: string;
29
+ handler: (obj: unknown) => Promise<void>;
30
+ }>;
31
+ }
32
+ export interface PepGenericListProps {
33
+ dataSource?: IPepGenericListDataSource;
34
+ actions?: IPepGenericListActions;
35
+ uuidMapping?: string;
36
+ disabled?: boolean;
37
+ addPadding?: boolean;
38
+ title?: string;
39
+ sideBarTitle?: string;
40
+ description?: string;
41
+ inline?: boolean;
42
+ showSearch?: boolean;
43
+ noDataFoundMsg?: string;
44
+ emptyState?: IPepGenericListEmptyState;
45
+ selectionType?: PepListSelectionType;
46
+ supportSorting?: boolean;
47
+ supportSortingFields?: string[];
48
+ separator?: string;
49
+ sorting?: IPepGenericListSortingData;
50
+ cacheSize?: number;
51
+ hideSelectAll?: boolean;
52
+ pager?: IPepGenericListPager;
53
+ tableViewType?: PepListTableViewType;
54
+ zebraStripes?: boolean;
55
+ smartFilter?: unknown;
56
+ showTopBar?: boolean;
57
+ breadCrumbsItems?: unknown[];
58
+ selectAll?: boolean;
59
+ scrollPosition?: number;
60
+ unknownCount?: boolean;
61
+ itemClick?: (detail: unknown) => void;
62
+ fieldClick?: (detail: unknown) => void;
63
+ valueChange?: (detail: unknown) => void;
64
+ breadCrumbItemClick?: (detail: unknown) => void;
65
+ startIndexChange?: (detail: unknown) => void;
66
+ listLoad?: () => void;
67
+ className?: string;
68
+ style?: React.CSSProperties;
69
+ }
70
+ export declare const PepGenericList: React.FC<PepGenericListProps>;
@@ -1,3 +1,127 @@
1
- import { createPepWrapper } from './utils/create-wrapper.js';
2
- export const PepGenericList = createPepWrapper('pep-generic-list', 'PepGenericList');
1
+ import React, { useEffect, useRef } from 'react';
2
+ export const PepGenericList = (props) => {
3
+ const ref = useRef(null);
4
+ // Reflect props to the custom element instance
5
+ useEffect(() => {
6
+ const el = ref.current;
7
+ if (!el)
8
+ return;
9
+ // Inputs
10
+ if (props.dataSource !== undefined)
11
+ el.dataSource = props.dataSource;
12
+ if (props.actions !== undefined)
13
+ el.actions = props.actions;
14
+ if (props.uuidMapping !== undefined)
15
+ el.uuidMapping = props.uuidMapping;
16
+ if (props.disabled !== undefined)
17
+ el.disabled = props.disabled;
18
+ if (props.addPadding !== undefined)
19
+ el.addPadding = props.addPadding;
20
+ if (props.title !== undefined)
21
+ el.title = props.title;
22
+ if (props.sideBarTitle !== undefined)
23
+ el.sideBarTitle = props.sideBarTitle;
24
+ if (props.description !== undefined)
25
+ el.description = props.description;
26
+ if (props.inline !== undefined)
27
+ el.inline = props.inline;
28
+ if (props.showSearch !== undefined)
29
+ el.showSearch = props.showSearch;
30
+ if (props.noDataFoundMsg !== undefined)
31
+ el.noDataFoundMsg = props.noDataFoundMsg;
32
+ if (props.emptyState !== undefined)
33
+ el.emptyState = props.emptyState;
34
+ if (props.selectionType !== undefined)
35
+ el.selectionType = props.selectionType;
36
+ if (props.supportSorting !== undefined)
37
+ el.supportSorting = props.supportSorting;
38
+ if (props.supportSortingFields !== undefined)
39
+ el.supportSortingFields = props.supportSortingFields;
40
+ if (props.separator !== undefined)
41
+ el.separator = props.separator;
42
+ if (props.sorting !== undefined)
43
+ el.sorting = props.sorting;
44
+ if (props.cacheSize !== undefined)
45
+ el.cacheSize = props.cacheSize;
46
+ if (props.hideSelectAll !== undefined)
47
+ el.hideSelectAll = props.hideSelectAll;
48
+ if (props.pager !== undefined)
49
+ el.pager = props.pager;
50
+ if (props.tableViewType !== undefined)
51
+ el.tableViewType = props.tableViewType;
52
+ if (props.zebraStripes !== undefined)
53
+ el.zebraStripes = props.zebraStripes;
54
+ if (props.smartFilter !== undefined)
55
+ el.smartFilter = props.smartFilter;
56
+ if (props.showTopBar !== undefined)
57
+ el.showTopBar = props.showTopBar;
58
+ if (props.breadCrumbsItems !== undefined)
59
+ el.breadCrumbsItems = props.breadCrumbsItems;
60
+ if (props.selectAll !== undefined)
61
+ el.selectAll = props.selectAll;
62
+ if (props.scrollPosition !== undefined)
63
+ el.scrollPosition = props.scrollPosition;
64
+ if (props.unknownCount !== undefined)
65
+ el.unknownCount = props.unknownCount;
66
+ }, [
67
+ props.dataSource,
68
+ props.actions,
69
+ props.uuidMapping,
70
+ props.disabled,
71
+ props.addPadding,
72
+ props.title,
73
+ props.sideBarTitle,
74
+ props.description,
75
+ props.inline,
76
+ props.showSearch,
77
+ props.noDataFoundMsg,
78
+ props.emptyState,
79
+ props.selectionType,
80
+ props.supportSorting,
81
+ props.supportSortingFields,
82
+ props.separator,
83
+ props.sorting,
84
+ props.cacheSize,
85
+ props.hideSelectAll,
86
+ props.pager,
87
+ props.tableViewType,
88
+ props.zebraStripes,
89
+ props.smartFilter,
90
+ props.showTopBar,
91
+ props.breadCrumbsItems,
92
+ props.selectAll,
93
+ props.scrollPosition,
94
+ props.unknownCount,
95
+ ]);
96
+ // Wire events (exact names)
97
+ useEffect(() => {
98
+ const el = ref.current;
99
+ if (!el)
100
+ return;
101
+ const bind = (name, cb) => {
102
+ if (!cb)
103
+ return () => { };
104
+ const handler = (e) => cb(e.detail);
105
+ el.addEventListener(name, handler);
106
+ return () => el.removeEventListener(name, handler);
107
+ };
108
+ const unsubs = [
109
+ bind('itemClick', props.itemClick),
110
+ bind('fieldClick', props.fieldClick),
111
+ bind('valueChange', props.valueChange),
112
+ bind('breadCrumbItemClick', props.breadCrumbItemClick),
113
+ bind('startIndexChange', props.startIndexChange),
114
+ bind('listLoad', props.listLoad ? () => props.listLoad?.() : undefined),
115
+ ];
116
+ return () => { unsubs.forEach((u) => u()); };
117
+ }, [
118
+ props.itemClick,
119
+ props.fieldClick,
120
+ props.valueChange,
121
+ props.breadCrumbItemClick,
122
+ props.startIndexChange,
123
+ props.listLoad,
124
+ ]);
125
+ return React.createElement('pep-generic-list-element', { ref, class: props.className, style: props.style });
126
+ };
3
127
  //# sourceMappingURL=pep-generic-list.js.map
@@ -1,4 +1,25 @@
1
- /// <reference types="react" resolution-mode="require"/>
2
- export declare const PepGroupButtonsSettings: import("react").ForwardRefExoticComponent<Pick<Record<string, any> & {
3
- children?: import("react").ReactNode;
4
- }, string> & import("react").RefAttributes<HTMLElement & Record<string, any>>>;
1
+ import React from 'react';
2
+ export declare type PepGroupbuttonsTypes = 'sizes' | 'custom' | 'vertical-align' | 'left-right-arrows' | 'horizontal-align' | 'font-weight' | 'width-sizes' | 'boolean';
3
+ export interface PepButton {
4
+ key: string;
5
+ value?: string;
6
+ iconName?: string;
7
+ callback?: (ev: any) => void;
8
+ }
9
+ export interface PepGroupButtonsSettingsProps {
10
+ header?: string;
11
+ subHeader?: string;
12
+ groupType?: PepGroupbuttonsTypes;
13
+ btnsArray?: PepButton[];
14
+ excludeKeys?: string[];
15
+ useNone?: boolean;
16
+ disabled?: boolean;
17
+ dir?: 'rtl' | 'ltr';
18
+ titleSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | string;
19
+ bold?: boolean;
20
+ btnKey?: string;
21
+ onBtnkeyChange?: (value: string) => void;
22
+ className?: string;
23
+ style?: React.CSSProperties;
24
+ }
25
+ export declare const PepGroupButtonsSettings: React.FC<PepGroupButtonsSettingsProps>;
@@ -1,3 +1,46 @@
1
- import { createPepWrapper } from './utils/create-wrapper.js';
2
- export const PepGroupButtonsSettings = createPepWrapper('pep-group-buttons-settings', 'PepGroupButtonsSettings');
1
+ import React, { useEffect, useRef } from 'react';
2
+ export const PepGroupButtonsSettings = ({ header, subHeader, groupType, btnsArray, excludeKeys, useNone, disabled, dir, titleSize, bold, btnKey, onBtnkeyChange, className, style, }) => {
3
+ const ref = useRef(null);
4
+ // Apply inputs as element properties
5
+ useEffect(() => {
6
+ const el = ref.current;
7
+ if (!el)
8
+ return;
9
+ if (header !== undefined)
10
+ el.header = header;
11
+ if (subHeader !== undefined)
12
+ el.subHeader = subHeader;
13
+ if (groupType !== undefined)
14
+ el.groupType = groupType;
15
+ if (btnsArray !== undefined)
16
+ el.btnsArray = btnsArray;
17
+ if (excludeKeys !== undefined)
18
+ el.excludeKeys = excludeKeys;
19
+ if (useNone !== undefined)
20
+ el.useNone = useNone;
21
+ if (disabled !== undefined)
22
+ el.disabled = disabled;
23
+ if (dir !== undefined)
24
+ el.dir = dir;
25
+ if (titleSize !== undefined)
26
+ el.titleSize = titleSize;
27
+ if (bold !== undefined)
28
+ el.bold = bold;
29
+ if (btnKey !== undefined)
30
+ el.btnKey = btnKey;
31
+ }, [header, subHeader, groupType, btnsArray, excludeKeys, useNone, disabled, dir, titleSize, bold, btnKey]);
32
+ // Wire outputs (Angular emits custom event name 'btnkeyChange')
33
+ useEffect(() => {
34
+ const el = ref.current;
35
+ if (!el)
36
+ return;
37
+ const handler = (e) => {
38
+ const ce = e;
39
+ onBtnkeyChange?.(ce.detail ?? ref.current?.btnKey ?? '');
40
+ };
41
+ el.addEventListener('btnkeyChange', handler);
42
+ return () => el.removeEventListener('btnkeyChange', handler);
43
+ }, [onBtnkeyChange]);
44
+ return React.createElement('pep-group-buttons-settings-element', { ref, class: className, style });
45
+ };
3
46
  //# sourceMappingURL=pep-group-buttons-settings.js.map
@@ -1,4 +1,18 @@
1
- /// <reference types="react" resolution-mode="require"/>
2
- export declare const PepIconPicker: import("react").ForwardRefExoticComponent<Pick<Record<string, any> & {
3
- children?: import("react").ReactNode;
4
- }, string> & import("react").RefAttributes<HTMLElement & Record<string, any>>>;
1
+ import React from 'react';
2
+ export declare type Dir = 'rtl' | 'ltr';
3
+ export declare type PepSizeType = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | string;
4
+ export interface PepIconPickerProps {
5
+ disabled?: boolean;
6
+ header?: string;
7
+ preview_header?: string;
8
+ select_btn_header?: string;
9
+ dir?: Dir;
10
+ iconURL?: string;
11
+ useCheckBoxHeader?: boolean;
12
+ titleSize?: PepSizeType;
13
+ onIconChange?: (data: any) => void;
14
+ onIconDisableChange?: (data: any) => void;
15
+ className?: string;
16
+ style?: React.CSSProperties;
17
+ }
18
+ export declare const PepIconPicker: React.FC<PepIconPickerProps>;
@@ -1,3 +1,40 @@
1
- import { createPepWrapper } from './utils/create-wrapper.js';
2
- export const PepIconPicker = createPepWrapper('pep-icon-picker', 'PepIconPicker');
1
+ import React, { useEffect, useRef } from 'react';
2
+ export const PepIconPicker = ({ disabled, header, preview_header, select_btn_header, dir, iconURL, useCheckBoxHeader, titleSize, onIconChange, onIconDisableChange, className, style, }) => {
3
+ const ref = useRef(null);
4
+ useEffect(() => {
5
+ const el = ref.current;
6
+ if (!el)
7
+ return;
8
+ if (disabled !== undefined)
9
+ el.disabled = disabled;
10
+ if (header !== undefined)
11
+ el.header = header;
12
+ if (preview_header !== undefined)
13
+ el.preview_header = preview_header;
14
+ if (select_btn_header !== undefined)
15
+ el.select_btn_header = select_btn_header;
16
+ if (dir !== undefined)
17
+ el.dir = dir;
18
+ if (iconURL !== undefined)
19
+ el.iconURL = iconURL;
20
+ if (useCheckBoxHeader !== undefined)
21
+ el.useCheckBoxHeader = useCheckBoxHeader;
22
+ if (titleSize !== undefined)
23
+ el.titleSize = titleSize;
24
+ }, [disabled, header, preview_header, select_btn_header, dir, iconURL, useCheckBoxHeader, titleSize]);
25
+ useEffect(() => {
26
+ const el = ref.current;
27
+ if (!el)
28
+ return;
29
+ const onChange = (e) => onIconChange?.(e.detail);
30
+ const onDisable = (e) => onIconDisableChange?.(e.detail);
31
+ el.addEventListener('iconChange', onChange);
32
+ el.addEventListener('iconDisableChange', onDisable);
33
+ return () => {
34
+ el.removeEventListener('iconChange', onChange);
35
+ el.removeEventListener('iconDisableChange', onDisable);
36
+ };
37
+ }, [onIconChange, onIconDisableChange]);
38
+ return React.createElement('pep-icon-picker-element', { ref, class: className, style });
39
+ };
3
40
  //# sourceMappingURL=pep-icon-picker.js.map