@coolon/angular-ui-powerups 16.1.0-aplpha.18 → 16.1.0-aplpha.181
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/assets/activities/activities.scss +5 -3
- package/assets/activities/input-activities.scss +14 -6
- package/assets/draw.scss +20 -0
- package/assets/form.scss +74 -27
- package/assets/icons.scss +1 -0
- package/assets/layout.scss +3 -0
- package/assets/styles.scss +2 -0
- package/assets/table.scss +41 -19
- package/assets/tabs.scss +15 -5
- package/esm2022/lib/animations/slide-animations.mjs +15 -10
- package/esm2022/lib/components/cards/abstract-card-container.component.mjs +28 -5
- package/esm2022/lib/components/cards/card-container/card-container.component.mjs +4 -4
- package/esm2022/lib/components/commands/button-renderer/button-renderer.component.mjs +115 -0
- package/esm2022/lib/components/commands/command/command.component.mjs +34 -29
- package/esm2022/lib/components/commands/command-face/command-face.component.mjs +11 -3
- package/esm2022/lib/components/commands/command-face.mjs +12 -11
- package/esm2022/lib/components/commands/group/popup-aware.component.mjs +31 -8
- package/esm2022/lib/components/commands/group/popup-menu/abstract-popup-menu.component.mjs +25 -23
- package/esm2022/lib/components/commands/group/popup-menu/more-menu.component.mjs +11 -20
- package/esm2022/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.mjs +12 -7
- package/esm2022/lib/components/commands/group/popup-menu/popup-menu.component.mjs +11 -20
- package/esm2022/lib/components/commands/group/tool-bar/tool-bar.component.mjs +8 -6
- package/esm2022/lib/components/commands/separator.component.mjs +6 -12
- package/esm2022/lib/components/components.module.mjs +55 -30
- package/esm2022/lib/components/disposable-component.mjs +32 -7
- package/esm2022/lib/components/exports.mjs +14 -5
- package/esm2022/lib/components/file/file-download/file-download.component.mjs +78 -0
- package/esm2022/lib/components/forms/abstract-input.component.mjs +55 -12
- package/esm2022/lib/components/forms/autocomplete-input/autocomplete-input.component.mjs +4 -4
- package/esm2022/lib/components/forms/checkbox-input/checkbox-input.component.mjs +8 -6
- package/esm2022/lib/components/forms/form-field.mjs +2 -0
- package/esm2022/lib/components/forms/multiple-select-input/multiple-select-input.component.mjs +4 -4
- package/esm2022/lib/components/forms/number-input/number-input.component.mjs +86 -9
- package/esm2022/lib/components/forms/password-input/password-input.component.mjs +40 -3
- package/esm2022/lib/components/forms/search-input/search-input.component.mjs +33 -0
- package/esm2022/lib/components/forms/select-input/select-input.component.mjs +11 -10
- package/esm2022/lib/components/forms/string-input/string-input.component.mjs +36 -11
- package/esm2022/lib/components/forms/text-input/text-input.component.mjs +8 -4
- package/esm2022/lib/components/icon/icon.component.mjs +7 -4
- package/esm2022/lib/components/loadable-component.mjs +21 -10
- package/esm2022/lib/components/resize-aware.component.mjs +61 -24
- package/esm2022/lib/components/switch-case/switch-case.component.mjs +5 -7
- package/esm2022/lib/components/tables/abstract-table-model.mjs +112 -63
- package/esm2022/lib/components/tables/abstract-table.component.mjs +19 -5
- package/esm2022/lib/components/tables/column/column-manager.mjs +81 -0
- package/esm2022/lib/components/tables/column/column-model.mjs +16 -6
- package/esm2022/lib/components/tables/column/column-order-manager.mjs +19 -0
- package/esm2022/lib/components/tables/column/custom-template-column-model.mjs +3 -3
- package/esm2022/lib/components/tables/column/custom-value-column-model.mjs +3 -3
- package/esm2022/lib/components/tables/column/editor-controls-column-model.mjs +3 -3
- package/esm2022/lib/components/tables/column/list-propery-column-model.mjs +3 -3
- package/esm2022/lib/components/tables/column/property-column-model.mjs +3 -3
- package/esm2022/lib/components/tables/column/selection-column-model.mjs +35 -13
- package/esm2022/lib/components/tables/editor/edit-row-controls/edit-row-controls.component.mjs +2 -2
- package/esm2022/lib/components/tables/editor/edit-session.mjs +1 -1
- package/esm2022/lib/components/tables/filter/table-filter-model.mjs +4 -2
- package/esm2022/lib/components/tables/filter/text-search-predicate.mjs +16 -2
- package/esm2022/lib/components/tables/footer/footer-row-model.mjs +38 -0
- package/esm2022/lib/components/tables/paginator/paginator.component.mjs +1 -1
- package/esm2022/lib/components/tables/renderer/abstract-cell-renderer.mjs +7 -0
- package/esm2022/lib/components/tables/renderer/cell-portal-ref.mjs +23 -5
- package/esm2022/lib/components/tables/renderer/default-cell-renderer/default-cell-renderer.component.mjs +3 -3
- package/esm2022/lib/components/tables/renderer/select-header-cell/selection-header-cell.component.mjs +7 -4
- package/esm2022/lib/components/tables/renderer/table-action-column/menu-builder.mjs +2 -0
- package/esm2022/lib/components/tables/renderer/table-action-column/table-action-column.component.mjs +153 -0
- package/esm2022/lib/components/tables/renderer/table-body/table-body.component.mjs +150 -40
- package/esm2022/lib/components/tables/renderer/table-cell/table-cell.component.mjs +6 -6
- package/esm2022/lib/components/tables/renderer/table-custom-more-menu/table-custom-more-menu-popup.component.mjs +45 -0
- package/esm2022/lib/components/tables/renderer/table-custom-more-menu/table-custom-more-menu.component.mjs +71 -0
- package/esm2022/lib/components/tables/renderer/table-footer-row/table-footer-row.component.mjs +30 -0
- package/esm2022/lib/components/tables/table/table-model.mjs +12 -3
- package/esm2022/lib/components/tables/table/table.component.mjs +39 -61
- package/esm2022/lib/components/tables/tree-table/decorated-tree-node.mjs +5 -4
- package/esm2022/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.mjs +1 -1
- package/esm2022/lib/components/tables/tree-table/tree-label-column-model.mjs +3 -3
- package/esm2022/lib/components/tables/tree-table/tree-table-component.mjs +12 -5
- package/esm2022/lib/components/tables/tree-table/tree-table-model.mjs +4 -7
- package/esm2022/lib/components/text/markdown/markdown.component.mjs +2 -2
- package/esm2022/lib/directives/command.directive.mjs +18 -7
- package/esm2022/lib/directives/directives.module.mjs +1 -1
- package/esm2022/lib/directives/exports.mjs +2 -1
- package/esm2022/lib/directives/highlight.pipe.mjs +9 -8
- package/esm2022/lib/directives/resize-observer.directive.mjs +40 -0
- package/esm2022/lib/interaction/abstract-interaction-context.mjs +6 -7
- package/esm2022/lib/interaction/activity-context.mjs +4 -0
- package/esm2022/lib/interaction/activity.mjs +20 -21
- package/esm2022/lib/interaction/alert.mjs +2 -2
- package/esm2022/lib/interaction/components/abstract-confirm-dialog.component.mjs +11 -8
- package/esm2022/lib/interaction/components/abstract-dialog.component.mjs +1 -41
- package/esm2022/lib/interaction/components/activity-actions/activity-actions.component.mjs +28 -16
- package/esm2022/lib/interaction/components/activity-body/activity-body.component.mjs +8 -2
- package/esm2022/lib/interaction/components/activity-container/activity-container.component.mjs +46 -15
- package/esm2022/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.mjs +53 -15
- package/esm2022/lib/interaction/components/activity-title/activity-title.component.mjs +4 -4
- package/esm2022/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.mjs +1 -1
- package/esm2022/lib/interaction/components/add-card-activity/add-card-activity.component.mjs +1 -1
- package/esm2022/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.mjs +1 -1
- package/esm2022/lib/interaction/components/alert-dialog/alert-dialog.component.mjs +10 -10
- package/esm2022/lib/interaction/components/alert-renderer/alert-renderer.component.mjs +55 -0
- package/esm2022/lib/interaction/components/confirm-renderer/confirm-renderer.component.mjs +54 -0
- package/esm2022/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.mjs +4 -8
- package/esm2022/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.mjs +4 -8
- package/esm2022/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.mjs +7 -9
- package/esm2022/lib/interaction/components/editors/edit-context.mjs +1 -1
- package/esm2022/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.mjs +4 -4
- package/esm2022/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.mjs +21 -5
- package/esm2022/lib/interaction/components/input-activities/input-activity.mjs +2 -2
- package/esm2022/lib/interaction/components/input-activities/select-input-activity.mjs +4 -2
- package/esm2022/lib/interaction/components/input-activities/string-input-activity.mjs +8 -4
- package/esm2022/lib/interaction/components/slide-down-interaction-context/slide-down-interaction-context.component.mjs +134 -0
- package/esm2022/lib/interaction/confirm.mjs +26 -2
- package/esm2022/lib/interaction/directives/interaction-context-trigger-for.directive.mjs +2 -2
- package/esm2022/lib/interaction/exports.mjs +6 -1
- package/esm2022/lib/interaction/interaction-context-provider.mjs +17 -0
- package/esm2022/lib/interaction/interaction-context.mjs +3 -2
- package/esm2022/lib/interaction/interaction.module.mjs +22 -14
- package/esm2022/lib/interaction/services/interaction-service-routing-adapter.mjs +4 -4
- package/esm2022/lib/interaction/services/interaction.service.mjs +18 -6
- package/esm2022/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.mjs +2 -2
- package/esm2022/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.mjs +23 -4
- package/esm2022/lib/place/components/list-place-nav/list-place-nav.component.mjs +4 -5
- package/esm2022/lib/place/components/place-outlet/place-outlet.component.mjs +7 -9
- package/esm2022/lib/place/components/side-place-navigation/side-place-navigation.component.mjs +2 -2
- package/esm2022/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.mjs +1 -1
- package/esm2022/lib/place/guards/consolidated-param-map.mjs +4 -4
- package/esm2022/lib/place/guards/place.guard.mjs +6 -5
- package/esm2022/lib/place/navigation/place-component-deactivation-handler.mjs +2 -2
- package/esm2022/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.mjs +3 -6
- package/esm2022/lib/place/navigation/session/navigation-session.mjs +2 -2
- package/esm2022/lib/place/place-auth-service.mjs +7 -6
- package/esm2022/lib/place/place-component.mjs +29 -19
- package/esm2022/lib/place/place-definition.mjs +15 -4
- package/esm2022/lib/place/place-history.mjs +2 -2
- package/esm2022/lib/place/place-router.mjs +67 -53
- package/esm2022/lib/place/place.decorator.mjs +2 -2
- package/esm2022/lib/place/place.module.mjs +1 -5
- package/esm2022/lib/place/route/formatter.mjs +2 -2
- package/esm2022/lib/place/route/parameter-decorators.mjs +54 -50
- package/esm2022/lib/place/route/parameter-definition.mjs +2 -2
- package/esm2022/lib/place/url-snapshot.mjs +3 -3
- package/esm2022/lib/place/visit-segment.mjs +2 -2
- package/esm2022/lib/place/visit.mjs +2 -2
- package/esm2022/lib/services/exports.mjs +2 -1
- package/esm2022/lib/services/loading-monitor.mjs +83 -0
- package/fesm2022/coolon-angular-ui-powerups.mjs +2586 -1113
- package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/animations/slide-animations.d.ts +1 -0
- package/lib/components/cards/abstract-card-container.component.d.ts +6 -3
- package/lib/components/cards/card-container/card-container.component.d.ts +1 -1
- package/lib/components/commands/button-renderer/button-renderer.component.d.ts +30 -0
- package/lib/components/commands/command/command.component.d.ts +8 -8
- package/lib/components/commands/command-face/command-face.component.d.ts +2 -0
- package/lib/components/commands/command-face.d.ts +8 -9
- package/lib/components/commands/group/popup-aware.component.d.ts +9 -4
- package/lib/components/commands/group/popup-menu/abstract-popup-menu.component.d.ts +4 -4
- package/lib/components/commands/group/popup-menu/more-menu.component.d.ts +2 -4
- package/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.d.ts +2 -0
- package/lib/components/commands/group/popup-menu/popup-menu.component.d.ts +2 -4
- package/lib/components/commands/group/tool-bar/tool-bar.component.d.ts +1 -1
- package/lib/components/commands/separator.component.d.ts +2 -4
- package/lib/components/components.module.d.ts +60 -55
- package/lib/components/disposable-component.d.ts +16 -3
- package/lib/components/exports.d.ts +13 -4
- package/lib/components/file/file-download/file-download.component.d.ts +43 -0
- package/lib/components/forms/abstract-input.component.d.ts +13 -5
- package/lib/components/forms/checkbox-input/checkbox-input.component.d.ts +2 -0
- package/lib/components/forms/form-field.d.ts +5 -0
- package/lib/components/forms/number-input/number-input.component.d.ts +16 -4
- package/lib/components/forms/password-input/password-input.component.d.ts +7 -1
- package/lib/components/forms/search-input/search-input.component.d.ts +10 -0
- package/lib/components/forms/select-input/select-input.component.d.ts +4 -3
- package/lib/components/forms/string-input/string-input.component.d.ts +9 -1
- package/lib/components/forms/text-input/text-input.component.d.ts +3 -0
- package/lib/components/loadable-component.d.ts +10 -5
- package/lib/components/resize-aware.component.d.ts +24 -5
- package/lib/components/switch-case/switch-case.component.d.ts +2 -3
- package/lib/components/tables/abstract-table-model.d.ts +50 -25
- package/lib/components/tables/abstract-table.component.d.ts +4 -3
- package/lib/components/tables/column/column-manager.d.ts +19 -0
- package/lib/components/tables/column/column-model.d.ts +7 -3
- package/lib/components/tables/column/column-order-manager.d.ts +20 -0
- package/lib/components/tables/column/custom-template-column-model.d.ts +3 -2
- package/lib/components/tables/column/custom-value-column-model.d.ts +3 -2
- package/lib/components/tables/column/editor-controls-column-model.d.ts +3 -2
- package/lib/components/tables/column/list-propery-column-model.d.ts +3 -2
- package/lib/components/tables/column/property-column-model.d.ts +3 -2
- package/lib/components/tables/column/selection-column-model.d.ts +10 -4
- package/lib/components/tables/editor/edit-row-controls/edit-row-controls.component.d.ts +1 -1
- package/lib/components/tables/editor/edit-session.d.ts +1 -1
- package/lib/components/tables/filter/text-search-predicate.d.ts +9 -0
- package/lib/components/tables/footer/footer-row-model.d.ts +22 -0
- package/lib/components/tables/renderer/abstract-cell-renderer.d.ts +6 -0
- package/lib/components/tables/renderer/cell-portal-ref.d.ts +20 -12
- package/lib/components/tables/renderer/select-header-cell/selection-header-cell.component.d.ts +1 -1
- package/lib/components/tables/renderer/table-action-column/menu-builder.d.ts +7 -0
- package/lib/components/tables/renderer/table-action-column/table-action-column.component.d.ts +42 -0
- package/lib/components/tables/renderer/table-body/table-body.component.d.ts +40 -16
- package/lib/components/tables/renderer/table-cell/table-cell.component.d.ts +2 -3
- package/lib/components/tables/renderer/table-custom-more-menu/table-custom-more-menu-popup.component.d.ts +19 -0
- package/lib/components/tables/renderer/{table-more-menu/table-more-menu.component.d.ts → table-custom-more-menu/table-custom-more-menu.component.d.ts} +8 -7
- package/lib/components/tables/renderer/table-footer-row/table-footer-row.component.d.ts +11 -0
- package/lib/components/tables/table/table-model.d.ts +4 -4
- package/lib/components/tables/table/table.component.d.ts +14 -10
- package/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.d.ts +1 -1
- package/lib/components/tables/tree-table/tree-label-column-model.d.ts +3 -2
- package/lib/components/tables/tree-table/tree-table-component.d.ts +3 -0
- package/lib/components/tables/tree-table/tree-table-model.d.ts +4 -5
- package/lib/directives/command.directive.d.ts +6 -4
- package/lib/directives/exports.d.ts +1 -0
- package/lib/directives/resize-observer.directive.d.ts +16 -0
- package/lib/interaction/abstract-interaction-context.d.ts +1 -1
- package/lib/interaction/activity-context.d.ts +9 -0
- package/lib/interaction/activity.d.ts +7 -7
- package/lib/interaction/components/abstract-confirm-dialog.component.d.ts +2 -1
- package/lib/interaction/components/abstract-dialog.component.d.ts +5 -14
- package/lib/interaction/components/activity-actions/activity-actions.component.d.ts +12 -9
- package/lib/interaction/components/activity-body/activity-body.component.d.ts +2 -1
- package/lib/interaction/components/activity-container/activity-container.component.d.ts +10 -4
- package/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.d.ts +3 -3
- package/lib/interaction/components/activity-title/activity-title.component.d.ts +1 -1
- package/lib/interaction/components/alert-dialog/alert-dialog.component.d.ts +6 -1
- package/lib/interaction/components/alert-renderer/alert-renderer.component.d.ts +17 -0
- package/lib/interaction/components/confirm-renderer/confirm-renderer.component.d.ts +15 -0
- package/lib/interaction/components/editors/edit-context.d.ts +1 -1
- package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +5 -3
- package/lib/interaction/components/slide-down-interaction-context/slide-down-interaction-context.component.d.ts +53 -0
- package/lib/interaction/confirm.d.ts +4 -0
- package/lib/interaction/exports.d.ts +5 -0
- package/lib/interaction/interaction-context-provider.d.ts +11 -0
- package/lib/interaction/interaction-context.d.ts +7 -1
- package/lib/interaction/interaction.module.d.ts +35 -33
- package/lib/interaction/services/interaction-service-routing-adapter.d.ts +2 -2
- package/lib/interaction/services/interaction.service.d.ts +2 -1
- package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.d.ts +1 -1
- package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.d.ts +3 -1
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +3 -4
- package/lib/place/place-auth-service.d.ts +4 -4
- package/lib/place/place-component.d.ts +7 -5
- package/lib/place/place-definition.d.ts +2 -0
- package/lib/place/place-router.d.ts +8 -3
- package/lib/place/place.module.d.ts +4 -5
- package/lib/services/exports.d.ts +1 -0
- package/lib/services/loading-monitor.d.ts +29 -0
- package/package.json +6 -4
- package/esm2022/lib/components/tables/column/column-list-model.mjs +0 -44
- package/esm2022/lib/components/tables/renderer/table-more-menu/table-more-menu-popup/table-more-menu-popup.component.mjs +0 -33
- package/esm2022/lib/components/tables/renderer/table-more-menu/table-more-menu.component.mjs +0 -60
- package/esm2022/lib/components/tables/table-row-menu/table-row-menu.component.mjs +0 -84
- package/lib/components/tables/column/column-list-model.d.ts +0 -13
- package/lib/components/tables/renderer/table-more-menu/table-more-menu-popup/table-more-menu-popup.component.d.ts +0 -15
- package/lib/components/tables/table-row-menu/table-row-menu.component.d.ts +0 -28
package/esm2022/lib/components/forms/multiple-select-input/multiple-select-input.component.mjs
CHANGED
|
@@ -41,7 +41,7 @@ export class MultipleSelectInputComponent extends AbstractListInputComponent {
|
|
|
41
41
|
const self = this;
|
|
42
42
|
this.registerDisposable(new Binding(this.componentList$, this.ids$, {
|
|
43
43
|
toLeft(selectedItems, currentLeftValue) {
|
|
44
|
-
const newValues = selectedItems.map(it => lookup.get(it)).filter(it =>
|
|
44
|
+
const newValues = selectedItems.map(it => lookup.get(it)).filter(it => !!it);
|
|
45
45
|
// if our lookup didn't find anything then we return the previous values so we don't clobber selections when the options go empty
|
|
46
46
|
return newValues.length < 1 && selectedItems.length > 0 ? currentLeftValue : newValues;
|
|
47
47
|
},
|
|
@@ -52,7 +52,7 @@ export class MultipleSelectInputComponent extends AbstractListInputComponent {
|
|
|
52
52
|
})).writeRight();
|
|
53
53
|
}
|
|
54
54
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: MultipleSelectInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
55
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: MultipleSelectInputComponent, selector: "aup-multiple-select-input", inputs: { options$: "options$", options: "options", optionLabel: "optionLabel", optionLabelFormat: "optionLabelFormat" }, queries: [{ propertyName: "optionTemplateRef", first: true, predicate: ["optionTemplate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-form-field [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [ngModel]=\"componentList$.value\"\n (ngModelChange)=\"selectAll($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngFor=\"let option of options$.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div>{{placeholder}}</div>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n", styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:30px}\n"], dependencies: [{ 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.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i6.FocusBindingDirective, selector: "[pectinFocusBinding]", inputs: ["pectinFocusBinding", "focusBindingTarget"] }] });
|
|
55
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: MultipleSelectInputComponent, selector: "aup-multiple-select-input", inputs: { options$: "options$", options: "options", optionLabel: "optionLabel", optionLabelFormat: "optionLabelFormat" }, queries: [{ propertyName: "optionTemplateRef", first: true, predicate: ["optionTemplate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-form-field [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [ngModel]=\"componentList$.value\"\n (ngModelChange)=\"selectAll($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngFor=\"let option of options$.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors()\">{{firstError}}</mat-error>\n</mat-form-field>\n<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div>{{placeholder}}</div>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n", styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:30px}\n"], dependencies: [{ 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.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i6.FocusBindingDirective, selector: "[pectinFocusBinding]", inputs: ["pectinFocusBinding", "focusBindingTarget"] }] });
|
|
56
56
|
}
|
|
57
57
|
__decorate([
|
|
58
58
|
Proxify(),
|
|
@@ -64,7 +64,7 @@ __decorate([
|
|
|
64
64
|
], MultipleSelectInputComponent.prototype, "options", null);
|
|
65
65
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: MultipleSelectInputComponent, decorators: [{
|
|
66
66
|
type: Component,
|
|
67
|
-
args: [{ selector: 'aup-multiple-select-input', template: "<mat-form-field [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [ngModel]=\"componentList$.value\"\n (ngModelChange)=\"selectAll($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngFor=\"let option of options$.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div>{{placeholder}}</div>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n", styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:30px}\n"] }]
|
|
67
|
+
args: [{ selector: 'aup-multiple-select-input', template: "<mat-form-field [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [ngModel]=\"componentList$.value\"\n (ngModelChange)=\"selectAll($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngFor=\"let option of options$.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors()\">{{firstError}}</mat-error>\n</mat-form-field>\n<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div>{{placeholder}}</div>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n", styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:30px}\n"] }]
|
|
68
68
|
}], ctorParameters: function () { return []; }, propDecorators: { options$: [{
|
|
69
69
|
type: Input
|
|
70
70
|
}], options: [{
|
|
@@ -77,4 +77,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
77
77
|
}], optionLabelFormat: [{
|
|
78
78
|
type: Input
|
|
79
79
|
}] } });
|
|
80
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
80
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXVsdGlwbGUtc2VsZWN0LWlucHV0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvYW5ndWxhci11aS1wb3dlcnVwcy9zcmMvbGliL2NvbXBvbmVudHMvZm9ybXMvbXVsdGlwbGUtc2VsZWN0LWlucHV0L211bHRpcGxlLXNlbGVjdC1pbnB1dC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2FuZ3VsYXItdWktcG93ZXJ1cHMvc3JjL2xpYi9jb21wb25lbnRzL2Zvcm1zL211bHRpcGxlLXNlbGVjdC1pbnB1dC9tdWx0aXBsZS1zZWxlY3QtaW5wdXQuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBQyxTQUFTLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBVSxXQUFXLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDbEYsT0FBTyxFQUFDLE9BQU8sRUFBRSxHQUFHLEVBQUUsU0FBUyxFQUF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bH19PC9tYXQtbGFiZWw+XG4gIDxkaXY+e3twbGFjZWhvbGRlcn19PC9kaXY+XG4gIDxkaXYgY2xhc3M9XCJpdGVtXCIgKm5nRm9yPVwibGV0IGl0ZW0gb2Ygb3B0aW9uc1wiPnt7b3B0aW9uTGFiZWxGb3JtYXQoaXRlbSl9fTwvZGl2PlxuPC9kaXY+XG4iXX0=
|
|
@@ -1,33 +1,110 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
1
2
|
import { Component, Input } from '@angular/core';
|
|
3
|
+
import { Command, Dsl, Proxify, proxify, StoreInValueModel, ValueModel } from "@coolon/pectin";
|
|
4
|
+
import { isNil } from 'lodash-es';
|
|
2
5
|
import { AbstractValueInputComponent } from '../abstract-value-input.component';
|
|
3
6
|
import * as i0 from "@angular/core";
|
|
4
7
|
import * as i1 from "@angular/common";
|
|
5
8
|
import * as i2 from "@angular/forms";
|
|
6
9
|
import * as i3 from "@angular/material/input";
|
|
7
10
|
import * as i4 from "@angular/material/form-field";
|
|
8
|
-
import * as i5 from "../../../directives/
|
|
9
|
-
import * as i6 from "
|
|
11
|
+
import * as i5 from "../../../directives/command.directive";
|
|
12
|
+
import * as i6 from "../../../directives/focus-binding.directive";
|
|
10
13
|
export class NumberInputComponent extends AbstractValueInputComponent {
|
|
11
14
|
autocomplete;
|
|
12
|
-
min =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
#min$_accessor_storage = proxify((ValueModel));
|
|
16
|
+
get min$() { return this.#min$_accessor_storage; }
|
|
17
|
+
set min$(value) { this.#min$_accessor_storage = value; }
|
|
18
|
+
#min_accessor_storage = Number.MIN_SAFE_INTEGER;
|
|
19
|
+
get min() { return this.#min_accessor_storage; }
|
|
20
|
+
set min(value) { this.#min_accessor_storage = value; }
|
|
21
|
+
#max$_accessor_storage = proxify((ValueModel));
|
|
22
|
+
get max$() { return this.#max$_accessor_storage; }
|
|
23
|
+
set max$(value) { this.#max$_accessor_storage = value; }
|
|
24
|
+
#max_accessor_storage = Number.MAX_SAFE_INTEGER;
|
|
25
|
+
get max() { return this.#max_accessor_storage; }
|
|
26
|
+
set max(value) { this.#max_accessor_storage = value; }
|
|
27
|
+
#significantDigits$_accessor_storage = proxify((ValueModel));
|
|
28
|
+
// TODO: rename to decimal places. Also need to reject key presses for characters > last decimal place as the clamping rounds things up if you type a digit >= 5
|
|
29
|
+
get significantDigits$() { return this.#significantDigits$_accessor_storage; }
|
|
30
|
+
set significantDigits$(value) { this.#significantDigits$_accessor_storage = value; }
|
|
31
|
+
#significantDigits_accessor_storage;
|
|
32
|
+
get significantDigits() { return this.#significantDigits_accessor_storage; }
|
|
33
|
+
set significantDigits(value) { this.#significantDigits_accessor_storage = value; }
|
|
34
|
+
incrementCommand;
|
|
35
|
+
decrementCommand;
|
|
36
|
+
displayValue$;
|
|
37
|
+
step$;
|
|
15
38
|
constructor() {
|
|
16
39
|
super();
|
|
40
|
+
const { chain } = Dsl.disposeWith(this);
|
|
41
|
+
this.step$ = chain(this.significantDigits$).map(v => 10 ** (-v)).otherwise(1);
|
|
42
|
+
this.displayValue$ = chain(this.value$).map(v => this.clampSignificantDigits(v), {
|
|
43
|
+
dependsOn: this.significantDigits$
|
|
44
|
+
});
|
|
45
|
+
const normalisedValue$ = chain(this.value$).otherwise(0);
|
|
46
|
+
this.incrementCommand = Command.create(() => {
|
|
47
|
+
this.value$.value = this.increment(this.value$.value);
|
|
48
|
+
}).enableWhile(chain.numericValue(normalisedValue$).isLessThan(this.max$).and(this.enabled$));
|
|
49
|
+
this.decrementCommand = Command.create(() => {
|
|
50
|
+
this.value$.value = this.decrement(this.value$.value);
|
|
51
|
+
}).enableWhile(chain.numericValue(normalisedValue$).isGreaterThan(this.min$).and(this.enabled$));
|
|
52
|
+
}
|
|
53
|
+
increment(value) {
|
|
54
|
+
return this.clampSignificantDigits((value ?? 0) + this.step$.value);
|
|
55
|
+
}
|
|
56
|
+
decrement(value) {
|
|
57
|
+
return this.clampSignificantDigits((value ?? 0) - this.step$.value);
|
|
58
|
+
}
|
|
59
|
+
clampSignificantDigits(value) {
|
|
60
|
+
return isNil(this.significantDigits) ? value : Number(value.toFixed(this.significantDigits));
|
|
61
|
+
}
|
|
62
|
+
onValueChange(value) {
|
|
63
|
+
this.value$.value = value;
|
|
17
64
|
}
|
|
18
65
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: NumberInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
19
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: NumberInputComponent, selector: "aup-number-input", inputs: { autocomplete: "autocomplete", min: "min", max: "max",
|
|
66
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: NumberInputComponent, selector: "aup-number-input", inputs: { autocomplete: "autocomplete", min$: "min$", min: "min", max$: "max$", max: "max", significantDigits$: "significantDigits$", significantDigits: "significantDigits" }, usesInheritance: true, ngImport: i0, template: "<mat-form-field floatLabel=\"always\">\n <mat-label *ngIf=\"label\">{{ label }}</mat-label>\n <input type=\"number\"\n matInput\n placeholder=\"{{placeholder}}\"\n [attr.autocomplete]=\"autocomplete\"\n [ngModel]=\"displayValue$.value\"\n (ngModelChange)=\"onValueChange($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [min]=\"min\"\n [max]=\"max\"\n [size]=\"4\"\n [step]=\"step$.value\"\n >\n <section matIconSuffix>\n <button [pectinCommand]=\"decrementCommand\">-</button>\n <button [pectinCommand]=\"incrementCommand\">+</button>\n </section>\n <mat-hint *ngIf=\"hint && !dense\">{{ hint }}</mat-hint>\n <mat-error *ngIf=\"hasErrors()\">{{ firstError }}</mat-error>\n</mat-form-field>\n", styles: [":host{--width: 56px;--height: 42px;--margin-right: 1px;--border-radius: 3px;--border-color:#d5d5d5;--button-background: #fafafa;--button-background-hover: #efefef}:host input[type=number]{appearance:textfield}:host input[type=number]::-webkit-inner-spin-button,:host input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}:host:focus-within:has(section:not(:focus-within)){--height: 40px;--margin-right: 2px;--border-radius: 2px}:host section[maticonsuffix]{display:flex;flex-direction:row;align-items:stretch;gap:1px;background-color:var(--border-color);border-left:1px solid var(--border-color);width:var(--width);min-width:var(--width);height:var(--height);min-height:var(--height);margin-right:var(--margin-right);border-top-right-radius:var(--border-radius);border-bottom-right-radius:var(--border-radius);overflow:hidden}:host button{flex:1;display:flex;flex-direction:row;align-items:center;justify-content:center;font-weight:600;border-style:none;background-color:var(--button-background)}:host button:hover{background-color:var(--button-background-hover)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i5.CommandDirective, selector: "[pectinCommand]", inputs: ["pectinCommand", "commandParameter", "preventDefault"] }, { kind: "directive", type: i6.FocusBindingDirective, selector: "[pectinFocusBinding]", inputs: ["pectinFocusBinding", "focusBindingTarget"] }] });
|
|
20
67
|
}
|
|
68
|
+
__decorate([
|
|
69
|
+
Proxify(),
|
|
70
|
+
__metadata("design:type", ValueModel)
|
|
71
|
+
], NumberInputComponent.prototype, "min$", null);
|
|
72
|
+
__decorate([
|
|
73
|
+
StoreInValueModel(),
|
|
74
|
+
__metadata("design:type", Object)
|
|
75
|
+
], NumberInputComponent.prototype, "min", null);
|
|
76
|
+
__decorate([
|
|
77
|
+
Proxify(),
|
|
78
|
+
__metadata("design:type", ValueModel)
|
|
79
|
+
], NumberInputComponent.prototype, "max$", null);
|
|
80
|
+
__decorate([
|
|
81
|
+
StoreInValueModel(),
|
|
82
|
+
__metadata("design:type", Object)
|
|
83
|
+
], NumberInputComponent.prototype, "max", null);
|
|
84
|
+
__decorate([
|
|
85
|
+
Proxify(),
|
|
86
|
+
__metadata("design:type", ValueModel)
|
|
87
|
+
], NumberInputComponent.prototype, "significantDigits$", null);
|
|
88
|
+
__decorate([
|
|
89
|
+
StoreInValueModel(),
|
|
90
|
+
__metadata("design:type", Number)
|
|
91
|
+
], NumberInputComponent.prototype, "significantDigits", null);
|
|
21
92
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: NumberInputComponent, decorators: [{
|
|
22
93
|
type: Component,
|
|
23
|
-
args: [{ selector: 'aup-number-input', template: "<mat-form-field
|
|
94
|
+
args: [{ selector: 'aup-number-input', template: "<mat-form-field floatLabel=\"always\">\n <mat-label *ngIf=\"label\">{{ label }}</mat-label>\n <input type=\"number\"\n matInput\n placeholder=\"{{placeholder}}\"\n [attr.autocomplete]=\"autocomplete\"\n [ngModel]=\"displayValue$.value\"\n (ngModelChange)=\"onValueChange($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [min]=\"min\"\n [max]=\"max\"\n [size]=\"4\"\n [step]=\"step$.value\"\n >\n <section matIconSuffix>\n <button [pectinCommand]=\"decrementCommand\">-</button>\n <button [pectinCommand]=\"incrementCommand\">+</button>\n </section>\n <mat-hint *ngIf=\"hint && !dense\">{{ hint }}</mat-hint>\n <mat-error *ngIf=\"hasErrors()\">{{ firstError }}</mat-error>\n</mat-form-field>\n", styles: [":host{--width: 56px;--height: 42px;--margin-right: 1px;--border-radius: 3px;--border-color:#d5d5d5;--button-background: #fafafa;--button-background-hover: #efefef}:host input[type=number]{appearance:textfield}:host input[type=number]::-webkit-inner-spin-button,:host input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}:host:focus-within:has(section:not(:focus-within)){--height: 40px;--margin-right: 2px;--border-radius: 2px}:host section[maticonsuffix]{display:flex;flex-direction:row;align-items:stretch;gap:1px;background-color:var(--border-color);border-left:1px solid var(--border-color);width:var(--width);min-width:var(--width);height:var(--height);min-height:var(--height);margin-right:var(--margin-right);border-top-right-radius:var(--border-radius);border-bottom-right-radius:var(--border-radius);overflow:hidden}:host button{flex:1;display:flex;flex-direction:row;align-items:center;justify-content:center;font-weight:600;border-style:none;background-color:var(--button-background)}:host button:hover{background-color:var(--button-background-hover)}\n"] }]
|
|
24
95
|
}], ctorParameters: function () { return []; }, propDecorators: { autocomplete: [{
|
|
25
96
|
type: Input
|
|
97
|
+
}], min$: [{
|
|
98
|
+
type: Input
|
|
26
99
|
}], min: [{
|
|
27
100
|
type: Input
|
|
101
|
+
}], max$: [{
|
|
102
|
+
type: Input
|
|
28
103
|
}], max: [{
|
|
29
104
|
type: Input
|
|
30
|
-
}],
|
|
105
|
+
}], significantDigits$: [{
|
|
106
|
+
type: Input
|
|
107
|
+
}], significantDigits: [{
|
|
31
108
|
type: Input
|
|
32
109
|
}] } });
|
|
33
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
110
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnVtYmVyLWlucHV0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvYW5ndWxhci11aS1wb3dlcnVwcy9zcmMvbGliL2NvbXBvbmVudHMvZm9ybXMvbnVtYmVyLWlucHV0L251bWJlci1pbnB1dC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2FuZ3VsYXItdWktcG93ZXJ1cHMvc3JjL2xpYi9jb21wb25lbnRzL2Zvcm1zL251bWJlci1pbnB1dC9udW1iZXItaW5wdXQuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBQyxTQUFTLEVBQUUsS0FBSyxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQy9DLE9BQU8sRUFBQyxPQUFPLEVBQUUsR0FBRyxFQUFFLE9BQU8sRUFBRSxPQUFPLEVBQUUsaUJBQWlCLEVBQVMsVUFBVSxFQUFrQixNQUFNLGdCQUFnQixDQUF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gIDwvc2VjdGlvbj5cbiAgPG1hdC1oaW50ICpuZ0lmPVwiaGludCAmJiAhZGVuc2VcIj57eyBoaW50IH19PC9tYXQtaGludD5cbiAgPG1hdC1lcnJvciAqbmdJZj1cImhhc0Vycm9ycygpXCI+e3sgZmlyc3RFcnJvciB9fTwvbWF0LWVycm9yPlxuPC9tYXQtZm9ybS1maWVsZD5cbiJdfQ==
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
1
2
|
import { Component, Input } from '@angular/core';
|
|
3
|
+
import { Command, Dsl, MutableValueModel, proxify, Proxify, StoreInValueModel, ValueModel } from "@coolon/pectin";
|
|
2
4
|
import { AbstractValueInputComponent } from '../abstract-value-input.component';
|
|
3
5
|
import * as i0 from "@angular/core";
|
|
4
6
|
import * as i1 from "@angular/common";
|
|
@@ -6,18 +8,53 @@ import * as i2 from "@angular/forms";
|
|
|
6
8
|
import * as i3 from "@angular/material/input";
|
|
7
9
|
import * as i4 from "@angular/material/form-field";
|
|
8
10
|
import * as i5 from "../../../directives/focus-binding.directive";
|
|
11
|
+
import * as i6 from "../../commands/command/command.component";
|
|
9
12
|
export class PasswordInputComponent extends AbstractValueInputComponent {
|
|
10
13
|
autocomplete;
|
|
14
|
+
#enableShowPassword$_accessor_storage = proxify((ValueModel));
|
|
15
|
+
get enableShowPassword$() { return this.#enableShowPassword$_accessor_storage; }
|
|
16
|
+
set enableShowPassword$(value) { this.#enableShowPassword$_accessor_storage = value; }
|
|
17
|
+
#enableShowPassword_accessor_storage = false;
|
|
18
|
+
get enableShowPassword() { return this.#enableShowPassword_accessor_storage; }
|
|
19
|
+
set enableShowPassword(value) { this.#enableShowPassword_accessor_storage = value; }
|
|
20
|
+
showPassword$ = new MutableValueModel(false);
|
|
21
|
+
toggleShowPasswordCommand;
|
|
11
22
|
constructor() {
|
|
12
23
|
super();
|
|
24
|
+
const { chain, valueOf } = Dsl.disposeWith(this);
|
|
25
|
+
const face$ = chain(this.showPassword$).map(show => {
|
|
26
|
+
return {
|
|
27
|
+
icon: () => show ? "mat:visibility_off" : "mat:visibility"
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
this.toggleShowPasswordCommand = Command.create(() => {
|
|
31
|
+
this.showPassword$.value = !this.showPassword$.value;
|
|
32
|
+
})
|
|
33
|
+
.withFace(face$)
|
|
34
|
+
.enableWhile(chain.stringValue(this.componentValue$).isNotBlank());
|
|
35
|
+
}
|
|
36
|
+
get fieldType() {
|
|
37
|
+
return this.showPassword$.value ? "text" : "password";
|
|
13
38
|
}
|
|
14
39
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: PasswordInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: PasswordInputComponent, selector: "aup-password-input", inputs: { autocomplete: "autocomplete" }, usesInheritance: true, ngImport: i0, template: "<mat-form-field [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"
|
|
40
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: PasswordInputComponent, selector: "aup-password-input", inputs: { autocomplete: "autocomplete", enableShowPassword$: "enableShowPassword$", enableShowPassword: "enableShowPassword" }, usesInheritance: true, ngImport: i0, template: "<mat-form-field [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input [type]=\"fieldType\"\n matInput\n placeholder=\"{{placeholder}}\"\n [attr.autocomplete]=\"autocomplete\"\n [(ngModel)]=\"componentValue$.value\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors()\">{{firstError}}</mat-error>\n <span matSuffix *ngIf=\"enableShowPassword$.value\">\n <aup-command [command]=\"toggleShowPasswordCommand\" data-cy=\"showPassword\"></aup-command>\n </span>\n</mat-form-field>\n\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i5.FocusBindingDirective, selector: "[pectinFocusBinding]", inputs: ["pectinFocusBinding", "focusBindingTarget"] }, { kind: "component", type: i6.CommandComponent, selector: "aup-command", inputs: ["command", "face$", "face", "busyFace$", "busyFace", "alignFace"] }] });
|
|
16
41
|
}
|
|
42
|
+
__decorate([
|
|
43
|
+
Proxify(),
|
|
44
|
+
__metadata("design:type", Object)
|
|
45
|
+
], PasswordInputComponent.prototype, "enableShowPassword$", null);
|
|
46
|
+
__decorate([
|
|
47
|
+
StoreInValueModel(),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], PasswordInputComponent.prototype, "enableShowPassword", null);
|
|
17
50
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: PasswordInputComponent, decorators: [{
|
|
18
51
|
type: Component,
|
|
19
|
-
args: [{ selector: 'aup-password-input', template: "<mat-form-field [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"
|
|
52
|
+
args: [{ selector: 'aup-password-input', template: "<mat-form-field [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input [type]=\"fieldType\"\n matInput\n placeholder=\"{{placeholder}}\"\n [attr.autocomplete]=\"autocomplete\"\n [(ngModel)]=\"componentValue$.value\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors()\">{{firstError}}</mat-error>\n <span matSuffix *ngIf=\"enableShowPassword$.value\">\n <aup-command [command]=\"toggleShowPasswordCommand\" data-cy=\"showPassword\"></aup-command>\n </span>\n</mat-form-field>\n\n" }]
|
|
20
53
|
}], ctorParameters: function () { return []; }, propDecorators: { autocomplete: [{
|
|
21
54
|
type: Input
|
|
55
|
+
}], enableShowPassword$: [{
|
|
56
|
+
type: Input
|
|
57
|
+
}], enableShowPassword: [{
|
|
58
|
+
type: Input
|
|
22
59
|
}] } });
|
|
23
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
60
|
+
//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LWZpZWxkPlxuXG4iXX0=
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { Command, Dsl } from '@coolon/pectin';
|
|
3
|
+
import { AbstractValueInputComponent } from '../abstract-value-input.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/forms";
|
|
6
|
+
import * as i2 from "@angular/material/input";
|
|
7
|
+
import * as i3 from "@angular/material/form-field";
|
|
8
|
+
import * as i4 from "../../../directives/command.directive";
|
|
9
|
+
import * as i5 from "../../../directives/focus-binding.directive";
|
|
10
|
+
import * as i6 from "@angular/material/button";
|
|
11
|
+
import * as i7 from "../../icon/icon.component";
|
|
12
|
+
export class SearchInputComponent extends AbstractValueInputComponent {
|
|
13
|
+
autocomplete;
|
|
14
|
+
clearCommand;
|
|
15
|
+
constructor() {
|
|
16
|
+
super();
|
|
17
|
+
this.dense = true;
|
|
18
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
19
|
+
this.clearCommand = Command.create(() => {
|
|
20
|
+
this.componentValue$.value = "";
|
|
21
|
+
});
|
|
22
|
+
this.clearCommand.disableWhile(chain.stringValue(this.componentValue$).isBlank());
|
|
23
|
+
}
|
|
24
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: SearchInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
25
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: SearchInputComponent, selector: "aup-search-input", inputs: { autocomplete: "autocomplete" }, usesInheritance: true, ngImport: i0, template: "<mat-form-field [floatLabel]=\"floatLabel\">\n\n <input matInput\n placeholder=\"{{placeholder}}\"\n [attr.autocomplete]=\"autocomplete\"\n [(ngModel)]=\"componentValue$.value\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <aup-icon matPrefix icon=\"mat:search\"></aup-icon>\n <button mat-icon-button matSuffix [pectinCommand]=\"clearCommand\">\n <aup-icon icon=\"mat:close\"></aup-icon>\n </button>\n</mat-form-field>\n\n", styles: ["button[disabled]{visibility:hidden}\n"], dependencies: [{ kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i4.CommandDirective, selector: "[pectinCommand]", inputs: ["pectinCommand", "commandParameter", "preventDefault"] }, { kind: "directive", type: i5.FocusBindingDirective, selector: "[pectinFocusBinding]", inputs: ["pectinFocusBinding", "focusBindingTarget"] }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.IconComponent, selector: "aup-icon", inputs: ["icon"] }] });
|
|
26
|
+
}
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: SearchInputComponent, decorators: [{
|
|
28
|
+
type: Component,
|
|
29
|
+
args: [{ selector: 'aup-search-input', template: "<mat-form-field [floatLabel]=\"floatLabel\">\n\n <input matInput\n placeholder=\"{{placeholder}}\"\n [attr.autocomplete]=\"autocomplete\"\n [(ngModel)]=\"componentValue$.value\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <aup-icon matPrefix icon=\"mat:search\"></aup-icon>\n <button mat-icon-button matSuffix [pectinCommand]=\"clearCommand\">\n <aup-icon icon=\"mat:close\"></aup-icon>\n </button>\n</mat-form-field>\n\n", styles: ["button[disabled]{visibility:hidden}\n"] }]
|
|
30
|
+
}], ctorParameters: function () { return []; }, propDecorators: { autocomplete: [{
|
|
31
|
+
type: Input
|
|
32
|
+
}] } });
|
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VhcmNoLWlucHV0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvYW5ndWxhci11aS1wb3dlcnVwcy9zcmMvbGliL2NvbXBvbmVudHMvZm9ybXMvc2VhcmNoLWlucHV0L3NlYXJjaC1pbnB1dC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2FuZ3VsYXItdWktcG93ZXJ1cHMvc3JjL2xpYi9jb21wb25lbnRzL2Zvcm1zL3NlYXJjaC1pbnB1dC9zZWFyY2gtaW5wdXQuY29tcG9uZW50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