keevo-components 1.5.163 → 1.5.165
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/api/base-components/base-component-dropdown-new.mjs +190 -30
- package/esm2020/lib/api/helpers/keevo-validators.mjs +64 -0
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/keevo-components.mjs +241 -28
- package/fesm2015/keevo-components.mjs.map +1 -1
- package/fesm2020/keevo-components.mjs +241 -28
- package/fesm2020/keevo-components.mjs.map +1 -1
- package/lib/api/base-components/base-component-dropdown-new.d.ts +6 -1
- package/lib/api/helpers/keevo-validators.d.ts +10 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -4135,47 +4135,197 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
|
4135
4135
|
}] });
|
|
4136
4136
|
|
|
4137
4137
|
class BaseComponentDropdownNew extends BaseComponentDropDown {
|
|
4138
|
+
ngOnInit() {
|
|
4139
|
+
if (this.dropDowValue)
|
|
4140
|
+
this.value = this.dropDowValue;
|
|
4141
|
+
}
|
|
4138
4142
|
}
|
|
4139
4143
|
BaseComponentDropdownNew.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BaseComponentDropdownNew, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
4140
|
-
BaseComponentDropdownNew.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: BaseComponentDropdownNew, isStandalone: true, selector: "app-base-dropdown", inputs: { formGroup: "formGroup", formControlName: "formControlName" }, usesInheritance: true, ngImport: i0, template: `
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4144
|
+
BaseComponentDropdownNew.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: BaseComponentDropdownNew, isStandalone: true, selector: "app-base-dropdown", inputs: { formGroup: "formGroup", formControlName: "formControlName", dropDowValue: "dropDowValue", itemTemplate: "itemTemplate", selectedItemTemplate: "selectedItemTemplate" }, usesInheritance: true, ngImport: i0, template: `
|
|
4145
|
+
<span>
|
|
4146
|
+
<kv-label
|
|
4147
|
+
[componentId]="componentId"
|
|
4148
|
+
[label]="label"
|
|
4149
|
+
/>
|
|
4150
|
+
<p-dropdown
|
|
4151
|
+
appendTo="body"
|
|
4152
|
+
[class]="baseInputClass"
|
|
4153
|
+
[disabled]="disabled"
|
|
4154
|
+
[filter]="filter"
|
|
4155
|
+
[inputId]="componentId"
|
|
4156
|
+
[(ngModel)]="value"
|
|
4157
|
+
[options]="filteredOptions"
|
|
4158
|
+
[optionLabel]="optionLabel"
|
|
4159
|
+
[optionValue]="optionValue"
|
|
4160
|
+
[optionDisabled]="optionDisabled"
|
|
4161
|
+
[group]="group"
|
|
4162
|
+
[optionGroupLabel]="optionGroupLabel"
|
|
4163
|
+
[optionGroupChildren]="optionGroupChildren"
|
|
4164
|
+
[showClear]="showClear"
|
|
4165
|
+
[lazy]="lazy"
|
|
4166
|
+
scrollHeight="250px"
|
|
4167
|
+
(onBlur)="onInputBlur($event)"
|
|
4168
|
+
(onClick)="onInputClick($event)"
|
|
4169
|
+
(onChange)="onInputChange($event)"
|
|
4170
|
+
(onFilter)="onInputFilter($event)"
|
|
4171
|
+
[style]="{'width':widthField}"
|
|
4172
|
+
[panelStyle]="{ width: widthField, overflow: 'auto' }"
|
|
4173
|
+
styleClass="inputs"
|
|
4174
|
+
>
|
|
4175
|
+
|
|
4176
|
+
<ng-template
|
|
4177
|
+
*ngIf="showAddButton"
|
|
4178
|
+
pTemplate="footer"
|
|
4179
|
+
>
|
|
4180
|
+
<p-divider></p-divider>
|
|
4181
|
+
<div class="flex flex-wrap card-container p-1">
|
|
4182
|
+
<div class="flex justify-content-center">
|
|
4183
|
+
<button
|
|
4184
|
+
pButton
|
|
4185
|
+
label="Incluir"
|
|
4186
|
+
pTooltip="Clique aqui para incluir um novo registro"
|
|
4187
|
+
tooltipPosition="bottom"
|
|
4188
|
+
icon="pi pi-plus"
|
|
4189
|
+
class="p-button-rounded p-button-success mr-2"
|
|
4190
|
+
(click)="addClick($event)"
|
|
4191
|
+
></button>
|
|
4192
|
+
</div>
|
|
4193
|
+
</div>
|
|
4194
|
+
</ng-template>
|
|
4195
|
+
|
|
4196
|
+
<ng-template
|
|
4197
|
+
let-selectedItem
|
|
4198
|
+
pTemplate="item"
|
|
4199
|
+
*ngIf="itemTemplate"
|
|
4200
|
+
>
|
|
4201
|
+
<ng-container
|
|
4202
|
+
[ngTemplateOutlet]="itemTemplate"
|
|
4203
|
+
[ngTemplateOutletContext]="{ $implicit: selectedItem }"
|
|
4204
|
+
>
|
|
4205
|
+
</ng-container>
|
|
4206
|
+
</ng-template>
|
|
4207
|
+
|
|
4208
|
+
|
|
4209
|
+
<ng-template
|
|
4210
|
+
let-item
|
|
4211
|
+
pTemplate="selectedItem"
|
|
4212
|
+
*ngIf="selectedItemTemplate"
|
|
4213
|
+
>
|
|
4214
|
+
<ng-container
|
|
4215
|
+
[ngTemplateOutlet]="selectedItemTemplate"
|
|
4216
|
+
[ngTemplateOutletContext]="{ $implicit: item }"
|
|
4217
|
+
>
|
|
4218
|
+
|
|
4219
|
+
</ng-container>
|
|
4220
|
+
</ng-template>
|
|
4221
|
+
|
|
4222
|
+
</p-dropdown>
|
|
4223
|
+
|
|
4224
|
+
<kv-error [hasError]="hasControlError()">{{ erroMessage() }}</kv-error>
|
|
4225
|
+
</span>
|
|
4226
|
+
<ng-content></ng-content>
|
|
4227
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: KeevoComponentsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: PrimeNgModule }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$2.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: i9.Divider, selector: "p-divider", inputs: ["styleClass", "style", "layout", "type", "align"] }, { kind: "component", type: i4.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "overlayDirection", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: LabelModule }, { kind: "component", type: LabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }, { kind: "ngmodule", type: kvErrorModule }, { kind: "component", type: ErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }] });
|
|
4154
4228
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BaseComponentDropdownNew, decorators: [{
|
|
4155
4229
|
type: Component,
|
|
4156
4230
|
args: [{
|
|
4157
4231
|
selector: 'app-base-dropdown',
|
|
4158
4232
|
template: `
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4233
|
+
<span>
|
|
4234
|
+
<kv-label
|
|
4235
|
+
[componentId]="componentId"
|
|
4236
|
+
[label]="label"
|
|
4237
|
+
/>
|
|
4238
|
+
<p-dropdown
|
|
4239
|
+
appendTo="body"
|
|
4240
|
+
[class]="baseInputClass"
|
|
4241
|
+
[disabled]="disabled"
|
|
4242
|
+
[filter]="filter"
|
|
4243
|
+
[inputId]="componentId"
|
|
4244
|
+
[(ngModel)]="value"
|
|
4245
|
+
[options]="filteredOptions"
|
|
4246
|
+
[optionLabel]="optionLabel"
|
|
4247
|
+
[optionValue]="optionValue"
|
|
4248
|
+
[optionDisabled]="optionDisabled"
|
|
4249
|
+
[group]="group"
|
|
4250
|
+
[optionGroupLabel]="optionGroupLabel"
|
|
4251
|
+
[optionGroupChildren]="optionGroupChildren"
|
|
4252
|
+
[showClear]="showClear"
|
|
4253
|
+
[lazy]="lazy"
|
|
4254
|
+
scrollHeight="250px"
|
|
4255
|
+
(onBlur)="onInputBlur($event)"
|
|
4256
|
+
(onClick)="onInputClick($event)"
|
|
4257
|
+
(onChange)="onInputChange($event)"
|
|
4258
|
+
(onFilter)="onInputFilter($event)"
|
|
4259
|
+
[style]="{'width':widthField}"
|
|
4260
|
+
[panelStyle]="{ width: widthField, overflow: 'auto' }"
|
|
4261
|
+
styleClass="inputs"
|
|
4262
|
+
>
|
|
4263
|
+
|
|
4264
|
+
<ng-template
|
|
4265
|
+
*ngIf="showAddButton"
|
|
4266
|
+
pTemplate="footer"
|
|
4267
|
+
>
|
|
4268
|
+
<p-divider></p-divider>
|
|
4269
|
+
<div class="flex flex-wrap card-container p-1">
|
|
4270
|
+
<div class="flex justify-content-center">
|
|
4271
|
+
<button
|
|
4272
|
+
pButton
|
|
4273
|
+
label="Incluir"
|
|
4274
|
+
pTooltip="Clique aqui para incluir um novo registro"
|
|
4275
|
+
tooltipPosition="bottom"
|
|
4276
|
+
icon="pi pi-plus"
|
|
4277
|
+
class="p-button-rounded p-button-success mr-2"
|
|
4278
|
+
(click)="addClick($event)"
|
|
4279
|
+
></button>
|
|
4280
|
+
</div>
|
|
4281
|
+
</div>
|
|
4282
|
+
</ng-template>
|
|
4283
|
+
|
|
4284
|
+
<ng-template
|
|
4285
|
+
let-selectedItem
|
|
4286
|
+
pTemplate="item"
|
|
4287
|
+
*ngIf="itemTemplate"
|
|
4288
|
+
>
|
|
4289
|
+
<ng-container
|
|
4290
|
+
[ngTemplateOutlet]="itemTemplate"
|
|
4291
|
+
[ngTemplateOutletContext]="{ $implicit: selectedItem }"
|
|
4292
|
+
>
|
|
4293
|
+
</ng-container>
|
|
4294
|
+
</ng-template>
|
|
4295
|
+
|
|
4296
|
+
|
|
4297
|
+
<ng-template
|
|
4298
|
+
let-item
|
|
4299
|
+
pTemplate="selectedItem"
|
|
4300
|
+
*ngIf="selectedItemTemplate"
|
|
4301
|
+
>
|
|
4302
|
+
<ng-container
|
|
4303
|
+
[ngTemplateOutlet]="selectedItemTemplate"
|
|
4304
|
+
[ngTemplateOutletContext]="{ $implicit: item }"
|
|
4305
|
+
>
|
|
4306
|
+
|
|
4307
|
+
</ng-container>
|
|
4308
|
+
</ng-template>
|
|
4309
|
+
|
|
4310
|
+
</p-dropdown>
|
|
4311
|
+
|
|
4312
|
+
<kv-error [hasError]="hasControlError()">{{ erroMessage() }}</kv-error>
|
|
4313
|
+
</span>
|
|
4314
|
+
<ng-content></ng-content>
|
|
4171
4315
|
`,
|
|
4172
4316
|
standalone: true,
|
|
4173
|
-
imports: [KeevoComponentsModule, ReactiveFormsModule, FormsModule]
|
|
4317
|
+
imports: [KeevoComponentsModule, ReactiveFormsModule, FormsModule, PrimeNgModule, LabelModule, kvErrorModule]
|
|
4174
4318
|
}]
|
|
4175
4319
|
}], propDecorators: { formGroup: [{
|
|
4176
4320
|
type: Input
|
|
4177
4321
|
}], formControlName: [{
|
|
4178
4322
|
type: Input
|
|
4323
|
+
}], dropDowValue: [{
|
|
4324
|
+
type: Input
|
|
4325
|
+
}], itemTemplate: [{
|
|
4326
|
+
type: Input
|
|
4327
|
+
}], selectedItemTemplate: [{
|
|
4328
|
+
type: Input
|
|
4179
4329
|
}] } });
|
|
4180
4330
|
|
|
4181
4331
|
class TranslatePrimeng {
|
|
@@ -4201,6 +4351,69 @@ class TranslatePrimeng {
|
|
|
4201
4351
|
}
|
|
4202
4352
|
}
|
|
4203
4353
|
|
|
4354
|
+
class KeevoValidators {
|
|
4355
|
+
static required(erroMessage) {
|
|
4356
|
+
return (control) => {
|
|
4357
|
+
if (Validators.required(control))
|
|
4358
|
+
return { required: true, erroMessage: `${erroMessage ? erroMessage : 'Campo obrigatório'}` };
|
|
4359
|
+
return null;
|
|
4360
|
+
};
|
|
4361
|
+
}
|
|
4362
|
+
static dateGreaterThan(startControlName, erroMessage) {
|
|
4363
|
+
return (endControl) => {
|
|
4364
|
+
const parent = endControl.parent;
|
|
4365
|
+
if (!parent)
|
|
4366
|
+
return null;
|
|
4367
|
+
const startControl = parent.get(startControlName);
|
|
4368
|
+
const startDate = startControl.value;
|
|
4369
|
+
const endDate = endControl.value;
|
|
4370
|
+
if (!startDate || !endDate) {
|
|
4371
|
+
return null;
|
|
4372
|
+
}
|
|
4373
|
+
if (startDate > endDate) {
|
|
4374
|
+
return { greaterThan: true, erroMessage: erroMessage };
|
|
4375
|
+
}
|
|
4376
|
+
return null;
|
|
4377
|
+
};
|
|
4378
|
+
}
|
|
4379
|
+
static min(min, erroMessage) {
|
|
4380
|
+
return (control) => {
|
|
4381
|
+
if (Validators.min(min)(control))
|
|
4382
|
+
return { min: true, erroMessage: `${erroMessage ? erroMessage : 'Informe um valor maior ou igual à '}${min}` };
|
|
4383
|
+
return null;
|
|
4384
|
+
};
|
|
4385
|
+
}
|
|
4386
|
+
static max(min, erroMessage) {
|
|
4387
|
+
return (control) => {
|
|
4388
|
+
if (Validators.max(min)(control))
|
|
4389
|
+
return { min: true, erroMessage: `${erroMessage ? erroMessage : 'Informe um valor menor ou igual à '}${min}` };
|
|
4390
|
+
return null;
|
|
4391
|
+
};
|
|
4392
|
+
}
|
|
4393
|
+
static email(erroMessage) {
|
|
4394
|
+
return (control) => {
|
|
4395
|
+
if (Validators.email(control)) {
|
|
4396
|
+
return { email: true, erroMessage: `${erroMessage ? erroMessage : 'Endereço de e-mail inválido!'}` };
|
|
4397
|
+
}
|
|
4398
|
+
return null;
|
|
4399
|
+
};
|
|
4400
|
+
}
|
|
4401
|
+
static maxLengthArray(max) {
|
|
4402
|
+
return (c) => {
|
|
4403
|
+
if (c.value.length < max)
|
|
4404
|
+
return null;
|
|
4405
|
+
return { maxLengthArray: true, erroMessage: 'Tamanho máximo excedido!' };
|
|
4406
|
+
};
|
|
4407
|
+
}
|
|
4408
|
+
static maxLength(max, erroMessage) {
|
|
4409
|
+
return (control) => {
|
|
4410
|
+
if (Validators.maxLength(max)(control))
|
|
4411
|
+
return { maxLength: true, erroMessage: `${erroMessage ? erroMessage : 'Limite máximo de ${max} caracteres atingido!'}` };
|
|
4412
|
+
return null;
|
|
4413
|
+
};
|
|
4414
|
+
}
|
|
4415
|
+
}
|
|
4416
|
+
|
|
4204
4417
|
class PipesModule {
|
|
4205
4418
|
}
|
|
4206
4419
|
PipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -4309,5 +4522,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
|
4309
4522
|
* Generated bundle index. Do not edit.
|
|
4310
4523
|
*/
|
|
4311
4524
|
|
|
4312
|
-
export { BaseApiService, BaseChartComponent, BaseComponent, BaseComponentButton, BaseComponentCrud, BaseComponentCrudForm, BaseComponentCrudList, BaseComponentDropDown, BaseComponentDropdownNew, BaseComponentInput, BaseComponentMultiSelect, ButtonPersonalizeComponent, ButtonPopupComponent, ButtonSecondaryComponent, ButtonSuccessComponent, ChartComponent, CheckComponent, CodigoFipePipe, ComponentProviders, ComponentService, CpfCnpjPipe, DropdownComponent, EditorComponent, ErrorComponent, FormService, InputCalendarComponent, InputMaskComponent, InputNumberComponent, InputPasswordComponent, InputTextCheckboxComponent, InputTextComponent, InputTextareaComponent, InputTimeComponent, KVTreeTableModule, KeevoComponentsModule, KvButtonsModule, KvChartModule, KvInputsModule, KvLoginModule, KvMenuModule, KvPageFormModule, KvPickListModule, KvTableModule, KvWorkspaceModule, KvtreeViewModule, LoginComponent, MenuComponent, MultiSelectComponent, NotificationService, ObjectService, OrgchartComponent, OrgchartModule, PageFormComponent, PeriodosChart, PickListComponent, PipesModule, PrimeNgModule, RadioGroupComponent, SwitchComponent, TableComponent, TablePaginate, TelefonePipe, TranslatePrimeng, TreeTableComponent, TreeViewComponent, WorkspaceComponent, kvErrorModule };
|
|
4525
|
+
export { BaseApiService, BaseChartComponent, BaseComponent, BaseComponentButton, BaseComponentCrud, BaseComponentCrudForm, BaseComponentCrudList, BaseComponentDropDown, BaseComponentDropdownNew, BaseComponentInput, BaseComponentMultiSelect, ButtonPersonalizeComponent, ButtonPopupComponent, ButtonSecondaryComponent, ButtonSuccessComponent, ChartComponent, CheckComponent, CodigoFipePipe, ComponentProviders, ComponentService, CpfCnpjPipe, DropdownComponent, EditorComponent, ErrorComponent, FormService, InputCalendarComponent, InputMaskComponent, InputNumberComponent, InputPasswordComponent, InputTextCheckboxComponent, InputTextComponent, InputTextareaComponent, InputTimeComponent, KVTreeTableModule, KeevoComponentsModule, KeevoValidators, KvButtonsModule, KvChartModule, KvInputsModule, KvLoginModule, KvMenuModule, KvPageFormModule, KvPickListModule, KvTableModule, KvWorkspaceModule, KvtreeViewModule, LoginComponent, MenuComponent, MultiSelectComponent, NotificationService, ObjectService, OrgchartComponent, OrgchartModule, PageFormComponent, PeriodosChart, PickListComponent, PipesModule, PrimeNgModule, RadioGroupComponent, SwitchComponent, TableComponent, TablePaginate, TelefonePipe, TranslatePrimeng, TreeTableComponent, TreeViewComponent, WorkspaceComponent, kvErrorModule };
|
|
4313
4526
|
//# sourceMappingURL=keevo-components.mjs.map
|