@dso-toolkit/core 51.2.1 → 51.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/annotation.service-e980f478.js +21 -0
- package/dist/cjs/dso-accordion.cjs.entry.js +2 -192
- package/dist/cjs/dso-annotation-button.cjs.entry.js +25 -0
- package/dist/cjs/dso-annotation-output.cjs.entry.js +35 -0
- package/dist/cjs/dso-badge.cjs.entry.js +1 -1
- package/dist/cjs/dso-card.cjs.entry.js +5 -3
- package/dist/cjs/dso-expandable-heading.cjs.entry.js +47 -0
- package/dist/cjs/dso-expandable.cjs.entry.js +20 -0
- package/dist/cjs/dso-image-overlay.cjs.entry.js +1 -2
- package/dist/cjs/dso-label.cjs.entry.js +2 -2
- package/dist/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/cjs/index-71b733b1.js +196 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/annotation-button/annotation-button.css +3 -0
- package/dist/collection/components/annotation-button/annotation-button.js +45 -0
- package/dist/collection/components/annotation-output/annotation-output.css +82 -0
- package/dist/collection/components/annotation-output/annotation-output.interfaces.js +1 -0
- package/dist/collection/components/annotation-output/annotation-output.js +126 -0
- package/dist/collection/components/badge/badge.css +5 -0
- package/dist/collection/components/badge/badge.js +2 -2
- package/dist/collection/components/card/card.css +0 -1
- package/dist/collection/components/card/card.js +22 -2
- package/dist/collection/components/expandable/expandable.css +24 -0
- package/dist/collection/components/expandable/expandable.js +42 -0
- package/dist/collection/components/expandable-heading/expandable-heading.css +145 -0
- package/dist/collection/components/expandable-heading/expandable-heading.interfaces.js +1 -0
- package/dist/collection/components/expandable-heading/expandable-heading.js +117 -0
- package/dist/collection/components/expandable-heading/heading.js +16 -0
- package/dist/collection/components/image-overlay/image-overlay.js +1 -3
- package/dist/collection/components/label/label.css +9 -8
- package/dist/collection/components/label/label.js +3 -3
- package/dist/collection/index.js +2 -0
- package/dist/collection/services/annotation.service.js +16 -0
- package/dist/components/annotation.service.js +19 -0
- package/dist/components/dso-accordion-section.js +1 -1
- package/dist/components/dso-accordion.js +2 -192
- package/dist/components/dso-annotation-button.d.ts +11 -0
- package/dist/components/dso-annotation-button.js +45 -0
- package/dist/components/dso-annotation-output.d.ts +11 -0
- package/dist/components/dso-annotation-output.js +69 -0
- package/dist/components/dso-autosuggest.js +1 -1
- package/dist/components/dso-badge.js +1 -1
- package/dist/components/dso-card.js +7 -4
- package/dist/components/dso-expandable-heading.d.ts +11 -0
- package/dist/components/dso-expandable-heading.js +77 -0
- package/dist/components/dso-expandable.d.ts +11 -0
- package/dist/components/dso-expandable.js +6 -0
- package/dist/components/dso-header.js +1 -1
- package/dist/components/dso-image-overlay.js +2 -4
- package/dist/components/dso-label.js +2 -2
- package/dist/components/dso-table.js +1 -1
- package/dist/components/expandable.js +33 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +4 -0
- package/dist/components/index2.js +185 -61
- package/dist/components/index3.js +70 -0
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/p-09424a1d.entry.js +1 -0
- package/dist/dso-toolkit/{p-a9baa631.entry.js → p-0af9bfb1.entry.js} +1 -1
- package/dist/dso-toolkit/{p-0e5315a3.entry.js → p-0bc8885e.entry.js} +1 -1
- package/dist/dso-toolkit/{p-ce475f06.entry.js → p-0ca60778.entry.js} +1 -1
- package/dist/dso-toolkit/{p-746dc38a.entry.js → p-0fce0861.entry.js} +1 -1
- package/dist/dso-toolkit/{p-04ffcc93.entry.js → p-1854d6ed.entry.js} +1 -1
- package/dist/dso-toolkit/{p-a8cb2eae.entry.js → p-1aef13ee.entry.js} +1 -1
- package/dist/dso-toolkit/{p-19323600.entry.js → p-1cb94d7d.entry.js} +1 -1
- package/dist/dso-toolkit/{p-abbcbe6a.entry.js → p-1f0672f2.entry.js} +1 -1
- package/dist/dso-toolkit/{p-c846d208.entry.js → p-22f9240a.entry.js} +1 -1
- package/dist/dso-toolkit/p-2af58b20.entry.js +1 -0
- package/dist/dso-toolkit/{p-427f6d90.entry.js → p-3914ad70.entry.js} +1 -1
- package/dist/dso-toolkit/{p-67c4987c.entry.js → p-43f3d736.entry.js} +1 -1
- package/dist/dso-toolkit/p-452c7fbb.entry.js +1 -0
- package/dist/dso-toolkit/{p-3b8cbd05.entry.js → p-494fe8e5.entry.js} +1 -1
- package/dist/dso-toolkit/p-4b8535b7.js +1 -0
- package/dist/dso-toolkit/{p-ff72ee4c.entry.js → p-588bc4d7.entry.js} +1 -1
- package/dist/dso-toolkit/{p-c7ec6e6e.entry.js → p-5b7c0fa5.entry.js} +1 -1
- package/dist/dso-toolkit/p-67df25a7.entry.js +1 -0
- package/dist/dso-toolkit/p-6cdc1acd.entry.js +1 -0
- package/dist/dso-toolkit/{p-11176cb8.entry.js → p-82465cdc.entry.js} +1 -1
- package/dist/dso-toolkit/p-89b97fce.js +1 -0
- package/dist/dso-toolkit/{p-8aa39e7f.entry.js → p-8de85ae7.entry.js} +1 -1
- package/dist/dso-toolkit/{p-8e9f6355.entry.js → p-96efc763.entry.js} +1 -1
- package/dist/dso-toolkit/{p-8f35c8f8.js → p-98fd1658.js} +1 -1
- package/dist/dso-toolkit/p-9b07b034.entry.js +1 -0
- package/dist/dso-toolkit/p-ad0b38cf.entry.js +1 -0
- package/dist/dso-toolkit/{p-06b4f78d.entry.js → p-b337f001.entry.js} +1 -1
- package/dist/dso-toolkit/{p-6080bb9e.entry.js → p-ba0da696.entry.js} +1 -1
- package/dist/dso-toolkit/{p-520a2cdd.entry.js → p-c16ce11e.entry.js} +1 -1
- package/dist/dso-toolkit/p-c4c309b5.entry.js +1 -0
- package/dist/dso-toolkit/{p-655eff47.entry.js → p-c54ad578.entry.js} +1 -1
- package/dist/dso-toolkit/{p-35687d62.entry.js → p-d4772fb0.entry.js} +1 -1
- package/dist/dso-toolkit/{p-2fa96ac0.entry.js → p-d6ea8670.entry.js} +1 -1
- package/dist/dso-toolkit/{p-ec25868b.entry.js → p-d987ef37.entry.js} +1 -1
- package/dist/dso-toolkit/{p-92ad1cdb.entry.js → p-e00a3019.entry.js} +1 -1
- package/dist/dso-toolkit/{p-ec4501bb.entry.js → p-e4f667b3.entry.js} +1 -1
- package/dist/dso-toolkit/p-ee1acb32.entry.js +1 -0
- package/dist/dso-toolkit/{p-55142124.entry.js → p-efdf5c91.entry.js} +1 -1
- package/dist/dso-toolkit/p-f3f0d6c9.entry.js +1 -0
- package/dist/dso-toolkit/{p-76a1428a.entry.js → p-f8a08ba1.entry.js} +1 -1
- package/dist/dso-toolkit/{p-c2157b55.entry.js → p-fbb20550.entry.js} +1 -1
- package/dist/esm/annotation.service-d0add3fc.js +19 -0
- package/dist/esm/dso-accordion-section.entry.js +1 -1
- package/dist/esm/dso-accordion.entry.js +2 -192
- package/dist/esm/dso-alert.entry.js +1 -1
- package/dist/esm/dso-annotation-button.entry.js +21 -0
- package/dist/esm/dso-annotation-output.entry.js +31 -0
- package/dist/esm/dso-attachments-counter.entry.js +1 -1
- package/dist/esm/dso-autosuggest.entry.js +1 -1
- package/dist/esm/dso-badge.entry.js +2 -2
- package/dist/esm/dso-banner.entry.js +1 -1
- package/dist/esm/dso-card-container.entry.js +1 -1
- package/dist/esm/dso-card.entry.js +6 -4
- package/dist/esm/dso-date-picker.entry.js +1 -1
- package/dist/esm/dso-dropdown-menu.entry.js +1 -1
- package/dist/esm/dso-expandable-heading.entry.js +43 -0
- package/dist/esm/dso-expandable.entry.js +16 -0
- package/dist/esm/dso-header.entry.js +1 -1
- package/dist/esm/dso-helpcenter-panel.entry.js +1 -1
- package/dist/esm/dso-highlight-box.entry.js +1 -1
- package/dist/esm/dso-icon.entry.js +1 -1
- package/dist/esm/dso-image-overlay.entry.js +2 -3
- package/dist/esm/dso-info-button.entry.js +1 -1
- package/dist/esm/dso-info_2.entry.js +1 -1
- package/dist/esm/dso-label.entry.js +3 -3
- package/dist/esm/dso-list-button.entry.js +1 -1
- package/dist/esm/dso-map-base-layers.entry.js +1 -1
- package/dist/esm/dso-map-controls.entry.js +1 -1
- package/dist/esm/dso-map-overlays.entry.js +1 -1
- package/dist/esm/dso-modal.entry.js +1 -1
- package/dist/esm/dso-ozon-content.entry.js +1 -1
- package/dist/esm/dso-pagination.entry.js +1 -1
- package/dist/esm/dso-progress-bar.entry.js +1 -1
- package/dist/esm/dso-progress-indicator.entry.js +1 -1
- package/dist/esm/dso-responsive-element.entry.js +1 -1
- package/dist/esm/dso-slide-toggle.entry.js +1 -1
- package/dist/esm/dso-table.entry.js +1 -1
- package/dist/esm/dso-toggletip.entry.js +1 -1
- package/dist/esm/dso-toolkit.js +2 -2
- package/dist/esm/dso-tooltip.entry.js +1 -1
- package/dist/esm/dso-tree-view.entry.js +1 -1
- package/dist/esm/dso-viewer-grid.entry.js +1 -1
- package/dist/esm/{index-1a4dda48.js → index-ac5a22a3.js} +1 -1
- package/dist/esm/index-d6ffb688.js +194 -0
- package/dist/esm/loader.js +2 -2
- package/dist/types/components/annotation-button/annotation-button.d.ts +7 -0
- package/dist/types/components/annotation-output/annotation-output.d.ts +12 -0
- package/dist/types/components/annotation-output/annotation-output.interfaces.d.ts +4 -0
- package/dist/types/components/badge/badge.d.ts +1 -1
- package/dist/types/components/card/card.d.ts +1 -0
- package/dist/types/components/expandable/expandable.d.ts +4 -0
- package/dist/types/components/expandable-heading/expandable-heading.d.ts +11 -0
- package/dist/types/components/expandable-heading/expandable-heading.interfaces.d.ts +5 -0
- package/dist/types/components/expandable-heading/heading.d.ts +9 -0
- package/dist/types/components/image-overlay/image-overlay.d.ts +0 -1
- package/dist/types/components/label/label.d.ts +1 -1
- package/dist/types/components.d.ts +97 -4
- package/dist/types/index.d.ts +2 -0
- package/dist/types/services/annotation.service.d.ts +10 -0
- package/package.json +2 -2
- package/dist/dso-toolkit/p-36cd87c4.entry.js +0 -1
- package/dist/dso-toolkit/p-46acc09f.entry.js +0 -1
- package/dist/dso-toolkit/p-6bd8515a.entry.js +0 -1
- package/dist/dso-toolkit/p-78ee23c5.entry.js +0 -1
- package/dist/dso-toolkit/p-9287b2f2.entry.js +0 -1
- package/dist/dso-toolkit/p-d7b2adc3.entry.js +0 -1
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-ecec64a0.js');
|
|
4
|
+
|
|
5
|
+
const appendToMap = (map, propName, value) => {
|
|
6
|
+
const items = map.get(propName);
|
|
7
|
+
if (!items) {
|
|
8
|
+
map.set(propName, [value]);
|
|
9
|
+
}
|
|
10
|
+
else if (!items.includes(value)) {
|
|
11
|
+
items.push(value);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
const debounce = (fn, ms) => {
|
|
15
|
+
let timeoutId;
|
|
16
|
+
return (...args) => {
|
|
17
|
+
if (timeoutId) {
|
|
18
|
+
clearTimeout(timeoutId);
|
|
19
|
+
}
|
|
20
|
+
timeoutId = setTimeout(() => {
|
|
21
|
+
timeoutId = 0;
|
|
22
|
+
fn(...args);
|
|
23
|
+
}, ms);
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Check if a possible element isConnected.
|
|
29
|
+
* The property might not be there, so we check for it.
|
|
30
|
+
*
|
|
31
|
+
* We want it to return true if isConnected is not a property,
|
|
32
|
+
* otherwise we would remove these elements and would not update.
|
|
33
|
+
*
|
|
34
|
+
* Better leak in Edge than to be useless.
|
|
35
|
+
*/
|
|
36
|
+
const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
|
|
37
|
+
const cleanupElements = debounce((map) => {
|
|
38
|
+
for (let key of map.keys()) {
|
|
39
|
+
map.set(key, map.get(key).filter(isConnected));
|
|
40
|
+
}
|
|
41
|
+
}, 2000);
|
|
42
|
+
const stencilSubscription = () => {
|
|
43
|
+
if (typeof index.getRenderingRef !== 'function') {
|
|
44
|
+
// If we are not in a stencil project, we do nothing.
|
|
45
|
+
// This function is not really exported by @stencil/core.
|
|
46
|
+
return {};
|
|
47
|
+
}
|
|
48
|
+
const elmsToUpdate = new Map();
|
|
49
|
+
return {
|
|
50
|
+
dispose: () => elmsToUpdate.clear(),
|
|
51
|
+
get: (propName) => {
|
|
52
|
+
const elm = index.getRenderingRef();
|
|
53
|
+
if (elm) {
|
|
54
|
+
appendToMap(elmsToUpdate, propName, elm);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
set: (propName) => {
|
|
58
|
+
const elements = elmsToUpdate.get(propName);
|
|
59
|
+
if (elements) {
|
|
60
|
+
elmsToUpdate.set(propName, elements.filter(index.forceUpdate));
|
|
61
|
+
}
|
|
62
|
+
cleanupElements(elmsToUpdate);
|
|
63
|
+
},
|
|
64
|
+
reset: () => {
|
|
65
|
+
elmsToUpdate.forEach((elms) => elms.forEach(index.forceUpdate));
|
|
66
|
+
cleanupElements(elmsToUpdate);
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const unwrap = (val) => (typeof val === 'function' ? val() : val);
|
|
72
|
+
const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
|
|
73
|
+
const unwrappedState = unwrap(defaultState);
|
|
74
|
+
let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));
|
|
75
|
+
const handlers = {
|
|
76
|
+
dispose: [],
|
|
77
|
+
get: [],
|
|
78
|
+
set: [],
|
|
79
|
+
reset: [],
|
|
80
|
+
};
|
|
81
|
+
const reset = () => {
|
|
82
|
+
var _a;
|
|
83
|
+
// When resetting the state, the default state may be a function - unwrap it to invoke it.
|
|
84
|
+
// otherwise, the state won't be properly reset
|
|
85
|
+
states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));
|
|
86
|
+
handlers.reset.forEach((cb) => cb());
|
|
87
|
+
};
|
|
88
|
+
const dispose = () => {
|
|
89
|
+
// Call first dispose as resetting the state would
|
|
90
|
+
// cause less updates ;)
|
|
91
|
+
handlers.dispose.forEach((cb) => cb());
|
|
92
|
+
reset();
|
|
93
|
+
};
|
|
94
|
+
const get = (propName) => {
|
|
95
|
+
handlers.get.forEach((cb) => cb(propName));
|
|
96
|
+
return states.get(propName);
|
|
97
|
+
};
|
|
98
|
+
const set = (propName, value) => {
|
|
99
|
+
const oldValue = states.get(propName);
|
|
100
|
+
if (shouldUpdate(value, oldValue, propName)) {
|
|
101
|
+
states.set(propName, value);
|
|
102
|
+
handlers.set.forEach((cb) => cb(propName, value, oldValue));
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
const state = (typeof Proxy === 'undefined'
|
|
106
|
+
? {}
|
|
107
|
+
: new Proxy(unwrappedState, {
|
|
108
|
+
get(_, propName) {
|
|
109
|
+
return get(propName);
|
|
110
|
+
},
|
|
111
|
+
ownKeys(_) {
|
|
112
|
+
return Array.from(states.keys());
|
|
113
|
+
},
|
|
114
|
+
getOwnPropertyDescriptor() {
|
|
115
|
+
return {
|
|
116
|
+
enumerable: true,
|
|
117
|
+
configurable: true,
|
|
118
|
+
};
|
|
119
|
+
},
|
|
120
|
+
has(_, propName) {
|
|
121
|
+
return states.has(propName);
|
|
122
|
+
},
|
|
123
|
+
set(_, propName, value) {
|
|
124
|
+
set(propName, value);
|
|
125
|
+
return true;
|
|
126
|
+
},
|
|
127
|
+
}));
|
|
128
|
+
const on = (eventName, callback) => {
|
|
129
|
+
handlers[eventName].push(callback);
|
|
130
|
+
return () => {
|
|
131
|
+
removeFromArray(handlers[eventName], callback);
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
const onChange = (propName, cb) => {
|
|
135
|
+
const unSet = on('set', (key, newValue) => {
|
|
136
|
+
if (key === propName) {
|
|
137
|
+
cb(newValue);
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
// We need to unwrap the defaultState because it might be a function.
|
|
141
|
+
// Otherwise we might not be sending the right reset value.
|
|
142
|
+
const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));
|
|
143
|
+
return () => {
|
|
144
|
+
unSet();
|
|
145
|
+
unReset();
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
const use = (...subscriptions) => {
|
|
149
|
+
const unsubs = subscriptions.reduce((unsubs, subscription) => {
|
|
150
|
+
if (subscription.set) {
|
|
151
|
+
unsubs.push(on('set', subscription.set));
|
|
152
|
+
}
|
|
153
|
+
if (subscription.get) {
|
|
154
|
+
unsubs.push(on('get', subscription.get));
|
|
155
|
+
}
|
|
156
|
+
if (subscription.reset) {
|
|
157
|
+
unsubs.push(on('reset', subscription.reset));
|
|
158
|
+
}
|
|
159
|
+
if (subscription.dispose) {
|
|
160
|
+
unsubs.push(on('dispose', subscription.dispose));
|
|
161
|
+
}
|
|
162
|
+
return unsubs;
|
|
163
|
+
}, []);
|
|
164
|
+
return () => unsubs.forEach((unsub) => unsub());
|
|
165
|
+
};
|
|
166
|
+
const forceUpdate = (key) => {
|
|
167
|
+
const oldValue = states.get(key);
|
|
168
|
+
handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
|
|
169
|
+
};
|
|
170
|
+
return {
|
|
171
|
+
state,
|
|
172
|
+
get,
|
|
173
|
+
set,
|
|
174
|
+
on,
|
|
175
|
+
onChange,
|
|
176
|
+
use,
|
|
177
|
+
dispose,
|
|
178
|
+
reset,
|
|
179
|
+
forceUpdate,
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
const removeFromArray = (array, item) => {
|
|
183
|
+
const index = array.indexOf(item);
|
|
184
|
+
if (index >= 0) {
|
|
185
|
+
array[index] = array[array.length - 1];
|
|
186
|
+
array.length--;
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
const createStore = (defaultState, shouldUpdate) => {
|
|
191
|
+
const map = createObservableMap(defaultState, shouldUpdate);
|
|
192
|
+
map.use(stencilSubscription());
|
|
193
|
+
return map;
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
exports.createStore = createStore;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["dso-icon.cjs",[[1,"dso-icon",{"icon":[1]}]]],["dso-map-base-layers.cjs",[[1,"dso-map-base-layers",{"group":[1],"baseLayers":[16]}]]],["dso-map-overlays.cjs",[[1,"dso-map-overlays",{"group":[1],"overlays":[16]}]]],["dso-toggletip.cjs",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-header.cjs",[[6,"dso-header",{"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"authStatus":[1,"auth-status"],"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32]}]]],["dso-label.cjs",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"truncate":[4],"removeHover":[32],"removeFocus":[32],"textHover":[32],"textFocus":[32],"truncatedContent":[32],"labelText":[32]}]]],["dso-pagination.cjs",[[1,"dso-pagination",{"totalPages":[2,"total-pages"],"currentPage":[2,"current-page"],"formatHref":[16],"availablePositions":[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["dso-tree-view.cjs",[[1,"dso-tree-view",{"collection":[16],"focusItem":[64]}]]],["dso-accordion-section.cjs",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"heading":[1],"handleUrl":[1,"handle-url"],"state":[1],"attachmentCount":[2,"attachment-count"],"icon":[1],"status":[1],"open":[1540],"hasNestedSection":[32],"toggleSection":[64],"scrollSectionIntoView":[64]}]]],["dso-alert.cjs",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-attachments-counter.cjs",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest.cjs",[[6,"dso-autosuggest",{"suggestions":[16],"loading":[4],"loadingLabel":[1,"loading-label"],"loadingDelayed":[2,"loading-delayed"],"notFoundLabel":[1,"not-found-label"],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]]]]],["dso-date-picker.cjs",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"visible":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel.cjs",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]]]]],["dso-image-overlay.cjs",[[1,"dso-image-overlay",{"active":[32],"
|
|
17
|
+
return index.bootstrapLazy([["dso-icon.cjs",[[1,"dso-icon",{"icon":[1]}]]],["dso-map-base-layers.cjs",[[1,"dso-map-base-layers",{"group":[1],"baseLayers":[16]}]]],["dso-map-overlays.cjs",[[1,"dso-map-overlays",{"group":[1],"overlays":[16]}]]],["dso-annotation-output.cjs",[[4,"dso-annotation-output",{"identifier":[1],"annotationPrefix":[1,"annotation-prefix"],"toggleAnnotation":[64]}]]],["dso-toggletip.cjs",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-expandable-heading.cjs",[[1,"dso-expandable-heading",{"open":[4],"heading":[1],"color":[1]}]]],["dso-header.cjs",[[6,"dso-header",{"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"authStatus":[1,"auth-status"],"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32]}]]],["dso-label.cjs",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"truncate":[4],"removeHover":[32],"removeFocus":[32],"textHover":[32],"textFocus":[32],"truncatedContent":[32],"labelText":[32]}]]],["dso-pagination.cjs",[[1,"dso-pagination",{"totalPages":[2,"total-pages"],"currentPage":[2,"current-page"],"formatHref":[16],"availablePositions":[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["dso-tree-view.cjs",[[1,"dso-tree-view",{"collection":[16],"focusItem":[64]}]]],["dso-accordion-section.cjs",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"heading":[1],"handleUrl":[1,"handle-url"],"state":[1],"attachmentCount":[2,"attachment-count"],"icon":[1],"status":[1],"open":[1540],"hasNestedSection":[32],"toggleSection":[64],"scrollSectionIntoView":[64]}]]],["dso-alert.cjs",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-annotation-button.cjs",[[0,"dso-annotation-button",{"identifier":[1]}]]],["dso-attachments-counter.cjs",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest.cjs",[[6,"dso-autosuggest",{"suggestions":[16],"loading":[4],"loadingLabel":[1,"loading-label"],"loadingDelayed":[2,"loading-delayed"],"notFoundLabel":[1,"not-found-label"],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]]]]],["dso-date-picker.cjs",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"visible":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel.cjs",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]]]]],["dso-image-overlay.cjs",[[1,"dso-image-overlay",{"active":[32],"zoomable":[32]},[[2,"load","loadListener"]]]]],["dso-list-button.cjs",[[1,"dso-list-button",{"label":[1],"sublabel":[1],"subcontent":[1],"count":[2],"min":[8],"max":[8],"checked":[516],"disabled":[516],"manualInputWrapperElement":[32],"manualCount":[32]}]]],["dso-map-controls.cjs",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32]}]]],["dso-modal.cjs",[[1,"dso-modal",{"modalTitle":[1,"modal-title"],"role":[1],"showCloseButton":[4,"show-close-button"],"initialFocus":[1,"initial-focus"],"ariaId":[32],"hasFooter":[32]}]]],["dso-table.cjs",[[1,"dso-table",{"noModal":[516,"no-modal"],"isResponsive":[516,"is-responsive"],"modalActive":[32],"placeholderHeight":[32]}]]],["dso-viewer-grid.cjs",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"initialMainSize":[1,"initial-main-size"],"mainSize":[32]}]]],["dso-accordion.cjs",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"allowMultipleOpen":[516,"allow-multiple-open"],"getState":[64],"toggleSection":[64],"animationEnd":[64],"closeOpenSections":[64]}]]],["dso-badge.cjs",[[1,"dso-badge",{"status":[1]}]]],["dso-banner.cjs",[[1,"dso-banner",{"status":[513]}]]],["dso-card.cjs",[[1,"dso-card",{"isSelectable":[516,"is-selectable"],"hasImage":[516,"has-image"],"clickable":[4]}]]],["dso-card-container.cjs",[[1,"dso-card-container",{"mode":[513]}]]],["dso-highlight-box.cjs",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content.cjs",[[6,"dso-ozon-content",{"content":[1],"inline":[516],"deleted":[516],"interactive":[520],"state":[32]}]]],["dso-progress-bar.cjs",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-slide-toggle.cjs",[[4,"dso-slide-toggle",{"checked":[4],"disabled":[4],"accessibleLabel":[1,"accessible-label"],"labelledbyId":[1,"labelledby-id"],"identifier":[1],"hasVisibleLabel":[32]}]]],["dso-dropdown-menu.cjs",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4]}]]],["dso-expandable.cjs",[[1,"dso-expandable",{"open":[516]}]]],["dso-progress-indicator.cjs",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-responsive-element.cjs",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-tooltip.cjs",[[1,"dso-tooltip",{"descriptive":[516],"position":[1],"strategy":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]},[[0,"click","listenClick"]]]]],["dso-info-button.cjs",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1],"hover":[32],"setFocus":[64]}]]],["dso-info_2.cjs",[[6,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32],"toggleInfo":[64]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
"./components/accordion/accordion.js",
|
|
5
5
|
"./components/accordion/components/accordion-section.js",
|
|
6
6
|
"./components/alert/alert.js",
|
|
7
|
+
"./components/annotation-button/annotation-button.js",
|
|
8
|
+
"./components/annotation-output/annotation-output.js",
|
|
7
9
|
"./components/attachments-counter/attachments-counter.js",
|
|
8
10
|
"./components/autosuggest/autosuggest.js",
|
|
9
11
|
"./components/badge/badge.js",
|
|
@@ -12,6 +14,8 @@
|
|
|
12
14
|
"./components/card-container/card-container.js",
|
|
13
15
|
"./components/date-picker/date-picker.js",
|
|
14
16
|
"./components/dropdown-menu/dropdown-menu.js",
|
|
17
|
+
"./components/expandable/expandable.js",
|
|
18
|
+
"./components/expandable-heading/expandable-heading.js",
|
|
15
19
|
"./components/header/header.js",
|
|
16
20
|
"./components/helpcenter-panel/helpcenter-panel.js",
|
|
17
21
|
"./components/highlight-box/highlight-box.js",
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { AnnotationService } from "../../services/annotation.service";
|
|
3
|
+
export class AnnotationButton {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.identifier = undefined;
|
|
6
|
+
}
|
|
7
|
+
componentDidLoad() {
|
|
8
|
+
this.annotationOutput = document.querySelector(`dso-annotation-output[identifier='${this.identifier}']`);
|
|
9
|
+
}
|
|
10
|
+
render() {
|
|
11
|
+
return (h("button", { type: "button", class: "dso-tertiary", "aria-controls": this.identifier, "aria-expanded": AnnotationService.state[this.identifier] ? "true" : "false", onClick: (e) => { var _a; return (_a = this.annotationOutput) === null || _a === void 0 ? void 0 : _a.toggleAnnotation(e, this.identifier); } }, h("dso-icon", { icon: "label" }), h("span", { class: "sr-only" }, "Toelichting bekijken")));
|
|
12
|
+
}
|
|
13
|
+
static get is() { return "dso-annotation-button"; }
|
|
14
|
+
static get originalStyleUrls() {
|
|
15
|
+
return {
|
|
16
|
+
"$": ["annotation-button.scss"]
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
static get styleUrls() {
|
|
20
|
+
return {
|
|
21
|
+
"$": ["annotation-button.css"]
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
static get properties() {
|
|
25
|
+
return {
|
|
26
|
+
"identifier": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"mutable": false,
|
|
29
|
+
"complexType": {
|
|
30
|
+
"original": "string",
|
|
31
|
+
"resolved": "string",
|
|
32
|
+
"references": {}
|
|
33
|
+
},
|
|
34
|
+
"required": true,
|
|
35
|
+
"optional": false,
|
|
36
|
+
"docs": {
|
|
37
|
+
"tags": [],
|
|
38
|
+
"text": ""
|
|
39
|
+
},
|
|
40
|
+
"attribute": "identifier",
|
|
41
|
+
"reflect": false
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
*,
|
|
2
|
+
*::after,
|
|
3
|
+
*::before {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
dso-annotation-output {
|
|
8
|
+
display: block;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.sr-only {
|
|
12
|
+
position: absolute;
|
|
13
|
+
width: 1px;
|
|
14
|
+
height: 1px;
|
|
15
|
+
padding: 0;
|
|
16
|
+
margin: -1px;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
clip: rect(0, 0, 0, 0);
|
|
19
|
+
border: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.dso-annotation-header {
|
|
23
|
+
align-items: center;
|
|
24
|
+
background-color: #f2f2f2;
|
|
25
|
+
clear: both;
|
|
26
|
+
display: flex;
|
|
27
|
+
margin-bottom: 2px;
|
|
28
|
+
margin-top: 8px;
|
|
29
|
+
padding-left: 16px;
|
|
30
|
+
padding-right: 8px;
|
|
31
|
+
padding-top: 8px;
|
|
32
|
+
padding-bottom: 8px;
|
|
33
|
+
}
|
|
34
|
+
.dso-annotation-header > *[slot=title] {
|
|
35
|
+
color: #000;
|
|
36
|
+
font-size: 1.25rem;
|
|
37
|
+
margin-bottom: 0;
|
|
38
|
+
margin-top: 0;
|
|
39
|
+
}
|
|
40
|
+
.dso-annotation-header > *:nth-child(2) {
|
|
41
|
+
margin-left: auto;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
dso-responsive-element[small] .dso-annotation-header,
|
|
45
|
+
dso-responsive-element[medium] .dso-annotation-header {
|
|
46
|
+
display: grid;
|
|
47
|
+
row-gap: 8px;
|
|
48
|
+
}
|
|
49
|
+
dso-responsive-element[small] .dso-annotation-header *[slot=title],
|
|
50
|
+
dso-responsive-element[medium] .dso-annotation-header *[slot=title] {
|
|
51
|
+
grid-row: 1;
|
|
52
|
+
grid-column: 1;
|
|
53
|
+
}
|
|
54
|
+
dso-responsive-element[small] .dso-annotation-header *[slot=addons],
|
|
55
|
+
dso-responsive-element[medium] .dso-annotation-header *[slot=addons] {
|
|
56
|
+
grid-row: 2;
|
|
57
|
+
grid-column: 1;
|
|
58
|
+
margin-left: initial;
|
|
59
|
+
}
|
|
60
|
+
dso-responsive-element[small] .dso-annotation-header .dso-annotation-close-button,
|
|
61
|
+
dso-responsive-element[medium] .dso-annotation-header .dso-annotation-close-button {
|
|
62
|
+
grid-row: 1;
|
|
63
|
+
grid-column: 2;
|
|
64
|
+
margin-left: 8px;
|
|
65
|
+
text-align: end;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.dso-annotation-content {
|
|
69
|
+
background-color: #f2f2f2;
|
|
70
|
+
padding-left: 16px;
|
|
71
|
+
padding-right: 8px;
|
|
72
|
+
padding-top: 8px;
|
|
73
|
+
padding-bottom: 8px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.dso-annotation-close-button {
|
|
77
|
+
margin-left: 32px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.dso-annotation-prefix {
|
|
81
|
+
font-style: italic;
|
|
82
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { AnnotationService } from "../../services/annotation.service";
|
|
3
|
+
export class AnnotationOutput {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.identifier = undefined;
|
|
6
|
+
this.annotationPrefix = undefined;
|
|
7
|
+
}
|
|
8
|
+
async toggleAnnotation(e, identifier) {
|
|
9
|
+
AnnotationService.toggle(identifier);
|
|
10
|
+
this.dsoToggle.emit({
|
|
11
|
+
originalEvent: e,
|
|
12
|
+
open: AnnotationService.state[this.identifier],
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
toggleHandler(e) {
|
|
16
|
+
this.toggleAnnotation(e, this.identifier);
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
const expandableProperties = AnnotationService.state[this.identifier] ? { open: true } : {};
|
|
20
|
+
return (h("dso-responsive-element", null, h("dso-expandable", Object.assign({ id: this.identifier }, expandableProperties), this.annotationPrefix && h("span", { class: "dso-annotation-prefix" }, this.annotationPrefix), h("div", { class: "dso-annotation-header" }, h("slot", { name: "title" }), h("slot", { name: "addons" }), h("button", { type: "button", class: "dso-tertiary dso-annotation-close-button", onClick: (e) => this.toggleHandler(e) }, h("dso-icon", { icon: "times" }), h("span", { class: "sr-only" }, "Toelichting sluiten"))), h("div", { class: "dso-annotation-content" }, h("slot", null)))));
|
|
21
|
+
}
|
|
22
|
+
static get is() { return "dso-annotation-output"; }
|
|
23
|
+
static get originalStyleUrls() {
|
|
24
|
+
return {
|
|
25
|
+
"$": ["annotation-output.scss"]
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
static get styleUrls() {
|
|
29
|
+
return {
|
|
30
|
+
"$": ["annotation-output.css"]
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
static get properties() {
|
|
34
|
+
return {
|
|
35
|
+
"identifier": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"mutable": false,
|
|
38
|
+
"complexType": {
|
|
39
|
+
"original": "string",
|
|
40
|
+
"resolved": "string",
|
|
41
|
+
"references": {}
|
|
42
|
+
},
|
|
43
|
+
"required": true,
|
|
44
|
+
"optional": false,
|
|
45
|
+
"docs": {
|
|
46
|
+
"tags": [],
|
|
47
|
+
"text": "The annotation-button that toggles this component should have the same identifier."
|
|
48
|
+
},
|
|
49
|
+
"attribute": "identifier",
|
|
50
|
+
"reflect": false
|
|
51
|
+
},
|
|
52
|
+
"annotationPrefix": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"mutable": false,
|
|
55
|
+
"complexType": {
|
|
56
|
+
"original": "string",
|
|
57
|
+
"resolved": "string | undefined",
|
|
58
|
+
"references": {}
|
|
59
|
+
},
|
|
60
|
+
"required": false,
|
|
61
|
+
"optional": true,
|
|
62
|
+
"docs": {
|
|
63
|
+
"tags": [],
|
|
64
|
+
"text": "This text will be displayed above the annotation-output when opened"
|
|
65
|
+
},
|
|
66
|
+
"attribute": "annotation-prefix",
|
|
67
|
+
"reflect": false
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
static get events() {
|
|
72
|
+
return [{
|
|
73
|
+
"method": "dsoToggle",
|
|
74
|
+
"name": "dsoToggle",
|
|
75
|
+
"bubbles": true,
|
|
76
|
+
"cancelable": true,
|
|
77
|
+
"composed": true,
|
|
78
|
+
"docs": {
|
|
79
|
+
"tags": [],
|
|
80
|
+
"text": ""
|
|
81
|
+
},
|
|
82
|
+
"complexType": {
|
|
83
|
+
"original": "AnnotationToggleEvent",
|
|
84
|
+
"resolved": "AnnotationToggleEvent",
|
|
85
|
+
"references": {
|
|
86
|
+
"AnnotationToggleEvent": {
|
|
87
|
+
"location": "import",
|
|
88
|
+
"path": "./annotation-output.interfaces"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}];
|
|
93
|
+
}
|
|
94
|
+
static get methods() {
|
|
95
|
+
return {
|
|
96
|
+
"toggleAnnotation": {
|
|
97
|
+
"complexType": {
|
|
98
|
+
"signature": "(e: MouseEvent | KeyboardEvent, identifier: string) => Promise<void>",
|
|
99
|
+
"parameters": [{
|
|
100
|
+
"tags": [],
|
|
101
|
+
"text": ""
|
|
102
|
+
}, {
|
|
103
|
+
"tags": [],
|
|
104
|
+
"text": ""
|
|
105
|
+
}],
|
|
106
|
+
"references": {
|
|
107
|
+
"Promise": {
|
|
108
|
+
"location": "global"
|
|
109
|
+
},
|
|
110
|
+
"MouseEvent": {
|
|
111
|
+
"location": "global"
|
|
112
|
+
},
|
|
113
|
+
"KeyboardEvent": {
|
|
114
|
+
"location": "global"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"return": "Promise<void>"
|
|
118
|
+
},
|
|
119
|
+
"docs": {
|
|
120
|
+
"text": "",
|
|
121
|
+
"tags": []
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -25,8 +25,8 @@ export class Badge {
|
|
|
25
25
|
"type": "string",
|
|
26
26
|
"mutable": false,
|
|
27
27
|
"complexType": {
|
|
28
|
-
"original": "\"primary\" | \"success\" | \"info\" | \"warning\" | \"danger\" | \"error\" | \"outline\"",
|
|
29
|
-
"resolved": "\"danger\" | \"error\" | \"info\" | \"outline\" | \"primary\" | \"success\" | \"warning\" | undefined",
|
|
28
|
+
"original": "\"primary\" | \"success\" | \"info\" | \"warning\" | \"danger\" | \"error\" | \"outline\" | \"attention\"",
|
|
29
|
+
"resolved": "\"attention\" | \"danger\" | \"error\" | \"info\" | \"outline\" | \"primary\" | \"success\" | \"warning\" | undefined",
|
|
30
30
|
"references": {}
|
|
31
31
|
},
|
|
32
32
|
"required": false,
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
+
import clsx from "clsx";
|
|
2
3
|
import { isInteractiveElement } from "../../utils/is-interactive-element";
|
|
3
4
|
import { isModifiedEvent } from "../../utils/is-modified-event";
|
|
4
5
|
export class Card {
|
|
5
6
|
constructor() {
|
|
6
7
|
this.isSelectable = false;
|
|
7
8
|
this.hasImage = false;
|
|
9
|
+
this.clickable = true;
|
|
8
10
|
}
|
|
9
11
|
clickEventHandler(e) {
|
|
10
|
-
if (!(e.target instanceof HTMLElement)) {
|
|
12
|
+
if (!(e.target instanceof HTMLElement) || !this.clickable) {
|
|
11
13
|
return;
|
|
12
14
|
}
|
|
13
15
|
let element = e.target;
|
|
@@ -29,7 +31,7 @@ export class Card {
|
|
|
29
31
|
this.hasImage = this.host.querySelector("*[slot = 'image']") !== null;
|
|
30
32
|
}
|
|
31
33
|
render() {
|
|
32
|
-
return (h(Host, { onClick: (e) => this.clickEventHandler(e) }, h("div", { class: "dso-card-selectable", hidden: !this.isSelectable }, h("slot", { name: "selectable" })), h("div", { class: "dso-card-image", hidden: !this.hasImage }, h("slot", { name: "image" })), h("div", { class: "dso-card-heading" }, h("slot", { name: "heading" }), h("slot", { name: "interactions" })), h("div", { class: "dso-card-content" }, h("slot", { name: "content" }))));
|
|
34
|
+
return (h(Host, { class: clsx({ "dso-not-clickable": !this.clickable }), onClick: (e) => this.clickEventHandler(e) }, h("div", { class: "dso-card-selectable", hidden: !this.isSelectable }, h("slot", { name: "selectable" })), h("div", { class: "dso-card-image", hidden: !this.hasImage }, h("slot", { name: "image" })), h("div", { class: "dso-card-heading" }, h("slot", { name: "heading" }), h("slot", { name: "interactions" })), h("div", { class: "dso-card-content" }, h("slot", { name: "content" }))));
|
|
33
35
|
}
|
|
34
36
|
static get is() { return "dso-card"; }
|
|
35
37
|
static get encapsulation() { return "shadow"; }
|
|
@@ -80,6 +82,24 @@ export class Card {
|
|
|
80
82
|
"attribute": "has-image",
|
|
81
83
|
"reflect": true,
|
|
82
84
|
"defaultValue": "false"
|
|
85
|
+
},
|
|
86
|
+
"clickable": {
|
|
87
|
+
"type": "boolean",
|
|
88
|
+
"mutable": false,
|
|
89
|
+
"complexType": {
|
|
90
|
+
"original": "boolean",
|
|
91
|
+
"resolved": "boolean",
|
|
92
|
+
"references": {}
|
|
93
|
+
},
|
|
94
|
+
"required": false,
|
|
95
|
+
"optional": false,
|
|
96
|
+
"docs": {
|
|
97
|
+
"tags": [],
|
|
98
|
+
"text": ""
|
|
99
|
+
},
|
|
100
|
+
"attribute": "clickable",
|
|
101
|
+
"reflect": false,
|
|
102
|
+
"defaultValue": "true"
|
|
83
103
|
}
|
|
84
104
|
};
|
|
85
105
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: none;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
:host([open]) {
|
|
6
|
+
display: block;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
*,
|
|
10
|
+
*::after,
|
|
11
|
+
*::before {
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.sr-only {
|
|
16
|
+
position: absolute;
|
|
17
|
+
width: 1px;
|
|
18
|
+
height: 1px;
|
|
19
|
+
padding: 0;
|
|
20
|
+
margin: -1px;
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
clip: rect(0, 0, 0, 0);
|
|
23
|
+
border: 0;
|
|
24
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class Expandable {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.open = undefined;
|
|
5
|
+
}
|
|
6
|
+
render() {
|
|
7
|
+
return (h(Host, { "aria-hidden": this.open ? "false" : "true" }, h("slot", null)));
|
|
8
|
+
}
|
|
9
|
+
static get is() { return "dso-expandable"; }
|
|
10
|
+
static get encapsulation() { return "shadow"; }
|
|
11
|
+
static get originalStyleUrls() {
|
|
12
|
+
return {
|
|
13
|
+
"$": ["expandable.scss"]
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
static get styleUrls() {
|
|
17
|
+
return {
|
|
18
|
+
"$": ["expandable.css"]
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
static get properties() {
|
|
22
|
+
return {
|
|
23
|
+
"open": {
|
|
24
|
+
"type": "boolean",
|
|
25
|
+
"mutable": false,
|
|
26
|
+
"complexType": {
|
|
27
|
+
"original": "boolean",
|
|
28
|
+
"resolved": "boolean | undefined",
|
|
29
|
+
"references": {}
|
|
30
|
+
},
|
|
31
|
+
"required": false,
|
|
32
|
+
"optional": true,
|
|
33
|
+
"docs": {
|
|
34
|
+
"tags": [],
|
|
35
|
+
"text": ""
|
|
36
|
+
},
|
|
37
|
+
"attribute": "open",
|
|
38
|
+
"reflect": true
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|