@watermarkinsights/ripple 5.30.0 → 5.31.0-alpha.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/dist/cjs/{app-globals-f310dc82.js → app-globals-3f8985a8.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/priv-calendar.cjs.entry.js +27 -27
- package/dist/cjs/ripple.cjs.js +1 -1
- package/dist/cjs/wm-date-range.cjs.entry.js +9 -9
- package/dist/cjs/wm-datepicker.cjs.entry.js +7 -7
- package/dist/cjs/wm-navigator.cjs.entry.js +1 -1
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.css +47 -47
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +29 -29
- package/dist/collection/components/datepickers/wm-date-range.js +9 -9
- package/dist/collection/components/datepickers/wm-datepicker.js +7 -7
- package/dist/collection/components/wm-navigator/wm-navigator.js +1 -1
- package/dist/collection/global/services/__mocks__/http-service.js +1 -1
- package/dist/esm/{app-globals-0d90343d.js → app-globals-fbe51289.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/priv-calendar.entry.js +27 -27
- package/dist/esm/ripple.js +1 -1
- package/dist/esm/wm-date-range.entry.js +9 -9
- package/dist/esm/wm-datepicker.entry.js +7 -7
- package/dist/esm/wm-navigator.entry.js +1 -1
- package/dist/esm-es5/app-globals-fbe51289.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/priv-calendar.entry.js +1 -1
- package/dist/esm-es5/ripple.js +1 -1
- package/dist/esm-es5/wm-date-range.entry.js +1 -1
- package/dist/esm-es5/wm-datepicker.entry.js +1 -1
- package/dist/esm-es5/wm-navigator.entry.js +1 -1
- package/dist/ripple/p-2cf2f73e.entry.js +1 -0
- package/dist/ripple/{p-86148143.system.entry.js → p-306f3b47.system.entry.js} +1 -1
- package/dist/ripple/{p-a5a165c6.system.entry.js → p-3e8bfc68.system.entry.js} +1 -1
- package/dist/ripple/p-54fff8d1.entry.js +1 -0
- package/dist/ripple/{p-f7fc6350.system.js → p-5bdd4f8e.system.js} +1 -1
- package/dist/ripple/p-a03315ce.entry.js +1 -0
- package/dist/ripple/p-acac6687.js +1 -0
- package/dist/ripple/p-e427094b.system.js +1 -0
- package/dist/ripple/{p-6f2d3297.system.entry.js → p-e65f7933.system.entry.js} +1 -1
- package/dist/ripple/p-eda49f0e.entry.js +1 -0
- package/dist/ripple/{p-df9d5b14.system.entry.js → p-f68e4b39.system.entry.js} +1 -1
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/components/datepickers/priv-calendar/priv-calendar.d.ts +2 -2
- package/dist/types/components.d.ts +2 -2
- package/package.json +2 -2
- package/dist/esm-es5/app-globals-0d90343d.js +0 -1
- package/dist/ripple/p-065b0134.entry.js +0 -1
- package/dist/ripple/p-1f79c42d.entry.js +0 -1
- package/dist/ripple/p-210773eb.entry.js +0 -1
- package/dist/ripple/p-2f297bf8.js +0 -1
- package/dist/ripple/p-6a7b26a1.system.js +0 -1
- package/dist/ripple/p-d55bd2b9.entry.js +0 -1
|
@@ -187,7 +187,7 @@ export class PrivCalendar {
|
|
|
187
187
|
}, onMouseOver: () => this.cellHovered.emit(date), "data-month": dateFind.month.asString(date), "data-year": dateFind.year.asString(date), onBlur: (ev) => ev.stopPropagation(), tabIndex: isFocused ? 0 : -1 }, dayOfDate));
|
|
188
188
|
};
|
|
189
189
|
this.disabled = false;
|
|
190
|
-
this.view = "
|
|
190
|
+
this.view = "month";
|
|
191
191
|
this.focusDate = this.today;
|
|
192
192
|
this.startDate = undefined;
|
|
193
193
|
this.endDate = undefined;
|
|
@@ -229,7 +229,7 @@ export class PrivCalendar {
|
|
|
229
229
|
this.setCalType();
|
|
230
230
|
}
|
|
231
231
|
handleFocusDate(newVal, oldVal) {
|
|
232
|
-
if (this.view === "
|
|
232
|
+
if (this.view === "month") {
|
|
233
233
|
const oldCell = this.getCell(oldVal);
|
|
234
234
|
if (oldCell)
|
|
235
235
|
oldCell.tabIndex = -1;
|
|
@@ -272,7 +272,7 @@ export class PrivCalendar {
|
|
|
272
272
|
break;
|
|
273
273
|
case "PageUp":
|
|
274
274
|
ev.preventDefault();
|
|
275
|
-
if (this.view === "
|
|
275
|
+
if (this.view === "month") {
|
|
276
276
|
this._focus.month.decrease(1);
|
|
277
277
|
this.focusCell();
|
|
278
278
|
}
|
|
@@ -282,7 +282,7 @@ export class PrivCalendar {
|
|
|
282
282
|
break;
|
|
283
283
|
case "PageDown":
|
|
284
284
|
ev.preventDefault();
|
|
285
|
-
if (this.view === "
|
|
285
|
+
if (this.view === "month") {
|
|
286
286
|
this._focus.month.increase(1);
|
|
287
287
|
this.focusCell();
|
|
288
288
|
}
|
|
@@ -292,7 +292,7 @@ export class PrivCalendar {
|
|
|
292
292
|
break;
|
|
293
293
|
case "Home":
|
|
294
294
|
ev.preventDefault();
|
|
295
|
-
if (this.view === "
|
|
295
|
+
if (this.view === "month") {
|
|
296
296
|
this._focus.day.set(1);
|
|
297
297
|
this.focusCell();
|
|
298
298
|
}
|
|
@@ -302,7 +302,7 @@ export class PrivCalendar {
|
|
|
302
302
|
break;
|
|
303
303
|
case "End":
|
|
304
304
|
ev.preventDefault();
|
|
305
|
-
if (this.view === "
|
|
305
|
+
if (this.view === "month") {
|
|
306
306
|
this._focus.day.set(-1);
|
|
307
307
|
this.focusCell();
|
|
308
308
|
}
|
|
@@ -313,7 +313,7 @@ export class PrivCalendar {
|
|
|
313
313
|
case "ArrowLeft":
|
|
314
314
|
if (activeEl.classList.contains("date-cell") || activeEl.classList.contains("month")) {
|
|
315
315
|
ev.preventDefault();
|
|
316
|
-
if (this.view === "
|
|
316
|
+
if (this.view === "month") {
|
|
317
317
|
this._focus.day.decrease(1);
|
|
318
318
|
this.focusCell();
|
|
319
319
|
}
|
|
@@ -325,7 +325,7 @@ export class PrivCalendar {
|
|
|
325
325
|
case "ArrowRight":
|
|
326
326
|
if (activeEl.classList.contains("date-cell") || activeEl.classList.contains("month")) {
|
|
327
327
|
ev.preventDefault();
|
|
328
|
-
if (this.view === "
|
|
328
|
+
if (this.view === "month") {
|
|
329
329
|
this._focus.day.increase(1);
|
|
330
330
|
this.focusCell();
|
|
331
331
|
}
|
|
@@ -337,7 +337,7 @@ export class PrivCalendar {
|
|
|
337
337
|
case "ArrowUp":
|
|
338
338
|
if (activeEl.classList.contains("date-cell") || activeEl.classList.contains("month")) {
|
|
339
339
|
ev.preventDefault();
|
|
340
|
-
if (this.view === "
|
|
340
|
+
if (this.view === "month") {
|
|
341
341
|
this._focus.day.decrease(7);
|
|
342
342
|
this.focusCell();
|
|
343
343
|
}
|
|
@@ -353,11 +353,11 @@ export class PrivCalendar {
|
|
|
353
353
|
}
|
|
354
354
|
if (activeEl.classList.contains("date-cell") || activeEl.classList.contains("month")) {
|
|
355
355
|
ev.preventDefault();
|
|
356
|
-
if (this.view === "
|
|
356
|
+
if (this.view === "month") {
|
|
357
357
|
this._focus.day.increase(7);
|
|
358
358
|
this.focusCell();
|
|
359
359
|
}
|
|
360
|
-
else if (this.view === "
|
|
360
|
+
else if (this.view === "year") {
|
|
361
361
|
this.monthButtonFocus.increase(3);
|
|
362
362
|
}
|
|
363
363
|
}
|
|
@@ -464,7 +464,7 @@ export class PrivCalendar {
|
|
|
464
464
|
if (dayToFocus > maxDays) {
|
|
465
465
|
this._focus.day.set(maxDays);
|
|
466
466
|
}
|
|
467
|
-
if (this.view == "
|
|
467
|
+
if (this.view == "month") {
|
|
468
468
|
const cellToFocus = this.getCell(this.focusDate);
|
|
469
469
|
if (cellToFocus) {
|
|
470
470
|
cellToFocus.tabIndex = 0;
|
|
@@ -497,26 +497,26 @@ export class PrivCalendar {
|
|
|
497
497
|
renderMonth(month, index) {
|
|
498
498
|
return (h("button", { id: `month-${index + 1}-${this.uid}`, class: `month ${this._focus.month.asInt() === index + 1 ? "selected focused" : ""}`, role: "gridcell", tabindex: index + 1 === this._focus.month.asInt() ? 0 : -1, onBlur: (ev) => ev.stopPropagation(), onClick: () => {
|
|
499
499
|
this._focus.month.set(index + 1);
|
|
500
|
-
this.view = "
|
|
500
|
+
this.view = "month";
|
|
501
501
|
this.focusCell();
|
|
502
502
|
} }, month));
|
|
503
503
|
}
|
|
504
504
|
renderHeader() {
|
|
505
|
-
const previousButtonLabel = this.view == "
|
|
506
|
-
const nextButtonLabel = this.view == "
|
|
505
|
+
const previousButtonLabel = this.view == "month" ? this.previousMonthButtonLabel : this.previousYearButtonLabel;
|
|
506
|
+
const nextButtonLabel = this.view == "month" ? this.nextMonthButtonLabel : this.nextYearButtonLabel;
|
|
507
507
|
return (h("div", { class: "calendar-header" }, h("button", { onClick: () => {
|
|
508
|
-
if (this.view == "
|
|
508
|
+
if (this.view == "month") {
|
|
509
509
|
this._focus.month.decrease(1);
|
|
510
510
|
}
|
|
511
|
-
else if (this.view == "
|
|
511
|
+
else if (this.view == "year") {
|
|
512
512
|
this._focus.year.decrease(1);
|
|
513
513
|
}
|
|
514
514
|
this.announceMonthYear();
|
|
515
515
|
}, class: "header-btn arw-btn", ref: (el) => (this.prevBtnEl = el), "aria-label": previousButtonLabel, onMouseOver: () => showTooltip("bottom", this.prevBtnEl, previousButtonLabel), onMouseLeave: () => hideTooltip(), onFocus: () => showTooltip("bottom", this.prevBtnEl, previousButtonLabel), onBlur: () => hideTooltip() }, h("span", { class: "svg-icon svg-previous" })), h("span", { class: "header-title" }, calendar_months[this._focus.month.asInt() - 1], " ", this._focus.year.asString()), h("button", { onClick: () => {
|
|
516
|
-
if (this.view == "
|
|
516
|
+
if (this.view == "month") {
|
|
517
517
|
this._focus.month.increase(1);
|
|
518
518
|
}
|
|
519
|
-
else if (this.view == "
|
|
519
|
+
else if (this.view == "year") {
|
|
520
520
|
this._focus.year.increase(1);
|
|
521
521
|
}
|
|
522
522
|
this.announceMonthYear();
|
|
@@ -527,7 +527,7 @@ export class PrivCalendar {
|
|
|
527
527
|
id: "date.monthView",
|
|
528
528
|
defaultMessage: "Month view",
|
|
529
529
|
description: "Calendar button to change to month view",
|
|
530
|
-
}), name: `rdo-${this.uid}`, class: "toggle-radio-input", checked: this.view === "
|
|
530
|
+
}), name: `rdo-${this.uid}`, class: "toggle-radio-input", checked: this.view === "month", onClick: () => (this.view = "month") }), h("label", { htmlFor: `month-radio-${this.uid}`, class: "radio" }, intl.formatMessage({
|
|
531
531
|
id: "date.month",
|
|
532
532
|
defaultMessage: "Month",
|
|
533
533
|
description: "Calendar button to change to month view",
|
|
@@ -535,28 +535,28 @@ export class PrivCalendar {
|
|
|
535
535
|
id: "date.yearView",
|
|
536
536
|
defaultMessage: "Year view",
|
|
537
537
|
description: "Calendar button to change to year view",
|
|
538
|
-
}), name: `rdo-${this.uid}`, class: "toggle-radio-input", checked: this.view === "
|
|
538
|
+
}), name: `rdo-${this.uid}`, class: "toggle-radio-input", checked: this.view === "year", onClick: () => (this.view = "year") }), h("label", { htmlFor: `year-radio-${this.uid}`, class: "radio" }, intl.formatMessage({
|
|
539
539
|
id: "date.year",
|
|
540
540
|
defaultMessage: "Year",
|
|
541
541
|
description: "Calendar button to change to year view",
|
|
542
542
|
})))));
|
|
543
543
|
}
|
|
544
|
-
|
|
544
|
+
renderMonthView() {
|
|
545
545
|
const dates = this.getCalendarDates(this.focusDate);
|
|
546
546
|
// the start and end date, set in either of the calendars
|
|
547
547
|
const eitherStart = this.startDate || (this.otherCalEl && this.otherCalEl.startDate);
|
|
548
548
|
const eitherEnd = this.endDate || (this.otherCalEl && this.otherCalEl.endDate);
|
|
549
549
|
return (h("div", { "aria-labelledby": "popup-title-month", role: "grid", class: "date-grid" }, h("div", { role: "rowgroup", class: "date-header" }, h("div", { role: "row", class: "header-row" }, h("div", { role: "columnheader", class: "header-cell", "aria-label": weekdays[0] }, intl.formatMessage({ id: "date.su", defaultMessage: "Su", description: "Abbreviated day of the week" })), h("div", { role: "columnheader", class: "header-cell", "aria-label": weekdays[1] }, intl.formatMessage({ id: "date.mo", defaultMessage: "Mo", description: "Abbreviated day of the week" })), h("div", { role: "columnheader", class: "header-cell", "aria-label": weekdays[2] }, intl.formatMessage({ id: "date.tu", defaultMessage: "Tu", description: "Abbreviated day of the week" })), h("div", { role: "columnheader", class: "header-cell", "aria-label": weekdays[3] }, intl.formatMessage({ id: "date.we", defaultMessage: "We", description: "Abbreviated day of the week" })), h("div", { role: "columnheader", class: "header-cell", "aria-label": weekdays[4] }, intl.formatMessage({ id: "date.th", defaultMessage: "Th", description: "Abbreviated day of the week" })), h("div", { role: "columnheader", class: "header-cell", "aria-label": weekdays[5] }, intl.formatMessage({ id: "date.fr", defaultMessage: "Fr", description: "Abbreviated day of the week" })), h("div", { role: "columnheader", class: "header-cell", "aria-label": weekdays[6] }, intl.formatMessage({ id: "date.sa", defaultMessage: "Sa", description: "Abbreviated day of the week" })))), h("div", { role: "rowgroup" }, h("div", { role: "row", class: "date-row" }, dates.slice(0, 7).map((date) => this.renderCalendarDate(date, eitherStart, eitherEnd))), h("div", { role: "row" }, dates.slice(7, 14).map((date) => this.renderCalendarDate(date, eitherStart, eitherEnd))), h("div", { role: "row" }, dates.slice(14, 21).map((date) => this.renderCalendarDate(date, eitherStart, eitherEnd))), h("div", { role: "row" }, dates.slice(21, 28).map((date) => this.renderCalendarDate(date, eitherStart, eitherEnd))), h("div", { role: "row" }, dates.slice(28, 35).map((date) => this.renderCalendarDate(date, eitherStart, eitherEnd))), dates.length > 35 ? (h("div", { role: "row" }, dates.slice(35).map((date) => this.renderCalendarDate(date, eitherStart, eitherEnd)))) : (""))));
|
|
550
550
|
}
|
|
551
|
-
|
|
552
|
-
return (h("div", { class: "
|
|
551
|
+
renderYearView() {
|
|
552
|
+
return (h("div", { class: "year-view" }, h("div", { "aria-labelledby": "popup-title-year", role: "grid", class: "months" }, h("div", { role: "row", class: "month-row" }, calendar_months.slice(0, 3).map((month, index) => this.renderMonth(month, index))), h("div", { role: "row", class: "month-row" }, calendar_months.slice(3, 6).map((month, index) => this.renderMonth(month, index + 3))), h("div", { role: "row", class: "month-row" }, calendar_months.slice(6, 9).map((month, index) => this.renderMonth(month, index + 6))), h("div", { role: "row", class: "month-row" }, calendar_months.slice(9).map((month, index) => this.renderMonth(month, index + 9))))));
|
|
553
553
|
}
|
|
554
554
|
render() {
|
|
555
|
-
return (h(Host, { key: '
|
|
555
|
+
return (h(Host, { key: 'f0972636a9943cb1b3c6b39f6ba9022359570d88', onMouseOut: (ev) => {
|
|
556
556
|
// @ts-ignore
|
|
557
557
|
if (!this.el.parentElement.contains(ev.toElement))
|
|
558
558
|
this.outOfCal.emit();
|
|
559
|
-
}, role: "application", "aria-describedby": `application-${this.uid}` }, h("div", { key: '
|
|
559
|
+
}, role: "application", "aria-describedby": `application-${this.uid}` }, h("div", { key: 'c4e1b4f973c7b6d3b70174f7086e337d9220716d', class: `popup ${this.view}-view` }, this.renderHeader(), this.view === "month" ? this.renderMonthView() : this.renderYearView()), h("div", { key: 'd6738a953df9cd2f713f25ed53b0103b080610bf', id: `application-${this.uid}`, class: "sr-only" }, this.calName, this.calInstructions), h("div", { key: 'cc9105d574a254bf2ef986b576bb6028b9e960cc', ref: (el) => (this.liveRegionEl = el), class: "sr-only", "aria-live": "assertive", "aria-atomic": "true" }, this.announcement)));
|
|
560
560
|
}
|
|
561
561
|
static get is() { return "priv-calendar"; }
|
|
562
562
|
static get originalStyleUrls() {
|
|
@@ -593,8 +593,8 @@ export class PrivCalendar {
|
|
|
593
593
|
"type": "string",
|
|
594
594
|
"mutable": true,
|
|
595
595
|
"complexType": {
|
|
596
|
-
"original": "
|
|
597
|
-
"resolved": "
|
|
596
|
+
"original": "\"month\" | \"year\"",
|
|
597
|
+
"resolved": "\"month\" | \"year\"",
|
|
598
598
|
"references": {}
|
|
599
599
|
},
|
|
600
600
|
"required": false,
|
|
@@ -605,7 +605,7 @@ export class PrivCalendar {
|
|
|
605
605
|
},
|
|
606
606
|
"attribute": "view",
|
|
607
607
|
"reflect": false,
|
|
608
|
-
"defaultValue": "\"
|
|
608
|
+
"defaultValue": "\"month\""
|
|
609
609
|
},
|
|
610
610
|
"focusDate": {
|
|
611
611
|
"type": "string",
|
|
@@ -276,8 +276,8 @@ export class DateRange {
|
|
|
276
276
|
this.endCalEl.startDate = undefined;
|
|
277
277
|
this.endCalEl.endDate = undefined;
|
|
278
278
|
this.endCalEl.hoverDate = undefined;
|
|
279
|
-
this.startCalEl.view = "
|
|
280
|
-
this.endCalEl.view = "
|
|
279
|
+
this.startCalEl.view = "month";
|
|
280
|
+
this.endCalEl.view = "month";
|
|
281
281
|
this.isExpanded = false;
|
|
282
282
|
}
|
|
283
283
|
}
|
|
@@ -330,7 +330,7 @@ export class DateRange {
|
|
|
330
330
|
const oldYear = dateFind.year.asInt(this.oldFocusVal);
|
|
331
331
|
const newMonth = dateFind.month.asInt(newFocusVal);
|
|
332
332
|
const oldMonth = dateFind.month.asInt(this.oldFocusVal);
|
|
333
|
-
if (cal.view === "
|
|
333
|
+
if (cal.view === "month") {
|
|
334
334
|
if (newYear != oldYear || newMonth != oldMonth) {
|
|
335
335
|
this.liveRegionEl.innerHTML = intl.formatMessage({
|
|
336
336
|
id: "date.viewingMonth",
|
|
@@ -529,25 +529,25 @@ export class DateRange {
|
|
|
529
529
|
}
|
|
530
530
|
render() {
|
|
531
531
|
var _a, _b, _c, _d;
|
|
532
|
-
return (h(Host, { key: '
|
|
532
|
+
return (h(Host, { key: 'd9425370610f8a2b7c45fe6f292c3956a84ff9bd', "aria-busy": "false" }, h("div", { key: 'db1104312e47a8c5f83d69a23c248ed4707abf36', ref: (d) => (this.wrapperEl = d), class: "wrapper" }, h("div", { key: '4e41eab3d58c2fca4545102e0f56b990af715a37', class: "range-wrapper cal", ref: (el) => (this.anchorEl = el) }, h("div", { key: '1a8367a94d56d6478304c17501835e02a83c8a89', class: "label-wrapper", id: "start-label-wrapper" }, h("label", { key: '95ca9b13badd5de4bf3256950e266c649ec96e81', id: "startlabel", htmlFor: "start-date-input", class: "label" }, this.labelStart, this.requiredField && (h("span", { key: '735e651558ca88cd0ef48da443de1141a3a3b2be', "aria-hidden": "true", class: "required" }, "*")))), h("div", { key: '88f0a8721ecff89466b5d4dcc44d35ad67f8f0cb', class: "label-wrapper", id: "end-label-wrapper" }, h("label", { key: 'f4bfa9b4e39cb75ca0af56ce75291dc838715964', id: "endlabel", htmlFor: "end-date-input", class: "label" }, this.labelEnd, this.requiredField && (h("span", { key: 'cbe940d9ed0b9ee6461b22017440a2640cef07ba', "aria-hidden": "true", class: "required" }, "*")))), h("input", { key: 'fdbc07ae0431e0c6205962c6ccfba9ebc65f1231', disabled: this._disabled, type: "text", id: "start-date-input", class: `date-input input ${this.invalidStart ? "invalid" : ""}`, name: "start-date", placeholder: this.dateFormat, value: this.valueStart, onFocus: () => this.handleFocus(), onInput: (ev) => this.handleStartInput(ev), onBlur: () => this.handleStartInputBlur(), ref: (input) => (this.startInputEl = input), "aria-describedby": "date-format-hint error", "aria-label": this.labelStart, "aria-required": this.requiredField ? "true" : null }), h("div", { key: 'd5bdc52b7caf0e25b012f0fed4472917e2c637df', id: "hyphen" }, "\u00A0-\u00A0"), h("input", { key: '99aa505aabd9950e8b8a9d855d2c4ea697f5c8af', disabled: this._disabled, type: "text", id: "end-date-input", class: `date-input input ${this.invalidEnd ? "invalid" : ""}`, name: "end-date", placeholder: this.dateFormat, value: this.valueEnd, onFocus: () => this.handleFocus(), onInput: (ev) => this.handleEndInput(ev), onBlur: () => this.handleEndInputBlur(), ref: (input) => (this.endInputEl = input), "aria-describedby": "date-format-hint error", "aria-label": this.labelEnd, "aria-required": this.requiredField ? "true" : null }), h("div", { key: 'a3434b13ad539bed778bc337ed04adc30e9acc77', class: "toggle-wrapper", id: "toggle-wrapper" }, this.canOpen && (h("button", { key: '7b7beb9c5460609fe9cf5922b23d826c64b9f053', disabled: this.disabled, "aria-describedby": "start-date-input end-date-input", "aria-label": intl.formatMessage({
|
|
533
533
|
id: "date.selectRange",
|
|
534
534
|
defaultMessage: "Select range",
|
|
535
535
|
description: "Button text for screen readers.",
|
|
536
|
-
}), ref: (el) => (this.toggleEl = el), "aria-expanded": `${this.isExpanded}`, class: "toggle", id: "toggle", popoverTarget: "popup-wrapper", popoverTargetAction: "toggle" }, h("span", { key: '
|
|
536
|
+
}), ref: (el) => (this.toggleEl = el), "aria-expanded": `${this.isExpanded}`, class: "toggle", id: "toggle", popoverTarget: "popup-wrapper", popoverTargetAction: "toggle" }, h("span", { key: '7c04850bc3e4c29687f6875d1b77a6baa018fd50', class: "svg-icon svg-date" }), h("span", { key: '3abf1b41a3f3787c7e0f9573d092bbe5bbd55875', class: "calendar", title: intl.formatMessage({
|
|
537
537
|
id: "date.calendarView",
|
|
538
538
|
defaultMessage: "Calendar View",
|
|
539
539
|
description: "Calendar button",
|
|
540
|
-
}) })))), h("div", { key: '
|
|
540
|
+
}) })))), h("div", { key: '3f9fe602f2efc97f6cf42c32dab36b42562304b0', class: `popup-wrapper popup-range ${this.startCalEl && this.startCalEl.view}-view ${this.isExpanded ? "is-open" : ""} ${!this.hasAnchor && !this.isExpanded ? "hidden" : ""} ${(_b = (_a = this.fit) === null || _a === void 0 ? void 0 : _a.vertical) !== null && _b !== void 0 ? _b : ""} ${(_d = (_c = this.fit) === null || _c === void 0 ? void 0 : _c.horizontal) !== null && _d !== void 0 ? _d : ""}`, id: "popup-wrapper", ref: (el) => (this.popupEl = el), popover: "auto",
|
|
541
541
|
// @ts-ignore -- onToggle is a valid ToggleEvent listener for popover elements
|
|
542
|
-
onToggle: (ev) => this.handleToggle(ev) }, h("div", { key: '
|
|
542
|
+
onToggle: (ev) => this.handleToggle(ev) }, h("div", { key: '41e4eae0f64600b15b3f56e5002a898f3d8ee571', class: "trapfocus", tabIndex: this.isExpanded ? 0 : undefined, onFocus: () => this.endCalEl.focusLastFocusable() }), h("priv-calendar", { key: '207a8f831fa0ff6a7068ac86ba467935ad8cbd5b', ref: (el) => (this.startCalEl = el), onDateFocus: (ev) => this.handleDateFocus(ev) }), h("priv-calendar", { key: '05ed5b637ddaaf31658f3db71218098b8b251ae0', ref: (el) => (this.endCalEl = el), onDateFocus: (ev) => this.handleDateFocus(ev) }), h("div", { key: 'e2ccb7d837231b42b5464dca90ccbaa09f4484e5', class: "trapfocus", tabIndex: this.isExpanded ? 0 : undefined, onFocus: () => this.startCalEl.focusFirstFocusable() }))), h("div", { key: '4b8a0c9b7fceeb552ef3264203f875ec85bc9310' }, h("div", { key: '457fd174e68e80c707914c417b9def8e5be39920', id: "live-region", "aria-live": "polite", "aria-relevant": "text", class: "sr-only" }), h("div", { key: 'c3d4cb97f2686296956975eb0ece2a8204584b8e', id: "month-title", class: "sr-only" }, intl.formatMessage({
|
|
543
543
|
id: "date.selectMonth",
|
|
544
544
|
defaultMessage: "Activate to select a month.",
|
|
545
545
|
description: "Calendar button",
|
|
546
|
-
})), h("div", { key: '
|
|
546
|
+
})), h("div", { key: 'fd5074de67b599f2773080314d82a260b8447113', id: "year-title", class: "sr-only" }, intl.formatMessage({
|
|
547
547
|
id: "date.selectYear",
|
|
548
548
|
defaultMessage: "Activate to select a year.",
|
|
549
549
|
description: "Calendar button",
|
|
550
|
-
}))), h("div", { key: '
|
|
550
|
+
}))), h("div", { key: 'efdcc22aa520edec0a59ad6e76c16031d8077d67', id: "error", class: "error" }, this.errorMessage), h("span", { key: 'b91c95c15affe4885b41ccf088bb66b00ba881eb', id: "date-format-hint", class: "sr-only" }, this.dateFormat), h("div", { key: 'c925b59da3ac2557e796c29ecb35c2218b221f7c', ref: (el) => (this.liveRegionEl = el), class: "sr-only", "aria-live": "polite", "aria-atomic": "true" }))));
|
|
551
551
|
}
|
|
552
552
|
static get is() { return "wm-date-range"; }
|
|
553
553
|
static get encapsulation() { return "shadow"; }
|
|
@@ -191,7 +191,7 @@ export class DatePicker {
|
|
|
191
191
|
}
|
|
192
192
|
this.fit = null;
|
|
193
193
|
this.isExpanded = false;
|
|
194
|
-
this.calEl.view = "
|
|
194
|
+
this.calEl.view = "month";
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
closePopup(returnFocus = false) {
|
|
@@ -329,25 +329,25 @@ export class DatePicker {
|
|
|
329
329
|
}
|
|
330
330
|
render() {
|
|
331
331
|
var _a, _b, _c, _d;
|
|
332
|
-
return (h(Host, { key: '
|
|
332
|
+
return (h(Host, { key: 'a6bd8346b4de553102719cd281b9dc9413581aae', "aria-busy": "false", class: `${this.errorMessage ? "invalid" : ""}` }, h("div", { key: 'eaaf09c6388ac561f612af41cf0b3502b04094b0', ref: (d) => (this.dpWrapperEl = d), class: `wrapper label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: '4202ea43a96fb7c3b67d4454a3637bf616e332cd', class: "label-wrapper" }, this.labelPosition !== "none" && (h("label", { key: '42f8526f8fdb0028e24c514d42091c3fbf15ab60', id: "datepickerLabel", htmlFor: "date-input", class: "label", onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => hideTooltip() }, this.label)), this.labelPosition !== "none" && this.requiredField && (h("div", { key: '88c138a04cc78bac4171fc6458ad9b00778bf490', "aria-hidden": "true", class: "required" }, "*"))), h("div", { key: 'de2d78696965e3a10ac3facbeca4a8b473245523' }, h("div", { key: '9039a74286b4aa7f1491c02eaab23b321a2aaa45', class: "single-wrapper input", ref: (el) => (this.anchorEl = el) }, h("input", { key: '944723e15f67dff099ac5c1f6f03263594300435', disabled: this.isDisabled, type: "text", id: "single-date-input", class: "date-input", name: "date", placeholder: this.dateFormat, value: this.value, onFocus: () => this.handleInputFocus(), onInput: (ev) => this.handleInput(ev), onBlur: () => this.handleInputBlur(), onChange: () => this.handleInputChange(), ref: (input) => (this.inputEl = input), "aria-describedby": "date-format-hint error", "aria-label": this.label, "aria-required": this.requiredField ? "true" : null }), h("div", { key: '80ef67580f83dea80bcfc0d57391663e2727d33a', class: "container", id: "wm-container" }, this.canOpen && (h("button", { key: '730d2b56439354ce6232dc18d12c38bbc6790ed2', disabled: this.disabled, "aria-label": intl.formatMessage({
|
|
333
333
|
id: "date.selectDate",
|
|
334
334
|
defaultMessage: "Select date",
|
|
335
335
|
description: "Button text for screen readers.",
|
|
336
|
-
}), "aria-describedby": "single-date-input", ref: (el) => (this.toggleEl = el), "aria-expanded": `${this.isExpanded}`, class: "toggle", id: "toggle", popoverTarget: "popup-wrapper", popoverTargetAction: "toggle" }, h("span", { key: '
|
|
336
|
+
}), "aria-describedby": "single-date-input", ref: (el) => (this.toggleEl = el), "aria-expanded": `${this.isExpanded}`, class: "toggle", id: "toggle", popoverTarget: "popup-wrapper", popoverTargetAction: "toggle" }, h("span", { key: 'd9f4782bbaeea7dbb64c0215e835611f0eecd54a', class: "svg-icon svg-date" }), h("span", { key: '2c960fb463c77b71d213c864423869010996ccca', class: "calendar", title: intl.formatMessage({
|
|
337
337
|
id: "date.calendarView",
|
|
338
338
|
defaultMessage: "Calendar View",
|
|
339
339
|
description: "Calendar button",
|
|
340
|
-
}) }))), h("div", { key: '
|
|
340
|
+
}) }))), h("div", { key: 'b8d9fc86ac97acc442ffd6f371470b883a75f6ea', class: `popup-wrapper ${this.calEl && this.calEl.view}-view ${this.isExpanded ? "is-open" : ""} ${!this.hasAnchor && !this.isExpanded ? "hidden" : ""} ${(_b = (_a = this.fit) === null || _a === void 0 ? void 0 : _a.vertical) !== null && _b !== void 0 ? _b : ""} ${(_d = (_c = this.fit) === null || _c === void 0 ? void 0 : _c.horizontal) !== null && _d !== void 0 ? _d : ""}`, id: "popup-wrapper", ref: (el) => (this.popupEl = el), popover: "auto",
|
|
341
341
|
// @ts-ignore -- onToggle is a valid ToggleEvent listener for popover elements
|
|
342
|
-
onToggle: (ev) => this.handleToggle(ev) }, h("div", { key: '
|
|
342
|
+
onToggle: (ev) => this.handleToggle(ev) }, h("div", { key: '9e18fa2cd6a00924d714f2fa943047d5f5c50d51', tabIndex: 0, onFocus: () => this.calEl.focusLastFocusable() }), h("priv-calendar", { key: 'c7b713840961ab36cb158a28230278c92364efa1', ref: (el) => (this.calEl = el), startDate: this.calendarDate, focusDate: this.calendarDate, class: "inside" }), h("div", { key: '64a58c7332b878d4b693a3eec5d07369b9fe43a3', tabIndex: 0, onFocus: () => this.calEl.focusFirstFocusable() })), h("div", { key: '1a6e1fc2010106fc59e8827df71a47f894d1fe0a', id: "live-region", "aria-live": "polite", "aria-relevant": "text", class: "sr-only" }), h("div", { key: '24b950499b627de0aa82893672a00596cca8362f', id: "month-title", class: "sr-only" }, intl.formatMessage({
|
|
343
343
|
id: "date.selectMonth",
|
|
344
344
|
defaultMessage: "Activate to select a month.",
|
|
345
345
|
description: "Calendar button",
|
|
346
|
-
})), h("div", { key: '
|
|
346
|
+
})), h("div", { key: '59ab8ea5db5b823b74dfea8ed6fbcf6cf5665ae4', id: "year-title", class: "sr-only" }, intl.formatMessage({
|
|
347
347
|
id: "date.selectYear",
|
|
348
348
|
defaultMessage: "Activate to select a year.",
|
|
349
349
|
description: "Calendar button",
|
|
350
|
-
})))), h("div", { key: '
|
|
350
|
+
})))), h("div", { key: '2b1cae481b68914f2b728080b3ca9efd44c7acde', id: "error", class: "error" }, this.errorMessage), h("span", { key: 'e9d5b6752fcff1f9352df2a7886ab1dbb14a3e5b', id: "date-format-hint", class: "sr-only" }, this.dateFormat), h("div", { key: '59c04dc077de5e9ac8da0ec7f03593778802260f', ref: (el) => (this.liveRegionEl = el), class: "sr-only", "aria-live": "polite", "aria-atomic": "true" })))));
|
|
351
351
|
}
|
|
352
352
|
static get is() { return "wm-datepicker"; }
|
|
353
353
|
static get encapsulation() { return "shadow"; }
|
|
@@ -237,7 +237,7 @@ export class Navigator {
|
|
|
237
237
|
name = product.name;
|
|
238
238
|
icon = product.iconUrl;
|
|
239
239
|
clickRedirect = this.setProductOnClick(product.id);
|
|
240
|
-
if (!!name && !!icon) {
|
|
240
|
+
if (!!name && !!icon && this.isSafeUrl(icon)) {
|
|
241
241
|
isSelected = this.currentProductId === product.id;
|
|
242
242
|
return (h("priv-navigator-item", { selected: isSelected, id: product.id, onClick: () => {
|
|
243
243
|
isSelected ? this.closeMenu() : clickRedirect();
|
|
@@ -79,7 +79,7 @@ const navigatorResponse = {
|
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
description: "something with an id containing admin",
|
|
82
|
-
iconUrl: "
|
|
82
|
+
iconUrl: "https://cdn.watermarkinsights.com/images/login/platform.svg",
|
|
83
83
|
id: "banana_admin_shoe",
|
|
84
84
|
linkUrl: "irrelevant",
|
|
85
85
|
name: "Platform Admin",
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { b as bootstrapLazy } from './index-3425d80d.js';
|
|
2
2
|
export { s as setNonce } from './index-3425d80d.js';
|
|
3
|
-
import { g as globalScripts } from './app-globals-
|
|
3
|
+
import { g as globalScripts } from './app-globals-fbe51289.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|