@sankhyalabs/ezui 7.1.0-dev.16 → 7.1.0-dev.17
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/ez-combo-box-list_4.cjs.entry.js +1 -1
- package/dist/cjs/ez-form-view.cjs.entry.js +2 -1
- package/dist/cjs/ez-grid.cjs.entry.js +1 -1
- package/dist/cjs/ez-search-plus.cjs.entry.js +16 -2
- package/dist/cjs/ez-search.cjs.entry.js +28 -24
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{purify-453a8028.js → purify-b30a5718.js} +8 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js +3 -1
- package/dist/collection/components/ez-search/ez-search.js +41 -19
- package/dist/collection/components/ez-search-plus/ez-search-plus.js +16 -2
- package/dist/custom-elements/index.js +64 -39
- package/dist/esm/ez-combo-box-list_4.entry.js +1 -1
- package/dist/esm/ez-form-view.entry.js +2 -1
- package/dist/esm/ez-grid.entry.js +1 -1
- package/dist/esm/ez-search-plus.entry.js +16 -2
- package/dist/esm/ez-search.entry.js +23 -19
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{purify-003c47e2.js → purify-9357603c.js} +8 -2
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-301c27f6.entry.js +1 -0
- package/dist/ezui/{p-99fef4da.entry.js → p-377768bd.entry.js} +1 -1
- package/dist/ezui/{p-e03b2f19.entry.js → p-adaa2a81.entry.js} +1 -1
- package/dist/ezui/p-df316d40.entry.js +1 -0
- package/dist/ezui/{p-bb409cba.js → p-dff9862b.js} +2 -2
- package/dist/ezui/p-eca050b4.entry.js +1 -0
- package/dist/types/components/ez-search/ez-search.d.ts +5 -6
- package/dist/types/components/ez-search-plus/ez-search-plus.d.ts +1 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/ezui/p-0b333f09.entry.js +0 -1
- package/dist/ezui/p-4e1df756.entry.js +0 -1
- package/dist/ezui/p-e46a4d06.entry.js +0 -1
|
@@ -4789,13 +4789,13 @@ var CustomRenderSource;
|
|
|
4789
4789
|
CustomRenderSource["FORM"] = "FORM";
|
|
4790
4790
|
})(CustomRenderSource || (CustomRenderSource = {}));
|
|
4791
4791
|
|
|
4792
|
-
var SearchMode$
|
|
4792
|
+
var SearchMode$1;
|
|
4793
4793
|
(function (SearchMode) {
|
|
4794
4794
|
SearchMode["ADVANCED"] = "ADVANCED";
|
|
4795
4795
|
SearchMode["PREDICTIVE"] = "PREDICTIVE";
|
|
4796
4796
|
SearchMode["LOAD_DESCRIPTION"] = "LOAD_DESCRIPTION";
|
|
4797
4797
|
SearchMode["PRELOAD"] = "PRELOAD";
|
|
4798
|
-
})(SearchMode$
|
|
4798
|
+
})(SearchMode$1 || (SearchMode$1 = {}));
|
|
4799
4799
|
|
|
4800
4800
|
var FormLayout;
|
|
4801
4801
|
(function (FormLayout) {
|
|
@@ -7755,7 +7755,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
7755
7755
|
observeOptions(newOptions, oldOptions) {
|
|
7756
7756
|
if (ObjectUtils$1.equals(newOptions, oldOptions))
|
|
7757
7757
|
return;
|
|
7758
|
-
this.loadOptions(SearchMode
|
|
7758
|
+
this.loadOptions(SearchMode.PRELOAD);
|
|
7759
7759
|
}
|
|
7760
7760
|
/*
|
|
7761
7761
|
* Retorna uma promise com o valor da opção selecionada,
|
|
@@ -8000,7 +8000,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
8000
8000
|
});
|
|
8001
8001
|
}
|
|
8002
8002
|
}
|
|
8003
|
-
this.loadOptions(SearchMode
|
|
8003
|
+
this.loadOptions(SearchMode.PRELOAD);
|
|
8004
8004
|
}
|
|
8005
8005
|
setResizeObserver() {
|
|
8006
8006
|
this._resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -8080,7 +8080,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
8080
8080
|
keyDownHandler(event) {
|
|
8081
8081
|
var _a, _b, _c, _d, _e, _f;
|
|
8082
8082
|
if (event.ctrlKey && (event.key === "f" || event.key === "F")) {
|
|
8083
|
-
this.loadOptions(SearchMode
|
|
8083
|
+
this.loadOptions(SearchMode.ADVANCED);
|
|
8084
8084
|
event.preventDefault();
|
|
8085
8085
|
event.stopPropagation();
|
|
8086
8086
|
return;
|
|
@@ -8146,12 +8146,12 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
8146
8146
|
}; }
|
|
8147
8147
|
static get style() { return ezComboBoxCss; }
|
|
8148
8148
|
};
|
|
8149
|
-
var SearchMode
|
|
8149
|
+
var SearchMode;
|
|
8150
8150
|
(function (SearchMode) {
|
|
8151
8151
|
SearchMode["ADVANCED"] = "ADVANCED";
|
|
8152
8152
|
SearchMode["PRELOAD"] = "PRELOAD";
|
|
8153
8153
|
SearchMode["PREDICTIVE"] = "PREDICTIVE";
|
|
8154
|
-
})(SearchMode
|
|
8154
|
+
})(SearchMode || (SearchMode = {}));
|
|
8155
8155
|
|
|
8156
8156
|
const ezComboBoxListCss = ":host{--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box--line-height:calc(var(--text--medium, 14px) + 4px);--ez-combo-box__list-title--primary:var(--title--primary, #2B3A54);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium) + 4px);--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);--ez-combo-box__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-combo-box__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-combo-box__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-combo-box__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-combo-box__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-combo-box__scrollbar--width:var(--space--medium, 12px);--ez-combo-box__list-container--padding:var(--space--extra-small, 3px)}.list-container{padding-top:var(--ez-combo-box__list-container--padding)}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small) + 9px);background-color:var(--ez-combo-box--background-color--xlight);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow--medium, 0 8px 24px 0 rgba(43, 58, 84, 0.10));padding:var(--ez-combo-box--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;padding:0;margin:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow:auto;scrollbar-width:thin;gap:3px;scrollbar-color:var(--ez-combo-box__scrollbar--color-clicked) var(--ez-combo-box__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--ez-combo-box__scrollbar--color-background);width:var(--ez-combo-box__scrollbar--width);max-width:var(--ez-combo-box__scrollbar--width);min-width:var(--ez-combo-box__scrollbar--width)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-combo-box__scrollbar--color-background);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-combo-box__scrollbar--color-default);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-combo-box__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-combo-box__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-combo-box--border-radius-small);padding:var(--ez-combo-box--space--small);min-height:var(--ez-combo-box__list-height);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size);line-height:var(--ez-combo-box--line-height)}.item__label{font-weight:var(--ez-combo-box--font-weight--medium)}.item__label--bold{font-weight:var(--ez-combo-box--font-weight--large)}.item__value{text-align:center;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-combo-box__list-height)}.message__no-result{color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-combo-box__list-title--primary);border-top:3px solid transparent}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
|
|
8157
8157
|
|
|
@@ -10974,8 +10974,9 @@ const buildSearchPlus$1 = ({ name, label, readOnly, contextName, canShowError, o
|
|
|
10974
10974
|
|
|
10975
10975
|
const buildSearch$1 = ({ name, label, readOnly, required, contextName, canShowError, optionLoader, props }) => {
|
|
10976
10976
|
var _a;
|
|
10977
|
+
const hasDescriptionField = !StringUtils$1.isEmpty(props === null || props === void 0 ? void 0 : props.DESCRIPTIONFIELD);
|
|
10977
10978
|
return (h("div", { class: "ez-col ez-col--sd-12" },
|
|
10978
|
-
h("ez-search", { class: "ez-input__no-margin", enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader, ignoreLimitCharsToSearch: (_a = props === null || props === void 0 ? void 0 : props.ignoreLimitCharsToSearch) !== null && _a !== void 0 ? _a : false })));
|
|
10979
|
+
h("ez-search", { class: "ez-input__no-margin", enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader, ignoreLimitCharsToSearch: (_a = props === null || props === void 0 ? void 0 : props.ignoreLimitCharsToSearch) !== null && _a !== void 0 ? _a : false, hideDescriptionInput: !hasDescriptionField })));
|
|
10979
10980
|
};
|
|
10980
10981
|
|
|
10981
10982
|
const buildRichText = ({ name, label, readOnly, contextName, rows, canShowError }) => {
|
|
@@ -75882,7 +75883,7 @@ var MenuModule = {
|
|
|
75882
75883
|
};
|
|
75883
75884
|
|
|
75884
75885
|
var purify = createCommonjsModule(function (module, exports) {
|
|
75885
|
-
/*! @license DOMPurify 3.3.
|
|
75886
|
+
/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */
|
|
75886
75887
|
|
|
75887
75888
|
(function (global, factory) {
|
|
75888
75889
|
module.exports = factory() ;
|
|
@@ -76192,7 +76193,7 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
76192
76193
|
function createDOMPurify() {
|
|
76193
76194
|
let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
|
|
76194
76195
|
const DOMPurify = root => createDOMPurify(root);
|
|
76195
|
-
DOMPurify.version = '3.3.
|
|
76196
|
+
DOMPurify.version = '3.3.1';
|
|
76196
76197
|
DOMPurify.removed = [];
|
|
76197
76198
|
if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
|
|
76198
76199
|
// Not running in a browser, provide a factory function
|
|
@@ -76538,6 +76539,12 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
76538
76539
|
}
|
|
76539
76540
|
addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
|
|
76540
76541
|
}
|
|
76542
|
+
if (cfg.ADD_FORBID_CONTENTS) {
|
|
76543
|
+
if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
|
|
76544
|
+
FORBID_CONTENTS = clone(FORBID_CONTENTS);
|
|
76545
|
+
}
|
|
76546
|
+
addToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);
|
|
76547
|
+
}
|
|
76541
76548
|
/* Add #text in case KEEP_CONTENT is set to true */
|
|
76542
76549
|
if (KEEP_CONTENT) {
|
|
76543
76550
|
ALLOWED_TAGS['#text'] = true;
|
|
@@ -84203,6 +84210,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
84203
84210
|
this.alternativePlaceholder = undefined;
|
|
84204
84211
|
this.showMore = undefined;
|
|
84205
84212
|
this.suppressInputPersist = false;
|
|
84213
|
+
this.hideDescriptionInput = false;
|
|
84206
84214
|
}
|
|
84207
84215
|
observeErrorMessage() {
|
|
84208
84216
|
var _a;
|
|
@@ -84248,7 +84256,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
84248
84256
|
return;
|
|
84249
84257
|
if ((newOptions === null || newOptions === void 0 ? void 0 : newOptions.join('')) === (oldOptions === null || oldOptions === void 0 ? void 0 : oldOptions.join('')))
|
|
84250
84258
|
return;
|
|
84251
|
-
this.loadOptions(SearchMode.PRELOAD);
|
|
84259
|
+
this.loadOptions(SearchMode$1.PRELOAD);
|
|
84252
84260
|
}
|
|
84253
84261
|
/*
|
|
84254
84262
|
* Retorna uma promise com o valor da opção selecionada,
|
|
@@ -84510,7 +84518,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
84510
84518
|
}
|
|
84511
84519
|
}
|
|
84512
84520
|
async loadDescriptionValue(argument) {
|
|
84513
|
-
var _a, _b;
|
|
84521
|
+
var _a, _b, _c;
|
|
84514
84522
|
if (argument == undefined) {
|
|
84515
84523
|
return;
|
|
84516
84524
|
}
|
|
@@ -84518,21 +84526,30 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
84518
84526
|
this.loadOptionValue(argument);
|
|
84519
84527
|
return;
|
|
84520
84528
|
}
|
|
84529
|
+
const searchMode = this.hideDescriptionInput ? SearchMode$1.LOAD_DESCRIPTION : SearchMode$1.PREDICTIVE;
|
|
84521
84530
|
const searchArgument = {
|
|
84522
|
-
mode:
|
|
84531
|
+
mode: searchMode,
|
|
84523
84532
|
argument
|
|
84524
84533
|
};
|
|
84525
|
-
|
|
84526
|
-
|
|
84527
|
-
|
|
84528
|
-
|
|
84529
|
-
|
|
84530
|
-
source
|
|
84531
|
-
|
|
84532
|
-
|
|
84534
|
+
try {
|
|
84535
|
+
const source = await ((_b = this.optionLoader) === null || _b === void 0 ? void 0 : _b.call(this, searchArgument, this.contextProperties));
|
|
84536
|
+
if (source == undefined) {
|
|
84537
|
+
return;
|
|
84538
|
+
}
|
|
84539
|
+
if (source instanceof Promise) {
|
|
84540
|
+
source.then((result) => {
|
|
84541
|
+
this.setDescriptionValue(result);
|
|
84542
|
+
});
|
|
84543
|
+
}
|
|
84544
|
+
else {
|
|
84545
|
+
this.setDescriptionValue(source);
|
|
84546
|
+
}
|
|
84533
84547
|
}
|
|
84534
|
-
|
|
84535
|
-
|
|
84548
|
+
catch (error) {
|
|
84549
|
+
if (((_c = error === null || error === void 0 ? void 0 : error.constructor) === null || _c === void 0 ? void 0 : _c.name) === "WarningException") {
|
|
84550
|
+
this.errorMessage = error.message;
|
|
84551
|
+
}
|
|
84552
|
+
throw error;
|
|
84536
84553
|
}
|
|
84537
84554
|
}
|
|
84538
84555
|
setDescriptionValue(source) {
|
|
@@ -84667,7 +84684,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
84667
84684
|
// Event handlers
|
|
84668
84685
|
//---------------------------------------------
|
|
84669
84686
|
handlerIconClick() {
|
|
84670
|
-
this.loadOptions(SearchMode.ADVANCED);
|
|
84687
|
+
this.loadOptions(SearchMode$1.ADVANCED);
|
|
84671
84688
|
}
|
|
84672
84689
|
buildNumberArgument(argument) {
|
|
84673
84690
|
if (this.isTextSearch) {
|
|
@@ -84696,7 +84713,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
84696
84713
|
if (this.ignoreLimitCharsToSearch || !isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch) {
|
|
84697
84714
|
this._showLoading = true;
|
|
84698
84715
|
this._changeDeboucingTimeout = window.setTimeout(() => {
|
|
84699
|
-
this.loadOptions(SearchMode.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
|
|
84716
|
+
this.loadOptions(SearchMode$1.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
|
|
84700
84717
|
}, this._deboucingTime);
|
|
84701
84718
|
this.showOptions();
|
|
84702
84719
|
}
|
|
@@ -84720,7 +84737,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
84720
84737
|
this._tabPressed = false;
|
|
84721
84738
|
if (event.ctrlKey) {
|
|
84722
84739
|
if (event.key === "f" || event.key === "F") {
|
|
84723
|
-
this.loadOptions(SearchMode.ADVANCED);
|
|
84740
|
+
this.loadOptions(SearchMode$1.ADVANCED);
|
|
84724
84741
|
//ATENÇÃO: Ctrl + F tem ação específica nos browsers
|
|
84725
84742
|
//nesse caso, como vamos abrir o popup de busca avançada,
|
|
84726
84743
|
//não é interessante deixar o evento propagar;
|
|
@@ -84789,7 +84806,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
84789
84806
|
if (!this.optionLoader)
|
|
84790
84807
|
return;
|
|
84791
84808
|
const argument = (_b = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : "";
|
|
84792
|
-
const searchArgument = { mode: SearchMode.ADVANCED, argument };
|
|
84809
|
+
const searchArgument = { mode: SearchMode$1.ADVANCED, argument };
|
|
84793
84810
|
const selectedOption = await this.optionLoader(searchArgument, this.contextProperties);
|
|
84794
84811
|
if (selectedOption && !Array.isArray(selectedOption)) {
|
|
84795
84812
|
this.selectOption(selectedOption);
|
|
@@ -84816,12 +84833,6 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
84816
84833
|
}; }
|
|
84817
84834
|
static get style() { return ezSearchCss; }
|
|
84818
84835
|
};
|
|
84819
|
-
var SearchMode;
|
|
84820
|
-
(function (SearchMode) {
|
|
84821
|
-
SearchMode["ADVANCED"] = "ADVANCED";
|
|
84822
|
-
SearchMode["PRELOAD"] = "PRELOAD";
|
|
84823
|
-
SearchMode["PREDICTIVE"] = "PREDICTIVE";
|
|
84824
|
-
})(SearchMode || (SearchMode = {}));
|
|
84825
84836
|
|
|
84826
84837
|
const ezSearchPlusCss = ":host{--ez-search--height:42px;--ez-search--width:100%;--ez-search__icon--width:48px;--ez-search--border-radius:var(--border--radius-medium, 12px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-color--xlight:var(--background--xlight, #fff);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px);--ez-search__input--background-color:var(--background--medium, #e0e0e0);--ez-search__input--border:var(--border--medium, 2px solid);--ez-search__input--border-color:var(--ez-search__input--background-color);--ez-search__input--focus--border-color:var(--color--primary, #008561);--ez-search__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-search__input--disabled--color:var(--text--disable, #AFB6C0);--ez-search__input--error--border-color:#CC2936;--ez-search__btn--color:var(--title--primary, #2B3A54);--ez-search__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-search__btn-hover--color:var(--color--primary, #4e4e4e);--ez-search__label--color:var(--title--primary, #2B3A54);--ez-search__list-title--primary:var(--title--primary, #2B3A54);--ez-search__list-text--primary:var(--text--primary, #626e82);--ez-search__list-height:calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);--ez-search__list-min-width:64px;--ez-search--space--medium:var(--space--medium, 12px);--ez-search--space--small:var(--space--small, 6px);--ez-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-search__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-search--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{min-width:var(--ez-search__list-min-width);overflow:auto;position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:350px;min-width:150px;background-color:var(--ez-search--background-color--xlight);border-radius:var(--ez-search--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.list-options{margin-top:0px;box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--ez-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--scrollbar--background);width:var(--space--small);max-width:var(--space--small);min-width:var(--space--small);height:var(--space--small);max-height:var(--space--small);min-height:var(--space--small)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-search__scrollbar--color-background);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-search__scrollbar--color-default);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-search__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-search--border-radius-small);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size);line-height:var(--ez-search--line-height)}.item__label{font-weight:var(--ez-search--font-weight--medium)}.item__label--bold{font-weight:var(--ez-search--font-weight--large)}.item__value{text-align:center;color:var(--ez-search__list-text--primary);font-weight:var(--ez-search--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-search__list-height)}.message__no-result{color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-search__list-title--primary);border-top:3px solid transparent}.item__list>li:hover{background-color:var(--ez-search--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-search__btn--color)}.btn:disabled{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:hover{color:var(--ez-search__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@supports not (scrollbar-width: thin){.item{padding-right:8px}}.ez-search-plus__container{display:flex;flex-grow:1;gap:3px}.ez-search-plus__text-input{--ez-text-input--border-top-left-radius:0px;--ez-text-input--border-bottom-left-radius:0px;outline:none}.ez-search-plus__code-input-no-border{--ez-text-input--border-top-right-radius:0px;--ez-text-input--border-bottom-right-radius:0px}.ez-search-plus__code-input{max-width:85px}.ez-search-plus__code-input-full{width:100%}.description-input-container{width:100%;outline:none}";
|
|
84827
84838
|
|
|
@@ -84833,6 +84844,7 @@ const EzSearchPlus$1 = class extends HTMLElement$1 {
|
|
|
84833
84844
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
84834
84845
|
this.SEARCH_DESCRIPTION_TIMEOUT = 300;
|
|
84835
84846
|
this.INTERVAL_TO_RETRY_ASYNC_VALUE = 100;
|
|
84847
|
+
this._ignoreNextValue = false;
|
|
84836
84848
|
this.value = undefined;
|
|
84837
84849
|
this.enabled = true;
|
|
84838
84850
|
this.disableCodeInput = false;
|
|
@@ -84865,6 +84877,11 @@ const EzSearchPlus$1 = class extends HTMLElement$1 {
|
|
|
84865
84877
|
this.showLoading = true;
|
|
84866
84878
|
}
|
|
84867
84879
|
async observeValue(newValue, oldValue) {
|
|
84880
|
+
var _a;
|
|
84881
|
+
if (this._ignoreNextValue) {
|
|
84882
|
+
this._ignoreNextValue = false;
|
|
84883
|
+
return;
|
|
84884
|
+
}
|
|
84868
84885
|
const newNormalizedValue = this.normalizeValueToCodeValue(newValue);
|
|
84869
84886
|
const oldNormalizedValue = this.normalizeValueToCodeValue(oldValue);
|
|
84870
84887
|
if (newNormalizedValue === oldNormalizedValue) {
|
|
@@ -84884,12 +84901,17 @@ const EzSearchPlus$1 = class extends HTMLElement$1 {
|
|
|
84884
84901
|
}
|
|
84885
84902
|
}
|
|
84886
84903
|
catch (err) {
|
|
84887
|
-
this.
|
|
84904
|
+
this._ignoreNextValue = true;
|
|
84905
|
+
this.clearSearch();
|
|
84888
84906
|
console.warn("[EzSearchPlus] Erro ao obter descrição do registro.", err);
|
|
84907
|
+
if (((_a = err === null || err === void 0 ? void 0 : err.constructor) === null || _a === void 0 ? void 0 : _a.name) === "WarningException") {
|
|
84908
|
+
this.errorMessage = err.message;
|
|
84909
|
+
}
|
|
84889
84910
|
throw err;
|
|
84890
84911
|
}
|
|
84891
84912
|
this.value = this.buildCurrentValue();
|
|
84892
84913
|
this.ezChange.emit(this.value);
|
|
84914
|
+
this.errorMessage = null;
|
|
84893
84915
|
}
|
|
84894
84916
|
canShowLoadSpinDescription() {
|
|
84895
84917
|
return this.isLoadingDescription;
|
|
@@ -84968,8 +84990,11 @@ const EzSearchPlus$1 = class extends HTMLElement$1 {
|
|
|
84968
84990
|
}
|
|
84969
84991
|
clearSearch() {
|
|
84970
84992
|
this.value = null;
|
|
84993
|
+
this.codeValue = null;
|
|
84971
84994
|
this.descriptionValue = null;
|
|
84972
|
-
this.
|
|
84995
|
+
if (!this.hideDescriptionInput) {
|
|
84996
|
+
this._textInputDescriptionValue.value = null;
|
|
84997
|
+
}
|
|
84973
84998
|
}
|
|
84974
84999
|
getCodLabel() {
|
|
84975
85000
|
var _a;
|
|
@@ -85025,7 +85050,7 @@ const EzSearchPlus$1 = class extends HTMLElement$1 {
|
|
|
85025
85050
|
}
|
|
85026
85051
|
try {
|
|
85027
85052
|
this.isLoadingDescription = true;
|
|
85028
|
-
const searchArgument = { mode: SearchMode$
|
|
85053
|
+
const searchArgument = { mode: SearchMode$1.LOAD_DESCRIPTION, argument: codeValue };
|
|
85029
85054
|
const loadedOption = await this.optionLoader(searchArgument);
|
|
85030
85055
|
if (!loadedOption) {
|
|
85031
85056
|
return "";
|
|
@@ -85053,7 +85078,7 @@ const EzSearchPlus$1 = class extends HTMLElement$1 {
|
|
|
85053
85078
|
console.warn(this.i18n("ez-search-plus.optionLoaderNotDefined"));
|
|
85054
85079
|
return;
|
|
85055
85080
|
}
|
|
85056
|
-
const searchArgument = { mode: SearchMode$
|
|
85081
|
+
const searchArgument = { mode: SearchMode$1.ADVANCED, argument: "" };
|
|
85057
85082
|
let selectedItem = undefined;
|
|
85058
85083
|
try {
|
|
85059
85084
|
selectedItem = await this.optionLoader(searchArgument, this.contextProperties);
|
|
@@ -85111,7 +85136,7 @@ const EzSearchPlus$1 = class extends HTMLElement$1 {
|
|
|
85111
85136
|
async processOptionsLoader(argument) {
|
|
85112
85137
|
try {
|
|
85113
85138
|
this.showLoading = true;
|
|
85114
|
-
const searchArgument = { mode: SearchMode$
|
|
85139
|
+
const searchArgument = { mode: SearchMode$1.PREDICTIVE, argument };
|
|
85115
85140
|
const options = await this.optionLoader(searchArgument);
|
|
85116
85141
|
this.visibleOptions = this.parseSearchOptions(options);
|
|
85117
85142
|
}
|
|
@@ -93938,7 +93963,7 @@ const EzRichToolbarConfigs = /*@__PURE__*/proxyCustomElement(EzRichToolbarConfig
|
|
|
93938
93963
|
const EzRichToolbarItem = /*@__PURE__*/proxyCustomElement(EzRichToolbarItem$1, [2,"ez-rich-toolbar-item",{"icon":[1],"command":[1],"title":[1],"value":[1]}]);
|
|
93939
93964
|
const EzRichToolbarLetters = /*@__PURE__*/proxyCustomElement(EzRichToolbarLetters$1, [2,"ez-rich-toolbar-letters"]);
|
|
93940
93965
|
const EzScroller = /*@__PURE__*/proxyCustomElement(EzScroller$1, [1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"isActive":[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]);
|
|
93941
|
-
const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"contextProperties":[8,"context-properties"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"stopPropagateEnterKeyEvent":[4,"stop-propagate-enter-key-event"],"mode":[513],"canShowError":[516,"can-show-error"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"ignoreLimitCharsToSearch":[4,"ignore-limit-chars-to-search"],"options":[1040],"suppressSearch":[4,"suppress-search"],"ensureClearButtonVisible":[4,"ensure-clear-button-visible"],"suppressPreLoad":[4,"suppress-pre-load"],"autoFocus":[4,"auto-focus"],"alternativePlaceholder":[513,"alternative-placeholder"],"showMore":[4,"show-more"],"suppressInputPersist":[1028,"suppress-input-persist"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_showLoadingDescription":[32],"_criteria":[32]}]);
|
|
93966
|
+
const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"contextProperties":[8,"context-properties"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"stopPropagateEnterKeyEvent":[4,"stop-propagate-enter-key-event"],"mode":[513],"canShowError":[516,"can-show-error"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"ignoreLimitCharsToSearch":[4,"ignore-limit-chars-to-search"],"options":[1040],"suppressSearch":[4,"suppress-search"],"ensureClearButtonVisible":[4,"ensure-clear-button-visible"],"suppressPreLoad":[4,"suppress-pre-load"],"autoFocus":[4,"auto-focus"],"alternativePlaceholder":[513,"alternative-placeholder"],"showMore":[4,"show-more"],"suppressInputPersist":[1028,"suppress-input-persist"],"hideDescriptionInput":[1540,"hide-description-input"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_showLoadingDescription":[32],"_criteria":[32]}]);
|
|
93942
93967
|
const EzSearchPlus = /*@__PURE__*/proxyCustomElement(EzSearchPlus$1, [1,"ez-search-plus",{"value":[1537],"enabled":[1540],"disableCodeInput":[1540,"disable-code-input"],"disableDescriptionInput":[1540,"disable-description-input"],"label":[1537],"codLabel":[1537,"cod-label"],"hideDescriptionInput":[1540,"hide-description-input"],"canShowError":[516,"can-show-error"],"errorMessage":[1537,"error-message"],"mode":[513],"contextProperties":[8,"context-properties"],"optionLoader":[16],"showOptionValue":[4,"show-option-value"],"stopPropagateEnterKeyEvent":[4,"stop-propagate-enter-key-event"],"autoFocus":[4,"auto-focus"],"showSelectedValue":[4,"show-selected-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"ignoreLimitCharsToSearch":[4,"ignore-limit-chars-to-search"],"suppressSearch":[4,"suppress-search"],"suppressPreLoad":[4,"suppress-pre-load"],"ensureClearButtonVisible":[4,"ensure-clear-button-visible"],"descriptionValue":[32],"codeValue":[32],"isLoadingDescription":[32],"searchDescriptionIsOpen":[32],"visibleOptions":[32],"showLoading":[32]}]);
|
|
93943
93968
|
const EzSearchResultList = /*@__PURE__*/proxyCustomElement(EzSearchResultList$1, [1,"ez-search-result-list",{"showLoading":[4,"show-loading"],"visibleOptions":[16],"value":[1],"showOptionValue":[4,"show-option-value"],"_preSelection":[32]}]);
|
|
93944
93969
|
const EzSidebarButton = /*@__PURE__*/proxyCustomElement(EzSidebarButton$1, [1,"ez-sidebar-button"]);
|
|
@@ -3,7 +3,7 @@ import { ElementIDUtils, ObjectUtils, HTMLBuilder, StringUtils, KeyboardManager
|
|
|
3
3
|
import { i as initI18n } from './index-62fc771e.js';
|
|
4
4
|
import { C as CustomEditorSource } from './FormLayout-071d324c.js';
|
|
5
5
|
import { R as RICH_TOOLBAR_FORMAT_TAGS, a as RICH_TOOLBAR_COMMANDS } from './RichToolbarHelper-f3a149c4.js';
|
|
6
|
-
import { p as purify } from './purify-
|
|
6
|
+
import { p as purify } from './purify-9357603c.js';
|
|
7
7
|
import { A as ApplicationUtils } from './ApplicationUtils-12768f5a.js';
|
|
8
8
|
import './DialogType-54a62731.js';
|
|
9
9
|
import './CheckMode-bdb2ec19.js';
|
|
@@ -91,8 +91,9 @@ const buildSearchPlus = ({ name, label, readOnly, contextName, canShowError, opt
|
|
|
91
91
|
|
|
92
92
|
const buildSearch = ({ name, label, readOnly, required, contextName, canShowError, optionLoader, props }) => {
|
|
93
93
|
var _a;
|
|
94
|
+
const hasDescriptionField = !StringUtils.isEmpty(props === null || props === void 0 ? void 0 : props.DESCRIPTIONFIELD);
|
|
94
95
|
return (h("div", { class: "ez-col ez-col--sd-12" },
|
|
95
|
-
h("ez-search", { class: "ez-input__no-margin", enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader, ignoreLimitCharsToSearch: (_a = props === null || props === void 0 ? void 0 : props.ignoreLimitCharsToSearch) !== null && _a !== void 0 ? _a : false })));
|
|
96
|
+
h("ez-search", { class: "ez-input__no-margin", enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader, ignoreLimitCharsToSearch: (_a = props === null || props === void 0 ? void 0 : props.ignoreLimitCharsToSearch) !== null && _a !== void 0 ? _a : false, hideDescriptionInput: !hasDescriptionField })));
|
|
96
97
|
};
|
|
97
98
|
|
|
98
99
|
const buildRichText = ({ name, label, readOnly, contextName, rows, canShowError }) => {
|
|
@@ -9,7 +9,7 @@ import { C as CustomEditorSource, a as CustomRenderSource } from './FormLayout-0
|
|
|
9
9
|
import { b as buildFieldMetadata, R as RecordValidationProcessor, D as DataBinder, S as SHORTCUT_SEARCH_FIELD, f as focusOnFieldSerch, c as SEARCH_FIELD_FULL_WIDTH, a as buildFieldSearch } from './search-column-c00119ae.js';
|
|
10
10
|
import { D as DISTINCT_FILTER_NAME_PREFIX, E as EZ_GRID_LOADING_SOURCE, P as PRESENTATION_COL_ID_PROP_NAME, a as PRESENTATION_FROM_COL_PROP_NAME } from './constants-3fabe81e.js';
|
|
11
11
|
import { F as FocusResolver } from './FocusResolver-1ccbf850.js';
|
|
12
|
-
import { p as purify } from './purify-
|
|
12
|
+
import { p as purify } from './purify-9357603c.js';
|
|
13
13
|
import './_commonjsHelpers-9943807e.js';
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -15,6 +15,7 @@ const EzSearchPlus = class {
|
|
|
15
15
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
16
16
|
this.SEARCH_DESCRIPTION_TIMEOUT = 300;
|
|
17
17
|
this.INTERVAL_TO_RETRY_ASYNC_VALUE = 100;
|
|
18
|
+
this._ignoreNextValue = false;
|
|
18
19
|
this.value = undefined;
|
|
19
20
|
this.enabled = true;
|
|
20
21
|
this.disableCodeInput = false;
|
|
@@ -47,6 +48,11 @@ const EzSearchPlus = class {
|
|
|
47
48
|
this.showLoading = true;
|
|
48
49
|
}
|
|
49
50
|
async observeValue(newValue, oldValue) {
|
|
51
|
+
var _a;
|
|
52
|
+
if (this._ignoreNextValue) {
|
|
53
|
+
this._ignoreNextValue = false;
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
50
56
|
const newNormalizedValue = this.normalizeValueToCodeValue(newValue);
|
|
51
57
|
const oldNormalizedValue = this.normalizeValueToCodeValue(oldValue);
|
|
52
58
|
if (newNormalizedValue === oldNormalizedValue) {
|
|
@@ -66,12 +72,17 @@ const EzSearchPlus = class {
|
|
|
66
72
|
}
|
|
67
73
|
}
|
|
68
74
|
catch (err) {
|
|
69
|
-
this.
|
|
75
|
+
this._ignoreNextValue = true;
|
|
76
|
+
this.clearSearch();
|
|
70
77
|
console.warn("[EzSearchPlus] Erro ao obter descrição do registro.", err);
|
|
78
|
+
if (((_a = err === null || err === void 0 ? void 0 : err.constructor) === null || _a === void 0 ? void 0 : _a.name) === "WarningException") {
|
|
79
|
+
this.errorMessage = err.message;
|
|
80
|
+
}
|
|
71
81
|
throw err;
|
|
72
82
|
}
|
|
73
83
|
this.value = this.buildCurrentValue();
|
|
74
84
|
this.ezChange.emit(this.value);
|
|
85
|
+
this.errorMessage = null;
|
|
75
86
|
}
|
|
76
87
|
canShowLoadSpinDescription() {
|
|
77
88
|
return this.isLoadingDescription;
|
|
@@ -150,8 +161,11 @@ const EzSearchPlus = class {
|
|
|
150
161
|
}
|
|
151
162
|
clearSearch() {
|
|
152
163
|
this.value = null;
|
|
164
|
+
this.codeValue = null;
|
|
153
165
|
this.descriptionValue = null;
|
|
154
|
-
this.
|
|
166
|
+
if (!this.hideDescriptionInput) {
|
|
167
|
+
this._textInputDescriptionValue.value = null;
|
|
168
|
+
}
|
|
155
169
|
}
|
|
156
170
|
getCodLabel() {
|
|
157
171
|
var _a;
|
|
@@ -5,7 +5,7 @@ import { A as ApplicationUtils } from './ApplicationUtils-12768f5a.js';
|
|
|
5
5
|
import './DialogType-54a62731.js';
|
|
6
6
|
import './CheckMode-bdb2ec19.js';
|
|
7
7
|
import { i as initI18n } from './index-62fc771e.js';
|
|
8
|
-
import './FormLayout-071d324c.js';
|
|
8
|
+
import { S as SearchMode } from './FormLayout-071d324c.js';
|
|
9
9
|
import { r as replaceQuotes, a as replaceHighlight } from './searchFormatters-8229207e.js';
|
|
10
10
|
|
|
11
11
|
const ezSearchCss = ":host{--ez-search--height:42px;--ez-search--width:100%;--ez-search__icon--width:48px;--ez-search--border-radius:var(--border--radius-medium, 12px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-color--xlight:var(--background--xlight, #fff);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px);--ez-search__input--background-color:var(--background--medium, #e0e0e0);--ez-search__input--border:var(--border--medium, 2px solid);--ez-search__input--border-color:var(--ez-search__input--background-color);--ez-search__input--focus--border-color:var(--color--primary, #008561);--ez-search__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-search__input--disabled--color:var(--text--disable, #AFB6C0);--ez-search__input--error--border-color:#CC2936;--ez-search__btn--color:var(--title--primary, #2B3A54);--ez-search__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-search__btn-hover--color:var(--color--primary, #4e4e4e);--ez-search__label--color:var(--title--primary, #2B3A54);--ez-search--space--medium:var(--space--medium, 12px);--ez-search--space--small:var(--space--small, 6px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-search--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-search__btn--color)}.btn:disabled{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:hover{color:var(--ez-search__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}";
|
|
@@ -51,6 +51,7 @@ const EzSearch = class {
|
|
|
51
51
|
this.alternativePlaceholder = undefined;
|
|
52
52
|
this.showMore = undefined;
|
|
53
53
|
this.suppressInputPersist = false;
|
|
54
|
+
this.hideDescriptionInput = false;
|
|
54
55
|
}
|
|
55
56
|
observeErrorMessage() {
|
|
56
57
|
var _a;
|
|
@@ -358,7 +359,7 @@ const EzSearch = class {
|
|
|
358
359
|
}
|
|
359
360
|
}
|
|
360
361
|
async loadDescriptionValue(argument) {
|
|
361
|
-
var _a, _b;
|
|
362
|
+
var _a, _b, _c;
|
|
362
363
|
if (argument == undefined) {
|
|
363
364
|
return;
|
|
364
365
|
}
|
|
@@ -366,21 +367,30 @@ const EzSearch = class {
|
|
|
366
367
|
this.loadOptionValue(argument);
|
|
367
368
|
return;
|
|
368
369
|
}
|
|
370
|
+
const searchMode = this.hideDescriptionInput ? SearchMode.LOAD_DESCRIPTION : SearchMode.PREDICTIVE;
|
|
369
371
|
const searchArgument = {
|
|
370
|
-
mode:
|
|
372
|
+
mode: searchMode,
|
|
371
373
|
argument
|
|
372
374
|
};
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
source
|
|
379
|
-
|
|
380
|
-
|
|
375
|
+
try {
|
|
376
|
+
const source = await ((_b = this.optionLoader) === null || _b === void 0 ? void 0 : _b.call(this, searchArgument, this.contextProperties));
|
|
377
|
+
if (source == undefined) {
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
if (source instanceof Promise) {
|
|
381
|
+
source.then((result) => {
|
|
382
|
+
this.setDescriptionValue(result);
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
else {
|
|
386
|
+
this.setDescriptionValue(source);
|
|
387
|
+
}
|
|
381
388
|
}
|
|
382
|
-
|
|
383
|
-
|
|
389
|
+
catch (error) {
|
|
390
|
+
if (((_c = error === null || error === void 0 ? void 0 : error.constructor) === null || _c === void 0 ? void 0 : _c.name) === "WarningException") {
|
|
391
|
+
this.errorMessage = error.message;
|
|
392
|
+
}
|
|
393
|
+
throw error;
|
|
384
394
|
}
|
|
385
395
|
}
|
|
386
396
|
setDescriptionValue(source) {
|
|
@@ -663,12 +673,6 @@ const EzSearch = class {
|
|
|
663
673
|
"options": ["observeOptions"]
|
|
664
674
|
}; }
|
|
665
675
|
};
|
|
666
|
-
var SearchMode;
|
|
667
|
-
(function (SearchMode) {
|
|
668
|
-
SearchMode["ADVANCED"] = "ADVANCED";
|
|
669
|
-
SearchMode["PRELOAD"] = "PRELOAD";
|
|
670
|
-
SearchMode["PREDICTIVE"] = "PREDICTIVE";
|
|
671
|
-
})(SearchMode || (SearchMode = {}));
|
|
672
676
|
EzSearch.style = ezSearchCss;
|
|
673
677
|
|
|
674
678
|
export { EzSearch as ez_search };
|