@watermarkinsights/ripple 3.0.1 → 3.0.2-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.
Files changed (81) hide show
  1. package/dist/cjs/{global-ccb9500c.js → global-1e540de6.js} +1 -1
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/priv-datepicker.cjs.entry.js +1 -1
  4. package/dist/cjs/ripple.cjs.js +2 -2
  5. package/dist/cjs/wm-datepicker.cjs.entry.js +25 -30
  6. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.css +9 -0
  7. package/dist/collection/components/wm-datepicker/wm-datepicker.js +26 -32
  8. package/dist/esm/{global-4f914bb2.js → global-d6b49e98.js} +1 -1
  9. package/dist/esm/loader.js +2 -2
  10. package/dist/esm/priv-datepicker.entry.js +1 -1
  11. package/dist/esm/ripple.js +2 -2
  12. package/dist/esm/wm-datepicker.entry.js +25 -30
  13. package/dist/ripple/p-129d94fa.entry.js +1 -0
  14. package/dist/ripple/{p-454ad552.entry.js → p-c0fe5201.entry.js} +1 -1
  15. package/dist/ripple/{p-69a73e86.js → p-e3843249.js} +1 -1
  16. package/dist/ripple/ripple.esm.js +1 -1
  17. package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +3 -3
  18. package/package.json +1 -1
  19. package/dist/cjs/app-globals-a07327ae.js +0 -47
  20. package/dist/cjs/css-shim-a7379e2b.js +0 -6
  21. package/dist/cjs/dom-3e7d9c3b.js +0 -75
  22. package/dist/cjs/functions-65513c61.js +0 -8360
  23. package/dist/cjs/global-06317e3f.js +0 -36
  24. package/dist/cjs/global-f6930bb0.js +0 -38
  25. package/dist/cjs/index-8dea8c13.js +0 -2976
  26. package/dist/cjs/shadow-css-09555044.js +0 -391
  27. package/dist/esm/app-globals-f62991a4.js +0 -45
  28. package/dist/esm/css-shim-bbdf0cc6.js +0 -4
  29. package/dist/esm/dom-1f98a75f.js +0 -73
  30. package/dist/esm/functions-316c1b23.js +0 -8340
  31. package/dist/esm/global-03372f70.js +0 -34
  32. package/dist/esm/global-fedbc323.js +0 -36
  33. package/dist/esm/index-e34aa595.js +0 -2938
  34. package/dist/esm/shadow-css-67b66845.js +0 -389
  35. package/dist/ripple/app-globals-b5693c90.js +0 -45
  36. package/dist/ripple/app-globals-d72c2d3c.js +0 -45
  37. package/dist/ripple/app-globals-f62991a4.js +0 -45
  38. package/dist/ripple/css-shim-bbdf0cc6.js +0 -4
  39. package/dist/ripple/dom-1f98a75f.js +0 -73
  40. package/dist/ripple/functions-316c1b23.js +0 -8340
  41. package/dist/ripple/http-service-5d037e16.js +0 -52
  42. package/dist/ripple/index-20b65f86.js +0 -2938
  43. package/dist/ripple/index-e34aa595.js +0 -2938
  44. package/dist/ripple/interfaces-50753346.js +0 -51
  45. package/dist/ripple/p-0c2498f4.js +0 -1
  46. package/dist/ripple/p-42ca2e15.entry.js +0 -1
  47. package/dist/ripple/p-e91befe3.js +0 -1
  48. package/dist/ripple/priv-chart-popover.entry.js +0 -85
  49. package/dist/ripple/priv-datepicker.entry.js +0 -668
  50. package/dist/ripple/priv-navigator-button.entry.js +0 -25
  51. package/dist/ripple/priv-navigator-item.entry.js +0 -30
  52. package/dist/ripple/ripple.css +0 -84
  53. package/dist/ripple/shadow-css-67b66845.js +0 -389
  54. package/dist/ripple/wm-action-menu.entry.js +0 -202
  55. package/dist/ripple/wm-button.entry.js +0 -148
  56. package/dist/ripple/wm-chart-slice.entry.js +0 -18
  57. package/dist/ripple/wm-chart.entry.js +0 -504
  58. package/dist/ripple/wm-datepicker.entry.js +0 -258
  59. package/dist/ripple/wm-input.entry.js +0 -106
  60. package/dist/ripple/wm-menuitem.entry.js +0 -114
  61. package/dist/ripple/wm-modal-footer.entry.js +0 -39
  62. package/dist/ripple/wm-modal-header.entry.js +0 -41
  63. package/dist/ripple/wm-modal.entry.js +0 -145
  64. package/dist/ripple/wm-navigator.entry.js +0 -275
  65. package/dist/ripple/wm-network-uploader.entry.js +0 -427
  66. package/dist/ripple/wm-option.entry.js +0 -119
  67. package/dist/ripple/wm-pagination.entry.js +0 -172
  68. package/dist/ripple/wm-search.entry.js +0 -227
  69. package/dist/ripple/wm-select.entry.js +0 -362
  70. package/dist/ripple/wm-snackbar.entry.js +0 -156
  71. package/dist/ripple/wm-tab-item.entry.js +0 -78
  72. package/dist/ripple/wm-tab-list.entry.js +0 -201
  73. package/dist/ripple/wm-tab-panel.entry.js +0 -38
  74. package/dist/ripple/wm-tag-input.entry.js +0 -534
  75. package/dist/ripple/wm-timepicker.entry.js +0 -382
  76. package/dist/ripple/wm-toggletip.entry.js +0 -124
  77. package/dist/ripple/wm-uploader.entry.js +0 -338
  78. package/dist/ripple/wm-wrapper.entry.js +0 -17
  79. package/dist/types/components/wm-tag-input/wm-tag-input.d.ts~ds312_tagInputMaxTags +0 -87
  80. package/dist/types/components.d.ts~ds312_tagInputMaxTags +0 -879
  81. package/dist/types/stencil-public-runtime.d.ts~ds312_tagInputMaxTags +0 -1555
@@ -1,201 +0,0 @@
1
- import { r as registerInstance, e as createEvent, i as forceUpdate, h, f as Host, g as getElement } from './index-e34aa595.js';
2
- import { d as debounce } from './functions-316c1b23.js';
3
-
4
- const wmTabListCss = ":host,wm-tab-list{position:relative;white-space:nowrap;height:100%;display:block}:host *,wm-tab-list *{box-sizing:border-box}:host .tabcontainer,wm-tab-list .tabcontainer{margin:0;margin-left:-24px;width:100%;height:4.0625rem;display:flex;flex-direction:row;align-items:center;padding:0}:host .tabcontainer.dark,wm-tab-list .tabcontainer.dark{background:#353b48;margin:0}:host wm-select,wm-tab-list wm-select{padding:0.375rem 0}";
5
-
6
- const TabList = class {
7
- constructor(hostRef) {
8
- registerInstance(this, hostRef);
9
- this.tabSelected = createEvent(this, "tabSelected", 7);
10
- /**
11
- * Delegates control to the component, which will listen for the tabSelected event, update the display of the tab panels, and update the selected tab on display. When set to false, the app must listen for the event and update the selectedTab attribute. Offers more control for devs, who may want to control when data loads or run other functions when tabs are switched.
12
- */
13
- this.controllerEnabled = false;
14
- this.getSelectedTabItem = () => this.tabItems.filter((t) => t.selected)[0];
15
- this.debouncedSetLayout = debounce(() => {
16
- if (!this.listWidth) {
17
- this.setListWidth();
18
- }
19
- forceUpdate(this.el);
20
- }, 250);
21
- }
22
- /**
23
- * Set to true when the tab list exceeds the parent width. Component will render the menu layout.
24
- */
25
- get menuLayout() {
26
- if (this.listWidth) {
27
- return this.el.offsetWidth < this.listWidth - 24; // to take into account the negative margin on the ul
28
- }
29
- else {
30
- return false; // in case listWidth couldn't get computed, we render regular tabs
31
- }
32
- }
33
- get tabItems() {
34
- return Array.from(this.el.querySelectorAll("wm-tab-item"));
35
- }
36
- getLinkEl(tab) {
37
- return tab.shadowRoot.querySelector("a");
38
- }
39
- get panels() {
40
- const allPanels = Array.from(document.querySelectorAll("wm-tab-panel"));
41
- const tabIds = this.tabItems.map((t) => t.tabId);
42
- return allPanels.filter((p) => tabIds.includes(p.tabId));
43
- }
44
- getPanel(tabId) {
45
- return this.panels.find((p) => p.tabId === tabId);
46
- }
47
- setListWidth() {
48
- let newCalc = this.tabItems.reduce((sum, tab) => sum + tab.offsetWidth, 0);
49
- this.listWidth = newCalc && newCalc > 0 ? newCalc : this.listWidth; // the function may return 0. In this case keep the previous value
50
- }
51
- setSelected(id) {
52
- this.tabItems.map((tab) => (tab.selected = tab.tabId === id));
53
- const singlePanel = this.panels.length === 1 && this.tabItems.length > 1;
54
- if (singlePanel) {
55
- /**
56
- * If the app conditionally renders content in one single tab panel rather than allocating the content to discrete panels, then the tab panels aria references needs to update whenever a new tab item is selected.
57
- */
58
- const selected = this.getSelectedTabItem();
59
- this.setAttributesOnPanel(this.panels[0], selected);
60
- this.panels[0].active = true;
61
- }
62
- else {
63
- this.panels.map((panel) => (panel.active = panel.tabId === id));
64
- }
65
- }
66
- showItems() {
67
- this.tabItems.map((t) => (t.show = true));
68
- }
69
- hideItems() {
70
- this.tabItems.map((t) => (t.show = false));
71
- }
72
- componentWillLoad() {
73
- // @ts-ignore
74
- this.el.focus = function () {
75
- const items = Array.from(this.querySelectorAll("wm-tab-item"));
76
- const selectedItem = items.filter((t) => t.selected)[0];
77
- selectedItem && selectedItem.focus();
78
- };
79
- }
80
- componentDidLoad() {
81
- this.setLayout(); // this require measurements of DOM elements so can't be done before first paint
82
- const selectedTab = this.selectedTab || this.tabItems[0].tabId;
83
- this.setSelected(selectedTab);
84
- }
85
- tabItemLoaded(ev) {
86
- this.setAriaOnPanelAndTab(ev.target);
87
- }
88
- setAriaOnPanelAndTab(tab) {
89
- const panel = this.getPanel(tab.tabId);
90
- // If there's no panel, check for case where content is conditionally rendered in one panel, in which case attributes on all tabs should point to this single panel.
91
- if (!panel) {
92
- if (this.panels.length === 1) {
93
- this.setAttributesOnTab(tab, this.panels[0]);
94
- }
95
- }
96
- else {
97
- // Otherwise, set attributes on each tab item that loads and its associated panel
98
- this.setAttributesOnPanel(panel, tab);
99
- this.setAttributesOnTab(tab, panel);
100
- }
101
- }
102
- setAttributesOnTab(tab, panel) {
103
- const link = this.getLinkEl(tab);
104
- if (link) {
105
- link.setAttribute("aria-controls", panel.id);
106
- link.setAttribute("href", `#${panel.id}`);
107
- }
108
- }
109
- removeAttributesOnTab(tab) {
110
- const link = this.getLinkEl(tab);
111
- if (link) {
112
- link.removeAttribute("aria-controls");
113
- link.removeAttribute("href");
114
- }
115
- }
116
- setAttributesOnPanel(panel, tab) {
117
- const link = this.getLinkEl(tab);
118
- if (link) {
119
- panel.setAttribute("aria-labelledby", link.id);
120
- panel.setAttribute("tab-id", tab.tabId);
121
- }
122
- }
123
- handleTabSelected(ev) {
124
- if (this.controllerEnabled) {
125
- this.setSelected(ev.detail.tabId);
126
- }
127
- }
128
- handleKeydown(ev) {
129
- const tabItem = ev.detail.tabItem;
130
- const key = ev.detail.key;
131
- const index = this.tabItems.indexOf(tabItem);
132
- if (key === "ArrowLeft" || key === "ArrowRight") {
133
- this.handleLeftRightArrow(index, key);
134
- }
135
- if (key === "ArrowDown" || key === "ArrowUp") {
136
- this.handleUpDownArrow(key);
137
- }
138
- }
139
- handleLeftRightArrow(index, key) {
140
- if (key) {
141
- index = key === "ArrowLeft" ? index - 1 : index + 1;
142
- }
143
- if (index < 0) {
144
- index = this.tabItems.length - 1;
145
- }
146
- else if (index === this.tabItems.length) {
147
- index = 0;
148
- }
149
- const tabToFocus = this.tabItems[index];
150
- this.getLinkEl(tabToFocus).focus();
151
- }
152
- handleUpDownArrow(key) {
153
- if (key === "ArrowDown") {
154
- // Focus panel when arrow down is pressed
155
- if (this.selectedTab) {
156
- const tabPanel = this.getPanel(this.selectedTab); //Find the currently displayed tab panel
157
- if (tabPanel) {
158
- tabPanel.focus();
159
- }
160
- }
161
- }
162
- }
163
- /**
164
- * Change layout if parent size drops below tab list width
165
- */
166
- setLayout() {
167
- this.debouncedSetLayout();
168
- }
169
- renderMenuOrTabs() {
170
- if (this.menuLayout) {
171
- this.hideItems();
172
- return (h("wm-select", { label: "Tab Selection", "label-position": "none" }, this.renderOptions()));
173
- }
174
- else {
175
- this.showItems();
176
- let margins = {};
177
- if (this.customPadding) {
178
- margins = {
179
- "margin-left": "-" + this.customPadding,
180
- };
181
- }
182
- return (h("ul", { class: `tabcontainer ${this.customBackground || ""}`, style: margins, role: "tablist" }, h("slot", null)));
183
- }
184
- }
185
- renderOptions() {
186
- return this.tabItems.map((t) => (h("wm-option", { id: `tab-link-${t.tabId}`, selected: t.tabId === this.selectedTab, onClick: (ev) => {
187
- ev.preventDefault();
188
- this.tabSelected.emit({ tabId: t.tabId });
189
- } }, t.textContent)));
190
- }
191
- render() {
192
- return h(Host, { class: this.menuLayout ? "menu" : "" }, this.renderMenuOrTabs());
193
- }
194
- get el() { return getElement(this); }
195
- static get watchers() { return {
196
- "selectedTab": ["setSelected"]
197
- }; }
198
- };
199
- TabList.style = wmTabListCss;
200
-
201
- export { TabList as wm_tab_list };
@@ -1,38 +0,0 @@
1
- import { r as registerInstance, e as createEvent, h, f as Host, g as getElement } from './index-e34aa595.js';
2
- import { g as generateId } from './functions-316c1b23.js';
3
-
4
- const wmTabPanelCss = "wm-tab-panel{visibility:inherit}wm-tab-panel.tab-hidden{display:none}wm-tab-panel:active{outline:none}wm-tab-panel:focus{outline:none}wm-tab-panel.user-is-tabbing:focus{outline:-webkit-focus-ring-color auto 5px}";
5
-
6
- const TabPanel = class {
7
- constructor(hostRef) {
8
- registerInstance(this, hostRef);
9
- this.tabPanelLoaded = createEvent(this, "tabPanelLoaded", 7);
10
- /**
11
- * Indicates whether the panel should be displayed or not.
12
- */
13
- this.active = false;
14
- /**
15
- * The id of the panel, linked to a tabItem in the tablist.
16
- */
17
- this.tabId = "";
18
- }
19
- componentWillLoad() {
20
- !this.el.id && this.el.setAttribute("id", generateId());
21
- }
22
- componentDidLoad() {
23
- this.tabPanelLoaded.emit({ tabId: this.tabId });
24
- }
25
- toggleTabbingOn() {
26
- this.el.classList.add("user-is-tabbing");
27
- }
28
- toggleTabbingOff() {
29
- this.el.classList.remove("user-is-tabbing");
30
- }
31
- render() {
32
- return (h(Host, { role: "tabpanel", "aria-hidden": this.active ? "false" : "true", class: { "tab-hidden": !this.active }, onBlur: () => (this.el.tabIndex = -1), tabIndex: -1 }));
33
- }
34
- get el() { return getElement(this); }
35
- };
36
- TabPanel.style = wmTabPanelCss;
37
-
38
- export { TabPanel as wm_tab_panel };