@ni/spright-components 6.21.4 → 6.21.6
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 +69 -10
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +16 -13
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/custom-elements.json +6 -7
- package/dist/esm/chat/input/index.d.ts +1 -1
- package/dist/esm/chat/input/index.js +2 -2
- package/dist/esm/chat/input/index.js.map +1 -1
- package/package.json +6 -5
|
@@ -121,6 +121,50 @@
|
|
|
121
121
|
if ($global.trustedTypes === void 0) {
|
|
122
122
|
$global.trustedTypes = { createPolicy: (n, r) => r };
|
|
123
123
|
}
|
|
124
|
+
// Shims of globals for SSR environments that load client code in the server module graph
|
|
125
|
+
// Shim only what is not defined in-case SSR env is loading their own polyfills (which would need to be loaded first).
|
|
126
|
+
for (const name of [
|
|
127
|
+
"Node",
|
|
128
|
+
"Element",
|
|
129
|
+
"HTMLElement",
|
|
130
|
+
"ShadowRoot",
|
|
131
|
+
"Event",
|
|
132
|
+
"CustomEvent",
|
|
133
|
+
"MutationObserver",
|
|
134
|
+
"ResizeObserver",
|
|
135
|
+
"IntersectionObserver",
|
|
136
|
+
"CSSStyleSheet"
|
|
137
|
+
]) {
|
|
138
|
+
if (typeof ($global[name]) === "undefined") {
|
|
139
|
+
$global[name] = class {
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
// Minimal custom elements registry for the react wrapper to leverage for tag names
|
|
144
|
+
if (typeof ($global.customElements) === "undefined") {
|
|
145
|
+
const constructorsByName = new Map();
|
|
146
|
+
const namesByConstructor = new Map();
|
|
147
|
+
$global.customElements = {
|
|
148
|
+
define(name, constructor) {
|
|
149
|
+
if (!constructorsByName.has(name)) {
|
|
150
|
+
constructorsByName.set(name, constructor);
|
|
151
|
+
namesByConstructor.set(constructor, name);
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
get(name) {
|
|
155
|
+
return constructorsByName.get(name);
|
|
156
|
+
},
|
|
157
|
+
getName(constructor) {
|
|
158
|
+
return namesByConstructor.get(constructor) ?? null;
|
|
159
|
+
},
|
|
160
|
+
whenDefined() {
|
|
161
|
+
return Promise.resolve();
|
|
162
|
+
},
|
|
163
|
+
upgrade() {
|
|
164
|
+
// no-op
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
}
|
|
124
168
|
const propConfig = {
|
|
125
169
|
configurable: false,
|
|
126
170
|
enumerable: false,
|
|
@@ -250,7 +294,9 @@
|
|
|
250
294
|
/**
|
|
251
295
|
* Indicates whether the DOM supports the adoptedStyleSheets feature.
|
|
252
296
|
*/
|
|
253
|
-
supportsAdoptedStyleSheets:
|
|
297
|
+
supportsAdoptedStyleSheets: typeof document !== "undefined" &&
|
|
298
|
+
typeof CSSStyleSheet !== "undefined" &&
|
|
299
|
+
Array.isArray(document.adoptedStyleSheets) &&
|
|
254
300
|
"replace" in CSSStyleSheet.prototype,
|
|
255
301
|
/**
|
|
256
302
|
* Sets the HTML trusted types policy used by the templating engine.
|
|
@@ -6913,7 +6959,8 @@
|
|
|
6913
6959
|
/**
|
|
6914
6960
|
* @alpha
|
|
6915
6961
|
*/
|
|
6916
|
-
const supportsElementInternals =
|
|
6962
|
+
const supportsElementInternals = typeof window !== "undefined" &&
|
|
6963
|
+
ElementInternalsKey in window &&
|
|
6917
6964
|
"setFormValue" in window[ElementInternalsKey].prototype;
|
|
6918
6965
|
const InternalsMap = new WeakMap();
|
|
6919
6966
|
/**
|
|
@@ -9021,7 +9068,7 @@
|
|
|
9021
9068
|
return false;
|
|
9022
9069
|
}
|
|
9023
9070
|
|
|
9024
|
-
const defaultElement = document.createElement("div");
|
|
9071
|
+
const defaultElement = typeof document === "undefined" ? {} : document.createElement("div");
|
|
9025
9072
|
function isFastElement(element) {
|
|
9026
9073
|
return element instanceof FASTElement;
|
|
9027
9074
|
}
|
|
@@ -9195,7 +9242,7 @@
|
|
|
9195
9242
|
* @param root - the root to normalize
|
|
9196
9243
|
*/
|
|
9197
9244
|
static normalizeRoot(root) {
|
|
9198
|
-
return root === defaultElement ? document : root;
|
|
9245
|
+
return (root === defaultElement && typeof document !== "undefined") ? document : root;
|
|
9199
9246
|
}
|
|
9200
9247
|
}
|
|
9201
9248
|
// Caches PropertyTarget instances
|
|
@@ -9212,6 +9259,12 @@
|
|
|
9212
9259
|
*/
|
|
9213
9260
|
const PropertyTargetManager = Object.freeze({
|
|
9214
9261
|
getOrCreate(source) {
|
|
9262
|
+
if (typeof document === "undefined") {
|
|
9263
|
+
return {
|
|
9264
|
+
setProperty() { },
|
|
9265
|
+
removeProperty() { },
|
|
9266
|
+
};
|
|
9267
|
+
}
|
|
9215
9268
|
if (propertyTargetCache.has(source)) {
|
|
9216
9269
|
/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */
|
|
9217
9270
|
return propertyTargetCache.get(source);
|
|
@@ -14922,7 +14975,10 @@
|
|
|
14922
14975
|
*/
|
|
14923
14976
|
class DocumentElementLang {
|
|
14924
14977
|
constructor() {
|
|
14925
|
-
this.lang = document.documentElement.lang;
|
|
14978
|
+
this.lang = typeof document === 'undefined' ? '' : document.documentElement.lang;
|
|
14979
|
+
if (typeof document === 'undefined') {
|
|
14980
|
+
return;
|
|
14981
|
+
}
|
|
14926
14982
|
const observer = new MutationObserver(mutations => {
|
|
14927
14983
|
for (const mutation of mutations) {
|
|
14928
14984
|
if (mutation.type === 'attributes'
|
|
@@ -70329,9 +70385,6 @@ img.ProseMirror-separator {
|
|
|
70329
70385
|
--ni-private-switch-indicator-size: 24px;
|
|
70330
70386
|
--ni-private-switch-indicator-inner-size: 18px;
|
|
70331
70387
|
--ni-private-switch-indicator-margin: -2px;
|
|
70332
|
-
padding-bottom: calc(
|
|
70333
|
-
${controlHeight} - var(--ni-private-switch-height)
|
|
70334
|
-
);
|
|
70335
70388
|
}
|
|
70336
70389
|
|
|
70337
70390
|
:host([disabled]) {
|
|
@@ -70356,6 +70409,12 @@ img.ProseMirror-separator {
|
|
|
70356
70409
|
.switch-container {
|
|
70357
70410
|
display: flex;
|
|
70358
70411
|
align-items: center;
|
|
70412
|
+
${'' /*
|
|
70413
|
+
Reserve space around the 24px control to fill a 32px height until we have a switch 32 design.
|
|
70414
|
+
See: https://github.com/ni/nimble/issues/3013
|
|
70415
|
+
*/}
|
|
70416
|
+
padding-top: 2px;
|
|
70417
|
+
padding-bottom: 6px;
|
|
70359
70418
|
}
|
|
70360
70419
|
|
|
70361
70420
|
slot[name='unchecked-message']::slotted(*) {
|
|
@@ -103160,6 +103219,7 @@ focus outline in that case.
|
|
|
103160
103219
|
/** @internal */
|
|
103161
103220
|
this.attachmentsIsEmpty = true;
|
|
103162
103221
|
this.updateScrollbarWidthQueued = false;
|
|
103222
|
+
this.fieldSizingSupported = CSS.supports('field-sizing', 'content');
|
|
103163
103223
|
}
|
|
103164
103224
|
slottedFooterActionsElementsChanged(_prev, next) {
|
|
103165
103225
|
this.footerActionsIsEmpty = next === undefined || next.length === 0;
|
|
@@ -103281,7 +103341,7 @@ focus outline in that case.
|
|
|
103281
103341
|
// Workaround for browsers that do not support the CSS property `field-sizing: content`
|
|
103282
103342
|
// See https://github.com/ni/nimble/issues/2902
|
|
103283
103343
|
adjustTextAreaHeight() {
|
|
103284
|
-
if (
|
|
103344
|
+
if (this.fieldSizingSupported || !this.textArea) {
|
|
103285
103345
|
return;
|
|
103286
103346
|
}
|
|
103287
103347
|
const textArea = this.textArea;
|
|
@@ -103293,7 +103353,6 @@ focus outline in that case.
|
|
|
103293
103353
|
this.scrollbarWidth = this.textArea.offsetWidth - this.textArea.clientWidth;
|
|
103294
103354
|
}
|
|
103295
103355
|
}
|
|
103296
|
-
ChatInput.fieldSizingSupported = CSS.supports('field-sizing', 'content');
|
|
103297
103356
|
__decorate([
|
|
103298
103357
|
attr
|
|
103299
103358
|
], ChatInput.prototype, "placeholder", void 0);
|