@talxis/base-controls 1.2408.2 → 1.2408.3
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.
|
@@ -51,7 +51,7 @@ const OptionSet = (props) => {
|
|
|
51
51
|
key: 'delete',
|
|
52
52
|
showOnlyOnHover: true,
|
|
53
53
|
iconProps: {
|
|
54
|
-
iconName: '
|
|
54
|
+
iconName: 'Cancel'
|
|
55
55
|
},
|
|
56
56
|
onClick: (e, value) => { handleChange(null); }
|
|
57
57
|
} : undefined, onChange: (e, option) => handleChange(option) }) }));
|
|
@@ -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 React, { useEffect, useRef } from 'react';\n\nexport const OptionSet = (props: IOptionSet) => {\n const { sizing, onNotifyOutputChanged, theme } = useControl('OptionSet', props);\n const componentRef = useRef<IComboBox>(null);\n const parameters = props.parameters;\n const boundValue = parameters.value;\n const { Options } = parameters.value.attributes;\n const context = props.context;\n const comboBoxOptions: IComboBoxOption[] = Options.map(option => ({\n key: option.Value.toString(),\n text: option.Label,\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 useEffect(() => {\n if (parameters.AutoFocus?.raw) {\n componentRef.current?.focus(true);\n }\n }, []);\n\n return (\n <ThemeProvider theme={theme} applyTo=\"none\">\n <ComboBox\n componentRef={componentRef}\n options={comboBoxOptions}\n readOnly={context.mode.isControlDisabled}\n //the defaultValue comes in the raw prop directly, no need to look at it\n selectedKey={boundValue.raw?.toString() ?? -1}\n errorMessage={boundValue.errorMessage}\n useComboBoxAsMenuWidth\n hideErrorMessage={!parameters.ShowErrorMessage?.raw}\n styles={{\n root: {\n height: sizing.height,\n width: sizing.width,\n display: 'flex',\n alignItems: 'center',\n },\n callout: {\n maxHeight: '300px !important'\n }\n }}\n clickToCopyProps={parameters.EnableCopyButton?.raw === true ? {\n key: 'copy',\n showOnlyOnHover: true,\n iconProps: {\n iconName: 'Copy'\n }\n } : undefined}\n deleteButtonProps={parameters.EnableDeleteButton?.raw === true ? {\n key: 'delete',\n showOnlyOnHover: true,\n iconProps: {\n iconName: '
|
|
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 React, { useEffect, useRef } from 'react';\n\nexport const OptionSet = (props: IOptionSet) => {\n const { sizing, onNotifyOutputChanged, theme } = useControl('OptionSet', props);\n const componentRef = useRef<IComboBox>(null);\n const parameters = props.parameters;\n const boundValue = parameters.value;\n const { Options } = parameters.value.attributes;\n const context = props.context;\n const comboBoxOptions: IComboBoxOption[] = Options.map(option => ({\n key: option.Value.toString(),\n text: option.Label,\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 useEffect(() => {\n if (parameters.AutoFocus?.raw) {\n componentRef.current?.focus(true);\n }\n }, []);\n\n return (\n <ThemeProvider theme={theme} applyTo=\"none\">\n <ComboBox\n componentRef={componentRef}\n options={comboBoxOptions}\n readOnly={context.mode.isControlDisabled}\n //the defaultValue comes in the raw prop directly, no need to look at it\n selectedKey={boundValue.raw?.toString() ?? -1}\n errorMessage={boundValue.errorMessage}\n useComboBoxAsMenuWidth\n hideErrorMessage={!parameters.ShowErrorMessage?.raw}\n styles={{\n root: {\n height: sizing.height,\n width: sizing.width,\n display: 'flex',\n alignItems: 'center',\n },\n callout: {\n maxHeight: '300px !important'\n }\n }}\n clickToCopyProps={parameters.EnableCopyButton?.raw === true ? {\n key: 'copy',\n showOnlyOnHover: true,\n iconProps: {\n iconName: 'Copy'\n }\n } : undefined}\n deleteButtonProps={parameters.EnableDeleteButton?.raw === true ? {\n key: 'delete',\n showOnlyOnHover: true,\n iconProps: {\n iconName: 'Cancel'\n },\n onClick: (e, value) => { handleChange(null); }\n } : undefined}\n onChange={(e, option) => handleChange(option)}\n /></ThemeProvider>);\n};"],"names":["_jsx"],"mappings":";;;;;;AAOa,MAAA,SAAS,GAAG,CAAC,KAAiB,KAAI;AAC3C,IAAA,MAAM,EAAE,MAAM,EAAE,qBAAqB,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;AAChF,IAAA,MAAM,YAAY,GAAG,MAAM,CAAY,IAAI,CAAC,CAAC;AAC7C,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;IAC9B,MAAM,eAAe,GAAsB,OAAO,CAAC,GAAG,CAAC,MAAM,KAAK;AAC9D,QAAA,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE;QAC5B,IAAI,EAAE,MAAM,CAAC,KAAK;AACrB,KAAA,CAAC,CAAC,CAAC;AAEJ,IAAA,MAAM,YAAY,GAAG,CAAC,MAA+B,KAAU;QAC3D,IAAI,KAAK,GAAG,SAAS,CAAC;AACtB,QAAA,IAAI,MAAM,EAAE;AACR,YAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAa,CAAC,CAAC;AAC1C,SAAA;AACD,QAAA,qBAAqB,CAAC;AAClB,YAAA,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K,IAAI,GAAG;AAC7D,gBAAA,GAAG,EAAE,QAAQ;AACb,gBAAA,eAAe,EAAE,IAAI;AACrB,gBAAA,SAAS,EAAE;AACP,oBAAA,QAAQ,EAAE,QAAQ;AACrB,iBAAA;AACD,gBAAA,OAAO,EAAE,CAAC,CAAC,EAAE,KAAK,KAAO,EAAA,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE;aACjD,GAAG,SAAS,EACb,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,YAAY,CAAC,MAAM,CAAC,EAC/C,CAAA,EAAA,CAAgB,EAAE;AAChC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@talxis/base-controls",
|
|
3
|
-
"version": "1.2408.
|
|
3
|
+
"version": "1.2408.3",
|
|
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",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@fluentui/react": "^8.119.1",
|
|
79
79
|
"@fluentui/react-migration-v8-v9": "^9.6.20",
|
|
80
80
|
"@talxis/client-libraries": "^1.2407.2",
|
|
81
|
-
"@talxis/react-components": "^1.2408.
|
|
81
|
+
"@talxis/react-components": "^1.2408.3",
|
|
82
82
|
"color": "^4.2.3",
|
|
83
83
|
"dayjs": "^1.11.10",
|
|
84
84
|
"external-svg-loader": "^1.7.1",
|