@digital-ai/dot-components 2.7.2 → 2.7.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.
package/CHANGE_LOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.7.3](https://www.npmjs.com/package/@digital-ai/dot-components) (05/01/2023)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/2.7.2...2.7.3)
|
|
6
|
+
|
|
7
|
+
**Features:**
|
|
8
|
+
|
|
9
|
+
- D-24626: Add startEditable attribute to InlineEdit [\#1466](https://github.com/digital-ai/dot-components/pull/1466) ([jmcnally](https://github.com/jmcnally))
|
|
10
|
+
|
|
11
|
+
**Misc:**
|
|
12
|
+
|
|
13
|
+
- Updates to deprecated github action `set-output` [\#1465](https://github.com/digital-ai/dot-components/pull/1465) ([CWSites](https://github.com/CWSites))
|
|
14
|
+
- remove use of set-output [\#1464](https://github.com/digital-ai/dot-components/pull/1464) ([CWSites](https://github.com/CWSites))
|
|
15
|
+
- S-91985: Improve form input labelling for accessibility [\#1463](https://github.com/digital-ai/dot-components/pull/1463) ([jmcnally](https://github.com/jmcnally))
|
|
16
|
+
|
|
3
17
|
## [2.7.2](https://www.npmjs.com/package/@digital-ai/dot-components) (04/24/2023)
|
|
4
18
|
|
|
5
19
|
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/2.7.1...2.7.2)
|
|
@@ -8,10 +22,6 @@
|
|
|
8
22
|
|
|
9
23
|
- S-92086: `DotDatePicker` improvements [\#1461](https://github.com/digital-ai/dot-components/pull/1461) ([dmiletic85](https://github.com/dmiletic85))
|
|
10
24
|
|
|
11
|
-
**Fixed bugs:**
|
|
12
|
-
|
|
13
|
-
- Issue-1449: Update status pills to have generally lighter backgrounds [\#1456](https://github.com/digital-ai/dot-components/pull/1456) ([jmcnally](https://github.com/jmcnally))
|
|
14
|
-
|
|
15
25
|
## [2.7.1](https://www.npmjs.com/package/@digital-ai/dot-components) (04/20/2023)
|
|
16
26
|
|
|
17
27
|
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/2.7.0...2.7.1)
|
|
@@ -22,6 +32,7 @@
|
|
|
22
32
|
|
|
23
33
|
**Fixed bugs:**
|
|
24
34
|
|
|
35
|
+
- Issue-1449: Update status pills to have generally lighter backgrounds [\#1456](https://github.com/digital-ai/dot-components/pull/1456) ([jmcnally](https://github.com/jmcnally))
|
|
25
36
|
- `DotTimePicker`, `DotDatePicker`: fix issues with controlled and uncontrolled states [\#1454](https://github.com/digital-ai/dot-components/pull/1454) ([dmiletic85](https://github.com/dmiletic85))
|
|
26
37
|
- D-24807: `Demo app` - fix error when starting demo application [\#1451](https://github.com/digital-ai/dot-components/pull/1451) ([dmiletic85](https://github.com/dmiletic85))
|
|
27
38
|
|
|
@@ -481,6 +492,7 @@
|
|
|
481
492
|
|
|
482
493
|
**Features:**
|
|
483
494
|
|
|
495
|
+
- S-84117: As a customer admin, I want the IdP creation flow to be more intuitive, as I find the existing user flow a little overwhelming [\#1185](https://github.com/digital-ai/dot-components/pull/1185) ([ryangamble](https://github.com/ryangamble))
|
|
484
496
|
- S-85256: `Map` component example in demo app [\#1184](https://github.com/digital-ai/dot-components/pull/1184) ([dmiletic85](https://github.com/dmiletic85))
|
|
485
497
|
|
|
486
498
|
**Fixed bugs:**
|
|
@@ -499,7 +511,6 @@
|
|
|
499
511
|
|
|
500
512
|
**Features:**
|
|
501
513
|
|
|
502
|
-
- S-84117: As a customer admin, I want the IdP creation flow to be more intuitive, as I find the existing user flow a little overwhelming [\#1185](https://github.com/digital-ai/dot-components/pull/1185) ([ryangamble](https://github.com/ryangamble))
|
|
503
514
|
- S-85283: `InlineEdit` component should provide a tooltip out the box [\#1181](https://github.com/digital-ai/dot-components/pull/1181) ([dmiletic85](https://github.com/dmiletic85))
|
|
504
515
|
|
|
505
516
|
**Fixed bugs:**
|
|
@@ -575,7 +586,6 @@
|
|
|
575
586
|
- D-20736: Fix text alignment for small DotAvatar [\#1116](https://github.com/digital-ai/dot-components/pull/1116) ([selsemore](https://github.com/selsemore))
|
|
576
587
|
- D-20719: `DotTable`: Checkbox column takes up to much space in a multi-select table [\#1112](https://github.com/digital-ai/dot-components/pull/1112) ([dmiletic85](https://github.com/dmiletic85))
|
|
577
588
|
- D-20660: `DotNavigationRail`: Should be able to update the selected rail [\#1106](https://github.com/digital-ai/dot-components/pull/1106) ([dmiletic85](https://github.com/dmiletic85))
|
|
578
|
-
- D-20511: remove extra period [\#1094](https://github.com/digital-ai/dot-components/pull/1094) ([CWSites](https://github.com/CWSites))
|
|
579
589
|
|
|
580
590
|
## [1.14.0](https://www.npmjs.com/package/@digital-ai/dot-components) (04/01/2022)
|
|
581
591
|
|
|
@@ -619,6 +629,7 @@
|
|
|
619
629
|
|
|
620
630
|
**Fixed bugs:**
|
|
621
631
|
|
|
632
|
+
- D-20511: remove extra period [\#1094](https://github.com/digital-ai/dot-components/pull/1094) ([CWSites](https://github.com/CWSites))
|
|
622
633
|
- D-20463: Change the DotDrawer stories to make drawers not open initially [\#1086](https://github.com/digital-ai/dot-components/pull/1086) ([selsemore](https://github.com/selsemore))
|
|
623
634
|
- D-20418: `DotTable`: Strange scrolling behavior with action menu [\#1082](https://github.com/digital-ai/dot-components/pull/1082) ([dmiletic85](https://github.com/dmiletic85))
|
|
624
635
|
- D-20426: `DotConfirmation `: `title` and `message` prop are not applying correct font family [\#1081](https://github.com/digital-ai/dot-components/pull/1081) ([dmiletic85](https://github.com/dmiletic85))
|
|
@@ -706,6 +717,7 @@
|
|
|
706
717
|
**Fixed bugs:**
|
|
707
718
|
|
|
708
719
|
- D-20004: Fix multiSelect for tables that use onUpdateData callback [\#1005](https://github.com/digital-ai/dot-components/pull/1005) ([selsemore](https://github.com/selsemore))
|
|
720
|
+
- D-19932: `Avatar` tooltip appears in wrong position [\#995](https://github.com/digital-ai/dot-components/pull/995) ([dmiletic85](https://github.com/dmiletic85))
|
|
709
721
|
|
|
710
722
|
**Misc:**
|
|
711
723
|
|
|
@@ -726,7 +738,6 @@
|
|
|
726
738
|
**Fixed bugs:**
|
|
727
739
|
|
|
728
740
|
- D-19944: `Drawer` close icon doesn't have enough padding [\#996](https://github.com/digital-ai/dot-components/pull/996) ([dmiletic85](https://github.com/dmiletic85))
|
|
729
|
-
- D-19932: `Avatar` tooltip appears in wrong position [\#995](https://github.com/digital-ai/dot-components/pull/995) ([dmiletic85](https://github.com/dmiletic85))
|
|
730
741
|
- D-19816: `SplitButton`: `data-testid` is assigned to multiple elements [\#986](https://github.com/digital-ai/dot-components/pull/986) ([dmiletic85](https://github.com/dmiletic85))
|
|
731
742
|
- D-19820: Failing `Table` unit tests on NX major upgrade branch [\#983](https://github.com/digital-ai/dot-components/pull/983) ([dmiletic85](https://github.com/dmiletic85))
|
|
732
743
|
|
|
@@ -1003,6 +1014,7 @@
|
|
|
1003
1014
|
- S-80109: Expose built-in `leaveDelay`, `onClose`, `open` props on `DotTooltip` component [\#786](https://github.com/digital-ai/dot-components/pull/786) ([dmiletic85](https://github.com/dmiletic85))
|
|
1004
1015
|
- S-76907: update ButtonToggle styles, update unit tests and add e2e tests [\#785](https://github.com/digital-ai/dot-components/pull/785) ([CWSites](https://github.com/CWSites))
|
|
1005
1016
|
- S-80048: product wrapper demo [\#782](https://github.com/digital-ai/dot-components/pull/782) ([CWSites](https://github.com/CWSites))
|
|
1017
|
+
- Add submitButtonProps prop to DotJsonSchemaForm component [\#775](https://github.com/digital-ai/dot-components/pull/775) ([selsemore](https://github.com/selsemore))
|
|
1006
1018
|
|
|
1007
1019
|
## [1.3.2](https://www.npmjs.com/package/@digital-ai/dot-components) (11/05/2021)
|
|
1008
1020
|
|
|
@@ -1017,7 +1029,6 @@
|
|
|
1017
1029
|
|
|
1018
1030
|
- Patch release [\#780](https://github.com/digital-ai/dot-components/pull/780) ([TheKeithStewart](https://github.com/TheKeithStewart))
|
|
1019
1031
|
- S-79985: temporarily remove react-jsonschema-form from library [\#776](https://github.com/digital-ai/dot-components/pull/776) ([TheKeithStewart](https://github.com/TheKeithStewart))
|
|
1020
|
-
- Add submitButtonProps prop to DotJsonSchemaForm component [\#775](https://github.com/digital-ai/dot-components/pull/775) ([selsemore](https://github.com/selsemore))
|
|
1021
1032
|
- S-76893: Webpack 4 - update peer dependencies [\#768](https://github.com/digital-ai/dot-components/pull/768) ([CWSites](https://github.com/CWSites))
|
|
1022
1033
|
- S-79957: improve husky [\#765](https://github.com/digital-ai/dot-components/pull/765) ([CWSites](https://github.com/CWSites))
|
|
1023
1034
|
|
package/index.esm.js
CHANGED
|
@@ -4290,6 +4290,9 @@ const getChipsFromAutocomplete = ({
|
|
|
4290
4290
|
};
|
|
4291
4291
|
const checkIfDuplicateItem = (itemText, autocompleteOptions) => autocompleteOptions.some(autocompleteOption => autocompleteOption.title === itemText);
|
|
4292
4292
|
|
|
4293
|
+
function ariaLabelOrAlternates(ariaLabel, label, placeholder) {
|
|
4294
|
+
return ariaLabel || label || placeholder;
|
|
4295
|
+
}
|
|
4293
4296
|
const DEFAULT_ACTION_ITEM_TEXT = 'Add new item';
|
|
4294
4297
|
const DotAutoComplete = ({
|
|
4295
4298
|
ListboxComponent,
|
|
@@ -4582,11 +4585,17 @@ const DotAutoComplete = ({
|
|
|
4582
4585
|
error: _error,
|
|
4583
4586
|
focused: _readOnly ? false : undefined,
|
|
4584
4587
|
helperText: helperText,
|
|
4588
|
+
id: inputId,
|
|
4585
4589
|
inputProps: Object.assign(Object.assign({}, inputProps), {
|
|
4590
|
+
'aria-label': ariaLabelOrAlternates(ariaLabel, label, placeholder),
|
|
4591
|
+
'data-testid': dataTestId && `${dataTestId}-input`,
|
|
4586
4592
|
id: inputId,
|
|
4587
4593
|
className: useStylesWithRootClass(inputProps.className, 'dot-input'),
|
|
4588
4594
|
readOnly: _readOnly
|
|
4589
4595
|
}),
|
|
4596
|
+
InputLabelProps: {
|
|
4597
|
+
htmlFor: inputId
|
|
4598
|
+
},
|
|
4590
4599
|
InputProps: Object.assign(Object.assign({}, params.InputProps), {
|
|
4591
4600
|
endAdornment: !_readOnly ? renderEndAdornment(params.InputProps.endAdornment) : undefined
|
|
4592
4601
|
}),
|
|
@@ -7054,6 +7063,7 @@ const DotInlineEdit = ({
|
|
|
7054
7063
|
onEditStateChange,
|
|
7055
7064
|
readOnly,
|
|
7056
7065
|
selectTextOnEdit,
|
|
7066
|
+
startEditable: _startEditable = false,
|
|
7057
7067
|
tabIndex: _tabIndex = 0,
|
|
7058
7068
|
tooltip,
|
|
7059
7069
|
typography: _typography = 'body1',
|
|
@@ -7065,6 +7075,11 @@ const DotInlineEdit = ({
|
|
|
7065
7075
|
const [inputValue, setInputValue] = useState(_value);
|
|
7066
7076
|
const inputRef = useRef();
|
|
7067
7077
|
const inlineEditRef = useRef();
|
|
7078
|
+
useEffect(() => {
|
|
7079
|
+
if (_startEditable && !readOnly) {
|
|
7080
|
+
enterEditMode();
|
|
7081
|
+
}
|
|
7082
|
+
}, []);
|
|
7068
7083
|
useEffect(() => {
|
|
7069
7084
|
if (_value !== inputValue) {
|
|
7070
7085
|
setInputValue(_value);
|
|
@@ -7077,10 +7092,13 @@ const DotInlineEdit = ({
|
|
|
7077
7092
|
setShowTooltip(visible);
|
|
7078
7093
|
}
|
|
7079
7094
|
};
|
|
7080
|
-
const
|
|
7081
|
-
if (editing) return;
|
|
7095
|
+
const enterEditMode = () => {
|
|
7082
7096
|
setOriginalValue(inputValue);
|
|
7083
7097
|
setEditing(true);
|
|
7098
|
+
};
|
|
7099
|
+
const handleInlineEditClick = () => {
|
|
7100
|
+
if (editing) return;
|
|
7101
|
+
enterEditMode();
|
|
7084
7102
|
if (onEditStateChange) {
|
|
7085
7103
|
onEditStateChange(true);
|
|
7086
7104
|
}
|
|
@@ -7185,7 +7203,7 @@ const DotInlineEdit = ({
|
|
|
7185
7203
|
error: false,
|
|
7186
7204
|
fullWidth: _fullWidth,
|
|
7187
7205
|
inputProps: {
|
|
7188
|
-
'data-testid': dataTestId
|
|
7206
|
+
'data-testid': `${dataTestId}-input`,
|
|
7189
7207
|
className: 'dot-input',
|
|
7190
7208
|
maxLength: charactersLimit === null || charactersLimit === void 0 ? void 0 : charactersLimit.maxLength
|
|
7191
7209
|
},
|
package/index.umd.js
CHANGED
|
@@ -4723,6 +4723,9 @@
|
|
|
4723
4723
|
});
|
|
4724
4724
|
};
|
|
4725
4725
|
|
|
4726
|
+
function ariaLabelOrAlternates(ariaLabel, label, placeholder) {
|
|
4727
|
+
return ariaLabel || label || placeholder;
|
|
4728
|
+
}
|
|
4726
4729
|
var DEFAULT_ACTION_ITEM_TEXT = 'Add new item';
|
|
4727
4730
|
var DotAutoComplete = function DotAutoComplete(_a) {
|
|
4728
4731
|
var ListboxComponent = _a.ListboxComponent,
|
|
@@ -5041,11 +5044,17 @@
|
|
|
5041
5044
|
error: error,
|
|
5042
5045
|
focused: readOnly ? false : undefined,
|
|
5043
5046
|
helperText: helperText,
|
|
5047
|
+
id: inputId,
|
|
5044
5048
|
inputProps: __assign(__assign({}, inputProps), {
|
|
5049
|
+
'aria-label': ariaLabelOrAlternates(ariaLabel, label, placeholder),
|
|
5050
|
+
'data-testid': dataTestId && dataTestId + "-input",
|
|
5045
5051
|
id: inputId,
|
|
5046
5052
|
className: useStylesWithRootClass(inputProps.className, 'dot-input'),
|
|
5047
5053
|
readOnly: readOnly
|
|
5048
5054
|
}),
|
|
5055
|
+
InputLabelProps: {
|
|
5056
|
+
htmlFor: inputId
|
|
5057
|
+
},
|
|
5049
5058
|
InputProps: __assign(__assign({}, params.InputProps), {
|
|
5050
5059
|
endAdornment: !readOnly ? renderEndAdornment(params.InputProps.endAdornment) : undefined
|
|
5051
5060
|
}),
|
|
@@ -7601,27 +7610,34 @@
|
|
|
7601
7610
|
onEditStateChange = _a.onEditStateChange,
|
|
7602
7611
|
readOnly = _a.readOnly,
|
|
7603
7612
|
selectTextOnEdit = _a.selectTextOnEdit,
|
|
7604
|
-
_c = _a.
|
|
7605
|
-
|
|
7613
|
+
_c = _a.startEditable,
|
|
7614
|
+
startEditable = _c === void 0 ? false : _c,
|
|
7615
|
+
_d = _a.tabIndex,
|
|
7616
|
+
tabIndex = _d === void 0 ? 0 : _d,
|
|
7606
7617
|
tooltip = _a.tooltip,
|
|
7607
|
-
|
|
7608
|
-
typography =
|
|
7609
|
-
|
|
7610
|
-
value =
|
|
7611
|
-
var _f = React.useState(false),
|
|
7612
|
-
editing = _f[0],
|
|
7613
|
-
setEditing = _f[1];
|
|
7618
|
+
_e = _a.typography,
|
|
7619
|
+
typography = _e === void 0 ? 'body1' : _e,
|
|
7620
|
+
_f = _a.value,
|
|
7621
|
+
value = _f === void 0 ? '' : _f;
|
|
7614
7622
|
var _g = React.useState(false),
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
var _h = React.useState(
|
|
7618
|
-
|
|
7619
|
-
|
|
7620
|
-
var _j = React.useState(
|
|
7621
|
-
|
|
7622
|
-
|
|
7623
|
+
editing = _g[0],
|
|
7624
|
+
setEditing = _g[1];
|
|
7625
|
+
var _h = React.useState(false),
|
|
7626
|
+
showTooltip = _h[0],
|
|
7627
|
+
setShowTooltip = _h[1];
|
|
7628
|
+
var _j = React.useState(''),
|
|
7629
|
+
originalValue = _j[0],
|
|
7630
|
+
setOriginalValue = _j[1];
|
|
7631
|
+
var _k = React.useState(value),
|
|
7632
|
+
inputValue = _k[0],
|
|
7633
|
+
setInputValue = _k[1];
|
|
7623
7634
|
var inputRef = React.useRef();
|
|
7624
7635
|
var inlineEditRef = React.useRef();
|
|
7636
|
+
React.useEffect(function () {
|
|
7637
|
+
if (startEditable && !readOnly) {
|
|
7638
|
+
enterEditMode();
|
|
7639
|
+
}
|
|
7640
|
+
}, []);
|
|
7625
7641
|
React.useEffect(function () {
|
|
7626
7642
|
if (value !== inputValue) {
|
|
7627
7643
|
setInputValue(value);
|
|
@@ -7634,10 +7650,13 @@
|
|
|
7634
7650
|
setShowTooltip(visible);
|
|
7635
7651
|
}
|
|
7636
7652
|
};
|
|
7637
|
-
var
|
|
7638
|
-
if (editing) return;
|
|
7653
|
+
var enterEditMode = function enterEditMode() {
|
|
7639
7654
|
setOriginalValue(inputValue);
|
|
7640
7655
|
setEditing(true);
|
|
7656
|
+
};
|
|
7657
|
+
var handleInlineEditClick = function handleInlineEditClick() {
|
|
7658
|
+
if (editing) return;
|
|
7659
|
+
enterEditMode();
|
|
7641
7660
|
if (onEditStateChange) {
|
|
7642
7661
|
onEditStateChange(true);
|
|
7643
7662
|
}
|
|
@@ -7787,7 +7806,7 @@
|
|
|
7787
7806
|
error: false,
|
|
7788
7807
|
fullWidth: fullWidth,
|
|
7789
7808
|
inputProps: {
|
|
7790
|
-
'data-testid': dataTestId,
|
|
7809
|
+
'data-testid': dataTestId + "-input",
|
|
7791
7810
|
className: 'dot-input',
|
|
7792
7811
|
maxLength: charactersLimit === null || charactersLimit === void 0 ? void 0 : charactersLimit.maxLength
|
|
7793
7812
|
},
|
|
@@ -20,6 +20,8 @@ export interface InlineEditProps extends CommonProps {
|
|
|
20
20
|
readOnly?: boolean;
|
|
21
21
|
/** If true, when starting edit it will select all text in the input */
|
|
22
22
|
selectTextOnEdit?: boolean;
|
|
23
|
+
/** If true and readOnly is false when component loads, start as editable */
|
|
24
|
+
startEditable?: boolean;
|
|
23
25
|
/** tab order for the inline edit */
|
|
24
26
|
tabIndex?: number;
|
|
25
27
|
/** Tooltip text displayed on hover */
|
|
@@ -32,4 +34,4 @@ export interface InlineEditProps extends CommonProps {
|
|
|
32
34
|
/**
|
|
33
35
|
* @experimental This component is still in development
|
|
34
36
|
*/
|
|
35
|
-
export declare const DotInlineEdit: ({ ariaLabel, bindings, charactersLimit, className, "data-testid": dataTestId, fullWidth, hideActionButtons, name, onChange, onEditStateChange, readOnly, selectTextOnEdit, tabIndex, tooltip, typography, value, }: InlineEditProps) => JSX.Element;
|
|
37
|
+
export declare const DotInlineEdit: ({ ariaLabel, bindings, charactersLimit, className, "data-testid": dataTestId, fullWidth, hideActionButtons, name, onChange, onEditStateChange, readOnly, selectTextOnEdit, startEditable, tabIndex, tooltip, typography, value, }: InlineEditProps) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentMeta, Story } from '@storybook/react';
|
|
2
2
|
import { InlineEditProps } from './InlineEdit';
|
|
3
|
-
declare const _default: ComponentMeta<({ ariaLabel, bindings, charactersLimit, className, "data-testid": dataTestId, fullWidth, hideActionButtons, name, onChange, onEditStateChange, readOnly, selectTextOnEdit, tabIndex, tooltip, typography, value, }: InlineEditProps) => JSX.Element>;
|
|
3
|
+
declare const _default: ComponentMeta<({ ariaLabel, bindings, charactersLimit, className, "data-testid": dataTestId, fullWidth, hideActionButtons, name, onChange, onEditStateChange, readOnly, selectTextOnEdit, startEditable, tabIndex, tooltip, typography, value, }: InlineEditProps) => JSX.Element>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Default: Story<InlineEditProps>;
|
|
6
6
|
export declare const WithCharactersLimit: any;
|
|
@@ -10,6 +10,7 @@ export declare const WithoutActionButtons: any;
|
|
|
10
10
|
export declare const WithTooltip: any;
|
|
11
11
|
export declare const WithSaveError: Story<InlineEditProps>;
|
|
12
12
|
export declare const WithCustomTypography: Story<InlineEditProps>;
|
|
13
|
+
export declare const WithStartEditable: any;
|
|
13
14
|
export declare const WithSingleBinding: any;
|
|
14
15
|
export declare const WithMultipleBindings: Story<InlineEditProps>;
|
|
15
16
|
export declare const WithSelectOnEdit: any;
|