@progress/kendo-angular-toolbar 18.1.0-develop.3 → 18.1.0-develop.30
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/common/overflow-mode.d.ts +8 -0
- package/common/overflow-settings.d.ts +53 -0
- package/common/scroll-buttons.d.ts +12 -0
- package/esm2022/common/overflow-mode.mjs +5 -0
- package/esm2022/common/overflow-settings.mjs +5 -0
- package/esm2022/common/scroll-buttons.mjs +5 -0
- package/esm2022/localization/messages.mjs +14 -2
- package/esm2022/navigation.service.mjs +5 -3
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/renderer.component.mjs +8 -0
- package/esm2022/scroll.service.mjs +102 -0
- package/esm2022/scrollable-button.component.mjs +162 -0
- package/esm2022/toolbar.component.mjs +716 -124
- package/esm2022/tools/toolbar-button.component.mjs +62 -2
- package/esm2022/tools/toolbar-buttongroup.component.mjs +87 -6
- package/esm2022/tools/toolbar-dropdownbutton.component.mjs +67 -11
- package/esm2022/tools/toolbar-separator.component.mjs +8 -0
- package/esm2022/tools/toolbar-splitbutton.component.mjs +61 -5
- package/esm2022/tools/toolbar-tool.component.mjs +9 -1
- package/esm2022/tools/tools.service.mjs +3 -0
- package/esm2022/util.mjs +17 -0
- package/fesm2022/progress-kendo-angular-toolbar.mjs +1300 -155
- package/index.d.ts +3 -0
- package/localization/messages.d.ts +10 -2
- package/package.json +9 -9
- package/render-location.d.ts +1 -1
- package/scroll.service.d.ts +42 -0
- package/scrollable-button.component.d.ts +44 -0
- package/toolbar.component.d.ts +77 -6
- package/tools/toolbar-button.component.d.ts +1 -0
- package/tools/toolbar-buttongroup.component.d.ts +1 -0
- package/tools/toolbar-dropdownbutton.component.d.ts +2 -1
- package/tools/toolbar-splitbutton.component.d.ts +1 -0
- package/tools/toolbar-tool.component.d.ts +6 -0
- package/tools/tools.service.d.ts +1 -0
- package/util.d.ts +5 -0
|
@@ -185,6 +185,7 @@ export class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
185
185
|
imageUrl: ''
|
|
186
186
|
};
|
|
187
187
|
toolbarButtonElement;
|
|
188
|
+
sectionButtonElement;
|
|
188
189
|
overflowButtonElement;
|
|
189
190
|
_showText = 'both';
|
|
190
191
|
_text;
|
|
@@ -244,7 +245,7 @@ export class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
244
245
|
this.selectedChange.emit(state);
|
|
245
246
|
}
|
|
246
247
|
getButton() {
|
|
247
|
-
return
|
|
248
|
+
return this[`${this.location}ButtonElement`]?.nativeElement;
|
|
248
249
|
}
|
|
249
250
|
setTextDisplayMode() {
|
|
250
251
|
this.toolbarOptions.text = this.showText === 'overflow' ? undefined : this.text;
|
|
@@ -253,7 +254,7 @@ export class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
253
254
|
});
|
|
254
255
|
}
|
|
255
256
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
256
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarButtonComponent, isStandalone: true, selector: "kendo-toolbar-button", inputs: { showText: "showText", showIcon: "showIcon", text: "text", style: "style", className: "className", title: "title", disabled: "disabled", toggleable: "toggleable", look: "look", togglable: "togglable", selected: "selected", fillMode: "fillMode", themeColor: "themeColor", icon: "icon", iconClass: "iconClass", svgIcon: "svgIcon", imageUrl: "imageUrl" }, outputs: { click: "click", pointerdown: "pointerdown", selectedChange: "selectedChange" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonComponent) }], viewQueries: [{ propertyName: "toolbarButtonElement", first: true, predicate: ["toolbarButton"], descendants: true, read: ElementRef }, { propertyName: "overflowButtonElement", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }], exportAs: ["kendoToolBarButton"], usesInheritance: true, ngImport: i0, template: `
|
|
257
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarButtonComponent, isStandalone: true, selector: "kendo-toolbar-button", inputs: { showText: "showText", showIcon: "showIcon", text: "text", style: "style", className: "className", title: "title", disabled: "disabled", toggleable: "toggleable", look: "look", togglable: "togglable", selected: "selected", fillMode: "fillMode", themeColor: "themeColor", icon: "icon", iconClass: "iconClass", svgIcon: "svgIcon", imageUrl: "imageUrl" }, outputs: { click: "click", pointerdown: "pointerdown", selectedChange: "selectedChange" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonComponent) }], viewQueries: [{ propertyName: "toolbarButtonElement", first: true, predicate: ["toolbarButton"], descendants: true, read: ElementRef }, { propertyName: "sectionButtonElement", first: true, predicate: ["sectionButton"], descendants: true, read: ElementRef }, { propertyName: "overflowButtonElement", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }], exportAs: ["kendoToolBarButton"], usesInheritance: true, ngImport: i0, template: `
|
|
257
258
|
<ng-template #toolbarTemplate>
|
|
258
259
|
<button
|
|
259
260
|
#toolbarButton
|
|
@@ -306,6 +307,34 @@ export class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
306
307
|
</span>
|
|
307
308
|
</div>
|
|
308
309
|
</ng-template>
|
|
310
|
+
<ng-template #sectionTemplate>
|
|
311
|
+
<button
|
|
312
|
+
#sectionButton
|
|
313
|
+
[class.k-toolbar-button]="!toggleable"
|
|
314
|
+
[class.k-toolbar-toggle-button]="toggleable"
|
|
315
|
+
[tabindex]="tabIndex"
|
|
316
|
+
type="button"
|
|
317
|
+
kendoButton
|
|
318
|
+
[ngStyle]="style"
|
|
319
|
+
[ngClass]="className"
|
|
320
|
+
[attr.title]="title"
|
|
321
|
+
[disabled]="disabled"
|
|
322
|
+
[toggleable]="toggleable"
|
|
323
|
+
[fillMode]="fillMode"
|
|
324
|
+
[themeColor]="fillMode ? themeColor : null"
|
|
325
|
+
[selected]="selected"
|
|
326
|
+
[icon]="toolbarOptions.icon"
|
|
327
|
+
[iconClass]="toolbarOptions.iconClass"
|
|
328
|
+
[svgIcon]="toolbarOptions.svgIcon"
|
|
329
|
+
[imageUrl]="toolbarOptions.imageUrl"
|
|
330
|
+
(click)="click.emit($event)"
|
|
331
|
+
(pointerdown)="pointerdown.emit($event)"
|
|
332
|
+
(selectedChange)="selectedChangeHandler($event)"
|
|
333
|
+
(blur)="onBlur()"
|
|
334
|
+
>
|
|
335
|
+
{{ toolbarOptions.text }}
|
|
336
|
+
</button>
|
|
337
|
+
</ng-template>
|
|
309
338
|
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
310
339
|
}
|
|
311
340
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonComponent, decorators: [{
|
|
@@ -367,6 +396,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
367
396
|
</span>
|
|
368
397
|
</div>
|
|
369
398
|
</ng-template>
|
|
399
|
+
<ng-template #sectionTemplate>
|
|
400
|
+
<button
|
|
401
|
+
#sectionButton
|
|
402
|
+
[class.k-toolbar-button]="!toggleable"
|
|
403
|
+
[class.k-toolbar-toggle-button]="toggleable"
|
|
404
|
+
[tabindex]="tabIndex"
|
|
405
|
+
type="button"
|
|
406
|
+
kendoButton
|
|
407
|
+
[ngStyle]="style"
|
|
408
|
+
[ngClass]="className"
|
|
409
|
+
[attr.title]="title"
|
|
410
|
+
[disabled]="disabled"
|
|
411
|
+
[toggleable]="toggleable"
|
|
412
|
+
[fillMode]="fillMode"
|
|
413
|
+
[themeColor]="fillMode ? themeColor : null"
|
|
414
|
+
[selected]="selected"
|
|
415
|
+
[icon]="toolbarOptions.icon"
|
|
416
|
+
[iconClass]="toolbarOptions.iconClass"
|
|
417
|
+
[svgIcon]="toolbarOptions.svgIcon"
|
|
418
|
+
[imageUrl]="toolbarOptions.imageUrl"
|
|
419
|
+
(click)="click.emit($event)"
|
|
420
|
+
(pointerdown)="pointerdown.emit($event)"
|
|
421
|
+
(selectedChange)="selectedChangeHandler($event)"
|
|
422
|
+
(blur)="onBlur()"
|
|
423
|
+
>
|
|
424
|
+
{{ toolbarOptions.text }}
|
|
425
|
+
</button>
|
|
426
|
+
</ng-template>
|
|
370
427
|
`,
|
|
371
428
|
standalone: true,
|
|
372
429
|
imports: [ButtonComponent, NgStyle, NgClass, NgIf, IconWrapperComponent]
|
|
@@ -414,6 +471,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
414
471
|
}], toolbarButtonElement: [{
|
|
415
472
|
type: ViewChild,
|
|
416
473
|
args: ['toolbarButton', { read: ElementRef }]
|
|
474
|
+
}], sectionButtonElement: [{
|
|
475
|
+
type: ViewChild,
|
|
476
|
+
args: ['sectionButton', { read: ElementRef }]
|
|
417
477
|
}], overflowButtonElement: [{
|
|
418
478
|
type: ViewChild,
|
|
419
479
|
args: ['overflowButton', { read: ElementRef }]
|
|
@@ -52,12 +52,18 @@ export class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
toolbarButtonGroup;
|
|
55
|
+
sectionButtonGroup;
|
|
55
56
|
overflowListItems;
|
|
56
57
|
buttonComponents;
|
|
57
58
|
get buttonElements() {
|
|
58
|
-
if (this.overflows) {
|
|
59
|
+
if (this.overflows && this.location === 'overflow') {
|
|
59
60
|
return [...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))].map(el => el.nativeElement);
|
|
60
61
|
}
|
|
62
|
+
else if (this.overflows && this.location === 'section') {
|
|
63
|
+
return this.sectionButtonGroup
|
|
64
|
+
.buttons.filter(b => !b.isDisabled)
|
|
65
|
+
.map(b => b.element);
|
|
66
|
+
}
|
|
61
67
|
else {
|
|
62
68
|
return this.toolbarButtonGroup
|
|
63
69
|
.buttons.filter(b => !b.isDisabled)
|
|
@@ -125,8 +131,8 @@ export class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
125
131
|
* @hidden
|
|
126
132
|
*/
|
|
127
133
|
focus(ev = {}) {
|
|
128
|
-
const nextKey = this.getNextKey(this.overflows);
|
|
129
|
-
const prevKey = this.getPrevKey(this.overflows);
|
|
134
|
+
const nextKey = this.getNextKey((this.overflows && this.location === 'overflow'));
|
|
135
|
+
const prevKey = this.getPrevKey((this.overflows && this.location === 'overflow'));
|
|
130
136
|
this.focusedIndex = getIndexOfFocused(prevKey, nextKey, this.buttonElements)(ev);
|
|
131
137
|
this.focusButton(this.focusedIndex, ev);
|
|
132
138
|
}
|
|
@@ -134,8 +140,8 @@ export class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
134
140
|
* @hidden
|
|
135
141
|
*/
|
|
136
142
|
handleKey(ev) {
|
|
137
|
-
const nextKey = this.getNextKey(this.overflows);
|
|
138
|
-
const prevKey = this.getPrevKey(this.overflows);
|
|
143
|
+
const nextKey = this.getNextKey((this.overflows && this.location === 'overflow'));
|
|
144
|
+
const prevKey = this.getPrevKey((this.overflows && this.location === 'overflow'));
|
|
139
145
|
const peekAtIndex = makePeeker(this.buttonElements);
|
|
140
146
|
const isUnmodified = areEqual(this.focusedIndex);
|
|
141
147
|
this.focusedIndex = seekFocusedIndex(prevKey, nextKey, peekAtIndex)(this.focusedIndex, ev);
|
|
@@ -171,7 +177,7 @@ export class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
171
177
|
}
|
|
172
178
|
}
|
|
173
179
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonGroupComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
174
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarButtonGroupComponent, isStandalone: true, selector: "kendo-toolbar-buttongroup", inputs: { disabled: "disabled", fillMode: "fillMode", selection: "selection", width: "width", look: "look" }, providers: [LocalizationService, { provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonGroupComponent) }], queries: [{ propertyName: "buttonComponents", predicate: i0.forwardRef(function () { return ToolBarButtonComponent; }) }], viewQueries: [{ propertyName: "toolbarButtonGroup", first: true, predicate: ["toolbarButtonGroup"], descendants: true }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarButtonGroup"], usesInheritance: true, ngImport: i0, template: `
|
|
180
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarButtonGroupComponent, isStandalone: true, selector: "kendo-toolbar-buttongroup", inputs: { disabled: "disabled", fillMode: "fillMode", selection: "selection", width: "width", look: "look" }, providers: [LocalizationService, { provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonGroupComponent) }], queries: [{ propertyName: "buttonComponents", predicate: i0.forwardRef(function () { return ToolBarButtonComponent; }) }], viewQueries: [{ propertyName: "toolbarButtonGroup", first: true, predicate: ["toolbarButtonGroup"], descendants: true }, { propertyName: "sectionButtonGroup", first: true, predicate: ["sectionButtonGroup"], descendants: true }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarButtonGroup"], usesInheritance: true, ngImport: i0, template: `
|
|
175
181
|
<ng-template #toolbarTemplate>
|
|
176
182
|
<kendo-buttongroup
|
|
177
183
|
class="k-toolbar-button-group k-button-group-{{fillMode}}"
|
|
@@ -233,6 +239,42 @@ export class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
233
239
|
</span>
|
|
234
240
|
</div>
|
|
235
241
|
</ng-template>
|
|
242
|
+
<ng-template #sectionTemplate>
|
|
243
|
+
<kendo-buttongroup
|
|
244
|
+
class="k-toolbar-button-group k-button-group-{{fillMode}}"
|
|
245
|
+
#sectionButtonGroup
|
|
246
|
+
[tabIndex]="-1"
|
|
247
|
+
[selection]="selection"
|
|
248
|
+
[disabled]="disabled"
|
|
249
|
+
[width]="width"
|
|
250
|
+
(navigate)="onNavigate($event)"
|
|
251
|
+
(focus)="onFocus()"
|
|
252
|
+
>
|
|
253
|
+
<button
|
|
254
|
+
kendoButton
|
|
255
|
+
type="button"
|
|
256
|
+
*ngFor="let button of buttonComponents"
|
|
257
|
+
[ngStyle]="button.style"
|
|
258
|
+
[ngClass]="button.className"
|
|
259
|
+
[attr.title]="button.title"
|
|
260
|
+
[disabled]="button.disabled"
|
|
261
|
+
[togglable]="button.togglable"
|
|
262
|
+
[selected]="button.selected"
|
|
263
|
+
[attr.aria-pressed]="button.selected ? true : false"
|
|
264
|
+
[fillMode]="button.fillMode"
|
|
265
|
+
[themeColor]="button.fillMode ? button.themeColor : null"
|
|
266
|
+
[icon]="button.toolbarOptions.icon"
|
|
267
|
+
[iconClass]="button.toolbarOptions.iconClass"
|
|
268
|
+
[svgIcon]="button.toolbarOptions.svgIcon"
|
|
269
|
+
[imageUrl]="button.toolbarOptions.imageUrl"
|
|
270
|
+
(click)="button.click.emit($event); onButtonClick($event)"
|
|
271
|
+
(pointerdown)="button.pointerdown.emit($event)"
|
|
272
|
+
(selectedChange)="selectedChangeHandler($event, button)"
|
|
273
|
+
>
|
|
274
|
+
{{ button.toolbarOptions.text }}
|
|
275
|
+
</button>
|
|
276
|
+
</kendo-buttongroup>
|
|
277
|
+
</ng-template>
|
|
236
278
|
`, isInline: true, dependencies: [{ kind: "component", type: ButtonGroupComponent, selector: "kendo-buttongroup", inputs: ["disabled", "selection", "width", "tabIndex", "navigable"], outputs: ["navigate"], exportAs: ["kendoButtonGroup"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
237
279
|
}
|
|
238
280
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonGroupComponent, decorators: [{
|
|
@@ -303,6 +345,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
303
345
|
</span>
|
|
304
346
|
</div>
|
|
305
347
|
</ng-template>
|
|
348
|
+
<ng-template #sectionTemplate>
|
|
349
|
+
<kendo-buttongroup
|
|
350
|
+
class="k-toolbar-button-group k-button-group-{{fillMode}}"
|
|
351
|
+
#sectionButtonGroup
|
|
352
|
+
[tabIndex]="-1"
|
|
353
|
+
[selection]="selection"
|
|
354
|
+
[disabled]="disabled"
|
|
355
|
+
[width]="width"
|
|
356
|
+
(navigate)="onNavigate($event)"
|
|
357
|
+
(focus)="onFocus()"
|
|
358
|
+
>
|
|
359
|
+
<button
|
|
360
|
+
kendoButton
|
|
361
|
+
type="button"
|
|
362
|
+
*ngFor="let button of buttonComponents"
|
|
363
|
+
[ngStyle]="button.style"
|
|
364
|
+
[ngClass]="button.className"
|
|
365
|
+
[attr.title]="button.title"
|
|
366
|
+
[disabled]="button.disabled"
|
|
367
|
+
[togglable]="button.togglable"
|
|
368
|
+
[selected]="button.selected"
|
|
369
|
+
[attr.aria-pressed]="button.selected ? true : false"
|
|
370
|
+
[fillMode]="button.fillMode"
|
|
371
|
+
[themeColor]="button.fillMode ? button.themeColor : null"
|
|
372
|
+
[icon]="button.toolbarOptions.icon"
|
|
373
|
+
[iconClass]="button.toolbarOptions.iconClass"
|
|
374
|
+
[svgIcon]="button.toolbarOptions.svgIcon"
|
|
375
|
+
[imageUrl]="button.toolbarOptions.imageUrl"
|
|
376
|
+
(click)="button.click.emit($event); onButtonClick($event)"
|
|
377
|
+
(pointerdown)="button.pointerdown.emit($event)"
|
|
378
|
+
(selectedChange)="selectedChangeHandler($event, button)"
|
|
379
|
+
>
|
|
380
|
+
{{ button.toolbarOptions.text }}
|
|
381
|
+
</button>
|
|
382
|
+
</kendo-buttongroup>
|
|
383
|
+
</ng-template>
|
|
306
384
|
`,
|
|
307
385
|
standalone: true,
|
|
308
386
|
imports: [ButtonGroupComponent, NgFor, ButtonComponent, NgStyle, NgClass, NgIf, IconWrapperComponent]
|
|
@@ -320,6 +398,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
320
398
|
}], toolbarButtonGroup: [{
|
|
321
399
|
type: ViewChild,
|
|
322
400
|
args: ['toolbarButtonGroup', { static: false }]
|
|
401
|
+
}], sectionButtonGroup: [{
|
|
402
|
+
type: ViewChild,
|
|
403
|
+
args: ['sectionButtonGroup', { static: false }]
|
|
323
404
|
}], overflowListItems: [{
|
|
324
405
|
type: ViewChildren,
|
|
325
406
|
args: ['listItem']
|
|
@@ -192,7 +192,8 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
192
192
|
*/
|
|
193
193
|
close = new EventEmitter();
|
|
194
194
|
dropdownButton;
|
|
195
|
-
|
|
195
|
+
toolbarDropDownButton;
|
|
196
|
+
sectionDropDownButton;
|
|
196
197
|
overflowListItems;
|
|
197
198
|
toolbarOptions = {
|
|
198
199
|
text: '',
|
|
@@ -230,7 +231,9 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
230
231
|
this.setTextDisplayMode();
|
|
231
232
|
}
|
|
232
233
|
ngAfterViewInit() {
|
|
233
|
-
this.zone.onStable.pipe(take(1)).subscribe(() =>
|
|
234
|
+
this.zone.onStable.pipe(take(1)).subscribe(() => {
|
|
235
|
+
this.renderer.addClass(this[`${this.location}DropDownButton`].button.nativeElement, 'k-toolbar-menu-button');
|
|
236
|
+
});
|
|
234
237
|
}
|
|
235
238
|
/**
|
|
236
239
|
* @hidden
|
|
@@ -250,9 +253,9 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
250
253
|
* @hidden
|
|
251
254
|
*/
|
|
252
255
|
focus(ev = {}) {
|
|
253
|
-
if (!this.overflows) {
|
|
254
|
-
if (ev.type === 'focus' || ev.type === 'keydown') {
|
|
255
|
-
this.
|
|
256
|
+
if (!this.overflows || this.location === 'section') {
|
|
257
|
+
if (!ev.type || ev.type === 'focus' || ev.type === 'keydown') {
|
|
258
|
+
this[`${this.location}DropDownButton`]?.focus();
|
|
256
259
|
}
|
|
257
260
|
}
|
|
258
261
|
else if (this.overflowButtons.length > 0) {
|
|
@@ -267,7 +270,7 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
267
270
|
if (!this.overflows && (ev.keyCode === this.getPrevKey(this.overflows) || ev.keyCode === this.getNextKey(this.overflows))) {
|
|
268
271
|
return false;
|
|
269
272
|
}
|
|
270
|
-
if (this.overflows) {
|
|
273
|
+
if (this.overflows && this.location !== 'section') {
|
|
271
274
|
const peekAtIndex = makePeeker(this.overflowButtons);
|
|
272
275
|
const isUnmodified = areEqual(this.focusedIndex);
|
|
273
276
|
this.focusedIndex = seekFocusedIndex(this.getPrevKey(), this.getNextKey(), peekAtIndex)(this.focusedIndex, ev);
|
|
@@ -305,9 +308,9 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
305
308
|
this.overflowOptions.text = this.showText === 'toolbar' ? undefined : this.text;
|
|
306
309
|
}
|
|
307
310
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarDropDownButtonComponent, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
308
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarDropDownButtonComponent, isStandalone: true, selector: "kendo-toolbar-dropdownbutton", inputs: { arrowIcon: "arrowIcon", title: "title", showText: "showText", showIcon: "showIcon", text: "text", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", imageUrl: "imageUrl", popupSettings: "popupSettings", look: "look", primary: "primary", fillMode: "fillMode", themeColor: "themeColor", buttonClass: "buttonClass", textField: "textField", disabled: "disabled", data: "data" }, outputs: { itemClick: "itemClick", open: "open", close: "close" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarDropDownButtonComponent) }], viewQueries: [{ propertyName: "dropdownButton", first: true, predicate: ["dropdownButton"], descendants: true, read: ElementRef, static: true }, { propertyName: "
|
|
311
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarDropDownButtonComponent, isStandalone: true, selector: "kendo-toolbar-dropdownbutton", inputs: { arrowIcon: "arrowIcon", title: "title", showText: "showText", showIcon: "showIcon", text: "text", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", imageUrl: "imageUrl", popupSettings: "popupSettings", look: "look", primary: "primary", fillMode: "fillMode", themeColor: "themeColor", buttonClass: "buttonClass", textField: "textField", disabled: "disabled", data: "data" }, outputs: { itemClick: "itemClick", open: "open", close: "close" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarDropDownButtonComponent) }], viewQueries: [{ propertyName: "dropdownButton", first: true, predicate: ["dropdownButton"], descendants: true, read: ElementRef, static: true }, { propertyName: "toolbarDropDownButton", first: true, predicate: ["toolbarDropDownButton"], descendants: true }, { propertyName: "sectionDropDownButton", first: true, predicate: ["sectionDropDownButton"], descendants: true }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarDropDownButton"], usesInheritance: true, ngImport: i0, template: `
|
|
309
312
|
<ng-template #toolbarTemplate>
|
|
310
|
-
<kendo-dropdownbutton
|
|
313
|
+
<kendo-dropdownbutton #toolbarDropDownButton
|
|
311
314
|
[icon]="toolbarOptions.icon"
|
|
312
315
|
[iconClass]="toolbarOptions.iconClass"
|
|
313
316
|
[svgIcon]="toolbarOptions.svgIcon"
|
|
@@ -329,6 +332,7 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
329
332
|
{{ toolbarOptions.text }}
|
|
330
333
|
</kendo-dropdownbutton>
|
|
331
334
|
</ng-template>
|
|
335
|
+
|
|
332
336
|
<ng-template #popupTemplate>
|
|
333
337
|
<div
|
|
334
338
|
tabindex="-1"
|
|
@@ -369,6 +373,30 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
369
373
|
</div>
|
|
370
374
|
</ng-container>
|
|
371
375
|
</ng-template>
|
|
376
|
+
|
|
377
|
+
<ng-template #sectionTemplate>
|
|
378
|
+
<kendo-dropdownbutton #sectionDropDownButton
|
|
379
|
+
[icon]="toolbarOptions.icon"
|
|
380
|
+
[iconClass]="toolbarOptions.iconClass"
|
|
381
|
+
[svgIcon]="toolbarOptions.svgIcon"
|
|
382
|
+
[imageUrl]="toolbarOptions.imageUrl"
|
|
383
|
+
[arrowIcon]="arrowIcon"
|
|
384
|
+
[buttonClass]="buttonClass"
|
|
385
|
+
[disabled]="disabled"
|
|
386
|
+
[tabIndex]="-1"
|
|
387
|
+
[data]="data"
|
|
388
|
+
[buttonAttributes]="{'title': title}"
|
|
389
|
+
[textField]="textField"
|
|
390
|
+
[popupSettings]="popupSettings"
|
|
391
|
+
[fillMode]="fillMode"
|
|
392
|
+
[themeColor]="fillMode ? themeColor : null"
|
|
393
|
+
(open)="open.emit($event)"
|
|
394
|
+
(close)="close.emit($event)"
|
|
395
|
+
(itemClick)="itemClick.emit($event)"
|
|
396
|
+
>
|
|
397
|
+
{{ toolbarOptions.text }}
|
|
398
|
+
</kendo-dropdownbutton>
|
|
399
|
+
</ng-template>
|
|
372
400
|
`, isInline: true, dependencies: [{ kind: "component", type: DropDownButtonComponent, selector: "kendo-dropdownbutton", inputs: ["arrowIcon", "icon", "svgIcon", "iconClass", "imageUrl", "textField", "data", "size", "rounded", "fillMode", "themeColor", "buttonAttributes"], outputs: ["itemClick", "focus", "blur"], exportAs: ["kendoDropDownButton"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
373
401
|
}
|
|
374
402
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarDropDownButtonComponent, decorators: [{
|
|
@@ -379,7 +407,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
379
407
|
selector: 'kendo-toolbar-dropdownbutton',
|
|
380
408
|
template: `
|
|
381
409
|
<ng-template #toolbarTemplate>
|
|
382
|
-
<kendo-dropdownbutton
|
|
410
|
+
<kendo-dropdownbutton #toolbarDropDownButton
|
|
383
411
|
[icon]="toolbarOptions.icon"
|
|
384
412
|
[iconClass]="toolbarOptions.iconClass"
|
|
385
413
|
[svgIcon]="toolbarOptions.svgIcon"
|
|
@@ -401,6 +429,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
401
429
|
{{ toolbarOptions.text }}
|
|
402
430
|
</kendo-dropdownbutton>
|
|
403
431
|
</ng-template>
|
|
432
|
+
|
|
404
433
|
<ng-template #popupTemplate>
|
|
405
434
|
<div
|
|
406
435
|
tabindex="-1"
|
|
@@ -441,6 +470,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
441
470
|
</div>
|
|
442
471
|
</ng-container>
|
|
443
472
|
</ng-template>
|
|
473
|
+
|
|
474
|
+
<ng-template #sectionTemplate>
|
|
475
|
+
<kendo-dropdownbutton #sectionDropDownButton
|
|
476
|
+
[icon]="toolbarOptions.icon"
|
|
477
|
+
[iconClass]="toolbarOptions.iconClass"
|
|
478
|
+
[svgIcon]="toolbarOptions.svgIcon"
|
|
479
|
+
[imageUrl]="toolbarOptions.imageUrl"
|
|
480
|
+
[arrowIcon]="arrowIcon"
|
|
481
|
+
[buttonClass]="buttonClass"
|
|
482
|
+
[disabled]="disabled"
|
|
483
|
+
[tabIndex]="-1"
|
|
484
|
+
[data]="data"
|
|
485
|
+
[buttonAttributes]="{'title': title}"
|
|
486
|
+
[textField]="textField"
|
|
487
|
+
[popupSettings]="popupSettings"
|
|
488
|
+
[fillMode]="fillMode"
|
|
489
|
+
[themeColor]="fillMode ? themeColor : null"
|
|
490
|
+
(open)="open.emit($event)"
|
|
491
|
+
(close)="close.emit($event)"
|
|
492
|
+
(itemClick)="itemClick.emit($event)"
|
|
493
|
+
>
|
|
494
|
+
{{ toolbarOptions.text }}
|
|
495
|
+
</kendo-dropdownbutton>
|
|
496
|
+
</ng-template>
|
|
444
497
|
`,
|
|
445
498
|
standalone: true,
|
|
446
499
|
imports: [DropDownButtonComponent, NgClass, NgIf, IconWrapperComponent, NgFor]
|
|
@@ -490,9 +543,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
490
543
|
}], dropdownButton: [{
|
|
491
544
|
type: ViewChild,
|
|
492
545
|
args: ['dropdownButton', { read: ElementRef, static: true }]
|
|
493
|
-
}],
|
|
546
|
+
}], toolbarDropDownButton: [{
|
|
547
|
+
type: ViewChild,
|
|
548
|
+
args: ['toolbarDropDownButton', { static: false }]
|
|
549
|
+
}], sectionDropDownButton: [{
|
|
494
550
|
type: ViewChild,
|
|
495
|
-
args: [
|
|
551
|
+
args: ['sectionDropDownButton', { static: false }]
|
|
496
552
|
}], overflowListItems: [{
|
|
497
553
|
type: ViewChildren,
|
|
498
554
|
args: ['listItem']
|
|
@@ -45,6 +45,10 @@ export class ToolBarSeparatorComponent extends ToolBarToolComponent {
|
|
|
45
45
|
<div class="k-separator k-toolbar-separator"></div>
|
|
46
46
|
</ng-template>
|
|
47
47
|
|
|
48
|
+
<ng-template #sectionTemplate>
|
|
49
|
+
<div class="k-separator k-toolbar-separator"></div>
|
|
50
|
+
</ng-template>
|
|
51
|
+
|
|
48
52
|
<ng-template #popupTemplate>
|
|
49
53
|
<div class="k-item k-menu-item">
|
|
50
54
|
<div class="k-separator k-separator-horizontal"></div>
|
|
@@ -63,6 +67,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
63
67
|
<div class="k-separator k-toolbar-separator"></div>
|
|
64
68
|
</ng-template>
|
|
65
69
|
|
|
70
|
+
<ng-template #sectionTemplate>
|
|
71
|
+
<div class="k-separator k-toolbar-separator"></div>
|
|
72
|
+
</ng-template>
|
|
73
|
+
|
|
66
74
|
<ng-template #popupTemplate>
|
|
67
75
|
<div class="k-item k-menu-item">
|
|
68
76
|
<div class="k-separator k-separator-horizontal"></div>
|
|
@@ -220,6 +220,7 @@ export class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
220
220
|
getNextKey;
|
|
221
221
|
getPrevKey;
|
|
222
222
|
toolbarSplitButton;
|
|
223
|
+
sectionSplitButton;
|
|
223
224
|
overflowMainButton;
|
|
224
225
|
overflowListItems;
|
|
225
226
|
constructor() {
|
|
@@ -251,9 +252,9 @@ export class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
251
252
|
* @hidden
|
|
252
253
|
*/
|
|
253
254
|
focus(ev = {}) {
|
|
254
|
-
if (!this.overflows) {
|
|
255
|
-
if (ev.type === 'focus' || ev.type === 'keydown') {
|
|
256
|
-
this.
|
|
255
|
+
if (!this.overflows || this.location === 'section') {
|
|
256
|
+
if (!ev.type || ev.type === 'focus' || ev.type === 'keydown') {
|
|
257
|
+
this[`${this.location}SplitButton`].focus();
|
|
257
258
|
}
|
|
258
259
|
}
|
|
259
260
|
else if (this.overflowButtons.length > 0) {
|
|
@@ -297,7 +298,7 @@ export class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
297
298
|
this.itemClick.emit(dataItem);
|
|
298
299
|
}
|
|
299
300
|
focusButton(index, ev) {
|
|
300
|
-
if (!ev.type || ev.type === 'focus' || ev.type === 'keydown' || ev.type === 'click') {
|
|
301
|
+
if ((!ev.type || ev.type === 'focus' || ev.type === 'keydown' || ev.type === 'click') && this.location !== 'section') {
|
|
301
302
|
this.overflowButtons[index].nativeElement.focus();
|
|
302
303
|
}
|
|
303
304
|
}
|
|
@@ -306,7 +307,7 @@ export class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
306
307
|
this.overflowOptions.text = this.showText === 'toolbar' ? undefined : this.text;
|
|
307
308
|
}
|
|
308
309
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarSplitButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
309
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarSplitButtonComponent, isStandalone: true, selector: "kendo-toolbar-splitbutton", inputs: { showText: "showText", showIcon: "showIcon", text: "text", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", imageUrl: "imageUrl", disabled: "disabled", popupSettings: "popupSettings", fillMode: "fillMode", themeColor: "themeColor", look: "look", buttonClass: "buttonClass", arrowButtonClass: "arrowButtonClass", arrowButtonIcon: "arrowButtonIcon", arrowButtonSvgIcon: "arrowButtonSvgIcon", textField: "textField", data: "data" }, outputs: { buttonClick: "buttonClick", itemClick: "itemClick", open: "open", close: "close" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarSplitButtonComponent) }], viewQueries: [{ propertyName: "toolbarSplitButton", first: true, predicate: ["toolbarSplitButton"], descendants: true }, { propertyName: "overflowMainButton", first: true, predicate: ["overflowMainButton"], descendants: true, read: ElementRef }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarSplitButton"], usesInheritance: true, ngImport: i0, template: `
|
|
310
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarSplitButtonComponent, isStandalone: true, selector: "kendo-toolbar-splitbutton", inputs: { showText: "showText", showIcon: "showIcon", text: "text", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", imageUrl: "imageUrl", disabled: "disabled", popupSettings: "popupSettings", fillMode: "fillMode", themeColor: "themeColor", look: "look", buttonClass: "buttonClass", arrowButtonClass: "arrowButtonClass", arrowButtonIcon: "arrowButtonIcon", arrowButtonSvgIcon: "arrowButtonSvgIcon", textField: "textField", data: "data" }, outputs: { buttonClick: "buttonClick", itemClick: "itemClick", open: "open", close: "close" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarSplitButtonComponent) }], viewQueries: [{ propertyName: "toolbarSplitButton", first: true, predicate: ["toolbarSplitButton"], descendants: true }, { propertyName: "sectionSplitButton", first: true, predicate: ["sectionSplitButton"], descendants: true }, { propertyName: "overflowMainButton", first: true, predicate: ["overflowMainButton"], descendants: true, read: ElementRef }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarSplitButton"], usesInheritance: true, ngImport: i0, template: `
|
|
310
311
|
<ng-template #toolbarTemplate>
|
|
311
312
|
<kendo-splitbutton
|
|
312
313
|
#toolbarSplitButton
|
|
@@ -376,6 +377,32 @@ export class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
376
377
|
</div>
|
|
377
378
|
</ng-container>
|
|
378
379
|
</ng-template>
|
|
380
|
+
<ng-template #sectionTemplate>
|
|
381
|
+
<kendo-splitbutton
|
|
382
|
+
#sectionSplitButton
|
|
383
|
+
class="k-toolbar-split-button"
|
|
384
|
+
[data]="data"
|
|
385
|
+
[text]="toolbarOptions.text"
|
|
386
|
+
[icon]="toolbarOptions.icon"
|
|
387
|
+
[iconClass]="toolbarOptions.iconClass"
|
|
388
|
+
[svgIcon]="toolbarOptions.svgIcon"
|
|
389
|
+
[imageUrl]="toolbarOptions.imageUrl"
|
|
390
|
+
[buttonClass]="buttonClass"
|
|
391
|
+
[arrowButtonClass]="arrowButtonClass"
|
|
392
|
+
[arrowButtonIcon]="arrowButtonIcon"
|
|
393
|
+
[arrowButtonSvgIcon]="arrowButtonSvgIcon"
|
|
394
|
+
[disabled]="disabled"
|
|
395
|
+
[tabIndex]="-1"
|
|
396
|
+
[textField]="textField"
|
|
397
|
+
[popupSettings]="popupSettings"
|
|
398
|
+
[fillMode]="fillMode"
|
|
399
|
+
[themeColor]="fillMode ? themeColor : null"
|
|
400
|
+
(buttonClick)="buttonClick.emit($event)"
|
|
401
|
+
(open)="open.emit($event)"
|
|
402
|
+
(close)="close.emit($event)"
|
|
403
|
+
(itemClick)="itemClick.emit($event)"
|
|
404
|
+
></kendo-splitbutton>
|
|
405
|
+
</ng-template>
|
|
379
406
|
`, isInline: true, dependencies: [{ kind: "component", type: SplitButtonComponent, selector: "kendo-splitbutton", inputs: ["text", "icon", "svgIcon", "iconClass", "type", "imageUrl", "size", "rounded", "fillMode", "themeColor", "disabled", "popupSettings", "tabIndex", "textField", "data", "arrowButtonClass", "arrowButtonIcon", "arrowButtonSvgIcon", "buttonAttributes"], outputs: ["buttonClick", "itemClick", "focus", "blur", "open", "close"], exportAs: ["kendoSplitButton"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
380
407
|
}
|
|
381
408
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarSplitButtonComponent, decorators: [{
|
|
@@ -454,6 +481,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
454
481
|
</div>
|
|
455
482
|
</ng-container>
|
|
456
483
|
</ng-template>
|
|
484
|
+
<ng-template #sectionTemplate>
|
|
485
|
+
<kendo-splitbutton
|
|
486
|
+
#sectionSplitButton
|
|
487
|
+
class="k-toolbar-split-button"
|
|
488
|
+
[data]="data"
|
|
489
|
+
[text]="toolbarOptions.text"
|
|
490
|
+
[icon]="toolbarOptions.icon"
|
|
491
|
+
[iconClass]="toolbarOptions.iconClass"
|
|
492
|
+
[svgIcon]="toolbarOptions.svgIcon"
|
|
493
|
+
[imageUrl]="toolbarOptions.imageUrl"
|
|
494
|
+
[buttonClass]="buttonClass"
|
|
495
|
+
[arrowButtonClass]="arrowButtonClass"
|
|
496
|
+
[arrowButtonIcon]="arrowButtonIcon"
|
|
497
|
+
[arrowButtonSvgIcon]="arrowButtonSvgIcon"
|
|
498
|
+
[disabled]="disabled"
|
|
499
|
+
[tabIndex]="-1"
|
|
500
|
+
[textField]="textField"
|
|
501
|
+
[popupSettings]="popupSettings"
|
|
502
|
+
[fillMode]="fillMode"
|
|
503
|
+
[themeColor]="fillMode ? themeColor : null"
|
|
504
|
+
(buttonClick)="buttonClick.emit($event)"
|
|
505
|
+
(open)="open.emit($event)"
|
|
506
|
+
(close)="close.emit($event)"
|
|
507
|
+
(itemClick)="itemClick.emit($event)"
|
|
508
|
+
></kendo-splitbutton>
|
|
509
|
+
</ng-template>
|
|
457
510
|
`,
|
|
458
511
|
standalone: true,
|
|
459
512
|
imports: [SplitButtonComponent, NgClass, NgIf, IconWrapperComponent, NgFor]
|
|
@@ -505,6 +558,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
505
558
|
}], toolbarSplitButton: [{
|
|
506
559
|
type: ViewChild,
|
|
507
560
|
args: ['toolbarSplitButton', { static: false }]
|
|
561
|
+
}], sectionSplitButton: [{
|
|
562
|
+
type: ViewChild,
|
|
563
|
+
args: ['sectionSplitButton', { static: false }]
|
|
508
564
|
}], overflowMainButton: [{
|
|
509
565
|
type: ViewChild,
|
|
510
566
|
args: ['overflowMainButton', { read: ElementRef }]
|
|
@@ -10,12 +10,17 @@ import * as i0 from "@angular/core";
|
|
|
10
10
|
*/
|
|
11
11
|
export class ToolBarToolComponent {
|
|
12
12
|
toolbarTemplate;
|
|
13
|
+
sectionTemplate;
|
|
13
14
|
popupTemplate;
|
|
14
15
|
tabIndex = -1; //Focus movement inside the toolbar is managed using roving tabindex.
|
|
15
16
|
overflows = true;
|
|
16
17
|
visibility;
|
|
17
18
|
element;
|
|
18
19
|
isBuiltInTool = false;
|
|
20
|
+
/**
|
|
21
|
+
* @hidden
|
|
22
|
+
*/
|
|
23
|
+
location;
|
|
19
24
|
constructor() {
|
|
20
25
|
this.element = inject(ElementRef);
|
|
21
26
|
}
|
|
@@ -57,7 +62,7 @@ export class ToolBarToolComponent {
|
|
|
57
62
|
return false;
|
|
58
63
|
}
|
|
59
64
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarToolComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
60
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarToolComponent, isStandalone: true, inputs: { responsive: "responsive" }, viewQueries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }], ngImport: i0 });
|
|
65
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarToolComponent, isStandalone: true, inputs: { responsive: "responsive" }, viewQueries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "sectionTemplate", first: true, predicate: ["sectionTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }], ngImport: i0 });
|
|
61
66
|
}
|
|
62
67
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarToolComponent, decorators: [{
|
|
63
68
|
type: Directive,
|
|
@@ -67,6 +72,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
67
72
|
}], ctorParameters: function () { return []; }, propDecorators: { toolbarTemplate: [{
|
|
68
73
|
type: ViewChild,
|
|
69
74
|
args: ['toolbarTemplate', { static: true }]
|
|
75
|
+
}], sectionTemplate: [{
|
|
76
|
+
type: ViewChild,
|
|
77
|
+
args: ['sectionTemplate', { static: true }]
|
|
70
78
|
}], popupTemplate: [{
|
|
71
79
|
type: ViewChild,
|
|
72
80
|
args: ['popupTemplate', { static: true }]
|
|
@@ -14,6 +14,9 @@ export class ToolbarToolsService {
|
|
|
14
14
|
renderedTools = [];
|
|
15
15
|
overflowTools = [];
|
|
16
16
|
allTools = [];
|
|
17
|
+
reset() {
|
|
18
|
+
this.renderedTools = this.overflowTools = this.allTools = [];
|
|
19
|
+
}
|
|
17
20
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarToolsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
18
21
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarToolsService });
|
|
19
22
|
}
|
package/esm2022/util.mjs
CHANGED
|
@@ -221,3 +221,20 @@ export const getStylingClasses = (componentType, stylingOption, previousValue, n
|
|
|
221
221
|
* nodeType 1 is Element, nodeType 3 is Text
|
|
222
222
|
*/
|
|
223
223
|
export const isElementOrTextNode = n => n.nodeType === 1 || n.nodeType === 3;
|
|
224
|
+
/**
|
|
225
|
+
* @hidden
|
|
226
|
+
*/
|
|
227
|
+
export const normalizeOverflowSettings = (overflow) => {
|
|
228
|
+
const defaultOverflowSettings = { mode: 'none', scrollButtons: 'auto', scrollButtonsPosition: 'split' };
|
|
229
|
+
let normalizedSettings = {};
|
|
230
|
+
if (typeof overflow === 'object') {
|
|
231
|
+
normalizedSettings = Object.assign(defaultOverflowSettings, overflow);
|
|
232
|
+
}
|
|
233
|
+
else if (typeof overflow === 'boolean') {
|
|
234
|
+
normalizedSettings = overflow ? Object.assign(defaultOverflowSettings, { mode: 'menu' }) : defaultOverflowSettings;
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
normalizedSettings = Object.assign(defaultOverflowSettings, { mode: overflow });
|
|
238
|
+
}
|
|
239
|
+
return normalizedSettings;
|
|
240
|
+
};
|