@sankhyalabs/ezui 6.1.0-dev.15 → 6.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.
@@ -7,7 +7,7 @@ export class EzFormView {
7
7
  this._customEditors = new Map();
8
8
  this.fields = undefined;
9
9
  this.selectedRecord = undefined;
10
- this.singleColumn = true;
10
+ this.singleColumn = false;
11
11
  }
12
12
  async showUp() {
13
13
  this._element.scrollIntoView({ behavior: "smooth", block: "start" });
@@ -168,7 +168,7 @@ export class EzFormView {
168
168
  },
169
169
  "attribute": "single-column",
170
170
  "reflect": false,
171
- "defaultValue": "true"
171
+ "defaultValue": "false"
172
172
  }
173
173
  };
174
174
  }
@@ -9,17 +9,11 @@
9
9
  --ez-rich-text--shadow--outline: var(--shadow--outline) var(--color--strokes);
10
10
  }
11
11
 
12
- .editor-container.bordered {
13
- border-radius: 12px;
14
- border: 1px solid #DCE0E8;
15
- }
16
-
17
-
18
12
  .editor-container {
19
13
  width: 100%;
20
- border-radius: 12px;
21
14
  overflow: hidden;
22
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
15
+ border-radius: 12px;
16
+ border: 1px solid #DCE0E8;
23
17
  }
24
18
 
25
19
  ez-text-area{
@@ -32,4 +26,5 @@ ez-text-area{
32
26
  resize: both;
33
27
  overflow: auto;
34
28
  max-width: 100%;
29
+ border-top: 1px solid #DCE0E8;
35
30
  }
@@ -8,12 +8,13 @@ export class EzRichText {
8
8
  this.historyIndex = -1;
9
9
  this.previewMode = false;
10
10
  this.showPreview = true;
11
- this.showBorder = false;
12
11
  this.value = '';
13
12
  this.label = undefined;
13
+ this.mode = "regular";
14
14
  this.enabled = true;
15
15
  this.rows = 6;
16
16
  this.errorMessage = undefined;
17
+ this.canShowError = true;
17
18
  this.showConfigs = true;
18
19
  this.showTextFormat = true;
19
20
  this.showUndoRedo = true;
@@ -23,6 +24,11 @@ export class EzRichText {
23
24
  return;
24
25
  this.ezChange.emit(newValue);
25
26
  }
27
+ observeErrorMessage(newValue) {
28
+ if (newValue && this.previewMode) {
29
+ this.previewMode = false;
30
+ }
31
+ }
26
32
  async handleExecuteToolbarCommand(event) {
27
33
  const { command, value } = event.detail;
28
34
  await this.executeCommand(command, value);
@@ -251,10 +257,10 @@ export class EzRichText {
251
257
  if (this.previewMode) {
252
258
  return (h("div", { id: 'rich-text-preview-container', class: "preview", innerHTML: this.getSanitizedValue() }));
253
259
  }
254
- return h("ez-text-area", { ref: (el) => this.textAreaRef = el, label: this.label, value: this.value, enabled: this.enabled, rows: this.rows, mode: 'slim', errorMessage: this.errorMessage, onEzChange: this.handleTextAreaChanged.bind(this) });
260
+ return h("ez-text-area", { ref: (el) => this.textAreaRef = el, label: this.label, value: this.value, enabled: this.enabled, rows: this.rows, mode: this.mode, canShowError: this.canShowError, errorMessage: this.errorMessage, onEzChange: this.handleTextAreaChanged.bind(this) });
255
261
  }
256
262
  render() {
257
- return (h(Host, null, h("div", { class: `editor-container ${this.showBorder ? 'bordered' : ''}` }, h("ez-rich-toolbar", { isPreviewMode: this.previewMode, showPreview: this.showPreview, showConfigs: this.showConfigs && this.enabled, showTextFormat: this.showTextFormat && this.enabled, showUndoRedo: this.showUndoRedo && this.enabled }), this.renderContent()), h("ez-link-builder", { ref: (el) => this.linkBuilderRef = el }), h("ez-simple-image-uploader", { ref: (el) => this.imageUploaderRef = el })));
263
+ return (h(Host, null, h("div", { class: 'editor-container bordered' }, h("ez-rich-toolbar", { isPreviewMode: this.previewMode, showPreview: this.showPreview, showConfigs: this.showConfigs && this.enabled, showTextFormat: this.showTextFormat && this.enabled, showUndoRedo: this.showUndoRedo && this.enabled }), this.renderContent()), h("ez-link-builder", { ref: (el) => this.linkBuilderRef = el }), h("ez-simple-image-uploader", { ref: (el) => this.imageUploaderRef = el })));
258
264
  }
259
265
  static get is() { return "ez-rich-text"; }
260
266
  static get encapsulation() { return "scoped"; }
@@ -288,24 +294,6 @@ export class EzRichText {
288
294
  "reflect": false,
289
295
  "defaultValue": "true"
290
296
  },
291
- "showBorder": {
292
- "type": "boolean",
293
- "mutable": true,
294
- "complexType": {
295
- "original": "boolean",
296
- "resolved": "boolean",
297
- "references": {}
298
- },
299
- "required": false,
300
- "optional": false,
301
- "docs": {
302
- "tags": [],
303
- "text": "Define se deve exibir a borda externa do componente"
304
- },
305
- "attribute": "show-border",
306
- "reflect": true,
307
- "defaultValue": "false"
308
- },
309
297
  "value": {
310
298
  "type": "string",
311
299
  "mutable": true,
@@ -341,6 +329,24 @@ export class EzRichText {
341
329
  "attribute": "label",
342
330
  "reflect": true
343
331
  },
332
+ "mode": {
333
+ "type": "string",
334
+ "mutable": false,
335
+ "complexType": {
336
+ "original": "\"slim\" | \"regular\"",
337
+ "resolved": "\"regular\" | \"slim\"",
338
+ "references": {}
339
+ },
340
+ "required": false,
341
+ "optional": false,
342
+ "docs": {
343
+ "tags": [],
344
+ "text": "Define o tamanho do campo."
345
+ },
346
+ "attribute": "mode",
347
+ "reflect": true,
348
+ "defaultValue": "\"regular\""
349
+ },
344
350
  "enabled": {
345
351
  "type": "boolean",
346
352
  "mutable": false,
@@ -394,6 +400,24 @@ export class EzRichText {
394
400
  "attribute": "error-message",
395
401
  "reflect": true
396
402
  },
403
+ "canShowError": {
404
+ "type": "boolean",
405
+ "mutable": false,
406
+ "complexType": {
407
+ "original": "boolean",
408
+ "resolved": "boolean",
409
+ "references": {}
410
+ },
411
+ "required": false,
412
+ "optional": false,
413
+ "docs": {
414
+ "tags": [],
415
+ "text": "Se false deixa de exibir a mensagem de erro dentro do campo."
416
+ },
417
+ "attribute": "can-show-error",
418
+ "reflect": true,
419
+ "defaultValue": "true"
420
+ },
397
421
  "showConfigs": {
398
422
  "type": "boolean",
399
423
  "mutable": false,
@@ -530,6 +554,9 @@ export class EzRichText {
530
554
  return [{
531
555
  "propName": "value",
532
556
  "methodName": "observeValue"
557
+ }, {
558
+ "propName": "errorMessage",
559
+ "methodName": "observeErrorMessage"
533
560
  }];
534
561
  }
535
562
  static get listeners() {