@vonage/vivid 5.7.0 → 5.9.0
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/bundled/data-grid.options.cjs +1 -0
- package/bundled/data-grid.options.js +29 -0
- package/bundled/definition19.cjs +3 -4
- package/bundled/definition19.js +35 -52
- package/bundled/definition2.cjs +1 -1
- package/bundled/definition2.js +1 -1
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +1 -1
- package/bundled/definition8.cjs +1 -1
- package/bundled/definition8.js +1 -1
- package/bundled/definition9.cjs +9 -9
- package/bundled/definition9.js +113 -1342
- package/bundled/feature.cjs +4 -0
- package/bundled/feature.js +2886 -0
- package/bundled/floating-ui.dom.cjs +1 -0
- package/bundled/floating-ui.dom.js +1242 -0
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +49 -22
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +15 -13
- package/bundled/vivid-element.cjs +3 -3
- package/bundled/vivid-element.js +89 -69
- package/checkbox/definition.cjs +1 -1
- package/checkbox/definition.js +1 -1
- package/combobox/definition.cjs +14 -15
- package/combobox/definition.js +15 -16
- package/combobox/index.cjs +4 -4
- package/combobox/index.js +82 -87
- package/contextual-help/definition.cjs +1 -0
- package/contextual-help/definition.js +1 -1
- package/custom-elements.json +5145 -3781
- package/data-grid/definition.cjs +23 -49
- package/data-grid/definition.js +1 -27
- package/data-grid/index.cjs +27 -27
- package/data-grid/index.js +44 -64
- package/data-table/definition.cjs +204 -0
- package/data-table/definition.js +188 -0
- package/data-table/index.cjs +37 -0
- package/data-table/index.js +143 -0
- package/file-picker/definition.cjs +10 -8
- package/file-picker/definition.js +10 -8
- package/file-picker/index.cjs +5 -5
- package/file-picker/index.js +12 -12
- package/icon/definition.cjs +1 -1
- package/icon/definition.js +1 -1
- package/index.cjs +26 -0
- package/index.js +4 -0
- package/lib/components.d.ts +4 -0
- package/lib/contextual-help/definition.d.ts +2 -0
- package/lib/data-table/definition.d.ts +8 -0
- package/lib/data-table/table-body.d.ts +3 -0
- package/lib/data-table/table-body.template.d.ts +3 -0
- package/lib/data-table/table-cell.d.ts +381 -0
- package/lib/data-table/table-cell.template.d.ts +3 -0
- package/lib/data-table/table-head.d.ts +3 -0
- package/lib/data-table/table-head.template.d.ts +3 -0
- package/lib/data-table/table-header-cell.d.ts +381 -0
- package/lib/data-table/table-header-cell.template.d.ts +3 -0
- package/lib/data-table/table-row.d.ts +381 -0
- package/lib/data-table/table-row.template.d.ts +3 -0
- package/lib/data-table/table.d.ts +3 -0
- package/lib/data-table/table.template.d.ts +3 -0
- package/lib/popover/definition.d.ts +4 -0
- package/lib/popover/locale.d.ts +3 -0
- package/lib/popover/popover.d.ts +781 -0
- package/lib/popover/popover.template.d.ts +3 -0
- package/lib/rich-text-editor/locale.d.ts +0 -1
- package/lib/rich-text-editor/rte/config.d.ts +3 -0
- package/lib/rich-text-editor/rte/document.d.ts +2 -0
- package/lib/rich-text-editor/rte/exports.d.ts +1 -0
- package/lib/rich-text-editor/rte/view.d.ts +30 -0
- package/lib/rich-text-view/definition.d.ts +4 -0
- package/lib/rich-text-view/rich-text-view.d.ts +15 -0
- package/lib/rich-text-view/rich-text-view.template.d.ts +3 -0
- package/lib/tag-name-map.d.ts +10 -1
- package/locales/de-DE.cjs +3 -1
- package/locales/de-DE.js +3 -1
- package/locales/en-GB.cjs +3 -1
- package/locales/en-GB.js +3 -1
- package/locales/en-US.cjs +3 -1
- package/locales/en-US.js +3 -1
- package/locales/ja-JP.cjs +3 -1
- package/locales/ja-JP.js +3 -1
- package/locales/zh-CN.cjs +3 -1
- package/locales/zh-CN.js +3 -1
- package/package.json +8 -12
- package/popover/definition.cjs +363 -0
- package/popover/definition.js +357 -0
- package/popover/index.cjs +27 -0
- package/popover/index.js +263 -0
- package/rich-text-editor/definition.cjs +328 -3882
- package/rich-text-editor/definition.js +143 -3697
- package/rich-text-editor/index.cjs +12 -15
- package/rich-text-editor/index.js +3489 -6291
- package/rich-text-view/definition.cjs +159 -0
- package/rich-text-view/definition.js +153 -0
- package/rich-text-view/index.cjs +1 -0
- package/rich-text-view/index.js +95 -0
- package/select/definition.cjs +27 -15
- package/select/definition.js +27 -15
- package/shared/foundation/listbox/listbox.d.ts +0 -1
- package/shared/localization/Locale.d.ts +2 -0
- package/tag/definition.cjs +1 -1
- package/tag/definition.js +1 -1
- package/tag/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/unbundled/_commonjsHelpers.cjs +26 -0
- package/unbundled/_commonjsHelpers.js +26 -1
- package/unbundled/data-grid.options.cjs +34 -0
- package/unbundled/data-grid.options.js +28 -0
- package/unbundled/definition.cjs +1 -1
- package/unbundled/definition.js +1 -1
- package/unbundled/feature.cjs +3678 -0
- package/unbundled/feature.js +3662 -0
- package/unbundled/listbox.cjs +29 -2
- package/unbundled/listbox.js +29 -2
- package/unbundled/vivid-element.cjs +1 -1
- package/unbundled/vivid-element.js +1 -1
- package/video-player/definition.cjs +11 -1
- package/video-player/definition.js +12 -2
- package/video-player/index.cjs +30 -30
- package/video-player/index.js +705 -702
- package/vivid.api.json +1478 -39
package/unbundled/listbox.cjs
CHANGED
|
@@ -159,6 +159,13 @@ const _Listbox = class _Listbox extends vividElement.VividElement {
|
|
|
159
159
|
const re = new RegExp(`^${pattern}`, "gi");
|
|
160
160
|
return this.options.filter((o) => o.text.trim().match(re));
|
|
161
161
|
}
|
|
162
|
+
/**
|
|
163
|
+
* Finds the index of the next non-disabled option starting from the given index.
|
|
164
|
+
*
|
|
165
|
+
* @param fromIndex - The index to start searching from (inclusive)
|
|
166
|
+
* @returns The index of the next selectable option, or -1 if none found
|
|
167
|
+
* @internal
|
|
168
|
+
*/
|
|
162
169
|
getNextSelectableIndex(fromIndex) {
|
|
163
170
|
const nextSelectableOption = this.options.reduce(
|
|
164
171
|
(nextSelectableOption2, thisOption, index) => !nextSelectableOption2 && !thisOption.disabled && index >= fromIndex ? thisOption : nextSelectableOption2,
|
|
@@ -166,6 +173,20 @@ const _Listbox = class _Listbox extends vividElement.VividElement {
|
|
|
166
173
|
);
|
|
167
174
|
return this.options.indexOf(nextSelectableOption);
|
|
168
175
|
}
|
|
176
|
+
/**
|
|
177
|
+
* Finds the index of the previous non-disabled option starting from the given index.
|
|
178
|
+
*
|
|
179
|
+
* @param fromIndex - The index to start searching from (inclusive)
|
|
180
|
+
* @returns The index of the previous selectable option, or -1 if none found
|
|
181
|
+
* @internal
|
|
182
|
+
*/
|
|
183
|
+
getPreviousSelectableIndex(fromIndex) {
|
|
184
|
+
const previousSelectableOption = this.options.reduceRight(
|
|
185
|
+
(previousSelectableOption2, thisOption, index) => !previousSelectableOption2 && !thisOption.disabled && index <= fromIndex ? thisOption : previousSelectableOption2,
|
|
186
|
+
null
|
|
187
|
+
);
|
|
188
|
+
return this.options.indexOf(previousSelectableOption);
|
|
189
|
+
}
|
|
169
190
|
/**
|
|
170
191
|
* Handles external changes to child options.
|
|
171
192
|
*
|
|
@@ -344,7 +365,10 @@ const _Listbox = class _Listbox extends vividElement.VividElement {
|
|
|
344
365
|
selectNextOption() {
|
|
345
366
|
/* v8 ignore else -- @preserve */
|
|
346
367
|
if (!this.disabled && this.selectedIndex < this.options.length - 1) {
|
|
347
|
-
this.selectedIndex
|
|
368
|
+
const nextIndex = this.getNextSelectableIndex(this.selectedIndex + 1);
|
|
369
|
+
if (nextIndex !== -1) {
|
|
370
|
+
this.selectedIndex = nextIndex;
|
|
371
|
+
}
|
|
348
372
|
}
|
|
349
373
|
}
|
|
350
374
|
/**
|
|
@@ -355,7 +379,10 @@ const _Listbox = class _Listbox extends vividElement.VividElement {
|
|
|
355
379
|
selectPreviousOption() {
|
|
356
380
|
/* v8 ignore else -- @preserve */
|
|
357
381
|
if (!this.disabled && this.selectedIndex > 0) {
|
|
358
|
-
|
|
382
|
+
const prevIndex = this.getPreviousSelectableIndex(this.selectedIndex - 1);
|
|
383
|
+
if (prevIndex !== -1) {
|
|
384
|
+
this.selectedIndex = prevIndex;
|
|
385
|
+
}
|
|
359
386
|
}
|
|
360
387
|
}
|
|
361
388
|
/// For this options change, determine if selectedIndex should change based on defaultSelected. Otherwise, returns null.
|
package/unbundled/listbox.js
CHANGED
|
@@ -157,6 +157,13 @@ const _Listbox = class _Listbox extends VividElement {
|
|
|
157
157
|
const re = new RegExp(`^${pattern}`, "gi");
|
|
158
158
|
return this.options.filter((o) => o.text.trim().match(re));
|
|
159
159
|
}
|
|
160
|
+
/**
|
|
161
|
+
* Finds the index of the next non-disabled option starting from the given index.
|
|
162
|
+
*
|
|
163
|
+
* @param fromIndex - The index to start searching from (inclusive)
|
|
164
|
+
* @returns The index of the next selectable option, or -1 if none found
|
|
165
|
+
* @internal
|
|
166
|
+
*/
|
|
160
167
|
getNextSelectableIndex(fromIndex) {
|
|
161
168
|
const nextSelectableOption = this.options.reduce(
|
|
162
169
|
(nextSelectableOption2, thisOption, index) => !nextSelectableOption2 && !thisOption.disabled && index >= fromIndex ? thisOption : nextSelectableOption2,
|
|
@@ -164,6 +171,20 @@ const _Listbox = class _Listbox extends VividElement {
|
|
|
164
171
|
);
|
|
165
172
|
return this.options.indexOf(nextSelectableOption);
|
|
166
173
|
}
|
|
174
|
+
/**
|
|
175
|
+
* Finds the index of the previous non-disabled option starting from the given index.
|
|
176
|
+
*
|
|
177
|
+
* @param fromIndex - The index to start searching from (inclusive)
|
|
178
|
+
* @returns The index of the previous selectable option, or -1 if none found
|
|
179
|
+
* @internal
|
|
180
|
+
*/
|
|
181
|
+
getPreviousSelectableIndex(fromIndex) {
|
|
182
|
+
const previousSelectableOption = this.options.reduceRight(
|
|
183
|
+
(previousSelectableOption2, thisOption, index) => !previousSelectableOption2 && !thisOption.disabled && index <= fromIndex ? thisOption : previousSelectableOption2,
|
|
184
|
+
null
|
|
185
|
+
);
|
|
186
|
+
return this.options.indexOf(previousSelectableOption);
|
|
187
|
+
}
|
|
167
188
|
/**
|
|
168
189
|
* Handles external changes to child options.
|
|
169
190
|
*
|
|
@@ -342,7 +363,10 @@ const _Listbox = class _Listbox extends VividElement {
|
|
|
342
363
|
selectNextOption() {
|
|
343
364
|
/* v8 ignore else -- @preserve */
|
|
344
365
|
if (!this.disabled && this.selectedIndex < this.options.length - 1) {
|
|
345
|
-
this.selectedIndex
|
|
366
|
+
const nextIndex = this.getNextSelectableIndex(this.selectedIndex + 1);
|
|
367
|
+
if (nextIndex !== -1) {
|
|
368
|
+
this.selectedIndex = nextIndex;
|
|
369
|
+
}
|
|
346
370
|
}
|
|
347
371
|
}
|
|
348
372
|
/**
|
|
@@ -353,7 +377,10 @@ const _Listbox = class _Listbox extends VividElement {
|
|
|
353
377
|
selectPreviousOption() {
|
|
354
378
|
/* v8 ignore else -- @preserve */
|
|
355
379
|
if (!this.disabled && this.selectedIndex > 0) {
|
|
356
|
-
|
|
380
|
+
const prevIndex = this.getPreviousSelectableIndex(this.selectedIndex - 1);
|
|
381
|
+
if (prevIndex !== -1) {
|
|
382
|
+
this.selectedIndex = prevIndex;
|
|
383
|
+
}
|
|
357
384
|
}
|
|
358
385
|
}
|
|
359
386
|
/// For this options change, determine if selectedIndex should change based on defaultSelected. Otherwise, returns null.
|
|
@@ -268,7 +268,7 @@ const ReplacedPropHandling = (Base) => {
|
|
|
268
268
|
|
|
269
269
|
class VividElement extends AriaMixin(ReplacedPropHandling(fastElement.FASTElement)) {
|
|
270
270
|
static {
|
|
271
|
-
this.VIVID_VERSION = "5.
|
|
271
|
+
this.VIVID_VERSION = "5.9.0";
|
|
272
272
|
}
|
|
273
273
|
/**
|
|
274
274
|
* Add data-vvd-component attribute with component name globally,
|
|
@@ -266,7 +266,7 @@ const ReplacedPropHandling = (Base) => {
|
|
|
266
266
|
|
|
267
267
|
class VividElement extends AriaMixin(ReplacedPropHandling(FASTElement)) {
|
|
268
268
|
static {
|
|
269
|
-
this.VIVID_VERSION = "5.
|
|
269
|
+
this.VIVID_VERSION = "5.9.0";
|
|
270
270
|
}
|
|
271
271
|
/**
|
|
272
272
|
* Add data-vvd-component attribute with component name globally,
|
|
@@ -28,8 +28,18 @@ var window_1 = win;
|
|
|
28
28
|
|
|
29
29
|
const window$1$1 = /*@__PURE__*/_commonjsHelpers.getDefaultExportFromCjs(window_1);
|
|
30
30
|
|
|
31
|
+
const __viteBrowserExternal = {};
|
|
32
|
+
|
|
33
|
+
const __viteBrowserExternal$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
34
|
+
__proto__: null,
|
|
35
|
+
default: __viteBrowserExternal
|
|
36
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
37
|
+
|
|
38
|
+
const require$$0 = /*@__PURE__*/_commonjsHelpers.getAugmentedNamespace(__viteBrowserExternal$1);
|
|
39
|
+
|
|
31
40
|
var topLevel = typeof _commonjsHelpers.commonjsGlobal !== 'undefined' ? _commonjsHelpers.commonjsGlobal :
|
|
32
41
|
typeof window !== 'undefined' ? window : {};
|
|
42
|
+
var minDoc = require$$0;
|
|
33
43
|
|
|
34
44
|
var doccy;
|
|
35
45
|
|
|
@@ -39,7 +49,7 @@ if (typeof document !== 'undefined') {
|
|
|
39
49
|
doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];
|
|
40
50
|
|
|
41
51
|
if (!doccy) {
|
|
42
|
-
doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] =
|
|
52
|
+
doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;
|
|
43
53
|
}
|
|
44
54
|
}
|
|
45
55
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { V as VividElement, d as defineVividComponent, c as createRegisterFunction } from '../unbundled/vivid-element.js';
|
|
2
2
|
import { attr, html } from '@microsoft/fast-element';
|
|
3
|
-
import { g as getDefaultExportFromCjs, c as commonjsGlobal } from '../unbundled/_commonjsHelpers.js';
|
|
3
|
+
import { g as getDefaultExportFromCjs, c as commonjsGlobal, a as getAugmentedNamespace } from '../unbundled/_commonjsHelpers.js';
|
|
4
4
|
import { M as MediaSkipBy } from '../unbundled/enums.js';
|
|
5
5
|
import { g as getPlaybackRatesArray } from '../unbundled/playbackRates.js';
|
|
6
6
|
import { L as Localized } from '../unbundled/localized.js';
|
|
@@ -24,8 +24,18 @@ var window_1 = win;
|
|
|
24
24
|
|
|
25
25
|
const window$1$1 = /*@__PURE__*/getDefaultExportFromCjs(window_1);
|
|
26
26
|
|
|
27
|
+
const __viteBrowserExternal = {};
|
|
28
|
+
|
|
29
|
+
const __viteBrowserExternal$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
30
|
+
__proto__: null,
|
|
31
|
+
default: __viteBrowserExternal
|
|
32
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
33
|
+
|
|
34
|
+
const require$$0 = /*@__PURE__*/getAugmentedNamespace(__viteBrowserExternal$1);
|
|
35
|
+
|
|
27
36
|
var topLevel = typeof commonjsGlobal !== 'undefined' ? commonjsGlobal :
|
|
28
37
|
typeof window !== 'undefined' ? window : {};
|
|
38
|
+
var minDoc = require$$0;
|
|
29
39
|
|
|
30
40
|
var doccy;
|
|
31
41
|
|
|
@@ -35,7 +45,7 @@ if (typeof document !== 'undefined') {
|
|
|
35
45
|
doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];
|
|
36
46
|
|
|
37
47
|
if (!doccy) {
|
|
38
|
-
doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] =
|
|
48
|
+
doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;
|
|
39
49
|
}
|
|
40
50
|
}
|
|
41
51
|
|