@mgdis/mg-components 6.22.0 → 6.23.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-C2viYwrR.js → index-BEF-cqV9.js} +325 -1789
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{mg-action-more_37.cjs.entry.js → mg-action-more_36.cjs.entry.js} +242 -172
- package/dist/cjs/mg-alert.cjs.entry.js +6 -2
- package/dist/cjs/mg-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/cjs/mg-fieldset.cjs.entry.js +4 -3
- package/dist/cjs/mg-input-combobox.cjs.entry.js +4 -3
- package/dist/cjs/mg-input-file.cjs.entry.js +5 -4
- package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +7491 -6367
- package/dist/cjs/mg-input.conf-wgTh7iBb.js +84 -0
- package/dist/cjs/mg-loader.cjs.entry.js +2 -2
- package/dist/cjs/mg-progress.cjs.entry.js +2 -2
- package/dist/collection/assets/icons/index.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +5 -2
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +12 -3
- package/dist/collection/components/atoms/mg-button/mg-button.js +9 -4
- package/dist/collection/components/atoms/mg-card/mg-card.js +16 -7
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +16 -9
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +2 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +9 -3
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +15 -13
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.js +38 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +3 -2
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +49 -26
- package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +16 -8
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +6 -3
- package/dist/collection/components/molecules/inputs/mg-input-file/mg-input-file.js +7 -4
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +11 -5
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +7 -3
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +7 -3
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +9 -4
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +61 -19
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +15 -8
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +7 -3
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +9 -4
- package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +5 -3
- package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +5 -3
- package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +8 -4
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +11 -7
- package/dist/collection/components/molecules/mg-alert/mg-alert.js +29 -3
- package/dist/collection/components/molecules/mg-breadcrumb/mg-breadcrumb.js +3 -2
- package/dist/collection/components/molecules/mg-details/mg-details.js +3 -1
- package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +5 -2
- package/dist/collection/components/molecules/mg-form/mg-form.js +8 -4
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +5 -3
- package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
- package/dist/collection/components/molecules/mg-message/mg-message.js +43 -4
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +4 -3
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +2 -1
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +20 -6
- 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 +3 -2
- package/dist/collection/components/molecules/mg-progress/mg-progress.js +3 -2
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +3 -2
- package/dist/collection/components/molecules/mg-table/mg-table.js +4 -2
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +3 -2
- package/dist/components/index2.js +1 -1
- package/dist/components/index3.js +1 -1
- package/dist/components/index4.js +1 -0
- package/dist/components/mg-action-more.js +1 -1
- package/dist/components/mg-alert.js +1 -1
- package/dist/components/mg-badge2.js +1 -1
- package/dist/components/mg-breadcrumb.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 -1
- package/dist/components/mg-divider2.js +1 -1
- package/dist/components/mg-fieldset.js +1 -1
- package/dist/components/mg-form.js +1 -1
- package/dist/components/mg-icon2.js +1 -1
- package/dist/components/mg-illustrated-message.js +1 -1
- package/dist/components/mg-input-checkbox.js +1 -1
- package/dist/components/mg-input-combobox.js +1 -1
- package/dist/components/mg-input-date.js +1 -1
- package/dist/components/mg-input-file.js +1 -1
- package/dist/components/mg-input-numeric.js +1 -1
- package/dist/components/mg-input-password.js +1 -1
- package/dist/components/mg-input-radio.js +1 -1
- package/dist/components/mg-input-rich-text-editor.js +284 -284
- package/dist/components/mg-input-select2.js +1 -1
- package/dist/components/mg-input-text2.js +1 -1
- package/dist/components/mg-input-textarea.js +1 -1
- package/dist/components/mg-input-title2.js +1 -1
- package/dist/components/mg-input-toggle.js +1 -1
- package/dist/components/mg-input2.js +1 -1
- package/dist/components/mg-item-more2.js +1 -1
- package/dist/components/mg-loader2.js +1 -1
- package/dist/components/mg-menu-item2.js +1 -1
- package/dist/components/mg-message2.js +1 -1
- package/dist/components/mg-modal.js +1 -1
- package/dist/components/mg-pagination.js +1 -1
- package/dist/components/mg-panel.js +1 -1
- package/dist/components/mg-popover-content2.js +1 -1
- package/dist/components/mg-popover2.js +1 -1
- package/dist/components/mg-progress.js +1 -1
- package/dist/components/mg-skip-links.js +1 -1
- package/dist/components/mg-table.js +1 -1
- package/dist/components/mg-tabs2.js +1 -1
- package/dist/components/mg-tooltip2.js +1 -1
- package/dist/custom-elements.json +8828 -0
- package/dist/esm/{index-DFwaH2hS.js → index-DshvCiTL.js} +325 -1789
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{mg-action-more_37.entry.js → mg-action-more_36.entry.js} +244 -173
- package/dist/esm/mg-alert.entry.js +6 -2
- package/dist/esm/mg-breadcrumb.entry.js +2 -2
- package/dist/esm/mg-components.js +4 -4
- package/dist/esm/mg-fieldset.entry.js +4 -3
- package/dist/esm/mg-input-combobox.entry.js +4 -3
- package/dist/esm/mg-input-file.entry.js +5 -4
- package/dist/esm/mg-input-rich-text-editor.entry.js +7491 -6367
- package/dist/esm/mg-input.conf-DOi9lJXy.js +73 -0
- package/dist/esm/mg-loader.entry.js +2 -2
- package/dist/esm/mg-progress.entry.js +2 -2
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/{p-d5e69c95.entry.js → p-13feb37a.entry.js} +1 -1
- package/dist/mg-components/{p-c8c8cfc1.entry.js → p-236bb1d2.entry.js} +1 -1
- package/dist/mg-components/p-79265ad3.entry.js +1 -0
- package/dist/mg-components/{p-adec7fcc.entry.js → p-7c63e469.entry.js} +1 -1
- package/dist/mg-components/p-7fd3e519.entry.js +1 -0
- package/dist/mg-components/p-DOi9lJXy.js +1 -0
- package/dist/mg-components/p-DshvCiTL.js +2 -0
- package/dist/mg-components/p-a0e2c886.entry.js +1 -0
- package/dist/mg-components/p-cdb01923.entry.js +1 -0
- package/dist/mg-components/p-d0b6d8f5.entry.js +1 -0
- package/dist/mg-components/{p-c63f97f0.entry.js → p-d698fa67.entry.js} +283 -283
- package/dist/types/assets/icons/index.d.ts +2 -0
- package/dist/types/components/atoms/internals/mg-input-title/mg-input-title.d.ts +4 -0
- package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +4 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.d.ts +2 -2
- package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.d.ts +8 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +16 -8
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +15 -5
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +12 -6
- package/dist/types/components/molecules/mg-alert/mg-alert.d.ts +4 -0
- package/dist/types/components/molecules/mg-message/mg-message.d.ts +6 -0
- package/dist/types/components.d.ts +547 -170
- package/dist/types/stencil-public-runtime.d.ts +53 -2
- package/ide/intellij/web-types.json +211 -3476
- package/ide/vscode/css-custom-data.json +1 -1
- package/ide/vscode/html-custom-data.json +58 -314
- package/package.json +30 -25
- package/dist/cjs/mg-input.conf-BNpeATnq.js +0 -35
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +0 -245
- package/dist/components/mg-input-checkbox-paginated.d.ts +0 -11
- package/dist/components/mg-input-checkbox-paginated.js +0 -1
- package/dist/components/mg-input-checkbox-paginated2.js +0 -1
- package/dist/esm/mg-input.conf-C9rmNQIL.js +0 -25
- package/dist/mg-components/p-0482eb9f.entry.js +0 -1
- package/dist/mg-components/p-2ee92f38.entry.js +0 -1
- package/dist/mg-components/p-3b653226.entry.js +0 -1
- package/dist/mg-components/p-5745fbea.entry.js +0 -1
- package/dist/mg-components/p-C9rmNQIL.js +0 -1
- package/dist/mg-components/p-DFwaH2hS.js +0 -2
- package/dist/mg-components/p-cc793586.entry.js +0 -1
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +0 -77
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mgdis/mg-components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.23.0",
|
|
4
4
|
"description": "MG Components",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -10,13 +10,18 @@
|
|
|
10
10
|
"collection": "dist/collection/collection-manifest.json",
|
|
11
11
|
"collection:main": "dist/collection/index.js",
|
|
12
12
|
"unpkg": "dist/mg-components/mg-components.esm.js",
|
|
13
|
+
"customElements": "dist/custom-elements.json",
|
|
13
14
|
"web-types": "ide/intellij/web-types.json",
|
|
14
15
|
"contributes": {
|
|
15
16
|
"html": {
|
|
16
|
-
"customData":
|
|
17
|
+
"customData": [
|
|
18
|
+
"ide/vscode/html-custom-data.json"
|
|
19
|
+
]
|
|
17
20
|
},
|
|
18
21
|
"css": {
|
|
19
|
-
"customData":
|
|
22
|
+
"customData": [
|
|
23
|
+
"ide/vscode/css-custom-data.json"
|
|
24
|
+
]
|
|
20
25
|
}
|
|
21
26
|
},
|
|
22
27
|
"files": [
|
|
@@ -34,36 +39,36 @@
|
|
|
34
39
|
},
|
|
35
40
|
"dependencies": {
|
|
36
41
|
"@popperjs/core": "2.11.8",
|
|
37
|
-
"@stencil/core": "4.
|
|
38
|
-
"jodit": "4.12.
|
|
39
|
-
"@mgdis/
|
|
40
|
-
"@mgdis/
|
|
41
|
-
"@mgdis/
|
|
42
|
-
"@mgdis/
|
|
42
|
+
"@stencil/core": "4.43.5",
|
|
43
|
+
"jodit": "4.12.4",
|
|
44
|
+
"@mgdis/core-ui-helpers": "1.2.0",
|
|
45
|
+
"@mgdis/sanitize-html": "1.1.2",
|
|
46
|
+
"@mgdis/styles": "2.18.0",
|
|
47
|
+
"@mgdis/img": "2.7.0"
|
|
43
48
|
},
|
|
44
49
|
"devDependencies": {
|
|
45
|
-
"@playwright/test": "1.
|
|
46
|
-
"@storybook/addon-a11y": "10.
|
|
47
|
-
"@storybook/addon-docs": "10.
|
|
48
|
-
"@storybook/addon-links": "10.
|
|
49
|
-
"@storybook/html": "10.
|
|
50
|
-
"@storybook/html-vite": "10.
|
|
50
|
+
"@playwright/test": "1.60.0",
|
|
51
|
+
"@storybook/addon-a11y": "10.4.2",
|
|
52
|
+
"@storybook/addon-docs": "10.4.2",
|
|
53
|
+
"@storybook/addon-links": "10.4.2",
|
|
54
|
+
"@storybook/html": "10.4.2",
|
|
55
|
+
"@storybook/html-vite": "10.4.2",
|
|
51
56
|
"@types/jest": "29.5.14",
|
|
52
|
-
"@types/node": "24.12.
|
|
53
|
-
"chromatic": "
|
|
57
|
+
"@types/node": "24.12.4",
|
|
58
|
+
"chromatic": "17.2.0",
|
|
54
59
|
"eslint": "8.57.1",
|
|
55
|
-
"eslint-plugin-storybook": "10.
|
|
60
|
+
"eslint-plugin-storybook": "10.4.2",
|
|
56
61
|
"jest": "29.7.0",
|
|
57
62
|
"jest-cli": "29.7.0",
|
|
58
|
-
"jest-junit": "
|
|
63
|
+
"jest-junit": "17.0.0",
|
|
59
64
|
"jest-transform-stub": "2.0.0",
|
|
60
|
-
"react": "19.2.
|
|
61
|
-
"react-dom": "19.2.
|
|
62
|
-
"sass": "1.
|
|
63
|
-
"storybook": "10.
|
|
65
|
+
"react": "19.2.7",
|
|
66
|
+
"react-dom": "19.2.7",
|
|
67
|
+
"sass": "1.99.0",
|
|
68
|
+
"storybook": "10.4.2",
|
|
64
69
|
"storybook-addon-tag-badges": "3.1.0",
|
|
65
70
|
"typescript": "5.9.3",
|
|
66
|
-
"vite": "
|
|
71
|
+
"vite": "8.0.16",
|
|
67
72
|
"@core-ui/jest-config": "1.0.9",
|
|
68
73
|
"@mgdis/linting-stencil": "1.3.11"
|
|
69
74
|
},
|
|
@@ -75,7 +80,7 @@
|
|
|
75
80
|
"test": "TZ=UTC stencil test --spec --e2e",
|
|
76
81
|
"test:unit": "TZ=UTC stencil test --spec --collectCoverage",
|
|
77
82
|
"test:e2e": "pnpm --package=@pnpm/@playwright/test dlx playwright test",
|
|
78
|
-
"test:e2e:docker": "pnpm
|
|
83
|
+
"test:e2e:docker": "pnpm exec playwright test",
|
|
79
84
|
"test:watch": "stencil test --spec --e2e --watchAll",
|
|
80
85
|
"generate": "stencil generate",
|
|
81
86
|
"storybook": "storybook dev -p 6006",
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Possible input width
|
|
5
|
-
*/
|
|
6
|
-
const widths = [2, 4, 16, 'full'];
|
|
7
|
-
/**
|
|
8
|
-
* Possible tootltip postions
|
|
9
|
-
*/
|
|
10
|
-
const tooltipPositions = ['input', 'label'];
|
|
11
|
-
/**
|
|
12
|
-
* Possible label headings
|
|
13
|
-
*/
|
|
14
|
-
const labelHeadings = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
15
|
-
/**
|
|
16
|
-
* Is HTMLMgInputElement an HTMLMgInputFileElement
|
|
17
|
-
* @param input - input element
|
|
18
|
-
* @returns true if input is an mg-input-file element
|
|
19
|
-
*/
|
|
20
|
-
const isMgInputFile = (input) => input.nodeName === 'MG-INPUT-FILE';
|
|
21
|
-
const classFieldset = 'mg-c-input--fieldset';
|
|
22
|
-
const classDisabled = 'mg-c-input--disabled';
|
|
23
|
-
const classReadonly = 'mg-c-input--readonly';
|
|
24
|
-
const classVerticalList = 'mg-c-input--vertical-list';
|
|
25
|
-
const classDisplayCharacterLeft = 'mg-c-input--display-character-left';
|
|
26
|
-
|
|
27
|
-
exports.classDisabled = classDisabled;
|
|
28
|
-
exports.classDisplayCharacterLeft = classDisplayCharacterLeft;
|
|
29
|
-
exports.classFieldset = classFieldset;
|
|
30
|
-
exports.classReadonly = classReadonly;
|
|
31
|
-
exports.classVerticalList = classVerticalList;
|
|
32
|
-
exports.isMgInputFile = isMgInputFile;
|
|
33
|
-
exports.labelHeadings = labelHeadings;
|
|
34
|
-
exports.tooltipPositions = tooltipPositions;
|
|
35
|
-
exports.widths = widths;
|
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
import { h, Host } from "@stencil/core";
|
|
2
|
-
import { MgInputCheckboxList } from "../MgInputCheckboxList";
|
|
3
|
-
import { formatID } from "@mgdis/core-ui-helpers/dist/utils";
|
|
4
|
-
/**
|
|
5
|
-
* Internal component use to manage sections instances
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
export class MgInputCheckboxPaginated {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.step = 10;
|
|
11
|
-
/*************
|
|
12
|
-
* Decorators *
|
|
13
|
-
*************/
|
|
14
|
-
/**
|
|
15
|
-
* Define if mg-input-checkbox-list is readonly
|
|
16
|
-
*/
|
|
17
|
-
this.readonly = false;
|
|
18
|
-
/**
|
|
19
|
-
* Define if mg-input-checkbox-list is disabled
|
|
20
|
-
*/
|
|
21
|
-
this.disabled = false;
|
|
22
|
-
/**
|
|
23
|
-
* Page items limit to display
|
|
24
|
-
*/
|
|
25
|
-
this.limit = this.step;
|
|
26
|
-
/***********
|
|
27
|
-
* Methods *
|
|
28
|
-
***********/
|
|
29
|
-
/**
|
|
30
|
-
* Component has next checkboxes to display
|
|
31
|
-
* @returns truthy if have next elements
|
|
32
|
-
*/
|
|
33
|
-
this.hasNext = () => {
|
|
34
|
-
return this.checkboxes.length > this.limit;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Set items from checkboxes and limit
|
|
38
|
-
*/
|
|
39
|
-
this.setItems = () => {
|
|
40
|
-
this.items = this.checkboxes.slice(0, this.limit);
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Handle load-more <mg-button> click event
|
|
44
|
-
*/
|
|
45
|
-
this.handleLoadMore = () => {
|
|
46
|
-
if (this.hasNext()) {
|
|
47
|
-
this.limit += this.step;
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
watchCheckboxes() {
|
|
52
|
-
this.setItems();
|
|
53
|
-
}
|
|
54
|
-
watchLimit() {
|
|
55
|
-
this.setItems();
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Method to reset limit
|
|
59
|
-
*/
|
|
60
|
-
async resetLimit() {
|
|
61
|
-
this.limit = this.step;
|
|
62
|
-
}
|
|
63
|
-
/*************
|
|
64
|
-
* Lifecycle *
|
|
65
|
-
*************/
|
|
66
|
-
/**
|
|
67
|
-
* Validate props
|
|
68
|
-
*/
|
|
69
|
-
componentWillLoad() {
|
|
70
|
-
this.watchCheckboxes();
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Render
|
|
74
|
-
* @returns HTML Element
|
|
75
|
-
*/
|
|
76
|
-
render() {
|
|
77
|
-
const listId = formatID(this.messages.label);
|
|
78
|
-
const tabId = 'tab-info';
|
|
79
|
-
return (h(Host, { key: 'ce0fe4a842cc21f7f981b6a9286d592c2c28819b' }, h("slot", { key: '683c26f98e76262c565613529c76e7f3b27efbc5', name: "header-action" }), h("div", { key: 'eb9e9bfa54a467b44f4e90a8575ae8b1fe40ea10', class: "mg-c-input__tabs-content" }, h("p", { key: '6eeb40f89a0cc0b8ea0837f44babe8cd440ced0f', id: tabId, class: { 'mg-c-input__popover-info': true, 'mg-u-visually-hidden': this.items.length !== 0 }, "aria-live": this.items.length !== 0 ? 'polite' : undefined }, this.items.length === 0 ? this.messages.noValue : this.messages.values.replace('{count}', this.items.length.toString())), this.items.length > 0 && (h(MgInputCheckboxList, { key: '1625b0bdbb1de6ef0c55850e3a08a2cf322da317', checkboxes: this.items, labelledby: tabId, id: listId, disabled: this.disabled, name: this.name, invalid: this.invalid })), this.hasNext() && (h("mg-button", { key: "load-more", variant: "flat", class: "mg-c-input__load-more", tabIndex: -1, "full-width": true, onClick: this.handleLoadMore, "aria-controls": listId }, h("mg-icon", { key: '8f10cc6152899cf869023ff1c465763e9a05d7b6', icon: "chevron-down" }), this.messages.showMore)))));
|
|
80
|
-
}
|
|
81
|
-
static get is() { return "mg-input-checkbox-paginated"; }
|
|
82
|
-
static get encapsulation() { return "scoped"; }
|
|
83
|
-
static get properties() {
|
|
84
|
-
return {
|
|
85
|
-
"readonly": {
|
|
86
|
-
"type": "boolean",
|
|
87
|
-
"mutable": false,
|
|
88
|
-
"complexType": {
|
|
89
|
-
"original": "boolean",
|
|
90
|
-
"resolved": "boolean",
|
|
91
|
-
"references": {}
|
|
92
|
-
},
|
|
93
|
-
"required": false,
|
|
94
|
-
"optional": false,
|
|
95
|
-
"docs": {
|
|
96
|
-
"tags": [],
|
|
97
|
-
"text": "Define if mg-input-checkbox-list is readonly"
|
|
98
|
-
},
|
|
99
|
-
"getter": false,
|
|
100
|
-
"setter": false,
|
|
101
|
-
"reflect": false,
|
|
102
|
-
"attribute": "readonly",
|
|
103
|
-
"defaultValue": "false"
|
|
104
|
-
},
|
|
105
|
-
"disabled": {
|
|
106
|
-
"type": "boolean",
|
|
107
|
-
"mutable": false,
|
|
108
|
-
"complexType": {
|
|
109
|
-
"original": "boolean",
|
|
110
|
-
"resolved": "boolean",
|
|
111
|
-
"references": {}
|
|
112
|
-
},
|
|
113
|
-
"required": false,
|
|
114
|
-
"optional": false,
|
|
115
|
-
"docs": {
|
|
116
|
-
"tags": [],
|
|
117
|
-
"text": "Define if mg-input-checkbox-list is disabled"
|
|
118
|
-
},
|
|
119
|
-
"getter": false,
|
|
120
|
-
"setter": false,
|
|
121
|
-
"reflect": false,
|
|
122
|
-
"attribute": "disabled",
|
|
123
|
-
"defaultValue": "false"
|
|
124
|
-
},
|
|
125
|
-
"name": {
|
|
126
|
-
"type": "string",
|
|
127
|
-
"mutable": false,
|
|
128
|
-
"complexType": {
|
|
129
|
-
"original": "string",
|
|
130
|
-
"resolved": "string",
|
|
131
|
-
"references": {}
|
|
132
|
-
},
|
|
133
|
-
"required": false,
|
|
134
|
-
"optional": true,
|
|
135
|
-
"docs": {
|
|
136
|
-
"tags": [],
|
|
137
|
-
"text": "Define mg-input-checkbox input name"
|
|
138
|
-
},
|
|
139
|
-
"getter": false,
|
|
140
|
-
"setter": false,
|
|
141
|
-
"reflect": false,
|
|
142
|
-
"attribute": "name"
|
|
143
|
-
},
|
|
144
|
-
"invalid": {
|
|
145
|
-
"type": "boolean",
|
|
146
|
-
"mutable": false,
|
|
147
|
-
"complexType": {
|
|
148
|
-
"original": "boolean",
|
|
149
|
-
"resolved": "boolean",
|
|
150
|
-
"references": {}
|
|
151
|
-
},
|
|
152
|
-
"required": false,
|
|
153
|
-
"optional": true,
|
|
154
|
-
"docs": {
|
|
155
|
-
"tags": [],
|
|
156
|
-
"text": "Define mg-input-checkbox input invalid"
|
|
157
|
-
},
|
|
158
|
-
"getter": false,
|
|
159
|
-
"setter": false,
|
|
160
|
-
"reflect": false,
|
|
161
|
-
"attribute": "invalid"
|
|
162
|
-
},
|
|
163
|
-
"checkboxes": {
|
|
164
|
-
"type": "unknown",
|
|
165
|
-
"mutable": false,
|
|
166
|
-
"complexType": {
|
|
167
|
-
"original": "CheckboxItem[]",
|
|
168
|
-
"resolved": "CheckboxItem[]",
|
|
169
|
-
"references": {
|
|
170
|
-
"CheckboxItem": {
|
|
171
|
-
"location": "import",
|
|
172
|
-
"path": "../mg-input-checkbox.conf",
|
|
173
|
-
"id": "src/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.ts::CheckboxItem"
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
"required": false,
|
|
178
|
-
"optional": false,
|
|
179
|
-
"docs": {
|
|
180
|
-
"tags": [],
|
|
181
|
-
"text": "Define checkboxes to paginate"
|
|
182
|
-
},
|
|
183
|
-
"getter": false,
|
|
184
|
-
"setter": false
|
|
185
|
-
},
|
|
186
|
-
"messages": {
|
|
187
|
-
"type": "unknown",
|
|
188
|
-
"mutable": false,
|
|
189
|
-
"complexType": {
|
|
190
|
-
"original": "Record<string, string>",
|
|
191
|
-
"resolved": "string",
|
|
192
|
-
"references": {
|
|
193
|
-
"Record": {
|
|
194
|
-
"location": "global",
|
|
195
|
-
"id": "global::Record"
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
},
|
|
199
|
-
"required": false,
|
|
200
|
-
"optional": false,
|
|
201
|
-
"docs": {
|
|
202
|
-
"tags": [],
|
|
203
|
-
"text": "Define component message"
|
|
204
|
-
},
|
|
205
|
-
"getter": false,
|
|
206
|
-
"setter": false
|
|
207
|
-
}
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
static get states() {
|
|
211
|
-
return {
|
|
212
|
-
"limit": {}
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
static get methods() {
|
|
216
|
-
return {
|
|
217
|
-
"resetLimit": {
|
|
218
|
-
"complexType": {
|
|
219
|
-
"signature": "() => Promise<void>",
|
|
220
|
-
"parameters": [],
|
|
221
|
-
"references": {
|
|
222
|
-
"Promise": {
|
|
223
|
-
"location": "global",
|
|
224
|
-
"id": "global::Promise"
|
|
225
|
-
}
|
|
226
|
-
},
|
|
227
|
-
"return": "Promise<void>"
|
|
228
|
-
},
|
|
229
|
-
"docs": {
|
|
230
|
-
"text": "Method to reset limit",
|
|
231
|
-
"tags": []
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
static get watchers() {
|
|
237
|
-
return [{
|
|
238
|
-
"propName": "checkboxes",
|
|
239
|
-
"methodName": "watchCheckboxes"
|
|
240
|
-
}, {
|
|
241
|
-
"propName": "limit",
|
|
242
|
-
"methodName": "watchLimit"
|
|
243
|
-
}];
|
|
244
|
-
}
|
|
245
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface MgInputCheckboxPaginated extends Components.MgInputCheckboxPaginated, HTMLElement {}
|
|
4
|
-
export const MgInputCheckboxPaginated: {
|
|
5
|
-
prototype: MgInputCheckboxPaginated;
|
|
6
|
-
new (): MgInputCheckboxPaginated;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{M as o,d as t}from"./mg-input-checkbox-paginated2.js";const a=o,p=t;export{a as MgInputCheckboxPaginated,p as defineCustomElement}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as t,transformTag as e,proxyCustomElement as i,HTMLElement as s,Host as c}from"@stencil/core/internal/client";import{f as a}from"./index2.js";import{d as n}from"./mg-button2.js";import{d as o}from"./mg-icon2.js";const h=e=>t("div",{class:"mg-c-input__input-group-container","aria-labelledby":e.labelledby,id:e.id},e.checkboxes.map((i=>{var s,c;return t("div",{key:i._id,class:{"mg-c-input__input-group":!0,"mg-c-input__input-group--disabled":e.disabled||i.disabled}},t("input",{type:"checkbox",id:i._id,name:e.name,value:null===(s=i.value)||void 0===s?void 0:s.toString(),checked:Boolean(i.value),required:i.required,"aria-invalid":(null===(c=e.invalid)||void 0===c?void 0:c.toString())||"false",disabled:e.disabled||i.disabled,indeterminate:null===i.value,onInput:i._handleInput,onBlur:i._handleBlur,onKeyDown:i._handleKeydown}),t("label",{htmlFor:i._id},i.title))}))),l=i(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.step=10,this.readonly=!1,this.disabled=!1,this.limit=this.step,this.hasNext=()=>this.checkboxes.length>this.limit,this.setItems=()=>{this.items=this.checkboxes.slice(0,this.limit)},this.handleLoadMore=()=>{this.hasNext()&&(this.limit+=this.step)}}watchCheckboxes(){this.setItems()}watchLimit(){this.setItems()}async resetLimit(){this.limit=this.step}componentWillLoad(){this.watchCheckboxes()}render(){const e=a(this.messages.label),i="tab-info";return t(c,{key:"ce0fe4a842cc21f7f981b6a9286d592c2c28819b"},t("slot",{key:"683c26f98e76262c565613529c76e7f3b27efbc5",name:"header-action"}),t("div",{key:"eb9e9bfa54a467b44f4e90a8575ae8b1fe40ea10",class:"mg-c-input__tabs-content"},t("p",{key:"6eeb40f89a0cc0b8ea0837f44babe8cd440ced0f",id:i,class:{"mg-c-input__popover-info":!0,"mg-u-visually-hidden":0!==this.items.length},"aria-live":0!==this.items.length?"polite":void 0},0===this.items.length?this.messages.noValue:this.messages.values.replace("{count}",this.items.length.toString())),this.items.length>0&&t(h,{key:"1625b0bdbb1de6ef0c55850e3a08a2cf322da317",checkboxes:this.items,labelledby:i,id:e,disabled:this.disabled,name:this.name,invalid:this.invalid}),this.hasNext()&&t("mg-button",{key:"load-more",variant:"flat",class:"mg-c-input__load-more",tabIndex:-1,"full-width":!0,onClick:this.handleLoadMore,"aria-controls":e},t("mg-icon",{key:"8f10cc6152899cf869023ff1c465763e9a05d7b6",icon:"chevron-down"}),this.messages.showMore)))}static get watchers(){return{checkboxes:[{watchCheckboxes:0}],limit:[{watchLimit:0}]}}},[262,"mg-input-checkbox-paginated",{readonly:[4],disabled:[4],name:[1],invalid:[4],checkboxes:[16],messages:[16],limit:[32],resetLimit:[64]},void 0,{checkboxes:[{watchCheckboxes:0}],limit:[{watchLimit:0}]}]);function d(){"undefined"!=typeof customElements&&["mg-input-checkbox-paginated","mg-button","mg-icon"].forEach((t=>{switch(t){case"mg-input-checkbox-paginated":customElements.get(e(t))||customElements.define(e(t),l);break;case"mg-button":customElements.get(e(t))||n();break;case"mg-icon":customElements.get(e(t))||o()}}))}d();export{l as M,h as a,d}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Possible input width
|
|
3
|
-
*/
|
|
4
|
-
const widths = [2, 4, 16, 'full'];
|
|
5
|
-
/**
|
|
6
|
-
* Possible tootltip postions
|
|
7
|
-
*/
|
|
8
|
-
const tooltipPositions = ['input', 'label'];
|
|
9
|
-
/**
|
|
10
|
-
* Possible label headings
|
|
11
|
-
*/
|
|
12
|
-
const labelHeadings = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
13
|
-
/**
|
|
14
|
-
* Is HTMLMgInputElement an HTMLMgInputFileElement
|
|
15
|
-
* @param input - input element
|
|
16
|
-
* @returns true if input is an mg-input-file element
|
|
17
|
-
*/
|
|
18
|
-
const isMgInputFile = (input) => input.nodeName === 'MG-INPUT-FILE';
|
|
19
|
-
const classFieldset = 'mg-c-input--fieldset';
|
|
20
|
-
const classDisabled = 'mg-c-input--disabled';
|
|
21
|
-
const classReadonly = 'mg-c-input--readonly';
|
|
22
|
-
const classVerticalList = 'mg-c-input--vertical-list';
|
|
23
|
-
const classDisplayCharacterLeft = 'mg-c-input--display-character-left';
|
|
24
|
-
|
|
25
|
-
export { classDisabled as a, classFieldset as b, classReadonly as c, classVerticalList as d, classDisplayCharacterLeft as e, isMgInputFile as i, labelHeadings as l, tooltipPositions as t, widths as w };
|