spiderly 19.0.1 → 19.0.3
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/fesm2022/spiderly.mjs +4382 -0
- package/fesm2022/spiderly.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/auth/login/login.component.d.ts +35 -0
- package/lib/components/auth/partials/auth.component.d.ts +21 -0
- package/lib/components/auth/partials/login-verification.component.d.ts +18 -0
- package/lib/components/auth/partials/registration-verification.component.d.ts +17 -0
- package/lib/components/auth/partials/verification-wrapper.component.d.ts +31 -0
- package/lib/components/auth/registration/registration.component.d.ts +34 -0
- package/lib/components/base-details/role-base-details.component.d.ts +50 -0
- package/lib/components/base-form/base-form copy.d.ts +54 -0
- package/lib/components/card-skeleton/card-skeleton.component.d.ts +12 -0
- package/lib/components/footer/footer.component.d.ts +9 -0
- package/lib/components/index-card/index-card.component.d.ts +22 -0
- package/lib/components/info-card/info-card.component.d.ts +11 -0
- package/lib/components/layout/layout-base.component.d.ts +37 -0
- package/lib/components/layout/sidebar/menuitem.component.d.ts +43 -0
- package/lib/components/layout/sidebar/sidebar-menu.component.d.ts +23 -0
- package/lib/components/layout/sidebar/sidebar-menu.service.d.ts +12 -0
- package/lib/components/layout/sidebar/sidebar.component.d.ts +11 -0
- package/lib/components/layout/topbar/topbar.component.d.ts +45 -0
- package/lib/components/not-found/not-found.component.d.ts +9 -0
- package/lib/components/required/required.component.d.ts +6 -0
- package/lib/components/spiderly-buttons/google-button/google-button.component.d.ts +17 -0
- package/lib/components/spiderly-buttons/return-button/return-button.component.d.ts +10 -0
- package/lib/components/spiderly-buttons/spiderly-button/spiderly-button.component.d.ts +6 -0
- package/lib/components/spiderly-buttons/spiderly-button-base/spiderly-button-base.d.ts +27 -0
- package/lib/components/spiderly-buttons/spiderly-split-button/spiderly-split-button.component.d.ts +8 -0
- package/lib/components/spiderly-data-table/spiderly-data-table.component.d.ts +157 -0
- package/lib/components/spiderly-delete-dialog/spiderly-delete-confirmation.component.d.ts +11 -0
- package/lib/components/spiderly-form-control/spiderly-form-control.d.ts +37 -0
- package/lib/components/spiderly-panels/panel-body/panel-body.component.d.ts +9 -0
- package/lib/components/spiderly-panels/panel-footer/panel-footer.component.d.ts +8 -0
- package/lib/components/spiderly-panels/panel-header/panel-header.component.d.ts +29 -0
- package/lib/components/spiderly-panels/spiderly-card/spiderly-card.component.d.ts +10 -0
- package/lib/components/spiderly-panels/spiderly-panel/spiderly-panel.component.d.ts +25 -0
- package/lib/components/spiderly-panels/spiderly-panels.module.d.ts +14 -0
- package/lib/controls/base-autocomplete-control.d.ts +9 -0
- package/lib/controls/base-control.d.ts +23 -0
- package/lib/controls/base-dropdown-control.d.ts +18 -0
- package/lib/controls/spiderly-autocomplete/spiderly-autocomplete.component.d.ts +18 -0
- package/lib/controls/spiderly-calendar/spiderly-calendar.component.d.ts +13 -0
- package/lib/controls/spiderly-checkbox/spiderly-checkbox.component.d.ts +14 -0
- package/lib/controls/spiderly-colorpick/spiderly-colorpick.component.d.ts +11 -0
- package/lib/controls/spiderly-controls.module.d.ts +22 -0
- package/lib/controls/spiderly-dropdown/spiderly-dropdown.component.d.ts +14 -0
- package/lib/controls/spiderly-editor/spiderly-editor.component.d.ts +16 -0
- package/lib/controls/spiderly-file/spiderly-file.component.d.ts +36 -0
- package/lib/controls/spiderly-multiautocomplete/spiderly-multiautocomplete.component.d.ts +13 -0
- package/lib/controls/spiderly-multiselect/spiderly-multiselect.component.d.ts +11 -0
- package/lib/controls/spiderly-number/spiderly-number.component.d.ts +15 -0
- package/lib/controls/spiderly-password/spiderly-password.component.d.ts +12 -0
- package/lib/controls/spiderly-textarea/spiderly-textarea.component.d.ts +11 -0
- package/lib/controls/spiderly-textbox/spiderly-textbox.component.d.ts +15 -0
- package/lib/entities/base-entity.d.ts +14 -0
- package/lib/entities/codebook.d.ts +9 -0
- package/lib/entities/init-company-auth-dialog-details.d.ts +9 -0
- package/lib/entities/init-top-bar-data.d.ts +16 -0
- package/lib/entities/is-authorized-for-save-event.d.ts +9 -0
- package/lib/entities/last-menu-icon-index-clicked.d.ts +7 -0
- package/lib/entities/lazy-load-selected-ids-result.d.ts +9 -0
- package/{src/lib/entities/menuchangeevent.ts → lib/entities/menuchangeevent.d.ts} +4 -4
- package/lib/entities/mime-type.d.ts +11 -0
- package/lib/entities/namebook.d.ts +9 -0
- package/lib/entities/primeng-option.d.ts +9 -0
- package/lib/entities/security-entities.d.ts +211 -0
- package/lib/entities/simple-save-result.d.ts +7 -0
- package/lib/entities/spiderly-button.d.ts +13 -0
- package/{src/lib/entities/table-filter-context.ts → lib/entities/table-filter-context.d.ts} +5 -6
- package/lib/entities/table-filter-sort-meta.d.ts +4 -0
- package/{src/lib/entities/table-filter.ts → lib/entities/table-filter.d.ts} +23 -48
- package/lib/entities/table-response.d.ts +4 -0
- package/lib/enums/security-enums.d.ts +22 -0
- package/lib/enums/verification-type-codes.d.ts +4 -0
- package/lib/guards/auth.guard.d.ts +15 -0
- package/lib/guards/not-auth.guard.d.ts +12 -0
- package/lib/handlers/spiderly-error-handler.d.ts +14 -0
- package/lib/handlers/spiderly-transloco-fallback-strategy.d.ts +13 -0
- package/lib/interceptors/http-loading.interceptor.d.ts +2 -0
- package/lib/interceptors/json-parser.interceptor.d.ts +2 -0
- package/lib/interceptors/jwt.interceptor.d.ts +2 -0
- package/lib/interceptors/unauthorized.interceptor.d.ts +2 -0
- package/lib/modules/core.module.d.ts +2 -0
- package/lib/modules/spiderly-transloco.module.d.ts +15 -0
- package/lib/services/api.service.security.d.ts +35 -0
- package/lib/services/app-initializer.d.ts +4 -0
- package/lib/services/app-layout-base.service.d.ts +60 -0
- package/lib/services/auth-base.service.d.ts +55 -0
- package/lib/services/base-form.service.d.ts +27 -0
- package/lib/services/config-base.service.d.ts +24 -0
- package/lib/services/helper-functions.d.ts +37 -0
- package/lib/services/spiderly-message.service.d.ts +17 -0
- package/lib/services/spiderly-transloco-loader.d.ts +10 -0
- package/lib/services/translate-labels-abstract.service.d.ts +7 -0
- package/lib/services/validator-abstract.service.d.ts +13 -0
- package/package.json +66 -55
- package/{src/public-api.ts → public-api.d.ts} +90 -103
- package/{src/lib → styles}/styles/shared.scss +3 -6
- package/eslint.config.js +0 -32
- package/ng-package.json +0 -10
- package/src/lib/components/auth/login/login.component.html +0 -25
- package/src/lib/components/auth/login/login.component.ts +0 -77
- package/src/lib/components/auth/partials/auth.component.html +0 -29
- package/src/lib/components/auth/partials/auth.component.ts +0 -60
- package/src/lib/components/auth/partials/login-verification.component.html +0 -2
- package/src/lib/components/auth/partials/login-verification.component.ts +0 -41
- package/src/lib/components/auth/partials/registration-verification.component.html +0 -1
- package/src/lib/components/auth/partials/registration-verification.component.ts +0 -41
- package/src/lib/components/auth/partials/verification-wrapper.component.html +0 -39
- package/src/lib/components/auth/partials/verification-wrapper.component.ts +0 -68
- package/src/lib/components/auth/registration/registration.component.html +0 -31
- package/src/lib/components/auth/registration/registration.component.ts +0 -77
- package/src/lib/components/base-details/role-base-details.component.html +0 -33
- package/src/lib/components/base-details/role-base-details.component.ts +0 -194
- package/src/lib/components/base-form/base-form copy.ts +0 -356
- package/src/lib/components/card-skeleton/card-skeleton.component.html +0 -8
- package/src/lib/components/card-skeleton/card-skeleton.component.ts +0 -21
- package/src/lib/components/footer/app.footer.component.ts +0 -17
- package/src/lib/components/footer/footer.component.html +0 -3
- package/src/lib/components/footer/footer.component.ts +0 -17
- package/src/lib/components/index-card/index-card.component.html +0 -15
- package/src/lib/components/index-card/index-card.component.ts +0 -48
- package/src/lib/components/info-card/info-card.component.html +0 -18
- package/src/lib/components/info-card/info-card.component.ts +0 -29
- package/src/lib/components/layout/layout-base.component.ts +0 -140
- package/src/lib/components/layout/sidebar/menuitem.component.html +0 -40
- package/src/lib/components/layout/sidebar/menuitem.component.ts +0 -179
- package/src/lib/components/layout/sidebar/sidebar-menu.component.html +0 -6
- package/src/lib/components/layout/sidebar/sidebar-menu.component.ts +0 -44
- package/src/lib/components/layout/sidebar/sidebar-menu.service.ts +0 -22
- package/src/lib/components/layout/sidebar/sidebar.component.html +0 -1
- package/src/lib/components/layout/sidebar/sidebar.component.ts +0 -20
- package/src/lib/components/layout/topbar/topbar.component.html +0 -64
- package/src/lib/components/layout/topbar/topbar.component.ts +0 -137
- package/src/lib/components/not-found/not-found.component.html +0 -27
- package/src/lib/components/not-found/not-found.component.ts +0 -22
- package/src/lib/components/required/required.component.html +0 -1
- package/src/lib/components/required/required.component.ts +0 -13
- package/src/lib/components/spiderly-buttons/google-button/google-button.component.html +0 -5
- package/src/lib/components/spiderly-buttons/google-button/google-button.component.ts +0 -53
- package/src/lib/components/spiderly-buttons/return-button/return-button.component.html +0 -3
- package/src/lib/components/spiderly-buttons/return-button/return-button.component.ts +0 -35
- package/src/lib/components/spiderly-buttons/spiderly-button/spiderly-button.component.html +0 -14
- package/src/lib/components/spiderly-buttons/spiderly-button/spiderly-button.component.ts +0 -27
- package/src/lib/components/spiderly-buttons/spiderly-button-base/spiderly-button-base.ts +0 -61
- package/src/lib/components/spiderly-buttons/spiderly-split-button/spiderly-split-button.component.html +0 -15
- package/src/lib/components/spiderly-buttons/spiderly-split-button/spiderly-split-button.component.ts +0 -24
- package/src/lib/components/spiderly-data-table/spiderly-data-table.component.html +0 -93
- package/src/lib/components/spiderly-data-table/spiderly-data-table.component.ts +0 -614
- package/src/lib/components/spiderly-delete-dialog/spiderly-delete-confirmation.component.html +0 -17
- package/src/lib/components/spiderly-delete-dialog/spiderly-delete-confirmation.component.ts +0 -39
- package/src/lib/components/spiderly-form-control/spiderly-form-control.ts +0 -60
- package/src/lib/components/spiderly-panels/panel-body/panel-body.component.html +0 -8
- package/src/lib/components/spiderly-panels/panel-body/panel-body.component.ts +0 -16
- package/src/lib/components/spiderly-panels/panel-footer/panel-footer.component.html +0 -8
- package/src/lib/components/spiderly-panels/panel-footer/panel-footer.component.ts +0 -15
- package/src/lib/components/spiderly-panels/panel-header/panel-header.component.html +0 -25
- package/src/lib/components/spiderly-panels/panel-header/panel-header.component.ts +0 -69
- package/src/lib/components/spiderly-panels/spiderly-card/spiderly-card.component.html +0 -7
- package/src/lib/components/spiderly-panels/spiderly-card/spiderly-card.component.ts +0 -17
- package/src/lib/components/spiderly-panels/spiderly-panel/spiderly-panel.component.html +0 -40
- package/src/lib/components/spiderly-panels/spiderly-panel/spiderly-panel.component.ts +0 -42
- package/src/lib/components/spiderly-panels/spiderly-panels.module.ts +0 -32
- package/src/lib/controls/base-autocomplete-control.ts +0 -17
- package/src/lib/controls/base-control.ts +0 -60
- package/src/lib/controls/base-dropdown-control.ts +0 -37
- package/src/lib/controls/spiderly-autocomplete/spiderly-autocomplete.component.html +0 -36
- package/src/lib/controls/spiderly-autocomplete/spiderly-autocomplete.component.ts +0 -56
- package/src/lib/controls/spiderly-calendar/spiderly-calendar.component.html +0 -21
- package/src/lib/controls/spiderly-calendar/spiderly-calendar.component.ts +0 -37
- package/src/lib/controls/spiderly-checkbox/spiderly-checkbox.component.html +0 -16
- package/src/lib/controls/spiderly-checkbox/spiderly-checkbox.component.ts +0 -38
- package/src/lib/controls/spiderly-colorpick/spiderly-colorpick.component.html +0 -33
- package/src/lib/controls/spiderly-colorpick/spiderly-colorpick.component.ts +0 -40
- package/src/lib/controls/spiderly-controls.module.ts +0 -61
- package/src/lib/controls/spiderly-dropdown/spiderly-dropdown.component.html +0 -27
- package/src/lib/controls/spiderly-dropdown/spiderly-dropdown.component.ts +0 -39
- package/src/lib/controls/spiderly-editor/spiderly-editor.component.html +0 -22
- package/src/lib/controls/spiderly-editor/spiderly-editor.component.ts +0 -58
- package/src/lib/controls/spiderly-file/spiderly-file.component.html +0 -54
- package/src/lib/controls/spiderly-file/spiderly-file.component.ts +0 -123
- package/src/lib/controls/spiderly-multiautocomplete/spiderly-multiautocomplete.component.html +0 -30
- package/src/lib/controls/spiderly-multiautocomplete/spiderly-multiautocomplete.component.ts +0 -38
- package/src/lib/controls/spiderly-multiselect/spiderly-multiselect.component.html +0 -23
- package/src/lib/controls/spiderly-multiselect/spiderly-multiselect.component.ts +0 -32
- package/src/lib/controls/spiderly-number/spiderly-number.component.html +0 -19
- package/src/lib/controls/spiderly-number/spiderly-number.component.ts +0 -37
- package/src/lib/controls/spiderly-password/spiderly-password.component.html +0 -17
- package/src/lib/controls/spiderly-password/spiderly-password.component.ts +0 -34
- package/src/lib/controls/spiderly-textarea/spiderly-textarea.component.html +0 -18
- package/src/lib/controls/spiderly-textarea/spiderly-textarea.component.ts +0 -32
- package/src/lib/controls/spiderly-textbox/spiderly-textbox.component.html +0 -23
- package/src/lib/controls/spiderly-textbox/spiderly-textbox.component.ts +0 -41
- package/src/lib/entities/base-entity.ts +0 -25
- package/src/lib/entities/codebook.ts +0 -23
- package/src/lib/entities/init-company-auth-dialog-details.ts +0 -22
- package/src/lib/entities/init-top-bar-data.ts +0 -35
- package/src/lib/entities/is-authorized-for-save-event.ts +0 -22
- package/src/lib/entities/last-menu-icon-index-clicked.ts +0 -18
- package/src/lib/entities/lazy-load-selected-ids-result.ts +0 -22
- package/src/lib/entities/mime-type.ts +0 -15
- package/src/lib/entities/namebook.ts +0 -22
- package/src/lib/entities/primeng-option.ts +0 -23
- package/src/lib/entities/readonly-object.ts +0 -1
- package/src/lib/entities/security-entities.ts +0 -548
- package/src/lib/entities/simple-save-result.ts +0 -19
- package/src/lib/entities/spiderly-button.ts +0 -30
- package/src/lib/entities/table-filter-sort-meta.ts +0 -5
- package/src/lib/entities/table-response.ts +0 -5
- package/src/lib/enums/security-enums.ts +0 -28
- package/src/lib/enums/verification-type-codes.ts +0 -5
- package/src/lib/guards/auth.guard.ts +0 -39
- package/src/lib/guards/not-auth.guard.ts +0 -32
- package/src/lib/handlers/spiderly-error-handler.ts +0 -32
- package/src/lib/handlers/spiderly-transloco-fallback-strategy.ts +0 -25
- package/src/lib/interceptors/http-loading.interceptor.ts +0 -21
- package/src/lib/interceptors/json-parser.interceptor.ts +0 -44
- package/src/lib/interceptors/jwt.interceptor.ts +0 -18
- package/src/lib/interceptors/unauthorized.interceptor.ts +0 -77
- package/src/lib/modules/core.module.ts +0 -22
- package/src/lib/modules/primeng.module.ts +0 -122
- package/src/lib/modules/spiderly-transloco.module.ts +0 -50
- package/src/lib/services/api.service.security.ts +0 -120
- package/src/lib/services/app-initializer.ts +0 -9
- package/src/lib/services/app-layout-base.service.ts +0 -184
- package/src/lib/services/auth-base.service.ts +0 -271
- package/src/lib/services/base-form.service.ts +0 -178
- package/src/lib/services/config-base.service.ts +0 -36
- package/src/lib/services/helper-functions.ts +0 -288
- package/src/lib/services/spiderly-message.service.ts +0 -66
- package/src/lib/services/spiderly-transloco-loader.ts +0 -15
- package/src/lib/services/translate-labels-abstract.service.ts +0 -13
- package/src/lib/services/validator-abstract.service.ts +0 -63
- package/tsconfig.lib.json +0 -17
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -14
- /package/{src/lib → styles}/components/spiderly-data-table/spiderly-data-table.component.scss +0 -0
- /package/{src/lib → styles}/components/spiderly-panels/panel-footer/panel-footer.component.scss +0 -0
- /package/{src/lib → styles}/components/spiderly-panels/spiderly-panel/spiderly-panel.component.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_config.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_content.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_footer.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_main.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_menu.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_mixins.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_preloading.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_responsive.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_spiderly-controls.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_topbar.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_typography.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_utils.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_variables.scss +0 -0
- /package/{src/lib → styles}/styles/layout/layout.scss +0 -0
- /package/{src/lib → styles}/styles/styles.scss +0 -0
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Component, Input, OnInit } from '@angular/core';
|
|
2
|
-
import { BaseControl } from '../base-control';
|
|
3
|
-
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { RequiredComponent } from '../../components/required/required.component';
|
|
6
|
-
import { TranslocoService } from '@jsverse/transloco';
|
|
7
|
-
import { PrimengModule } from '../../modules/primeng.module';
|
|
8
|
-
|
|
9
|
-
@Component({
|
|
10
|
-
selector: 'spiderly-checkbox',
|
|
11
|
-
templateUrl: './spiderly-checkbox.component.html',
|
|
12
|
-
styles: [],
|
|
13
|
-
imports: [
|
|
14
|
-
CommonModule,
|
|
15
|
-
ReactiveFormsModule,
|
|
16
|
-
FormsModule,
|
|
17
|
-
PrimengModule,
|
|
18
|
-
RequiredComponent
|
|
19
|
-
]
|
|
20
|
-
})
|
|
21
|
-
export class SpiderlyCheckboxComponent extends BaseControl implements OnInit {
|
|
22
|
-
@Input() fakeLabel = true;
|
|
23
|
-
@Input() initializeToFalse = false;
|
|
24
|
-
@Input() inlineLabel = false;
|
|
25
|
-
|
|
26
|
-
constructor(
|
|
27
|
-
protected override translocoService: TranslocoService,
|
|
28
|
-
) {
|
|
29
|
-
super(translocoService);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
override ngOnInit(){
|
|
33
|
-
if (this.initializeToFalse == true)
|
|
34
|
-
this.control.setValue(false);
|
|
35
|
-
|
|
36
|
-
super.ngOnInit();
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
<!-- Can't put (onBlur) in this control -->
|
|
2
|
-
|
|
3
|
-
<div class="flex flex-column gap-2">
|
|
4
|
-
<div *ngIf="getTranslatedLabel() != '' && getTranslatedLabel() != null">
|
|
5
|
-
<label>{{getTranslatedLabel()}}</label>
|
|
6
|
-
<required *ngIf="control?.required"></required>
|
|
7
|
-
</div>
|
|
8
|
-
<div style="display: flex; gap: 10px;">
|
|
9
|
-
<div class="p-inputgroup p-fluid">
|
|
10
|
-
<!-- <span class="p-inputgroup-addon">
|
|
11
|
-
#
|
|
12
|
-
</span> -->
|
|
13
|
-
<input
|
|
14
|
-
*ngIf="control"
|
|
15
|
-
[pTooltip]="getValidationErrrorMessages()" [tooltipEvent]="errorMessageTooltipEvent" tooltipPosition="bottom" [tooltipDisabled]="control.valid" tooltipStyleClass="spiderly-tooltip-invalid"
|
|
16
|
-
pInputText
|
|
17
|
-
[placeholder]="placeholder"
|
|
18
|
-
[style]="{'width':'100%', 'position': 'relative'}"
|
|
19
|
-
[formControl]="control"
|
|
20
|
-
[id]="control.label"
|
|
21
|
-
(blur)="control.markAsDirty()"
|
|
22
|
-
/>
|
|
23
|
-
</div>
|
|
24
|
-
<p-colorpicker
|
|
25
|
-
*ngIf="control"
|
|
26
|
-
[pTooltip]="getValidationErrrorMessages()" [tooltipEvent]="errorMessageTooltipEvent" tooltipPosition="bottom" [tooltipDisabled]="control.valid" tooltipStyleClass="spiderly-tooltip-invalid"
|
|
27
|
-
[formControl]="control"
|
|
28
|
-
[id]="control.label"
|
|
29
|
-
(blur)="control.markAsDirty()"
|
|
30
|
-
appendTo="body"
|
|
31
|
-
></p-colorpicker>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit } from '@angular/core';
|
|
2
|
-
import { BaseControl } from '../base-control';
|
|
3
|
-
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
4
|
-
import { RequiredComponent } from '../../components/required/required.component';
|
|
5
|
-
import { CommonModule } from '@angular/common';
|
|
6
|
-
import { TranslocoService } from '@jsverse/transloco';
|
|
7
|
-
import { PrimengModule } from '../../modules/primeng.module';
|
|
8
|
-
|
|
9
|
-
@Component({
|
|
10
|
-
selector: 'spiderly-colorpick',
|
|
11
|
-
templateUrl: './spiderly-colorpick.component.html',
|
|
12
|
-
styles: [],
|
|
13
|
-
imports: [
|
|
14
|
-
CommonModule,
|
|
15
|
-
ReactiveFormsModule,
|
|
16
|
-
FormsModule,
|
|
17
|
-
PrimengModule,
|
|
18
|
-
RequiredComponent
|
|
19
|
-
]
|
|
20
|
-
})
|
|
21
|
-
export class SpiderlyColorpickComponent extends BaseControl implements OnInit {
|
|
22
|
-
|
|
23
|
-
constructor(
|
|
24
|
-
protected override translocoService: TranslocoService,
|
|
25
|
-
) {
|
|
26
|
-
super(translocoService);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
override ngOnInit(){
|
|
30
|
-
this.control.valueChanges.subscribe((value) => {
|
|
31
|
-
this.control.setValue(value, { emitEvent: false }); // Preventing infinite loop
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
if (this.control.value == null)
|
|
35
|
-
this.placeholder = this.translocoService.translate('SelectAColor');
|
|
36
|
-
|
|
37
|
-
super.ngOnInit();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { SpiderlyPanelsModule } from '../components/spiderly-panels/spiderly-panels.module';
|
|
3
|
-
import { SpiderlyMultiAutocompleteComponent } from './spiderly-multiautocomplete/spiderly-multiautocomplete.component';
|
|
4
|
-
import { SpiderlyPasswordComponent } from './spiderly-password/spiderly-password.component';
|
|
5
|
-
import { SpiderlyTextboxComponent } from './spiderly-textbox/spiderly-textbox.component';
|
|
6
|
-
import { SpiderlyCheckboxComponent } from './spiderly-checkbox/spiderly-checkbox.component';
|
|
7
|
-
import { SpiderlyMultiSelectComponent } from './spiderly-multiselect/spiderly-multiselect.component';
|
|
8
|
-
import { SpiderlyTextareaComponent } from './spiderly-textarea/spiderly-textarea.component';
|
|
9
|
-
import { SpiderlyNumberComponent } from './spiderly-number/spiderly-number.component';
|
|
10
|
-
import { SpiderlyDropdownComponent } from './spiderly-dropdown/spiderly-dropdown.component';
|
|
11
|
-
import { SpiderlyEditorComponent } from './spiderly-editor/spiderly-editor.component';
|
|
12
|
-
import { SpiderlyColorpickComponent } from './spiderly-colorpick/spiderly-colorpick.component';
|
|
13
|
-
import { SpiderlyFileComponent } from './spiderly-file/spiderly-file.component';
|
|
14
|
-
import { SpiderlyCalendarComponent } from './spiderly-calendar/spiderly-calendar.component';
|
|
15
|
-
import { SpiderlyAutocompleteComponent } from './spiderly-autocomplete/spiderly-autocomplete.component';
|
|
16
|
-
import { SpiderlyButtonComponent } from '../components/spiderly-buttons/spiderly-button/spiderly-button.component';
|
|
17
|
-
import { SpiderlyReturnButtonComponent } from '../components/spiderly-buttons/return-button/return-button.component';
|
|
18
|
-
|
|
19
|
-
@NgModule({
|
|
20
|
-
imports: [
|
|
21
|
-
SpiderlyTextboxComponent,
|
|
22
|
-
SpiderlyTextareaComponent,
|
|
23
|
-
SpiderlyCheckboxComponent,
|
|
24
|
-
SpiderlyCalendarComponent,
|
|
25
|
-
SpiderlyReturnButtonComponent,
|
|
26
|
-
SpiderlyButtonComponent,
|
|
27
|
-
SpiderlyPanelsModule,
|
|
28
|
-
SpiderlyPasswordComponent,
|
|
29
|
-
SpiderlyAutocompleteComponent,
|
|
30
|
-
SpiderlyMultiAutocompleteComponent,
|
|
31
|
-
SpiderlyMultiSelectComponent,
|
|
32
|
-
SpiderlyNumberComponent,
|
|
33
|
-
SpiderlyDropdownComponent,
|
|
34
|
-
SpiderlyEditorComponent,
|
|
35
|
-
SpiderlyColorpickComponent,
|
|
36
|
-
SpiderlyFileComponent,
|
|
37
|
-
],
|
|
38
|
-
exports: [
|
|
39
|
-
SpiderlyTextboxComponent,
|
|
40
|
-
SpiderlyTextareaComponent,
|
|
41
|
-
SpiderlyCheckboxComponent,
|
|
42
|
-
SpiderlyCalendarComponent,
|
|
43
|
-
SpiderlyReturnButtonComponent,
|
|
44
|
-
SpiderlyButtonComponent,
|
|
45
|
-
SpiderlyPanelsModule,
|
|
46
|
-
SpiderlyPasswordComponent,
|
|
47
|
-
SpiderlyAutocompleteComponent,
|
|
48
|
-
SpiderlyMultiAutocompleteComponent,
|
|
49
|
-
SpiderlyMultiSelectComponent,
|
|
50
|
-
SpiderlyNumberComponent,
|
|
51
|
-
SpiderlyDropdownComponent,
|
|
52
|
-
SpiderlyEditorComponent,
|
|
53
|
-
SpiderlyColorpickComponent,
|
|
54
|
-
SpiderlyFileComponent
|
|
55
|
-
],
|
|
56
|
-
declarations: [
|
|
57
|
-
],
|
|
58
|
-
providers: [
|
|
59
|
-
]
|
|
60
|
-
})
|
|
61
|
-
export class SpiderlyControlsModule {}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<div class="flex flex-column gap-2">
|
|
2
|
-
|
|
3
|
-
<div *ngIf="getTranslatedLabel() != '' && getTranslatedLabel() != null">
|
|
4
|
-
<label>{{getTranslatedLabel()}}</label>
|
|
5
|
-
<required *ngIf="control?.required"></required>
|
|
6
|
-
<!-- tabindex="-1": Makes the element focusable, but removes it from the tab order. -->
|
|
7
|
-
<i *ngIf="showTooltip" class="{{tooltipIcon}}" style="margin-left: 5px; cursor: pointer;" [pTooltip]="tooltipText" tabindex="-1" tooltipEvent="focus"></i>
|
|
8
|
-
</div>
|
|
9
|
-
|
|
10
|
-
<!-- Don't support p-inputgroup -->
|
|
11
|
-
<p-select
|
|
12
|
-
*ngIf="control"
|
|
13
|
-
[pTooltip]="getValidationErrrorMessages()" tooltipPosition="bottom" [tooltipDisabled]="control.valid" tooltipStyleClass="spiderly-tooltip-invalid"
|
|
14
|
-
[id]="label"
|
|
15
|
-
[formControl]="control"
|
|
16
|
-
[placeholder]="placeholder"
|
|
17
|
-
[options]="options"
|
|
18
|
-
optionLabel="label"
|
|
19
|
-
optionValue="code"
|
|
20
|
-
[showClear]="true"
|
|
21
|
-
(onHide)="dropdownMarkAsDirty()"
|
|
22
|
-
(onChange)="change($event)"
|
|
23
|
-
[fluid]="true"
|
|
24
|
-
appendTo="body"
|
|
25
|
-
/>
|
|
26
|
-
|
|
27
|
-
</div>
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
4
|
-
import { RequiredComponent } from '../../components/required/required.component';
|
|
5
|
-
import { BaseDropdownControl } from '../base-dropdown-control';
|
|
6
|
-
import { TranslocoService } from '@jsverse/transloco';
|
|
7
|
-
import { DropdownChangeEvent } from 'primeng/dropdown';
|
|
8
|
-
import { PrimengModule } from '../../modules/primeng.module';
|
|
9
|
-
|
|
10
|
-
@Component({
|
|
11
|
-
selector: 'spiderly-dropdown',
|
|
12
|
-
templateUrl: './spiderly-dropdown.component.html',
|
|
13
|
-
styles: [],
|
|
14
|
-
imports: [
|
|
15
|
-
ReactiveFormsModule,
|
|
16
|
-
FormsModule,
|
|
17
|
-
PrimengModule,
|
|
18
|
-
CommonModule,
|
|
19
|
-
RequiredComponent
|
|
20
|
-
]
|
|
21
|
-
})
|
|
22
|
-
export class SpiderlyDropdownComponent extends BaseDropdownControl implements OnInit {
|
|
23
|
-
@Output() onChange: EventEmitter<DropdownChangeEvent> = new EventEmitter();
|
|
24
|
-
|
|
25
|
-
constructor(
|
|
26
|
-
protected override translocoService: TranslocoService,
|
|
27
|
-
) {
|
|
28
|
-
super(translocoService);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
override ngOnInit(){
|
|
32
|
-
super.ngOnInit();
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
change(event: DropdownChangeEvent){
|
|
36
|
-
this.onChange.next(event);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<!-- Can't put (onBlur) in this control -->
|
|
2
|
-
|
|
3
|
-
<div class="flex flex-column gap-2">
|
|
4
|
-
<div *ngIf="getTranslatedLabel() != '' && getTranslatedLabel() != null">
|
|
5
|
-
<label>{{getTranslatedLabel()}}</label>
|
|
6
|
-
<required *ngIf="control?.required"></required>
|
|
7
|
-
</div>
|
|
8
|
-
|
|
9
|
-
<!-- Disable doesn't work on this control -->
|
|
10
|
-
<p-editor
|
|
11
|
-
*ngIf="control"
|
|
12
|
-
[formControl]="control"
|
|
13
|
-
[pTooltip]="getValidationErrrorMessages()" [tooltipEvent]="errorMessageTooltipEvent" tooltipPosition="bottom" [tooltipDisabled]="control.valid" tooltipStyleClass="spiderly-tooltip-invalid"
|
|
14
|
-
[readonly]="control.disabled"
|
|
15
|
-
[class]="control.invalid && control.dirty ? 'control-error-border' : ''"
|
|
16
|
-
[id]="control.label"
|
|
17
|
-
[placeholder]="placeholder"
|
|
18
|
-
(click)="onClick()"
|
|
19
|
-
[style]="{ height: '320px' }"
|
|
20
|
-
></p-editor>
|
|
21
|
-
|
|
22
|
-
</div>
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { Component, Input, OnInit, ViewChild } from '@angular/core';
|
|
2
|
-
import { BaseControl } from '../base-control';
|
|
3
|
-
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
4
|
-
import { RequiredComponent } from '../../components/required/required.component';
|
|
5
|
-
import { CommonModule } from '@angular/common';
|
|
6
|
-
import { TranslocoService } from '@jsverse/transloco';
|
|
7
|
-
import { PrimengModule } from '../../modules/primeng.module';
|
|
8
|
-
import { Editor } from 'primeng/editor';
|
|
9
|
-
import { Tooltip } from 'primeng/tooltip';
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: 'spiderly-editor',
|
|
13
|
-
templateUrl: './spiderly-editor.component.html',
|
|
14
|
-
styles: [],
|
|
15
|
-
imports: [
|
|
16
|
-
CommonModule,
|
|
17
|
-
ReactiveFormsModule,
|
|
18
|
-
FormsModule,
|
|
19
|
-
PrimengModule,
|
|
20
|
-
RequiredComponent
|
|
21
|
-
]
|
|
22
|
-
})
|
|
23
|
-
export class SpiderlyEditorComponent extends BaseControl implements OnInit {
|
|
24
|
-
@ViewChild(Editor) editor: Editor;
|
|
25
|
-
@ViewChild(Tooltip) tooltip: Tooltip;
|
|
26
|
-
|
|
27
|
-
constructor(
|
|
28
|
-
protected override translocoService: TranslocoService,
|
|
29
|
-
) {
|
|
30
|
-
super(translocoService);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
override ngOnInit(){
|
|
34
|
-
super.ngOnInit();
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
onClick(){
|
|
38
|
-
let editableArea: HTMLElement = this.editor.el.nativeElement.querySelector('.ql-editor');
|
|
39
|
-
|
|
40
|
-
editableArea.onblur = () => {
|
|
41
|
-
this.control.markAsDirty();
|
|
42
|
-
this.tooltip.deactivate();
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
editableArea.onfocus = () => {
|
|
46
|
-
if (this.errorMessageTooltipEvent == 'focus' ) {
|
|
47
|
-
this.tooltip.activate();
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
editableArea.onmouseover = () => {
|
|
52
|
-
if (this.errorMessageTooltipEvent == 'hover' ) {
|
|
53
|
-
this.tooltip.activate();
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
<ng-container *transloco="let t">
|
|
2
|
-
<div class="flex flex-column gap-2">
|
|
3
|
-
<div *ngIf="getTranslatedLabel() != '' && getTranslatedLabel() != null">
|
|
4
|
-
<label>{{getTranslatedLabel()}}</label>
|
|
5
|
-
<!-- FT: It's okay for this control, because for the custom uploads where we are not initializing the control from the backend, there is no need for formControl. -->
|
|
6
|
-
<required *ngIf="control?.required || required"></required>
|
|
7
|
-
</div>
|
|
8
|
-
|
|
9
|
-
<p-fileUpload
|
|
10
|
-
[files]="files"
|
|
11
|
-
[disabled]="disabled"
|
|
12
|
-
[name]="control?.label ?? label"
|
|
13
|
-
[multiple]="multiple"
|
|
14
|
-
[accept]="acceptedFileTypesCommaSeparated"
|
|
15
|
-
[maxFileSize]="1000000"
|
|
16
|
-
(onSelect)="filesSelected($event)"
|
|
17
|
-
[class]="control?.invalid && control?.dirty ? 'control-error-border' : ''"
|
|
18
|
-
>
|
|
19
|
-
<ng-template pTemplate="header" let-files let-chooseCallback="chooseCallback" let-clearCallback="clearCallback" let-uploadCallback="uploadCallback">
|
|
20
|
-
<div class="flex flex-wrap justify-content-between align-items-center flex-1 gap-2">
|
|
21
|
-
<div class="flex gap-2">
|
|
22
|
-
<spiderly-button [disabled]="disabled" (onClick)="choose($event, chooseCallback)" icon="pi pi-upload" [rounded]="true" [outlined]="true" />
|
|
23
|
-
<!-- <p-button (onClick)="clearCallback()" icon="pi pi-times" [rounded]="true" [outlined]="true" severity="danger" [disabled]="!files || files.length === 0" /> -->
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
</ng-template>
|
|
27
|
-
<ng-template pTemplate="content" let-files let-removeFileCallback="removeFileCallback">
|
|
28
|
-
<div *ngIf="files?.length > 0">
|
|
29
|
-
<div class="flex justify-content-center p-0 gap-5">
|
|
30
|
-
<div *ngFor="let file of files; let index = index" class="card m-0 px-3 py-3 flex flex-column align-items-center gap-3" style="justify-content: center; overflow: hidden;">
|
|
31
|
-
<div *ngIf="isImageFileType(file.type)" class="image-container">
|
|
32
|
-
<img role="presentation" [src]="file.objectURL"/>
|
|
33
|
-
</div>
|
|
34
|
-
<div *ngIf="isExcelFileType(file.type)" class="excel-container">
|
|
35
|
-
<div class="excel-details">
|
|
36
|
-
<i class="pi pi-file-excel" style="color: green; margin-right: 4px;"></i>
|
|
37
|
-
<span class="file-name">{{ file.name }}</span>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
<spiderly-button [disabled]="disabled" icon="pi pi-times" (onClick)="fileRemoved(removeFileCallback, index)" [outlined]="true" [rounded]="true" severity="danger" />
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
</ng-template>
|
|
45
|
-
<ng-template pTemplate="file"> </ng-template>
|
|
46
|
-
<ng-template pTemplate="empty">
|
|
47
|
-
<div class="flex align-items-center justify-content-center flex-column">
|
|
48
|
-
<i class="pi pi-cloud-upload border-2 border-circle p-5 text-8xl text-400 border-400"></i>
|
|
49
|
-
<p class="mt-4 mb-0">{{t('DragAndDropFilesHereToUpload')}}</p>
|
|
50
|
-
</div>
|
|
51
|
-
</ng-template>
|
|
52
|
-
</p-fileUpload>
|
|
53
|
-
</div>
|
|
54
|
-
</ng-container>
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
2
|
-
import { BaseControl } from '../base-control';
|
|
3
|
-
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
4
|
-
import { RequiredComponent } from '../../components/required/required.component';
|
|
5
|
-
import { CommonModule } from '@angular/common';
|
|
6
|
-
import { FileSelectEvent } from 'primeng/fileupload';
|
|
7
|
-
import { getMimeTypeForFileName, isExcelFileType, isImageFileType } from '../../services/helper-functions';
|
|
8
|
-
import { TranslocoDirective, TranslocoService } from '@jsverse/transloco';
|
|
9
|
-
import { BaseEntity } from '../../entities/base-entity';
|
|
10
|
-
import { PrimengModule } from '../../modules/primeng.module';
|
|
11
|
-
import { SpiderlyButtonComponent } from '../../components/spiderly-buttons/spiderly-button/spiderly-button.component';
|
|
12
|
-
|
|
13
|
-
@Component({
|
|
14
|
-
selector: 'spiderly-file',
|
|
15
|
-
templateUrl: './spiderly-file.component.html',
|
|
16
|
-
styles: [],
|
|
17
|
-
imports: [
|
|
18
|
-
CommonModule,
|
|
19
|
-
ReactiveFormsModule,
|
|
20
|
-
FormsModule,
|
|
21
|
-
PrimengModule,
|
|
22
|
-
RequiredComponent,
|
|
23
|
-
SpiderlyButtonComponent,
|
|
24
|
-
TranslocoDirective
|
|
25
|
-
]
|
|
26
|
-
})
|
|
27
|
-
export class SpiderlyFileComponent extends BaseControl implements OnInit {
|
|
28
|
-
@Output() onFileSelected = new EventEmitter<SpiderlyFileSelectEvent>();
|
|
29
|
-
@Output() onFileRemoved = new EventEmitter<null>();
|
|
30
|
-
@Input() objectId: number;
|
|
31
|
-
@Input() fileData: string;
|
|
32
|
-
@Input() acceptedFileTypes: Array<'image/*' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'application/vnd.ms-excel' | '.xlsx' | '.xls'> = ['image/*'];
|
|
33
|
-
@Input() required: boolean; // It's okay for this control, because for the custom uploads where we are not initializing the control from the backend, there is no need for formControl.
|
|
34
|
-
@Input() multiple: boolean = false;
|
|
35
|
-
|
|
36
|
-
acceptedFileTypesCommaSeparated: string;
|
|
37
|
-
@Input() files: File[] = [];
|
|
38
|
-
|
|
39
|
-
constructor(
|
|
40
|
-
protected override translocoService: TranslocoService,
|
|
41
|
-
) {
|
|
42
|
-
super(translocoService);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
override ngOnInit(){
|
|
46
|
-
if (this.control?.value != null && this.fileData != null) {
|
|
47
|
-
const file = this.base64ToFile(this.fileData);
|
|
48
|
-
this.files.push(file);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
this.acceptedFileTypesCommaSeparated = this.acceptedFileTypes.join(',');
|
|
52
|
-
|
|
53
|
-
super.ngOnInit();
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
filesSelected(event: FileSelectEvent){
|
|
57
|
-
const file = event.files[0];
|
|
58
|
-
|
|
59
|
-
const formData: FormData = new FormData();
|
|
60
|
-
formData.append('file', file, `${this.objectId}-${file.name}`);
|
|
61
|
-
|
|
62
|
-
this.onFileSelected.next(new SpiderlyFileSelectEvent({file: file, formData: formData}));
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
choose(event, chooseCallback){
|
|
66
|
-
chooseCallback();
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
fileRemoved(removeFileCallback, index: number){
|
|
70
|
-
removeFileCallback(index);
|
|
71
|
-
this.control?.setValue(null);
|
|
72
|
-
this.onFileRemoved.next(null);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// Put inside global functions if you need it
|
|
76
|
-
base64ToFile(base64String: string){
|
|
77
|
-
const [header, base64Content] = base64String.split(';base64,');
|
|
78
|
-
const fileName = header.split('=')[1];
|
|
79
|
-
const mimeType = getMimeTypeForFileName(fileName);
|
|
80
|
-
|
|
81
|
-
const byteCharacters = atob(base64Content);
|
|
82
|
-
const byteNumbers = new Uint8Array(byteCharacters.length);
|
|
83
|
-
|
|
84
|
-
for (let i = 0; i < byteCharacters.length; i++) {
|
|
85
|
-
byteNumbers[i] = byteCharacters.charCodeAt(i);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
const blob = new Blob([byteNumbers], { type: mimeType });
|
|
89
|
-
const file = new File([blob], fileName, { type: mimeType });
|
|
90
|
-
|
|
91
|
-
return file;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
isImageFileType(mimeType: string): boolean {
|
|
95
|
-
return isImageFileType(mimeType);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
isExcelFileType(mimeType: string): boolean {
|
|
99
|
-
return isExcelFileType(mimeType);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export class SpiderlyFileSelectEvent extends BaseEntity
|
|
105
|
-
{
|
|
106
|
-
file?: File;
|
|
107
|
-
formData?: FormData;
|
|
108
|
-
|
|
109
|
-
constructor(
|
|
110
|
-
{
|
|
111
|
-
file,
|
|
112
|
-
formData,
|
|
113
|
-
}:{
|
|
114
|
-
file?: File;
|
|
115
|
-
formData?: FormData;
|
|
116
|
-
} = {}
|
|
117
|
-
) {
|
|
118
|
-
super('SpiderlyFileSelectEvent');
|
|
119
|
-
|
|
120
|
-
this.file = file;
|
|
121
|
-
this.formData = formData;
|
|
122
|
-
}
|
|
123
|
-
}
|
package/src/lib/controls/spiderly-multiautocomplete/spiderly-multiautocomplete.component.html
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<ng-container *transloco="let t">
|
|
2
|
-
<div class="flex flex-column gap-2">
|
|
3
|
-
<div>
|
|
4
|
-
<label>{{getTranslatedLabel()}}</label>
|
|
5
|
-
<required *ngIf="control?.required"></required>
|
|
6
|
-
</div>
|
|
7
|
-
|
|
8
|
-
<!-- Don't support p-inputgroup -->
|
|
9
|
-
<!-- Showing label fix: https://github.com/primefaces/primeng/issues/17332#issuecomment-2922861294 -->
|
|
10
|
-
<p-autocomplete
|
|
11
|
-
*ngIf="control"
|
|
12
|
-
[pTooltip]="getValidationErrrorMessages()" [tooltipEvent]="errorMessageTooltipEvent" tooltipPosition="bottom" [tooltipDisabled]="control.valid" tooltipStyleClass="spiderly-tooltip-invalid"
|
|
13
|
-
[id]="label"
|
|
14
|
-
[formControl]="control"
|
|
15
|
-
[placeholder]="placeholder"
|
|
16
|
-
[suggestions]="options"
|
|
17
|
-
(completeMethod)="search($event)"
|
|
18
|
-
[forceSelection]="true"
|
|
19
|
-
[multiple]="true"
|
|
20
|
-
[dropdown]="false"
|
|
21
|
-
[showClear]="true"
|
|
22
|
-
(onHide)="dropdownMarkAsDirty()"
|
|
23
|
-
[completeOnFocus]="true"
|
|
24
|
-
dropdownIcon="pi pi-plus"
|
|
25
|
-
[fluid]="true"
|
|
26
|
-
[style]="{'width': '100%'}"
|
|
27
|
-
>
|
|
28
|
-
</p-autocomplete>
|
|
29
|
-
</div>
|
|
30
|
-
</ng-container>
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit } from '@angular/core';
|
|
2
|
-
import { AutoCompleteCompleteEvent } from 'primeng/autocomplete';
|
|
3
|
-
import { BaseAutocompleteControl } from '../base-autocomplete-control';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
6
|
-
import { RequiredComponent } from '../../components/required/required.component';
|
|
7
|
-
import { TranslocoDirective, TranslocoService } from '@jsverse/transloco';
|
|
8
|
-
import { PrimengModule } from '../../modules/primeng.module';
|
|
9
|
-
|
|
10
|
-
@Component({
|
|
11
|
-
selector: 'spiderly-multiautocomplete',
|
|
12
|
-
templateUrl: './spiderly-multiautocomplete.component.html',
|
|
13
|
-
styles: [],
|
|
14
|
-
imports: [
|
|
15
|
-
ReactiveFormsModule,
|
|
16
|
-
FormsModule,
|
|
17
|
-
PrimengModule,
|
|
18
|
-
CommonModule,
|
|
19
|
-
RequiredComponent,
|
|
20
|
-
TranslocoDirective,
|
|
21
|
-
]
|
|
22
|
-
})
|
|
23
|
-
export class SpiderlyMultiAutocompleteComponent extends BaseAutocompleteControl implements OnInit {
|
|
24
|
-
constructor(
|
|
25
|
-
protected override translocoService: TranslocoService,
|
|
26
|
-
) {
|
|
27
|
-
super(translocoService);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
override ngOnInit(){
|
|
31
|
-
super.ngOnInit();
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
search(event: AutoCompleteCompleteEvent){
|
|
35
|
-
this.onTextInput.next(event);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<div class="flex flex-column gap-2">
|
|
2
|
-
<div>
|
|
3
|
-
<label>{{getTranslatedLabel()}}</label>
|
|
4
|
-
<required *ngIf="control?.required"></required>
|
|
5
|
-
</div>
|
|
6
|
-
<p-multiSelect
|
|
7
|
-
*ngIf="control"
|
|
8
|
-
[pTooltip]="getValidationErrrorMessages()" [tooltipEvent]="errorMessageTooltipEvent" tooltipPosition="bottom" [tooltipDisabled]="control.valid" tooltipStyleClass="spiderly-tooltip-invalid"
|
|
9
|
-
[id]="label"
|
|
10
|
-
[formControl]="control"
|
|
11
|
-
[options]="options"
|
|
12
|
-
optionLabel="label"
|
|
13
|
-
optionValue="code"
|
|
14
|
-
display="chip"
|
|
15
|
-
[maxSelectedLabels]="20"
|
|
16
|
-
[placeholder]="placeholder"
|
|
17
|
-
[fluid]="true"
|
|
18
|
-
appendTo="body"
|
|
19
|
-
/>
|
|
20
|
-
<!-- [virtualScroll]="true" FT: I think that this is not doing anything, check -->
|
|
21
|
-
<!-- (onFilter)="search($event)" FT: While they don't implement lazy load like here: https://github.com/yelhouti/primeng/blob/8.0.0-rc2/src/app/components/multiselect/multiselect.ts
|
|
22
|
-
we need to use this and dropdown control only on the client -->
|
|
23
|
-
</div>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit } from '@angular/core';
|
|
2
|
-
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
4
|
-
import { RequiredComponent } from '../../components/required/required.component';
|
|
5
|
-
import { BaseDropdownControl } from '../base-dropdown-control';
|
|
6
|
-
import { TranslocoService } from '@jsverse/transloco';
|
|
7
|
-
import { PrimengModule } from '../../modules/primeng.module';
|
|
8
|
-
|
|
9
|
-
@Component({
|
|
10
|
-
selector: 'spiderly-multiselect',
|
|
11
|
-
templateUrl: './spiderly-multiselect.component.html',
|
|
12
|
-
styles: [],
|
|
13
|
-
imports: [
|
|
14
|
-
CommonModule,
|
|
15
|
-
ReactiveFormsModule,
|
|
16
|
-
FormsModule,
|
|
17
|
-
PrimengModule,
|
|
18
|
-
RequiredComponent
|
|
19
|
-
]
|
|
20
|
-
})
|
|
21
|
-
export class SpiderlyMultiSelectComponent extends BaseDropdownControl implements OnInit {
|
|
22
|
-
|
|
23
|
-
constructor(
|
|
24
|
-
protected override translocoService: TranslocoService,
|
|
25
|
-
) {
|
|
26
|
-
super(translocoService);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
override ngOnInit(){
|
|
30
|
-
super.ngOnInit();
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<div class="flex flex-column gap-2">
|
|
2
|
-
<div *ngIf="showLabel">
|
|
3
|
-
<label>{{getTranslatedLabel()}}</label>
|
|
4
|
-
<required *ngIf="control?.required"></required>
|
|
5
|
-
</div>
|
|
6
|
-
<p-inputNumber
|
|
7
|
-
*ngIf="control"
|
|
8
|
-
[pTooltip]="getValidationErrrorMessages()" [tooltipEvent]="errorMessageTooltipEvent" tooltipPosition="bottom" [tooltipDisabled]="control.valid" tooltipStyleClass="spiderly-tooltip-invalid"
|
|
9
|
-
[formControl]="control"
|
|
10
|
-
[id]="control.label"
|
|
11
|
-
(onBlur)="control.markAsDirty()"
|
|
12
|
-
[prefix]="prefix"
|
|
13
|
-
[style]="{'width':'100%'}"
|
|
14
|
-
[inputStyle]="{'width':'100%'}"
|
|
15
|
-
[showButtons]="showButtons"
|
|
16
|
-
buttonLayout="horizontal"
|
|
17
|
-
[maxFractionDigits]="maxFractionDigits"
|
|
18
|
-
/>
|
|
19
|
-
</div>
|