@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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/tabs'), require('@angular/platform-browser/animations'), require('@angular/cdk/portal'), require('@angular/cdk/scrolling'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/icon'), require('@angular/material/table'), require('@
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/tabs', '@angular/platform-browser/animations', '@angular/cdk/portal', '@angular/cdk/scrolling', '@angular/material/button', '@angular/material/checkbox', '@angular/material/icon', '@angular/material/table', '@
|
|
4
|
-
(global = global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.tabs, global.ng.platformBrowser.animations, global.ng.cdk.portal, global.ng.cdk.scrolling, global.ng.material.button, global.ng.material.checkbox, global.ng.material.icon, global.ng.material.table, global.
|
|
5
|
-
}(this, (function (exports, common, core, forms, formField, input, select, tabs, animations, portal, scrolling, button, checkbox, icon, table,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/tabs'), require('@angular/platform-browser/animations'), require('@angular/cdk/portal'), require('@angular/cdk/scrolling'), require('@angular/material/autocomplete'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/icon'), require('@angular/material/menu'), require('@angular/material/table'), require('@angular/material/tooltip'), require('@fortawesome/angular-fontawesome'), require('@fortawesome/free-solid-svg-icons'), require('@coolon/pectin'), require('@typescript-plus/fast-memoize-decorator/dist/src'), require('lodash'), require('typescript-string-enums'), require('@coolon/typescript-utilities'), require('immer'), require('@angular/flex-layout'), require('@angular/material/dialog'), require('@angular/router'), require('@angular/cdk/overlay'), require('resize-observer-polyfill'), require('@angular/material/progress-spinner'), require('@angular/material/list'), require('@typescript-plus/fast-memoize-decorator'), require('reflect-metadata'), require('@angular/animations'), require('rxjs')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/tabs', '@angular/platform-browser/animations', '@angular/cdk/portal', '@angular/cdk/scrolling', '@angular/material/autocomplete', '@angular/material/button', '@angular/material/checkbox', '@angular/material/icon', '@angular/material/menu', '@angular/material/table', '@angular/material/tooltip', '@fortawesome/angular-fontawesome', '@fortawesome/free-solid-svg-icons', '@coolon/pectin', '@typescript-plus/fast-memoize-decorator/dist/src', 'lodash', 'typescript-string-enums', '@coolon/typescript-utilities', 'immer', '@angular/flex-layout', '@angular/material/dialog', '@angular/router', '@angular/cdk/overlay', 'resize-observer-polyfill', '@angular/material/progress-spinner', '@angular/material/list', '@typescript-plus/fast-memoize-decorator', 'reflect-metadata', '@angular/animations', 'rxjs'], factory) :
|
|
4
|
+
(global = global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.tabs, global.ng.platformBrowser.animations, global.ng.cdk.portal, global.ng.cdk.scrolling, global.ng.material.autocomplete, global.ng.material.button, global.ng.material.checkbox, global.ng.material.icon, global.ng.material.menu, global.ng.material.table, global.ng.material.tooltip, global.angularFontawesome, global.freeSolidSvgIcons, global.pectin, global.src, global.___default, global.typescriptStringEnums, global.typescriptUtilities, global.produce, global.ng.flexLayout, global.ng.material.dialog, global.ng.router, global.ng.cdk.overlay, global.ResizeObserver, global.ng.material.progressSpinner, global.ng.material.list, global.fastMemoizeDecorator, null, global.ng.animations, global.rxjs));
|
|
5
|
+
}(this, (function (exports, common, core, forms, formField, input, select, tabs, animations, portal, scrolling, autocomplete, button, checkbox, icon, menu, table, tooltip, angularFontawesome, freeSolidSvgIcons, pectin, src, ___default, typescriptStringEnums, typescriptUtilities, produce, flexLayout, dialog, router, overlay, ResizeObserver, progressSpinner, list, fastMemoizeDecorator, reflectMetadata, animations$1, rxjs) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var ___default__default = 'default' in ___default ? ___default['default'] : ___default;
|
|
8
8
|
produce = produce && Object.prototype.hasOwnProperty.call(produce, 'default') ? produce['default'] : produce;
|
|
@@ -578,13 +578,501 @@
|
|
|
578
578
|
core.Component({
|
|
579
579
|
selector: 'aup-card-container',
|
|
580
580
|
template: "<div class=\"card-container\">\n <ng-content></ng-content>\n\n <div class=\"add-card-container\" *ngIf=\"addCardCommand.enabled.value\" [pectinCommand]=\"addCardCommand\">\n <aup-icon icon=\"mat:add\"></aup-icon>\n </div>\n\n <div class=\"add-card-template\" *ngIf=\"addCardTemplate\">\n <ng-container [ngTemplateOutlet]=\"addCardTemplate\"></ng-container>\n </div>\n\n</div>\n",
|
|
581
|
-
styles: [":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white}.router-outlet-container>*{position:absolute;top:0;left:0;bottom:0;right:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context{max-width:95vw!important;max-height:95vh!important}.dialog-interaction-context mat-dialog-container{max-width:95vw!important;max-height:95vh!important;padding:0}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}.aup-input-component.dense mat-form-field .mat-form-field-infix{border-top:none}.aup-input-component.dense mat-form-field .mat-form-field-flex{padding-top:0}.aup-input-component.dense mat-form-field .mat-form-field-wrapper{padding-bottom:0;border-bottom:0}.aup-input-component.dense mat-form-field .mat-form-field-underline{bottom:0}.aup-input-component.dense mat-form-field.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label-wrapper{display:none}aup-table-cell-renderer>.aup-input-component .mat-form-field-flex{padding-top:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-infix{width:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-label-wrapper{display:none}aup-table{--default-column-gap:var(--column-gap, 24px);--resolved-row-hover-background-color:var(--row-hover-background-color, rgba(0, 0, 0, 0.05))}aup-table .mat-table td.mat-cell:first-of-type,aup-table .mat-table td.mat-footer-cell:first-of-type,aup-table .mat-table th.mat-header-cell:first-of-type{padding-left:0}aup-table .mat-table tr.enable-hover:hover{background-color:var(--resolved-row-hover-background-color)}aup-table .mat-table td.enable-cursor{cursor:pointer}aup-table aup-table-cell-renderer,aup-table aup-table-header-cell-renderer{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%;min-height:47px}aup-table aup-table-cell-renderer.first-column,aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer.first-column,aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}aup-table aup-table-cell-renderer.fillCell{justify-content:stretch;padding-left:0!important}aup-table aup-table-cell-renderer.padChild>:first-child{padding-left:var(--default-column-gap);flex:1}:host{--resolved-card-gap:var(--card-gap, 16px);--resolved-card-width:var(--card-width, 300px);--resolved-card-height:var(--card-height, auto);--resolved-card-min-height:var(--card-min-height, auto);--resolved-card-background:var(--card-background, #fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(0,var(--resolved-card-height)));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap));max-width:100%}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:rgba(255,255,255,.8);transition:280ms cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:280ms cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}.add-card-container:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}"]
|
|
581
|
+
styles: [":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white;--command-face-icon-gap:8px;--aup-icon-width:24px;--aup-fa-icon-width:18px}.router-outlet-container>*{position:absolute;top:0;left:0;bottom:0;right:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context{max-width:95vw!important;max-height:95vh!important}.dialog-interaction-context mat-dialog-container{max-width:95vw!important;max-height:95vh!important;padding:0}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}.aup-input-component.dense mat-form-field .mat-form-field-infix{border-top:none}.aup-input-component.dense mat-form-field .mat-form-field-flex{padding-top:0}.aup-input-component.dense mat-form-field .mat-form-field-wrapper{padding-bottom:0;border-bottom:0}.aup-input-component.dense mat-form-field .mat-form-field-underline{bottom:0}.aup-input-component.dense mat-form-field.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label-wrapper{display:none}.aup-input-component.dense mat-form-field.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(0)}aup-table-cell-renderer>.aup-input-component .mat-form-field-flex{padding-top:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-infix{width:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-label-wrapper{display:none}aup-table{--default-column-gap:var(--column-gap, 24px);--resolved-row-hover-background-color:var(--row-hover-background-color, rgba(0, 0, 0, 0.05))}aup-table .mat-table td.mat-cell:first-of-type,aup-table .mat-table td.mat-footer-cell:first-of-type,aup-table .mat-table th.mat-header-cell:first-of-type{padding-left:0}aup-table .mat-table tr.enable-hover:hover{background-color:var(--resolved-row-hover-background-color)}aup-table .mat-table td.enable-cursor{cursor:pointer}aup-table aup-table-cell-renderer,aup-table aup-table-header-cell-renderer{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%;min-height:47px}aup-table aup-table-cell-renderer.first-column,aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer.first-column,aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}aup-table aup-table-cell-renderer.fillCell{justify-content:stretch;padding-left:0!important}aup-table aup-table-cell-renderer.padChild>:first-child{padding-left:var(--default-column-gap);flex:1}aup-icon{--fa-icon-offset:calc((var(--aup-icon-width) - var(--aup-fa-icon-width)) / 2);position:relative}aup-icon fa-icon .svg-inline--fa{position:absolute;top:var(--fa-icon-offset);left:var(--fa-icon-offset);width:var(--aup-fa-icon-width)!important;height:var(--aup-fa-icon-width)!important}.mat-menu-panel aup-icon .svg-inline--fa{opacity:.54}:host{--resolved-card-gap:var(--card-gap, 16px);--resolved-card-width:var(--card-width, 300px);--resolved-card-height:var(--card-height, auto);--resolved-card-min-height:var(--card-min-height, auto);--resolved-card-background:var(--card-background, #fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(0,var(--resolved-card-height)));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap));max-width:100%}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:rgba(255,255,255,.8);transition:280ms cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:280ms cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}.add-card-container:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}"]
|
|
582
582
|
}),
|
|
583
583
|
__metadata("design:paramtypes", [])
|
|
584
584
|
], CardContainerComponent);
|
|
585
585
|
return CardContainerComponent;
|
|
586
586
|
}(DisposableComponent));
|
|
587
587
|
|
|
588
|
+
|
|
589
|
+
(function (CommandFace) {
|
|
590
|
+
var Position;
|
|
591
|
+
(function (Position) {
|
|
592
|
+
Position["START"] = "start";
|
|
593
|
+
Position["END"] = "end";
|
|
594
|
+
})(Position = CommandFace.Position || (CommandFace.Position = {}));
|
|
595
|
+
var Adapter = /** @class */ (function () {
|
|
596
|
+
function Adapter(face) {
|
|
597
|
+
this.face = face;
|
|
598
|
+
}
|
|
599
|
+
Object.defineProperty(Adapter.prototype, "text", {
|
|
600
|
+
get: function () {
|
|
601
|
+
return ___default__default.isFunction(this.face.text) ? this.face.text() : undefined;
|
|
602
|
+
},
|
|
603
|
+
enumerable: true,
|
|
604
|
+
configurable: true
|
|
605
|
+
});
|
|
606
|
+
Object.defineProperty(Adapter.prototype, "icon", {
|
|
607
|
+
get: function () {
|
|
608
|
+
return ___default__default.isFunction(this.face.icon) ? this.face.icon() : undefined;
|
|
609
|
+
},
|
|
610
|
+
enumerable: true,
|
|
611
|
+
configurable: true
|
|
612
|
+
});
|
|
613
|
+
Object.defineProperty(Adapter.prototype, "iconPosition", {
|
|
614
|
+
get: function () {
|
|
615
|
+
return ___default__default.isFunction(this.face.iconPosition) ? this.face.iconPosition() : undefined;
|
|
616
|
+
},
|
|
617
|
+
enumerable: true,
|
|
618
|
+
configurable: true
|
|
619
|
+
});
|
|
620
|
+
Object.defineProperty(Adapter.prototype, "tooltip", {
|
|
621
|
+
get: function () {
|
|
622
|
+
return ___default__default.isFunction(this.face.tooltip) ? this.face.tooltip() : undefined;
|
|
623
|
+
},
|
|
624
|
+
enumerable: true,
|
|
625
|
+
configurable: true
|
|
626
|
+
});
|
|
627
|
+
Object.defineProperty(Adapter.prototype, "iconPositionStart", {
|
|
628
|
+
get: function () {
|
|
629
|
+
return this.iconPosition === CommandFace.Position.START;
|
|
630
|
+
},
|
|
631
|
+
enumerable: true,
|
|
632
|
+
configurable: true
|
|
633
|
+
});
|
|
634
|
+
Object.defineProperty(Adapter.prototype, "iconPositionEnd", {
|
|
635
|
+
get: function () {
|
|
636
|
+
return this.iconPosition === CommandFace.Position.END;
|
|
637
|
+
},
|
|
638
|
+
enumerable: true,
|
|
639
|
+
configurable: true
|
|
640
|
+
});
|
|
641
|
+
Object.defineProperty(Adapter.prototype, "destructive", {
|
|
642
|
+
get: function () {
|
|
643
|
+
return ___default__default.isFunction(this.face.destructive) ? this.face.destructive() : false;
|
|
644
|
+
},
|
|
645
|
+
enumerable: true,
|
|
646
|
+
configurable: true
|
|
647
|
+
});
|
|
648
|
+
__decorate([
|
|
649
|
+
src.Memoize(),
|
|
650
|
+
__metadata("design:type", Object),
|
|
651
|
+
__metadata("design:paramtypes", [])
|
|
652
|
+
], Adapter.prototype, "text", null);
|
|
653
|
+
__decorate([
|
|
654
|
+
src.Memoize(),
|
|
655
|
+
__metadata("design:type", Object),
|
|
656
|
+
__metadata("design:paramtypes", [])
|
|
657
|
+
], Adapter.prototype, "icon", null);
|
|
658
|
+
__decorate([
|
|
659
|
+
src.Memoize(),
|
|
660
|
+
__metadata("design:type", Object),
|
|
661
|
+
__metadata("design:paramtypes", [])
|
|
662
|
+
], Adapter.prototype, "iconPosition", null);
|
|
663
|
+
__decorate([
|
|
664
|
+
src.Memoize(),
|
|
665
|
+
__metadata("design:type", Object),
|
|
666
|
+
__metadata("design:paramtypes", [])
|
|
667
|
+
], Adapter.prototype, "tooltip", null);
|
|
668
|
+
__decorate([
|
|
669
|
+
src.Memoize(),
|
|
670
|
+
__metadata("design:type", Boolean),
|
|
671
|
+
__metadata("design:paramtypes", [])
|
|
672
|
+
], Adapter.prototype, "iconPositionStart", null);
|
|
673
|
+
__decorate([
|
|
674
|
+
src.Memoize(),
|
|
675
|
+
__metadata("design:type", Boolean),
|
|
676
|
+
__metadata("design:paramtypes", [])
|
|
677
|
+
], Adapter.prototype, "iconPositionEnd", null);
|
|
678
|
+
__decorate([
|
|
679
|
+
src.Memoize(),
|
|
680
|
+
__metadata("design:type", Boolean),
|
|
681
|
+
__metadata("design:paramtypes", [])
|
|
682
|
+
], Adapter.prototype, "destructive", null);
|
|
683
|
+
return Adapter;
|
|
684
|
+
}());
|
|
685
|
+
CommandFace.Adapter = Adapter;
|
|
686
|
+
})(exports.CommandFace || (exports.CommandFace = {}));
|
|
687
|
+
|
|
688
|
+
var CommandContainer = /** @class */ (function (_super) {
|
|
689
|
+
__extends(CommandContainer, _super);
|
|
690
|
+
function CommandContainer() {
|
|
691
|
+
var _this = _super.call(this) || this;
|
|
692
|
+
_this._commandRegistrations = new pectin.MutableListModel();
|
|
693
|
+
return _this;
|
|
694
|
+
}
|
|
695
|
+
Object.defineProperty(CommandContainer.prototype, "commandRegistrations", {
|
|
696
|
+
get: function () {
|
|
697
|
+
return this._commandRegistrations.readonly;
|
|
698
|
+
},
|
|
699
|
+
enumerable: true,
|
|
700
|
+
configurable: true
|
|
701
|
+
});
|
|
702
|
+
CommandContainer.prototype.registerCommand = function (command, face) {
|
|
703
|
+
var _this = this;
|
|
704
|
+
var registration = { command: command, faceAdapter: new exports.CommandFace.Adapter(face) };
|
|
705
|
+
this._commandRegistrations.push(registration);
|
|
706
|
+
return pectin.Disposable.disposableThatRuns(function () { return _this._commandRegistrations.remove(registration); });
|
|
707
|
+
};
|
|
708
|
+
CommandContainer.prototype.getDefaultIconPosition = function () {
|
|
709
|
+
return exports.CommandFace.Position.START;
|
|
710
|
+
};
|
|
711
|
+
return CommandContainer;
|
|
712
|
+
}(pectin.GarbageCollector));
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
*
|
|
716
|
+
*/
|
|
717
|
+
var CommandBarComponent = /** @class */ (function (_super) {
|
|
718
|
+
__extends(CommandBarComponent, _super);
|
|
719
|
+
function CommandBarComponent() {
|
|
720
|
+
return _super.call(this) || this;
|
|
721
|
+
}
|
|
722
|
+
CommandBarComponent_1 = CommandBarComponent;
|
|
723
|
+
CommandBarComponent.prototype.ngOnInit = function () {
|
|
724
|
+
};
|
|
725
|
+
CommandBarComponent.prototype.getButtonColor = function (registration) {
|
|
726
|
+
return registration.faceAdapter.destructive ? 'warn' : undefined;
|
|
727
|
+
};
|
|
728
|
+
var CommandBarComponent_1;
|
|
729
|
+
CommandBarComponent = CommandBarComponent_1 = __decorate([
|
|
730
|
+
core.Component({
|
|
731
|
+
selector: 'aup-command-bar',
|
|
732
|
+
template: "\n <ng-container *ngFor=\"let registration of commandRegistrations.value\">\n <button *ngIf=\"registration.faceAdapter.icon && !registration.faceAdapter.text\"\n mat-icon-button\n [color]=\"getButtonColor(registration)\"\n [pectinCommand]=\"registration.command\"\n [matTooltip]=\"registration.faceAdapter.tooltip\"\n >\n <aup-command-face [face]=\"registration.faceAdapter.face\"></aup-command-face>\n </button>\n <button *ngIf=\"registration.faceAdapter.text\"\n [color]=\"getButtonColor(registration)\"\n mat-button\n [pectinCommand]=\"registration.command\"\n [matTooltip]=\"registration.tooltip\"\n >\n <aup-command-face [face]=\"registration.faceAdapter.face\"></aup-command-face>\n </button>\n </ng-container>\n ",
|
|
733
|
+
providers: [{ provide: CommandContainer, useExisting: core.forwardRef(function () { return CommandBarComponent_1; }) }],
|
|
734
|
+
styles: [":host {\n display: inline-flex;\n flex-direction: row;\n align-items: center;\n }"]
|
|
735
|
+
}),
|
|
736
|
+
__metadata("design:paramtypes", [])
|
|
737
|
+
], CommandBarComponent);
|
|
738
|
+
return CommandBarComponent;
|
|
739
|
+
}(CommandContainer));
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
*
|
|
743
|
+
*/
|
|
744
|
+
var CommandFaceComponent = /** @class */ (function (_super) {
|
|
745
|
+
__extends(CommandFaceComponent, _super);
|
|
746
|
+
function CommandFaceComponent(commandContainer) {
|
|
747
|
+
var _this = _super.call(this) || this;
|
|
748
|
+
_this.commandContainer = commandContainer;
|
|
749
|
+
_this.faceModel = new pectin.MutableValueModel();
|
|
750
|
+
_this.ignoreIcon = false;
|
|
751
|
+
_this.ignoreText = false;
|
|
752
|
+
_this.includeMissingIconInLayout = false;
|
|
753
|
+
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
754
|
+
// overkill /c: when all you have is a hammer...
|
|
755
|
+
var faceAdapter = chain(_this.faceModel).map(function (face) { return new exports.CommandFace.Adapter(face); });
|
|
756
|
+
_this.iconModel = faceAdapter.pluck('icon');
|
|
757
|
+
_this.textModel = faceAdapter.pluck('text');
|
|
758
|
+
_this.positionModel = faceAdapter.pluck('iconPosition');
|
|
759
|
+
_this.destructiveModel = faceAdapter.pluck('destructive');
|
|
760
|
+
return _this;
|
|
761
|
+
}
|
|
762
|
+
Object.defineProperty(CommandFaceComponent.prototype, "requiresMissingIconInLayout", {
|
|
763
|
+
get: function () {
|
|
764
|
+
return this.includeMissingIconInLayout && !this.iconModel.value;
|
|
765
|
+
},
|
|
766
|
+
enumerable: true,
|
|
767
|
+
configurable: true
|
|
768
|
+
});
|
|
769
|
+
CommandFaceComponent.prototype.ngOnInit = function () {
|
|
770
|
+
};
|
|
771
|
+
Object.defineProperty(CommandFaceComponent.prototype, "iconPosition", {
|
|
772
|
+
get: function () {
|
|
773
|
+
var _a, _b, _c;
|
|
774
|
+
return (_c = (_a = this.positionModel.value) !== null && _a !== void 0 ? _a : (_b = this.commandContainer) === null || _b === void 0 ? void 0 : _b.getDefaultIconPosition()) !== null && _c !== void 0 ? _c : exports.CommandFace.Position.START;
|
|
775
|
+
},
|
|
776
|
+
enumerable: true,
|
|
777
|
+
configurable: true
|
|
778
|
+
});
|
|
779
|
+
Object.defineProperty(CommandFaceComponent.prototype, "shouldIncludeIcon", {
|
|
780
|
+
get: function () {
|
|
781
|
+
return (!this.ignoreIcon && this.iconModel.value) || this.includeMissingIconInLayout;
|
|
782
|
+
},
|
|
783
|
+
enumerable: true,
|
|
784
|
+
configurable: true
|
|
785
|
+
});
|
|
786
|
+
Object.defineProperty(CommandFaceComponent.prototype, "iconStart", {
|
|
787
|
+
get: function () {
|
|
788
|
+
return this.shouldIncludeIcon && this.iconPosition === exports.CommandFace.Position.START;
|
|
789
|
+
},
|
|
790
|
+
enumerable: true,
|
|
791
|
+
configurable: true
|
|
792
|
+
});
|
|
793
|
+
Object.defineProperty(CommandFaceComponent.prototype, "iconEnd", {
|
|
794
|
+
get: function () {
|
|
795
|
+
return this.shouldIncludeIcon && this.iconPosition === exports.CommandFace.Position.END;
|
|
796
|
+
},
|
|
797
|
+
enumerable: true,
|
|
798
|
+
configurable: true
|
|
799
|
+
});
|
|
800
|
+
Object.defineProperty(CommandFaceComponent.prototype, "text", {
|
|
801
|
+
get: function () {
|
|
802
|
+
return this.ignoreText ? undefined : this.textModel.value;
|
|
803
|
+
},
|
|
804
|
+
enumerable: true,
|
|
805
|
+
configurable: true
|
|
806
|
+
});
|
|
807
|
+
Object.defineProperty(CommandFaceComponent.prototype, "destructive", {
|
|
808
|
+
get: function () {
|
|
809
|
+
return this.destructiveModel.value;
|
|
810
|
+
},
|
|
811
|
+
enumerable: true,
|
|
812
|
+
configurable: true
|
|
813
|
+
});
|
|
814
|
+
CommandFaceComponent.ctorParameters = function () { return [
|
|
815
|
+
{ type: CommandContainer, decorators: [{ type: core.Optional }] }
|
|
816
|
+
]; };
|
|
817
|
+
__decorate([
|
|
818
|
+
core.Input('face'), pectin.StoreInValueModel('faceModel'),
|
|
819
|
+
__metadata("design:type", Object)
|
|
820
|
+
], CommandFaceComponent.prototype, "_rawFace", void 0);
|
|
821
|
+
__decorate([
|
|
822
|
+
core.Input(),
|
|
823
|
+
__metadata("design:type", Object)
|
|
824
|
+
], CommandFaceComponent.prototype, "ignoreIcon", void 0);
|
|
825
|
+
__decorate([
|
|
826
|
+
core.Input(),
|
|
827
|
+
__metadata("design:type", Object)
|
|
828
|
+
], CommandFaceComponent.prototype, "ignoreText", void 0);
|
|
829
|
+
__decorate([
|
|
830
|
+
core.Input(),
|
|
831
|
+
__metadata("design:type", Object)
|
|
832
|
+
], CommandFaceComponent.prototype, "includeMissingIconInLayout", void 0);
|
|
833
|
+
__decorate([
|
|
834
|
+
core.HostBinding('class.hide-icon'),
|
|
835
|
+
__metadata("design:type", Object),
|
|
836
|
+
__metadata("design:paramtypes", [])
|
|
837
|
+
], CommandFaceComponent.prototype, "requiresMissingIconInLayout", null);
|
|
838
|
+
__decorate([
|
|
839
|
+
core.HostBinding('class.destructive'),
|
|
840
|
+
__metadata("design:type", Boolean),
|
|
841
|
+
__metadata("design:paramtypes", [])
|
|
842
|
+
], CommandFaceComponent.prototype, "destructive", null);
|
|
843
|
+
CommandFaceComponent = __decorate([
|
|
844
|
+
core.Component({
|
|
845
|
+
selector: 'aup-command-face',
|
|
846
|
+
template: "<aup-icon *ngIf=\"iconStart\" [icon]=\"iconModel.value\"></aup-icon>\n<span *ngIf=\"this.text\">{{this.text}}</span>\n<aup-icon *ngIf=\"iconEnd\" [icon]=\"iconModel.value\"></aup-icon>\n",
|
|
847
|
+
encapsulation: core.ViewEncapsulation.None,
|
|
848
|
+
styles: ["aup-command-face{--icon-gap:var(--command-face-icon-gap);display:inline-flex;flex-direction:row;align-items:center}aup-command-face *+*{margin-left:var(--icon-gap)}aup-command-face.hide-icon aup-icon{visibility:hidden}"]
|
|
849
|
+
}),
|
|
850
|
+
__param(0, core.Optional()),
|
|
851
|
+
__metadata("design:paramtypes", [CommandContainer])
|
|
852
|
+
], CommandFaceComponent);
|
|
853
|
+
return CommandFaceComponent;
|
|
854
|
+
}(DisposableComponent));
|
|
855
|
+
|
|
856
|
+
/**
|
|
857
|
+
*
|
|
858
|
+
*/
|
|
859
|
+
var CommandComponent = /** @class */ (function (_super) {
|
|
860
|
+
__extends(CommandComponent, _super);
|
|
861
|
+
function CommandComponent(commandContainer) {
|
|
862
|
+
var _this = _super.call(this) || this;
|
|
863
|
+
_this.commandContainer = commandContainer;
|
|
864
|
+
return _this;
|
|
865
|
+
}
|
|
866
|
+
CommandComponent.prototype.ngOnInit = function () {
|
|
867
|
+
this.registerDisposable(this.commandContainer.registerCommand(this.command, this.face));
|
|
868
|
+
};
|
|
869
|
+
CommandComponent.ctorParameters = function () { return [
|
|
870
|
+
{ type: CommandContainer }
|
|
871
|
+
]; };
|
|
872
|
+
__decorate([
|
|
873
|
+
core.Input(), pectin.TrackExternal(),
|
|
874
|
+
__metadata("design:type", pectin.Command)
|
|
875
|
+
], CommandComponent.prototype, "command", void 0);
|
|
876
|
+
__decorate([
|
|
877
|
+
core.Input(),
|
|
878
|
+
__metadata("design:type", Object)
|
|
879
|
+
], CommandComponent.prototype, "face", void 0);
|
|
880
|
+
CommandComponent = __decorate([
|
|
881
|
+
core.Component({
|
|
882
|
+
selector: 'aup-command',
|
|
883
|
+
template: ""
|
|
884
|
+
}),
|
|
885
|
+
__metadata("design:paramtypes", [CommandContainer])
|
|
886
|
+
], CommandComponent);
|
|
887
|
+
return CommandComponent;
|
|
888
|
+
}(DisposableComponent));
|
|
889
|
+
|
|
890
|
+
/**
|
|
891
|
+
*
|
|
892
|
+
*/
|
|
893
|
+
var PopupMenuRendererComponent = /** @class */ (function (_super) {
|
|
894
|
+
__extends(PopupMenuRendererComponent, _super);
|
|
895
|
+
function PopupMenuRendererComponent() {
|
|
896
|
+
var _this = _super.call(this) || this;
|
|
897
|
+
_this.xPosition = 'after';
|
|
898
|
+
_this.yPosition = 'below';
|
|
899
|
+
_this.commandExecuted = new core.EventEmitter();
|
|
900
|
+
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
901
|
+
var registrations = chain(_this.commandRegistrations);
|
|
902
|
+
var iconCount = registrations.select(function (r) { return !!r.faceAdapter.icon; }).count();
|
|
903
|
+
_this.hasMixedIcons = valueOf.all(iconCount.isGreaterThan(0), iconCount.doesNotEqual(registrations.length)).areTruthy();
|
|
904
|
+
return _this;
|
|
905
|
+
}
|
|
906
|
+
PopupMenuRendererComponent.prototype.ngOnInit = function () {
|
|
907
|
+
};
|
|
908
|
+
PopupMenuRendererComponent.prototype.getPopupMenuCommandFor = function (item) {
|
|
909
|
+
var _this = this;
|
|
910
|
+
var when = pectin.Dsl.disposeWith(this).when;
|
|
911
|
+
when(item.command.busy).becomesFalsey(function () {
|
|
912
|
+
_this.commandExecuted.emit();
|
|
913
|
+
});
|
|
914
|
+
return item.command;
|
|
915
|
+
};
|
|
916
|
+
PopupMenuRendererComponent.prototype.getButtonColor = function (registration) {
|
|
917
|
+
return registration.faceAdapter.destructive ? 'warn' : undefined;
|
|
918
|
+
};
|
|
919
|
+
__decorate([
|
|
920
|
+
core.Input(), pectin.TrackExternal(),
|
|
921
|
+
__metadata("design:type", pectin.ListModel)
|
|
922
|
+
], PopupMenuRendererComponent.prototype, "commandRegistrations", void 0);
|
|
923
|
+
__decorate([
|
|
924
|
+
core.Input(),
|
|
925
|
+
__metadata("design:type", String)
|
|
926
|
+
], PopupMenuRendererComponent.prototype, "xPosition", void 0);
|
|
927
|
+
__decorate([
|
|
928
|
+
core.Input(),
|
|
929
|
+
__metadata("design:type", String)
|
|
930
|
+
], PopupMenuRendererComponent.prototype, "yPosition", void 0);
|
|
931
|
+
__decorate([
|
|
932
|
+
core.Output(),
|
|
933
|
+
__metadata("design:type", Object)
|
|
934
|
+
], PopupMenuRendererComponent.prototype, "commandExecuted", void 0);
|
|
935
|
+
__decorate([
|
|
936
|
+
core.ViewChild(menu.MatMenu),
|
|
937
|
+
__metadata("design:type", menu.MatMenu)
|
|
938
|
+
], PopupMenuRendererComponent.prototype, "matMenu", void 0);
|
|
939
|
+
PopupMenuRendererComponent = __decorate([
|
|
940
|
+
core.Component({
|
|
941
|
+
selector: 'aup-popup-menu-renderer',
|
|
942
|
+
template: "<mat-menu [xPosition]=\"xPosition\" [yPosition]=\"yPosition\" >\n <button *ngFor=\"let registration of commandRegistrations.value\"\n mat-menu-item\n [pectinCommand]=\"getPopupMenuCommandFor(registration)\"\n >\n <aup-command-face [face]=\"registration.faceAdapter.face\" [includeMissingIconInLayout]=\"hasMixedIcons.value\"></aup-command-face>\n </button>\n</mat-menu>\n",
|
|
943
|
+
styles: [":host{display:inline-flex;flex-direction:row;align-items:center}"]
|
|
944
|
+
}),
|
|
945
|
+
__metadata("design:paramtypes", [])
|
|
946
|
+
], PopupMenuRendererComponent);
|
|
947
|
+
return PopupMenuRendererComponent;
|
|
948
|
+
}(DisposableComponent));
|
|
949
|
+
|
|
950
|
+
/**
|
|
951
|
+
*
|
|
952
|
+
*/
|
|
953
|
+
var AbstractPopupMenuComponent = /** @class */ (function (_super) {
|
|
954
|
+
__extends(AbstractPopupMenuComponent, _super);
|
|
955
|
+
function AbstractPopupMenuComponent(cdr) {
|
|
956
|
+
var _this = _super.call(this) || this;
|
|
957
|
+
_this.cdr = cdr;
|
|
958
|
+
_this.xPosition = 'after';
|
|
959
|
+
_this.yPosition = 'below';
|
|
960
|
+
return _this;
|
|
961
|
+
}
|
|
962
|
+
AbstractPopupMenuComponent.prototype.ngAfterViewInit = function () {
|
|
963
|
+
this.cdr.detectChanges();
|
|
964
|
+
};
|
|
965
|
+
Object.defineProperty(AbstractPopupMenuComponent.prototype, "matMenuComponent", {
|
|
966
|
+
get: function () {
|
|
967
|
+
var _a;
|
|
968
|
+
return (_a = this.popupMenu) === null || _a === void 0 ? void 0 : _a.matMenu;
|
|
969
|
+
},
|
|
970
|
+
enumerable: true,
|
|
971
|
+
configurable: true
|
|
972
|
+
});
|
|
973
|
+
AbstractPopupMenuComponent.prototype.closeMenu = function () {
|
|
974
|
+
this.menuTrigger.closeMenu();
|
|
975
|
+
};
|
|
976
|
+
AbstractPopupMenuComponent.prototype.getButtonColor = function (registration) {
|
|
977
|
+
return registration.faceAdapter.destructive ? 'warn' : undefined;
|
|
978
|
+
};
|
|
979
|
+
AbstractPopupMenuComponent.ctorParameters = function () { return [
|
|
980
|
+
{ type: core.ChangeDetectorRef }
|
|
981
|
+
]; };
|
|
982
|
+
__decorate([
|
|
983
|
+
core.Input(),
|
|
984
|
+
__metadata("design:type", String)
|
|
985
|
+
], AbstractPopupMenuComponent.prototype, "xPosition", void 0);
|
|
986
|
+
__decorate([
|
|
987
|
+
core.Input(),
|
|
988
|
+
__metadata("design:type", String)
|
|
989
|
+
], AbstractPopupMenuComponent.prototype, "yPosition", void 0);
|
|
990
|
+
__decorate([
|
|
991
|
+
core.ViewChild(PopupMenuRendererComponent),
|
|
992
|
+
__metadata("design:type", PopupMenuRendererComponent)
|
|
993
|
+
], AbstractPopupMenuComponent.prototype, "popupMenu", void 0);
|
|
994
|
+
__decorate([
|
|
995
|
+
core.ViewChild(menu.MatMenuTrigger),
|
|
996
|
+
__metadata("design:type", menu.MatMenuTrigger)
|
|
997
|
+
], AbstractPopupMenuComponent.prototype, "menuTrigger", void 0);
|
|
998
|
+
AbstractPopupMenuComponent = __decorate([
|
|
999
|
+
core.Component({
|
|
1000
|
+
selector: 'aup-abstract-popup-menu',
|
|
1001
|
+
template: ''
|
|
1002
|
+
}),
|
|
1003
|
+
__metadata("design:paramtypes", [core.ChangeDetectorRef])
|
|
1004
|
+
], AbstractPopupMenuComponent);
|
|
1005
|
+
return AbstractPopupMenuComponent;
|
|
1006
|
+
}(CommandContainer));
|
|
1007
|
+
|
|
1008
|
+
/**
|
|
1009
|
+
*
|
|
1010
|
+
*/
|
|
1011
|
+
var PopupMenuComponent = /** @class */ (function (_super) {
|
|
1012
|
+
__extends(PopupMenuComponent, _super);
|
|
1013
|
+
function PopupMenuComponent(cdr) {
|
|
1014
|
+
var _this = _super.call(this, cdr) || this;
|
|
1015
|
+
_this.faceModel = new pectin.MutableValueModel();
|
|
1016
|
+
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1017
|
+
var faceAdapterModel = chain(_this.faceModel).map(function (face) { return new exports.CommandFace.Adapter(face); });
|
|
1018
|
+
_this.faceTooltipModel = faceAdapterModel.pluck('tooltip');
|
|
1019
|
+
return _this;
|
|
1020
|
+
}
|
|
1021
|
+
PopupMenuComponent_1 = PopupMenuComponent;
|
|
1022
|
+
PopupMenuComponent.prototype.getTooltip = function () {
|
|
1023
|
+
return this.faceTooltipModel.value;
|
|
1024
|
+
};
|
|
1025
|
+
PopupMenuComponent.prototype.ngOnInit = function () {
|
|
1026
|
+
};
|
|
1027
|
+
var PopupMenuComponent_1;
|
|
1028
|
+
PopupMenuComponent.ctorParameters = function () { return [
|
|
1029
|
+
{ type: core.ChangeDetectorRef }
|
|
1030
|
+
]; };
|
|
1031
|
+
__decorate([
|
|
1032
|
+
core.Input(), pectin.StoreInValueModel('faceModel'),
|
|
1033
|
+
__metadata("design:type", Object)
|
|
1034
|
+
], PopupMenuComponent.prototype, "face", void 0);
|
|
1035
|
+
PopupMenuComponent = PopupMenuComponent_1 = __decorate([
|
|
1036
|
+
core.Component({
|
|
1037
|
+
selector: 'aup-popup-menu',
|
|
1038
|
+
template: "\n <!-- we can only render the button after th popup menu has initialised and rendered it's menu component -->\n <button *ngIf=\"matMenuComponent\" mat-icon-button [matMenuTriggerFor]=\"matMenuComponent\" [matTooltip]=\"getTooltip()\">\n <aup-command-face [face]=\"face\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer [commandRegistrations]=\"commandRegistrations\" [yPosition]=\"yPosition\"\n [xPosition]=\"xPosition\"\n (commandExecuted)=\"closeMenu()\"></aup-popup-menu-renderer>\n ",
|
|
1039
|
+
providers: [{ provide: CommandContainer, useExisting: core.forwardRef(function () { return PopupMenuComponent_1; }) }]
|
|
1040
|
+
}),
|
|
1041
|
+
__metadata("design:paramtypes", [core.ChangeDetectorRef])
|
|
1042
|
+
], PopupMenuComponent);
|
|
1043
|
+
return PopupMenuComponent;
|
|
1044
|
+
}(AbstractPopupMenuComponent));
|
|
1045
|
+
|
|
1046
|
+
/**
|
|
1047
|
+
*
|
|
1048
|
+
*/
|
|
1049
|
+
var MoreMenuComponent = /** @class */ (function (_super) {
|
|
1050
|
+
__extends(MoreMenuComponent, _super);
|
|
1051
|
+
function MoreMenuComponent(cdr) {
|
|
1052
|
+
var _this = _super.call(this, cdr) || this;
|
|
1053
|
+
_this.xPosition = "before"; // this should be the default unless overriden by the user.
|
|
1054
|
+
return _this;
|
|
1055
|
+
}
|
|
1056
|
+
MoreMenuComponent_1 = MoreMenuComponent;
|
|
1057
|
+
var MoreMenuComponent_1;
|
|
1058
|
+
MoreMenuComponent.ctorParameters = function () { return [
|
|
1059
|
+
{ type: core.ChangeDetectorRef }
|
|
1060
|
+
]; };
|
|
1061
|
+
__decorate([
|
|
1062
|
+
core.Input(),
|
|
1063
|
+
__metadata("design:type", String)
|
|
1064
|
+
], MoreMenuComponent.prototype, "tooltip", void 0);
|
|
1065
|
+
MoreMenuComponent = MoreMenuComponent_1 = __decorate([
|
|
1066
|
+
core.Component({
|
|
1067
|
+
selector: 'aup-more-menu',
|
|
1068
|
+
template: "\n <!-- we can only render the button after th popup menu has initialised and rendered it's menu component -->\n <button *ngIf=\"matMenuComponent\" mat-icon-button [matMenuTriggerFor]=\"matMenuComponent\" [matTooltip]=\"tooltip\">\n <mat-icon>more_vert</mat-icon>\n </button>\n <aup-popup-menu-renderer [commandRegistrations]=\"commandRegistrations\"\n [xPosition]=\"xPosition\"\n [yPosition]=\"yPosition\"\n (commandExecuted)=\"closeMenu()\"></aup-popup-menu-renderer>\n ",
|
|
1069
|
+
providers: [{ provide: CommandContainer, useExisting: core.forwardRef(function () { return MoreMenuComponent_1; }) }]
|
|
1070
|
+
}),
|
|
1071
|
+
__metadata("design:paramtypes", [core.ChangeDetectorRef])
|
|
1072
|
+
], MoreMenuComponent);
|
|
1073
|
+
return MoreMenuComponent;
|
|
1074
|
+
}(AbstractPopupMenuComponent));
|
|
1075
|
+
|
|
588
1076
|
var FocusContainerComponent = /** @class */ (function (_super) {
|
|
589
1077
|
__extends(FocusContainerComponent, _super);
|
|
590
1078
|
function FocusContainerComponent(focusManager) {
|
|
@@ -693,6 +1181,7 @@
|
|
|
693
1181
|
__extends(AbstractInputComponent, _super);
|
|
694
1182
|
function AbstractInputComponent() {
|
|
695
1183
|
var _this = _super.call(this) || this;
|
|
1184
|
+
_this.onValueEditedListeners = new pectin.EventListenerList();
|
|
696
1185
|
_this.dense = false;
|
|
697
1186
|
// TODO: fix this.
|
|
698
1187
|
// tslint:disable-next-line:no-output-native
|
|
@@ -743,7 +1232,7 @@
|
|
|
743
1232
|
};
|
|
744
1233
|
Object.defineProperty(AbstractInputComponent.prototype, "enabled", {
|
|
745
1234
|
get: function () {
|
|
746
|
-
return this.
|
|
1235
|
+
return this.formValueModel.enabled;
|
|
747
1236
|
},
|
|
748
1237
|
enumerable: true,
|
|
749
1238
|
configurable: true
|
|
@@ -753,7 +1242,7 @@
|
|
|
753
1242
|
};
|
|
754
1243
|
Object.defineProperty(AbstractInputComponent.prototype, "errorList", {
|
|
755
1244
|
get: function () {
|
|
756
|
-
return this.
|
|
1245
|
+
return this.formValueModel.errorList;
|
|
757
1246
|
},
|
|
758
1247
|
enumerable: true,
|
|
759
1248
|
configurable: true
|
|
@@ -767,7 +1256,7 @@
|
|
|
767
1256
|
});
|
|
768
1257
|
Object.defineProperty(AbstractInputComponent.prototype, "focusContext", {
|
|
769
1258
|
get: function () {
|
|
770
|
-
return this.
|
|
1259
|
+
return this.formValueModel.focusContext;
|
|
771
1260
|
},
|
|
772
1261
|
enumerable: true,
|
|
773
1262
|
configurable: true
|
|
@@ -786,6 +1275,13 @@
|
|
|
786
1275
|
enumerable: true,
|
|
787
1276
|
configurable: true
|
|
788
1277
|
});
|
|
1278
|
+
/**
|
|
1279
|
+
* Invokes the callback when this components value is changed by a user edit.
|
|
1280
|
+
* @param callback
|
|
1281
|
+
*/
|
|
1282
|
+
AbstractInputComponent.prototype.onValueEdited = function (callback) {
|
|
1283
|
+
return this.onValueEditedListeners.add(callback);
|
|
1284
|
+
};
|
|
789
1285
|
__decorate([
|
|
790
1286
|
core.Input(),
|
|
791
1287
|
__metadata("design:type", String)
|
|
@@ -875,7 +1371,7 @@
|
|
|
875
1371
|
var AbstractListInputComponent = /** @class */ (function (_super) {
|
|
876
1372
|
__extends(AbstractListInputComponent, _super);
|
|
877
1373
|
function AbstractListInputComponent() {
|
|
878
|
-
var _this = _super
|
|
1374
|
+
var _this = _super.call(this) || this;
|
|
879
1375
|
/**
|
|
880
1376
|
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
881
1377
|
*
|
|
@@ -887,11 +1383,61 @@
|
|
|
887
1383
|
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
888
1384
|
*/
|
|
889
1385
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
890
|
-
_this.
|
|
1386
|
+
_this.formValueModel = _this.registerDisposable(new pectin.Form.DelegatingListModel());
|
|
1387
|
+
_this.componentListModel = new pectin.MutableListModel();
|
|
1388
|
+
_this.setValueIsInProgress = new pectin.Guard();
|
|
1389
|
+
_this.valueChange = new core.EventEmitter();
|
|
1390
|
+
var _a = pectin.Dsl.disposeWith(_this), when = _a.when, valueOf = _a.valueOf, chain = _a.chain;
|
|
1391
|
+
var binding = new pectin.Binding.Identity(_this.formValueModel, _this.componentListModel).writeRight();
|
|
1392
|
+
var inExternalChange = valueOf.any(_this.setValueIsInProgress, chain(binding.direction).equals(pectin.Binding.Direction.RIGHT)).areTruthy();
|
|
1393
|
+
when(_this.componentListModel).changes(function (is, was) {
|
|
1394
|
+
_this.valueChange.emit(is);
|
|
1395
|
+
_this.onValueEditedListeners.fire(function (l) { return l(is, was); });
|
|
1396
|
+
}, {
|
|
1397
|
+
initialValue: 'ignore',
|
|
1398
|
+
// we never fire events during an external changes to the value. This allows
|
|
1399
|
+
// the component to behave when used in the conventional angular
|
|
1400
|
+
// fashion, i.e. [(value)]="..."
|
|
1401
|
+
unless: inExternalChange
|
|
1402
|
+
});
|
|
1403
|
+
pectin.DebugContext.tag(_this.formValueModel, _this.constructor.name + ".formValueModel");
|
|
891
1404
|
return _this;
|
|
892
1405
|
}
|
|
1406
|
+
Object.defineProperty(AbstractListInputComponent.prototype, "value", {
|
|
1407
|
+
// We add support for simple direct display of values by allowing components to be used
|
|
1408
|
+
// by `component.value = ...` This use of the component without a value model in tables
|
|
1409
|
+
// and the like.
|
|
1410
|
+
set: function (value) {
|
|
1411
|
+
var _this = this;
|
|
1412
|
+
this.setValueIsInProgress.whileTrue(function () {
|
|
1413
|
+
if (!_this.listHolder) {
|
|
1414
|
+
_this.listHolder = new pectin.MutableListModel(value);
|
|
1415
|
+
_this.listModel = _this.listHolder;
|
|
1416
|
+
}
|
|
1417
|
+
else {
|
|
1418
|
+
_this.listHolder.value = value;
|
|
1419
|
+
}
|
|
1420
|
+
});
|
|
1421
|
+
},
|
|
1422
|
+
enumerable: true,
|
|
1423
|
+
configurable: true
|
|
1424
|
+
});
|
|
1425
|
+
__decorate([
|
|
1426
|
+
core.Input(), pectin.TrackExternal({ delegateTo: 'formValueModel' }),
|
|
1427
|
+
__metadata("design:type", Object)
|
|
1428
|
+
], AbstractListInputComponent.prototype, "listModel", void 0);
|
|
1429
|
+
__decorate([
|
|
1430
|
+
core.Input(),
|
|
1431
|
+
__metadata("design:type", Array),
|
|
1432
|
+
__metadata("design:paramtypes", [Array])
|
|
1433
|
+
], AbstractListInputComponent.prototype, "value", null);
|
|
1434
|
+
__decorate([
|
|
1435
|
+
core.Output(),
|
|
1436
|
+
__metadata("design:type", Object)
|
|
1437
|
+
], AbstractListInputComponent.prototype, "valueChange", void 0);
|
|
893
1438
|
AbstractListInputComponent = __decorate([
|
|
894
|
-
core.Component({ template: '' })
|
|
1439
|
+
core.Component({ template: '' }),
|
|
1440
|
+
__metadata("design:paramtypes", [])
|
|
895
1441
|
], AbstractListInputComponent);
|
|
896
1442
|
return AbstractListInputComponent;
|
|
897
1443
|
}(AbstractInputComponent));
|
|
@@ -911,9 +1457,58 @@
|
|
|
911
1457
|
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
912
1458
|
*/
|
|
913
1459
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
914
|
-
_this.
|
|
1460
|
+
_this.formValueModel = _this.registerDisposable(new pectin.Form.DelegatingValueModel());
|
|
1461
|
+
_this.setValueInProgress = new pectin.Guard();
|
|
1462
|
+
_this.componentValueModel = new pectin.MutableValueModel();
|
|
1463
|
+
_this.valueChange = new core.EventEmitter();
|
|
1464
|
+
var _a = pectin.Dsl.disposeWith(_this), when = _a.when, chain = _a.chain, valueOf = _a.valueOf;
|
|
1465
|
+
var binding = new pectin.Binding.Identity(_this.formValueModel, _this.componentValueModel).writeRight();
|
|
1466
|
+
var inExternalChange = valueOf.any(_this.setValueInProgress, chain(binding.direction).equals(pectin.Binding.Direction.RIGHT)).areTruthy();
|
|
1467
|
+
when(_this.componentValueModel).changes(function (is, was) {
|
|
1468
|
+
_this.valueChange.emit(is);
|
|
1469
|
+
_this.onValueEditedListeners.fire(function (l) { return l(is, was); });
|
|
1470
|
+
}, {
|
|
1471
|
+
initialValue: 'ignore',
|
|
1472
|
+
// we never fire events during an external set value operation. This allows
|
|
1473
|
+
// the component to behave when used in the conventional angular
|
|
1474
|
+
// fashion, i.e. [(value)]="..."
|
|
1475
|
+
unless: inExternalChange
|
|
1476
|
+
});
|
|
1477
|
+
pectin.DebugContext.tag(_this.formValueModel, _this.constructor.name + ".formValueModel");
|
|
915
1478
|
return _this;
|
|
916
1479
|
}
|
|
1480
|
+
Object.defineProperty(AbstractValueInputComponent.prototype, "value", {
|
|
1481
|
+
// We add support for simple direct display of values by allowing components to be used
|
|
1482
|
+
// by `component.value = ...` This use of the component without a value model in tables
|
|
1483
|
+
// and the like.
|
|
1484
|
+
set: function (value) {
|
|
1485
|
+
var _this = this;
|
|
1486
|
+
this.setValueInProgress.whileTrue(function () {
|
|
1487
|
+
if (!_this.plainValueHolder) {
|
|
1488
|
+
_this.plainValueHolder = new pectin.MutableValueModel(value);
|
|
1489
|
+
_this.valueModel = _this.plainValueHolder;
|
|
1490
|
+
}
|
|
1491
|
+
else {
|
|
1492
|
+
_this.plainValueHolder.value = value;
|
|
1493
|
+
}
|
|
1494
|
+
});
|
|
1495
|
+
},
|
|
1496
|
+
enumerable: true,
|
|
1497
|
+
configurable: true
|
|
1498
|
+
});
|
|
1499
|
+
__decorate([
|
|
1500
|
+
core.Input(), pectin.TrackExternal({ delegateTo: 'formValueModel' }),
|
|
1501
|
+
__metadata("design:type", Object)
|
|
1502
|
+
], AbstractValueInputComponent.prototype, "valueModel", void 0);
|
|
1503
|
+
__decorate([
|
|
1504
|
+
core.Input(),
|
|
1505
|
+
__metadata("design:type", Object),
|
|
1506
|
+
__metadata("design:paramtypes", [Object])
|
|
1507
|
+
], AbstractValueInputComponent.prototype, "value", null);
|
|
1508
|
+
__decorate([
|
|
1509
|
+
core.Output(),
|
|
1510
|
+
__metadata("design:type", Object)
|
|
1511
|
+
], AbstractValueInputComponent.prototype, "valueChange", void 0);
|
|
917
1512
|
AbstractValueInputComponent = __decorate([
|
|
918
1513
|
core.Component({ template: '' }),
|
|
919
1514
|
__metadata("design:paramtypes", [])
|
|
@@ -921,20 +1516,85 @@
|
|
|
921
1516
|
return AbstractValueInputComponent;
|
|
922
1517
|
}(AbstractInputComponent));
|
|
923
1518
|
|
|
1519
|
+
/**
|
|
1520
|
+
* Using templates (not only supported for nil values:
|
|
1521
|
+
* <aup-autocomplete-input [valueModel]="myModel" [options]="myOptions">
|
|
1522
|
+
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1523
|
+
* </aup-autocomplete-input>
|
|
1524
|
+
*/
|
|
1525
|
+
var AutocompleteInputComponent = /** @class */ (function (_super) {
|
|
1526
|
+
__extends(AutocompleteInputComponent, _super);
|
|
1527
|
+
function AutocompleteInputComponent() {
|
|
1528
|
+
var _this = _super.call(this) || this;
|
|
1529
|
+
_this.filterValue = new pectin.MutableValueModel();
|
|
1530
|
+
_this.optionLabelFormat = function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; };
|
|
1531
|
+
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1532
|
+
var lowerCaseFilterValue = chain(_this.filterValue)
|
|
1533
|
+
.map(function (v) { return ___default__default.isString(v) ? v.toLowerCase() : ''; });
|
|
1534
|
+
_this.filteredOptions = chain(_this.optionsModel)
|
|
1535
|
+
.select(function (option) {
|
|
1536
|
+
return ___default__default.isEmpty(_this.filterValue.value) || _this.optionLabelFormat(option).toString().toLowerCase().includes(lowerCaseFilterValue.value);
|
|
1537
|
+
}, { dependsOn: lowerCaseFilterValue });
|
|
1538
|
+
return _this;
|
|
1539
|
+
}
|
|
1540
|
+
AutocompleteInputComponent.prototype.ngOnInit = function () {
|
|
1541
|
+
};
|
|
1542
|
+
AutocompleteInputComponent.prototype.formatOption = function (option) {
|
|
1543
|
+
return this.optionLabelFormat(option);
|
|
1544
|
+
};
|
|
1545
|
+
AutocompleteInputComponent.prototype.updateFilter = function ($event) {
|
|
1546
|
+
this.filterValue.value = $event;
|
|
1547
|
+
};
|
|
1548
|
+
AutocompleteInputComponent.prototype.onSelect = function ($event) {
|
|
1549
|
+
this.valueModel.value = $event.option.value;
|
|
1550
|
+
};
|
|
1551
|
+
__decorate([
|
|
1552
|
+
core.Input(), pectin.TrackExternal(),
|
|
1553
|
+
__metadata("design:type", pectin.ListModel)
|
|
1554
|
+
], AutocompleteInputComponent.prototype, "optionsModel", void 0);
|
|
1555
|
+
__decorate([
|
|
1556
|
+
core.Input(), pectin.StoreInListModel('optionsModel'),
|
|
1557
|
+
__metadata("design:type", Array)
|
|
1558
|
+
], AutocompleteInputComponent.prototype, "options", void 0);
|
|
1559
|
+
__decorate([
|
|
1560
|
+
core.Input(),
|
|
1561
|
+
__metadata("design:type", Object)
|
|
1562
|
+
], AutocompleteInputComponent.prototype, "optionLabel", void 0);
|
|
1563
|
+
__decorate([
|
|
1564
|
+
core.Input(),
|
|
1565
|
+
__metadata("design:type", Boolean)
|
|
1566
|
+
], AutocompleteInputComponent.prototype, "allowNil", void 0);
|
|
1567
|
+
__decorate([
|
|
1568
|
+
core.ContentChild('nilOptionTemplate'),
|
|
1569
|
+
__metadata("design:type", core.TemplateRef)
|
|
1570
|
+
], AutocompleteInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
1571
|
+
__decorate([
|
|
1572
|
+
core.Input(),
|
|
1573
|
+
__metadata("design:type", Function)
|
|
1574
|
+
], AutocompleteInputComponent.prototype, "optionLabelFormat", void 0);
|
|
1575
|
+
AutocompleteInputComponent = __decorate([
|
|
1576
|
+
core.Component({
|
|
1577
|
+
selector: 'aup-autocomplete-input',
|
|
1578
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"string\"\n matInput\n [matAutocomplete]=\"autocomplete\"\n placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValueModel.value\"\n (ngModelChange)=\"updateFilter($event)\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-autocomplete #autocomplete [displayWith]=\"optionLabelFormat\" [autoActiveFirstOption]=\"true\" (optionSelected)=\"onSelect($event)\">\n <mat-option *ngFor=\"let option of filteredOptions.value; let i = index\"\n [value]=\"option\"\n >{{formatOption(option)}}</mat-option>\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n </mat-autocomplete>\n\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
1579
|
+
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1580
|
+
}),
|
|
1581
|
+
__metadata("design:paramtypes", [])
|
|
1582
|
+
], AutocompleteInputComponent);
|
|
1583
|
+
return AutocompleteInputComponent;
|
|
1584
|
+
}(AbstractValueInputComponent));
|
|
1585
|
+
|
|
924
1586
|
var CheckboxInputComponent = /** @class */ (function (_super) {
|
|
925
1587
|
__extends(CheckboxInputComponent, _super);
|
|
926
1588
|
function CheckboxInputComponent() {
|
|
927
1589
|
var _this = _super.call(this) || this;
|
|
1590
|
+
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
1591
|
+
// valueModel: Form.ValueModelBase<boolean> | IMutableValueModel<boolean>;
|
|
928
1592
|
_this.color = 'accent';
|
|
929
1593
|
_this.labelPosition = 'after';
|
|
930
1594
|
return _this;
|
|
931
1595
|
}
|
|
932
1596
|
CheckboxInputComponent.prototype.ngOnInit = function () {
|
|
933
1597
|
};
|
|
934
|
-
__decorate([
|
|
935
|
-
core.Input(), pectin.TrackExternal({ delegateTo: 'inputModel' }),
|
|
936
|
-
__metadata("design:type", Object)
|
|
937
|
-
], CheckboxInputComponent.prototype, "valueModel", void 0);
|
|
938
1598
|
__decorate([
|
|
939
1599
|
core.Input(),
|
|
940
1600
|
__metadata("design:type", String)
|
|
@@ -946,7 +1606,7 @@
|
|
|
946
1606
|
CheckboxInputComponent = __decorate([
|
|
947
1607
|
core.Component({
|
|
948
1608
|
selector: 'aup-checkbox-input',
|
|
949
|
-
template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"
|
|
1609
|
+
template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"componentValueModel.value\"\n [color]=\"color\"\n [labelPosition]=\"labelPosition\"\n [disabled]=\"!isEnabled()\"\n>{{label}}</mat-checkbox>\n<mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n<mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n",
|
|
950
1610
|
styles: [":host{display:inline-flex;flex-direction:column;padding:24px 0 16px}:host.dense{padding:6px 0 2px}mat-error,mat-hint{margin-top:4px;margin-left:24px;font-size:12px;font-weight:400;line-height:13.5px}"]
|
|
951
1611
|
}),
|
|
952
1612
|
__metadata("design:paramtypes", [])
|
|
@@ -954,20 +1614,65 @@
|
|
|
954
1614
|
return CheckboxInputComponent;
|
|
955
1615
|
}(AbstractValueInputComponent));
|
|
956
1616
|
|
|
1617
|
+
/**
|
|
1618
|
+
* Using templates:
|
|
1619
|
+
* <aup-multiple-select-input [valueModel]="myModel" [options]="myOptions">
|
|
1620
|
+
* <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1621
|
+
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1622
|
+
* </aup-multiple-select_input>
|
|
1623
|
+
*/
|
|
1624
|
+
var MultipleSelectInputComponent = /** @class */ (function (_super) {
|
|
1625
|
+
__extends(MultipleSelectInputComponent, _super);
|
|
1626
|
+
function MultipleSelectInputComponent() {
|
|
1627
|
+
var _this = _super.call(this) || this;
|
|
1628
|
+
_this.optionLabelFormat = function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; };
|
|
1629
|
+
return _this;
|
|
1630
|
+
}
|
|
1631
|
+
MultipleSelectInputComponent.prototype.ngOnInit = function () {
|
|
1632
|
+
};
|
|
1633
|
+
__decorate([
|
|
1634
|
+
core.Input(), pectin.TrackExternal(),
|
|
1635
|
+
__metadata("design:type", pectin.ListModel)
|
|
1636
|
+
], MultipleSelectInputComponent.prototype, "optionsModel", void 0);
|
|
1637
|
+
__decorate([
|
|
1638
|
+
core.Input(), pectin.StoreInListModel('optionsModel'),
|
|
1639
|
+
__metadata("design:type", Array)
|
|
1640
|
+
], MultipleSelectInputComponent.prototype, "options", void 0);
|
|
1641
|
+
__decorate([
|
|
1642
|
+
core.Input(),
|
|
1643
|
+
__metadata("design:type", Object)
|
|
1644
|
+
], MultipleSelectInputComponent.prototype, "optionLabel", void 0);
|
|
1645
|
+
__decorate([
|
|
1646
|
+
core.ContentChild('optionTemplate'),
|
|
1647
|
+
__metadata("design:type", core.TemplateRef)
|
|
1648
|
+
], MultipleSelectInputComponent.prototype, "optionTemplateRef", void 0);
|
|
1649
|
+
__decorate([
|
|
1650
|
+
core.Input(),
|
|
1651
|
+
__metadata("design:type", Function)
|
|
1652
|
+
], MultipleSelectInputComponent.prototype, "optionLabelFormat", void 0);
|
|
1653
|
+
MultipleSelectInputComponent = __decorate([
|
|
1654
|
+
core.Component({
|
|
1655
|
+
selector: 'aup-multiple-select-input',
|
|
1656
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [(ngModel)]=\"componentListModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngFor=\"let option of 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",
|
|
1657
|
+
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1658
|
+
}),
|
|
1659
|
+
__metadata("design:paramtypes", [])
|
|
1660
|
+
], MultipleSelectInputComponent);
|
|
1661
|
+
return MultipleSelectInputComponent;
|
|
1662
|
+
}(AbstractListInputComponent));
|
|
1663
|
+
|
|
957
1664
|
var NumberInputComponent = /** @class */ (function (_super) {
|
|
958
1665
|
__extends(NumberInputComponent, _super);
|
|
959
1666
|
function NumberInputComponent() {
|
|
960
1667
|
var _this = _super.call(this) || this;
|
|
1668
|
+
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
1669
|
+
// valueModel: Form.ValueModelBase<number> | IMutableValueModel<number>;
|
|
961
1670
|
_this.min = Number.MIN_SAFE_INTEGER;
|
|
962
1671
|
_this.max = Number.MAX_SAFE_INTEGER;
|
|
963
1672
|
return _this;
|
|
964
1673
|
}
|
|
965
1674
|
NumberInputComponent.prototype.ngOnInit = function () {
|
|
966
1675
|
};
|
|
967
|
-
__decorate([
|
|
968
|
-
core.Input(), pectin.TrackExternal({ delegateTo: 'inputModel' }),
|
|
969
|
-
__metadata("design:type", Object)
|
|
970
|
-
], NumberInputComponent.prototype, "valueModel", void 0);
|
|
971
1676
|
__decorate([
|
|
972
1677
|
core.Input(),
|
|
973
1678
|
__metadata("design:type", Object)
|
|
@@ -979,7 +1684,7 @@
|
|
|
979
1684
|
NumberInputComponent = __decorate([
|
|
980
1685
|
core.Component({
|
|
981
1686
|
selector: 'aup-number-input',
|
|
982
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"number\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
1687
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"number\"\n 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 [min]=\"min\"\n [max]=\"max\"\n >\n <mat-hint *ngIf=\"hint && !dense\" >{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
983
1688
|
styles: [""]
|
|
984
1689
|
}),
|
|
985
1690
|
__metadata("design:paramtypes", [])
|
|
@@ -989,19 +1694,17 @@
|
|
|
989
1694
|
|
|
990
1695
|
var PasswordInputComponent = /** @class */ (function (_super) {
|
|
991
1696
|
__extends(PasswordInputComponent, _super);
|
|
1697
|
+
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
1698
|
+
// valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
|
|
992
1699
|
function PasswordInputComponent() {
|
|
993
1700
|
return _super.call(this) || this;
|
|
994
1701
|
}
|
|
995
1702
|
PasswordInputComponent.prototype.ngOnInit = function () {
|
|
996
1703
|
};
|
|
997
|
-
__decorate([
|
|
998
|
-
core.Input(), pectin.TrackExternal({ delegateTo: 'inputModel' }),
|
|
999
|
-
__metadata("design:type", Object)
|
|
1000
|
-
], PasswordInputComponent.prototype, "valueModel", void 0);
|
|
1001
1704
|
PasswordInputComponent = __decorate([
|
|
1002
1705
|
core.Component({
|
|
1003
1706
|
selector: 'aup-password-input',
|
|
1004
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"password\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
1707
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"password\"\n 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</mat-form-field>\n\n",
|
|
1005
1708
|
styles: [""]
|
|
1006
1709
|
}),
|
|
1007
1710
|
__metadata("design:paramtypes", [])
|
|
@@ -1013,6 +1716,7 @@
|
|
|
1013
1716
|
* Using templates:
|
|
1014
1717
|
* <aup-select-input [valueModel]="myModel" [options]="myOptions">
|
|
1015
1718
|
* <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1719
|
+
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1016
1720
|
* </aup-select_input>
|
|
1017
1721
|
*/
|
|
1018
1722
|
var SelectInputComponent = /** @class */ (function (_super) {
|
|
@@ -1024,10 +1728,6 @@
|
|
|
1024
1728
|
}
|
|
1025
1729
|
SelectInputComponent.prototype.ngOnInit = function () {
|
|
1026
1730
|
};
|
|
1027
|
-
__decorate([
|
|
1028
|
-
core.Input(), pectin.TrackExternal({ delegateTo: 'inputModel' }),
|
|
1029
|
-
__metadata("design:type", Object)
|
|
1030
|
-
], SelectInputComponent.prototype, "valueModel", void 0);
|
|
1031
1731
|
__decorate([
|
|
1032
1732
|
core.Input(), pectin.TrackExternal(),
|
|
1033
1733
|
__metadata("design:type", pectin.ListModel)
|
|
@@ -1059,7 +1759,7 @@
|
|
|
1059
1759
|
SelectInputComponent = __decorate([
|
|
1060
1760
|
core.Component({
|
|
1061
1761
|
selector: 'aup-select-input',
|
|
1062
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
1762
|
+
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",
|
|
1063
1763
|
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1064
1764
|
}),
|
|
1065
1765
|
__metadata("design:paramtypes", [])
|
|
@@ -1073,17 +1773,13 @@
|
|
|
1073
1773
|
var _this = _super.call(this) || this;
|
|
1074
1774
|
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1075
1775
|
_this.clearCommand = pectin.Command.create(function () {
|
|
1076
|
-
_this.
|
|
1776
|
+
_this.componentValueModel.value = null;
|
|
1077
1777
|
});
|
|
1078
|
-
_this.clearCommand.disableWhile(chain.stringValue(_this.
|
|
1778
|
+
_this.clearCommand.disableWhile(chain.stringValue(_this.componentValueModel).isBlank());
|
|
1079
1779
|
return _this;
|
|
1080
1780
|
}
|
|
1081
1781
|
StringInputComponent.prototype.ngOnInit = function () {
|
|
1082
1782
|
};
|
|
1083
|
-
__decorate([
|
|
1084
|
-
core.Input(), pectin.TrackExternal({ delegateTo: 'inputModel' }),
|
|
1085
|
-
__metadata("design:type", Object)
|
|
1086
|
-
], StringInputComponent.prototype, "valueModel", void 0);
|
|
1087
1783
|
__decorate([
|
|
1088
1784
|
core.Input(), pectin.TrackExternal({ defaultValue: false }),
|
|
1089
1785
|
__metadata("design:type", pectin.ValueModel)
|
|
@@ -1095,7 +1791,7 @@
|
|
|
1095
1791
|
StringInputComponent = __decorate([
|
|
1096
1792
|
core.Component({
|
|
1097
1793
|
selector: 'aup-string-input',
|
|
1098
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
1794
|
+
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",
|
|
1099
1795
|
styles: ["button[disabled]{visibility:hidden}"]
|
|
1100
1796
|
}),
|
|
1101
1797
|
__metadata("design:paramtypes", [])
|
|
@@ -1107,16 +1803,14 @@
|
|
|
1107
1803
|
__extends(TextInputComponent, _super);
|
|
1108
1804
|
function TextInputComponent() {
|
|
1109
1805
|
var _this = _super.call(this) || this;
|
|
1806
|
+
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
1807
|
+
// valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
|
|
1110
1808
|
_this.rows = 2;
|
|
1111
1809
|
return _this;
|
|
1112
1810
|
// const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
1113
1811
|
}
|
|
1114
1812
|
TextInputComponent.prototype.ngOnInit = function () {
|
|
1115
1813
|
};
|
|
1116
|
-
__decorate([
|
|
1117
|
-
core.Input(), pectin.TrackExternal({ delegateTo: 'inputModel' }),
|
|
1118
|
-
__metadata("design:type", Object)
|
|
1119
|
-
], TextInputComponent.prototype, "valueModel", void 0);
|
|
1120
1814
|
__decorate([
|
|
1121
1815
|
core.Input(),
|
|
1122
1816
|
__metadata("design:type", Object)
|
|
@@ -1128,7 +1822,7 @@
|
|
|
1128
1822
|
TextInputComponent = __decorate([
|
|
1129
1823
|
core.Component({
|
|
1130
1824
|
selector: 'aup-text-input',
|
|
1131
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
1825
|
+
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",
|
|
1132
1826
|
styles: ["button[disabled]{visibility:hidden}textarea{overflow:auto}"]
|
|
1133
1827
|
}),
|
|
1134
1828
|
__metadata("design:paramtypes", [])
|
|
@@ -1136,6 +1830,59 @@
|
|
|
1136
1830
|
return TextInputComponent;
|
|
1137
1831
|
}(AbstractValueInputComponent));
|
|
1138
1832
|
|
|
1833
|
+
exports.ɵbk = /** @class */ (function () {
|
|
1834
|
+
function IconComponent() {
|
|
1835
|
+
this.allowedPrefixes = typescriptStringEnums.Enum.values(IconComponent_1.IconPrefix).map(function (p) { return p + ":"; });
|
|
1836
|
+
this.iconPrefix = IconComponent_1.IconPrefix;
|
|
1837
|
+
}
|
|
1838
|
+
IconComponent_1 = IconComponent;
|
|
1839
|
+
Object.defineProperty(IconComponent.prototype, "icon", {
|
|
1840
|
+
get: function () {
|
|
1841
|
+
return this._icon;
|
|
1842
|
+
},
|
|
1843
|
+
set: function (iconName) {
|
|
1844
|
+
this._icon = iconName;
|
|
1845
|
+
if (!iconName) {
|
|
1846
|
+
this.errorMessage = 'icon is nil';
|
|
1847
|
+
this.prefix = undefined;
|
|
1848
|
+
return;
|
|
1849
|
+
}
|
|
1850
|
+
var colonIndex = iconName.indexOf(':');
|
|
1851
|
+
if (colonIndex > 0) {
|
|
1852
|
+
this.prefix = this.icon.slice(0, colonIndex);
|
|
1853
|
+
this.suffix = this.icon.slice(colonIndex + 1);
|
|
1854
|
+
}
|
|
1855
|
+
if (this.prefix) {
|
|
1856
|
+
this.errorMessage = "Unknown icon \"" + iconName + "\"";
|
|
1857
|
+
}
|
|
1858
|
+
this.errorMessage = "Unknown icon prefix, expected one of [" + this.allowedPrefixes.join(',') + "] got \"" + this.prefix + ":\"";
|
|
1859
|
+
},
|
|
1860
|
+
enumerable: true,
|
|
1861
|
+
configurable: true
|
|
1862
|
+
});
|
|
1863
|
+
var IconComponent_1;
|
|
1864
|
+
__decorate([
|
|
1865
|
+
core.Input(),
|
|
1866
|
+
__metadata("design:type", String),
|
|
1867
|
+
__metadata("design:paramtypes", [String])
|
|
1868
|
+
], IconComponent.prototype, "icon", null);
|
|
1869
|
+
IconComponent = IconComponent_1 = __decorate([
|
|
1870
|
+
core.Component({
|
|
1871
|
+
selector: 'aup-icon',
|
|
1872
|
+
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",
|
|
1873
|
+
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}"]
|
|
1874
|
+
})
|
|
1875
|
+
], IconComponent);
|
|
1876
|
+
return IconComponent;
|
|
1877
|
+
}());
|
|
1878
|
+
(function (IconComponent) {
|
|
1879
|
+
IconComponent.IconPrefix = typescriptStringEnums.Enum({
|
|
1880
|
+
SVG: 'svg',
|
|
1881
|
+
FONT_AWESOME: 'fa',
|
|
1882
|
+
MATERIAL: 'mat'
|
|
1883
|
+
});
|
|
1884
|
+
})(exports.ɵbk || (exports.ɵbk = {}));
|
|
1885
|
+
|
|
1139
1886
|
var NoopComponent = /** @class */ (function () {
|
|
1140
1887
|
function NoopComponent() {
|
|
1141
1888
|
}
|
|
@@ -1346,6 +2093,7 @@
|
|
|
1346
2093
|
typescriptUtilities.assert.isTruthy(host);
|
|
1347
2094
|
host[HEADER_CELL_RENDERER_PORTAL] = new portal.ComponentPortal(this.componentType);
|
|
1348
2095
|
};
|
|
2096
|
+
// @Trace()
|
|
1349
2097
|
CellHeaderPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
|
|
1350
2098
|
this.initialiseHeader(portalComponent, host.column);
|
|
1351
2099
|
};
|
|
@@ -1369,13 +2117,15 @@
|
|
|
1369
2117
|
ComponentCellRendererPortalRef.prototype.initialiseHost = function (host, columnModel) {
|
|
1370
2118
|
host[CELL_RENDERER_PORTAL] = new portal.ComponentPortal(this.componentType);
|
|
1371
2119
|
};
|
|
2120
|
+
// @Trace()
|
|
1372
2121
|
ComponentCellRendererPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
|
|
1373
2122
|
host[PORTAL_RENDERER_COMPONENT] = portalComponent;
|
|
1374
|
-
this.updateComponent(portalComponent, host.getRowData());
|
|
2123
|
+
this.updateComponent(portalComponent, host.getRowData(), true);
|
|
1375
2124
|
};
|
|
2125
|
+
// @Trace()
|
|
1376
2126
|
ComponentCellRendererPortalRef.prototype.pushState = function (host) {
|
|
1377
2127
|
if (host[PORTAL_RENDERER_COMPONENT]) {
|
|
1378
|
-
this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData());
|
|
2128
|
+
this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData(), false);
|
|
1379
2129
|
}
|
|
1380
2130
|
};
|
|
1381
2131
|
return ComponentCellRendererPortalRef;
|
|
@@ -1417,6 +2167,7 @@
|
|
|
1417
2167
|
TemplateCellRendererPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
|
|
1418
2168
|
// don't care
|
|
1419
2169
|
};
|
|
2170
|
+
// @Trace()
|
|
1420
2171
|
TemplateCellRendererPortalRef.prototype.pushState = function (host) {
|
|
1421
2172
|
host[CELL_RENDERER_PORTAL] = this.createPortal(host.getRowData());
|
|
1422
2173
|
host.fillCell = this.fillCell;
|
|
@@ -1608,6 +2359,7 @@
|
|
|
1608
2359
|
var noop = function () {
|
|
1609
2360
|
};
|
|
1610
2361
|
var ɵ0 = noop;
|
|
2362
|
+
var CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol("aup-cell-renderer:row-data-cache");
|
|
1611
2363
|
var ColumnModel = /** @class */ (function () {
|
|
1612
2364
|
function ColumnModel(columnId, defaults) {
|
|
1613
2365
|
this.columnId = columnId;
|
|
@@ -1698,24 +2450,66 @@
|
|
|
1698
2450
|
}());
|
|
1699
2451
|
var PropertyColumnModel = /** @class */ (function (_super) {
|
|
1700
2452
|
__extends(PropertyColumnModel, _super);
|
|
1701
|
-
function PropertyColumnModel(property, defaults) {
|
|
1702
|
-
var _this = _super.call(this,
|
|
2453
|
+
function PropertyColumnModel(id, property, defaults) {
|
|
2454
|
+
var _this = _super.call(this, id, defaults) || this;
|
|
1703
2455
|
_this.property = property;
|
|
1704
2456
|
_this._format = function (value) { return value; };
|
|
1705
2457
|
_this.cellRenderer(DefaultCellRendererComponent);
|
|
1706
2458
|
return _this;
|
|
1707
2459
|
}
|
|
1708
|
-
PropertyColumnModel.prototype.cellRenderer = function (componentType) {
|
|
2460
|
+
PropertyColumnModel.prototype.cellRenderer = function (componentType, onComponentInitOrOptions) {
|
|
1709
2461
|
var _this = this;
|
|
1710
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
|
|
2462
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData, firstTime) {
|
|
2463
|
+
if (firstTime) {
|
|
2464
|
+
if (___default__default.isFunction(onComponentInitOrOptions)) {
|
|
2465
|
+
onComponentInitOrOptions(component);
|
|
2466
|
+
}
|
|
2467
|
+
else {
|
|
2468
|
+
if (___default__default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
2469
|
+
onComponentInitOrOptions.onComponentInit(component);
|
|
2470
|
+
}
|
|
2471
|
+
}
|
|
2472
|
+
}
|
|
1711
2473
|
component.value = _this._format(rowData.row[_this.property]);
|
|
2474
|
+
if (!___default__default.isFunction(onComponentInitOrOptions) && ___default__default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
2475
|
+
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
2476
|
+
}
|
|
2477
|
+
}));
|
|
2478
|
+
return this;
|
|
2479
|
+
};
|
|
2480
|
+
PropertyColumnModel.prototype.mutableCellRenderer = function (componentType, options) {
|
|
2481
|
+
var _this = this;
|
|
2482
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData, firstTime) {
|
|
2483
|
+
// keep a local copy most recent row value so it's available to teh
|
|
2484
|
+
// edit callback without having to add/remove subscribers all the time.
|
|
2485
|
+
component[CELL_RENDERER_COMPONENT_ROW_CACHE] = rowData.row;
|
|
2486
|
+
var disableEditCallback = false;
|
|
2487
|
+
if (firstTime) {
|
|
2488
|
+
if (___default__default.isFunction(options === null || options === void 0 ? void 0 : options.onComponentInit)) {
|
|
2489
|
+
options.onComponentInit(component);
|
|
2490
|
+
}
|
|
2491
|
+
// install our edit callback
|
|
2492
|
+
component.onValueEdited(function (is, was) {
|
|
2493
|
+
if (!disableEditCallback) {
|
|
2494
|
+
options.onValueEdit(component[CELL_RENDERER_COMPONENT_ROW_CACHE], is, was);
|
|
2495
|
+
}
|
|
2496
|
+
});
|
|
2497
|
+
}
|
|
2498
|
+
// now push the value the component and disable the callback just incase the component misbehaves
|
|
2499
|
+
// and fires a value change during the operation.
|
|
2500
|
+
disableEditCallback = true;
|
|
2501
|
+
component.value = rowData.row[_this.property];
|
|
2502
|
+
disableEditCallback = false;
|
|
2503
|
+
if (!___default__default.isFunction(options) && ___default__default.isFunction(options === null || options === void 0 ? void 0 : options.onRowUpdate)) {
|
|
2504
|
+
options.onRowUpdate(component, rowData.row);
|
|
2505
|
+
}
|
|
1712
2506
|
}));
|
|
1713
2507
|
return this;
|
|
1714
2508
|
};
|
|
1715
|
-
PropertyColumnModel.prototype.cellEditor = function (editor, validatorsOrInitialiser,
|
|
2509
|
+
PropertyColumnModel.prototype.cellEditor = function (editor, validatorsOrInitialiser, onComponentInit) {
|
|
1716
2510
|
var _this = this;
|
|
1717
2511
|
var validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|
|
1718
|
-
var initialiser = ___default__default.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser :
|
|
2512
|
+
var initialiser = ___default__default.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : onComponentInit;
|
|
1719
2513
|
this.configureCellEditor(new CellEditorPortalRef(editor, function (component, editSession) {
|
|
1720
2514
|
var formValueModel = editSession.form.pluck(_this.property);
|
|
1721
2515
|
if (validators) {
|
|
@@ -1740,8 +2534,8 @@
|
|
|
1740
2534
|
}(ColumnModel));
|
|
1741
2535
|
var ListPropertyColumnModel = /** @class */ (function (_super) {
|
|
1742
2536
|
__extends(ListPropertyColumnModel, _super);
|
|
1743
|
-
function ListPropertyColumnModel(property, defaults) {
|
|
1744
|
-
var _this = _super.call(this,
|
|
2537
|
+
function ListPropertyColumnModel(id, property, defaults) {
|
|
2538
|
+
var _this = _super.call(this, id, defaults) || this;
|
|
1745
2539
|
_this.property = property;
|
|
1746
2540
|
_this._format = function (value) { return value.map(function (v) { return v === null || v === void 0 ? void 0 : v.toString(); }).join(', '); };
|
|
1747
2541
|
_this.cellRenderer(DefaultCellRendererComponent);
|
|
@@ -1788,10 +2582,23 @@
|
|
|
1788
2582
|
_this.cellRenderer(DefaultCellRendererComponent);
|
|
1789
2583
|
return _this;
|
|
1790
2584
|
}
|
|
1791
|
-
CustomValueColumnModel.prototype.cellRenderer = function (componentType) {
|
|
2585
|
+
CustomValueColumnModel.prototype.cellRenderer = function (componentType, onComponentInitOrOptions) {
|
|
1792
2586
|
var _this = this;
|
|
1793
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
|
|
2587
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData, firstTime) {
|
|
2588
|
+
if (firstTime) {
|
|
2589
|
+
if (___default__default.isFunction(onComponentInitOrOptions)) {
|
|
2590
|
+
onComponentInitOrOptions(component);
|
|
2591
|
+
}
|
|
2592
|
+
else {
|
|
2593
|
+
if (___default__default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
2594
|
+
onComponentInitOrOptions.onComponentInit(component);
|
|
2595
|
+
}
|
|
2596
|
+
}
|
|
2597
|
+
}
|
|
1794
2598
|
component.value = _this.getValue(rowData.row);
|
|
2599
|
+
if (!___default__default.isFunction(onComponentInitOrOptions) && ___default__default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
2600
|
+
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
2601
|
+
}
|
|
1795
2602
|
}));
|
|
1796
2603
|
return this;
|
|
1797
2604
|
};
|
|
@@ -1964,6 +2771,9 @@
|
|
|
1964
2771
|
this._editorSessions = new pectin.MutableListModel();
|
|
1965
2772
|
this.rowClassNamePredicates = [];
|
|
1966
2773
|
this._createForm = function (row) { return new pectin.DirtyTrackingForm(); };
|
|
2774
|
+
this.trackBy = function (index, item) {
|
|
2775
|
+
return _this.identityOf ? _this.identityOf(item) : index;
|
|
2776
|
+
};
|
|
1967
2777
|
this.identityOf = sourceOfTruth.identityOf;
|
|
1968
2778
|
var _a = pectin.Dsl.disposeWith(this._garbage), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1969
2779
|
this._columnsById = chain(this._columns).indexBy('columnId');
|
|
@@ -1975,7 +2785,7 @@
|
|
|
1975
2785
|
this.dataSource = chain(this.sourceOfTruth).replaceAll(this.rowsBeingEdited);
|
|
1976
2786
|
this.firstEditableColumn = chain(this.columns).select(function (c) { return c.hasEditorPortal(); }).first();
|
|
1977
2787
|
this.hasColumnsWithRowSelectionExplicitlyEnabled = chain(this._columns).findIndex(function (column) { return column.isRowSelectionExplicitlyEnabled(); }).isGreaterThanOrEqualTo(0);
|
|
1978
|
-
this.addRowClass(
|
|
2788
|
+
this.addRowClass('enable-hover', function () { return _this.isRowSelectionEnabled(); });
|
|
1979
2789
|
}
|
|
1980
2790
|
TableModel_1 = TableModel;
|
|
1981
2791
|
TableModel.fromList = function (sourceOfTruth, builder) {
|
|
@@ -1990,12 +2800,6 @@
|
|
|
1990
2800
|
enumerable: true,
|
|
1991
2801
|
configurable: true
|
|
1992
2802
|
});
|
|
1993
|
-
TableModel.prototype.getTrackByFunction = function () {
|
|
1994
|
-
var _this = this;
|
|
1995
|
-
return function (index, item) {
|
|
1996
|
-
return _this.identityOf ? _this.identityOf(item) : index;
|
|
1997
|
-
};
|
|
1998
|
-
};
|
|
1999
2803
|
Object.defineProperty(TableModel.prototype, "columns", {
|
|
2000
2804
|
get: function () {
|
|
2001
2805
|
return this._columns.readonly;
|
|
@@ -2003,11 +2807,11 @@
|
|
|
2003
2807
|
enumerable: true,
|
|
2004
2808
|
configurable: true
|
|
2005
2809
|
});
|
|
2006
|
-
TableModel.prototype.pluck = function (property) {
|
|
2007
|
-
return this.addColumn(new PropertyColumnModel(property, this));
|
|
2810
|
+
TableModel.prototype.pluck = function (property, options) {
|
|
2811
|
+
return this.addColumn(new PropertyColumnModel((options === null || options === void 0 ? void 0 : options.columnId) || property.toString(), property, this));
|
|
2008
2812
|
};
|
|
2009
|
-
TableModel.prototype.pluckList = function (property) {
|
|
2010
|
-
return this.addColumn(new ListPropertyColumnModel(property, this));
|
|
2813
|
+
TableModel.prototype.pluckList = function (property, options) {
|
|
2814
|
+
return this.addColumn(new ListPropertyColumnModel((options === null || options === void 0 ? void 0 : options.columnId) || property.toString(), property, this));
|
|
2011
2815
|
};
|
|
2012
2816
|
TableModel.prototype.addSelectionColumn = function (selectionModel) {
|
|
2013
2817
|
pectin.assert.isNil(this.selectionColumnModel);
|
|
@@ -2021,6 +2825,9 @@
|
|
|
2021
2825
|
TableModel.prototype.addCustomColumn = function (columnId, dataAccessor) {
|
|
2022
2826
|
return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
|
|
2023
2827
|
};
|
|
2828
|
+
TableModel.prototype.addComponentColumn = function (columnId, component, onComponentInitOrOptions) {
|
|
2829
|
+
return this.addColumn(new CustomValueColumnModel(columnId, this, function (row) { return row; })).cellRenderer(component, onComponentInitOrOptions);
|
|
2830
|
+
};
|
|
2024
2831
|
TableModel.prototype.addTemplateColumn = function (columnId) {
|
|
2025
2832
|
return this.addColumn(new CustomTemplateColumnModel(columnId, this));
|
|
2026
2833
|
};
|
|
@@ -2172,7 +2979,7 @@
|
|
|
2172
2979
|
TableComponent = __decorate([
|
|
2173
2980
|
core.Component({
|
|
2174
2981
|
selector: 'aup-table',
|
|
2175
|
-
template: "<table mat-table [dataSource]=\"tableModel.dataSource.value\" [trackBy]=\"tableModel.
|
|
2982
|
+
template: "<table mat-table [dataSource]=\"tableModel.dataSource.value\" [trackBy]=\"tableModel.trackBy\">\n\n <ng-container *ngFor=\"let column of columns.value; index as index; first as first; last as last\" matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef>\n <aup-table-header-cell-renderer [column]=\"column\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class.first-column]=\"first\"\n [class.last-column]=\"last\"\n ></aup-table-header-cell-renderer>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"onCellClicked(column, row)\" [class.enable-cursor]=\"tableModel.isRowSelectionEnabledFor(column)\">\n <aup-table-cell-renderer [column]=\"column\"\n [row]=\"row\"\n [tableModel]=\"tableModel\"\n [editSession]=\"tableModel.getEditSessionFor(row)\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class.first-column]=\"first\"\n [class.last-column]=\"last\"\n ></aup-table-cell-renderer>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds.value\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds.value; let i = index\"\n [ngClass]=\"tableModel.getRowClasses(row)\" [attr.trackBy]=\"tableModel.trackBy(i, row)\"\n ></tr>\n\n</table>\n",
|
|
2176
2983
|
styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{flex:1}"]
|
|
2177
2984
|
}),
|
|
2178
2985
|
__metadata("design:paramtypes", [])
|
|
@@ -2355,6 +3162,65 @@
|
|
|
2355
3162
|
return TableHeaderCellRendererComponent;
|
|
2356
3163
|
}());
|
|
2357
3164
|
|
|
3165
|
+
var MenuItemData = /** @class */ (function (_super) {
|
|
3166
|
+
__extends(MenuItemData, _super);
|
|
3167
|
+
function MenuItemData(factory, face) {
|
|
3168
|
+
var _this = _super.call(this, face) || this;
|
|
3169
|
+
_this.factory = factory;
|
|
3170
|
+
return _this;
|
|
3171
|
+
}
|
|
3172
|
+
return MenuItemData;
|
|
3173
|
+
}(exports.CommandFace.Adapter));
|
|
3174
|
+
/**
|
|
3175
|
+
*
|
|
3176
|
+
*/
|
|
3177
|
+
var TableRowMenuComponent = /** @class */ (function (_super) {
|
|
3178
|
+
__extends(TableRowMenuComponent, _super);
|
|
3179
|
+
function TableRowMenuComponent() {
|
|
3180
|
+
var _this = _super.call(this) || this;
|
|
3181
|
+
_this.actions = [];
|
|
3182
|
+
_this.moreActions = [];
|
|
3183
|
+
return _this;
|
|
3184
|
+
}
|
|
3185
|
+
TableRowMenuComponent.prototype.registerAction = function (commandFactory, properties) {
|
|
3186
|
+
this.actions.push(new MenuItemData(commandFactory, properties));
|
|
3187
|
+
};
|
|
3188
|
+
TableRowMenuComponent.prototype.registerMoreAction = function (commandFactory, properties) {
|
|
3189
|
+
this.moreActions.push(new MenuItemData(commandFactory, properties));
|
|
3190
|
+
};
|
|
3191
|
+
TableRowMenuComponent.prototype.ngOnInit = function () {
|
|
3192
|
+
};
|
|
3193
|
+
TableRowMenuComponent.prototype.createMoreMenuCommand = function (item, value) {
|
|
3194
|
+
var _this = this;
|
|
3195
|
+
var when = pectin.Dsl.disposeWith(this).when;
|
|
3196
|
+
var command = item.factory.create(value);
|
|
3197
|
+
when(command.busy).becomesFalsey(function () {
|
|
3198
|
+
_this.closeMoreMenu();
|
|
3199
|
+
});
|
|
3200
|
+
return command;
|
|
3201
|
+
};
|
|
3202
|
+
TableRowMenuComponent.prototype.closeMoreMenu = function () {
|
|
3203
|
+
this.menu.closeMenu();
|
|
3204
|
+
};
|
|
3205
|
+
__decorate([
|
|
3206
|
+
core.Input(),
|
|
3207
|
+
__metadata("design:type", Object)
|
|
3208
|
+
], TableRowMenuComponent.prototype, "value", void 0);
|
|
3209
|
+
__decorate([
|
|
3210
|
+
core.ViewChild(menu.MatMenuTrigger),
|
|
3211
|
+
__metadata("design:type", menu.MatMenuTrigger)
|
|
3212
|
+
], TableRowMenuComponent.prototype, "menu", void 0);
|
|
3213
|
+
TableRowMenuComponent = __decorate([
|
|
3214
|
+
core.Component({
|
|
3215
|
+
selector: 'aup-table-row-menu',
|
|
3216
|
+
template: "\n <button mat-icon-button *ngFor=\"let action of actions\" [pectinCommand]=\"action.factory.create(value)\">\n <aup-icon [icon]=\"action.icon\"></aup-icon>\n </button>\n <ng-container *ngIf=\"moreActions.length > 0\">\n <button #trigger mat-icon-button [matMenuTriggerFor]=\"menu\">\n <aup-icon icon=\"mat:more_vert\"></aup-icon>\n </button>\n <mat-menu #menu=\"matMenu\" xPosition=\"before\" matTooltip=\"More options...\">\n <button *ngFor=\"let action of moreActions\"\n mat-menu-item\n [pectinCommand]=\"createMoreMenuCommand(action, value)\"\n >\n <aup-icon *ngIf=\"action.icon && action.iconPositionStart\" [icon]=\"action.icon\"></aup-icon>\n {{action.text}}\n <aup-icon *ngIf=\"action.icon && action.iconPositionEnd\" [icon]=\"action.icon\"></aup-icon>\n </button>\n </mat-menu>\n </ng-container>\n ",
|
|
3217
|
+
styles: [":host {\n display: inline-flex;\n flex-direction: row;\n align-items: center;\n }"]
|
|
3218
|
+
}),
|
|
3219
|
+
__metadata("design:paramtypes", [])
|
|
3220
|
+
], TableRowMenuComponent);
|
|
3221
|
+
return TableRowMenuComponent;
|
|
3222
|
+
}(DisposableComponent));
|
|
3223
|
+
|
|
2358
3224
|
var VerticalFocusContainerComponent = /** @class */ (function (_super) {
|
|
2359
3225
|
__extends(VerticalFocusContainerComponent, _super);
|
|
2360
3226
|
function VerticalFocusContainerComponent(focusManager) {
|
|
@@ -2440,100 +3306,6 @@
|
|
|
2440
3306
|
return VerticalFocusContainerComponent;
|
|
2441
3307
|
}(FocusContainerComponent));
|
|
2442
3308
|
|
|
2443
|
-
var MultipleSelectInputComponent = /** @class */ (function (_super) {
|
|
2444
|
-
__extends(MultipleSelectInputComponent, _super);
|
|
2445
|
-
function MultipleSelectInputComponent() {
|
|
2446
|
-
var _this = _super.call(this) || this;
|
|
2447
|
-
_this.optionLabelFormat = function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; };
|
|
2448
|
-
return _this;
|
|
2449
|
-
}
|
|
2450
|
-
MultipleSelectInputComponent.prototype.ngOnInit = function () {
|
|
2451
|
-
};
|
|
2452
|
-
__decorate([
|
|
2453
|
-
core.Input(), pectin.TrackExternal({ delegateTo: 'inputModel' }),
|
|
2454
|
-
__metadata("design:type", Object)
|
|
2455
|
-
], MultipleSelectInputComponent.prototype, "listModel", void 0);
|
|
2456
|
-
__decorate([
|
|
2457
|
-
core.Input(), pectin.TrackExternal(),
|
|
2458
|
-
__metadata("design:type", pectin.ListModel)
|
|
2459
|
-
], MultipleSelectInputComponent.prototype, "optionsModel", void 0);
|
|
2460
|
-
__decorate([
|
|
2461
|
-
core.Input(), pectin.StoreInListModel('optionsModel'),
|
|
2462
|
-
__metadata("design:type", Array)
|
|
2463
|
-
], MultipleSelectInputComponent.prototype, "options", void 0);
|
|
2464
|
-
__decorate([
|
|
2465
|
-
core.Input(),
|
|
2466
|
-
__metadata("design:type", Object)
|
|
2467
|
-
], MultipleSelectInputComponent.prototype, "optionLabel", void 0);
|
|
2468
|
-
__decorate([
|
|
2469
|
-
core.Input(),
|
|
2470
|
-
__metadata("design:type", Boolean)
|
|
2471
|
-
], MultipleSelectInputComponent.prototype, "allowNil", void 0);
|
|
2472
|
-
__decorate([
|
|
2473
|
-
core.ContentChild('optionTemplate'),
|
|
2474
|
-
__metadata("design:type", core.TemplateRef)
|
|
2475
|
-
], MultipleSelectInputComponent.prototype, "optionTemplateRef", void 0);
|
|
2476
|
-
__decorate([
|
|
2477
|
-
core.ContentChild('nilOptionTemplate'),
|
|
2478
|
-
__metadata("design:type", core.TemplateRef)
|
|
2479
|
-
], MultipleSelectInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
2480
|
-
__decorate([
|
|
2481
|
-
core.Input(),
|
|
2482
|
-
__metadata("design:type", Function)
|
|
2483
|
-
], MultipleSelectInputComponent.prototype, "optionLabelFormat", void 0);
|
|
2484
|
-
MultipleSelectInputComponent = __decorate([
|
|
2485
|
-
core.Component({
|
|
2486
|
-
selector: 'aup-multiple-select-input',
|
|
2487
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [(ngModel)]=\"listModel.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\">{{placeholder}}</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",
|
|
2488
|
-
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
2489
|
-
}),
|
|
2490
|
-
__metadata("design:paramtypes", [])
|
|
2491
|
-
], MultipleSelectInputComponent);
|
|
2492
|
-
return MultipleSelectInputComponent;
|
|
2493
|
-
}(AbstractListInputComponent));
|
|
2494
|
-
|
|
2495
|
-
var IconComponent = /** @class */ (function () {
|
|
2496
|
-
function IconComponent() {
|
|
2497
|
-
}
|
|
2498
|
-
Object.defineProperty(IconComponent.prototype, "icon", {
|
|
2499
|
-
get: function () {
|
|
2500
|
-
return this._icon;
|
|
2501
|
-
},
|
|
2502
|
-
set: function (iconName) {
|
|
2503
|
-
this._icon = iconName;
|
|
2504
|
-
if (!iconName) {
|
|
2505
|
-
this.errorMessage = 'icon is nil';
|
|
2506
|
-
this.prefix = undefined;
|
|
2507
|
-
return;
|
|
2508
|
-
}
|
|
2509
|
-
var colonIndex = iconName.indexOf(':');
|
|
2510
|
-
if (colonIndex > 0) {
|
|
2511
|
-
this.prefix = this.icon.slice(0, colonIndex);
|
|
2512
|
-
this.suffix = this.icon.slice(colonIndex + 1);
|
|
2513
|
-
}
|
|
2514
|
-
if (this.prefix) {
|
|
2515
|
-
this.errorMessage = "Unknown icon \"" + iconName + "\"";
|
|
2516
|
-
}
|
|
2517
|
-
this.errorMessage = "Unknown icon prefix \"" + this.prefix + "\"";
|
|
2518
|
-
},
|
|
2519
|
-
enumerable: true,
|
|
2520
|
-
configurable: true
|
|
2521
|
-
});
|
|
2522
|
-
__decorate([
|
|
2523
|
-
core.Input(),
|
|
2524
|
-
__metadata("design:type", String),
|
|
2525
|
-
__metadata("design:paramtypes", [String])
|
|
2526
|
-
], IconComponent.prototype, "icon", null);
|
|
2527
|
-
IconComponent = __decorate([
|
|
2528
|
-
core.Component({
|
|
2529
|
-
selector: 'aup-icon',
|
|
2530
|
-
template: "<ng-container [ngSwitch]=\"prefix\">\n\n <mat-icon *ngSwitchCase=\"'svg'\"\n [svgIcon]=\"suffix\"\n class=\"svgIcon\">\n </mat-icon>\n\n <mat-icon *ngSwitchCase=\"'mat'\">\n {{suffix}}\n </mat-icon>\n\n <div *ngSwitchCase=\"'fab'\"\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",
|
|
2531
|
-
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}"]
|
|
2532
|
-
})
|
|
2533
|
-
], IconComponent);
|
|
2534
|
-
return IconComponent;
|
|
2535
|
-
}());
|
|
2536
|
-
|
|
2537
3309
|
var ComponentsModule = /** @class */ (function () {
|
|
2538
3310
|
function ComponentsModule(faIconLibrary) {
|
|
2539
3311
|
faIconLibrary.addIconPacks(freeSolidSvgIcons.fas);
|
|
@@ -2552,6 +3324,8 @@
|
|
|
2552
3324
|
TextInputComponent,
|
|
2553
3325
|
PasswordInputComponent,
|
|
2554
3326
|
SelectInputComponent,
|
|
3327
|
+
MultipleSelectInputComponent,
|
|
3328
|
+
AutocompleteInputComponent,
|
|
2555
3329
|
CheckboxInputComponent,
|
|
2556
3330
|
ScrollContainerComponent,
|
|
2557
3331
|
NoopComponent,
|
|
@@ -2571,9 +3345,16 @@
|
|
|
2571
3345
|
SelectHeaderCellRendererComponent,
|
|
2572
3346
|
DefaultHeaderCellRendererComponent,
|
|
2573
3347
|
TableHeaderCellRendererComponent,
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
3348
|
+
exports.ɵbk,
|
|
3349
|
+
SectionHeaderComponent,
|
|
3350
|
+
TableRowMenuComponent,
|
|
3351
|
+
CommandBarComponent,
|
|
3352
|
+
CommandComponent,
|
|
3353
|
+
PopupMenuComponent,
|
|
3354
|
+
CommandFaceComponent,
|
|
3355
|
+
AbstractPopupMenuComponent,
|
|
3356
|
+
PopupMenuRendererComponent,
|
|
3357
|
+
MoreMenuComponent
|
|
2577
3358
|
],
|
|
2578
3359
|
imports: [
|
|
2579
3360
|
common.CommonModule,
|
|
@@ -2591,7 +3372,10 @@
|
|
|
2591
3372
|
portal.PortalModule,
|
|
2592
3373
|
scrolling.CdkScrollableModule,
|
|
2593
3374
|
angularFontawesome.FontAwesomeModule,
|
|
2594
|
-
tooltip.MatTooltipModule
|
|
3375
|
+
tooltip.MatTooltipModule,
|
|
3376
|
+
autocomplete.MatAutocompleteModule,
|
|
3377
|
+
menu._MatMenuDirectivesModule,
|
|
3378
|
+
menu.MatMenuModule
|
|
2595
3379
|
],
|
|
2596
3380
|
exports: [
|
|
2597
3381
|
NumberInputComponent,
|
|
@@ -2600,6 +3384,8 @@
|
|
|
2600
3384
|
PasswordInputComponent,
|
|
2601
3385
|
CheckboxInputComponent,
|
|
2602
3386
|
SelectInputComponent,
|
|
3387
|
+
MultipleSelectInputComponent,
|
|
3388
|
+
AutocompleteInputComponent,
|
|
2603
3389
|
ScrollContainerComponent,
|
|
2604
3390
|
NoopComponent,
|
|
2605
3391
|
SwitchCaseComponent,
|
|
@@ -2612,12 +3398,31 @@
|
|
|
2612
3398
|
TableComponent,
|
|
2613
3399
|
EditRowControls,
|
|
2614
3400
|
ColumnTemplateDirective,
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
3401
|
+
exports.ɵbk,
|
|
3402
|
+
SectionHeaderComponent,
|
|
3403
|
+
TableRowMenuComponent,
|
|
3404
|
+
CommandBarComponent,
|
|
3405
|
+
CommandComponent,
|
|
3406
|
+
AbstractPopupMenuComponent,
|
|
3407
|
+
PopupMenuComponent,
|
|
3408
|
+
CommandFaceComponent,
|
|
3409
|
+
PopupMenuRendererComponent,
|
|
3410
|
+
MoreMenuComponent
|
|
2618
3411
|
],
|
|
2619
3412
|
providers: [
|
|
2620
|
-
FocusBindingFactory
|
|
3413
|
+
FocusBindingFactory
|
|
3414
|
+
// {
|
|
3415
|
+
// provide: CELL_EDITOR_REGISTRATION, useValue: {
|
|
3416
|
+
// type: 'string',
|
|
3417
|
+
// editorClass: StringInputComponent
|
|
3418
|
+
// }, multi: true
|
|
3419
|
+
// },
|
|
3420
|
+
// {
|
|
3421
|
+
// provide: CELL_EDITOR_REGISTRATION, useValue: {
|
|
3422
|
+
// type: 'number',
|
|
3423
|
+
// editorClass: NumberInputComponent
|
|
3424
|
+
// }, multi: true
|
|
3425
|
+
// }
|
|
2621
3426
|
]
|
|
2622
3427
|
}),
|
|
2623
3428
|
__metadata("design:paramtypes", [angularFontawesome.FaIconLibrary])
|
|
@@ -2954,7 +3759,7 @@
|
|
|
2954
3759
|
},
|
|
2955
3760
|
set: function (activityRef) {
|
|
2956
3761
|
if (this.activityRef && !this.activityRef.isComplete()) {
|
|
2957
|
-
typescriptUtilities.lang.illegalState(
|
|
3762
|
+
typescriptUtilities.lang.illegalState('changing activity before previous one has completed');
|
|
2958
3763
|
}
|
|
2959
3764
|
this._activityRef = activityRef;
|
|
2960
3765
|
this.loadActivity(activityRef);
|
|
@@ -3019,6 +3824,11 @@
|
|
|
3019
3824
|
_this.dynamicHeight = false;
|
|
3020
3825
|
_this.activityTabs = [];
|
|
3021
3826
|
_this.garbage = new pectin.GarbageCollector();
|
|
3827
|
+
// We have issues where angular is triggering a leave animation when an
|
|
3828
|
+
// activity is replaced by another, but is not running the enter animation
|
|
3829
|
+
// when it is scrolled back into view. So we track the tab changes and
|
|
3830
|
+
// disable all animations inside the tab while we're animating.
|
|
3831
|
+
_this.inTabChange = new pectin.MutableValueModel(false);
|
|
3022
3832
|
return _this;
|
|
3023
3833
|
}
|
|
3024
3834
|
ActivityContainerComponent.prototype.ngOnInit = function () {
|
|
@@ -3056,6 +3866,7 @@
|
|
|
3056
3866
|
ActivityContainerComponent.prototype.registerDisposable = function (disposable) {
|
|
3057
3867
|
return this.garbage.registerDisposable(disposable);
|
|
3058
3868
|
};
|
|
3869
|
+
// @Trace()
|
|
3059
3870
|
ActivityContainerComponent.prototype.dispose = function () {
|
|
3060
3871
|
// TODO: think about auto cancelling any outstanding activity on dispose.
|
|
3061
3872
|
// See NavigationState.Navigating for a use-case.
|
|
@@ -3162,6 +3973,7 @@
|
|
|
3162
3973
|
this.onAnimationFinishedJob();
|
|
3163
3974
|
this.onAnimationFinishedJob = undefined;
|
|
3164
3975
|
}
|
|
3976
|
+
this.inTabChange.value = false;
|
|
3165
3977
|
};
|
|
3166
3978
|
/**
|
|
3167
3979
|
* Synchronises the selected tab index.
|
|
@@ -3171,6 +3983,7 @@
|
|
|
3171
3983
|
var previousIndex = this.tabs.selectedIndex;
|
|
3172
3984
|
var newIndex = this.getActiveActivityCount() - 1;
|
|
3173
3985
|
if (previousIndex !== newIndex) {
|
|
3986
|
+
this.inTabChange.value = true;
|
|
3174
3987
|
this.tabs.selectedIndex = newIndex;
|
|
3175
3988
|
this.onAnimationFinishedJob = function () {
|
|
3176
3989
|
_this.getSelectedOutlet().component.onActivityReady();
|
|
@@ -3181,7 +3994,9 @@
|
|
|
3181
3994
|
ActivityContainerComponent.prototype.getSelectedOutlet = function () {
|
|
3182
3995
|
return this.activityOutlets.toArray()[this.tabs.selectedIndex];
|
|
3183
3996
|
};
|
|
3184
|
-
|
|
3997
|
+
ActivityContainerComponent.prototype.getSelectedTabIndex = function () {
|
|
3998
|
+
return this.tabs.selectedIndex;
|
|
3999
|
+
};
|
|
3185
4000
|
ActivityContainerComponent.prototype.triggerTabSynchronisation = function () {
|
|
3186
4001
|
var _this = this;
|
|
3187
4002
|
if (this.syncSelectedTabTimeout) {
|
|
@@ -3209,11 +4024,29 @@
|
|
|
3209
4024
|
__metadata("design:type", Function),
|
|
3210
4025
|
__metadata("design:paramtypes", []),
|
|
3211
4026
|
__metadata("design:returntype", void 0)
|
|
3212
|
-
], ActivityContainerComponent.prototype, "
|
|
4027
|
+
], ActivityContainerComponent.prototype, "onAnimationFinished", null);
|
|
4028
|
+
__decorate([
|
|
4029
|
+
pectin.Trace(),
|
|
4030
|
+
__metadata("design:type", Function),
|
|
4031
|
+
__metadata("design:paramtypes", []),
|
|
4032
|
+
__metadata("design:returntype", void 0)
|
|
4033
|
+
], ActivityContainerComponent.prototype, "synchroniseSelectedTabIndex", null);
|
|
4034
|
+
__decorate([
|
|
4035
|
+
pectin.Trace(),
|
|
4036
|
+
__metadata("design:type", Function),
|
|
4037
|
+
__metadata("design:paramtypes", []),
|
|
4038
|
+
__metadata("design:returntype", void 0)
|
|
4039
|
+
], ActivityContainerComponent.prototype, "getSelectedTabIndex", null);
|
|
4040
|
+
__decorate([
|
|
4041
|
+
pectin.Trace(),
|
|
4042
|
+
__metadata("design:type", Function),
|
|
4043
|
+
__metadata("design:paramtypes", []),
|
|
4044
|
+
__metadata("design:returntype", void 0)
|
|
4045
|
+
], ActivityContainerComponent.prototype, "triggerTabSynchronisation", null);
|
|
3213
4046
|
ActivityContainerComponent = __decorate([
|
|
3214
4047
|
core.Component({
|
|
3215
4048
|
selector: 'aup-activity-container',
|
|
3216
|
-
template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let tab of activityTabs; trackBy: activityIndex\" >\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"tab\"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n",
|
|
4049
|
+
template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let tab of activityTabs; let i = index; trackBy: activityIndex\" [@.disabled]=\"inTabChange.value\">\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"tab\"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n",
|
|
3217
4050
|
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
|
|
3218
4051
|
}),
|
|
3219
4052
|
__metadata("design:paramtypes", [])
|
|
@@ -3258,7 +4091,7 @@
|
|
|
3258
4091
|
}());
|
|
3259
4092
|
|
|
3260
4093
|
var inplaceMonitorCount = 0;
|
|
3261
|
-
exports.ɵ
|
|
4094
|
+
exports.ɵcf = /** @class */ (function () {
|
|
3262
4095
|
function InteractionService(modelInteractionContextFactory) {
|
|
3263
4096
|
this.modelInteractionContextFactory = modelInteractionContextFactory;
|
|
3264
4097
|
this.garbage = new pectin.GarbageCollector();
|
|
@@ -3403,7 +4236,7 @@
|
|
|
3403
4236
|
return ApiAdapter;
|
|
3404
4237
|
}());
|
|
3405
4238
|
InteractionService.ApiAdapter = ApiAdapter;
|
|
3406
|
-
})(exports.ɵ
|
|
4239
|
+
})(exports.ɵcf || (exports.ɵcf = {}));
|
|
3407
4240
|
|
|
3408
4241
|
var InPlaceInteractionContextComponent = /** @class */ (function (_super) {
|
|
3409
4242
|
__extends(InPlaceInteractionContextComponent, _super);
|
|
@@ -3461,7 +4294,7 @@
|
|
|
3461
4294
|
return this.activityContainerComponent.startActivity(activityType, data, options);
|
|
3462
4295
|
};
|
|
3463
4296
|
InPlaceInteractionContextComponent.ctorParameters = function () { return [
|
|
3464
|
-
{ type: exports.ɵ
|
|
4297
|
+
{ type: exports.ɵcf },
|
|
3465
4298
|
{ type: undefined, decorators: [{ type: core.Inject, args: [tabs.MAT_TABS_CONFIG,] }, { type: core.Optional }] }
|
|
3466
4299
|
]; };
|
|
3467
4300
|
__decorate([
|
|
@@ -3479,7 +4312,7 @@
|
|
|
3479
4312
|
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
|
|
3480
4313
|
}),
|
|
3481
4314
|
__param(1, core.Inject(tabs.MAT_TABS_CONFIG)), __param(1, core.Optional()),
|
|
3482
|
-
__metadata("design:paramtypes", [exports.ɵ
|
|
4315
|
+
__metadata("design:paramtypes", [exports.ɵcf, Object])
|
|
3483
4316
|
], InPlaceInteractionContextComponent);
|
|
3484
4317
|
return InPlaceInteractionContextComponent;
|
|
3485
4318
|
}(DisposableComponent));
|
|
@@ -4018,7 +4851,7 @@
|
|
|
4018
4851
|
AlertDialogComponent
|
|
4019
4852
|
],
|
|
4020
4853
|
providers: [
|
|
4021
|
-
exports.ɵ
|
|
4854
|
+
exports.ɵcf
|
|
4022
4855
|
// {
|
|
4023
4856
|
// provide: MAT_TABS_CONFIG, useValue: { animationDuration: "2s" }
|
|
4024
4857
|
// }
|
|
@@ -4293,7 +5126,7 @@
|
|
|
4293
5126
|
pectin.assert.isNil(this.visitModel.value);
|
|
4294
5127
|
var when = pectin.Dsl.disposeWith(this).when;
|
|
4295
5128
|
this.visitModel.value = visit;
|
|
4296
|
-
pectin.DebugContext.
|
|
5129
|
+
pectin.DebugContext.getOrCreate(this.visitModel).tag(this.placeDefinition.component.name + ".visitModel");
|
|
4297
5130
|
this.placeDefinition.getVisitParameterDefs().forEach(function (parameterDef) { return _this.installBinding(parameterDef); });
|
|
4298
5131
|
when.valueOf(this.visitModel).changes(function (current, previous) {
|
|
4299
5132
|
notifyVisitChanged(current, previous);
|
|
@@ -5140,7 +5973,7 @@
|
|
|
5140
5973
|
return PopStateNavigation;
|
|
5141
5974
|
}(AbstractPopStateNavigation));
|
|
5142
5975
|
|
|
5143
|
-
exports.ɵ
|
|
5976
|
+
exports.ɵci = /** @class */ (function () {
|
|
5144
5977
|
function PlaceHistory() {
|
|
5145
5978
|
this._archive = new Map();
|
|
5146
5979
|
this.placeHistoryDepth = 4;
|
|
@@ -5277,7 +6110,7 @@
|
|
|
5277
6110
|
// }
|
|
5278
6111
|
//
|
|
5279
6112
|
// }
|
|
5280
|
-
})(exports.ɵ
|
|
6113
|
+
})(exports.ɵci || (exports.ɵci = {}));
|
|
5281
6114
|
|
|
5282
6115
|
exports.UrlSnapshot = /** @class */ (function () {
|
|
5283
6116
|
// TODO: Update this accept a url Parser so it can be immutable and generate new trees on mutation using toString() are parseUrl.
|
|
@@ -5441,75 +6274,6 @@
|
|
|
5441
6274
|
return UrlService;
|
|
5442
6275
|
}());
|
|
5443
6276
|
|
|
5444
|
-
var Visit = /** @class */ (function () {
|
|
5445
|
-
function Visit(placeDefinition, visitParameters) {
|
|
5446
|
-
if (visitParameters === void 0) { visitParameters = {}; }
|
|
5447
|
-
this.placeDefinition = placeDefinition;
|
|
5448
|
-
this.visitParameters = visitParameters;
|
|
5449
|
-
}
|
|
5450
|
-
// @Trace()
|
|
5451
|
-
Visit.prototype.getRouteId = function () {
|
|
5452
|
-
return this.placeDefinition.getRouteIdFrom(this);
|
|
5453
|
-
};
|
|
5454
|
-
// @Trace()
|
|
5455
|
-
Visit.prototype.hasRouteId = function () {
|
|
5456
|
-
return !___default.isNil(this.getRouteId());
|
|
5457
|
-
};
|
|
5458
|
-
/**
|
|
5459
|
-
* Returns the value of the place parameter with the specified name. The parameter
|
|
5460
|
-
* name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the
|
|
5461
|
-
* same as the the ValueModel property name.
|
|
5462
|
-
* @param parameterName the field name of the property model or the `as` option if specified.
|
|
5463
|
-
*/
|
|
5464
|
-
Visit.prototype.getParameter = function (parameterName) {
|
|
5465
|
-
return this.visitParameters[parameterName];
|
|
5466
|
-
};
|
|
5467
|
-
// @Trace()
|
|
5468
|
-
Visit.prototype.hasParameter = function (parameterName) {
|
|
5469
|
-
return Object.keys(this.visitParameters).includes(parameterName);
|
|
5470
|
-
};
|
|
5471
|
-
Visit.prototype.replace = function (parameter, value) {
|
|
5472
|
-
var _a;
|
|
5473
|
-
return new Visit(this.placeDefinition, __assign(__assign({}, this.visitParameters), (_a = {}, _a[parameter.name] = value, _a)));
|
|
5474
|
-
};
|
|
5475
|
-
Visit.prototype.mergeRouteParameters = function (routeParams) {
|
|
5476
|
-
var _this = this;
|
|
5477
|
-
// todo: whitelist parameters.
|
|
5478
|
-
var routeParameterKeys = Object.keys(routeParams);
|
|
5479
|
-
var params = {};
|
|
5480
|
-
this.placeDefinition.getVisitParameterDefs().forEach(function (def) {
|
|
5481
|
-
if (def.isRouteId || def.isRouteParameter) {
|
|
5482
|
-
if (routeParameterKeys.includes(def.name)) {
|
|
5483
|
-
params[def.name] = routeParams[def.name];
|
|
5484
|
-
}
|
|
5485
|
-
}
|
|
5486
|
-
else {
|
|
5487
|
-
// copy non route params as is, but only if they already exist otherwise we'll inject nil values and break the
|
|
5488
|
-
// defaults and remember sanitisation process.
|
|
5489
|
-
var value = _this.getParameter(def.name);
|
|
5490
|
-
if (_this.hasParameter(def.name)) {
|
|
5491
|
-
params[def.name] = value;
|
|
5492
|
-
}
|
|
5493
|
-
}
|
|
5494
|
-
});
|
|
5495
|
-
return new Visit(this.placeDefinition, params);
|
|
5496
|
-
};
|
|
5497
|
-
Visit.prototype.hasRoutingChangedFrom = function (other) {
|
|
5498
|
-
var samePlace = other.placeDefinition === this.placeDefinition;
|
|
5499
|
-
var sameRouteParameters = ___default.isEqual(this.placeDefinition.getFormattedRouteParameters(this, true), this.placeDefinition.getFormattedRouteParameters(other, true));
|
|
5500
|
-
return !samePlace || !sameRouteParameters;
|
|
5501
|
-
};
|
|
5502
|
-
Visit.prototype.hasChangedFrom = function (other) {
|
|
5503
|
-
var sameNonRouteParameters = ___default.isEqual(this.placeDefinition.getNonRouteParameters(this), this.placeDefinition.getNonRouteParameters(other));
|
|
5504
|
-
return !sameNonRouteParameters || this.hasRoutingChangedFrom(other);
|
|
5505
|
-
};
|
|
5506
|
-
Visit.prototype.toDebugString = function () {
|
|
5507
|
-
var _this = this;
|
|
5508
|
-
return Object.keys(this.visitParameters).map(function (k) { return k + "=" + _this.visitParameters[k]; }).join(",");
|
|
5509
|
-
};
|
|
5510
|
-
return Visit;
|
|
5511
|
-
}());
|
|
5512
|
-
|
|
5513
6277
|
var PlaceRouter = /** @class */ (function (_super) {
|
|
5514
6278
|
__extends(PlaceRouter, _super);
|
|
5515
6279
|
function PlaceRouter(angularRouter, angularLocation, interactionService, urlService, placeHistory) {
|
|
@@ -5705,6 +6469,7 @@
|
|
|
5705
6469
|
enumerable: true,
|
|
5706
6470
|
configurable: true
|
|
5707
6471
|
});
|
|
6472
|
+
// @Trace()
|
|
5708
6473
|
PlaceRouter.prototype.pushVisitChangesToRoute = function (previous, next) {
|
|
5709
6474
|
return __awaiter(this, void 0, void 0, function () {
|
|
5710
6475
|
var _this = this;
|
|
@@ -5800,30 +6565,93 @@
|
|
|
5800
6565
|
PlaceRouter.ctorParameters = function () { return [
|
|
5801
6566
|
{ type: router.Router },
|
|
5802
6567
|
{ type: common.Location },
|
|
5803
|
-
{ type: exports.ɵ
|
|
6568
|
+
{ type: exports.ɵcf },
|
|
5804
6569
|
{ type: UrlService },
|
|
5805
|
-
{ type: exports.ɵ
|
|
6570
|
+
{ type: exports.ɵci }
|
|
5806
6571
|
]; };
|
|
5807
|
-
PlaceRouter.ɵprov = core.ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(core.ɵɵinject(router.Router), core.ɵɵinject(common.Location), core.ɵɵinject(exports.ɵ
|
|
5808
|
-
__decorate([
|
|
5809
|
-
pectin.Trace(),
|
|
5810
|
-
__metadata("design:type", Function),
|
|
5811
|
-
__metadata("design:paramtypes", [Visit, Visit]),
|
|
5812
|
-
__metadata("design:returntype", Promise)
|
|
5813
|
-
], PlaceRouter.prototype, "pushVisitChangesToRoute", null);
|
|
6572
|
+
PlaceRouter.ɵprov = core.ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(core.ɵɵinject(router.Router), core.ɵɵinject(common.Location), core.ɵɵinject(exports.ɵcf), core.ɵɵinject(UrlService), core.ɵɵinject(exports.ɵci)); }, token: PlaceRouter, providedIn: "root" });
|
|
5814
6573
|
PlaceRouter = __decorate([
|
|
5815
6574
|
core.Injectable({
|
|
5816
6575
|
providedIn: 'root'
|
|
5817
6576
|
}),
|
|
5818
6577
|
__metadata("design:paramtypes", [router.Router,
|
|
5819
6578
|
common.Location,
|
|
5820
|
-
exports.ɵ
|
|
6579
|
+
exports.ɵcf,
|
|
5821
6580
|
UrlService,
|
|
5822
|
-
exports.ɵ
|
|
6581
|
+
exports.ɵci])
|
|
5823
6582
|
], PlaceRouter);
|
|
5824
6583
|
return PlaceRouter;
|
|
5825
6584
|
}(pectin.GarbageCollector));
|
|
5826
6585
|
|
|
6586
|
+
var Visit = /** @class */ (function () {
|
|
6587
|
+
function Visit(placeDefinition, visitParameters) {
|
|
6588
|
+
if (visitParameters === void 0) { visitParameters = {}; }
|
|
6589
|
+
this.placeDefinition = placeDefinition;
|
|
6590
|
+
this.visitParameters = visitParameters;
|
|
6591
|
+
}
|
|
6592
|
+
// @Trace()
|
|
6593
|
+
Visit.prototype.getRouteId = function () {
|
|
6594
|
+
return this.placeDefinition.getRouteIdFrom(this);
|
|
6595
|
+
};
|
|
6596
|
+
// @Trace()
|
|
6597
|
+
Visit.prototype.hasRouteId = function () {
|
|
6598
|
+
return !___default.isNil(this.getRouteId());
|
|
6599
|
+
};
|
|
6600
|
+
/**
|
|
6601
|
+
* Returns the value of the place parameter with the specified name. The parameter
|
|
6602
|
+
* name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the
|
|
6603
|
+
* same as the the ValueModel property name.
|
|
6604
|
+
* @param parameterName the field name of the property model or the `as` option if specified.
|
|
6605
|
+
*/
|
|
6606
|
+
Visit.prototype.getParameter = function (parameterName) {
|
|
6607
|
+
return this.visitParameters[parameterName];
|
|
6608
|
+
};
|
|
6609
|
+
// @Trace()
|
|
6610
|
+
Visit.prototype.hasParameter = function (parameterName) {
|
|
6611
|
+
return Object.keys(this.visitParameters).includes(parameterName);
|
|
6612
|
+
};
|
|
6613
|
+
Visit.prototype.replace = function (parameter, value) {
|
|
6614
|
+
var _a;
|
|
6615
|
+
return new Visit(this.placeDefinition, __assign(__assign({}, this.visitParameters), (_a = {}, _a[parameter.name] = value, _a)));
|
|
6616
|
+
};
|
|
6617
|
+
Visit.prototype.mergeRouteParameters = function (routeParams) {
|
|
6618
|
+
var _this = this;
|
|
6619
|
+
// todo: whitelist parameters.
|
|
6620
|
+
var routeParameterKeys = Object.keys(routeParams);
|
|
6621
|
+
var params = {};
|
|
6622
|
+
this.placeDefinition.getVisitParameterDefs().forEach(function (def) {
|
|
6623
|
+
if (def.isRouteId || def.isRouteParameter) {
|
|
6624
|
+
if (routeParameterKeys.includes(def.name)) {
|
|
6625
|
+
params[def.name] = routeParams[def.name];
|
|
6626
|
+
}
|
|
6627
|
+
}
|
|
6628
|
+
else {
|
|
6629
|
+
// copy non route params as is, but only if they already exist otherwise we'll inject nil values and break the
|
|
6630
|
+
// defaults and remember sanitisation process.
|
|
6631
|
+
var value = _this.getParameter(def.name);
|
|
6632
|
+
if (_this.hasParameter(def.name)) {
|
|
6633
|
+
params[def.name] = value;
|
|
6634
|
+
}
|
|
6635
|
+
}
|
|
6636
|
+
});
|
|
6637
|
+
return new Visit(this.placeDefinition, params);
|
|
6638
|
+
};
|
|
6639
|
+
Visit.prototype.hasRoutingChangedFrom = function (other) {
|
|
6640
|
+
var samePlace = other.placeDefinition === this.placeDefinition;
|
|
6641
|
+
var sameRouteParameters = ___default.isEqual(this.placeDefinition.getFormattedRouteParameters(this, true), this.placeDefinition.getFormattedRouteParameters(other, true));
|
|
6642
|
+
return !samePlace || !sameRouteParameters;
|
|
6643
|
+
};
|
|
6644
|
+
Visit.prototype.hasChangedFrom = function (other) {
|
|
6645
|
+
var sameNonRouteParameters = ___default.isEqual(this.placeDefinition.getNonRouteParameters(this), this.placeDefinition.getNonRouteParameters(other));
|
|
6646
|
+
return !sameNonRouteParameters || this.hasRoutingChangedFrom(other);
|
|
6647
|
+
};
|
|
6648
|
+
Visit.prototype.toDebugString = function () {
|
|
6649
|
+
var _this = this;
|
|
6650
|
+
return Object.keys(this.visitParameters).map(function (k) { return k + "=" + _this.visitParameters[k]; }).join(",");
|
|
6651
|
+
};
|
|
6652
|
+
return Visit;
|
|
6653
|
+
}());
|
|
6654
|
+
|
|
5827
6655
|
var AUP_PLACE_CONFIG = new core.InjectionToken('AUP_PLACE_CONFIG');
|
|
5828
6656
|
|
|
5829
6657
|
// Freezes the state of the components at the start of the animation.
|
|
@@ -6838,8 +7666,7 @@
|
|
|
6838
7666
|
binding: null
|
|
6839
7667
|
};
|
|
6840
7668
|
var tag = tagPrefix + "(" + prototype.constructor.name + "." + propertyKey.toString() + ")";
|
|
6841
|
-
pectin.DebugContext.
|
|
6842
|
-
pectin.Logger.get(mechanics.backingModel).tag(tag);
|
|
7669
|
+
pectin.DebugContext.getOrCreate(mechanics.backingModel).tag(tag);
|
|
6843
7670
|
Object.defineProperty(prototype, propertyKey, {
|
|
6844
7671
|
get: function () {
|
|
6845
7672
|
return mechanics.backingModel;
|
|
@@ -6901,6 +7728,7 @@
|
|
|
6901
7728
|
exports.AbstractListInputComponent = AbstractListInputComponent;
|
|
6902
7729
|
exports.AbstractPlaceNavigationComponent = AbstractPlaceNavigationComponent;
|
|
6903
7730
|
exports.AbstractPopStateNavigation = AbstractPopStateNavigation;
|
|
7731
|
+
exports.AbstractPopupMenuComponent = AbstractPopupMenuComponent;
|
|
6904
7732
|
exports.AbstractValueInputComponent = AbstractValueInputComponent;
|
|
6905
7733
|
exports.Activity = Activity;
|
|
6906
7734
|
exports.ActivityActionsComponent = ActivityActionsComponent;
|
|
@@ -6910,6 +7738,7 @@
|
|
|
6910
7738
|
exports.AddItemInteractionContextComponent = AddItemInteractionContextComponent;
|
|
6911
7739
|
exports.AlertDialogComponent = AlertDialogComponent;
|
|
6912
7740
|
exports.AngularUiPowerupsModule = AngularUiPowerupsModule;
|
|
7741
|
+
exports.AutocompleteInputComponent = AutocompleteInputComponent;
|
|
6913
7742
|
exports.BusyOverlayComponent = BusyOverlayComponent;
|
|
6914
7743
|
exports.CELL_EDITOR_PORTAL = CELL_EDITOR_PORTAL;
|
|
6915
7744
|
exports.CELL_RENDERER_PORTAL = CELL_RENDERER_PORTAL;
|
|
@@ -6921,7 +7750,11 @@
|
|
|
6921
7750
|
exports.CheckboxInputComponent = CheckboxInputComponent;
|
|
6922
7751
|
exports.ColumnModel = ColumnModel;
|
|
6923
7752
|
exports.ColumnTemplateDirective = ColumnTemplateDirective;
|
|
7753
|
+
exports.CommandBarComponent = CommandBarComponent;
|
|
7754
|
+
exports.CommandComponent = CommandComponent;
|
|
7755
|
+
exports.CommandContainer = CommandContainer;
|
|
6924
7756
|
exports.CommandDirective = CommandDirective;
|
|
7757
|
+
exports.CommandFaceComponent = CommandFaceComponent;
|
|
6925
7758
|
exports.ComponentCellRendererPortalRef = ComponentCellRendererPortalRef;
|
|
6926
7759
|
exports.ComponentsModule = ComponentsModule;
|
|
6927
7760
|
exports.ConfirmThenDialogComponent = ConfirmThenDialogComponent;
|
|
@@ -6949,16 +7782,17 @@
|
|
|
6949
7782
|
exports.FocusContainerComponent = FocusContainerComponent;
|
|
6950
7783
|
exports.FocusableComponent = FocusableComponent;
|
|
6951
7784
|
exports.HEADER_CELL_RENDERER_PORTAL = HEADER_CELL_RENDERER_PORTAL;
|
|
6952
|
-
exports.IconComponent =
|
|
7785
|
+
exports.IconComponent = exports.ɵbk;
|
|
6953
7786
|
exports.InPlaceInteractionContextComponent = InPlaceInteractionContextComponent;
|
|
6954
7787
|
exports.InteractionContextTriggerFor = InteractionContextTriggerFor;
|
|
6955
7788
|
exports.InteractionModule = InteractionModule;
|
|
6956
|
-
exports.InteractionService = exports.ɵ
|
|
7789
|
+
exports.InteractionService = exports.ɵcf;
|
|
6957
7790
|
exports.InteractionServiceRoutingAdapter = InteractionServiceRoutingAdapter;
|
|
6958
7791
|
exports.LEFT_RIGHT_PLACE_ANIMATION = LEFT_RIGHT_PLACE_ANIMATION;
|
|
6959
7792
|
exports.ListPlaceNavComponent = ListPlaceNavComponent;
|
|
6960
7793
|
exports.ListPropertyColumnModel = ListPropertyColumnModel;
|
|
6961
7794
|
exports.ModalInteractionContextFactory = ModalInteractionContextFactory;
|
|
7795
|
+
exports.MoreMenuComponent = MoreMenuComponent;
|
|
6962
7796
|
exports.MultipleSelectInputComponent = MultipleSelectInputComponent;
|
|
6963
7797
|
exports.Navigating = Navigating;
|
|
6964
7798
|
exports.NavigatingDuringInteraction = NavigatingDuringInteraction;
|
|
@@ -6973,7 +7807,7 @@
|
|
|
6973
7807
|
exports.PlaceComponentDeactivationHandler = PlaceComponentDeactivationHandler;
|
|
6974
7808
|
exports.PlaceDefinition = PlaceDefinition;
|
|
6975
7809
|
exports.PlaceGuard = PlaceGuard;
|
|
6976
|
-
exports.PlaceHistory = exports.ɵ
|
|
7810
|
+
exports.PlaceHistory = exports.ɵci;
|
|
6977
7811
|
exports.PlaceModule = PlaceModule;
|
|
6978
7812
|
exports.PlaceOutletComponent = PlaceOutletComponent;
|
|
6979
7813
|
exports.PlaceRouter = PlaceRouter;
|
|
@@ -6981,6 +7815,8 @@
|
|
|
6981
7815
|
exports.PopStateDuringInteractionNavigation = PopStateDuringInteractionNavigation;
|
|
6982
7816
|
exports.PopStateNavigation = PopStateNavigation;
|
|
6983
7817
|
exports.PopupInteractionContextComponent = PopupInteractionContextComponent;
|
|
7818
|
+
exports.PopupMenuComponent = PopupMenuComponent;
|
|
7819
|
+
exports.PopupMenuRendererComponent = PopupMenuRendererComponent;
|
|
6984
7820
|
exports.PropertyColumnModel = PropertyColumnModel;
|
|
6985
7821
|
exports.ROUTE_PARAMETER_LIST_KEY = ROUTE_PARAMETER_LIST_KEY;
|
|
6986
7822
|
exports.RemoveLastInteractionFromUrlNavigationSession = RemoveLastInteractionFromUrlNavigationSession;
|
|
@@ -7006,6 +7842,7 @@
|
|
|
7006
7842
|
exports.TableComponent = TableComponent;
|
|
7007
7843
|
exports.TableHeaderCellRendererComponent = TableHeaderCellRendererComponent;
|
|
7008
7844
|
exports.TableModel = TableModel;
|
|
7845
|
+
exports.TableRowMenuComponent = TableRowMenuComponent;
|
|
7009
7846
|
exports.TemplateCellRendererPortalRef = TemplateCellRendererPortalRef;
|
|
7010
7847
|
exports.TextInputComponent = TextInputComponent;
|
|
7011
7848
|
exports.UrlService = UrlService;
|
|
@@ -7023,51 +7860,60 @@
|
|
|
7023
7860
|
exports.ɵ0 = ɵ0;
|
|
7024
7861
|
exports.ɵa = DirectivesModule;
|
|
7025
7862
|
exports.ɵb = CommandDirective;
|
|
7026
|
-
exports.ɵba =
|
|
7027
|
-
exports.ɵbb =
|
|
7028
|
-
exports.ɵbc =
|
|
7029
|
-
exports.ɵbd =
|
|
7030
|
-
exports.ɵbe =
|
|
7031
|
-
exports.ɵbf =
|
|
7032
|
-
exports.ɵbg =
|
|
7033
|
-
exports.ɵbh =
|
|
7034
|
-
exports.ɵbi =
|
|
7035
|
-
exports.ɵbj =
|
|
7036
|
-
exports.ɵ
|
|
7037
|
-
exports.ɵ
|
|
7038
|
-
exports.ɵ
|
|
7039
|
-
exports.ɵ
|
|
7040
|
-
exports.ɵ
|
|
7041
|
-
exports.ɵ
|
|
7042
|
-
exports.ɵ
|
|
7043
|
-
exports.ɵ
|
|
7044
|
-
exports.ɵ
|
|
7045
|
-
exports.ɵbu =
|
|
7046
|
-
exports.ɵ
|
|
7047
|
-
exports.ɵ
|
|
7048
|
-
exports.ɵ
|
|
7863
|
+
exports.ɵba = CardContainerComponent;
|
|
7864
|
+
exports.ɵbb = TableComponent;
|
|
7865
|
+
exports.ɵbc = EditRowControls;
|
|
7866
|
+
exports.ɵbd = ColumnTemplateDirective;
|
|
7867
|
+
exports.ɵbe = DefaultCellRendererComponent;
|
|
7868
|
+
exports.ɵbf = TableCellRendererComponent;
|
|
7869
|
+
exports.ɵbg = SelectCellRendererComponent;
|
|
7870
|
+
exports.ɵbh = SelectHeaderCellRendererComponent;
|
|
7871
|
+
exports.ɵbi = DefaultHeaderCellRendererComponent;
|
|
7872
|
+
exports.ɵbj = TableHeaderCellRendererComponent;
|
|
7873
|
+
exports.ɵbl = SectionHeaderComponent;
|
|
7874
|
+
exports.ɵbm = TableRowMenuComponent;
|
|
7875
|
+
exports.ɵbn = CommandBarComponent;
|
|
7876
|
+
exports.ɵbo = CommandContainer;
|
|
7877
|
+
exports.ɵbp = CommandComponent;
|
|
7878
|
+
exports.ɵbq = PopupMenuComponent;
|
|
7879
|
+
exports.ɵbr = AbstractPopupMenuComponent;
|
|
7880
|
+
exports.ɵbs = PopupMenuRendererComponent;
|
|
7881
|
+
exports.ɵbt = CommandFaceComponent;
|
|
7882
|
+
exports.ɵbu = MoreMenuComponent;
|
|
7883
|
+
exports.ɵbv = PlaceModule;
|
|
7884
|
+
exports.ɵbw = ComponentsModule;
|
|
7885
|
+
exports.ɵbx = EmptyStateComponent;
|
|
7886
|
+
exports.ɵby = BusyOverlayComponent;
|
|
7887
|
+
exports.ɵbz = PlaceOutletComponent;
|
|
7049
7888
|
exports.ɵc = FocusBindingDirective;
|
|
7050
|
-
exports.ɵca =
|
|
7051
|
-
exports.ɵcb =
|
|
7052
|
-
exports.ɵcc =
|
|
7053
|
-
exports.ɵ
|
|
7054
|
-
exports.ɵ
|
|
7055
|
-
exports.ɵ
|
|
7056
|
-
exports.ɵ
|
|
7057
|
-
exports.ɵ
|
|
7058
|
-
exports.ɵ
|
|
7059
|
-
exports.ɵ
|
|
7060
|
-
exports.ɵ
|
|
7061
|
-
exports.ɵ
|
|
7062
|
-
exports.ɵ
|
|
7063
|
-
exports.ɵ
|
|
7064
|
-
exports.ɵ
|
|
7065
|
-
exports.ɵ
|
|
7066
|
-
exports.ɵ
|
|
7067
|
-
exports.ɵ
|
|
7068
|
-
exports.ɵ
|
|
7069
|
-
exports.ɵ
|
|
7889
|
+
exports.ɵca = leftRightPlaceAnimation;
|
|
7890
|
+
exports.ɵcb = LEFT_RIGHT_PLACE_ANIMATION;
|
|
7891
|
+
exports.ɵcc = AUP_PLACE_CONFIG;
|
|
7892
|
+
exports.ɵce = PlaceRouter;
|
|
7893
|
+
exports.ɵcg = ModalInteractionContextFactory;
|
|
7894
|
+
exports.ɵch = UrlService;
|
|
7895
|
+
exports.ɵcj = TabbedPlaceNavigationComponent;
|
|
7896
|
+
exports.ɵck = AbstractPlaceNavigationComponent;
|
|
7897
|
+
exports.ɵcl = ListPlaceNavComponent;
|
|
7898
|
+
exports.ɵcm = SidePlaceNavigationComponent;
|
|
7899
|
+
exports.ɵcn = InteractionModule;
|
|
7900
|
+
exports.ɵco = ActivityContainerComponent;
|
|
7901
|
+
exports.ɵcp = AbstractInteractionContext;
|
|
7902
|
+
exports.ɵcq = ActivityOutletComponent;
|
|
7903
|
+
exports.ɵcr = ConfirmationDialogComponent;
|
|
7904
|
+
exports.ɵcs = ACTIVITY_DATA;
|
|
7905
|
+
exports.ɵct = Activity;
|
|
7906
|
+
exports.ɵcv = ConfirmThenDialogComponent;
|
|
7907
|
+
exports.ɵcw = AlertDialogComponent;
|
|
7908
|
+
exports.ɵcy = InPlaceInteractionContextComponent;
|
|
7909
|
+
exports.ɵcz = AddItemInteractionContextComponent;
|
|
7070
7910
|
exports.ɵd = DisposableComponent;
|
|
7911
|
+
exports.ɵda = ActivityActionsComponent;
|
|
7912
|
+
exports.ɵdb = PopupInteractionContextComponent;
|
|
7913
|
+
exports.ɵdc = StringInputActivity;
|
|
7914
|
+
exports.ɵdd = AbstractInputActivity;
|
|
7915
|
+
exports.ɵde = SelectInputActivity;
|
|
7916
|
+
exports.ɵdf = InteractionContextTriggerFor;
|
|
7071
7917
|
exports.ɵe = FocusBindingFactory;
|
|
7072
7918
|
exports.ɵf = ComponentsModule;
|
|
7073
7919
|
exports.ɵg = AbstractInputComponent;
|
|
@@ -7078,18 +7924,18 @@
|
|
|
7078
7924
|
exports.ɵl = TextInputComponent;
|
|
7079
7925
|
exports.ɵm = PasswordInputComponent;
|
|
7080
7926
|
exports.ɵn = SelectInputComponent;
|
|
7081
|
-
exports.ɵo =
|
|
7082
|
-
exports.ɵp =
|
|
7083
|
-
exports.ɵq =
|
|
7084
|
-
exports.ɵr =
|
|
7085
|
-
exports.ɵs =
|
|
7086
|
-
exports.ɵt =
|
|
7087
|
-
exports.ɵu =
|
|
7088
|
-
exports.ɵv =
|
|
7089
|
-
exports.ɵw =
|
|
7090
|
-
exports.ɵx =
|
|
7091
|
-
exports.ɵy =
|
|
7092
|
-
exports.ɵz =
|
|
7927
|
+
exports.ɵo = MultipleSelectInputComponent;
|
|
7928
|
+
exports.ɵp = AutocompleteInputComponent;
|
|
7929
|
+
exports.ɵq = CheckboxInputComponent;
|
|
7930
|
+
exports.ɵr = ScrollContainerComponent;
|
|
7931
|
+
exports.ɵs = NoopComponent;
|
|
7932
|
+
exports.ɵt = SwitchCaseOption;
|
|
7933
|
+
exports.ɵu = SwitchCaseWhenDirective;
|
|
7934
|
+
exports.ɵv = SwitchCaseDefaultDirective;
|
|
7935
|
+
exports.ɵw = SwitchCaseComponent;
|
|
7936
|
+
exports.ɵx = FocusContainerComponent;
|
|
7937
|
+
exports.ɵy = VerticalFocusContainerComponent;
|
|
7938
|
+
exports.ɵz = FocusableComponent;
|
|
7093
7939
|
|
|
7094
7940
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7095
7941
|
|