@kubex/zinc 1.1.90 → 1.1.91
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/custom-elements.json +893 -798
- package/dist/vscode.html-custom-data.json +62 -37
- package/dist/web-types.json +154 -104
- package/dist/zn.d.ts +10 -0
- package/dist/zn.min.js +56 -53
- package/package.json +1 -1
- package/src/components/inline-edit/inline-edit.component.ts +5 -0
- package/src/components/input/input.component.ts +4 -1
- package/src/components/slash-menu/slash-menu.component.ts +4 -1
- package/src/components/textarea/textarea.component.ts +4 -1
- package/src/components/translations/translations.component.ts +4 -0
package/package.json
CHANGED
|
@@ -120,6 +120,9 @@ export default class ZnInlineEdit extends ZincElement implements ZincFormControl
|
|
|
120
120
|
/** The heading shown above the slash menu's items. */
|
|
121
121
|
@property({ attribute: 'slash-heading' }) slashHeading = 'Insert';
|
|
122
122
|
|
|
123
|
+
/** Hides the insertion keys normally shown against the slash menu's items. */
|
|
124
|
+
@property({ attribute: 'slash-hide-keys', type: Boolean }) slashHideKeys = false;
|
|
125
|
+
|
|
123
126
|
/** Resolves additional slash menu items each time the menu opens. JavaScript only. */
|
|
124
127
|
@property({ attribute: false }) slashItemsProvider?: (query: string) => SlashMenuItem[] | Promise<SlashMenuItem[]>;
|
|
125
128
|
|
|
@@ -463,6 +466,7 @@ export default class ZnInlineEdit extends ZincElement implements ZincFormControl
|
|
|
463
466
|
slash-trigger="${this.slashTrigger}"
|
|
464
467
|
slash-heading="${this.slashHeading}"
|
|
465
468
|
slash-preset="${this.slashPreset}"
|
|
469
|
+
?slash-hide-keys="${this.slashHideKeys}"
|
|
466
470
|
.slashItems="${this.slashItems}"
|
|
467
471
|
.slashItemsProvider="${this.slashItemsProvider}"
|
|
468
472
|
@zn-input="${this.handleInput}"
|
|
@@ -485,6 +489,7 @@ export default class ZnInlineEdit extends ZincElement implements ZincFormControl
|
|
|
485
489
|
slash-trigger="${this.slashTrigger}"
|
|
486
490
|
slash-heading="${this.slashHeading}"
|
|
487
491
|
slash-preset="${this.slashPreset}"
|
|
492
|
+
?slash-hide-keys="${this.slashHideKeys}"
|
|
488
493
|
.slashItems="${this.slashItems}"
|
|
489
494
|
.slashItemsProvider="${this.slashItemsProvider}"
|
|
490
495
|
@zn-input="${this.handleInput}"
|
|
@@ -279,6 +279,9 @@ export default class ZnInput extends ZincElement implements ZincFormControl {
|
|
|
279
279
|
/** The heading shown above the slash menu's items. */
|
|
280
280
|
@property({attribute: 'slash-heading'}) slashHeading = 'Insert';
|
|
281
281
|
|
|
282
|
+
/** Hides the insertion keys normally shown against the slash menu's items. */
|
|
283
|
+
@property({attribute: 'slash-hide-keys', type: Boolean}) slashHideKeys = false;
|
|
284
|
+
|
|
282
285
|
/**
|
|
283
286
|
* Resolves additional items each time the menu opens, for lists that come from elsewhere (e.g. an
|
|
284
287
|
* API). Receives the current query and may return a promise. JavaScript only.
|
|
@@ -1097,7 +1100,7 @@ export default class ZnInput extends ZincElement implements ZincFormControl {
|
|
|
1097
1100
|
</div>
|
|
1098
1101
|
${this.hasSlashMenu
|
|
1099
1102
|
? html`
|
|
1100
|
-
<zn-slash-menu part="slash-menu" heading=${this.slashHeading}></zn-slash-menu>`
|
|
1103
|
+
<zn-slash-menu part="slash-menu" heading=${this.slashHeading} ?hide-keys=${this.slashHideKeys}></zn-slash-menu>`
|
|
1101
1104
|
: ''}
|
|
1102
1105
|
<slot name="slash-menu"></slot>
|
|
1103
1106
|
<slot name="slash-items" hidden></slot>
|
|
@@ -65,6 +65,9 @@ export default class ZnSlashMenu extends ZincElement {
|
|
|
65
65
|
/** The most items to render at once. Remaining matches are reported in the footer. */
|
|
66
66
|
@property({attribute: 'max-items', type: Number}) maxItems = 25;
|
|
67
67
|
|
|
68
|
+
/** Hides the insertion key (the item's value) normally shown against each item. */
|
|
69
|
+
@property({attribute: 'hide-keys', type: Boolean}) hideKeys = false;
|
|
70
|
+
|
|
68
71
|
/** The element or caret rect the panel is positioned against. */
|
|
69
72
|
@property({attribute: false}) anchor: Element | VirtualElement | null = null;
|
|
70
73
|
|
|
@@ -269,7 +272,7 @@ export default class ZnSlashMenu extends ZincElement {
|
|
|
269
272
|
|
|
270
273
|
private renderItem(item: SlashMenuItem, index: number, showIcons: boolean) {
|
|
271
274
|
const isActive = index === this.activeIndex;
|
|
272
|
-
const token = item.value && item.value !== item.label && !item.value.includes('\n') ? item.value : '';
|
|
275
|
+
const token = !this.hideKeys && item.value && item.value !== item.label && !item.value.includes('\n') ? item.value : '';
|
|
273
276
|
|
|
274
277
|
return html`
|
|
275
278
|
<button
|
|
@@ -203,6 +203,9 @@ export default class ZnTextarea extends ZincElement implements ZincFormControl {
|
|
|
203
203
|
/** The heading shown above the slash menu's items. */
|
|
204
204
|
@property({attribute: 'slash-heading'}) slashHeading = 'Insert';
|
|
205
205
|
|
|
206
|
+
/** Hides the insertion keys normally shown against the slash menu's items. */
|
|
207
|
+
@property({attribute: 'slash-hide-keys', type: Boolean}) slashHideKeys = false;
|
|
208
|
+
|
|
206
209
|
/**
|
|
207
210
|
* Resolves additional items each time the menu opens, for lists that come from elsewhere (e.g. an
|
|
208
211
|
* API). Receives the current query and may return a promise. JavaScript only.
|
|
@@ -584,7 +587,7 @@ export default class ZnTextarea extends ZincElement implements ZincFormControl {
|
|
|
584
587
|
</div>
|
|
585
588
|
${this.hasSlashMenu
|
|
586
589
|
? html`
|
|
587
|
-
<zn-slash-menu part="slash-menu" heading=${this.slashHeading}></zn-slash-menu>`
|
|
590
|
+
<zn-slash-menu part="slash-menu" heading=${this.slashHeading} ?hide-keys=${this.slashHideKeys}></zn-slash-menu>`
|
|
588
591
|
: ''}
|
|
589
592
|
<slot name="slash-menu"></slot>
|
|
590
593
|
<slot name="slash-items" hidden></slot>
|
|
@@ -72,6 +72,9 @@ export default class ZnTranslations extends ZincElement implements ZincFormContr
|
|
|
72
72
|
/** The heading shown above the slash menu's items. */
|
|
73
73
|
@property({attribute: 'slash-heading'}) slashHeading = 'Insert';
|
|
74
74
|
|
|
75
|
+
/** Hides the insertion keys normally shown against the slash menu's items. */
|
|
76
|
+
@property({attribute: 'slash-hide-keys', type: Boolean}) slashHideKeys = false;
|
|
77
|
+
|
|
75
78
|
/** Resolves additional slash menu items each time the menu opens. JavaScript only. */
|
|
76
79
|
@property({attribute: false}) slashItemsProvider?: (query: string) => SlashMenuItem[] | Promise<SlashMenuItem[]>;
|
|
77
80
|
|
|
@@ -444,6 +447,7 @@ export default class ZnTranslations extends ZincElement implements ZincFormContr
|
|
|
444
447
|
slash-trigger="${this.slashTrigger}"
|
|
445
448
|
slash-heading="${this.slashHeading}"
|
|
446
449
|
slash-preset="${this.slashPreset}"
|
|
450
|
+
?slash-hide-keys="${this.slashHideKeys}"
|
|
447
451
|
.slashItems="${this.slashItems}"
|
|
448
452
|
.slashItemsProvider="${this.slashItemsProvider}"
|
|
449
453
|
@zn-change="${this.handleValueUpdate}"
|