@bryntum/taskboard-angular 7.1.1 → 7.1.2
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/README.md +230 -15
- package/package.json +1 -1
- package/src/lib/bryntum-button-group.component.ts +1213 -0
- package/src/lib/bryntum-button.component.ts +1190 -0
- package/src/lib/bryntum-chat-panel.component.ts +1435 -0
- package/src/lib/bryntum-checkbox-group.component.ts +1478 -0
- package/src/lib/bryntum-checkbox.component.ts +1333 -0
- package/src/lib/bryntum-chip-view.component.ts +1225 -0
- package/src/lib/bryntum-code-editor.component.ts +1419 -0
- package/src/lib/bryntum-color-field.component.ts +1334 -0
- package/src/lib/bryntum-column-combo.component.ts +1645 -0
- package/src/lib/bryntum-column-filter-field.component.ts +1360 -0
- package/src/lib/bryntum-column-picker-button.component.ts +1200 -0
- package/src/lib/bryntum-column-scroll-button.component.ts +1200 -0
- package/src/lib/bryntum-combo.component.ts +1634 -0
- package/src/lib/bryntum-container.component.ts +1166 -0
- package/src/lib/bryntum-date-field.component.ts +1413 -0
- package/src/lib/bryntum-date-picker.component.ts +1756 -0
- package/src/lib/bryntum-date-range-field.component.ts +1417 -0
- package/src/lib/bryntum-date-time-field.component.ts +1261 -0
- package/src/lib/bryntum-demo-code-editor.component.ts +1441 -0
- package/src/lib/bryntum-demo-header.component.ts +141 -0
- package/src/lib/bryntum-display-field.component.ts +1308 -0
- package/src/lib/bryntum-duration-field.component.ts +1390 -0
- package/src/lib/bryntum-editor.component.ts +1343 -0
- package/src/lib/bryntum-field-filter-picker-group.component.ts +1308 -0
- package/src/lib/bryntum-field-filter-picker.component.ts +1272 -0
- package/src/lib/bryntum-field-set.component.ts +1408 -0
- package/src/lib/bryntum-file-field.component.ts +1313 -0
- package/src/lib/bryntum-file-picker.component.ts +1199 -0
- package/src/lib/bryntum-filter-field.component.ts +1367 -0
- package/src/lib/bryntum-fullscreen-button.component.ts +53 -0
- package/src/lib/bryntum-hint.component.ts +1506 -0
- package/src/lib/bryntum-label.component.ts +989 -0
- package/src/lib/bryntum-list.component.ts +1196 -0
- package/src/lib/bryntum-menu.component.ts +1520 -0
- package/src/lib/bryntum-month-picker.component.ts +1400 -0
- package/src/lib/bryntum-number-field.component.ts +1368 -0
- package/src/lib/bryntum-paging-toolbar.component.ts +1243 -0
- package/src/lib/bryntum-panel.component.ts +1377 -0
- package/src/lib/bryntum-password-field.component.ts +1296 -0
- package/src/lib/bryntum-project-combo.component.ts +1648 -0
- package/src/lib/bryntum-radio-group.component.ts +1446 -0
- package/src/lib/bryntum-radio.component.ts +1333 -0
- package/src/lib/bryntum-resources-combo.component.ts +1644 -0
- package/src/lib/bryntum-scheduler-project-combo.component.ts +1638 -0
- package/src/lib/bryntum-slide-toggle.component.ts +1333 -0
- package/src/lib/bryntum-slider.component.ts +1112 -0
- package/src/lib/bryntum-splitter.component.ts +1025 -0
- package/src/lib/bryntum-swimlane-combo.component.ts +1644 -0
- package/src/lib/bryntum-swimlane-filter-field.component.ts +1377 -0
- package/src/lib/bryntum-swimlane-picker-button.component.ts +1200 -0
- package/src/lib/bryntum-swimlane-scroll-button.component.ts +1200 -0
- package/src/lib/bryntum-tab-panel.component.ts +1441 -0
- package/src/lib/bryntum-tag-combo.component.ts +1651 -0
- package/src/lib/bryntum-task-board-base.component.ts +2388 -0
- package/src/lib/bryntum-task-board-field-filter-picker-group.component.ts +1316 -0
- package/src/lib/bryntum-task-board-field-filter-picker.component.ts +1254 -0
- package/src/lib/bryntum-task-board-project-model.component.ts +1026 -0
- package/src/lib/bryntum-task-board.component.ts +2392 -0
- package/src/lib/bryntum-task-color-combo.component.ts +1334 -0
- package/src/lib/bryntum-task-filter-field.component.ts +1377 -0
- package/src/lib/bryntum-text-area-field.component.ts +1312 -0
- package/src/lib/bryntum-text-area-picker-field.component.ts +1343 -0
- package/src/lib/bryntum-text-field.component.ts +1321 -0
- package/src/lib/bryntum-time-field.component.ts +1388 -0
- package/src/lib/bryntum-time-picker.component.ts +1207 -0
- package/src/lib/bryntum-todo-list-field.component.ts +1318 -0
- package/src/lib/bryntum-toolbar.component.ts +1234 -0
- package/src/lib/bryntum-undo-redo.component.ts +1179 -0
- package/src/lib/bryntum-widget.component.ts +982 -0
- package/src/lib/bryntum-year-picker.component.ts +1423 -0
- package/src/lib/bryntum-zoom-slider.component.ts +1122 -0
- package/src/lib/taskboard.module.ts +232 -0
- package/src/lib/wrapper.helper.ts +89 -0
- package/src/public-api.ts +77 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Angular wrapper for Bryntum Demo Header
|
|
3
|
+
*/
|
|
4
|
+
import { Component, OnInit, ViewChild } from '@angular/core';
|
|
5
|
+
import { CSSHelper, DemoCodeEditor, AjaxHelper } from '@bryntum/taskboard';
|
|
6
|
+
import { BryntumButtonComponent } from './bryntum-button.component';
|
|
7
|
+
|
|
8
|
+
@Component({
|
|
9
|
+
selector : 'bryntum-demo-header',
|
|
10
|
+
template : `
|
|
11
|
+
<header class="demo-header b-bryntum">
|
|
12
|
+
<a id="title" class="title" href="{{ link }}">
|
|
13
|
+
<h1>
|
|
14
|
+
<svg viewBox="0 0 354.9 144.52" xmlns="http://www.w3.org/2000/svg">
|
|
15
|
+
<g><path d="m305.63 144.52c-12.47 0-23.53-4.83-31.58-13.28v11.06h-25.54v-142.3h26.75v48.58c7.84-7.64 18.5-12.07 30.37-12.07 27.15 0 49.28 23.33 49.28 54.1s-22.12 53.9-49.28 53.9zm-3.82-83.47c-14.68 0-26.55 13.27-26.55 29.77s11.87 29.16 26.55 29.16 26.55-12.67 26.55-29.16-11.87-29.77-26.55-29.77z"/><path d="m148.02 0h74.01v29.78h-74.01z"/><path d="m0 56.26h222.03v29.78h-222.03z"/><path d="m74.01 112.52h148.02v29.6h-148.02z"/></g>
|
|
16
|
+
</svg>
|
|
17
|
+
{{ title }}
|
|
18
|
+
</h1>
|
|
19
|
+
</a>
|
|
20
|
+
<ng-content></ng-content>
|
|
21
|
+
<div id="tools" class="tools">
|
|
22
|
+
<bryntum-button
|
|
23
|
+
text="Download Trial"
|
|
24
|
+
href="{{ downloadLink }}"
|
|
25
|
+
rendition="filled"
|
|
26
|
+
style="margin-inline-end: .5em"
|
|
27
|
+
></bryntum-button>
|
|
28
|
+
<bryntum-button
|
|
29
|
+
#code
|
|
30
|
+
icon="b-icon-code"
|
|
31
|
+
tooltip="Click to show the code viewer"
|
|
32
|
+
rendition="text"
|
|
33
|
+
[hidden]="hiddenEditor"
|
|
34
|
+
(onClick)="toggleCodeEditor()"
|
|
35
|
+
></bryntum-button>
|
|
36
|
+
<bryntum-button
|
|
37
|
+
#download
|
|
38
|
+
icon="b-icon-download"
|
|
39
|
+
tooltip="Download this demo zip archive"
|
|
40
|
+
rendition="text"
|
|
41
|
+
href='#'
|
|
42
|
+
[hidden]="true"
|
|
43
|
+
></bryntum-button>
|
|
44
|
+
<bryntum-fullscreen-button></bryntum-fullscreen-button>
|
|
45
|
+
</div>
|
|
46
|
+
</header>`,
|
|
47
|
+
styles : [
|
|
48
|
+
]
|
|
49
|
+
})
|
|
50
|
+
export class BryntumDemoHeaderComponent implements OnInit {
|
|
51
|
+
|
|
52
|
+
@ViewChild('code', { static : false }) codeButton!: BryntumButtonComponent;
|
|
53
|
+
@ViewChild('download', { static : false }) downloadButton!: BryntumButtonComponent;
|
|
54
|
+
|
|
55
|
+
codeEditor?: DemoCodeEditor;
|
|
56
|
+
|
|
57
|
+
title = document.title.split(' - ')[1] || document.title;
|
|
58
|
+
|
|
59
|
+
isTest = document.location.search.includes('test');
|
|
60
|
+
|
|
61
|
+
isIonic = document.location.href.includes('/ionic/');
|
|
62
|
+
|
|
63
|
+
demoProduct = document.location.href.match(/\/(\w+)(-trial)?\/[-\w]*examples\//)?.[1].toLowerCase() || 'taskboard';
|
|
64
|
+
|
|
65
|
+
downloadLink = `https://bryntum.com/download/?product=${this.demoProduct}`;
|
|
66
|
+
|
|
67
|
+
link = '';
|
|
68
|
+
|
|
69
|
+
appFolder = this.isIonic ? '../' : '../../';
|
|
70
|
+
|
|
71
|
+
hiddenEditor = !Boolean(DemoCodeEditor.monacoCodePath);
|
|
72
|
+
|
|
73
|
+
tooltip = {
|
|
74
|
+
html : 'L{codeButton}',
|
|
75
|
+
align : 't100-b100'
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
async ngOnInit() {
|
|
79
|
+
// Convert:
|
|
80
|
+
// https://bryntum.com/products/schedulerpro/examples-scheduler/frameworks/angular/basic/dist/basic/
|
|
81
|
+
// https://bryntum.com/products/schedulerpro/examples/frameworks/angular/basic/dist/basic/
|
|
82
|
+
// To:
|
|
83
|
+
// https://bryntum.com/products/schedulerpro/examples/#example-examples-scheduler-frameworks-angular-basic
|
|
84
|
+
// https://bryntum.com/products/schedulerpro/examples/#example-frameworks-angular-basic
|
|
85
|
+
|
|
86
|
+
const match = /(.*?\/)(examples.*?\/frameworks\/.*?)\/dist/.exec(document.location.href);
|
|
87
|
+
this.link = match ? `${match[1]}examples/#example-${match[2].replace(/\//gm, '-').replace('examples-frameworks', 'frameworks')}` : '#';
|
|
88
|
+
|
|
89
|
+
if (!this.hiddenEditor) {
|
|
90
|
+
CSSHelper.insertRule('body { flex-flow : row !important }');
|
|
91
|
+
CSSHelper.insertRule('app-root { flex : 1 !important; overflow : hidden !important }');
|
|
92
|
+
if (this.isIonic) {
|
|
93
|
+
CSSHelper.insertRule('app-root { flex-direction : row !important }');
|
|
94
|
+
CSSHelper.insertRule('ion-app { position : relative !important; flex : 1; overflow : hidden !important }');
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const appConfig = (await AjaxHelper.get(`${this.appFolder}app.config.json`, { parseJson : true })).parsedJson;
|
|
98
|
+
if (appConfig.zip || this.isTest) {
|
|
99
|
+
const downloadButton = this.downloadButton.instance;
|
|
100
|
+
downloadButton.hidden = false;
|
|
101
|
+
downloadButton.href = `${this.appFolder}${appConfig.zip}`;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Enables special styling when generating screenshots
|
|
106
|
+
const params = new URLSearchParams(window.location.search);
|
|
107
|
+
if (params.has('screenshot')) {
|
|
108
|
+
document.body.classList.add('b-screenshot');
|
|
109
|
+
if ((window as any).bryntum) {
|
|
110
|
+
(window as any).bryntum.noAnimations = true;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
copyShadowRootStyle() {
|
|
116
|
+
const shadowRootStyle = document.querySelector('app-root')?.shadowRoot?.querySelector('style');
|
|
117
|
+
if (shadowRootStyle) {
|
|
118
|
+
document.head.appendChild(shadowRootStyle.cloneNode(true));
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
async toggleCodeEditor() {
|
|
123
|
+
if (!this.codeEditor) {
|
|
124
|
+
this.copyShadowRootStyle();
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
this.codeEditor = await DemoCodeEditor.toggleCodeEditor(
|
|
128
|
+
this.codeEditor,
|
|
129
|
+
this.codeButton.instance,
|
|
130
|
+
{
|
|
131
|
+
appendTo : this.isIonic ? document.querySelector('app-root') : document.body,
|
|
132
|
+
appFolder : this.appFolder,
|
|
133
|
+
preferredSources : [
|
|
134
|
+
/\w+\.component\.ts/,
|
|
135
|
+
/\w+\.config\.ts/
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
}
|