@mgdis/mg-components 6.14.0 → 6.15.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/{index-DzBkSgSK.js → index-BGxkpQwi.js} +7 -1
- package/dist/cjs/{index-DUJwxnoi.js → index-CpENFzEo.js} +2 -2
- package/dist/cjs/{index-CwjAofQ1.js → index-iUZvsp-F.js} +55 -31
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mg-action-more_37.cjs.entry.js +431 -208
- package/dist/cjs/mg-alert.cjs.entry.js +4 -4
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/cjs/mg-input-combobox.cjs.entry.js +145 -81
- package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +1248 -16004
- package/dist/cjs/{mg-input.conf-WTsvDfpC.js → mg-input.conf-CwjEAih3.js} +7 -0
- package/dist/cjs/mg-input.utils-D-ASK4ua.js +49 -0
- package/dist/cjs/mg-loader.cjs.entry.js +4 -4
- package/dist/cjs/mg-progress.cjs.entry.js +3 -3
- package/dist/collection/assets/icons/index.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.conf.js +6 -0
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +93 -22
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.utils.js +21 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +2 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +49 -106
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +123 -48
- package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +140 -56
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +6 -1
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +63 -10
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +54 -6
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +2 -2
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +142 -9
- package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +1 -1
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +2 -2
- package/dist/collection/components/molecules/mg-alert/mg-alert.js +1 -1
- package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
- package/dist/collection/components/molecules/mg-form/mg-form.js +1 -1
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +1 -1
- package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
- package/dist/collection/components/molecules/mg-message/mg-message.js +2 -2
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +2 -2
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +1 -1
- package/dist/collection/components/molecules/mg-progress/mg-progress.js +1 -1
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -1
- package/dist/collection/components/molecules/mg-table/mg-table.js +2 -2
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +1 -1
- package/dist/collection/locales/en/messages.json +23 -14
- package/dist/collection/locales/fr/messages.json +24 -15
- package/dist/components/index2.js +3 -3
- package/dist/components/index3.js +55 -31
- package/dist/components/mg-action-more.js +2 -2
- package/dist/components/mg-alert.js +2 -2
- package/dist/components/mg-badge2.js +1 -1
- package/dist/components/mg-button2.js +1 -1
- package/dist/components/mg-card2.js +1 -1
- package/dist/components/mg-character-left2.js +1 -1
- package/dist/components/mg-details.js +1 -97
- package/dist/components/mg-details2.js +99 -0
- package/dist/components/mg-divider2.js +1 -1
- package/dist/components/mg-form.js +2 -2
- package/dist/components/mg-icon2.js +1 -1
- package/dist/components/mg-illustrated-message.js +2 -2
- package/dist/components/mg-input-checkbox-paginated2.js +43 -124
- package/dist/components/mg-input-checkbox.js +136 -62
- package/dist/components/mg-input-combobox.js +135 -63
- package/dist/components/mg-input-date.js +9 -3
- package/dist/components/mg-input-numeric.js +14 -3
- package/dist/components/mg-input-password.js +10 -4
- package/dist/components/mg-input-radio.js +54 -13
- package/dist/components/mg-input-rich-text-editor.js +1266 -16016
- package/dist/components/mg-input-select2.js +45 -9
- package/dist/components/mg-input-text2.js +10 -4
- package/dist/components/mg-input-textarea.js +10 -4
- package/dist/components/mg-input-title2.js +1 -1
- package/dist/components/mg-input-toggle.js +97 -12
- package/dist/components/mg-input.utils.js +24 -0
- package/dist/components/mg-input2.js +100 -23
- package/dist/components/mg-item-more2.js +2 -2
- package/dist/components/mg-loader2.js +2 -2
- package/dist/components/mg-menu-item2.js +1 -1
- package/dist/components/mg-message2.js +3 -3
- package/dist/components/mg-modal.js +3 -3
- package/dist/components/mg-pagination.js +233 -1
- package/dist/components/mg-panel.js +14 -8
- package/dist/components/mg-popover-content2.js +2 -2
- package/dist/components/mg-popover2.js +2 -2
- package/dist/components/mg-progress.js +2 -2
- package/dist/components/mg-skip-links.js +2 -2
- package/dist/components/mg-table.js +3 -3
- package/dist/components/mg-tabs.js +1 -311
- package/dist/components/mg-tabs2.js +313 -0
- package/dist/components/mg-tag.js +1 -1
- package/dist/components/mg-tooltip-content2.js +1 -1
- package/dist/components/mg-tooltip2.js +2 -2
- package/dist/esm/{index-Bv7NHR-W.js → index-CKB-AnCZ.js} +55 -31
- package/dist/esm/{index-Degtjvph.js → index-DhAOnZJn.js} +7 -1
- package/dist/esm/{index-Dr7GYvIz.js → index-WtiuOkLj.js} +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mg-action-more_37.entry.js +426 -203
- package/dist/esm/mg-alert.entry.js +4 -4
- package/dist/esm/mg-components.js +4 -4
- package/dist/esm/mg-input-combobox.entry.js +125 -61
- package/dist/esm/mg-input-rich-text-editor.entry.js +1249 -16005
- package/dist/esm/{mg-input.conf-CNgv8hc5.js → mg-input.conf-BAUTlb6r.js} +7 -1
- package/dist/esm/mg-input.utils-BYI03zSi.js +46 -0
- package/dist/esm/mg-loader.entry.js +4 -4
- package/dist/esm/mg-progress.entry.js +3 -3
- package/dist/mg-components/locales/en/messages.json +23 -14
- package/dist/mg-components/locales/fr/messages.json +24 -15
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/p-31856cff.entry.js +1 -0
- package/dist/mg-components/{p-056ba467.entry.js → p-420daa1e.entry.js} +1 -1
- package/dist/mg-components/{p-d13a6fdc.entry.js → p-47e19783.entry.js} +1 -1
- package/dist/mg-components/p-67af6274.entry.js +1 -0
- package/dist/mg-components/p-698dfc6c.entry.js +1 -0
- package/dist/mg-components/p-BAUTlb6r.js +1 -0
- package/dist/mg-components/p-CKB-AnCZ.js +1 -0
- package/dist/mg-components/p-DhAOnZJn.js +2 -0
- package/dist/mg-components/p-PuX-pdL4.js +1 -0
- package/dist/mg-components/p-WtiuOkLj.js +1 -0
- package/dist/mg-components/p-a0fa44cf.entry.js +1 -0
- package/dist/types/assets/icons/index.d.ts +6 -0
- package/dist/types/components/molecules/inputs/mg-input/mg-input.conf.d.ts +13 -0
- package/dist/types/components/molecules/inputs/mg-input/mg-input.d.ts +15 -4
- package/dist/types/components/molecules/inputs/mg-input/mg-input.utils.d.ts +8 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +17 -40
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +1 -2
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +36 -9
- package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.d.ts +17 -3
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +18 -0
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +18 -0
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +40 -4
- package/dist/types/components.d.ts +69 -40
- package/ide/intellij/web-types.json +148 -22
- package/ide/vscode/html-custom-data.json +143 -9
- package/package.json +15 -15
- package/dist/cjs/events.utils-D5SAtkpQ.js +0 -25
- package/dist/components/mg-pagination2.js +0 -229
- package/dist/esm/events.utils-yMGqY8YG.js +0 -23
- package/dist/mg-components/p-625c463c.entry.js +0 -1
- package/dist/mg-components/p-Bv7NHR-W.js +0 -1
- package/dist/mg-components/p-CNgv8hc5.js +0 -1
- package/dist/mg-components/p-Degtjvph.js +0 -2
- package/dist/mg-components/p-Dr7GYvIz.js +0 -1
- package/dist/mg-components/p-c522f3c1.entry.js +0 -1
- package/dist/mg-components/p-cac23bd7.entry.js +0 -1
- package/dist/mg-components/p-e75f5383.entry.js +0 -10
- package/dist/mg-components/p-yMGqY8YG.js +0 -1
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { c as createID, a as isValideID, t as toString, i as isValidString } from './index2.js';
|
|
3
|
-
import { i as initLocales } from './index3.js';
|
|
4
|
-
import { d as defineCustomElement$7 } from './mg-button2.js';
|
|
5
|
-
import { d as defineCustomElement$6 } from './mg-icon2.js';
|
|
6
|
-
import { d as defineCustomElement$5 } from './mg-input2.js';
|
|
7
|
-
import { d as defineCustomElement$4 } from './mg-input-select2.js';
|
|
8
|
-
import { d as defineCustomElement$3 } from './mg-input-title2.js';
|
|
9
|
-
import { d as defineCustomElement$2 } from './mg-tooltip2.js';
|
|
10
|
-
import { d as defineCustomElement$1 } from './mg-tooltip-content2.js';
|
|
11
|
-
|
|
12
|
-
const NavigationAction = {
|
|
13
|
-
NEXT: 'next',
|
|
14
|
-
PREVIOUS: 'previous',
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
const mgPaginationCss = ".mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}.mg-c-pagination{display:flex;align-items:center;gap:var(--mg-b-spacing-actions)}.mg-c-pagination__page-count{display:flex;align-items:center;gap:var(--mg-b-size-4)}.mg-c-pagination.mg-c-pagination--hide-page-count{gap:0}";
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Range generator
|
|
21
|
-
*
|
|
22
|
-
* ```
|
|
23
|
-
* start by get the range length, add "+ 1" to include last value, ex: Math.ceil((3 + 1 - 1) / 1) => 3
|
|
24
|
-
* then with Array(Math.ceil...) we get the final array with empty values, ex: Array(Math.ceil(2 + 1 - 1) / 1)) => [empty, empty, empty]
|
|
25
|
-
* then with Array(Math.ceil...).keys() we get the Array Iterator from empty values
|
|
26
|
-
* then with Array.from(Array(...)) we get the complete array with "index" values instead of "empty" values
|
|
27
|
-
* ex: Array.from(Array(Math.ceil((2 + 1 - 1) / 1) || 1).keys()) => [0, 1, 2]
|
|
28
|
-
* finaly we map values from "start" range and apply the "step" coefficiant,
|
|
29
|
-
* ex: Array.from(Array(Math.ceil((2 + 1 - 1) / 1) || 1).keys()).map(x => 1 + x * 1) => [1, 2, 3]
|
|
30
|
-
* ```
|
|
31
|
-
*
|
|
32
|
-
* range(1, 1) = [1]
|
|
33
|
-
* range(1, 5) = [1, 2, 3, 4, 5]
|
|
34
|
-
* range(10, 20, 2) = [10, 12, 14, 16, 18, 20]
|
|
35
|
-
* @param start - start range
|
|
36
|
-
* @param end - start end
|
|
37
|
-
* @param step - step size
|
|
38
|
-
* @returns range numbers
|
|
39
|
-
*/
|
|
40
|
-
const range = (start, end, step = 1) => Array.from(Array(Math.ceil((end + 1 - start) / step)).keys()).map(x => start + x * step);
|
|
41
|
-
const MgPagination = /*@__PURE__*/ proxyCustomElement(class MgPagination extends HTMLElement {
|
|
42
|
-
constructor() {
|
|
43
|
-
super();
|
|
44
|
-
this.__registerHost();
|
|
45
|
-
this.__attachShadow();
|
|
46
|
-
this.currentPageChange = createEvent(this, "current-page-change", 7);
|
|
47
|
-
/**
|
|
48
|
-
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
49
|
-
* If not set, it will be created.
|
|
50
|
-
*/
|
|
51
|
-
this.identifier = createID('mg-pagination');
|
|
52
|
-
/**
|
|
53
|
-
* Hide navigation label
|
|
54
|
-
*/
|
|
55
|
-
this.hideNavigationLabels = false;
|
|
56
|
-
/**
|
|
57
|
-
* Hide select input
|
|
58
|
-
*/
|
|
59
|
-
this.hidePageCount = false;
|
|
60
|
-
/**
|
|
61
|
-
* Component total pages
|
|
62
|
-
*/
|
|
63
|
-
this.totalPages = 1;
|
|
64
|
-
/**
|
|
65
|
-
* Component current page
|
|
66
|
-
*/
|
|
67
|
-
this.currentPage = 1;
|
|
68
|
-
/**
|
|
69
|
-
* Change current page from target
|
|
70
|
-
* @param target - target page
|
|
71
|
-
*/
|
|
72
|
-
this.goToPage = (target) => {
|
|
73
|
-
this.currentPage = target;
|
|
74
|
-
};
|
|
75
|
-
/************
|
|
76
|
-
* Handlers *
|
|
77
|
-
************/
|
|
78
|
-
/**
|
|
79
|
-
* select handler
|
|
80
|
-
* @param event - value change event
|
|
81
|
-
*/
|
|
82
|
-
this.handleSelect = (event) => {
|
|
83
|
-
const to = Number(event.target.value);
|
|
84
|
-
this.goToPage(to > 0 ? to : 1);
|
|
85
|
-
};
|
|
86
|
-
/**
|
|
87
|
-
* Go to 'previous/next' page button handler
|
|
88
|
-
* @param action - navigation action
|
|
89
|
-
* @param disabled - button disable state
|
|
90
|
-
*/
|
|
91
|
-
this.handleGoToPage = (action, disabled) => {
|
|
92
|
-
!disabled && this.goToPage(action === NavigationAction.NEXT ? this.currentPage + 1 : this.currentPage - 1);
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
watchIdentifier(newValue) {
|
|
96
|
-
if (!isValideID(newValue)) {
|
|
97
|
-
console.error(`<mg-pagination> prop "identifier" value is invalid. Passed value: ${toString(newValue)}.`);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
validateTotalPages(newValue) {
|
|
101
|
-
if (newValue < 1) {
|
|
102
|
-
throw new Error(`<mg-pagination> prop "totalPages" must be greater than 0. Passed value: ${toString(newValue)}.`);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
validateCurrentPage(newValue) {
|
|
106
|
-
if (newValue < 1) {
|
|
107
|
-
throw new Error(`<mg-pagination> prop "currentPage" must be greater than 0. Passed value: ${toString(newValue)}.`);
|
|
108
|
-
}
|
|
109
|
-
else if (newValue > this.totalPages) {
|
|
110
|
-
throw new Error('<mg-pagination> prop "currentPage" can not be greater than total page.');
|
|
111
|
-
}
|
|
112
|
-
this.currentPageChange.emit(newValue);
|
|
113
|
-
}
|
|
114
|
-
watchPaginationMessages(newValue) {
|
|
115
|
-
if (Boolean(newValue) && (typeof newValue !== 'object' || !['next', 'previous', 'nextLabel', 'previousLabel'].every(key => isValidString(newValue[key])))) {
|
|
116
|
-
throw new Error('<mg-pagination> prop "messages" must be a valid "PaginationMessagesType".');
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
/*************
|
|
120
|
-
* Lifecycle *
|
|
121
|
-
*************/
|
|
122
|
-
/**
|
|
123
|
-
* Check if props are well configured on init
|
|
124
|
-
*/
|
|
125
|
-
componentWillLoad() {
|
|
126
|
-
// Get locales
|
|
127
|
-
this.localesMessages = initLocales(this.element).messages;
|
|
128
|
-
// Validate
|
|
129
|
-
this.watchIdentifier(this.identifier);
|
|
130
|
-
this.validateTotalPages(this.totalPages);
|
|
131
|
-
this.validateCurrentPage(this.currentPage);
|
|
132
|
-
this.watchPaginationMessages(this.messages);
|
|
133
|
-
// Set default label
|
|
134
|
-
if (this.label === undefined || this.label === '') {
|
|
135
|
-
this.label = this.localesMessages.pagination.label;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Render
|
|
140
|
-
* @returns HTML Element
|
|
141
|
-
*/
|
|
142
|
-
render() {
|
|
143
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
144
|
-
const navigationMessages = {
|
|
145
|
-
next: (_b = (_a = this.messages) === null || _a === void 0 ? void 0 : _a.next) !== null && _b !== void 0 ? _b : this.localesMessages.general.next,
|
|
146
|
-
previous: (_d = (_c = this.messages) === null || _c === void 0 ? void 0 : _c.previous) !== null && _d !== void 0 ? _d : this.localesMessages.general.previous,
|
|
147
|
-
nextLabel: (_f = (_e = this.messages) === null || _e === void 0 ? void 0 : _e.nextLabel) !== null && _f !== void 0 ? _f : this.localesMessages.pagination.nextLabel,
|
|
148
|
-
previousLabel: (_h = (_g = this.messages) === null || _g === void 0 ? void 0 : _g.previousLabel) !== null && _h !== void 0 ? _h : this.localesMessages.pagination.previousLabel,
|
|
149
|
-
};
|
|
150
|
-
const navigationActionButton = (disabled, action) => {
|
|
151
|
-
return (h("mg-button", { label: navigationMessages[`${action}Label`],
|
|
152
|
-
// eslint-disable-next-line react/jsx-no-bind
|
|
153
|
-
onClick: () => this.handleGoToPage(action, disabled), disabled: disabled, variant: "flat", isIcon: this.hideNavigationLabels }, action === NavigationAction.PREVIOUS && h("mg-icon", { icon: "chevron-left" }), !this.hideNavigationLabels && navigationMessages[action], action === NavigationAction.NEXT && h("mg-icon", { icon: "chevron-right" })));
|
|
154
|
-
};
|
|
155
|
-
return (h(Host, { hidden: this.totalPages < 2 }, h("nav", { role: "navigation", "aria-label": this.label, id: this.identifier, class: { 'mg-c-pagination': true, 'mg-c-pagination--hide-page-count': this.hidePageCount } }, navigationActionButton(this.currentPage <= 1, NavigationAction.PREVIOUS), !this.hidePageCount && (h("div", { class: "mg-c-pagination__page-count" }, h("mg-input-select", { identifier: `${this.identifier}-select`, items: range(1, this.totalPages).map(page => page.toString()), label: this.localesMessages.pagination.selectPage, "label-hide": true, "on-value-change": this.handleSelect, value: this.currentPage.toString(), "placeholder-hide": true }), h("span", { class: "mg-u-visually-hidden" }, this.localesMessages.pagination.page, " ", this.currentPage), "/ ", this.totalPages, " ", this.totalPages > 1 ? this.localesMessages.pagination.pages : this.localesMessages.pagination.page)), navigationActionButton(this.currentPage >= this.totalPages, NavigationAction.NEXT))));
|
|
156
|
-
}
|
|
157
|
-
get element() { return this; }
|
|
158
|
-
static get watchers() { return {
|
|
159
|
-
"identifier": ["watchIdentifier"],
|
|
160
|
-
"totalPages": ["validateTotalPages"],
|
|
161
|
-
"currentPage": ["validateCurrentPage"],
|
|
162
|
-
"messages": ["watchPaginationMessages"]
|
|
163
|
-
}; }
|
|
164
|
-
static get style() { return mgPaginationCss; }
|
|
165
|
-
}, [1, "mg-pagination", {
|
|
166
|
-
"identifier": [1],
|
|
167
|
-
"label": [1025],
|
|
168
|
-
"hideNavigationLabels": [4, "hide-navigation-labels"],
|
|
169
|
-
"hidePageCount": [4, "hide-page-count"],
|
|
170
|
-
"totalPages": [2, "total-pages"],
|
|
171
|
-
"currentPage": [1538, "current-page"],
|
|
172
|
-
"messages": [16]
|
|
173
|
-
}, undefined, {
|
|
174
|
-
"identifier": ["watchIdentifier"],
|
|
175
|
-
"totalPages": ["validateTotalPages"],
|
|
176
|
-
"currentPage": ["validateCurrentPage"],
|
|
177
|
-
"messages": ["watchPaginationMessages"]
|
|
178
|
-
}]);
|
|
179
|
-
function defineCustomElement() {
|
|
180
|
-
if (typeof customElements === "undefined") {
|
|
181
|
-
return;
|
|
182
|
-
}
|
|
183
|
-
const components = ["mg-pagination", "mg-button", "mg-icon", "mg-input", "mg-input-select", "mg-input-title", "mg-tooltip", "mg-tooltip-content"];
|
|
184
|
-
components.forEach(tagName => { switch (tagName) {
|
|
185
|
-
case "mg-pagination":
|
|
186
|
-
if (!customElements.get(tagName)) {
|
|
187
|
-
customElements.define(tagName, MgPagination);
|
|
188
|
-
}
|
|
189
|
-
break;
|
|
190
|
-
case "mg-button":
|
|
191
|
-
if (!customElements.get(tagName)) {
|
|
192
|
-
defineCustomElement$7();
|
|
193
|
-
}
|
|
194
|
-
break;
|
|
195
|
-
case "mg-icon":
|
|
196
|
-
if (!customElements.get(tagName)) {
|
|
197
|
-
defineCustomElement$6();
|
|
198
|
-
}
|
|
199
|
-
break;
|
|
200
|
-
case "mg-input":
|
|
201
|
-
if (!customElements.get(tagName)) {
|
|
202
|
-
defineCustomElement$5();
|
|
203
|
-
}
|
|
204
|
-
break;
|
|
205
|
-
case "mg-input-select":
|
|
206
|
-
if (!customElements.get(tagName)) {
|
|
207
|
-
defineCustomElement$4();
|
|
208
|
-
}
|
|
209
|
-
break;
|
|
210
|
-
case "mg-input-title":
|
|
211
|
-
if (!customElements.get(tagName)) {
|
|
212
|
-
defineCustomElement$3();
|
|
213
|
-
}
|
|
214
|
-
break;
|
|
215
|
-
case "mg-tooltip":
|
|
216
|
-
if (!customElements.get(tagName)) {
|
|
217
|
-
defineCustomElement$2();
|
|
218
|
-
}
|
|
219
|
-
break;
|
|
220
|
-
case "mg-tooltip-content":
|
|
221
|
-
if (!customElements.get(tagName)) {
|
|
222
|
-
defineCustomElement$1();
|
|
223
|
-
}
|
|
224
|
-
break;
|
|
225
|
-
} });
|
|
226
|
-
}
|
|
227
|
-
defineCustomElement();
|
|
228
|
-
|
|
229
|
-
export { MgPagination as M, defineCustomElement as d };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Keyboard keys
|
|
3
|
-
*/
|
|
4
|
-
const Keys = {
|
|
5
|
-
TAB: 'Tab',
|
|
6
|
-
ENTER: 'Enter',
|
|
7
|
-
DOWN: 'Down',
|
|
8
|
-
UP: 'Up',
|
|
9
|
-
LEFT: 'Left',
|
|
10
|
-
RIGHT: 'Right',
|
|
11
|
-
ARROWDOWN: 'ArrowDown',
|
|
12
|
-
ARROWUP: 'ArrowUp',
|
|
13
|
-
ARROWRIGHT: 'ArrowRight',
|
|
14
|
-
ARROWLEFT: 'ArrowLeft',
|
|
15
|
-
HOME: 'Home',
|
|
16
|
-
END: 'End',
|
|
17
|
-
ESC: 'Esc',
|
|
18
|
-
ESCAPE: 'Escape',
|
|
19
|
-
NUMPADENTER: 'NumpadEnter',
|
|
20
|
-
SPACE: 'Space',
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export { Keys as K };
|