@ni/nimble-components 34.8.0 → 34.8.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/dist/all-components-bundle.js +91 -46
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +2395 -2388
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/anchor/types.js.map +1 -1
- package/dist/esm/banner/index.js.map +1 -1
- package/dist/esm/banner/types.js.map +1 -1
- package/dist/esm/breadcrumb/breadcrumb.foundation.spec.js.map +1 -1
- package/dist/esm/breadcrumb/types.js.map +1 -1
- package/dist/esm/chip/index.js.map +1 -1
- package/dist/esm/chip/types.js.map +1 -1
- package/dist/esm/combobox/models/combobox-form-associated.js.map +1 -1
- package/dist/esm/dialog/index.js +0 -1
- package/dist/esm/dialog/index.js.map +1 -1
- package/dist/esm/drawer/index.js +0 -1
- package/dist/esm/drawer/index.js.map +1 -1
- package/dist/esm/drawer/types.js.map +1 -1
- package/dist/esm/mapping/icon/index.js +1 -1
- package/dist/esm/mapping/icon/index.js.map +1 -1
- package/dist/esm/menu-button/types.js.map +1 -1
- package/dist/esm/number-field/types.js.map +1 -1
- package/dist/esm/patterns/button/types.js.map +1 -1
- package/dist/esm/patterns/dropdown/types.js.map +1 -1
- package/dist/esm/rich-text/editor/index.js.map +1 -1
- package/dist/esm/rich-text/editor/testing/types.js.map +1 -1
- package/dist/esm/rich-text/editor/types.js.map +1 -1
- package/dist/esm/rich-text-mention/base/models/mention-validator.js +2 -2
- package/dist/esm/rich-text-mention/base/models/mention-validator.js.map +1 -1
- package/dist/esm/select/models/select-form-associated.js.map +1 -1
- package/dist/esm/spinner/types.js.map +1 -1
- package/dist/esm/table/components/row/index.js.map +1 -1
- package/dist/esm/table/index.js.map +1 -1
- package/dist/esm/table/types.js.map +1 -1
- package/dist/esm/table-column/base/cell-view/template.js +1 -1
- package/dist/esm/table-column/base/cell-view/template.js.map +1 -1
- package/dist/esm/table-column/base/group-header-view/template.js +1 -1
- package/dist/esm/table-column/base/group-header-view/template.js.map +1 -1
- package/dist/esm/table-column/base/types.js.map +1 -1
- package/dist/esm/table-column/date-text/index.js +1 -1
- package/dist/esm/table-column/date-text/index.js.map +1 -1
- package/dist/esm/table-column/date-text/models/format-helper.js +1 -1
- package/dist/esm/table-column/date-text/models/format-helper.js.map +1 -1
- package/dist/esm/table-column/date-text/types.js.map +1 -1
- package/dist/esm/table-column/enum-base/index.js.map +1 -1
- package/dist/esm/table-column/enum-base/types.js.map +1 -1
- package/dist/esm/table-column/mapping/types.js.map +1 -1
- package/dist/esm/table-column/mixins/custom-sort-order.js +1 -3
- package/dist/esm/table-column/mixins/custom-sort-order.js.map +1 -1
- package/dist/esm/table-column/mixins/fractional-width-column.js +2 -6
- package/dist/esm/table-column/mixins/fractional-width-column.js.map +1 -1
- package/dist/esm/table-column/mixins/groupable-column.js +2 -6
- package/dist/esm/table-column/mixins/groupable-column.js.map +1 -1
- package/dist/esm/table-column/mixins/placeholder.js +1 -3
- package/dist/esm/table-column/mixins/placeholder.js.map +1 -1
- package/dist/esm/table-column/mixins/sortable-column.js +3 -9
- package/dist/esm/table-column/mixins/sortable-column.js.map +1 -1
- package/dist/esm/table-column/number-text/models/number-text-unit-format.js.map +1 -1
- package/dist/esm/table-column/number-text/types.js.map +1 -1
- package/dist/esm/table-column/text/index.js.map +1 -1
- package/dist/esm/table-column/text-base/cell-view/index.js.map +1 -1
- package/dist/esm/table-column/text-base/group-header-view/index.js.map +1 -1
- package/dist/esm/table-column/text-base/index.js +1 -1
- package/dist/esm/table-column/text-base/index.js.map +1 -1
- package/dist/esm/text-area/types.js.map +1 -1
- package/dist/esm/text-field/types.js.map +1 -1
- package/dist/esm/theme-provider/design-token-values.js.map +1 -1
- package/dist/esm/theme-provider/design-tokens.js.map +1 -1
- package/dist/esm/theme-provider/index.js +1 -1
- package/dist/esm/theme-provider/index.js.map +1 -1
- package/dist/esm/tooltip/types.js.map +1 -1
- package/dist/esm/tree-view/types.js.map +1 -1
- package/dist/esm/utilities/unit-format/default-unit-format.js.map +1 -1
- package/dist/esm/wafer-map/types.js.map +1 -1
- package/package.json +6 -13
|
@@ -14992,7 +14992,7 @@
|
|
|
14992
14992
|
new Intl.Locale(value);
|
|
14993
14993
|
return true;
|
|
14994
14994
|
}
|
|
14995
|
-
catch (
|
|
14995
|
+
catch (_e) {
|
|
14996
14996
|
return false;
|
|
14997
14997
|
}
|
|
14998
14998
|
}
|
|
@@ -22273,7 +22273,6 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
22273
22273
|
/**
|
|
22274
22274
|
* A nimble-styled dialog.
|
|
22275
22275
|
*/
|
|
22276
|
-
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
22277
22276
|
class Dialog extends FoundationElement {
|
|
22278
22277
|
constructor() {
|
|
22279
22278
|
super(...arguments);
|
|
@@ -22558,7 +22557,6 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
22558
22557
|
* Drawer control. Shows content in a panel on the left / right side of the screen,
|
|
22559
22558
|
* which animates to be visible with a slide-in / slide-out animation.
|
|
22560
22559
|
*/
|
|
22561
|
-
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
22562
22560
|
class Drawer extends FoundationElement {
|
|
22563
22561
|
constructor() {
|
|
22564
22562
|
super(...arguments);
|
|
@@ -26145,7 +26143,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
26145
26143
|
this.resolvedIcon = undefined;
|
|
26146
26144
|
await customElements.whenDefined(icon);
|
|
26147
26145
|
}
|
|
26148
|
-
catch (
|
|
26146
|
+
catch (_ex) {
|
|
26149
26147
|
// If any error (i.e. invalid custom element name) don't continue
|
|
26150
26148
|
// Don't update the resolvedIcon as it was already set to undefined before async resolution
|
|
26151
26149
|
// (in case other async resolutions were started)
|
|
@@ -35563,17 +35561,20 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
35563
35561
|
}
|
|
35564
35562
|
function findOffsetInText(node, coords) {
|
|
35565
35563
|
let len = node.nodeValue.length;
|
|
35566
|
-
let range = document.createRange();
|
|
35564
|
+
let range = document.createRange(), result;
|
|
35567
35565
|
for (let i = 0; i < len; i++) {
|
|
35568
35566
|
range.setEnd(node, i + 1);
|
|
35569
35567
|
range.setStart(node, i);
|
|
35570
35568
|
let rect = singleRect(range, 1);
|
|
35571
35569
|
if (rect.top == rect.bottom)
|
|
35572
35570
|
continue;
|
|
35573
|
-
if (inRect(coords, rect))
|
|
35574
|
-
|
|
35571
|
+
if (inRect(coords, rect)) {
|
|
35572
|
+
result = { node, offset: i + (coords.left >= (rect.left + rect.right) / 2 ? 1 : 0) };
|
|
35573
|
+
break;
|
|
35574
|
+
}
|
|
35575
35575
|
}
|
|
35576
|
-
|
|
35576
|
+
range.detach();
|
|
35577
|
+
return result || { node, offset: 0 };
|
|
35577
35578
|
}
|
|
35578
35579
|
function inRect(coords, rect) {
|
|
35579
35580
|
return coords.left >= rect.left - 1 && coords.left <= rect.right + 1 &&
|
|
@@ -38666,7 +38667,8 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
38666
38667
|
let { state } = view, $pos = state.selection.$to;
|
|
38667
38668
|
if (state.selection instanceof TextSelection &&
|
|
38668
38669
|
(state.storedMarks ||
|
|
38669
|
-
(!$pos.textOffset && $pos.parentOffset && $pos.nodeBefore.marks.some(m => m.type.spec.inclusive === false))
|
|
38670
|
+
(!$pos.textOffset && $pos.parentOffset && $pos.nodeBefore.marks.some(m => m.type.spec.inclusive === false)) ||
|
|
38671
|
+
chrome && windows$1 && selectionBeforeUneditable(view))) { // Issue #1500
|
|
38670
38672
|
// Need to wrap the cursor in mark nodes different from the ones in the DOM context
|
|
38671
38673
|
view.markCursor = view.state.storedMarks || $pos.marks();
|
|
38672
38674
|
endComposition(view, true);
|
|
@@ -38700,6 +38702,13 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
38700
38702
|
}
|
|
38701
38703
|
scheduleComposeEnd(view, timeoutComposition);
|
|
38702
38704
|
};
|
|
38705
|
+
function selectionBeforeUneditable(view) {
|
|
38706
|
+
let { focusNode, focusOffset } = view.domSelectionRange();
|
|
38707
|
+
if (!focusNode || focusNode.nodeType != 1 || focusOffset >= focusNode.childNodes.length)
|
|
38708
|
+
return false;
|
|
38709
|
+
let next = focusNode.childNodes[focusOffset];
|
|
38710
|
+
return next.nodeType == 1 && next.contentEditable == "false";
|
|
38711
|
+
}
|
|
38703
38712
|
editHandlers.compositionend = (view, event) => {
|
|
38704
38713
|
if (view.composing) {
|
|
38705
38714
|
view.input.composing = false;
|
|
@@ -38927,10 +38936,15 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
38927
38936
|
}, 50);
|
|
38928
38937
|
};
|
|
38929
38938
|
editHandlers.dragover = editHandlers.dragenter = (_, e) => e.preventDefault();
|
|
38930
|
-
editHandlers.drop = (view,
|
|
38931
|
-
|
|
38932
|
-
|
|
38933
|
-
|
|
38939
|
+
editHandlers.drop = (view, event) => {
|
|
38940
|
+
try {
|
|
38941
|
+
handleDrop(view, event, view.dragging);
|
|
38942
|
+
}
|
|
38943
|
+
finally {
|
|
38944
|
+
view.dragging = null;
|
|
38945
|
+
}
|
|
38946
|
+
};
|
|
38947
|
+
function handleDrop(view, event, dragging) {
|
|
38934
38948
|
if (!event.dataTransfer)
|
|
38935
38949
|
return;
|
|
38936
38950
|
let eventPos = view.posAtCoords(eventCoords(event));
|
|
@@ -38984,7 +38998,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
38984
38998
|
}
|
|
38985
38999
|
view.focus();
|
|
38986
39000
|
view.dispatch(tr.setMeta("uiEvent", "drop"));
|
|
38987
|
-
}
|
|
39001
|
+
}
|
|
38988
39002
|
handlers.focus = view => {
|
|
38989
39003
|
view.input.lastFocus = Date.now();
|
|
38990
39004
|
if (!view.focused) {
|
|
@@ -39910,6 +39924,17 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
39910
39924
|
}
|
|
39911
39925
|
}
|
|
39912
39926
|
}
|
|
39927
|
+
else if ((chrome || safari) && added.some(n => n.nodeName == "BR") &&
|
|
39928
|
+
(view.input.lastKeyCode == 8 || view.input.lastKeyCode == 46)) {
|
|
39929
|
+
// Chrome/Safari sometimes insert a bogus break node if you
|
|
39930
|
+
// backspace out the last bit of text before an inline-flex node (#1552)
|
|
39931
|
+
for (let node of added)
|
|
39932
|
+
if (node.nodeName == "BR" && node.parentNode) {
|
|
39933
|
+
let after = node.nextSibling;
|
|
39934
|
+
if (after && after.nodeType == 1 && after.contentEditable == "false")
|
|
39935
|
+
node.parentNode.removeChild(node);
|
|
39936
|
+
}
|
|
39937
|
+
}
|
|
39913
39938
|
let readSel = null;
|
|
39914
39939
|
// If it looks like the browser has reset the selection to the
|
|
39915
39940
|
// start of the document after focus, restore the selection from
|
|
@@ -43181,6 +43206,37 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
43181
43206
|
return value instanceof NodeSelection;
|
|
43182
43207
|
}
|
|
43183
43208
|
|
|
43209
|
+
// src/helpers/MappablePosition.ts
|
|
43210
|
+
var MappablePosition = class _MappablePosition {
|
|
43211
|
+
constructor(position) {
|
|
43212
|
+
this.position = position;
|
|
43213
|
+
}
|
|
43214
|
+
/**
|
|
43215
|
+
* Creates a MappablePosition from a JSON object.
|
|
43216
|
+
*/
|
|
43217
|
+
static fromJSON(json) {
|
|
43218
|
+
return new _MappablePosition(json.position);
|
|
43219
|
+
}
|
|
43220
|
+
/**
|
|
43221
|
+
* Converts the MappablePosition to a JSON object.
|
|
43222
|
+
*/
|
|
43223
|
+
toJSON() {
|
|
43224
|
+
return {
|
|
43225
|
+
position: this.position
|
|
43226
|
+
};
|
|
43227
|
+
}
|
|
43228
|
+
};
|
|
43229
|
+
function getUpdatedPosition(position, transaction) {
|
|
43230
|
+
const mapResult = transaction.mapping.mapResult(position.position);
|
|
43231
|
+
return {
|
|
43232
|
+
position: new MappablePosition(mapResult.pos),
|
|
43233
|
+
mapResult
|
|
43234
|
+
};
|
|
43235
|
+
}
|
|
43236
|
+
function createMappablePosition(position) {
|
|
43237
|
+
return new MappablePosition(position);
|
|
43238
|
+
}
|
|
43239
|
+
|
|
43184
43240
|
// src/commands/setMark.ts
|
|
43185
43241
|
function canSetMark(state, tr, newMarkType) {
|
|
43186
43242
|
var _a;
|
|
@@ -45369,6 +45425,13 @@ img.ProseMirror-separator {
|
|
|
45369
45425
|
};
|
|
45370
45426
|
this.isCapturingTransaction = false;
|
|
45371
45427
|
this.capturedTransaction = null;
|
|
45428
|
+
/**
|
|
45429
|
+
* Returns a set of utilities for working with positions and ranges.
|
|
45430
|
+
*/
|
|
45431
|
+
this.utils = {
|
|
45432
|
+
getUpdatedPosition,
|
|
45433
|
+
createMappablePosition
|
|
45434
|
+
};
|
|
45372
45435
|
this.setOptions(options);
|
|
45373
45436
|
this.createExtensionManager();
|
|
45374
45437
|
this.createCommandManager();
|
|
@@ -68777,7 +68840,7 @@ ${nextLine.slice(indentLevel + 2)}`;
|
|
|
68777
68840
|
try {
|
|
68778
68841
|
instance = document.createElement(groupHeaderViewTag);
|
|
68779
68842
|
}
|
|
68780
|
-
catch (
|
|
68843
|
+
catch (_ex) {
|
|
68781
68844
|
// Swallow construction error to report a better one
|
|
68782
68845
|
}
|
|
68783
68846
|
if (!(instance instanceof TableGroupHeaderView)) {
|
|
@@ -68863,7 +68926,7 @@ ${nextLine.slice(indentLevel + 2)}`;
|
|
|
68863
68926
|
try {
|
|
68864
68927
|
instance = document.createElement(cellViewTag);
|
|
68865
68928
|
}
|
|
68866
|
-
catch (
|
|
68929
|
+
catch (_ex) {
|
|
68867
68930
|
// Swallow construction error to report a better one
|
|
68868
68931
|
}
|
|
68869
68932
|
if (!(instance instanceof TableCellView)) {
|
|
@@ -74706,12 +74769,8 @@ focus outline in that case.
|
|
|
74706
74769
|
this.columnInternals.minPixelWidth = this.minPixelWidth ?? defaultMinPixelWidth;
|
|
74707
74770
|
}
|
|
74708
74771
|
}
|
|
74709
|
-
attr({ attribute: 'fractional-width', converter: nullableNumberConverter })(
|
|
74710
|
-
|
|
74711
|
-
FractionalWidthColumn.prototype, 'fractionalWidth');
|
|
74712
|
-
attr({ attribute: 'min-pixel-width', converter: nullableNumberConverter })(
|
|
74713
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
74714
|
-
FractionalWidthColumn.prototype, 'minPixelWidth');
|
|
74772
|
+
attr({ attribute: 'fractional-width', converter: nullableNumberConverter })(FractionalWidthColumn.prototype, 'fractionalWidth');
|
|
74773
|
+
attr({ attribute: 'min-pixel-width', converter: nullableNumberConverter })(FractionalWidthColumn.prototype, 'minPixelWidth');
|
|
74715
74774
|
return FractionalWidthColumn;
|
|
74716
74775
|
}
|
|
74717
74776
|
|
|
@@ -74734,12 +74793,8 @@ focus outline in that case.
|
|
|
74734
74793
|
this.columnInternals.groupIndex = this.groupIndex ?? undefined;
|
|
74735
74794
|
}
|
|
74736
74795
|
}
|
|
74737
|
-
attr({ attribute: 'grouping-disabled', mode: 'boolean' })(
|
|
74738
|
-
|
|
74739
|
-
GroupableColumn.prototype, 'groupingDisabled');
|
|
74740
|
-
attr({ attribute: 'group-index', converter: nullableNumberConverter })(
|
|
74741
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
74742
|
-
GroupableColumn.prototype, 'groupIndex');
|
|
74796
|
+
attr({ attribute: 'grouping-disabled', mode: 'boolean' })(GroupableColumn.prototype, 'groupingDisabled');
|
|
74797
|
+
attr({ attribute: 'group-index', converter: nullableNumberConverter })(GroupableColumn.prototype, 'groupIndex');
|
|
74743
74798
|
return GroupableColumn;
|
|
74744
74799
|
}
|
|
74745
74800
|
|
|
@@ -74752,9 +74807,7 @@ focus outline in that case.
|
|
|
74752
74807
|
*/
|
|
74753
74808
|
class ColumnWithPlaceholder extends base {
|
|
74754
74809
|
}
|
|
74755
|
-
attr({ attribute: 'placeholder' })(
|
|
74756
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
74757
|
-
ColumnWithPlaceholder.prototype, 'placeholder');
|
|
74810
|
+
attr({ attribute: 'placeholder' })(ColumnWithPlaceholder.prototype, 'placeholder');
|
|
74758
74811
|
return ColumnWithPlaceholder;
|
|
74759
74812
|
}
|
|
74760
74813
|
|
|
@@ -75038,15 +75091,9 @@ focus outline in that case.
|
|
|
75038
75091
|
}
|
|
75039
75092
|
}
|
|
75040
75093
|
}
|
|
75041
|
-
attr({ attribute: 'sorting-disabled', mode: 'boolean' })(
|
|
75042
|
-
|
|
75043
|
-
SortableColumn.prototype, '
|
|
75044
|
-
attr({ attribute: 'sort-index', converter: nullableNumberConverter })(
|
|
75045
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
75046
|
-
SortableColumn.prototype, 'sortIndex');
|
|
75047
|
-
attr({ attribute: 'sort-direction' })(
|
|
75048
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
75049
|
-
SortableColumn.prototype, 'sortDirection');
|
|
75094
|
+
attr({ attribute: 'sorting-disabled', mode: 'boolean' })(SortableColumn.prototype, 'sortingDisabled');
|
|
75095
|
+
attr({ attribute: 'sort-index', converter: nullableNumberConverter })(SortableColumn.prototype, 'sortIndex');
|
|
75096
|
+
attr({ attribute: 'sort-direction' })(SortableColumn.prototype, 'sortDirection');
|
|
75050
75097
|
return SortableColumn;
|
|
75051
75098
|
}
|
|
75052
75099
|
|
|
@@ -75108,9 +75155,7 @@ focus outline in that case.
|
|
|
75108
75155
|
}
|
|
75109
75156
|
}
|
|
75110
75157
|
}
|
|
75111
|
-
attr({ attribute: 'sort-by-field-name' })(
|
|
75112
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
75113
|
-
CustomSortOrderColumn.prototype, 'sortByFieldName');
|
|
75158
|
+
attr({ attribute: 'sort-by-field-name' })(CustomSortOrderColumn.prototype, 'sortByFieldName');
|
|
75114
75159
|
return CustomSortOrderColumn;
|
|
75115
75160
|
}
|
|
75116
75161
|
|
|
@@ -75264,7 +75309,7 @@ focus outline in that case.
|
|
|
75264
75309
|
__decorate([
|
|
75265
75310
|
attr({ attribute: 'field-name' })
|
|
75266
75311
|
], TableColumnTextBase.prototype, "fieldName", void 0);
|
|
75267
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type
|
|
75312
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type
|
|
75268
75313
|
function mixinTextBase(base) {
|
|
75269
75314
|
return mixinGroupableColumnAPI(mixinFractionalWidthColumnAPI(mixinColumnWithPlaceholderAPI(mixinSortableColumnAPI(base))));
|
|
75270
75315
|
}
|
|
@@ -75274,7 +75319,7 @@ focus outline in that case.
|
|
|
75274
75319
|
try {
|
|
75275
75320
|
return formatter.format(date);
|
|
75276
75321
|
}
|
|
75277
|
-
catch (
|
|
75322
|
+
catch (_e) {
|
|
75278
75323
|
return '';
|
|
75279
75324
|
}
|
|
75280
75325
|
}
|
|
@@ -75589,7 +75634,7 @@ focus outline in that case.
|
|
|
75589
75634
|
try {
|
|
75590
75635
|
return new Intl.DateTimeFormat(lang.getValueFor(this), options);
|
|
75591
75636
|
}
|
|
75592
|
-
catch (
|
|
75637
|
+
catch (_e) {
|
|
75593
75638
|
return undefined;
|
|
75594
75639
|
}
|
|
75595
75640
|
}
|