@3mo/data-grid 0.12.6-preview.2 → 0.12.6

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.
@@ -4,14 +4,18 @@ import { DataGridColumnComponent } from './DataGridColumnComponent.js';
4
4
  * @element mo-data-grid-column-deletion
5
5
  *
6
6
  * @attr prevent - Prevents the deletion button from being displayed
7
+ * @attr icon - The icon to display. Defaults to 'delete'
8
+ * @attr tooltip - The tooltip to display. Defaults to 'Delete position'
9
+ *
10
+ * @i18n "Delete position"
7
11
  *
8
12
  * @fires delete
9
13
  */
10
14
  export declare class DataGridColumnDeletion<TData> extends DataGridColumnComponent<TData, never> {
11
15
  readonly delete: EventDispatcher<TData>;
12
- tooltipText?: string;
13
- icon: MaterialIcon;
14
16
  prevent: boolean;
17
+ icon: MaterialIcon;
18
+ tooltip?: string;
15
19
  nonSortable: boolean;
16
20
  nonEditable: boolean;
17
21
  getContentTemplate: (_: never, data?: TData) => import("lit-html").HTMLTemplateResult;
@@ -1 +1 @@
1
- {"version":3,"file":"DataGridColumnDeletion.d.ts","sourceRoot":"","sources":["../../columns/DataGridColumnDeletion.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAA;AAG7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AAMtE;;;;;;GAMG;AACH,qBACa,sBAAsB,CAAC,KAAK,CAAE,SAAQ,uBAAuB,CAAC,KAAK,EAAE,KAAK,CAAC;IAC9E,QAAQ,CAAC,MAAM,EAAG,eAAe,CAAC,KAAK,CAAC,CAAA;IAErC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,EAAE,YAAY,CAAW;IACZ,OAAO,UAAQ;IAEnC,WAAW,UAAO;IAClB,WAAW,UAAO;IAE3B,kBAAkB,MAAO,KAAK,SAAS,KAAK,2CAM3C;IAED,sBAAsB,YAAY;CAClC;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,8BAA8B,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAA;KAC/D;CACD"}
1
+ {"version":3,"file":"DataGridColumnDeletion.d.ts","sourceRoot":"","sources":["../../columns/DataGridColumnDeletion.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAA;AAG7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AAMtE;;;;;;;;;;GAUG;AACH,qBACa,sBAAsB,CAAC,KAAK,CAAE,SAAQ,uBAAuB,CAAC,KAAK,EAAE,KAAK,CAAC;IAC9E,QAAQ,CAAC,MAAM,EAAG,eAAe,CAAC,KAAK,CAAC,CAAA;IAEpB,OAAO,UAAQ;IAChC,IAAI,EAAE,YAAY,CAAW;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAA;IAEnB,WAAW,UAAO;IAClB,WAAW,UAAO;IAE3B,kBAAkB,MAAO,KAAK,SAAS,KAAK,2CAM3C;IAED,sBAAsB,YAAY;CAClC;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,8BAA8B,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAA;KAC/D;CACD"}
@@ -10,19 +10,23 @@ Localizer.dictionaries.add('de', {
10
10
  * @element mo-data-grid-column-deletion
11
11
  *
12
12
  * @attr prevent - Prevents the deletion button from being displayed
13
+ * @attr icon - The icon to display. Defaults to 'delete'
14
+ * @attr tooltip - The tooltip to display. Defaults to 'Delete position'
15
+ *
16
+ * @i18n "Delete position"
13
17
  *
14
18
  * @fires delete
15
19
  */
16
20
  let DataGridColumnDeletion = class DataGridColumnDeletion extends DataGridColumnComponent {
17
21
  constructor() {
18
22
  super(...arguments);
19
- this.icon = 'delete';
20
23
  this.prevent = false;
24
+ this.icon = 'delete';
21
25
  this.nonSortable = true;
22
26
  this.nonEditable = true;
23
27
  this.getContentTemplate = (_, data) => this.prevent ? html.nothing : html `
24
28
  <mo-icon-button icon=${this.icon}
25
- ${tooltip(this.tooltipText ?? t('Delete position'))}
29
+ ${tooltip(this.tooltip ?? t('Delete position'))}
26
30
  ${style({ color: 'var(--mo-color-gray)', height: '40px', display: 'flex' })}
27
31
  @click=${() => !data ? void 0 : this.delete.dispatch(data)}
28
32
  ></mo-icon-button>
@@ -34,14 +38,14 @@ __decorate([
34
38
  event()
35
39
  ], DataGridColumnDeletion.prototype, "delete", void 0);
36
40
  __decorate([
37
- property()
38
- ], DataGridColumnDeletion.prototype, "tooltipText", void 0);
41
+ property({ type: Boolean })
42
+ ], DataGridColumnDeletion.prototype, "prevent", void 0);
39
43
  __decorate([
40
44
  property()
41
45
  ], DataGridColumnDeletion.prototype, "icon", void 0);
42
46
  __decorate([
43
- property({ type: Boolean })
44
- ], DataGridColumnDeletion.prototype, "prevent", void 0);
47
+ property()
48
+ ], DataGridColumnDeletion.prototype, "tooltip", void 0);
45
49
  DataGridColumnDeletion = __decorate([
46
50
  component('mo-data-grid-column-deletion')
47
51
  ], DataGridColumnDeletion);