@sankhyalabs/ezui 1.1.72 → 1.1.75
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-action-chip.cjs.entry.js +2 -2
- package/dist/cjs/ez-button_16.cjs.entry.js +54 -48
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-label-chip.cjs.entry.js +12 -12
- package/dist/cjs/ez-list.cjs.entry.js +174 -0
- package/dist/cjs/ez-modal.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +1 -1
- package/dist/cjs/ez-time-input.cjs.entry.js +2 -2
- package/dist/cjs/ez-toast.cjs.entry.js +5 -2
- package/dist/cjs/ezui.cjs.js +2 -2
- package/dist/cjs/{index-bb6cdd1a.js → index-4d2896bb.js} +5 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ez-action-chip/ez-action-chip.css +21 -21
- package/dist/collection/components/ez-action-chip/ez-action-chip.js +1 -1
- package/dist/collection/components/ez-calendar/ez-calendar.css +64 -64
- package/dist/collection/components/ez-calendar/ez-calendar.js +12 -9
- package/dist/collection/components/ez-form/subcomponents/structure/Field.js +2 -2
- package/dist/collection/components/ez-label-chip/ez-label-chip.css +49 -49
- package/dist/collection/components/ez-label-chip/ez-label-chip.js +11 -11
- package/dist/collection/components/ez-list/ez-list.css +131 -0
- package/dist/collection/components/ez-list/ez-list.js +252 -0
- package/dist/collection/components/ez-search/ez-search.js +9 -9
- package/dist/collection/components/ez-text-area/ez-text-area.css +48 -48
- package/dist/collection/components/ez-time-input/ez-time-input.js +1 -1
- package/dist/collection/components/ez-toast/ez-toast.css +9 -9
- package/dist/collection/components/ez-toast/ez-toast.js +4 -1
- package/dist/collection/components/ez-upload/ez-upload.css +41 -41
- package/dist/collection/components/ez-upload/ez-upload.js +53 -50
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +244 -64
- package/dist/esm/ez-action-chip.entry.js +2 -2
- package/dist/esm/ez-button_16.entry.js +54 -48
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-label-chip.entry.js +12 -12
- package/dist/esm/ez-list.entry.js +170 -0
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +1 -1
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +1 -1
- package/dist/esm/ez-time-input.entry.js +2 -2
- package/dist/esm/ez-toast.entry.js +5 -2
- package/dist/esm/ezui.js +2 -2
- package/dist/esm/{index-989e6e7d.js → index-33153059.js} +5 -1
- package/dist/esm/loader.js +2 -2
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-061d21ba.entry.js +1 -0
- package/dist/ezui/p-0d476efb.entry.js +1 -0
- package/dist/ezui/{p-55003571.entry.js → p-15743b09.entry.js} +1 -1
- package/dist/ezui/p-34d288d0.entry.js +1 -0
- package/dist/ezui/{p-d01bcce1.entry.js → p-46d07e59.entry.js} +1 -1
- package/dist/ezui/p-47406a6e.entry.js +1 -0
- package/dist/ezui/{p-384f89f7.js → p-4df6f855.js} +1 -1
- package/dist/ezui/{p-edcc9e6f.entry.js → p-50464bdf.entry.js} +1 -1
- package/dist/ezui/{p-65ea9879.entry.js → p-67410dfa.entry.js} +1 -1
- package/dist/ezui/p-7be54779.entry.js +1 -0
- package/dist/ezui/{p-e2533df1.entry.js → p-7f3bc6d9.entry.js} +1 -1
- package/dist/ezui/{p-a6a87bc5.entry.js → p-8818da66.entry.js} +1 -1
- package/dist/types/components/ez-action-chip/ez-action-chip.d.ts +2 -2
- package/dist/types/components/ez-calendar/ez-calendar.d.ts +4 -1
- package/dist/types/components/ez-label-chip/ez-label-chip.d.ts +2 -2
- package/dist/types/components/ez-list/ez-list.d.ts +34 -0
- package/dist/types/components/ez-search/ez-search.d.ts +5 -5
- package/dist/types/components/ez-toast/ez-toast.d.ts +3 -0
- package/dist/types/components/ez-upload/ez-upload.d.ts +10 -7
- package/dist/types/components.d.ts +71 -20
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/ezui/p-5c5ba099.entry.js +0 -1
- package/dist/ezui/p-889030b3.entry.js +0 -1
- package/dist/ezui/p-8b945611.entry.js +0 -1
- package/dist/ezui/p-f8f92f68.entry.js +0 -1
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-4d2896bb.js');
|
|
6
6
|
|
|
7
|
-
const ezActionChipCss = ":host{--
|
|
7
|
+
const ezActionChipCss = ":host{--ez-action-chip--height:36px;--ez-action-chip--border-radius:var(--border--radius-large, 24px);--ez-action-chip__border:1px solid;--ez-action-chip__border-color-strokes:var(--color--strokes, #DCE0E8);--ez-action-chip--font-size:var(--text--medium, 14px);--ez-action-chip--font-family:var(--font-pattern, Arial);--ez-action-chip--font-weight:var(--text-weight--large, 500);--ez-action-chip__label--title--primary:var(--title--primary, #919191);--ez-action-chip__label-color--disable-secondary:var(--color--disable-secondary, #F2F5F8);--ez-action-chip__label__default--background-color--hover:var(--color--primary-200, #f2faf8);--ez-action-chip__label__default--border-color--hover:var(--color--primary-600, #007a5a)}.label__container{width:fit-content;display:flex;flex-wrap:wrap;position:relative;background-color:#FFFFFF;align-items:center;align-self:center;cursor:pointer;color:var(--ez-action-chip__label--title--primary);fill:var(--ez-action-chip__label--title--primary);border:var(--ez-action-chip__border);border-radius:var(--ez-action-chip--border-radius);border-color:var(--ez-action-chip__border-color-strokes);padding-right:var(--space--medium, 12px);padding-left:var(--space--medium, 12px)}.label__container:hover{border-color:var(--ez-action-chip__label__default--border-color--hover);background-color:var(--ez-action-chip__label__default--background-color--hover)}label{display:flex;align-items:center;font-weight:var(--text-weight--large, 600);cursor:pointer;height:var(--ez-action-chip--height);font-family:var(--ez-action-chip--font-family);font-size:var(--ez-action-chip--font-size)}";
|
|
8
8
|
|
|
9
9
|
let EzLabelChip = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-4d2896bb.js');
|
|
6
6
|
const RequestMetadata = require('./RequestMetadata-2cd01e8a.js');
|
|
7
7
|
const FloatingManager = require('./FloatingManager-6cfeb947.js');
|
|
8
8
|
const CSSVarsUtils = require('./CSSVarsUtils-f8827674.js');
|
|
@@ -97,16 +97,16 @@ class DateUtils {
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
const ezCalendarCss = ":host{--
|
|
100
|
+
const ezCalendarCss = ":host{--ez-calendar--font-family:var(--font-pattern, Arial);--ez-calendar--color:var(--title--primary, #626e82);--ez-calendar--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-calendar__body--background-color:var(--background--xlight, #FFF);--ez-calendar__body--padding:var(--space--medium, 12px);--ez-calendar__body--border-radius:var(--border--radius-medium, 12px);--ez-calendar__body--shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-calendar__header-line--stroke:2px;--ez-calendar__header-line--color:var(--color--strokes, #C0C0C0);--ez-calendar__nav-btn--fill:var(--text--primary, #008561);--ez-calendar__nav-btn--hover--fill:var(--color--primary, #350404);--ez-calendar__nav-btn--width:10px;--ez-calendar__nav-btn--height:16px;--ez-calendar__nav-btn--previous-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z\"/></svg>');--ez-calendar__nav-btn--next-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z\"/></svg>');--ez-calendar__cell--margin:0px var(--space--small, 12px);--ez-calendar__cell--width:var(--space--large, 24px);--ez-calendar__cell--padding:var(--space--extra-small, 3px) 0px;--ez-calendar__cell--border-radius:var(--border--radius-small, 6px);--ez-calendar__cell--over--background-color:var(--color--strokes, #C0C0C0);--ez-calendar__cell--outset--color:var(--color--strokes, #C0C0C0);--ez-calendar__cell--selected--background-color:var(--color--primary, #008561);--ez-calendar__cell--selected--color:var(--color--inverted, #FFF);--ez-calendar__btn-today--color:var(--color--primary);--ez-calendar__btn-today--hover--background-color:var(--color--strokes, #C0C0C0);--ez-calendar__btn-today--border-radius:var(--border--radius-small, 6px);position:relative;display:flex;user-select:none}.calendar{z-index:var(--more-visible, 2);display:flex;flex-direction:column;background-color:var(--ez-calendar__body--background-color);padding:var(--ez-calendar__body--padding);border-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__header{display:flex;justify-content:space-between;padding-bottom:var(--space--medium, 12px);margin:var(--space--small, 6px) var(--space--, 12px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color)}.calendar__btn-next,.calendar__btn-previous{outline:none;border:none;background-color:unset;cursor:pointer;padding:0px}.calendar__btn-next::after,.calendar__btn-previous::after{content:'';display:flex;background-color:var(--ez-calendar__nav-btn--fill);width:var(--ez-calendar__nav-btn--width);height:var(--ez-calendar__nav-btn--height)}.calendar__btn-previous::after{-webkit-mask-image:var(--ez-calendar__nav-btn--previous-image);mask-image:var(--ez-calendar__nav-btn--previous-image)}.calendar__btn-next::after{-webkit-mask-image:var(--ez-calendar__nav-btn--next-image);mask-image:var(--ez-calendar__nav-btn--next-image)}.calendar__btn-next:hover::after,.calendar__btn-previous:hover::after{background-color:var(--ez-calendar__nav-btn--hover--fill)}.calendar__lbl-month{font-weight:var(--text-weight--large, 600);font-size:var(--title--medium, 16px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__line{display:flex;padding:0px;margin:0px}.calendar__cell{display:flex;justify-content:center;align-content:center;cursor:pointer;font-size:var(--text--small, 12px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);padding:var(--ez-calendar__cell--padding);margin:var(--ez-calendar__cell--margin);min-width:var(--ez-calendar__cell--width);border-radius:var(--ez-calendar__cell--border-radius)}.calendar__cell:hover{background-color:var(--ez-calendar__cell--over--background-color)}.calendar__cell--secondary{color:var(--ez-calendar__cell--outset--color)}.calendar__cell--unselectable:hover{background-color:unset;border-radius:unset;cursor:unset}.calendar__cell--unselectable{font-weight:var(--text-weight--large, 600);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__cell--selected,.calendar__cell--selected:hover{background-color:var(--ez-calendar__cell--selected--background-color);color:var(--ez-calendar__cell--selected--color)}.calendar__body{padding:var(--space--small, 6px) 0px}.calendar__footer{display:flex;flex-direction:column}.calendar__btn-today{border:none;background-color:unset;cursor:pointer;font-weight:var(--text-weight--large, 600);font-size:var(--title--small);padding:var(--space--extra-small, 6px);font-family:var(--ez-calendar--font-family);text-shadow:var(--ez-calendar--text-shadow);color:var(--ez-calendar__btn-today--color);border-radius:var(--ez-calendar__btn-today--border-radius)}.calendar__btn-today:hover{background-color:var(--ez-calendar__btn-today--hover--background-color)}";
|
|
101
101
|
|
|
102
102
|
let EzCalendar = class {
|
|
103
103
|
constructor(hostRef) {
|
|
104
104
|
index.registerInstance(this, hostRef);
|
|
105
105
|
this.ezChange = index.createEvent(this, "ezChange", 7);
|
|
106
106
|
this._firstRender = true;
|
|
107
|
-
this._todayLabel =
|
|
108
|
-
this._weekDayLabels = [
|
|
109
|
-
this._monthLabels = [
|
|
107
|
+
this._todayLabel = "Hoje";
|
|
108
|
+
this._weekDayLabels = ["D", "S", "T", "Q", "Q", "S", "S"];
|
|
109
|
+
this._monthLabels = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
|
110
110
|
/**
|
|
111
111
|
* A data selecionada no calendário
|
|
112
112
|
*/
|
|
@@ -127,18 +127,21 @@ let EzCalendar = class {
|
|
|
127
127
|
if (this.floating) {
|
|
128
128
|
this._floatingID = FloatingManager.FloatingManager.float(this._box, this._container, { autoClose: true, top, left, bottom, right });
|
|
129
129
|
window.requestAnimationFrame(() => {
|
|
130
|
-
this._box.scrollIntoView({ behavior:
|
|
130
|
+
this._box.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
+
/**
|
|
135
|
+
* Método necessário para ajustar o posicionamento do calendar acima ou abaixo do ez-date-input conforme a disponibilidade de espaço.
|
|
136
|
+
*/
|
|
134
137
|
async fitVertical(topOffset, bottomOffset) {
|
|
135
138
|
const neededHeight = this._container.getBoundingClientRect().bottom + this._calendarHeight;
|
|
136
139
|
const availableBottom = (window.innerHeight || document.documentElement.clientHeight) > neededHeight;
|
|
137
140
|
if (availableBottom) {
|
|
138
|
-
this.show(topOffset +
|
|
141
|
+
this.show(topOffset + "px", undefined, "unset");
|
|
139
142
|
}
|
|
140
143
|
else {
|
|
141
|
-
this.show(
|
|
144
|
+
this.show("unset", undefined, bottomOffset + "px");
|
|
142
145
|
}
|
|
143
146
|
}
|
|
144
147
|
/**
|
|
@@ -2622,7 +2625,7 @@ const Field = ({ dataUnit, field, forceScroll, enabled }) => {
|
|
|
2622
2625
|
context['CRITERIA'] = criteriaList;
|
|
2623
2626
|
}
|
|
2624
2627
|
return index.h("div", { class: "col col--sd-12 col--tb-3 padding--small" }, loadingData ? index.h("place-holder", null) :
|
|
2625
|
-
index.h("ez-search", { value: value, label: formattedLabel, enabled: isEnabled, onEzChange: (event) => changeFieldHandler(event.target['value']), errorMessage: errorMessage,
|
|
2628
|
+
index.h("ez-search", { value: value, label: formattedLabel, enabled: isEnabled, onEzChange: (event) => changeFieldHandler(event.target['value']), errorMessage: errorMessage, optionLoader: (argument) => {
|
|
2626
2629
|
if (form) {
|
|
2627
2630
|
return form.loadSearch(argument, context);
|
|
2628
2631
|
}
|
|
@@ -2633,7 +2636,7 @@ const Field = ({ dataUnit, field, forceScroll, enabled }) => {
|
|
|
2633
2636
|
const headers = strHeaders ? JSON.parse(strHeaders) : {};
|
|
2634
2637
|
const maxfiles = Number(getProp(properties, "maxfiles") || 0);
|
|
2635
2638
|
return (index.h("div", { class: "col col--sd-12 padding--small" }, loadingData ? index.h("place-holder", null) :
|
|
2636
|
-
index.h("ez-upload", { value: value, label: formattedLabel, enabled: isEnabled, onEzChange: (event) => changeFieldHandler(event.detail),
|
|
2639
|
+
index.h("ez-upload", { value: value, label: formattedLabel, enabled: isEnabled, onEzChange: (event) => changeFieldHandler(event.detail), urlUpload: target, requestHeaders: headers, maxFiles: maxfiles })));
|
|
2637
2640
|
case 'DATE':
|
|
2638
2641
|
return index.h("div", { class: "col col--sd-12 col--tb-3 padding--small" }, loadingData ? index.h("place-holder", null) :
|
|
2639
2642
|
index.h("ez-date-input", { value: !value ? null : DateUtils.clearTime(value), label: formattedLabel, enabled: isEnabled, onEzChange: (event) => changeFieldHandler(event.target['value']), errorMessage: errorMessage, ref: elem => scrollToView(forceScroll, elem), key: key }));
|
|
@@ -3062,11 +3065,11 @@ let EzSearch = class {
|
|
|
3062
3065
|
/**
|
|
3063
3066
|
* Ajusta a opção de mostrar o "value" ao selecionar uma opção.
|
|
3064
3067
|
*/
|
|
3065
|
-
this.
|
|
3068
|
+
this.showSelectedValue = true;
|
|
3066
3069
|
/**
|
|
3067
3070
|
* Ajusta a opção de mostrar o "value" para cada opção.
|
|
3068
3071
|
*/
|
|
3069
|
-
this.
|
|
3072
|
+
this.showOptionValue = true;
|
|
3070
3073
|
}
|
|
3071
3074
|
updateValue() {
|
|
3072
3075
|
if (this._comboElement) {
|
|
@@ -3079,7 +3082,7 @@ let EzSearch = class {
|
|
|
3079
3082
|
this.ezChange.emit(evt.detail);
|
|
3080
3083
|
}
|
|
3081
3084
|
render() {
|
|
3082
|
-
return (index.h("ez-combo-box", { ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, optionLoader: this.
|
|
3085
|
+
return (index.h("ez-combo-box", { ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, optionLoader: this.optionLoader, searchMode: true, onEzChange: evt => this.onComboChange(evt), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue }));
|
|
3083
3086
|
}
|
|
3084
3087
|
;
|
|
3085
3088
|
static get watchers() { return {
|
|
@@ -3289,7 +3292,7 @@ class Tab {
|
|
|
3289
3292
|
}
|
|
3290
3293
|
EzTabselector.style = ezTabselectorCss;
|
|
3291
3294
|
|
|
3292
|
-
const ezTextAreaCss = ":host{--
|
|
3295
|
+
const ezTextAreaCss = ":host{--text-area--width:100%;--text-area--border-radius:var(--border--radius-medium, 12px);--text-area--font-size:var(--text--medium, 14px);--text-area--font-family:var(--font-pattern, Arial);--text-area--font-weight:var(--text-weight--large, 500);--text-area--color:var(--title--primary, #000);--text-area__input--background-color:var(--background--medium, #e0e0e0);--text-area__input--border:var(--border--medium, 2px solid);--text-area__input--border-color:var(--text-area__input--background-color);--text-area__input--focus--border-color:var(--color--primary, #008561);--text-area__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--text-area__input--disabled--color:var(--text--disable, #AFB6C0);--text-area__input--error--border-color:#CC2936;--text-area__message_box--font-size:var(--text--small, 12px);--text-area__message_box--info--color:var(--color--success, #22085d);--text-area__message_box--error--color:var(--color--error, #FF0000);--text-area__label--floating--top:6px;--text-area__label--padding-top:12px;--text-area__label--padding-left:14px;--text-area__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--text-area--width)}textarea{box-sizing:border-box;border:none;resize:none;margin-top:calc(var(--space--medium, 12px) + 4px);width:100%;font-weight:var(--text-weight--large, 600);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);color:var(--text-area--color);padding:0;background:none}textarea:focus{outline:none}textarea:disabled{background-color:transparent;color:var(--text-area__input--disabled--color)}.textarea{width:100%;box-sizing:border-box;padding-left:var(--space--medium);padding-right:var(--space--extra-small);border-radius:var(--text-area--border-radius);border:var(--text-area__input--border);border-color:var(--text-area__input--border-color);background-color:var(--text-area__input--background-color)}.textarea--focus{border-color:var(--text-area__input--focus--border-color)}.textarea.hasError{color:var(--text-area--color);border-color:var(--text-area__input--error--border-color)}.message-box{min-height:16px;min-width:100%;margin-top:2px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--text-area--font-family);font-size:var(--text-area__message_box--font-size);color:var(--text-area__message_box--info--color)}.hasError{color:var(--text-area__message_box--error--color)}.textarea__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--text-area__label--padding-right));left:var(--text-area--space--medium);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color);top:var(--text-area__label--padding-top);left:var(--text-area__label--padding-left);padding-right:var(--text-area__label--padding-right)}.textarea__label--floated{font-family:var(--text-area--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--text-area__label--floating--top)}.textarea__label--disabled{color:var(--text-area__input--disabled--color)}";
|
|
3293
3296
|
|
|
3294
3297
|
let EzTextArea = class {
|
|
3295
3298
|
constructor(hostRef) {
|
|
@@ -3672,7 +3675,7 @@ class RemoteFile {
|
|
|
3672
3675
|
}
|
|
3673
3676
|
}
|
|
3674
3677
|
|
|
3675
|
-
const ezUploadCss = ":host{--
|
|
3678
|
+
const ezUploadCss = ":host{--ez-upload--height:42px;--ez-upload--width:100%;--ez-upload__icon--width:48px;--ez-upload__container--background-color:var(--background--medium, #d2dce9);--ez-upload__color--primary:var(--color--primary, #008561);--ez-upload--padding--extra-small:var(--space--extra-small, 3px);--ez-upload--padding--small:var(--space--small, 6px);--ez-upload--padding--medium:var(--space--medium, 12px);--ez-upload--padding--large:var(--space--large, 24px);--ez-upload__border--color:var(--color-strokes, #DCE0E8);--ez-upload--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-upload--text--primary:var(--text-primary, #626e82);--ez-upload--font-size:var(--text--medium, 14px);--ez-upload--font-family:var(--font-pattern, Arial);--ez-upload--font-weight:var(--text-weight--large, 500);--ez-upload__btn__cancel-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"8x\" width=\"8px\"><path d=\"M 8,0.8 7.2,0 4,3.2 0.8,0 0,0.8 3.2,4 0,7.2 0.8,8 4,4.8 7.2,8 8,7.2 4.8,4 Z\"/></svg>');--ez-upload__file-icon-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"11x\" width=\"9px\"><path d=\"M 1.2272719,8.4999999 V 2.75 c 0,-1.1045695 1.4652499,-2 3.2727273,-2 1.8074777,0 3.2727281,0.8954305 3.2727281,2 V 8.9999999 C 7.7727273,9.690356 6.8569456,10.25 5.7272719,10.25 4.5975985,10.25 3.6818174,9.690356 3.6818174,8.9999999 V 3.75 c 0,-0.2761425 0.3663125,-0.5 0.8181818,-0.5 0.4518694,0 0.8181818,0.2238575 0.8181818,0.5 V 8.4999999 H 6.5454537 V 3.75 C 6.5454537,3.059644 5.6296725,2.5 4.4999992,2.5 3.3703258,2.5 2.4545446,3.059644 2.4545446,3.75 V 8.9999999 C 2.4545446,10.10457 3.9197945,11 5.7272719,11 7.5347496,11 9,10.10457 9,8.9999999 V 2.75 C 9,1.231217 6.9852809,0 4.4999992,0 2.0147181,5e-7 0,1.231217 0,2.75 v 5.7499999 z\"/></svg>');display:flex;flex-wrap:wrap;position:relative;font-family:var(--ez-upload--font-family);font-size:var(--ez-upload--font-size);width:var(--ez-upload--width);font-weight:var(--ez-upload--font-weight)}.iu{display:flex;flex-wrap:wrap;background-color:var(--ez-upload__container--background-color);padding:var(--ez-upload--padding--small);width:100%;border-radius:12px;box-sizing:border-box}.iu__container{width:100%;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;border:2px dashed var(--ez-upload__border--color);border-radius:6px;box-sizing:border-box}.iu__footer{display:flex;flex-wrap:wrap;justify-content:flex-start;width:100%;padding:0 var(--ez-upload--padding--medium) var(--ez-upload--padding--medium) var(--ez-upload--padding--medium);box-sizing:border-box}.iu__item{display:flex;width:100%;justify-content:flex-start;align-items:center;align-self:center;padding-bottom:var(--ez-upload--padding--extra-small);box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.iu__item-label{display:flex;max-width:80%;align-self:stretch;align-items:center}.file__name{font-weight:200}.box__content{width:100%;justify-content:center;align-items:center;height:100%;border:1px dashed var(--ez-upload__border--color);border-radius:6px;box-sizing:border-box}.box__container{display:flex;flex-wrap:wrap;background-color:var(--ez-upload__container--background-color);padding:6px;width:100%;border-radius:12px}a:-webkit-any-link{color:#008561;fill:#008561;cursor:pointer;text-decoration:none}progress[value]{display:flex;width:100%;appearance:none;border:1px solid var(--ez-upload__border--color);height:12px;justify-content:flex-start;align-items:center;border-radius:3px;position:relative}progress[value]::-webkit-progress-bar{display:flex;-webkit-appearance:none;width:100%;background-color:rgb(255, 255, 255);border-radius:2px;padding:2px}progress[value]::-webkit-progress-value{display:flex;width:100%;background-color:var(--ez-upload__color--primary)}.text--center{text-align:center}.align--middle{align-self:center;align-items:center}.text{font-family:\"Sora\", \"Algerian\";text-shadow:0 0 0 #353535, 0 0 1px transparent}.text--primary{color:var(--ez-upload--text--primary);text-shadow:var(--ez-upload--text-shadow)}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text--medium{font-size:14px}.text--small{font-size:12px}.btn-cancel{outline:none;border:none;background-color:unset;cursor:pointer}.btn-cancel::after{content:'';display:flex;background-color:var(--text--primary, #008561);width:8px;height:8px;-webkit-mask-image:var(--ez-upload__btn__cancel-image);mask-image:var(--ez-upload__btn__cancel-image)}.iu_header{display:flex;flex-direction:column;width:100%}.iu__label{padding:var(--space--small);box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-upload--font-family);font-size:var(--text--extra-small);font-weight:var(--ez-upload--font-weight);color:var(--ez-upload--text--primary);text-shadow:var(--ez-upload--text-shadow)}.iu__file-icon{outline:none;border:none;background-color:unset;cursor:pointer}.iu__file-icon:disabled{cursor:unset}.iu__file-icon::after{content:'';display:flex;background-color:var(--text--primary, #626e82);width:9px;height:11px;-webkit-mask-image:var(--ez-upload__file-icon-image);mask-image:var(--ez-upload__file-icon-image)}.iu__file-icon:disabled::after{background-color:var(--text--disable, #AFB6C0)}.iu__icon-label{justify-content:center;display:flex;cursor:pointer;padding:var(--ez-upload--padding--large) 0px;box-sizing:border-box}.background--disabled{background-color:var(--color--disable-secondary, #F2F5F8)}.text--disabled{color:var(--text--disable, #AFB6C0)}.mouse-pointer--disabled{cursor:unset}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
3676
3679
|
|
|
3677
3680
|
let EzUpload = class {
|
|
3678
3681
|
constructor(hostRef) {
|
|
@@ -3703,28 +3706,31 @@ let EzUpload = class {
|
|
|
3703
3706
|
}
|
|
3704
3707
|
normalizeRequestHeaders() {
|
|
3705
3708
|
this._requestHeaders = new Map();
|
|
3706
|
-
if (typeof this.
|
|
3709
|
+
if (typeof this.requestHeaders == "string") {
|
|
3707
3710
|
try {
|
|
3708
|
-
this.
|
|
3711
|
+
this.requestHeaders = JSON.parse(this.requestHeaders);
|
|
3709
3712
|
}
|
|
3710
3713
|
catch (e) {
|
|
3711
|
-
this.
|
|
3714
|
+
this.requestHeaders = undefined;
|
|
3712
3715
|
}
|
|
3713
3716
|
}
|
|
3714
|
-
for (var key in this.
|
|
3715
|
-
this._requestHeaders.set(key, this.
|
|
3717
|
+
for (var key in this.requestHeaders) {
|
|
3718
|
+
this._requestHeaders.set(key, this.requestHeaders[key]);
|
|
3716
3719
|
}
|
|
3717
3720
|
}
|
|
3721
|
+
/**
|
|
3722
|
+
* Método responsável por adicionar um ou mais arquivos ao componente.
|
|
3723
|
+
*/
|
|
3718
3724
|
async addFiles(files) {
|
|
3719
|
-
if (this.
|
|
3725
|
+
if (this.maxFiles > 0) {
|
|
3720
3726
|
let countDistinctFiles = this._filePointers.size;
|
|
3721
3727
|
files.forEach(file => {
|
|
3722
3728
|
if (!this._filePointers.has(file.name)) {
|
|
3723
3729
|
countDistinctFiles++;
|
|
3724
3730
|
}
|
|
3725
3731
|
});
|
|
3726
|
-
if (countDistinctFiles > this.
|
|
3727
|
-
this.showError(`A quantidade máxima de arquivos é ${this.
|
|
3732
|
+
if (countDistinctFiles > this.maxFiles) {
|
|
3733
|
+
this.showError(`A quantidade máxima de arquivos é ${this.maxFiles}.`);
|
|
3728
3734
|
return;
|
|
3729
3735
|
}
|
|
3730
3736
|
}
|
|
@@ -3751,7 +3757,7 @@ let EzUpload = class {
|
|
|
3751
3757
|
if (this.validateFile(file)) {
|
|
3752
3758
|
const uploadingFile = new RemoteFile(file);
|
|
3753
3759
|
this._filePointers.set(file.name, uploadingFile);
|
|
3754
|
-
uploadingFile.upload(this.
|
|
3760
|
+
uploadingFile.upload(this.urlUpload, this._requestHeaders, (file) => this.updateFeedback(file))
|
|
3755
3761
|
.then((files) => files.forEach(ezFile => this.finishUpload(ezFile)))
|
|
3756
3762
|
.catch(msg => this.showError(msg));
|
|
3757
3763
|
index.forceUpdate(this);
|
|
@@ -3772,13 +3778,13 @@ let EzUpload = class {
|
|
|
3772
3778
|
this.ezChange.emit(this.value);
|
|
3773
3779
|
}
|
|
3774
3780
|
buildProgressId(uploading) {
|
|
3775
|
-
let sanitizedName = uploading.name.replace(/[^a-z0-9_]/gi,
|
|
3781
|
+
let sanitizedName = uploading.name.replace(/[^a-z0-9_]/gi, "_");
|
|
3776
3782
|
return `PROGRESS_${sanitizedName}_${uploading.file.lastModified}`;
|
|
3777
3783
|
}
|
|
3778
3784
|
updateFeedback(uf) {
|
|
3779
3785
|
window.requestAnimationFrame(() => {
|
|
3780
3786
|
if (this._host) {
|
|
3781
|
-
const progress = this._host.shadowRoot.querySelector(
|
|
3787
|
+
const progress = this._host.shadowRoot.querySelector("#" + this.buildProgressId(uf));
|
|
3782
3788
|
if (progress) {
|
|
3783
3789
|
progress.value = uf.progress;
|
|
3784
3790
|
}
|
|
@@ -3786,20 +3792,20 @@ let EzUpload = class {
|
|
|
3786
3792
|
});
|
|
3787
3793
|
}
|
|
3788
3794
|
validateFile(file) {
|
|
3789
|
-
if (!this._filePointers.has(file.name) && this.
|
|
3790
|
-
this.showError(`A quantidade máxima de arquivos é ${this.
|
|
3795
|
+
if (!this._filePointers.has(file.name) && this.maxFiles > 0 && this._filePointers.size >= this.maxFiles) {
|
|
3796
|
+
this.showError(`A quantidade máxima de arquivos é ${this.maxFiles}.`);
|
|
3791
3797
|
return false;
|
|
3792
3798
|
}
|
|
3793
3799
|
if (file.size === 0) {
|
|
3794
3800
|
this.showError(`Erro de permissão: O arquivo "${file.name}" não pode ser enviado.`);
|
|
3795
3801
|
return false;
|
|
3796
3802
|
}
|
|
3797
|
-
if (!this.
|
|
3803
|
+
if (!this.urlUpload) {
|
|
3798
3804
|
this.showError("Endereço de upload não informado");
|
|
3799
3805
|
return false;
|
|
3800
3806
|
}
|
|
3801
|
-
if (this.
|
|
3802
|
-
this.showError("O tamanho máximo dos arquivos é de " + this.formatBytes(this.
|
|
3807
|
+
if (this.maxFileSize >= 0 && file.size > this.maxFileSize) {
|
|
3808
|
+
this.showError("O tamanho máximo dos arquivos é de " + this.formatBytes(this.maxFileSize));
|
|
3803
3809
|
return false;
|
|
3804
3810
|
}
|
|
3805
3811
|
return true;
|
|
@@ -3809,17 +3815,17 @@ let EzUpload = class {
|
|
|
3809
3815
|
}
|
|
3810
3816
|
formatBytes(bytes, decimals = 1) {
|
|
3811
3817
|
if (bytes === 0)
|
|
3812
|
-
return
|
|
3818
|
+
return "0 Bytes";
|
|
3813
3819
|
const k = 1024;
|
|
3814
3820
|
const dm = decimals < 0 ? 0 : decimals;
|
|
3815
|
-
const sizes = [
|
|
3821
|
+
const sizes = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
|
3816
3822
|
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
3817
|
-
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) +
|
|
3823
|
+
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + " " + sizes[i];
|
|
3818
3824
|
}
|
|
3819
3825
|
onFileInputChange(event) {
|
|
3820
3826
|
const input = event.target;
|
|
3821
3827
|
this.addFiles(Array.from(input.files));
|
|
3822
|
-
this._fileInput.value =
|
|
3828
|
+
this._fileInput.value = "";
|
|
3823
3829
|
}
|
|
3824
3830
|
isRemoteFile(item) {
|
|
3825
3831
|
return "file" in item;
|
|
@@ -3835,10 +3841,10 @@ let EzUpload = class {
|
|
|
3835
3841
|
this.removeFromList(name);
|
|
3836
3842
|
}
|
|
3837
3843
|
else {
|
|
3838
|
-
if (this.
|
|
3844
|
+
if (this.urlDelete) {
|
|
3839
3845
|
const uploadingFile = new RemoteFile(null);
|
|
3840
3846
|
this._filePointers.set(item.name, uploadingFile);
|
|
3841
|
-
uploadingFile.delete(item, this.
|
|
3847
|
+
uploadingFile.delete(item, this.urlDelete, null)
|
|
3842
3848
|
.then(_ok => this.removeFromList(name))
|
|
3843
3849
|
.catch(msg => this.showError(msg));
|
|
3844
3850
|
}
|
|
@@ -3854,20 +3860,20 @@ let EzUpload = class {
|
|
|
3854
3860
|
}
|
|
3855
3861
|
componentDidLoad() {
|
|
3856
3862
|
if (this.enabled && this._dropZone && window.FileList && window.File) {
|
|
3857
|
-
this._dropZone.addEventListener(
|
|
3863
|
+
this._dropZone.addEventListener("dragover", event => {
|
|
3858
3864
|
event.stopPropagation();
|
|
3859
3865
|
event.preventDefault();
|
|
3860
|
-
event.dataTransfer.dropEffect =
|
|
3861
|
-
this._dropZone.style.background =
|
|
3866
|
+
event.dataTransfer.dropEffect = "copy";
|
|
3867
|
+
this._dropZone.style.background = "#c2dbff";
|
|
3862
3868
|
});
|
|
3863
|
-
this._dropZone.addEventListener(
|
|
3869
|
+
this._dropZone.addEventListener("drop", event => {
|
|
3864
3870
|
event.stopPropagation();
|
|
3865
3871
|
event.preventDefault();
|
|
3866
3872
|
this.addFiles(Array.from(event.dataTransfer.files));
|
|
3867
|
-
this._dropZone.style.background =
|
|
3873
|
+
this._dropZone.style.background = "";
|
|
3868
3874
|
});
|
|
3869
|
-
this._dropZone.addEventListener(
|
|
3870
|
-
this._dropZone.style.background =
|
|
3875
|
+
this._dropZone.addEventListener("dragleave", _event => {
|
|
3876
|
+
this._dropZone.style.background = "";
|
|
3871
3877
|
});
|
|
3872
3878
|
}
|
|
3873
3879
|
}
|
|
@@ -3879,7 +3885,7 @@ let EzUpload = class {
|
|
|
3879
3885
|
}
|
|
3880
3886
|
}
|
|
3881
3887
|
render() {
|
|
3882
|
-
return (index.h("div", { ref: (el) => this._dropZone = el, class: this.evalDisabledClass(
|
|
3888
|
+
return (index.h("div", { ref: (el) => this._dropZone = el, class: this.evalDisabledClass("iu", "background--disabled") }, index.h("div", { class: "iu__container", onClick: () => this.openFilesDialog() }, index.h("div", { class: "iu_header" }, this.label ? index.h("label", { class: this.evalDisabledClass("iu__label", "text--disabled"), title: this.label }, this.label) : null, index.h("div", { class: this.evalDisabledClass("iu__icon-label", "mouse-pointer--disabled") }, index.h("button", { class: "iu__file-icon", disabled: !this.enabled }), index.h("div", { class: this.evalDisabledClass("text text--center text--medium text--primary", "text--disabled") }, this.enabled ? "Arraste e solte ou clique para adicionar arquivos" : "Somente leitura"))), this.buildFooter()), index.h("input", { ref: (el) => this._fileInput = el, onChange: (ev) => this.onFileInputChange(ev), type: "file", multiple: true, hidden: true })));
|
|
3883
3889
|
}
|
|
3884
3890
|
buildFooter() {
|
|
3885
3891
|
if (this._filePointers.size === 0) {
|
|
@@ -3891,8 +3897,8 @@ let EzUpload = class {
|
|
|
3891
3897
|
}
|
|
3892
3898
|
buildFileItem(item) {
|
|
3893
3899
|
const fileName = item.name;
|
|
3894
|
-
const progress = Number(item[
|
|
3895
|
-
const downloadURL = item[
|
|
3900
|
+
const progress = Number(item["progress"]);
|
|
3901
|
+
const downloadURL = item["downloadURL"];
|
|
3896
3902
|
const label = `${fileName} (${this.formatBytes(item.size)})`;
|
|
3897
3903
|
return (index.h("div", { class: "iu__item", key: fileName, onClick: evt => evt.stopPropagation() }, index.h("div", { class: "iu__item-label modificador" }, index.h("div", { title: label, class: "col--stretch align--middle file__name text text--primary text--small text--ellipsis align--middle" }, downloadURL ? index.h("a", { href: downloadURL, download: true }, label) : label)), isNaN(progress)
|
|
3898
3904
|
?
|
|
@@ -3910,7 +3916,7 @@ let EzUpload = class {
|
|
|
3910
3916
|
get _host() { return index.getElement(this); }
|
|
3911
3917
|
static get watchers() { return {
|
|
3912
3918
|
"value": ["changeValue"],
|
|
3913
|
-
"
|
|
3919
|
+
"requestHeaders": ["normalizeRequestHeaders"]
|
|
3914
3920
|
}; }
|
|
3915
3921
|
};
|
|
3916
3922
|
EzUpload.style = ezUploadCss;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-4d2896bb.js');
|
|
6
6
|
|
|
7
7
|
const ezDialogCss = ":host{--dialog__container-padding:var(--space--large, 24px);--dialog__btn__close--background-color:var(--title--primary, #2b3a54);--dialog__btn__no--padding-right:var(--space--large, 24px);--dialog__btn__close__image:url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg%22%3E<path d=\"M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z\"/></svg>');--dialog__title--font-pattern:var(--font-pattern, \"'Sora', 'Algerian'\");--dialog__title--padding-left:var(--space--small, 6px);--dialog__title__container--padding-bottom:var(--space--medium, 12px);--dialog__title--weight--large:var(--text-weight--large, 600);--dialog__body--font-pattern:var(--font-pattern, \"'Sora', 'Algerian'\");--dialog__body--text-shadow:var(--text-shadow, \"0 0 0 #353535, 0 0 1px transparent\");--dialog__body--text-weight--medium:var(--text-weight--medium, 400);--dialog__body--padding-bottom:var(--space--large, 24px);--dialog__body--font-size:var(--text--medium, 14px);--dialog__body--color:var(--text--primary, #626e82);--dialog__critical--background-color:var(--color--alert-error-800, #BD0025);--dialog__warning--background-color:var(--color--alert-warning-500, #EFB103);--dialog-z-index:var(--most-visible, 3);--dialog--warning__image:url('data: image/svg+xml;utf8,<svg width=\"15\" height=\"15\" viewBox=\"0 0 15 15\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.5,0 0,13 h 15 z m 0,2.73684 5.1341,8.89476 H 2.36591 Z M 6.81818,5.47368 V 8.21053 H 8.18182 V 5.47368 Z m 0,4.10527 V 10.9474 H 8.18182 V 9.57895\"/></svg>');--dialog--critical__image:url('data: image/svg+xml;utf8,<svg width=\"13\" height=\"13\" viewBox=\"0 0 13 13\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.6534493,6.4948538 12.762051,1.3864299 C 12.914368,1.2341297 13,1.027552 13,0.81215179 13,0.59676225 12.914369,0.39018443 12.762051,0.23787352 12.609733,0.08557341 12.40318,0 12.187747,0 11.972425,0 11.765762,0.08557341 11.613445,0.23787352 L 6.5048431,5.3462975 1.3961977,0.23787352 C 1.2438802,0.08557341 1.0373043,0 0.82189458,0 0.60649572,0 0.39990901,0.08557341 0.24759147,0.23787352 0.09527396,0.39018443 0.00970766,0.59676225 0.00970766,0.81215179 c 0,0.21540021 0.0855663,0.42197791 0.23788381,0.57427811 L 5.3562369,6.4948538 0.24759147,11.604381 c -0.0775121,0.07492 -0.13931586,0.164543 -0.18182835,0.263595 -0.04250169,0.09905 -0.064850182,0.205678 -0.0657357237,0.313391 -8.8554258e-4,0.107813 0.0197049337,0.214771 0.0605827337,0.314472 0.04086693,0.0998 0.10119858,0.190415 0.17746563,0.266625 0.0762779,0.07622 0.16695386,0.136398 0.26675594,0.177208 0.099802,0.04082 0.20672745,0.06127 0.31452961,0.06029 0.1078025,-9.53e-4 0.21433799,-0.0235 0.31337139,-0.06604 0.099045,-0.04265 0.1886052,-0.104571 0.263465,-0.182081 L 6.5048431,7.6434102 11.613445,12.751855 c 0.152317,0.152312 0.35898,0.237831 0.574302,0.237831 0.215433,0 0.421986,-0.08552 0.574304,-0.237831 C 12.914368,12.599545 13,12.393 13,12.177578 13,11.962157 12.91437,11.75561 12.762051,11.603299 Z\"/></svg>')}h2{margin-block-start:0;margin-block-end:0;margin-inline-start:0px;margin-inline-end:0px}.overlay{position:fixed;display:flex;top:0px;z-index:var(--dialog-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.dialog{display:flex;width:80%;position:absolute;top:50%;left:50%;margin-right:-50%;box-sizing:border-box;transform:translate(-50%, -50%);box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122)}@media screen and (min-width: 768px){.dialog{width:50%}}@media screen and (min-width: 992px){.dialog{width:33.33333%}}.dialog__container{width:100%;background:#FFFF;border-radius:0px 6px 6px 0px;box-sizing:border-box;padding:var(--dialog__container-padding)}.dialog__critical--indicator{box-sizing:border-box;width:12px;border-radius:6px 0px 0px 6px;background-color:var(--dialog__critical--background-color)}.dialog__warning--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__warning--background-color)}.message{font-size:var(--dialog__body--font-size);font-weight:var(--dialog__body--text-weight--medium);font-family:var(--dialog__body--font-pattern);text-shadow:var(--dialog__body--text-shadow);padding-bottom:var(--dialog__body--padding-bottom);color:var(--dialog__body--color);max-height:30vh;content-visibility:auto;margin-bottom:24px;overflow-y:auto}.changeable__icon{width:15px;height:15px}.title{display:flex;font-family:var(--dialog__title--font-pattern);margin:0;font-weight:var(--dialog__title--weight--large);line-height:1.3}.title__container{display:flex;padding-bottom:var(--dialog__title__container--padding-bottom)}.title__box{display:flex;width:100%;align-items:center;align-self:center}.title--label{padding-left:var(--dialog__title--padding-left)}.title-icon{outline:none;border:none;background-color:var(--dialog__warning--background-color);width:26px;height:26px;border-radius:100%;padding:0;display:flex;justify-content:center;align-items:center}.title-icon--critical{background-color:var(--dialog__critical--background-color)}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--dialog__btn__close--background-color);width:12px;height:12px;-webkit-mask-image:var(--dialog__btn__close__image);mask-image:var(--dialog__btn__close__image)}.title-icon::after{content:'';display:flex;background-color:#FFFF;width:15px;height:15px;-webkit-mask-image:var(--dialog--warning__image);mask-image:var(--dialog--warning__image)}.title-icon--critical::after{content:'';display:flex;background-color:#FFFF;width:13px;height:13px;-webkit-mask-image:var(--dialog--critical__image);mask-image:var(--dialog--critical__image)}.button-yes-no__container{display:flex;box-sizing:border-box;align-self:center;align-items:center;justify-content:flex-end}.button__no{padding-right:var(--dialog__btn__no--padding-right)}.button__ok--container{display:flex;justify-content:flex-end}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
8
8
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-4d2896bb.js');
|
|
6
6
|
|
|
7
|
-
const ezLabelChipCss = ":host{--
|
|
7
|
+
const ezLabelChipCss = ":host{--ez-label-chip--height:36px;--ez-label-chip__label--font-size:var(--text--medium, 14px);--ez-label-chip__label--font-family:var(--font-pattern, Arial);--ez-label-chip__label--font-weight:var(--text-weight--large, 600);--ez-label-chip__label--space--medium:var(--space--medium, 12px);--ez-label-chip__label--title--primary:var(--title--primary, #919191);--ez-label-chip__label__container--border-radius:var(--border--radius-large, 24px);--ez-label-chip__label__container--border:1px solid;--ez-label-chip__label__container--border-color-strokes:var(--color--strokes, #DCE0E8);--ez-label-chip__label__container--color-primary:var(--color--primary, #008561);--ez-label-chip__label__container-color--disable-secondary:var(--color--disable-secondary, #F2F5F8);--ez-label-chip__label__container--background-color:#0085610F;--ez-label-chip__label__container--border-color:#0085610F;--ez-label-chip__label__container--default--border-color--hover:var(--color--primary-600, #007a5a);--ez-label-chip__label__container--default--background-color--hover:var(--color--primary-200, #f2faf8);--ez-label-chip__label__container--text--disabled:var(--text--disable, #AFB6C0);--ez-label-chip__btn__close--image:url('data:image/svg+xml;utf8,<svg width=\"8\" height=\"8\" viewBox=\"0 0 8 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 4.7098145,3.9968334 7.8535703,0.85318776 C 7.9473034,0.75946455 8,0.63233985 8,0.49978585 8,0.36723841 7.947304,0.24011361 7.8535703,0.14638378 7.7598354,0.05266059 7.6327257,6.48e-8 7.500152,6.48e-8 7.3676457,6.48e-8 7.2404691,0.0526608 7.1467354,0.14638378 L 4.00298,3.2900293 0.8591984,0.14638378 C 0.76546463,0.05266059 0.63834103,6.48e-8 0.50578123,6.48e-8 0.3732281,6.48e-8 0.24609783,0.05266059 0.15236397,0.14638378 0.05863012,0.24011361 0.00597395,0.36723841 0.00597395,0.49978585 c 0,0.132554 0.05265617,0.2596787 0.14639002,0.35340191 L 3.2961455,3.9968334 0.15236397,7.1411589 C 0.10466427,7.1872561 0.06663114,7.2424161 0.04046961,7.303371 0.01431473,7.3643212 5.6180845e-4,7.429943 1.6859246e-5,7.4962264 -5.2808998e-4,7.5625744 0.01214297,7.6283944 0.03729854,7.6897476 c 0.02514888,0.061416 0.06227604,0.1171794 0.1092096,0.1640783 0.0469402,0.046903 0.10274083,0.083936 0.16415749,0.1090508 0.0614166,0.025114 0.12721688,0.037703 0.19355667,0.037103 0.06634,-5.714e-4 0.13190027,-0.014457 0.19284393,-0.04064 0.0609507,-0.026246 0.11606474,-0.064351 0.16213217,-0.1120492 L 4.00298,4.7036374 7.1467354,7.8472967 c 0.093734,0.09373 0.2209103,0.1463572 0.3534166,0.1463572 0.1325737,0 0.2596834,-0.052623 0.3534183,-0.1463572 C 7.9473034,7.753567 8,7.6264624 8,7.493895 8,7.3613281 7.9473086,7.2342224 7.8535703,7.1404927 Z\"/></svg>')}.btn-close{align-items:flex-start;display:flex;outline:none;border:none;padding:0px 0px 0px 6px;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--ez-label-chip__label__container--color-primary);width:8px;height:8px;-webkit-mask-image:var(--ez-label-chip__btn__close--image);mask-image:var(--ez-label-chip__btn__close--image)}.label__container{width:fit-content;display:flex;flex-wrap:wrap;position:relative;align-items:center;background-color:#FFFFFF;align-self:center;color:var(--ez-label-chip__label--title--primary);fill:var(--ez-label-chip__label--title--primary);border:var(--ez-label-chip__label__container--border);border-radius:var(--ez-label-chip__label__container--border-radius);border-color:var(--ez-label-chip__label__container--border-color-strokes);padding-right:var(--ez-label-chip__label--space--medium);padding-left:var(--ez-label-chip__label--space--medium)}.label__container:hover{border-color:var(--ez-label-chip__label__container--default--border-color--hover);background-color:var(--ez-label-chip__label__container--default--background-color--hover)}.label__container--active{width:fit-content;display:flex;flex-wrap:wrap;position:relative;align-items:center;align-self:center;border:var(--ez-label-chip__label__container--border);border-radius:var(--ez-label-chip__label__container--border-radius);padding-right:var(--ez-label-chip__label--space--medium);padding-left:var(--ez-label-chip__label--space--medium);fill:var(--ez-label-chip__label__container--color-primary);color:var(--ez-label-chip__label__container--color-primary);border-color:var(--ez-label-chip__label__container--border-color);background-color:var(--ez-label-chip__label__container--background-color)}.label__container--disabled{width:fit-content;display:flex;flex-wrap:wrap;position:relative;align-items:center;align-self:center;border:var(--ez-label-chip__label__container--border);border-color:var(--ez-label-chip__label__container-color--disable-secondary);border-radius:var(--ez-label-chip__label__container--border-radius);padding-right:var(--ez-label-chip__label--space--medium);padding-left:var(--ez-label-chip__label--space--medium);fill:var(--ez-label-chip__label__container--text--disabled);color:var(--ez-label-chip__label__container--text--disabled);background-color:var(--ez-label-chip__label__container-color--disable-secondary)}label{display:flex;align-items:center;font-weight:var(--ez-label-chip__label--font-weight);cursor:pointer;height:var(--ez-label-chip--height);font-family:var(--ez-label-chip__label--font-family);font-size:var(--ez-label-chip__label--font-size)}.label__icon{display:flex;cursor:pointer}";
|
|
8
8
|
|
|
9
9
|
let EzLabelChip = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -44,7 +44,7 @@ let EzLabelChip = class {
|
|
|
44
44
|
//---------------------------------------------
|
|
45
45
|
handleClick(ev) {
|
|
46
46
|
const target = ev.target;
|
|
47
|
-
if (target.assignedSlot === null && !target.classList.contains(
|
|
47
|
+
if (target.assignedSlot === null && !target.classList.contains("label__icon")) {
|
|
48
48
|
this.valueChange.emit(this.value);
|
|
49
49
|
this.swichState();
|
|
50
50
|
}
|
|
@@ -56,13 +56,13 @@ let EzLabelChip = class {
|
|
|
56
56
|
}
|
|
57
57
|
reflectChange() {
|
|
58
58
|
if (this._divElem) {
|
|
59
|
-
this._divElem.classList.remove(
|
|
60
|
-
this._divElem.classList.remove(
|
|
59
|
+
this._divElem.classList.remove("label__container--active");
|
|
60
|
+
this._divElem.classList.remove("label__container");
|
|
61
61
|
if (this.value) {
|
|
62
|
-
this._divElem.classList.add(
|
|
62
|
+
this._divElem.classList.add("label__container--active");
|
|
63
63
|
}
|
|
64
64
|
else {
|
|
65
|
-
this._divElem.classList.add(
|
|
65
|
+
this._divElem.classList.add("label__container");
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
}
|
|
@@ -72,7 +72,7 @@ let EzLabelChip = class {
|
|
|
72
72
|
componentDidLoad() {
|
|
73
73
|
if (this._divElem) {
|
|
74
74
|
if (this.value) {
|
|
75
|
-
this._divElem.classList.add(
|
|
75
|
+
this._divElem.classList.add("label__container--active");
|
|
76
76
|
}
|
|
77
77
|
else {
|
|
78
78
|
this.handleEnabledState();
|
|
@@ -80,12 +80,12 @@ let EzLabelChip = class {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
handleEnabledState() {
|
|
83
|
-
this._divElem.classList.remove(
|
|
83
|
+
this._divElem.classList.remove("label__container--disabled");
|
|
84
84
|
if (!this.enabled) {
|
|
85
|
-
this._divElem.classList.remove(
|
|
86
|
-
this._divElem.classList.add(
|
|
85
|
+
this._divElem.classList.remove("label__container");
|
|
86
|
+
this._divElem.classList.add("label__container--disabled");
|
|
87
87
|
if (this._labelElem) {
|
|
88
|
-
this._labelElem.style.cursor =
|
|
88
|
+
this._labelElem.style.cursor = "default";
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
}
|