@jooler/inputs 0.0.54 → 0.0.56
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/esm2022/lib/ag-grid-select-mixin.mjs +1 -1
- package/esm2022/lib/choose-general-item/choose-general-item.component.mjs +75 -14
- package/esm2022/lib/choose-general-item/choose-object-basic-template-label-field.enum.mjs +1 -1
- package/esm2022/lib/choose-general-item/choose-object-basic-template.model.mjs +1 -1
- package/esm2022/lib/choose-general-item/choose-object-template-type.enum.mjs +1 -1
- package/esm2022/lib/choose-general-item-renderer/choose-general-item-renderer-change-event.interface.mjs +2 -0
- package/esm2022/lib/choose-general-item-renderer/choose-general-item-renderer-validation-type.enum.mjs +6 -0
- package/esm2022/lib/choose-general-item-renderer/choose-general-item-renderer.component.mjs +112 -18
- package/esm2022/lib/dictionary-to-params-converter.mjs +1 -1
- package/esm2022/lib/enum-helper-functions.mjs +15 -27
- package/esm2022/lib/enum-helper.model.mjs +1 -1
- package/esm2022/lib/formcontrol-validation-msg-for-ng-select.directive.mjs +126 -0
- package/esm2022/lib/inputs.module.mjs +21 -15
- package/esm2022/lib/models/choose-item-full-object-control-config.enum.mjs +1 -1
- package/esm2022/lib/tooltip-msg-error/tooltip-message-type.enum.mjs +8 -0
- package/esm2022/lib/tooltip-msg-error/tooltip-msg-error.component.mjs +213 -0
- package/esm2022/public-api.mjs +16 -12
- package/fesm2022/inputs.mjs +1056 -853
- package/fesm2022/inputs.mjs.map +1 -1
- package/lib/choose-general-item/choose-general-item.component.d.ts +8 -3
- package/lib/choose-general-item-renderer/choose-general-item-renderer-change-event.interface.d.ts +9 -0
- package/lib/choose-general-item-renderer/choose-general-item-renderer-validation-type.enum.d.ts +4 -0
- package/lib/choose-general-item-renderer/choose-general-item-renderer.component.d.ts +19 -4
- package/lib/formcontrol-validation-msg-for-ng-select.directive.d.ts +23 -0
- package/lib/inputs.module.d.ts +9 -7
- package/lib/tooltip-msg-error/tooltip-message-type.enum.d.ts +6 -0
- package/lib/tooltip-msg-error/tooltip-msg-error.component.d.ts +49 -0
- package/package.json +2 -2
- package/public-api.d.ts +15 -11
- package/esm2022/lib/custom-colors/bom-production-type.enum.mjs +0 -11
- package/esm2022/lib/custom-colors/enum-custom-color-mapping.mjs +0 -32
- package/esm2022/lib/custom-colors/enum-custom-colors.mjs +0 -21
- package/esm2022/lib/custom-colors/sales-order-status.enum.mjs +0 -27
- package/esm2022/lib/enum-custom-label-mapping.mjs +0 -32
- package/esm2022/lib/enum-models/bill-status.model.mjs +0 -25
- package/esm2022/lib/enum-models/charge-level.enum.mjs +0 -6
- package/esm2022/lib/enum-models/custom-order-request-status.enum.mjs +0 -29
- package/esm2022/lib/enum-models/invitation-status.model.mjs +0 -15
- package/esm2022/lib/enum-models/invoice-status.model.mjs +0 -15
- package/esm2022/lib/enum-models/locker-transfer-status.enum.mjs +0 -11
- package/esm2022/lib/enum-models/priority.model.mjs +0 -13
- package/esm2022/lib/enum-models/quotation-status.model.mjs +0 -19
- package/esm2022/lib/enum-models/request-status.model.mjs +0 -15
- package/esm2022/lib/enum-string-class-map.mjs +0 -26
- package/esm2022/lib/json/enum-custom-label-mappings.json +0 -10
- package/lib/custom-colors/bom-production-type.enum.d.ts +0 -5
- package/lib/custom-colors/enum-custom-color-mapping.d.ts +0 -11
- package/lib/custom-colors/enum-custom-colors.d.ts +0 -2
- package/lib/custom-colors/sales-order-status.enum.d.ts +0 -13
- package/lib/enum-custom-label-mapping.d.ts +0 -7
- package/lib/enum-models/bill-status.model.d.ts +0 -12
- package/lib/enum-models/charge-level.enum.d.ts +0 -4
- package/lib/enum-models/custom-order-request-status.enum.d.ts +0 -14
- package/lib/enum-models/invitation-status.model.d.ts +0 -7
- package/lib/enum-models/invoice-status.model.d.ts +0 -13
- package/lib/enum-models/locker-transfer-status.enum.d.ts +0 -5
- package/lib/enum-models/priority.model.d.ts +0 -6
- package/lib/enum-models/quotation-status.model.d.ts +0 -9
- package/lib/enum-models/request-status.model.d.ts +0 -7
- package/lib/enum-string-class-map.d.ts +0 -3
package/fesm2022/inputs.mjs
CHANGED
|
@@ -1,277 +1,97 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, forwardRef, Component, Input, Output, Injectable, Inject, ContentChild,
|
|
3
|
-
import * as i2$1 from '@angular/forms';
|
|
4
|
-
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, NgModel, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
2
|
+
import { EventEmitter, forwardRef, Component, Input, Output, Injectable, Inject, ContentChild, HostListener, Directive, Pipe, NgModule } from '@angular/core';
|
|
5
3
|
import * as i1 from '@angular/common';
|
|
6
4
|
import { CurrencyPipe, DecimalPipe, CommonModule } from '@angular/common';
|
|
5
|
+
import * as i2$1 from '@angular/forms';
|
|
6
|
+
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, NgModel, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
7
|
import * as i2 from '@ng-select/ng-select';
|
|
8
8
|
import { NgSelectModule } from '@ng-select/ng-select';
|
|
9
9
|
import * as i4 from '@jooler/shared-general-components';
|
|
10
10
|
import { ChipInputType, SharedGeneralComponentsModule } from '@jooler/shared-general-components';
|
|
11
|
-
import
|
|
12
|
-
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
11
|
+
import { Subject, tap, switchMap, filter } from 'rxjs';
|
|
13
12
|
import * as i1$1 from '@angular/common/http';
|
|
14
13
|
import { HttpParams, HttpHeaders } from '@angular/common/http';
|
|
15
14
|
import * as i2$3 from '@angular/material/dialog';
|
|
16
15
|
import * as i6 from '@angular/material/card';
|
|
17
16
|
import * as i1$2 from '@angular/router';
|
|
18
17
|
import * as i3 from '@angular/material/menu';
|
|
18
|
+
import * as i2$2 from '@fortawesome/angular-fontawesome';
|
|
19
|
+
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
19
20
|
import * as i3$1 from '@angular/material/button';
|
|
20
21
|
import { AppMaterialModule } from '@jooler/app-material';
|
|
21
22
|
|
|
22
|
-
class
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
BOMProductionType[BOMProductionType["PARTIALLY_MANUFACTURED_IN_HOUSE"] = 1] = "PARTIALLY_MANUFACTURED_IN_HOUSE";
|
|
46
|
-
})(BOMProductionType || (BOMProductionType = {}));
|
|
47
|
-
const bomProductionTypeColors = Object.values({
|
|
48
|
-
[BOMProductionType.MANUFACTURED_IN_HOUSE]: PrimaryColors.$primaryLimeGreenColor,
|
|
49
|
-
[BOMProductionType.PARTIALLY_MANUFACTURED_IN_HOUSE]: PrimaryColors.$primaryBlueColor,
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
var SalesOrderStatus;
|
|
53
|
-
(function (SalesOrderStatus) {
|
|
54
|
-
SalesOrderStatus[SalesOrderStatus["DRAFT"] = 0] = "DRAFT";
|
|
55
|
-
SalesOrderStatus[SalesOrderStatus["PENDING_APPROVAL"] = 1] = "PENDING_APPROVAL";
|
|
56
|
-
SalesOrderStatus[SalesOrderStatus["APPROVED"] = 2] = "APPROVED";
|
|
57
|
-
SalesOrderStatus[SalesOrderStatus["TO_DELIVER_AND_TO_BILL"] = 3] = "TO_DELIVER_AND_TO_BILL";
|
|
58
|
-
SalesOrderStatus[SalesOrderStatus["TO_BILL"] = 4] = "TO_BILL";
|
|
59
|
-
SalesOrderStatus[SalesOrderStatus["PARTIALLY_DELIVERED_AND_PARTIALLY_BILLED"] = 5] = "PARTIALLY_DELIVERED_AND_PARTIALLY_BILLED";
|
|
60
|
-
SalesOrderStatus[SalesOrderStatus["PARTIALLY_DELIVERED_AND_TO_BILL"] = 6] = "PARTIALLY_DELIVERED_AND_TO_BILL";
|
|
61
|
-
SalesOrderStatus[SalesOrderStatus["COMPLETED"] = 7] = "COMPLETED";
|
|
62
|
-
SalesOrderStatus[SalesOrderStatus["CANCELED"] = 8] = "CANCELED";
|
|
63
|
-
SalesOrderStatus[SalesOrderStatus["CLOSED"] = 9] = "CLOSED";
|
|
64
|
-
})(SalesOrderStatus || (SalesOrderStatus = {}));
|
|
65
|
-
const salesOrderStatusColors = Object.values({
|
|
66
|
-
[SalesOrderStatus.DRAFT]: PrimaryColors.$primaryBlueColor,
|
|
67
|
-
[SalesOrderStatus.PENDING_APPROVAL]: PrimaryColors.$primaryYellowColor,
|
|
68
|
-
[SalesOrderStatus.APPROVED]: PrimaryColors.$primaryTealColor,
|
|
69
|
-
[SalesOrderStatus.TO_DELIVER_AND_TO_BILL]: PrimaryColors.$primaryPurpleColor,
|
|
70
|
-
[SalesOrderStatus.TO_BILL]: PrimaryColors.$primaryPinkColor,
|
|
71
|
-
[SalesOrderStatus.PARTIALLY_DELIVERED_AND_PARTIALLY_BILLED]: PrimaryColors.$primaryOrangeColor,
|
|
72
|
-
[SalesOrderStatus.PARTIALLY_DELIVERED_AND_TO_BILL]: PrimaryColors.$primaryNavyBlueColor,
|
|
73
|
-
[SalesOrderStatus.COMPLETED]: PrimaryColors.$primaryLimeGreenColor,
|
|
74
|
-
[SalesOrderStatus.CANCELED]: PrimaryColors.$primaryGrayColor,
|
|
75
|
-
[SalesOrderStatus.CLOSED]: PrimaryColors.$primaryCarbonColor,
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
var BillStatus;
|
|
79
|
-
(function (BillStatus) {
|
|
80
|
-
BillStatus[BillStatus["DRAFT"] = 0] = "DRAFT";
|
|
81
|
-
BillStatus[BillStatus["RECEIVED"] = 1] = "RECEIVED";
|
|
82
|
-
BillStatus[BillStatus["PAID"] = 2] = "PAID";
|
|
83
|
-
BillStatus[BillStatus["CANCELLED"] = 3] = "CANCELLED";
|
|
84
|
-
BillStatus[BillStatus["RETURN"] = 4] = "RETURN";
|
|
85
|
-
BillStatus[BillStatus["DEBIT_NOTE_ISSUED"] = 5] = "DEBIT_NOTE_ISSUED";
|
|
86
|
-
BillStatus[BillStatus["PARTLY_PAID"] = 6] = "PARTLY_PAID";
|
|
87
|
-
BillStatus[BillStatus["UNPAID"] = 7] = "UNPAID";
|
|
88
|
-
BillStatus[BillStatus["OVERDUE"] = 8] = "OVERDUE";
|
|
89
|
-
})(BillStatus || (BillStatus = {}));
|
|
90
|
-
const billStatusColors = Object.values({
|
|
91
|
-
[BillStatus.DRAFT]: PrimaryColors.$primaryBlueColor,
|
|
92
|
-
[BillStatus.RECEIVED]: PrimaryColors.$primaryTealColor,
|
|
93
|
-
[BillStatus.PAID]: PrimaryColors.$primaryPurpleColor,
|
|
94
|
-
[BillStatus.CANCELLED]: PrimaryColors.$primaryGrayColor,
|
|
95
|
-
[BillStatus.RETURN]: PrimaryColors.$primaryPinkColor,
|
|
96
|
-
[BillStatus.DEBIT_NOTE_ISSUED]: PrimaryColors.$primaryNavyBlueColor,
|
|
97
|
-
[BillStatus.PARTLY_PAID]: PrimaryColors.$primaryYellowColor,
|
|
98
|
-
[BillStatus.UNPAID]: PrimaryColors.$primaryRedColor,
|
|
99
|
-
[BillStatus.OVERDUE]: PrimaryColors.$primaryOrangeColor,
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
var ChargeLevel;
|
|
103
|
-
(function (ChargeLevel) {
|
|
104
|
-
ChargeLevel[ChargeLevel["MAIN"] = 0] = "MAIN";
|
|
105
|
-
ChargeLevel[ChargeLevel["LINE"] = 1] = "LINE";
|
|
106
|
-
})(ChargeLevel || (ChargeLevel = {}));
|
|
107
|
-
|
|
108
|
-
var CustomOrderRequestStatus;
|
|
109
|
-
(function (CustomOrderRequestStatus) {
|
|
110
|
-
CustomOrderRequestStatus[CustomOrderRequestStatus["DRAFT"] = 0] = "DRAFT";
|
|
111
|
-
CustomOrderRequestStatus[CustomOrderRequestStatus["SENT"] = 1] = "SENT";
|
|
112
|
-
CustomOrderRequestStatus[CustomOrderRequestStatus["RESPONDED"] = 2] = "RESPONDED";
|
|
113
|
-
CustomOrderRequestStatus[CustomOrderRequestStatus["REJECTED"] = 3] = "REJECTED";
|
|
114
|
-
CustomOrderRequestStatus[CustomOrderRequestStatus["CANCELED"] = 4] = "CANCELED";
|
|
115
|
-
CustomOrderRequestStatus[CustomOrderRequestStatus["DECLINED"] = 5] = "DECLINED";
|
|
116
|
-
CustomOrderRequestStatus[CustomOrderRequestStatus["ACCEPTED"] = 6] = "ACCEPTED";
|
|
117
|
-
CustomOrderRequestStatus[CustomOrderRequestStatus["ORDER_CONFIRMED"] = 7] = "ORDER_CONFIRMED";
|
|
118
|
-
CustomOrderRequestStatus[CustomOrderRequestStatus["DELIVERED"] = 8] = "DELIVERED";
|
|
119
|
-
CustomOrderRequestStatus[CustomOrderRequestStatus["ON_HOLD"] = 9] = "ON_HOLD";
|
|
120
|
-
CustomOrderRequestStatus[CustomOrderRequestStatus["IN_PRODUCTION"] = 10] = "IN_PRODUCTION";
|
|
121
|
-
})(CustomOrderRequestStatus || (CustomOrderRequestStatus = {}));
|
|
122
|
-
const customOrderRequestStatusColors = Object.values({
|
|
123
|
-
[CustomOrderRequestStatus.DRAFT]: PrimaryColors.$primaryBlueColor,
|
|
124
|
-
[CustomOrderRequestStatus.SENT]: PrimaryColors.$primaryNavyBlueColor,
|
|
125
|
-
[CustomOrderRequestStatus.RESPONDED]: PrimaryColors.$primaryPurpleColor,
|
|
126
|
-
[CustomOrderRequestStatus.REJECTED]: PrimaryColors.$primaryRedColor,
|
|
127
|
-
[CustomOrderRequestStatus.CANCELED]: PrimaryColors.$primaryGrayColor,
|
|
128
|
-
[CustomOrderRequestStatus.DECLINED]: PrimaryColors.$primaryPinkColor,
|
|
129
|
-
[CustomOrderRequestStatus.ACCEPTED]: PrimaryColors.$primaryPurpleColor,
|
|
130
|
-
[CustomOrderRequestStatus.ORDER_CONFIRMED]: PrimaryColors.$primaryDarkPurpleColor,
|
|
131
|
-
[CustomOrderRequestStatus.IN_PRODUCTION]: PrimaryColors.$primaryLimeGreenColor,
|
|
132
|
-
[CustomOrderRequestStatus.DELIVERED]: PrimaryColors.$primaryTealColor,
|
|
133
|
-
[CustomOrderRequestStatus.ON_HOLD]: PrimaryColors.$primaryOrangeColor,
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
var InvitationStatus;
|
|
137
|
-
(function (InvitationStatus) {
|
|
138
|
-
InvitationStatus[InvitationStatus["PENDING"] = 0] = "PENDING";
|
|
139
|
-
InvitationStatus[InvitationStatus["ACCEPTED"] = 1] = "ACCEPTED";
|
|
140
|
-
InvitationStatus[InvitationStatus["EXPIRED"] = 2] = "EXPIRED";
|
|
141
|
-
InvitationStatus[InvitationStatus["CANCELED"] = 3] = "CANCELED";
|
|
142
|
-
})(InvitationStatus || (InvitationStatus = {}));
|
|
143
|
-
const invitationStatusColors = Object.values({
|
|
144
|
-
[InvitationStatus.PENDING]: PrimaryColors.$primaryYellowColor,
|
|
145
|
-
[InvitationStatus.ACCEPTED]: PrimaryColors.$primaryTealColor,
|
|
146
|
-
[InvitationStatus.EXPIRED]: PrimaryColors.$primaryGrayColor,
|
|
147
|
-
[InvitationStatus.CANCELED]: PrimaryColors.$primaryPinkColor,
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
var InvoiceStatus;
|
|
151
|
-
(function (InvoiceStatus) {
|
|
152
|
-
InvoiceStatus[InvoiceStatus["DRAFT"] = 0] = "DRAFT";
|
|
153
|
-
InvoiceStatus[InvoiceStatus["SUBMITTED"] = 1] = "SUBMITTED";
|
|
154
|
-
InvoiceStatus[InvoiceStatus["PAID"] = 2] = "PAID";
|
|
155
|
-
InvoiceStatus[InvoiceStatus["UNPAID"] = 3] = "UNPAID";
|
|
156
|
-
InvoiceStatus[InvoiceStatus["PARTLY_PAID"] = 4] = "PARTLY_PAID";
|
|
157
|
-
InvoiceStatus[InvoiceStatus["CANCELLED"] = 5] = "CANCELLED";
|
|
158
|
-
InvoiceStatus[InvoiceStatus["OVERDUE"] = 6] = "OVERDUE";
|
|
159
|
-
InvoiceStatus[InvoiceStatus["CREDIT_NOTE_ISSUED"] = 7] = "CREDIT_NOTE_ISSUED";
|
|
160
|
-
InvoiceStatus[InvoiceStatus["RETURN"] = 8] = "RETURN";
|
|
161
|
-
InvoiceStatus[InvoiceStatus["UNPAID_AND_DISCOUNTED"] = 9] = "UNPAID_AND_DISCOUNTED";
|
|
162
|
-
InvoiceStatus[InvoiceStatus["OVERDUE_AND_DISCOUNTED"] = 10] = "OVERDUE_AND_DISCOUNTED";
|
|
163
|
-
})(InvoiceStatus || (InvoiceStatus = {}));
|
|
164
|
-
|
|
165
|
-
var LockerTransferStatus;
|
|
166
|
-
(function (LockerTransferStatus) {
|
|
167
|
-
LockerTransferStatus[LockerTransferStatus["DRAFT"] = 0] = "DRAFT";
|
|
168
|
-
LockerTransferStatus[LockerTransferStatus["POSTED"] = 1] = "POSTED";
|
|
169
|
-
})(LockerTransferStatus || (LockerTransferStatus = {}));
|
|
170
|
-
const lockerTransferStatusColors = Object.values({
|
|
171
|
-
[LockerTransferStatus.DRAFT]: PrimaryColors.$primaryBlueColor,
|
|
172
|
-
[LockerTransferStatus.POSTED]: PrimaryColors.$primaryTealColor,
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
var Priority;
|
|
176
|
-
(function (Priority) {
|
|
177
|
-
Priority[Priority["LOW"] = 0] = "LOW";
|
|
178
|
-
Priority[Priority["NORMAL"] = 1] = "NORMAL";
|
|
179
|
-
Priority[Priority["HIGH"] = 2] = "HIGH";
|
|
180
|
-
})(Priority || (Priority = {}));
|
|
181
|
-
const priorityColors = Object.values({
|
|
182
|
-
[Priority.LOW]: PrimaryColors.$primaryTealColor,
|
|
183
|
-
[Priority.NORMAL]: PrimaryColors.$primaryOrangeColor,
|
|
184
|
-
[Priority.HIGH]: PrimaryColors.$primaryRedColor,
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
var QuotationStatus;
|
|
188
|
-
(function (QuotationStatus) {
|
|
189
|
-
QuotationStatus[QuotationStatus["CREATED"] = 0] = "CREATED";
|
|
190
|
-
QuotationStatus[QuotationStatus["SENT"] = 1] = "SENT";
|
|
191
|
-
QuotationStatus[QuotationStatus["REJECTED"] = 2] = "REJECTED";
|
|
192
|
-
QuotationStatus[QuotationStatus["CANCELED"] = 3] = "CANCELED";
|
|
193
|
-
QuotationStatus[QuotationStatus["ACCEPTED"] = 4] = "ACCEPTED";
|
|
194
|
-
QuotationStatus[QuotationStatus["EXPIRED"] = 5] = "EXPIRED";
|
|
195
|
-
})(QuotationStatus || (QuotationStatus = {}));
|
|
196
|
-
const quotationStatusColors = Object.values({
|
|
197
|
-
[QuotationStatus.CREATED]: PrimaryColors.$primaryLimeGreenColor,
|
|
198
|
-
[QuotationStatus.SENT]: PrimaryColors.$primaryNavyBlueColor,
|
|
199
|
-
[QuotationStatus.REJECTED]: PrimaryColors.$primaryOrangeRedColor,
|
|
200
|
-
[QuotationStatus.CANCELED]: PrimaryColors.$primaryOrangeColor,
|
|
201
|
-
[QuotationStatus.ACCEPTED]: PrimaryColors.$primaryTealColor,
|
|
202
|
-
[QuotationStatus.EXPIRED]: PrimaryColors.$primaryGrayColor,
|
|
203
|
-
});
|
|
204
|
-
|
|
205
|
-
var RequestStatus;
|
|
206
|
-
(function (RequestStatus) {
|
|
207
|
-
RequestStatus[RequestStatus["PENDING"] = 0] = "PENDING";
|
|
208
|
-
RequestStatus[RequestStatus["REJECTED"] = 1] = "REJECTED";
|
|
209
|
-
RequestStatus[RequestStatus["APPROVED"] = 2] = "APPROVED";
|
|
210
|
-
RequestStatus[RequestStatus["CANCELED"] = 3] = "CANCELED";
|
|
211
|
-
})(RequestStatus || (RequestStatus = {}));
|
|
212
|
-
const requestStatusColors = Object.values({
|
|
213
|
-
[RequestStatus.PENDING]: PrimaryColors.$primaryYellowColor,
|
|
214
|
-
[RequestStatus.REJECTED]: PrimaryColors.$primaryRedColor,
|
|
215
|
-
[RequestStatus.APPROVED]: PrimaryColors.$primaryTealColor,
|
|
216
|
-
[RequestStatus.CANCELED]: PrimaryColors.$primaryGrayColor,
|
|
217
|
-
});
|
|
218
|
-
|
|
219
|
-
// Enum Class Mapping
|
|
220
|
-
const enumClassMap = {
|
|
221
|
-
BOMProductionType: BOMProductionType,
|
|
222
|
-
InvoiceStatus: InvoiceStatus,
|
|
223
|
-
CustomOrderRequestStatus: CustomOrderRequestStatus,
|
|
224
|
-
Priority: Priority,
|
|
225
|
-
QuotationStatus: QuotationStatus,
|
|
226
|
-
LockerTransferStatus: LockerTransferStatus,
|
|
227
|
-
BillStatus: BillStatus,
|
|
228
|
-
SalesOrderStatus: SalesOrderStatus,
|
|
229
|
-
RequestStatus: RequestStatus,
|
|
230
|
-
InvitationStatus: InvitationStatus,
|
|
231
|
-
ChargeLevel: ChargeLevel,
|
|
232
|
-
};
|
|
233
|
-
|
|
234
|
-
const enumCustomColors = [
|
|
235
|
-
{ enumClass: 'CustomOrderRequestStatus', colors: customOrderRequestStatusColors },
|
|
236
|
-
{ enumClass: 'Priority', colors: priorityColors },
|
|
237
|
-
{ enumClass: 'QuotationStatus', colors: quotationStatusColors },
|
|
238
|
-
{ enumClass: 'LockerTransferStatus', colors: lockerTransferStatusColors },
|
|
239
|
-
{ enumClass: 'BillStatus', colors: billStatusColors },
|
|
240
|
-
{ enumClass: 'SalesOrderStatus', colors: salesOrderStatusColors },
|
|
241
|
-
{ enumClass: 'RequestStatus', colors: requestStatusColors },
|
|
242
|
-
{ enumClass: 'InvitationStatus', colors: invitationStatusColors },
|
|
243
|
-
{ enumClass: 'BOMProductionType', colors: bomProductionTypeColors },
|
|
244
|
-
];
|
|
245
|
-
|
|
246
|
-
class EnumCustomColorMapping {
|
|
247
|
-
enumClass;
|
|
248
|
-
colors;
|
|
249
|
-
constructor(enumClass, colors) {
|
|
250
|
-
this.enumClass = enumClass;
|
|
251
|
-
if (this.validateColors(enumClass, colors)) {
|
|
252
|
-
this.colors = colors;
|
|
23
|
+
class AgGridSelectMixin {
|
|
24
|
+
params;
|
|
25
|
+
key;
|
|
26
|
+
value;
|
|
27
|
+
rowId;
|
|
28
|
+
isEdit;
|
|
29
|
+
index;
|
|
30
|
+
arrayKey = 'entries';
|
|
31
|
+
rowLevelFG;
|
|
32
|
+
width;
|
|
33
|
+
selectedItemId;
|
|
34
|
+
agInit(params) {
|
|
35
|
+
this.initializeRenderer(params);
|
|
36
|
+
}
|
|
37
|
+
initializeRenderer(params) {
|
|
38
|
+
this.params = params;
|
|
39
|
+
this.width = params.width;
|
|
40
|
+
this.key = params.context.createKey(params.columnApi, params.column);
|
|
41
|
+
this.value = params.value;
|
|
42
|
+
this.rowId = params.node.id;
|
|
43
|
+
this.index = params.node.rowIndex;
|
|
44
|
+
if (params.context.arrayKey) {
|
|
45
|
+
this.arrayKey = params.context.arrayKey;
|
|
253
46
|
}
|
|
254
|
-
|
|
255
|
-
|
|
47
|
+
this.setRowLevelFG();
|
|
48
|
+
}
|
|
49
|
+
setRowLevelFG() {
|
|
50
|
+
this.index = this.params.node.rowIndex;
|
|
51
|
+
let tableFG = this.params.context.formGroup;
|
|
52
|
+
let fa = tableFG.get(this.arrayKey);
|
|
53
|
+
let rowLevelFG = fa.at(this.index);
|
|
54
|
+
this.rowLevelFG = rowLevelFG;
|
|
55
|
+
}
|
|
56
|
+
getFormControl() {
|
|
57
|
+
let fc = this.rowLevelFG.get(this.key);
|
|
58
|
+
return fc;
|
|
59
|
+
}
|
|
60
|
+
updateValue(params, value) {
|
|
61
|
+
this.setRowLevelFG();
|
|
62
|
+
this.getFormControl().setValue(value);
|
|
63
|
+
let rowNode = params.node;
|
|
64
|
+
rowNode.setDataValue(this.key, value);
|
|
65
|
+
}
|
|
66
|
+
// $event here is an object.
|
|
67
|
+
onSelection($event) {
|
|
68
|
+
this.selectedItemId = $event?.id;
|
|
69
|
+
this.updateValue(this.params, $event?.id);
|
|
70
|
+
if (this.params.onSelection instanceof Function) {
|
|
71
|
+
const params = {
|
|
72
|
+
object: $event,
|
|
73
|
+
rowData: this.params.node.data,
|
|
74
|
+
value: $event.id,
|
|
75
|
+
rowNode: this.params.node,
|
|
76
|
+
};
|
|
77
|
+
this.params.onSelection(params);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
onEnumSelected($event) {
|
|
81
|
+
this.updateValue(this.params, $event);
|
|
82
|
+
if (this.params.onSelection instanceof Function) {
|
|
83
|
+
const params = {
|
|
84
|
+
rowData: this.params.node.data,
|
|
85
|
+
value: $event,
|
|
86
|
+
rowNode: this.params.node,
|
|
87
|
+
};
|
|
88
|
+
this.params.onSelection(params);
|
|
256
89
|
}
|
|
257
90
|
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
const enumValues = Object.keys(enumClass).filter(key => isNaN(Number(key))).length;
|
|
261
|
-
return colors.length === enumValues;
|
|
91
|
+
refresh(param) {
|
|
92
|
+
return false;
|
|
262
93
|
}
|
|
263
94
|
}
|
|
264
|
-
// Function to create EnumCustomColorMapping instances from JSON array
|
|
265
|
-
function createEnumCustomColorMappings(mappings) {
|
|
266
|
-
return mappings.map(json => {
|
|
267
|
-
const enumClass = enumClassMap[json.enumClass];
|
|
268
|
-
if (!enumClass) {
|
|
269
|
-
throw new Error(`Enum class "${json.enumClass}" not found.`);
|
|
270
|
-
}
|
|
271
|
-
return new EnumCustomColorMapping(enumClass, json.colors);
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
const enumCustomColorMappings = createEnumCustomColorMappings(enumCustomColors);
|
|
275
95
|
|
|
276
96
|
class CustomTheme {
|
|
277
97
|
static $joolerBlue = [
|
|
@@ -377,53 +197,6 @@ class CustomTheme {
|
|
|
377
197
|
];
|
|
378
198
|
}
|
|
379
199
|
|
|
380
|
-
var enumCustomLabelMappingsJSON = [
|
|
381
|
-
{
|
|
382
|
-
enumClass: "BOMProductionType",
|
|
383
|
-
labels: [
|
|
384
|
-
"Manufactured In-House",
|
|
385
|
-
"Partially Manufactured In-House"
|
|
386
|
-
]
|
|
387
|
-
},
|
|
388
|
-
{
|
|
389
|
-
enumClass: "ChargeLevel",
|
|
390
|
-
labels: [
|
|
391
|
-
"Header",
|
|
392
|
-
"Line"
|
|
393
|
-
]
|
|
394
|
-
}
|
|
395
|
-
];
|
|
396
|
-
|
|
397
|
-
class EnumCustomLabelMapping {
|
|
398
|
-
enumClass;
|
|
399
|
-
labels;
|
|
400
|
-
constructor(enumClass, labels) {
|
|
401
|
-
this.enumClass = enumClass;
|
|
402
|
-
if (this.validateLabels(enumClass, labels)) {
|
|
403
|
-
this.labels = labels;
|
|
404
|
-
}
|
|
405
|
-
else {
|
|
406
|
-
throw new Error('The length of your custom labels list does not match the enum class provided.');
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
validateLabels(enumClass, labels) {
|
|
410
|
-
// Get the total number of enum values by counting keys
|
|
411
|
-
const enumValues = Object.keys(enumClass).filter(key => isNaN(Number(key))).length;
|
|
412
|
-
return labels.length === enumValues;
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
// Function to create EnumCustomLabelMapping instances from JSON array
|
|
416
|
-
function createEnumCustomLabelMappingsFromJSON(jsonArray) {
|
|
417
|
-
return jsonArray.map(json => {
|
|
418
|
-
const enumClass = enumClassMap[json.enumClass];
|
|
419
|
-
if (!enumClass) {
|
|
420
|
-
throw new Error(`Enum class "${json.enumClass}" not found.`);
|
|
421
|
-
}
|
|
422
|
-
return new EnumCustomLabelMapping(enumClass, json.labels);
|
|
423
|
-
});
|
|
424
|
-
}
|
|
425
|
-
const enumCustomLabelMappings = createEnumCustomLabelMappingsFromJSON(enumCustomLabelMappingsJSON);
|
|
426
|
-
|
|
427
200
|
class EnumOption {
|
|
428
201
|
value;
|
|
429
202
|
label;
|
|
@@ -463,10 +236,6 @@ class EnumHelperBaseClass {
|
|
|
463
236
|
}
|
|
464
237
|
static getColorsForEnumClass(enumClass, stringValues, customColors) {
|
|
465
238
|
let colors = CustomTheme.$joolerCombo;
|
|
466
|
-
let enumSpecificColors = enumCustomColorMappings.find(item => Object.keys(item.enumClass).toString() == Object.keys(enumClass).toString());
|
|
467
|
-
if (enumSpecificColors) {
|
|
468
|
-
colors = enumSpecificColors.colors;
|
|
469
|
-
}
|
|
470
239
|
if (customColors && customColors.length > 0) {
|
|
471
240
|
colors = customColors;
|
|
472
241
|
}
|
|
@@ -480,29 +249,23 @@ class EnumHelperBaseClass {
|
|
|
480
249
|
}
|
|
481
250
|
static getStringValuesForEnumClass(enumClass, isAllCaps) {
|
|
482
251
|
let stringValues = [];
|
|
483
|
-
let
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
stringValues.push(item);
|
|
492
|
-
let splitStr = item.toLowerCase().split('_');
|
|
493
|
-
if (!isAllCaps) {
|
|
494
|
-
for (let i = 0; i < splitStr.length; i++) {
|
|
495
|
-
splitStr[i] = splitStr[i].charAt(0).toUpperCase() + splitStr[i].substring(1);
|
|
496
|
-
}
|
|
252
|
+
for (let item in enumClass) {
|
|
253
|
+
if (isNaN(Number(item))) {
|
|
254
|
+
let joinedString;
|
|
255
|
+
stringValues.push(item);
|
|
256
|
+
let splitStr = item.toLowerCase().split('_');
|
|
257
|
+
if (!isAllCaps) {
|
|
258
|
+
for (let i = 0; i < splitStr.length; i++) {
|
|
259
|
+
splitStr[i] = splitStr[i].charAt(0).toUpperCase() + splitStr[i].substring(1);
|
|
497
260
|
}
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
for (let i = 0; i < splitStr.length; i++) {
|
|
264
|
+
splitStr[i] = splitStr[i].toUpperCase();
|
|
502
265
|
}
|
|
503
|
-
joinedString = splitStr.join(' ');
|
|
504
|
-
stringValues.splice(stringValues.indexOf(item), 1, joinedString);
|
|
505
266
|
}
|
|
267
|
+
joinedString = splitStr.join(' ');
|
|
268
|
+
stringValues.splice(stringValues.indexOf(item), 1, joinedString);
|
|
506
269
|
}
|
|
507
270
|
}
|
|
508
271
|
return stringValues;
|
|
@@ -716,100 +479,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
716
479
|
type: Output
|
|
717
480
|
}] } });
|
|
718
481
|
|
|
719
|
-
class ShowTableErrorsComponent {
|
|
720
|
-
message;
|
|
721
|
-
showDetails;
|
|
722
|
-
ngOnInit() {
|
|
723
|
-
}
|
|
724
|
-
onMouseEnter() {
|
|
725
|
-
this.showDetails = true;
|
|
726
|
-
}
|
|
727
|
-
onMouseLeave() {
|
|
728
|
-
this.showDetails = false;
|
|
729
|
-
}
|
|
730
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ShowTableErrorsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
731
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ShowTableErrorsComponent, selector: "show-table-errors", inputs: { message: "message" }, ngImport: i0, template: "<div (mouseenter)=\"onMouseEnter()\"(mouseleave)=\"onMouseLeave()\" class=\"icon\">\r\n <fa-icon class=\"icon\" icon=\"info-circle\" ></fa-icon>\r\n <span *ngIf=\"message\" class=\"message\"\r\n [ngClass]=\"{'no-details' : !showDetails , 'details': showDetails}\">{{message}}</span>\r\n</div>", styles: [".icon{color:#a80002;cursor:pointer;display:inline-block}.no-details{display:none}.details{display:block;z-index:100;background-color:#ffdbdb;color:#a80002;border-radius:.5rem;border:.1rem solid #A80002;border-left:.5rem solid #A80002;position:fixed;padding:1rem;bottom:45%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$2.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }] });
|
|
732
|
-
}
|
|
733
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ShowTableErrorsComponent, decorators: [{
|
|
734
|
-
type: Component,
|
|
735
|
-
args: [{ selector: 'show-table-errors', template: "<div (mouseenter)=\"onMouseEnter()\"(mouseleave)=\"onMouseLeave()\" class=\"icon\">\r\n <fa-icon class=\"icon\" icon=\"info-circle\" ></fa-icon>\r\n <span *ngIf=\"message\" class=\"message\"\r\n [ngClass]=\"{'no-details' : !showDetails , 'details': showDetails}\">{{message}}</span>\r\n</div>", styles: [".icon{color:#a80002;cursor:pointer;display:inline-block}.no-details{display:none}.details{display:block;z-index:100;background-color:#ffdbdb;color:#a80002;border-radius:.5rem;border:.1rem solid #A80002;border-left:.5rem solid #A80002;position:fixed;padding:1rem;bottom:45%}\n"] }]
|
|
736
|
-
}], propDecorators: { message: [{
|
|
737
|
-
type: Input
|
|
738
|
-
}] } });
|
|
739
|
-
|
|
740
|
-
class AgGridSelectMixin {
|
|
741
|
-
params;
|
|
742
|
-
key;
|
|
743
|
-
value;
|
|
744
|
-
rowId;
|
|
745
|
-
isEdit;
|
|
746
|
-
index;
|
|
747
|
-
arrayKey = 'entries';
|
|
748
|
-
rowLevelFG;
|
|
749
|
-
width;
|
|
750
|
-
selectedItemId;
|
|
751
|
-
agInit(params) {
|
|
752
|
-
this.initializeRenderer(params);
|
|
753
|
-
}
|
|
754
|
-
initializeRenderer(params) {
|
|
755
|
-
this.params = params;
|
|
756
|
-
this.width = params.width;
|
|
757
|
-
this.key = params.context.createKey(params.columnApi, params.column);
|
|
758
|
-
this.value = params.value;
|
|
759
|
-
this.rowId = params.node.id;
|
|
760
|
-
this.index = params.node.rowIndex;
|
|
761
|
-
if (params.context.arrayKey) {
|
|
762
|
-
this.arrayKey = params.context.arrayKey;
|
|
763
|
-
}
|
|
764
|
-
this.setRowLevelFG();
|
|
765
|
-
}
|
|
766
|
-
setRowLevelFG() {
|
|
767
|
-
this.index = this.params.node.rowIndex;
|
|
768
|
-
let tableFG = this.params.context.formGroup;
|
|
769
|
-
let fa = tableFG.get(this.arrayKey);
|
|
770
|
-
let rowLevelFG = fa.at(this.index);
|
|
771
|
-
this.rowLevelFG = rowLevelFG;
|
|
772
|
-
}
|
|
773
|
-
getFormControl() {
|
|
774
|
-
let fc = this.rowLevelFG.get(this.key);
|
|
775
|
-
return fc;
|
|
776
|
-
}
|
|
777
|
-
updateValue(params, value) {
|
|
778
|
-
this.setRowLevelFG();
|
|
779
|
-
this.getFormControl().setValue(value);
|
|
780
|
-
let rowNode = params.node;
|
|
781
|
-
rowNode.setDataValue(this.key, value);
|
|
782
|
-
}
|
|
783
|
-
// $event here is an object.
|
|
784
|
-
onSelection($event) {
|
|
785
|
-
this.selectedItemId = $event?.id;
|
|
786
|
-
this.updateValue(this.params, $event?.id);
|
|
787
|
-
if (this.params.onSelection instanceof Function) {
|
|
788
|
-
const params = {
|
|
789
|
-
object: $event,
|
|
790
|
-
rowData: this.params.node.data,
|
|
791
|
-
value: $event.id,
|
|
792
|
-
rowNode: this.params.node,
|
|
793
|
-
};
|
|
794
|
-
this.params.onSelection(params);
|
|
795
|
-
}
|
|
796
|
-
}
|
|
797
|
-
onEnumSelected($event) {
|
|
798
|
-
this.updateValue(this.params, $event);
|
|
799
|
-
if (this.params.onSelection instanceof Function) {
|
|
800
|
-
const params = {
|
|
801
|
-
rowData: this.params.node.data,
|
|
802
|
-
value: $event,
|
|
803
|
-
rowNode: this.params.node,
|
|
804
|
-
};
|
|
805
|
-
this.params.onSelection(params);
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
refresh(param) {
|
|
809
|
-
return false;
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
|
|
813
482
|
class ChooseEnumRendererComponent extends AgGridSelectMixin {
|
|
814
483
|
valuesToDisable = [];
|
|
815
484
|
valuesToHide = [];
|
|
@@ -849,12 +518,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
849
518
|
args: [{ selector: 'choose-enum-renderer', template: "<div class=\"all\" [ngClass]=\"{ single: !showError, double: showError }\" *ngIf=\"rowLevelFG\" [formGroup]=\"rowLevelFG\">\r\n <choose-enum [clearable]=\"clearable\" [formControlName]=\"key\" [appendTo]=\"'body'\" [label]=\"params.label\"\r\n [labelTextAlign]=\"params.labelTextAlign\" [labelTextFontWeight]=\"params.labelTextFontWeight\"\r\n [labelTextFontSize]=\"params.labelTextFontSize\" [selectedItem]=\"params.value\" [valuesToHide]=\"valuesToHide\"\r\n [valuesToDisable]=\"valuesToDisable\" [isDropdownDisabled]=\"params.isDropdownDisabled\"\r\n [enumChoices]=\"params.enumChoices\" [placeholder]=\"params.placeholder\" [width]=\"params.width\" [isChip]=\"isChip\"\r\n [paddingTop]=\"params.paddingTop\" [customColors]=\"params.customColors\" (change)=\"onEnumSelected($event)\">\r\n </choose-enum>\r\n</div>", styles: [".all{display:grid;gap:.5rem;align-items:center;margin:auto}.single{grid-template-columns:auto}.double{grid-template-columns:auto max-content}\n"] }]
|
|
850
519
|
}], ctorParameters: function () { return []; } });
|
|
851
520
|
|
|
852
|
-
var
|
|
853
|
-
(function (
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
})(ChooseObjectTemplateType || (ChooseObjectTemplateType = {}));
|
|
521
|
+
var ChooseItemRendererValidationType;
|
|
522
|
+
(function (ChooseItemRendererValidationType) {
|
|
523
|
+
ChooseItemRendererValidationType[ChooseItemRendererValidationType["NONE"] = 0] = "NONE";
|
|
524
|
+
ChooseItemRendererValidationType[ChooseItemRendererValidationType["ROW_LEVEL_UNIQUE"] = 1] = "ROW_LEVEL_UNIQUE";
|
|
525
|
+
})(ChooseItemRendererValidationType || (ChooseItemRendererValidationType = {}));
|
|
858
526
|
|
|
859
527
|
var ChooseItemFullObjectControlConfig;
|
|
860
528
|
(function (ChooseItemFullObjectControlConfig) {
|
|
@@ -862,6 +530,33 @@ var ChooseItemFullObjectControlConfig;
|
|
|
862
530
|
ChooseItemFullObjectControlConfig[ChooseItemFullObjectControlConfig["ID"] = 2] = "ID";
|
|
863
531
|
})(ChooseItemFullObjectControlConfig || (ChooseItemFullObjectControlConfig = {}));
|
|
864
532
|
|
|
533
|
+
class PrimaryColors {
|
|
534
|
+
static $primaryBlueColor = '#155ED4';
|
|
535
|
+
static $primaryPinkColor = '#F0509C';
|
|
536
|
+
static $primaryTealColor = '#12957E';
|
|
537
|
+
static $primaryCarbonColor = '#32353B';
|
|
538
|
+
static $primaryGrayColor = '#676767';
|
|
539
|
+
static $primaryPurpleColor = '#E3B1EB';
|
|
540
|
+
static $primaryRedColor = '#A80002';
|
|
541
|
+
static $primaryLightRedColor = '#FFDBDB';
|
|
542
|
+
static $primaryLightGrayBlueColor = '#f7f8f9';
|
|
543
|
+
static $primaryLightGrayColor = '#f0f0f0';
|
|
544
|
+
static $primaryLightBlueColor = '#b9cff2';
|
|
545
|
+
static $primaryYellowColor = '#F2CD5C';
|
|
546
|
+
static $primaryOrangeColor = '#F2921D';
|
|
547
|
+
static $primaryLimeGreenColor = '#AFFF00';
|
|
548
|
+
static $primaryNavyBlueColor = '#000080';
|
|
549
|
+
static $primaryOrangeRedColor = '#FF4500';
|
|
550
|
+
static $primaryDarkPurpleColor = '#7600BC';
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
var ChooseObjectTemplateType;
|
|
554
|
+
(function (ChooseObjectTemplateType) {
|
|
555
|
+
ChooseObjectTemplateType[ChooseObjectTemplateType["DEFAULT"] = 0] = "DEFAULT";
|
|
556
|
+
ChooseObjectTemplateType[ChooseObjectTemplateType["BASIC"] = 1] = "BASIC";
|
|
557
|
+
ChooseObjectTemplateType[ChooseObjectTemplateType["CONTENT_PROJECTION"] = 2] = "CONTENT_PROJECTION";
|
|
558
|
+
})(ChooseObjectTemplateType || (ChooseObjectTemplateType = {}));
|
|
559
|
+
|
|
865
560
|
class DictionaryToHttpParamsConverter {
|
|
866
561
|
static dictionaryToHttpParamsConverter(form_dictionary) {
|
|
867
562
|
let queryParams = new HttpParams();
|
|
@@ -1058,6 +753,8 @@ class ChooseGeneralItemComponent {
|
|
|
1058
753
|
customOptionTemplate;
|
|
1059
754
|
ChooseObjectTemplateType = ChooseObjectTemplateType;
|
|
1060
755
|
chipInputTypes = ChipInputType;
|
|
756
|
+
fetchTrigger$ = new Subject();
|
|
757
|
+
fetchSub;
|
|
1061
758
|
constructor(_ChooseGeneralItemService, dialog, _cdr) {
|
|
1062
759
|
this._ChooseGeneralItemService = _ChooseGeneralItemService;
|
|
1063
760
|
this.dialog = dialog;
|
|
@@ -1067,27 +764,79 @@ class ChooseGeneralItemComponent {
|
|
|
1067
764
|
if (this.templateType == ChooseObjectTemplateType.BASIC) {
|
|
1068
765
|
this.setupBasicTemplate();
|
|
1069
766
|
}
|
|
1070
|
-
|
|
767
|
+
this.fetchTrigger$
|
|
768
|
+
.pipe(tap(() => (this.isLoading = true)), switchMap(({ apiPath, filterParams }) => this._ChooseGeneralItemService.getData(apiPath, filterParams)))
|
|
769
|
+
.subscribe(data => {
|
|
770
|
+
this.items = data;
|
|
771
|
+
this.isLoading = false;
|
|
772
|
+
console.log("response: items from '", this.apiPath, "' found: ", this.items);
|
|
773
|
+
});
|
|
774
|
+
}
|
|
775
|
+
triggerFetch() {
|
|
776
|
+
this.isLoading = true;
|
|
777
|
+
this.fetchTrigger$.next({
|
|
778
|
+
apiPath: this.apiPath,
|
|
779
|
+
filterParams: this.filterParams,
|
|
780
|
+
});
|
|
781
|
+
}
|
|
1071
782
|
setupBasicTemplate() { }
|
|
1072
783
|
ngOnChanges(changes) {
|
|
1073
|
-
|
|
1074
|
-
this.items = undefined;
|
|
1075
|
-
}
|
|
1076
|
-
if (changes['apiPath'] && !changes.apiPath) {
|
|
1077
|
-
this.apiPath = undefined;
|
|
1078
|
-
}
|
|
784
|
+
// console.log('changes: ', changes);
|
|
1079
785
|
this.validateInputs(changes);
|
|
1080
786
|
if (this.showAdd) {
|
|
1081
787
|
this.validateAddConfiguration();
|
|
1082
788
|
}
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
this.
|
|
789
|
+
// 1️⃣ Manually assign input updates immediately
|
|
790
|
+
if (changes['filterParams']) {
|
|
791
|
+
this.filterParams = changes['filterParams'].currentValue;
|
|
792
|
+
}
|
|
793
|
+
// CASE A — apiPath changed and items not provided
|
|
794
|
+
if (changes['apiPath'] && !changes['items']) {
|
|
795
|
+
const newApiPath = changes['apiPath'].currentValue;
|
|
796
|
+
// If apiPath becomes undefined → tear down subscription
|
|
797
|
+
if (!newApiPath) {
|
|
798
|
+
this.cleanupFetchSubscription();
|
|
799
|
+
return; // Do NOT subscribe and do NOT fetch
|
|
800
|
+
}
|
|
801
|
+
// apiPath is now defined → create subscription if missing
|
|
802
|
+
if (!this.fetchSub) {
|
|
803
|
+
this.setupFetchSubscription();
|
|
804
|
+
}
|
|
805
|
+
// And trigger the fetch if items not provided
|
|
806
|
+
if (!this.items && this.fetchSub) {
|
|
807
|
+
// console.log('FETTCCHNNG 3');
|
|
808
|
+
this.triggerFetch();
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
// CASE B — Parent passed items → use them and never fetch
|
|
812
|
+
if (changes['items']) {
|
|
813
|
+
if (changes['items'].currentValue && changes['items'].currentValue.length > 0) {
|
|
814
|
+
this.isLoading = false;
|
|
815
|
+
this.items = changes['items'].currentValue;
|
|
816
|
+
return;
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
// FROM HERE → items is not provided → backend fetch required
|
|
820
|
+
// CASE C — initial load (items missing)
|
|
821
|
+
if (changes['items'] && !changes['items'].currentValue && this.fetchSub) {
|
|
822
|
+
// console.log('FETTCCHNNG 1');
|
|
823
|
+
this.triggerFetch();
|
|
1086
824
|
}
|
|
1087
|
-
|
|
1088
|
-
|
|
825
|
+
// CASE D — filterParams changed and items not provided
|
|
826
|
+
if (changes['filterParams'] && this.fetchSub) {
|
|
827
|
+
// console.log('FETTCCHNNG 2');
|
|
828
|
+
this.triggerFetch();
|
|
1089
829
|
}
|
|
1090
830
|
}
|
|
831
|
+
setupFetchSubscription() {
|
|
832
|
+
this.fetchSub = this.fetchTrigger$
|
|
833
|
+
.pipe(filter(trigger => trigger !== null), tap(() => (this.isLoading = true)), switchMap(({ apiPath, filterParams }) => this._ChooseGeneralItemService.getData(apiPath, filterParams)))
|
|
834
|
+
.subscribe(data => {
|
|
835
|
+
this.items = data;
|
|
836
|
+
this.isLoading = false;
|
|
837
|
+
// console.log('fetched items from ', this.apiPath, data);
|
|
838
|
+
});
|
|
839
|
+
}
|
|
1091
840
|
validateAddConfiguration() {
|
|
1092
841
|
if ((this.addRoute == '' || this.addRoute == null || this.addRoute == undefined) &&
|
|
1093
842
|
(this.dialogComponentClass == null || this.dialogComponentClass == undefined)) {
|
|
@@ -1204,6 +953,12 @@ class ChooseGeneralItemComponent {
|
|
|
1204
953
|
registerOnValidatorChange(fn) {
|
|
1205
954
|
this.onValidationChange = fn;
|
|
1206
955
|
}
|
|
956
|
+
cleanupFetchSubscription() {
|
|
957
|
+
if (this.fetchSub) {
|
|
958
|
+
this.fetchSub.unsubscribe();
|
|
959
|
+
this.fetchSub = undefined;
|
|
960
|
+
}
|
|
961
|
+
}
|
|
1207
962
|
validate(control) {
|
|
1208
963
|
return null;
|
|
1209
964
|
if (control) {
|
|
@@ -1322,156 +1077,748 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
1322
1077
|
args: ['customOption']
|
|
1323
1078
|
}] } });
|
|
1324
1079
|
|
|
1325
|
-
class
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
itemId;
|
|
1330
|
-
rowId;
|
|
1331
|
-
constructor() { }
|
|
1332
|
-
agInit(params) {
|
|
1333
|
-
this.params = params;
|
|
1334
|
-
this.itemId = params.data.id;
|
|
1335
|
-
this.key = params.context.createKey(params.columnApi, params.column);
|
|
1336
|
-
this.rowId = params.node.id;
|
|
1080
|
+
class ShowTableErrorsComponent {
|
|
1081
|
+
message;
|
|
1082
|
+
showDetails;
|
|
1083
|
+
ngOnInit() {
|
|
1337
1084
|
}
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
this.formControlValue = this.params.context.formGroup.get("entries").at(this.rowId);
|
|
1341
|
-
this.formControlValue.get(this.key).setValue(value);
|
|
1342
|
-
const params = {
|
|
1343
|
-
value: value,
|
|
1344
|
-
rowNode: this.params.node,
|
|
1345
|
-
};
|
|
1346
|
-
this.params.onCellValueChanged(params);
|
|
1085
|
+
onMouseEnter() {
|
|
1086
|
+
this.showDetails = true;
|
|
1347
1087
|
}
|
|
1348
|
-
|
|
1349
|
-
|
|
1088
|
+
onMouseLeave() {
|
|
1089
|
+
this.showDetails = false;
|
|
1350
1090
|
}
|
|
1351
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type:
|
|
1352
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type:
|
|
1091
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ShowTableErrorsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1092
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ShowTableErrorsComponent, selector: "show-table-errors", inputs: { message: "message" }, ngImport: i0, template: "<div (mouseenter)=\"onMouseEnter()\"(mouseleave)=\"onMouseLeave()\" class=\"icon\">\r\n <fa-icon class=\"icon\" icon=\"info-circle\" ></fa-icon>\r\n <span *ngIf=\"message\" class=\"message\"\r\n [ngClass]=\"{'no-details' : !showDetails , 'details': showDetails}\">{{message}}</span>\r\n</div>", styles: [".icon{color:#a80002;cursor:pointer;display:inline-block}.no-details{display:none}.details{display:block;z-index:100;background-color:#ffdbdb;color:#a80002;border-radius:.5rem;border:.1rem solid #A80002;border-left:.5rem solid #A80002;position:fixed;padding:1rem;bottom:45%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$2.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }] });
|
|
1353
1093
|
}
|
|
1354
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type:
|
|
1094
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ShowTableErrorsComponent, decorators: [{
|
|
1355
1095
|
type: Component,
|
|
1356
|
-
args: [{ selector: '
|
|
1357
|
-
}],
|
|
1096
|
+
args: [{ selector: 'show-table-errors', template: "<div (mouseenter)=\"onMouseEnter()\"(mouseleave)=\"onMouseLeave()\" class=\"icon\">\r\n <fa-icon class=\"icon\" icon=\"info-circle\" ></fa-icon>\r\n <span *ngIf=\"message\" class=\"message\"\r\n [ngClass]=\"{'no-details' : !showDetails , 'details': showDetails}\">{{message}}</span>\r\n</div>", styles: [".icon{color:#a80002;cursor:pointer;display:inline-block}.no-details{display:none}.details{display:block;z-index:100;background-color:#ffdbdb;color:#a80002;border-radius:.5rem;border:.1rem solid #A80002;border-left:.5rem solid #A80002;position:fixed;padding:1rem;bottom:45%}\n"] }]
|
|
1097
|
+
}], propDecorators: { message: [{
|
|
1098
|
+
type: Input
|
|
1099
|
+
}] } });
|
|
1358
1100
|
|
|
1359
|
-
var
|
|
1360
|
-
(function (
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1101
|
+
var ToolTipMessageType;
|
|
1102
|
+
(function (ToolTipMessageType) {
|
|
1103
|
+
ToolTipMessageType[ToolTipMessageType["ERROR"] = 0] = "ERROR";
|
|
1104
|
+
ToolTipMessageType[ToolTipMessageType["WARNING"] = 1] = "WARNING";
|
|
1105
|
+
ToolTipMessageType[ToolTipMessageType["HELP"] = 2] = "HELP";
|
|
1106
|
+
ToolTipMessageType[ToolTipMessageType["DEFAULT"] = 3] = "DEFAULT";
|
|
1107
|
+
})(ToolTipMessageType || (ToolTipMessageType = {}));
|
|
1364
1108
|
|
|
1365
|
-
class
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1109
|
+
class TooltipMsgError {
|
|
1110
|
+
cdr;
|
|
1111
|
+
_El;
|
|
1112
|
+
width;
|
|
1113
|
+
control = null;
|
|
1114
|
+
messageType = ToolTipMessageType.ERROR;
|
|
1115
|
+
message;
|
|
1116
|
+
iconElId;
|
|
1117
|
+
messageElId;
|
|
1118
|
+
isLeft = true;
|
|
1119
|
+
showDetails;
|
|
1120
|
+
tooltipIcon;
|
|
1121
|
+
tooltipMessage;
|
|
1122
|
+
iconStyle;
|
|
1123
|
+
isDictionary;
|
|
1124
|
+
onScrollY() {
|
|
1125
|
+
this.onMouseLeave();
|
|
1126
|
+
}
|
|
1127
|
+
constructor(cdr, _El) {
|
|
1128
|
+
this.cdr = cdr;
|
|
1129
|
+
this._El = _El;
|
|
1130
|
+
}
|
|
1131
|
+
ngOnInit() {
|
|
1132
|
+
this.iconElId = this.generateRandomString();
|
|
1133
|
+
this.messageElId = this.generateRandomString();
|
|
1134
|
+
this.setIconStyle();
|
|
1135
|
+
this.checkErrorType();
|
|
1136
|
+
}
|
|
1137
|
+
ngOnChanges(changes) {
|
|
1138
|
+
this.checkErrorType();
|
|
1139
|
+
}
|
|
1140
|
+
ngOnDestroy() {
|
|
1141
|
+
if (document.getElementById(this.messageElId)) {
|
|
1142
|
+
document.getElementById(this.messageElId).remove();
|
|
1377
1143
|
}
|
|
1378
|
-
return items;
|
|
1379
1144
|
}
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1145
|
+
checkErrorType() {
|
|
1146
|
+
if (this.message) {
|
|
1147
|
+
if (this.message.constructor == Object) {
|
|
1148
|
+
this.isDictionary = true;
|
|
1149
|
+
}
|
|
1150
|
+
else if (typeof this.message === 'string') {
|
|
1151
|
+
this.isDictionary = false;
|
|
1152
|
+
}
|
|
1153
|
+
else {
|
|
1154
|
+
this.isDictionary = false;
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
getThemedMessageStyle() {
|
|
1159
|
+
let backgroundColor;
|
|
1160
|
+
let fontBorderColor;
|
|
1161
|
+
switch (this.messageType) {
|
|
1162
|
+
case ToolTipMessageType.ERROR:
|
|
1163
|
+
backgroundColor = '#fde5f0';
|
|
1164
|
+
fontBorderColor = PrimaryColors.$primaryPinkColor;
|
|
1384
1165
|
break;
|
|
1385
|
-
case
|
|
1386
|
-
|
|
1166
|
+
case ToolTipMessageType.WARNING:
|
|
1167
|
+
backgroundColor = '#fdefdd';
|
|
1168
|
+
fontBorderColor = PrimaryColors.$primaryOrangeColor;
|
|
1169
|
+
break;
|
|
1170
|
+
case ToolTipMessageType.HELP:
|
|
1171
|
+
backgroundColor = '#d1f9f2';
|
|
1172
|
+
fontBorderColor = PrimaryColors.$primaryTealColor;
|
|
1387
1173
|
break;
|
|
1388
1174
|
default:
|
|
1389
|
-
|
|
1175
|
+
backgroundColor = PrimaryColors.$primaryLightGrayColor;
|
|
1176
|
+
fontBorderColor = PrimaryColors.$primaryGrayColor;
|
|
1177
|
+
break;
|
|
1390
1178
|
}
|
|
1179
|
+
let style = {
|
|
1180
|
+
'background-color': backgroundColor,
|
|
1181
|
+
'font-weight': 'bold',
|
|
1182
|
+
color: fontBorderColor,
|
|
1183
|
+
border: '0.2rem solid ' + fontBorderColor,
|
|
1184
|
+
'border-left': '0.5rem solid ' + fontBorderColor,
|
|
1185
|
+
};
|
|
1186
|
+
return style;
|
|
1391
1187
|
}
|
|
1392
|
-
|
|
1393
|
-
let
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1188
|
+
setMessageStyle() {
|
|
1189
|
+
let style = {};
|
|
1190
|
+
if (this.width) {
|
|
1191
|
+
style['width'] = this.width;
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
get messageStyle() {
|
|
1195
|
+
let commonMessageStyle = {};
|
|
1196
|
+
if (this.width) {
|
|
1197
|
+
commonMessageStyle['width'] = this.width;
|
|
1198
|
+
}
|
|
1199
|
+
return {
|
|
1200
|
+
...commonMessageStyle,
|
|
1201
|
+
...(this.showDetails ? this.getThemedMessageStyle() : {}),
|
|
1202
|
+
};
|
|
1203
|
+
}
|
|
1204
|
+
setIconStyle() {
|
|
1205
|
+
let backgroundColor;
|
|
1206
|
+
switch (this.messageType) {
|
|
1207
|
+
case ToolTipMessageType.ERROR:
|
|
1208
|
+
backgroundColor = PrimaryColors.$primaryPinkColor;
|
|
1397
1209
|
break;
|
|
1398
|
-
case
|
|
1399
|
-
|
|
1210
|
+
case ToolTipMessageType.WARNING:
|
|
1211
|
+
backgroundColor = PrimaryColors.$primaryOrangeColor;
|
|
1212
|
+
break;
|
|
1213
|
+
case ToolTipMessageType.HELP:
|
|
1214
|
+
backgroundColor = PrimaryColors.$primaryTealColor;
|
|
1400
1215
|
break;
|
|
1401
1216
|
default:
|
|
1402
|
-
|
|
1217
|
+
backgroundColor = PrimaryColors.$primaryGrayColor;
|
|
1218
|
+
break;
|
|
1403
1219
|
}
|
|
1220
|
+
let style = {
|
|
1221
|
+
color: backgroundColor,
|
|
1222
|
+
};
|
|
1223
|
+
this.iconStyle = style;
|
|
1404
1224
|
}
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1225
|
+
onMouseEnter() {
|
|
1226
|
+
this.showDetails = true;
|
|
1227
|
+
// CDR is needed to let the DOM know the box error has a width
|
|
1228
|
+
this.cdr.detectChanges();
|
|
1229
|
+
this.tooltipMessage = document.getElementById(this.messageElId);
|
|
1230
|
+
if (this.message) {
|
|
1231
|
+
this.getDirection(this.tooltipMessage);
|
|
1232
|
+
document.body.appendChild(this.tooltipMessage);
|
|
1233
|
+
let messageElement = document.getElementById(this.messageElId);
|
|
1234
|
+
let icon = document.getElementById(this.iconElId);
|
|
1235
|
+
let rect = icon.getBoundingClientRect();
|
|
1236
|
+
let top = rect.top;
|
|
1237
|
+
let left = rect.left;
|
|
1238
|
+
let right = rect.right;
|
|
1239
|
+
let appendedLeft;
|
|
1240
|
+
let appendedRight;
|
|
1241
|
+
let appendedTop = top - messageElement.offsetHeight;
|
|
1242
|
+
this.tooltipMessage.style.top = appendedTop + 'px';
|
|
1243
|
+
this.tooltipMessage.style.zIndex = '1000';
|
|
1244
|
+
if (this.isLeft) {
|
|
1245
|
+
appendedLeft = left + icon.offsetWidth - 5;
|
|
1246
|
+
this.tooltipMessage.style.left = appendedLeft + 'px';
|
|
1247
|
+
}
|
|
1248
|
+
else {
|
|
1249
|
+
appendedRight = window.innerWidth - right + 5;
|
|
1250
|
+
this.tooltipMessage.style.right = appendedRight + 'px';
|
|
1410
1251
|
}
|
|
1411
1252
|
}
|
|
1412
1253
|
}
|
|
1254
|
+
onMouseLeave() {
|
|
1255
|
+
this.showDetails = false;
|
|
1256
|
+
}
|
|
1257
|
+
getDirection(element) {
|
|
1258
|
+
// Calculating the width difference between screen width minus the poistion of the icon from left to right (getBoundingClientRect().right)
|
|
1259
|
+
let difference = window.innerWidth - element.getBoundingClientRect().right;
|
|
1260
|
+
// hard coded + 12 is for the padding that has been added to router-outlet
|
|
1261
|
+
// The if statment here check if there is enough space for the box error to show from left to right , if not enough space, the box error will pop up from right to left
|
|
1262
|
+
if (difference <= element.offsetWidth + 12) {
|
|
1263
|
+
this.isLeft = false;
|
|
1264
|
+
}
|
|
1265
|
+
else {
|
|
1266
|
+
this.isLeft = true;
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
generateRandomString() {
|
|
1270
|
+
let charsAndNumbs = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
|
|
1271
|
+
let text = '';
|
|
1272
|
+
for (let i = 0; i < 8; i++) {
|
|
1273
|
+
text += charsAndNumbs.charAt(Math.floor(Math.random() * charsAndNumbs.length));
|
|
1274
|
+
}
|
|
1275
|
+
return text;
|
|
1276
|
+
}
|
|
1277
|
+
// Helper to decide how to display the value
|
|
1278
|
+
formatValue(value) {
|
|
1279
|
+
if (!value)
|
|
1280
|
+
return '';
|
|
1281
|
+
// 1. If it's an array (like your jurisdiction error)
|
|
1282
|
+
if (Array.isArray(value)) {
|
|
1283
|
+
// Map through the array and extract 'message' if it exists, otherwise stringify
|
|
1284
|
+
return value
|
|
1285
|
+
.map(item => {
|
|
1286
|
+
return typeof item === 'object' && item.message ? item.message : JSON.stringify(item);
|
|
1287
|
+
})
|
|
1288
|
+
.join(', ');
|
|
1289
|
+
}
|
|
1290
|
+
// 2. If it's a single object (but not an array)
|
|
1291
|
+
if (typeof value === 'object') {
|
|
1292
|
+
return value.message || JSON.stringify(value);
|
|
1293
|
+
}
|
|
1294
|
+
// 3. It's a string or number
|
|
1295
|
+
return value;
|
|
1296
|
+
}
|
|
1297
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipMsgError, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1298
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TooltipMsgError, selector: "tooltip-msg-error", inputs: { width: "width", control: "control", messageType: "messageType", message: "message" }, host: { listeners: { "document:scroll ": "onScrollY()" } }, usesOnChanges: true, ngImport: i0, template: "<div\r\n *ngIf=\"message && !control\"\r\n class=\"container\"\r\n (mouseenter)=\"onMouseEnter()\"\r\n (mouseleave)=\"onMouseLeave()\">\r\n <fa-icon [id]=\"iconElId\" [ngStyle]=\"iconStyle\" icon=\"circle-exclamation\" class=\"icon\"></fa-icon>\r\n <div\r\n *ngIf=\"!isDictionary\"\r\n [ngStyle]=\"messageStyle\"\r\n [id]=\"messageElId\"\r\n class=\"message\"\r\n [ngClass]=\"{ 'no-details': !showDetails, details: showDetails }\">\r\n {{ message }}\r\n </div>\r\n\r\n <div\r\n *ngIf=\"isDictionary\"\r\n [ngStyle]=\"messageStyle\"\r\n [id]=\"messageElId\"\r\n class=\"message\"\r\n [ngClass]=\"{ 'no-details': !showDetails, details: showDetails }\">\r\n <div class=\"dict-cont\" *ngFor=\"let entry of message | keyvalue\">\r\n <strong>{{ entry.key }}: </strong>\r\n <span>{{ formatValue(entry.value) }}</span>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div\r\n *ngIf=\"control?.touched && control.errors\"\r\n class=\"container\"\r\n (mouseenter)=\"onMouseEnter()\"\r\n (mouseleave)=\"onMouseLeave()\">\r\n <fa-icon [ngStyle]=\"iconStyle\" [id]=\"iconElId\" icon=\"circle-exclamation\" class=\"icon\"></fa-icon>\r\n <div\r\n [ngStyle]=\"messageStyle\"\r\n [id]=\"messageElId\"\r\n class=\"message\"\r\n [ngClass]=\"{ 'no-details': !showDetails, details: showDetails }\">\r\n <div class=\"dict-cont\" *ngFor=\"let entry of message | keyvalue\">\r\n <strong>{{ entry.key }}: </strong>\r\n <span>{{ formatValue(entry.value) }}</span>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".no-details{display:none;position:unset}.icon{cursor:pointer;display:inline-block}.container{position:relative}.details{position:fixed;display:block;z-index:1000;border-radius:.5rem;padding:.75rem 1rem;width:max-content;max-width:500px;font-size:1.2rem;line-height:1.4}@media (max-width: 1024px){.details{max-width:320px}}@media (max-width: 768px){.details{max-width:90vw}}.right-section{right:0}.message{width:max-content;white-space:pre-line;pointer-events:none}.dict-cont{line-height:normal}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2$2.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "pipe", type: i1.KeyValuePipe, name: "keyvalue" }] });
|
|
1413
1299
|
}
|
|
1300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipMsgError, decorators: [{
|
|
1301
|
+
type: Component,
|
|
1302
|
+
args: [{ selector: 'tooltip-msg-error', template: "<div\r\n *ngIf=\"message && !control\"\r\n class=\"container\"\r\n (mouseenter)=\"onMouseEnter()\"\r\n (mouseleave)=\"onMouseLeave()\">\r\n <fa-icon [id]=\"iconElId\" [ngStyle]=\"iconStyle\" icon=\"circle-exclamation\" class=\"icon\"></fa-icon>\r\n <div\r\n *ngIf=\"!isDictionary\"\r\n [ngStyle]=\"messageStyle\"\r\n [id]=\"messageElId\"\r\n class=\"message\"\r\n [ngClass]=\"{ 'no-details': !showDetails, details: showDetails }\">\r\n {{ message }}\r\n </div>\r\n\r\n <div\r\n *ngIf=\"isDictionary\"\r\n [ngStyle]=\"messageStyle\"\r\n [id]=\"messageElId\"\r\n class=\"message\"\r\n [ngClass]=\"{ 'no-details': !showDetails, details: showDetails }\">\r\n <div class=\"dict-cont\" *ngFor=\"let entry of message | keyvalue\">\r\n <strong>{{ entry.key }}: </strong>\r\n <span>{{ formatValue(entry.value) }}</span>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div\r\n *ngIf=\"control?.touched && control.errors\"\r\n class=\"container\"\r\n (mouseenter)=\"onMouseEnter()\"\r\n (mouseleave)=\"onMouseLeave()\">\r\n <fa-icon [ngStyle]=\"iconStyle\" [id]=\"iconElId\" icon=\"circle-exclamation\" class=\"icon\"></fa-icon>\r\n <div\r\n [ngStyle]=\"messageStyle\"\r\n [id]=\"messageElId\"\r\n class=\"message\"\r\n [ngClass]=\"{ 'no-details': !showDetails, details: showDetails }\">\r\n <div class=\"dict-cont\" *ngFor=\"let entry of message | keyvalue\">\r\n <strong>{{ entry.key }}: </strong>\r\n <span>{{ formatValue(entry.value) }}</span>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".no-details{display:none;position:unset}.icon{cursor:pointer;display:inline-block}.container{position:relative}.details{position:fixed;display:block;z-index:1000;border-radius:.5rem;padding:.75rem 1rem;width:max-content;max-width:500px;font-size:1.2rem;line-height:1.4}@media (max-width: 1024px){.details{max-width:320px}}@media (max-width: 768px){.details{max-width:90vw}}.right-section{right:0}.message{width:max-content;white-space:pre-line;pointer-events:none}.dict-cont{line-height:normal}\n"] }]
|
|
1303
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { width: [{
|
|
1304
|
+
type: Input
|
|
1305
|
+
}], control: [{
|
|
1306
|
+
type: Input
|
|
1307
|
+
}], messageType: [{
|
|
1308
|
+
type: Input
|
|
1309
|
+
}], message: [{
|
|
1310
|
+
type: Input
|
|
1311
|
+
}], onScrollY: [{
|
|
1312
|
+
type: HostListener,
|
|
1313
|
+
args: ['document:scroll ']
|
|
1314
|
+
}] } });
|
|
1414
1315
|
|
|
1415
|
-
class
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1316
|
+
class AddAsteriskDirective {
|
|
1317
|
+
elem;
|
|
1318
|
+
show = true;
|
|
1319
|
+
constructor(elem) {
|
|
1320
|
+
this.elem = elem;
|
|
1321
|
+
}
|
|
1420
1322
|
ngOnInit() {
|
|
1421
|
-
this.
|
|
1323
|
+
this.toggleAsterisk();
|
|
1422
1324
|
}
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1325
|
+
ngOnChanges(changes) {
|
|
1326
|
+
this.toggleAsterisk();
|
|
1327
|
+
}
|
|
1328
|
+
toggleAsterisk() {
|
|
1329
|
+
const existingAsterisk = this.elem.nativeElement.querySelector('.custom-asterisk');
|
|
1330
|
+
if (this.show) {
|
|
1331
|
+
if (!existingAsterisk) {
|
|
1332
|
+
const customAsterisk = `<span class="custom-asterisk" style="color:${PrimaryColors.$primaryRedColor};"> *</span> `;
|
|
1333
|
+
this.elem.nativeElement.insertAdjacentHTML('beforeend', customAsterisk);
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
else {
|
|
1337
|
+
if (existingAsterisk) {
|
|
1338
|
+
existingAsterisk.remove();
|
|
1339
|
+
}
|
|
1426
1340
|
}
|
|
1427
1341
|
}
|
|
1428
|
-
|
|
1429
|
-
|
|
1342
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AddAsteriskDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1343
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AddAsteriskDirective, selector: "[addAsterisk]", inputs: { show: "show" }, usesOnChanges: true, ngImport: i0 });
|
|
1344
|
+
}
|
|
1345
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AddAsteriskDirective, decorators: [{
|
|
1346
|
+
type: Directive,
|
|
1347
|
+
args: [{
|
|
1348
|
+
selector: '[addAsterisk]'
|
|
1349
|
+
}]
|
|
1350
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { show: [{
|
|
1351
|
+
type: Input,
|
|
1352
|
+
args: ['show']
|
|
1353
|
+
}] } });
|
|
1354
|
+
|
|
1355
|
+
class ValidationMessageService {
|
|
1356
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ValidationMessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1357
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ValidationMessageService, providedIn: 'root' });
|
|
1358
|
+
}
|
|
1359
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ValidationMessageService, decorators: [{
|
|
1360
|
+
type: Injectable,
|
|
1361
|
+
args: [{
|
|
1362
|
+
providedIn: 'root'
|
|
1363
|
+
}]
|
|
1364
|
+
}] });
|
|
1365
|
+
class MinLengthValidationError {
|
|
1366
|
+
requirement;
|
|
1367
|
+
constructor(requirement) {
|
|
1368
|
+
this.requirement = requirement;
|
|
1430
1369
|
}
|
|
1431
|
-
|
|
1432
|
-
this.
|
|
1370
|
+
buildMessage() {
|
|
1371
|
+
return "Must be a minimum length of " + this.requirement + " letters!";
|
|
1433
1372
|
}
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1373
|
+
}
|
|
1374
|
+
class InvalidIntegerNumberValidatorEerror {
|
|
1375
|
+
buildMessage() {
|
|
1376
|
+
return "Must only contain numbers, no decimals or words allowed";
|
|
1438
1377
|
}
|
|
1439
|
-
|
|
1440
|
-
|
|
1378
|
+
}
|
|
1379
|
+
class PositiveIntegerNumberValidatorError {
|
|
1380
|
+
buildMessage() {
|
|
1381
|
+
return "Must be a positive integer";
|
|
1441
1382
|
}
|
|
1442
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChooseLineTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1443
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ChooseLineTypeComponent, selector: "choose-line-type", providers: [
|
|
1444
|
-
{
|
|
1445
|
-
provide: NG_VALUE_ACCESSOR,
|
|
1446
|
-
useExisting: forwardRef(() => ChooseLineTypeComponent),
|
|
1447
|
-
multi: true,
|
|
1448
|
-
},
|
|
1449
|
-
], ngImport: i0, template: "<div class=\"select\">\r\n <ng-select class=\"type\" appendTo=\"body\" (blur)=\"updateBlur()\" bindLabel=\"label\" bindValue=\"label\" [items]=\"types\"\r\n [placeholder]=\"'Choose A Component'\" (change)=\"onSelectedItemChanged()\" [(ngModel)]=\"selectedItem\">\r\n <ng-template class=\"template\" ng-option-tmp ng-label-tmp let-item=\"item\" let-index=\"index\">\r\n {{item.label}}\r\n </ng-template>\r\n </ng-select>\r\n</div>", styles: [".type{width:250px}\n"], dependencies: [{ kind: "component", type: i2.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i2.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "directive", type: i2.NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
1450
1383
|
}
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
provide: NG_VALUE_ACCESSOR,
|
|
1456
|
-
useExisting: forwardRef(() => ChooseLineTypeComponent),
|
|
1457
|
-
multi: true,
|
|
1458
|
-
},
|
|
1459
|
-
], template: "<div class=\"select\">\r\n <ng-select class=\"type\" appendTo=\"body\" (blur)=\"updateBlur()\" bindLabel=\"label\" bindValue=\"label\" [items]=\"types\"\r\n [placeholder]=\"'Choose A Component'\" (change)=\"onSelectedItemChanged()\" [(ngModel)]=\"selectedItem\">\r\n <ng-template class=\"template\" ng-option-tmp ng-label-tmp let-item=\"item\" let-index=\"index\">\r\n {{item.label}}\r\n </ng-template>\r\n </ng-select>\r\n</div>", styles: [".type{width:250px}\n"] }]
|
|
1460
|
-
}], ctorParameters: function () { return []; } });
|
|
1461
|
-
|
|
1462
|
-
class ChooseYesOrNoComponent {
|
|
1463
|
-
change = new EventEmitter();
|
|
1464
|
-
items = [{ value: true, label: "Yes", color: "green" }, { value: false, label: "No", color: "red" }];
|
|
1465
|
-
width = 200;
|
|
1466
|
-
selectedItemValue;
|
|
1467
|
-
placeholder = "Choose either Yes or No";
|
|
1468
|
-
constructor() { }
|
|
1469
|
-
ngOnInit() {
|
|
1384
|
+
class MaxLengthValidationError {
|
|
1385
|
+
requirement;
|
|
1386
|
+
constructor(requirement) {
|
|
1387
|
+
this.requirement = requirement;
|
|
1470
1388
|
}
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1389
|
+
buildMessage() {
|
|
1390
|
+
return "Must be a maximum length of " + this.requirement + " letters!";
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1393
|
+
class MaxValidationError {
|
|
1394
|
+
requirement;
|
|
1395
|
+
constructor(requirement) {
|
|
1396
|
+
this.requirement = requirement;
|
|
1397
|
+
}
|
|
1398
|
+
buildMessage() {
|
|
1399
|
+
return "The largest acceptable input is " + this.requirement;
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
class MinValidationError {
|
|
1403
|
+
requirement;
|
|
1404
|
+
constructor(requirement) {
|
|
1405
|
+
this.requirement = requirement;
|
|
1406
|
+
}
|
|
1407
|
+
buildMessage() {
|
|
1408
|
+
return "The smallest acceptable input is " + this.requirement;
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
class PatternValidatorError {
|
|
1412
|
+
requirement;
|
|
1413
|
+
constructor(requirement) {
|
|
1414
|
+
this.requirement = requirement;
|
|
1415
|
+
}
|
|
1416
|
+
buildMessage() {
|
|
1417
|
+
if (this.requirement == '^[a-zA-Z ]*$') {
|
|
1418
|
+
return "This field must only contain words ";
|
|
1419
|
+
}
|
|
1420
|
+
else if (this.requirement == '/[0-9]-[0-9]+$/') {
|
|
1421
|
+
return "This field must only contain numbers and a - " + "<br>" + "Example: 71-716971";
|
|
1422
|
+
}
|
|
1423
|
+
else if (this.requirement = 'forDate') {
|
|
1424
|
+
return "Date needs to be DD/MM/YYYY";
|
|
1425
|
+
}
|
|
1426
|
+
}
|
|
1427
|
+
}
|
|
1428
|
+
class RequiredValidatorError {
|
|
1429
|
+
buildMessage() {
|
|
1430
|
+
return "This Field Is Required";
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1433
|
+
class EmailValidatorError {
|
|
1434
|
+
buildMessage() {
|
|
1435
|
+
return "Make Sure It Is An Email Format" + "<br>" + "example@jooler.io";
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
class ValidationError {
|
|
1439
|
+
static getRelevantError(validationType, validationValue) {
|
|
1440
|
+
let validationMessage;
|
|
1441
|
+
validationMessage = this.MessageDictionary(validationValue, validationType);
|
|
1442
|
+
return validationMessage;
|
|
1443
|
+
}
|
|
1444
|
+
static MessageDictionary(value, validationType) {
|
|
1445
|
+
let ValidationMessageForInput = {
|
|
1446
|
+
'minlength': new MinLengthValidationError(value).buildMessage(),
|
|
1447
|
+
'maxlength': new MaxLengthValidationError(value).buildMessage(),
|
|
1448
|
+
'max': new MaxValidationError(value).buildMessage(),
|
|
1449
|
+
'min': new MinValidationError(value).buildMessage(),
|
|
1450
|
+
'pattern': new PatternValidatorError(value).buildMessage(),
|
|
1451
|
+
'required': new RequiredValidatorError().buildMessage(),
|
|
1452
|
+
'email': new EmailValidatorError().buildMessage(),
|
|
1453
|
+
'invalidIntegerNumber': new InvalidIntegerNumberValidatorEerror().buildMessage(),
|
|
1454
|
+
'invalidPositiveInteger': new PositiveIntegerNumberValidatorError().buildMessage(),
|
|
1455
|
+
};
|
|
1456
|
+
return ValidationMessageForInput[validationType];
|
|
1457
|
+
}
|
|
1458
|
+
static validationMessageForDate = {
|
|
1459
|
+
'required': new RequiredValidatorError().buildMessage(),
|
|
1460
|
+
'pattern': new PatternValidatorError('forDate').buildMessage(),
|
|
1461
|
+
};
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
class FormControlValidationMsgDirectiveForNgSelect {
|
|
1465
|
+
elRef;
|
|
1466
|
+
control;
|
|
1467
|
+
errorMessage;
|
|
1468
|
+
showDot;
|
|
1469
|
+
errorDivId;
|
|
1470
|
+
afterEnd = true;
|
|
1471
|
+
showBoxError = true;
|
|
1472
|
+
validationError = ValidationError;
|
|
1473
|
+
statusChangeSubscription;
|
|
1474
|
+
constructor(elRef, control) {
|
|
1475
|
+
this.elRef = elRef;
|
|
1476
|
+
this.control = control;
|
|
1477
|
+
}
|
|
1478
|
+
ngOnInit() {
|
|
1479
|
+
if (!this.errorDivId) {
|
|
1480
|
+
this.errorDivId = this.control.name;
|
|
1481
|
+
}
|
|
1482
|
+
this.statusChangeSubscription = this.control.statusChanges.subscribe(status => {
|
|
1483
|
+
if (status == 'INVALID' && this.control.touched) {
|
|
1484
|
+
this.showNgSelectError();
|
|
1485
|
+
}
|
|
1486
|
+
else {
|
|
1487
|
+
this.removeError();
|
|
1488
|
+
}
|
|
1489
|
+
});
|
|
1490
|
+
this.control.valueChanges.subscribe({
|
|
1491
|
+
next: () => {
|
|
1492
|
+
if (this.control.errors && this.control.touched) {
|
|
1493
|
+
this.showNgSelectError();
|
|
1494
|
+
}
|
|
1495
|
+
else {
|
|
1496
|
+
this.removeError();
|
|
1497
|
+
}
|
|
1498
|
+
},
|
|
1499
|
+
});
|
|
1500
|
+
}
|
|
1501
|
+
onFocusout() {
|
|
1502
|
+
if (this.control.errors && this.control.touched) {
|
|
1503
|
+
this.showNgSelectError();
|
|
1504
|
+
}
|
|
1505
|
+
else {
|
|
1506
|
+
this.removeError();
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
removeError() {
|
|
1510
|
+
this.errorMessage = '';
|
|
1511
|
+
const errorElement = document.getElementById(this.errorDivId);
|
|
1512
|
+
if (errorElement)
|
|
1513
|
+
errorElement.remove();
|
|
1514
|
+
}
|
|
1515
|
+
showNgSelectError() {
|
|
1516
|
+
this.removeError();
|
|
1517
|
+
const valErrors = this.control.errors;
|
|
1518
|
+
if (this.control.errors.length > 1) {
|
|
1519
|
+
this.showDot = true;
|
|
1520
|
+
}
|
|
1521
|
+
else {
|
|
1522
|
+
this.showDot = false;
|
|
1523
|
+
}
|
|
1524
|
+
if (valErrors) {
|
|
1525
|
+
const keys = Object.keys(valErrors);
|
|
1526
|
+
for (let i = 0; i < keys.length; i++) {
|
|
1527
|
+
switch (keys[i]) {
|
|
1528
|
+
case 'required': {
|
|
1529
|
+
let message = this.validationError.getRelevantError(keys[i], valErrors);
|
|
1530
|
+
this.errorMessage += ` ${this.errorMessage ? '<br>' : ''}${this.showDot ? '\u25CF ' + message : message}`;
|
|
1531
|
+
this.control.control.setErrors({ required: true, message: message }, { emitEvent: false });
|
|
1532
|
+
break;
|
|
1533
|
+
}
|
|
1534
|
+
case 'validatePhoneNumber': {
|
|
1535
|
+
let message = this.validationError.getRelevantError(keys[i], valErrors);
|
|
1536
|
+
this.errorMessage += ` ${this.errorMessage ? '<br>' : ''}${this.showDot ? '\u25CF ' + message : message}`;
|
|
1537
|
+
this.control.control.setErrors({ validatePhoneNumber: true, message: message }, { emitEvent: false });
|
|
1538
|
+
break;
|
|
1539
|
+
}
|
|
1540
|
+
case 'customMessage': {
|
|
1541
|
+
console.log('valErrors', valErrors);
|
|
1542
|
+
let message = valErrors.message;
|
|
1543
|
+
this.errorMessage += ` ${this.errorMessage ? '<br>' : ''}${this.showDot ? '\u25CF ' + message : message}`;
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
if (this.showBoxError) {
|
|
1548
|
+
const errDiv = `<div style="color:${PrimaryColors.$primaryRedColor}; width: ${this.afterEnd ? this.elRef.nativeElement.offsetWidth + 'px' : '100%'}; min-width: 100%; background-color: ${PrimaryColors.$primaryLightRedColor}; padding: .5rem; border-radius: .5rem; border: .1rem solid ${PrimaryColors.$primaryRedColor} ;border-left: .75rem solid ${PrimaryColors.$primaryRedColor}; margin-top:.5rem; font-size: 1.2rem; " id="` +
|
|
1549
|
+
this.errorDivId +
|
|
1550
|
+
'">' +
|
|
1551
|
+
`<h3 style= " font-size: 1.3rem; margin-bottom:.5rem; margin:0; color: ${PrimaryColors.$primaryRedColor}; font-weight: 700; line-height: 1.6rem;">` +
|
|
1552
|
+
'Please Complete all details' +
|
|
1553
|
+
'</h3>' +
|
|
1554
|
+
this.errorMessage +
|
|
1555
|
+
'</div>';
|
|
1556
|
+
if (!this.afterEnd)
|
|
1557
|
+
this.elRef.nativeElement.parentElement.insertAdjacentHTML('afterend', errDiv);
|
|
1558
|
+
else {
|
|
1559
|
+
this.elRef.nativeElement.insertAdjacentHTML('afterend', errDiv);
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormControlValidationMsgDirectiveForNgSelect, deps: [{ token: i0.ElementRef }, { token: i2$1.NgControl }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1565
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: FormControlValidationMsgDirectiveForNgSelect, selector: "[appFormControlValidationMsgForNgSelect]", inputs: { afterEnd: "afterEnd", showBoxError: "showBoxError" }, host: { listeners: { "focusout": "onFocusout()" } }, providers: [NgModel], ngImport: i0 });
|
|
1566
|
+
}
|
|
1567
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormControlValidationMsgDirectiveForNgSelect, decorators: [{
|
|
1568
|
+
type: Directive,
|
|
1569
|
+
args: [{
|
|
1570
|
+
selector: '[appFormControlValidationMsgForNgSelect]',
|
|
1571
|
+
providers: [NgModel],
|
|
1572
|
+
}]
|
|
1573
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i2$1.NgControl }]; }, propDecorators: { afterEnd: [{
|
|
1574
|
+
type: Input,
|
|
1575
|
+
args: ['afterEnd']
|
|
1576
|
+
}], showBoxError: [{
|
|
1577
|
+
type: Input,
|
|
1578
|
+
args: ['showBoxError']
|
|
1579
|
+
}], onFocusout: [{
|
|
1580
|
+
type: HostListener,
|
|
1581
|
+
args: ['focusout']
|
|
1582
|
+
}] } });
|
|
1583
|
+
|
|
1584
|
+
class ChooseGeneralItemRendererComponent {
|
|
1585
|
+
arrayKey = 'entries';
|
|
1586
|
+
formGroup;
|
|
1587
|
+
items;
|
|
1588
|
+
key;
|
|
1589
|
+
params;
|
|
1590
|
+
validationType = ChooseItemRendererValidationType.NONE;
|
|
1591
|
+
validationTypes = ChooseItemRendererValidationType;
|
|
1592
|
+
clearable = true;
|
|
1593
|
+
templateType = ChooseObjectTemplateType.DEFAULT;
|
|
1594
|
+
basicTemplateData;
|
|
1595
|
+
valueToBind = 'id'; // or null for full object
|
|
1596
|
+
showDropdown = true;
|
|
1597
|
+
constructor() { }
|
|
1598
|
+
agInit(params) {
|
|
1599
|
+
this.params = params;
|
|
1600
|
+
if (params.context.arrayKey) {
|
|
1601
|
+
this.arrayKey = params.context.arrayKey;
|
|
1602
|
+
}
|
|
1603
|
+
this.setupRenderer(params);
|
|
1604
|
+
this.formGroup = params.context.formGroup.get(this.arrayKey).at(params.node.rowIndex);
|
|
1605
|
+
this.key = params.context.createKey(params.columnApi, params.column);
|
|
1606
|
+
}
|
|
1607
|
+
onCellDataChanged($event) {
|
|
1608
|
+
let object = $event;
|
|
1609
|
+
this.formGroup.get(this.key);
|
|
1610
|
+
let rowNode = this.params.node;
|
|
1611
|
+
let valueToBind;
|
|
1612
|
+
if (this.valueToBind === null) {
|
|
1613
|
+
// Case 1: Bind the entire object
|
|
1614
|
+
valueToBind = object;
|
|
1615
|
+
}
|
|
1616
|
+
else if (this.valueToBind && object) {
|
|
1617
|
+
// Case 2: Bind a specific property using dynamic access
|
|
1618
|
+
valueToBind = object[this.valueToBind];
|
|
1619
|
+
}
|
|
1620
|
+
else {
|
|
1621
|
+
// Case 3: Handle null/cleared selection
|
|
1622
|
+
valueToBind = null;
|
|
1623
|
+
}
|
|
1624
|
+
rowNode.setDataValue(this.key, valueToBind);
|
|
1625
|
+
if (this.params.onCellValueChanged instanceof Function) {
|
|
1626
|
+
const params = {
|
|
1627
|
+
value: object?.[this.valueToBind],
|
|
1628
|
+
object: object,
|
|
1629
|
+
rowNode: rowNode,
|
|
1630
|
+
colId: this.params.column.colId,
|
|
1631
|
+
lineFormGroup: this.params.context.formGroup.get(this.arrayKey).at(rowNode.rowIndex),
|
|
1632
|
+
};
|
|
1633
|
+
this.params.onCellValueChanged(params);
|
|
1634
|
+
}
|
|
1635
|
+
if (this.validationType == ChooseItemRendererValidationType.ROW_LEVEL_UNIQUE) {
|
|
1636
|
+
this.setRowLevelUniqueItems(this.params);
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
setupRenderer(params) {
|
|
1640
|
+
if (params.showDropdown === true || params.showDropdown === false) {
|
|
1641
|
+
this.showDropdown = params.showDropdown;
|
|
1642
|
+
}
|
|
1643
|
+
if (params.bindValueKey != undefined) {
|
|
1644
|
+
this.valueToBind = params.bindValueKey;
|
|
1645
|
+
}
|
|
1646
|
+
if (params.clearable != null && params.clearable != undefined) {
|
|
1647
|
+
this.clearable = params.clearable;
|
|
1648
|
+
}
|
|
1649
|
+
if (params.templateType) {
|
|
1650
|
+
this.templateType = params.templateType;
|
|
1651
|
+
}
|
|
1652
|
+
if (params.basicTemplateData) {
|
|
1653
|
+
this.basicTemplateData = params.basicTemplateData;
|
|
1654
|
+
}
|
|
1655
|
+
if (params.chooseItemValidationType != null && params.chooseItemValidationType != undefined) {
|
|
1656
|
+
this.validationType = params.chooseItemValidationType;
|
|
1657
|
+
}
|
|
1658
|
+
if (this.validationType == ChooseItemRendererValidationType.ROW_LEVEL_UNIQUE) {
|
|
1659
|
+
this.setRowLevelUniqueItems(params);
|
|
1660
|
+
}
|
|
1661
|
+
else if (this.validationType == ChooseItemRendererValidationType.NONE) {
|
|
1662
|
+
this.setAllItems(params);
|
|
1663
|
+
}
|
|
1664
|
+
else {
|
|
1665
|
+
throw Error('ChooseGeneralItemRendererValidationType is not recognized.');
|
|
1666
|
+
}
|
|
1667
|
+
}
|
|
1668
|
+
setAllItems(params) {
|
|
1669
|
+
if (params.items) {
|
|
1670
|
+
this.items = params.items;
|
|
1671
|
+
}
|
|
1672
|
+
}
|
|
1673
|
+
setRowLevelUniqueItems(params) {
|
|
1674
|
+
let items;
|
|
1675
|
+
if (params.items) {
|
|
1676
|
+
items = params.items;
|
|
1677
|
+
if (params.value && !items.includes(item => item?.[this.valueToBind] !== params.value)) {
|
|
1678
|
+
let appendedItems = [...items];
|
|
1679
|
+
appendedItems.push(params.allItems.find(item => item?.[this.valueToBind] === params.value));
|
|
1680
|
+
items = appendedItems;
|
|
1681
|
+
}
|
|
1682
|
+
this.items = items;
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
refresh(params) {
|
|
1686
|
+
this.formGroup = this.params.context.formGroup.get(this.arrayKey).at(params.node.rowIndex);
|
|
1687
|
+
this.setupRenderer(params);
|
|
1688
|
+
return true;
|
|
1689
|
+
}
|
|
1690
|
+
get showError() {
|
|
1691
|
+
if (this.formGroup.get(this.key).errors && this.formGroup.get(this.key).touched) {
|
|
1692
|
+
return true;
|
|
1693
|
+
}
|
|
1694
|
+
else {
|
|
1695
|
+
return false;
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1698
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChooseGeneralItemRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1699
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ChooseGeneralItemRendererComponent, selector: "choose-general-item-renderer", ngImport: i0, template: "<div class=\"all\" [ngClass]=\"{ single: !showError, double: showError }\"\r\n *ngIf=\"formGroup && showDropdown\" [formGroup]=\"formGroup\">\r\n <choose-general-item [bindValueKey]=\"valueToBind\" [clearable]=\"clearable\"\r\n [items]=\"items\" appFormControlValidationMsgForNgSelect [formControlName]=\"key\"\r\n [label]=\"params.label\" [appendTo]=\"'body'\" [placeholder]=\"params.placeholder\"\r\n [isMultiple]=\"params.isMultiple\" [objects]=\"params.objects\"\r\n [showLabel]=\"params.showLabel\" [separator]=\"params.separator\"\r\n [width]=\"params.width\" [isChip]=\"params.isChip\" [isTypeDate]=\"params.isTypeDate\"\r\n [chipColor]=\"params.chipColor\" [chipTextColor]=\"params.chipTextColor\"\r\n [basicTemplateData]=\"basicTemplateData\" [templateType]=\"templateType\"\r\n [chipWidth]=\"params.chipWidth\" (change)=\"onCellDataChanged($event)\"\r\n [showBoxError]=\"false\">\r\n </choose-general-item>\r\n <tooltip-msg-error [control]=\"formGroup.get(this.key)\" *ngIf=\"showError\"\r\n [message]=\"formGroup.get(key).errors.message\"></tooltip-msg-error>\r\n</div>\r\n<div class=\"center\" *ngIf=\"!showDropdown\">-</div>", styles: [".center{display:grid;align-items:center;justify-items:center}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ChooseGeneralItemComponent, selector: "choose-general-item", inputs: ["items", "label", "appendTo", "placeholder", "apiPath", "isMultiple", "hideSelectedItem", "objects", "showLabel", "separator", "width", "isChip", "isTypeDate", "chipColor", "chipTextColor", "chipWidth", "selectedItemId", "disabled", "readOnly", "useFullObject", "showAdd", "dialogComponentClass", "showDialogDefaultButtons", "dialogComponentInputs", "bindValueKey", "addRoute", "canActionsRoute", "dialogTitle", "clearable", "filterParams", "templateType", "basicTemplateData", "contentProjectionLabelKey", "fullObjectControlConfig"], outputs: ["change", "blur"] }, { kind: "directive", type: FormControlValidationMsgDirectiveForNgSelect, selector: "[appFormControlValidationMsgForNgSelect]", inputs: ["afterEnd", "showBoxError"] }, { kind: "component", type: TooltipMsgError, selector: "tooltip-msg-error", inputs: ["width", "control", "messageType", "message"] }] });
|
|
1700
|
+
}
|
|
1701
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChooseGeneralItemRendererComponent, decorators: [{
|
|
1702
|
+
type: Component,
|
|
1703
|
+
args: [{ selector: 'choose-general-item-renderer', template: "<div class=\"all\" [ngClass]=\"{ single: !showError, double: showError }\"\r\n *ngIf=\"formGroup && showDropdown\" [formGroup]=\"formGroup\">\r\n <choose-general-item [bindValueKey]=\"valueToBind\" [clearable]=\"clearable\"\r\n [items]=\"items\" appFormControlValidationMsgForNgSelect [formControlName]=\"key\"\r\n [label]=\"params.label\" [appendTo]=\"'body'\" [placeholder]=\"params.placeholder\"\r\n [isMultiple]=\"params.isMultiple\" [objects]=\"params.objects\"\r\n [showLabel]=\"params.showLabel\" [separator]=\"params.separator\"\r\n [width]=\"params.width\" [isChip]=\"params.isChip\" [isTypeDate]=\"params.isTypeDate\"\r\n [chipColor]=\"params.chipColor\" [chipTextColor]=\"params.chipTextColor\"\r\n [basicTemplateData]=\"basicTemplateData\" [templateType]=\"templateType\"\r\n [chipWidth]=\"params.chipWidth\" (change)=\"onCellDataChanged($event)\"\r\n [showBoxError]=\"false\">\r\n </choose-general-item>\r\n <tooltip-msg-error [control]=\"formGroup.get(this.key)\" *ngIf=\"showError\"\r\n [message]=\"formGroup.get(key).errors.message\"></tooltip-msg-error>\r\n</div>\r\n<div class=\"center\" *ngIf=\"!showDropdown\">-</div>", styles: [".center{display:grid;align-items:center;justify-items:center}\n"] }]
|
|
1704
|
+
}], ctorParameters: function () { return []; } });
|
|
1705
|
+
|
|
1706
|
+
var LineType;
|
|
1707
|
+
(function (LineType) {
|
|
1708
|
+
LineType[LineType["INCLUDE"] = 0] = "INCLUDE";
|
|
1709
|
+
LineType[LineType["DO_NOT_INCLUDE"] = 1] = "DO_NOT_INCLUDE";
|
|
1710
|
+
})(LineType || (LineType = {}));
|
|
1711
|
+
|
|
1712
|
+
class LineTypeModelHelper {
|
|
1713
|
+
static label;
|
|
1714
|
+
static color;
|
|
1715
|
+
static description;
|
|
1716
|
+
static value;
|
|
1717
|
+
static getItems() {
|
|
1718
|
+
let items = [];
|
|
1719
|
+
let values = Object.values(LineType);
|
|
1720
|
+
let types = values.filter(value => typeof value === 'number');
|
|
1721
|
+
for (let value of types) {
|
|
1722
|
+
this.setStringValueAndColor(value);
|
|
1723
|
+
items.push({ value: value, label: this.label, color: this.color, description: this.description });
|
|
1724
|
+
}
|
|
1725
|
+
return items;
|
|
1726
|
+
}
|
|
1727
|
+
static setStringValueAndColor(type) {
|
|
1728
|
+
switch (type) {
|
|
1729
|
+
case LineType.INCLUDE:
|
|
1730
|
+
return this.label = "Include", this.color = "gold";
|
|
1731
|
+
break;
|
|
1732
|
+
case LineType.DO_NOT_INCLUDE:
|
|
1733
|
+
return this.label = "Do Not Include", this.color = "platinum";
|
|
1734
|
+
break;
|
|
1735
|
+
default:
|
|
1736
|
+
return this.label = "Undefined", this.color = "Gray";
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
getValue(label) {
|
|
1740
|
+
let value;
|
|
1741
|
+
switch (label) {
|
|
1742
|
+
case "Include":
|
|
1743
|
+
return value = 0;
|
|
1744
|
+
break;
|
|
1745
|
+
case "Do Not Include":
|
|
1746
|
+
return value = 1;
|
|
1747
|
+
break;
|
|
1748
|
+
default:
|
|
1749
|
+
return null;
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
static getLabelAndColorForValue(value) {
|
|
1753
|
+
for (let item of this.getItems()) {
|
|
1754
|
+
if (item.value == value) {
|
|
1755
|
+
this.value = item;
|
|
1756
|
+
return this.value;
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
class ChooseLineTypeComponent {
|
|
1763
|
+
items = LineTypeModelHelper;
|
|
1764
|
+
selectedItem;
|
|
1765
|
+
types;
|
|
1766
|
+
constructor() { }
|
|
1767
|
+
ngOnInit() {
|
|
1768
|
+
this.types = this.items.getItems();
|
|
1769
|
+
}
|
|
1770
|
+
writeValue(type) {
|
|
1771
|
+
if (type != undefined || type != null) {
|
|
1772
|
+
this.selectedItem = type;
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
registerOnChange(fn) {
|
|
1776
|
+
this.propagateChange = fn;
|
|
1777
|
+
}
|
|
1778
|
+
registerOnTouched(fn) {
|
|
1779
|
+
this.propogateTouch = fn;
|
|
1780
|
+
}
|
|
1781
|
+
propagateChange = (_) => { };
|
|
1782
|
+
propogateTouch = () => { };
|
|
1783
|
+
updateBlur() {
|
|
1784
|
+
this.propogateTouch();
|
|
1785
|
+
}
|
|
1786
|
+
onSelectedItemChanged() {
|
|
1787
|
+
this.propagateChange(this.selectedItem);
|
|
1788
|
+
}
|
|
1789
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChooseLineTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1790
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ChooseLineTypeComponent, selector: "choose-line-type", providers: [
|
|
1791
|
+
{
|
|
1792
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1793
|
+
useExisting: forwardRef(() => ChooseLineTypeComponent),
|
|
1794
|
+
multi: true,
|
|
1795
|
+
},
|
|
1796
|
+
], ngImport: i0, template: "<div class=\"select\">\r\n <ng-select class=\"type\" appendTo=\"body\" (blur)=\"updateBlur()\" bindLabel=\"label\" bindValue=\"label\" [items]=\"types\"\r\n [placeholder]=\"'Choose A Component'\" (change)=\"onSelectedItemChanged()\" [(ngModel)]=\"selectedItem\">\r\n <ng-template class=\"template\" ng-option-tmp ng-label-tmp let-item=\"item\" let-index=\"index\">\r\n {{item.label}}\r\n </ng-template>\r\n </ng-select>\r\n</div>", styles: [".type{width:250px}\n"], dependencies: [{ kind: "component", type: i2.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i2.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "directive", type: i2.NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
1797
|
+
}
|
|
1798
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChooseLineTypeComponent, decorators: [{
|
|
1799
|
+
type: Component,
|
|
1800
|
+
args: [{ selector: 'choose-line-type', providers: [
|
|
1801
|
+
{
|
|
1802
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1803
|
+
useExisting: forwardRef(() => ChooseLineTypeComponent),
|
|
1804
|
+
multi: true,
|
|
1805
|
+
},
|
|
1806
|
+
], template: "<div class=\"select\">\r\n <ng-select class=\"type\" appendTo=\"body\" (blur)=\"updateBlur()\" bindLabel=\"label\" bindValue=\"label\" [items]=\"types\"\r\n [placeholder]=\"'Choose A Component'\" (change)=\"onSelectedItemChanged()\" [(ngModel)]=\"selectedItem\">\r\n <ng-template class=\"template\" ng-option-tmp ng-label-tmp let-item=\"item\" let-index=\"index\">\r\n {{item.label}}\r\n </ng-template>\r\n </ng-select>\r\n</div>", styles: [".type{width:250px}\n"] }]
|
|
1807
|
+
}], ctorParameters: function () { return []; } });
|
|
1808
|
+
|
|
1809
|
+
class ChooseYesOrNoComponent {
|
|
1810
|
+
change = new EventEmitter();
|
|
1811
|
+
items = [{ value: true, label: "Yes", color: "green" }, { value: false, label: "No", color: "red" }];
|
|
1812
|
+
width = 200;
|
|
1813
|
+
selectedItemValue;
|
|
1814
|
+
placeholder = "Choose either Yes or No";
|
|
1815
|
+
constructor() { }
|
|
1816
|
+
ngOnInit() {
|
|
1817
|
+
}
|
|
1818
|
+
writeValue(item) {
|
|
1819
|
+
if (item != undefined || item != null) {
|
|
1820
|
+
this.selectedItemValue = item;
|
|
1821
|
+
}
|
|
1475
1822
|
}
|
|
1476
1823
|
registerOnChange(fn) {
|
|
1477
1824
|
this.propagateChange = fn;
|
|
@@ -1592,273 +1939,106 @@ class EditableSavableInputComponent {
|
|
|
1592
1939
|
ngOnInit() {
|
|
1593
1940
|
this.initialize();
|
|
1594
1941
|
}
|
|
1595
|
-
initialize() {
|
|
1596
|
-
if (this.value == "") {
|
|
1597
|
-
this.isUpdated = false;
|
|
1598
|
-
}
|
|
1599
|
-
else {
|
|
1600
|
-
this.isUpdated = true;
|
|
1601
|
-
}
|
|
1602
|
-
}
|
|
1603
|
-
onClickAdd() {
|
|
1604
|
-
this.isAddClickedOn = true;
|
|
1605
|
-
}
|
|
1606
|
-
onClickCancel() {
|
|
1607
|
-
this.isAddClickedOn = false;
|
|
1608
|
-
}
|
|
1609
|
-
onClickSave(input) {
|
|
1610
|
-
this.isAddClickedOn = false;
|
|
1611
|
-
let value = input.value;
|
|
1612
|
-
if (value.trim().length == 0) {
|
|
1613
|
-
this.isUpdated = false;
|
|
1614
|
-
}
|
|
1615
|
-
else {
|
|
1616
|
-
this.isUpdated = true;
|
|
1617
|
-
}
|
|
1618
|
-
this.value = value;
|
|
1619
|
-
this.saveWasClicked.emit(value);
|
|
1620
|
-
this.propagateChange(this.value);
|
|
1621
|
-
}
|
|
1622
|
-
onClickEdit() {
|
|
1623
|
-
this.isAddClickedOn = true;
|
|
1624
|
-
}
|
|
1625
|
-
onMouseEnter() {
|
|
1626
|
-
this.showEdit = true;
|
|
1627
|
-
}
|
|
1628
|
-
onMouseLeave() {
|
|
1629
|
-
this.showEdit = false;
|
|
1630
|
-
}
|
|
1631
|
-
writeValue(value) {
|
|
1632
|
-
if (value) {
|
|
1633
|
-
this.value = value;
|
|
1634
|
-
this.isUpdated = true;
|
|
1635
|
-
}
|
|
1636
|
-
}
|
|
1637
|
-
// registers 'fn' that will be fired wheb changes are made
|
|
1638
|
-
// this is how we emit the changes back to the form
|
|
1639
|
-
registerOnChange(fn) {
|
|
1640
|
-
this.propagateChange = fn;
|
|
1641
|
-
}
|
|
1642
|
-
registerOnTouched(fn) {
|
|
1643
|
-
this.propogateTouch = fn;
|
|
1644
|
-
}
|
|
1645
|
-
// the method set in registerOnChange to emit changes back to the form
|
|
1646
|
-
propagateChange = (_) => { };
|
|
1647
|
-
propogateTouch = () => { };
|
|
1648
|
-
onChange($event) {
|
|
1649
|
-
//this.propagateChange(this.value);
|
|
1650
|
-
}
|
|
1651
|
-
updateBlur() {
|
|
1652
|
-
this.propogateTouch();
|
|
1653
|
-
}
|
|
1654
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EditableSavableInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1655
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EditableSavableInputComponent, selector: "editable-savable-input", inputs: { defaultvalue: "defaultvalue", inputType: "inputType", newLabel: "newLabel", headerLabel: "headerLabel", showUnit: "showUnit", unit: "unit", unitType: "unitType", isEditable: "isEditable", showHeader: "showHeader", value: "value" }, outputs: { saveWasClicked: "saveWasClicked" }, providers: [DynamicPipe,
|
|
1656
|
-
{
|
|
1657
|
-
provide: NG_VALUE_ACCESSOR,
|
|
1658
|
-
useExisting: forwardRef(() => EditableSavableInputComponent),
|
|
1659
|
-
multi: true
|
|
1660
|
-
}
|
|
1661
|
-
], ngImport: i0, template: "<div *ngIf=\"showHeader\" class=\"header\">\r\n {{headerLabel}}\r\n</div>\r\n<div class=\"container\" [ngClass]=\"{'closed':!isAddClickedOn, 'open': isAddClickedOn}\">\r\n <div class=\"content\">\r\n <div class=\"default-content\" *ngIf=\"!isAddClickedOn && !isUpdated && isEditable\">\r\n <div class=\"add\" (click)=\"onClickAdd()\">\r\n {{defaultvalue}} </div>\r\n </div>\r\n <div class=\"edit-content\" *ngIf=\"isAddClickedOn\">\r\n <label class=\"input-label\" for=\"input\">{{newLabel}}</label>\r\n <div class=\"input \" [ngClass]=\"{'input-with-appended-unit': showUnit}\">\r\n <span *ngIf=\"showUnit\">{{unit}}</span>\r\n <input (change)=\"onChange($event)\" (blur)=\"updateBlur()\" [ngModel]=\"value\" [value]=\"value\" id=\"input\" #input\r\n class=\"form-control\" [ngClass]=\"{'input-box': showUnit}\" [type]=\"inputType\">\r\n </div>\r\n <div class=\"edit-actions\">\r\n <button type=\"button\" class=\"btn cancel\" (click)=\"onClickCancel()\" mat-raised-button>Cancel</button>\r\n <button type=\"button\" class=\"save\" (click)=\"onClickSave(input)\" mat-raised-button color=\"primary\">Save</button>\r\n </div>\r\n </div>\r\n <div class=\"updated-content closed\" *ngIf=\"!isAddClickedOn && isUpdated\" (mouseenter)=\"onMouseEnter()\"\r\n (mouseleave)=\"onMouseLeave()\">\r\n <div class=\"edit-icon-container\" *ngIf=\"showEdit && isEditable\" (click)=\"onClickEdit()\">\r\n <i class=\"fas fa-pencil-alt\"></i>\r\n </div>\r\n <div class=\"updated\">\r\n <span class=\"updated-label\">\r\n <label for=\"input\">{{newLabel}}</label>\r\n </span>\r\n <span *ngIf=\"!showUnit\">{{value}}</span>\r\n <span *ngIf=\"showUnit\" class=\"updated-value\">\r\n {{value | dynamicPipe: unitType}}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".container{display:block;width:100%}.open{height:120px}.closed{height:40px}.edit-icon-container{position:absolute;right:0%;transform:translate(0);top:0;cursor:pointer}.edit-icon-container:hover{background-color:gray;color:#fff;padding:2px}label,.updated-label{color:gray;margin-right:5px}#input{display:inline}.cancel{grid-column:1;grid-row:2;height:80%;width:80px}.save{grid-column:2;grid-row:2;height:80%;width:80px}.default-content{position:absolute}.input{width:280px;grid-column:2;grid-row:1}.input-box{width:200px}.input-label{grid-column:1;grid-row:1}.updated{position:absolute}.add{color:#00f}.add:hover{text-decoration:underline;cursor:pointer}.content{position:relative}.btn:focus{outline:none!important}.edit-content{position:absolute;left:50%;transform:translate(-50%);display:grid;grid-template-columns:150px 200px;grid-template-rows:50px 50px}.updated-content{display:block}.header{color:gray;border-bottom:1px solid grey;height:30px;font-size:20px;margin-bottom:10px;margin-top:10px}.input-with-appended-unit input{padding-left:20px;text-align:left}.input-with-appended-unit span{position:relative;left:20px;color:gray}.edit-actions{grid-column:2;grid-row:2;display:grid;grid-template-columns:50% 50%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: DynamicPipe, name: "dynamicPipe" }] });
|
|
1662
|
-
}
|
|
1663
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EditableSavableInputComponent, decorators: [{
|
|
1664
|
-
type: Component,
|
|
1665
|
-
args: [{ selector: 'editable-savable-input', providers: [DynamicPipe,
|
|
1666
|
-
{
|
|
1667
|
-
provide: NG_VALUE_ACCESSOR,
|
|
1668
|
-
useExisting: forwardRef(() => EditableSavableInputComponent),
|
|
1669
|
-
multi: true
|
|
1670
|
-
}
|
|
1671
|
-
], template: "<div *ngIf=\"showHeader\" class=\"header\">\r\n {{headerLabel}}\r\n</div>\r\n<div class=\"container\" [ngClass]=\"{'closed':!isAddClickedOn, 'open': isAddClickedOn}\">\r\n <div class=\"content\">\r\n <div class=\"default-content\" *ngIf=\"!isAddClickedOn && !isUpdated && isEditable\">\r\n <div class=\"add\" (click)=\"onClickAdd()\">\r\n {{defaultvalue}} </div>\r\n </div>\r\n <div class=\"edit-content\" *ngIf=\"isAddClickedOn\">\r\n <label class=\"input-label\" for=\"input\">{{newLabel}}</label>\r\n <div class=\"input \" [ngClass]=\"{'input-with-appended-unit': showUnit}\">\r\n <span *ngIf=\"showUnit\">{{unit}}</span>\r\n <input (change)=\"onChange($event)\" (blur)=\"updateBlur()\" [ngModel]=\"value\" [value]=\"value\" id=\"input\" #input\r\n class=\"form-control\" [ngClass]=\"{'input-box': showUnit}\" [type]=\"inputType\">\r\n </div>\r\n <div class=\"edit-actions\">\r\n <button type=\"button\" class=\"btn cancel\" (click)=\"onClickCancel()\" mat-raised-button>Cancel</button>\r\n <button type=\"button\" class=\"save\" (click)=\"onClickSave(input)\" mat-raised-button color=\"primary\">Save</button>\r\n </div>\r\n </div>\r\n <div class=\"updated-content closed\" *ngIf=\"!isAddClickedOn && isUpdated\" (mouseenter)=\"onMouseEnter()\"\r\n (mouseleave)=\"onMouseLeave()\">\r\n <div class=\"edit-icon-container\" *ngIf=\"showEdit && isEditable\" (click)=\"onClickEdit()\">\r\n <i class=\"fas fa-pencil-alt\"></i>\r\n </div>\r\n <div class=\"updated\">\r\n <span class=\"updated-label\">\r\n <label for=\"input\">{{newLabel}}</label>\r\n </span>\r\n <span *ngIf=\"!showUnit\">{{value}}</span>\r\n <span *ngIf=\"showUnit\" class=\"updated-value\">\r\n {{value | dynamicPipe: unitType}}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".container{display:block;width:100%}.open{height:120px}.closed{height:40px}.edit-icon-container{position:absolute;right:0%;transform:translate(0);top:0;cursor:pointer}.edit-icon-container:hover{background-color:gray;color:#fff;padding:2px}label,.updated-label{color:gray;margin-right:5px}#input{display:inline}.cancel{grid-column:1;grid-row:2;height:80%;width:80px}.save{grid-column:2;grid-row:2;height:80%;width:80px}.default-content{position:absolute}.input{width:280px;grid-column:2;grid-row:1}.input-box{width:200px}.input-label{grid-column:1;grid-row:1}.updated{position:absolute}.add{color:#00f}.add:hover{text-decoration:underline;cursor:pointer}.content{position:relative}.btn:focus{outline:none!important}.edit-content{position:absolute;left:50%;transform:translate(-50%);display:grid;grid-template-columns:150px 200px;grid-template-rows:50px 50px}.updated-content{display:block}.header{color:gray;border-bottom:1px solid grey;height:30px;font-size:20px;margin-bottom:10px;margin-top:10px}.input-with-appended-unit input{padding-left:20px;text-align:left}.input-with-appended-unit span{position:relative;left:20px;color:gray}.edit-actions{grid-column:2;grid-row:2;display:grid;grid-template-columns:50% 50%}\n"] }]
|
|
1672
|
-
}], ctorParameters: function () { return []; }, propDecorators: { saveWasClicked: [{
|
|
1673
|
-
type: Output
|
|
1674
|
-
}], defaultvalue: [{
|
|
1675
|
-
type: Input
|
|
1676
|
-
}], inputType: [{
|
|
1677
|
-
type: Input
|
|
1678
|
-
}], newLabel: [{
|
|
1679
|
-
type: Input
|
|
1680
|
-
}], headerLabel: [{
|
|
1681
|
-
type: Input
|
|
1682
|
-
}], showUnit: [{
|
|
1683
|
-
type: Input
|
|
1684
|
-
}], unit: [{
|
|
1685
|
-
type: Input
|
|
1686
|
-
}], unitType: [{
|
|
1687
|
-
type: Input
|
|
1688
|
-
}], isEditable: [{
|
|
1689
|
-
type: Input
|
|
1690
|
-
}], showHeader: [{
|
|
1691
|
-
type: Input
|
|
1692
|
-
}], value: [{
|
|
1693
|
-
type: Input
|
|
1694
|
-
}] } });
|
|
1695
|
-
|
|
1696
|
-
class CustomDecimalPointTwoDigitsDirective {
|
|
1697
|
-
control;
|
|
1698
|
-
valueSubscription;
|
|
1699
|
-
constructor(control) {
|
|
1700
|
-
this.control = control;
|
|
1701
|
-
}
|
|
1702
|
-
ngOnInit() {
|
|
1703
|
-
if (this.control.value) {
|
|
1704
|
-
this.control.valueAccessor.writeValue(this.transformToCommasAndPoint(this.control.value));
|
|
1705
|
-
}
|
|
1706
|
-
this.valueSubscription = this.control.control.valueChanges.subscribe(value => {
|
|
1707
|
-
if (value.length > 0) {
|
|
1708
|
-
let removeCommas = this.control.value.replace(/,/g, '');
|
|
1709
|
-
this.control.control.setValue(removeCommas, { emitEvent: false, emitModelToViewChange: false });
|
|
1710
|
-
}
|
|
1711
|
-
else {
|
|
1712
|
-
this.control.control.setValue(null, { emitEvent: false, emitModelToViewChange: false });
|
|
1713
|
-
}
|
|
1714
|
-
});
|
|
1715
|
-
}
|
|
1716
|
-
onEvent($event) {
|
|
1717
|
-
if (this.control.value) {
|
|
1718
|
-
const item = $event.target;
|
|
1719
|
-
item.value = this.transformToCommasAndPoint(this.control.value);
|
|
1720
|
-
let removeCommas = this.control.value.replace(/,/g, '');
|
|
1721
|
-
this.control.control.setValue(removeCommas, { emitEvent: false, emitModelToViewChange: false });
|
|
1722
|
-
}
|
|
1723
|
-
}
|
|
1724
|
-
transformToCommasAndPoint(value) {
|
|
1725
|
-
if (value.indexOf(".") == -1) {
|
|
1726
|
-
value = value.toString().replace(/\D/g, "")
|
|
1727
|
-
.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
1728
|
-
return value;
|
|
1729
|
-
}
|
|
1730
|
-
else {
|
|
1731
|
-
let val = value.split(".");
|
|
1732
|
-
let valueBeforeDecimal = val[0];
|
|
1733
|
-
let valueAfterDecimal = val[1];
|
|
1734
|
-
valueBeforeDecimal = valueBeforeDecimal.toString().replace(/\D/g, "")
|
|
1735
|
-
.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
1736
|
-
let newValue = `${valueBeforeDecimal}.${valueAfterDecimal}`;
|
|
1737
|
-
return newValue;
|
|
1738
|
-
}
|
|
1739
|
-
}
|
|
1740
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CustomDecimalPointTwoDigitsDirective, deps: [{ token: i2$1.NgControl }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1741
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: CustomDecimalPointTwoDigitsDirective, selector: "[customDecimalPointTwoDigits]", host: { listeners: { "input": "onEvent($event)" } }, providers: [NgModel, DecimalPipe], ngImport: i0 });
|
|
1742
|
-
}
|
|
1743
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CustomDecimalPointTwoDigitsDirective, decorators: [{
|
|
1744
|
-
type: Directive,
|
|
1745
|
-
args: [{
|
|
1746
|
-
selector: '[customDecimalPointTwoDigits]',
|
|
1747
|
-
providers: [NgModel, DecimalPipe],
|
|
1748
|
-
}]
|
|
1749
|
-
}], ctorParameters: function () { return [{ type: i2$1.NgControl }]; }, propDecorators: { onEvent: [{
|
|
1750
|
-
type: HostListener,
|
|
1751
|
-
args: ["input", ["$event"]]
|
|
1752
|
-
}] } });
|
|
1753
|
-
|
|
1754
|
-
class ValidationMessageService {
|
|
1755
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ValidationMessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1756
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ValidationMessageService, providedIn: 'root' });
|
|
1757
|
-
}
|
|
1758
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ValidationMessageService, decorators: [{
|
|
1759
|
-
type: Injectable,
|
|
1760
|
-
args: [{
|
|
1761
|
-
providedIn: 'root'
|
|
1762
|
-
}]
|
|
1763
|
-
}] });
|
|
1764
|
-
class MinLengthValidationError {
|
|
1765
|
-
requirement;
|
|
1766
|
-
constructor(requirement) {
|
|
1767
|
-
this.requirement = requirement;
|
|
1768
|
-
}
|
|
1769
|
-
buildMessage() {
|
|
1770
|
-
return "Must be a minimum length of " + this.requirement + " letters!";
|
|
1771
|
-
}
|
|
1772
|
-
}
|
|
1773
|
-
class InvalidIntegerNumberValidatorEerror {
|
|
1774
|
-
buildMessage() {
|
|
1775
|
-
return "Must only contain numbers, no decimals or words allowed";
|
|
1776
|
-
}
|
|
1777
|
-
}
|
|
1778
|
-
class PositiveIntegerNumberValidatorError {
|
|
1779
|
-
buildMessage() {
|
|
1780
|
-
return "Must be a positive integer";
|
|
1781
|
-
}
|
|
1782
|
-
}
|
|
1783
|
-
class MaxLengthValidationError {
|
|
1784
|
-
requirement;
|
|
1785
|
-
constructor(requirement) {
|
|
1786
|
-
this.requirement = requirement;
|
|
1787
|
-
}
|
|
1788
|
-
buildMessage() {
|
|
1789
|
-
return "Must be a maximum length of " + this.requirement + " letters!";
|
|
1942
|
+
initialize() {
|
|
1943
|
+
if (this.value == "") {
|
|
1944
|
+
this.isUpdated = false;
|
|
1945
|
+
}
|
|
1946
|
+
else {
|
|
1947
|
+
this.isUpdated = true;
|
|
1948
|
+
}
|
|
1790
1949
|
}
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
requirement;
|
|
1794
|
-
constructor(requirement) {
|
|
1795
|
-
this.requirement = requirement;
|
|
1950
|
+
onClickAdd() {
|
|
1951
|
+
this.isAddClickedOn = true;
|
|
1796
1952
|
}
|
|
1797
|
-
|
|
1798
|
-
|
|
1953
|
+
onClickCancel() {
|
|
1954
|
+
this.isAddClickedOn = false;
|
|
1799
1955
|
}
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1956
|
+
onClickSave(input) {
|
|
1957
|
+
this.isAddClickedOn = false;
|
|
1958
|
+
let value = input.value;
|
|
1959
|
+
if (value.trim().length == 0) {
|
|
1960
|
+
this.isUpdated = false;
|
|
1961
|
+
}
|
|
1962
|
+
else {
|
|
1963
|
+
this.isUpdated = true;
|
|
1964
|
+
}
|
|
1965
|
+
this.value = value;
|
|
1966
|
+
this.saveWasClicked.emit(value);
|
|
1967
|
+
this.propagateChange(this.value);
|
|
1805
1968
|
}
|
|
1806
|
-
|
|
1807
|
-
|
|
1969
|
+
onClickEdit() {
|
|
1970
|
+
this.isAddClickedOn = true;
|
|
1808
1971
|
}
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
requirement;
|
|
1812
|
-
constructor(requirement) {
|
|
1813
|
-
this.requirement = requirement;
|
|
1972
|
+
onMouseEnter() {
|
|
1973
|
+
this.showEdit = true;
|
|
1814
1974
|
}
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
else if (this.requirement = 'forDate') {
|
|
1823
|
-
return "Date needs to be DD/MM/YYYY";
|
|
1975
|
+
onMouseLeave() {
|
|
1976
|
+
this.showEdit = false;
|
|
1977
|
+
}
|
|
1978
|
+
writeValue(value) {
|
|
1979
|
+
if (value) {
|
|
1980
|
+
this.value = value;
|
|
1981
|
+
this.isUpdated = true;
|
|
1824
1982
|
}
|
|
1825
1983
|
}
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1984
|
+
// registers 'fn' that will be fired wheb changes are made
|
|
1985
|
+
// this is how we emit the changes back to the form
|
|
1986
|
+
registerOnChange(fn) {
|
|
1987
|
+
this.propagateChange = fn;
|
|
1830
1988
|
}
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
buildMessage() {
|
|
1834
|
-
return "Make Sure It Is An Email Format" + "<br>" + "example@jooler.io";
|
|
1989
|
+
registerOnTouched(fn) {
|
|
1990
|
+
this.propogateTouch = fn;
|
|
1835
1991
|
}
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
return validationMessage;
|
|
1992
|
+
// the method set in registerOnChange to emit changes back to the form
|
|
1993
|
+
propagateChange = (_) => { };
|
|
1994
|
+
propogateTouch = () => { };
|
|
1995
|
+
onChange($event) {
|
|
1996
|
+
//this.propagateChange(this.value);
|
|
1842
1997
|
}
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
'minlength': new MinLengthValidationError(value).buildMessage(),
|
|
1846
|
-
'maxlength': new MaxLengthValidationError(value).buildMessage(),
|
|
1847
|
-
'max': new MaxValidationError(value).buildMessage(),
|
|
1848
|
-
'min': new MinValidationError(value).buildMessage(),
|
|
1849
|
-
'pattern': new PatternValidatorError(value).buildMessage(),
|
|
1850
|
-
'required': new RequiredValidatorError().buildMessage(),
|
|
1851
|
-
'email': new EmailValidatorError().buildMessage(),
|
|
1852
|
-
'invalidIntegerNumber': new InvalidIntegerNumberValidatorEerror().buildMessage(),
|
|
1853
|
-
'invalidPositiveInteger': new PositiveIntegerNumberValidatorError().buildMessage(),
|
|
1854
|
-
};
|
|
1855
|
-
return ValidationMessageForInput[validationType];
|
|
1998
|
+
updateBlur() {
|
|
1999
|
+
this.propogateTouch();
|
|
1856
2000
|
}
|
|
1857
|
-
static
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
2001
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EditableSavableInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2002
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EditableSavableInputComponent, selector: "editable-savable-input", inputs: { defaultvalue: "defaultvalue", inputType: "inputType", newLabel: "newLabel", headerLabel: "headerLabel", showUnit: "showUnit", unit: "unit", unitType: "unitType", isEditable: "isEditable", showHeader: "showHeader", value: "value" }, outputs: { saveWasClicked: "saveWasClicked" }, providers: [DynamicPipe,
|
|
2003
|
+
{
|
|
2004
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2005
|
+
useExisting: forwardRef(() => EditableSavableInputComponent),
|
|
2006
|
+
multi: true
|
|
2007
|
+
}
|
|
2008
|
+
], ngImport: i0, template: "<div *ngIf=\"showHeader\" class=\"header\">\r\n {{headerLabel}}\r\n</div>\r\n<div class=\"container\" [ngClass]=\"{'closed':!isAddClickedOn, 'open': isAddClickedOn}\">\r\n <div class=\"content\">\r\n <div class=\"default-content\" *ngIf=\"!isAddClickedOn && !isUpdated && isEditable\">\r\n <div class=\"add\" (click)=\"onClickAdd()\">\r\n {{defaultvalue}} </div>\r\n </div>\r\n <div class=\"edit-content\" *ngIf=\"isAddClickedOn\">\r\n <label class=\"input-label\" for=\"input\">{{newLabel}}</label>\r\n <div class=\"input \" [ngClass]=\"{'input-with-appended-unit': showUnit}\">\r\n <span *ngIf=\"showUnit\">{{unit}}</span>\r\n <input (change)=\"onChange($event)\" (blur)=\"updateBlur()\" [ngModel]=\"value\" [value]=\"value\" id=\"input\" #input\r\n class=\"form-control\" [ngClass]=\"{'input-box': showUnit}\" [type]=\"inputType\">\r\n </div>\r\n <div class=\"edit-actions\">\r\n <button type=\"button\" class=\"btn cancel\" (click)=\"onClickCancel()\" mat-raised-button>Cancel</button>\r\n <button type=\"button\" class=\"save\" (click)=\"onClickSave(input)\" mat-raised-button color=\"primary\">Save</button>\r\n </div>\r\n </div>\r\n <div class=\"updated-content closed\" *ngIf=\"!isAddClickedOn && isUpdated\" (mouseenter)=\"onMouseEnter()\"\r\n (mouseleave)=\"onMouseLeave()\">\r\n <div class=\"edit-icon-container\" *ngIf=\"showEdit && isEditable\" (click)=\"onClickEdit()\">\r\n <i class=\"fas fa-pencil-alt\"></i>\r\n </div>\r\n <div class=\"updated\">\r\n <span class=\"updated-label\">\r\n <label for=\"input\">{{newLabel}}</label>\r\n </span>\r\n <span *ngIf=\"!showUnit\">{{value}}</span>\r\n <span *ngIf=\"showUnit\" class=\"updated-value\">\r\n {{value | dynamicPipe: unitType}}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".container{display:block;width:100%}.open{height:120px}.closed{height:40px}.edit-icon-container{position:absolute;right:0%;transform:translate(0);top:0;cursor:pointer}.edit-icon-container:hover{background-color:gray;color:#fff;padding:2px}label,.updated-label{color:gray;margin-right:5px}#input{display:inline}.cancel{grid-column:1;grid-row:2;height:80%;width:80px}.save{grid-column:2;grid-row:2;height:80%;width:80px}.default-content{position:absolute}.input{width:280px;grid-column:2;grid-row:1}.input-box{width:200px}.input-label{grid-column:1;grid-row:1}.updated{position:absolute}.add{color:#00f}.add:hover{text-decoration:underline;cursor:pointer}.content{position:relative}.btn:focus{outline:none!important}.edit-content{position:absolute;left:50%;transform:translate(-50%);display:grid;grid-template-columns:150px 200px;grid-template-rows:50px 50px}.updated-content{display:block}.header{color:gray;border-bottom:1px solid grey;height:30px;font-size:20px;margin-bottom:10px;margin-top:10px}.input-with-appended-unit input{padding-left:20px;text-align:left}.input-with-appended-unit span{position:relative;left:20px;color:gray}.edit-actions{grid-column:2;grid-row:2;display:grid;grid-template-columns:50% 50%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: DynamicPipe, name: "dynamicPipe" }] });
|
|
1861
2009
|
}
|
|
2010
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EditableSavableInputComponent, decorators: [{
|
|
2011
|
+
type: Component,
|
|
2012
|
+
args: [{ selector: 'editable-savable-input', providers: [DynamicPipe,
|
|
2013
|
+
{
|
|
2014
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2015
|
+
useExisting: forwardRef(() => EditableSavableInputComponent),
|
|
2016
|
+
multi: true
|
|
2017
|
+
}
|
|
2018
|
+
], template: "<div *ngIf=\"showHeader\" class=\"header\">\r\n {{headerLabel}}\r\n</div>\r\n<div class=\"container\" [ngClass]=\"{'closed':!isAddClickedOn, 'open': isAddClickedOn}\">\r\n <div class=\"content\">\r\n <div class=\"default-content\" *ngIf=\"!isAddClickedOn && !isUpdated && isEditable\">\r\n <div class=\"add\" (click)=\"onClickAdd()\">\r\n {{defaultvalue}} </div>\r\n </div>\r\n <div class=\"edit-content\" *ngIf=\"isAddClickedOn\">\r\n <label class=\"input-label\" for=\"input\">{{newLabel}}</label>\r\n <div class=\"input \" [ngClass]=\"{'input-with-appended-unit': showUnit}\">\r\n <span *ngIf=\"showUnit\">{{unit}}</span>\r\n <input (change)=\"onChange($event)\" (blur)=\"updateBlur()\" [ngModel]=\"value\" [value]=\"value\" id=\"input\" #input\r\n class=\"form-control\" [ngClass]=\"{'input-box': showUnit}\" [type]=\"inputType\">\r\n </div>\r\n <div class=\"edit-actions\">\r\n <button type=\"button\" class=\"btn cancel\" (click)=\"onClickCancel()\" mat-raised-button>Cancel</button>\r\n <button type=\"button\" class=\"save\" (click)=\"onClickSave(input)\" mat-raised-button color=\"primary\">Save</button>\r\n </div>\r\n </div>\r\n <div class=\"updated-content closed\" *ngIf=\"!isAddClickedOn && isUpdated\" (mouseenter)=\"onMouseEnter()\"\r\n (mouseleave)=\"onMouseLeave()\">\r\n <div class=\"edit-icon-container\" *ngIf=\"showEdit && isEditable\" (click)=\"onClickEdit()\">\r\n <i class=\"fas fa-pencil-alt\"></i>\r\n </div>\r\n <div class=\"updated\">\r\n <span class=\"updated-label\">\r\n <label for=\"input\">{{newLabel}}</label>\r\n </span>\r\n <span *ngIf=\"!showUnit\">{{value}}</span>\r\n <span *ngIf=\"showUnit\" class=\"updated-value\">\r\n {{value | dynamicPipe: unitType}}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".container{display:block;width:100%}.open{height:120px}.closed{height:40px}.edit-icon-container{position:absolute;right:0%;transform:translate(0);top:0;cursor:pointer}.edit-icon-container:hover{background-color:gray;color:#fff;padding:2px}label,.updated-label{color:gray;margin-right:5px}#input{display:inline}.cancel{grid-column:1;grid-row:2;height:80%;width:80px}.save{grid-column:2;grid-row:2;height:80%;width:80px}.default-content{position:absolute}.input{width:280px;grid-column:2;grid-row:1}.input-box{width:200px}.input-label{grid-column:1;grid-row:1}.updated{position:absolute}.add{color:#00f}.add:hover{text-decoration:underline;cursor:pointer}.content{position:relative}.btn:focus{outline:none!important}.edit-content{position:absolute;left:50%;transform:translate(-50%);display:grid;grid-template-columns:150px 200px;grid-template-rows:50px 50px}.updated-content{display:block}.header{color:gray;border-bottom:1px solid grey;height:30px;font-size:20px;margin-bottom:10px;margin-top:10px}.input-with-appended-unit input{padding-left:20px;text-align:left}.input-with-appended-unit span{position:relative;left:20px;color:gray}.edit-actions{grid-column:2;grid-row:2;display:grid;grid-template-columns:50% 50%}\n"] }]
|
|
2019
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveWasClicked: [{
|
|
2020
|
+
type: Output
|
|
2021
|
+
}], defaultvalue: [{
|
|
2022
|
+
type: Input
|
|
2023
|
+
}], inputType: [{
|
|
2024
|
+
type: Input
|
|
2025
|
+
}], newLabel: [{
|
|
2026
|
+
type: Input
|
|
2027
|
+
}], headerLabel: [{
|
|
2028
|
+
type: Input
|
|
2029
|
+
}], showUnit: [{
|
|
2030
|
+
type: Input
|
|
2031
|
+
}], unit: [{
|
|
2032
|
+
type: Input
|
|
2033
|
+
}], unitType: [{
|
|
2034
|
+
type: Input
|
|
2035
|
+
}], isEditable: [{
|
|
2036
|
+
type: Input
|
|
2037
|
+
}], showHeader: [{
|
|
2038
|
+
type: Input
|
|
2039
|
+
}], value: [{
|
|
2040
|
+
type: Input
|
|
2041
|
+
}] } });
|
|
1862
2042
|
|
|
1863
2043
|
class FormControlValidationMsgDirectiveForInput {
|
|
1864
2044
|
elRef;
|
|
@@ -2005,6 +2185,64 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2005
2185
|
args: ['blur', ["$event"]]
|
|
2006
2186
|
}] } });
|
|
2007
2187
|
|
|
2188
|
+
class CustomDecimalPointTwoDigitsDirective {
|
|
2189
|
+
control;
|
|
2190
|
+
valueSubscription;
|
|
2191
|
+
constructor(control) {
|
|
2192
|
+
this.control = control;
|
|
2193
|
+
}
|
|
2194
|
+
ngOnInit() {
|
|
2195
|
+
if (this.control.value) {
|
|
2196
|
+
this.control.valueAccessor.writeValue(this.transformToCommasAndPoint(this.control.value));
|
|
2197
|
+
}
|
|
2198
|
+
this.valueSubscription = this.control.control.valueChanges.subscribe(value => {
|
|
2199
|
+
if (value.length > 0) {
|
|
2200
|
+
let removeCommas = this.control.value.replace(/,/g, '');
|
|
2201
|
+
this.control.control.setValue(removeCommas, { emitEvent: false, emitModelToViewChange: false });
|
|
2202
|
+
}
|
|
2203
|
+
else {
|
|
2204
|
+
this.control.control.setValue(null, { emitEvent: false, emitModelToViewChange: false });
|
|
2205
|
+
}
|
|
2206
|
+
});
|
|
2207
|
+
}
|
|
2208
|
+
onEvent($event) {
|
|
2209
|
+
if (this.control.value) {
|
|
2210
|
+
const item = $event.target;
|
|
2211
|
+
item.value = this.transformToCommasAndPoint(this.control.value);
|
|
2212
|
+
let removeCommas = this.control.value.replace(/,/g, '');
|
|
2213
|
+
this.control.control.setValue(removeCommas, { emitEvent: false, emitModelToViewChange: false });
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
2216
|
+
transformToCommasAndPoint(value) {
|
|
2217
|
+
if (value.indexOf(".") == -1) {
|
|
2218
|
+
value = value.toString().replace(/\D/g, "")
|
|
2219
|
+
.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
2220
|
+
return value;
|
|
2221
|
+
}
|
|
2222
|
+
else {
|
|
2223
|
+
let val = value.split(".");
|
|
2224
|
+
let valueBeforeDecimal = val[0];
|
|
2225
|
+
let valueAfterDecimal = val[1];
|
|
2226
|
+
valueBeforeDecimal = valueBeforeDecimal.toString().replace(/\D/g, "")
|
|
2227
|
+
.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
2228
|
+
let newValue = `${valueBeforeDecimal}.${valueAfterDecimal}`;
|
|
2229
|
+
return newValue;
|
|
2230
|
+
}
|
|
2231
|
+
}
|
|
2232
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CustomDecimalPointTwoDigitsDirective, deps: [{ token: i2$1.NgControl }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2233
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: CustomDecimalPointTwoDigitsDirective, selector: "[customDecimalPointTwoDigits]", host: { listeners: { "input": "onEvent($event)" } }, providers: [NgModel, DecimalPipe], ngImport: i0 });
|
|
2234
|
+
}
|
|
2235
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CustomDecimalPointTwoDigitsDirective, decorators: [{
|
|
2236
|
+
type: Directive,
|
|
2237
|
+
args: [{
|
|
2238
|
+
selector: '[customDecimalPointTwoDigits]',
|
|
2239
|
+
providers: [NgModel, DecimalPipe],
|
|
2240
|
+
}]
|
|
2241
|
+
}], ctorParameters: function () { return [{ type: i2$1.NgControl }]; }, propDecorators: { onEvent: [{
|
|
2242
|
+
type: HostListener,
|
|
2243
|
+
args: ["input", ["$event"]]
|
|
2244
|
+
}] } });
|
|
2245
|
+
|
|
2008
2246
|
class GeneralInputRendererComponent {
|
|
2009
2247
|
params;
|
|
2010
2248
|
key;
|
|
@@ -2047,50 +2285,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2047
2285
|
args: [{ selector: 'general-input-renderer-test', template: "<div *ngIf=\"formGroup\" [formGroup]=\"formGroup\">\r\n <div *ngIf=\"params.isTypeText\">\r\n <input [placeholder]=\"params.fieldLabel\"appFormControlValidationMsgForInputs [showBoxError]=\"false\"\r\n [errorDivId]=\"'text'\" \r\n (change)=\"onCellDataChanged($event)\" [formControlName]=\"key\" />\r\n <span *ngIf=\"params.showSymbol\"\r\n style=\"margin-left:-20px ;\">{{params.symbol}}</span>\r\n <show-table-errors\r\n *ngIf=\"formGroup.get(this.key).errors && formGroup.get(this.key) && formGroup.get(this.key).touched\"\r\n [message]=\"formGroup.get(this.key).errors.message\"></show-table-errors>\r\n </div>\r\n <div *ngIf=\"params.isTypeNumber\">\r\n <input customDecimalPointTwoDigits appFormControlValidationMsgForInputs [showBoxError]=\"false\"\r\n [errorDivId]=\"'number'\" [placeholder]=\"params.fieldLabel\"\r\n (change)=\"onCellDataChanged($event)\" [formControlName]=\"key\" />\r\n <span *ngIf=\"params.showSymbol\"\r\n style=\"margin-left:-20px ;\">{{params.symbol}}</span>\r\n <show-table-errors\r\n *ngIf=\"formGroup.get(this.key).errors && formGroup.get(this.key).touched\"\r\n [message]=\"formGroup.get(this.key).errors.message\"></show-table-errors>\r\n </div>\r\n <div *ngIf=\"params.isTypeIntegerNumber\">\r\n <input appFormControlValidationMsgForInputs [showBoxError]=\"false\"type=\"number\"\r\n [errorDivId]=\"'integer'\" [placeholder]=\"params.fieldLabel\"\r\n (change)=\"onCellDataChanged($event)\" [formControlName]=\"key\" />\r\n <span *ngIf=\"params.showSymbol\"\r\n style=\"margin-left:-20px ;\">{{params.symbol}}</span>\r\n <show-table-errors\r\n *ngIf=\"formGroup.get(this.key).errors && formGroup.get(this.key).touched\"\r\n [message]=\"formGroup.get(this.key).errors.message\"></show-table-errors>\r\n </div>\r\n <div *ngIf=\"params.isTypeTextArea\">\r\n <textarea class=\"text-area\" (change)=\"onCellDataChanged($event)\"\r\n [placeholder]=\"params.fieldLabel\" class=\"main-height\"\r\n [formControlName]=\"key\"></textarea>\r\n </div>\r\n</div>", styles: ["textarea{padding-left:.5rem;border-radius:.3rem;height:3.5rem;font-size:1.2rem;border:solid #BEBEBE .1rem}textarea:focus{outline:none}textarea::placeholder{color:#676767}\n"] }]
|
|
2048
2286
|
}], ctorParameters: function () { return []; } });
|
|
2049
2287
|
|
|
2050
|
-
class LabelAndField {
|
|
2051
|
-
label;
|
|
2052
|
-
field;
|
|
2053
|
-
}
|
|
2054
|
-
|
|
2055
|
-
class AddAsteriskDirective {
|
|
2056
|
-
elem;
|
|
2057
|
-
show = true;
|
|
2058
|
-
constructor(elem) {
|
|
2059
|
-
this.elem = elem;
|
|
2060
|
-
}
|
|
2061
|
-
ngOnInit() {
|
|
2062
|
-
this.toggleAsterisk();
|
|
2063
|
-
}
|
|
2064
|
-
ngOnChanges(changes) {
|
|
2065
|
-
this.toggleAsterisk();
|
|
2066
|
-
}
|
|
2067
|
-
toggleAsterisk() {
|
|
2068
|
-
const existingAsterisk = this.elem.nativeElement.querySelector('.custom-asterisk');
|
|
2069
|
-
if (this.show) {
|
|
2070
|
-
if (!existingAsterisk) {
|
|
2071
|
-
const customAsterisk = `<span class="custom-asterisk" style="color:${PrimaryColors.$primaryRedColor};"> *</span> `;
|
|
2072
|
-
this.elem.nativeElement.insertAdjacentHTML('beforeend', customAsterisk);
|
|
2073
|
-
}
|
|
2074
|
-
}
|
|
2075
|
-
else {
|
|
2076
|
-
if (existingAsterisk) {
|
|
2077
|
-
existingAsterisk.remove();
|
|
2078
|
-
}
|
|
2079
|
-
}
|
|
2080
|
-
}
|
|
2081
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AddAsteriskDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2082
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AddAsteriskDirective, selector: "[addAsterisk]", inputs: { show: "show" }, usesOnChanges: true, ngImport: i0 });
|
|
2083
|
-
}
|
|
2084
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AddAsteriskDirective, decorators: [{
|
|
2085
|
-
type: Directive,
|
|
2086
|
-
args: [{
|
|
2087
|
-
selector: '[addAsterisk]'
|
|
2088
|
-
}]
|
|
2089
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { show: [{
|
|
2090
|
-
type: Input,
|
|
2091
|
-
args: ['show']
|
|
2092
|
-
}] } });
|
|
2093
|
-
|
|
2094
2288
|
class InputsModule {
|
|
2095
2289
|
static forRoot(environment) {
|
|
2096
2290
|
return {
|
|
@@ -2119,7 +2313,9 @@ class InputsModule {
|
|
|
2119
2313
|
ShowTableErrorsComponent,
|
|
2120
2314
|
FormControlValidationMsgDirectiveForInput,
|
|
2121
2315
|
DropdownActionsComponent,
|
|
2122
|
-
AddAsteriskDirective
|
|
2316
|
+
AddAsteriskDirective,
|
|
2317
|
+
FormControlValidationMsgDirectiveForNgSelect,
|
|
2318
|
+
TooltipMsgError], imports: [CommonModule,
|
|
2123
2319
|
NgSelectModule,
|
|
2124
2320
|
FormsModule,
|
|
2125
2321
|
ReactiveFormsModule,
|
|
@@ -2162,7 +2358,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2162
2358
|
ShowTableErrorsComponent,
|
|
2163
2359
|
FormControlValidationMsgDirectiveForInput,
|
|
2164
2360
|
DropdownActionsComponent,
|
|
2165
|
-
AddAsteriskDirective
|
|
2361
|
+
AddAsteriskDirective,
|
|
2362
|
+
FormControlValidationMsgDirectiveForNgSelect,
|
|
2363
|
+
TooltipMsgError
|
|
2166
2364
|
],
|
|
2167
2365
|
imports: [
|
|
2168
2366
|
CommonModule,
|
|
@@ -2189,6 +2387,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2189
2387
|
}]
|
|
2190
2388
|
}] });
|
|
2191
2389
|
|
|
2390
|
+
class LabelAndField {
|
|
2391
|
+
label;
|
|
2392
|
+
field;
|
|
2393
|
+
}
|
|
2394
|
+
|
|
2192
2395
|
/*
|
|
2193
2396
|
* Public API Surface of inputs
|
|
2194
2397
|
*/
|
|
@@ -2197,5 +2400,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2197
2400
|
* Generated bundle index. Do not edit.
|
|
2198
2401
|
*/
|
|
2199
2402
|
|
|
2200
|
-
export { AddAsteriskDirective, ChooseEnumComponent, ChooseEnumRendererComponent, ChooseGeneralItemComponent, ChooseGeneralItemRendererComponent, ChooseGeneralItemService, ChooseLineTypeComponent, ChooseYesOrNoComponent, ChooseYesOrNoRendererComponent, DropdownActionType, DropdownActionsComponent, DynamicPipe, EditableSavableInputComponent, FormControlValidationMsgDirectiveForInput, GeneralInputRendererComponent, InputsModule, LabelAndField, PrimaryColors, ShowTableErrorsComponent };
|
|
2403
|
+
export { AddAsteriskDirective, ChooseEnumComponent, ChooseEnumRendererComponent, ChooseGeneralItemComponent, ChooseGeneralItemRendererComponent, ChooseGeneralItemService, ChooseItemRendererValidationType, ChooseLineTypeComponent, ChooseYesOrNoComponent, ChooseYesOrNoRendererComponent, DropdownActionType, DropdownActionsComponent, DynamicPipe, EditableSavableInputComponent, FormControlValidationMsgDirectiveForInput, GeneralInputRendererComponent, InputsModule, LabelAndField, PrimaryColors, ShowTableErrorsComponent, ToolTipMessageType, TooltipMsgError };
|
|
2201
2404
|
//# sourceMappingURL=inputs.mjs.map
|