wcs-core 2.5.2 → 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 +58 -0
- package/README.md +17 -1
- package/dist/cjs/component-fc28ed16.js +1074 -0
- package/dist/cjs/helpers-6abce594.js +86 -0
- package/dist/cjs/{index-e05c3e1f.js → index-3cb9d725.js} +165 -87
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/{esm/wcs-action-bar_47.entry.js → cjs/lodash-776d6f03.js} +12499 -22628
- package/dist/cjs/popper-6a290c40.js +1731 -0
- package/dist/cjs/select-arrow-76ccf86d.js +36 -0
- package/dist/cjs/wcs-action-bar.cjs.entry.js +24 -0
- package/dist/cjs/wcs-app.cjs.entry.js +2 -2
- package/dist/cjs/wcs-badge.cjs.entry.js +27 -0
- package/dist/cjs/wcs-button.cjs.entry.js +86 -0
- package/dist/cjs/wcs-card-body.cjs.entry.js +19 -0
- package/dist/cjs/wcs-card.cjs.entry.js +20 -0
- package/dist/cjs/wcs-checkbox.cjs.entry.js +47 -0
- package/dist/cjs/wcs-com-nav-category.cjs.entry.js +63 -0
- package/dist/cjs/wcs-com-nav-submenu.cjs.entry.js +69 -0
- package/dist/cjs/wcs-com-nav.cjs.entry.js +19 -0
- package/dist/cjs/wcs-divider.cjs.entry.js +19 -0
- 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-item.cjs.entry.js +23 -0
- package/dist/cjs/wcs-dropdown.cjs.entry.js +90 -0
- package/dist/cjs/wcs-editable-field.cjs.entry.js +225 -0
- package/dist/cjs/wcs-error_2.cjs.entry.js +137 -0
- package/dist/cjs/wcs-field-content.cjs.entry.js +16 -0
- package/dist/cjs/wcs-field-label.cjs.entry.js +16 -0
- package/dist/cjs/wcs-field.cjs.entry.js +19 -0
- package/dist/cjs/wcs-footer.cjs.entry.js +19 -0
- package/dist/cjs/wcs-galactic-menu.cjs.entry.js +58 -0
- package/dist/cjs/wcs-galactic.cjs.entry.js +41 -0
- package/dist/cjs/wcs-grid-column.cjs.entry.js +77 -0
- package/dist/cjs/wcs-grid-custom-cell.cjs.entry.js +16 -0
- package/dist/cjs/wcs-grid-pagination.cjs.entry.js +4 -4
- package/dist/cjs/wcs-grid.cjs.entry.js +332 -0
- package/dist/cjs/wcs-header.cjs.entry.js +25 -0
- package/dist/cjs/wcs-hint.cjs.entry.js +20 -0
- package/dist/cjs/wcs-horizontal-stepper.cjs.entry.js +114 -0
- package/dist/cjs/wcs-icon.cjs.entry.js +2 -2
- package/dist/cjs/wcs-input.cjs.entry.js +228 -0
- package/dist/cjs/wcs-label.cjs.entry.js +20 -0
- package/dist/cjs/wcs-list-item-properties.cjs.entry.js +19 -0
- package/dist/cjs/wcs-list-item-property.cjs.entry.js +19 -0
- package/dist/cjs/wcs-list-item.cjs.entry.js +23 -0
- package/dist/cjs/wcs-mat-icon.cjs.entry.js +73 -0
- package/dist/cjs/wcs-modal.cjs.entry.js +45 -0
- package/dist/cjs/wcs-nav-item.cjs.entry.js +23 -0
- package/dist/cjs/wcs-nav.cjs.entry.js +19 -0
- package/dist/cjs/wcs-progress-bar.cjs.entry.js +47 -0
- package/dist/cjs/wcs-progress-radial.cjs.entry.js +30 -0
- package/dist/cjs/wcs-radio-group.cjs.entry.js +65 -0
- package/dist/cjs/wcs-radio.cjs.entry.js +49 -0
- package/dist/cjs/wcs-select_2.cjs.entry.js +4916 -0
- package/dist/cjs/wcs-spinner.cjs.entry.js +21 -0
- package/dist/cjs/wcs-switch.cjs.entry.js +42 -0
- package/dist/cjs/wcs-tab.cjs.entry.js +20 -0
- package/dist/cjs/wcs-tabs.cjs.entry.js +159 -0
- package/dist/cjs/wcs-textarea.cjs.entry.js +224 -0
- package/dist/cjs/wcs-tooltip.cjs.entry.js +129 -0
- package/dist/cjs/wcs.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +5 -2
- package/dist/collection/components/button/button.css +79 -75
- package/dist/collection/components/button/button.js +23 -11
- package/dist/collection/components/checkbox/checkbox.css +18 -7
- package/dist/collection/components/checkbox/checkbox.js +24 -2
- package/dist/collection/components/com-nav/com-nav.css +1 -2
- package/dist/collection/components/com-nav-category/com-nav-category.css +5 -6
- package/dist/collection/components/com-nav-category/com-nav-category.js +31 -1
- package/dist/collection/components/com-nav-submenu/com-nav-submenu.css +1 -2
- package/dist/collection/components/com-nav-submenu/com-nav-submenu.js +21 -1
- 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/footer/footer.css +1 -1
- package/dist/collection/components/form-field/form-field.css +1 -1
- package/dist/collection/components/grid/grid.js +75 -13
- package/dist/collection/components/grid-column/grid-column.css +5 -0
- package/dist/collection/components/grid-column/grid-column.js +69 -3
- package/dist/collection/components/grid-custom-cell/grid-custom-cell.js +45 -0
- package/dist/collection/components/grid-pagination/grid-pagination.js +4 -4
- package/dist/collection/components/header/header.css +1 -1
- package/dist/collection/components/input/input.css +48 -0
- package/dist/collection/components/input/input.js +40 -4
- 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/select/select.css +81 -77
- package/dist/collection/components/select/select.js +2 -2
- package/dist/collection/components/select-option/select-option.css +79 -75
- package/dist/collection/components/select-option/select-option.js +6 -7
- package/dist/collection/components/switch/switch.css +53 -16
- package/dist/collection/components/switch/switch.js +55 -6
- package/dist/collection/components/tab/tab.js +4 -4
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/textarea/textarea.css +4 -0
- package/dist/collection/components/textarea/textarea.js +2 -2
- package/dist/collection/components/tooltip/tooltip.js +2 -2
- package/dist/collection/utils/helpers.js +4 -0
- package/dist/esm/component-6b4d470f.js +1072 -0
- package/dist/esm/helpers-e2993152.js +77 -0
- package/dist/esm/{index-c619b1fa.js → index-b982604a.js} +165 -88
- package/dist/esm/loader.js +3 -3
- package/dist/{cjs/wcs-action-bar_47.cjs.entry.js → esm/lodash-d6d9d079.js} +12610 -22791
- package/dist/esm/popper-e5fdfb6a.js +1729 -0
- package/dist/esm/select-arrow-73ac4016.js +34 -0
- package/dist/esm/wcs-action-bar.entry.js +20 -0
- package/dist/esm/wcs-app.entry.js +2 -2
- package/dist/esm/wcs-badge.entry.js +23 -0
- package/dist/esm/wcs-button.entry.js +82 -0
- package/dist/esm/wcs-card-body.entry.js +15 -0
- package/dist/esm/wcs-card.entry.js +16 -0
- package/dist/esm/wcs-checkbox.entry.js +43 -0
- package/dist/esm/wcs-com-nav-category.entry.js +59 -0
- package/dist/esm/wcs-com-nav-submenu.entry.js +65 -0
- package/dist/esm/wcs-com-nav.entry.js +15 -0
- package/dist/esm/wcs-divider.entry.js +15 -0
- 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-item.entry.js +19 -0
- package/dist/esm/wcs-dropdown.entry.js +86 -0
- package/dist/esm/wcs-editable-field.entry.js +221 -0
- package/dist/esm/wcs-error_2.entry.js +132 -0
- package/dist/esm/wcs-field-content.entry.js +12 -0
- package/dist/esm/wcs-field-label.entry.js +12 -0
- package/dist/esm/wcs-field.entry.js +15 -0
- package/dist/esm/wcs-footer.entry.js +15 -0
- package/dist/esm/wcs-galactic-menu.entry.js +54 -0
- package/dist/esm/wcs-galactic.entry.js +37 -0
- package/dist/esm/wcs-grid-column.entry.js +73 -0
- package/dist/esm/wcs-grid-custom-cell.entry.js +12 -0
- package/dist/esm/wcs-grid-pagination.entry.js +4 -4
- package/dist/esm/wcs-grid.entry.js +328 -0
- package/dist/esm/wcs-header.entry.js +21 -0
- package/dist/esm/wcs-hint.entry.js +16 -0
- package/dist/esm/wcs-horizontal-stepper.entry.js +110 -0
- package/dist/esm/wcs-icon.entry.js +2 -2
- package/dist/esm/wcs-input.entry.js +224 -0
- package/dist/esm/wcs-label.entry.js +16 -0
- package/dist/esm/wcs-list-item-properties.entry.js +15 -0
- package/dist/esm/wcs-list-item-property.entry.js +15 -0
- package/dist/esm/wcs-list-item.entry.js +19 -0
- package/dist/esm/wcs-mat-icon.entry.js +69 -0
- package/dist/esm/wcs-modal.entry.js +41 -0
- package/dist/esm/wcs-nav-item.entry.js +19 -0
- package/dist/esm/wcs-nav.entry.js +15 -0
- package/dist/esm/wcs-progress-bar.entry.js +43 -0
- package/dist/esm/wcs-progress-radial.entry.js +26 -0
- package/dist/esm/wcs-radio-group.entry.js +61 -0
- package/dist/esm/wcs-radio.entry.js +45 -0
- package/dist/esm/wcs-select_2.entry.js +4911 -0
- package/dist/esm/wcs-spinner.entry.js +17 -0
- package/dist/esm/wcs-switch.entry.js +38 -0
- package/dist/esm/wcs-tab.entry.js +16 -0
- package/dist/esm/wcs-tabs.entry.js +155 -0
- package/dist/esm/wcs-textarea.entry.js +220 -0
- package/dist/esm/wcs-tooltip.entry.js +125 -0
- package/dist/esm/wcs.js +3 -3
- package/dist/types/components/button/button.d.ts +7 -3
- package/dist/types/components/checkbox/checkbox.d.ts +4 -0
- package/dist/types/components/com-nav-category/com-nav-category.d.ts +7 -0
- package/dist/types/components/com-nav-submenu/com-nav-submenu.d.ts +7 -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 +18 -0
- package/dist/types/components/grid-column/grid-column.d.ts +5 -0
- package/dist/types/components/grid-custom-cell/grid-custom-cell.d.ts +12 -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/select-option/select-option.d.ts +2 -0
- 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 +148 -4
- package/dist/types/stencil-public-runtime.d.ts +183 -182
- package/dist/types/utils/helpers.d.ts +1 -0
- package/dist/wcs/p-03b2e238.entry.js +1 -0
- package/dist/wcs/p-15008e35.entry.js +1 -0
- package/dist/wcs/p-16dfbae8.js +127 -0
- package/dist/wcs/p-17c6db7f.entry.js +1 -0
- package/dist/wcs/p-1dce7e63.entry.js +1 -0
- package/dist/wcs/p-1f5aed36.entry.js +1 -0
- package/dist/wcs/p-214236db.entry.js +1 -0
- package/dist/wcs/p-26b5c0a3.entry.js +1 -0
- package/dist/wcs/p-2e6265dc.entry.js +1 -0
- package/dist/wcs/p-384068f7.entry.js +1 -0
- package/dist/wcs/p-41037455.entry.js +1 -0
- package/dist/wcs/p-474d6601.entry.js +1 -0
- package/dist/wcs/p-55fdc284.entry.js +1 -0
- package/dist/wcs/p-57247184.entry.js +1 -0
- package/dist/wcs/p-5b35b232.entry.js +1 -0
- package/dist/wcs/p-600a9cc0.entry.js +1 -0
- package/dist/wcs/p-60b51967.entry.js +1 -0
- package/dist/wcs/p-64523291.entry.js +1 -0
- package/dist/wcs/p-65c5ccc5.entry.js +1 -0
- package/dist/wcs/p-688fea65.entry.js +1 -0
- package/dist/wcs/p-716d5921.entry.js +1 -0
- package/dist/wcs/p-7206e492.entry.js +1 -0
- package/dist/wcs/p-7219c04b.js +1 -0
- package/dist/wcs/p-8137f075.entry.js +1 -0
- package/dist/wcs/p-8864a491.entry.js +1 -0
- package/dist/wcs/p-8c8740e3.entry.js +1 -0
- package/dist/wcs/p-91a2de07.entry.js +1 -0
- package/dist/wcs/p-94a31f64.entry.js +1 -0
- package/dist/wcs/p-979dfd78.entry.js +1 -0
- package/dist/wcs/p-9ba52bc4.entry.js +1 -0
- package/dist/wcs/p-a1ee1551.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-adef7aaf.js +1 -0
- package/dist/wcs/p-b5138986.js +1 -0
- package/dist/wcs/p-b7184d59.entry.js +1 -0
- package/dist/wcs/p-bbf1ef42.entry.js +1 -0
- package/dist/wcs/p-c7d6d3e1.entry.js +15 -0
- package/dist/wcs/p-cf4d7a83.js +1 -0
- package/dist/wcs/p-d7dec082.entry.js +1 -0
- package/dist/wcs/p-db68379f.entry.js +1 -0
- package/dist/wcs/p-dbbc3f58.entry.js +1 -0
- package/dist/wcs/p-dc817204.entry.js +1 -0
- package/dist/wcs/p-e0163de8.entry.js +1 -0
- package/dist/wcs/p-e4236d32.entry.js +1 -0
- package/dist/wcs/p-e43358e4.entry.js +1 -0
- package/dist/wcs/p-e65d1c27.entry.js +1 -0
- package/dist/wcs/p-e9ce507c.entry.js +1 -0
- package/dist/wcs/p-ea3e93e9.entry.js +1 -0
- package/dist/wcs/p-ed6e8541.entry.js +1 -0
- package/dist/wcs/p-f46e6c3c.js +1 -0
- package/dist/wcs/p-f9944bde.entry.js +1 -0
- package/dist/wcs/p-fa173947.entry.js +1 -0
- package/dist/wcs/p-fb1577b5.entry.js +1 -0
- package/dist/wcs/p-fbaf299d.entry.js +1 -0
- package/dist/wcs/p-febe9ccc.entry.js +1 -0
- package/dist/wcs/p-ff6d0dfd.entry.js +1 -0
- package/dist/wcs/wcs.esm.js +1 -1
- package/loader/index.d.ts +0 -1
- package/package.json +22 -21
- package/dist/wcs/p-16dca526.entry.js +0 -1
- package/dist/wcs/p-4f228fcb.entry.js +0 -134
- package/dist/wcs/p-66520e5a.entry.js +0 -1
- package/dist/wcs/p-d31287c6.entry.js +0 -1
- package/dist/wcs/p-f73f235b.js +0 -1
- package/schematics/.gitignore +0 -18
- package/schematics/.npmignore +0 -4
- package/schematics/collection.json +0 -9
- package/schematics/src/ng-add/files/fonts/avenir-black.woff +0 -0
- package/schematics/src/ng-add/files/fonts/avenir-book.woff +0 -0
- package/schematics/src/ng-add/files/fonts/avenir-lighter.woff +0 -0
- package/schematics/src/ng-add/files/fonts/avenir-medium.woff +0 -0
- package/schematics/src/ng-add/files/sncf-logo.png +0 -0
- package/schematics/src/ng-add/index.d.ts +0 -3
- package/schematics/src/ng-add/index.js +0 -119
- package/schematics/src/ng-add/index.js.map +0 -1
- package/schematics/src/ng-add/schema.json +0 -5
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-3cb9d725.js');
|
|
6
|
+
const lodash = require('./lodash-776d6f03.js');
|
|
7
|
+
|
|
8
|
+
function getSortOrderInteger(sortOrder) {
|
|
9
|
+
switch (sortOrder) {
|
|
10
|
+
case 'asc':
|
|
11
|
+
return 1;
|
|
12
|
+
case 'desc':
|
|
13
|
+
return -1;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
18
|
+
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
19
|
+
// generators (like Math.random()).
|
|
20
|
+
var getRandomValues;
|
|
21
|
+
var rnds8 = new Uint8Array(16);
|
|
22
|
+
function rng() {
|
|
23
|
+
// lazy load so that environments that need to polyfill have a chance to do so
|
|
24
|
+
if (!getRandomValues) {
|
|
25
|
+
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
|
|
26
|
+
// find the complete implementation of crypto (msCrypto) on IE11.
|
|
27
|
+
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
|
|
28
|
+
|
|
29
|
+
if (!getRandomValues) {
|
|
30
|
+
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return getRandomValues(rnds8);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
38
|
+
|
|
39
|
+
function validate(uuid) {
|
|
40
|
+
return typeof uuid === 'string' && REGEX.test(uuid);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Convert array of 16 byte values to UUID string format of the form:
|
|
45
|
+
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
var byteToHex = [];
|
|
49
|
+
|
|
50
|
+
for (var i = 0; i < 256; ++i) {
|
|
51
|
+
byteToHex.push((i + 0x100).toString(16).substr(1));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function stringify(arr) {
|
|
55
|
+
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
56
|
+
// Note: Be careful editing this code! It's been tuned for performance
|
|
57
|
+
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
58
|
+
var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
|
|
59
|
+
// of the following:
|
|
60
|
+
// - One or more input array values don't map to a hex octet (leading to
|
|
61
|
+
// "undefined" in the uuid)
|
|
62
|
+
// - Invalid input values for the RFC `version` or `variant` fields
|
|
63
|
+
|
|
64
|
+
if (!validate(uuid)) {
|
|
65
|
+
throw TypeError('Stringified UUID is invalid');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return uuid;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function v4(options, buf, offset) {
|
|
72
|
+
options = options || {};
|
|
73
|
+
var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
74
|
+
|
|
75
|
+
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
76
|
+
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
77
|
+
|
|
78
|
+
if (buf) {
|
|
79
|
+
offset = offset || 0;
|
|
80
|
+
|
|
81
|
+
for (var i = 0; i < 16; ++i) {
|
|
82
|
+
buf[offset + i] = rnds[i];
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return buf;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return stringify(rnds);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const gridCss = ":host{display:block;--wcs-grid-highlight-color:var(--wcs-light)}:host th{background-color:var(--wcs-light)}:host th:not(:first-child){border-left:solid 1px var(--wcs-text-light)}:host ::slotted([slot=grid-column]:first-child){--wcs-grid-column-border-left:none}:host table{width:100%;border-spacing:0}:host td{color:var(--wcs-gray-light);margin:0;padding:calc(var(--wcs-padding) / 2) var(--wcs-padding)}:host tr:not(:last-child) td{border-bottom:solid 1px var(--wcs-text-light)}:host .wcs-grid-selection-column{padding:calc(var(--wcs-padding) / 2) var(--wcs-padding);width:40px}:host tr.selected{background-color:var(--wcs-grid-highlight-color)}:host .loading{text-align:center}:host([selection]) ::slotted([slot=grid-column]:first-child){--wcs-grid-column-border-left:solid 1px var(--wcs-text-light) !important}";
|
|
92
|
+
|
|
93
|
+
let Grid = class {
|
|
94
|
+
constructor(hostRef) {
|
|
95
|
+
index.registerInstance(this, hostRef);
|
|
96
|
+
this.wcsGridSelectionChange = index.createEvent(this, "wcsGridSelectionChange", 7);
|
|
97
|
+
this.wcsGridAllSelectionChange = index.createEvent(this, "wcsGridAllSelectionChange", 7);
|
|
98
|
+
/**
|
|
99
|
+
* Used to manage grid's row selection
|
|
100
|
+
*/
|
|
101
|
+
this.selectionConfig = 'none';
|
|
102
|
+
/**
|
|
103
|
+
* Set the selected items
|
|
104
|
+
*/
|
|
105
|
+
this.selectedItems = [];
|
|
106
|
+
/**
|
|
107
|
+
* Rows to display, contains user data and meta data
|
|
108
|
+
*/
|
|
109
|
+
this.rows = [];
|
|
110
|
+
}
|
|
111
|
+
onDataChange(newValue) {
|
|
112
|
+
this.updateGridRows(newValue);
|
|
113
|
+
}
|
|
114
|
+
onSelectedItemsPropertyChange(newValue) {
|
|
115
|
+
this.updateSelectionWithValues(newValue);
|
|
116
|
+
}
|
|
117
|
+
onHiddenColumnChange() {
|
|
118
|
+
// We use forceUpdate because the fact of hiding a column or not does not modify the internal structure of the grid (WcsGridRow).
|
|
119
|
+
// Hide a column only impacts the way it is rendered but the grid-column remains in the dom and in our internal model.
|
|
120
|
+
index.forceUpdate(this);
|
|
121
|
+
}
|
|
122
|
+
updateSelectionWithValues(values) {
|
|
123
|
+
if (this.selectionConfig === 'single') {
|
|
124
|
+
this.rows.map(r => r.selected = false);
|
|
125
|
+
for (const row of this.rows) {
|
|
126
|
+
if (lodash.lodash.isEqual(row.data, values)) {
|
|
127
|
+
row.selected = true;
|
|
128
|
+
break; // only one line can be selected
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
else if (this.selectionConfig === 'multiple') {
|
|
133
|
+
this.rows.map(r => r.selected = false);
|
|
134
|
+
for (const row of this.rows) {
|
|
135
|
+
if (values.find(x => lodash.lodash.isEqual(x, row.data))) {
|
|
136
|
+
row.selected = true;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
this.rows = lodash.lodash.cloneDeep(this.rows);
|
|
141
|
+
}
|
|
142
|
+
wcsGridRowToWcsGridRowData(row) {
|
|
143
|
+
return { selected: row.selected, page: row.page, data: row.data };
|
|
144
|
+
}
|
|
145
|
+
updateGridRows(data) {
|
|
146
|
+
const rows = [];
|
|
147
|
+
if (data && this.columns) {
|
|
148
|
+
for (let i = 0; i < data.length; i++) {
|
|
149
|
+
const row = {
|
|
150
|
+
uuid: v4(),
|
|
151
|
+
data: data[i],
|
|
152
|
+
selected: false,
|
|
153
|
+
cells: []
|
|
154
|
+
};
|
|
155
|
+
for (const column of this.columns) {
|
|
156
|
+
row.cells.push({
|
|
157
|
+
content: lodash.lodash.get(data[i], column.path),
|
|
158
|
+
column,
|
|
159
|
+
formatter: column.formatter
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
rows.push(row);
|
|
163
|
+
}
|
|
164
|
+
this.rows = rows;
|
|
165
|
+
this.updatePageIndex();
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
componentDidLoad() {
|
|
169
|
+
this.columns = this.getGridColumnsFromTemplate();
|
|
170
|
+
this.paginationEl = this.wcsGridPaginationId
|
|
171
|
+
? document.getElementById(this.wcsGridPaginationId)
|
|
172
|
+
: this.getGridPaginationsFromTemplate()[0];
|
|
173
|
+
this.updateGridRows(this.data);
|
|
174
|
+
if (this.selectedItems) {
|
|
175
|
+
this.updateSelectionWithValues(this.selectedItems);
|
|
176
|
+
}
|
|
177
|
+
this.applyInitialSortConfig();
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Handle existing column's filters (defined before the grid is instantiated)
|
|
181
|
+
* @private
|
|
182
|
+
*/
|
|
183
|
+
applyInitialSortConfig() {
|
|
184
|
+
const [first, ...other] = this.columns.filter(c => c.sortOrder !== 'none');
|
|
185
|
+
// We keep only one active sorted column
|
|
186
|
+
other === null || other === void 0 ? void 0 : other.forEach(o => o.sortOrder = 'none');
|
|
187
|
+
if (first && !this.serverMode) {
|
|
188
|
+
this.sortBy(first);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
getGridColumnsFromTemplate() {
|
|
192
|
+
const slotted = this.el.shadowRoot.querySelector('slot[name="grid-column"]');
|
|
193
|
+
return slotted.assignedElements();
|
|
194
|
+
}
|
|
195
|
+
getGridPaginationsFromTemplate() {
|
|
196
|
+
const slotted = this.el.shadowRoot.querySelector('slot[name="grid-pagination"]');
|
|
197
|
+
return slotted.assignedElements();
|
|
198
|
+
}
|
|
199
|
+
sortChangeEventHandler(event) {
|
|
200
|
+
if (event.detail.order === 'none')
|
|
201
|
+
return;
|
|
202
|
+
// We keep only one active sort column
|
|
203
|
+
this.columns.filter(c => c !== event.detail.column).forEach(c => c.sortOrder = 'none');
|
|
204
|
+
if (this.serverMode)
|
|
205
|
+
return;
|
|
206
|
+
this.sortBy(event.detail.column);
|
|
207
|
+
this.updatePageIndex();
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Sorts the grid rows according to the given column's configuration
|
|
211
|
+
* @param colmun Column from which to extract the sorting configuration
|
|
212
|
+
* @private
|
|
213
|
+
*/
|
|
214
|
+
sortBy(colmun) {
|
|
215
|
+
if (colmun.sortFn) {
|
|
216
|
+
this.rows = lodash.lodash.cloneDeep(this.rows)
|
|
217
|
+
.sort((a, b) => colmun.sortFn(a.data, b.data, colmun) * getSortOrderInteger(colmun.sortOrder));
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
this.rows = lodash.lodash.cloneDeep(this.rows)
|
|
221
|
+
.sort((a, b) => {
|
|
222
|
+
const path = colmun.path;
|
|
223
|
+
return ((lodash.lodash.get(a.data, path) < lodash.lodash.get(b.data, path)) ? -1 : (lodash.lodash.get(a.data, path) > lodash.lodash.get(b.data, path)) ? 1 : 0) * getSortOrderInteger(colmun.sortOrder);
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Update the page's number of all rows
|
|
229
|
+
*/
|
|
230
|
+
updatePageIndex() {
|
|
231
|
+
if (!this.serverMode && this.paginationEl) {
|
|
232
|
+
if (this.paginationEl.currentPage + 1 > this.paginationEl.pageCount) {
|
|
233
|
+
this.paginationEl.currentPage = this.paginationEl.pageCount - 1;
|
|
234
|
+
}
|
|
235
|
+
this.paginationEl.itemsCount = this.data.length;
|
|
236
|
+
this.paginationEl.pageCount = Math.ceil(this.data.length / this.paginationEl.pageSize);
|
|
237
|
+
const rows = lodash.lodash.cloneDeep(this.rows);
|
|
238
|
+
rows.forEach((row, index) => row.page = Math.floor(index / this.paginationEl.pageSize));
|
|
239
|
+
this.rows = [...rows];
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
paginationChangeEventHandler() {
|
|
243
|
+
this.onPaginationChange();
|
|
244
|
+
}
|
|
245
|
+
paginationChangeEventHandlerOutside(event) {
|
|
246
|
+
if (this.wcsGridPaginationId && this.wcsGridPaginationId === event.target.id) {
|
|
247
|
+
this.onPaginationChange();
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
onPaginationChange() {
|
|
251
|
+
if (this.serverMode)
|
|
252
|
+
return;
|
|
253
|
+
this.updatePageIndex();
|
|
254
|
+
}
|
|
255
|
+
onRowSelection(row) {
|
|
256
|
+
if (this.selectionConfig === 'single') {
|
|
257
|
+
this.rows.filter(r => r.uuid !== row.uuid).map(r => r.selected = false);
|
|
258
|
+
}
|
|
259
|
+
row.selected = !row.selected;
|
|
260
|
+
if (this.selectionConfig !== 'single' || row.selected) {
|
|
261
|
+
this.wcsGridSelectionChange.emit({ row: this.wcsGridRowToWcsGridRowData(row) });
|
|
262
|
+
}
|
|
263
|
+
this.rows = lodash.lodash.cloneDeep(this.rows);
|
|
264
|
+
}
|
|
265
|
+
selectAllRows() {
|
|
266
|
+
const rows = this.getRowsForCurrentPage();
|
|
267
|
+
const selected = !this.allRowsAreSelected();
|
|
268
|
+
rows.map(r => r.selected = selected);
|
|
269
|
+
this.wcsGridAllSelectionChange.emit({ rows: selected ? rows.map(row => this.wcsGridRowToWcsGridRowData(row)) : [] });
|
|
270
|
+
this.rows = lodash.lodash.cloneDeep(this.rows);
|
|
271
|
+
}
|
|
272
|
+
allRowsAreSelected() {
|
|
273
|
+
const rows = this.getRowsForCurrentPage();
|
|
274
|
+
return rows.length > 0 && rows.filter(row => row.selected).length === rows.length;
|
|
275
|
+
}
|
|
276
|
+
getRowsForCurrentPage() {
|
|
277
|
+
if (this.paginationEl) {
|
|
278
|
+
return this.rows.filter(row => row.page === this.paginationEl.currentPage);
|
|
279
|
+
}
|
|
280
|
+
return this.rows;
|
|
281
|
+
}
|
|
282
|
+
renderSelectionColumn(row) {
|
|
283
|
+
switch (this.selectionConfig) {
|
|
284
|
+
case 'none':
|
|
285
|
+
return;
|
|
286
|
+
case 'single':
|
|
287
|
+
return index.h("td", null, index.h("wcs-radio", { checked: row.selected, onClick: this.onRowSelection.bind(this, row) }));
|
|
288
|
+
case 'multiple':
|
|
289
|
+
return index.h("td", null, index.h("wcs-checkbox", { checked: row.selected, onWcsChange: this.onRowSelection.bind(this, row) }));
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
getCellContent(row, cell) {
|
|
293
|
+
if (cell.formatter) {
|
|
294
|
+
return cell.formatter(index.h, cell.column, this.wcsGridRowToWcsGridRowData(row));
|
|
295
|
+
}
|
|
296
|
+
return cell.content;
|
|
297
|
+
}
|
|
298
|
+
totalColumnCount() {
|
|
299
|
+
if (!this.columns) {
|
|
300
|
+
return 0;
|
|
301
|
+
}
|
|
302
|
+
return this.columns.length + (this.selectionConfig === 'none' ? 0 : 1);
|
|
303
|
+
}
|
|
304
|
+
render() {
|
|
305
|
+
var _a;
|
|
306
|
+
return (index.h(index.Host, null, index.h("table", null, index.h("thead", null, this.selectionConfig === 'none' ? ''
|
|
307
|
+
: index.h("th", { class: "wcs-grid-selection-column" }, this.selectionConfig === 'single' ? '' :
|
|
308
|
+
index.h("wcs-checkbox", { checked: this.allRowsAreSelected(), onWcsChange: this.selectAllRows.bind(this) })), index.h("slot", { name: "grid-column" })), index.h("tbody", null, this.loading
|
|
309
|
+
? index.h("tr", null, index.h("td", { colSpan: this.totalColumnCount(), class: "loading" }, index.h("wcs-spinner", null)))
|
|
310
|
+
: (_a = this.rows) === null || _a === void 0 ? void 0 : _a.filter(row => this.serverMode || !this.paginationEl || row.page === this.paginationEl.currentPage).map(row => this.renderRow(row)))), index.h("slot", { name: "grid-pagination" })));
|
|
311
|
+
}
|
|
312
|
+
renderRow(row) {
|
|
313
|
+
var _a;
|
|
314
|
+
return index.h("tr", { class: row.selected ? 'selected' : '' }, this.renderSelectionColumn(row), (_a = row.cells) === null || _a === void 0 ? void 0 :
|
|
315
|
+
_a.map(cell => {
|
|
316
|
+
if (cell.column.hidden) {
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
return cell.column.customCells
|
|
320
|
+
? (index.h("td", null, index.h("slot", { name: cell.column.id + '-' + row.data[this.rowIdPath] })))
|
|
321
|
+
: (index.h("td", { part: cell.column.path + '-column' }, this.getCellContent(row, cell)));
|
|
322
|
+
}));
|
|
323
|
+
}
|
|
324
|
+
get el() { return index.getElement(this); }
|
|
325
|
+
static get watchers() { return {
|
|
326
|
+
"data": ["onDataChange"],
|
|
327
|
+
"selectedItems": ["onSelectedItemsPropertyChange"]
|
|
328
|
+
}; }
|
|
329
|
+
};
|
|
330
|
+
Grid.style = gridCss;
|
|
331
|
+
|
|
332
|
+
exports.wcs_grid = Grid;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-3cb9d725.js');
|
|
6
|
+
|
|
7
|
+
const headerCss = "header{box-shadow:0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.2);display:flex;align-items:center;background:var(--wcs-gray);padding:8px 8px 8px 16px;height:48px;z-index:1}::slotted(img){width:70px;height:36.8px;margin-right:16px}::slotted(h1){color:var(--wcs-white);margin:0;font-weight:500;font-size:1.5rem}::slotted([slot=actions]){margin-left:auto}";
|
|
8
|
+
|
|
9
|
+
let Header = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
}
|
|
13
|
+
hostData() {
|
|
14
|
+
return {
|
|
15
|
+
'slot': 'header'
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
__stencil_render() {
|
|
19
|
+
return (index.h("header", null, index.h("slot", { name: "logo" }), index.h("slot", { name: "title" }), index.h("slot", { name: "actions" })));
|
|
20
|
+
}
|
|
21
|
+
render() { return index.h(index.Host, this.hostData(), this.__stencil_render()); }
|
|
22
|
+
};
|
|
23
|
+
Header.style = headerCss;
|
|
24
|
+
|
|
25
|
+
exports.wcs_header = Header;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-3cb9d725.js');
|
|
6
|
+
|
|
7
|
+
const hintCss = ":host{margin-top:0.25rem}:host([small]){font-size:0.75rem;font-weight:400;color:var(--wcs-text-medium)}";
|
|
8
|
+
|
|
9
|
+
let Label = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
this.small = false;
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
return (index.h(index.Host, { slot: "messages" }, index.h("slot", null)));
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
Label.style = hintCss;
|
|
19
|
+
|
|
20
|
+
exports.wcs_hint = Label;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-3cb9d725.js');
|
|
6
|
+
|
|
7
|
+
const HorizontalStep = ({ step, checkOnComplete, complete, passed, active, first, disable, onClick }) => {
|
|
8
|
+
return (index.h("div", { class: "graphic-step", "data-first": first },
|
|
9
|
+
first ? null : (index.h("wcs-progress-bar", { value: passed ? 100 : 0 })),
|
|
10
|
+
index.h("wcs-button", { style: { 'backgroundColor': 'white' }, shape: "round", onClick: _ => onClick(step), mode: (active || complete) && !step.disable ? 'plain' : 'stroked', disabled: disable }, getButtonContent(step.button, checkOnComplete, complete, active))));
|
|
11
|
+
};
|
|
12
|
+
const getButtonContent = (stepButton, checkOnComplete, complete, active) => {
|
|
13
|
+
if (checkOnComplete && complete && !active) {
|
|
14
|
+
return (index.h("wcs-mat-icon", { size: "m", icon: "done", family: "outlined" }));
|
|
15
|
+
}
|
|
16
|
+
switch (stepButton.kind) {
|
|
17
|
+
case 'Icon':
|
|
18
|
+
return (index.h("wcs-mat-icon", { size: "m", icon: stepButton.iconName, family: stepButton.family ? stepButton.family : 'outlined' }));
|
|
19
|
+
case 'Text':
|
|
20
|
+
return (stepButton.text);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const horizontalStepperCss = ":host{display:block}:host .steps{display:flex;flex-direction:row;flex:1}:host .graphic-step{display:flex;flex-direction:row;flex:1;align-items:center}:host .graphic-step[data-first]{flex:0}:host wcs-progress-bar{--wcs-internal-progress-bar-border-radius:0;flex:1;margin:0 -1px}:host .label-container{justify-content:space-between;display:flex;flex-direction:row;margin-top:var(--wcs-base-margin)}:host .label-container>*{width:100%;text-align:center;flex:1;color:var(--wcs-text-medium);font-weight:500}:host .label-container>*[data-disable]{color:var(--wcs-text-light)}:host .label-container>*[data-current]{color:var(--wcs-primary)}:host .label-container>div[data-first]{margin-left:20px;text-align:left;flex:0.5}:host .label-container>div[data-first]>span{margin-left:-20px}:host .label-container>div[data-last]{margin-right:20px;text-align:right;flex:0.5}:host .label-container>div[data-last]>span{margin-right:-20px}";
|
|
25
|
+
|
|
26
|
+
let HorizontalStepper = class {
|
|
27
|
+
constructor(hostRef) {
|
|
28
|
+
index.registerInstance(this, hostRef);
|
|
29
|
+
this.wcsHorizontalStepClick = index.createEvent(this, "wcsHorizontalStepClick", 7);
|
|
30
|
+
/**
|
|
31
|
+
* index of the active step. The index corresponds to the index of the step in the 'steps' list
|
|
32
|
+
*/
|
|
33
|
+
this.currentStep = 0;
|
|
34
|
+
/**
|
|
35
|
+
* Specifies if the stepper is in linear mode (the user can only click on the next step)
|
|
36
|
+
* or non-linear (the user can click on any step)
|
|
37
|
+
*/
|
|
38
|
+
this.mode = 'nonLinear';
|
|
39
|
+
this.buttonMode = 'stroked';
|
|
40
|
+
}
|
|
41
|
+
componentWillLoad() {
|
|
42
|
+
this.internalCurrentStep = this.currentStep;
|
|
43
|
+
if (this.steps.length < 1) {
|
|
44
|
+
throw new Error('You must add at least one step');
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
onCurrentStepChange(newValue, oldValue) {
|
|
48
|
+
const stepInterval = Math.abs(oldValue - newValue);
|
|
49
|
+
this.el.style.setProperty('--wcs-progress-bar-animation-duration', 375 / stepInterval + 'ms');
|
|
50
|
+
if (newValue !== oldValue) {
|
|
51
|
+
for (let i = 0; i < stepInterval; i++) {
|
|
52
|
+
setTimeout(() => {
|
|
53
|
+
this.internalCurrentStep -= (oldValue - newValue) > 0 ? 1 : -1;
|
|
54
|
+
if (i === stepInterval - 1) {
|
|
55
|
+
this.el.style.removeProperty('--wcs-progress-bar-animation-duration');
|
|
56
|
+
}
|
|
57
|
+
}, (i * (375 / stepInterval)));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
async previous() {
|
|
62
|
+
this.navigateToIndex(this.internalCurrentStep - 1, 'backward');
|
|
63
|
+
}
|
|
64
|
+
async next() {
|
|
65
|
+
this.navigateToIndex(this.internalCurrentStep + 1, 'forward');
|
|
66
|
+
}
|
|
67
|
+
navigateToIndex(index, direction) {
|
|
68
|
+
var _a, _b;
|
|
69
|
+
if (index >= 0 && index <= this.steps.length - 1) {
|
|
70
|
+
if (((_a = this.steps[index]) === null || _a === void 0 ? void 0 : _a.complete) || ((_b = this.steps[index]) === null || _b === void 0 ? void 0 : _b.disable)) {
|
|
71
|
+
this.navigateToIndex(index + (direction === 'forward' ? 1 : -1), direction);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
this.currentStep = index;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
render() {
|
|
79
|
+
return (index.h(index.Host, null, index.h("div", { class: "steps" }, this.steps.map((step, index$1) => (index.h(HorizontalStep, { step: step, passed: index$1 <= this.internalCurrentStep, checkOnComplete: this.checkOnComplete, complete: this.isComplete(step, index$1), active: index$1 === this.internalCurrentStep, first: index$1 === 0, disable: this.isDisable(step, index$1), onClick: step => this.wcsHorizontalStepClick.emit({ step, index: index$1 }) })))), this.renderLabels()));
|
|
80
|
+
}
|
|
81
|
+
isComplete(step, index) {
|
|
82
|
+
return index <= this.internalCurrentStep || step.complete;
|
|
83
|
+
}
|
|
84
|
+
renderLabels() {
|
|
85
|
+
if (this.steps.map(s => s.text).every(s => !s)) {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
return index.h("div", { class: "label-container" }, this.steps.map((step, index$1) => (index.h("div", { "data-first": index$1 === 0, "data-current": index$1 === this.internalCurrentStep && !step.disable, "data-disable": this.isDisable(step, index$1), "data-last": index$1 === this.steps.length - 1 }, index.h("span", null, step.text)))));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
isDisable(step, index) {
|
|
93
|
+
return step.disable || (this.mode === 'linear' && (!this.isNextPossibleStep(index) && this.internalCurrentStep < index));
|
|
94
|
+
}
|
|
95
|
+
isNextPossibleStep(index) {
|
|
96
|
+
var _a;
|
|
97
|
+
if (index === 0)
|
|
98
|
+
return true;
|
|
99
|
+
if (((_a = this.steps[index - 1]) === null || _a === void 0 ? void 0 : _a.disable) || this.previousStepIsCompleteAndNotActive(index))
|
|
100
|
+
return this.isNextPossibleStep(index - 1);
|
|
101
|
+
return this.internalCurrentStep === index - 1;
|
|
102
|
+
}
|
|
103
|
+
previousStepIsCompleteAndNotActive(index) {
|
|
104
|
+
var _a;
|
|
105
|
+
return ((_a = this.steps[index - 1]) === null || _a === void 0 ? void 0 : _a.complete) && index - 1 !== this.internalCurrentStep;
|
|
106
|
+
}
|
|
107
|
+
get el() { return index.getElement(this); }
|
|
108
|
+
static get watchers() { return {
|
|
109
|
+
"currentStep": ["onCurrentStepChange"]
|
|
110
|
+
}; }
|
|
111
|
+
};
|
|
112
|
+
HorizontalStepper.style = horizontalStepperCss;
|
|
113
|
+
|
|
114
|
+
exports.wcs_horizontal_stepper = HorizontalStepper;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-3cb9d725.js');
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
let Icon = class {
|
|
8
8
|
constructor(hostRef) {
|
|
9
9
|
index.registerInstance(this, hostRef);
|
|
10
10
|
}
|