@vonage/vivid 3.0.0-next.18 → 3.0.0-next.20
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/action-group/index.js +34 -0
- package/badge/index.js +1 -1
- package/banner/index.js +1 -1
- package/breadcrumb/index.js +2 -0
- package/button/index.js +1 -1
- package/calendar/index.js +4 -0
- package/card/index.js +1 -1
- package/fab/index.js +1 -1
- package/icon/index.js +1 -1
- package/index.js +2 -0
- package/lib/action-group/action-group.d.ts +9 -0
- package/lib/action-group/action-group.template.d.ts +4 -0
- package/lib/action-group/index.d.ts +2 -0
- package/lib/badge/badge.d.ts +1 -1
- package/lib/button/button.d.ts +1 -1
- package/lib/components.d.ts +2 -0
- package/lib/enums.d.ts +1 -2
- package/lib/fab/fab.d.ts +1 -1
- package/lib/icon/icon.d.ts +1 -1
- package/lib/progress/progress.d.ts +1 -1
- package/lib/progress-ring/progress-ring.d.ts +1 -1
- package/lib/text/text.d.ts +1 -1
- package/note/index.js +1 -1
- package/package.json +6 -5
- package/popup/index.js +19 -22
- package/progress/index.js +3 -3
- package/progress-ring/index.js +4 -3
- package/shared/anchor.js +8 -1
- package/shared/base-progress.js +5 -0
- package/shared/button.js +8 -1
- package/shared/enums.js +1 -2
- package/shared/es.object.assign.js +6 -6
- package/shared/icon.js +509 -462
- package/shared/index.js +55 -54
- package/shared/object-set-prototype-of.js +220 -199
- package/shared/web.dom-collections.iterator.js +22 -21
- package/text/index.js +1 -1
- package/text-field/index.js +31 -9
package/shared/index.js
CHANGED
|
@@ -275,30 +275,6 @@ const DOM = Object.freeze({
|
|
|
275
275
|
},
|
|
276
276
|
});
|
|
277
277
|
|
|
278
|
-
function spilloverSubscribe(subscriber) {
|
|
279
|
-
const spillover = this.spillover;
|
|
280
|
-
const index = spillover.indexOf(subscriber);
|
|
281
|
-
if (index === -1) {
|
|
282
|
-
spillover.push(subscriber);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
function spilloverUnsubscribe(subscriber) {
|
|
286
|
-
const spillover = this.spillover;
|
|
287
|
-
const index = spillover.indexOf(subscriber);
|
|
288
|
-
if (index !== -1) {
|
|
289
|
-
spillover.splice(index, 1);
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
function spilloverNotifySubscribers(args) {
|
|
293
|
-
const spillover = this.spillover;
|
|
294
|
-
const source = this.source;
|
|
295
|
-
for (let i = 0, ii = spillover.length; i < ii; ++i) {
|
|
296
|
-
spillover[i].handleChange(source, args);
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
function spilloverHas(subscriber) {
|
|
300
|
-
return this.spillover.indexOf(subscriber) !== -1;
|
|
301
|
-
}
|
|
302
278
|
/**
|
|
303
279
|
* An implementation of {@link Notifier} that efficiently keeps track of
|
|
304
280
|
* subscribers interested in a specific change notification on an
|
|
@@ -328,42 +304,58 @@ class SubscriberSet {
|
|
|
328
304
|
* @param subscriber - The subscriber to test for inclusion in this set.
|
|
329
305
|
*/
|
|
330
306
|
has(subscriber) {
|
|
331
|
-
return this.
|
|
307
|
+
return this.spillover === void 0
|
|
308
|
+
? this.sub1 === subscriber || this.sub2 === subscriber
|
|
309
|
+
: this.spillover.indexOf(subscriber) !== -1;
|
|
332
310
|
}
|
|
333
311
|
/**
|
|
334
312
|
* Subscribes to notification of changes in an object's state.
|
|
335
313
|
* @param subscriber - The object that is subscribing for change notification.
|
|
336
314
|
*/
|
|
337
315
|
subscribe(subscriber) {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
316
|
+
const spillover = this.spillover;
|
|
317
|
+
if (spillover === void 0) {
|
|
318
|
+
if (this.has(subscriber)) {
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
if (this.sub1 === void 0) {
|
|
322
|
+
this.sub1 = subscriber;
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
if (this.sub2 === void 0) {
|
|
326
|
+
this.sub2 = subscriber;
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
this.spillover = [this.sub1, this.sub2, subscriber];
|
|
330
|
+
this.sub1 = void 0;
|
|
331
|
+
this.sub2 = void 0;
|
|
344
332
|
}
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
333
|
+
else {
|
|
334
|
+
const index = spillover.indexOf(subscriber);
|
|
335
|
+
if (index === -1) {
|
|
336
|
+
spillover.push(subscriber);
|
|
337
|
+
}
|
|
348
338
|
}
|
|
349
|
-
this.spillover = [this.sub1, this.sub2, subscriber];
|
|
350
|
-
this.subscribe = spilloverSubscribe;
|
|
351
|
-
this.unsubscribe = spilloverUnsubscribe;
|
|
352
|
-
this.notify = spilloverNotifySubscribers;
|
|
353
|
-
this.has = spilloverHas;
|
|
354
|
-
this.sub1 = void 0;
|
|
355
|
-
this.sub2 = void 0;
|
|
356
339
|
}
|
|
357
340
|
/**
|
|
358
341
|
* Unsubscribes from notification of changes in an object's state.
|
|
359
342
|
* @param subscriber - The object that is unsubscribing from change notification.
|
|
360
343
|
*/
|
|
361
344
|
unsubscribe(subscriber) {
|
|
362
|
-
|
|
363
|
-
|
|
345
|
+
const spillover = this.spillover;
|
|
346
|
+
if (spillover === void 0) {
|
|
347
|
+
if (this.sub1 === subscriber) {
|
|
348
|
+
this.sub1 = void 0;
|
|
349
|
+
}
|
|
350
|
+
else if (this.sub2 === subscriber) {
|
|
351
|
+
this.sub2 = void 0;
|
|
352
|
+
}
|
|
364
353
|
}
|
|
365
|
-
else
|
|
366
|
-
|
|
354
|
+
else {
|
|
355
|
+
const index = spillover.indexOf(subscriber);
|
|
356
|
+
if (index !== -1) {
|
|
357
|
+
spillover.splice(index, 1);
|
|
358
|
+
}
|
|
367
359
|
}
|
|
368
360
|
}
|
|
369
361
|
/**
|
|
@@ -371,14 +363,22 @@ class SubscriberSet {
|
|
|
371
363
|
* @param args - Data passed along to subscribers during notification.
|
|
372
364
|
*/
|
|
373
365
|
notify(args) {
|
|
374
|
-
const
|
|
375
|
-
const sub2 = this.sub2;
|
|
366
|
+
const spillover = this.spillover;
|
|
376
367
|
const source = this.source;
|
|
377
|
-
if (
|
|
378
|
-
sub1.
|
|
368
|
+
if (spillover === void 0) {
|
|
369
|
+
const sub1 = this.sub1;
|
|
370
|
+
const sub2 = this.sub2;
|
|
371
|
+
if (sub1 !== void 0) {
|
|
372
|
+
sub1.handleChange(source, args);
|
|
373
|
+
}
|
|
374
|
+
if (sub2 !== void 0) {
|
|
375
|
+
sub2.handleChange(source, args);
|
|
376
|
+
}
|
|
379
377
|
}
|
|
380
|
-
|
|
381
|
-
|
|
378
|
+
else {
|
|
379
|
+
for (let i = 0, ii = spillover.length; i < ii; ++i) {
|
|
380
|
+
spillover[i].handleChange(source, args);
|
|
381
|
+
}
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
384
|
}
|
|
@@ -424,7 +424,8 @@ class PropertyChangeNotifier {
|
|
|
424
424
|
subscribers.subscribe(subscriber);
|
|
425
425
|
}
|
|
426
426
|
else {
|
|
427
|
-
this.sourceSubscribers =
|
|
427
|
+
this.sourceSubscribers =
|
|
428
|
+
(_a = this.sourceSubscribers) !== null && _a !== void 0 ? _a : new SubscriberSet(this.source);
|
|
428
429
|
this.sourceSubscribers.subscribe(subscriber);
|
|
429
430
|
}
|
|
430
431
|
}
|
|
@@ -568,6 +569,7 @@ const Observable = FAST.getById(2 /* observable */, () => {
|
|
|
568
569
|
watcher = void 0;
|
|
569
570
|
/* eslint-disable-next-line */
|
|
570
571
|
prevValue = prev.propertySource[prev.propertyName];
|
|
572
|
+
/* eslint-disable-next-line @typescript-eslint/no-this-alias */
|
|
571
573
|
watcher = this;
|
|
572
574
|
if (propertySource === prevValue) {
|
|
573
575
|
this.needsRefresh = true;
|
|
@@ -1143,6 +1145,7 @@ class CompilationContext {
|
|
|
1143
1145
|
this.targetIndex = -1;
|
|
1144
1146
|
}
|
|
1145
1147
|
release() {
|
|
1148
|
+
/* eslint-disable-next-line @typescript-eslint/no-this-alias */
|
|
1146
1149
|
sharedContext = this;
|
|
1147
1150
|
}
|
|
1148
1151
|
static borrow(directives) {
|
|
@@ -1621,8 +1624,6 @@ function html(strings, ...values) {
|
|
|
1621
1624
|
class ElementStyles {
|
|
1622
1625
|
constructor() {
|
|
1623
1626
|
this.targets = new WeakSet();
|
|
1624
|
-
/** @internal */
|
|
1625
|
-
this.behaviors = null;
|
|
1626
1627
|
}
|
|
1627
1628
|
/** @internal */
|
|
1628
1629
|
addStylesTo(target) {
|