@pepperi-addons/ngx-composite-lib-react 0.0.3 → 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.
- package/README.md +79 -0
- package/elements/3rdpartylicenses.txt +0 -26
- package/elements/971.js +1 -1
- package/elements/index.html +5 -5
- package/elements/main.js +1 -1
- package/elements/polyfills.js +1 -1
- package/elements/runtime.js +1 -1
- package/elements/styles.css +16 -1
- package/index.d.ts +10 -19
- package/index.js +10 -19
- package/package.json +24 -23
- package/pep-color-settings.d.ts +17 -4
- package/pep-color-settings.js +33 -2
- package/pep-file-status-panel.d.ts +18 -4
- package/pep-file-status-panel.js +28 -2
- package/pep-flow-picker-button.d.ts +13 -4
- package/pep-flow-picker-button.js +29 -2
- package/pep-generic-list.d.ts +70 -4
- package/pep-generic-list.js +126 -2
- package/pep-group-buttons-settings.d.ts +25 -4
- package/pep-group-buttons-settings.js +45 -2
- package/pep-icon-picker.d.ts +18 -4
- package/pep-icon-picker.js +39 -2
- package/pep-padding-settings.d.ts +12 -4
- package/pep-padding-settings.js +23 -2
- package/pep-rich-text.d.ts +47 -4
- package/pep-rich-text.js +76 -2
- package/pep-shadow-settings.d.ts +15 -4
- package/pep-shadow-settings.js +22 -2
- package/pep-show-if-badge.d.ts +10 -4
- package/pep-show-if-badge.js +16 -2
- package/components/PepGroupButtonsSettings.d.ts +0 -14
- package/components/PepGroupButtonsSettings.js +0 -19
- package/components/PepGroupButtonsSettingsReact.d.ts +0 -14
- package/components/PepGroupButtonsSettingsReact.js +0 -63
- package/elements/register.auto.d.ts +0 -1
- package/elements/register.auto.js +0 -1
- package/elements/register.d.ts +0 -1
- package/elements/register.js +0 -1
- package/elements/register.polyfills.js +0 -1
- package/elements/register.runtime.js +0 -1
- package/pep-data-view-builder.d.ts +0 -4
- package/pep-data-view-builder.js +0 -3
- package/pep-field-container.d.ts +0 -4
- package/pep-field-container.js +0 -3
- package/pep-generic-form.d.ts +0 -4
- package/pep-generic-form.js +0 -3
- package/pep-group-buttons-settings-react.d.ts +0 -14
- package/pep-group-buttons-settings-react.js +0 -62
- package/pep-layout-builder-editor.d.ts +0 -4
- package/pep-layout-builder-editor.js +0 -3
- package/pep-layout-builder.d.ts +0 -4
- package/pep-layout-builder.js +0 -3
- package/pep-layout.d.ts +0 -4
- package/pep-layout.js +0 -3
- package/pep-manage-parameters.d.ts +0 -4
- package/pep-manage-parameters.js +0 -3
- package/pep-mapping-parameters.d.ts +0 -4
- package/pep-mapping-parameters.js +0 -3
- package/utils/create-wrapper.d.ts +0 -7
- package/utils/create-wrapper.js +0 -46
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface PepPaddingSettings {
|
|
3
|
+
IsUniform?: boolean;
|
|
4
|
+
PaddingValue?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface PepPaddingSettingsProps {
|
|
7
|
+
padding?: PepPaddingSettings;
|
|
8
|
+
onPaddingChange?: (value: PepPaddingSettings) => void;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
export declare const PepPaddingSettings: React.FC<PepPaddingSettingsProps>;
|
package/pep-padding-settings.js
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export const PepPaddingSettings =
|
|
1
|
+
import React, { useEffect, useRef } from 'react';
|
|
2
|
+
export const PepPaddingSettings = ({ padding, onPaddingChange, className, style, }) => {
|
|
3
|
+
const ref = useRef(null);
|
|
4
|
+
useEffect(() => {
|
|
5
|
+
const el = ref.current;
|
|
6
|
+
if (!el)
|
|
7
|
+
return;
|
|
8
|
+
if (padding !== undefined)
|
|
9
|
+
el.padding = padding;
|
|
10
|
+
}, [padding]);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const el = ref.current;
|
|
13
|
+
if (!el)
|
|
14
|
+
return;
|
|
15
|
+
const handler = (e) => {
|
|
16
|
+
const ce = e;
|
|
17
|
+
onPaddingChange?.(ce.detail ?? ref.current?.padding);
|
|
18
|
+
};
|
|
19
|
+
el.addEventListener('paddingChange', handler);
|
|
20
|
+
return () => el.removeEventListener('paddingChange', handler);
|
|
21
|
+
}, [onPaddingChange]);
|
|
22
|
+
return React.createElement('pep-padding-settings-element', { ref, class: className, style });
|
|
23
|
+
};
|
|
3
24
|
//# sourceMappingURL=pep-padding-settings.js.map
|
package/pep-rich-text.d.ts
CHANGED
|
@@ -1,4 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
export declare
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type PepHorizontalAlignment = 'start' | 'center' | 'end' | 'space-between' | string;
|
|
3
|
+
export declare type PepLayoutType = 'form' | 'card' | 'table' | string;
|
|
4
|
+
export interface PepToolbarImageOptions {
|
|
5
|
+
useAssetsABI?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface IPepRichHtmlTextareaToolbarOptions {
|
|
8
|
+
font?: boolean;
|
|
9
|
+
size?: boolean;
|
|
10
|
+
header?: boolean;
|
|
11
|
+
bold?: boolean;
|
|
12
|
+
italic?: boolean;
|
|
13
|
+
underline?: boolean;
|
|
14
|
+
strike?: boolean;
|
|
15
|
+
link?: boolean;
|
|
16
|
+
image?: boolean | PepToolbarImageOptions;
|
|
17
|
+
ordered?: boolean;
|
|
18
|
+
bullet?: boolean;
|
|
19
|
+
color?: boolean;
|
|
20
|
+
background?: boolean;
|
|
21
|
+
align?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface PepRichTextProps {
|
|
24
|
+
keyProp?: string;
|
|
25
|
+
value?: string;
|
|
26
|
+
label?: string;
|
|
27
|
+
mandatory?: boolean;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
readonly?: boolean;
|
|
30
|
+
maxFieldCharacters?: number;
|
|
31
|
+
xAlignment?: PepHorizontalAlignment;
|
|
32
|
+
sanitize?: boolean;
|
|
33
|
+
rowSpan?: number;
|
|
34
|
+
visible?: boolean;
|
|
35
|
+
isActive?: boolean;
|
|
36
|
+
showTitle?: boolean;
|
|
37
|
+
renderTitle?: boolean;
|
|
38
|
+
renderEnlargeButton?: boolean;
|
|
39
|
+
layoutType?: PepLayoutType;
|
|
40
|
+
inlineMode?: boolean;
|
|
41
|
+
useAssetsForImages?: boolean;
|
|
42
|
+
toolbarOptions?: IPepRichHtmlTextareaToolbarOptions;
|
|
43
|
+
onValueChange?: (val: any) => void;
|
|
44
|
+
className?: string;
|
|
45
|
+
style?: React.CSSProperties;
|
|
46
|
+
}
|
|
47
|
+
export declare const PepRichText: React.FC<PepRichTextProps>;
|
package/pep-rich-text.js
CHANGED
|
@@ -1,3 +1,77 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export const PepRichText =
|
|
1
|
+
import React, { useEffect, useRef } from 'react';
|
|
2
|
+
export const PepRichText = ({ keyProp, value, label, mandatory, disabled, readonly, maxFieldCharacters, xAlignment, sanitize, rowSpan, visible, isActive, showTitle, renderTitle, renderEnlargeButton, layoutType, inlineMode, useAssetsForImages, toolbarOptions, onValueChange, className, style, }) => {
|
|
3
|
+
const ref = useRef(null);
|
|
4
|
+
useEffect(() => {
|
|
5
|
+
const el = ref.current;
|
|
6
|
+
if (!el)
|
|
7
|
+
return;
|
|
8
|
+
if (keyProp !== undefined)
|
|
9
|
+
el.key = keyProp;
|
|
10
|
+
if (value !== undefined)
|
|
11
|
+
el.value = value;
|
|
12
|
+
if (label !== undefined)
|
|
13
|
+
el.label = label;
|
|
14
|
+
if (mandatory !== undefined)
|
|
15
|
+
el.mandatory = mandatory;
|
|
16
|
+
if (disabled !== undefined)
|
|
17
|
+
el.disabled = disabled;
|
|
18
|
+
if (readonly !== undefined)
|
|
19
|
+
el.readonly = readonly;
|
|
20
|
+
if (maxFieldCharacters !== undefined)
|
|
21
|
+
el.maxFieldCharacters = maxFieldCharacters;
|
|
22
|
+
if (xAlignment !== undefined)
|
|
23
|
+
el.xAlignment = xAlignment;
|
|
24
|
+
if (sanitize !== undefined)
|
|
25
|
+
el.sanitize = sanitize;
|
|
26
|
+
if (rowSpan !== undefined)
|
|
27
|
+
el.rowSpan = rowSpan;
|
|
28
|
+
if (visible !== undefined)
|
|
29
|
+
el.visible = visible;
|
|
30
|
+
if (isActive !== undefined)
|
|
31
|
+
el.isActive = isActive;
|
|
32
|
+
if (showTitle !== undefined)
|
|
33
|
+
el.showTitle = showTitle;
|
|
34
|
+
if (renderTitle !== undefined)
|
|
35
|
+
el.renderTitle = renderTitle;
|
|
36
|
+
if (renderEnlargeButton !== undefined)
|
|
37
|
+
el.renderEnlargeButton = renderEnlargeButton;
|
|
38
|
+
if (layoutType !== undefined)
|
|
39
|
+
el.layoutType = layoutType;
|
|
40
|
+
if (inlineMode !== undefined)
|
|
41
|
+
el.inlineMode = inlineMode;
|
|
42
|
+
if (useAssetsForImages !== undefined)
|
|
43
|
+
el.useAssetsForImages = useAssetsForImages;
|
|
44
|
+
if (toolbarOptions !== undefined)
|
|
45
|
+
el.toolbarOptions = toolbarOptions;
|
|
46
|
+
}, [
|
|
47
|
+
keyProp,
|
|
48
|
+
value,
|
|
49
|
+
label,
|
|
50
|
+
mandatory,
|
|
51
|
+
disabled,
|
|
52
|
+
readonly,
|
|
53
|
+
maxFieldCharacters,
|
|
54
|
+
xAlignment,
|
|
55
|
+
sanitize,
|
|
56
|
+
rowSpan,
|
|
57
|
+
visible,
|
|
58
|
+
isActive,
|
|
59
|
+
showTitle,
|
|
60
|
+
renderTitle,
|
|
61
|
+
renderEnlargeButton,
|
|
62
|
+
layoutType,
|
|
63
|
+
inlineMode,
|
|
64
|
+
useAssetsForImages,
|
|
65
|
+
toolbarOptions,
|
|
66
|
+
]);
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
const el = ref.current;
|
|
69
|
+
if (!el)
|
|
70
|
+
return;
|
|
71
|
+
const handler = (e) => onValueChange?.(e.detail ?? ref.current?.value);
|
|
72
|
+
el.addEventListener('valueChange', handler);
|
|
73
|
+
return () => el.removeEventListener('valueChange', handler);
|
|
74
|
+
}, [onValueChange]);
|
|
75
|
+
return React.createElement('pep-rich-text-element', { ref, class: className, style });
|
|
76
|
+
};
|
|
3
77
|
//# sourceMappingURL=pep-rich-text.js.map
|
package/pep-shadow-settings.d.ts
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
export declare
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type PepSizeType = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | string;
|
|
3
|
+
export interface PepShadowSettings {
|
|
4
|
+
use?: boolean;
|
|
5
|
+
size?: PepSizeType;
|
|
6
|
+
intensity?: 'soft' | 'regular' | 'hard' | string;
|
|
7
|
+
}
|
|
8
|
+
export interface PepShadowSettingsProps {
|
|
9
|
+
titleSize?: PepSizeType;
|
|
10
|
+
shadow?: PepShadowSettings;
|
|
11
|
+
onShadowChange?: (value: PepShadowSettings) => void;
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
}
|
|
15
|
+
export declare const PepShadowSettings: React.FC<PepShadowSettingsProps>;
|
package/pep-shadow-settings.js
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export const PepShadowSettings =
|
|
1
|
+
import React, { useEffect, useRef } from 'react';
|
|
2
|
+
export const PepShadowSettings = ({ titleSize, shadow, onShadowChange, className, style, }) => {
|
|
3
|
+
const ref = useRef(null);
|
|
4
|
+
useEffect(() => {
|
|
5
|
+
const el = ref.current;
|
|
6
|
+
if (!el)
|
|
7
|
+
return;
|
|
8
|
+
if (titleSize !== undefined)
|
|
9
|
+
el.titleSize = titleSize;
|
|
10
|
+
if (shadow !== undefined)
|
|
11
|
+
el.shadow = shadow;
|
|
12
|
+
}, [titleSize, shadow]);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
const el = ref.current;
|
|
15
|
+
if (!el)
|
|
16
|
+
return;
|
|
17
|
+
const handler = (e) => onShadowChange?.(e.detail ?? ref.current?.shadow);
|
|
18
|
+
el.addEventListener('shadowChange', handler);
|
|
19
|
+
return () => el.removeEventListener('shadowChange', handler);
|
|
20
|
+
}, [onShadowChange]);
|
|
21
|
+
return React.createElement('pep-shadow-settings-element', { ref, class: className, style });
|
|
22
|
+
};
|
|
3
23
|
//# sourceMappingURL=pep-shadow-settings.js.map
|
package/pep-show-if-badge.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
export declare
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type PepIconType = string;
|
|
3
|
+
export interface PepShowIfBadgeProps {
|
|
4
|
+
showIf?: boolean;
|
|
5
|
+
iconName?: PepIconType;
|
|
6
|
+
backgroundColor?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
export declare const PepShowIfBadge: React.FC<PepShowIfBadgeProps>;
|
package/pep-show-if-badge.js
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export const PepShowIfBadge =
|
|
1
|
+
import React, { useEffect, useRef } from 'react';
|
|
2
|
+
export const PepShowIfBadge = ({ showIf, iconName, backgroundColor, className, style, }) => {
|
|
3
|
+
const ref = useRef(null);
|
|
4
|
+
useEffect(() => {
|
|
5
|
+
const el = ref.current;
|
|
6
|
+
if (!el)
|
|
7
|
+
return;
|
|
8
|
+
if (showIf !== undefined)
|
|
9
|
+
el.showIf = showIf;
|
|
10
|
+
if (iconName !== undefined)
|
|
11
|
+
el.iconName = iconName;
|
|
12
|
+
if (backgroundColor !== undefined)
|
|
13
|
+
el.backgroundColor = backgroundColor;
|
|
14
|
+
}, [showIf, iconName, backgroundColor]);
|
|
15
|
+
return React.createElement('pep-show-if-badge-element', { ref, class: className, style });
|
|
16
|
+
};
|
|
3
17
|
//# sourceMappingURL=pep-show-if-badge.js.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" resolution-mode="require"/>
|
|
2
|
-
export interface PepGroupButtonsSettingsProps {
|
|
3
|
-
pepResetConfigurationField?: string;
|
|
4
|
-
hideReset?: boolean;
|
|
5
|
-
resetHostEvents?: (evt: any) => void;
|
|
6
|
-
groupType: 'sizes' | 'custom' | 'vertical-align' | 'left-right-arrows' | 'horizontal-align' | 'font-weight' | 'width-sizes' | 'boolean';
|
|
7
|
-
subHeader?: string;
|
|
8
|
-
btnKey?: string;
|
|
9
|
-
useNone?: boolean;
|
|
10
|
-
excludeKeys?: string[];
|
|
11
|
-
btnsArray?: any[];
|
|
12
|
-
onBtnKeyChange?: (e: any) => void;
|
|
13
|
-
}
|
|
14
|
-
export declare function PepGroupButtonsSettings(props: PepGroupButtonsSettingsProps): JSX.Element;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
// Runtime import; types are shimed locally to avoid adding a build-time dependency
|
|
4
|
-
// Consumers must have '@pepperi-addons/ngx-lib-react' installed (peerDependency)
|
|
5
|
-
import { PepGroupButtons } from '@pepperi-addons/ngx-lib-react';
|
|
6
|
-
export function PepGroupButtonsSettings(props) {
|
|
7
|
-
const { pepResetConfigurationField, hideReset, resetHostEvents, groupType, subHeader, btnKey, useNone, excludeKeys, btnsArray, onBtnKeyChange, } = props;
|
|
8
|
-
const onReset = React.useCallback(() => {
|
|
9
|
-
if (pepResetConfigurationField && typeof resetHostEvents === 'function') {
|
|
10
|
-
resetHostEvents({
|
|
11
|
-
action: 'set-configuration-field',
|
|
12
|
-
key: pepResetConfigurationField,
|
|
13
|
-
value: undefined,
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}, [pepResetConfigurationField, resetHostEvents]);
|
|
17
|
-
return (_jsxs("div", { children: [subHeader ? _jsx("div", { className: "pep-subheader", children: subHeader }) : null, _jsx(PepGroupButtons, { ...{ groupType, btnKey, useNone, excludeKeys, btnsArray }, onBtnKeyChange: onBtnKeyChange }), !hideReset ? (_jsx("button", { type: "button", onClick: onReset, children: "Reset" })) : null] }));
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=PepGroupButtonsSettings.js.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" resolution-mode="require"/>
|
|
2
|
-
export interface PepGroupButtonsSettingsReactProps {
|
|
3
|
-
pepResetConfigurationField?: string;
|
|
4
|
-
hideReset?: boolean;
|
|
5
|
-
resetHostEvents?: (evt: any) => void;
|
|
6
|
-
groupType: 'sizes' | 'custom' | 'vertical-align' | 'left-right-arrows' | 'horizontal-align' | 'font-weight' | 'width-sizes' | 'boolean';
|
|
7
|
-
subHeader?: string;
|
|
8
|
-
btnKey?: string;
|
|
9
|
-
useNone?: boolean;
|
|
10
|
-
excludeKeys?: string[];
|
|
11
|
-
btnsArray?: any[];
|
|
12
|
-
onBtnKeyChange?: (e: any) => void;
|
|
13
|
-
}
|
|
14
|
-
export declare function PepGroupButtonsSettingsReact(props: PepGroupButtonsSettingsReactProps): JSX.Element;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { PepGroupButtons } from '@pepperi-addons/ngx-lib-react';
|
|
4
|
-
export function PepGroupButtonsSettingsReact(props) {
|
|
5
|
-
const { pepResetConfigurationField, hideReset, resetHostEvents, groupType, subHeader, btnKey, useNone, excludeKeys, btnsArray, onBtnKeyChange, } = props;
|
|
6
|
-
const onReset = React.useCallback(() => {
|
|
7
|
-
if (pepResetConfigurationField && typeof resetHostEvents === 'function') {
|
|
8
|
-
resetHostEvents({
|
|
9
|
-
action: 'set-configuration-field',
|
|
10
|
-
key: pepResetConfigurationField,
|
|
11
|
-
value: undefined,
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}, [pepResetConfigurationField, resetHostEvents]);
|
|
15
|
-
// Build items for the base group-buttons element so the shim can render real visuals
|
|
16
|
-
const computedItems = React.useMemo(() => {
|
|
17
|
-
const arr = [];
|
|
18
|
-
switch (groupType) {
|
|
19
|
-
case 'custom':
|
|
20
|
-
(btnsArray || []).forEach((b) => {
|
|
21
|
-
if (!b)
|
|
22
|
-
return;
|
|
23
|
-
if (typeof b === 'string')
|
|
24
|
-
arr.push({ key: b, value: b });
|
|
25
|
-
else
|
|
26
|
-
arr.push(b);
|
|
27
|
-
});
|
|
28
|
-
break;
|
|
29
|
-
case 'sizes':
|
|
30
|
-
arr.push({ key: 'xs', value: 'XS' }, { key: 'sm', value: 'SM' }, { key: 'md', value: 'MD' }, { key: 'lg', value: 'LG' }, { key: 'xl', value: 'XL' }, { key: '2xl', value: '2XL' });
|
|
31
|
-
break;
|
|
32
|
-
case 'vertical-align':
|
|
33
|
-
arr.push({ key: 'start', value: 'Top' }, { key: 'middle', value: 'Middle' }, { key: 'end', value: 'Bottom' });
|
|
34
|
-
break;
|
|
35
|
-
case 'left-right-arrows':
|
|
36
|
-
arr.push({ key: 'left', iconName: 'arrow_left_alt' }, { key: 'right', iconName: 'arrow_right_alt' });
|
|
37
|
-
break;
|
|
38
|
-
case 'horizontal-align':
|
|
39
|
-
arr.push({ key: 'left', iconName: 'text_align_right' }, { key: 'center', iconName: 'text_align_center' }, { key: 'right', iconName: 'text_align_left' });
|
|
40
|
-
break;
|
|
41
|
-
case 'font-weight':
|
|
42
|
-
arr.push({ key: 'regular', value: 'Regular' }, { key: 'bold', value: 'Bold' }, { key: 'bolder', value: 'Bolder' });
|
|
43
|
-
break;
|
|
44
|
-
case 'width-sizes':
|
|
45
|
-
arr.push({ key: 'narrow', value: 'Narrow' }, { key: 'regular', value: 'Regular' }, { key: 'wide', value: 'Wide' });
|
|
46
|
-
break;
|
|
47
|
-
case 'boolean':
|
|
48
|
-
arr.push({ key: 'true', value: 'True' }, { key: 'false', value: 'False' });
|
|
49
|
-
break;
|
|
50
|
-
default:
|
|
51
|
-
break;
|
|
52
|
-
}
|
|
53
|
-
let filtered = Array.isArray(excludeKeys) && excludeKeys.length
|
|
54
|
-
? arr.filter((i) => !excludeKeys.includes(i.key))
|
|
55
|
-
: arr;
|
|
56
|
-
if (useNone) {
|
|
57
|
-
filtered = [{ key: 'none', value: 'None' }, ...filtered];
|
|
58
|
-
}
|
|
59
|
-
return filtered;
|
|
60
|
-
}, [groupType, btnsArray, excludeKeys, useNone]);
|
|
61
|
-
return (_jsxs("div", { children: [subHeader ? _jsx("div", { className: "pep-subheader", children: subHeader }) : null, _jsx(PepGroupButtons, { ...{ groupType: 'custom', btnsArray: computedItems, btnKey }, onBtnKeyChange: onBtnKeyChange }), !hideReset ? (_jsx("button", { type: "button", onClick: onReset, children: "Reset" })) : null] }));
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=PepGroupButtonsSettingsReact.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
// Side-effect module: registering elements automatically on import
|