wcs-core 2.6.0 → 2.7.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/CHANGELOG.md +30 -0
- package/README.md +16 -0
- package/dist/cjs/{helpers-d9aaa8c4.js → helpers-6abce594.js} +5 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/popper-6a290c40.js +1731 -0
- package/dist/cjs/wcs-button.cjs.entry.js +1 -1
- package/dist/cjs/wcs-checkbox.cjs.entry.js +6 -2
- package/dist/cjs/wcs-dropdown-divider.cjs.entry.js +19 -0
- package/dist/cjs/wcs-dropdown-header.cjs.entry.js +19 -0
- package/dist/cjs/wcs-dropdown.cjs.entry.js +43 -10
- package/dist/cjs/wcs-error_2.cjs.entry.js +1 -1
- package/dist/cjs/wcs-galactic-menu.cjs.entry.js +3 -1730
- package/dist/cjs/wcs-grid-column.cjs.entry.js +5 -1
- package/dist/cjs/wcs-grid.cjs.entry.js +28 -5
- package/dist/cjs/wcs-input.cjs.entry.js +3 -3
- package/dist/cjs/wcs-radio.cjs.entry.js +2 -2
- package/dist/cjs/wcs-select_2.cjs.entry.js +1 -1
- package/dist/cjs/wcs-switch.cjs.entry.js +10 -2
- package/dist/cjs/wcs-textarea.cjs.entry.js +2 -2
- package/dist/cjs/wcs.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/checkbox/checkbox.css +18 -7
- package/dist/collection/components/checkbox/checkbox.js +24 -2
- package/dist/collection/components/dropdown/dropdown-interface.js +1 -0
- package/dist/collection/components/dropdown/dropdown.css +46 -38
- package/dist/collection/components/dropdown/dropdown.js +90 -29
- package/dist/collection/components/dropdown-divider/dropdown-divider.css +7 -0
- package/dist/collection/components/dropdown-divider/dropdown-divider.js +14 -0
- package/dist/collection/components/dropdown-header/dropdown-header.css +8 -0
- package/dist/collection/components/dropdown-header/dropdown-header.js +15 -0
- package/dist/collection/components/form-field/form-field.css +1 -1
- package/dist/collection/components/grid/grid.js +28 -5
- package/dist/collection/components/grid-column/grid-column.js +7 -1
- package/dist/collection/components/input/input.css +48 -0
- package/dist/collection/components/input/input.js +38 -2
- package/dist/collection/components/radio/radio.component.js +1 -1
- package/dist/collection/components/radio/radio.css +18 -4
- package/dist/collection/components/radio-group/radio-group.js +7 -2
- package/dist/collection/components/switch/switch.css +53 -16
- package/dist/collection/components/switch/switch.js +55 -6
- package/dist/collection/components/textarea/textarea.css +4 -0
- package/dist/collection/utils/helpers.js +4 -0
- package/dist/esm/{helpers-50436c51.js → helpers-e2993152.js} +5 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/popper-e5fdfb6a.js +1729 -0
- package/dist/esm/wcs-button.entry.js +1 -1
- package/dist/esm/wcs-checkbox.entry.js +6 -2
- package/dist/esm/wcs-dropdown-divider.entry.js +15 -0
- package/dist/esm/wcs-dropdown-header.entry.js +15 -0
- package/dist/esm/wcs-dropdown.entry.js +43 -10
- package/dist/esm/wcs-error_2.entry.js +1 -1
- package/dist/esm/wcs-galactic-menu.entry.js +2 -1729
- package/dist/esm/wcs-grid-column.entry.js +5 -1
- package/dist/esm/wcs-grid.entry.js +28 -5
- package/dist/esm/wcs-input.entry.js +3 -3
- package/dist/esm/wcs-radio.entry.js +2 -2
- package/dist/esm/wcs-select_2.entry.js +1 -1
- package/dist/esm/wcs-switch.entry.js +10 -2
- package/dist/esm/wcs-textarea.entry.js +2 -2
- package/dist/esm/wcs.js +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +4 -0
- package/dist/types/components/dropdown/dropdown-interface.d.ts +1 -0
- package/dist/types/components/dropdown/dropdown.d.ts +13 -16
- package/dist/types/components/dropdown-divider/dropdown-divider.d.ts +3 -0
- package/dist/types/components/dropdown-header/dropdown-header.d.ts +3 -0
- package/dist/types/components/grid/grid.d.ts +11 -0
- package/dist/types/components/grid-column/grid-column.d.ts +1 -0
- package/dist/types/components/input/input.d.ts +8 -0
- package/dist/types/components/radio-group/radio-group-interface.d.ts +1 -0
- package/dist/types/components/radio-group/radio-group.d.ts +2 -2
- package/dist/types/components/switch/switch-interface.d.ts +1 -0
- package/dist/types/components/switch/switch.d.ts +10 -2
- package/dist/types/components.d.ts +105 -4
- package/dist/types/utils/helpers.d.ts +1 -0
- package/dist/wcs/{p-356a8e3b.entry.js → p-384068f7.entry.js} +1 -1
- package/dist/wcs/p-41037455.entry.js +1 -0
- package/dist/wcs/p-57247184.entry.js +1 -0
- package/dist/wcs/p-7206e492.entry.js +1 -0
- package/dist/wcs/p-8c8740e3.entry.js +1 -0
- package/dist/wcs/p-a92d369e.entry.js +1 -0
- package/dist/wcs/p-a978c1e3.entry.js +1 -0
- package/dist/wcs/p-b5138986.js +1 -0
- package/dist/wcs/p-bbf1ef42.entry.js +1 -0
- package/dist/wcs/{p-3d10b02a.entry.js → p-c7d6d3e1.entry.js} +1 -1
- package/dist/wcs/p-cf4d7a83.js +1 -0
- package/dist/wcs/{p-a5a1b27c.entry.js → p-d7dec082.entry.js} +1 -1
- package/dist/wcs/p-e65d1c27.entry.js +1 -0
- package/dist/wcs/p-ea3e93e9.entry.js +1 -0
- package/dist/wcs/p-fbaf299d.entry.js +1 -0
- package/dist/wcs/{p-4338f140.entry.js → p-ff6d0dfd.entry.js} +1 -1
- package/dist/wcs/wcs.esm.js +1 -1
- package/package.json +1 -2
- package/dist/wcs/p-0fbe574e.entry.js +0 -1
- package/dist/wcs/p-62f7ab6d.entry.js +0 -1
- package/dist/wcs/p-83f1ad32.js +0 -1
- package/dist/wcs/p-8f0f9868.entry.js +0 -1
- package/dist/wcs/p-af1a5e52.entry.js +0 -1
- package/dist/wcs/p-bef44630.entry.js +0 -1
- package/dist/wcs/p-d59b4495.entry.js +0 -1
- package/dist/wcs/p-dd300dea.entry.js +0 -1
- package/dist/wcs/p-e486647c.entry.js +0 -1
|
@@ -43,6 +43,9 @@ let GridColumn = class {
|
|
|
43
43
|
parseMyObjectProp(newValue) {
|
|
44
44
|
this.wcsHiddenChange.emit(newValue);
|
|
45
45
|
}
|
|
46
|
+
sortOrderChange(_) {
|
|
47
|
+
this.emitSortConfig();
|
|
48
|
+
}
|
|
46
49
|
emitSortConfig() {
|
|
47
50
|
if (!this.sort)
|
|
48
51
|
return;
|
|
@@ -61,7 +64,8 @@ let GridColumn = class {
|
|
|
61
64
|
}
|
|
62
65
|
get el() { return getElement(this); }
|
|
63
66
|
static get watchers() { return {
|
|
64
|
-
"hidden": ["parseMyObjectProp"]
|
|
67
|
+
"hidden": ["parseMyObjectProp"],
|
|
68
|
+
"sortOrder": ["sortOrderChange"]
|
|
65
69
|
}; }
|
|
66
70
|
};
|
|
67
71
|
GridColumn.style = gridColumnCss;
|
|
@@ -170,6 +170,19 @@ let Grid = class {
|
|
|
170
170
|
if (this.selectedItems) {
|
|
171
171
|
this.updateSelectionWithValues(this.selectedItems);
|
|
172
172
|
}
|
|
173
|
+
this.applyInitialSortConfig();
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Handle existing column's filters (defined before the grid is instantiated)
|
|
177
|
+
* @private
|
|
178
|
+
*/
|
|
179
|
+
applyInitialSortConfig() {
|
|
180
|
+
const [first, ...other] = this.columns.filter(c => c.sortOrder !== 'none');
|
|
181
|
+
// We keep only one active sorted column
|
|
182
|
+
other === null || other === void 0 ? void 0 : other.forEach(o => o.sortOrder = 'none');
|
|
183
|
+
if (first && !this.serverMode) {
|
|
184
|
+
this.sortBy(first);
|
|
185
|
+
}
|
|
173
186
|
}
|
|
174
187
|
getGridColumnsFromTemplate() {
|
|
175
188
|
const slotted = this.el.shadowRoot.querySelector('slot[name="grid-column"]');
|
|
@@ -180,22 +193,32 @@ let Grid = class {
|
|
|
180
193
|
return slotted.assignedElements();
|
|
181
194
|
}
|
|
182
195
|
sortChangeEventHandler(event) {
|
|
196
|
+
if (event.detail.order === 'none')
|
|
197
|
+
return;
|
|
183
198
|
// We keep only one active sort column
|
|
184
199
|
this.columns.filter(c => c !== event.detail.column).forEach(c => c.sortOrder = 'none');
|
|
185
200
|
if (this.serverMode)
|
|
186
201
|
return;
|
|
187
|
-
|
|
202
|
+
this.sortBy(event.detail.column);
|
|
203
|
+
this.updatePageIndex();
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Sorts the grid rows according to the given column's configuration
|
|
207
|
+
* @param colmun Column from which to extract the sorting configuration
|
|
208
|
+
* @private
|
|
209
|
+
*/
|
|
210
|
+
sortBy(colmun) {
|
|
211
|
+
if (colmun.sortFn) {
|
|
188
212
|
this.rows = lodash.cloneDeep(this.rows)
|
|
189
|
-
.sort((a, b) =>
|
|
213
|
+
.sort((a, b) => colmun.sortFn(a.data, b.data, colmun) * getSortOrderInteger(colmun.sortOrder));
|
|
190
214
|
}
|
|
191
215
|
else {
|
|
192
216
|
this.rows = lodash.cloneDeep(this.rows)
|
|
193
217
|
.sort((a, b) => {
|
|
194
|
-
const path =
|
|
195
|
-
return ((lodash.get(a.data, path) < lodash.get(b.data, path)) ? -1 : (lodash.get(a.data, path) > lodash.get(b.data, path)) ? 1 : 0) * getSortOrderInteger(
|
|
218
|
+
const path = colmun.path;
|
|
219
|
+
return ((lodash.get(a.data, path) < lodash.get(b.data, path)) ? -1 : (lodash.get(a.data, path) > lodash.get(b.data, path)) ? 1 : 0) * getSortOrderInteger(colmun.sortOrder);
|
|
196
220
|
});
|
|
197
221
|
}
|
|
198
|
-
this.updatePageIndex();
|
|
199
222
|
}
|
|
200
223
|
/**
|
|
201
224
|
* Update the page's number of all rows
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-b982604a.js';
|
|
2
|
-
import { d as debounceEvent, i as inheritAttributes, f as findItemLabel } from './helpers-
|
|
2
|
+
import { d as debounceEvent, i as inheritAttributes, f as findItemLabel } from './helpers-e2993152.js';
|
|
3
3
|
|
|
4
|
-
const inputCss = ":host{--wcs-input-icon-color:var(--wcs-text-medium);--wcs-internal-input-border-radius-left:var(--wcs-input-border-radius-left, var(--wcs-border-radius));--wcs-internal-input-border-radius-right:var(--wcs-input-border-radius-right, var(--wcs-border-radius));display:flex;width:100%;border-radius:var(--wcs-internal-input-border-radius-left) var(--wcs-internal-input-border-radius-right) var(--wcs-internal-input-border-radius-right) var(--wcs-internal-input-border-radius-left);background-color:var(--wcs-light);border:1px solid var(--wcs-light);background-clip:padding-box}:host ::placeholder{font-weight:400;font-style:italic}:host input{overflow:hidden;box-sizing:border-box;min-height:24px;width:100%;background-color:transparent;font-family:var(--wcs-font-sans-serif);color:var(--wcs-primary);font-weight:var(--wcs-font-weight-form-value) !important;border:none;padding:calc(var(--wcs-padding) / 2) var(--wcs-padding);font-size:1rem;line-height:1.5}:host input:focus{box-shadow:none;outline:0}:host wcs-mat-icon{position:relative;margin-top:8px;margin-left:8px;margin-right:-8px}:host([state=error]){border-color:var(--wcs-red) !important}:host(:focus-within){border:solid 1px var(--wcs-primary)}:host(:focus-within) wcs-mat-icon{color:var(--wcs-primary)}";
|
|
4
|
+
const inputCss = ":host{--wcs-input-icon-color:var(--wcs-text-medium);--wcs-internal-input-border-radius-left:var(--wcs-input-border-radius-left, var(--wcs-border-radius));--wcs-internal-input-border-radius-right:var(--wcs-input-border-radius-right, var(--wcs-border-radius));display:flex;width:100%;border-radius:var(--wcs-internal-input-border-radius-left) var(--wcs-internal-input-border-radius-right) var(--wcs-internal-input-border-radius-right) var(--wcs-internal-input-border-radius-left);background-color:var(--wcs-light);border:1px solid var(--wcs-light);background-clip:padding-box}:host ::placeholder{font-weight:400;font-style:italic}:host input{overflow:hidden;box-sizing:border-box;min-height:24px;width:100%;background-color:transparent;font-family:var(--wcs-font-sans-serif);color:var(--wcs-primary);font-weight:var(--wcs-font-weight-form-value) !important;border:none;padding:calc(var(--wcs-padding) / 2) var(--wcs-padding);font-size:1rem;line-height:1.5}:host input:focus{box-shadow:none;outline:0}:host wcs-mat-icon{position:relative;margin-top:8px;margin-left:8px;margin-right:-8px}:host .prefix,:host .suffix{color:var(--wcs-white);display:flex;white-space:nowrap;align-items:center;padding:0 calc(var(--wcs-padding) / 2);font-weight:var(--wcs-font-weight-form-value) !important;background-color:var(--wcs-text-disabled)}:host .prefix{border-radius:var(--wcs-internal-input-border-radius-left) 0 0 var(--wcs-internal-input-border-radius-left);margin:-1px 0 -1px -1px;border-left:solid 1px transparent;border-top:solid 1px transparent;border-bottom:solid 1px transparent}:host .suffix{border-radius:0 var(--wcs-internal-input-border-radius-right) var(--wcs-internal-input-border-radius-right) 0;margin:-1px -1px -1px 0px;border-right:solid 1px transparent;border-top:solid 1px transparent;border-bottom:solid 1px transparent}:host([state=error]){border-color:var(--wcs-red) !important}:host([data-has-prefix]) input{padding-left:calc(var(--wcs-padding) / 2)}:host([data-has-suffix]) input{padding-left:calc(var(--wcs-padding) / 2)}:host([disabled]) input{color:var(--wcs-text-disabled)}:host([disabled]) .prefix,:host([disabled]) .suffix{color:var(--wcs-light)}:host(:focus-within){border:solid 1px var(--wcs-primary)}:host(:focus-within) .prefix{border-left:solid 1px var(--wcs-primary);border-top:solid 1px var(--wcs-primary);border-bottom:solid 1px var(--wcs-primary)}:host(:focus-within) .suffix{border-right:solid 1px var(--wcs-primary);border-top:solid 1px var(--wcs-primary);border-bottom:solid 1px var(--wcs-primary)}:host(:focus-within) wcs-mat-icon{color:var(--wcs-primary)}";
|
|
5
5
|
|
|
6
6
|
let Input = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -210,7 +210,7 @@ let Input = class {
|
|
|
210
210
|
if (label) {
|
|
211
211
|
label.id = labelId;
|
|
212
212
|
}
|
|
213
|
-
return (h(Host, { "aria-disabled": this.disabled ? 'true' : null }, this.icon ? (h("wcs-mat-icon", { icon: this.icon, size: "m" })) : null, h("input", Object.assign({ class: "native-input", ref: input => this.nativeInput = input, "aria-labelledby": label ? labelId : null, disabled: this.disabled, accept: this.accept, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, size: this.size, type: this.type, value: value, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown }, this.inheritedAttributes))));
|
|
213
|
+
return (h(Host, { "aria-disabled": this.disabled ? 'true' : null, "data-has-prefix": !!this.prefixLabel, "data-has-suffix": !!this.suffixLabel }, this.prefixLabel ? (h("span", { class: "prefix" }, this.prefixLabel)) : null, this.icon ? (h("wcs-mat-icon", { icon: this.icon, size: "m" })) : null, h("input", Object.assign({ class: "native-input", ref: input => this.nativeInput = input, "aria-labelledby": label ? labelId : null, disabled: this.disabled, accept: this.accept, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, size: this.size, type: this.type, value: value, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown }, this.inheritedAttributes)), this.suffixLabel ? (h("span", { class: "suffix" }, this.suffixLabel)) : null));
|
|
214
214
|
}
|
|
215
215
|
get el() { return getElement(this); }
|
|
216
216
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-b982604a.js';
|
|
2
2
|
|
|
3
|
-
const radioCss = ":host([mode=radio]) input{display:none}:host([mode=radio]) label{padding:0.125rem 0 0;margin-bottom:0;color:var(--wcs-text-medium);
|
|
3
|
+
const radioCss = ":host([mode=radio]) input{display:none}:host([mode=radio]) label{padding:0.125rem 0 0;margin-bottom:0;color:var(--wcs-text-medium);background-color:transparent;border:none;font-weight:500 !important;transition:0.175s ease-in-out}:host([mode=radio]) label:before{transition:0.175s ease-in-out;border-radius:50%;margin-right:var(--wcs-base-margin);border:2px solid var(--wcs-text-disabled);position:relative;display:inline-block;top:3px;width:1.125rem;height:1.125rem;pointer-events:none;content:\"\";background-color:var(--wcs-white);box-sizing:border-box}:host([mode=radio]) label:after{transition:0.175s ease-in-out;position:relative;width:1.125rem;height:1.125rem;content:\"\";background:no-repeat 50%/50% 50%}:host([mode=radio][disabled]) label{color:var(--wcs-text-disabled)}:host([mode=radio]:not([disabled])) label{cursor:pointer}:host([mode=radio][checked]) label{color:var(--wcs-primary)}:host([mode=radio][checked]) label:before{border-color:var(--wcs-primary);background-color:var(--wcs-primary)}:host([mode=radio]:hover):not([disabled]) label{color:var(--wcs-primary)}:host([mode=radio]:hover):not([disabled]) label:before{border-color:var(--wcs-primary)}:host([mode=option]){padding:var(--wcs-base-margin) calc(var(--wcs-base-margin) / 2);font-weight:500 !important}:host([mode=option]) input{position:absolute;z-index:-1;opacity:0;box-sizing:border-box;padding:0}:host([mode=option]) label{padding:0.375rem 1.25rem 0.3125rem;margin-bottom:0;color:var(--wcs-white);white-space:nowrap;border-radius:0.4375rem}:host([mode=option][checked]) label{font-weight:500 !important;color:var(--wcs-primary);background-color:var(--wcs-white)}:host([mode=option][disabled]) label{color:var(--wcs-text-disabled)}:host([mode=option]:not([disabled])) label{cursor:pointer}";
|
|
4
4
|
|
|
5
5
|
let Radio = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -35,7 +35,7 @@ let Radio = class {
|
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
|
-
return (h(Host, { slot: "option" }, h("input", { id: this.inputId, type: "radio", value: this.value, checked: this.checked, "aria-disabled": this.disabled ? 'true' : null, "aria-checked": `${this.checked}` }), h("label", { htmlFor: `${this.inputId}` }, this.label)));
|
|
38
|
+
return (h(Host, { slot: "option" }, h("input", { id: this.inputId, type: "radio", value: this.value, checked: this.checked, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : null, "aria-checked": `${this.checked}` }), h("label", { htmlFor: `${this.inputId}` }, this.label)));
|
|
39
39
|
}
|
|
40
40
|
get el() { return getElement(this); }
|
|
41
41
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-b982604a.js';
|
|
2
2
|
import { l as lodash } from './lodash-d6d9d079.js';
|
|
3
3
|
import { S as SelectArrow } from './select-arrow-73ac4016.js';
|
|
4
|
-
import {
|
|
4
|
+
import { b as isElement } from './helpers-e2993152.js';
|
|
5
5
|
import { M as MDCRipple } from './component-6b4d470f.js';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-b982604a.js';
|
|
2
2
|
|
|
3
|
-
const switchCss = ":host{--wcs-switch-background-color-initial:var(--wcs-text-light);--wcs-switch-background-color-final:var(--wcs-primary);--wcs-switch-bullet-color-initial:var(--wcs-switch-background-color-final);--wcs-switch-bullet-color-final:var(--wcs-switch-background-color-initial);display:flex}.wcs-container{position:relative;display:
|
|
3
|
+
const switchCss = ":host{--wcs-switch-background-color-initial:var(--wcs-text-light);--wcs-switch-background-color-final:var(--wcs-primary);--wcs-switch-bullet-color-initial:var(--wcs-switch-background-color-final);--wcs-switch-bullet-color-final:var(--wcs-switch-background-color-initial);--wcs-switch-text-color:var(--wcs-text-medium);display:flex}:host([disabled]){--wcs-switch-text-color:var(--wcs-text-disabled)}.wcs-container{position:relative;display:flex;margin-bottom:0}:host([label-alignment=top]) .wcs-container{align-items:start}:host([label-alignment=center]) .wcs-container{align-items:center}:host([label-alignment=bottom]) .wcs-container{align-items:flex-end}.wcs-container input{position:absolute;opacity:0;height:0;width:0}.text{color:var(--wcs-switch-text-color);margin-left:6px;font-weight:500;line-height:1.375}.wcs-container:not([aria-disabled]) input:checked~.text{--wcs-switch-text-color:var(--wcs-primary)}.wcs-checkmark::before{position:absolute;transition:all 0.15s ease-out}.wcs-checkmark::before{bottom:0.3125rem;left:0.3125rem;width:0.875rem;height:0.875rem;content:\"\";border-radius:50%;background-color:var(--wcs-switch-bullet-color-initial)}:host([disabled]:not([checked])) .wcs-checkmark::before{background-color:var(--wcs-text-disabled)}:host([disabled]:not([checked])) .wcs-checkmark{background-color:var(--wcs-light)}:host([disabled][checked]) .wcs-checkmark::before{background-color:var(--wcs-white)}:host([disabled][checked]) .wcs-checkmark{background-color:var(--wcs-text-disabled)}.wcs-checkmark{top:0;right:0;bottom:0;left:0;width:3rem;height:1.5rem;border-radius:0.75rem;background-color:var(--wcs-switch-background-color-initial)}.wcs-container:not([aria-disabled]){cursor:pointer}.wcs-container:hover:not([aria-disabled]){--wcs-switch-text-color:var(--wcs-primary)}input:not([disabled]):checked+.wcs-checkmark::before,.wcs-container:hover input:not([disabled])+.wcs-checkmark::before,.wcs-container:focus input:not([disabled])+.wcs-checkmark::before{background-color:var(--wcs-switch-bullet-color-final)}input:checked+.wcs-checkmark::before{transform:translateX(24px)}input:not([disabled]):checked+.wcs-checkmark,.wcs-container:hover input:not([disabled])+.wcs-checkmark,.wcs-container:focus input:not([disabled])+.wcs-checkmark{background-color:var(--wcs-switch-background-color-final)}";
|
|
4
4
|
|
|
5
5
|
let Switch = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -12,6 +12,14 @@ let Switch = class {
|
|
|
12
12
|
* If `true`, the switch is selected.
|
|
13
13
|
*/
|
|
14
14
|
this.checked = false;
|
|
15
|
+
/**
|
|
16
|
+
* Specifie the alignment of the switch with the label content
|
|
17
|
+
*/
|
|
18
|
+
this.labelAlignment = 'center';
|
|
19
|
+
/**
|
|
20
|
+
* Specify wether the switch is disabled or not.
|
|
21
|
+
*/
|
|
22
|
+
this.disabled = false;
|
|
15
23
|
}
|
|
16
24
|
toggleChange(_event) {
|
|
17
25
|
this.checked = !this.checked;
|
|
@@ -20,7 +28,7 @@ let Switch = class {
|
|
|
20
28
|
});
|
|
21
29
|
}
|
|
22
30
|
render() {
|
|
23
|
-
return (h(Host, null, h("label", { htmlFor: this.name, class: "wcs-container"
|
|
31
|
+
return (h(Host, null, h("label", { htmlFor: this.name, class: "wcs-container", "aria-disabled": this.disabled }, h("input", { onChange: (evt) => this.toggleChange(evt), checked: this.checked, class: "wcs-switch", type: "checkbox", name: this.name, disabled: this.disabled, id: this.name }), h("span", { class: "wcs-checkmark" }), h("span", { class: "text" }, h("slot", null)))));
|
|
24
32
|
}
|
|
25
33
|
get el() { return getElement(this); }
|
|
26
34
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, a as readTask, h, H as Host, g as getElement } from './index-b982604a.js';
|
|
2
|
-
import { d as debounceEvent, i as inheritAttributes, r as raf, f as findItemLabel } from './helpers-
|
|
2
|
+
import { d as debounceEvent, i as inheritAttributes, r as raf, f as findItemLabel } from './helpers-e2993152.js';
|
|
3
3
|
|
|
4
|
-
const textareaCss = ":host{--wcs-textarea-icon-color:var(--wcs-text-medium);--wcs-internal-textarea-border-radius-left:var(--wcs-textarea-border-radius-left, var(--wcs-border-radius));--wcs-internal-textarea-border-radius-right:var(--wcs-textarea-border-radius-right, var(--wcs-border-radius));display:flex;flex-direction:row;width:100%;border-radius:var(--wcs-internal-textarea-border-radius-left) var(--wcs-internal-textarea-border-radius-right) var(--wcs-internal-textarea-border-radius-right) var(--wcs-internal-textarea-border-radius-left);background-color:var(--wcs-light);border:1px solid var(--wcs-light);background-clip:padding-box}:host ::placeholder{font-weight:400;font-style:italic}:host textarea{overflow:auto;flex:1;width:100%;box-sizing:border-box;min-height:24px;background-color:transparent;font-family:var(--wcs-font-sans-serif);color:var(--wcs-primary);font-weight:var(--wcs-font-weight-form-value) !important;border:none;padding:calc(var(--wcs-padding) / 2) var(--wcs-padding);font-size:1rem;line-height:1.5}:host textarea:focus{box-shadow:none;outline:0}:host wcs-mat-icon{position:relative;margin-top:7px;margin-left:8px;margin-right:-8px}:host([state=error]){border-color:var(--wcs-red) !important}:host(:focus-within){border:solid 1px var(--wcs-primary)}:host(:focus-within) wcs-mat-icon{color:var(--wcs-primary)}";
|
|
4
|
+
const textareaCss = ":host{--wcs-textarea-icon-color:var(--wcs-text-medium);--wcs-internal-textarea-border-radius-left:var(--wcs-textarea-border-radius-left, var(--wcs-border-radius));--wcs-internal-textarea-border-radius-right:var(--wcs-textarea-border-radius-right, var(--wcs-border-radius));display:flex;flex-direction:row;width:100%;border-radius:var(--wcs-internal-textarea-border-radius-left) var(--wcs-internal-textarea-border-radius-right) var(--wcs-internal-textarea-border-radius-right) var(--wcs-internal-textarea-border-radius-left);background-color:var(--wcs-light);border:1px solid var(--wcs-light);background-clip:padding-box}:host ::placeholder{font-weight:400;font-style:italic}:host textarea{overflow:auto;flex:1;width:100%;box-sizing:border-box;min-height:24px;background-color:transparent;font-family:var(--wcs-font-sans-serif);color:var(--wcs-primary);font-weight:var(--wcs-font-weight-form-value) !important;border:none;padding:calc(var(--wcs-padding) / 2) var(--wcs-padding);font-size:1rem;line-height:1.5}:host textarea:focus{box-shadow:none;outline:0}:host wcs-mat-icon{position:relative;margin-top:7px;margin-left:8px;margin-right:-8px}:host([disabled]) textarea{color:var(--wcs-text-disabled)}:host([state=error]){border-color:var(--wcs-red) !important}:host(:focus-within){border:solid 1px var(--wcs-primary)}:host(:focus-within) wcs-mat-icon{color:var(--wcs-primary)}";
|
|
5
5
|
|
|
6
6
|
let Textarea = class {
|
|
7
7
|
constructor(hostRef) {
|
package/dist/esm/wcs.js
CHANGED
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["wcs-editable-field",[[1,"wcs-editable-field",{"type":[1],"label":[1],"readonly":[4],"value":[1032],"validateFn":[16],"formatFn":[16],"errorMsg":[1,"error-msg"],"currentState":[32],"isError":[32]},[[8,"click","onWindowClickEvent"]]]]],["wcs-grid",[[1,"wcs-grid",{"serverMode":[4,"server-mode"],"data":[16],"loading":[4],"selectionConfig":[1,"selection-config"],"selectedItems":[8,"selected-items"],"wcsGridPaginationId":[1,"wcs-grid-pagination-id"],"rowIdPath":[1,"row-id-path"],"columns":[32],"paginationEl":[32],"rows":[32]},[[0,"wcsHiddenChange","onHiddenColumnChange"],[0,"wcsSortChange","sortChangeEventHandler"],[0,"wcsGridPaginationChange","paginationChangeEventHandler"],[8,"wcsGridPaginationChange","paginationChangeEventHandlerOutside"]]]]],["wcs-grid-pagination",[[1,"wcs-grid-pagination",{"availablePageSizes":[16],"currentPage":[2,"current-page"],"pageSize":[2,"page-size"],"itemsCount":[2,"items-count"],"pageCount":[2,"page-count"]}]]],["wcs-horizontal-stepper",[[1,"wcs-horizontal-stepper",{"currentStep":[1026,"current-step"],"steps":[16],"mode":[1],"checkOnComplete":[4,"check-on-complete"],"buttonMode":[32],"internalCurrentStep":[32],"previous":[64],"next":[64]}]]],["wcs-dropdown",[[1,"wcs-dropdown",{"mode":[1],"shape":[1],"disabled":[4],"expanded":[32]},[[8,"click","onWindowClickEvent"],[0,"wcsDropdownItemClick","dropdownItemClick"]]]]],["wcs-galactic-menu",[[1,"wcs-galactic-menu",{"text":[1],"showPopoverMenu":[32]},[[8,"click","onWindowClickEvent"]]]]],["wcs-input",[[1,"wcs-input",{"fireFocusEvents":[4,"fire-focus-events"],"accept":[1],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[4],"enterkeyhint":[1],"icon":[1],"inputmode":[1],"max":[1],"maxlength":[2],"min":[1],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"state":[513],"step":[1],"size":[2],"type":[1],"value":[1032],"hasFocus":[32],"setFocus":[64],"setBlur":[64],"getInputElement":[64]}]]],["wcs-modal",[[4,"wcs-modal",{"backdrop":[516],"show":[1540],"showCloseButton":[516,"show-close-button"]},[[4,"keydown","onKeyDown"]]]]],["wcs-textarea",[[1,"wcs-textarea",{"fireFocusEvents":[4,"fire-focus-events"],"autocapitalize":[1],"autofocus":[4],"clearOnEdit":[1028,"clear-on-edit"],"debounce":[2],"disabled":[4],"icon":[1],"inputmode":[1],"enterkeyhint":[1],"maxlength":[2],"minlength":[2],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"state":[513],"cols":[2],"rows":[2],"wrap":[1],"autoGrow":[4,"auto-grow"],"value":[1025],"hasFocus":[32],"fitContent":[64],"setFocus":[64],"setBlur":[64],"getInputElement":[64]}]]],["wcs-action-bar",[[1,"wcs-action-bar",{"gutter":[4],"hasTabs":[32]}]]],["wcs-app",[[1,"wcs-app"]]],["wcs-badge",[[1,"wcs-badge",{"shape":[1],"color":[1]}]]],["wcs-card",[[1,"wcs-card",{"mode":[1537]}]]],["wcs-card-body",[[1,"wcs-card-body"]]],["wcs-com-nav",[[1,"wcs-com-nav",{"appName":[1,"app-name"]}]]],["wcs-com-nav-category",[[1,"wcs-com-nav-category",{"label":[1],"categoryOpen":[32],"close":[64],"open":[64]},[[8,"click","onWindowClickEvent"],[8,"wcsCategoryOpened","onSubmenuOpened"]]]]],["wcs-com-nav-submenu",[[1,"wcs-com-nav-submenu",{"label":[1],"panelTitle":[1,"panel-title"],"panelDescription":[1,"panel-description"],"menuOpen":[32],"close":[64],"open":[64]},[[8,"click","onWindowClickEvent"],[8,"wcsSubmenuOpened","onSubmenuOpened"],[0,"wcsCategoryItemClicked","wcsCategoryItemClickedHandler"]]]]],["wcs-divider",[[1,"wcs-divider"]]],["wcs-dropdown-item",[[4,"wcs-dropdown-item",null,[[1,"mousedown","onMouseDown"]]]]],["wcs-field",[[1,"wcs-field"]]],["wcs-field-content",[[1,"wcs-field-content"]]],["wcs-field-label",[[1,"wcs-field-label"]]],["wcs-footer",[[1,"wcs-footer"]]],["wcs-galactic",[[1,"wcs-galactic",{"text":[1],"show":[32]}]]],["wcs-grid-column",[[1,"wcs-grid-column",{"path":[1],"name":[1],"sort":[4],"sortFn":[16],"formatter":[16],"sortOrder":[
|
|
16
|
+
return bootstrapLazy([["wcs-editable-field",[[1,"wcs-editable-field",{"type":[1],"label":[1],"readonly":[4],"value":[1032],"validateFn":[16],"formatFn":[16],"errorMsg":[1,"error-msg"],"currentState":[32],"isError":[32]},[[8,"click","onWindowClickEvent"]]]]],["wcs-grid",[[1,"wcs-grid",{"serverMode":[4,"server-mode"],"data":[16],"loading":[4],"selectionConfig":[1,"selection-config"],"selectedItems":[8,"selected-items"],"wcsGridPaginationId":[1,"wcs-grid-pagination-id"],"rowIdPath":[1,"row-id-path"],"columns":[32],"paginationEl":[32],"rows":[32]},[[0,"wcsHiddenChange","onHiddenColumnChange"],[0,"wcsSortChange","sortChangeEventHandler"],[0,"wcsGridPaginationChange","paginationChangeEventHandler"],[8,"wcsGridPaginationChange","paginationChangeEventHandlerOutside"]]]]],["wcs-grid-pagination",[[1,"wcs-grid-pagination",{"availablePageSizes":[16],"currentPage":[2,"current-page"],"pageSize":[2,"page-size"],"itemsCount":[2,"items-count"],"pageCount":[2,"page-count"]}]]],["wcs-horizontal-stepper",[[1,"wcs-horizontal-stepper",{"currentStep":[1026,"current-step"],"steps":[16],"mode":[1],"checkOnComplete":[4,"check-on-complete"],"buttonMode":[32],"internalCurrentStep":[32],"previous":[64],"next":[64]}]]],["wcs-dropdown",[[1,"wcs-dropdown",{"noArrow":[4,"no-arrow"],"mode":[1],"shape":[1],"disabled":[4],"placement":[1],"expanded":[32]},[[8,"click","onWindowClickEvent"],[0,"wcsDropdownItemClick","dropdownItemClick"]]]]],["wcs-galactic-menu",[[1,"wcs-galactic-menu",{"text":[1],"showPopoverMenu":[32]},[[8,"click","onWindowClickEvent"]]]]],["wcs-input",[[1,"wcs-input",{"fireFocusEvents":[4,"fire-focus-events"],"accept":[1],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"prefixLabel":[1,"prefix-label"],"suffixLabel":[1,"suffix-label"],"disabled":[4],"enterkeyhint":[1],"icon":[1],"inputmode":[1],"max":[1],"maxlength":[2],"min":[1],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"state":[513],"step":[1],"size":[2],"type":[1],"value":[1032],"hasFocus":[32],"setFocus":[64],"setBlur":[64],"getInputElement":[64]}]]],["wcs-modal",[[4,"wcs-modal",{"backdrop":[516],"show":[1540],"showCloseButton":[516,"show-close-button"]},[[4,"keydown","onKeyDown"]]]]],["wcs-textarea",[[1,"wcs-textarea",{"fireFocusEvents":[4,"fire-focus-events"],"autocapitalize":[1],"autofocus":[4],"clearOnEdit":[1028,"clear-on-edit"],"debounce":[2],"disabled":[4],"icon":[1],"inputmode":[1],"enterkeyhint":[1],"maxlength":[2],"minlength":[2],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"state":[513],"cols":[2],"rows":[2],"wrap":[1],"autoGrow":[4,"auto-grow"],"value":[1025],"hasFocus":[32],"fitContent":[64],"setFocus":[64],"setBlur":[64],"getInputElement":[64]}]]],["wcs-action-bar",[[1,"wcs-action-bar",{"gutter":[4],"hasTabs":[32]}]]],["wcs-app",[[1,"wcs-app"]]],["wcs-badge",[[1,"wcs-badge",{"shape":[1],"color":[1]}]]],["wcs-card",[[1,"wcs-card",{"mode":[1537]}]]],["wcs-card-body",[[1,"wcs-card-body"]]],["wcs-com-nav",[[1,"wcs-com-nav",{"appName":[1,"app-name"]}]]],["wcs-com-nav-category",[[1,"wcs-com-nav-category",{"label":[1],"categoryOpen":[32],"close":[64],"open":[64]},[[8,"click","onWindowClickEvent"],[8,"wcsCategoryOpened","onSubmenuOpened"]]]]],["wcs-com-nav-submenu",[[1,"wcs-com-nav-submenu",{"label":[1],"panelTitle":[1,"panel-title"],"panelDescription":[1,"panel-description"],"menuOpen":[32],"close":[64],"open":[64]},[[8,"click","onWindowClickEvent"],[8,"wcsSubmenuOpened","onSubmenuOpened"],[0,"wcsCategoryItemClicked","wcsCategoryItemClickedHandler"]]]]],["wcs-divider",[[1,"wcs-divider"]]],["wcs-dropdown-divider",[[1,"wcs-dropdown-divider"]]],["wcs-dropdown-header",[[1,"wcs-dropdown-header"]]],["wcs-dropdown-item",[[4,"wcs-dropdown-item",null,[[1,"mousedown","onMouseDown"]]]]],["wcs-field",[[1,"wcs-field"]]],["wcs-field-content",[[1,"wcs-field-content"]]],["wcs-field-label",[[1,"wcs-field-label"]]],["wcs-footer",[[1,"wcs-footer"]]],["wcs-galactic",[[1,"wcs-galactic",{"text":[1],"show":[32]}]]],["wcs-grid-column",[[1,"wcs-grid-column",{"path":[1],"name":[1],"sort":[4],"sortFn":[16],"formatter":[16],"sortOrder":[1025,"sort-order"],"width":[1],"customCells":[4,"custom-cells"],"hidden":[4]}]]],["wcs-grid-custom-cell",[[1,"wcs-grid-custom-cell",{"columnId":[1,"column-id"],"rowId":[8,"row-id"]}]]],["wcs-header",[[1,"wcs-header"]]],["wcs-hint",[[1,"wcs-hint",{"small":[1540]}]]],["wcs-icon",[[0,"wcs-icon",{"icon":[1],"size":[1]}]]],["wcs-label",[[1,"wcs-label",{"required":[516]}]]],["wcs-list-item",[[1,"wcs-list-item",{"activated":[1028]}]]],["wcs-list-item-properties",[[1,"wcs-list-item-properties"]]],["wcs-list-item-property",[[1,"wcs-list-item-property"]]],["wcs-nav",[[1,"wcs-nav"]]],["wcs-nav-item",[[4,"wcs-nav-item",{"text":[513],"href":[1537]}]]],["wcs-progress-radial",[[1,"wcs-progress-radial",{"size":[2],"showLabel":[4,"show-label"],"value":[2]}]]],["wcs-radio-group",[[1,"wcs-radio-group",{"value":[8],"name":[520],"mode":[513]},[[0,"wcsRadioClick","selectedOptionChanged"]]]]],["wcs-switch",[[1,"wcs-switch",{"name":[1],"checked":[516],"labelAlignment":[513,"label-alignment"],"disabled":[4]}]]],["wcs-tab",[[1,"wcs-tab",{"header":[1537],"itemKey":[8,"item-key"]}]]],["wcs-tabs",[[1,"wcs-tabs",{"align":[1537],"selectedIndex":[2,"selected-index"],"selectedKey":[8,"selected-key"],"headersOnly":[4,"headers-only"],"gutter":[4],"headers":[32],"currentActiveTabIndex":[32]},[[0,"tabLoaded","onTabLoaded"]]]]],["wcs-tooltip",[[1,"wcs-tooltip",{"for":[513],"position":[513]}]]],["wcs-progress-bar",[[1,"wcs-progress-bar",{"small":[1028],"showLabel":[1028,"show-label"],"value":[1026]}]]],["wcs-radio",[[1,"wcs-radio",{"mode":[513],"value":[1544],"label":[1537],"checked":[1540],"disabled":[1028]}]]],["wcs-select_2",[[4,"wcs-select-option",{"disabled":[1540],"selected":[1540],"value":[8],"chipColor":[1,"chip-color"],"chipBackgroundColor":[1,"chip-background-color"],"multiple":[1540]},[[1,"mousedown","onMouseDown"]]],[1,"wcs-select",{"value":[1032],"placeholder":[1537],"disabled":[1028],"multiple":[516],"chips":[516],"name":[1],"compareWith":[16],"expanded":[32],"hasLoaded":[32],"displayText":[32],"focused":[32],"overlayDirection":[32],"open":[64],"close":[64]},[[1,"mousedown","onMouseDown"],[8,"click","onWindowClickEvent"],[0,"wcsSelectOptionClick","selectedOptionChanged"]]]]],["wcs-error_2",[[1,"wcs-error"],[1,"wcs-form-field",{"isError":[1540,"is-error"],"icon":[8],"hasPrefix":[32],"hasSuffix":[32],"spiedElement":[32]}]]],["wcs-spinner",[[1,"wcs-spinner",{"mode":[1537]}]]],["wcs-button",[[1,"wcs-button",{"type":[1025],"href":[1],"disabled":[516],"ripple":[4],"shape":[513],"mode":[513]},[[0,"click","onClick"]]]]],["wcs-checkbox",[[1,"wcs-checkbox",{"name":[1],"indeterminate":[1540],"checked":[1540],"labelAlignment":[1537,"label-alignment"],"disabled":[4]}]]],["wcs-mat-icon",[[1,"wcs-mat-icon",{"icon":[1],"size":[1],"family":[1],"familyFile":[32],"familyClass":[32]}]]]], options);
|
|
17
17
|
});
|
|
@@ -16,6 +16,10 @@ export declare class Checkbox implements ComponentInterface {
|
|
|
16
16
|
* Specifie the alignment of the checkbox with the label content
|
|
17
17
|
*/
|
|
18
18
|
labelAlignment: CheckboxLabelAlignment;
|
|
19
|
+
/**
|
|
20
|
+
* Specify wether the checkbox is disabled or not.
|
|
21
|
+
*/
|
|
22
|
+
disabled: boolean;
|
|
19
23
|
/**
|
|
20
24
|
* Emitted when the checked property has changed.
|
|
21
25
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type WcsDropdownPlacement = 'auto' | 'auto-start' | 'auto-end' | 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
|
|
@@ -1,30 +1,27 @@
|
|
|
1
1
|
import { ComponentInterface } from '../../stencil-public-runtime';
|
|
2
2
|
import { WcsButtonMode, WcsButtonShape } from '../button/button-interface';
|
|
3
|
-
|
|
4
|
-
* Dropdown component.
|
|
5
|
-
*
|
|
6
|
-
* @example ```hmtl
|
|
7
|
-
* <wcs-dropdown>
|
|
8
|
-
* <div slot="placeholder"></div>
|
|
9
|
-
* <div slot="items">
|
|
10
|
-
* <wcs-dropdown-header></wcs-dropdown-header>
|
|
11
|
-
* <wcs-divider></wcs-divider>
|
|
12
|
-
* <wcs-dropdown-item></wcs-dropdown-item>
|
|
13
|
-
* </div>
|
|
14
|
-
* </wcs-dropdown>
|
|
15
|
-
* ```
|
|
16
|
-
* @todo Complete keyboard navigation.
|
|
17
|
-
*/
|
|
3
|
+
import { WcsDropdownPlacement } from './dropdown-interface';
|
|
18
4
|
export declare class Dropdown implements ComponentInterface {
|
|
19
5
|
el: HTMLWcsDropdownElement;
|
|
6
|
+
/** Hides the arrow in the button */
|
|
7
|
+
noArrow: boolean;
|
|
8
|
+
/** Dropdown's button mode */
|
|
20
9
|
mode: WcsButtonMode;
|
|
10
|
+
/** Dropdown's button shape */
|
|
21
11
|
shape: WcsButtonShape;
|
|
12
|
+
/** Specifies whether the dropdown button is clickable or not */
|
|
22
13
|
disabled: boolean;
|
|
14
|
+
/** placement of the dropdown's popover */
|
|
15
|
+
placement: WcsDropdownPlacement;
|
|
23
16
|
expanded: boolean;
|
|
17
|
+
private popper;
|
|
18
|
+
private buttonTextColor;
|
|
19
|
+
protected placementChange(): void;
|
|
24
20
|
componentDidLoad(): void;
|
|
25
21
|
private fixForFirefoxBelow63;
|
|
26
22
|
private onButtonClick;
|
|
27
23
|
onWindowClickEvent(event: MouseEvent): void;
|
|
28
|
-
dropdownItemClick(_: CustomEvent<
|
|
24
|
+
dropdownItemClick(_: CustomEvent<void>): void;
|
|
25
|
+
componentDidRender(): void;
|
|
29
26
|
render(): any;
|
|
30
27
|
}
|
|
@@ -46,9 +46,20 @@ export declare class Grid implements ComponentInterface, ComponentDidLoad {
|
|
|
46
46
|
private wcsGridRowToWcsGridRowData;
|
|
47
47
|
private updateGridRows;
|
|
48
48
|
componentDidLoad(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Handle existing column's filters (defined before the grid is instantiated)
|
|
51
|
+
* @private
|
|
52
|
+
*/
|
|
53
|
+
private applyInitialSortConfig;
|
|
49
54
|
private getGridColumnsFromTemplate;
|
|
50
55
|
private getGridPaginationsFromTemplate;
|
|
51
56
|
sortChangeEventHandler(event: CustomEvent<WcsGridColumnSortChangeEventDetails>): void;
|
|
57
|
+
/**
|
|
58
|
+
* Sorts the grid rows according to the given column's configuration
|
|
59
|
+
* @param colmun Column from which to extract the sorting configuration
|
|
60
|
+
* @private
|
|
61
|
+
*/
|
|
62
|
+
private sortBy;
|
|
52
63
|
/**
|
|
53
64
|
* Update the page's number of all rows
|
|
54
65
|
*/
|
|
@@ -17,6 +17,7 @@ export declare class GridColumn implements ComponentInterface {
|
|
|
17
17
|
wcsSortChange: EventEmitter<WcsGridColumnSortChangeEventDetails>;
|
|
18
18
|
wcsHiddenChange: EventEmitter<boolean>;
|
|
19
19
|
parseMyObjectProp(newValue: boolean): void;
|
|
20
|
+
sortOrderChange(_: WcsSortOrder): void;
|
|
20
21
|
emitSortConfig(): void;
|
|
21
22
|
render(): any;
|
|
22
23
|
private onSortClick;
|
|
@@ -52,6 +52,14 @@ export declare class Input implements ComponentInterface {
|
|
|
52
52
|
* Set the amount of time, in milliseconds, to wait to trigger the `wcsChange` event after each keystroke. This also impacts form bindings such as `ngModel` or `v-model`.
|
|
53
53
|
*/
|
|
54
54
|
debounce: number;
|
|
55
|
+
/**
|
|
56
|
+
* Prefix displayed before the text field contents. This is not included in the value.
|
|
57
|
+
*/
|
|
58
|
+
prefixLabel: string;
|
|
59
|
+
/**
|
|
60
|
+
* Suffix displayed after the text field contents. This is not included in the value.
|
|
61
|
+
*/
|
|
62
|
+
suffixLabel: string;
|
|
55
63
|
protected debounceChanged(): void;
|
|
56
64
|
/**
|
|
57
65
|
* If `true`, the user cannot interact with the input.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ComponentInterface, EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
-
import { RadioGroupChangeEventDetail } from './radio-group-interface';
|
|
2
|
+
import { RadioGroupChangeEventDetail, RadioGroupMode } from './radio-group-interface';
|
|
3
3
|
import { RadioChosedEvent } from '../radio/radio-interface';
|
|
4
4
|
export declare class RadioGroup implements ComponentInterface {
|
|
5
5
|
value: any | any[] | undefined | null;
|
|
6
6
|
name: any;
|
|
7
|
-
mode:
|
|
7
|
+
mode: RadioGroupMode;
|
|
8
8
|
el: HTMLWcsRadioGroupElement;
|
|
9
9
|
/** Emitted when the value has changed. */
|
|
10
10
|
wcsChange: EventEmitter<RadioGroupChangeEventDetail>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SwitchChangeEventDetail } from './switch-interface';
|
|
1
|
+
import { ComponentInterface, EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { SwitchChangeEventDetail, SwitchLabelAlignment } from './switch-interface';
|
|
3
3
|
export declare class Switch implements ComponentInterface {
|
|
4
4
|
private switchId;
|
|
5
5
|
el: HTMLElement;
|
|
@@ -12,6 +12,14 @@ export declare class Switch implements ComponentInterface {
|
|
|
12
12
|
* Emitted when the checked property has changed.
|
|
13
13
|
*/
|
|
14
14
|
wcsChange: EventEmitter<SwitchChangeEventDetail>;
|
|
15
|
+
/**
|
|
16
|
+
* Specifie the alignment of the switch with the label content
|
|
17
|
+
*/
|
|
18
|
+
labelAlignment: SwitchLabelAlignment;
|
|
19
|
+
/**
|
|
20
|
+
* Specify wether the switch is disabled or not.
|
|
21
|
+
*/
|
|
22
|
+
disabled: boolean;
|
|
15
23
|
toggleChange(_event: Event): void;
|
|
16
24
|
render(): any;
|
|
17
25
|
}
|