@quandis/qbo4.ui 4.0.1-CI-20240507-231949 → 4.0.1-CI-20240514-221344
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/package.json +1 -1
- package/src/qbo/qbo-contact.js +1 -1
- package/src/qbo/qbo-contact.ts +1 -1
- package/src/qbo/qbo-form-edit.js +4 -5
- package/src/qbo/qbo-form-edit.ts +4 -5
- package/src/qbo/qbo-ssn.d.ts +7 -0
- package/src/qbo/qbo-ssn.js +43 -8
- package/src/qbo/qbo-ssn.ts +29 -8
- package/wwwroot/js/qbo4.ui-flowchart.js +37 -17
- package/wwwroot/js/qbo4.ui-flowchart.min.js +2 -2
- package/wwwroot/js/qbo4.ui-flowchart.min.js.map +1 -1
- package/wwwroot/js/qbo4.ui.js +151 -117
- package/wwwroot/js/qbo4.ui.min.js +9 -9
- package/wwwroot/js/qbo4.ui.min.js.map +1 -1
package/package.json
CHANGED
package/src/qbo/qbo-contact.js
CHANGED
|
@@ -103,7 +103,7 @@ let QboContact = class QboContact extends LitElement {
|
|
|
103
103
|
</div>
|
|
104
104
|
<div class="${this.colThreeClass}">
|
|
105
105
|
<label for="USSSN" class="${this.formLabelSmallClass}">SSN</label>
|
|
106
|
-
<qbo-ssn ssn="${this.jsonData.Root.ContactItem?.USSSN}" contactId="${this.contactId}"></qbo-ssn>
|
|
106
|
+
<qbo-ssn .data="${this.jsonData.Root.ContactItem}" ssn="${this.jsonData.Root.ContactItem?.USSSN}" contactId="${this.contactId}"></qbo-ssn>
|
|
107
107
|
</div>
|
|
108
108
|
<div class="${this.colThreeClass}">
|
|
109
109
|
<label for="TIN" class="${this.formLabelSmallClass}">TIN</label>
|
package/src/qbo/qbo-contact.ts
CHANGED
|
@@ -128,7 +128,7 @@ export class QboContact extends LitElement {
|
|
|
128
128
|
</div>
|
|
129
129
|
<div class="${this.colThreeClass}">
|
|
130
130
|
<label for="USSSN" class="${this.formLabelSmallClass}">SSN</label>
|
|
131
|
-
<qbo-ssn ssn="${this.jsonData.Root.ContactItem?.USSSN}" contactId="${this.contactId}"></qbo-ssn>
|
|
131
|
+
<qbo-ssn .data="${this.jsonData.Root.ContactItem}" ssn="${this.jsonData.Root.ContactItem?.USSSN}" contactId="${this.contactId}"></qbo-ssn>
|
|
132
132
|
</div>
|
|
133
133
|
<div class="${this.colThreeClass}">
|
|
134
134
|
<label for="TIN" class="${this.formLabelSmallClass}">TIN</label>
|
package/src/qbo/qbo-form-edit.js
CHANGED
|
@@ -48,7 +48,7 @@ formEditMap.set('updatedLayout', (component) => {
|
|
|
48
48
|
let QboFormEdit = class QboFormEdit extends LitElement {
|
|
49
49
|
constructor() {
|
|
50
50
|
super(...arguments);
|
|
51
|
-
this.aDropdownClass = 'dropdown-item';
|
|
51
|
+
this.aDropdownClass = 'dropdown-item qbo-pointer';
|
|
52
52
|
this.buttonPrimaryClass = 'qbo-primary';
|
|
53
53
|
this.buttonPrimaryDropdownClass = 'qbo-primary-dropdown';
|
|
54
54
|
this.buttonType = 'button';
|
|
@@ -75,9 +75,8 @@ let QboFormEdit = class QboFormEdit extends LitElement {
|
|
|
75
75
|
return this.renderInHost ? this : super.createRenderRoot();
|
|
76
76
|
}
|
|
77
77
|
render() {
|
|
78
|
-
const data = this.closest('*[apiendpoint]');
|
|
79
78
|
if (this.type == null)
|
|
80
|
-
this.type = '
|
|
79
|
+
this.type = 'defaultLayout';
|
|
81
80
|
const popover = formEditMap.has(this.type) ? formEditMap.get(this.type)(this.data) : null;
|
|
82
81
|
return html `<slot>
|
|
83
82
|
<div class="${this.divSectionHeaderClass}">
|
|
@@ -91,13 +90,13 @@ let QboFormEdit = class QboFormEdit extends LitElement {
|
|
|
91
90
|
<button type="${this.buttonType}" class="${this.buttonPrimaryDropdownClass}" data-bs-toggle="${this.dropdownToggle}"></button>
|
|
92
91
|
<ul class="${this.ulDropdownClass}">
|
|
93
92
|
<li>
|
|
94
|
-
<a class="${this.aDropdownClass}"
|
|
93
|
+
<a class="${this.aDropdownClass}" onclick="alert('Show History');">
|
|
95
94
|
<i class="${this.historyIcon}"></i>
|
|
96
95
|
<span>${this.historyText}</span>
|
|
97
96
|
</a>
|
|
98
97
|
</li>
|
|
99
98
|
<li>
|
|
100
|
-
<a class="${this.aDropdownClass}"
|
|
99
|
+
<a class="${this.aDropdownClass}" onclick="alert('Show Help');">
|
|
101
100
|
<i class="${this.helpIcon}"></i>
|
|
102
101
|
<span>${this.helpText}</span>
|
|
103
102
|
</a>
|
package/src/qbo/qbo-form-edit.ts
CHANGED
|
@@ -43,7 +43,7 @@ formEditMap.set('updatedLayout', (component: any) => {
|
|
|
43
43
|
export class QboFormEdit extends LitElement {
|
|
44
44
|
|
|
45
45
|
@property({ type: String })
|
|
46
|
-
aDropdownClass: String | null = 'dropdown-item';
|
|
46
|
+
aDropdownClass: String | null = 'dropdown-item qbo-pointer';
|
|
47
47
|
|
|
48
48
|
@property({ type: String })
|
|
49
49
|
buttonPrimaryClass: String | null = 'qbo-primary';
|
|
@@ -113,8 +113,7 @@ export class QboFormEdit extends LitElement {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
render() {
|
|
116
|
-
|
|
117
|
-
if (this.type == null) this.type = 'createdLayout'
|
|
116
|
+
if (this.type == null) this.type = 'defaultLayout';
|
|
118
117
|
const popover = formEditMap.has(this.type) ? formEditMap.get(this.type)!(this.data) : null;
|
|
119
118
|
|
|
120
119
|
return html`<slot>
|
|
@@ -129,13 +128,13 @@ export class QboFormEdit extends LitElement {
|
|
|
129
128
|
<button type="${this.buttonType}" class="${this.buttonPrimaryDropdownClass}" data-bs-toggle="${this.dropdownToggle}"></button>
|
|
130
129
|
<ul class="${this.ulDropdownClass}">
|
|
131
130
|
<li>
|
|
132
|
-
<a class="${this.aDropdownClass}"
|
|
131
|
+
<a class="${this.aDropdownClass}" onclick="alert('Show History');">
|
|
133
132
|
<i class="${this.historyIcon}"></i>
|
|
134
133
|
<span>${this.historyText}</span>
|
|
135
134
|
</a>
|
|
136
135
|
</li>
|
|
137
136
|
<li>
|
|
138
|
-
<a class="${this.aDropdownClass}"
|
|
137
|
+
<a class="${this.aDropdownClass}" onclick="alert('Show Help');">
|
|
139
138
|
<i class="${this.helpIcon}"></i>
|
|
140
139
|
<span>${this.helpText}</span>
|
|
141
140
|
</a>
|
package/src/qbo/qbo-ssn.d.ts
CHANGED
|
@@ -3,10 +3,17 @@ export declare class QboSSN extends LitElement {
|
|
|
3
3
|
apiEndpoint: string;
|
|
4
4
|
contactId: String | null;
|
|
5
5
|
disabled: boolean;
|
|
6
|
+
divClass: String | null;
|
|
6
7
|
formControlSmallClass: String | null;
|
|
8
|
+
imageClassShow: String | null;
|
|
9
|
+
imageClassHide: String | null;
|
|
7
10
|
name: String | null;
|
|
11
|
+
selectorImage: String | null;
|
|
12
|
+
selectorInput: String | null;
|
|
8
13
|
show: boolean;
|
|
14
|
+
spanClass: String | null;
|
|
9
15
|
ssn: String | null;
|
|
16
|
+
type: string | null;
|
|
10
17
|
url: String | null;
|
|
11
18
|
renderInHost: boolean;
|
|
12
19
|
createRenderRoot(): HTMLElement | DocumentFragment;
|
package/src/qbo/qbo-ssn.js
CHANGED
|
@@ -17,10 +17,17 @@ let QboSSN = class QboSSN extends LitElement {
|
|
|
17
17
|
this.apiEndpoint = 'qbo';
|
|
18
18
|
this.contactId = null;
|
|
19
19
|
this.disabled = true;
|
|
20
|
+
this.divClass = 'qbo-input-group';
|
|
20
21
|
this.formControlSmallClass = 'qbo-sm';
|
|
22
|
+
this.imageClassShow = 'qbo-icon-eye';
|
|
23
|
+
this.imageClassHide = 'qbo-icon-eye-slash';
|
|
21
24
|
this.name = 'USSSN';
|
|
25
|
+
this.selectorImage = 'i';
|
|
26
|
+
this.selectorInput = 'input';
|
|
22
27
|
this.show = false;
|
|
28
|
+
this.spanClass = 'qbo-input-group-text qbo-pointer';
|
|
23
29
|
this.ssn = null;
|
|
30
|
+
this.type = 'defaultLayout';
|
|
24
31
|
this.url = 'contact/UnmaskSSN';
|
|
25
32
|
this.renderInHost = true;
|
|
26
33
|
}
|
|
@@ -33,33 +40,33 @@ let QboSSN = class QboSSN extends LitElement {
|
|
|
33
40
|
const service = services.container.isRegistered(this.apiEndpoint)
|
|
34
41
|
? services.container.resolve(this.apiEndpoint) : new RestApiService(this.apiEndpoint);
|
|
35
42
|
const json = await service.fetch(`${this.url}`, { ID: `${this.contactId}` });
|
|
36
|
-
this.renderRoot.querySelectorAll(
|
|
43
|
+
this.renderRoot.querySelectorAll(`${this.selectorInput}`).forEach(input => {
|
|
37
44
|
if (input instanceof HTMLInputElement) {
|
|
38
45
|
if (json?.ContactCollection?.length > 0 && json.ContactCollection[0].USSSN != null && json.ContactCollection[0].USSSN.length == 9) {
|
|
39
46
|
const ssn = json.ContactCollection[0].USSSN;
|
|
40
47
|
input.value = `${ssn.substring(0, 3)}-${ssn.substring(3, 5)}-${ssn.substring(5, 9)}`;
|
|
41
|
-
this.renderRoot.querySelectorAll(
|
|
42
|
-
i.className =
|
|
48
|
+
this.renderRoot.querySelectorAll(`${this.selectorImage}`).forEach(i => {
|
|
49
|
+
i.className = `${this.imageClassHide}`;
|
|
43
50
|
});
|
|
44
51
|
}
|
|
45
52
|
}
|
|
46
53
|
});
|
|
47
54
|
}
|
|
48
55
|
else {
|
|
49
|
-
this.renderRoot.querySelectorAll(
|
|
56
|
+
this.renderRoot.querySelectorAll(`${this.selectorInput}`).forEach(input => {
|
|
50
57
|
if (input instanceof HTMLInputElement)
|
|
51
58
|
input.value = `${this.ssn}`;
|
|
52
|
-
this.renderRoot.querySelectorAll(
|
|
53
|
-
i.className =
|
|
59
|
+
this.renderRoot.querySelectorAll(`${this.selectorImage}`).forEach(i => {
|
|
60
|
+
i.className = `${this.imageClassShow}`;
|
|
54
61
|
});
|
|
55
62
|
});
|
|
56
63
|
}
|
|
57
64
|
}
|
|
58
65
|
render() {
|
|
59
66
|
return html `<slot>
|
|
60
|
-
<div class="
|
|
67
|
+
<div class="${this.divClass}">
|
|
61
68
|
<input type="text" ?disabled=${this.disabled} class="${this.formControlSmallClass}" name="${this.name}" value="${this.ssn}"/>
|
|
62
|
-
<span @click="${this.toggleSSN}" class="
|
|
69
|
+
<span @click="${this.toggleSSN}" class="${this.spanClass}"><i class="${this.imageClassShow}"></i></span>
|
|
63
70
|
</div>
|
|
64
71
|
</slot>`;
|
|
65
72
|
}
|
|
@@ -76,22 +83,50 @@ __decorate([
|
|
|
76
83
|
property({ type: Boolean }),
|
|
77
84
|
__metadata("design:type", Object)
|
|
78
85
|
], QboSSN.prototype, "disabled", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
property({ type: String }),
|
|
88
|
+
__metadata("design:type", Object)
|
|
89
|
+
], QboSSN.prototype, "divClass", void 0);
|
|
79
90
|
__decorate([
|
|
80
91
|
property({ type: String }),
|
|
81
92
|
__metadata("design:type", Object)
|
|
82
93
|
], QboSSN.prototype, "formControlSmallClass", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
property({ type: String }),
|
|
96
|
+
__metadata("design:type", Object)
|
|
97
|
+
], QboSSN.prototype, "imageClassShow", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
property({ type: String }),
|
|
100
|
+
__metadata("design:type", Object)
|
|
101
|
+
], QboSSN.prototype, "imageClassHide", void 0);
|
|
83
102
|
__decorate([
|
|
84
103
|
property({ type: String }),
|
|
85
104
|
__metadata("design:type", Object)
|
|
86
105
|
], QboSSN.prototype, "name", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
property({ type: String }),
|
|
108
|
+
__metadata("design:type", Object)
|
|
109
|
+
], QboSSN.prototype, "selectorImage", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
property({ type: String }),
|
|
112
|
+
__metadata("design:type", Object)
|
|
113
|
+
], QboSSN.prototype, "selectorInput", void 0);
|
|
87
114
|
__decorate([
|
|
88
115
|
property({ type: Boolean }),
|
|
89
116
|
__metadata("design:type", Object)
|
|
90
117
|
], QboSSN.prototype, "show", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
property({ type: String }),
|
|
120
|
+
__metadata("design:type", Object)
|
|
121
|
+
], QboSSN.prototype, "spanClass", void 0);
|
|
91
122
|
__decorate([
|
|
92
123
|
property({ type: String }),
|
|
93
124
|
__metadata("design:type", Object)
|
|
94
125
|
], QboSSN.prototype, "ssn", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
property(),
|
|
128
|
+
__metadata("design:type", Object)
|
|
129
|
+
], QboSSN.prototype, "type", void 0);
|
|
95
130
|
__decorate([
|
|
96
131
|
property({ type: String }),
|
|
97
132
|
__metadata("design:type", Object)
|
package/src/qbo/qbo-ssn.ts
CHANGED
|
@@ -16,18 +16,39 @@ export class QboSSN extends LitElement {
|
|
|
16
16
|
@property({ type: Boolean })
|
|
17
17
|
disabled = true;
|
|
18
18
|
|
|
19
|
+
@property({ type: String })
|
|
20
|
+
divClass: String | null = 'qbo-input-group';
|
|
21
|
+
|
|
19
22
|
@property({ type: String })
|
|
20
23
|
formControlSmallClass: String | null = 'qbo-sm';
|
|
21
24
|
|
|
25
|
+
@property({ type: String })
|
|
26
|
+
imageClassShow: String | null = 'qbo-icon-eye';
|
|
27
|
+
|
|
28
|
+
@property({ type: String })
|
|
29
|
+
imageClassHide: String | null = 'qbo-icon-eye-slash';
|
|
30
|
+
|
|
22
31
|
@property({ type: String })
|
|
23
32
|
name: String | null = 'USSSN';
|
|
24
33
|
|
|
34
|
+
@property({ type: String })
|
|
35
|
+
selectorImage: String | null = 'i';
|
|
36
|
+
|
|
37
|
+
@property({ type: String })
|
|
38
|
+
selectorInput: String | null = 'input';
|
|
39
|
+
|
|
25
40
|
@property({ type: Boolean })
|
|
26
41
|
show = false;
|
|
27
42
|
|
|
43
|
+
@property({ type: String })
|
|
44
|
+
spanClass: String | null = 'qbo-input-group-text qbo-pointer';
|
|
45
|
+
|
|
28
46
|
@property({ type: String })
|
|
29
47
|
ssn: String | null = null;
|
|
30
48
|
|
|
49
|
+
@property()
|
|
50
|
+
type: string | null = 'defaultLayout';
|
|
51
|
+
|
|
31
52
|
@property({ type: String })
|
|
32
53
|
url: String | null = 'contact/UnmaskSSN';
|
|
33
54
|
|
|
@@ -46,24 +67,24 @@ export class QboSSN extends LitElement {
|
|
|
46
67
|
? services.container.resolve<IApiService>(this.apiEndpoint) : new RestApiService(this.apiEndpoint);
|
|
47
68
|
const json = await service.fetch(`${this.url}`, { ID: `${this.contactId}` });
|
|
48
69
|
|
|
49
|
-
this.renderRoot.querySelectorAll(
|
|
70
|
+
this.renderRoot.querySelectorAll(`${this.selectorInput}`).forEach(input => {
|
|
50
71
|
if (input instanceof HTMLInputElement) {
|
|
51
72
|
if (json?.ContactCollection?.length > 0 && json.ContactCollection[0].USSSN != null && json.ContactCollection[0].USSSN.length == 9) {
|
|
52
73
|
const ssn = json.ContactCollection[0].USSSN;
|
|
53
74
|
input.value = `${ssn.substring(0, 3)}-${ssn.substring(3, 5)}-${ssn.substring(5, 9)}`;
|
|
54
75
|
|
|
55
|
-
this.renderRoot.querySelectorAll(
|
|
56
|
-
i.className =
|
|
76
|
+
this.renderRoot.querySelectorAll(`${this.selectorImage}`).forEach(i => {
|
|
77
|
+
i.className = `${this.imageClassHide}`;
|
|
57
78
|
});
|
|
58
79
|
}
|
|
59
80
|
}
|
|
60
81
|
});
|
|
61
82
|
} else {
|
|
62
|
-
this.renderRoot.querySelectorAll(
|
|
83
|
+
this.renderRoot.querySelectorAll(`${this.selectorInput}`).forEach(input => {
|
|
63
84
|
if (input instanceof HTMLInputElement) input.value = `${this.ssn}`;
|
|
64
85
|
|
|
65
|
-
this.renderRoot.querySelectorAll(
|
|
66
|
-
i.className =
|
|
86
|
+
this.renderRoot.querySelectorAll(`${this.selectorImage}`).forEach(i => {
|
|
87
|
+
i.className = `${this.imageClassShow}`;
|
|
67
88
|
});
|
|
68
89
|
});
|
|
69
90
|
}
|
|
@@ -71,9 +92,9 @@ export class QboSSN extends LitElement {
|
|
|
71
92
|
|
|
72
93
|
render() {
|
|
73
94
|
return html`<slot>
|
|
74
|
-
<div class="
|
|
95
|
+
<div class="${this.divClass}">
|
|
75
96
|
<input type="text" ?disabled=${this.disabled} class="${this.formControlSmallClass}" name="${this.name}" value="${this.ssn}"/>
|
|
76
|
-
<span @click="${this.toggleSSN}" class="
|
|
97
|
+
<span @click="${this.toggleSSN}" class="${this.spanClass}"><i class="${this.imageClassShow}"></i></span>
|
|
77
98
|
</div>
|
|
78
99
|
</slot>`;
|
|
79
100
|
}
|