@ezeep/ezeep-js 1.0.267 → 1.0.268
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-D7ISNeUi.js +16 -0
- package/dist/cjs/ezeep.cjs.js +43 -12
- package/dist/cjs/ezp-auth_15.cjs.entry.js +27964 -26035
- package/dist/cjs/index-dv_gozsq.js +4694 -0
- package/dist/cjs/loader.cjs.js +7 -17
- package/dist/collection/collection-manifest.json +19 -18
- package/dist/collection/components/ezp-auth/ezp-auth.js +266 -245
- package/dist/collection/components/ezp-backdrop/ezp-backdrop.js +93 -81
- package/dist/collection/components/ezp-dialog/ezp-dialog.js +226 -210
- package/dist/collection/components/ezp-icon/ezp-icon.js +117 -102
- package/dist/collection/components/ezp-icon-button/ezp-icon-button.js +181 -159
- package/dist/collection/components/ezp-input/ezp-input.css +5 -5
- package/dist/collection/components/ezp-input/ezp-input.js +227 -205
- package/dist/collection/components/ezp-label/ezp-label.css +5 -5
- package/dist/collection/components/ezp-label/ezp-label.js +151 -132
- package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.css +5 -5
- package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.js +1118 -1107
- package/dist/collection/components/ezp-printing/ezp-printing.css +183 -125
- package/dist/collection/components/ezp-printing/ezp-printing.js +872 -807
- package/dist/collection/components/ezp-select/ezp-select.css +4 -4
- package/dist/collection/components/ezp-select/ezp-select.js +376 -351
- package/dist/collection/components/ezp-status/ezp-status.css +5 -5
- package/dist/collection/components/ezp-status/ezp-status.js +238 -223
- package/dist/collection/components/ezp-stepper/ezp-stepper.css +5 -5
- package/dist/collection/components/ezp-stepper/ezp-stepper.js +256 -243
- package/dist/collection/components/ezp-text-button/ezp-text-button.js +196 -174
- package/dist/collection/components/ezp-upload/ezp-upload.js +134 -141
- package/dist/collection/components/ezp-user-menu/ezp-user-menu.css +5 -5
- package/dist/collection/components/ezp-user-menu/ezp-user-menu.js +180 -185
- package/dist/collection/services/auth.js +133 -133
- package/dist/collection/services/print.js +167 -167
- package/dist/collection/services/user.js +16 -16
- package/dist/collection/shared/global.js +7 -7
- package/dist/collection/utils/utils.js +89 -89
- package/dist/components/auth.js +1 -0
- package/dist/components/ezp-auth.d.ts +11 -0
- package/dist/components/ezp-auth.js +1 -0
- package/dist/components/ezp-auth2.js +1 -0
- package/dist/components/ezp-backdrop.d.ts +11 -0
- package/dist/components/ezp-backdrop.js +1 -0
- package/dist/components/ezp-backdrop2.js +1 -0
- package/dist/components/ezp-dialog.d.ts +11 -0
- package/dist/components/ezp-dialog.js +1 -0
- package/dist/components/ezp-dialog2.js +1 -0
- package/dist/components/ezp-icon-button.d.ts +11 -0
- package/dist/components/ezp-icon-button.js +1 -0
- package/dist/components/ezp-icon-button2.js +1 -0
- package/dist/components/ezp-icon.d.ts +11 -0
- package/dist/components/ezp-icon.js +1 -0
- package/dist/components/ezp-icon2.js +1 -0
- package/dist/components/ezp-input.d.ts +11 -0
- package/dist/components/ezp-input.js +1 -0
- package/dist/components/ezp-input2.js +1 -0
- package/dist/components/ezp-label.d.ts +11 -0
- package/dist/components/ezp-label.js +1 -0
- package/dist/components/ezp-label2.js +1 -0
- package/dist/components/ezp-printer-selection.d.ts +11 -0
- package/dist/components/ezp-printer-selection.js +1 -0
- package/dist/components/ezp-printer-selection2.js +1 -0
- package/dist/components/ezp-printing.d.ts +11 -0
- package/dist/components/ezp-printing.js +1 -0
- package/dist/components/ezp-select.d.ts +11 -0
- package/dist/components/ezp-select.js +1 -0
- package/dist/components/ezp-select2.js +1 -0
- package/dist/components/ezp-status.d.ts +11 -0
- package/dist/components/ezp-status.js +1 -0
- package/dist/components/ezp-status2.js +1 -0
- package/dist/components/ezp-stepper.d.ts +11 -0
- package/dist/components/ezp-stepper.js +1 -0
- package/dist/components/ezp-stepper2.js +1 -0
- package/dist/components/ezp-text-button.d.ts +11 -0
- package/dist/components/ezp-text-button.js +1 -0
- package/dist/components/ezp-text-button2.js +1 -0
- package/dist/components/ezp-upload.d.ts +11 -0
- package/dist/components/ezp-upload.js +1 -0
- package/dist/components/ezp-upload2.js +1 -0
- package/dist/components/ezp-user-menu.d.ts +11 -0
- package/dist/components/ezp-user-menu.js +1 -0
- package/dist/components/ezp-user-menu2.js +1 -0
- package/dist/components/i18next.js +1 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/directives/angular-component-lib/utils.ts +33 -14
- package/dist/directives/proxies.ts +231 -111
- package/dist/esm/app-globals-CpP67t2l.js +14 -0
- package/dist/esm/ezeep.js +41 -12
- package/dist/esm/ezp-auth_15.entry.js +27967 -26036
- package/dist/esm/index-BTfWEHH9.js +4677 -0
- package/dist/esm/loader.js +7 -15
- package/dist/esm-es5/app-globals-CpP67t2l.js +1 -0
- package/dist/esm-es5/ezeep.js +1 -1
- package/dist/esm-es5/ezp-auth_15.entry.js +2 -2
- package/dist/esm-es5/index-BTfWEHH9.js +13 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/ezeep/ezeep.esm.js +1 -1
- package/dist/ezeep/ezeep.js +16 -19
- package/dist/ezeep/p-5ok9OZMg.system.js +1 -0
- package/dist/ezeep/p-BTfWEHH9.js +2 -0
- package/dist/ezeep/p-CfQRcOh8.system.js +1 -0
- package/dist/ezeep/p-CpP67t2l.js +1 -0
- package/dist/ezeep/p-DhXN1yGM.system.js +13 -0
- package/dist/ezeep/p-ba70b358.entry.js +1 -0
- package/dist/ezeep/p-f3ad7583.system.entry.js +7 -0
- package/dist/types/components/ezp-auth/ezp-auth.d.ts +20 -20
- package/dist/types/components/ezp-backdrop/ezp-backdrop.d.ts +7 -7
- package/dist/types/components/ezp-dialog/ezp-dialog.d.ts +38 -38
- package/dist/types/components/ezp-icon/ezp-icon.d.ts +24 -24
- package/dist/types/components/ezp-icon-button/ezp-icon-button.d.ts +23 -23
- package/dist/types/components/ezp-input/ezp-input.d.ts +38 -38
- package/dist/types/components/ezp-label/ezp-label.d.ts +21 -21
- package/dist/types/components/ezp-printer-selection/ezp-printer-selection.d.ts +116 -116
- package/dist/types/components/ezp-printing/ezp-printing.d.ts +83 -83
- package/dist/types/components/ezp-select/ezp-select.d.ts +80 -80
- package/dist/types/components/ezp-status/ezp-status.d.ts +40 -40
- package/dist/types/components/ezp-stepper/ezp-stepper.d.ts +65 -65
- package/dist/types/components/ezp-text-button/ezp-text-button.d.ts +25 -25
- package/dist/types/components/ezp-upload/ezp-upload.d.ts +38 -38
- package/dist/types/components/ezp-user-menu/ezp-user-menu.d.ts +43 -43
- package/dist/types/components.d.ts +493 -50
- package/dist/types/services/auth.d.ts +27 -27
- package/dist/types/services/print.d.ts +32 -32
- package/dist/types/services/user.d.ts +4 -4
- package/dist/types/stencil-public-runtime.d.ts +335 -40
- package/dist/types/utils/utils.d.ts +6 -6
- package/loader/cdn.js +1 -2
- package/loader/index.cjs.js +1 -2
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -2
- package/loader/index.js +1 -2
- package/package.json +10 -10
- package/www/build/ezeep.esm.js +1 -1
- package/www/build/ezeep.js +16 -19
- package/www/build/p-5ok9OZMg.system.js +1 -0
- package/www/build/p-8f4a7bc3.js +1 -0
- package/www/build/p-BTfWEHH9.js +2 -0
- package/www/build/p-CfQRcOh8.system.js +1 -0
- package/www/build/p-CpP67t2l.js +1 -0
- package/www/build/p-DhXN1yGM.system.js +13 -0
- package/www/build/p-ba70b358.entry.js +1 -0
- package/www/build/p-f3ad7583.system.entry.js +7 -0
- package/www/index.html +1 -1
- package/dist/cjs/app-globals-53afb196.js +0 -15
- package/dist/cjs/index-1f953145.js +0 -1482
- package/dist/custom-elements/index.d.ts +0 -129
- package/dist/custom-elements/index.js +0 -34555
- package/dist/esm/app-globals-28960cbc.js +0 -13
- package/dist/esm/index-3ac1b749.js +0 -1450
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm-es5/app-globals-28960cbc.js +0 -1
- package/dist/esm-es5/index-3ac1b749.js +0 -1
- package/dist/ezeep/p-0cc2026d.system.js +0 -1
- package/dist/ezeep/p-312f40d7.js +0 -1
- package/dist/ezeep/p-4a7d6c3a.system.entry.js +0 -7
- package/dist/ezeep/p-84bd195a.system.js +0 -1
- package/dist/ezeep/p-a4d37138.js +0 -1
- package/dist/ezeep/p-ded04529.system.js +0 -1
- package/dist/ezeep/p-e20ee337.entry.js +0 -1
- package/loader/package.json +0 -10
- package/www/build/p-0cc2026d.system.js +0 -1
- package/www/build/p-312f40d7.js +0 -1
- package/www/build/p-4a7d6c3a.system.entry.js +0 -7
- package/www/build/p-84bd195a.system.js +0 -1
- package/www/build/p-a4d37138.js +0 -1
- package/www/build/p-ded04529.system.js +0 -1
- package/www/build/p-e20ee337.entry.js +0 -1
- /package/dist/ezeep/{p-50ea2036.system.js → p-YWpyar7R.system.js} +0 -0
- /package/www/build/{p-50ea2036.system.js → p-YWpyar7R.system.js} +0 -0
|
@@ -1,369 +1,394 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
2
|
export class EzpSelect {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
3
|
+
constructor() {
|
|
4
|
+
this.backdrop = document.createElement('ezp-backdrop');
|
|
5
|
+
this.containerHeight = 0;
|
|
6
|
+
this.expandCover = false;
|
|
7
|
+
this.expandRise = false;
|
|
8
|
+
this.listHeight = 0;
|
|
9
|
+
this.spacing = 6;
|
|
10
|
+
this.toggleHeight = 0;
|
|
11
|
+
this.wrapDiff = 0;
|
|
12
|
+
this.wrapHeight = 0;
|
|
13
|
+
this.wrapTop = 0;
|
|
14
|
+
this.duration = 0;
|
|
15
|
+
/** Description... */
|
|
16
|
+
this.label = 'Label';
|
|
17
|
+
/** Description... */
|
|
18
|
+
this.placeholder = 'Placeholder';
|
|
19
|
+
/** Description... */
|
|
20
|
+
this.toggleFlow = 'horizontal';
|
|
21
|
+
/** Description... */
|
|
22
|
+
this.disabled = false;
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* States
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
/** Description... */
|
|
29
|
+
this.expanded = false;
|
|
30
|
+
/** Description... */
|
|
31
|
+
this.selected = { id: false, title: '', meta: '' };
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* Private methods
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
this.toggle = () => {
|
|
38
|
+
this.containerHeight = this.container.clientHeight - this.spacing * 2;
|
|
39
|
+
this.listHeight = this.list.scrollHeight;
|
|
40
|
+
this.wrapTop = this.component.offsetTop;
|
|
41
|
+
this.wrapHeight = this.toggleHeight + this.listHeight;
|
|
42
|
+
this.expandCover = this.wrapHeight > this.containerHeight;
|
|
43
|
+
this.expandRise = this.wrapHeight > this.containerHeight - this.wrapTop;
|
|
44
|
+
this.wrapDiff = this.containerHeight - this.wrapHeight - this.wrapTop;
|
|
45
|
+
this.expanded = !this.expanded;
|
|
46
|
+
this.selectToggle.emit(this.expanded);
|
|
47
|
+
};
|
|
48
|
+
this.select = (id) => {
|
|
49
|
+
var _a;
|
|
50
|
+
const delay = ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.id) === id ? 0 : this.duration * 1000;
|
|
51
|
+
this.selected = this.options.find((option) => option.id === id);
|
|
52
|
+
this.selectSelection.emit(this.selected);
|
|
53
|
+
window.setTimeout(() => {
|
|
54
|
+
this.toggle();
|
|
55
|
+
}, delay);
|
|
56
|
+
};
|
|
57
|
+
this.preSelect = () => {
|
|
58
|
+
var _a;
|
|
59
|
+
this.selected = (_a = this.options) === null || _a === void 0 ? void 0 : _a.find((option) => typeof this.preSelected === 'number'
|
|
60
|
+
? option.id === this.preSelected
|
|
61
|
+
: typeof this.preSelected === 'string'
|
|
62
|
+
? option.title === this.preSelected
|
|
63
|
+
: null);
|
|
64
|
+
};
|
|
65
|
+
}
|
|
23
66
|
/**
|
|
24
67
|
*
|
|
25
|
-
*
|
|
68
|
+
* Watchers
|
|
26
69
|
*
|
|
27
70
|
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
71
|
+
watchExpanded() {
|
|
72
|
+
if (this.expandCover) {
|
|
73
|
+
this.component.style.setProperty('--ezp-select-list-height', this.expanded ? `${this.containerHeight - this.toggleHeight}px` : '0px');
|
|
74
|
+
this.component.style.setProperty('--ezp-select-wrap-translateY', this.expanded ? `${this.wrapTop * -1 + this.spacing}px` : '0px');
|
|
75
|
+
}
|
|
76
|
+
else if (this.expandRise) {
|
|
77
|
+
this.component.style.setProperty('--ezp-select-list-height', this.expanded ? `${this.listHeight}px` : '0px');
|
|
78
|
+
this.component.style.setProperty('--ezp-select-wrap-translateY', this.expanded ? `${this.wrapDiff + this.spacing}px` : '0px');
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
this.component.style.setProperty('--ezp-select-list-height', this.expanded ? `${this.listHeight}px` : '0px');
|
|
82
|
+
}
|
|
83
|
+
if (this.expanded) {
|
|
84
|
+
this.backdrop.visible = true;
|
|
85
|
+
this.container.appendChild(this.backdrop);
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
this.backdrop.visible = false;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
preSelectedChanged() {
|
|
92
|
+
this.preSelect();
|
|
93
|
+
}
|
|
32
94
|
/**
|
|
33
95
|
*
|
|
34
|
-
*
|
|
96
|
+
* Lifecycle methods
|
|
35
97
|
*
|
|
36
98
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
? option.title === this.preSelected
|
|
63
|
-
: null);
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
*
|
|
68
|
-
* Watchers
|
|
69
|
-
*
|
|
70
|
-
*/
|
|
71
|
-
watchExpanded() {
|
|
72
|
-
if (this.expandCover) {
|
|
73
|
-
this.component.style.setProperty('--ezp-select-list-height', this.expanded ? `${this.containerHeight - this.toggleHeight}px` : '0px');
|
|
74
|
-
this.component.style.setProperty('--ezp-select-wrap-translateY', this.expanded ? `${this.wrapTop * -1 + this.spacing}px` : '0px');
|
|
99
|
+
componentWillLoad() {
|
|
100
|
+
this.container = this.component.closest('[data-backdrop-surface]');
|
|
101
|
+
this.backdrop.addEventListener('backdropHideStart', () => {
|
|
102
|
+
this.expanded = false;
|
|
103
|
+
});
|
|
104
|
+
this.backdrop.addEventListener('backdropHideEnd', () => {
|
|
105
|
+
this.container.removeChild(this.backdrop);
|
|
106
|
+
});
|
|
107
|
+
if (this.preSelected !== undefined && this.preSelected !== '' && this.preSelected !== null) {
|
|
108
|
+
this.preSelect();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
componentDidLoad() {
|
|
112
|
+
const styles = getComputedStyle(this.component);
|
|
113
|
+
this.toggleHeight = parseInt(styles.getPropertyValue('--ezp-select-toggle-height'));
|
|
114
|
+
this.duration = parseFloat(styles.getPropertyValue('--ezp-select-duration'));
|
|
115
|
+
}
|
|
116
|
+
componentWillUpdate() {
|
|
117
|
+
var _a;
|
|
118
|
+
if (((_a = this.selected) === null || _a === void 0 ? void 0 : _a.id) === false &&
|
|
119
|
+
this.preSelected !== undefined &&
|
|
120
|
+
this.preSelected !== '' &&
|
|
121
|
+
this.preSelected !== null) {
|
|
122
|
+
this.preSelect();
|
|
123
|
+
}
|
|
75
124
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
125
|
+
/**
|
|
126
|
+
*
|
|
127
|
+
* Render method
|
|
128
|
+
*
|
|
129
|
+
*/
|
|
130
|
+
render() {
|
|
131
|
+
var _a, _b, _c;
|
|
132
|
+
const hostClasses = [
|
|
133
|
+
this.expanded ? 'is-expanded' : '',
|
|
134
|
+
this.icon ? 'has-icon' : '',
|
|
135
|
+
`toggle-${this.toggleFlow}`,
|
|
136
|
+
this.optionFlow ? `option-${this.optionFlow}` : '',
|
|
137
|
+
this.disabled ? 'disabled' : '',
|
|
138
|
+
];
|
|
139
|
+
const labelLevel = this.toggleFlow === 'horizontal' ? 'secondary' : 'tertiary';
|
|
140
|
+
return (h(Host, { key: '83c7b61b1b9362a970ba6813a1bb5e906ee56141', class: hostClasses.join(' ') }, h("div", { key: 'df54f1cd115d4d7ca46c6d4719909747769a0b33', id: "wrap" }, h("div", { key: 'a5beb6bdb7918ee120f7e09b70a9e0cbcd15b309', id: "toggle", onClick: () => !this.disabled && this.toggle() }, this.icon ? h("ezp-icon", { id: "icon", name: this.icon }) : null, h("ezp-label", { key: '25e7315afd533ae3aeb6455aa95cfe9acb4f8448', id: "label", noWrap: true, level: labelLevel, text: this.label }), h("ezp-label", { key: 'ed4c2a0eb21930de52b1a1b5462d2e6fb78f4c0a', id: "value", ellipsis: true, text: ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.title) !== '' ? (_b = this.selected) === null || _b === void 0 ? void 0 : _b.title : this.placeholder }), h("ezp-icon", { key: '46dacc59d23f3f8fb52181e6d23ac75ba4fd0ada', id: "accessory", name: "expand" })), h("div", { key: '0ca5ee65dc954ee6893e8f55b3529001654bb467', id: "list", ref: (element) => (this.list = element) }, (_c = this.options) === null || _c === void 0 ? void 0 : _c.map((option) => {
|
|
141
|
+
var _a;
|
|
142
|
+
if (option.title !== '') {
|
|
143
|
+
return (h("div", { class: `option ${option.id === ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.id) ? 'is-selected' : ''} ${option.meta !== '' ? 'has-meta' : ''} `, onClick: () => this.select(option.id) }, h("ezp-icon", { name: "checkmark", class: "indicator" }), h("div", { class: "details" }, h("ezp-label", { class: "title", ellipsis: true, text: option.title }), option.meta !== '' ? (h("ezp-label", { level: "tertiary", class: "meta", text: option.meta, ellipsis: true })) : null)));
|
|
144
|
+
}
|
|
145
|
+
})))));
|
|
79
146
|
}
|
|
80
|
-
|
|
81
|
-
|
|
147
|
+
static get is() { return "ezp-select"; }
|
|
148
|
+
static get encapsulation() { return "shadow"; }
|
|
149
|
+
static get originalStyleUrls() {
|
|
150
|
+
return {
|
|
151
|
+
"$": ["ezp-select.scss"]
|
|
152
|
+
};
|
|
82
153
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
154
|
+
static get styleUrls() {
|
|
155
|
+
return {
|
|
156
|
+
"$": ["ezp-select.css"]
|
|
157
|
+
};
|
|
86
158
|
}
|
|
87
|
-
|
|
88
|
-
|
|
159
|
+
static get properties() {
|
|
160
|
+
return {
|
|
161
|
+
"icon": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"mutable": false,
|
|
164
|
+
"complexType": {
|
|
165
|
+
"original": "IconNameTypes",
|
|
166
|
+
"resolved": "\"account\" | \"checkmark\" | \"checkmark-alt\" | \"close\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"paper_range\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"trays\" | \"width\"",
|
|
167
|
+
"references": {
|
|
168
|
+
"IconNameTypes": {
|
|
169
|
+
"location": "import",
|
|
170
|
+
"path": "../../shared/types",
|
|
171
|
+
"id": "src/shared/types.d.ts::IconNameTypes",
|
|
172
|
+
"referenceLocation": "IconNameTypes"
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"required": false,
|
|
177
|
+
"optional": false,
|
|
178
|
+
"docs": {
|
|
179
|
+
"tags": [],
|
|
180
|
+
"text": "Description..."
|
|
181
|
+
},
|
|
182
|
+
"getter": false,
|
|
183
|
+
"setter": false,
|
|
184
|
+
"reflect": false,
|
|
185
|
+
"attribute": "icon"
|
|
186
|
+
},
|
|
187
|
+
"label": {
|
|
188
|
+
"type": "string",
|
|
189
|
+
"mutable": false,
|
|
190
|
+
"complexType": {
|
|
191
|
+
"original": "string",
|
|
192
|
+
"resolved": "string",
|
|
193
|
+
"references": {}
|
|
194
|
+
},
|
|
195
|
+
"required": false,
|
|
196
|
+
"optional": false,
|
|
197
|
+
"docs": {
|
|
198
|
+
"tags": [],
|
|
199
|
+
"text": "Description..."
|
|
200
|
+
},
|
|
201
|
+
"getter": false,
|
|
202
|
+
"setter": false,
|
|
203
|
+
"reflect": false,
|
|
204
|
+
"attribute": "label",
|
|
205
|
+
"defaultValue": "'Label'"
|
|
206
|
+
},
|
|
207
|
+
"optionFlow": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"mutable": false,
|
|
210
|
+
"complexType": {
|
|
211
|
+
"original": "SelectFlowTypes",
|
|
212
|
+
"resolved": "\"horizontal\" | \"vertical\"",
|
|
213
|
+
"references": {
|
|
214
|
+
"SelectFlowTypes": {
|
|
215
|
+
"location": "import",
|
|
216
|
+
"path": "../../shared/types",
|
|
217
|
+
"id": "src/shared/types.d.ts::SelectFlowTypes",
|
|
218
|
+
"referenceLocation": "SelectFlowTypes"
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"required": false,
|
|
223
|
+
"optional": false,
|
|
224
|
+
"docs": {
|
|
225
|
+
"tags": [],
|
|
226
|
+
"text": "Description..."
|
|
227
|
+
},
|
|
228
|
+
"getter": false,
|
|
229
|
+
"setter": false,
|
|
230
|
+
"reflect": false,
|
|
231
|
+
"attribute": "option-flow"
|
|
232
|
+
},
|
|
233
|
+
"options": {
|
|
234
|
+
"type": "unknown",
|
|
235
|
+
"mutable": false,
|
|
236
|
+
"complexType": {
|
|
237
|
+
"original": "SelectOptionType[]",
|
|
238
|
+
"resolved": "SelectOptionType[]",
|
|
239
|
+
"references": {
|
|
240
|
+
"SelectOptionType": {
|
|
241
|
+
"location": "import",
|
|
242
|
+
"path": "../../shared/types",
|
|
243
|
+
"id": "src/shared/types.d.ts::SelectOptionType",
|
|
244
|
+
"referenceLocation": "SelectOptionType"
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"required": false,
|
|
249
|
+
"optional": false,
|
|
250
|
+
"docs": {
|
|
251
|
+
"tags": [],
|
|
252
|
+
"text": "Description..."
|
|
253
|
+
},
|
|
254
|
+
"getter": false,
|
|
255
|
+
"setter": false
|
|
256
|
+
},
|
|
257
|
+
"placeholder": {
|
|
258
|
+
"type": "string",
|
|
259
|
+
"mutable": false,
|
|
260
|
+
"complexType": {
|
|
261
|
+
"original": "string",
|
|
262
|
+
"resolved": "string",
|
|
263
|
+
"references": {}
|
|
264
|
+
},
|
|
265
|
+
"required": false,
|
|
266
|
+
"optional": false,
|
|
267
|
+
"docs": {
|
|
268
|
+
"tags": [],
|
|
269
|
+
"text": "Description..."
|
|
270
|
+
},
|
|
271
|
+
"getter": false,
|
|
272
|
+
"setter": false,
|
|
273
|
+
"reflect": false,
|
|
274
|
+
"attribute": "placeholder",
|
|
275
|
+
"defaultValue": "'Placeholder'"
|
|
276
|
+
},
|
|
277
|
+
"preSelected": {
|
|
278
|
+
"type": "any",
|
|
279
|
+
"mutable": false,
|
|
280
|
+
"complexType": {
|
|
281
|
+
"original": "any",
|
|
282
|
+
"resolved": "any",
|
|
283
|
+
"references": {}
|
|
284
|
+
},
|
|
285
|
+
"required": false,
|
|
286
|
+
"optional": false,
|
|
287
|
+
"docs": {
|
|
288
|
+
"tags": [],
|
|
289
|
+
"text": "Description..."
|
|
290
|
+
},
|
|
291
|
+
"getter": false,
|
|
292
|
+
"setter": false,
|
|
293
|
+
"reflect": false,
|
|
294
|
+
"attribute": "pre-selected"
|
|
295
|
+
},
|
|
296
|
+
"toggleFlow": {
|
|
297
|
+
"type": "string",
|
|
298
|
+
"mutable": false,
|
|
299
|
+
"complexType": {
|
|
300
|
+
"original": "SelectFlowTypes",
|
|
301
|
+
"resolved": "\"horizontal\" | \"vertical\"",
|
|
302
|
+
"references": {
|
|
303
|
+
"SelectFlowTypes": {
|
|
304
|
+
"location": "import",
|
|
305
|
+
"path": "../../shared/types",
|
|
306
|
+
"id": "src/shared/types.d.ts::SelectFlowTypes",
|
|
307
|
+
"referenceLocation": "SelectFlowTypes"
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
"required": false,
|
|
312
|
+
"optional": false,
|
|
313
|
+
"docs": {
|
|
314
|
+
"tags": [],
|
|
315
|
+
"text": "Description..."
|
|
316
|
+
},
|
|
317
|
+
"getter": false,
|
|
318
|
+
"setter": false,
|
|
319
|
+
"reflect": false,
|
|
320
|
+
"attribute": "toggle-flow",
|
|
321
|
+
"defaultValue": "'horizontal'"
|
|
322
|
+
},
|
|
323
|
+
"disabled": {
|
|
324
|
+
"type": "boolean",
|
|
325
|
+
"mutable": false,
|
|
326
|
+
"complexType": {
|
|
327
|
+
"original": "boolean",
|
|
328
|
+
"resolved": "boolean",
|
|
329
|
+
"references": {}
|
|
330
|
+
},
|
|
331
|
+
"required": false,
|
|
332
|
+
"optional": false,
|
|
333
|
+
"docs": {
|
|
334
|
+
"tags": [],
|
|
335
|
+
"text": "Description..."
|
|
336
|
+
},
|
|
337
|
+
"getter": false,
|
|
338
|
+
"setter": false,
|
|
339
|
+
"reflect": false,
|
|
340
|
+
"attribute": "disabled",
|
|
341
|
+
"defaultValue": "false"
|
|
342
|
+
}
|
|
343
|
+
};
|
|
89
344
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
*
|
|
96
|
-
* Lifecycle methods
|
|
97
|
-
*
|
|
98
|
-
*/
|
|
99
|
-
componentWillLoad() {
|
|
100
|
-
this.container = this.component.closest('[data-backdrop-surface]');
|
|
101
|
-
this.backdrop.addEventListener('backdropHideStart', () => {
|
|
102
|
-
this.expanded = false;
|
|
103
|
-
});
|
|
104
|
-
this.backdrop.addEventListener('backdropHideEnd', () => {
|
|
105
|
-
this.container.removeChild(this.backdrop);
|
|
106
|
-
});
|
|
107
|
-
if (this.preSelected !== undefined && this.preSelected !== '' && this.preSelected !== null) {
|
|
108
|
-
this.preSelect();
|
|
345
|
+
static get states() {
|
|
346
|
+
return {
|
|
347
|
+
"expanded": {},
|
|
348
|
+
"selected": {}
|
|
349
|
+
};
|
|
109
350
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
351
|
+
static get events() {
|
|
352
|
+
return [{
|
|
353
|
+
"method": "selectToggle",
|
|
354
|
+
"name": "selectToggle",
|
|
355
|
+
"bubbles": true,
|
|
356
|
+
"cancelable": true,
|
|
357
|
+
"composed": true,
|
|
358
|
+
"docs": {
|
|
359
|
+
"tags": [],
|
|
360
|
+
"text": "\nEvents"
|
|
361
|
+
},
|
|
362
|
+
"complexType": {
|
|
363
|
+
"original": "any",
|
|
364
|
+
"resolved": "any",
|
|
365
|
+
"references": {}
|
|
366
|
+
}
|
|
367
|
+
}, {
|
|
368
|
+
"method": "selectSelection",
|
|
369
|
+
"name": "selectSelection",
|
|
370
|
+
"bubbles": true,
|
|
371
|
+
"cancelable": true,
|
|
372
|
+
"composed": true,
|
|
373
|
+
"docs": {
|
|
374
|
+
"tags": [],
|
|
375
|
+
"text": ""
|
|
376
|
+
},
|
|
377
|
+
"complexType": {
|
|
378
|
+
"original": "any",
|
|
379
|
+
"resolved": "any",
|
|
380
|
+
"references": {}
|
|
381
|
+
}
|
|
382
|
+
}];
|
|
123
383
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
this.expanded ? 'is-expanded' : '',
|
|
134
|
-
this.icon ? 'has-icon' : '',
|
|
135
|
-
`toggle-${this.toggleFlow}`,
|
|
136
|
-
this.optionFlow ? `option-${this.optionFlow}` : '',
|
|
137
|
-
this.disabled ? 'disabled' : '',
|
|
138
|
-
];
|
|
139
|
-
const labelLevel = this.toggleFlow === 'horizontal' ? 'secondary' : 'tertiary';
|
|
140
|
-
return (h(Host, { class: hostClasses.join(' ') },
|
|
141
|
-
h("div", { id: "wrap" },
|
|
142
|
-
h("div", { id: "toggle", onClick: () => !this.disabled && this.toggle() },
|
|
143
|
-
this.icon ? h("ezp-icon", { id: "icon", name: this.icon }) : null,
|
|
144
|
-
h("ezp-label", { id: "label", noWrap: true, level: labelLevel, text: this.label }),
|
|
145
|
-
h("ezp-label", { id: "value", ellipsis: true, text: ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.title) !== '' ? (_b = this.selected) === null || _b === void 0 ? void 0 : _b.title : this.placeholder }),
|
|
146
|
-
h("ezp-icon", { id: "accessory", name: "expand" })),
|
|
147
|
-
h("div", { id: "list", ref: (element) => (this.list = element) }, (_c = this.options) === null || _c === void 0 ? void 0 : _c.map((option) => {
|
|
148
|
-
var _a;
|
|
149
|
-
if (option.title !== '') {
|
|
150
|
-
return (h("div", { class: `option ${option.id === ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.id) ? 'is-selected' : ''} ${option.meta !== '' ? 'has-meta' : ''} `, onClick: () => this.select(option.id) },
|
|
151
|
-
h("ezp-icon", { name: "checkmark", class: "indicator" }),
|
|
152
|
-
h("div", { class: "details" },
|
|
153
|
-
h("ezp-label", { class: "title", ellipsis: true, text: option.title }),
|
|
154
|
-
option.meta !== '' ? (h("ezp-label", { level: "tertiary", class: "meta", text: option.meta, ellipsis: true })) : null)));
|
|
155
|
-
}
|
|
156
|
-
})))));
|
|
157
|
-
}
|
|
158
|
-
static get is() { return "ezp-select"; }
|
|
159
|
-
static get encapsulation() { return "shadow"; }
|
|
160
|
-
static get originalStyleUrls() { return {
|
|
161
|
-
"$": ["ezp-select.scss"]
|
|
162
|
-
}; }
|
|
163
|
-
static get styleUrls() { return {
|
|
164
|
-
"$": ["ezp-select.css"]
|
|
165
|
-
}; }
|
|
166
|
-
static get properties() { return {
|
|
167
|
-
"icon": {
|
|
168
|
-
"type": "string",
|
|
169
|
-
"mutable": false,
|
|
170
|
-
"complexType": {
|
|
171
|
-
"original": "IconNameTypes",
|
|
172
|
-
"resolved": "\"account\" | \"checkmark-alt\" | \"checkmark\" | \"close\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"width\" | \"paper_range\" | \"trays\"",
|
|
173
|
-
"references": {
|
|
174
|
-
"IconNameTypes": {
|
|
175
|
-
"location": "import",
|
|
176
|
-
"path": "../../shared/types"
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
"required": false,
|
|
181
|
-
"optional": false,
|
|
182
|
-
"docs": {
|
|
183
|
-
"tags": [],
|
|
184
|
-
"text": "Description..."
|
|
185
|
-
},
|
|
186
|
-
"attribute": "icon",
|
|
187
|
-
"reflect": false
|
|
188
|
-
},
|
|
189
|
-
"label": {
|
|
190
|
-
"type": "string",
|
|
191
|
-
"mutable": false,
|
|
192
|
-
"complexType": {
|
|
193
|
-
"original": "string",
|
|
194
|
-
"resolved": "string",
|
|
195
|
-
"references": {}
|
|
196
|
-
},
|
|
197
|
-
"required": false,
|
|
198
|
-
"optional": false,
|
|
199
|
-
"docs": {
|
|
200
|
-
"tags": [],
|
|
201
|
-
"text": "Description..."
|
|
202
|
-
},
|
|
203
|
-
"attribute": "label",
|
|
204
|
-
"reflect": false,
|
|
205
|
-
"defaultValue": "'Label'"
|
|
206
|
-
},
|
|
207
|
-
"optionFlow": {
|
|
208
|
-
"type": "string",
|
|
209
|
-
"mutable": false,
|
|
210
|
-
"complexType": {
|
|
211
|
-
"original": "SelectFlowTypes",
|
|
212
|
-
"resolved": "\"horizontal\" | \"vertical\"",
|
|
213
|
-
"references": {
|
|
214
|
-
"SelectFlowTypes": {
|
|
215
|
-
"location": "import",
|
|
216
|
-
"path": "../../shared/types"
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
},
|
|
220
|
-
"required": false,
|
|
221
|
-
"optional": false,
|
|
222
|
-
"docs": {
|
|
223
|
-
"tags": [],
|
|
224
|
-
"text": "Description..."
|
|
225
|
-
},
|
|
226
|
-
"attribute": "option-flow",
|
|
227
|
-
"reflect": false
|
|
228
|
-
},
|
|
229
|
-
"options": {
|
|
230
|
-
"type": "unknown",
|
|
231
|
-
"mutable": false,
|
|
232
|
-
"complexType": {
|
|
233
|
-
"original": "SelectOptionType[]",
|
|
234
|
-
"resolved": "SelectOptionType[]",
|
|
235
|
-
"references": {
|
|
236
|
-
"SelectOptionType": {
|
|
237
|
-
"location": "import",
|
|
238
|
-
"path": "../../shared/types"
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
},
|
|
242
|
-
"required": false,
|
|
243
|
-
"optional": false,
|
|
244
|
-
"docs": {
|
|
245
|
-
"tags": [],
|
|
246
|
-
"text": "Description..."
|
|
247
|
-
}
|
|
248
|
-
},
|
|
249
|
-
"placeholder": {
|
|
250
|
-
"type": "string",
|
|
251
|
-
"mutable": false,
|
|
252
|
-
"complexType": {
|
|
253
|
-
"original": "string",
|
|
254
|
-
"resolved": "string",
|
|
255
|
-
"references": {}
|
|
256
|
-
},
|
|
257
|
-
"required": false,
|
|
258
|
-
"optional": false,
|
|
259
|
-
"docs": {
|
|
260
|
-
"tags": [],
|
|
261
|
-
"text": "Description..."
|
|
262
|
-
},
|
|
263
|
-
"attribute": "placeholder",
|
|
264
|
-
"reflect": false,
|
|
265
|
-
"defaultValue": "'Placeholder'"
|
|
266
|
-
},
|
|
267
|
-
"preSelected": {
|
|
268
|
-
"type": "any",
|
|
269
|
-
"mutable": false,
|
|
270
|
-
"complexType": {
|
|
271
|
-
"original": "any",
|
|
272
|
-
"resolved": "any",
|
|
273
|
-
"references": {}
|
|
274
|
-
},
|
|
275
|
-
"required": false,
|
|
276
|
-
"optional": false,
|
|
277
|
-
"docs": {
|
|
278
|
-
"tags": [],
|
|
279
|
-
"text": "Description..."
|
|
280
|
-
},
|
|
281
|
-
"attribute": "pre-selected",
|
|
282
|
-
"reflect": false
|
|
283
|
-
},
|
|
284
|
-
"toggleFlow": {
|
|
285
|
-
"type": "string",
|
|
286
|
-
"mutable": false,
|
|
287
|
-
"complexType": {
|
|
288
|
-
"original": "SelectFlowTypes",
|
|
289
|
-
"resolved": "\"horizontal\" | \"vertical\"",
|
|
290
|
-
"references": {
|
|
291
|
-
"SelectFlowTypes": {
|
|
292
|
-
"location": "import",
|
|
293
|
-
"path": "../../shared/types"
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
},
|
|
297
|
-
"required": false,
|
|
298
|
-
"optional": false,
|
|
299
|
-
"docs": {
|
|
300
|
-
"tags": [],
|
|
301
|
-
"text": "Description..."
|
|
302
|
-
},
|
|
303
|
-
"attribute": "toggle-flow",
|
|
304
|
-
"reflect": false,
|
|
305
|
-
"defaultValue": "'horizontal'"
|
|
306
|
-
},
|
|
307
|
-
"disabled": {
|
|
308
|
-
"type": "boolean",
|
|
309
|
-
"mutable": false,
|
|
310
|
-
"complexType": {
|
|
311
|
-
"original": "boolean",
|
|
312
|
-
"resolved": "boolean",
|
|
313
|
-
"references": {}
|
|
314
|
-
},
|
|
315
|
-
"required": false,
|
|
316
|
-
"optional": false,
|
|
317
|
-
"docs": {
|
|
318
|
-
"tags": [],
|
|
319
|
-
"text": "Description..."
|
|
320
|
-
},
|
|
321
|
-
"attribute": "disabled",
|
|
322
|
-
"reflect": false,
|
|
323
|
-
"defaultValue": "false"
|
|
384
|
+
static get elementRef() { return "component"; }
|
|
385
|
+
static get watchers() {
|
|
386
|
+
return [{
|
|
387
|
+
"propName": "expanded",
|
|
388
|
+
"methodName": "watchExpanded"
|
|
389
|
+
}, {
|
|
390
|
+
"propName": "preSelected",
|
|
391
|
+
"methodName": "preSelectedChanged"
|
|
392
|
+
}];
|
|
324
393
|
}
|
|
325
|
-
}; }
|
|
326
|
-
static get states() { return {
|
|
327
|
-
"expanded": {},
|
|
328
|
-
"selected": {}
|
|
329
|
-
}; }
|
|
330
|
-
static get events() { return [{
|
|
331
|
-
"method": "selectToggle",
|
|
332
|
-
"name": "selectToggle",
|
|
333
|
-
"bubbles": true,
|
|
334
|
-
"cancelable": true,
|
|
335
|
-
"composed": true,
|
|
336
|
-
"docs": {
|
|
337
|
-
"tags": [],
|
|
338
|
-
"text": "\nEvents"
|
|
339
|
-
},
|
|
340
|
-
"complexType": {
|
|
341
|
-
"original": "any",
|
|
342
|
-
"resolved": "any",
|
|
343
|
-
"references": {}
|
|
344
|
-
}
|
|
345
|
-
}, {
|
|
346
|
-
"method": "selectSelection",
|
|
347
|
-
"name": "selectSelection",
|
|
348
|
-
"bubbles": true,
|
|
349
|
-
"cancelable": true,
|
|
350
|
-
"composed": true,
|
|
351
|
-
"docs": {
|
|
352
|
-
"tags": [],
|
|
353
|
-
"text": ""
|
|
354
|
-
},
|
|
355
|
-
"complexType": {
|
|
356
|
-
"original": "any",
|
|
357
|
-
"resolved": "any",
|
|
358
|
-
"references": {}
|
|
359
|
-
}
|
|
360
|
-
}]; }
|
|
361
|
-
static get elementRef() { return "component"; }
|
|
362
|
-
static get watchers() { return [{
|
|
363
|
-
"propName": "expanded",
|
|
364
|
-
"methodName": "watchExpanded"
|
|
365
|
-
}, {
|
|
366
|
-
"propName": "preSelected",
|
|
367
|
-
"methodName": "preSelectedChanged"
|
|
368
|
-
}]; }
|
|
369
394
|
}
|