@xleddyl/443-components-vue 0.16.11 → 0.16.13
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/CATALOG.md +4 -4
- package/README.md +2 -1
- package/dist/editor/RichTextEditor.vue +72 -4
- package/dist/editor/RichTextEditor.vue.d.ts +2 -0
- package/dist/editor/rich-text-editor.css +20 -0
- package/dist/editor/types.d.ts +1 -1
- package/dist/grid/DataGrid.vue +3 -1
- package/dist/grid/GridToolbar.vue +1 -1
- package/dist/grid/cells/ImageCell.vue +5 -1
- package/dist/grid/data-grid.css +7 -0
- package/dist/grid/theme.d.ts +2 -2
- package/dist/grid/theme.mjs +8 -6
- package/dist/grid/types.d.ts +1 -1
- package/dist/locale/de.mjs +2 -1
- package/dist/locale/en.mjs +2 -1
- package/dist/locale/it.mjs +2 -1
- package/dist/locale/types.d.ts +1 -0
- package/package.json +1 -1
package/CATALOG.md
CHANGED
|
@@ -286,15 +286,15 @@ Import from `@xleddyl/443-components-vue/grid`. It wraps AG Grid Community.
|
|
|
286
286
|
| `DataGrid` | Big table: virtual scroll, column menu, search, CSV export, selection, server sort and paging, inline editing. For small tables use `Table`. | Models: `v-model:query`, `v-model:page`, `v-model:pageSize`, `v-model:sort` (`{ column, direction }`). Props: `rows`, `columns` (AG Grid `ColDef`), `rowIdKey` or `getRowId`, `storageKey` (columns and page size in the preferences store), `density`, `selectable`, `loading`, `height`, `fill`, `autoHeight`, `toolbar`, `searchable`, `columnMenu`, `exportable`, `serverSort`, `pagination`, `serverPagination`, `total`, `filterable`, `editable`, `spreadsheet`, `gridOptions`, `messages`, `filterCount`. Slots: `actions`, `actions-end` (after the column menu and export buttons), `filters` (`{ close, count }`, hosted in a modal opened by a funnel button next to the search). Events: `filtersReset`, `rowClick`, `selectionChange`, `sortChange`, `filterChange`, `cellsChange`, `cellsInvalid`, `dirtyChange`, `rangeChange`, `copy`. | `grid/data-grid.vue` |
|
|
287
287
|
| `DataGrid` with `spreadsheet` | Excel-like editing: cell range selection, copy and paste (TSV), fill down and right, clear, undo and redo, dirty cell tracking. Set `rowIdKey` or `getRowId`. | Template ref methods (`GridSpreadsheetMethods`): `getRange`, `getSelectedCells`, `selectRange`, `selectAll`, `setRangeValue`, `copyRange`, `paste`, `fillDown`, `fillRight`, `clearCells`, `undo`, `redo`, `getDirtyCells`, `clearDirty`. The `actions` slot gets the same methods plus `range`, `selectedCellCount`, `dirtyCount`, `canUndo`, `canRedo`. Use `cellsChange` to save edits, `cellsInvalid` for rejected input. | `grid/spreadsheet.vue` |
|
|
288
288
|
| `GridToolbar` | Toolbar of `DataGrid` (search, column menu, export). `DataGrid` already renders it. Use it alone only for a custom grid setup. | Props: `api`, `searchable`, `columnMenu`, `exportable`, `exportFileName`, `debounce`, `filterCount`. Model: `v-model` (query). Slots: default (actions), `filters`. Events: `resetColumns`, `filtersReset`. | - |
|
|
289
|
-
| Cell renderers | Use as `cellRenderer` in a column definition, with `cellRendererParams`. | `BadgeCell` (`tones`, `labels`, `defaultTone`, `variant`; array values render one badge each, `max` adds a `+N` badge, `wrap`), `BooleanCell` (`trueLabel`, `falseLabel`), `DateCell` (`locale`, `options`, `relative`), `EmptyCell` (placeholder for empty values), `ImageCell` (`alt`, `rounded`, `fit`, `size`), `LinkCell` (`href`, `label`, `target`), `ButtonCell` (`onClick`, `label`, `ariaLabel`, `emptyLabel`; an inline button that does not trigger the row click).
|
|
289
|
+
| Cell renderers | Use as `cellRenderer` in a column definition, with `cellRendererParams`. | `BadgeCell` (`tones`, `labels`, `defaultTone`, `variant`; array values render one badge each, `max` adds a `+N` badge, `wrap`), `BooleanCell` (`trueLabel`, `falseLabel`), `DateCell` (`locale`, `options`, `relative`), `EmptyCell` (placeholder for empty values), `ImageCell` (`alt`, `rounded`, `fit`: `cover`, `contain` or `natural` (original aspect, height `size`), `size`), `LinkCell` (`href`, `label`, `target`), `ButtonCell` (`onClick`, `label`, `ariaLabel`, `emptyLabel`; an inline button that does not trigger the row click). | `grid/data-grid.vue` |
|
|
290
290
|
|
|
291
291
|
Grid helpers: `registerGridModules`, `registerGridEditorModules`, `registerGridFilterModules`, `registerGridSpreadsheetModules` (register AG Grid modules by hand), `createGridTheme`, `parseTsv`, `formatTsv`.
|
|
292
292
|
|
|
293
293
|
## Editor (group `editor`)
|
|
294
294
|
|
|
295
|
-
| Component | Purpose and when to use it | Main props, models, slots, events
|
|
296
|
-
| ---------------- | ----------------------------------------------------------------------------------------------------------- |
|
|
297
|
-
| `RichTextEditor` | Rich text field (Tiptap): headings, bold, italic, lists, quote, code, links. Use `Textarea` for plain text. | Model: `v-model` (HTML string or JSON, per `format`). Props: `format` (html, json), `placeholder`, `readonly`, `disabled`, `invalid`, `required`, `maxLength`, `showCount`, `minHeight`, `maxHeight`, `toolbar` (items and `'\|'` separators), `headings`, `headingLabel`, `linkTypes` (url, email, phone), `extensions`, `messages`. Works inside `FormField`. | `editor/rich-text-editor.vue` |
|
|
295
|
+
| Component | Purpose and when to use it | Main props, models, slots, events | Playground |
|
|
296
|
+
| ---------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- |
|
|
297
|
+
| `RichTextEditor` | Rich text field (Tiptap): headings, bold, italic, lists, quote, code, links. Use `Textarea` for plain text. | Model: `v-model` (HTML string or JSON, per `format`). Props: `format` (html, json), `placeholder`, `readonly`, `disabled`, `invalid`, `required`, `maxLength`, `showCount`, `minHeight`, `maxHeight`, `toolbar` (items and `'\|'` separators, `'source'` for the raw value toggle), `source` (adds the raw value toggle to the default toolbar), `headings`, `headingLabel`, `linkTypes` (url, email, phone), `extensions`, `messages`. Works inside `FormField`. | `editor/rich-text-editor.vue` |
|
|
298
298
|
|
|
299
299
|
## Chart (group `chart`)
|
|
300
300
|
|
package/README.md
CHANGED
|
@@ -848,7 +848,7 @@ Accessibility related props and defaults:
|
|
|
848
848
|
- `ColorInput` `swatches` accept `{ value, label }` objects (a radio group named by `label` or the hex). `PasswordInput` picks `autocomplete="new-password"` with `generate` or `strength`, `current-password` otherwise.
|
|
849
849
|
- `Tree` with `reorderable` shows small move buttons (up, down, indent, outdent) on the hovered or focused row, as a single pointer alternative to dragging. Set `patterns` on `LineChart` and `BarChart` to tell series apart without color (dash and point style per line, a fill pattern per bar series, mirrored in the legend); it is off by default.
|
|
850
850
|
- `DataGrid` sort is a model: `v-model:sort` (`{ column, direction } | null`) sets the sorted column from outside (server side sort, a sort restored from the URL) and follows header clicks. Leave it unset for an uncontrolled grid. `sortChange` still fires with `serverSort`.
|
|
851
|
-
- `DataGrid` takes `rowHeight` and `headerHeight` (pixels) for an exact row size on top of `density
|
|
851
|
+
- `DataGrid` takes `rowHeight` and `headerHeight` (pixels) for an exact row size on top of `density` (the theme gets the same row height, so the text stays centered), and `headerText: (field, column) => string | undefined` to name every column that has a `field` and no `headerName` (from your i18n).
|
|
852
852
|
- `DataGrid` `filterable` registers the AG Grid text, number and date filters (`registerGridFilterModules()` does it without the prop) and turns `filter` on for every column. `filterChange(model, event)` fires with `api.getFilterModel()` whenever a column filter changes, also when the filters come from `gridOptions` or your own registered modules.
|
|
853
853
|
- `DataGrid` `#actions-end` slot: same props as `#actions`, rendered at the end of the toolbar, after the column menu and export buttons (a view switch). `GridToolbar` takes it as `#end`.
|
|
854
854
|
- `DataGrid` `#filters` slot: put your own filter controls (Select, Combobox, DateInput bound with `v-model`) in it and the toolbar shows a square funnel button right after the search input (at the start with `:searchable="false"`), before the `actions`. The button opens a `Modal` titled "Filters" that hosts the slot, so the filters still apply live; its footer has "Reset filters" (emits `filtersReset`, disabled while `filterCount` is 0) and "Show results" (closes it). `filterCount` shows the number of active filters as a badge on the button and in its accessible name ("Filters, 2 active", `grid.filtersActive`). Slot props: `{ close, count }`. Focus returns to the button on close, and the modal becomes a bottom sheet on small screens. `GridToolbar` takes the same slot, prop and event.
|
|
@@ -869,6 +869,7 @@ Accessibility related props and defaults:
|
|
|
869
869
|
```
|
|
870
870
|
|
|
871
871
|
- `DateCell` takes `relative: true` (or `Intl.RelativeTimeFormatOptions`) in `cellRendererParams` for "3 days ago"; the absolute date stays in the `title`. `relativeWithin` (milliseconds, default unset: always relative) shows the absolute date instead once the value is further than that from now, in the past or the future (`relativeWithin: 7 * 86_400_000` keeps "3 days ago" and prints older dates in full).
|
|
872
|
+
- A column without a visible header (a photo column) keeps a name for the Columns menu with `headerValueGetter: ({ location }) => (location === 'header' ? '' : 'Photo')`: the menu reads the name for the `columnToolPanel` location.
|
|
872
873
|
- `DataGrid` takes `gridOptions` for any AG Grid option it does not wrap (`rowHeight`, `onCellEditingStopped`, `onFilterChanged`, ...). A prop of `DataGrid` wins only when it is set: `getRowId`, `rowSelection` (when `selectable` is off), `autoSizeStrategy` (also `undefined` to turn it off), `tooltipShowDelay`, `overlayNoRowsTemplate` and `overlayLoadingTemplate` from `gridOptions` are used otherwise; `defaultColDef` and `localeText` are merged over the component defaults, and `context` is merged under the cell context. Handlers from both run.
|
|
873
874
|
- `DataGrid` row ids: `getRowId: (params) => string` (wins), `rowIdKey` (a field of the row), or `gridOptions.getRowId`.
|
|
874
875
|
- `DataGrid` `fill` makes the grid, with its toolbar and footer, fill its parent (a flex or grid item with `flex: 1; min-height: 0`, or `height: 100%` in a block with a height) instead of the fixed `height`. Ignored with `autoHeight`.
|
|
@@ -101,7 +101,20 @@
|
|
|
101
101
|
/>
|
|
102
102
|
</form>
|
|
103
103
|
|
|
104
|
-
<EditorContent class="k-editor-content" :editor="editor" />
|
|
104
|
+
<EditorContent v-show="!sourceMode" class="k-editor-content" :editor="editor" />
|
|
105
|
+
<textarea
|
|
106
|
+
v-if="sourceMode"
|
|
107
|
+
ref="sourceRef"
|
|
108
|
+
class="k-editor-source"
|
|
109
|
+
:class="{ 'is-invalid': sourceInvalid }"
|
|
110
|
+
:value="sourceText"
|
|
111
|
+
:readonly="!editable"
|
|
112
|
+
:aria-label="text.source"
|
|
113
|
+
:aria-invalid="sourceInvalid ? 'true' : void 0"
|
|
114
|
+
:style="{ minHeight, maxHeight }"
|
|
115
|
+
spellcheck="false"
|
|
116
|
+
@input="onSourceInput($event.target.value)"
|
|
117
|
+
/>
|
|
105
118
|
|
|
106
119
|
<div v-if="showCount" class="k-editor-footer">
|
|
107
120
|
<span
|
|
@@ -134,6 +147,7 @@ const icons = {
|
|
|
134
147
|
undo: "M9 15 3 9m0 0 6-6M3 9h12a6 6 0 0 1 0 12h-3",
|
|
135
148
|
redo: "m15 15 6-6m0 0-6-6m6 6H9a6 6 0 0 0 0 12h3",
|
|
136
149
|
bulletList: "M9 6h12M9 12h12M9 18h12M4 6h.01M4 12h.01M4 18h.01",
|
|
150
|
+
source: "M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5",
|
|
137
151
|
link: "M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"
|
|
138
152
|
};
|
|
139
153
|
const props = defineProps({
|
|
@@ -153,7 +167,8 @@ const props = defineProps({
|
|
|
153
167
|
toolbar: { type: Array, required: false },
|
|
154
168
|
extensions: { type: Array, required: false, default: () => [] },
|
|
155
169
|
linkTypes: { type: Array, required: false, default: () => ["url"] },
|
|
156
|
-
messages: { type: Object, required: false }
|
|
170
|
+
messages: { type: Object, required: false },
|
|
171
|
+
source: { type: Boolean, required: false }
|
|
157
172
|
});
|
|
158
173
|
const model = defineModel({ type: [String, Object, null], ...{ default: null } });
|
|
159
174
|
const control = useFieldControl({
|
|
@@ -171,6 +186,10 @@ const linkUrl = ref("");
|
|
|
171
186
|
const linkText = ref("");
|
|
172
187
|
const linkType = ref("url");
|
|
173
188
|
const linkNeedsText = ref(false);
|
|
189
|
+
const sourceRef = useTemplateRef("sourceRef");
|
|
190
|
+
const sourceMode = ref(false);
|
|
191
|
+
const sourceText = ref("");
|
|
192
|
+
const sourceInvalid = ref(false);
|
|
174
193
|
const linkPrefixes = { url: "", email: "mailto:", phone: "tel:" };
|
|
175
194
|
const linkTypeLabels = computed(() => ({
|
|
176
195
|
url: text.value.linkTypeUrl,
|
|
@@ -400,7 +419,15 @@ const defaultToolbar = computed(() => [
|
|
|
400
419
|
}
|
|
401
420
|
]
|
|
402
421
|
]);
|
|
422
|
+
const sourceItem = computed(() => ({
|
|
423
|
+
id: "source",
|
|
424
|
+
label: text.value.source,
|
|
425
|
+
icon: icons.source,
|
|
426
|
+
active: () => sourceMode.value,
|
|
427
|
+
run: toggleSource
|
|
428
|
+
}));
|
|
403
429
|
const optionalItems = computed(() => [
|
|
430
|
+
sourceItem.value,
|
|
404
431
|
mark(
|
|
405
432
|
"underline",
|
|
406
433
|
text.value.underline,
|
|
@@ -423,7 +450,10 @@ function splitToolbar(toolbar) {
|
|
|
423
450
|
return result;
|
|
424
451
|
}
|
|
425
452
|
const groups = computed(() => {
|
|
426
|
-
if (!props.toolbar)
|
|
453
|
+
if (!props.toolbar)
|
|
454
|
+
return [...defaultToolbar.value, props.source ? [sourceItem.value] : []].filter(
|
|
455
|
+
(group) => group.length
|
|
456
|
+
);
|
|
427
457
|
const byId = new Map(
|
|
428
458
|
[...defaultToolbar.value.flat(), ...optionalItems.value].map((item) => [item.id, item])
|
|
429
459
|
);
|
|
@@ -437,7 +467,8 @@ const groups = computed(() => {
|
|
|
437
467
|
).filter((group) => group.length);
|
|
438
468
|
});
|
|
439
469
|
function itemAttributes(item) {
|
|
440
|
-
const
|
|
470
|
+
const locked = sourceMode.value && item.id !== "source";
|
|
471
|
+
const disabled = locked || (item.enabled ? !item.enabled() : false);
|
|
441
472
|
return {
|
|
442
473
|
"aria-label": item.label,
|
|
443
474
|
title: item.label,
|
|
@@ -448,6 +479,43 @@ function itemAttributes(item) {
|
|
|
448
479
|
onClick: item.run
|
|
449
480
|
};
|
|
450
481
|
}
|
|
482
|
+
function sourceOf(value) {
|
|
483
|
+
if (value === null || value === "") return "";
|
|
484
|
+
return typeof value === "string" ? value : JSON.stringify(value, null, 2);
|
|
485
|
+
}
|
|
486
|
+
async function toggleSource() {
|
|
487
|
+
if (sourceMode.value) {
|
|
488
|
+
sourceMode.value = false;
|
|
489
|
+
sourceInvalid.value = false;
|
|
490
|
+
await nextTick();
|
|
491
|
+
editor.value?.commands.focus();
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
linkOpen.value = false;
|
|
495
|
+
sourceText.value = sourceOf(model.value);
|
|
496
|
+
sourceInvalid.value = false;
|
|
497
|
+
sourceMode.value = true;
|
|
498
|
+
await nextTick();
|
|
499
|
+
sourceRef.value?.focus();
|
|
500
|
+
}
|
|
501
|
+
function onSourceInput(value) {
|
|
502
|
+
sourceText.value = value;
|
|
503
|
+
if (!value.trim()) {
|
|
504
|
+
sourceInvalid.value = false;
|
|
505
|
+
model.value = null;
|
|
506
|
+
return;
|
|
507
|
+
}
|
|
508
|
+
if (props.format !== "json") {
|
|
509
|
+
model.value = value;
|
|
510
|
+
return;
|
|
511
|
+
}
|
|
512
|
+
try {
|
|
513
|
+
model.value = JSON.parse(value);
|
|
514
|
+
sourceInvalid.value = false;
|
|
515
|
+
} catch {
|
|
516
|
+
sourceInvalid.value = true;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
451
519
|
function toggleLink() {
|
|
452
520
|
if (linkOpen.value) {
|
|
453
521
|
closeLink();
|
|
@@ -19,6 +19,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
19
19
|
extensions?: Extensions;
|
|
20
20
|
linkTypes?: EditorLinkType[];
|
|
21
21
|
messages?: Partial<EditorMessages>;
|
|
22
|
+
source?: boolean;
|
|
22
23
|
modelValue?: EditorValue;
|
|
23
24
|
key?: PropertyKey | undefined;
|
|
24
25
|
prefix?: string | undefined | undefined;
|
|
@@ -234,6 +235,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
234
235
|
extensions?: Extensions;
|
|
235
236
|
linkTypes?: EditorLinkType[];
|
|
236
237
|
messages?: Partial<EditorMessages>;
|
|
238
|
+
source?: boolean;
|
|
237
239
|
modelValue?: EditorValue;
|
|
238
240
|
key?: PropertyKey | undefined;
|
|
239
241
|
prefix?: string | undefined | undefined;
|
|
@@ -291,3 +291,23 @@
|
|
|
291
291
|
.k-editor-count.is-over {
|
|
292
292
|
color: var(--k-danger-text);
|
|
293
293
|
}
|
|
294
|
+
|
|
295
|
+
.k-editor-source {
|
|
296
|
+
flex: 1;
|
|
297
|
+
width: 100%;
|
|
298
|
+
min-width: 0;
|
|
299
|
+
padding: 0.625rem 0.875rem;
|
|
300
|
+
overflow-y: auto;
|
|
301
|
+
font-family: var(--k-font-mono);
|
|
302
|
+
font-size: 0.8125rem;
|
|
303
|
+
line-height: 1.6;
|
|
304
|
+
color: var(--k-text-toned);
|
|
305
|
+
background: transparent;
|
|
306
|
+
border: 0;
|
|
307
|
+
outline: none;
|
|
308
|
+
resize: vertical;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.k-editor-source.is-invalid {
|
|
312
|
+
color: var(--k-danger-text);
|
|
313
|
+
}
|
package/dist/editor/types.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ export type EditorMessages = KMessages['editor'];
|
|
|
6
6
|
export type EditorHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
7
7
|
export type EditorHeadingLabel = 'level' | 'relative';
|
|
8
8
|
export type EditorLinkType = 'url' | 'email' | 'phone';
|
|
9
|
-
export type EditorToolbarItem = 'undo' | 'redo' | 'headings' | `h${EditorHeadingLevel}` | 'bold' | 'italic' | 'underline' | 'strike' | 'code' | 'bulletList' | 'orderedList' | 'blockquote' | 'link' | '|';
|
|
9
|
+
export type EditorToolbarItem = 'undo' | 'redo' | 'headings' | `h${EditorHeadingLevel}` | 'bold' | 'italic' | 'underline' | 'strike' | 'code' | 'bulletList' | 'orderedList' | 'blockquote' | 'link' | 'source' | '|';
|
|
10
10
|
export type EditorToolbar = EditorToolbarItem[] | EditorToolbarItem[][];
|
package/dist/grid/DataGrid.vue
CHANGED
|
@@ -240,7 +240,9 @@ const gridLocaleText = computed(() => ({
|
|
|
240
240
|
const gridContext = computed(() => ({ ...props.gridOptions?.context, ...cellContext.value }));
|
|
241
241
|
const live = useLiveMessage();
|
|
242
242
|
let announcedCount = null;
|
|
243
|
-
const theme = computed(
|
|
243
|
+
const theme = computed(
|
|
244
|
+
() => getGridTheme(props.density, props.rowHeight ?? props.gridOptions?.rowHeight)
|
|
245
|
+
);
|
|
244
246
|
const mounted = ref(false);
|
|
245
247
|
const api = shallowRef(null);
|
|
246
248
|
const selectedCount = ref(0);
|
|
@@ -144,7 +144,7 @@ function readColumns() {
|
|
|
144
144
|
const definition = column.getColDef();
|
|
145
145
|
return {
|
|
146
146
|
id: column.getColId(),
|
|
147
|
-
label: definition.headerName
|
|
147
|
+
label: api?.getDisplayNameForColumn(column, "columnToolPanel") || definition.headerName || definition.field || column.getColId(),
|
|
148
148
|
visible: column.isVisible()
|
|
149
149
|
};
|
|
150
150
|
});
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
<img
|
|
3
3
|
v-if="src"
|
|
4
4
|
class="k-data-grid-image"
|
|
5
|
-
:class="{
|
|
5
|
+
:class="{
|
|
6
|
+
'is-rounded': params.rounded,
|
|
7
|
+
'is-contain': params.fit === 'contain',
|
|
8
|
+
'is-natural': params.fit === 'natural'
|
|
9
|
+
}"
|
|
6
10
|
:style="sizeStyle"
|
|
7
11
|
:src="src"
|
|
8
12
|
:alt="alt"
|
package/dist/grid/data-grid.css
CHANGED
|
@@ -260,6 +260,13 @@
|
|
|
260
260
|
object-fit: contain;
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
+
.k-data-grid-image.is-natural {
|
|
264
|
+
width: auto;
|
|
265
|
+
max-width: 100%;
|
|
266
|
+
object-fit: contain;
|
|
267
|
+
background: none;
|
|
268
|
+
}
|
|
269
|
+
|
|
263
270
|
.k-data-grid-image.is-rounded {
|
|
264
271
|
border-radius: var(--k-radius-full);
|
|
265
272
|
}
|
package/dist/grid/theme.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { GridDensity } from './types';
|
|
2
|
-
export declare function createGridTheme(density: GridDensity): import("ag-grid-community").Theme<import("ag-grid-community").ThemeDefaultParams>;
|
|
3
|
-
export declare function getGridTheme(density: GridDensity): import("ag-grid-community").Theme<import("ag-grid-community").ThemeDefaultParams>;
|
|
2
|
+
export declare function createGridTheme(density: GridDensity, rowHeight?: number): import("ag-grid-community").Theme<import("ag-grid-community").ThemeDefaultParams>;
|
|
3
|
+
export declare function getGridTheme(density: GridDensity, rowHeight?: number): import("ag-grid-community").Theme<import("ag-grid-community").ThemeDefaultParams>;
|
package/dist/grid/theme.mjs
CHANGED
|
@@ -5,8 +5,8 @@ const spacingByDensity = {
|
|
|
5
5
|
comfortable: 9
|
|
6
6
|
};
|
|
7
7
|
const themes = /* @__PURE__ */ new Map();
|
|
8
|
-
export function createGridTheme(density) {
|
|
9
|
-
|
|
8
|
+
export function createGridTheme(density, rowHeight) {
|
|
9
|
+
const theme = themeQuartz.withParams({
|
|
10
10
|
browserColorScheme: "inherit",
|
|
11
11
|
accentColor: "var(--k-accent)",
|
|
12
12
|
backgroundColor: "var(--k-surface)",
|
|
@@ -47,12 +47,14 @@ export function createGridTheme(density) {
|
|
|
47
47
|
checkboxCheckedShapeColor: "var(--k-accent-contrast)",
|
|
48
48
|
focusShadow: { spread: 2, color: "var(--k-ring)" }
|
|
49
49
|
});
|
|
50
|
+
return rowHeight ? theme.withParams({ rowHeight }) : theme;
|
|
50
51
|
}
|
|
51
|
-
export function getGridTheme(density) {
|
|
52
|
-
|
|
52
|
+
export function getGridTheme(density, rowHeight) {
|
|
53
|
+
const key = `${density}:${rowHeight ?? ""}`;
|
|
54
|
+
let theme = themes.get(key);
|
|
53
55
|
if (!theme) {
|
|
54
|
-
theme = createGridTheme(density);
|
|
55
|
-
themes.set(
|
|
56
|
+
theme = createGridTheme(density, rowHeight);
|
|
57
|
+
themes.set(key, theme);
|
|
56
58
|
}
|
|
57
59
|
return theme;
|
|
58
60
|
}
|
package/dist/grid/types.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export interface BadgeCellParams<T = unknown> {
|
|
|
57
57
|
max?: number;
|
|
58
58
|
wrap?: boolean;
|
|
59
59
|
}
|
|
60
|
-
export type ImageCellFit = 'cover' | 'contain';
|
|
60
|
+
export type ImageCellFit = 'cover' | 'contain' | 'natural';
|
|
61
61
|
export interface ImageCellParams<T = unknown> {
|
|
62
62
|
alt?: (data: T | undefined) => string;
|
|
63
63
|
rounded?: boolean;
|
package/dist/locale/de.mjs
CHANGED
|
@@ -73,7 +73,8 @@ export const de = {
|
|
|
73
73
|
linkText: "Linktext",
|
|
74
74
|
characters: "{count} Zeichen | {count} Zeichen",
|
|
75
75
|
limit: "{count} von {max} Zeichen",
|
|
76
|
-
limitReached: "Zeichenlimit erreicht"
|
|
76
|
+
limitReached: "Zeichenlimit erreicht",
|
|
77
|
+
source: "Quelltext"
|
|
77
78
|
},
|
|
78
79
|
grid: {
|
|
79
80
|
noRows: "Keine Zeilen vorhanden",
|
package/dist/locale/en.mjs
CHANGED
|
@@ -73,7 +73,8 @@ export const en = {
|
|
|
73
73
|
linkText: "Link text",
|
|
74
74
|
characters: "{count} character | {count} characters",
|
|
75
75
|
limit: "{count} of {max} characters",
|
|
76
|
-
limitReached: "Character limit reached"
|
|
76
|
+
limitReached: "Character limit reached",
|
|
77
|
+
source: "Source"
|
|
77
78
|
},
|
|
78
79
|
grid: {
|
|
79
80
|
noRows: "No rows to show",
|
package/dist/locale/it.mjs
CHANGED
|
@@ -73,7 +73,8 @@ export const it = {
|
|
|
73
73
|
linkText: "Testo del link",
|
|
74
74
|
characters: "{count} carattere | {count} caratteri",
|
|
75
75
|
limit: "{count} di {max} caratteri",
|
|
76
|
-
limitReached: "Limite di caratteri raggiunto"
|
|
76
|
+
limitReached: "Limite di caratteri raggiunto",
|
|
77
|
+
source: "Codice sorgente"
|
|
77
78
|
},
|
|
78
79
|
grid: {
|
|
79
80
|
noRows: "Nessuna riga da mostrare",
|
package/dist/locale/types.d.ts
CHANGED
package/package.json
CHANGED