@keenthemes/ktui 1.0.10 → 1.0.12
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/README.md +2 -2
- package/dist/ktui.js +1283 -1100
- package/dist/ktui.min.js +1 -1
- package/dist/ktui.min.js.map +1 -1
- package/examples/select/basic-usage.html +43 -0
- package/examples/select/combobox-icons.html +58 -0
- package/examples/select/combobox.html +46 -0
- package/examples/select/description.html +69 -0
- package/examples/select/disable-option.html +43 -0
- package/examples/select/disable-select.html +34 -0
- package/examples/select/icon-description.html +56 -0
- package/examples/select/icon-multiple.html +58 -0
- package/examples/select/icon.html +58 -0
- package/examples/select/max-selection.html +39 -0
- package/examples/select/modal.html +70 -0
- package/examples/select/multiple.html +42 -0
- package/examples/select/placeholder.html +43 -0
- package/examples/select/remote-data.html +32 -0
- package/examples/select/search.html +49 -0
- package/examples/select/tags-icons.html +58 -0
- package/examples/select/tags-selected.html +59 -0
- package/examples/select/tags.html +58 -0
- package/examples/select/template-customization.html +65 -0
- package/examples/select/test.html +94 -0
- package/examples/toast/example.html +427 -0
- package/lib/cjs/components/component.js +1 -1
- package/lib/cjs/components/component.js.map +1 -1
- package/lib/cjs/components/datatable/datatable.js +22 -6
- package/lib/cjs/components/datatable/datatable.js.map +1 -1
- package/lib/cjs/components/modal/modal.js +0 -4
- package/lib/cjs/components/modal/modal.js.map +1 -1
- package/lib/cjs/components/select/combobox.js +38 -120
- package/lib/cjs/components/select/combobox.js.map +1 -1
- package/lib/cjs/components/select/config.js +4 -16
- package/lib/cjs/components/select/config.js.map +1 -1
- package/lib/cjs/components/select/dropdown.js +10 -49
- package/lib/cjs/components/select/dropdown.js.map +1 -1
- package/lib/cjs/components/select/index.js +2 -1
- package/lib/cjs/components/select/index.js.map +1 -1
- package/lib/cjs/components/select/option.js +21 -4
- package/lib/cjs/components/select/option.js.map +1 -1
- package/lib/cjs/components/select/remote.js +1 -37
- package/lib/cjs/components/select/remote.js.map +1 -1
- package/lib/cjs/components/select/search.js +11 -41
- package/lib/cjs/components/select/search.js.map +1 -1
- package/lib/cjs/components/select/select.js +213 -326
- package/lib/cjs/components/select/select.js.map +1 -1
- package/lib/cjs/components/select/tags.js +39 -31
- package/lib/cjs/components/select/tags.js.map +1 -1
- package/lib/cjs/components/select/templates.js +120 -179
- package/lib/cjs/components/select/templates.js.map +1 -1
- package/lib/cjs/components/select/types.js +0 -12
- package/lib/cjs/components/select/types.js.map +1 -1
- package/lib/cjs/components/select/utils.js +204 -257
- package/lib/cjs/components/select/utils.js.map +1 -1
- package/lib/cjs/components/toast/index.js +10 -0
- package/lib/cjs/components/toast/index.js.map +1 -0
- package/lib/cjs/components/toast/toast.js +543 -0
- package/lib/cjs/components/toast/toast.js.map +1 -0
- package/lib/cjs/components/toast/types.js +7 -0
- package/lib/cjs/components/toast/types.js.map +1 -0
- package/lib/cjs/helpers/dom.js +24 -0
- package/lib/cjs/helpers/dom.js.map +1 -1
- package/lib/cjs/index.js +5 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/components/component.js +1 -1
- package/lib/esm/components/component.js.map +1 -1
- package/lib/esm/components/datatable/datatable.js +22 -6
- package/lib/esm/components/datatable/datatable.js.map +1 -1
- package/lib/esm/components/modal/modal.js +0 -4
- package/lib/esm/components/modal/modal.js.map +1 -1
- package/lib/esm/components/select/combobox.js +39 -121
- package/lib/esm/components/select/combobox.js.map +1 -1
- package/lib/esm/components/select/config.js +3 -15
- package/lib/esm/components/select/config.js.map +1 -1
- package/lib/esm/components/select/dropdown.js +10 -49
- package/lib/esm/components/select/dropdown.js.map +1 -1
- package/lib/esm/components/select/index.js +1 -1
- package/lib/esm/components/select/index.js.map +1 -1
- package/lib/esm/components/select/option.js +21 -4
- package/lib/esm/components/select/option.js.map +1 -1
- package/lib/esm/components/select/remote.js +1 -37
- package/lib/esm/components/select/remote.js.map +1 -1
- package/lib/esm/components/select/search.js +12 -42
- package/lib/esm/components/select/search.js.map +1 -1
- package/lib/esm/components/select/select.js +214 -327
- package/lib/esm/components/select/select.js.map +1 -1
- package/lib/esm/components/select/tags.js +39 -31
- package/lib/esm/components/select/tags.js.map +1 -1
- package/lib/esm/components/select/templates.js +119 -178
- package/lib/esm/components/select/templates.js.map +1 -1
- package/lib/esm/components/select/types.js +1 -11
- package/lib/esm/components/select/types.js.map +1 -1
- package/lib/esm/components/select/utils.js +201 -255
- package/lib/esm/components/select/utils.js.map +1 -1
- package/lib/esm/components/toast/index.js +6 -0
- package/lib/esm/components/toast/index.js.map +1 -0
- package/lib/esm/components/toast/toast.js +540 -0
- package/lib/esm/components/toast/toast.js.map +1 -0
- package/lib/esm/components/toast/types.js +6 -0
- package/lib/esm/components/toast/types.js.map +1 -0
- package/lib/esm/helpers/dom.js +24 -0
- package/lib/esm/helpers/dom.js.map +1 -1
- package/lib/esm/index.js +3 -0
- package/lib/esm/index.js.map +1 -1
- package/package.json +8 -6
- package/src/components/alert/alert.css +20 -2
- package/src/components/badge/badge.css +5 -0
- package/src/components/component.ts +4 -0
- package/src/components/datatable/datatable.ts +24 -16
- package/src/components/drawer/drawer.css +1 -1
- package/src/components/input/input.css +3 -1
- package/src/components/link/link.css +2 -2
- package/src/components/modal/modal.css +18 -2
- package/src/components/modal/modal.ts +0 -5
- package/src/components/select/combobox.ts +42 -149
- package/src/components/select/config.ts +38 -33
- package/src/components/select/dropdown.ts +8 -55
- package/src/components/select/index.ts +1 -1
- package/src/components/select/option.ts +28 -7
- package/src/components/select/remote.ts +2 -42
- package/src/components/select/search.ts +14 -54
- package/src/components/select/select.css +49 -0
- package/src/components/select/select.ts +231 -437
- package/src/components/select/tags.ts +40 -37
- package/src/components/select/templates.ts +166 -303
- package/src/components/select/types.ts +0 -10
- package/src/components/select/utils.ts +214 -304
- package/src/components/table/table.css +1 -1
- package/src/components/textarea/textarea.css +2 -1
- package/src/components/toast/index.ts +7 -0
- package/src/components/toast/toast.css +60 -0
- package/src/components/toast/toast.ts +605 -0
- package/src/components/toast/types.ts +169 -0
- package/src/helpers/dom.ts +30 -0
- package/src/index.ts +4 -0
- package/styles/main.css +3 -0
- package/styles/vars.css +138 -0
- package/styles.css +1 -0
|
@@ -15,34 +15,30 @@ var __assign = (this && this.__assign) || function () {
|
|
|
15
15
|
return __assign.apply(this, arguments);
|
|
16
16
|
};
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.defaultTemplates = void 0;
|
|
18
|
+
exports.defaultTemplates = exports.coreTemplateStrings = void 0;
|
|
19
19
|
exports.setTemplateStrings = setTemplateStrings;
|
|
20
20
|
exports.getTemplateStrings = getTemplateStrings;
|
|
21
|
-
var
|
|
21
|
+
var utils_1 = require("./utils");
|
|
22
22
|
/**
|
|
23
23
|
* Default HTML string templates for KTSelect. All UI structure is defined here.
|
|
24
24
|
* Users can override any template by providing a matching key in the config.templates object.
|
|
25
25
|
*/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
search: "<div class=\"px-3 py-2 border-b border-gray-200\"><input type=\"text\" data-kt-select-search placeholder=\"{{searchPlaceholder}}\" class=\"w-full border-none focus:outline-none text-sm\" role=\"searchbox\" aria-label=\"{{searchPlaceholder}}\"/></div>",
|
|
43
|
-
noResults: "<li class=\"px-3 py-2 text-gray-500\" role=\"status\">{{searchNotFoundText}}</li>",
|
|
44
|
-
loading: "<li class=\"px-3 py-2 text-gray-500 italic\" role=\"status\" aria-live=\"polite\">{{loadingMessage}}</li>",
|
|
45
|
-
tag: "<div data-kt-select-tag class=\"inline-flex items-center bg-blue-50 border border-blue-100 rounded px-2 py-1 text-sm mr-1 mb-1\"><span>{{title}}</span><span data-kt-select-remove-button data-value=\"{{id}}\" class=\"ml-1 text-blue-400 hover:text-blue-600 cursor-pointer\" role=\"button\" aria-label=\"Remove {{safeTitle}}\" tabindex=\"0\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line></svg></span></div>",
|
|
26
|
+
exports.coreTemplateStrings = {
|
|
27
|
+
dropdown: "<div data-kt-select-dropdown class=\"kt-select-dropdown hidden {{class}}\" style=\"z-index: {{zindex}};\">{{content}}</div>",
|
|
28
|
+
options: "<ul role=\"listbox\" aria-label=\"{{label}}\" class=\"kt-select-options {{class}}\" data-kt-select-options=\"true\">{{content}}</ul>",
|
|
29
|
+
error: "<li class=\"kt-select-error\" role=\"alert\">{{content}}</li>",
|
|
30
|
+
highlight: "<span data-kt-select-highlight class=\"kt-select-highlight highlighted {{class}}\">{{text}}</span>",
|
|
31
|
+
wrapper: "<div data-kt-select-wrapper class=\"kt-select-wrapper {{class}}\"></div>",
|
|
32
|
+
combobox: "\n\t\t<div data-kt-select-combobox data-kt-select-display class=\"kt-select-combobox {{class}}\">\n\t\t\t<input class=\"kt-input kt-select-combobox-input\" data-kt-select-search=\"true\" data-kt-select-value=\"true\" type=\"text\" placeholder=\"{{placeholder}}\" role=\"searchbox\" aria-label=\"{{label}}\" {{disabled}} />\n\t\t\t<button type=\"button\" data-kt-select-clear-button=\"true\" class=\"kt-select-combobox-clear-btn\" aria-label=\"Clear selection\">\n\t\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t\t\t\t<line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n\t\t\t\t\t<line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n\t\t\t\t</svg>\n\t\t\t</button>\n\t\t</div>\n\t",
|
|
33
|
+
display: "\n\t\t<div data-kt-select-display class=\"kt-select-display {{class}}\" tabindex=\"{{tabindex}}\" role=\"button\" data-selected=\"0\" aria-haspopup=\"listbox\" aria-expanded=\"false\" aria-label=\"{{label}}\" {{disabled}}>\n\t\t\t<div data-kt-select-value=\"true\" class=\"kt-select-label\">{{content}}</div>\n\t\t</div>\n\t",
|
|
34
|
+
placeholder: "<div data-kt-select-placeholder class=\"kt-select-placeholder {{class}}\">{{content}}</div>",
|
|
35
|
+
option: "<li data-kt-select-option data-value=\"{{value}}\" data-text=\"{{text}}\" class=\"kt-select-option {{class}}\" role=\"option\" {{selected}} {{disabled}}>{{content}}</li>",
|
|
36
|
+
search: "<div data-kt-select-search class=\"kt-select-search {{class}}\"><input type=\"text\" data-kt-select-search=\"true\" placeholder=\"{{searchPlaceholder}}\" class=\"kt-input kt-select-search-input\" role=\"searchbox\" aria-label=\"{{searchPlaceholder}}\"/></div>",
|
|
37
|
+
empty: "<li data-kt-select-empty class=\"kt-select-no-result {{class}}\" role=\"status\">{{content}}</li>",
|
|
38
|
+
loading: "<li class=\"kt-select-loading {{class}}\" role=\"status\" aria-live=\"polite\">{{content}}</li>",
|
|
39
|
+
tag: "<div data-kt-select-tag=\"true\" class=\"kt-select-tag {{class}}\">\n\t\t\t{{content}}\n\t\t</div>",
|
|
40
|
+
loadMore: "<li class=\"kt-select-load-more {{class}}\" data-kt-select-load-more=\"true\">{{content}}</li>",
|
|
41
|
+
tagRemoveButton: "<button type=\"button\" data-kt-select-remove-button class=\"kt-select-tag-remove\" aria-label=\"Remove tag\" tabindex=\"0\"><svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><line x1=\"3\" y1=\"3\" x2=\"9\" y2=\"9\"/><line x1=\"9\" y1=\"3\" x2=\"3\" y2=\"9\"/></svg></button>",
|
|
46
42
|
};
|
|
47
43
|
/**
|
|
48
44
|
* Default templates for KTSelect component
|
|
@@ -72,9 +68,9 @@ function getTemplateStrings(config) {
|
|
|
72
68
|
? config.templates
|
|
73
69
|
: undefined;
|
|
74
70
|
if (templates) {
|
|
75
|
-
return __assign(__assign(__assign({},
|
|
71
|
+
return __assign(__assign(__assign({}, exports.coreTemplateStrings), userTemplateStrings), templates);
|
|
76
72
|
}
|
|
77
|
-
return __assign(__assign({},
|
|
73
|
+
return __assign(__assign({}, exports.coreTemplateStrings), userTemplateStrings);
|
|
78
74
|
}
|
|
79
75
|
/**
|
|
80
76
|
* Default templates for KTSelect component
|
|
@@ -85,44 +81,38 @@ exports.defaultTemplates = {
|
|
|
85
81
|
*/
|
|
86
82
|
highlight: function (config, text) {
|
|
87
83
|
var template = getTemplateStrings(config).highlight;
|
|
88
|
-
var html = template.replace('{{text}}', text);
|
|
84
|
+
var html = template.replace('{{text}}', text).replace('{{class}}', config.highlightClass || '');
|
|
89
85
|
return stringToElement(html);
|
|
90
86
|
},
|
|
91
87
|
/**
|
|
92
88
|
* Renders the dropdown content
|
|
93
89
|
*/
|
|
94
|
-
|
|
95
|
-
var template = getTemplateStrings(config).
|
|
90
|
+
dropdown: function (config) {
|
|
91
|
+
var template = getTemplateStrings(config).dropdown;
|
|
92
|
+
var content = config.content || '';
|
|
93
|
+
if (config.dropdownTemplate) {
|
|
94
|
+
content = (0, utils_1.renderTemplateString)(config.dropdownTemplate, {
|
|
95
|
+
zindex: config.zindex ? String(config.zindex) : '',
|
|
96
|
+
content: config.content || '',
|
|
97
|
+
class: config.dropdownClass || '',
|
|
98
|
+
});
|
|
99
|
+
}
|
|
96
100
|
var html = template
|
|
97
101
|
.replace('{{zindex}}', config.zindex ? String(config.zindex) : '')
|
|
98
|
-
.replace('{{content}}',
|
|
102
|
+
.replace('{{content}}', content)
|
|
103
|
+
.replace('{{class}}', config.dropdownClass || '');
|
|
99
104
|
return stringToElement(html);
|
|
100
105
|
},
|
|
101
106
|
/**
|
|
102
107
|
* Renders the options container for the dropdown
|
|
103
108
|
*/
|
|
104
|
-
|
|
105
|
-
var template = getTemplateStrings(config).
|
|
109
|
+
options: function (config) {
|
|
110
|
+
var template = getTemplateStrings(config).options;
|
|
106
111
|
var html = template
|
|
107
112
|
.replace('{{label}}', config.label || 'Options')
|
|
108
113
|
.replace('{{height}}', config.height ? String(config.height) : '250')
|
|
109
|
-
.replace('{{options}}', config.options || '')
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
/**
|
|
113
|
-
* Renders an empty option in the dropdown
|
|
114
|
-
*/
|
|
115
|
-
emptyOption: function (config) {
|
|
116
|
-
var template = getTemplateStrings(config).emptyOption;
|
|
117
|
-
var html = template.replace('{{placeholder}}', config.placeholder || 'Select...');
|
|
118
|
-
return stringToElement(html);
|
|
119
|
-
},
|
|
120
|
-
/**
|
|
121
|
-
* Renders an error option in the dropdown
|
|
122
|
-
*/
|
|
123
|
-
errorOption: function (config) {
|
|
124
|
-
var template = getTemplateStrings(config).errorOption;
|
|
125
|
-
var html = template.replace('{{errorMessage}}', config.errorMessage || 'An error occurred');
|
|
114
|
+
.replace('{{options}}', config.options || '')
|
|
115
|
+
.replace('{{class}}', config.optionsClass || '');
|
|
126
116
|
return stringToElement(html);
|
|
127
117
|
},
|
|
128
118
|
/**
|
|
@@ -137,51 +127,41 @@ exports.defaultTemplates = {
|
|
|
137
127
|
*/
|
|
138
128
|
error: function (config) {
|
|
139
129
|
var template = getTemplateStrings(config).error;
|
|
140
|
-
return template
|
|
130
|
+
return template
|
|
131
|
+
.replace('{{errorMessage}}', config.errorMessage || 'An error occurred')
|
|
132
|
+
.replace('{{class}}', config.errorClass || '');
|
|
141
133
|
},
|
|
142
134
|
/**
|
|
143
135
|
* Renders the main container for the select component
|
|
144
136
|
*/
|
|
145
|
-
|
|
146
|
-
var html = getTemplateStrings(config).
|
|
147
|
-
|
|
137
|
+
wrapper: function (config) {
|
|
138
|
+
var html = getTemplateStrings(config).wrapper
|
|
139
|
+
.replace('{{class}}', config.wrapperClass || '');
|
|
140
|
+
var element = stringToElement(html);
|
|
141
|
+
element.setAttribute('data-kt-select-combobox', config.combobox ? 'true' : 'false');
|
|
142
|
+
element.setAttribute('data-kt-select-tags', config.tags ? 'true' : 'false');
|
|
143
|
+
return element;
|
|
148
144
|
},
|
|
149
145
|
/**
|
|
150
146
|
* Renders the display element (trigger) for the select
|
|
151
147
|
*/
|
|
152
148
|
display: function (config) {
|
|
153
|
-
|
|
154
|
-
if (isCombobox) {
|
|
149
|
+
if (config.combobox) {
|
|
155
150
|
var html_1 = getTemplateStrings(config)
|
|
156
|
-
.
|
|
151
|
+
.combobox.replace(/{{placeholder}}/g, config.placeholder || 'Select...')
|
|
157
152
|
.replace(/{{label}}/g, config.label || config.placeholder || 'Select...')
|
|
158
|
-
.replace('{{disabled}}', config.disabled ? 'disabled' : '')
|
|
153
|
+
.replace('{{disabled}}', config.disabled ? 'disabled' : '')
|
|
154
|
+
.replace('{{class}}', config.displayClass || '');
|
|
159
155
|
return stringToElement(html_1);
|
|
160
156
|
}
|
|
161
|
-
var
|
|
162
|
-
|
|
157
|
+
var content = config.label || config.placeholder || 'Select...';
|
|
158
|
+
var html = getTemplateStrings(config).display
|
|
159
|
+
.replace('{{tabindex}}', config.disabled ? '-1' : '0')
|
|
163
160
|
.replace('{{label}}', config.label || config.placeholder || 'Select...')
|
|
164
161
|
.replace('{{disabled}}', config.disabled ? 'aria-disabled="true"' : '')
|
|
165
|
-
.replace('{{placeholder}}', config.placeholder || 'Select...')
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Renders the dropdown content container
|
|
170
|
-
*/
|
|
171
|
-
dropdown: function (config, optionsHtml) {
|
|
172
|
-
var isCombobox = config.mode === types_1.SelectMode.COMBOBOX;
|
|
173
|
-
var hasSearch = config.enableSearch && !isCombobox;
|
|
174
|
-
var template = getTemplateStrings(config).dropdown;
|
|
175
|
-
var searchHtml = '';
|
|
176
|
-
if (hasSearch) {
|
|
177
|
-
var searchElement = exports.defaultTemplates.search(config);
|
|
178
|
-
searchHtml = searchElement.outerHTML;
|
|
179
|
-
}
|
|
180
|
-
var html = template
|
|
181
|
-
.replace('{{search}}', searchHtml)
|
|
182
|
-
.replace('{{options}}', optionsHtml)
|
|
183
|
-
.replace('{{label}}', config.label || 'Options')
|
|
184
|
-
.replace('{{height}}', config.height ? String(config.height) : '250');
|
|
162
|
+
.replace('{{placeholder}}', config.placeholder || 'Select...')
|
|
163
|
+
.replace('{{class}}', config.displayClass || '')
|
|
164
|
+
.replace('{{content}}', content);
|
|
185
165
|
return stringToElement(html);
|
|
186
166
|
},
|
|
187
167
|
/**
|
|
@@ -197,141 +177,102 @@ exports.defaultTemplates = {
|
|
|
197
177
|
var selected = isHtmlOption
|
|
198
178
|
? option.selected
|
|
199
179
|
: !!option.selected;
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
catch (e) {
|
|
212
|
-
// fallback to legacy attributes if JSON is invalid
|
|
213
|
-
description =
|
|
214
|
-
option.getAttribute('data-kt-select-option-description') ||
|
|
215
|
-
undefined;
|
|
216
|
-
icon = option.getAttribute('data-kt-select-option-icon') || undefined;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
else {
|
|
220
|
-
description =
|
|
221
|
-
option.getAttribute('data-kt-select-option-description') || undefined;
|
|
222
|
-
icon = option.getAttribute('data-kt-select-option-icon') || undefined;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
else {
|
|
226
|
-
description = option.description;
|
|
227
|
-
icon = option.icon;
|
|
180
|
+
var content = text;
|
|
181
|
+
if (config.optionTemplate) {
|
|
182
|
+
// Use the user template to render the content, but only for {{content}}
|
|
183
|
+
content = (0, utils_1.renderTemplateString)(config.optionTemplate, {
|
|
184
|
+
value: value,
|
|
185
|
+
text: text,
|
|
186
|
+
class: config.optionClass || '',
|
|
187
|
+
selected: selected ? 'aria-selected="true"' : 'aria-selected="false"',
|
|
188
|
+
disabled: disabled ? 'aria-disabled="true"' : '',
|
|
189
|
+
content: text,
|
|
190
|
+
});
|
|
228
191
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
var html = getTemplateStrings(config)
|
|
233
|
-
.option.replace('{{value}}', value)
|
|
234
|
-
.replace('{{selectedClass}}', selectedClass)
|
|
235
|
-
.replace('{{disabledClass}}', disabledClass)
|
|
192
|
+
var html = getTemplateStrings(config).option
|
|
193
|
+
.replace('{{value}}', value)
|
|
194
|
+
.replace('{{text}}', text)
|
|
236
195
|
.replace('{{selected}}', selected ? 'aria-selected="true"' : 'aria-selected="false"')
|
|
237
196
|
.replace('{{disabled}}', disabled ? 'aria-disabled="true"' : '')
|
|
238
|
-
.replace(
|
|
239
|
-
.replace('{{
|
|
240
|
-
.replace(/{{description}}/g, description
|
|
241
|
-
? exports.defaultTemplates.description(description, config).outerHTML
|
|
242
|
-
: '');
|
|
243
|
-
return stringToElement(html);
|
|
244
|
-
},
|
|
245
|
-
/**
|
|
246
|
-
* Renders an icon
|
|
247
|
-
*/
|
|
248
|
-
icon: function (icon, config) {
|
|
249
|
-
var html = getTemplateStrings(config).icon.replace('{{icon}}', icon);
|
|
250
|
-
return stringToElement(html);
|
|
251
|
-
},
|
|
252
|
-
/**
|
|
253
|
-
* Renders a description
|
|
254
|
-
*/
|
|
255
|
-
description: function (description, config) {
|
|
256
|
-
var html = getTemplateStrings(config).description.replace('{{description}}', description);
|
|
257
|
-
return stringToElement(html);
|
|
258
|
-
},
|
|
259
|
-
/**
|
|
260
|
-
* Renders an option group with header
|
|
261
|
-
*/
|
|
262
|
-
optionGroup: function (label, optionsHtml, config) {
|
|
263
|
-
var html = getTemplateStrings(config)
|
|
264
|
-
.optionGroup.replace(/{{label}}/g, label)
|
|
265
|
-
.replace('{{optionsHtml}}', optionsHtml);
|
|
197
|
+
.replace('{{content}}', content)
|
|
198
|
+
.replace('{{class}}', config.optionClass || '');
|
|
266
199
|
return stringToElement(html);
|
|
267
200
|
},
|
|
268
201
|
/**
|
|
269
202
|
* Renders the search input
|
|
270
203
|
*/
|
|
271
204
|
search: function (config) {
|
|
272
|
-
var html = getTemplateStrings(config)
|
|
205
|
+
var html = getTemplateStrings(config)
|
|
206
|
+
.search.replace('{{searchPlaceholder}}', config.searchPlaceholder || 'Search...')
|
|
207
|
+
.replace('{{class}}', config.searchClass || '');
|
|
273
208
|
return stringToElement(html);
|
|
274
209
|
},
|
|
275
210
|
/**
|
|
276
211
|
* Renders the no results message
|
|
277
212
|
*/
|
|
278
|
-
|
|
279
|
-
var html = getTemplateStrings(config)
|
|
213
|
+
empty: function (config) {
|
|
214
|
+
var html = getTemplateStrings(config)
|
|
215
|
+
.empty.replace('{{searchNotFoundText}}', config.searchNotFoundText || 'No results found')
|
|
216
|
+
.replace('{{class}}', config.emptyClass || '');
|
|
280
217
|
return stringToElement(html);
|
|
281
218
|
},
|
|
282
219
|
/**
|
|
283
220
|
* Renders the loading state
|
|
284
221
|
*/
|
|
285
222
|
loading: function (config, loadingMessage) {
|
|
286
|
-
var html = getTemplateStrings(config)
|
|
223
|
+
var html = getTemplateStrings(config)
|
|
224
|
+
.loading.replace('{{loadingMessage}}', loadingMessage || 'Loading options...')
|
|
225
|
+
.replace('{{class}}', config.loadingClass || '');
|
|
287
226
|
return stringToElement(html);
|
|
288
227
|
},
|
|
289
228
|
/**
|
|
290
229
|
* Renders a tag for multi-select
|
|
291
230
|
*/
|
|
292
231
|
tag: function (option, config) {
|
|
293
|
-
|
|
294
|
-
var
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
232
|
+
var template = getTemplateStrings(config).tag;
|
|
233
|
+
var content = option.title;
|
|
234
|
+
if (config.tagTemplate) {
|
|
235
|
+
var tagTemplate_1 = config.tagTemplate;
|
|
236
|
+
var text = option.getAttribute('data-text');
|
|
237
|
+
var value = option.getAttribute('data-value');
|
|
238
|
+
// Replace all {{varname}} in option.innerHTML with values from _config
|
|
239
|
+
Object.entries(config.optionsConfig[value] || {}).forEach(function (_a) {
|
|
240
|
+
var key = _a[0], value = _a[1];
|
|
241
|
+
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
|
|
242
|
+
tagTemplate_1 = tagTemplate_1.replace(new RegExp("{{".concat(key, "}}"), 'g'), String(value));
|
|
243
|
+
}
|
|
304
244
|
});
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
245
|
+
content = (0, utils_1.renderTemplateString)(tagTemplate_1, {
|
|
246
|
+
title: option.title,
|
|
247
|
+
id: option.id,
|
|
248
|
+
class: config.tagClass || '',
|
|
249
|
+
content: option.innerHTML,
|
|
250
|
+
text: option.innerText,
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
content += getTemplateStrings(config).tagRemoveButton;
|
|
254
|
+
var html = template
|
|
255
|
+
.replace('{{title}}', option.title)
|
|
310
256
|
.replace('{{id}}', option.id)
|
|
311
|
-
.replace('{{
|
|
257
|
+
.replace('{{content}}', content)
|
|
258
|
+
.replace('{{class}}', config.tagClass || '');
|
|
312
259
|
return stringToElement(html);
|
|
313
260
|
},
|
|
314
261
|
/**
|
|
315
|
-
*
|
|
262
|
+
* Renders the placeholder for the select
|
|
316
263
|
*/
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
if (config.
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
}
|
|
326
|
-
if (config.showSelectedCount) {
|
|
327
|
-
var count = selectedOptions.length;
|
|
328
|
-
return "".concat(count, " ").concat(count === 1 ? 'item' : 'items', " selected");
|
|
329
|
-
}
|
|
330
|
-
return selectedOptions.map(function (option) { return option.title; }).join(', ');
|
|
331
|
-
}
|
|
332
|
-
else {
|
|
333
|
-
return selectedOptions[0].title;
|
|
264
|
+
placeholder: function (config) {
|
|
265
|
+
var html = getTemplateStrings(config)
|
|
266
|
+
.placeholder.replace('{{class}}', config.placeholderClass || '');
|
|
267
|
+
var content = config.placeholder || 'Select...';
|
|
268
|
+
if (config.placeholderTemplate) {
|
|
269
|
+
content = (0, utils_1.renderTemplateString)(config.placeholderTemplate, {
|
|
270
|
+
placeholder: config.placeholder || 'Select...',
|
|
271
|
+
class: config.placeholderClass || '',
|
|
272
|
+
});
|
|
334
273
|
}
|
|
274
|
+
html = html.replace('{{content}}', content);
|
|
275
|
+
return stringToElement(html);
|
|
335
276
|
},
|
|
336
277
|
};
|
|
337
278
|
//# sourceMappingURL=templates.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../../../src/components/select/templates.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../../../src/components/select/templates.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;AAiHH,gDAIC;AAMD,gDAaC;AArID,iCAA+C;AAE/C;;;GAGG;AACU,QAAA,mBAAmB,GAAG;IAClC,QAAQ,EAAE,6HAAyH;IACnI,OAAO,EAAE,sIAA8H;IACvI,KAAK,EAAE,+DAA2D;IAClE,SAAS,EAAE,oGAAkG;IAC7G,OAAO,EAAE,0EAAwE;IACjF,QAAQ,EAAE,+0BAUT;IACD,OAAO,EAAE,sUAIR;IACD,WAAW,EAAE,6FAA2F;IACxG,MAAM,EAAE,2KAAmK;IAC3K,MAAM,EAAE,qQAAuP;IAC/P,KAAK,EAAE,mGAA+F;IACtG,OAAO,EAAE,iGAA2F;IACpG,GAAG,EAAE,oGAEG;IACR,QAAQ,EAAE,gGAA4F;IACtG,eAAe,EAAE,mVAA+S;CAChU,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,EAAE,OAAO,CAAC;aAC/B,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;QAC9C,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,WAAW,EAAE,UAAC,MAA+B;QAC5C,IAAI,IAAI,GAAG,kBAAkB,CAAC,MAAM,CAAC;aACnC,WAAW,CAAC,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC,gBAAgB,IAAI,EAAE,CAAC,CAAC;QAElE,IAAI,OAAO,GAAG,MAAM,CAAC,WAAW,IAAI,WAAW,CAAC;QAEhD,IAAI,MAAM,CAAC,mBAAmB,EAAE,CAAC;YAChC,OAAO,GAAG,IAAA,4BAAoB,EAAC,MAAM,CAAC,mBAAmB,EAAE;gBAC1D,WAAW,EAAE,MAAM,CAAC,WAAW,IAAI,WAAW;gBAC9C,KAAK,EAAE,MAAM,CAAC,gBAAgB,IAAI,EAAE;aACpC,CAAC,CAAC;QACJ,CAAC;QAED,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QAC5C,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACD,CAAC"}
|
|
@@ -4,16 +4,4 @@
|
|
|
4
4
|
* Copyright 2025 by Keenthemes Inc
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.SelectMode = void 0;
|
|
8
|
-
/**
|
|
9
|
-
* Common type interfaces for the KTSelect component
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* Select mode options
|
|
13
|
-
*/
|
|
14
|
-
var SelectMode;
|
|
15
|
-
(function (SelectMode) {
|
|
16
|
-
SelectMode["TAGS"] = "tags";
|
|
17
|
-
SelectMode["COMBOBOX"] = "combobox";
|
|
18
|
-
})(SelectMode || (exports.SelectMode = SelectMode = {}));
|
|
19
7
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/select/types.ts"],"names":[],"mappings":";AAAA;;;GAGG
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/select/types.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|