@coolon/angular-ui-powerups 2.0.0-alpha.3 → 2.0.0-alpha.30
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/CHANGELOG.md +184 -0
- package/assets/commands.scss +3 -0
- package/assets/form.scss +5 -4
- package/assets/icons.scss +30 -0
- package/assets/styles.scss +2 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +1168 -322
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -2
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.d.ts +64 -54
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +62 -52
- package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/card-container/card-container.component.js +1 -1
- package/esm2015/lib/components/card-container/card-container.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/command-bar.component.js +51 -0
- package/esm2015/lib/components/commands/command-bar.component.js.map +1 -0
- package/esm2015/lib/components/commands/command-bar.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/command-bar.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/command-container.js +20 -0
- package/esm2015/lib/components/commands/command-container.js.map +1 -0
- package/esm2015/lib/components/commands/command-container.metadata.json +1 -0
- package/esm2015/lib/components/commands/command-face/command-face.component.js +91 -0
- package/esm2015/lib/components/commands/command-face/command-face.component.js.map +1 -0
- package/esm2015/lib/components/commands/command-face/command-face.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/command-face/command-face.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/command-face/command-face.component.scss.ngstyle.js.map +1 -0
- package/esm2015/lib/components/commands/command-face.js +74 -0
- package/esm2015/lib/components/commands/command-face.js.map +1 -0
- package/esm2015/lib/components/commands/command-face.metadata.json +1 -0
- package/esm2015/lib/components/commands/command.component.js +38 -0
- package/esm2015/lib/components/commands/command.component.js.map +1 -0
- package/esm2015/lib/components/commands/command.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/command.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.js +57 -0
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.js +40 -0
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.js +49 -0
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js +62 -0
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/components.module.js +58 -14
- package/esm2015/lib/components/components.module.js.map +1 -1
- package/esm2015/lib/components/components.module.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-input.component.js +12 -4
- package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/abstract-list-input.component.js +51 -6
- package/esm2015/lib/components/forms/abstract-list-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-list-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/abstract-value-input.component.js +47 -3
- package/esm2015/lib/components/forms/abstract-value-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-value-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.js +70 -0
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.js.map +1 -0
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.metadata.json +1 -0
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js +3 -6
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js +8 -13
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/number-input/number-input.component.js +3 -6
- package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/number-input/number-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.js +4 -7
- package/esm2015/lib/components/forms/password-input/password-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.js +2 -5
- package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/string-input/string-input.component.js +3 -7
- package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/string-input/string-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/text-input/text-input.component.js +3 -6
- package/esm2015/lib/components/forms/text-input/text-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/text-input/text-input.component.metadata.json +1 -1
- package/esm2015/lib/components/icon/icon.component.js +17 -4
- package/esm2015/lib/components/icon/icon.component.js.map +1 -1
- package/esm2015/lib/components/icon/icon.component.metadata.json +1 -1
- package/esm2015/lib/components/index.js +12 -1
- package/esm2015/lib/components/index.js.map +1 -1
- package/esm2015/lib/components/index.metadata.json +1 -1
- package/esm2015/lib/components/table/cell-editors.js.map +1 -1
- package/esm2015/lib/components/table/{cell-protal-ref.js → cell-portal-ref.js} +7 -3
- package/esm2015/lib/components/table/cell-portal-ref.js.map +1 -0
- package/esm2015/lib/components/table/{cell-protal-ref.metadata.json → cell-portal-ref.metadata.json} +1 -1
- package/esm2015/lib/components/table/column-model.js +66 -11
- package/esm2015/lib/components/table/column-model.js.map +1 -1
- package/esm2015/lib/components/table/column-model.metadata.json +1 -1
- package/esm2015/lib/components/table/mutable-cell-renderer.js +1 -0
- package/esm2015/lib/components/table/mutable-cell-renderer.js.map +1 -0
- package/esm2015/lib/components/table/mutable-cell-renderer.metadata.json +1 -0
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +1 -1
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +1 -1
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/table-model.js +11 -10
- package/esm2015/lib/components/table/table-model.js.map +1 -1
- package/esm2015/lib/components/table/table-model.metadata.json +1 -1
- package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.js +82 -0
- package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.js.map +1 -0
- package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.metadata.json +1 -0
- package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/table/table.component.js +1 -1
- package/esm2015/lib/components/table/table.component.js.map +1 -1
- package/esm2015/lib/components/table/table.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +32 -4
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm2015/lib/place/place-component.js +1 -1
- package/esm2015/lib/place/place-component.js.map +1 -1
- package/esm2015/lib/place/place-router.js +2 -8
- package/esm2015/lib/place/place-router.js.map +1 -1
- package/esm2015/lib/place/place-router.metadata.json +1 -1
- package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
- package/esm2015/lib/place/route/parameter-decorators.js +2 -3
- package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
- package/esm2015/lib/place/route/parameter-decorators.metadata.json +1 -1
- package/esm5/coolon-angular-ui-powerups.js +62 -52
- package/esm5/coolon-angular-ui-powerups.js.map +1 -1
- package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/card-container/card-container.component.js +1 -1
- package/esm5/lib/components/commands/command-bar.component.js +31 -0
- package/esm5/lib/components/commands/command-bar.component.js.map +1 -0
- package/esm5/lib/components/commands/command-bar.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/command-container.js +30 -0
- package/esm5/lib/components/commands/command-container.js.map +1 -0
- package/esm5/lib/components/commands/command-face/command-face.component.js +122 -0
- package/esm5/lib/components/commands/command-face/command-face.component.js.map +1 -0
- package/esm5/lib/components/commands/command-face/command-face.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/command-face/command-face.component.scss.ngstyle.js.map +1 -0
- package/esm5/lib/components/commands/command-face.js +103 -0
- package/esm5/lib/components/commands/command-face.js.map +1 -0
- package/esm5/lib/components/commands/command.component.js +41 -0
- package/esm5/lib/components/commands/command.component.js.map +1 -0
- package/esm5/lib/components/commands/command.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.js +64 -0
- package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu/more-menu.component.js +35 -0
- package/esm5/lib/components/commands/popup-menu/more-menu.component.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu/more-menu.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu/popup-menu.component.js +45 -0
- package/esm5/lib/components/commands/popup-menu/popup-menu.component.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu/popup-menu.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js +66 -0
- package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/components.module.js +58 -14
- package/esm5/lib/components/components.module.js.map +1 -1
- package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/forms/abstract-input.component.js +12 -4
- package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm5/lib/components/forms/abstract-list-input.component.js +56 -6
- package/esm5/lib/components/forms/abstract-list-input.component.js.map +1 -1
- package/esm5/lib/components/forms/abstract-value-input.component.js +52 -3
- package/esm5/lib/components/forms/abstract-value-input.component.js.map +1 -1
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.js +73 -0
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.js.map +1 -0
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js +3 -6
- package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
- package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js +8 -13
- package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
- package/esm5/lib/components/forms/number-input/number-input.component.js +3 -6
- package/esm5/lib/components/forms/number-input/number-input.component.js.map +1 -1
- package/esm5/lib/components/forms/password-input/password-input.component.js +4 -7
- package/esm5/lib/components/forms/password-input/password-input.component.js.map +1 -1
- package/esm5/lib/components/forms/select-input/select-input.component.js +2 -5
- package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
- package/esm5/lib/components/forms/string-input/string-input.component.js +3 -7
- package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/esm5/lib/components/forms/text-input/text-input.component.js +3 -6
- package/esm5/lib/components/forms/text-input/text-input.component.js.map +1 -1
- package/esm5/lib/components/icon/icon.component.js +15 -3
- package/esm5/lib/components/icon/icon.component.js.map +1 -1
- package/esm5/lib/components/index.js +12 -1
- package/esm5/lib/components/index.js.map +1 -1
- package/esm5/lib/components/table/cell-editors.js.map +1 -1
- package/esm5/lib/components/table/{cell-protal-ref.js → cell-portal-ref.js} +7 -3
- package/esm5/lib/components/table/cell-portal-ref.js.map +1 -0
- package/esm5/lib/components/table/column-model.js +67 -11
- package/esm5/lib/components/table/column-model.js.map +1 -1
- package/esm5/lib/components/table/mutable-cell-renderer.js +1 -0
- package/esm5/lib/components/table/mutable-cell-renderer.js.map +1 -0
- package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +1 -1
- package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
- package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +1 -1
- package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js.map +1 -1
- package/esm5/lib/components/table/table-model.js +11 -11
- package/esm5/lib/components/table/table-model.js.map +1 -1
- package/esm5/lib/components/table/table-row-menu/table-row-menu.component.js +66 -0
- package/esm5/lib/components/table/table-row-menu/table-row-menu.component.js.map +1 -0
- package/esm5/lib/components/table/table-row-menu/table-row-menu.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/table/table.component.js +1 -1
- package/esm5/lib/components/table/table.component.js.map +1 -1
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js +32 -4
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
- package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +1 -1
- package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
- package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm5/lib/place/place-component.js +1 -1
- package/esm5/lib/place/place-component.js.map +1 -1
- package/esm5/lib/place/place-router.js +2 -8
- package/esm5/lib/place/place-router.js.map +1 -1
- package/esm5/lib/place/place.module.ngfactory.js.map +1 -1
- package/esm5/lib/place/route/parameter-decorators.js +2 -3
- package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +1034 -253
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +1083 -253
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/commands/command-bar.component.d.ts +10 -0
- package/lib/components/commands/command-container.d.ts +15 -0
- package/lib/components/commands/command-face/command-face.component.d.ts +29 -0
- package/lib/components/commands/command-face.d.ts +24 -0
- package/lib/components/commands/command.component.d.ts +15 -0
- package/lib/components/commands/popup-menu/abstract-popup-menu.component.d.ts +18 -0
- package/lib/components/commands/popup-menu/more-menu.component.d.ts +9 -0
- package/lib/components/commands/popup-menu/popup-menu.component.d.ts +14 -0
- package/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.d.ts +21 -0
- package/lib/components/forms/abstract-input.component.d.ts +8 -2
- package/lib/components/forms/abstract-list-input.component.d.ts +10 -3
- package/lib/components/forms/abstract-value-input.component.d.ts +9 -3
- package/lib/components/forms/autocomplete-input/autocomplete-input.component.d.ts +25 -0
- package/lib/components/forms/checkbox-input/checkbox-input.component.d.ts +0 -2
- package/lib/components/forms/multiple-select-input/multiple-select-input.component.d.ts +8 -4
- package/lib/components/forms/number-input/number-input.component.d.ts +0 -2
- package/lib/components/forms/password-input/password-input.component.d.ts +0 -2
- package/lib/components/forms/select-input/select-input.component.d.ts +2 -2
- package/lib/components/forms/string-input/string-input.component.d.ts +1 -2
- package/lib/components/forms/text-input/text-input.component.d.ts +0 -2
- package/lib/components/icon/icon.component.d.ts +15 -0
- package/lib/components/index.d.ts +13 -1
- package/lib/components/table/cell-editors.d.ts +3 -3
- package/lib/components/table/{cell-protal-ref.d.ts → cell-portal-ref.d.ts} +4 -4
- package/lib/components/table/column-model.d.ts +18 -12
- package/lib/components/table/mutable-cell-renderer.d.ts +6 -0
- package/lib/components/table/table-cell-renderer/table-cell-renderer.component.d.ts +1 -1
- package/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.d.ts +1 -1
- package/lib/components/table/table-model.d.ts +12 -4
- package/lib/components/table/table-row-menu/table-row-menu.component.d.ts +25 -0
- package/lib/interaction/components/activity-container/activity-container.component.d.ts +3 -1
- package/package.json +4 -4
- package/esm2015/lib/components/table/cell-protal-ref.js.map +0 -1
- package/esm5/lib/components/table/cell-protal-ref.js.map +0 -1
|
@@ -6,6 +6,7 @@ import { AbstractValueInputComponent } from '../abstract-value-input.component';
|
|
|
6
6
|
* Using templates:
|
|
7
7
|
* <aup-select-input [valueModel]="myModel" [options]="myOptions">
|
|
8
8
|
* <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
9
|
+
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
9
10
|
* </aup-select_input>
|
|
10
11
|
*/
|
|
11
12
|
var SelectInputComponent = /** @class */ (function (_super) {
|
|
@@ -17,10 +18,6 @@ var SelectInputComponent = /** @class */ (function (_super) {
|
|
|
17
18
|
}
|
|
18
19
|
SelectInputComponent.prototype.ngOnInit = function () {
|
|
19
20
|
};
|
|
20
|
-
__decorate([
|
|
21
|
-
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
22
|
-
__metadata("design:type", Object)
|
|
23
|
-
], SelectInputComponent.prototype, "valueModel", void 0);
|
|
24
21
|
__decorate([
|
|
25
22
|
Input(), TrackExternal(),
|
|
26
23
|
__metadata("design:type", ListModel)
|
|
@@ -52,7 +49,7 @@ var SelectInputComponent = /** @class */ (function (_super) {
|
|
|
52
49
|
SelectInputComponent = __decorate([
|
|
53
50
|
Component({
|
|
54
51
|
selector: 'aup-select-input',
|
|
55
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
52
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">\n <ng-container *ngIf=\"!nilOptionTemplateRef\">{{placeholder}}</ng-container>\n <ng-container *ngIf=\"nilOptionTemplateRef\" [ngTemplateOutlet]=\"nilOptionTemplateRef\"></ng-container>\n </mat-option>\n <mat-option *ngFor=\"let option of optionsModel.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",
|
|
56
53
|
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
57
54
|
}),
|
|
58
55
|
__metadata("design:paramtypes", [])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/select-input/select-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAsB,SAAS,EAAE,gBAAgB,EAAE,aAAa,EAAQ,MAAM,gBAAgB,CAAC;AACtG,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAEhF
|
|
1
|
+
{"version":3,"file":"select-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/select-input/select-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAsB,SAAS,EAAE,gBAAgB,EAAE,aAAa,EAAQ,MAAM,gBAAgB,CAAC;AACtG,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAEhF;;;;;;GAMG;AAMH;IAAmD,wCAA8B;IA0B/E;QAAA,YACE,iBAAO,SACR;QAJD,uBAAiB,GAAuB,UAAC,MAAM,IAAK,OAAA,CAAC,MAAM,IAAI,KAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,EAAhE,CAAgE,CAAC;;IAIrH,CAAC;IAED,uCAAQ,GAAR;IACA,CAAC;IAzBD;QADC,KAAK,EAAE,EAAE,aAAa,EAAE;kCACX,SAAS;8DAAI;IAG3B;QADC,KAAK,EAAE,EAAE,gBAAgB,CAAC,cAAc,CAAC;;yDAC7B;IAGb;QADC,KAAK,EAAE;;6DACa;IAGrB;QADC,KAAK,EAAE;;0DACU;IAGlB;QADC,YAAY,CAAC,gBAAgB,CAAC;kCACZ,WAAW;mEAAM;IAGpC;QADC,YAAY,CAAC,mBAAmB,CAAC;kCACZ,WAAW;sEAAM;IAGvC;QADC,KAAK,EAAE;;mEAC6G;IAxB1G,oBAAoB;QALhC,SAAS,CAAC;YACT,QAAQ,EAAE,kBAAkB;YAC5B,6zCAA4C;;SAE7C,CAAC;;OACW,oBAAoB,CAiChC;IAAD,2BAAC;CAAA,AAjCD,CAAmD,2BAA2B,GAiC7E;SAjCY,oBAAoB","sourcesContent":["import { Component, ContentChild, Input, OnInit, TemplateRef } from '@angular/core';\nimport { IMutableValueModel, ListModel, StoreInListModel, TrackExternal, Form } from '@coolon/pectin';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n/**\n * Using templates:\n * <aup-select-input [valueModel]=\"myModel\" [options]=\"myOptions\">\n * <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>\n * <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>\n * </aup-select_input>\n */\n@Component({\n selector: 'aup-select-input',\n templateUrl: './select-input.component.html',\n styleUrls: ['./select-input.component.scss']\n})\nexport class SelectInputComponent<T = any> extends AbstractValueInputComponent<T> implements OnInit {\n\n // @Input() @TrackExternal({ delegateTo: 'inputModel' })\n // valueModel: Form.ValueModelBase<T> | IMutableValueModel<T>;\n\n @Input() @TrackExternal()\n optionsModel: ListModel<T>;\n\n @Input() @StoreInListModel('optionsModel')\n options: T[];\n\n @Input()\n optionLabel: keyof T;\n\n @Input()\n allowNil: boolean;\n\n @ContentChild('optionTemplate')\n optionTemplateRef: TemplateRef<any>;\n\n @ContentChild('nilOptionTemplate')\n nilOptionTemplateRef: TemplateRef<any>;\n\n @Input()\n optionLabelFormat: (option: T) => any = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n}\n"]}
|
|
@@ -8,17 +8,13 @@ var StringInputComponent = /** @class */ (function (_super) {
|
|
|
8
8
|
var _this = _super.call(this) || this;
|
|
9
9
|
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
10
10
|
_this.clearCommand = Command.create(function () {
|
|
11
|
-
_this.
|
|
11
|
+
_this.componentValueModel.value = null;
|
|
12
12
|
});
|
|
13
|
-
_this.clearCommand.disableWhile(chain.stringValue(_this.
|
|
13
|
+
_this.clearCommand.disableWhile(chain.stringValue(_this.componentValueModel).isBlank());
|
|
14
14
|
return _this;
|
|
15
15
|
}
|
|
16
16
|
StringInputComponent.prototype.ngOnInit = function () {
|
|
17
17
|
};
|
|
18
|
-
__decorate([
|
|
19
|
-
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
20
|
-
__metadata("design:type", Object)
|
|
21
|
-
], StringInputComponent.prototype, "valueModel", void 0);
|
|
22
18
|
__decorate([
|
|
23
19
|
Input(), TrackExternal({ defaultValue: false }),
|
|
24
20
|
__metadata("design:type", ValueModel)
|
|
@@ -30,7 +26,7 @@ var StringInputComponent = /** @class */ (function (_super) {
|
|
|
30
26
|
StringInputComponent = __decorate([
|
|
31
27
|
Component({
|
|
32
28
|
selector: 'aup-string-input',
|
|
33
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
29
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.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 <button mat-button mat-icon-button matSuffix *ngIf=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <aup-icon icon=\"mat:close\"></aup-icon>\n </button>\n</mat-form-field>\n\n",
|
|
34
30
|
styles: ["button[disabled]{visibility:hidden}"]
|
|
35
31
|
}),
|
|
36
32
|
__metadata("design:paramtypes", [])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/string-input/string-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,GAAG,EAA4B,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACtH,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAOhF;IAA0C,wCAAmC;
|
|
1
|
+
{"version":3,"file":"string-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/string-input/string-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,GAAG,EAA4B,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACtH,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAOhF;IAA0C,wCAAmC;IAU3E;QAAA,YACE,iBAAO,SAMR;QALO,IAAA,2BAAkF,EAAhF,gBAAK,EAAE,oBAAO,EAAE,kBAAM,EAAE,cAAI,EAAE,gBAAK,EAAE,oBAAO,EAAE,sBAAkC,CAAC;QACzF,KAAI,CAAC,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;YACjC,KAAI,CAAC,mBAAmB,CAAC,KAAK,GAAG,IAAI,CAAC;QACxC,CAAC,CAAC,CAAC;QACH,KAAI,CAAC,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,WAAW,CAAC,KAAI,CAAC,mBAAmB,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;;IACxF,CAAC;IAED,uCAAQ,GAAR;IACA,CAAC;IAjBD;QADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;kCAC9B,UAAU;kEAAU;IAGtC;QADC,KAAK,EAAE,EAAE,iBAAiB,CAAC,kBAAkB,CAAC;;6DAC1B;IANV,oBAAoB;QALhC,SAAS,CAAC;YACT,QAAQ,EAAE,kBAAkB;YAC5B,ixBAA4C;;SAE7C,CAAC;;OACW,oBAAoB,CAsBhC;IAAD,2BAAC;CAAA,AAtBD,CAA0C,2BAA2B,GAsBpE;SAtBY,oBAAoB","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { Command, Dsl, Form, IMutableValueModel, StoreInValueModel, TrackExternal, ValueModel } from '@coolon/pectin';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n@Component({\n selector: 'aup-string-input',\n templateUrl: './string-input.component.html',\n styleUrls: ['./string-input.component.scss']\n})\nexport class StringInputComponent extends AbstractValueInputComponent<string> implements OnInit {\n\n @Input() @TrackExternal({ defaultValue: false })\n enableClearModel: ValueModel<boolean>;\n\n @Input() @StoreInValueModel('enableClearModel')\n enableClear: boolean;\n\n readonly clearCommand: Command<void>;\n\n constructor() {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n this.clearCommand = Command.create(() => {\n this.componentValueModel.value = null;\n });\n this.clearCommand.disableWhile(chain.stringValue(this.componentValueModel).isBlank());\n }\n\n ngOnInit() {\n }\n\n}\n"]}
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import { __decorate, __extends, __metadata } from "tslib";
|
|
2
2
|
import { Component, Input } from '@angular/core';
|
|
3
|
-
import { TrackExternal } from '@coolon/pectin';
|
|
4
3
|
import { AbstractValueInputComponent } from '../abstract-value-input.component';
|
|
5
4
|
var TextInputComponent = /** @class */ (function (_super) {
|
|
6
5
|
__extends(TextInputComponent, _super);
|
|
7
6
|
function TextInputComponent() {
|
|
8
7
|
var _this = _super.call(this) || this;
|
|
8
|
+
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
9
|
+
// valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
|
|
9
10
|
_this.rows = 2;
|
|
10
11
|
return _this;
|
|
11
12
|
// const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
12
13
|
}
|
|
13
14
|
TextInputComponent.prototype.ngOnInit = function () {
|
|
14
15
|
};
|
|
15
|
-
__decorate([
|
|
16
|
-
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
17
|
-
__metadata("design:type", Object)
|
|
18
|
-
], TextInputComponent.prototype, "valueModel", void 0);
|
|
19
16
|
__decorate([
|
|
20
17
|
Input(),
|
|
21
18
|
__metadata("design:type", Object)
|
|
@@ -27,7 +24,7 @@ var TextInputComponent = /** @class */ (function (_super) {
|
|
|
27
24
|
TextInputComponent = __decorate([
|
|
28
25
|
Component({
|
|
29
26
|
selector: 'aup-text-input',
|
|
30
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
27
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n </textarea>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
|
|
31
28
|
styles: ["button[disabled]{visibility:hidden}textarea{overflow:auto}"]
|
|
32
29
|
}),
|
|
33
30
|
__metadata("design:paramtypes", [])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/text-input/text-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"text-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/text-input/text-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AAEzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAOhF;IAAwC,sCAAmC;IAQzE;QAAA,YACE,iBAAO,SAER;QATD,wDAAwD;QACxD,wEAAwE;QAE/D,UAAI,GAAG,CAAC,CAAC;;QAKhB,4FAA4F;IAC9F,CAAC;IAED,qCAAQ,GAAR;IACA,CAAC;IATQ;QAAR,KAAK,EAAE;;oDAAU;IACT;QAAR,KAAK,EAAE;;oDAAc;IANX,kBAAkB;QAL9B,SAAS,CAAC;YACT,QAAQ,EAAE,gBAAgB;YAC1B,+sBAA0C;;SAE3C,CAAC;;OACW,kBAAkB,CAgB9B;IAAD,yBAAC;CAAA,AAhBD,CAAwC,2BAA2B,GAgBlE;SAhBY,kBAAkB","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { Form, IMutableValueModel, TrackExternal } from '@coolon/pectin';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n@Component({\n selector: 'aup-text-input',\n templateUrl: './text-input.component.html',\n styleUrls: ['./text-input.component.scss']\n})\nexport class TextInputComponent extends AbstractValueInputComponent<string> implements OnInit {\n\n // @Input() @TrackExternal({ delegateTo: 'inputModel' })\n // valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;\n\n @Input() rows = 2;\n @Input() cols: number;\n\n constructor() {\n super();\n // const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n }\n\n ngOnInit() {\n }\n\n}\n"]}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import { Component, Input } from '@angular/core';
|
|
3
|
+
import { Enum } from 'typescript-string-enums';
|
|
3
4
|
var IconComponent = /** @class */ (function () {
|
|
4
5
|
function IconComponent() {
|
|
6
|
+
this.allowedPrefixes = Enum.values(IconComponent_1.IconPrefix).map(function (p) { return p + ":"; });
|
|
7
|
+
this.iconPrefix = IconComponent_1.IconPrefix;
|
|
5
8
|
}
|
|
9
|
+
IconComponent_1 = IconComponent;
|
|
6
10
|
Object.defineProperty(IconComponent.prototype, "icon", {
|
|
7
11
|
get: function () {
|
|
8
12
|
return this._icon;
|
|
@@ -22,24 +26,32 @@ var IconComponent = /** @class */ (function () {
|
|
|
22
26
|
if (this.prefix) {
|
|
23
27
|
this.errorMessage = "Unknown icon \"" + iconName + "\"";
|
|
24
28
|
}
|
|
25
|
-
this.errorMessage = "Unknown icon prefix \"" + this.prefix + "
|
|
29
|
+
this.errorMessage = "Unknown icon prefix, expected one of [" + this.allowedPrefixes.join(',') + "] got \"" + this.prefix + ":\"";
|
|
26
30
|
},
|
|
27
31
|
enumerable: true,
|
|
28
32
|
configurable: true
|
|
29
33
|
});
|
|
34
|
+
var IconComponent_1;
|
|
30
35
|
__decorate([
|
|
31
36
|
Input(),
|
|
32
37
|
__metadata("design:type", String),
|
|
33
38
|
__metadata("design:paramtypes", [String])
|
|
34
39
|
], IconComponent.prototype, "icon", null);
|
|
35
|
-
IconComponent = __decorate([
|
|
40
|
+
IconComponent = IconComponent_1 = __decorate([
|
|
36
41
|
Component({
|
|
37
42
|
selector: 'aup-icon',
|
|
38
|
-
template: "<ng-container [ngSwitch]=\"prefix\">\n\n <mat-icon *ngSwitchCase=\"
|
|
43
|
+
template: "<ng-container [ngSwitch]=\"prefix\">\n\n <mat-icon *ngSwitchCase=\"iconPrefix.SVG\"\n [svgIcon]=\"suffix\"\n class=\"svgIcon\">\n </mat-icon>\n\n <mat-icon *ngSwitchCase=\"iconPrefix.MATERIAL\">\n {{suffix}}\n </mat-icon>\n\n <div *ngSwitchCase=\"iconPrefix.FONT_AWESOME\"\n class=\"faIconWrapper\">\n <fa-icon [icon]=\"suffix\">\n </fa-icon>\n </div>\n\n <mat-icon *ngSwitchDefault\n [matTooltip]=\"errorMessage\">\n bug_report\n </mat-icon>\n\n</ng-container>\n\n",
|
|
39
44
|
styles: [":host{display:inline-flex;width:24px}fa-icon{vertical-align:middle}.faIconWrapper{text-align:center;width:24px;height:24px}.svgIcon{width:24px;height:24px}:host(.mat-chip-remove) mat-icon{font-size:18px}mat-icon{width:inherit;height:inherit}"]
|
|
40
45
|
})
|
|
41
46
|
], IconComponent);
|
|
42
47
|
return IconComponent;
|
|
43
48
|
}());
|
|
44
49
|
export { IconComponent };
|
|
50
|
+
(function (IconComponent) {
|
|
51
|
+
IconComponent.IconPrefix = Enum({
|
|
52
|
+
SVG: 'svg',
|
|
53
|
+
FONT_AWESOME: 'fa',
|
|
54
|
+
MATERIAL: 'mat'
|
|
55
|
+
});
|
|
56
|
+
})(IconComponent || (IconComponent = {}));
|
|
45
57
|
//# sourceMappingURL=icon.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/icon/icon.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAA4B,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"icon.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/icon/icon.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAA4B,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAC,IAAI,EAAC,MAAM,yBAAyB,CAAC;AAO7C;IAAA;QAQE,oBAAe,GAAG,IAAI,CAAC,MAAM,CAAC,eAAa,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAG,CAAC,MAAG,EAAP,CAAO,CAAC,CAAC;QAC1E,eAAU,GAAG,eAAa,CAAC,UAAU,CAAC;IA0BxC,CAAC;sBAnCY,aAAa;IAYxB,sBAAI,+BAAI;aAmBR;YACE,OAAO,IAAI,CAAC,KAAK,CAAC;QACpB,CAAC;aArBD,UAAS,QAAgB;YACvB,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC;YACtB,IAAI,CAAC,QAAQ,EAAE;gBACb,IAAI,CAAC,YAAY,GAAG,aAAa,CAAC;gBAClC,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;gBACxB,OAAO;aACR;YAED,IAAM,UAAU,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YACzC,IAAI,UAAU,GAAG,CAAC,EAAE;gBAClB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;gBAC7C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;aAC/C;YACD,IAAI,IAAI,CAAC,MAAM,EAAE;gBACf,IAAI,CAAC,YAAY,GAAG,oBAAiB,QAAQ,OAAG,CAAC;aAClD;YACD,IAAI,CAAC,YAAY,GAAG,2CAAyC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,gBAAU,IAAI,CAAC,MAAM,QAAI,CAAC;QACvH,CAAC;;;OAAA;;IAjBD;QADC,KAAK,EAAE;;;6CAkBP;IA7BU,aAAa;QALzB,SAAS,CAAC;YACT,QAAQ,EAAE,UAAU;YACpB,whBAAoC;;SAErC,CAAC;OACW,aAAa,CAmCzB;IAAD,oBAAC;CAAA,AAnCD,IAmCC;SAnCY,aAAa;AAoC1B,WAAiB,aAAa;IAEf,wBAAU,GAAG,IAAI,CAAC;QAC7B,GAAG,EAAE,KAAK;QACV,YAAY,EAAE,IAAI;QAClB,QAAQ,EAAE,KAAK;KAChB,CAAC,CAAC;AAGL,CAAC,EATgB,aAAa,KAAb,aAAa,QAS7B","sourcesContent":["import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';\nimport {Enum} from 'typescript-string-enums';\n\n@Component({\n selector: 'aup-icon',\n templateUrl: './icon.component.html',\n styleUrls: ['./icon.component.scss']\n})\nexport class IconComponent {\n\n _icon: string;\n\n prefix: string;\n suffix: string;\n errorMessage: string;\n\n allowedPrefixes = Enum.values(IconComponent.IconPrefix).map(p => `${p}:`);\n iconPrefix = IconComponent.IconPrefix;\n\n @Input()\n set icon(iconName: string) {\n this._icon = iconName;\n if (!iconName) {\n this.errorMessage = 'icon is nil';\n this.prefix = undefined;\n return;\n }\n\n const colonIndex = iconName.indexOf(':');\n if (colonIndex > 0) {\n this.prefix = this.icon.slice(0, colonIndex);\n this.suffix = this.icon.slice(colonIndex + 1);\n }\n if (this.prefix) {\n this.errorMessage = `Unknown icon \"${iconName}\"`;\n }\n this.errorMessage = `Unknown icon prefix, expected one of [${this.allowedPrefixes.join(',')}] got \"${this.prefix}:\"`;\n }\n\n get icon(): string {\n return this._icon;\n }\n\n}\nexport namespace IconComponent {\n\n export const IconPrefix = Enum({\n SVG: 'svg',\n FONT_AWESOME: 'fa',\n MATERIAL: 'mat'\n });\n export type IconPrefix = Enum<typeof IconPrefix>;\n\n}\n"]}
|
|
@@ -6,10 +6,20 @@ export * from "./disposable-component";
|
|
|
6
6
|
export * from "./focusable.component";
|
|
7
7
|
export * from "./resize-aware.component";
|
|
8
8
|
export * from "./card-container/card-container.component";
|
|
9
|
+
export * from "./commands/command-bar.component";
|
|
10
|
+
export * from "./commands/command-container";
|
|
11
|
+
export * from "./commands/command-face";
|
|
12
|
+
export * from "./commands/command.component";
|
|
13
|
+
export * from "./commands/command-face/command-face.component";
|
|
14
|
+
export * from "./commands/popup-menu/abstract-popup-menu.component";
|
|
15
|
+
export * from "./commands/popup-menu/more-menu.component";
|
|
16
|
+
export * from "./commands/popup-menu/popup-menu.component";
|
|
17
|
+
export * from "./commands/popup-menu-renderer/popup-menu-renderer.component";
|
|
9
18
|
export * from "./focus-container/focus-container.component";
|
|
10
19
|
export * from "./forms/abstract-input.component";
|
|
11
20
|
export * from "./forms/abstract-list-input.component";
|
|
12
21
|
export * from "./forms/abstract-value-input.component";
|
|
22
|
+
export * from "./forms/autocomplete-input/autocomplete-input.component";
|
|
13
23
|
export * from "./forms/checkbox-input/checkbox-input.component";
|
|
14
24
|
export * from "./forms/multiple-select-input/multiple-select-input.component";
|
|
15
25
|
export * from "./forms/number-input/number-input.component";
|
|
@@ -22,7 +32,7 @@ export * from "./noop/noop.component";
|
|
|
22
32
|
export * from "./scroll-container/scroll-container.component";
|
|
23
33
|
export * from "./section-header/section-header.component";
|
|
24
34
|
export * from "./switch-case/switch-case.component";
|
|
25
|
-
export * from "./table/cell-
|
|
35
|
+
export * from "./table/cell-portal-ref";
|
|
26
36
|
export * from "./table/column-model";
|
|
27
37
|
export * from "./table/edit-session";
|
|
28
38
|
export * from "./table/table-model";
|
|
@@ -35,6 +45,7 @@ export * from "./table/select-cell-renderer/select-cell-renderer.component";
|
|
|
35
45
|
export * from "./table/select-header-cell-renderer/select-header-cell-renderer.component";
|
|
36
46
|
export * from "./table/table-cell-renderer/table-cell-renderer.component";
|
|
37
47
|
export * from "./table/table-header-cell-renderer/table-header-cell-renderer.component";
|
|
48
|
+
export * from "./table/table-row-menu/table-row-menu.component";
|
|
38
49
|
export * from "./types/bounds.class";
|
|
39
50
|
export * from "./types/dimension.class";
|
|
40
51
|
export * from "./types/point.class";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,iDAAiD,CAAC;AAChE,cAAc,+DAA+D,CAAC;AAC9E,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAChE,cAAc,6CAA6C,CAAC;AAC5D,cA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;AAExC,cAAc,sBAAsB,CAAC;AAErC,cAAc,sBAAsB,CAAC;AAGrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mDAAmD,CAAC;AAClE,cAAc,+DAA+D,CAAC;AAC9E,cAAc,6EAA6E,CAAC;AAC5F,cAAc,uDAAuD,CAAC;AACtE,cAAc,6DAA6D,CAAC;AAC5E,cAAc,2EAA2E,CAAC;AAC1F,cAAc,2DAA2D,CAAC;AAC1E,cAAc,yEAAyE,CAAC;AACxF,cAAc,iDAAiD,CAAC;AAChE,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+DAA+D,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./components.module\";\nexport * from \"./disposable-component\";\nexport * from \"./focusable.component\";\nexport * from \"./resize-aware.component\";\nexport * from \"./card-container/card-container.component\";\nexport * from \"./commands/command-bar.component\";\nexport * from \"./commands/command-container\";\nexport * from \"./commands/command-face\";\nexport * from \"./commands/command.component\";\nexport * from \"./commands/command-face/command-face.component\";\nexport * from \"./commands/popup-menu/abstract-popup-menu.component\";\nexport * from \"./commands/popup-menu/more-menu.component\";\nexport * from \"./commands/popup-menu/popup-menu.component\";\nexport * from \"./commands/popup-menu-renderer/popup-menu-renderer.component\";\nexport * from \"./focus-container/focus-container.component\";\nexport * from \"./forms/abstract-input.component\";\nexport * from \"./forms/abstract-list-input.component\";\nexport * from \"./forms/abstract-value-input.component\";\nexport * from \"./forms/autocomplete-input/autocomplete-input.component\";\nexport * from \"./forms/checkbox-input/checkbox-input.component\";\nexport * from \"./forms/multiple-select-input/multiple-select-input.component\";\nexport * from \"./forms/number-input/number-input.component\";\nexport * from \"./forms/password-input/password-input.component\";\nexport * from \"./forms/select-input/select-input.component\";\nexport * from \"./forms/string-input/string-input.component\";\nexport * from \"./forms/text-input/text-input.component\";\nexport * from \"./icon/icon.component\";\nexport * from \"./noop/noop.component\";\nexport * from \"./scroll-container/scroll-container.component\";\nexport * from \"./section-header/section-header.component\";\nexport * from \"./switch-case/switch-case.component\";\nexport * from \"./table/cell-editors\";\nexport * from \"./table/cell-portal-ref\";\nexport * from \"./table/cell-renderer\";\nexport * from \"./table/column-model\";\nexport * from \"./table/column-text-properties\";\nexport * from \"./table/edit-session\";\nexport * from \"./table/mutable-cell-renderer\";\nexport * from \"./table/table-def\";\nexport * from \"./table/table-model\";\nexport * from \"./table/table.component\";\nexport * from \"./table/column-template/column-template.directive\";\nexport * from \"./table/default-cell-renderer/default-cell-renderer.component\";\nexport * from \"./table/default-header-cell-renderer/default-header-cell-renderer.component\";\nexport * from \"./table/edit-row-controls/edit-row-controls.component\";\nexport * from \"./table/select-cell-renderer/select-cell-renderer.component\";\nexport * from \"./table/select-header-cell-renderer/select-header-cell-renderer.component\";\nexport * from \"./table/table-cell-renderer/table-cell-renderer.component\";\nexport * from \"./table/table-header-cell-renderer/table-header-cell-renderer.component\";\nexport * from \"./table/table-row-menu/table-row-menu.component\";\nexport * from \"./types/bounds.class\";\nexport * from \"./types/dimension.class\";\nexport * from \"./types/point.class\";\nexport * from \"./vertical-focus-container/vertical-focus-container.component\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell-editors.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/cell-editors.ts"],"names":[],"mappings":"","sourcesContent":["import { Form, ListModel, ValueModel } from '@coolon/pectin';\n\nexport interface CellEditorComponent<T> {\n valueModel:
|
|
1
|
+
{"version":3,"file":"cell-editors.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/cell-editors.ts"],"names":[],"mappings":"","sourcesContent":["import { Form, IMutableListModel, IMutableValueModel, ListModel, ValueModel } from '@coolon/pectin';\n\nexport interface CellEditorComponent<T> {\n valueModel: IMutableValueModel<T> | Form.ValueModelBase<T>\n\n requestFocus?();\n}\n\nexport interface CellListEditorComponent<T> {\n listModel: IMutableListModel<T> | Form.ListModelBase<T>\n\n requestFocus?();\n}\n"]}
|
|
@@ -24,6 +24,7 @@ var CellHeaderPortalRef = /** @class */ (function (_super) {
|
|
|
24
24
|
assert.isTruthy(host);
|
|
25
25
|
host[HEADER_CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);
|
|
26
26
|
};
|
|
27
|
+
// @Trace()
|
|
27
28
|
CellHeaderPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
|
|
28
29
|
this.initialiseHeader(portalComponent, host.column);
|
|
29
30
|
};
|
|
@@ -49,13 +50,15 @@ var ComponentCellRendererPortalRef = /** @class */ (function (_super) {
|
|
|
49
50
|
ComponentCellRendererPortalRef.prototype.initialiseHost = function (host, columnModel) {
|
|
50
51
|
host[CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);
|
|
51
52
|
};
|
|
53
|
+
// @Trace()
|
|
52
54
|
ComponentCellRendererPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
|
|
53
55
|
host[PORTAL_RENDERER_COMPONENT] = portalComponent;
|
|
54
|
-
this.updateComponent(portalComponent, host.getRowData());
|
|
56
|
+
this.updateComponent(portalComponent, host.getRowData(), true);
|
|
55
57
|
};
|
|
58
|
+
// @Trace()
|
|
56
59
|
ComponentCellRendererPortalRef.prototype.pushState = function (host) {
|
|
57
60
|
if (host[PORTAL_RENDERER_COMPONENT]) {
|
|
58
|
-
this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData());
|
|
61
|
+
this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData(), false);
|
|
59
62
|
}
|
|
60
63
|
};
|
|
61
64
|
return ComponentCellRendererPortalRef;
|
|
@@ -99,6 +102,7 @@ var TemplateCellRendererPortalRef = /** @class */ (function (_super) {
|
|
|
99
102
|
TemplateCellRendererPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
|
|
100
103
|
// don't care
|
|
101
104
|
};
|
|
105
|
+
// @Trace()
|
|
102
106
|
TemplateCellRendererPortalRef.prototype.pushState = function (host) {
|
|
103
107
|
host[CELL_RENDERER_PORTAL] = this.createPortal(host.getRowData());
|
|
104
108
|
host.fillCell = this.fillCell;
|
|
@@ -110,4 +114,4 @@ var TemplateCellRendererPortalRef = /** @class */ (function (_super) {
|
|
|
110
114
|
return TemplateCellRendererPortalRef;
|
|
111
115
|
}(CellRendererPortalRef));
|
|
112
116
|
export { TemplateCellRendererPortalRef };
|
|
113
|
-
//# sourceMappingURL=cell-
|
|
117
|
+
//# sourceMappingURL=cell-portal-ref.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cell-portal-ref.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/cell-portal-ref.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGtE,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAMtD,MAAM,CAAC,IAAM,2BAA2B,GAAG,MAAM,CAAC,wCAAwC,CAAC,CAAC;AAC5F,MAAM,CAAC,IAAM,oBAAoB,GAAG,MAAM,CAAC,iCAAiC,CAAC,CAAC;AAC9E,MAAM,CAAC,IAAM,kBAAkB,GAAG,MAAM,CAAC,+BAA+B,CAAC,CAAC;AAC1E,MAAM,CAAC,IAAM,yBAAyB,GAAG,MAAM,CAAC,oCAAoC,CAAC,CAAC;AACtF,MAAM,CAAC,IAAM,uBAAuB,GAAG,MAAM,CAAC,kCAAkC,CAAC,CAAC;AAGlF;IACE;IACA,CAAC;IAKH,oBAAC;AAAD,CAAC,AAPD,IAOC;;AAED;IAAiD,uCAAuD;IACtG,6BAAqB,aAA+B,EAAW,gBAAuE;QAAtI,YACE,iBAAO,SACR;QAFoB,mBAAa,GAAb,aAAa,CAAkB;QAAW,sBAAgB,GAAhB,gBAAgB,CAAuD;;IAEtI,CAAC;IAED,4CAAc,GAAd,UAAe,IAAsC,EAAE,W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,CAAC,UAAU,EAAE,CAAC,CAAC;QAClE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAChC,CAAC;IAEO,oDAAY,GAApB,UAAqB,IAAkB;QACrC,OAAO,IAAI,cAAc,CAAM,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,aAAa,wBAAO,CAAC,IAAI,CAAC,KAAE,SAAS,EAAE,IAAI,CAAC,GAAG,IAAG,CAAC;IAC3G,CAAC;IACH,oCAAC;AAAD,CAAC,AArCD,CAAwD,qBAAqB,GAqC5E","sourcesContent":["import { ComponentType } from '@angular/cdk/overlay';\nimport { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport { TemplateRef, ViewContainerRef } from '@angular/core';\nimport { Trace } from '@coolon/pectin';\nimport { assert } from '@coolon/typescript-utilities';\nimport { ColumnModel, RowData } from './column-model';\nimport { EditSession } from './edit-session';\nimport { TableCellRendererComponent } from './table-cell-renderer/table-cell-renderer.component';\nimport { TableHeaderCellRendererComponent } from './table-header-cell-renderer/table-header-cell-renderer.component';\n\nexport const HEADER_CELL_RENDERER_PORTAL = Symbol('aup-cell-header-renderer-component-ref');\nexport const CELL_RENDERER_PORTAL = Symbol('aup-cell-renderer-component-ref');\nexport const CELL_EDITOR_PORTAL = Symbol('aup-cell-editor-component-ref');\nexport const PORTAL_RENDERER_COMPONENT = Symbol('aup-cell-renderer-portal-component');\nexport const PORTAL_EDITOR_COMPONENT = Symbol('aup-cell-editor-portal-component');\n\n\nexport abstract class CellPortalRef<Row, Host, Portal> {\n constructor() {\n }\n\n abstract initialiseHost(host: Host, columnModel: ColumnModel<Row>)\n\n abstract onPortalAttached(host: Host, portalComponent: Portal);\n}\n\nexport class CellHeaderPortalRef<Row, C> extends CellPortalRef<Row, TableHeaderCellRendererComponent, C> {\n constructor(readonly componentType: ComponentType<C>, readonly initialiseHeader: (component: C, columnModel: ColumnModel<Row>) => void) {\n super();\n }\n\n initialiseHost(host: TableHeaderCellRendererComponent, columnModel: ColumnModel<Row>) {\n assert.isTruthy(host);\n host[HEADER_CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);\n }\n\n // @Trace()\n onPortalAttached(host: TableHeaderCellRendererComponent, portalComponent: C) {\n this.initialiseHeader(portalComponent, host.column);\n }\n\n}\n\nexport abstract class CellRendererPortalRef<Row, Portal> extends CellPortalRef<Row, TableCellRendererComponent<Row>, Portal> {\n abstract pushState(host: TableCellRendererComponent<Row>): void;\n}\n\nexport class ComponentCellRendererPortalRef<Row, Portal> extends CellRendererPortalRef<Row, Portal> {\n\n\n constructor(readonly componentType: ComponentType<Portal>, readonly updateComponent: (component: Portal, rowData: RowData<Row>, firstTime: boolean) => void) {\n super();\n }\n\n initialiseHost(host: TableCellRendererComponent<Row>, columnModel: ColumnModel<Row>) {\n host[CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);\n }\n\n // @Trace()\n onPortalAttached(host: TableCellRendererComponent<Row>, portalComponent: Portal) {\n host[PORTAL_RENDERER_COMPONENT] = portalComponent;\n this.updateComponent(portalComponent, host.getRowData(), true);\n }\n\n // @Trace()\n pushState(host: TableCellRendererComponent<Row>): void {\n if (host[PORTAL_RENDERER_COMPONENT]) {\n this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData(), false);\n }\n }\n\n}\n\nexport class CellEditorPortalRef<Row, Portal> extends CellPortalRef<Row, TableCellRendererComponent<Row>, Portal> {\n\n constructor(readonly componentType: ComponentType<Portal>, readonly initialiseEditorSession: (component: Portal, editSession: EditSession<Row>) => void) {\n super();\n }\n\n initialiseHost(host: TableCellRendererComponent<Row>, columnModel: ColumnModel<Row>) {\n assert.isTruthy(host);\n host[CELL_EDITOR_PORTAL] = new ComponentPortal(this.componentType);\n }\n\n // @Trace()\n onPortalAttached(host: TableCellRendererComponent<Row>, portalComponent: Portal) {\n host[PORTAL_EDITOR_COMPONENT] = portalComponent;\n this.initialiseEditorSession(portalComponent, host.editSession);\n }\n\n}\n\nexport class TemplateCellRendererPortalRef<Row> extends CellRendererPortalRef<Row, undefined> {\n\n private templateRef: TemplateRef<any>;\n private viewContainer: ViewContainerRef;\n private fillCell: boolean;\n private padChild: boolean;\n\n constructor() {\n super();\n }\n\n public registerPortal(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, fillCell: boolean, padChild: boolean) {\n this.templateRef = templateRef;\n this.viewContainer = viewContainer;\n this.fillCell = fillCell;\n this.padChild = padChild;\n }\n\n initialiseHost(host: TableCellRendererComponent<Row>, columnModel: ColumnModel<Row>) {\n assert.isTruthy(host);\n }\n\n // @Trace()\n onPortalAttached(host: TableCellRendererComponent<Row>, portalComponent: undefined) {\n // don't care\n }\n\n // @Trace()\n pushState(host: TableCellRendererComponent<Row>): void {\n host[CELL_RENDERER_PORTAL] = this.createPortal(host.getRowData());\n host.fillCell = this.fillCell;\n host.padChild = this.padChild;\n }\n\n private createPortal(data: RowData<Row>) {\n return new TemplatePortal<any>(this.templateRef, this.viewContainer, { ...(data), $implicit: data.row });\n }\n}\n"]}
|
|
@@ -3,7 +3,7 @@ import { MultipleSelectionModel } from '@coolon/pectin';
|
|
|
3
3
|
import { assert } from '@coolon/typescript-utilities';
|
|
4
4
|
import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
5
5
|
import _ from 'lodash';
|
|
6
|
-
import { CellEditorPortalRef, CellHeaderPortalRef, ComponentCellRendererPortalRef, TemplateCellRendererPortalRef } from './cell-
|
|
6
|
+
import { CellEditorPortalRef, CellHeaderPortalRef, ComponentCellRendererPortalRef, TemplateCellRendererPortalRef } from './cell-portal-ref';
|
|
7
7
|
import { DefaultCellRendererComponent } from './default-cell-renderer/default-cell-renderer.component';
|
|
8
8
|
import { DefaultHeaderCellRendererComponent } from './default-header-cell-renderer/default-header-cell-renderer.component';
|
|
9
9
|
import { EditRowControls } from './edit-row-controls/edit-row-controls.component';
|
|
@@ -12,6 +12,7 @@ import { SelectHeaderCellRendererComponent } from './select-header-cell-renderer
|
|
|
12
12
|
var noop = function () {
|
|
13
13
|
};
|
|
14
14
|
var ɵ0 = noop;
|
|
15
|
+
var CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol("aup-cell-renderer:row-data-cache");
|
|
15
16
|
var ColumnModel = /** @class */ (function () {
|
|
16
17
|
function ColumnModel(columnId, defaults) {
|
|
17
18
|
this.columnId = columnId;
|
|
@@ -103,24 +104,66 @@ var ColumnModel = /** @class */ (function () {
|
|
|
103
104
|
export { ColumnModel };
|
|
104
105
|
var PropertyColumnModel = /** @class */ (function (_super) {
|
|
105
106
|
__extends(PropertyColumnModel, _super);
|
|
106
|
-
function PropertyColumnModel(property, defaults) {
|
|
107
|
-
var _this = _super.call(this,
|
|
107
|
+
function PropertyColumnModel(id, property, defaults) {
|
|
108
|
+
var _this = _super.call(this, id, defaults) || this;
|
|
108
109
|
_this.property = property;
|
|
109
110
|
_this._format = function (value) { return value; };
|
|
110
111
|
_this.cellRenderer(DefaultCellRendererComponent);
|
|
111
112
|
return _this;
|
|
112
113
|
}
|
|
113
|
-
PropertyColumnModel.prototype.cellRenderer = function (componentType) {
|
|
114
|
+
PropertyColumnModel.prototype.cellRenderer = function (componentType, onComponentInitOrOptions) {
|
|
114
115
|
var _this = this;
|
|
115
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
|
|
116
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData, firstTime) {
|
|
117
|
+
if (firstTime) {
|
|
118
|
+
if (_.isFunction(onComponentInitOrOptions)) {
|
|
119
|
+
onComponentInitOrOptions(component);
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
if (_.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
123
|
+
onComponentInitOrOptions.onComponentInit(component);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
116
127
|
component.value = _this._format(rowData.row[_this.property]);
|
|
128
|
+
if (!_.isFunction(onComponentInitOrOptions) && _.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
129
|
+
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
130
|
+
}
|
|
117
131
|
}));
|
|
118
132
|
return this;
|
|
119
133
|
};
|
|
120
|
-
PropertyColumnModel.prototype.
|
|
134
|
+
PropertyColumnModel.prototype.mutableCellRenderer = function (componentType, options) {
|
|
135
|
+
var _this = this;
|
|
136
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData, firstTime) {
|
|
137
|
+
// keep a local copy most recent row value so it's available to teh
|
|
138
|
+
// edit callback without having to add/remove subscribers all the time.
|
|
139
|
+
component[CELL_RENDERER_COMPONENT_ROW_CACHE] = rowData.row;
|
|
140
|
+
var disableEditCallback = false;
|
|
141
|
+
if (firstTime) {
|
|
142
|
+
if (_.isFunction(options === null || options === void 0 ? void 0 : options.onComponentInit)) {
|
|
143
|
+
options.onComponentInit(component);
|
|
144
|
+
}
|
|
145
|
+
// install our edit callback
|
|
146
|
+
component.onValueEdited(function (is, was) {
|
|
147
|
+
if (!disableEditCallback) {
|
|
148
|
+
options.onValueEdit(component[CELL_RENDERER_COMPONENT_ROW_CACHE], is, was);
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
// now push the value the component and disable the callback just incase the component misbehaves
|
|
153
|
+
// and fires a value change during the operation.
|
|
154
|
+
disableEditCallback = true;
|
|
155
|
+
component.value = rowData.row[_this.property];
|
|
156
|
+
disableEditCallback = false;
|
|
157
|
+
if (!_.isFunction(options) && _.isFunction(options === null || options === void 0 ? void 0 : options.onRowUpdate)) {
|
|
158
|
+
options.onRowUpdate(component, rowData.row);
|
|
159
|
+
}
|
|
160
|
+
}));
|
|
161
|
+
return this;
|
|
162
|
+
};
|
|
163
|
+
PropertyColumnModel.prototype.cellEditor = function (editor, validatorsOrInitialiser, onComponentInit) {
|
|
121
164
|
var _this = this;
|
|
122
165
|
var validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|
|
123
|
-
var initialiser = _.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser :
|
|
166
|
+
var initialiser = _.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : onComponentInit;
|
|
124
167
|
this.configureCellEditor(new CellEditorPortalRef(editor, function (component, editSession) {
|
|
125
168
|
var formValueModel = editSession.form.pluck(_this.property);
|
|
126
169
|
if (validators) {
|
|
@@ -146,8 +189,8 @@ var PropertyColumnModel = /** @class */ (function (_super) {
|
|
|
146
189
|
export { PropertyColumnModel };
|
|
147
190
|
var ListPropertyColumnModel = /** @class */ (function (_super) {
|
|
148
191
|
__extends(ListPropertyColumnModel, _super);
|
|
149
|
-
function ListPropertyColumnModel(property, defaults) {
|
|
150
|
-
var _this = _super.call(this,
|
|
192
|
+
function ListPropertyColumnModel(id, property, defaults) {
|
|
193
|
+
var _this = _super.call(this, id, defaults) || this;
|
|
151
194
|
_this.property = property;
|
|
152
195
|
_this._format = function (value) { return value.map(function (v) { return v === null || v === void 0 ? void 0 : v.toString(); }).join(', '); };
|
|
153
196
|
_this.cellRenderer(DefaultCellRendererComponent);
|
|
@@ -195,10 +238,23 @@ var CustomValueColumnModel = /** @class */ (function (_super) {
|
|
|
195
238
|
_this.cellRenderer(DefaultCellRendererComponent);
|
|
196
239
|
return _this;
|
|
197
240
|
}
|
|
198
|
-
CustomValueColumnModel.prototype.cellRenderer = function (componentType) {
|
|
241
|
+
CustomValueColumnModel.prototype.cellRenderer = function (componentType, onComponentInitOrOptions) {
|
|
199
242
|
var _this = this;
|
|
200
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
|
|
243
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData, firstTime) {
|
|
244
|
+
if (firstTime) {
|
|
245
|
+
if (_.isFunction(onComponentInitOrOptions)) {
|
|
246
|
+
onComponentInitOrOptions(component);
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
if (_.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
250
|
+
onComponentInitOrOptions.onComponentInit(component);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
201
254
|
component.value = _this.getValue(rowData.row);
|
|
255
|
+
if (!_.isFunction(onComponentInitOrOptions) && _.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
256
|
+
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
257
|
+
}
|
|
202
258
|
}));
|
|
203
259
|
return this;
|
|
204
260
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"column-model.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/column-model.ts"],"names":[],"mappings":";AAEA,OAAO,EAIL,sBAAsB,EAKvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,kDAAkD,CAAC;AAC3E,OAAO,CAAC,MAAM,QAAQ,CAAC;AAEvB,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EAEnB,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,4BAA4B,EAAE,MAAM,yDAAyD,CAAC;AACvG,OAAO,EAAE,kCAAkC,EAAE,MAAM,uEAAuE,CAAC;AAC3H,OAAO,EAAE,eAAe,EAAE,MAAM,iDAAiD,CAAC;AAElF,OAAO,EAAE,2BAA2B,EAAE,MAAM,uDAAuD,CAAC;AACpG,OAAO,EAAE,iCAAiC,EAAE,MAAM,qEAAqE,CAA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C1H,SAAS,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;YAC5B,SAAS,CAAC,cAAc,GAAG,cAAc,CAAC;QAC5C,CAAC,CAAC,CAAC,CAAC;;IACN,CAAC;IAES,mDAAoB,GAA9B;QACE,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,6DAA8B,GAA9B;QACE,OAAO,IAAI,CAAC,+BAA+B,EAAE,CAAC;IAChD,CAAC;IAED,+CAAgB,GAAhB,UAAiB,gBAAyB;QACxC,6EAA6E;QAC7E,wCAAwC;QACxC,OAAO,iBAAM,gBAAgB,YAAC,gBAAgB,CAAC,CAAC;IAClD,CAAC;IAED,mDAAoB,GAApB,UAAqB,MAAe;QAClC,IAAI,CAAC,qBAAqB,GAAG,MAAM,CAAC;QACpC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,wCAAS,GAAT,UAAU,GAAQ;QAChB,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACjD,CAAC;IACH,2BAAC;AAAD,CAAC,AAzCD,CAA+C,WAAW,GAyCzD","sourcesContent":["import { ComponentType } from '@angular/cdk/overlay';\nimport { TemplateRef, ViewContainerRef } from '@angular/core';\nimport {\n Command,\n DirtyTrackingForm,\n Form,\n MultipleSelectionModel,\n SelectionModel,\n Types,\n UnaryCommand,\n Validator\n} from '@coolon/pectin';\nimport { assert } from '@coolon/typescript-utilities';\nimport { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';\nimport _ from 'lodash';\nimport { CellEditorComponent, CellListEditorComponent } from './cell-editors';\nimport {\n CellEditorPortalRef,\n CellHeaderPortalRef,\n CellRendererPortalRef,\n ComponentCellRendererPortalRef,\n TemplateCellRendererPortalRef\n} from './cell-protal-ref';\nimport { ColumnTextProperties } from './column-text-properties';\nimport { DefaultCellRendererComponent } from './default-cell-renderer/default-cell-renderer.component';\nimport { DefaultHeaderCellRendererComponent } from './default-header-cell-renderer/default-header-cell-renderer.component';\nimport { EditRowControls } from './edit-row-controls/edit-row-controls.component';\nimport { EditSession } from './edit-session';\nimport { SelectCellRendererComponent } from './select-cell-renderer/select-cell-renderer.component';\nimport { SelectHeaderCellRendererComponent } from './select-header-cell-renderer/select-header-cell-renderer.component';\nimport { TableCellRendererComponent } from './table-cell-renderer/table-cell-renderer.component';\nimport { TableHeaderCellRendererComponent } from './table-header-cell-renderer/table-header-cell-renderer.component';\n\n\nconst noop = () => {\n};\n\nexport interface RowData<Row> {\n row: Row;\n editSession?: EditSession<Row>;\n editRowCommand: Command<void>;\n}\n\n\nexport class ColumnModel<Row> {\n\n private _columnTextProperties: ColumnTextProperties;\n\n private _columnHeaderPortalRef: CellHeaderPortalRef<Row, any>;\n private _cellRendererPortalRef: CellRendererPortalRef<Row, any>;\n private _cellEditorPortalRef: CellEditorPortalRef<Row, any>;\n\n private _selectRowOnClick = undefined;\n\n constructor(readonly columnId: string, private defaults: ColumnModel.Defaults) {\n this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, (component, column) => {\n component.headerText = column.getHeaderText();\n });\n }\n\n @Memoize()\n getHeaderText(): string {\n return this.getColumnTextProperties()?.headerText() || this.getDefaultHeaderText();\n }\n\n protected getDefaultHeaderText() {\n return this.columnId;\n }\n\n @Memoize()\n getColumnTextProperties(): ColumnTextProperties {\n return this._columnTextProperties || this.defaults.getColumnTextProperties(this);\n }\n\n textProperties(columnTextProperties: ColumnTextProperties): this {\n this._columnTextProperties = columnTextProperties;\n return this;\n }\n\n protected configureHeaderRenderer<C>(config: CellHeaderPortalRef<Row, any>): void {\n this._columnHeaderPortalRef = config;\n }\n\n protected configureCellRenderer<C>(config: CellRendererPortalRef<Row, any>): void {\n this._cellRendererPortalRef = config;\n }\n\n protected configureCellEditor<E>(cellEditor: CellEditorPortalRef<Row, E>): void {\n this._cellEditorPortalRef = cellEditor;\n }\n\n cellHeaderRenderer<C>(componentType: ComponentType<C>, initialiser: (component: C, column: ColumnModel<Row>) => void): this {\n this.configureHeaderRenderer(new CellHeaderPortalRef<Row, C>(componentType, initialiser));\n return this;\n }\n\n hasEditorPortal() {\n return !!this._cellEditorPortalRef;\n }\n\n attachHeaderCell(host: any) {\n this._columnHeaderPortalRef.initialiseHost(host, this);\n }\n\n attachCell(host: any) {\n this._cellRendererPortalRef.initialiseHost(host, this);\n if (this.hasEditorPortal()) {\n this._cellEditorPortalRef.initialiseHost(host, this);\n }\n }\n\n onHeaderAttached(host: TableHeaderCellRendererComponent, component: any) {\n this._columnHeaderPortalRef.onPortalAttached(host, component);\n }\n\n onRendererAttached(host: TableCellRendererComponent<Row>, component: any) {\n this._cellRendererPortalRef.onPortalAttached(host, component);\n }\n\n // @Trace()\n onEditorAttached(host: TableCellRendererComponent<Row>, component: any) {\n this._cellEditorPortalRef.onPortalAttached(host, component);\n }\n\n updatePortalContent(host: TableCellRendererComponent<Row>) {\n this._cellRendererPortalRef.pushState(host);\n }\n\n protected selectRowOnClick(selectOnRowClick: boolean): this {\n this._selectRowOnClick = selectOnRowClick;\n return this;\n }\n\n isRowSelectionEnabled(): boolean | undefined {\n return this._selectRowOnClick;\n }\n\n isRowSelectionExplicitlyEnabled(): boolean {\n return this._selectRowOnClick === true;\n }\n\n isRowSelectionExplicitlyDisabled(): boolean {\n return this._selectRowOnClick === false;\n }\n}\n\nexport namespace ColumnModel {\n export interface Defaults {\n getColumnTextProperties(columnModel: ColumnModel<any>): ColumnTextProperties;\n }\n}\n\nexport interface CellEditorOptions<V, C> { //extends CellRendererOptions<E> {\n validators?: Validator<V>[];\n\n initialiseComponent?(component: C);\n}\n\nexport class PropertyColumnModel<Row, P extends Types.ValuePropertiesOf<Row>> extends ColumnModel<Row> {\n\n\n private _format: (value: Row[P]) => any = (value) => value;\n\n constructor(readonly property: P, defaults: ColumnModel.Defaults) {\n super(property.toString(), defaults);\n this.cellRenderer(DefaultCellRendererComponent);\n }\n\n cellRenderer(componentType: ComponentType<{ value: Row[P] }>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData) => {\n component.value = this._format(rowData.row[this.property]);\n }));\n return this;\n }\n\n cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, validators?: Validator<Row[P]>[], initialiseComponent?: (component: E) => void): this\n cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, initialiseComponent?: (component: E) => void): this\n cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, validatorsOrInitialiser?: Validator<Row[P]>[] | ((component: E) => void), initialiseComponent?: (component: E) => void): this {\n const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;\n const initialiser = _.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;\n this.configureCellEditor(new CellEditorPortalRef(editor, (component: E, editSession: EditSession<Row>) => {\n const formValueModel = editSession.form.pluck(this.property);\n if (validators) {\n formValueModel.validateUsing(validators);\n }\n component.valueModel = formValueModel;\n if (initialiser) {\n initialiser(component);\n }\n }));\n return this;\n }\n\n format(formatter: (value: Row[P]) => any): this {\n assert.isFunction(formatter);\n this._format = formatter;\n return this;\n }\n\n public selectRowOnClick(selectOnRowClick: boolean): this {\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport class ListPropertyColumnModel<Row, P extends Types.ArrayPropertiesOf<Row>> extends ColumnModel<Row> {\n\n private _format: (value: Types.ArrayElementType<Row, P>[]) => any = (value) => value.map(v => v?.toString()).join(', ');\n\n constructor(readonly property: P, defaults: ColumnModel.Defaults) {\n super(property.toString(), defaults);\n this.cellRenderer(DefaultCellRendererComponent);\n }\n\n cellRenderer(componentType: ComponentType<{ value: Types.ArrayElementType<Row, P>[] }>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData) => {\n component.value = this._format(rowData.row[this.property]);\n }));\n return this;\n }\n\n cellEditor<C extends CellListEditorComponent<Types.ArrayElementType<Row, P>>>(editor: ComponentType<C>, validators?: Validator<Types.ArrayElementType<Row, P>[]>[], initialiseComponent?: (component: C) => void): this\n cellEditor<C extends CellListEditorComponent<Types.ArrayElementType<Row, P>>>(editor: ComponentType<C>, initialiseComponent?: (component: C) => void): this\n cellEditor<C extends CellListEditorComponent<Types.ArrayElementType<Row, P>>>(editor: ComponentType<C>, validatorsOrInitialiser?: Validator<Types.ArrayElementType<Row, P>[]>[] | ((component: C) => void), initialiseComponent?: (component: C) => void): this {\n const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;\n const initialiser = _.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;\n\n this.configureCellEditor(new CellEditorPortalRef(editor, (component: C, editSession: EditSession<Row>) => {\n const formListModel = editSession.form.pluckList(this.property);\n if (validators) {\n formListModel.validateUsing(validators);\n }\n component.listModel = formListModel;\n if (initialiser) {\n initialiser(component);\n }\n }));\n return this;\n }\n\n format(formatter: (value: Types.ArrayElementType<Row, P>[]) => any): this {\n assert.isFunction(formatter);\n this._format = formatter;\n return this;\n }\n\n public selectRowOnClick(selectOnRowClick: boolean): this {\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport class CustomValueColumnModel<Row, V> extends ColumnModel<Row> {\n constructor(columnId: string, defaults: ColumnModel.Defaults, private getValue: (row: Row) => V) {\n super(columnId, defaults);\n this.cellRenderer(DefaultCellRendererComponent);\n }\n\n cellRenderer(componentType: ComponentType<{ value: V }>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData) => {\n component.value = this.getValue(rowData.row);\n }));\n return this;\n }\n\n public selectRowOnClick(selectOnRowClick: boolean): this {\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport class EditorControlColumnModel<Row> extends ColumnModel<Row> {\n\n constructor(columnId: string, saveCommand: UnaryCommand<DirtyTrackingForm<Row>, boolean>, defaults: ColumnModel.Defaults) {\n super(columnId, defaults);\n this.cellRenderer(EditRowControls);\n }\n\n cellRenderer(componentType: ComponentType<{ row: Row, editSession: EditSession<Row>, editRowCommand: Command<void> }>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData: RowData<Row>) => {\n component.row = rowData.row;\n component.editSession = rowData.editSession;\n component.editRowCommand = rowData.editRowCommand;\n }));\n return this;\n }\n\n protected getDefaultHeaderText(): string {\n return '';\n }\n}\n\nexport class CustomTemplateColumnModel<Row> extends ColumnModel<Row> {\n private readonly config = new TemplateCellRendererPortalRef<Row>();\n\n constructor(columnId: string, defaults: ColumnModel.Defaults) {\n super(columnId, defaults);\n this.configureCellRenderer(this.config);\n }\n\n setTemplate(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, fillCell: boolean, padChild: boolean) {\n this.config.registerPortal(templateRef, viewContainer, fillCell, padChild);\n }\n\n public selectRowOnClick(selectOnRowClick: boolean): this {\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport class SelectionColumnModel<Row> extends ColumnModel<Row> {\n\n private _enableHeaderControls = true;\n\n constructor(columnId: string, defaults: ColumnModel.Defaults, private readonly selectionModel: SelectionModel<Row>) {\n super(columnId, defaults);\n this.selectOnRowClick(false);\n if (selectionModel instanceof MultipleSelectionModel) {\n this.cellHeaderRenderer(SelectHeaderCellRendererComponent, (component) => {\n component.selectionModel = selectionModel;\n component.enableHeaderControls = this._enableHeaderControls;\n });\n }\n this.configureCellRenderer(new ComponentCellRendererPortalRef(SelectCellRendererComponent, (component, rowData: RowData<Row>) => {\n component.row = rowData.row;\n component.selectionModel = selectionModel;\n }));\n }\n\n protected getDefaultHeaderText(): string {\n return '';\n }\n\n isRowSelectionEnabledByDefault(): boolean | undefined {\n return this.isRowSelectionExplicitlyEnabled();\n }\n\n selectOnRowClick(selectOnRowClick: boolean): this {\n // note we're using different method name as the selection column treats this\n // state as the default for all columns.\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n enableHeaderControls(enable: boolean): this {\n this._enableHeaderControls = enable;\n return this;\n }\n\n selectRow(row: Row) {\n this.selectionModel.selectCommand.execute(row);\n }\n}\n\n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AW,GAyCzD","sourcesContent":["import { ComponentType } from '@angular/cdk/overlay';\nimport { TemplateRef, ViewContainerRef } from '@angular/core';\nimport {\n Command,\n DirtyTrackingForm,\n Disposable,\n MultipleSelectionModel,\n SelectionModel,\n Types,\n UnaryCommand,\n Validator\n} from '@coolon/pectin';\nimport { assert } from '@coolon/typescript-utilities';\nimport { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';\nimport _ from 'lodash';\nimport { CellEditorComponent, CellListEditorComponent } from './cell-editors';\nimport {\n CellEditorPortalRef,\n CellHeaderPortalRef,\n CellRendererPortalRef,\n ComponentCellRendererPortalRef,\n TemplateCellRendererPortalRef\n} from './cell-portal-ref';\nimport { CellRenderer } from './cell-renderer';\nimport { ColumnTextProperties } from './column-text-properties';\nimport { DefaultCellRendererComponent } from './default-cell-renderer/default-cell-renderer.component';\nimport { DefaultHeaderCellRendererComponent } from './default-header-cell-renderer/default-header-cell-renderer.component';\nimport { EditRowControls } from './edit-row-controls/edit-row-controls.component';\nimport { EditSession } from './edit-session';\nimport { MutableCellRenderer } from './mutable-cell-renderer';\nimport { SelectCellRendererComponent } from './select-cell-renderer/select-cell-renderer.component';\nimport { SelectHeaderCellRendererComponent } from './select-header-cell-renderer/select-header-cell-renderer.component';\nimport { TableCellRendererComponent } from './table-cell-renderer/table-cell-renderer.component';\nimport { TableHeaderCellRendererComponent } from './table-header-cell-renderer/table-header-cell-renderer.component';\n\n\nconst noop = () => {\n};\n\nexport interface RowData<Row> {\n row: Row;\n editSession?: EditSession<Row>;\n editRowCommand: Command<void>;\n}\n\nconst CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol(\"aup-cell-renderer:row-data-cache\")\n\nexport type OnComponentInit<C> = (component: C) => void;\n\nexport interface CellRendererOptions<Row, E> {\n onComponentInit?: (component: E) => void;\n onRowUpdate?: (component: E, row: Row) => void;\n}\n\n\nexport interface MutableCellRendererOptions<Row, E, P extends keyof Row> extends CellRendererOptions<Row, E> {\n onValueEdit: (row: Row, is: Row[P], was: Row[P]) => void;\n}\n\nexport class ColumnModel<Row> {\n\n private _columnTextProperties: ColumnTextProperties;\n\n private _columnHeaderPortalRef: CellHeaderPortalRef<Row, any>;\n private _cellRendererPortalRef: CellRendererPortalRef<Row, any>;\n private _cellEditorPortalRef: CellEditorPortalRef<Row, any>;\n\n private _selectRowOnClick = undefined;\n\n constructor(readonly columnId: string, private defaults: ColumnModel.Defaults) {\n this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, (component, column) => {\n component.headerText = column.getHeaderText();\n });\n }\n\n @Memoize()\n getHeaderText(): string {\n return this.getColumnTextProperties()?.headerText() || this.getDefaultHeaderText();\n }\n\n protected getDefaultHeaderText() {\n return this.columnId;\n }\n\n @Memoize()\n getColumnTextProperties(): ColumnTextProperties {\n return this._columnTextProperties || this.defaults.getColumnTextProperties(this);\n }\n\n textProperties(columnTextProperties: ColumnTextProperties): this {\n this._columnTextProperties = columnTextProperties;\n return this;\n }\n\n protected configureHeaderRenderer<C>(config: CellHeaderPortalRef<Row, any>): void {\n this._columnHeaderPortalRef = config;\n }\n\n protected configureCellRenderer<C>(config: CellRendererPortalRef<Row, any>): void {\n this._cellRendererPortalRef = config;\n }\n\n protected configureCellEditor<E>(cellEditor: CellEditorPortalRef<Row, E>): void {\n this._cellEditorPortalRef = cellEditor;\n }\n\n cellHeaderRenderer<C>(componentType: ComponentType<C>, initialiser: (component: C, column: ColumnModel<Row>) => void): this {\n this.configureHeaderRenderer(new CellHeaderPortalRef<Row, C>(componentType, initialiser));\n return this;\n }\n\n hasEditorPortal() {\n return !!this._cellEditorPortalRef;\n }\n\n attachHeaderCell(host: any) {\n this._columnHeaderPortalRef.initialiseHost(host, this);\n }\n\n attachCell(host: any) {\n this._cellRendererPortalRef.initialiseHost(host, this);\n if (this.hasEditorPortal()) {\n this._cellEditorPortalRef.initialiseHost(host, this);\n }\n }\n\n onHeaderAttached(host: TableHeaderCellRendererComponent, component: any) {\n this._columnHeaderPortalRef.onPortalAttached(host, component);\n }\n\n onRendererAttached(host: TableCellRendererComponent<Row>, component: any) {\n this._cellRendererPortalRef.onPortalAttached(host, component);\n }\n\n // @Trace()\n onEditorAttached(host: TableCellRendererComponent<Row>, component: any) {\n this._cellEditorPortalRef.onPortalAttached(host, component);\n }\n\n updatePortalContent(host: TableCellRendererComponent<Row>) {\n this._cellRendererPortalRef.pushState(host);\n }\n\n protected selectRowOnClick(selectOnRowClick: boolean): this {\n this._selectRowOnClick = selectOnRowClick;\n return this;\n }\n\n isRowSelectionEnabled(): boolean | undefined {\n return this._selectRowOnClick;\n }\n\n isRowSelectionExplicitlyEnabled(): boolean {\n return this._selectRowOnClick === true;\n }\n\n isRowSelectionExplicitlyDisabled(): boolean {\n return this._selectRowOnClick === false;\n }\n}\n\nexport namespace ColumnModel {\n export interface Defaults {\n getColumnTextProperties(columnModel: ColumnModel<any>): ColumnTextProperties;\n }\n}\n\n\nexport class PropertyColumnModel<Row, P extends Types.ValuePropertiesOf<Row>> extends ColumnModel<Row> {\n\n\n private _format: (value: Row[P]) => any = (value) => value;\n\n constructor(id: string, readonly property: P, defaults: ColumnModel.Defaults) {\n super(id, defaults);\n this.cellRenderer(DefaultCellRendererComponent);\n }\n\n cellRenderer<E extends CellRenderer<Row[P]>>(componentType: ComponentType<E>, options?: CellRendererOptions<Row, E>): this\n cellRenderer<E extends CellRenderer<Row[P]>>(componentType: ComponentType<E>, onComponentInit?: OnComponentInit<E>): this\n cellRenderer<E extends CellRenderer<Row[P]>>(componentType: ComponentType<E>, onComponentInitOrOptions?: CellRendererOptions<Row, E> | OnComponentInit<E>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {\n if (firstTime) {\n if (_.isFunction(onComponentInitOrOptions)) {\n onComponentInitOrOptions(component);\n } else {\n if (_.isFunction(onComponentInitOrOptions?.onComponentInit)) {\n onComponentInitOrOptions.onComponentInit(component);\n }\n }\n }\n component.value = this._format(rowData.row[this.property]);\n\n if (!_.isFunction(onComponentInitOrOptions) && _.isFunction(onComponentInitOrOptions?.onRowUpdate)) {\n onComponentInitOrOptions.onRowUpdate(component, rowData.row);\n }\n }));\n return this;\n }\n\n\n mutableCellRenderer<E extends MutableCellRenderer<Row[P]>>(componentType: ComponentType<E>, options: MutableCellRendererOptions<Row, E, P>): this {\n\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {\n\n // keep a local copy most recent row value so it's available to teh\n // edit callback without having to add/remove subscribers all the time.\n component[CELL_RENDERER_COMPONENT_ROW_CACHE]= rowData.row;\n let disableEditCallback = false;\n\n if (firstTime) {\n if (_.isFunction(options?.onComponentInit)) {\n options.onComponentInit(component);\n }\n // install our edit callback\n component.onValueEdited((is, was) => {\n if (!disableEditCallback) {\n options.onValueEdit(component[CELL_RENDERER_COMPONENT_ROW_CACHE], is, was);\n }\n });\n\n }\n\n // now push the value the component and disable the callback just incase the component misbehaves\n // and fires a value change during the operation.\n disableEditCallback = true;\n component.value = rowData.row[this.property];\n disableEditCallback = false;\n\n if (!_.isFunction(options) && _.isFunction(options?.onRowUpdate)) {\n options.onRowUpdate(component, rowData.row);\n }\n\n }));\n return this;\n }\n\n cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, validators?: Validator<Row[P]>[], initialiseComponent?: (component: E) => void): this\n cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, initialiseComponent?: (component: E) => void): this\n cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, validatorsOrInitialiser?: Validator<Row[P]>[] | ((component: E) => void), onComponentInit?: (component: E) => void): this {\n const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;\n const initialiser = _.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : onComponentInit;\n this.configureCellEditor(new CellEditorPortalRef(editor, (component: E, editSession: EditSession<Row>) => {\n const formValueModel = editSession.form.pluck(this.property);\n if (validators) {\n formValueModel.validateUsing(validators);\n }\n component.valueModel = formValueModel;\n if (initialiser) {\n initialiser(component);\n }\n }));\n return this;\n }\n\n format(formatter: (value: Row[P]) => any): this {\n assert.isFunction(formatter);\n this._format = formatter;\n return this;\n }\n\n public selectRowOnClick(selectOnRowClick: boolean): this {\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport class ListPropertyColumnModel<Row, P extends Types.ArrayPropertiesOf<Row>> extends ColumnModel<Row> {\n\n private _format: (value: Types.ArrayElementType<Row, P>[]) => any = (value) => value.map(v => v?.toString()).join(', ');\n\n constructor(id: string, readonly property: P, defaults: ColumnModel.Defaults) {\n super(id, defaults);\n this.cellRenderer(DefaultCellRendererComponent);\n }\n\n cellRenderer(componentType: ComponentType<{ value: Types.ArrayElementType<Row, P>[] }>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData) => {\n component.value = this._format(rowData.row[this.property]);\n }));\n return this;\n }\n\n cellEditor<C extends CellListEditorComponent<Types.ArrayElementType<Row, P>>>(editor: ComponentType<C>, validators?: Validator<Types.ArrayElementType<Row, P>[]>[], initialiseComponent?: (component: C) => void): this\n cellEditor<C extends CellListEditorComponent<Types.ArrayElementType<Row, P>>>(editor: ComponentType<C>, initialiseComponent?: (component: C) => void): this\n cellEditor<C extends CellListEditorComponent<Types.ArrayElementType<Row, P>>>(editor: ComponentType<C>, validatorsOrInitialiser?: Validator<Types.ArrayElementType<Row, P>[]>[] | ((component: C) => void), initialiseComponent?: (component: C) => void): this {\n const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;\n const initialiser = _.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;\n\n this.configureCellEditor(new CellEditorPortalRef(editor, (component: C, editSession: EditSession<Row>) => {\n const formListModel = editSession.form.pluckList(this.property);\n if (validators) {\n formListModel.validateUsing(validators);\n }\n component.listModel = formListModel;\n if (initialiser) {\n initialiser(component);\n }\n }));\n return this;\n }\n\n format(formatter: (value: Types.ArrayElementType<Row, P>[]) => any): this {\n assert.isFunction(formatter);\n this._format = formatter;\n return this;\n }\n\n public selectRowOnClick(selectOnRowClick: boolean): this {\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport class CustomValueColumnModel<Row, V> extends ColumnModel<Row> {\n constructor(columnId: string, defaults: ColumnModel.Defaults, private getValue: (row: Row) => V) {\n super(columnId, defaults);\n this.cellRenderer(DefaultCellRendererComponent);\n }\n\n cellRenderer<C extends { value: V }>(componentType: ComponentType<C>, onComponentInitOrOptions?: CellRendererOptions<Row, C> | OnComponentInit<C>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {\n if (firstTime) {\n if (_.isFunction(onComponentInitOrOptions)) {\n onComponentInitOrOptions(component);\n } else {\n if (_.isFunction(onComponentInitOrOptions?.onComponentInit)) {\n onComponentInitOrOptions.onComponentInit(component);\n }\n }\n }\n component.value = this.getValue(rowData.row);\n\n if (!_.isFunction(onComponentInitOrOptions) && _.isFunction(onComponentInitOrOptions?.onRowUpdate)) {\n onComponentInitOrOptions.onRowUpdate(component, rowData.row);\n }\n }));\n return this;\n }\n\n public selectRowOnClick(selectOnRowClick: boolean): this {\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport class EditorControlColumnModel<Row> extends ColumnModel<Row> {\n\n constructor(columnId: string, saveCommand: UnaryCommand<DirtyTrackingForm<Row>, boolean>, defaults: ColumnModel.Defaults) {\n super(columnId, defaults);\n this.cellRenderer(EditRowControls);\n }\n\n cellRenderer(componentType: ComponentType<{ row: Row, editSession: EditSession<Row>, editRowCommand: Command<void> }>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData: RowData<Row>) => {\n component.row = rowData.row;\n component.editSession = rowData.editSession;\n component.editRowCommand = rowData.editRowCommand;\n }));\n return this;\n }\n\n protected getDefaultHeaderText(): string {\n return '';\n }\n}\n\nexport class CustomTemplateColumnModel<Row> extends ColumnModel<Row> {\n private readonly config = new TemplateCellRendererPortalRef<Row>();\n\n constructor(columnId: string, defaults: ColumnModel.Defaults) {\n super(columnId, defaults);\n this.configureCellRenderer(this.config);\n }\n\n setTemplate(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, fillCell: boolean, padChild: boolean) {\n this.config.registerPortal(templateRef, viewContainer, fillCell, padChild);\n }\n\n public selectRowOnClick(selectOnRowClick: boolean): this {\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport class SelectionColumnModel<Row> extends ColumnModel<Row> {\n\n private _enableHeaderControls = true;\n\n constructor(columnId: string, defaults: ColumnModel.Defaults, private readonly selectionModel: SelectionModel<Row>) {\n super(columnId, defaults);\n this.selectOnRowClick(false);\n if (selectionModel instanceof MultipleSelectionModel) {\n this.cellHeaderRenderer(SelectHeaderCellRendererComponent, (component) => {\n component.selectionModel = selectionModel;\n component.enableHeaderControls = this._enableHeaderControls;\n });\n }\n this.configureCellRenderer(new ComponentCellRendererPortalRef(SelectCellRendererComponent, (component, rowData: RowData<Row>) => {\n component.row = rowData.row;\n component.selectionModel = selectionModel;\n }));\n }\n\n protected getDefaultHeaderText(): string {\n return '';\n }\n\n isRowSelectionEnabledByDefault(): boolean | undefined {\n return this.isRowSelectionExplicitlyEnabled();\n }\n\n selectOnRowClick(selectOnRowClick: boolean): this {\n // note we're using different method name as the selection column treats this\n // state as the default for all columns.\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n enableHeaderControls(enable: boolean): this {\n this._enableHeaderControls = enable;\n return this;\n }\n\n selectRow(row: Row) {\n this.selectionModel.selectCommand.execute(row);\n }\n}\n\n\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=mutable-cell-renderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutable-cell-renderer.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/mutable-cell-renderer.ts"],"names":[],"mappings":"","sourcesContent":["import { CellRenderer } from './cell-renderer';\nimport { Disposable } from '@coolon/pectin';\n\nexport interface MutableCellRenderer<T> extends CellRenderer<T> {\n value: T;\n\n onValueEdited(callback: (is: T, was: T) => void): Disposable;\n}\n"]}
|