@watermarkinsights/ripple 0.0.0 → 3.0.1-1
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/{esm/app-globals-18876ad3.js → ripple/app-globals-b5693c90.js} +1 -1
- package/dist/{componentlibrary → ripple}/css-shim-bbdf0cc6.js +0 -0
- package/dist/{componentlibrary → ripple}/dom-1f98a75f.js +0 -0
- package/dist/{componentlibrary → ripple}/functions-316c1b23.js +0 -0
- package/dist/{componentlibrary → ripple}/http-service-5d037e16.js +0 -0
- package/dist/{esm/index-d5997567.js → ripple/index-20b65f86.js} +3 -3
- package/dist/ripple/index.esm.js +1 -0
- package/dist/{componentlibrary → ripple}/interfaces-50753346.js +0 -0
- package/dist/{componentlibrary → ripple}/priv-chart-popover.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/priv-datepicker.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/priv-navigator-button.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/priv-navigator-item.entry.js +1 -1
- package/dist/{componentlibrary/componentlibrary.css → ripple/ripple.css} +0 -0
- package/dist/ripple/ripple.esm.js +125 -0
- package/dist/{componentlibrary → ripple}/shadow-css-67b66845.js +0 -0
- package/dist/{esm → ripple}/wm-action-menu.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/wm-button.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/wm-chart-slice.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/wm-chart.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/wm-datepicker.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/wm-input.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/wm-menuitem.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/wm-modal-footer.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/wm-modal-header.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/wm-modal.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/wm-navigator.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/wm-network-uploader.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/wm-option.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/wm-pagination.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/wm-search.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/wm-select.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/wm-snackbar.entry.js +1 -1
- package/dist/{esm → ripple}/wm-tab-item.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/wm-tab-list.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/wm-tab-panel.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/wm-tag-input.entry.js +31 -6
- package/dist/{componentlibrary → ripple}/wm-timepicker.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/wm-toggletip.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/wm-uploader.entry.js +1 -1
- package/dist/{componentlibrary → ripple}/wm-wrapper.entry.js +1 -1
- package/dist/types/components/wm-tag-input/{wm-tag-input.d.ts → wm-tag-input.d.ts~ds312_tagInputMaxTags} +4 -0
- package/dist/types/{components.d.ts → components.d.ts~ds312_tagInputMaxTags} +2 -0
- package/dist/types/{stencil-public-runtime.d.ts → stencil-public-runtime.d.ts~ds312_tagInputMaxTags} +0 -0
- package/package.json +3 -3
- package/dist/cjs/app-globals-6b0c6e80.js +0 -110
- package/dist/cjs/app-globals-f1dd8fda.js +0 -47
- package/dist/cjs/componentlibrary.cjs.js +0 -20
- package/dist/cjs/css-shim-a7379e2b.js +0 -6
- package/dist/cjs/dom-3e7d9c3b.js +0 -75
- package/dist/cjs/functions-65513c61.js +0 -8360
- package/dist/cjs/functions-f2333f02.js +0 -6129
- package/dist/cjs/global-6849642d.js +0 -38
- package/dist/cjs/http-service-494d81de.js +0 -57
- package/dist/cjs/http-service-9e8c4dd5.js +0 -57
- package/dist/cjs/index-298ebef1.js +0 -2976
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/interfaces-a3338581.js +0 -35
- package/dist/cjs/interfaces-b2beb752.js +0 -54
- package/dist/cjs/loader.cjs.js +0 -22
- package/dist/cjs/priv-chart-popover.cjs.entry.js +0 -89
- package/dist/cjs/priv-datepicker.cjs.entry.js +0 -672
- package/dist/cjs/priv-navigator-button.cjs.entry.js +0 -29
- package/dist/cjs/priv-navigator-item.cjs.entry.js +0 -34
- package/dist/cjs/shadow-css-09555044.js +0 -391
- package/dist/cjs/wm-action-menu.cjs.entry.js +0 -206
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +0 -318
- package/dist/cjs/wm-button.cjs.entry.js +0 -152
- package/dist/cjs/wm-chart-slice.cjs.entry.js +0 -22
- package/dist/cjs/wm-chart.cjs.entry.js +0 -508
- package/dist/cjs/wm-datepicker.cjs.entry.js +0 -262
- package/dist/cjs/wm-input.cjs.entry.js +0 -110
- package/dist/cjs/wm-menuitem.cjs.entry.js +0 -118
- package/dist/cjs/wm-modal-footer.cjs.entry.js +0 -43
- package/dist/cjs/wm-modal-header.cjs.entry.js +0 -45
- package/dist/cjs/wm-modal.cjs.entry.js +0 -149
- package/dist/cjs/wm-navigator.cjs.entry.js +0 -279
- package/dist/cjs/wm-network-uploader.cjs.entry.js +0 -431
- package/dist/cjs/wm-option.cjs.entry.js +0 -123
- package/dist/cjs/wm-option_2.cjs.entry.js +0 -483
- package/dist/cjs/wm-pagination.cjs.entry.js +0 -176
- package/dist/cjs/wm-search.cjs.entry.js +0 -231
- package/dist/cjs/wm-select.cjs.entry.js +0 -366
- package/dist/cjs/wm-snackbar.cjs.entry.js +0 -160
- package/dist/cjs/wm-tab-item.cjs.entry.js +0 -82
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +0 -316
- package/dist/cjs/wm-tab-list.cjs.entry.js +0 -205
- package/dist/cjs/wm-tab-panel.cjs.entry.js +0 -42
- package/dist/cjs/wm-tag-input.cjs.entry.js +0 -513
- package/dist/cjs/wm-timepicker.cjs.entry.js +0 -386
- package/dist/cjs/wm-toggletip.cjs.entry.js +0 -128
- package/dist/cjs/wm-uploader.cjs.entry.js +0 -342
- package/dist/cjs/wm-wrapper.cjs.entry.js +0 -21
- package/dist/collection/collection-manifest.json +0 -131
- package/dist/collection/components/wm-action-menu/wm-action-menu.css +0 -122
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +0 -392
- package/dist/collection/components/wm-button/wm-button.css +0 -572
- package/dist/collection/components/wm-button/wm-button.js +0 -365
- package/dist/collection/components/wm-chart/priv-chart-popover/priv-chart-popover.css +0 -132
- package/dist/collection/components/wm-chart/priv-chart-popover/priv-chart-popover.js +0 -232
- package/dist/collection/components/wm-chart/wm-chart-slice.js +0 -64
- package/dist/collection/components/wm-chart/wm-chart.css +0 -337
- package/dist/collection/components/wm-chart/wm-chart.js +0 -710
- package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.css +0 -365
- package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +0 -1003
- package/dist/collection/components/wm-datepicker/wm-datepicker.css +0 -211
- package/dist/collection/components/wm-datepicker/wm-datepicker.js +0 -445
- package/dist/collection/components/wm-input/wm-input.css +0 -220
- package/dist/collection/components/wm-input/wm-input.js +0 -302
- package/dist/collection/components/wm-menuitem/wm-menuitem.css +0 -118
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +0 -411
- package/dist/collection/components/wm-modal/wm-modal-footer.css +0 -84
- package/dist/collection/components/wm-modal/wm-modal-footer.js +0 -159
- package/dist/collection/components/wm-modal/wm-modal-header.css +0 -78
- package/dist/collection/components/wm-modal/wm-modal-header.js +0 -109
- package/dist/collection/components/wm-modal/wm-modal.css +0 -155
- package/dist/collection/components/wm-modal/wm-modal.js +0 -356
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.css +0 -94
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +0 -97
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.css +0 -67
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +0 -114
- package/dist/collection/components/wm-navigator/wm-navigator.css +0 -137
- package/dist/collection/components/wm-navigator/wm-navigator.js +0 -468
- package/dist/collection/components/wm-option/wm-option.css +0 -162
- package/dist/collection/components/wm-option/wm-option.js +0 -394
- package/dist/collection/components/wm-pagination/wm-pagination.css +0 -217
- package/dist/collection/components/wm-pagination/wm-pagination.js +0 -348
- package/dist/collection/components/wm-search/wm-search.css +0 -155
- package/dist/collection/components/wm-search/wm-search.js +0 -439
- package/dist/collection/components/wm-select/wm-select.css +0 -315
- package/dist/collection/components/wm-select/wm-select.js +0 -676
- package/dist/collection/components/wm-snackbar/wm-snackbar.css +0 -331
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +0 -240
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +0 -104
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +0 -202
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.css +0 -73
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +0 -315
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.css +0 -57
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +0 -104
- package/dist/collection/components/wm-tag-input/wm-tag-input.css +0 -408
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +0 -707
- package/dist/collection/components/wm-timepicker/wm-timepicker.css +0 -370
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +0 -567
- package/dist/collection/components/wm-toggletip/wm-toggletip.css +0 -350
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +0 -217
- package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.css +0 -642
- package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +0 -753
- package/dist/collection/components/wm-uploader/wm-uploader.css +0 -666
- package/dist/collection/components/wm-uploader/wm-uploader.js +0 -673
- package/dist/collection/components/wm-wrapper/wm-wrapper.js +0 -27
- package/dist/collection/dev/scripts.js +0 -20
- package/dist/collection/global/__mocks__/functions.js +0 -5
- package/dist/collection/global/functions.js +0 -420
- package/dist/collection/global/global.js +0 -39
- package/dist/collection/global/interfaces.js +0 -49
- package/dist/collection/global/services/__mocks__/http-service.js +0 -130
- package/dist/collection/global/services/http-service.js +0 -50
- package/dist/collection/lang/lang.js +0 -5
- package/dist/collection/lang/piglatin.js +0 -93
- package/dist/componentlibrary/app-globals-18876ad3.js +0 -45
- package/dist/componentlibrary/app-globals-307a1083.js +0 -108
- package/dist/componentlibrary/componentlibrary.esm.js +0 -1
- package/dist/componentlibrary/index-d5997567.js +0 -2938
- package/dist/componentlibrary/index.esm.js +0 -0
- package/dist/componentlibrary/p-01bdfed8.js +0 -16
- package/dist/componentlibrary/p-0ca70ed4.entry.js +0 -1
- package/dist/componentlibrary/p-126bde92.entry.js +0 -1
- package/dist/componentlibrary/p-12a67d93.entry.js +0 -1
- package/dist/componentlibrary/p-188deaf5.entry.js +0 -1
- package/dist/componentlibrary/p-2514df6f.entry.js +0 -1
- package/dist/componentlibrary/p-269b8a5f.entry.js +0 -1
- package/dist/componentlibrary/p-35e57079.entry.js +0 -1
- package/dist/componentlibrary/p-414e20f7.entry.js +0 -1
- package/dist/componentlibrary/p-43f1298b.js +0 -1
- package/dist/componentlibrary/p-4d387ec6.entry.js +0 -1
- package/dist/componentlibrary/p-59ba81d6.entry.js +0 -1
- package/dist/componentlibrary/p-5e3cbec8.entry.js +0 -1
- package/dist/componentlibrary/p-5e81e830.entry.js +0 -1
- package/dist/componentlibrary/p-64ff5040.js +0 -1
- package/dist/componentlibrary/p-68a871d3.entry.js +0 -1
- package/dist/componentlibrary/p-996a7395.entry.js +0 -1
- package/dist/componentlibrary/p-9b460452.entry.js +0 -1
- package/dist/componentlibrary/p-a416e410.entry.js +0 -1
- package/dist/componentlibrary/p-d550a94f.entry.js +0 -1
- package/dist/componentlibrary/p-e4735c23.entry.js +0 -1
- package/dist/componentlibrary/p-e725f388.entry.js +0 -1
- package/dist/componentlibrary/p-e9532ae5.entry.js +0 -1
- package/dist/componentlibrary/p-edf6f848.entry.js +0 -1
- package/dist/componentlibrary/p-fd8070fb.js +0 -1
- package/dist/componentlibrary/wm-action-menu.entry.js +0 -202
- package/dist/componentlibrary/wm-tab-item.entry.js +0 -78
- package/dist/esm/app-globals-307a1083.js +0 -108
- package/dist/esm/componentlibrary.js +0 -18
- package/dist/esm/css-shim-bbdf0cc6.js +0 -4
- package/dist/esm/dom-1f98a75f.js +0 -73
- package/dist/esm/functions-316c1b23.js +0 -8340
- package/dist/esm/functions-60034bf7.js +0 -6109
- package/dist/esm/global-430cb201.js +0 -36
- package/dist/esm/http-service-3dc3b3e7.js +0 -52
- package/dist/esm/http-service-5d037e16.js +0 -52
- package/dist/esm/index.js +0 -1
- package/dist/esm/interfaces-2b97fab2.js +0 -32
- package/dist/esm/interfaces-50753346.js +0 -51
- package/dist/esm/loader.js +0 -18
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/priv-chart-popover.entry.js +0 -85
- package/dist/esm/priv-datepicker.entry.js +0 -668
- package/dist/esm/priv-navigator-button.entry.js +0 -25
- package/dist/esm/priv-navigator-item.entry.js +0 -30
- package/dist/esm/shadow-css-67b66845.js +0 -389
- package/dist/esm/wm-action-menu_2.entry.js +0 -313
- package/dist/esm/wm-button.entry.js +0 -148
- package/dist/esm/wm-chart-slice.entry.js +0 -18
- package/dist/esm/wm-chart.entry.js +0 -504
- package/dist/esm/wm-datepicker.entry.js +0 -258
- package/dist/esm/wm-input.entry.js +0 -106
- package/dist/esm/wm-menuitem.entry.js +0 -114
- package/dist/esm/wm-modal-footer.entry.js +0 -39
- package/dist/esm/wm-modal-header.entry.js +0 -41
- package/dist/esm/wm-modal.entry.js +0 -145
- package/dist/esm/wm-navigator.entry.js +0 -275
- package/dist/esm/wm-network-uploader.entry.js +0 -427
- package/dist/esm/wm-option.entry.js +0 -119
- package/dist/esm/wm-option_2.entry.js +0 -478
- package/dist/esm/wm-pagination.entry.js +0 -172
- package/dist/esm/wm-search.entry.js +0 -227
- package/dist/esm/wm-select.entry.js +0 -362
- package/dist/esm/wm-snackbar.entry.js +0 -156
- package/dist/esm/wm-tab-item_3.entry.js +0 -310
- package/dist/esm/wm-tab-list.entry.js +0 -201
- package/dist/esm/wm-tab-panel.entry.js +0 -38
- package/dist/esm/wm-tag-input.entry.js +0 -509
- package/dist/esm/wm-timepicker.entry.js +0 -382
- package/dist/esm/wm-toggletip.entry.js +0 -124
- package/dist/esm/wm-uploader.entry.js +0 -338
- package/dist/esm/wm-wrapper.entry.js +0 -17
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/loader/cdn.js +0 -3
- package/dist/loader/index.cjs.js +0 -3
- package/dist/loader/index.d.ts +0 -13
- package/dist/loader/index.es2017.js +0 -3
- package/dist/loader/index.js +0 -4
- package/dist/loader/package.json +0 -10
- package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +0 -43
- package/dist/types/components/wm-button/wm-button.d.ts +0 -36
- package/dist/types/components/wm-chart/priv-chart-popover/priv-chart-popover.d.ts +0 -23
- package/dist/types/components/wm-chart/wm-chart-slice.d.ts +0 -8
- package/dist/types/components/wm-chart/wm-chart.d.ts +0 -77
- package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +0 -75
- package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +0 -39
- package/dist/types/components/wm-input/wm-input.d.ts +0 -30
- package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +0 -30
- package/dist/types/components/wm-modal/wm-modal-footer.d.ts +0 -15
- package/dist/types/components/wm-modal/wm-modal-header.d.ts +0 -12
- package/dist/types/components/wm-modal/wm-modal.d.ts +0 -34
- package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +0 -10
- package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +0 -13
- package/dist/types/components/wm-navigator/wm-navigator.d.ts +0 -61
- package/dist/types/components/wm-option/wm-option.d.ts +0 -28
- package/dist/types/components/wm-pagination/wm-pagination.d.ts +0 -31
- package/dist/types/components/wm-search/wm-search.d.ts +0 -78
- package/dist/types/components/wm-select/wm-select.d.ts +0 -63
- package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +0 -32
- package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +0 -35
- package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +0 -50
- package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +0 -20
- package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +0 -59
- package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +0 -25
- package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +0 -85
- package/dist/types/components/wm-uploader/wm-uploader.d.ts +0 -75
- package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +0 -7
- package/dist/types/global/__mocks__/functions.d.ts +0 -5
- package/dist/types/global/global.d.ts +0 -1
- package/dist/types/global/interfaces.d.ts +0 -33
- package/dist/types/global/services/__mocks__/http-service.d.ts +0 -6
- package/dist/types/global/services/http-service.d.ts +0 -4
- package/dist/types/lang/lang.d.ts +0 -5
|
@@ -1,318 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-e5aef9f9.js');
|
|
6
|
-
const functions = require('./functions-f2333f02.js');
|
|
7
|
-
const interfaces = require('./interfaces-a3338581.js');
|
|
8
|
-
|
|
9
|
-
const wmActionMenuCss = ":host{position:relative;display:inline-block;width:-moz-fit-content;width:fit-content;color:#575195;font-family:inherit}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host(:focus){outline:none}wm-action-menu:focus{outline:none}.dropdown{position:absolute;padding:0;margin:0.25rem 0;border-radius:3px 3px 3px 3px;min-width:11.4375rem;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;transition:transform 0.25s ease;-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;visibility:hidden;-webkit-box-shadow:0 3px 14px 3px rgba(5, 3, 3, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 3px 14px 3px rgba(5, 3, 3, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 3px 14px 3px rgba(5, 3, 3, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);background:#fff;z-index:10;text-align:left;white-space:nowrap}.dropdown:focus{outline:none}.dropdown.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1);visibility:visible}.dropdown.open-up{bottom:2.5rem;top:auto;-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}.dropdown.right{left:0}.dropdown.left{right:0}";
|
|
10
|
-
|
|
11
|
-
const ActionMenu = class {
|
|
12
|
-
constructor(hostRef) {
|
|
13
|
-
index.registerInstance(this, hostRef);
|
|
14
|
-
this.menuLoaded = index.createEvent(this, "menuLoaded", 7);
|
|
15
|
-
this.openUp = false;
|
|
16
|
-
this.isExpanded = false;
|
|
17
|
-
this.buttonType = "icon";
|
|
18
|
-
this.disabled = false;
|
|
19
|
-
this.keysSoFar = "";
|
|
20
|
-
this.searchIndex = 0;
|
|
21
|
-
this.keyClear = null;
|
|
22
|
-
}
|
|
23
|
-
get horizontalPosition() {
|
|
24
|
-
return !!this.el && !!this.itemsEl && functions.shouldShiftRight(this.el, this.itemsEl) ? "right" : "left";
|
|
25
|
-
}
|
|
26
|
-
get childItems() {
|
|
27
|
-
return Array.from(this.el.querySelectorAll("wm-menuitem"));
|
|
28
|
-
}
|
|
29
|
-
handleClickedItem() {
|
|
30
|
-
this.close();
|
|
31
|
-
}
|
|
32
|
-
handleKeyUp(ev) {
|
|
33
|
-
this.moveUp(ev.target);
|
|
34
|
-
}
|
|
35
|
-
handleKeyDown(ev) {
|
|
36
|
-
this.moveDown(ev.detail);
|
|
37
|
-
}
|
|
38
|
-
handleHomeKey() {
|
|
39
|
-
this.focusFirstItem();
|
|
40
|
-
}
|
|
41
|
-
handleEndKey() {
|
|
42
|
-
this.focusLastItem();
|
|
43
|
-
}
|
|
44
|
-
handleTabKey() {
|
|
45
|
-
if (this.isExpanded) {
|
|
46
|
-
this.close();
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
handleEscKey() {
|
|
50
|
-
this.close();
|
|
51
|
-
this.wmButtonEl.focus();
|
|
52
|
-
}
|
|
53
|
-
blurHandler(ev) {
|
|
54
|
-
const isElOrChild = ev.target === this.el || this.el.contains(ev.target);
|
|
55
|
-
if (!isElOrChild && this.isExpanded) {
|
|
56
|
-
this.close();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
handleKey(ev) {
|
|
60
|
-
switch (ev.key) {
|
|
61
|
-
case "ArrowDown":
|
|
62
|
-
if (!this.isExpanded) {
|
|
63
|
-
ev.preventDefault();
|
|
64
|
-
this.open();
|
|
65
|
-
window.requestAnimationFrame(() => this.focusFirstItem());
|
|
66
|
-
}
|
|
67
|
-
break;
|
|
68
|
-
case "ArrowUp":
|
|
69
|
-
if (!this.isExpanded) {
|
|
70
|
-
ev.preventDefault();
|
|
71
|
-
this.open();
|
|
72
|
-
window.requestAnimationFrame(() => this.focusLastItem());
|
|
73
|
-
}
|
|
74
|
-
break;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
componentWillLoad() {
|
|
78
|
-
this.uid = this.el.id ? this.el.id : functions.generateId();
|
|
79
|
-
this.el.focus = function () {
|
|
80
|
-
if (!this.disabled) {
|
|
81
|
-
const button = this.shadowRoot.querySelector("wm-button");
|
|
82
|
-
button && button.focus();
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
componentDidLoad() {
|
|
87
|
-
if (this.childItems.length === 0) {
|
|
88
|
-
console.error("wm-action-menu should have wm-menuitem elements as children");
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
this.focusFirstItem();
|
|
92
|
-
}
|
|
93
|
-
if (this.buttonType !== "icon" && !this.buttonText) {
|
|
94
|
-
console.error("wm-action-menu should have a valid button-text property when button-type is set to 'text' or 'selector'");
|
|
95
|
-
}
|
|
96
|
-
if (this.buttonType === "icon" && !this.tooltip) {
|
|
97
|
-
console.error("wm-action-menu should have a valid tooltip when button-type is set to 'icon'");
|
|
98
|
-
}
|
|
99
|
-
this.menuLoaded.emit();
|
|
100
|
-
}
|
|
101
|
-
moveUp(el) {
|
|
102
|
-
const index = this.childItems.indexOf(el);
|
|
103
|
-
if (index === 0) {
|
|
104
|
-
this.focusLastItem();
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
this.focusItem(this.childItems[index - 1]);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
moveDown(el) {
|
|
111
|
-
const index = this.childItems.indexOf(el);
|
|
112
|
-
if (index === this.childItems.length - 1) {
|
|
113
|
-
this.focusFirstItem();
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
this.focusItem(this.childItems[index + 1]);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
open() {
|
|
120
|
-
if (!this.disabled) {
|
|
121
|
-
this.openUp = functions.shouldOpenUp(this.el, this.itemsEl);
|
|
122
|
-
// action menu usually is on the right side of the screen,
|
|
123
|
-
// so dropdown opens to the left (is anchored on the right corner)
|
|
124
|
-
// if there is not enough space on the left and enough on the right though,
|
|
125
|
-
// it will open on the right side
|
|
126
|
-
this.isExpanded = true;
|
|
127
|
-
this.itemsEl.classList.remove("hidden");
|
|
128
|
-
window.requestAnimationFrame(() => this.focusFirstItem());
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
close() {
|
|
132
|
-
this.isExpanded = false;
|
|
133
|
-
this.childItems.forEach((i) => (i.focused = false));
|
|
134
|
-
window.setTimeout(() => {
|
|
135
|
-
this.itemsEl.classList.add("hidden");
|
|
136
|
-
}, 150);
|
|
137
|
-
window.setTimeout(() => {
|
|
138
|
-
// if dev omits to assign focus after an action is triggered,
|
|
139
|
-
// the component brings the focus back on the button
|
|
140
|
-
// Focus will only be lost (and go to the body) once the menuitem
|
|
141
|
-
// is not visible anymore, so we need to wait for the transition to
|
|
142
|
-
// finish and the hidden class to be applied.
|
|
143
|
-
// also checking if focus stayed on the menuitem
|
|
144
|
-
if (document.activeElement.tagName === "BODY" || document.activeElement.tagName === "WM-MENUITEM") {
|
|
145
|
-
this.wmButtonEl.focus();
|
|
146
|
-
}
|
|
147
|
-
}, 250);
|
|
148
|
-
}
|
|
149
|
-
focusItem(item) {
|
|
150
|
-
this.childItems.map((i) => (i.focused = i === item));
|
|
151
|
-
item.focus && item.focus();
|
|
152
|
-
}
|
|
153
|
-
focusFirstItem() {
|
|
154
|
-
this.focusItem(this.childItems[0]);
|
|
155
|
-
}
|
|
156
|
-
focusLastItem() {
|
|
157
|
-
this.focusItem(this.childItems[this.childItems.length - 1]);
|
|
158
|
-
}
|
|
159
|
-
findAndFocusItem(ev) {
|
|
160
|
-
const character = ev.detail.toUpperCase();
|
|
161
|
-
this.focusFirstItem();
|
|
162
|
-
if (!this.keysSoFar) {
|
|
163
|
-
for (var i = 0; i < this.childItems.length; i++) {
|
|
164
|
-
if (this.childItems[i] === document.activeElement) {
|
|
165
|
-
this.searchIndex = i;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
this.keysSoFar += character;
|
|
170
|
-
this.clearKeysSoFarAfterDelay();
|
|
171
|
-
var nextMatch = this.findMatchInRange(this.childItems, this.searchIndex + 1, this.childItems.length);
|
|
172
|
-
if (!nextMatch) {
|
|
173
|
-
nextMatch = this.findMatchInRange(this.childItems, 0, this.searchIndex);
|
|
174
|
-
}
|
|
175
|
-
if (nextMatch) {
|
|
176
|
-
this.focusItem(nextMatch);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
clearKeysSoFarAfterDelay() {
|
|
180
|
-
if (this.keyClear) {
|
|
181
|
-
window.clearTimeout(this.keyClear);
|
|
182
|
-
this.keyClear = null;
|
|
183
|
-
}
|
|
184
|
-
this.keyClear = window.setTimeout(function () {
|
|
185
|
-
this.keysSoFar = "";
|
|
186
|
-
this.keyClear = null;
|
|
187
|
-
}.bind(this), 500);
|
|
188
|
-
}
|
|
189
|
-
findMatchInRange(list, startIndex, endIndex) {
|
|
190
|
-
// Find the first item starting with the keysSoFar substring, searching in
|
|
191
|
-
// the specified range of items
|
|
192
|
-
for (var n = startIndex; n < endIndex; n++) {
|
|
193
|
-
var label = list[n].innerText;
|
|
194
|
-
if (label && label.toUpperCase().indexOf(this.keysSoFar) === 0) {
|
|
195
|
-
return list[n];
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
return null;
|
|
199
|
-
}
|
|
200
|
-
render() {
|
|
201
|
-
return (index.h(index.Host, null, index.h("div", { class: functions.getTextDir() }, index.h("wm-button", { "button-style": `${this.buttonType}only`, tooltip: this.tooltip, "label-for-identical-buttons": this.labelForIdenticalButtons, icon: this.buttonType === "icon" ? "f1d9" : "", id: `menubtn-${this.uid}`, onClick: () => (this.isExpanded ? this.close() : this.open()), disabled: this.disabled, ref: (el) => (this.wmButtonEl = el), "tooltip-position": this.tooltipPosition || this.horizontalPosition, "aria-haspopup": "true", "aria-expanded": this.isExpanded ? "true" : "false", "aria-controls": `menu-${this.uid}` }, this.buttonText), index.h("div", { class: `dropdown ${this.openUp ? "open-up" : ""} ${this.horizontalPosition} ${this.isExpanded ? "open" : ""} hidden`, id: `menu-${this.uid}`, tabindex: -1, role: "menu", ref: (el) => (this.itemsEl = el) }, index.h("slot", null)))));
|
|
202
|
-
}
|
|
203
|
-
get el() { return index.getElement(this); }
|
|
204
|
-
};
|
|
205
|
-
ActionMenu.style = wmActionMenuCss;
|
|
206
|
-
|
|
207
|
-
const wmMenuitemCss = ":host,wm-menuitem{contain:content;font-family:inherit}:host .wrapper,wm-menuitem .wrapper{display:block;min-width:8.75rem;cursor:pointer;padding:1.25rem;border-radius:0px 0px 0px 0px;background:#fff;font-family:inherit;font-weight:500;list-style:none;border-bottom:2px solid rgba(46, 27, 70, 0.05);color:#575195;font-weight:700}:host .wrapper:focus,:host .wrapper.focus,wm-menuitem .wrapper:focus,wm-menuitem .wrapper.focus{outline:none;background:#f4f3f6}:host .wrapper:hover,wm-menuitem .wrapper:hover{background:#f4f3f6;outline:none}:host .wrapper .description,wm-menuitem .wrapper .description{color:#4a4a4a;font-size:0.875rem;padding-top:0.5rem;white-space:normal;font-weight:400}:host .wrapper[aria-disabled=true],wm-menuitem .wrapper[aria-disabled=true]{font-style:italic;color:#6b6b6b}:host .wrapper:not(:last-child),wm-menuitem .wrapper:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host ::slotted,wm-menuitem ::slotted{font-family:inherit}:host .mdi,wm-menuitem .mdi{display:inline-block;font:normal normal normal 24px/1 \"Material Design Icons\";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;margin-right:0.625rem;pointer-events:none}:host(:focus),wm-menuitem:focus{outline:none;background:#f4f3f6}:host([aria-disabled=true]),wm-menuitem[aria-disabled=true]{pointer-events:none}";
|
|
208
|
-
|
|
209
|
-
const Menuitem = class {
|
|
210
|
-
constructor(hostRef) {
|
|
211
|
-
index.registerInstance(this, hostRef);
|
|
212
|
-
this.wmMenuitemClicked = index.createEvent(this, "wmMenuitemClicked", 7);
|
|
213
|
-
this.wmKeyUpPressed = index.createEvent(this, "wmKeyUpPressed", 7);
|
|
214
|
-
this.wmKeyDownPressed = index.createEvent(this, "wmKeyDownPressed", 7);
|
|
215
|
-
this.wmEscKeyPressed = index.createEvent(this, "wmEscKeyPressed", 7);
|
|
216
|
-
this.wmHomeKeyPressed = index.createEvent(this, "wmHomeKeyPressed", 7);
|
|
217
|
-
this.wmEndKeyPressed = index.createEvent(this, "wmEndKeyPressed", 7);
|
|
218
|
-
this.wmPageDownItems = index.createEvent(this, "wmPageDownItems", 7);
|
|
219
|
-
this.wmPageUpItems = index.createEvent(this, "wmPageUpItems", 7);
|
|
220
|
-
this.wmTabKeyPressed = index.createEvent(this, "wmTabKeyPressed", 7);
|
|
221
|
-
this.wmLetterPressed = index.createEvent(this, "wmLetterPressed", 7);
|
|
222
|
-
this.disabled = false;
|
|
223
|
-
this.focused = false;
|
|
224
|
-
this.icon = undefined;
|
|
225
|
-
this.description = undefined;
|
|
226
|
-
this.descriptionCharLimit = 100;
|
|
227
|
-
this.isKeying = false;
|
|
228
|
-
}
|
|
229
|
-
toggleKeyingOn() {
|
|
230
|
-
this.isKeying = true;
|
|
231
|
-
}
|
|
232
|
-
toggleKeyingOff() {
|
|
233
|
-
this.isKeying = false;
|
|
234
|
-
}
|
|
235
|
-
handleKeydown(ev) {
|
|
236
|
-
switch (ev.key) {
|
|
237
|
-
case "ArrowUp":
|
|
238
|
-
ev.preventDefault();
|
|
239
|
-
this.wmKeyUpPressed.emit(this.el);
|
|
240
|
-
break;
|
|
241
|
-
case "ArrowDown":
|
|
242
|
-
ev.preventDefault();
|
|
243
|
-
this.wmKeyDownPressed.emit(this.el);
|
|
244
|
-
break;
|
|
245
|
-
case "Enter":
|
|
246
|
-
ev.preventDefault();
|
|
247
|
-
if (!this.disabled) {
|
|
248
|
-
this.el.click();
|
|
249
|
-
}
|
|
250
|
-
break;
|
|
251
|
-
case "Escape":
|
|
252
|
-
ev.preventDefault();
|
|
253
|
-
ev.stopPropagation(); // prevents closing of parent modal
|
|
254
|
-
this.wmEscKeyPressed.emit();
|
|
255
|
-
break;
|
|
256
|
-
case "Home":
|
|
257
|
-
ev.preventDefault();
|
|
258
|
-
this.wmHomeKeyPressed.emit();
|
|
259
|
-
break;
|
|
260
|
-
case "End":
|
|
261
|
-
ev.preventDefault();
|
|
262
|
-
this.wmEndKeyPressed.emit();
|
|
263
|
-
break;
|
|
264
|
-
case "Tab":
|
|
265
|
-
this.wmTabKeyPressed.emit();
|
|
266
|
-
break;
|
|
267
|
-
default:
|
|
268
|
-
ev.preventDefault();
|
|
269
|
-
this.wmLetterPressed.emit(ev.key);
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
handleClick() {
|
|
273
|
-
if (!this.disabled) {
|
|
274
|
-
this.wmMenuitemClicked.emit();
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
setOnClick() {
|
|
278
|
-
if (this.disabled && this.el.onclick) {
|
|
279
|
-
this.onClickFunc = this.el.onclick;
|
|
280
|
-
this.el.onclick = null;
|
|
281
|
-
}
|
|
282
|
-
else if (!this.disabled && this.onClickFunc) {
|
|
283
|
-
this.el.onclick = this.onClickFunc;
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
componentWillLoad() {
|
|
287
|
-
if (this.icon) {
|
|
288
|
-
// in case a name was passed instead of a code, convert it to code (for backwards compatibility)
|
|
289
|
-
this.icon = interfaces.getIconCodeFromName(this.icon);
|
|
290
|
-
}
|
|
291
|
-
if (this.description) {
|
|
292
|
-
if (this.description.length > this.descriptionCharLimit) {
|
|
293
|
-
console.error(`wm-menuitem description is above the character limit of ${this.descriptionCharLimit}`);
|
|
294
|
-
}
|
|
295
|
-
if (this.icon) {
|
|
296
|
-
console.error("wm-menuitems with descriptions do not support the use of icons");
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
this.setOnClick();
|
|
300
|
-
}
|
|
301
|
-
componentDidLoad() {
|
|
302
|
-
if (this.icon) {
|
|
303
|
-
this.iconEl.classList.add("mdi");
|
|
304
|
-
this.iconEl.innerHTML = `&#x${this.icon};`;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
render() {
|
|
308
|
-
return (index.h(index.Host, { tabindex: -1, role: "menuitem", "aria-disabled": this.disabled ? "true" : null }, index.h("div", { class: `wrapper ${this.focused && this.isKeying ? "focus" : ""}`, "aria-disabled": this.disabled ? "true" : null }, index.h("span", { ref: (el) => (this.iconEl = el) }), index.h("slot", null), this.description ? index.h("div", { class: "description" }, this.description) : "")));
|
|
309
|
-
}
|
|
310
|
-
get el() { return index.getElement(this); }
|
|
311
|
-
static get watchers() { return {
|
|
312
|
-
"disabled": ["setOnClick"]
|
|
313
|
-
}; }
|
|
314
|
-
};
|
|
315
|
-
Menuitem.style = wmMenuitemCss;
|
|
316
|
-
|
|
317
|
-
exports.wm_action_menu = ActionMenu;
|
|
318
|
-
exports.wm_menuitem = Menuitem;
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-e5aef9f9.js');
|
|
6
|
-
const interfaces = require('./interfaces-a3338581.js');
|
|
7
|
-
const functions = require('./functions-f2333f02.js');
|
|
8
|
-
|
|
9
|
-
const wmButtonCss = "@charset \"UTF-8\";:host .wm-button,wm-button .wm-button{-ms-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-moz-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;width:inherit;border:2px solid #575195;color:#575195;font-size:0.75rem;font-weight:700;height:2.75rem;padding:0 1.3333333333em;cursor:pointer;position:relative;background:#fff;display:flex;justify-content:center;align-items:center;text-decoration:none;text-transform:uppercase;letter-spacing:0.01875rem;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button,wm-button .wm-button{height:3.3333333333em}}:host .wm-button.nowrap,wm-button .wm-button.nowrap{display:inline-block;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host .wm-button:focus,wm-button .wm-button:focus{outline:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wm-button::-moz-focus-inner,wm-button .wm-button::-moz-focus-inner{border:0;outline:none}:host .wm-button.user-is-tabbing:focus:not(:disabled):not(.disabled):not(.-primary):not(.-secondary):not(.-secondary):not(.-selectoronly) .button-text,wm-button .wm-button.user-is-tabbing:focus:not(:disabled):not(.disabled):not(.-primary):not(.-secondary):not(.-secondary):not(.-selectoronly) .button-text{background:linear-gradient(90deg, #3862e9 66%, transparent 0) repeat-x;background-size:6px 3px;background-position:0 1em;border-radius:0;line-height:normal}:host .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled),wm-button .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled){-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark),wm-button .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark){-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark)::-moz-focus-inner,wm-button .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark)::-moz-focus-inner{border:0}:host .wm-button.dark:not(.-textonly):not(:disabled):not(.disabled),wm-button .wm-button.dark:not(.-textonly):not(:disabled):not(.disabled){background:transparent;border:2px solid #fff;color:#fff}:host .wm-button.dark:not(.-textonly):not(:disabled):not(.disabled):hover,wm-button .wm-button.dark:not(.-textonly):not(:disabled):not(.disabled):hover{color:#575195;background:#e6e6e6;border:2px solid #e6e6e6}:host .wm-button.dark.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled).dark,wm-button .wm-button.dark.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled).dark{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #c6b4e3;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #c6b4e3;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #c6b4e3;outline:none}:host .wm-button:active:not(:disabled):not(.disabled):not(.-textonly):not(.-actionbutton):not(.displayedoption),wm-button .wm-button:active:not(:disabled):not(.disabled):not(.-textonly):not(.-actionbutton):not(.displayedoption){-ms-transform:scale(0.9, 0.9);-webkit-transform:scale(0.9, 0.9);-moz-transform:scale(0.9, 0.9);transform:scale(0.9, 0.9)}:host .wm-button:hover,wm-button .wm-button:hover{background:#464177;color:#fff}:host .wm-button .mdi,wm-button .wm-button .mdi{display:inline-block;font:normal normal normal 24px/1 \"Material Design Icons\";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host .wm-button:not(.-icononly):not(.-navigational) .mdi,wm-button .wm-button:not(.-icononly):not(.-navigational) .mdi{margin-right:0.3125rem}:host .wm-button[dir=RTL] :not(.-icononly) .mdi,wm-button .wm-button[dir=RTL] :not(.-icononly) .mdi{margin-left:0.3125rem;margin-right:0}:host .wm-button.-primary:not(.-textonly),wm-button .wm-button.-primary:not(.-textonly){background:#575195;color:#fff}:host .wm-button.-primary:not(.-textonly):not(:focus),wm-button .wm-button.-primary:not(.-textonly):not(:focus){-webkit-box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2);box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2)}:host .wm-button.-primary:not(.-textonly):hover,wm-button .wm-button.-primary:not(.-textonly):hover{background:#464177}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled),wm-button .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled){color:#575195;background:#fff;border:2px solid #fff}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled):hover,wm-button .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled):hover{color:#575195;background:#e6e6e6;border:2px solid #e6e6e6}:host .wm-button.-textonly,wm-button .wm-button.-textonly{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:inline-block;letter-spacing:0;text-transform:none;text-align:initial;font-size:0.875rem;border:none;background:transparent;padding-left:0;padding-right:0;height:auto;border-radius:0;line-height:1}:host .wm-button.-textonly+.-textonly,wm-button .wm-button.-textonly+.-textonly{margin-left:0.3125rem}:host .wm-button.-textonly:focus,wm-button .wm-button.-textonly:focus{outline:none}:host .wm-button.-textonly::-moz-focus-inner,wm-button .wm-button.-textonly::-moz-focus-inner{border:0;outline:none}:host .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled) .button-text,wm-button .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled) .button-text{background:linear-gradient(90deg, #3862e9 66%, transparent 0) repeat-x;background-size:6px 3px;background-position:0 1em;border-radius:0;line-height:normal}:host .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled).dark .button-text,wm-button .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled).dark .button-text{background:linear-gradient(90deg, #fff 66%, transparent 0) repeat-x;background-size:6px 3px;background-position:0 1em;border-radius:0;line-height:normal}:host .wm-button.-textonly.small,wm-button .wm-button.-textonly.small{font-size:0.625rem}:host .wm-button.-textonly:hover:not(:disabled):not(.disabled):not(.-permanentlydelete),wm-button .wm-button.-textonly:hover:not(:disabled):not(.disabled):not(.-permanentlydelete){text-decoration:underline;color:#454077}:host .wm-button.-textonly.-permanentlydelete,wm-button .wm-button.-textonly.-permanentlydelete{color:#c0392b}:host .wm-button.-textonly.-permanentlydelete:hover,wm-button .wm-button.-textonly.-permanentlydelete:hover{text-decoration:underline;color:#c0392b !important}:host .wm-button.-textonly.dark,wm-button .wm-button.-textonly.dark{color:#fff}:host .wm-button.-textonly.dark:hover,wm-button .wm-button.-textonly.dark:hover{text-decoration:underline;color:#fff !important}:host .wm-button.-icononly,wm-button .wm-button.-icononly,:host .wm-button.-navigational,wm-button .wm-button.-navigational{-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;font-size:1rem;padding:0;height:auto;line-height:1;min-width:2.75rem;min-height:2.75rem;text-align:center;letter-spacing:normal}:host .wm-button.-icononly:not(:focus),wm-button .wm-button.-icononly:not(:focus),:host .wm-button.-navigational:not(:focus),wm-button .wm-button.-navigational:not(:focus){-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button.-icononly,wm-button .wm-button.-icononly,:host .wm-button.-navigational,wm-button .wm-button.-navigational{min-width:2.5rem;min-height:2.5rem}}:host .wm-button.-icononly,wm-button .wm-button.-icononly{border-width:1px !important}:host .wm-button.-icononly:before,wm-button .wm-button.-icononly:before{display:inline-block;font:normal normal normal 24px/1 \"Material Design Icons\";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host .wm-button.-navigational,wm-button .wm-button.-navigational{border:none !important;background-color:transparent}:host .wm-button.-navigational:not(.dark):not(:disabled),wm-button .wm-button.-navigational:not(.dark):not(:disabled){color:#575195}:host .wm-button.-navigational:not(.dark):not(:disabled):hover,wm-button .wm-button.-navigational:not(.dark):not(:disabled):hover,:host .wm-button.-navigational:not(.dark):not(:disabled).selected,wm-button .wm-button.-navigational:not(.dark):not(:disabled).selected{background-color:#d7d6d9}:host .wm-button.-navigational:before,wm-button .wm-button.-navigational:before{display:inline-block;font:normal normal normal 24px/1 \"Material Design Icons\";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host .wm-button.-permanentlydelete:not(.-textonly),wm-button .wm-button.-permanentlydelete:not(.-textonly){background:#c0392b;border-color:#c0392b;color:#fff}:host .wm-button.-selectoronly,wm-button .wm-button.-selectoronly{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;display:block;background:transparent;border:1px solid #575195;border-radius:3px 3px 3px 3px;height:2.75rem;min-width:11.4375rem;padding:0 1.875rem 0 0.9375rem;line-height:normal;font-family:inherit;color:#575195;font-weight:500;font-size:0.875rem;text-transform:none;letter-spacing:0.01875rem;text-align:left}@media screen and (min-width: 48rem){:host .wm-button.-selectoronly,wm-button .wm-button.-selectoronly{height:2.5rem}}:host .wm-button.-selectoronly:before,wm-button .wm-button.-selectoronly:before{display:inline-block;font:normal normal normal 24px/1 \"Material Design Icons\";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:\"\";position:absolute;right:0.5625rem;top:50%;transform:translateY(-50%);pointer-events:none}:host .wm-button.-selectoronly:hover:not(:disabled):not(.disabled),wm-button .wm-button.-selectoronly:hover:not(:disabled):not(.disabled){background:transparent;text-decoration:none}:host .wm-button.-selectoronly:active,wm-button .wm-button.-selectoronly:active{-ms-transform:scale(1, 1) !important;transform:scale(1, 1) !important}:host .wm-button.-selectoronly::-moz-focus-inner,wm-button .wm-button.-selectoronly::-moz-focus-inner{border:0}:host .wm-button.-selectoronly .overflowcontrol,wm-button .wm-button.-selectoronly .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:visible}:host .wm-button:disabled,wm-button .wm-button:disabled,:host .wm-button.disabled,wm-button .wm-button.disabled{background:inherit;border-color:#737373;color:#737373;cursor:default;pointer-events:none}:host .wm-button:disabled.dark,wm-button .wm-button:disabled.dark,:host .wm-button.disabled.dark,wm-button .wm-button.disabled.dark{color:#a6a6a6;border-color:#a6a6a6}:host .wm-button:disabled.-primary,wm-button .wm-button:disabled.-primary,:host .wm-button:disabled.-permanentlydelete,wm-button .wm-button:disabled.-permanentlydelete,:host .wm-button.disabled.-primary,wm-button .wm-button.disabled.-primary,:host .wm-button.disabled.-permanentlydelete,wm-button .wm-button.disabled.-permanentlydelete{background:#737373;color:#fff;border-color:#737373}:host .wm-button:disabled.-primary.dark,wm-button .wm-button:disabled.-primary.dark,:host .wm-button.disabled.-primary.dark,wm-button .wm-button.disabled.-primary.dark{background:#a6a6a6;border-color:#a6a6a6;color:#353b48}:host .wm-button:disabled.-secondary,wm-button .wm-button:disabled.-secondary,:host .wm-button.disabled.-secondary,wm-button .wm-button.disabled.-secondary{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wm-button:disabled.-selectoronly,wm-button .wm-button:disabled.-selectoronly,:host .wm-button.disabled.-selectoronly,wm-button .wm-button.disabled.-selectoronly{color:#737373}:host .wm-button:disabled.-textonly,wm-button .wm-button:disabled.-textonly,:host .wm-button.disabled.-textonly,wm-button .wm-button.disabled.-textonly{color:#6b6b6b;background:transparent}:host a.wm-button,wm-button a.wm-button,:host label.wm-button,wm-button label.wm-button{height:auto;padding-top:0.75rem;padding-bottom:0.75rem}:host([disabled]),:host(.button-disabled){pointer-events:none}:host,wm-button{display:inline-block;position:relative;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .sr-only,wm-button .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .tooltip,wm-button .tooltip{position:absolute;overflow:hidden;pointer-events:none;line-height:normal;font-family:inherit;font-size:0.875rem;text-transform:none;font-weight:normal;background:black;color:#fff;z-index:999999999;white-space:nowrap;opacity:1;transition:opacity 500ms 500ms;padding:0.375rem}:host .tooltip.hidden,wm-button .tooltip.hidden{opacity:0;transition-delay:0s}:host .tooltip.top,wm-button .tooltip.top{right:auto;left:50%;transform:translateX(-50%);bottom:2.9375rem}:host .tooltip.bottom,wm-button .tooltip.bottom{right:auto;left:50%;transform:translateX(-50%);top:2.9375rem}:host .tooltip.left,wm-button .tooltip.left{top:0.375rem;right:3rem}:host .tooltip.right,wm-button .tooltip.right{top:0.375rem;left:3rem}:host .tooltip.bottom-left,wm-button .tooltip.bottom-left{left:auto;right:2.75rem}:host .tooltip.bottom-right,wm-button .tooltip.bottom-right{top:2.75rem;left:2.75rem}:host .tooltip.top-right,wm-button .tooltip.top-right{bottom:2.75rem;left:2.75rem}:host .tooltip.top-left,wm-button .tooltip.top-left{bottom:2.75rem;left:auto;right:2.75rem}";
|
|
10
|
-
|
|
11
|
-
const Button = class {
|
|
12
|
-
constructor(hostRef) {
|
|
13
|
-
index.registerInstance(this, hostRef);
|
|
14
|
-
// icon and tooltip have reflect set to true. Without reflect, the react wrappers don't expose the attribute
|
|
15
|
-
// and the component throws errors when they are required (when buttonStyle is icononly or navigational)
|
|
16
|
-
this.disabled = false;
|
|
17
|
-
this.buttonStyle = "secondary";
|
|
18
|
-
this.tooltipPosition = "bottom-right";
|
|
19
|
-
this.adjustedTooltipPosition = this.tooltipPosition;
|
|
20
|
-
this.permanentlyDelete = false;
|
|
21
|
-
this.textWrap = true;
|
|
22
|
-
this.isTabbing = false;
|
|
23
|
-
this.clickFunc = null;
|
|
24
|
-
this.ariaPopup = false;
|
|
25
|
-
}
|
|
26
|
-
get isTruncated() {
|
|
27
|
-
return !!this.buttonEl && this.buttonEl.offsetWidth < this.buttonEl.scrollWidth;
|
|
28
|
-
}
|
|
29
|
-
toggleTabbingOn() {
|
|
30
|
-
this.isTabbing = true;
|
|
31
|
-
}
|
|
32
|
-
toggleTabbingOff() {
|
|
33
|
-
this.isTabbing = false;
|
|
34
|
-
}
|
|
35
|
-
handleOnClick() {
|
|
36
|
-
// remove the onlick function when the component is disabled,
|
|
37
|
-
// to handle a bug in Edge 42 where the function would run
|
|
38
|
-
this.el.onclick = this.disabled ? null : this.clickFunc;
|
|
39
|
-
}
|
|
40
|
-
validateStyle(newValue) {
|
|
41
|
-
const valid = ["primary", "secondary", "textonly", "icononly", "navigational", "selectoronly"].includes(newValue);
|
|
42
|
-
if (!valid) {
|
|
43
|
-
this.buttonStyle = "secondary";
|
|
44
|
-
}
|
|
45
|
-
this.validateIcon();
|
|
46
|
-
}
|
|
47
|
-
updateIcon() {
|
|
48
|
-
this.icon = interfaces.getIconCodeFromName(this.icon);
|
|
49
|
-
}
|
|
50
|
-
validateIcon() {
|
|
51
|
-
// if the style is icononly or navigational...
|
|
52
|
-
if (this.buttonStyle === "icononly" || this.buttonStyle === "navigational") {
|
|
53
|
-
// - an icon must be provided
|
|
54
|
-
if (!this.icon) {
|
|
55
|
-
console.error("wm-button should have a valid 'icon' property when button-style is set to 'icononly' or 'navigational'.");
|
|
56
|
-
}
|
|
57
|
-
// - if no tooltip text was passed and we couldn't generate one, throw an error
|
|
58
|
-
if (!this.tooltip) {
|
|
59
|
-
console.error("wm-button should have a valid 'tooltip' property when button-style is set to 'icononly' or 'navigational'.");
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
handleKeydown(ev) {
|
|
64
|
-
switch (ev.key) {
|
|
65
|
-
case "Enter":
|
|
66
|
-
ev.preventDefault();
|
|
67
|
-
if (!this.disabled) {
|
|
68
|
-
this.el.click();
|
|
69
|
-
}
|
|
70
|
-
break;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
componentWillLoad() {
|
|
74
|
-
this.validateStyle(this.buttonStyle);
|
|
75
|
-
// replacing the prototype's focus event by our own
|
|
76
|
-
// to delegate focus to the appropriate el in the shadow root
|
|
77
|
-
// we could replace by ShadowRoot.delegatesFocus()
|
|
78
|
-
// when there's enough support for it
|
|
79
|
-
// @ts-ignore
|
|
80
|
-
this.el.focus = function () {
|
|
81
|
-
if (!this.disabled) {
|
|
82
|
-
this.shadowRoot.querySelector("button").focus();
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
if (this.icon) {
|
|
86
|
-
this.icon = this.icon = interfaces.getIconCodeFromName(this.icon);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
componentDidLoad() {
|
|
90
|
-
// store a reference of the onclick function if there is one
|
|
91
|
-
// so we can remove it when the button is disabled
|
|
92
|
-
// (to handle a bug in Edge 42)
|
|
93
|
-
if (this.el.onclick) {
|
|
94
|
-
this.clickFunc = this.el.onclick;
|
|
95
|
-
}
|
|
96
|
-
// this.handleOnClick();
|
|
97
|
-
if (document.body.classList.contains("wmcl-user-is-tabbing")) {
|
|
98
|
-
this.toggleTabbingOn();
|
|
99
|
-
}
|
|
100
|
-
this.ariaPopup = !!this.el.getAttribute("aria-haspopup");
|
|
101
|
-
index.forceUpdate(this.el); // originally here to renderTooltip(), now necessary to pass text-truncation tooltip test
|
|
102
|
-
}
|
|
103
|
-
showTooltip() {
|
|
104
|
-
// Because a :hover pseudoclass would apply before the tooltip is repositioned, hover styles must be applied through a class
|
|
105
|
-
// Otherwise, the tooltip will flash on-screen and possibly create scrollbars
|
|
106
|
-
if (!!this.tooltipEl) {
|
|
107
|
-
this.adjustedTooltipPosition = functions.adjustTooltipPosition(this.tooltipPosition, this.el, this.tooltipEl);
|
|
108
|
-
this.tooltipEl.classList.remove("hidden");
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
hideTooltip() {
|
|
112
|
-
if (!!this.tooltipEl) {
|
|
113
|
-
this.tooltipEl.classList.add("hidden");
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
renderTooltip() {
|
|
117
|
-
// tooltip is only rendered for icononly and navigational types, or if the button text is truncated
|
|
118
|
-
if (this.buttonStyle === "icononly" || this.buttonStyle === "navigational" || this.isTruncated) {
|
|
119
|
-
return (index.h("div", { ref: (el) => (this.tooltipEl = el), "aria-hidden": "true", class: `tooltip hidden ${this.adjustedTooltipPosition}` }, this.isTruncated ? this.el.textContent : this.tooltip));
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
getClasses() {
|
|
123
|
-
let classes = "wm-button";
|
|
124
|
-
classes += this.permanentlyDelete ? " -permanentlydelete" : "";
|
|
125
|
-
classes += this.buttonStyle ? " -" + this.buttonStyle : " -secondary";
|
|
126
|
-
classes += this.textWrap ? "" : " nowrap";
|
|
127
|
-
classes += this.isTabbing ? " user-is-tabbing" : "";
|
|
128
|
-
classes += this.isTruncated ? " -truncated" : "";
|
|
129
|
-
classes += this.customBackground === "dark" ? " dark" : "";
|
|
130
|
-
return classes;
|
|
131
|
-
}
|
|
132
|
-
getAriaLabel() {
|
|
133
|
-
if (this.buttonStyle === "icononly" || this.buttonStyle === "navigational") {
|
|
134
|
-
return this.labelForIdenticalButtons ? this.labelForIdenticalButtons : this.tooltip;
|
|
135
|
-
}
|
|
136
|
-
if (this.labelForIdenticalButtons) {
|
|
137
|
-
return this.labelForIdenticalButtons;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
render() {
|
|
141
|
-
return (index.h(index.Host, { class: this.disabled ? "button-disabled" : "" }, index.h("button", { id: functions.generateId(), class: `${this.getClasses()}`, disabled: this.disabled, ref: (el) => (this.buttonEl = el), "aria-label": this.getAriaLabel(), "aria-hasPopup": this.ariaPopup ? "menu" : null, onMouseEnter: () => this.showTooltip(), onMouseLeave: () => this.hideTooltip(), onFocus: () => this.showTooltip(), onBlur: () => this.hideTooltip(), onClick: () => this.hideTooltip() }, this.icon && (index.h("span", { class: "mdi", style: this.iconSize ? { fontSize: this.iconSize } : {} }, String.fromCodePoint(parseInt(`0x${this.icon}`)))), index.h("span", { class: "button-text" }, index.h("slot", null))), this.renderTooltip()));
|
|
142
|
-
}
|
|
143
|
-
get el() { return index.getElement(this); }
|
|
144
|
-
static get watchers() { return {
|
|
145
|
-
"disabled": ["handleOnClick"],
|
|
146
|
-
"buttonStyle": ["validateStyle"],
|
|
147
|
-
"icon": ["updateIcon"]
|
|
148
|
-
}; }
|
|
149
|
-
};
|
|
150
|
-
Button.style = wmButtonCss;
|
|
151
|
-
|
|
152
|
-
exports.wm_button = Button;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-e5aef9f9.js');
|
|
6
|
-
|
|
7
|
-
const ChartSlice = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
index.registerInstance(this, hostRef);
|
|
10
|
-
this.wmChartSliceUpdated = index.createEvent(this, "wmChartSliceUpdated", 7);
|
|
11
|
-
}
|
|
12
|
-
componentDidLoad() {
|
|
13
|
-
if (parseInt(this.amount) > 0 && !this.legend) {
|
|
14
|
-
throw new Error("wm-chart-slice was provided an amount value without a legend. The legend is required unless the amount is 0 or left empty. For more information see https://components.watermarkinsights.com/chart");
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
componentDidUpdate() {
|
|
18
|
-
this.wmChartSliceUpdated.emit();
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
exports.wm_chart_slice = ChartSlice;
|