@ni/spright-components 6.21.4 → 6.21.5
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 +63 -7
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +13 -10
- 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'
|
|
@@ -103160,6 +103216,7 @@ focus outline in that case.
|
|
|
103160
103216
|
/** @internal */
|
|
103161
103217
|
this.attachmentsIsEmpty = true;
|
|
103162
103218
|
this.updateScrollbarWidthQueued = false;
|
|
103219
|
+
this.fieldSizingSupported = CSS.supports('field-sizing', 'content');
|
|
103163
103220
|
}
|
|
103164
103221
|
slottedFooterActionsElementsChanged(_prev, next) {
|
|
103165
103222
|
this.footerActionsIsEmpty = next === undefined || next.length === 0;
|
|
@@ -103281,7 +103338,7 @@ focus outline in that case.
|
|
|
103281
103338
|
// Workaround for browsers that do not support the CSS property `field-sizing: content`
|
|
103282
103339
|
// See https://github.com/ni/nimble/issues/2902
|
|
103283
103340
|
adjustTextAreaHeight() {
|
|
103284
|
-
if (
|
|
103341
|
+
if (this.fieldSizingSupported || !this.textArea) {
|
|
103285
103342
|
return;
|
|
103286
103343
|
}
|
|
103287
103344
|
const textArea = this.textArea;
|
|
@@ -103293,7 +103350,6 @@ focus outline in that case.
|
|
|
103293
103350
|
this.scrollbarWidth = this.textArea.offsetWidth - this.textArea.clientWidth;
|
|
103294
103351
|
}
|
|
103295
103352
|
}
|
|
103296
|
-
ChatInput.fieldSizingSupported = CSS.supports('field-sizing', 'content');
|
|
103297
103353
|
__decorate([
|
|
103298
103354
|
attr
|
|
103299
103355
|
], ChatInput.prototype, "placeholder", void 0);
|