wj-elements 0.1.92 → 0.1.94
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/localize.js +10 -5
- package/dist/wje-kanban.js +342 -0
- package/dist/wje-master.js +101 -98
- package/package.json +1 -1
package/dist/localize.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
class LocalizerDefault {
|
|
2
2
|
constructor(element) {
|
|
3
3
|
this.element = element;
|
|
4
|
-
this.lang = this.element.lang || document.documentElement.lang || "
|
|
4
|
+
this.lang = this.element.lang || document.documentElement.lang || "en-gb";
|
|
5
5
|
this.dir = this.element.dir || document.documentElement.dir || "ltr";
|
|
6
6
|
this.setLanguage();
|
|
7
7
|
}
|
|
@@ -21,6 +21,7 @@ class LocalizerDefault {
|
|
|
21
21
|
const langMap = this.languages.get(this.currentLang);
|
|
22
22
|
return langMap ? langMap[key] || key : key;
|
|
23
23
|
}
|
|
24
|
+
// Vyhľadávanie prekladu podľa kľúča a typu čísla
|
|
24
25
|
translatePlural(key, count = 0, type = "cardinal") {
|
|
25
26
|
const plural = new Intl.PluralRules(this.lang, { type });
|
|
26
27
|
if (count != void 0)
|
|
@@ -40,12 +41,16 @@ class LocalizerDefault {
|
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
function registerTranslation(...translation) {
|
|
43
|
-
translation.
|
|
44
|
+
translation.forEach((t) => {
|
|
45
|
+
if (!t.code) {
|
|
46
|
+
console.error("Translation object is missing 'code' property:", t);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
44
49
|
const code = t.code.toLowerCase();
|
|
45
|
-
if (translations.has(code)) {
|
|
46
|
-
translations.set(code, { ...translations.get(code), ...t });
|
|
50
|
+
if (window.translations.has(code)) {
|
|
51
|
+
window.translations.set(code, { ...window.translations.get(code), ...t });
|
|
47
52
|
} else {
|
|
48
|
-
translations.set(code, t);
|
|
53
|
+
window.translations.set(code, t);
|
|
49
54
|
}
|
|
50
55
|
});
|
|
51
56
|
}
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
import WJElement, { event } from "./wje-element.js";
|
|
8
|
+
const styles = "/*\n[ Wj kanban ]\n*/\n\n:host {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n}\n.native {\n height: 100%;\n display: grid;\n grid-auto-flow: column;\n grid-auto-columns: 200px;\n overflow-x: auto;\n gap: 1rem;\n}\n\n.pool {\n /*height: 100%;*\n /*box-sizing: border-box;*/\n /*display: flex;*/\n /*flex-direction: column;*/\n /*gap: 1rem;*/\n display: inline-block;\n width: 200px;\n flex: 0 0 200px;\n vertical-align: top;\n overflow: auto;\n padding: 8px;\n border-radius: 8px;\n /*background: #f8f8f8;*/\n margin-right: 15px;\n margin-bottom: 10px;\n /*box-shadow: 0 0 5px rgba(0,0,0,0.4);*/\n}\n\nh4 {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.card {\n border-radius: 5px;\n background: #fff;\n border: 1px solid #ddd;\n margin-bottom: 5px;\n padding: 8px 10px;\n color: #000\n}\n\n.card:hover {\n opacity: 0.5;\n}\n\n.dragging {\n box-shadow: 0 0 5px rgba(0,0,0,0.1);\n transform: rotate(-2deg);\n}\n\n.card-placeholder {\n display: block;\n height: 34px;\n border: 1px dashed #ddd;\n margin: 3px 0;\n border-radius: 5px;\n}";
|
|
9
|
+
class Kanban extends WJElement {
|
|
10
|
+
/**
|
|
11
|
+
* Creates an instance of InfiniteScroll.
|
|
12
|
+
*
|
|
13
|
+
* @constructor
|
|
14
|
+
* @param {Object} options - The options for the InfiniteScroll.
|
|
15
|
+
*/
|
|
16
|
+
constructor(options = {}) {
|
|
17
|
+
super();
|
|
18
|
+
__publicField(this, "className", "Kanban");
|
|
19
|
+
/**
|
|
20
|
+
* Adds the scroll event listener.
|
|
21
|
+
*/
|
|
22
|
+
__publicField(this, "scrollEvent", () => {
|
|
23
|
+
this.addEventListener("scroll", this.onScroll);
|
|
24
|
+
});
|
|
25
|
+
/**
|
|
26
|
+
* Removes the scroll event listener.
|
|
27
|
+
*/
|
|
28
|
+
__publicField(this, "unScrollEvent", () => {
|
|
29
|
+
this.removeEventListener("scroll", this.onScroll);
|
|
30
|
+
});
|
|
31
|
+
/**
|
|
32
|
+
* Handles the scroll event.
|
|
33
|
+
*
|
|
34
|
+
* @param {Event} e - The event.
|
|
35
|
+
*/
|
|
36
|
+
__publicField(this, "onScroll", (e) => {
|
|
37
|
+
const { scrollTop, scrollHeight, clientHeight } = e.target;
|
|
38
|
+
if (scrollTop + clientHeight >= scrollHeight - 300 && this.currentPage <= this.totalPages && this.isLoading.includes(this.currentPage)) {
|
|
39
|
+
this.currentPage++;
|
|
40
|
+
this.loadPages(this.currentPage);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
__publicField(this, "getPool", (data, poolName) => {
|
|
44
|
+
return data.reduce((acc, item) => {
|
|
45
|
+
const statusName = item.status.name;
|
|
46
|
+
if (!acc[statusName]) {
|
|
47
|
+
acc[statusName] = [];
|
|
48
|
+
}
|
|
49
|
+
acc[statusName].push(item);
|
|
50
|
+
return acc;
|
|
51
|
+
}, {});
|
|
52
|
+
});
|
|
53
|
+
__publicField(this, "htmlPool", (title) => {
|
|
54
|
+
let poolHtml = document.createElement("div");
|
|
55
|
+
poolHtml.classList.add("pool");
|
|
56
|
+
poolHtml.innerHTML = `<h4>${title}</h4>`;
|
|
57
|
+
return poolHtml;
|
|
58
|
+
});
|
|
59
|
+
__publicField(this, "htmlCard", (item) => {
|
|
60
|
+
let card = document.createElement("div");
|
|
61
|
+
card.classList.add("card");
|
|
62
|
+
card.draggable = true;
|
|
63
|
+
card.setAttribute("data-id", item.id);
|
|
64
|
+
card.innerHTML = `<div style="padding: .5rem;">Lorem ipsum dolor ${item.id}</div>`;
|
|
65
|
+
let header = document.createElement("wje-card-header");
|
|
66
|
+
header.innerHTML = `<wje-card-subtitle>${item.user.fullName}</wje-card-subtitle>`;
|
|
67
|
+
let content = document.createElement("wje-card-content");
|
|
68
|
+
content.innerHTML = `Lorem ipsum dolor sit amet ${item.id}`;
|
|
69
|
+
return card;
|
|
70
|
+
});
|
|
71
|
+
this.totalPages = 0;
|
|
72
|
+
this.isLoading = [];
|
|
73
|
+
this._response = {};
|
|
74
|
+
this.iterate = null;
|
|
75
|
+
this._infiniteScrollTemplate = null;
|
|
76
|
+
this.isDragging = false;
|
|
77
|
+
this.UI = {
|
|
78
|
+
elBoard: document.getElementById("board"),
|
|
79
|
+
elTotalCardCount: document.getElementById("totalCards"),
|
|
80
|
+
elCardPlaceholder: null
|
|
81
|
+
};
|
|
82
|
+
String.prototype.interpolate = function(params) {
|
|
83
|
+
let template = this;
|
|
84
|
+
let keys = template.match(/\{{.*?\}}/g);
|
|
85
|
+
if (keys) {
|
|
86
|
+
for (let key of keys) {
|
|
87
|
+
let cleanKey = key.replace("{{", "").replace("}}", "");
|
|
88
|
+
let val = "";
|
|
89
|
+
cleanKey.split(".").forEach((k) => {
|
|
90
|
+
val = val == "" ? params[k] : val[k];
|
|
91
|
+
});
|
|
92
|
+
template = template.replace(key, val);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return template;
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
set infiniteScrollTemplate(value) {
|
|
99
|
+
this._infiniteScrollTemplate = value;
|
|
100
|
+
}
|
|
101
|
+
get infiniteScrollTemplate() {
|
|
102
|
+
return this._infiniteScrollTemplate;
|
|
103
|
+
}
|
|
104
|
+
set response(value) {
|
|
105
|
+
this._response = value;
|
|
106
|
+
}
|
|
107
|
+
get response() {
|
|
108
|
+
return this._response;
|
|
109
|
+
}
|
|
110
|
+
set objectName(value) {
|
|
111
|
+
this.setAttribute("object-name", value);
|
|
112
|
+
}
|
|
113
|
+
get objectName() {
|
|
114
|
+
return this.getAttribute("object-name") || "data";
|
|
115
|
+
}
|
|
116
|
+
set poolName(value) {
|
|
117
|
+
this.setAttribute("pool-name", value);
|
|
118
|
+
}
|
|
119
|
+
get poolName() {
|
|
120
|
+
return this.getAttribute("pool-name") || "status";
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Returns the CSS styles for the component.
|
|
124
|
+
*
|
|
125
|
+
* @static
|
|
126
|
+
* @returns {CSSStyleSheet}
|
|
127
|
+
*/
|
|
128
|
+
static get cssStyleSheet() {
|
|
129
|
+
return styles;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Returns the list of attributes to observe for changes.
|
|
133
|
+
*
|
|
134
|
+
* @static
|
|
135
|
+
* @returns {Array<string>}
|
|
136
|
+
*/
|
|
137
|
+
static get observedAttributes() {
|
|
138
|
+
return [];
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Sets up the attributes for the component.
|
|
142
|
+
*/
|
|
143
|
+
setupAttributes() {
|
|
144
|
+
this.isShadowRoot = "open";
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Prepares the component before drawing.
|
|
148
|
+
*
|
|
149
|
+
* @param {Object} context - The context for drawing.
|
|
150
|
+
* @param {Object} store - The store for drawing.
|
|
151
|
+
* @param {Object} params - The parameters for drawing.
|
|
152
|
+
*/
|
|
153
|
+
async beforeDraw(context, store, params) {
|
|
154
|
+
var _a, _b;
|
|
155
|
+
this.iterate = this.querySelector("[iterate]");
|
|
156
|
+
this.infiniteScrollTemplate = (_a = this.iterate) == null ? void 0 : _a.outerHTML;
|
|
157
|
+
(_b = this.iterate) == null ? void 0 : _b.remove();
|
|
158
|
+
this.setAttribute("style", "height: " + this.height);
|
|
159
|
+
this.response = await this.getPages();
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Draws the component.
|
|
163
|
+
*
|
|
164
|
+
* @param {Object} context - The context for drawing.
|
|
165
|
+
* @param {Object} store - The store for drawing.
|
|
166
|
+
* @param {Object} params - The parameters for drawing.
|
|
167
|
+
* @returns {DocumentFragment}
|
|
168
|
+
*/
|
|
169
|
+
draw(context, store, params) {
|
|
170
|
+
let fragment = document.createDocumentFragment();
|
|
171
|
+
let native = document.createElement("div");
|
|
172
|
+
native.classList.add("native");
|
|
173
|
+
native.setAttribute("part", "native-infinite-scroll");
|
|
174
|
+
let pools = this.getPool(this.response, this.poolName);
|
|
175
|
+
for (const statusName in pools) {
|
|
176
|
+
if (pools.hasOwnProperty(statusName)) {
|
|
177
|
+
let pool = this.htmlPool(statusName);
|
|
178
|
+
native.appendChild(pool);
|
|
179
|
+
const items = pools[statusName];
|
|
180
|
+
for (const item of items) {
|
|
181
|
+
let card = this.htmlCard(item);
|
|
182
|
+
pool.appendChild(card);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
fragment.appendChild(native);
|
|
187
|
+
return fragment;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Called after the component has been drawn.
|
|
191
|
+
*/
|
|
192
|
+
async afterDraw() {
|
|
193
|
+
this.live("dragstart", ".pool .card", (e) => {
|
|
194
|
+
this.isDragging = true;
|
|
195
|
+
e.dataTransfer.clearData();
|
|
196
|
+
e.dataTransfer.setData("text/plain", e.target.dataset.id);
|
|
197
|
+
e.dataTransfer.dropEffect = "copy";
|
|
198
|
+
e.target.classList.add("dragging");
|
|
199
|
+
});
|
|
200
|
+
this.live("dragend", ".pool .card", (e) => {
|
|
201
|
+
e.target.classList.remove("dragging");
|
|
202
|
+
this.UI.elCardPlaceholder && this.UI.elCardPlaceholder.remove();
|
|
203
|
+
this.UI.elCardPlaceholder = null;
|
|
204
|
+
this.isDragging = false;
|
|
205
|
+
});
|
|
206
|
+
this.live("dragover", ".pool, .pool .card, .pool .card-placeholder", (e) => {
|
|
207
|
+
e.preventDefault();
|
|
208
|
+
e.dataTransfer.dropEffect = "move";
|
|
209
|
+
console.log("DRAGOVER:", e.target, e.target.className.indexOf("card"), e.target.className === "pool");
|
|
210
|
+
if (e.target.className === "pool") {
|
|
211
|
+
e.target.appendChild(this.getCardPlaceholder());
|
|
212
|
+
} else if (e.target.className.indexOf("card") !== -1) {
|
|
213
|
+
e.target.parentNode.insertBefore(this.getCardPlaceholder(), e.target);
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
this.live("drop", ".pool, .pool .card-placeholder", (e) => {
|
|
217
|
+
e.preventDefault();
|
|
218
|
+
console.log("DROPPED:", e.target);
|
|
219
|
+
console.log(!this.isDragging);
|
|
220
|
+
if (!this.isDragging)
|
|
221
|
+
return false;
|
|
222
|
+
var todo_id = +e.dataTransfer.getData("text");
|
|
223
|
+
let card = this.context.querySelector('.card[data-id="' + todo_id + '"]');
|
|
224
|
+
if (e.target.className === "pool") {
|
|
225
|
+
console.log("Dropped on List", card);
|
|
226
|
+
e.target.appendChild(card);
|
|
227
|
+
} else {
|
|
228
|
+
console.log("Dropped on Card Placeholder", e.target.parentNode);
|
|
229
|
+
e.target.parentNode.replaceChild(card, e.target);
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Fetches the pages from the server.
|
|
235
|
+
*
|
|
236
|
+
* @param {number} page - The page number.
|
|
237
|
+
* @returns {Promise<Object>} The response from the server.
|
|
238
|
+
*/
|
|
239
|
+
async getPages(page = 0) {
|
|
240
|
+
let hasParams = this.url.includes("?");
|
|
241
|
+
const response = await fetch(`${this.url}${hasParams ? "&" : "?"}page=${page}&size=${this.size}${this == null ? void 0 : this.queryParams}`);
|
|
242
|
+
if (!response.ok) {
|
|
243
|
+
throw new Error(`An error occurred: ${response.status}`);
|
|
244
|
+
}
|
|
245
|
+
return await response.json();
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Hides the loader.
|
|
249
|
+
*/
|
|
250
|
+
hideLoader() {
|
|
251
|
+
var _a;
|
|
252
|
+
(_a = this == null ? void 0 : this.loadingEl) == null ? void 0 : _a.classList.remove("show");
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Shows the loader.
|
|
256
|
+
*/
|
|
257
|
+
showLoader() {
|
|
258
|
+
var _a;
|
|
259
|
+
(_a = this == null ? void 0 : this.loadingEl) == null ? void 0 : _a.classList.add("show");
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Checks if there are more pages to load.
|
|
263
|
+
*
|
|
264
|
+
* @param {number} page - The page number.
|
|
265
|
+
* @returns {boolean} Whether there are more pages to load.
|
|
266
|
+
*/
|
|
267
|
+
hasMorePages(page) {
|
|
268
|
+
return this.totalPages === 0 || page < this.totalPages;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Loads the pages.
|
|
272
|
+
*
|
|
273
|
+
* @param {number} page - The page number.
|
|
274
|
+
*/
|
|
275
|
+
async loadPages(page) {
|
|
276
|
+
this.showLoader();
|
|
277
|
+
try {
|
|
278
|
+
if (this.hasMorePages(page)) {
|
|
279
|
+
let response;
|
|
280
|
+
this.parser = new DOMParser();
|
|
281
|
+
if (typeof this.setCustomData === "function") {
|
|
282
|
+
response = await this.setCustomData(page);
|
|
283
|
+
} else {
|
|
284
|
+
response = await this.getPages(page);
|
|
285
|
+
}
|
|
286
|
+
this.totalPages = response.totalPages;
|
|
287
|
+
this.currentPage = page;
|
|
288
|
+
this.placementObj = this;
|
|
289
|
+
if (this.hasAttribute("placement"))
|
|
290
|
+
this.placementObj = this.querySelector(this.placement);
|
|
291
|
+
event.dispatchCustomEvent(this, "wje-infinite-scroll:load", response);
|
|
292
|
+
this.response = response;
|
|
293
|
+
let pools = this.getPool(response[this.objectName], this.poolName);
|
|
294
|
+
console.log("POOLS:", pools);
|
|
295
|
+
pools.forEach((pool, key) => {
|
|
296
|
+
this.native.appendChild(this.htmlPool(key));
|
|
297
|
+
});
|
|
298
|
+
} else {
|
|
299
|
+
event.dispatchCustomEvent(this, "wje-infinite-scroll:complete");
|
|
300
|
+
this.endingEl.classList.add("show");
|
|
301
|
+
}
|
|
302
|
+
} catch (error) {
|
|
303
|
+
console.log(error.message);
|
|
304
|
+
} finally {
|
|
305
|
+
this.hideLoader();
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
live(eventType, selector, callback) {
|
|
309
|
+
function delegateEvent(e) {
|
|
310
|
+
if (e.target.matches(selector)) {
|
|
311
|
+
callback.call(e.target, e);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
function addEventListeners(element) {
|
|
315
|
+
element.addEventListener(eventType, delegateEvent, false);
|
|
316
|
+
if (element.shadowRoot) {
|
|
317
|
+
addEventListeners(element.shadowRoot);
|
|
318
|
+
}
|
|
319
|
+
Array.from(element.children).forEach(addEventListeners);
|
|
320
|
+
}
|
|
321
|
+
addEventListeners(document);
|
|
322
|
+
function searchShadowRoots(node) {
|
|
323
|
+
if (node.shadowRoot) {
|
|
324
|
+
addEventListeners(node.shadowRoot);
|
|
325
|
+
node.shadowRoot.querySelectorAll("*").forEach(searchShadowRoots);
|
|
326
|
+
}
|
|
327
|
+
Array.from(node.children).forEach(searchShadowRoots);
|
|
328
|
+
}
|
|
329
|
+
document.querySelectorAll("*").forEach(searchShadowRoots);
|
|
330
|
+
}
|
|
331
|
+
getCardPlaceholder() {
|
|
332
|
+
if (!this.UI.elCardPlaceholder) {
|
|
333
|
+
this.UI.elCardPlaceholder = document.createElement("div");
|
|
334
|
+
this.UI.elCardPlaceholder.className = "card-placeholder";
|
|
335
|
+
}
|
|
336
|
+
return this.UI.elCardPlaceholder;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
Kanban.define("wje-kanban", Kanban);
|
|
340
|
+
export {
|
|
341
|
+
Kanban as default
|
|
342
|
+
};
|
package/dist/wje-master.js
CHANGED
|
@@ -51,53 +51,54 @@ import { default as default39 } from "./wje-infinite-scroll.js";
|
|
|
51
51
|
import { default as default40 } from "./wje-input.js";
|
|
52
52
|
import { default as default41 } from "./wje-input-file.js";
|
|
53
53
|
import { default as default42 } from "./wje-item.js";
|
|
54
|
-
import { default as default43 } from "./wje-
|
|
55
|
-
import { default as default44 } from "./wje-
|
|
56
|
-
import { default as default45 } from "./wje-
|
|
57
|
-
import { default as default46 } from "./wje-
|
|
58
|
-
import { default as default47 } from "./wje-
|
|
59
|
-
import { default as default48 } from "./wje-menu
|
|
60
|
-
import { default as default49 } from "./wje-menu-
|
|
61
|
-
import { default as default50 } from "./wje-menu-
|
|
62
|
-
import { default as default51 } from "./wje-
|
|
63
|
-
import { default as default52 } from "./wje-
|
|
64
|
-
import { default as default53 } from "./wje-
|
|
65
|
-
import { default as default54 } from "./wje-orgchart
|
|
66
|
-
import { default as default55 } from "./wje-orgchart-
|
|
54
|
+
import { default as default43 } from "./wje-kanban.js";
|
|
55
|
+
import { default as default44 } from "./wje-label.js";
|
|
56
|
+
import { default as default45 } from "./wje-list.js";
|
|
57
|
+
import { default as default46 } from "./wje-main.js";
|
|
58
|
+
import { default as default47 } from "./wje-masonry.js";
|
|
59
|
+
import { default as default48 } from "./wje-menu.js";
|
|
60
|
+
import { default as default49 } from "./wje-menu-button.js";
|
|
61
|
+
import { default as default50 } from "./wje-menu-item.js";
|
|
62
|
+
import { default as default51 } from "./wje-menu-label.js";
|
|
63
|
+
import { default as default52 } from "./wje-option.js";
|
|
64
|
+
import { default as default53 } from "./wje-options.js";
|
|
65
|
+
import { default as default54 } from "./wje-orgchart.js";
|
|
66
|
+
import { default as default55 } from "./wje-orgchart-group.js";
|
|
67
|
+
import { default as default56 } from "./wje-orgchart-item.js";
|
|
67
68
|
import "./wje-popup.js";
|
|
68
|
-
import { default as
|
|
69
|
-
import { default as
|
|
70
|
-
import { default as
|
|
71
|
-
import { default as
|
|
72
|
-
import { default as
|
|
73
|
-
import { default as
|
|
74
|
-
import { default as
|
|
75
|
-
import { default as
|
|
76
|
-
import { default as
|
|
77
|
-
import { default as
|
|
78
|
-
import { default as
|
|
79
|
-
import { default as
|
|
80
|
-
import { default as
|
|
81
|
-
import { default as
|
|
82
|
-
import { default as
|
|
83
|
-
import { default as
|
|
84
|
-
import { default as
|
|
85
|
-
import { default as
|
|
86
|
-
import { default as
|
|
87
|
-
import { default as
|
|
88
|
-
import { default as
|
|
89
|
-
import { default as
|
|
90
|
-
import { default as
|
|
91
|
-
import { default as
|
|
92
|
-
import { default as
|
|
93
|
-
import { default as
|
|
94
|
-
import { default as
|
|
95
|
-
import { default as
|
|
96
|
-
import { default as
|
|
97
|
-
import { default as
|
|
98
|
-
import { default as
|
|
99
|
-
import { default as
|
|
100
|
-
import { default as
|
|
69
|
+
import { default as default57 } from "./wje-progress-bar.js";
|
|
70
|
+
import { default as default58 } from "./wje-qr-code.js";
|
|
71
|
+
import { default as default59 } from "./wje-radio.js";
|
|
72
|
+
import { default as default60 } from "./wje-radio-group.js";
|
|
73
|
+
import { default as default61 } from "./wje-rate.js";
|
|
74
|
+
import { default as default62 } from "./wje-relative-time.js";
|
|
75
|
+
import { default as default63 } from "./wje-reorder.js";
|
|
76
|
+
import { default as default64 } from "./wje-reorder-dropzone.js";
|
|
77
|
+
import { default as default65 } from "./wje-reorder-handle.js";
|
|
78
|
+
import { default as default66 } from "./wje-reorder-item.js";
|
|
79
|
+
import { default as default67 } from "./wje-route.js";
|
|
80
|
+
import { default as default68 } from "./wje-routerx.js";
|
|
81
|
+
import { default as default69 } from "./wje-router-link.js";
|
|
82
|
+
import { default as default70 } from "./wje-router-outlet.js";
|
|
83
|
+
import { default as default71 } from "./wje-row.js";
|
|
84
|
+
import { default as default72 } from "./wje-select.js";
|
|
85
|
+
import { default as default73 } from "./wje-slider.js";
|
|
86
|
+
import { default as default74 } from "./wje-split-view.js";
|
|
87
|
+
import { default as default75 } from "./wje-status.js";
|
|
88
|
+
import { default as default76 } from "./wje-step.js";
|
|
89
|
+
import { default as default77 } from "./wje-stepper.js";
|
|
90
|
+
import { default as default78 } from "./wje-tab.js";
|
|
91
|
+
import { default as default79 } from "./wje-tab-group.js";
|
|
92
|
+
import { default as default80 } from "./wje-tab-panel.js";
|
|
93
|
+
import { default as default81 } from "./wje-textarea.js";
|
|
94
|
+
import { default as default82 } from "./wje-thumbnail.js";
|
|
95
|
+
import { default as default83 } from "./wje-toast.js";
|
|
96
|
+
import { default as default84 } from "./wje-toggle.js";
|
|
97
|
+
import { default as default85 } from "./wje-toolbar.js";
|
|
98
|
+
import { default as default86 } from "./wje-toolbar-action.js";
|
|
99
|
+
import { default as default87 } from "./wje-tooltip.js";
|
|
100
|
+
import { default as default88 } from "./wje-visually-hidden.js";
|
|
101
|
+
import { default as default89 } from "./wje-sliding-container.js";
|
|
101
102
|
import { P } from "./popup.element-DvPGL_NN.js";
|
|
102
103
|
function formatDate(input, format) {
|
|
103
104
|
let date;
|
|
@@ -125,8 +126,8 @@ function formatDate(input, format) {
|
|
|
125
126
|
};
|
|
126
127
|
return format.replace(/yyyy|MM|dd|HH|mm|ss|MMMM|MMM/g, (matched) => map[matched]);
|
|
127
128
|
}
|
|
128
|
-
const
|
|
129
|
-
code: "sk-
|
|
129
|
+
const skSk = {
|
|
130
|
+
code: "sk-sk",
|
|
130
131
|
name: "Slovak",
|
|
131
132
|
dir: "ltr",
|
|
132
133
|
"welcome": "Vitajte",
|
|
@@ -138,9 +139,9 @@ const sk = {
|
|
|
138
139
|
"wj.stepper.button.previous": "Späť",
|
|
139
140
|
"wj.stepper.step": "Krok"
|
|
140
141
|
};
|
|
141
|
-
Localizer.registerTranslation(
|
|
142
|
-
const
|
|
143
|
-
code: "en-
|
|
142
|
+
Localizer.registerTranslation(skSk);
|
|
143
|
+
const enGb = {
|
|
144
|
+
code: "en-gb",
|
|
144
145
|
name: "English",
|
|
145
146
|
dir: "ltr",
|
|
146
147
|
"welcome": "Welcome",
|
|
@@ -152,7 +153,7 @@ const en = {
|
|
|
152
153
|
"wj.stepper.button.previous": "Previous",
|
|
153
154
|
"wj.stepper.step": "Step"
|
|
154
155
|
};
|
|
155
|
-
Localizer.registerTranslation(
|
|
156
|
+
Localizer.registerTranslation(enGb);
|
|
156
157
|
const styles$2 = ".native-timeline {\n position: relative;\n}\n\n.vertical-line {\n position: absolute;\n margin-left: calc(var(--wje-spacing-x-large) + 1px);\n top: 0;\n bottom: 0;\n width: 1px;\n background-color: var(--wje-color-info-3);\n}\n\n\n";
|
|
157
158
|
class Timeline extends WJElement {
|
|
158
159
|
constructor() {
|
|
@@ -244,6 +245,7 @@ class TimelineItem extends WJElement {
|
|
|
244
245
|
native.setAttribute("part", "native");
|
|
245
246
|
native.classList.add("native-timeline-item");
|
|
246
247
|
let contentContainer = document.createElement("div");
|
|
248
|
+
contentContainer.setAttribute("part", "content-container");
|
|
247
249
|
contentContainer.classList.add("content-container");
|
|
248
250
|
let tooltip = document.createElement("wje-tooltip");
|
|
249
251
|
tooltip.setAttribute("text", this.getAttribute("tooltip") || "");
|
|
@@ -424,57 +426,58 @@ export {
|
|
|
424
426
|
default40 as Input,
|
|
425
427
|
default41 as InputFile,
|
|
426
428
|
default42 as Item,
|
|
427
|
-
default43 as
|
|
428
|
-
default44 as
|
|
429
|
+
default43 as Kanban,
|
|
430
|
+
default44 as Label,
|
|
431
|
+
default45 as List,
|
|
429
432
|
Localizer,
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
433
|
+
default46 as Main,
|
|
434
|
+
default47 as Masonry,
|
|
435
|
+
default48 as Menu,
|
|
436
|
+
default49 as MenuButton,
|
|
437
|
+
default50 as MenuItem,
|
|
438
|
+
default51 as MenuLabel,
|
|
439
|
+
default52 as Option,
|
|
440
|
+
default53 as Options,
|
|
441
|
+
default54 as Orgchart,
|
|
442
|
+
default55 as OrgchartGroup,
|
|
443
|
+
default56 as OrgchartItem,
|
|
441
444
|
P as Popup,
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
445
|
+
default57 as ProgressBar,
|
|
446
|
+
default58 as QrCode,
|
|
447
|
+
default59 as Radio,
|
|
448
|
+
default60 as RadioGroup,
|
|
449
|
+
default61 as Rate,
|
|
450
|
+
default62 as RelativeTime,
|
|
451
|
+
default63 as Reorder,
|
|
452
|
+
default64 as ReorderDropzone,
|
|
453
|
+
default65 as ReorderHandle,
|
|
454
|
+
default66 as ReorderItem,
|
|
455
|
+
default67 as Route,
|
|
456
|
+
default69 as RouterLink,
|
|
457
|
+
default70 as RouterOutlet,
|
|
458
|
+
default68 as Routerx,
|
|
459
|
+
default71 as Row,
|
|
460
|
+
default72 as Select,
|
|
461
|
+
default73 as Slider,
|
|
462
|
+
default89 as SlidingContainer,
|
|
463
|
+
default74 as SplitView,
|
|
464
|
+
default75 as Status,
|
|
465
|
+
default76 as Step,
|
|
466
|
+
default77 as Stepper,
|
|
467
|
+
default78 as Tab,
|
|
468
|
+
default79 as TabGroup,
|
|
469
|
+
default80 as TabPanel,
|
|
470
|
+
default81 as Textarea,
|
|
471
|
+
default82 as Thumbnail,
|
|
469
472
|
Timeline,
|
|
470
473
|
TimelineItem,
|
|
471
|
-
|
|
474
|
+
default83 as Toast,
|
|
472
475
|
ToastItem,
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
476
|
+
default84 as Toggle,
|
|
477
|
+
default85 as Toolbar,
|
|
478
|
+
default86 as ToolbarAction,
|
|
479
|
+
default87 as Tooltip,
|
|
480
|
+
default88 as VisuallyHidden,
|
|
478
481
|
WJElement,
|
|
479
482
|
WjePermissionsApi,
|
|
480
483
|
b as bindRouterLinks,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wj-elements",
|
|
3
3
|
"description": "WebJET Elements is a modern set of user interface tools harnessing the power of web components designed to simplify web application development.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.94",
|
|
5
5
|
"homepage": "https://github.com/lencys/wj-elements",
|
|
6
6
|
"author": "Lukáš Ondrejček <lukas.ondrejcek@gmail.com>",
|
|
7
7
|
"license": "MIT",
|