inviton-powerduck 0.0.94 → 0.0.96

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.
@@ -1,79 +1,86 @@
1
1
  export interface IPowerduckSystemResources {
2
- requestTimeout: string
3
- yes: string
4
- no: string;
5
- all: string
6
- add: string
7
- error: string
8
- errorFetchingData: string
9
- allTogether: string;
10
- edit: string
11
- remove: string
12
- warning: string
13
- cancel: string
14
- negationBase: string
15
- continue: string
16
- back: string
17
- submit: string
18
- close: string
19
- save: string
20
- search: string
21
- searchedValue: string
22
- image: string
23
- noResultsFound: string
24
- colVisLabel: string
25
- deletePromptSingular: string
26
- dtMassOperationWarningText: string
27
- dtLayoutMobile: string
28
- dtLayoutTable: string
29
- dtLayoutCompact: string
30
- recordsDtLabel: string
31
- dtCountText: string
32
- dtCountFilteredOutOf: string
33
- dtNoMobileFilter: string
34
- dtOnlyExclusive: string
35
- itemsOutOfArray: string
36
- fileDownloadTitle: string
37
- imageCrop: string
38
- uploadImage: string
39
- copyToClipboard: string
40
- copyToClipboardSuccess: string
41
- loginExpired: string
42
- gpsLabel: string
43
- gpsSubtitle: string
44
- gpsLatitudeCaption: string
45
- gpsLongitudeCaption: string
46
- currencyCode: string
47
- photosErrorMessage: string
48
- photosInitialMessage: string
49
- photosInvalidFileMessage: string
50
- quickEdit: string
51
- quickEditItemsCount: string
52
- quickEditErrorNamed: string
2
+ requestTimeout: string
3
+ yes: string
4
+ no: string;
5
+ all: string
6
+ add: string
7
+ error: string
8
+ errorFetchingData: string
9
+ allTogether: string;
10
+ edit: string
11
+ remove: string
12
+ warning: string
13
+ cancel: string
14
+ negationBase: string
15
+ continue: string
16
+ back: string
17
+ submit: string
18
+ close: string
19
+ save: string
20
+ search: string
21
+ searchedValue: string
22
+ image: string
23
+ noResultsFound: string
24
+ colVisLabel: string
25
+ deletePromptSingular: string
26
+ dtMassOperationWarningText: string
27
+ dtLayoutMobile: string
28
+ dtLayoutTable: string
29
+ dtLayoutCompact: string
30
+ recordsDtLabel: string
31
+ dtCountText: string
32
+ dtCountFilteredOutOf: string
33
+ dtNoMobileFilter: string
34
+ dtOnlyExclusive: string
35
+ itemsOutOfArray: string
36
+ fileDownloadTitle: string
37
+ imageCrop: string
38
+ uploadImage: string
39
+ copyToClipboard: string
40
+ copyToClipboardSuccess: string
41
+ loginExpired: string
42
+ gpsLabel: string
43
+ gpsSubtitle: string
44
+ gpsLatitudeCaption: string
45
+ gpsLongitudeCaption: string
46
+ currencyCode: string
47
+ photosErrorMessage: string
48
+ photosInitialMessage: string
49
+ photosInvalidFileMessage: string
50
+ quickEdit: string
51
+ quickEditItemsCount: string
52
+ quickEditErrorNamed: string
53
53
 
54
- languageSK: string;
55
- languageEN: string;
56
- languageCS: string;
57
- languageDE: string;
58
- languagePL: string;
59
- languageIT: string;
60
- languageHU: string;
54
+ languageSK: string;
55
+ languageEN: string;
56
+ languageCS: string;
57
+ languageDE: string;
58
+ languagePL: string;
59
+ languageIT: string;
60
+ languageHU: string;
61
61
 
62
- errorsOnForm: string;
63
- validationErrorRequired: string;
62
+ errorsOnForm: string;
63
+ validationErrorRequired: string;
64
64
  validationErrorNumeric: string;
65
65
  validationErrorInteger: string;
66
66
  validationErrorDecimal: string;
67
- validationErrorMinValue: string;
68
- validationErrorMaxValue: string;
69
- validationErrorMinLength: string;
70
- validationErrorMaxLength: string;
71
- validationErrorBetween: string;
72
- validationErrorEmail: string;
73
- validationErrorAlpha: string;
74
- validationErrorAlphaNum: string;
67
+ validationErrorMinValue: string;
68
+ validationErrorMaxValue: string;
69
+ validationErrorMinLength: string;
70
+ validationErrorMaxLength: string;
71
+ validationErrorBetween: string;
72
+ validationErrorEmail: string;
73
+ validationErrorAlpha: string;
74
+ validationErrorAlphaNum: string;
75
75
  validationErrorUrl: string;
76
76
  validationErrorIpAddress: string;
77
77
  validationErrorMacAddress: string;
78
- validationErrorGeneric: string;
78
+ validationErrorGeneric: string;
79
+
80
+ signInGoogle: string;
81
+ signInFacebook: string;
82
+ signInApple: string;
83
+ signInX: string;
84
+ signInFigma: string;
85
+ signInDribble: string;
79
86
  }
@@ -9,9 +9,10 @@
9
9
  }
10
10
 
11
11
  export enum ButtonSize {
12
- Regular = "",
13
- Small = "btn-sm",
14
- Large = "btn-lg",
12
+ Regular = "",
13
+ Small = "btn-sm",
14
+ Large = "btn-lg",
15
+ ExtraLarge = "btn-xl",
15
16
  }
16
17
 
17
18
  export enum ButtonIframeHandling {
@@ -36,3 +37,19 @@ export interface _ButtonArgsBase {
36
37
  tooltip?: string;
37
38
  pulsate?: boolean;
38
39
  }
40
+
41
+ export enum ButtonSocialType {
42
+ Google = "google",
43
+ Facebook = "facebook",
44
+ Apple = "apple",
45
+ X = "x",
46
+ Figma = "figma",
47
+ Dribble = "dribble",
48
+ }
49
+
50
+ export enum ButtonMobileAppStoreType {
51
+ GooglePlay = "google-play",
52
+ AppStore = "app-store",
53
+ GalaxyStore = "galaxy-store",
54
+ HuaweiAppGallery = "huawei-app-gallery",
55
+ }
@@ -0,0 +1,91 @@
1
+ import { toNative, Prop } from "vue-facing-decorator";
2
+ import TsxComponent, { Component } from "../../app/vuetsx";
3
+ import { _ButtonArgsBase, ButtonLayout, ButtonSize, ButtonSocialType } from "./button-layout";
4
+ import Button from "./button";
5
+ import PowerduckState from "../../app/powerduck-state";
6
+
7
+ interface SocialButtonArgs extends Omit<_ButtonArgsBase, 'size' | 'layout' | 'icon' | 'text'> {
8
+ type: ButtonSocialType;
9
+ clicked: (e: any) => void;
10
+ }
11
+
12
+ @Component
13
+ class SocialButtonComponent extends TsxComponent<SocialButtonArgs> implements SocialButtonArgs {
14
+ @Prop() cssClass!: string;
15
+ @Prop() tooltip!: string;
16
+ @Prop() round!: boolean;
17
+ @Prop() outlined!: boolean;
18
+ @Prop() iconButton!: boolean;
19
+ @Prop() iconOnRight!: boolean;
20
+ @Prop() disabled!: boolean;
21
+ @Prop() pulsate!: boolean;
22
+ @Prop() type!: ButtonSocialType;
23
+ @Prop() clicked: (e: any) => void;
24
+
25
+ getSocialIcon (): string {
26
+ switch (this.type) {
27
+ case ButtonSocialType.Google:
28
+ return "fab fa-google";
29
+ case ButtonSocialType.Facebook:
30
+ return "fab fa-facebook";
31
+ case ButtonSocialType.Apple:
32
+ return "fab fa-apple";
33
+ case ButtonSocialType.X:
34
+ return "fab fa-twitter";
35
+ case ButtonSocialType.Figma:
36
+ return "fab fa-figma";
37
+ case ButtonSocialType.Dribble:
38
+ return "fas fa-basketball-ball";
39
+ default:
40
+ return "";
41
+ }
42
+ }
43
+
44
+ getText (): string {
45
+ switch (this.type) {
46
+ case ButtonSocialType.Google:
47
+ return PowerduckState.getResourceValue("signInGoogle");
48
+ case ButtonSocialType.Facebook:
49
+ return PowerduckState.getResourceValue("signInFacebook");
50
+ case ButtonSocialType.Apple:
51
+ return PowerduckState.getResourceValue("signInApple");
52
+ case ButtonSocialType.X:
53
+ return PowerduckState.getResourceValue("signInX");
54
+ case ButtonSocialType.Figma:
55
+ return PowerduckState.getResourceValue("signInFigma");
56
+ case ButtonSocialType.Dribble:
57
+ return PowerduckState.getResourceValue("signInDribble");
58
+ default:
59
+ return "";
60
+ }
61
+ }
62
+
63
+ getCssClass (): string {
64
+ return `btn-social btn-social-${this.type}${(this.cssClass != null ? " " + this.cssClass : "")}`;
65
+ }
66
+
67
+ render (h) {
68
+ return (
69
+ <Button
70
+ clicked={(e) => {
71
+ this.clicked(e);
72
+ }}
73
+ cssClass={this.getCssClass()}
74
+ layout={ButtonLayout.Primary}
75
+ text={!this.iconButton ? this.getText() : null}
76
+ size={ButtonSize.Regular}
77
+ round={this.round}
78
+ outlined={this.outlined}
79
+ icon={this.getSocialIcon()}
80
+ iconButton={this.iconButton}
81
+ iconOnRight={this.iconOnRight}
82
+ tooltip={this.tooltip}
83
+ disabled={this.disabled}
84
+ pulsate={this.pulsate}
85
+ />
86
+ );
87
+ }
88
+ }
89
+
90
+ const SocialButton = toNative(SocialButtonComponent)
91
+ export default SocialButton
@@ -4,8 +4,9 @@
4
4
 
5
5
  .cb-without-label small {
6
6
  padding-left: 30px;
7
- margin-top: -12px;
7
+ margin-top: 0px;
8
8
  font-size: 0.8em;
9
+ display: block;
9
10
  }
10
11
 
11
12
  .cb-without-label .col-md-9 {
@@ -4,8 +4,10 @@ import { isNullOrEmpty } from "../../common/utils/is-null-or-empty";
4
4
  import "./css/progress-bar.css";
5
5
 
6
6
  export enum ProgressBarTextPlacement {
7
- Above = 0,
8
- Below = 1,
7
+ Above = 0,
8
+ Below = 1,
9
+ Rigth = 2,
10
+ Left = 3
9
11
  }
10
12
 
11
13
  interface ProgressBarArgs {
@@ -17,6 +19,7 @@ interface ProgressBarArgs {
17
19
  textPlacement?: ProgressBarTextPlacement
18
20
  showSteps?: boolean
19
21
  hideText?: boolean
22
+ renderText?: (h: any, currentCount: number, maxCount: number) => void
20
23
  renderStep?: (h: any, index: number) => void
21
24
  renderStepContent?: (h: any, index: number, currentPercentage: number) => void
22
25
  }
@@ -31,16 +34,21 @@ class ProgressBarComponent extends TsxComponent<ProgressBarArgs> implements Prog
31
34
  @Prop() textPlacement!: ProgressBarTextPlacement
32
35
  @Prop() showSteps!: boolean
33
36
  @Prop() hideText!: boolean
37
+ @Prop() renderText!: (h: any, currentCount: number, maxCount: number) => void
34
38
  @Prop() renderStep!: (h: any, index: number) => void
35
39
  @Prop() renderStepContent!: (h: any, index: number, currentPercentage: number) => void
36
40
 
37
- getTextPlacementSuffix(): string {
38
- if (this.textPlacement == null || this.textPlacement == ProgressBarTextPlacement.Above) {
39
- return 'above';
40
- } else {
41
- return 'below';
42
- }
43
- }
41
+ getTextPlacementSuffix (): string {
42
+ if (this.textPlacement == null || this.textPlacement == ProgressBarTextPlacement.Above) {
43
+ return 'above';
44
+ } else if (this.textPlacement == ProgressBarTextPlacement.Rigth) {
45
+ return 'rigth';
46
+ } else if (this.textPlacement == ProgressBarTextPlacement.Left) {
47
+ return 'left';
48
+ } else {
49
+ return 'below';
50
+ }
51
+ }
44
52
 
45
53
  getStepPercentages(): number[] {
46
54
  const stepPercentages = [];
@@ -90,12 +98,13 @@ class ProgressBarComponent extends TsxComponent<ProgressBarArgs> implements Prog
90
98
 
91
99
  return (
92
100
  <div ref={'percentageWrap'} class={'percentage-fm-wrap percentage-fm-text' + this.getTextPlacementSuffix() + (!isNullOrEmpty(this.cssClass) ? ' ' + this.cssClass : '')} style={(this.fullWidth != true ? '' : 'width:100%;')}>
93
- {!this.hideText &&
101
+ {!this.hideText && (this.renderText != null ?
102
+ this.renderText(h, currentCount, maxCount) :
94
103
  <div class="percentage-fm-text">
95
104
  {currentCount.toString() + ' / ' + maxCount.toString()}
96
105
  </div>
97
- }
98
-
106
+ )}
107
+
99
108
  <div class="percentage-fm-pbwrap">
100
109
  <div class="percentage-fm-pbinner" style={'width:' + percentage + '%'}></div>
101
110
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inviton-powerduck",
3
- "version": "0.0.94",
3
+ "version": "0.0.96",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": " vite build && vue-tsc --declaration --emitDeclarationOnly",