@pega/lists-react 10.0.0-build.5.1 → 10.0.0-build.5.11
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/lib/Core/Components/NotificationManager.js +1 -1
- package/lib/Core/Components/NotificationManager.js.map +1 -1
- package/lib/Core/Components/RFColumnConfigurator.d.ts.map +1 -1
- package/lib/Core/Components/RFColumnConfigurator.js +1 -1
- package/lib/Core/Components/RFColumnConfigurator.js.map +1 -1
- package/lib/Core/Views/Table/StyledTableContainer.js +1 -1
- package/lib/Core/Views/Table/StyledTableContainer.js.map +1 -1
- package/package.json +7 -7
|
@@ -6,7 +6,6 @@ export default function NotificationManager({ view }) {
|
|
|
6
6
|
const { push } = useToaster();
|
|
7
7
|
const [activeNotifications, setActiveNotifications] = useState(new Set());
|
|
8
8
|
const onDismiss = ({ id }) => {
|
|
9
|
-
view.type.removeNotification(id);
|
|
10
9
|
// Remove myself once event loop is free to ensure race conditions are not faced
|
|
11
10
|
setTimeout(() => {
|
|
12
11
|
setActiveNotifications(msgs => {
|
|
@@ -33,6 +32,7 @@ export default function NotificationManager({ view }) {
|
|
|
33
32
|
msgs.add(id);
|
|
34
33
|
return new Set(msgs);
|
|
35
34
|
});
|
|
35
|
+
view.type.removeNotification(id);
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationManager.js","sourceRoot":"","sources":["../../../Core/Components/NotificationManager.js"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAAE,IAAI,EAAE;IAClD,MAAM,EAAE,KAAK,EAAE,EAAE,aAAa,GAAG,EAAE,EAAE,GAAG,E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AY,CAAC;YAErC,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;gBACjC,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE;oBAChC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;gBACpB,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;gBACb,IAAI,CAAC;oBACH,OAAO;oBACP,EAAE;oBACF,SAAS;oBACT,YAAY,EAAE,IAAI;oBAClB,SAAS;iBACV,CAAC,CAAC;gBACH,sBAAsB,CAAC,IAAI,CAAC,EAAE;oBAC5B,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;oBACb,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;gBACvB,CAAC,CAAC,CAAC;gBACH,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;YACnC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACd,CAAC;AAED,mBAAmB,CAAC,SAAS,GAAG;IAC9B,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;CACnD,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport { useEffect, useState } from 'react';\n\nimport { useToaster } from '@pega/cosmos-react-core';\n\nexport default function NotificationManager({ view }) {\n const { state: { notifications = [] } = {} } = view;\n const { push } = useToaster();\n\n const [activeNotifications, setActiveNotifications] = useState(new Set());\n\n const onDismiss = ({ id }) => {\n // Remove myself once event loop is free to ensure race conditions are not faced\n setTimeout(() => {\n setActiveNotifications(msgs => {\n msgs.delete(id);\n return new Set(msgs);\n });\n });\n };\n\n useEffect(() => {\n notifications.forEach(notification => {\n const { content, id } = notification;\n\n if (!activeNotifications.has(id)) {\n const timeoutID = setTimeout(() => {\n onDismiss({ id });\n }, 1 * 7500);\n push({\n content,\n id,\n onDismiss,\n dismissAfter: null,\n timeoutID\n });\n setActiveNotifications(msgs => {\n msgs.add(id);\n return new Set(msgs);\n });\n view.type.removeNotification(id);\n }\n });\n });\n\n return null;\n}\n\nNotificationManager.propTypes = {\n view: PropTypes.objectOf(PropTypes.any).isRequired\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RFColumnConfigurator.d.ts","sourceRoot":"","sources":["../../../Core/Components/RFColumnConfigurator.jsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RFColumnConfigurator.d.ts","sourceRoot":"","sources":["../../../Core/Components/RFColumnConfigurator.jsx"],"names":[],"mappings":"AAsKA;;;;;;4CA4EC;;;;;;;;;;;;sBAjPqB,YAAY"}
|
|
@@ -40,7 +40,7 @@ const Body = memo(({ column, rfName, columnAlias, displayMode, onRFChange, setRF
|
|
|
40
40
|
const [translate] = useTranslate();
|
|
41
41
|
const label = getFieldLabel(column.field);
|
|
42
42
|
const showFormatter = column.formatterName !== 'UserReference' && !column.field.disableFormatting;
|
|
43
|
-
return (_jsxs(_Fragment, { children: [_jsx(StyledRow, { children: _jsx(Input, { type: 'text', label: translate('Field'), value: label, readOnly: true }) }), _jsx(StyledRow, { children: _jsx(Input, { id: 'customise-label', type: 'text', label: translate('Alias'), onChange: oncolumnAliasChange, placeholder: translate('Enter alias'), value: columnAlias, "data-test-id": 'Customise label' }) }), showFormatter && renderFormatters && (_jsx(StyledRow, { children: _jsxs(Select, { id: 'select-customised-format', label: translate('Format'), onChange: onRFChange, value: rfName || '', "data-test-id": 'Customise format', children: [!isDefaultFormatterExist && (_jsx(Option, { value: DEFAULT_FORMAT, children: translate(DEFAULT_FORMAT) }, DEFAULT_FORMAT)), renderFormatters?.map(v => (_jsx(Option, { value: v.value, children: translate(v.label) }, v.value)))] }) })), Component && (_jsx(Component, { ref: formatterRef, formatting: { type: rfName, config: rfConfig }, onChange: setRFConfig })), renderDisplayMode && (_jsx(StyledRow, { children: _jsx(Select, { id: 'select-customised-display', label: translate('Display'), onChange: onDisplayModeChange, value: displayMode || defaultDisplayMode, "data-test-id": 'Customise display', children: displayModes.map(mode => (_jsx(Option, { value: mode, children: translate(mode) }, mode))) }) }))] }));
|
|
43
|
+
return (_jsxs(_Fragment, { children: [_jsx(StyledRow, { children: _jsx(Input, { type: 'text', label: translate('Field'), value: label, readOnly: true }) }), _jsx(StyledRow, { children: _jsx(Input, { id: 'customise-label', type: 'text', label: translate('Alias'), onChange: oncolumnAliasChange, placeholder: translate('Enter alias'), value: columnAlias, "data-test-id": 'Customise label' }) }), showFormatter && renderFormatters && (_jsx(StyledRow, { children: _jsxs(Select, { id: 'select-customised-format', label: translate('Format'), onChange: onRFChange, value: rfName || '', "data-test-id": 'Customise format', children: [!isDefaultFormatterExist && (_jsx(Option, { value: DEFAULT_FORMAT, children: translate(DEFAULT_FORMAT) }, DEFAULT_FORMAT)), renderFormatters?.map(v => (_jsx(Option, { value: v.value, children: translate(v.label) }, v.value)))] }) })), Component && (_jsx(Component, { ref: formatterRef, formatting: { type: rfName, config: rfConfig }, onChange: setRFConfig, field: column.field })), renderDisplayMode && (_jsx(StyledRow, { children: _jsx(Select, { id: 'select-customised-display', label: translate('Display'), onChange: onDisplayModeChange, value: displayMode || defaultDisplayMode, "data-test-id": 'Customise display', children: displayModes.map(mode => (_jsx(Option, { value: mode, children: translate(mode) }, mode))) }) }))] }));
|
|
44
44
|
});
|
|
45
45
|
Body.displayName = 'Body';
|
|
46
46
|
Body.propTypes = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RFColumnConfigurator.js","sourceRoot":"","sources":["../../../Core/Components/RFColumnConfigurator.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,aAAa,MAAM,qBAAqB,C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AC,CAAC,MAAM,CAAC,KAAK,CAAC,EACxD,YAAY,EAAE,YAAY,GAC1B,GACS,CACd,CAAC,CAAC,CAAC,IAAI,GACP,CACJ,CAAC;AACJ,CAAC;AAED,oBAAoB,CAAC,SAAS,GAAG;IAC/B,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;IACpD,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACnC,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACnC,aAAa,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;CACzC,CAAC","sourcesContent":["import { memo, useState, useCallback, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport styled from 'styled-components';\nimport fastDeepEqual from 'fast-deep-equal/es6';\n\nimport { Input, Button, Select, Option, FormDialog } from '@pega/cosmos-react-core';\n\nimport useTranslate from '../Hooks/useTranslate';\nimport { DEFAULT_FORMAT } from '../constants';\n\nconst StyledRow = styled.div`\n margin: 0.625rem 0;\n`;\n\n// Returns user friendly label from field information\nfunction getFieldLabel(field) {\n // Add category information (if applicable)\n if (field.category && field.category.length) {\n const combinedCategories = field.category\n .map(currentCategory => currentCategory.label)\n .join('.');\n return `${combinedCategories}.${field.label}`;\n }\n\n return `${field.label}`;\n}\n\nconst Footer = memo(({ cancel, submit }) => {\n const [translate] = useTranslate();\n return (\n <footer>\n <Button onClick={cancel} data-test-id='cancel'>\n {translate('Cancel')}\n </Button>\n <Button variant='primary' onClick={submit} data-test-id='submit'>\n {translate('Submit')}\n </Button>\n </footer>\n );\n});\n\nFooter.displayName = 'Footer';\n\nFooter.propTypes = {\n cancel: PropTypes.func.isRequired,\n submit: PropTypes.func.isRequired\n};\n\nconst defaultDisplayMode = 'Normal';\nconst displayModes = [defaultDisplayMode, 'Hierarchical'];\n\nconst Body = memo(\n ({\n column,\n rfName,\n columnAlias,\n displayMode,\n onRFChange,\n setRFConfig,\n rfConfig,\n oncolumnAliasChange,\n onDisplayModeChange,\n formatterRef\n }) => {\n const renderFormatters = column.getRenderFormatters();\n const componentName = renderFormatters?.find(f => f.value === rfName)?.component;\n const Component = componentName && column.renderFactory?.(componentName);\n const isDefaultFormatterExist = renderFormatters?.find(\n formatter => formatter.isDefault || formatter.label === DEFAULT_FORMAT\n );\n const renderDisplayMode = column.renderDisplayMode();\n const [translate] = useTranslate();\n const label = getFieldLabel(column.field);\n const showFormatter =\n column.formatterName !== 'UserReference' && !column.field.disableFormatting;\n return (\n <>\n <StyledRow>\n <Input type='text' label={translate('Field')} value={label} readOnly />\n </StyledRow>\n <StyledRow>\n <Input\n id='customise-label'\n type='text'\n label={translate('Alias')}\n onChange={oncolumnAliasChange}\n placeholder={translate('Enter alias')}\n value={columnAlias}\n data-test-id='Customise label'\n />\n </StyledRow>\n\n {showFormatter && renderFormatters && (\n <StyledRow>\n <Select\n id='select-customised-format'\n label={translate('Format')}\n onChange={onRFChange}\n value={rfName || ''}\n data-test-id='Customise format'\n >\n {!isDefaultFormatterExist && (\n <Option key={DEFAULT_FORMAT} value={DEFAULT_FORMAT}>\n {translate(DEFAULT_FORMAT)}\n </Option>\n )}\n {renderFormatters?.map(v => (\n <Option key={v.value} value={v.value}>\n {translate(v.label)}\n </Option>\n ))}\n </Select>\n </StyledRow>\n )}\n {Component && (\n <Component\n ref={formatterRef}\n formatting={{ type: rfName, config: rfConfig }}\n onChange={setRFConfig}\n />\n )}\n {renderDisplayMode && (\n <StyledRow>\n <Select\n id='select-customised-display'\n label={translate('Display')}\n onChange={onDisplayModeChange}\n value={displayMode || defaultDisplayMode}\n data-test-id='Customise display'\n >\n {displayModes.map(mode => (\n <Option key={mode} value={mode}>\n {translate(mode)}\n </Option>\n ))}\n </Select>\n </StyledRow>\n )}\n </>\n );\n }\n);\n\nBody.displayName = 'Body';\n\nBody.propTypes = {\n column: PropTypes.objectOf(PropTypes.any),\n rfName: PropTypes.string,\n columnAlias: PropTypes.string,\n onRFChange: PropTypes.func,\n oncolumnAliasChange: PropTypes.func,\n displayMode: PropTypes.string,\n onDisplayModeChange: PropTypes.func\n};\n\nBody.defaultProps = {\n column: {},\n rfName: '',\n columnAlias: '',\n onRFChange: () => {},\n oncolumnAliasChange: () => {},\n displayMode: defaultDisplayMode,\n onDisplayModeChange: () => {}\n};\n\nexport default function RFColumnConfigurator({\n column,\n onCancel,\n onSubmit,\n finishPopOver,\n popoverButtonRef\n}) {\n const [columnAlias, setColumnAlias] = useState(column.alias || '');\n const renderFormatters = column.getRenderFormatters();\n const [rfName, setRFName] = useState(\n (typeof column.formatterConfig === 'string'\n ? column.formatterConfig\n : column.formatterConfig?.type) || DEFAULT_FORMAT\n );\n const [rfConfig, setRFConfig] = useState(\n column.formatterConfig?.config !== undefined\n ? column.formatterConfig?.config\n : renderFormatters?.find(f => f.value === rfName)?.defaultConfig\n );\n const formatterRef = useRef(null);\n\n const [displayMode, setDisplayMode] = useState(column.displayMode);\n const [translate] = useTranslate();\n const onSubmitChanges = useCallback(() => {\n // Validating whether formatter settings are valid or not\n if (formatterRef.current?.validate && !formatterRef.current.validate()) return;\n\n const isRFNameChanged =\n rfName !==\n (typeof column.formatterConfig === 'string'\n ? column.formatterConfig\n : column.formatterConfig?.type);\n const isRFConfigChanged = !fastDeepEqual(rfConfig, column.formatterConfig?.config); // can be undefined\n const isRFChanged = isRFNameChanged || isRFConfigChanged;\n const isLableChanged = columnAlias.trim() !== column.alias?.trim(); // can be undefined\n const isDisplayChanged = displayMode !== column.displayMode;\n\n if (isRFChanged || isLableChanged || isDisplayChanged) {\n onSubmit(\n // eslint-disable-next-line no-nested-ternary\n isRFChanged ? (rfConfig ? { type: rfName, config: rfConfig } : rfName) : undefined,\n columnAlias,\n isDisplayChanged ? displayMode : undefined\n );\n }\n finishPopOver();\n }, [column, onSubmit, rfName, columnAlias, finishPopOver, displayMode, rfConfig]);\n\n return (\n <>\n {popoverButtonRef.current ? (\n <FormDialog\n heading={translate('Format')}\n onSubmit={onSubmitChanges}\n onCancel={onCancel}\n target={popoverButtonRef.current}\n >\n <Body\n column={column}\n rfName={rfName}\n columnAlias={columnAlias}\n displayMode={displayMode}\n onRFChange={e => {\n setRFName(e.target.value);\n setRFConfig(renderFormatters?.find(f => f.value === e.target.value)?.defaultConfig);\n }}\n setRFConfig={setRFConfig}\n rfConfig={rfConfig}\n oncolumnAliasChange={e => setColumnAlias(e.target.value)}\n onDisplayModeChange={e => setDisplayMode(e.target.value)}\n formatterRef={formatterRef}\n />\n </FormDialog>\n ) : null}\n </>\n );\n}\n\nRFColumnConfigurator.propTypes = {\n column: PropTypes.objectOf(PropTypes.any).isRequired,\n onCancel: PropTypes.func.isRequired,\n onSubmit: PropTypes.func.isRequired,\n finishPopOver: PropTypes.func.isRequired\n};\n"]}
|
|
1
|
+
{"version":3,"file":"RFColumnConfigurator.js","sourceRoot":"","sources":["../../../Core/Components/RFColumnConfigurator.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEpF,OAAO,YAAY,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA;;CAE3B,CAAC;AAEF,qDAAqD;AACrD,SAAS,aAAa,CAAC,KAAK;IAC1B,2CAA2C;IAC3C,IAAI,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QAC5C,MAAM,kBAAkB,GAAG,KAAK,CAAC,QAAQ;aACtC,GAAG,CAAC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ef } from 'react';\nimport PropTypes from 'prop-types';\nimport styled from 'styled-components';\nimport fastDeepEqual from 'fast-deep-equal/es6';\n\nimport { Input, Button, Select, Option, FormDialog } from '@pega/cosmos-react-core';\n\nimport useTranslate from '../Hooks/useTranslate';\nimport { DEFAULT_FORMAT } from '../constants';\n\nconst StyledRow = styled.div`\n margin: 0.625rem 0;\n`;\n\n// Returns user friendly label from field information\nfunction getFieldLabel(field) {\n // Add category information (if applicable)\n if (field.category && field.category.length) {\n const combinedCategories = field.category\n .map(currentCategory => currentCategory.label)\n .join('.');\n return `${combinedCategories}.${field.label}`;\n }\n\n return `${field.label}`;\n}\n\nconst Footer = memo(({ cancel, submit }) => {\n const [translate] = useTranslate();\n return (\n <footer>\n <Button onClick={cancel} data-test-id='cancel'>\n {translate('Cancel')}\n </Button>\n <Button variant='primary' onClick={submit} data-test-id='submit'>\n {translate('Submit')}\n </Button>\n </footer>\n );\n});\n\nFooter.displayName = 'Footer';\n\nFooter.propTypes = {\n cancel: PropTypes.func.isRequired,\n submit: PropTypes.func.isRequired\n};\n\nconst defaultDisplayMode = 'Normal';\nconst displayModes = [defaultDisplayMode, 'Hierarchical'];\n\nconst Body = memo(\n ({\n column,\n rfName,\n columnAlias,\n displayMode,\n onRFChange,\n setRFConfig,\n rfConfig,\n oncolumnAliasChange,\n onDisplayModeChange,\n formatterRef\n }) => {\n const renderFormatters = column.getRenderFormatters();\n const componentName = renderFormatters?.find(f => f.value === rfName)?.component;\n const Component = componentName && column.renderFactory?.(componentName);\n const isDefaultFormatterExist = renderFormatters?.find(\n formatter => formatter.isDefault || formatter.label === DEFAULT_FORMAT\n );\n const renderDisplayMode = column.renderDisplayMode();\n const [translate] = useTranslate();\n const label = getFieldLabel(column.field);\n const showFormatter =\n column.formatterName !== 'UserReference' && !column.field.disableFormatting;\n return (\n <>\n <StyledRow>\n <Input type='text' label={translate('Field')} value={label} readOnly />\n </StyledRow>\n <StyledRow>\n <Input\n id='customise-label'\n type='text'\n label={translate('Alias')}\n onChange={oncolumnAliasChange}\n placeholder={translate('Enter alias')}\n value={columnAlias}\n data-test-id='Customise label'\n />\n </StyledRow>\n\n {showFormatter && renderFormatters && (\n <StyledRow>\n <Select\n id='select-customised-format'\n label={translate('Format')}\n onChange={onRFChange}\n value={rfName || ''}\n data-test-id='Customise format'\n >\n {!isDefaultFormatterExist && (\n <Option key={DEFAULT_FORMAT} value={DEFAULT_FORMAT}>\n {translate(DEFAULT_FORMAT)}\n </Option>\n )}\n {renderFormatters?.map(v => (\n <Option key={v.value} value={v.value}>\n {translate(v.label)}\n </Option>\n ))}\n </Select>\n </StyledRow>\n )}\n {Component && (\n <Component\n ref={formatterRef}\n formatting={{ type: rfName, config: rfConfig }}\n onChange={setRFConfig}\n field={column.field}\n />\n )}\n {renderDisplayMode && (\n <StyledRow>\n <Select\n id='select-customised-display'\n label={translate('Display')}\n onChange={onDisplayModeChange}\n value={displayMode || defaultDisplayMode}\n data-test-id='Customise display'\n >\n {displayModes.map(mode => (\n <Option key={mode} value={mode}>\n {translate(mode)}\n </Option>\n ))}\n </Select>\n </StyledRow>\n )}\n </>\n );\n }\n);\n\nBody.displayName = 'Body';\n\nBody.propTypes = {\n column: PropTypes.objectOf(PropTypes.any),\n rfName: PropTypes.string,\n columnAlias: PropTypes.string,\n onRFChange: PropTypes.func,\n oncolumnAliasChange: PropTypes.func,\n displayMode: PropTypes.string,\n onDisplayModeChange: PropTypes.func\n};\n\nBody.defaultProps = {\n column: {},\n rfName: '',\n columnAlias: '',\n onRFChange: () => {},\n oncolumnAliasChange: () => {},\n displayMode: defaultDisplayMode,\n onDisplayModeChange: () => {}\n};\n\nexport default function RFColumnConfigurator({\n column,\n onCancel,\n onSubmit,\n finishPopOver,\n popoverButtonRef\n}) {\n const [columnAlias, setColumnAlias] = useState(column.alias || '');\n const renderFormatters = column.getRenderFormatters();\n const [rfName, setRFName] = useState(\n (typeof column.formatterConfig === 'string'\n ? column.formatterConfig\n : column.formatterConfig?.type) || DEFAULT_FORMAT\n );\n const [rfConfig, setRFConfig] = useState(\n column.formatterConfig?.config !== undefined\n ? column.formatterConfig?.config\n : renderFormatters?.find(f => f.value === rfName)?.defaultConfig\n );\n const formatterRef = useRef(null);\n\n const [displayMode, setDisplayMode] = useState(column.displayMode);\n const [translate] = useTranslate();\n const onSubmitChanges = useCallback(() => {\n // Validating whether formatter settings are valid or not\n if (formatterRef.current?.validate && !formatterRef.current.validate()) return;\n\n const isRFNameChanged =\n rfName !==\n (typeof column.formatterConfig === 'string'\n ? column.formatterConfig\n : column.formatterConfig?.type);\n const isRFConfigChanged = !fastDeepEqual(rfConfig, column.formatterConfig?.config); // can be undefined\n const isRFChanged = isRFNameChanged || isRFConfigChanged;\n const isLableChanged = columnAlias.trim() !== column.alias?.trim(); // can be undefined\n const isDisplayChanged = displayMode !== column.displayMode;\n\n if (isRFChanged || isLableChanged || isDisplayChanged) {\n onSubmit(\n // eslint-disable-next-line no-nested-ternary\n isRFChanged ? (rfConfig ? { type: rfName, config: rfConfig } : rfName) : undefined,\n columnAlias,\n isDisplayChanged ? displayMode : undefined\n );\n }\n finishPopOver();\n }, [column, onSubmit, rfName, columnAlias, finishPopOver, displayMode, rfConfig]);\n\n return (\n <>\n {popoverButtonRef.current ? (\n <FormDialog\n heading={translate('Format')}\n onSubmit={onSubmitChanges}\n onCancel={onCancel}\n target={popoverButtonRef.current}\n >\n <Body\n column={column}\n rfName={rfName}\n columnAlias={columnAlias}\n displayMode={displayMode}\n onRFChange={e => {\n setRFName(e.target.value);\n setRFConfig(renderFormatters?.find(f => f.value === e.target.value)?.defaultConfig);\n }}\n setRFConfig={setRFConfig}\n rfConfig={rfConfig}\n oncolumnAliasChange={e => setColumnAlias(e.target.value)}\n onDisplayModeChange={e => setDisplayMode(e.target.value)}\n formatterRef={formatterRef}\n />\n </FormDialog>\n ) : null}\n </>\n );\n}\n\nRFColumnConfigurator.propTypes = {\n column: PropTypes.objectOf(PropTypes.any).isRequired,\n onCancel: PropTypes.func.isRequired,\n onSubmit: PropTypes.func.isRequired,\n finishPopOver: PropTypes.func.isRequired\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StyledTableContainer.js","sourceRoot":"","sources":["../../../../Core/Views/Table/StyledTableContainer.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,sDAAsD,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,8DAA8D,CAAC;AAChG,OAAO,EACL,WAAW,EACX,sBAAsB,EACtB,iBAAiB,EACjB,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AAEtF,OAAO,EAAE,mCAAmC,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjG,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,oBAAoB,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,cAAK,GAAG,EAAE,GAAG,KAAM,KAAK,GAAI,CAAC,CAAC,CAAC,CAAC,EAC7F,KAAK,EACL,IAAI,EACJ,YAAY,EACb,EAAE,EAAE;IACH,IAAI,yBAAyB,CAAC;IAC9B,IAAI,oBAAoB,GAAG,KAAK,CAAC;IAEjC,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC;SACjB,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;SACtB,OAAO,CAAC,CAAC,CAAC,EAAE;QACX,IAAI,CAAC,yBAAyB,IAAI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C,OAAO,CAAC,aAAa,CAAC;;;OAG1D;;;;;;;;;;;;;MAaD,CAAC,yBAAyB;QAC1B,CAAC,CAAC,GAAG,CAAA;;;;SAIF;QACH,CAAC,CAAC,GAAG,CAAA;oCACyB,yBAAyB;;;SAGpD;;;;;;;;;;;;+BAYsB,oBAAoB;QAC3C,CAAC,CAAC,oCAAoC;QACtC,CAAC,CAAC,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wEAwCsC,YAAY;;;;;gBAKpE,YAAY;;;;cAId,YAAY;;;;;;;;;;;;8CAYoB,YAAY;;;;;;;;;;;;;;;;;;;QAmBlD,YAAY;;;;;;QAMZ,gBAAgB,IAAI,WAAW;;;;;;;;;;;;;;;;;;;mBAmBpB,QAAQ;;;;;;;;;;;;;;;YAef,QAAQ;;;;;;;;;;;;+BAYW,oBAAoB;QAC3C,CAAC,CAAC,oCAAoC;QACtC,CAAC,CAAC,uBAAuB;;;;;;;;;;;;;;;;mBAgBd,QAAQ;;;;;;;;;;;;;;YAcf,QAAQ;;;;;;;;;;;;;;;;;;;;mBAoBD,QAAQ,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;4BAqBD,gBAAgB;;;;;8BAKd,gBAAgB;;;;4BAIlB,cAAc;;;;;;;;8BAQZ,cAAc;;;;;wBAKpB,cAAc;;;;;;;;;;uBAUf,KAAK,CAAC,IAAI,CAAC,OAAO;;;;;;uBAMlB,KAAK,CAAC,IAAI,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDtC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,oBAAoB,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport styled, { css } from 'styled-components';\nimport { getLuminance, mix, transparentize } from 'polished';\n\nimport { StyledStatus } from '@pega/cosmos-react-core/lib/components/Badges/Status';\nimport { StyledRadioCheck } from '@pega/cosmos-react-core/lib/components/RadioCheck/RadioCheck';\nimport {\n StyledLabel,\n StyledProgressBackdrop,\n calculateFontSize,\n tryCatch,\n isSameColor,\n meetsMinContrast,\n resolveContrastColor\n} from '@pega/cosmos-react-core';\nimport { StyledTabPanel } from '@pega/cosmos-react-core/lib/components/Tabs/TabPanel';\n\nimport { generateRSDataContainerHeightStyles, generateRSHeightStyles } from '../../Utils/styles';\n\nimport { CellIcon } from './CellWrapper';\n\nconst StyledTableContainer = styled(forwardRef((props, ref) => <div ref={ref} {...props} />))(({\n theme,\n view,\n isFullscreen\n}) => {\n let colIdToFillRemainingSpace;\n let isAggregationApplied = false;\n\n (view.columns ?? [])\n .filter(c => !c.hidden)\n .forEach(c => {\n if (!colIdToFillRemainingSpace && c.field.fillAvailableSpace) {\n colIdToFillRemainingSpace = c.field.id;\n }\n if (c.aggregated) {\n isAggregationApplied = true;\n }\n });\n\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n const minContrast = theme.base['min-contrast'];\n const showFreezeLine =\n view.state.responsive?.sm &&\n !(view.hasNoRecords || view.hasNoFrozenColumns || view.bHideFreezeLine);\n const selectedRowColor = tryCatch(() =>\n mix(0.85, theme.base.palette['primary-background'], theme.base.palette.interactive)\n );\n const lightGreyColor = theme.base.colors.gray['extra-light'];\n const freezeLineShadowTransparent = transparentize(\n getLuminance(theme.components.table.header['foreground-color']) < 0.5 ? 0.9 : 0.75,\n theme.components.table.header['foreground-color']\n );\n\n const headerBackground = theme.components.table.header['background-color'];\n const bodyPrimaryBackground = theme.components.table.body['background-color'];\n const bodySecondaryBackground = theme.components.table.body['secondary-background-color'];\n const secondaryBackgroundForEvenRow = isSameColor(headerBackground, bodyPrimaryBackground);\n\n /* Calculating usable striped row background and foreground colors */\n const stripedRowBackground =\n getLuminance(bodySecondaryBackground) > 0.5\n ? bodySecondaryBackground\n : mix(0.75, bodyPrimaryBackground, bodySecondaryBackground);\n\n const stripedRowContrast = meetsMinContrast(\n theme.components.table.body['foreground-color'],\n stripedRowBackground,\n minContrast\n );\n const useableStripedRowForeground = stripedRowContrast\n ? theme.components.table.body['foreground-color']\n : resolveContrastColor({\n background: stripedRowBackground,\n foreground: theme.components.table.body['foreground-color'],\n theme\n });\n\n /* Calculating even row and odd row background and foreground colors */\n const evenRowBackgroundColor = secondaryBackgroundForEvenRow\n ? bodySecondaryBackground\n : bodyPrimaryBackground;\n\n const useableEvenRowForeground = secondaryBackgroundForEvenRow\n ? useableStripedRowForeground\n : theme.components.table.body['foreground-color'];\n\n /* Calculating usable odd row background and foreground colors */\n const oddRowBackgroundColor = secondaryBackgroundForEvenRow\n ? bodyPrimaryBackground\n : bodySecondaryBackground;\n\n const useableOddRowForeground = secondaryBackgroundForEvenRow\n ? theme.components.table.body['foreground-color']\n : useableStripedRowForeground;\n\n const headerForegroundContrast = meetsMinContrast(\n theme.components.table.header['foreground-color'],\n theme.components.table.header['background-color'],\n minContrast\n );\n const usableHeaderForeground = headerForegroundContrast\n ? theme.components.table.header['foreground-color']\n : resolveContrastColor({\n background: theme.components.table.header['background-color'],\n foreground: theme.components.table.header['foreground-color'],\n theme\n });\n\n const borderVerticalInner = theme.components.table.border['vertical-inner'];\n const borderVerticalOuter = theme.components.table.border['vertical-outer'];\n const borderHorizontalInner =\n theme.components.table.border['horizontal-inner'] && !theme.components.table['striped-rows'];\n const borderHorizontalOuter = theme.components.table.border['horizontal-outer'];\n\n const showBorderOnLastStripedRow =\n theme.components.table.border['horizontal-inner'] && theme.components.table['striped-rows'];\n\n return css`\n --forground-color: ${theme.base.palette['foreground-color']};\n --interactive: ${theme.base.palette.interactive};\n --medium-blue: ${theme.base.colors.blue.medium};\n --border-color: ${theme.base.palette['border-line']};\n --border-color-freeze: #a5a5a5;\n --border-width: 0.062rem;\n --border-style: var(--border-width) solid var(--border-color);\n --font-stretch: ${theme.components.table.typography['font-stretch']};\n --letter-spacing: ${theme.components.table.typography['letter-spacing']};\n --cell-padding: ${theme.base.spacing};\n --cell-vertical-padding: calc(${theme.base.spacing} * 0.5);\n --header-cell-padding: 0 0.44rem 0 var(--cell-padding);\n --header-bg-color: ${theme.components.table.header['background-color']};\n --header-fg-color: ${usableHeaderForeground};\n --default-group-header-height: 1.5rem;\n --group-header-height: var(--default-group-header-height);\n --group-bg-color: ${theme.components.table.body['secondary-background-color']};\n --box-sizing: content-box;\n --animation-ease: ${theme.base.animation.timing.ease};\n --font-weight-semi-bold: ${theme.base['font-weight']['semi-bold']};\n --row-height-multiplier: 1.125;\n --cell-fixed-position: sticky;\n position: relative;\n ${() => generateRSHeightStyles({ view, isFullscreen })}\n\n .small-screen-table {\n --cell-fixed-position: static;\n }\n\n .container {\n ${() => generateRSDataContainerHeightStyles()};\n ${borderHorizontalOuter &&\n css`\n border-top: var(--border-style);\n border-bottom: var(--border-style);\n `}\n ${borderVerticalOuter &&\n css`\n border-left: var(--border-style);\n border-right: var(--border-style);\n `}\n ${borderVerticalOuter &&\n borderHorizontalOuter &&\n css`\n border-radius: var(--border-radius, ${theme.base['border-radius']});\n `}\n position: relative;\n letter-spacing: var(--letter-spacing);\n font-stretch: var(--font-stretch);\n ${StyledTabPanel} & ${StyledProgressBackdrop} {\n border-radius: var(--border-radius, ${theme.base['border-radius']});\n }\n }\n\n .hide-rows-till-ready .row[aria-rowindex] {\n visibility: hidden;\n }\n\n .table-drag-proxy {\n background: rgba(0, 0, 0, 0.21);\n position: absolute;\n top: 0;\n bottom: 0;\n z-index: 6;\n pointer-events: none;\n display: none;\n }\n\n .table-drag-line {\n background: #999999;\n position: absolute;\n top: 0;\n bottom: 0;\n width: 0.12rem;\n z-index: 6;\n pointer-events: none;\n display: none;\n }\n\n .cell-fixed {\n z-index: 1;\n }\n\n .group-wrapper {\n overflow: hidden;\n display: inline-flex;\n line-height: var(--group-header-height);\n\n .group-context-count {\n display: inline-flex;\n overflow: hidden;\n }\n }\n\n /* In review mode(Ex: Tabs) cosmos components are rendered and mark up is not compatible with\n group-wrapper cell. Overridden css in group-header when dl exists inside that class which indicates\n mark up is generated from cosmos which differentiates from normal table cell markup */\n .group-wrapper .group-context-count dl {\n grid-template-columns: auto;\n }\n\n .cell {\n /* preventing cell from shrinking during autosize calculations */\n flex-shrink: 0;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n\n .icons-ph {\n /* Maintaining action button aspect ratio of 1:1 with 24*24px width and height */\n min-width: 1.5rem;\n }\n\n &.custom-item {\n width: 10em;\n }\n }\n\n .cell:focus {\n box-shadow: ${theme.base.shadow['focus-inset']};\n outline: none;\n }\n\n .row {\n display: inline-flex;\n height: var(--row-height);\n outline: none 0;\n transition: transform 0.5s var(--animation-ease);\n box-sizing: var(--box-sizing);\n position: relative;\n\n > .row-select-handle {\n display: flex;\n justify-content: center;\n &:active {\n outline: none;\n }\n\n > .header-lable-container {\n /* stylelint-disable-next-line unit-allowed-list */\n min-width: 20px;\n }\n /* stylelint-disable selector-max-class */\n &.cell-fixed > .cell-content {\n flex-grow: unset;\n }\n }\n\n > .cell,\n .group-header-aggregation-row > .cell {\n position: relative;\n transition: transform 0.5s var(--animation-ease);\n ${borderVerticalInner &&\n css`\n border-right: var(--border-style);\n `}\n ${borderHorizontalInner &&\n css`\n border-bottom: var(--border-style);\n `}\n display: flex;\n align-items: center;\n\n &::after {\n opacity: 1;\n transition: opacity 0.1s var(--animation-ease);\n }\n\n .row-action-menu {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n &.cell-action {\n position: sticky;\n z-index: 4;\n right: 0;\n border-right: 0;\n justify-content: center;\n ${borderVerticalInner &&\n css`\n border-left: var(--border-style);\n `}\n\n /* The below styles are needed to avoid ellipses in safari when no text is present\n and to hide the 'Actions' label */\n\n /* stylelint-disable max-nesting-depth */\n\n div.header-label {\n text-overflow: unset;\n }\n }\n &.aggregateCell {\n background-color: var(--group-bg-color);\n }\n }\n\n /** Adds bottom border to the last row of a group, when striped-rows are enabled */\n &:has(+ .group-header-row) > .cell {\n ${showBorderOnLastStripedRow &&\n css`\n border-bottom: var(--border-style);\n `}\n }\n &.header > .cell {\n border-bottom: var(--border-style);\n }\n .group-header-aggregation-row {\n > .cell.cell-action {\n overflow: initial;\n\n /* extending border on the top left of row action cell as we need to show border for at the end group label value when row actions are present */\n &::before {\n content: '';\n position: absolute;\n inline-size: 0;\n inset-inline-start: calc(var(--border-width) * -1);\n inset-block-start: calc(var(--group-header-height) * -1);\n block-size: var(--group-header-height);\n ${borderVerticalInner &&\n css`\n border-inline-start: var(--border-style);\n `}\n }\n }\n }\n\n > .cell-action {\n background-color: ${bodyPrimaryBackground};\n }\n\n > .row-reorder-handle {\n padding: 0;\n border-right: 0 !important;\n justify-content: center;\n cursor: move;\n }\n\n .aggregateCell.cell {\n border-right: none;\n }\n\n > .cell.cell-fixed,\n .group-header-aggregation-row > .cell-fixed {\n position: var(--cell-fixed-position);\n z-index: 4;\n\n ${showFreezeLine &&\n css`\n &.cell-last-frozen {\n border-right: solid var(--border-width) var(--border-color-freeze);\n filter: drop-shadow(\n calc(${theme.base.spacing} * 0.25) 0 0 ${freezeLineShadowTransparent}\n );\n transition: 0.5s;\n }\n `}\n\n /* As the row select column and row dragDrop column always have to be frozen */\n &[data-col-id='RowSelect'],\n &[data-col-id='RowDragDrop'],\n &[data-col-id='RowError'] {\n position: sticky;\n flex-shrink: 0;\n z-index: 5;\n }\n }\n\n > .cell.cell-fixed:focus-within,\n .group-header-aggregation-row > .cell-fixed {\n z-index: 6;\n }\n\n &.click {\n cursor: pointer;\n }\n\n &:last-child {\n border-end-start-radius: inherit;\n border-end-end-radius: inherit;\n\n > .cell {\n &:first-child {\n border-end-start-radius: inherit;\n }\n\n &:last-child {\n border-end-end-radius: inherit;\n }\n\n ${showBorderOnLastStripedRow &&\n css`\n border-bottom: var(--border-style);\n `}\n }\n }\n }\n .row:not(.row-error):not(.group-header-row):not(.header) {\n .cell-fixed {\n background: ${bodyPrimaryBackground};\n }\n .cell-fixed.aggregateCell {\n background: var(--group-bg-color);\n }\n }\n ${theme.components.table['striped-rows'] &&\n css`\n /* Targets rows with an odd data-index attribute, excluding group header rows */\n .row[data-index$='1']:not(.group-header-row):not(.header),\n .row[data-index$='3']:not(.group-header-row):not(.header),\n .row[data-index$='5']:not(.group-header-row):not(.header),\n .row[data-index$='7']:not(.group-header-row):not(.header),\n .row[data-index$='9']:not(.group-header-row):not(.header) {\n background: ${oddRowBackgroundColor};\n color: ${useableOddRowForeground};\n .cell-fixed {\n background: ${oddRowBackgroundColor};\n color: ${useableOddRowForeground};\n }\n > .cell-action {\n background: ${oddRowBackgroundColor};\n }\n }\n .row[data-index$='0']:not(.group-header-row):not(.header),\n .row[data-index$='2']:not(.group-header-row):not(.header),\n .row[data-index$='4']:not(.group-header-row):not(.header),\n .row[data-index$='6']:not(.group-header-row):not(.header),\n .row[data-index$='8']:not(.group-header-row):not(.header) {\n background: ${evenRowBackgroundColor};\n color: ${useableEvenRowForeground};\n\n ${borderVerticalOuter &&\n css`\n .cell-fixed {\n background: ${evenRowBackgroundColor};\n color: ${useableEvenRowForeground};\n }\n > .cell-action {\n background: ${evenRowBackgroundColor};\n }\n `}\n\n /* Apply border radius if vertical outer border was disabled */\n ${!borderVerticalOuter &&\n css`\n border-radius: min(${props => props.theme.base['border-radius']}, 0.25rem);\n\n .cell-fixed {\n color: ${useableEvenRowForeground};\n }\n\n /* Avoid the non-frozen column's background to come behind the first cell's empty area in corner due to border-radius.\n Let the first cell-fixed take full rectangale width, add a pseudo element with the background and border radius of same size as the element */\n .cell-fixed:not(.cell-first) {\n background: ${evenRowBackgroundColor};\n }\n .cell-fixed.cell-first::before {\n background: ${evenRowBackgroundColor};\n content: '';\n position: absolute;\n inset: 0;\n z-index: -1;\n border-bottom-left-radius: min(${props => props.theme.base['border-radius']}, 0.25rem);\n pointer-events: none;\n }\n\n > .cell-action::before {\n background: ${evenRowBackgroundColor};\n content: '';\n position: absolute;\n inset: 0;\n z-index: -1;\n border-bottom-right-radius: min(${props => props.theme.base['border-radius']}, 0.25rem);\n pointer-events: none;\n }\n `}\n }\n\n .row[data-index='0']:not(.group-header-row):not(.header) {\n ${!borderVerticalOuter &&\n css`\n border-radius: 0 0 min(${props => props.theme.base['border-radius']}, 0.25rem)\n min(${props => props.theme.base['border-radius']}, 0.25rem);\n `}\n }\n `}\n\n .row-error {\n background: ${mix(\n 0.1,\n theme.components['form-field'].error['status-color'],\n theme.base.palette['primary-background']\n )};\n\n /* stylelint-disable no-descending-specificity */\n .cell-fixed,\n .cell-action {\n background: inherit;\n }\n\n > .cell:not(.cell-fixed):not(.cell-action) {\n background: none;\n }\n }\n\n .sort-info-container {\n .sort-sequence {\n font-size: 0.625rem;\n color: ${theme.base.colors.gray['extra-dark']};\n }\n }\n\n .filter-info-container {\n display: flex;\n justify-content: center;\n align-items: center;\n\n svg {\n width: 0.875rem;\n height: 0.875rem;\n }\n }\n\n .cell.row-error-column {\n padding: 0;\n border-right: 0;\n text-align: right;\n outline: none;\n\n /* Focus handling will be done as part of interation 2: EPIC-88751 */\n\n svg {\n color: ${theme.base.colors.red.medium};\n }\n }\n\n .cell-right-align .filter-info-container svg {\n margin: 0 0.312rem 0 0;\n }\n\n &.show-expand-collapse-all {\n .row > .cell-first {\n padding-left: calc(var(--expand-collapse-all-width) + var(--cell-padding) + 0.25rem);\n &.row-reorder-handle,\n &.row-error-column {\n padding: 0;\n }\n &.row-select-handle {\n padding-inline-start: var(--expand-collapse-all-width);\n }\n }\n\n .row-container .row > .cell-first {\n &.row-select-handle {\n /* Offset padding of 0.5rem added to SelectAllCheckbox in grouped views(getting pushed by margin),\n ensuring row select checkboxes align vertically in header and data rows */\n padding-inline-start: calc(\n var(--expand-collapse-all-width) - var(--cell-padding) + 0.5rem\n );\n }\n }\n\n /* stylelint-enable selector-max-class */\n .expand-collapse-all {\n position: absolute;\n width: var(--expand-collapse-all-width);\n z-index: 10;\n height: var(--row-height);\n background-color: var(--header-bg-color);\n color: var(--header-fg-color);\n border-bottom: var(--border-style);\n border-start-start-radius: ${theme.base['border-radius']};\n padding-inline-start: 0.125rem;\n margin-inline-start: 0.25rem;\n display: flex;\n align-items: center;\n justify-content: center;\n\n ${borderVerticalInner &&\n css`\n border-right: var(--border-style);\n `}\n\n &::before {\n content: '';\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: -0.25rem;\n width: 0.25rem;\n height: 100%;\n background-color: var(--header-bg-color);\n z-index: 12;\n }\n\n > button {\n color: var(--forground-color);\n :focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n }\n }\n .no-border-right {\n border-right: 0;\n }\n }\n\n /* stylelint-disable selector-max-class */\n\n .scroll-end {\n &.row-container > .row:last-child {\n & > .cell,\n & .group-header-aggregation-row > .cell {\n border-bottom: 0;\n }\n }\n }\n\n /* stylelint-enable selector-max-class */\n .header {\n font-weight: var(--font-weight-semi-bold);\n position: relative; /* This is required to position .border-fix element */\n border-start-start-radius: inherit;\n border-start-end-radius: inherit;\n\n > .cell.row-error-column {\n border-right: 0;\n }\n > .cell {\n display: flex;\n justify-content: space-between;\n align-items: center;\n z-index: 2;\n position: relative;\n cursor: pointer;\n background-color: var(--header-bg-color);\n color: var(--header-fg-color);\n font-weight: ${theme.base['font-weight'].bold};\n font-size: ${fontSize.xxs};\n ${borderVerticalInner &&\n css`\n border-right: var(--border-style);\n `}\n padding: var(--header-cell-padding);\n\n &:first-child {\n border-start-start-radius: inherit;\n }\n\n &:last-child {\n border-start-end-radius: inherit;\n }\n\n .header-lable-container {\n display: inline-flex;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: ${fontSize.xs};\n font-weight: var(--font-weight-semi-bold);\n align-items: center;\n gap: 0.125rem;\n }\n\n .header-label {\n overflow: hidden;\n text-overflow: ellipsis;\n\n /* To avoid browser tooltip when we get ellipsis in safari */\n &::after {\n content: '';\n display: block;\n }\n\n /* To utilize smart tooltip making it as a non-box element */\n /* stylelint-disable selector-max-class */\n .cell-content {\n display: contents;\n }\n }\n }\n\n > .row-reorder-handle {\n padding: 0;\n }\n\n > .row-select-handle {\n /* Nullifying padding applied from .header > .cell */\n padding: 0;\n justify-content: center;\n }\n .row {\n border-bottom: none;\n }\n }\n\n .sticky-header {\n display: grid;\n position: sticky;\n top: 0;\n z-index: 6;\n border-start-start-radius: inherit;\n border-start-end-radius: inherit;\n\n ${!borderVerticalInner &&\n css`\n & .row .cell:not(.cell-last-frozen):not(.cell-last):has(.column-resizer) {\n &::after {\n content: '';\n position: absolute;\n right: 0.2rem;\n top: 0.5rem;\n bottom: 0.5rem;\n width: 0.062rem;\n background-color: ${theme.base.palette['border-line']};\n }\n }\n `}\n }\n\n /* 4 selectors required as aggregateCell of only footer need this effect */\n\n .pContainer:not(.pContainerScroll) .footer .aggregateCell.cell {\n border-bottom: none;\n }\n\n .row .cell.cell-last {\n border-right: 0;\n }\n\n ${!colIdToFillRemainingSpace\n ? css`\n .row .cell.cell-last {\n flex-grow: 1;\n }\n `\n : css`\n .row .cell[data-col-id='${colIdToFillRemainingSpace}'] {\n flex-grow: 1;\n }\n `}\n\n /* Disable the flex layout size changes when measuring for content based size to get correct width */\n\n [data-content-size-measuring] & .row .cell {\n flex-grow: 0 !important;\n }\n\n .row-container {\n --data-row-height: calc(\n var(--hit-area) * var(--row-height-multiplier) + var(--cell-vertical-padding)\n );\n --group-header-height: ${isAggregationApplied\n ? 'var(--default-group-header-height)'\n : 'var(--data-row-height)'};\n &:not(.wrap-content-height) > .row:not(.group-header-row) {\n height: var(--data-row-height);\n }\n border-end-start-radius: inherit;\n border-end-end-radius: inherit;\n\n & > .row .cell-content {\n /*\n * Using box sizing content-box so that the padding is not considered for the alignment of the cell content.\n * Vertical alignment is done using flex and max-height below even though the .cell-content might overflow due to padding + content size.\n */\n box-sizing: content-box;\n flex-grow: 1;\n\n /* Adding padding on .cell-content so that focus rings can appear properly and doesn't clip due to overflow: hidden */\n padding: var(--cell-vertical-padding) var(--cell-padding);\n\n /* setting max-height so that the elements with more height like RTL, align with the row density height */\n max-height: var(--data-row-height);\n\n /* hiding scroll bar in case the cell render introduces scrollbar based on its implementation */\n & * {\n scrollbar-width: none;\n }\n\n /* in case of combine columns, removing padding from parent cell-content as children already have the padding */\n &:has(.combined-cell) {\n padding: 0;\n\n .cell-content {\n flex-grow: unset;\n }\n }\n }\n\n & > .row:not(.group-header-row) {\n min-width: 100%;\n\n .cell-content {\n &:not(:has(.combined-cell)):not(.combined-cell-content):has(${StyledStatus}) {\n padding: unset;\n\n &,\n & > span,\n & ${StyledStatus} {\n block-size: 100%;\n }\n\n ${StyledStatus} {\n display: flex;\n align-items: center;\n justify-content: space-evenly;\n border-radius: 0;\n }\n }\n }\n }\n\n &.wrap-content-height\n > .row:not(.group-header-row)\n .cell:not(:has(.combined-cell)):has(${StyledStatus}) {\n padding: 0;\n }\n\n & > .row .cell:not(.column-type-action) .cell-content {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n word-break: break-all;\n }\n }\n\n .row .aggregateCell .cell-content {\n line-height: initial;\n padding: 0;\n }\n\n .short-height,\n .medium-height {\n ${StyledStatus} {\n white-space: nowrap;\n }\n }\n\n .short-height {\n ${StyledRadioCheck} ${StyledLabel} {\n min-height: auto;\n }\n }\n\n .medium-height {\n --row-height-multiplier: 4 / 3;\n }\n\n .tall-height {\n --row-height-multiplier: calc(4 / 3 + 0.5);\n > .row:not(.group-header-row) {\n > .cell {\n display: inline-grid;\n align-items: start;\n white-space: pre-wrap;\n word-break: break-all;\n grid-auto-flow: column;\n\n :has(> ${CellIcon}) {\n /* Adds spacing between children when icons are rendered alongside cell content in the cell container. */\n justify-content: space-between;\n }\n\n /* stylelint-disable-next-line selector-max-compound-selectors */\n > .cell-content > .combined-cell > .combined-cell-content,\n > .cell-content {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n white-space: inherit;\n word-break: inherit;\n }\n\n ${CellIcon} {\n margin-block-start: 0.375rem;\n }\n }\n }\n }\n\n .wrap-content-height {\n --row-height-multiplier: 4 / 3;\n --row-min-height: calc(\n var(--hit-area) * var(--row-height-multiplier) + var(--cell-vertical-padding) * 2\n );\n --group-header-height: ${isAggregationApplied\n ? 'var(--default-group-header-height)'\n : 'var(--row-min-height)'};\n\n > .row:not(.group-header-row) {\n height: auto;\n min-height: var(--row-min-height);\n > .cell {\n white-space: pre-wrap;\n\n /* -- For BUG-625508 -- */\n word-break: break-word;\n display: inline-grid;\n align-items: start;\n padding-top: var(--cell-vertical-padding);\n padding-bottom: var(--cell-vertical-padding);\n grid-auto-flow: column;\n\n :has(> ${CellIcon}) {\n /* Adds spacing between children when icons are rendered alongside cell content in the cell container. */\n justify-content: space-between;\n }\n\n /* stylelint-disable-next-line selector-max-compound-selectors */\n > .cell-content > .combined-cell > .combined-cell-content,\n > .cell-content {\n /* for full-content, the row cells should adjust according to content */\n max-height: none;\n white-space: inherit;\n word-break: inherit;\n }\n\n ${CellIcon} {\n margin-block-start: 0.375rem;\n }\n }\n }\n }\n\n .footer {\n .row {\n .cell {\n padding: 0;\n }\n }\n }\n\n /* stylelint-disable no-duplicate-selectors */\n .row-container {\n position: absolute;\n display: grid;\n width: 100%;\n font-size: ${fontSize.s};\n\n > .group-header-row,\n .hierarchical-group-footer-row {\n height: var(--group-header-height);\n .cell {\n padding: 0;\n border-right-width: 0;\n }\n }\n\n > .hierarchical-group-header-row {\n height: var(--group-header-height);\n }\n input.checkbox-on-hover + label {\n opacity: 0;\n }\n input.checkbox-on-hover:checked + label {\n opacity: 1;\n }\n .row.selected-row {\n background-color: ${selectedRowColor};\n\n > .cell,\n .cell-fixed,\n .cell-action {\n background-color: ${selectedRowColor};\n }\n }\n .row-on-hover:hover {\n background-color: ${lightGreyColor};\n input.checkbox-on-hover + label {\n opacity: 1;\n }\n\n > .cell,\n .cell-fixed,\n .cell-action {\n background-color: ${lightGreyColor};\n }\n }\n .row.hierarchical-group-footer-row {\n .cell-fixed {\n background: ${lightGreyColor};\n }\n }\n }\n\n /* stylelint-enable selector-max-class */\n\n .toolbar-button-applied {\n /* stylelint-disable-next-line unit-allowed-list */\n padding: 0 8px;\n margin: 0 calc(${theme.base.spacing} / 4);\n }\n\n .toolbar-button {\n /* stylelint-disable-next-line unit-allowed-list */\n padding: 0 8px;\n margin: 0 calc(${theme.base.spacing} / 4);\n }\n\n .column-resizer {\n cursor: col-resize;\n position: absolute;\n top: 0;\n right: 0;\n z-index: 3;\n width: 0.25rem;\n height: 100%;\n }\n\n .column-resizer:hover,\n .column-resizer:active {\n background: var(--interactive);\n }\n\n .align-right {\n justify-content: right;\n\n .cell-content {\n text-align: right;\n }\n }\n\n .align-left {\n justify-content: left;\n\n .cell-content {\n text-align: left;\n }\n }\n\n .align-center {\n justify-content: center;\n\n .cell-content {\n text-align: center;\n }\n }\n\n .popper {\n div.row {\n display: flex;\n vertical-align: middle;\n line-height: unset;\n border-bottom: none;\n outline: none 0;\n height: auto;\n }\n }\n `;\n});\n\nexport default StyledTableContainer;\n"]}
|
|
1
|
+
{"version":3,"file":"StyledTableContainer.js","sourceRoot":"","sources":["../../../../Core/Views/Table/StyledTableContainer.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,sDAAsD,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,8DAA8D,CAAC;AAChG,OAAO,EACL,WAAW,EACX,sBAAsB,EACtB,iBAAiB,EACjB,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AAEtF,OAAO,EAAE,mCAAmC,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjG,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,oBAAoB,GAAG,MAAM,CAAC,UAA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;;;;wBAKpB,cAAc;;;;;;;;;;uBAUf,KAAK,CAAC,IAAI,CAAC,OAAO;;;;;;uBAMlB,KAAK,CAAC,IAAI,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDtC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,oBAAoB,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport styled, { css } from 'styled-components';\nimport { getLuminance, mix, transparentize } from 'polished';\n\nimport { StyledStatus } from '@pega/cosmos-react-core/lib/components/Badges/Status';\nimport { StyledRadioCheck } from '@pega/cosmos-react-core/lib/components/RadioCheck/RadioCheck';\nimport {\n StyledLabel,\n StyledProgressBackdrop,\n calculateFontSize,\n tryCatch,\n isSameColor,\n meetsMinContrast,\n resolveContrastColor\n} from '@pega/cosmos-react-core';\nimport { StyledTabPanel } from '@pega/cosmos-react-core/lib/components/Tabs/TabPanel';\n\nimport { generateRSDataContainerHeightStyles, generateRSHeightStyles } from '../../Utils/styles';\n\nimport { CellIcon } from './CellWrapper';\n\nconst StyledTableContainer = styled(forwardRef((props, ref) => <div ref={ref} {...props} />))(({\n theme,\n view,\n isFullscreen\n}) => {\n let colIdToFillRemainingSpace;\n let isAggregationApplied = false;\n\n (view.columns ?? [])\n .filter(c => !c.hidden)\n .forEach(c => {\n if (!colIdToFillRemainingSpace && c.field.fillAvailableSpace) {\n colIdToFillRemainingSpace = c.field.id;\n }\n if (c.aggregated) {\n isAggregationApplied = true;\n }\n });\n\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n const minContrast = theme.base['min-contrast'];\n const showFreezeLine =\n view.state.responsive?.sm &&\n !(view.hasNoRecords || view.hasNoFrozenColumns || view.bHideFreezeLine);\n const selectedRowColor = tryCatch(() =>\n mix(0.85, theme.base.palette['primary-background'], theme.base.palette.interactive)\n );\n const lightGreyColor = theme.base.colors.gray['extra-light'];\n const freezeLineShadowTransparent = transparentize(\n getLuminance(theme.components.table.header['foreground-color']) < 0.5 ? 0.9 : 0.75,\n theme.components.table.header['foreground-color']\n );\n\n const headerBackground = theme.components.table.header['background-color'];\n const bodyPrimaryBackground = theme.components.table.body['background-color'];\n const bodySecondaryBackground = theme.components.table.body['secondary-background-color'];\n const secondaryBackgroundForEvenRow = isSameColor(headerBackground, bodyPrimaryBackground);\n\n /* Calculating usable striped row background and foreground colors */\n const stripedRowBackground =\n getLuminance(bodySecondaryBackground) > 0.5\n ? bodySecondaryBackground\n : mix(0.75, bodyPrimaryBackground, bodySecondaryBackground);\n\n const stripedRowContrast = meetsMinContrast(\n theme.components.table.body['foreground-color'],\n stripedRowBackground,\n minContrast\n );\n const useableStripedRowForeground = stripedRowContrast\n ? theme.components.table.body['foreground-color']\n : resolveContrastColor({\n background: stripedRowBackground,\n foreground: theme.components.table.body['foreground-color'],\n theme\n });\n\n /* Calculating even row and odd row background and foreground colors */\n const evenRowBackgroundColor = secondaryBackgroundForEvenRow\n ? bodySecondaryBackground\n : bodyPrimaryBackground;\n\n const useableEvenRowForeground = secondaryBackgroundForEvenRow\n ? useableStripedRowForeground\n : theme.components.table.body['foreground-color'];\n\n /* Calculating usable odd row background and foreground colors */\n const oddRowBackgroundColor = secondaryBackgroundForEvenRow\n ? bodyPrimaryBackground\n : bodySecondaryBackground;\n\n const useableOddRowForeground = secondaryBackgroundForEvenRow\n ? theme.components.table.body['foreground-color']\n : useableStripedRowForeground;\n\n const headerForegroundContrast = meetsMinContrast(\n theme.components.table.header['foreground-color'],\n theme.components.table.header['background-color'],\n minContrast\n );\n const usableHeaderForeground = headerForegroundContrast\n ? theme.components.table.header['foreground-color']\n : resolveContrastColor({\n background: theme.components.table.header['background-color'],\n foreground: theme.components.table.header['foreground-color'],\n theme\n });\n\n const borderVerticalInner = theme.components.table.border['vertical-inner'];\n const borderVerticalOuter = theme.components.table.border['vertical-outer'];\n const borderHorizontalInner =\n theme.components.table.border['horizontal-inner'] && !theme.components.table['striped-rows'];\n const borderHorizontalOuter = theme.components.table.border['horizontal-outer'];\n\n const showBorderOnLastStripedRow =\n theme.components.table.border['horizontal-inner'] && theme.components.table['striped-rows'];\n\n return css`\n --forground-color: ${theme.base.palette['foreground-color']};\n --interactive: ${theme.base.palette.interactive};\n --medium-blue: ${theme.base.colors.blue.medium};\n --border-color: ${theme.base.palette['border-line']};\n --border-color-freeze: #a5a5a5;\n --border-width: 0.062rem;\n --border-style: var(--border-width) solid var(--border-color);\n --font-stretch: ${theme.components.table.typography['font-stretch']};\n --letter-spacing: ${theme.components.table.typography['letter-spacing']};\n --cell-padding: ${theme.base.spacing};\n --cell-vertical-padding: calc(${theme.base.spacing} * 0.5);\n --header-cell-padding: 0 0.44rem 0 var(--cell-padding);\n --header-bg-color: ${theme.components.table.header['background-color']};\n --header-fg-color: ${usableHeaderForeground};\n --default-group-header-height: 1.5rem;\n --group-header-height: var(--default-group-header-height);\n --group-bg-color: ${theme.components.table.body['secondary-background-color']};\n --box-sizing: content-box;\n --animation-ease: ${theme.base.animation.timing.ease};\n --font-weight-semi-bold: ${theme.base['font-weight']['semi-bold']};\n --row-height-multiplier: 1.125;\n --cell-fixed-position: sticky;\n position: relative;\n ${() => generateRSHeightStyles({ view, isFullscreen })}\n\n .small-screen-table {\n --cell-fixed-position: static;\n }\n\n .container {\n ${() => generateRSDataContainerHeightStyles()};\n ${borderHorizontalOuter &&\n css`\n border-top: var(--border-style);\n border-bottom: var(--border-style);\n `}\n ${borderVerticalOuter &&\n css`\n border-left: var(--border-style);\n border-right: var(--border-style);\n `}\n ${borderVerticalOuter &&\n borderHorizontalOuter &&\n css`\n border-radius: var(--border-radius, ${theme.base['border-radius']});\n `}\n position: relative;\n letter-spacing: var(--letter-spacing);\n font-stretch: var(--font-stretch);\n ${StyledTabPanel} & ${StyledProgressBackdrop} {\n border-radius: var(--border-radius, ${theme.base['border-radius']});\n }\n }\n\n .hide-rows-till-ready .row[aria-rowindex] {\n visibility: hidden;\n }\n\n .table-drag-proxy {\n background: rgba(0, 0, 0, 0.21);\n position: absolute;\n top: 0;\n bottom: 0;\n z-index: 6;\n pointer-events: none;\n display: none;\n }\n\n .table-drag-line {\n background: #999999;\n position: absolute;\n top: 0;\n bottom: 0;\n width: 0.12rem;\n z-index: 6;\n pointer-events: none;\n display: none;\n }\n\n .cell-fixed {\n z-index: 1;\n }\n\n .group-wrapper {\n overflow: hidden;\n display: inline-flex;\n line-height: var(--group-header-height);\n\n .group-context-count {\n display: inline-flex;\n overflow: hidden;\n }\n }\n\n /* In review mode(Ex: Tabs) cosmos components are rendered and mark up is not compatible with\n group-wrapper cell. Overridden css in group-header when dl exists inside that class which indicates\n mark up is generated from cosmos which differentiates from normal table cell markup */\n .group-wrapper .group-context-count dl {\n grid-template-columns: auto;\n }\n\n .cell {\n /* preventing cell from shrinking during autosize calculations */\n flex-shrink: 0;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n\n .icons-ph {\n /* Maintaining action button aspect ratio of 1:1 with 24*24px width and height */\n min-width: 1.5rem;\n }\n\n &.custom-item {\n width: 10em;\n }\n }\n\n .cell:focus {\n box-shadow: ${theme.base.shadow['focus-inset']};\n outline: none;\n }\n\n .row {\n display: inline-flex;\n height: var(--row-height);\n outline: none 0;\n transition: transform 0.5s var(--animation-ease);\n box-sizing: var(--box-sizing);\n position: relative;\n\n > .row-select-handle {\n display: flex;\n justify-content: center;\n &:active {\n outline: none;\n }\n\n > .header-lable-container {\n /* stylelint-disable-next-line unit-allowed-list */\n min-width: 20px;\n }\n /* stylelint-disable selector-max-class */\n &.cell-fixed > .cell-content {\n flex-grow: unset;\n }\n }\n\n > .cell,\n .group-header-aggregation-row > .cell {\n position: relative;\n transition: transform 0.5s var(--animation-ease);\n ${borderVerticalInner &&\n css`\n border-right: var(--border-style);\n `}\n ${borderHorizontalInner &&\n css`\n border-bottom: var(--border-style);\n `}\n display: flex;\n align-items: center;\n\n &::after {\n opacity: 1;\n transition: opacity 0.1s var(--animation-ease);\n }\n\n .row-action-menu {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n &.cell-action {\n position: sticky;\n z-index: 4;\n right: 0;\n border-right: 0;\n justify-content: center;\n ${borderVerticalInner &&\n css`\n border-left: var(--border-style);\n `}\n\n /* The below styles are needed to avoid ellipses in safari when no text is present\n and to hide the 'Actions' label */\n\n /* stylelint-disable max-nesting-depth */\n\n div.header-label {\n text-overflow: unset;\n }\n }\n &.aggregateCell {\n background-color: var(--group-bg-color);\n }\n }\n\n /** Adds bottom border to the last row of a group, when striped-rows are enabled */\n &:has(+ .group-header-row) > .cell {\n ${showBorderOnLastStripedRow &&\n css`\n border-bottom: var(--border-style);\n `}\n }\n &.header > .cell {\n border-bottom: var(--border-style);\n }\n .group-header-aggregation-row {\n > .cell.cell-action {\n overflow: initial;\n\n /* extending border on the top left of row action cell as we need to show border for at the end group label value when row actions are present */\n &::before {\n content: '';\n position: absolute;\n inline-size: 0;\n inset-inline-start: calc(var(--border-width) * -1);\n inset-block-start: calc(var(--group-header-height) * -1);\n block-size: var(--group-header-height);\n ${borderVerticalInner &&\n css`\n border-inline-start: var(--border-style);\n `}\n }\n }\n }\n\n > .cell-action {\n background-color: ${bodyPrimaryBackground};\n }\n\n > .row-reorder-handle {\n padding: 0;\n border-right: 0 !important;\n justify-content: center;\n cursor: move;\n }\n\n .aggregateCell.cell {\n border-right: none;\n }\n\n > .cell.cell-fixed,\n .group-header-aggregation-row > .cell-fixed {\n position: var(--cell-fixed-position);\n z-index: 4;\n\n ${showFreezeLine &&\n css`\n &.cell-last-frozen {\n border-right: solid var(--border-width) var(--border-color-freeze);\n filter: drop-shadow(\n calc(${theme.base.spacing} * 0.25) 0 0 ${freezeLineShadowTransparent}\n );\n transition: 0.5s;\n }\n `}\n\n /* As the row select column and row dragDrop column always have to be frozen */\n &[data-col-id='RowSelect'],\n &[data-col-id='RowDragDrop'],\n &[data-col-id='RowError'] {\n position: sticky;\n flex-shrink: 0;\n z-index: 5;\n }\n }\n\n > .cell.cell-fixed:focus-within,\n .group-header-aggregation-row > .cell-fixed {\n z-index: 6;\n }\n\n &.click {\n cursor: pointer;\n }\n\n &:last-child {\n border-end-start-radius: inherit;\n border-end-end-radius: inherit;\n\n > .cell {\n &:first-child {\n border-end-start-radius: inherit;\n }\n\n &:last-child {\n border-end-end-radius: inherit;\n }\n\n ${showBorderOnLastStripedRow &&\n css`\n border-bottom: var(--border-style);\n `}\n }\n }\n }\n .row:not(.row-error):not(.group-header-row):not(.header) {\n .cell-fixed {\n background: ${bodyPrimaryBackground};\n }\n .cell-fixed.aggregateCell {\n background: var(--group-bg-color);\n }\n }\n ${theme.components.table['striped-rows'] &&\n css`\n /* Targets rows with an odd data-index attribute, excluding group header rows */\n .row[data-index$='1']:not(.group-header-row):not(.header),\n .row[data-index$='3']:not(.group-header-row):not(.header),\n .row[data-index$='5']:not(.group-header-row):not(.header),\n .row[data-index$='7']:not(.group-header-row):not(.header),\n .row[data-index$='9']:not(.group-header-row):not(.header) {\n background: ${oddRowBackgroundColor};\n color: ${useableOddRowForeground};\n .cell-fixed {\n background: ${oddRowBackgroundColor};\n color: ${useableOddRowForeground};\n }\n > .cell-action {\n background: ${oddRowBackgroundColor};\n }\n }\n .row[data-index$='0']:not(.group-header-row):not(.header),\n .row[data-index$='2']:not(.group-header-row):not(.header),\n .row[data-index$='4']:not(.group-header-row):not(.header),\n .row[data-index$='6']:not(.group-header-row):not(.header),\n .row[data-index$='8']:not(.group-header-row):not(.header) {\n background: ${evenRowBackgroundColor};\n color: ${useableEvenRowForeground};\n\n ${borderVerticalOuter &&\n css`\n .cell-fixed {\n background: ${evenRowBackgroundColor};\n color: ${useableEvenRowForeground};\n }\n > .cell-action {\n background: ${evenRowBackgroundColor};\n }\n `}\n\n /* Apply border radius if vertical outer border was disabled */\n ${!borderVerticalOuter &&\n css`\n border-radius: min(${props => props.theme.base['border-radius']}, 0.25rem);\n\n .cell-fixed {\n color: ${useableEvenRowForeground};\n }\n\n /* Avoid the non-frozen column's background to come behind the first cell's empty area in corner due to border-radius.\n Let the first cell-fixed take full rectangale width, add a pseudo element with the background and border radius of same size as the element */\n .cell-fixed:not(.cell-first) {\n background: ${evenRowBackgroundColor};\n }\n .cell-fixed.cell-first::before {\n background: ${evenRowBackgroundColor};\n content: '';\n position: absolute;\n inset: 0;\n z-index: -1;\n border-bottom-left-radius: min(${props => props.theme.base['border-radius']}, 0.25rem);\n pointer-events: none;\n }\n\n > .cell-action::before {\n background: ${evenRowBackgroundColor};\n content: '';\n position: absolute;\n inset: 0;\n z-index: -1;\n border-bottom-right-radius: min(${props => props.theme.base['border-radius']}, 0.25rem);\n pointer-events: none;\n }\n `}\n }\n\n .row[data-index='0']:not(.group-header-row):not(.header) {\n ${!borderVerticalOuter &&\n css`\n border-radius: 0 0 min(${props => props.theme.base['border-radius']}, 0.25rem)\n min(${props => props.theme.base['border-radius']}, 0.25rem);\n `}\n }\n `}\n\n .row-error {\n background: ${mix(\n 0.1,\n theme.components['form-field'].error['status-color'],\n theme.base.palette['primary-background']\n )};\n\n /* stylelint-disable no-descending-specificity */\n .cell-fixed,\n .cell-action {\n background: inherit;\n }\n\n > .cell:not(.cell-fixed):not(.cell-action) {\n background: none;\n }\n }\n\n .sort-info-container {\n .sort-sequence {\n font-size: 0.625rem;\n color: ${theme.base.colors.gray['extra-dark']};\n }\n }\n\n .filter-info-container {\n display: flex;\n justify-content: center;\n align-items: center;\n\n svg {\n width: 0.875rem;\n height: 0.875rem;\n }\n }\n\n .cell.row-error-column {\n padding: 0;\n border-right: 0;\n text-align: right;\n outline: none;\n\n /* Focus handling will be done as part of interation 2: EPIC-88751 */\n\n svg {\n color: ${theme.base.colors.red.medium};\n }\n }\n\n .cell-right-align .filter-info-container svg {\n margin: 0 0.312rem 0 0;\n }\n\n &.show-expand-collapse-all {\n .row > .cell-first {\n padding-left: calc(var(--expand-collapse-all-width) + var(--cell-padding) + 0.25rem);\n &.row-reorder-handle,\n &.row-error-column {\n padding: 0;\n }\n &.row-select-handle {\n padding-inline-start: var(--expand-collapse-all-width);\n }\n }\n\n .row-container .row > .cell-first {\n &.row-select-handle {\n /* Offset padding of 0.5rem added to SelectAllCheckbox in grouped views(getting pushed by margin),\n ensuring row select checkboxes align vertically in header and data rows */\n padding-inline-start: calc(\n var(--expand-collapse-all-width) - var(--cell-padding) + 0.5rem\n );\n }\n }\n\n /* stylelint-enable selector-max-class */\n .expand-collapse-all {\n position: absolute;\n width: var(--expand-collapse-all-width);\n z-index: 10;\n height: var(--row-height);\n background-color: var(--header-bg-color);\n color: var(--header-fg-color);\n border-bottom: var(--border-style);\n border-start-start-radius: ${theme.base['border-radius']};\n padding-inline-start: 0.125rem;\n margin-inline-start: 0.25rem;\n display: flex;\n align-items: center;\n justify-content: center;\n\n ${borderVerticalInner &&\n css`\n border-right: var(--border-style);\n `}\n\n &::before {\n content: '';\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: -0.25rem;\n width: 0.25rem;\n height: 100%;\n background-color: var(--header-bg-color);\n z-index: 12;\n }\n\n > button {\n color: var(--forground-color);\n :focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n }\n }\n .no-border-right {\n border-right: 0;\n }\n }\n\n /* stylelint-disable selector-max-class */\n\n .scroll-end {\n &.row-container > .row:last-child {\n & > .cell,\n & .group-header-aggregation-row > .cell {\n border-bottom: 0;\n }\n }\n }\n\n /* stylelint-enable selector-max-class */\n .header {\n font-weight: var(--font-weight-semi-bold);\n position: relative; /* This is required to position .border-fix element */\n border-start-start-radius: inherit;\n border-start-end-radius: inherit;\n\n > .cell.row-error-column {\n border-right: 0;\n }\n > .cell {\n display: flex;\n justify-content: space-between;\n align-items: center;\n z-index: 2;\n position: relative;\n cursor: pointer;\n background-color: var(--header-bg-color);\n color: var(--header-fg-color);\n font-weight: ${theme.base['font-weight'].bold};\n font-size: ${fontSize.xxs};\n ${borderVerticalInner &&\n css`\n border-right: var(--border-style);\n `}\n padding: var(--header-cell-padding);\n\n &:first-child {\n border-start-start-radius: inherit;\n }\n\n &:last-child {\n border-start-end-radius: inherit;\n }\n\n .header-lable-container {\n display: inline-flex;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: ${fontSize.xs};\n font-weight: var(--font-weight-semi-bold);\n align-items: center;\n gap: 0.125rem;\n }\n\n .header-label {\n overflow: hidden;\n text-overflow: ellipsis;\n\n /* To avoid browser tooltip when we get ellipsis in safari */\n &::after {\n content: '';\n display: block;\n }\n\n /* To utilize smart tooltip making it as a non-box element */\n /* stylelint-disable selector-max-class */\n .cell-content {\n display: contents;\n }\n }\n }\n\n > .row-reorder-handle {\n padding: 0;\n }\n\n > .row-select-handle {\n /* Nullifying padding applied from .header > .cell */\n padding: 0;\n justify-content: center;\n }\n .row {\n border-bottom: none;\n }\n }\n\n .sticky-header {\n display: grid;\n position: sticky;\n top: 0;\n z-index: 6;\n border-start-start-radius: inherit;\n border-start-end-radius: inherit;\n\n ${!borderVerticalInner &&\n css`\n & .row .cell:not(.cell-last-frozen):not(.cell-last):has(.column-resizer) {\n &::after {\n content: '';\n position: absolute;\n right: 0;\n top: 0.5rem;\n bottom: 0.5rem;\n width: 0.062rem;\n background-color: ${theme.base.palette['border-line']};\n }\n }\n `}\n }\n\n /* 4 selectors required as aggregateCell of only footer need this effect */\n\n .pContainer:not(.pContainerScroll) .footer .aggregateCell.cell {\n border-bottom: none;\n }\n\n .row .cell.cell-last {\n border-right: 0;\n }\n\n ${!colIdToFillRemainingSpace\n ? css`\n .row .cell.cell-last {\n flex-grow: 1;\n }\n `\n : css`\n .row .cell[data-col-id='${colIdToFillRemainingSpace}'] {\n flex-grow: 1;\n }\n `}\n\n /* Disable the flex layout size changes when measuring for content based size to get correct width */\n\n [data-content-size-measuring] & .row .cell {\n flex-grow: 0 !important;\n }\n\n .row-container {\n --data-row-height: calc(\n var(--hit-area) * var(--row-height-multiplier) + var(--cell-vertical-padding)\n );\n --group-header-height: ${isAggregationApplied\n ? 'var(--default-group-header-height)'\n : 'var(--data-row-height)'};\n &:not(.wrap-content-height) > .row:not(.group-header-row) {\n height: var(--data-row-height);\n }\n border-end-start-radius: inherit;\n border-end-end-radius: inherit;\n\n & > .row .cell-content {\n /*\n * Using box sizing content-box so that the padding is not considered for the alignment of the cell content.\n * Vertical alignment is done using flex and max-height below even though the .cell-content might overflow due to padding + content size.\n */\n box-sizing: content-box;\n flex-grow: 1;\n\n /* Adding padding on .cell-content so that focus rings can appear properly and doesn't clip due to overflow: hidden */\n padding: var(--cell-vertical-padding) var(--cell-padding);\n\n /* setting max-height so that the elements with more height like RTL, align with the row density height */\n max-height: var(--data-row-height);\n\n /* hiding scroll bar in case the cell render introduces scrollbar based on its implementation */\n & * {\n scrollbar-width: none;\n }\n\n /* in case of combine columns, removing padding from parent cell-content as children already have the padding */\n &:has(.combined-cell) {\n padding: 0;\n\n .cell-content {\n flex-grow: unset;\n }\n }\n }\n\n & > .row:not(.group-header-row) {\n min-width: 100%;\n\n .cell-content {\n &:not(:has(.combined-cell)):not(.combined-cell-content):has(${StyledStatus}) {\n padding: unset;\n\n &,\n & > span,\n & ${StyledStatus} {\n block-size: 100%;\n }\n\n ${StyledStatus} {\n display: flex;\n align-items: center;\n justify-content: space-evenly;\n border-radius: 0;\n }\n }\n }\n }\n\n &.wrap-content-height\n > .row:not(.group-header-row)\n .cell:not(:has(.combined-cell)):has(${StyledStatus}) {\n padding: 0;\n }\n\n & > .row .cell:not(.column-type-action) .cell-content {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n word-break: break-all;\n }\n }\n\n .row .aggregateCell .cell-content {\n line-height: initial;\n padding: 0;\n }\n\n .short-height,\n .medium-height {\n ${StyledStatus} {\n white-space: nowrap;\n }\n }\n\n .short-height {\n ${StyledRadioCheck} ${StyledLabel} {\n min-height: auto;\n }\n }\n\n .medium-height {\n --row-height-multiplier: 4 / 3;\n }\n\n .tall-height {\n --row-height-multiplier: calc(4 / 3 + 0.5);\n > .row:not(.group-header-row) {\n > .cell {\n display: inline-grid;\n align-items: start;\n white-space: pre-wrap;\n word-break: break-all;\n grid-auto-flow: column;\n\n :has(> ${CellIcon}) {\n /* Adds spacing between children when icons are rendered alongside cell content in the cell container. */\n justify-content: space-between;\n }\n\n /* stylelint-disable-next-line selector-max-compound-selectors */\n > .cell-content > .combined-cell > .combined-cell-content,\n > .cell-content {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n white-space: inherit;\n word-break: inherit;\n }\n\n ${CellIcon} {\n margin-block-start: 0.375rem;\n }\n }\n }\n }\n\n .wrap-content-height {\n --row-height-multiplier: 4 / 3;\n --row-min-height: calc(\n var(--hit-area) * var(--row-height-multiplier) + var(--cell-vertical-padding) * 2\n );\n --group-header-height: ${isAggregationApplied\n ? 'var(--default-group-header-height)'\n : 'var(--row-min-height)'};\n\n > .row:not(.group-header-row) {\n height: auto;\n min-height: var(--row-min-height);\n > .cell {\n white-space: pre-wrap;\n\n /* -- For BUG-625508 -- */\n word-break: break-word;\n display: inline-grid;\n align-items: start;\n padding-top: var(--cell-vertical-padding);\n padding-bottom: var(--cell-vertical-padding);\n grid-auto-flow: column;\n\n :has(> ${CellIcon}) {\n /* Adds spacing between children when icons are rendered alongside cell content in the cell container. */\n justify-content: space-between;\n }\n\n /* stylelint-disable-next-line selector-max-compound-selectors */\n > .cell-content > .combined-cell > .combined-cell-content,\n > .cell-content {\n /* for full-content, the row cells should adjust according to content */\n max-height: none;\n white-space: inherit;\n word-break: inherit;\n }\n\n ${CellIcon} {\n margin-block-start: 0.375rem;\n }\n }\n }\n }\n\n .footer {\n .row {\n .cell {\n padding: 0;\n }\n }\n }\n\n /* stylelint-disable no-duplicate-selectors */\n .row-container {\n position: absolute;\n display: grid;\n width: 100%;\n font-size: ${fontSize.s};\n\n > .group-header-row,\n .hierarchical-group-footer-row {\n height: var(--group-header-height);\n .cell {\n padding: 0;\n border-right-width: 0;\n }\n }\n\n > .hierarchical-group-header-row {\n height: var(--group-header-height);\n }\n input.checkbox-on-hover + label {\n opacity: 0;\n }\n input.checkbox-on-hover:checked + label {\n opacity: 1;\n }\n .row.selected-row {\n background-color: ${selectedRowColor};\n\n > .cell,\n .cell-fixed,\n .cell-action {\n background-color: ${selectedRowColor};\n }\n }\n .row-on-hover:hover {\n background-color: ${lightGreyColor};\n input.checkbox-on-hover + label {\n opacity: 1;\n }\n\n > .cell,\n .cell-fixed,\n .cell-action {\n background-color: ${lightGreyColor};\n }\n }\n .row.hierarchical-group-footer-row {\n .cell-fixed {\n background: ${lightGreyColor};\n }\n }\n }\n\n /* stylelint-enable selector-max-class */\n\n .toolbar-button-applied {\n /* stylelint-disable-next-line unit-allowed-list */\n padding: 0 8px;\n margin: 0 calc(${theme.base.spacing} / 4);\n }\n\n .toolbar-button {\n /* stylelint-disable-next-line unit-allowed-list */\n padding: 0 8px;\n margin: 0 calc(${theme.base.spacing} / 4);\n }\n\n .column-resizer {\n cursor: col-resize;\n position: absolute;\n top: 0;\n right: 0;\n z-index: 3;\n width: 0.25rem;\n height: 100%;\n }\n\n .column-resizer:hover,\n .column-resizer:active {\n background: var(--interactive);\n }\n\n .align-right {\n justify-content: right;\n\n .cell-content {\n text-align: right;\n }\n }\n\n .align-left {\n justify-content: left;\n\n .cell-content {\n text-align: left;\n }\n }\n\n .align-center {\n justify-content: center;\n\n .cell-content {\n text-align: center;\n }\n }\n\n .popper {\n div.row {\n display: flex;\n vertical-align: middle;\n line-height: unset;\n border-bottom: none;\n outline: none 0;\n height: auto;\n }\n }\n `;\n});\n\nexport default StyledTableContainer;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/lists-react",
|
|
3
|
-
"version": "10.0.0-build.5.
|
|
3
|
+
"version": "10.0.0-build.5.11",
|
|
4
4
|
"description": "Repeating view structures such as Table, Gallery(Repeating layouts), Kanban etc.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Pegasystems",
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
"build": "tsc -b tsconfig.build.json"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@pega/cosmos-react-condition-builder": "10.0.0-build.5.
|
|
18
|
-
"@pega/cosmos-react-core": "10.0.0-build.5.
|
|
19
|
-
"@pega/cosmos-react-rte": "10.0.0-build.5.
|
|
17
|
+
"@pega/cosmos-react-condition-builder": "10.0.0-build.5.11",
|
|
18
|
+
"@pega/cosmos-react-core": "10.0.0-build.5.11",
|
|
19
|
+
"@pega/cosmos-react-rte": "10.0.0-build.5.11",
|
|
20
20
|
"@types/lodash-es": "^4.17.12",
|
|
21
21
|
"@types/react": "^17.0.62 || ^18.3.3",
|
|
22
22
|
"@types/react-dom": "^17.0.20 || ^18.3.0",
|
|
23
23
|
"dayjs": "^1.11.13",
|
|
24
24
|
"fast-deep-equal": "^3.1.3",
|
|
25
25
|
"lodash-es": "^4.18.1",
|
|
26
|
-
"pega-repeating-structures-core": "npm:@pega/lists-core@10.0.0-build.5.
|
|
27
|
-
"pega-ui-list-data-apis": "npm:@pega/lists-core-utils@10.0.0-build.5.
|
|
26
|
+
"pega-repeating-structures-core": "npm:@pega/lists-core@10.0.0-build.5.11",
|
|
27
|
+
"pega-ui-list-data-apis": "npm:@pega/lists-core-utils@10.0.0-build.5.11",
|
|
28
28
|
"polished": "^4.1.0",
|
|
29
29
|
"prop-types": "^15.8.1",
|
|
30
30
|
"react": "^17.0.0 || ^18.0.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@testing-library/react": "^16.0.0",
|
|
43
43
|
"@testing-library/user-event": "^14.6.1",
|
|
44
44
|
"jest-axe": "^8.0.0",
|
|
45
|
-
"srs-utils": "10.0.0-build.5.
|
|
45
|
+
"srs-utils": "10.0.0-build.5.11",
|
|
46
46
|
"typescript": "~6.0.3"
|
|
47
47
|
}
|
|
48
48
|
}
|