inviton-powerduck 0.0.83 → 0.0.84

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,56 +1,42 @@
1
1
  import { Prop, toNative } from "vue-facing-decorator";
2
2
  import TsxComponent, { Component } from "../../app/vuetsx";
3
- import { Teleport } from "vue";
4
3
  import { PortalUtils } from "../../common/utils/utils";
5
4
  import { isNullOrEmpty } from "../../common/utils/is-null-or-empty";
6
- interface DataTableUpperButtonsWrapperArgs {
7
- hasCheckbox?: boolean;
8
- cssClass?: string;
9
- }
10
5
 
11
- export class DataTableUpperButtonsWrapperConfig {
12
- static defaultPortalTarget = '#bs-dtbtn-container';
6
+ interface DataTableUpperButtonsWrapperArgs {
7
+ hasCheckbox?: boolean;
8
+ cssClass?: string;
13
9
  }
14
10
 
15
- @Component({
16
- components: {
17
- teleport: Teleport,
18
- },
19
- })
11
+ @Component
20
12
  class DataTableUpperButtonsWrapperComponent extends TsxComponent<DataTableUpperButtonsWrapperArgs> implements DataTableUpperButtonsWrapperArgs {
21
- @Prop() hasCheckbox?: boolean;
22
- @Prop() cssClass?: string;
13
+ @Prop() hasCheckbox?: boolean;
14
+ @Prop() cssClass?: string;
23
15
 
24
- private getCssClass(): string {
25
- let builder = "table-upper-buttons-wrap";
26
- if (this.hasCheckbox) {
27
- builder += " wrap-has-checkbox";
28
- }
16
+ private getCssClass (): string {
17
+ let builder = "table-upper-buttons-wrap";
18
+ if (this.hasCheckbox) {
19
+ builder += " wrap-has-checkbox";
20
+ }
29
21
 
30
- if (!isNullOrEmpty(this.cssClass)) {
31
- builder += " " + this.cssClass;
32
- }
22
+ if (!isNullOrEmpty(this.cssClass)) {
23
+ builder += " " + this.cssClass;
24
+ }
33
25
 
34
- return builder;
35
- }
36
-
37
- get portalContainer(): string {
38
- return DataTableUpperButtonsWrapperConfig.defaultPortalTarget;
26
+ return builder;
39
27
  }
40
28
 
41
- private render(h) {
42
- if (PortalUtils.isIOS()) {
43
- return (
44
- <div class={"ios-table-upper-buttons-wrap" + (this.hasCheckbox ? " wrap-has-checkbox" : "")}>
45
- <teleport to={this.portalContainer} defer={true}>
46
- <div class={this.getCssClass()}>{this.$slots.default?.()}</div>
47
- </teleport>
48
- </div>
49
- );
50
- } else {
51
- return <div class={this.getCssClass()}>{this.$slots.default?.()}</div>;
52
- }
53
- }
29
+ private render (h) {
30
+ if (PortalUtils.isIOS()) {
31
+ return (
32
+ <div class={"ios-table-upper-buttons-wrap" + (this.hasCheckbox ? " wrap-has-checkbox" : "")}>
33
+ <div class={this.getCssClass()}>{this.$slots.default?.()}</div>
34
+ </div>
35
+ );
36
+ } else {
37
+ return <div class={this.getCssClass()}>{this.$slots.default?.()}</div>;
38
+ }
39
+ }
54
40
  }
55
41
 
56
42
  const DataTableUpperButtonsWrapper = toNative(DataTableUpperButtonsWrapperComponent)
@@ -1,7 +1,9 @@
1
1
  .dwh-table-wrapper {
2
2
  background: white;
3
+ padding: 20px;
4
+ border: 1px solid rgba(0, 0, 0, 0.025);
3
5
  border-radius: 8px;
4
- min-height: 80px;
6
+ min-height: 200px;
5
7
  position: relative;
6
8
  height: 100%;
7
9
  }
@@ -12,6 +14,26 @@
12
14
  width: 30px;
13
15
  text-align: center;
14
16
  margin: 0 1px;
17
+ border: 0;
18
+ }
19
+
20
+ .dwh-table-wrapper .dwh-table-actions-wrapper {
21
+ position: static;
22
+ display: flex;
23
+ flex-wrap: wrap;
24
+ width: 100%;
25
+ justify-content: start;
26
+ }
27
+
28
+ .dwh-table-wrapper .dwh-table-actions-wrapper > .btn {
29
+ position: static;
30
+ /* flex: 0 1 24%; */
31
+ margin-bottom: 10px;
32
+ box-sizing: border-box;
33
+ }
34
+
35
+ .dwh-table-wrapper .table-upper-buttons-wrap .btn {
36
+ margin: 3px;
15
37
  }
16
38
 
17
39
  .table-upper-buttons-wrap {
@@ -19,3 +41,34 @@
19
41
  top: 20px;
20
42
  z-index: 1;
21
43
  }
44
+
45
+ @media (max-width: 575px) {
46
+ .dwh-table-wrapper {
47
+ padding-left: 10px;
48
+ padding-right: 10px;
49
+ }
50
+
51
+ .dwh-table-wrapper > .table-upper-buttons-wrap {
52
+ position: fixed;
53
+ z-index: 99;
54
+ bottom: 0;
55
+ top: auto;
56
+ left: 0;
57
+ background: rgb(251 250 250);
58
+ padding: 3px;
59
+ border: 1px solid #e9e9e9;
60
+ justify-content: center;
61
+ gap: 5px;
62
+ }
63
+
64
+ .dwh-table-wrapper > .table-upper-buttons-wrap + .dt-root {
65
+ margin-top: 0;
66
+ padding-bottom: 30px;
67
+ --datatable-fullheight-container-buttons-offset: 85px;
68
+ }
69
+
70
+ .dwh-table-wrapper .dt-mobile-row::after {
71
+ content: '';
72
+ height: 100px;
73
+ }
74
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inviton-powerduck",
3
- "version": "0.0.83",
3
+ "version": "0.0.84",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": " vite build && vue-tsc --declaration --emitDeclarationOnly",