inviton-powerduck 0.0.7 → 0.0.8
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/app/powerduck-system-resources.ts +1 -0
- package/components/accordion/accordion.tsx +3 -1
- package/components/button/button.tsx +54 -29
- package/components/button/excel-upload-button.tsx +2 -2
- package/components/button/ladda-button.tsx +2 -2
- package/components/button/text-button.tsx +12 -9
- package/components/button/upload-button.tsx +6 -6
- package/components/card/card-header-with-options.tsx +1 -1
- package/components/card/card.tsx +33 -20
- package/components/card/image-card.tsx +39 -34
- package/components/chart-js/bar-chart.tsx +63 -62
- package/components/collapse/index.tsx +42 -0
- package/components/datatable/col-vis-modal.tsx +2 -2
- package/components/datatable/css/datatable.css +28 -4
- package/components/datatable/datatable-static.tsx +11 -2
- package/components/datatable/datatable.tsx +195 -87
- package/components/datatable/export-excel-modal.tsx +73 -70
- package/components/datatable/filter-modal.tsx +2 -2
- package/components/dropdown/country-dropdown.tsx +138 -283
- package/components/dropdown/image-dropdown.tsx +2 -2
- package/components/dropdown/index.tsx +27 -5
- package/components/dropdown/mobile/legacy_fdd.css +59 -30
- package/components/dropdown/mobile/legacy_fdd.ts +287 -197
- package/components/dropdown/mobile/legacy_lvb.ts +56 -59
- package/components/dropdown/ts/select2-multi-checkboxes.ts +10 -2
- package/components/dropdown-button/css/dropdown-button.css +4 -0
- package/components/dropdown-button/dropdown-button-element.tsx +78 -0
- package/components/dropdown-button/dropdown-button.tsx +24 -23
- package/components/dropzone/gallery-dropzone.tsx +83 -58
- package/components/form/fieldset.tsx +7 -1
- package/components/form/form-item-flex.tsx +4 -3
- package/components/form/form-item-wrapper.tsx +6 -6
- package/components/google/places-autocomplete.tsx +3 -3
- package/components/image-crop/image-cropping-modal.tsx +2 -2
- package/components/image-crop/upload-and-crop.tsx +24 -24
- package/components/input/checkbox.tsx +4 -2
- package/components/input/css/wysiwig.css +5 -0
- package/components/input/datetime-picker.tsx +60 -50
- package/components/input/geo-json.tsx +2 -2
- package/components/input/gps-input.tsx +2 -2
- package/components/input/localized-string-input.tsx +3 -3
- package/components/input/localized-string-wysiwyg.tsx +3 -0
- package/components/input/localized-url-input.tsx +4 -4
- package/components/input/numeric-input.tsx +9 -2
- package/components/input/plugins/trumbowyg/custom-upload.ts +325 -0
- package/components/input/plugins/trumbowyg/lang/sk.ts +6 -0
- package/components/input/plugins/trumbowyg/modal-issues-fix.ts +141 -0
- package/components/input/plugins/trumbowyg/wysiwyg-config.ts +55 -0
- package/components/input/radio-button-group.tsx +41 -27
- package/components/input/textarea.tsx +5 -0
- package/components/input/textbox.tsx +29 -2
- package/components/input/video-urls.tsx +2 -2
- package/components/input/wysiwig.tsx +99 -25
- package/components/modal/modal-utils.ts +19 -1
- package/components/open-street-map/open-street-map.tsx +44 -40
- package/components/progress-bar/index.tsx +93 -23
- package/components/quick-edit/quick-edit-modal-base.tsx +4 -4
- package/components/stars/css/stars.css +39 -0
- package/components/stars/stars.tsx +204 -0
- package/components/swiper/css/gallery-swiper.css +41 -0
- package/components/swiper/swiper-gallery.tsx +89 -0
- package/components/swiper/swiper-slide.tsx +12 -0
- package/components/swiper/swiper.tsx +134 -0
- package/components/tabs/tabs.tsx +1 -1
- package/components/tooltip/index.tsx +5 -3
- package/components/wizard/wizard.tsx +2 -2
- package/package.json +3 -1
- package/components/input/plugins/trumbowyg/open-modal-fix.ts +0 -127
|
@@ -61,7 +61,7 @@ class Accordion extends TsxComponent<AccordionArgs> implements AccordionArgs {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
getSkin(): AccordionSkin {
|
|
64
|
-
return this.skin
|
|
64
|
+
return (this.skin === AccordionSkin.Light ? AccordionSkin.Light : AccordionSkin.Contrasting);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
getCssClassSkin() {
|
|
@@ -81,6 +81,8 @@ class Accordion extends TsxComponent<AccordionArgs> implements AccordionArgs {
|
|
|
81
81
|
<a
|
|
82
82
|
data-toggle="collapse"
|
|
83
83
|
data-parent={"#" + componentId}
|
|
84
|
+
data-bs-toggle="collapse"
|
|
85
|
+
data-bs-parent={"#" + componentId}
|
|
84
86
|
href={"#" + componentId + "-coll-" + i}
|
|
85
87
|
aria-expanded="false"
|
|
86
88
|
aria-controls={componentId + "-coll-" + i}
|
|
@@ -5,6 +5,8 @@ import { Tooltip } from "bootstrap";
|
|
|
5
5
|
import { isNullOrEmpty } from "../../common/utils/is-null-or-empty";
|
|
6
6
|
|
|
7
7
|
interface ButtonArgs extends _ButtonArgsBase {
|
|
8
|
+
href?: string
|
|
9
|
+
hrefTarget?: '_blank' | '_self' | '_parent' | '_top'
|
|
8
10
|
clicked: (e: any) => void;
|
|
9
11
|
}
|
|
10
12
|
|
|
@@ -25,6 +27,8 @@ class Button extends TsxComponent<ButtonArgs> implements ButtonArgs {
|
|
|
25
27
|
@Prop() disabled!: boolean;
|
|
26
28
|
@Prop() fullWidth!: boolean;
|
|
27
29
|
@Prop() pulsate!: boolean;
|
|
30
|
+
@Prop() href!: string
|
|
31
|
+
@Prop() hrefTarget!: '_blank' | '_self' | '_parent' | '_top'
|
|
28
32
|
|
|
29
33
|
//When update, update Button & DropdownButton :/
|
|
30
34
|
getCssClass(): string {
|
|
@@ -36,7 +40,8 @@ class Button extends TsxComponent<ButtonArgs> implements ButtonArgs {
|
|
|
36
40
|
(this.iconButton ? " btn-icon" : "") +
|
|
37
41
|
(this.cssClass != null ? " " + this.cssClass : "") +
|
|
38
42
|
(this.fullWidth ? " full-width" : "") +
|
|
39
|
-
(this.pulsate ? " btn-pulsating" : "")
|
|
43
|
+
(this.pulsate ? " btn-pulsating" : "") +
|
|
44
|
+
(this.iconOnRight ? ' btn-icon-on-right' : '')
|
|
40
45
|
);
|
|
41
46
|
}
|
|
42
47
|
|
|
@@ -48,7 +53,7 @@ class Button extends TsxComponent<ButtonArgs> implements ButtonArgs {
|
|
|
48
53
|
}
|
|
49
54
|
}
|
|
50
55
|
|
|
51
|
-
|
|
56
|
+
handleButtonClicked(e) {
|
|
52
57
|
this.clicked(e);
|
|
53
58
|
|
|
54
59
|
if (!isNullOrEmpty(this.tooltip)) {
|
|
@@ -65,35 +70,55 @@ class Button extends TsxComponent<ButtonArgs> implements ButtonArgs {
|
|
|
65
70
|
}
|
|
66
71
|
|
|
67
72
|
render(h) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
type="button"
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
>
|
|
80
|
-
{this.icon && this.iconOnRight != true && (
|
|
81
|
-
<span class="btn-label">
|
|
82
|
-
<i class={this.icon}></i>
|
|
83
|
-
{this.text && <span> </span>}
|
|
84
|
-
</span>
|
|
85
|
-
)}
|
|
73
|
+
if (this.href == null) {
|
|
74
|
+
return (
|
|
75
|
+
<button type="button" class={this.getCssClass()} disabled={this.disabled == true} data-dismiss={this.dismissModal ? 'modal' : null} data-bs-dismiss={this.dismissModal ? 'modal' : null} title={this.tooltip} onClick={(e) => { this.handleButtonClicked(e) }}>
|
|
76
|
+
{this.icon && this.iconOnRight != true &&
|
|
77
|
+
<span class="btn-label">
|
|
78
|
+
<i class={this.icon}></i>
|
|
79
|
+
{this.text &&
|
|
80
|
+
<span> </span>
|
|
81
|
+
}
|
|
82
|
+
</span>
|
|
83
|
+
}
|
|
86
84
|
|
|
87
|
-
|
|
85
|
+
{this.text}
|
|
88
86
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
87
|
+
{this.icon && this.iconOnRight == true &&
|
|
88
|
+
<span class="btn-label">
|
|
89
|
+
{this.text &&
|
|
90
|
+
<span> </span>
|
|
91
|
+
}
|
|
92
|
+
<i class={this.icon}></i>
|
|
93
|
+
</span>
|
|
94
|
+
}
|
|
95
|
+
</button>
|
|
96
|
+
)
|
|
97
|
+
} else {
|
|
98
|
+
return (
|
|
99
|
+
<a href={this.href} target={this.hrefTarget == null ? '_self' : this.hrefTarget} class={this.getCssClass()} disabled={this.disabled == true} data-dismiss={this.dismissModal ? 'modal' : null} data-bs-dismiss={this.dismissModal ? 'modal' : null} title={this.tooltip}>
|
|
100
|
+
{this.icon && this.iconOnRight != true &&
|
|
101
|
+
<span class="btn-label">
|
|
102
|
+
<i class={this.icon}></i>
|
|
103
|
+
{this.text &&
|
|
104
|
+
<span> </span>
|
|
105
|
+
}
|
|
106
|
+
</span>
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
{this.text}
|
|
110
|
+
|
|
111
|
+
{this.icon && this.iconOnRight == true &&
|
|
112
|
+
<span class="btn-label">
|
|
113
|
+
{this.text &&
|
|
114
|
+
<span> </span>
|
|
115
|
+
}
|
|
116
|
+
<i class={this.icon}></i>
|
|
117
|
+
</span>
|
|
118
|
+
}
|
|
119
|
+
</a>
|
|
120
|
+
)
|
|
121
|
+
}
|
|
97
122
|
}
|
|
98
123
|
}
|
|
99
124
|
|
|
@@ -25,7 +25,7 @@ class ExcelUploadButton extends TsxComponent<ExcelUploadButtonArgs> implements E
|
|
|
25
25
|
@Prop() pulsate!: boolean;
|
|
26
26
|
@Prop() excelLoaded: (excelData: Array<Array<string>>) => void;
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
handleFileLoaded(buffer) {
|
|
29
29
|
if (this.excelLoaded != null) {
|
|
30
30
|
this.excelLoaded(ExcelReader.readFileAsJson(buffer));
|
|
31
31
|
}
|
|
@@ -37,7 +37,7 @@ class ExcelUploadButton extends TsxComponent<ExcelUploadButtonArgs> implements E
|
|
|
37
37
|
onlyExcel={true}
|
|
38
38
|
asArrayBuffer={true}
|
|
39
39
|
changedClientside={(e) => {
|
|
40
|
-
this.
|
|
40
|
+
this.handleFileLoaded(e);
|
|
41
41
|
}}
|
|
42
42
|
cssClass={this.cssClass}
|
|
43
43
|
layout={this.layout}
|
|
@@ -23,7 +23,7 @@ class LaddaButton extends TsxComponent<LaddaButtonArgs> implements LaddaButtonAr
|
|
|
23
23
|
@Prop() pulsate!: boolean;
|
|
24
24
|
@Prop() clicked: (e: any) => Promise<any>;
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
handleButtonClicked(e) {
|
|
27
27
|
var targetElem = e.target as HTMLElement;
|
|
28
28
|
if (targetElem.nodeName.toLowerCase() != "button") {
|
|
29
29
|
targetElem = $(targetElem).closest("button")[0];
|
|
@@ -43,7 +43,7 @@ class LaddaButton extends TsxComponent<LaddaButtonArgs> implements LaddaButtonAr
|
|
|
43
43
|
return (
|
|
44
44
|
<Button
|
|
45
45
|
clicked={(e) => {
|
|
46
|
-
this.
|
|
46
|
+
this.handleButtonClicked(e);
|
|
47
47
|
}}
|
|
48
48
|
cssClass={this.cssClass}
|
|
49
49
|
layout={this.layout}
|
|
@@ -10,6 +10,7 @@ interface TextButtonArgs {
|
|
|
10
10
|
cssClass?: string;
|
|
11
11
|
pulsate?: boolean;
|
|
12
12
|
fontAdjust?: boolean;
|
|
13
|
+
iconOnRight?: boolean
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
@Component
|
|
@@ -19,6 +20,7 @@ class TextButton extends TsxComponent<TextButtonArgs> implements TextButtonArgs
|
|
|
19
20
|
@Prop() text!: string;
|
|
20
21
|
@Prop() tooltip!: string;
|
|
21
22
|
@Prop() fontAdjust!: boolean;
|
|
23
|
+
@Prop() iconOnRight!: boolean;
|
|
22
24
|
|
|
23
25
|
@Prop() clicked: (e: any) => void;
|
|
24
26
|
@Prop() disabled!: boolean;
|
|
@@ -29,7 +31,7 @@ class TextButton extends TsxComponent<TextButtonArgs> implements TextButtonArgs
|
|
|
29
31
|
return "text-button" + (this.cssClass != null ? " " + this.cssClass : "") + (this.pulsate ? " btn-pulsating" : "") + (this.fontAdjust == true ? " text-button-font" : "");
|
|
30
32
|
}
|
|
31
33
|
|
|
32
|
-
|
|
34
|
+
handleButtonClicked(e) {
|
|
33
35
|
this.clicked(e);
|
|
34
36
|
|
|
35
37
|
if (!isNullOrEmpty(this.tooltip)) {
|
|
@@ -45,15 +47,16 @@ class TextButton extends TsxComponent<TextButtonArgs> implements TextButtonArgs
|
|
|
45
47
|
|
|
46
48
|
render(h) {
|
|
47
49
|
return (
|
|
48
|
-
<span
|
|
49
|
-
|
|
50
|
-
this.
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
title={this.tooltip}
|
|
54
|
-
>
|
|
55
|
-
<i class={this.icon}></i>
|
|
50
|
+
<span onClick={(e) => { this.handleButtonClicked(e) }} class={this.getCssClass()} title={this.tooltip}>
|
|
51
|
+
{!this.iconOnRight &&
|
|
52
|
+
<i class={this.icon}></i>
|
|
53
|
+
}
|
|
54
|
+
|
|
56
55
|
<span>{this.text}</span>
|
|
56
|
+
|
|
57
|
+
{this.iconOnRight &&
|
|
58
|
+
<i class={this.icon}></i>
|
|
59
|
+
}
|
|
57
60
|
</span>
|
|
58
61
|
);
|
|
59
62
|
}
|
|
@@ -108,7 +108,7 @@ class UploadButton extends TsxComponent<UploadButtonArgs> implements UploadButto
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
handleClientButtonClicked() {
|
|
112
112
|
this.$refs.clientImageLoader["click"]();
|
|
113
113
|
}
|
|
114
114
|
|
|
@@ -116,14 +116,14 @@ class UploadButton extends TsxComponent<UploadButtonArgs> implements UploadButto
|
|
|
116
116
|
this.handleClientsideChange(e.target.files[0]);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
handleDrop(e) {
|
|
120
120
|
var file = e.dataTransfer.files[0];
|
|
121
121
|
if (file != null) {
|
|
122
122
|
this.handleClientsideChange(file);
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
handleDummyEvent(e: Event) {
|
|
127
127
|
e.preventDefault();
|
|
128
128
|
e.stopPropagation();
|
|
129
129
|
}
|
|
@@ -134,11 +134,11 @@ class UploadButton extends TsxComponent<UploadButtonArgs> implements UploadButto
|
|
|
134
134
|
if (targetEl["_eventsBound"] == null) {
|
|
135
135
|
targetEl["_eventsBound"] = true;
|
|
136
136
|
["drag", "dragstart", "dragend", "dragover", "dragenter", "dragleave", "drop"].forEach((evType) => {
|
|
137
|
-
targetEl.addEventListener(evType, this.
|
|
137
|
+
targetEl.addEventListener(evType, this.handleDummyEvent);
|
|
138
138
|
});
|
|
139
139
|
|
|
140
140
|
targetEl.addEventListener("drop", (e) => {
|
|
141
|
-
this.
|
|
141
|
+
this.handleDrop(e);
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
144
|
});
|
|
@@ -156,7 +156,7 @@ class UploadButton extends TsxComponent<UploadButtonArgs> implements UploadButto
|
|
|
156
156
|
<Button
|
|
157
157
|
ref={"uploadButton"}
|
|
158
158
|
clicked={(e) => {
|
|
159
|
-
this.
|
|
159
|
+
this.handleClientButtonClicked();
|
|
160
160
|
}}
|
|
161
161
|
cssClass={this.cssClass}
|
|
162
162
|
layout={this.layout}
|
|
@@ -36,7 +36,7 @@ class CardHeaderWithOptions extends TsxComponent<CardHeaderWithOptionsArgs> impl
|
|
|
36
36
|
)}
|
|
37
37
|
|
|
38
38
|
<div class="dropdown card-header-options-dropdown">
|
|
39
|
-
<button type="button" class="btn btn-default dropdown-toggle no-caret" data-toggle="dropdown">
|
|
39
|
+
<button type="button" class="btn btn-default dropdown-toggle no-caret" data-toggle="dropdown" data-bs-toggle="dropdown">
|
|
40
40
|
<i class="icon icon-settings"></i>
|
|
41
41
|
</button>
|
|
42
42
|
<div class="dropdown-menu dropdown-menu-right">
|
package/components/card/card.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import PowerduckState from
|
|
1
|
+
import { Prop, toNative } from 'vue-facing-decorator'
|
|
2
|
+
|
|
3
|
+
import PowerduckState from '../../app/powerduck-state'
|
|
4
|
+
import TsxComponent, { Component } from '../../app/vuetsx'
|
|
4
5
|
|
|
5
6
|
export enum CardRole {
|
|
6
7
|
Normal = 0,
|
|
@@ -8,24 +9,28 @@ export enum CardRole {
|
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
interface CardArgs {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
role?: CardRole
|
|
13
|
+
renderMode?: 'default' | 'inlined'
|
|
14
|
+
hasShadow?: boolean
|
|
15
|
+
cssClass?: string
|
|
16
|
+
clicked?: () => void
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
@Component
|
|
17
20
|
class Card extends TsxComponent<CardArgs> implements CardArgs {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
@Prop() role!: CardRole
|
|
22
|
+
@Prop() hasShadow!: boolean
|
|
23
|
+
@Prop() renderMode?: 'default' | 'inlined'
|
|
24
|
+
@Prop() cssClass?: string
|
|
25
|
+
@Prop() clicked?: () => void
|
|
26
|
+
|
|
27
|
+
render() {
|
|
28
|
+
return (
|
|
29
|
+
<div onClick={this?.clicked} role={this.getRole()} class={`card${this.role == CardRole.RootCard ? ' single-card root-element' : ''}${this.getStickyCssClass()}${this.getBoxShadowCardCss()}${this.getRenderModeCardCss()} ${this.cssClass ?? ''}`}>
|
|
30
|
+
{this.$slots.default?.()}
|
|
31
|
+
</div>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
29
34
|
|
|
30
35
|
getStickyCssClass(): string {
|
|
31
36
|
var cssClass = "";
|
|
@@ -55,8 +60,16 @@ class Card extends TsxComponent<CardArgs> implements CardArgs {
|
|
|
55
60
|
return " card-render-inlined";
|
|
56
61
|
}
|
|
57
62
|
|
|
58
|
-
|
|
59
|
-
|
|
63
|
+
return ''
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
getRole() {
|
|
67
|
+
if (this.clicked != null) {
|
|
68
|
+
return 'button'
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return 'initial'
|
|
72
|
+
}
|
|
60
73
|
}
|
|
61
74
|
|
|
62
|
-
export default toNative(Card);
|
|
75
|
+
export default toNative(Card);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { Prop, toNative } from 'vue-facing-decorator'
|
|
2
|
+
|
|
3
|
+
import PowerduckState from '../../app/powerduck-state'
|
|
4
|
+
import TsxComponent, { Component } from '../../app/vuetsx'
|
|
5
|
+
import Card from './card'
|
|
6
|
+
import CardBody from './card-body'
|
|
6
7
|
|
|
7
8
|
export enum CardRole {
|
|
8
9
|
Normal = 0,
|
|
@@ -10,39 +11,43 @@ export enum CardRole {
|
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
interface ImageCardArgs {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
role?: CardRole
|
|
15
|
+
renderMode?: 'default' | 'inlined'
|
|
16
|
+
hasShadow?: boolean
|
|
17
|
+
imgUrl: string
|
|
18
|
+
imgAlt?: string
|
|
19
|
+
height?: string
|
|
20
|
+
clicked?: () => void
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
@Component
|
|
21
24
|
class ImageCard extends TsxComponent<ImageCardArgs> implements ImageCardArgs {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
@Prop() role!: CardRole
|
|
26
|
+
@Prop() hasShadow!: boolean
|
|
27
|
+
@Prop() renderMode?: 'default' | 'inlined'
|
|
28
|
+
@Prop() imgUrl: string
|
|
29
|
+
@Prop() height?: string
|
|
30
|
+
@Prop() imgAlt?: string
|
|
31
|
+
@Prop() clicked?: () => void
|
|
27
32
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
33
|
+
render() {
|
|
34
|
+
return (
|
|
35
|
+
<Card clicked={this?.clicked} renderMode="inlined">
|
|
36
|
+
<div class="row g-0">
|
|
37
|
+
<div class="col-md-3" style={`height: ${this.height ?? 'auto'}`}>
|
|
38
|
+
<img
|
|
39
|
+
src={this.imgUrl}
|
|
40
|
+
class="img-fluid rounded-start h-100 w-100 object-fit-cover"
|
|
41
|
+
alt={this.imgAlt ?? 'Image'}
|
|
42
|
+
/>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="col-md-8">
|
|
45
|
+
<CardBody>{this.$slots.default?.()}</CardBody>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</Card>
|
|
49
|
+
)
|
|
50
|
+
}
|
|
46
51
|
|
|
47
52
|
getStickyCssClass(): string {
|
|
48
53
|
var cssClass = ""
|
|
@@ -76,4 +81,4 @@ class ImageCard extends TsxComponent<ImageCardArgs> implements ImageCardArgs {
|
|
|
76
81
|
}
|
|
77
82
|
}
|
|
78
83
|
|
|
79
|
-
export default toNative(ImageCard)
|
|
84
|
+
export default toNative(ImageCard)
|
|
@@ -1,64 +1,65 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import { hexToRGB } from
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
1
|
+
import Chart from 'chart.js'
|
|
2
|
+
import { Prop, toNative } from 'vue-facing-decorator'
|
|
3
|
+
import TsxComponent, { Component } from '../../app/vuetsx'
|
|
4
|
+
|
|
5
|
+
import { hexToRGB } from './ts/utils'
|
|
6
|
+
import 'chartjs-plugin-zoom'
|
|
7
|
+
|
|
8
|
+
const defaultOptions = {
|
|
9
|
+
maintainAspectRatio: false,
|
|
10
|
+
tooltips: {
|
|
11
|
+
bodySpacing: 4,
|
|
12
|
+
mode: 'nearest',
|
|
13
|
+
intersect: 0,
|
|
14
|
+
position: 'nearest',
|
|
15
|
+
xPadding: 10,
|
|
16
|
+
yPadding: 10,
|
|
17
|
+
caretPadding: 10,
|
|
18
|
+
},
|
|
19
|
+
responsive: 1,
|
|
20
|
+
scales: {
|
|
21
|
+
yAxes: [
|
|
22
|
+
{
|
|
23
|
+
gridLines: {
|
|
24
|
+
zeroLineColor: 'transparent',
|
|
25
|
+
drawBorder: false,
|
|
26
|
+
},
|
|
27
|
+
ticks: {
|
|
28
|
+
beginAtZero: true,
|
|
29
|
+
userCallback: (label, _index, _labels) => {
|
|
30
|
+
// when the floored value is the same as the value we have a whole number
|
|
31
|
+
if (Math.floor(label) === label) {
|
|
32
|
+
return label
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
xAxes: [
|
|
39
|
+
{
|
|
40
|
+
gridLines: {
|
|
41
|
+
zeroLineColor: 'transparent',
|
|
42
|
+
drawTicks: false,
|
|
43
|
+
display: false,
|
|
44
|
+
drawBorder: false,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
layout: {
|
|
50
|
+
padding: { left: 0, right: 0, top: 15, bottom: 15 },
|
|
51
|
+
},
|
|
52
|
+
pan: {
|
|
53
|
+
enabled: true,
|
|
54
|
+
mode: 'x',
|
|
55
|
+
},
|
|
56
|
+
zoom: {
|
|
57
|
+
enabled: true,
|
|
58
|
+
mode: 'x',
|
|
59
|
+
speed: 75.5,
|
|
60
|
+
sensitivity: 0,
|
|
61
|
+
},
|
|
62
|
+
}
|
|
62
63
|
|
|
63
64
|
export enum BarChartBackground {
|
|
64
65
|
gradientSolid = 0,
|
|
@@ -205,4 +206,4 @@ class BarChart extends TsxComponent<BarChartArgs> implements BarChartArgs {
|
|
|
205
206
|
}
|
|
206
207
|
}
|
|
207
208
|
|
|
208
|
-
export default toNative(BarChart);
|
|
209
|
+
export default toNative(BarChart);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { toNative, Prop } from "vue-facing-decorator";
|
|
2
|
+
import TsxComponent, { Component } from "../../app/vuetsx";
|
|
3
|
+
import { PortalUtils } from "../../common/utils/utils";
|
|
4
|
+
interface CollapseArgs {
|
|
5
|
+
cssClass?: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@Component
|
|
9
|
+
class Collapse extends TsxComponent<CollapseArgs> implements CollapseArgs {
|
|
10
|
+
@Prop() cssClass?: string;
|
|
11
|
+
uuid: string = null;
|
|
12
|
+
|
|
13
|
+
mounted() {
|
|
14
|
+
this.uuid = 'clp-' + PortalUtils.randomString(6);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
toggle() {
|
|
18
|
+
$(this.getInnerButton()).trigger('click');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
isShown(): boolean {
|
|
22
|
+
return this.getInnerButton().getAttribute('aria-expanded') == 'true'
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
private getInnerButton() {
|
|
26
|
+
return document.getElementById(this.uuid + '-btn');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
render(h) {
|
|
30
|
+
return (
|
|
31
|
+
<div class={`collapse`} id={this.uuid}>
|
|
32
|
+
<button style="display:none;" id={this.uuid + '-btn'} type="button" data-bs-toggle="collapse" data-bs-target={`#${this.uuid}`} aria-expanded="false" aria-controls={this.uuid}></button>
|
|
33
|
+
|
|
34
|
+
<div class={`collapse-inner${this.cssClass != null ? ' ' + this.cssClass : ''}`}>
|
|
35
|
+
{this.$slots.default}
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export default toNative(Collapse);
|
|
@@ -29,7 +29,7 @@ class ColVisModal extends TsxComponent<ColVisModalArgs> implements ColVisModalAr
|
|
|
29
29
|
},
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
handleColumnChanged(col: TableColumn, visible: boolean): void {
|
|
33
33
|
col.visible = visible;
|
|
34
34
|
|
|
35
35
|
if (col.visible == true) {
|
|
@@ -51,7 +51,7 @@ class ColVisModal extends TsxComponent<ColVisModalArgs> implements ColVisModalAr
|
|
|
51
51
|
this.columns.map((col) => (
|
|
52
52
|
<div class="row">
|
|
53
53
|
<div class="col-md-12">
|
|
54
|
-
<CheckBox label={null} wrap={false} checkboxLabelHtml={col.caption} value={col.visible != false} changed={(e) => this.
|
|
54
|
+
<CheckBox label={null} wrap={false} checkboxLabelHtml={col.caption} value={col.visible != false} changed={(e) => this.handleColumnChanged(col, e)} />
|
|
55
55
|
</div>
|
|
56
56
|
</div>
|
|
57
57
|
))}
|