@jooler/inputs 0.0.44 → 0.0.46
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/esm2020/lib/inputs.module.mjs +10 -5
- package/fesm2015/inputs.mjs +58 -54
- package/fesm2015/inputs.mjs.map +1 -1
- package/fesm2020/inputs.mjs +58 -54
- package/fesm2020/inputs.mjs.map +1 -1
- package/lib/inputs.module.d.ts +8 -7
- package/package.json +1 -1
package/fesm2020/inputs.mjs
CHANGED
|
@@ -1144,6 +1144,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
1144
1144
|
type: Output
|
|
1145
1145
|
}] } });
|
|
1146
1146
|
|
|
1147
|
+
class PrimaryColors {
|
|
1148
|
+
}
|
|
1149
|
+
PrimaryColors.$primaryBlueColor = '#155ED4';
|
|
1150
|
+
PrimaryColors.$primaryPinkColor = '#F0509C';
|
|
1151
|
+
PrimaryColors.$primaryTealColor = '#12957E';
|
|
1152
|
+
PrimaryColors.$primaryCarbonColor = '#32353B';
|
|
1153
|
+
PrimaryColors.$primaryPurpleColor = '#E3B1EB';
|
|
1154
|
+
PrimaryColors.$primaryRedColor = '#A80002';
|
|
1155
|
+
PrimaryColors.$primaryLightRedColor = '#FFDBDB';
|
|
1156
|
+
PrimaryColors.$primaryLightGrayBlueColor = '#f7f8f9';
|
|
1157
|
+
PrimaryColors.$primaryLightGrayColor = '#f0f0f0';
|
|
1158
|
+
|
|
1159
|
+
class AddAsteriskDirective {
|
|
1160
|
+
constructor(elem) {
|
|
1161
|
+
this.elem = elem;
|
|
1162
|
+
this.show = true;
|
|
1163
|
+
}
|
|
1164
|
+
ngOnInit() {
|
|
1165
|
+
this.toggleAsterisk();
|
|
1166
|
+
}
|
|
1167
|
+
ngOnChanges(changes) {
|
|
1168
|
+
this.toggleAsterisk();
|
|
1169
|
+
}
|
|
1170
|
+
toggleAsterisk() {
|
|
1171
|
+
const existingAsterisk = this.elem.nativeElement.querySelector('.custom-asterisk');
|
|
1172
|
+
if (this.show) {
|
|
1173
|
+
if (!existingAsterisk) {
|
|
1174
|
+
const customAsterisk = `<span class="custom-asterisk" style="color:${PrimaryColors.$primaryRedColor};"> *</span> `;
|
|
1175
|
+
this.elem.nativeElement.insertAdjacentHTML('beforeend', customAsterisk);
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
else {
|
|
1179
|
+
if (existingAsterisk) {
|
|
1180
|
+
existingAsterisk.remove();
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
AddAsteriskDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AddAsteriskDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1186
|
+
AddAsteriskDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: AddAsteriskDirective, selector: "[addAsterisk]", inputs: { show: "show" }, usesOnChanges: true, ngImport: i0 });
|
|
1187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AddAsteriskDirective, decorators: [{
|
|
1188
|
+
type: Directive,
|
|
1189
|
+
args: [{
|
|
1190
|
+
selector: '[addAsterisk]'
|
|
1191
|
+
}]
|
|
1192
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { show: [{
|
|
1193
|
+
type: Input,
|
|
1194
|
+
args: ['show']
|
|
1195
|
+
}] } });
|
|
1196
|
+
|
|
1147
1197
|
class InputsModule {
|
|
1148
1198
|
static forRoot(environment) {
|
|
1149
1199
|
return {
|
|
@@ -1172,7 +1222,8 @@ InputsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
|
1172
1222
|
CustomDecimalPointTwoDigitsDirective,
|
|
1173
1223
|
ShowTableErrorsComponent,
|
|
1174
1224
|
FormControlValidationMsgDirectiveForInput,
|
|
1175
|
-
DropdownActionsComponent
|
|
1225
|
+
DropdownActionsComponent,
|
|
1226
|
+
AddAsteriskDirective], imports: [CommonModule,
|
|
1176
1227
|
NgSelectModule,
|
|
1177
1228
|
FormsModule,
|
|
1178
1229
|
ReactiveFormsModule,
|
|
@@ -1187,7 +1238,8 @@ InputsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
|
1187
1238
|
ChooseYesOrNoRendererComponent,
|
|
1188
1239
|
EditableSavableInputComponent,
|
|
1189
1240
|
DropdownActionsComponent,
|
|
1190
|
-
DynamicPipe
|
|
1241
|
+
DynamicPipe,
|
|
1242
|
+
AddAsteriskDirective] });
|
|
1191
1243
|
InputsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: InputsModule, imports: [CommonModule,
|
|
1192
1244
|
NgSelectModule,
|
|
1193
1245
|
FormsModule,
|
|
@@ -1212,7 +1264,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
1212
1264
|
CustomDecimalPointTwoDigitsDirective,
|
|
1213
1265
|
ShowTableErrorsComponent,
|
|
1214
1266
|
FormControlValidationMsgDirectiveForInput,
|
|
1215
|
-
DropdownActionsComponent
|
|
1267
|
+
DropdownActionsComponent,
|
|
1268
|
+
AddAsteriskDirective
|
|
1216
1269
|
],
|
|
1217
1270
|
imports: [
|
|
1218
1271
|
CommonModule,
|
|
@@ -1233,61 +1286,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
1233
1286
|
ChooseYesOrNoRendererComponent,
|
|
1234
1287
|
EditableSavableInputComponent,
|
|
1235
1288
|
DropdownActionsComponent,
|
|
1236
|
-
DynamicPipe
|
|
1289
|
+
DynamicPipe,
|
|
1290
|
+
AddAsteriskDirective
|
|
1237
1291
|
]
|
|
1238
1292
|
}]
|
|
1239
1293
|
}] });
|
|
1240
1294
|
|
|
1241
|
-
class PrimaryColors {
|
|
1242
|
-
}
|
|
1243
|
-
PrimaryColors.$primaryBlueColor = '#155ED4';
|
|
1244
|
-
PrimaryColors.$primaryPinkColor = '#F0509C';
|
|
1245
|
-
PrimaryColors.$primaryTealColor = '#12957E';
|
|
1246
|
-
PrimaryColors.$primaryCarbonColor = '#32353B';
|
|
1247
|
-
PrimaryColors.$primaryPurpleColor = '#E3B1EB';
|
|
1248
|
-
PrimaryColors.$primaryRedColor = '#A80002';
|
|
1249
|
-
PrimaryColors.$primaryLightRedColor = '#FFDBDB';
|
|
1250
|
-
PrimaryColors.$primaryLightGrayBlueColor = '#f7f8f9';
|
|
1251
|
-
PrimaryColors.$primaryLightGrayColor = '#f0f0f0';
|
|
1252
|
-
|
|
1253
|
-
class AddAsteriskDirective {
|
|
1254
|
-
constructor(elem) {
|
|
1255
|
-
this.elem = elem;
|
|
1256
|
-
this.show = true;
|
|
1257
|
-
}
|
|
1258
|
-
ngOnInit() {
|
|
1259
|
-
this.toggleAsterisk();
|
|
1260
|
-
}
|
|
1261
|
-
ngOnChanges(changes) {
|
|
1262
|
-
this.toggleAsterisk();
|
|
1263
|
-
}
|
|
1264
|
-
toggleAsterisk() {
|
|
1265
|
-
const existingAsterisk = this.elem.nativeElement.querySelector('.custom-asterisk');
|
|
1266
|
-
if (this.show) {
|
|
1267
|
-
if (!existingAsterisk) {
|
|
1268
|
-
const customAsterisk = `<span class="custom-asterisk" style="color:${PrimaryColors.$primaryRedColor};"> *</span> `;
|
|
1269
|
-
this.elem.nativeElement.insertAdjacentHTML('beforeend', customAsterisk);
|
|
1270
|
-
}
|
|
1271
|
-
}
|
|
1272
|
-
else {
|
|
1273
|
-
if (existingAsterisk) {
|
|
1274
|
-
existingAsterisk.remove();
|
|
1275
|
-
}
|
|
1276
|
-
}
|
|
1277
|
-
}
|
|
1278
|
-
}
|
|
1279
|
-
AddAsteriskDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AddAsteriskDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1280
|
-
AddAsteriskDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: AddAsteriskDirective, selector: "[addAsterisk]", inputs: { show: "show" }, usesOnChanges: true, ngImport: i0 });
|
|
1281
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AddAsteriskDirective, decorators: [{
|
|
1282
|
-
type: Directive,
|
|
1283
|
-
args: [{
|
|
1284
|
-
selector: '[addAsterisk]'
|
|
1285
|
-
}]
|
|
1286
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { show: [{
|
|
1287
|
-
type: Input,
|
|
1288
|
-
args: ['show']
|
|
1289
|
-
}] } });
|
|
1290
|
-
|
|
1291
1295
|
/*
|
|
1292
1296
|
* Public API Surface of inputs
|
|
1293
1297
|
*/
|