@talxis/base-controls 1.2409.1 → 1.2409.2
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/components/Grid/core/components/Cell/ReadOnlyCell/ReadOnlyOptionSet/ReadOnlyOptionSet.js +2 -2
- package/dist/components/Grid/core/components/Cell/ReadOnlyCell/ReadOnlyOptionSet/ReadOnlyOptionSet.js.map +1 -1
- package/dist/components/OptionSet/OptionSet.js +58 -24
- package/dist/components/OptionSet/OptionSet.js.map +1 -1
- package/dist/components/OptionSet/interfaces.d.ts +2 -1
- package/dist/components/OptionSet/styles.d.ts +11 -0
- package/dist/components/OptionSet/styles.js +18 -0
- package/dist/components/OptionSet/styles.js.map +1 -0
- package/dist/components/OptionSet/useComboBoxTheme.d.ts +3 -0
- package/dist/components/OptionSet/useComboBoxTheme.js +45 -0
- package/dist/components/OptionSet/useComboBoxTheme.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/package.json +2 -10
|
@@ -2,7 +2,7 @@ import { jsx, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import { useState, useEffect } from 'react';
|
|
3
3
|
import { useTheme, Text } from '@fluentui/react';
|
|
4
4
|
import { optionSetStyles } from './styles.js';
|
|
5
|
-
import
|
|
5
|
+
import Color from 'color';
|
|
6
6
|
import { useGridInstance } from '../../../../hooks/useGridInstance.js';
|
|
7
7
|
import { DataType } from '../../../../enums/DataType.js';
|
|
8
8
|
|
|
@@ -41,7 +41,7 @@ const ReadOnlyOptionSet = (props) => {
|
|
|
41
41
|
return defaultRender();
|
|
42
42
|
}
|
|
43
43
|
else {
|
|
44
|
-
return (jsx("div", { className: optionSetStyles.root, children: options.map(x => jsx("div", { title: x.Label, className: optionSetStyles.option, style: { backgroundColor: x.Color ?? defaultColor, color: new
|
|
44
|
+
return (jsx("div", { className: optionSetStyles.root, children: options.map(x => jsx("div", { title: x.Label, className: optionSetStyles.option, style: { backgroundColor: x.Color ?? defaultColor, color: new Color(x.Color ?? defaultColor).isDark() ? 'white' : 'black' }, children: jsx(Text, { children: x.Label }) }, x.Value)) }));
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadOnlyOptionSet.js","sources":["../../../../../../../../src/components/Grid/core/components/Cell/ReadOnlyCell/ReadOnlyOptionSet/ReadOnlyOptionSet.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\nimport { useEffect, useState } from \"react\";\nimport { Text } from '@fluentui/react';\nimport { optionSetStyles } from \"./styles\";\nimport color from 'color';\nimport { useTheme } from \"@fluentui/react\";\nimport { IGridColumn } from \"../../../../interfaces/IGridColumn\";\nimport { useGridInstance } from \"../../../../hooks/useGridInstance\";\nimport { DataType } from \"../../../../enums/DataType\";\n\ninterface IReadOnlyOptionSet {\n column: IGridColumn;\n record: ComponentFramework.PropertyHelper.DataSetApi.EntityRecord;\n defaultRender: () => ReactElement\n}\n\nexport const ReadOnlyOptionSet = (props: IReadOnlyOptionSet) => {\n const grid = useGridInstance();\n const { record, column, defaultRender } = { ...props }\n const [options, setOptions] = useState<ComponentFramework.PropertyHelper.OptionMetadata[] | null>(null);\n const theme = useTheme();\n const defaultColor = theme.palette.neutralLight;\n\n useEffect(() => {\n (async () => {\n const getOptions = async (): Promise<ComponentFramework.PropertyHelper.OptionMetadata[]> => {\n const [defaultValue, options] = await grid.metadata.getOptions(column);\n let value: any = record.getValue(column.key);\n if (column.dataType === DataType.OPTIONSET) {\n value = value ? [parseInt(value)] : null;\n }\n if (column.dataType === DataType.MULTI_SELECT_OPTIONSET) {\n value = value ? value.split(',').map((value: string) => parseInt(value)) : null;\n }\n if (column.dataType === DataType.TWO_OPTIONS) {\n value = [parseInt(value)];\n }\n return options.filter(option => value?.includes(option.Value)) ?? [];\n }\n const results = await getOptions();\n setOptions(results);\n })();\n }, [record.getValue(column.key)]);\n\n //options not loaded yet\n if (options === null) {\n return <></>\n }\n //options loaded but either no value selected or no colors are present\n if (options.length === 0 || !options.find(x => x.Color)) {\n return defaultRender();\n }\n else {\n return (\n <div className={optionSetStyles.root}>\n {options.map(x => <div\n key={x.Value}\n title={x.Label}\n className={optionSetStyles.option}\n style={{ backgroundColor: x.Color ?? defaultColor, color: new color(x.Color ?? defaultColor).isDark() ? 'white' : 'black' }}>\n <Text>{x.Label}</Text>\n </div>)}\n </div>\n )\n }\n\n}"],"names":["_jsx"],"mappings":";;;;;;;;AAgBa,MAAA,iBAAiB,GAAG,CAAC,KAAyB,KAAI;AAC3D,IAAA,MAAM,IAAI,GAAG,eAAe,EAAE,CAAC;AAC/B,IAAA,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,CAAA;IACtD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAA4D,IAAI,CAAC,CAAC;AACxG,IAAA,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;AACzB,IAAA,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;IAEhD,SAAS,CAAC,MAAK;QACX,CAAC,YAAW;AACR,YAAA,MAAM,UAAU,GAAG,YAAwE;AACvF,gBAAA,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;gBACvE,IAAI,KAAK,GAAQ,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAC7C,gBAAA,IAAI,MAAM,CAAC,QAAQ,KAAK,QAAQ,CAAC,SAAS,EAAE;AACxC,oBAAA,KAAK,GAAG,KAAK,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC;AAC5C,iBAAA;AACD,gBAAA,IAAI,MAAM,CAAC,QAAQ,KAAK,QAAQ,CAAC,sBAAsB,EAAE;AACrD,oBAAA,KAAK,GAAG,KA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":3,"file":"ReadOnlyOptionSet.js","sources":["../../../../../../../../src/components/Grid/core/components/Cell/ReadOnlyCell/ReadOnlyOptionSet/ReadOnlyOptionSet.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\nimport { useEffect, useState } from \"react\";\nimport { Text } from '@fluentui/react';\nimport { optionSetStyles } from \"./styles\";\nimport color from 'color';\nimport { useTheme } from \"@fluentui/react\";\nimport { IGridColumn } from \"../../../../interfaces/IGridColumn\";\nimport { useGridInstance } from \"../../../../hooks/useGridInstance\";\nimport { DataType } from \"../../../../enums/DataType\";\n\ninterface IReadOnlyOptionSet {\n column: IGridColumn;\n record: ComponentFramework.PropertyHelper.DataSetApi.EntityRecord;\n defaultRender: () => ReactElement\n}\n\nexport const ReadOnlyOptionSet = (props: IReadOnlyOptionSet) => {\n const grid = useGridInstance();\n const { record, column, defaultRender } = { ...props }\n const [options, setOptions] = useState<ComponentFramework.PropertyHelper.OptionMetadata[] | null>(null);\n const theme = useTheme();\n const defaultColor = theme.palette.neutralLight;\n\n useEffect(() => {\n (async () => {\n const getOptions = async (): Promise<ComponentFramework.PropertyHelper.OptionMetadata[]> => {\n const [defaultValue, options] = await grid.metadata.getOptions(column);\n let value: any = record.getValue(column.key);\n if (column.dataType === DataType.OPTIONSET) {\n value = value ? [parseInt(value)] : null;\n }\n if (column.dataType === DataType.MULTI_SELECT_OPTIONSET) {\n value = value ? value.split(',').map((value: string) => parseInt(value)) : null;\n }\n if (column.dataType === DataType.TWO_OPTIONS) {\n value = [parseInt(value)];\n }\n return options.filter(option => value?.includes(option.Value)) ?? [];\n }\n const results = await getOptions();\n setOptions(results);\n })();\n }, [record.getValue(column.key)]);\n\n //options not loaded yet\n if (options === null) {\n return <></>\n }\n //options loaded but either no value selected or no colors are present\n if (options.length === 0 || !options.find(x => x.Color)) {\n return defaultRender();\n }\n else {\n return (\n <div className={optionSetStyles.root}>\n {options.map(x => <div\n key={x.Value}\n title={x.Label}\n className={optionSetStyles.option}\n style={{ backgroundColor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CAAC,CAAC,KAAK,EAAQ,CAAA,EAAA,EAJjB,CAAC,CAAC,KAAK,CAKV,CAAC,EAAA,CACL,EACT;AACJ,KAAA;AAEL;;;;"}
|
|
@@ -1,20 +1,31 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { ComboBox } from '@talxis/react-components';
|
|
2
|
+
import { ComboBox, ColorfulOption } from '@talxis/react-components';
|
|
3
3
|
import { ThemeProvider } from '@fluentui/react';
|
|
4
|
-
import { useRef, useEffect } from 'react';
|
|
4
|
+
import { useRef, useMemo, useEffect } from 'react';
|
|
5
|
+
import { useComboBoxTheme } from './useComboBoxTheme.js';
|
|
6
|
+
import { getComboBoxStyles } from './styles.js';
|
|
5
7
|
import { useControl } from '../../hooks/useControl.js';
|
|
6
8
|
|
|
7
9
|
const OptionSet = (props) => {
|
|
8
|
-
const { sizing, onNotifyOutputChanged, theme } = useControl('OptionSet', props);
|
|
9
10
|
const componentRef = useRef(null);
|
|
11
|
+
const { sizing, onNotifyOutputChanged, theme } = useControl('OptionSet', props);
|
|
12
|
+
const styles = useMemo(() => getComboBoxStyles(sizing.width, sizing.height), [sizing.width, sizing.height]);
|
|
13
|
+
const [colorFeatureEnabled, overridenTheme] = useComboBoxTheme(props, theme);
|
|
10
14
|
const parameters = props.parameters;
|
|
11
15
|
const boundValue = parameters.value;
|
|
12
16
|
const { Options } = parameters.value.attributes;
|
|
13
17
|
const context = props.context;
|
|
18
|
+
const onOverrideComponentProps = props.onOverrideComponentProps ?? ((props) => props);
|
|
14
19
|
const comboBoxOptions = Options.map(option => ({
|
|
15
20
|
key: option.Value.toString(),
|
|
16
21
|
text: option.Label,
|
|
22
|
+
title: option.Label
|
|
17
23
|
}));
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (parameters.AutoFocus?.raw) {
|
|
26
|
+
componentRef.current?.focus(true);
|
|
27
|
+
}
|
|
28
|
+
}, []);
|
|
18
29
|
const handleChange = (option) => {
|
|
19
30
|
let value = undefined;
|
|
20
31
|
if (option) {
|
|
@@ -24,35 +35,58 @@ const OptionSet = (props) => {
|
|
|
24
35
|
value: value
|
|
25
36
|
});
|
|
26
37
|
};
|
|
27
|
-
|
|
28
|
-
if (
|
|
29
|
-
|
|
38
|
+
const onRenderColorfulOption = (option) => {
|
|
39
|
+
if (!option) {
|
|
40
|
+
return null;
|
|
30
41
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
const color = Options.find(item => item.Value.toString() === option.key)?.Color;
|
|
43
|
+
return jsx(ColorfulOption, { label: option.text, color: color });
|
|
44
|
+
};
|
|
45
|
+
const componentProps = onOverrideComponentProps({
|
|
46
|
+
componentRef: componentRef,
|
|
47
|
+
options: comboBoxOptions,
|
|
48
|
+
readOnly: context.mode.isControlDisabled,
|
|
49
|
+
selectedKey: boundValue.raw?.toString() ?? null,
|
|
50
|
+
errorMessage: boundValue.errorMessage,
|
|
51
|
+
useComboBoxAsMenuWidth: true,
|
|
52
|
+
hideErrorMessage: !parameters.ShowErrorMessage?.raw,
|
|
53
|
+
styles: { root: styles.root, callout: styles.callout },
|
|
54
|
+
...(parameters.EnableCopyButton?.raw === true && {
|
|
55
|
+
clickToCopyProps: {
|
|
43
56
|
key: 'copy',
|
|
44
57
|
showOnlyOnHover: true,
|
|
45
58
|
iconProps: {
|
|
46
|
-
iconName: 'Copy'
|
|
47
|
-
}
|
|
48
|
-
}
|
|
59
|
+
iconName: 'Copy',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
}),
|
|
63
|
+
...(parameters.EnableDeleteButton?.raw === true && {
|
|
64
|
+
deleteButtonProps: {
|
|
49
65
|
key: 'delete',
|
|
50
66
|
showOnlyOnHover: true,
|
|
51
67
|
iconProps: {
|
|
52
|
-
iconName: 'Cancel'
|
|
68
|
+
iconName: 'Cancel',
|
|
69
|
+
},
|
|
70
|
+
onClick: (e, value) => {
|
|
71
|
+
handleChange(null);
|
|
53
72
|
},
|
|
54
|
-
|
|
55
|
-
|
|
73
|
+
},
|
|
74
|
+
}),
|
|
75
|
+
...(parameters.EnableOptionSetColors?.raw === true && {
|
|
76
|
+
affixThemeOverride: {
|
|
77
|
+
semanticColors: {
|
|
78
|
+
successIcon: overridenTheme.semanticColors.inputText,
|
|
79
|
+
infoIcon: overridenTheme.semanticColors.inputText
|
|
80
|
+
},
|
|
81
|
+
palette: {
|
|
82
|
+
themeDarkAlt: overridenTheme.semanticColors.inputText
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
}),
|
|
86
|
+
onChange: (e, option) => handleChange(option),
|
|
87
|
+
onRenderOption: colorFeatureEnabled ? onRenderColorfulOption : undefined,
|
|
88
|
+
});
|
|
89
|
+
return (jsx(ThemeProvider, { theme: overridenTheme, applyTo: "none", children: jsx(ComboBox, { ...componentProps }) }));
|
|
56
90
|
};
|
|
57
91
|
|
|
58
92
|
export { OptionSet };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionSet.js","sources":["../../../src/components/OptionSet/OptionSet.tsx"],"sourcesContent":["\nimport { IOptionSet } from './interfaces';\nimport { useControl } from '../../hooks';\nimport { ComboBox } from \"@talxis/react-components\";\nimport { IComboBox, IComboBoxOption, ThemeProvider } from '@fluentui/react';\nimport
|
|
1
|
+
{"version":3,"file":"OptionSet.js","sources":["../../../src/components/OptionSet/OptionSet.tsx"],"sourcesContent":["\nimport { IOptionSet } from './interfaces';\nimport { useControl } from '../../hooks';\nimport { ComboBox, ColorfulOption } from \"@talxis/react-components\";\nimport { IComboBox, IComboBoxOption, Icon, ThemeProvider } from '@fluentui/react';\nimport { useEffect, useMemo, useRef } from 'react';\nimport { useComboBoxTheme } from './useComboBoxTheme';\nimport { getComboBoxStyles } from './styles';\nimport React from 'react';\n\nexport const OptionSet = (props: IOptionSet) => {\n const componentRef = useRef<IComboBox>(null);\n const { sizing, onNotifyOutputChanged, theme } = useControl('OptionSet', props);\n const styles = useMemo(() => getComboBoxStyles(sizing.width, sizing.height), [sizing.width, sizing.height]);\n const [colorFeatureEnabled, overridenTheme] = useComboBoxTheme(props, theme);\n const parameters = props.parameters;\n const boundValue = parameters.value;\n const { Options } = parameters.value.attributes;\n const context = props.context;\n const onOverrideComponentProps = props.onOverrideComponentProps ?? ((props) => props);\n\n const comboBoxOptions: IComboBoxOption[] = Options.map(option => ({\n key: option.Value.toString(),\n text: option.Label,\n title: option.Label\n }));\n\n useEffect(() => {\n if (parameters.AutoFocus?.raw) {\n componentRef.current?.focus(true);\n }\n }, []);\n\n const handleChange = (option?: IComboBoxOption | null): void => {\n let value = undefined;\n if (option) {\n value = parseInt(option.key as string);\n }\n onNotifyOutputChanged({\n value: value\n });\n };\n\n const onRenderColorfulOption = (option: IComboBoxOption | undefined) => {\n if (!option) {\n return null;\n }\n const color = Options.find(item => item.Value.toString() === option.key)?.Color;\n return <ColorfulOption label={option.text} color={color} />\n };\n\n const componentProps = onOverrideComponentProps({\n componentRef: componentRef,\n options: comboBoxOptions,\n readOnly: context.mode.isControlDisabled,\n selectedKey: boundValue.raw?.toString() ?? null,\n errorMessage: boundValue.errorMessage,\n useComboBoxAsMenuWidth: true,\n hideErrorMessage: !parameters.ShowErrorMessage?.raw,\n styles: { root: styles.root, callout: styles.callout },\n ...(parameters.EnableCopyButton?.raw === true && {\n clickToCopyProps: {\n key: 'copy',\n showOnlyOnHover: true,\n iconProps: {\n iconName: 'Copy',\n },\n },\n }),\n ...(parameters.EnableDeleteButton?.raw === true && {\n deleteButtonProps: {\n key: 'delete',\n showOnlyOnHover: true,\n iconProps: {\n iconName: 'Cancel',\n },\n onClick: (e, value) => {\n handleChange(null);\n },\n },\n }),\n ...(parameters.EnableOptionSetColors?.raw === true && {\n affixThemeOverride: {\n semanticColors: {\n successIcon: overridenTheme.semanticColors.inputText,\n infoIcon: overridenTheme.semanticColors.inputText\n },\n palette: {\n themeDarkAlt: overridenTheme.semanticColors.inputText\n }\n },\n }),\n onChange: (e, option) => handleChange(option),\n onRenderOption: colorFeatureEnabled ? onRenderColorfulOption : undefined,\n });\n\n return (\n <ThemeProvider theme={overridenTheme} applyTo=\"none\">\n <ComboBox\n {...componentProps} />\n </ThemeProvider>);\n};"],"names":["_jsx"],"mappings":";;;;;;;;AAUa,MAAA,SAAS,GAAG,CAAC,KAAiB,KAAI;AAC3C,IAAA,MAAM,YAAY,GAAG,MAAM,CAAY,IAAI,CAAC,CAAC;AAC7C,IAAA,MAAM,EAAE,MAAM,EAAE,qBAAqB,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;AAChF,IAAA,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,iBAAiB,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;AAC5G,IAAA,MAAM,CAAC,mBAAmB,EAAE,cAAc,CAAC,GAAG,gBAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAC7E,IAAA,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;AACpC,IAAA,MAAM,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC;IACpC,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC;AAChD,IAAA,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;AAC9B,IAAA,MAAM,wBAAwB,GAAG,KAAK,CAAC,wBAAwB,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;IAEtF,MAAM,eAAe,GAAsB,OAAO,CAAC,GAAG,CAAC,MAAM,KAAK;AAC9D,QAAA,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE;QAC5B,IAAI,EAAE,MAAM,C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AAG,sBAAsB,GAAG,SAAS;AAC3E,KAAA,CAAC,CAAC;AAEH,IAAA,QACIA,GAAC,CAAA,aAAa,IAAC,KAAK,EAAE,cAAc,EAAE,OAAO,EAAC,MAAM,EAAA,QAAA,EAChDA,IAAC,QAAQ,EAAA,EAAA,GACD,cAAc,EAAI,CAAA,EAAA,CACd,EAAE;AAC1B;;;;"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { IComboBoxProps } from "@talxis/react-components";
|
|
2
|
-
import { IOptionSetProperty } from "../../interfaces";
|
|
2
|
+
import { IOptionSetProperty, ITwoOptionsProperty } from "../../interfaces";
|
|
3
3
|
import { IControl, IOutputs } from "../../interfaces/context";
|
|
4
4
|
import { IInputParameters } from "../../interfaces/parameters";
|
|
5
5
|
export interface IOptionSet extends IControl<IOptionSetParameters, IOptionSetOutputs, any, IComboBoxProps> {
|
|
6
6
|
}
|
|
7
7
|
export interface IOptionSetParameters extends IInputParameters {
|
|
8
8
|
value: IOptionSetProperty;
|
|
9
|
+
EnableOptionSetColors?: Omit<ITwoOptionsProperty, 'attributes'>;
|
|
9
10
|
}
|
|
10
11
|
export interface IOptionSetOutputs extends IOutputs {
|
|
11
12
|
value?: number;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const getComboBoxStyles: (width?: number, height?: number) => import("@fluentui/react").IProcessedStyleSet<{
|
|
2
|
+
root: {
|
|
3
|
+
height: number | undefined;
|
|
4
|
+
width: number | undefined;
|
|
5
|
+
display: string;
|
|
6
|
+
alignItems: string;
|
|
7
|
+
};
|
|
8
|
+
callout: {
|
|
9
|
+
maxHeight: string;
|
|
10
|
+
};
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { mergeStyleSets } from '@fluentui/react';
|
|
2
|
+
|
|
3
|
+
const getComboBoxStyles = (width, height) => {
|
|
4
|
+
return mergeStyleSets({
|
|
5
|
+
root: {
|
|
6
|
+
height: height,
|
|
7
|
+
width: width,
|
|
8
|
+
display: 'flex',
|
|
9
|
+
alignItems: 'center',
|
|
10
|
+
},
|
|
11
|
+
callout: {
|
|
12
|
+
maxHeight: '300px !important',
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { getComboBoxStyles };
|
|
18
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../src/components/OptionSet/styles.ts"],"sourcesContent":["import { mergeStyleSets } from \"@fluentui/react\"\n\nexport const getComboBoxStyles = (width?: number, height?: number) => {\n return mergeStyleSets({\n root: {\n height: height,\n width: width,\n display: 'flex',\n alignItems: 'center',\n },\n callout: {\n maxHeight: '300px !important',\n },\n })\n}"],"names":[],"mappings":";;MAEa,iBAAiB,GAAG,CAAC,KAAc,EAAE,MAAe,KAAI;AACjE,IAAA,OAAO,cAAc,CAAC;AAClB,QAAA,IAAI,EAAE;AACF,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,KAAK,EAAE,KAAK;AACZ,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,UAAU,EAAE,QAAQ;AACvB,SAAA;AACD,QAAA,OAAO,EAAE;AACL,YAAA,SAAS,EAAE,kBAAkB;AAChC,SAAA;AACJ,KAAA,CAAC,CAAA;AACN;;;;"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { createV9Theme, createBrandVariants } from '@fluentui/react-migration-v8-v9';
|
|
2
|
+
import { ThemeDesigner } from '@talxis/react-components/dist/utilities/ThemeDesigner';
|
|
3
|
+
import React__default, { useMemo } from 'react';
|
|
4
|
+
import Color from 'color';
|
|
5
|
+
import { getControlTheme } from '../../utils/Theme.js';
|
|
6
|
+
|
|
7
|
+
const useComboBoxTheme = (props, theme) => {
|
|
8
|
+
const boundValue = props.parameters.value;
|
|
9
|
+
const { Options } = boundValue.attributes;
|
|
10
|
+
const isColorFeatureEnabled = () => {
|
|
11
|
+
if (props.parameters.EnableOptionSetColors?.raw && Options.find(x => x.Color)) {
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
return false;
|
|
15
|
+
};
|
|
16
|
+
const getOverridenFluentDesingLanguge = () => {
|
|
17
|
+
const isColorEnabled = isColorFeatureEnabled();
|
|
18
|
+
if (!isColorEnabled) {
|
|
19
|
+
return props.context.fluentDesignLanguage;
|
|
20
|
+
}
|
|
21
|
+
const color = boundValue.attributes.Options.find(x => x.Value === boundValue.raw)?.Color;
|
|
22
|
+
if (!color) {
|
|
23
|
+
return props.context.fluentDesignLanguage;
|
|
24
|
+
}
|
|
25
|
+
const inputBackground = color;
|
|
26
|
+
const textColor = Color(color).luminosity() > 0.5 ? '#000000' : '#ffffff';
|
|
27
|
+
const primaryColor = textColor == '#000000' ? Color(inputBackground).darken(0.5).hex() : Color(inputBackground).lighten(0.5).hex();
|
|
28
|
+
const customV8Theme = ThemeDesigner.generateTheme({
|
|
29
|
+
primaryColor: primaryColor,
|
|
30
|
+
backgroundColor: theme.semanticColors.bodyBackground,
|
|
31
|
+
textColor: textColor
|
|
32
|
+
});
|
|
33
|
+
const customTokenTheme = createV9Theme(customV8Theme);
|
|
34
|
+
return {
|
|
35
|
+
brand: createBrandVariants(customV8Theme.palette),
|
|
36
|
+
tokenTheme: { ...customTokenTheme, inputBackground: inputBackground, inputText: textColor }
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
const overridenFluentDesignLanguage = React__default.useMemo(() => getOverridenFluentDesingLanguge(), [boundValue.raw]);
|
|
40
|
+
const overridenTheme = useMemo(() => getControlTheme(overridenFluentDesignLanguage), [overridenFluentDesignLanguage]);
|
|
41
|
+
return [isColorFeatureEnabled(), overridenTheme];
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export { useComboBoxTheme };
|
|
45
|
+
//# sourceMappingURL=useComboBoxTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useComboBoxTheme.js","sources":["../../../src/components/OptionSet/useComboBoxTheme.ts"],"sourcesContent":["import { createBrandVariants, createV9Theme } from \"@fluentui/react-migration-v8-v9\";\nimport { ThemeDesigner } from \"@talxis/react-components/dist/utilities/ThemeDesigner\";\nimport { useMemo } from \"react\";\nimport { getControlTheme } from \"../../utils\";\nimport React from \"react\";\nimport { IOptionSet } from \"./interfaces\";\nimport Color from \"color\";\nimport { ITheme } from \"@fluentui/react\";\n\nexport const useComboBoxTheme = (props: IOptionSet, theme: ITheme): [boolean, ITheme] => {\n const boundValue = props.parameters.value;\n const { Options } = boundValue.attributes;\n\n const isColorFeatureEnabled = () => {\n if(props.parameters.EnableOptionSetColors?.raw && Options.find(x => x.Color)) {\n return true;\n }\n return false;\n }\n const getOverridenFluentDesingLanguge = () => {\n const isColorEnabled = isColorFeatureEnabled();\n if(!isColorEnabled) {\n return props.context.fluentDesignLanguage;\n }\n const color = boundValue.attributes.Options.find(x => x.Value === boundValue.raw)?.Color;\n if(!color) {\n return props.context.fluentDesignLanguage;\n }\n\n const inputBackground = color;\n const textColor = Color(color).luminosity() > 0.5 ? '#000000' : '#ffffff';\n const primaryColor = textColor == '#000000' ? Color(inputBackground).darken(0.5).hex() : Color(inputBackground).lighten(0.5).hex();\n \n const customV8Theme = ThemeDesigner.generateTheme({\n primaryColor: primaryColor,\n backgroundColor: theme.semanticColors.bodyBackground,\n textColor: textColor\n });\n\n const customTokenTheme = createV9Theme(customV8Theme);\n return {\n brand: createBrandVariants(customV8Theme.palette),\n tokenTheme: { ...customTokenTheme, inputBackground: inputBackground, inputText: textColor }\n }\n }\n const overridenFluentDesignLanguage = React.useMemo(() => getOverridenFluentDesingLanguge(), [boundValue.raw]);\n const overridenTheme = useMemo(() => getControlTheme(overridenFluentDesignLanguage), [overridenFluentDesignLanguage])\n return [isColorFeatureEnabled(), overridenTheme];\n}"],"names":["React"],"mappings":";;;;;;MASa,gBAAgB,GAAG,CAAC,KAAiB,EAAE,KAAa,KAAuB;AACpF,IAAA,MAAM,UAAU,GAAG,K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Y;AAC1B,YAAA,eAAe,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc;AACpD,YAAA,SAAS,EAAE,SAAS;AACvB,SAAA,CAAC,CAAC;AAEH,QAAA,MAAM,gBAAgB,GAAG,aAAa,CAAC,aAAa,CAAC,CAAC;QACtD,OAAO;AACH,YAAA,KAAK,EAAE,mBAAmB,CAAC,aAAa,CAAC,OAAO,CAAC;AACjD,YAAA,UAAU,EAAE,EAAE,GAAG,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE;SAC9F,CAAA;AACL,KAAC,CAAA;AACD,IAAA,MAAM,6BAA6B,GAAGA,cAAK,CAAC,OAAO,CAAC,MAAM,+BAA+B,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/G,IAAA,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,eAAe,CAAC,6BAA6B,CAAC,EAAE,CAAC,6BAA6B,CAAC,CAAC,CAAA;AACrH,IAAA,OAAO,CAAC,qBAAqB,EAAE,EAAE,cAAc,CAAC,CAAC;AACrD;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -786,6 +786,7 @@ interface IOptionSet extends IControl<IOptionSetParameters, IOptionSetOutputs, a
|
|
|
786
786
|
}
|
|
787
787
|
interface IOptionSetParameters extends IInputParameters {
|
|
788
788
|
value: IOptionSetProperty;
|
|
789
|
+
EnableOptionSetColors?: Omit<ITwoOptionsProperty, 'attributes'>;
|
|
789
790
|
}
|
|
790
791
|
interface IOptionSetOutputs extends IOutputs$1 {
|
|
791
792
|
value?: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@talxis/base-controls",
|
|
3
|
-
"version": "1.2409.
|
|
3
|
+
"version": "1.2409.2",
|
|
4
4
|
"description": "Set of React components that natively work with Power Apps Component Framework API's",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -50,16 +50,8 @@
|
|
|
50
50
|
"build": "rollup -c",
|
|
51
51
|
"documentation": "start-storybook -p 6006",
|
|
52
52
|
"build-documentation": "build-storybook",
|
|
53
|
-
"lint": "eslint \"./src/**\"",
|
|
54
|
-
"lint:fix": "eslint \"./src/**\" --fix",
|
|
55
53
|
"yalc": "rollup -c && yalc publish --sig"
|
|
56
54
|
},
|
|
57
|
-
"eslintConfig": {
|
|
58
|
-
"extends": [
|
|
59
|
-
"react-app",
|
|
60
|
-
"react-app/jest"
|
|
61
|
-
]
|
|
62
|
-
},
|
|
63
55
|
"browserslist": {
|
|
64
56
|
"production": [
|
|
65
57
|
">0.2%",
|
|
@@ -80,7 +72,7 @@
|
|
|
80
72
|
"@fluentui/react": "^8.119.1",
|
|
81
73
|
"@fluentui/react-migration-v8-v9": "^9.6.20",
|
|
82
74
|
"@talxis/client-libraries": "1.2407.2",
|
|
83
|
-
"@talxis/react-components": "1.
|
|
75
|
+
"@talxis/react-components": "^1.2409.8",
|
|
84
76
|
"color": "^4.2.3",
|
|
85
77
|
"dayjs": "^1.11.10",
|
|
86
78
|
"external-svg-loader": "^1.7.1",
|