wj-elements 0.1.128 → 0.1.129
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/dark.css +6 -1
- package/dist/{infinite-scroll.element-DcO1E5Es.js → infinite-scroll.element-R3y_ZQj6.js} +42 -14
- package/dist/light.css +5 -0
- package/dist/{list.element-TZXMx1rt.js → list.element-syl98NWS.js} +4 -1
- package/dist/localize.js +4 -3
- package/dist/{popup.element-l8v-dMoK.js → popup.element-C0a1z1y2.js} +191 -78
- package/dist/wje-accordion-item.js +1 -1
- package/dist/wje-animation.js +141 -13
- package/dist/wje-aside.js +1 -1
- package/dist/wje-avatar.js +5 -5
- package/dist/wje-badge.js +1 -1
- package/dist/wje-breadcrumb.js +16 -6
- package/dist/wje-breadcrumbs.js +4 -4
- package/dist/wje-button-group.js +2 -2
- package/dist/wje-button.js +64 -6
- package/dist/wje-card-content.js +1 -1
- package/dist/wje-card-controls.js +1 -1
- package/dist/wje-card-header.js +1 -1
- package/dist/wje-card-subtitle.js +1 -1
- package/dist/wje-card-title.js +1 -1
- package/dist/wje-carousel-item.js +1 -1
- package/dist/wje-carousel.js +1 -1
- package/dist/wje-checkbox.js +14 -11
- package/dist/wje-chip.js +1 -1
- package/dist/wje-col.js +9 -3
- package/dist/wje-color-picker.js +72 -42
- package/dist/wje-container.js +1 -1
- package/dist/wje-copy-button.js +3 -3
- package/dist/wje-dialog.js +89 -0
- package/dist/wje-divider.js +1 -1
- package/dist/wje-dropdown.js +21 -6
- package/dist/wje-element.js +284 -127
- package/dist/wje-fetchAndParseCSS.js +2 -1
- package/dist/wje-file-upload-item.js +5 -2
- package/dist/wje-file-upload.js +57 -13
- package/dist/wje-footer.js +1 -1
- package/dist/wje-form.js +1 -1
- package/dist/wje-format-digital.js +1 -1
- package/dist/wje-grid.js +1 -1
- package/dist/wje-header.js +1 -1
- package/dist/wje-icon-picker.js +6 -3
- package/dist/wje-icon.js +4 -1
- package/dist/wje-img-comparer.js +1 -3
- package/dist/wje-img.js +5 -2
- package/dist/wje-infinite-scroll.js +1 -1
- package/dist/wje-input-file.js +4 -1
- package/dist/wje-input.js +9 -4
- package/dist/wje-item.js +34 -3
- package/dist/wje-kanban.js +16 -31
- package/dist/wje-label.js +1 -10
- package/dist/wje-list.js +1 -1
- package/dist/wje-main.js +1 -1
- package/dist/wje-masonry.js +9 -9
- package/dist/wje-master.js +9 -117
- package/dist/wje-menu-button.js +4 -1
- package/dist/wje-menu-item.js +13 -4
- package/dist/wje-menu-label.js +1 -1
- package/dist/wje-menu.js +4 -1
- package/dist/wje-option.js +8 -4
- package/dist/wje-options.js +25 -11
- package/dist/wje-orgchart-group.js +2 -2
- package/dist/wje-orgchart-item.js +7 -4
- package/dist/wje-orgchart.js +1 -1
- package/dist/wje-popup.js +1 -1
- package/dist/wje-progress-bar.js +6 -2
- package/dist/wje-qr-code.js +2 -2
- package/dist/wje-radio-group.js +4 -1
- package/dist/wje-radio.js +1 -1
- package/dist/wje-rate.js +6 -3
- package/dist/wje-relative-time.js +37 -19
- package/dist/wje-reorder.js +73 -10
- package/dist/wje-route.js +1 -1
- package/dist/wje-router-link.js +1 -2
- package/dist/wje-routerx.js +3 -1
- package/dist/wje-row.js +1 -11
- package/dist/wje-select.js +15 -12
- package/dist/wje-slider.js +7 -4
- package/dist/wje-sliding-container.js +125 -49
- package/dist/wje-split-view.js +10 -2
- package/dist/wje-status.js +1 -1
- package/dist/wje-stepper.js +879 -766
- package/dist/wje-store.js +17 -18
- package/dist/wje-tab-group.js +4 -1
- package/dist/wje-tab-panel.js +1 -1
- package/dist/wje-tab.js +4 -1
- package/dist/wje-textarea.js +8 -2
- package/dist/wje-thumbnail.js +1 -9
- package/dist/wje-toast.js +24 -23
- package/dist/wje-toggle.js +7 -1
- package/dist/wje-toolbar-action.js +1 -1
- package/dist/wje-toolbar.js +1 -1
- package/dist/wje-tooltip.js +5 -1
- package/dist/wje-visually-hidden.js +1 -1
- package/package.json +16 -5
package/dist/dark.css
CHANGED
|
@@ -149,6 +149,11 @@
|
|
|
149
149
|
/* Divider */
|
|
150
150
|
--wje-divider-border-color: var(--wje-border-color);
|
|
151
151
|
|
|
152
|
+
/* File Upload - Item */
|
|
153
|
+
--wje-file-upload-item-border-width: 1px;
|
|
154
|
+
--wje-file-upload-item-border-style: solid;
|
|
155
|
+
--wje-file-upload-item-border-color: var(--wje-border-color);
|
|
156
|
+
|
|
152
157
|
/* Input */
|
|
153
158
|
--wje-input-background-color: var(--wje-background);
|
|
154
159
|
--wje-input-color: var(--wje-color);
|
|
@@ -182,7 +187,7 @@
|
|
|
182
187
|
/* Option */
|
|
183
188
|
--wje-option-highlighted: var(--wje-color-contrast-3);
|
|
184
189
|
|
|
185
|
-
|
|
190
|
+
/* Orgchart - Item */
|
|
186
191
|
--wje-orgchart-item-background: var(--wje-color-contrast-0);
|
|
187
192
|
|
|
188
193
|
--wje-orgchart-item-highlight-background: var(--wje-color-complete-2);
|
|
@@ -42,7 +42,7 @@ class InfiniteScroll extends WJElement {
|
|
|
42
42
|
*
|
|
43
43
|
*/
|
|
44
44
|
__publicField(this, "dataToHtml", (item) => {
|
|
45
|
-
let interpolateItem = this.
|
|
45
|
+
let interpolateItem = this.interpolate(this.infiniteScrollTemplate, item);
|
|
46
46
|
let doc = this.parser.parseFromString(interpolateItem, "text/html");
|
|
47
47
|
let element = doc.activeElement.firstElementChild;
|
|
48
48
|
return element;
|
|
@@ -54,41 +54,66 @@ class InfiniteScroll extends WJElement {
|
|
|
54
54
|
this.placementObj.insertAdjacentElement("beforeend", element);
|
|
55
55
|
});
|
|
56
56
|
});
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
this
|
|
64
|
-
String.prototype.interpolate = function(params) {
|
|
65
|
-
let template = this;
|
|
57
|
+
/**
|
|
58
|
+
* Interpolates the string.
|
|
59
|
+
* @param template
|
|
60
|
+
* @param {Object} params - The parameters for interpolation.
|
|
61
|
+
* @returns {string} The interpolated string.
|
|
62
|
+
*/
|
|
63
|
+
__publicField(this, "interpolate", (template, params) => {
|
|
66
64
|
let keys = template.match(/\{{.*?\}}/g);
|
|
67
65
|
if (keys) {
|
|
68
66
|
for (let key of keys) {
|
|
69
67
|
let cleanKey = key.replace("{{", "").replace("}}", "");
|
|
70
68
|
let val = "";
|
|
71
69
|
cleanKey.split(".").forEach((k) => {
|
|
72
|
-
val = val
|
|
70
|
+
val = val === "" ? params[k] : val[k];
|
|
73
71
|
});
|
|
74
72
|
template = template.replace(key, val);
|
|
75
73
|
}
|
|
76
74
|
}
|
|
77
75
|
return template;
|
|
78
|
-
};
|
|
76
|
+
});
|
|
77
|
+
this.totalPages = 0;
|
|
78
|
+
this.isLoading = [];
|
|
79
|
+
this._response = {};
|
|
80
|
+
this.iterate = null;
|
|
81
|
+
this._infiniteScrollTemplate = null;
|
|
82
|
+
this._abortController = new AbortController();
|
|
83
|
+
this._signal = this._abortController.signal;
|
|
79
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Dependencies of the InfiniteScroll component.
|
|
87
|
+
* @param value
|
|
88
|
+
*/
|
|
80
89
|
set infiniteScrollTemplate(value) {
|
|
81
90
|
this._infiniteScrollTemplate = value;
|
|
82
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* Getter for the infiniteScrollTemplate property.
|
|
94
|
+
* @returns {null}
|
|
95
|
+
*/
|
|
83
96
|
get infiniteScrollTemplate() {
|
|
84
97
|
return this._infiniteScrollTemplate;
|
|
85
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* Dependencies of the InfiniteScroll component.
|
|
101
|
+
* @param value
|
|
102
|
+
*/
|
|
86
103
|
set response(value) {
|
|
87
104
|
this._response = value;
|
|
88
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* Getter for the response property.
|
|
108
|
+
* @returns {*|{}}
|
|
109
|
+
*/
|
|
89
110
|
get response() {
|
|
90
111
|
return this._response;
|
|
91
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
* Dependencies of the InfiniteScroll component.
|
|
115
|
+
* @param value
|
|
116
|
+
*/
|
|
92
117
|
set objectName(value) {
|
|
93
118
|
this.setAttribute("object-name", value);
|
|
94
119
|
}
|
|
@@ -126,7 +151,7 @@ class InfiniteScroll extends WJElement {
|
|
|
126
151
|
* @param {Object} store - The store for drawing.
|
|
127
152
|
* @param {Object} params - The parameters for drawing.
|
|
128
153
|
*/
|
|
129
|
-
beforeDraw(
|
|
154
|
+
beforeDraw() {
|
|
130
155
|
var _a, _b;
|
|
131
156
|
this.iterate = this.querySelector("[iterate]");
|
|
132
157
|
this.infiniteScrollTemplate = (_a = this.iterate) == null ? void 0 : _a.outerHTML;
|
|
@@ -146,7 +171,7 @@ class InfiniteScroll extends WJElement {
|
|
|
146
171
|
* @param {Object} params - The parameters for drawing.
|
|
147
172
|
* @returns {DocumentFragment}
|
|
148
173
|
*/
|
|
149
|
-
draw(
|
|
174
|
+
draw() {
|
|
150
175
|
let fragment = document.createDocumentFragment();
|
|
151
176
|
let native = document.createElement("div");
|
|
152
177
|
native.classList.add("native");
|
|
@@ -171,6 +196,9 @@ class InfiniteScroll extends WJElement {
|
|
|
171
196
|
}
|
|
172
197
|
/**
|
|
173
198
|
* Called after the component has been drawn.
|
|
199
|
+
* @params {Object} context - The context for drawing.
|
|
200
|
+
* @params {Object} store - The store for drawing.
|
|
201
|
+
* @params {Object} params - The parameters for drawing.
|
|
174
202
|
*/
|
|
175
203
|
async afterDraw() {
|
|
176
204
|
this.queryParams = this.queryParams || "";
|
package/dist/light.css
CHANGED
|
@@ -322,6 +322,11 @@
|
|
|
322
322
|
--wje-divider-border-color: var(--wje-border-color);
|
|
323
323
|
--wje-divider-spacing: 0;
|
|
324
324
|
|
|
325
|
+
/* File Upload - Item */
|
|
326
|
+
--wje-file-upload-item-border-width: 1px;
|
|
327
|
+
--wje-file-upload-item-border-style: solid;
|
|
328
|
+
--wje-file-upload-item-border-color: var(--wje-border-color);
|
|
329
|
+
|
|
325
330
|
/* Icon */
|
|
326
331
|
--wje-icon-stroke: 2;
|
|
327
332
|
--wje-icon-size: var(--wje-size);
|
|
@@ -36,7 +36,7 @@ class List extends WJElement {
|
|
|
36
36
|
* @param {Object} params - The parameters for drawing.
|
|
37
37
|
* @returns {DocumentFragment}
|
|
38
38
|
*/
|
|
39
|
-
draw(
|
|
39
|
+
draw() {
|
|
40
40
|
let fragment = document.createDocumentFragment();
|
|
41
41
|
let element = document.createElement("slot");
|
|
42
42
|
fragment.appendChild(element);
|
|
@@ -44,6 +44,9 @@ class List extends WJElement {
|
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
46
|
* Called after the component has been drawn.
|
|
47
|
+
* @params {Object} context - The context for drawing.
|
|
48
|
+
* @params {Object} store - The store for drawing.
|
|
49
|
+
* @params {Object} params - The parameters for drawing.
|
|
47
50
|
*/
|
|
48
51
|
afterDraw() {
|
|
49
52
|
this.classList.toggle("wje-lines-" + this.lines, this.hasAttribute("lines"));
|
package/dist/localize.js
CHANGED
|
@@ -24,7 +24,7 @@ class LocalizerDefault {
|
|
|
24
24
|
// Vyhľadávanie prekladu podľa kľúča a typu čísla
|
|
25
25
|
translatePlural(key, count = 0, type = "cardinal") {
|
|
26
26
|
const plural = new Intl.PluralRules(this.lang, { type });
|
|
27
|
-
if (count
|
|
27
|
+
if (count !== void 0)
|
|
28
28
|
key += "." + plural.select(count);
|
|
29
29
|
return this.translate(key);
|
|
30
30
|
}
|
|
@@ -36,8 +36,9 @@ class LocalizerDefault {
|
|
|
36
36
|
formatDate(date) {
|
|
37
37
|
return new Intl.DateTimeFormat(this.currentLang).format(new Date(date));
|
|
38
38
|
}
|
|
39
|
-
relativeTime(value = 0, unit, options = { numeric: "auto" }) {
|
|
40
|
-
|
|
39
|
+
relativeTime(lang, value = 0, unit = "day", options = { numeric: "auto" }) {
|
|
40
|
+
lang = lang || this.currentLang;
|
|
41
|
+
return new Intl.RelativeTimeFormat(lang, options).format(value, unit);
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
function registerTranslation(...translation) {
|