@coolon/angular-ui-powerups 1.10.0 → 1.11.1
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 +14 -0
- package/assets/styles.scss +7 -67
- package/bundles/coolon-angular-ui-powerups.umd.js +2649 -1623
- 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 +57 -44
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +55 -42
- 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/components.module.js +37 -6
- 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-activity.js +47 -0
- package/esm2015/lib/components/forms/abstract-input-activity.js.map +1 -0
- package/esm2015/lib/components/forms/abstract-input-activity.metadata.json +1 -0
- package/esm2015/lib/components/forms/abstract-input-activity.ngfactory.js.map +1 -0
- package/esm2015/lib/components/forms/abstract-input.component.js +6 -1
- 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/number-input/number-input.component.js +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 +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/string-input/string-input-activity.js +22 -0
- package/esm2015/lib/components/forms/string-input/string-input-activity.js.map +1 -0
- package/esm2015/lib/components/forms/string-input/string-input-activity.metadata.json +1 -0
- package/esm2015/lib/components/forms/string-input/string-input-activity.ngfactory.js.map +1 -0
- package/esm2015/lib/components/forms/string-input/string-input.component.js +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 +1 -1
- package/esm2015/lib/components/forms/text-input/text-input.component.metadata.json +1 -1
- package/esm2015/lib/components/index.js +13 -0
- package/esm2015/lib/components/index.js.map +1 -1
- package/esm2015/lib/components/index.metadata.json +1 -1
- package/esm2015/lib/components/table/cell-editor.component.js +1 -0
- package/esm2015/lib/components/table/cell-editor.component.js.map +1 -0
- package/esm2015/lib/components/table/cell-editor.component.metadata.json +1 -0
- package/esm2015/lib/components/table/cell-renderer.js +1 -0
- package/esm2015/lib/components/table/cell-renderer.js.map +1 -0
- package/esm2015/lib/components/table/cell-renderer.metadata.json +1 -0
- package/esm2015/lib/components/table/column-model.js +160 -0
- package/esm2015/lib/components/table/column-model.js.map +1 -0
- package/esm2015/lib/components/table/column-model.metadata.json +1 -0
- package/esm2015/lib/components/table/column-template/column-template.directive.js +24 -0
- package/esm2015/lib/components/table/column-template/column-template.directive.js.map +1 -0
- package/esm2015/lib/components/table/column-template/column-template.directive.metadata.json +1 -0
- package/esm2015/lib/components/table/column-template/column-template.directive.ngfactory.js.map +1 -0
- package/esm2015/lib/components/table/column-text-properties.js +1 -0
- package/esm2015/lib/components/table/column-text-properties.js.map +1 -0
- package/esm2015/lib/components/table/column-text-properties.metadata.json +1 -0
- package/esm2015/lib/components/table/default-cell-renderer/default-cell-renderer.component.js +27 -0
- package/esm2015/lib/components/table/default-cell-renderer/default-cell-renderer.component.js.map +1 -0
- package/esm2015/lib/components/table/default-cell-renderer/default-cell-renderer.component.metadata.json +1 -0
- package/esm2015/lib/components/table/default-cell-renderer/default-cell-renderer.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/table/default-cell-renderer/default-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js +21 -0
- package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js.map +1 -0
- package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.metadata.json +1 -0
- package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.js +50 -0
- package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.js.map +1 -0
- package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.metadata.json +1 -0
- package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.js +40 -0
- package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.js.map +1 -0
- package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.metadata.json +1 -0
- package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js +32 -0
- package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js.map +1 -0
- package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.metadata.json +1 -0
- package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +64 -0
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -0
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.metadata.json +1 -0
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/table/table-def.js +1 -0
- package/esm2015/lib/components/table/table-def.js.map +1 -0
- package/esm2015/lib/components/table/table-def.metadata.json +1 -0
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +32 -0
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js.map +1 -0
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.metadata.json +1 -0
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/table/table-model.js +197 -0
- package/esm2015/lib/components/table/table-model.js.map +1 -0
- package/esm2015/lib/components/table/table-model.metadata.json +1 -0
- package/esm2015/lib/components/table/table.component.js +60 -0
- package/esm2015/lib/components/table/table.component.js.map +1 -0
- package/esm2015/lib/components/table/table.component.metadata.json +1 -0
- package/esm2015/lib/components/table/table.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/table/table.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/interaction/activity.js +7 -1
- package/esm2015/lib/interaction/activity.js.map +1 -1
- package/esm2015/lib/interaction/activity.metadata.json +1 -1
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js +87 -0
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js.map +1 -0
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.metadata.json +1 -0
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.ngfactory.js.map +1 -0
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/interaction/directives/interaction-context-trigger-for.directive.js +86 -0
- package/esm2015/lib/interaction/directives/interaction-context-trigger-for.directive.js.map +1 -0
- package/esm2015/lib/interaction/directives/interaction-context-trigger-for.directive.metadata.json +1 -0
- package/esm2015/lib/interaction/directives/interaction-context-trigger-for.directive.ngfactory.js.map +1 -0
- package/esm2015/lib/interaction/index.js +2 -0
- package/esm2015/lib/interaction/index.js.map +1 -1
- package/esm2015/lib/interaction/index.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.js +12 -3
- package/esm2015/lib/interaction/interaction.module.js.map +1 -1
- package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm5/coolon-angular-ui-powerups.js +55 -42
- 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/components.module.js +37 -6
- 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-activity.js +50 -0
- package/esm5/lib/components/forms/abstract-input-activity.js.map +1 -0
- package/esm5/lib/components/forms/abstract-input-activity.ngfactory.js.map +1 -0
- package/esm5/lib/components/forms/abstract-input.component.js +6 -1
- package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm5/lib/components/forms/number-input/number-input.component.js +1 -1
- package/esm5/lib/components/forms/password-input/password-input.component.js +1 -1
- package/esm5/lib/components/forms/string-input/string-input-activity.js +18 -0
- package/esm5/lib/components/forms/string-input/string-input-activity.js.map +1 -0
- package/esm5/lib/components/forms/string-input/string-input-activity.ngfactory.js.map +1 -0
- package/esm5/lib/components/forms/string-input/string-input.component.js +1 -1
- package/esm5/lib/components/forms/text-input/text-input.component.js +1 -1
- package/esm5/lib/components/index.js +13 -0
- package/esm5/lib/components/index.js.map +1 -1
- package/esm5/lib/components/table/cell-editor.component.js +1 -0
- package/esm5/lib/components/table/cell-editor.component.js.map +1 -0
- package/esm5/lib/components/table/cell-renderer.js +1 -0
- package/esm5/lib/components/table/cell-renderer.js.map +1 -0
- package/esm5/lib/components/table/column-model.js +196 -0
- package/esm5/lib/components/table/column-model.js.map +1 -0
- package/esm5/lib/components/table/column-template/column-template.directive.js +25 -0
- package/esm5/lib/components/table/column-template/column-template.directive.js.map +1 -0
- package/esm5/lib/components/table/column-template/column-template.directive.ngfactory.js.map +1 -0
- package/esm5/lib/components/table/column-text-properties.js +1 -0
- package/esm5/lib/components/table/column-text-properties.js.map +1 -0
- package/esm5/lib/components/table/default-cell-renderer/default-cell-renderer.component.js +32 -0
- package/esm5/lib/components/table/default-cell-renderer/default-cell-renderer.component.js.map +1 -0
- package/esm5/lib/components/table/default-cell-renderer/default-cell-renderer.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/table/default-cell-renderer/default-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js +22 -0
- package/esm5/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js.map +1 -0
- package/esm5/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/table/edit-row-controls/edit-row-controls.component.js +57 -0
- package/esm5/lib/components/table/edit-row-controls/edit-row-controls.component.js.map +1 -0
- package/esm5/lib/components/table/edit-row-controls/edit-row-controls.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/table/edit-row-controls/edit-row-controls.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/table/select-cell-renderer/select-cell-renderer.component.js +47 -0
- package/esm5/lib/components/table/select-cell-renderer/select-cell-renderer.component.js.map +1 -0
- package/esm5/lib/components/table/select-cell-renderer/select-cell-renderer.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/table/select-cell-renderer/select-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js +35 -0
- package/esm5/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js.map +1 -0
- package/esm5/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +66 -0
- package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -0
- package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/table/table-def.js +1 -0
- package/esm5/lib/components/table/table-def.js.map +1 -0
- package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +33 -0
- package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js.map +1 -0
- package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/table/table-model.js +213 -0
- package/esm5/lib/components/table/table-model.js.map +1 -0
- package/esm5/lib/components/table/table.component.js +62 -0
- package/esm5/lib/components/table/table.component.js.map +1 -0
- package/esm5/lib/components/table/table.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/table/table.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/interaction/activity.js +7 -2
- package/esm5/lib/interaction/activity.js.map +1 -1
- package/esm5/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js +95 -0
- package/esm5/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js.map +1 -0
- package/esm5/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.ngfactory.js.map +1 -0
- package/esm5/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/interaction/directives/interaction-context-trigger-for.directive.js +90 -0
- package/esm5/lib/interaction/directives/interaction-context-trigger-for.directive.js.map +1 -0
- package/esm5/lib/interaction/directives/interaction-context-trigger-for.directive.ngfactory.js.map +1 -0
- package/esm5/lib/interaction/index.js +2 -0
- package/esm5/lib/interaction/index.js.map +1 -1
- package/esm5/lib/interaction/interaction.module.js +12 -3
- package/esm5/lib/interaction/interaction.module.js.map +1 -1
- package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +2280 -1372
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +2561 -1567
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/forms/abstract-input-activity.d.ts +18 -0
- package/lib/components/forms/abstract-input.component.d.ts +1 -0
- package/lib/components/forms/string-input/string-input-activity.d.ts +3 -0
- package/lib/components/index.d.ts +17 -0
- package/lib/components/table/cell-editor.component.d.ts +5 -0
- package/lib/components/table/cell-renderer.d.ts +3 -0
- package/lib/components/table/column-model.d.ts +84 -0
- package/lib/components/table/column-template/column-template.directive.d.ts +7 -0
- package/lib/components/table/column-text-properties.d.ts +3 -0
- package/lib/components/table/default-cell-renderer/default-cell-renderer.component.d.ts +6 -0
- package/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.d.ts +5 -0
- package/lib/components/table/edit-row-controls/edit-row-controls.component.d.ts +14 -0
- package/lib/components/table/select-cell-renderer/select-cell-renderer.component.d.ts +11 -0
- package/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.d.ts +9 -0
- package/lib/components/table/table-cell-renderer/table-cell-renderer.component.d.ts +18 -0
- package/lib/components/table/table-def.d.ts +7 -0
- package/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.d.ts +8 -0
- package/lib/components/table/table-model.d.ts +114 -0
- package/lib/components/table/table.component.d.ts +40 -0
- package/lib/interaction/activity.d.ts +1 -0
- package/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.d.ts +21 -0
- package/lib/interaction/directives/interaction-context-trigger-for.directive.d.ts +17 -0
- package/lib/interaction/index.d.ts +2 -0
- package/package.json +3 -2
|
@@ -1,11 +1,12 @@
|
|
|
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/material/button'), require('@angular/material/checkbox'), require('@angular/material/icon'), 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/material/button', '@angular/material/checkbox', '@angular/material/icon', '@
|
|
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.material.button, global.ng.material.checkbox, global.ng.material.icon, global.
|
|
5
|
-
}(this, (function (exports, common, core, forms, formField, input, select, tabs, animations, button, checkbox, icon,
|
|
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/material/button'), require('@angular/material/checkbox'), require('@angular/material/icon'), require('@angular/material/table'), require('@coolon/pectin'), require('@angular/flex-layout'), require('@angular/material/dialog'), require('@angular/router'), require('lodash'), require('resize-observer-polyfill'), require('@coolon/typescript-utilities'), require('@angular/cdk/overlay'), require('@typescript-plus/fast-memoize-decorator/dist/src'), require('immer'), require('@angular/material/progress-spinner'), require('@angular/material/list'), require('@angular/material/tooltip'), 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/material/button', '@angular/material/checkbox', '@angular/material/icon', '@angular/material/table', '@coolon/pectin', '@angular/flex-layout', '@angular/material/dialog', '@angular/router', 'lodash', 'resize-observer-polyfill', '@coolon/typescript-utilities', '@angular/cdk/overlay', '@typescript-plus/fast-memoize-decorator/dist/src', 'immer', '@angular/material/progress-spinner', '@angular/material/list', '@angular/material/tooltip', '@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.material.button, global.ng.material.checkbox, global.ng.material.icon, global.ng.material.table, global.pectin, global.ng.flexLayout, global.ng.material.dialog, global.ng.router, global.___default, global.ResizeObserver, global.typescriptUtilities, global.ng.cdk.overlay, global.src, global.produce, global.ng.material.progressSpinner, global.ng.material.list, global.ng.material.tooltip, global.fastMemoizeDecorator, null, global.ng.animations, global.rxjs));
|
|
5
|
+
}(this, (function (exports, common, core, forms, formField, input, select, tabs, animations, portal, button, checkbox, icon, table, pectin, flexLayout, dialog, router, ___default, ResizeObserver, typescriptUtilities, overlay, src, produce, progressSpinner, list, tooltip, fastMemoizeDecorator, reflectMetadata, animations$1, rxjs) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var ___default__default = 'default' in ___default ? ___default['default'] : ___default;
|
|
8
8
|
ResizeObserver = ResizeObserver && Object.prototype.hasOwnProperty.call(ResizeObserver, 'default') ? ResizeObserver['default'] : ResizeObserver;
|
|
9
|
+
produce = produce && Object.prototype.hasOwnProperty.call(produce, 'default') ? produce['default'] : produce;
|
|
9
10
|
|
|
10
11
|
/*! *****************************************************************************
|
|
11
12
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -539,45 +540,6 @@
|
|
|
539
540
|
return DirectivesModule;
|
|
540
541
|
}());
|
|
541
542
|
|
|
542
|
-
var FocusContainerComponent = /** @class */ (function (_super) {
|
|
543
|
-
__extends(FocusContainerComponent, _super);
|
|
544
|
-
function FocusContainerComponent(focusManager) {
|
|
545
|
-
var _this = _super.call(this) || this;
|
|
546
|
-
_this.focusManager = focusManager;
|
|
547
|
-
_this.restoreFocusCommand = pectin.Command.create(function () {
|
|
548
|
-
_this.restoreFocus();
|
|
549
|
-
});
|
|
550
|
-
_this.tabIndex = -1;
|
|
551
|
-
return _this;
|
|
552
|
-
}
|
|
553
|
-
FocusContainerComponent.prototype.ngOnInit = function () {
|
|
554
|
-
};
|
|
555
|
-
// @Trace()
|
|
556
|
-
FocusContainerComponent.prototype.restoreFocus = function () {
|
|
557
|
-
this.focusManager.restoreFocus();
|
|
558
|
-
};
|
|
559
|
-
FocusContainerComponent.ctorParameters = function () { return [
|
|
560
|
-
{ type: pectin.FocusManager, decorators: [{ type: core.Self }] }
|
|
561
|
-
]; };
|
|
562
|
-
__decorate([
|
|
563
|
-
core.HostBinding('attr.tabindex'),
|
|
564
|
-
__metadata("design:type", Object)
|
|
565
|
-
], FocusContainerComponent.prototype, "tabIndex", void 0);
|
|
566
|
-
FocusContainerComponent = __decorate([
|
|
567
|
-
core.Component({
|
|
568
|
-
selector: 'aup-focus-container',
|
|
569
|
-
template: "<ng-content></ng-content>\n",
|
|
570
|
-
providers: [
|
|
571
|
-
{ provide: pectin.FocusManager }
|
|
572
|
-
],
|
|
573
|
-
styles: [":host{display:block}"]
|
|
574
|
-
}),
|
|
575
|
-
__param(0, core.Self()),
|
|
576
|
-
__metadata("design:paramtypes", [pectin.FocusManager])
|
|
577
|
-
], FocusContainerComponent);
|
|
578
|
-
return FocusContainerComponent;
|
|
579
|
-
}(DisposableComponent));
|
|
580
|
-
|
|
581
543
|
var FocusableComponent = /** @class */ (function (_super) {
|
|
582
544
|
__extends(FocusableComponent, _super);
|
|
583
545
|
function FocusableComponent(el, focusManager, focusBindingFactory) {
|
|
@@ -643,1840 +605,2785 @@
|
|
|
643
605
|
return FocusableComponent;
|
|
644
606
|
}(DisposableComponent));
|
|
645
607
|
|
|
646
|
-
var
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
/**
|
|
651
|
-
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
652
|
-
*
|
|
653
|
-
* @Input() @TrackExternal({useExisting: "delegatingFormValueModel"})
|
|
654
|
-
* valueModel: FormValueModel<string> | MutableValueModel<string>;
|
|
655
|
-
*
|
|
656
|
-
* This approach allows the input to accept plain or form models but all backed by a form
|
|
657
|
-
* friendly delegate. We have to use an existing delegate for union types as pectin just
|
|
658
|
-
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
659
|
-
*/
|
|
660
|
-
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
661
|
-
_this.delegatingFormValueModel = _this.registerDisposable(new pectin.DelegatingFormValueModel());
|
|
662
|
-
// TODO: fix this.
|
|
663
|
-
// tslint:disable-next-line:no-output-native
|
|
664
|
-
_this.focus = new core.EventEmitter();
|
|
665
|
-
// tslint:disable-next-line:no-output-native
|
|
666
|
-
_this.blur = new core.EventEmitter();
|
|
667
|
-
// tslint:disable-next-line:no-output-native
|
|
668
|
-
_this.enterKey = new core.EventEmitter();
|
|
669
|
-
// tslint:disable-next-line:no-output-native
|
|
670
|
-
_this.escapeKey = new core.EventEmitter();
|
|
671
|
-
var self = _this;
|
|
672
|
-
_this.errorStateMatcher = {
|
|
673
|
-
isErrorState: function (control, form) {
|
|
674
|
-
return self.hasErrors();
|
|
675
|
-
}
|
|
676
|
-
};
|
|
677
|
-
return _this;
|
|
608
|
+
var Dimension = /** @class */ (function () {
|
|
609
|
+
function Dimension(width, height) {
|
|
610
|
+
this.width = width;
|
|
611
|
+
this.height = height;
|
|
678
612
|
}
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
this.
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
};
|
|
690
|
-
AbstractInputComponent.prototype.notifyEnterKey = function () {
|
|
691
|
-
this.safelyInvoke(this.enterCommand);
|
|
692
|
-
this.enterKey.emit();
|
|
613
|
+
return Dimension;
|
|
614
|
+
}());
|
|
615
|
+
|
|
616
|
+
var Point = /** @class */ (function () {
|
|
617
|
+
function Point(x, y) {
|
|
618
|
+
this.x = x;
|
|
619
|
+
this.y = y;
|
|
620
|
+
}
|
|
621
|
+
Point.from = function (data) {
|
|
622
|
+
return new Point(data.x, data.y);
|
|
693
623
|
};
|
|
694
|
-
|
|
695
|
-
this.
|
|
696
|
-
this.escapeKey.emit();
|
|
624
|
+
Point.prototype.translate = function (x, y) {
|
|
625
|
+
return new Point(this.x + x, this.y + y);
|
|
697
626
|
};
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
627
|
+
return Point;
|
|
628
|
+
}());
|
|
629
|
+
|
|
630
|
+
exports.Bounds = /** @class */ (function (_super) {
|
|
631
|
+
__extends(Bounds, _super);
|
|
632
|
+
function Bounds(top, left, width, height) {
|
|
633
|
+
var _this = _super.call(this, width, height) || this;
|
|
634
|
+
_this.top = top;
|
|
635
|
+
_this.left = left;
|
|
636
|
+
_this.width = width;
|
|
637
|
+
_this.height = height;
|
|
638
|
+
return _this;
|
|
639
|
+
}
|
|
640
|
+
Bounds.prototype.relativePositionOf = function (point) {
|
|
641
|
+
if (point instanceof MouseEvent) {
|
|
642
|
+
return new Point(point.clientX - this.left, point.clientY - this.top);
|
|
643
|
+
}
|
|
644
|
+
else {
|
|
645
|
+
return new Point(point.x - this.left, point.y - this.top);
|
|
701
646
|
}
|
|
702
647
|
};
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
648
|
+
return Bounds;
|
|
649
|
+
}(Dimension));
|
|
650
|
+
(function (Bounds) {
|
|
651
|
+
function ofElement(element) {
|
|
652
|
+
var rect = element.getBoundingClientRect();
|
|
653
|
+
return new Bounds(rect.top, rect.left, rect.width, rect.height);
|
|
654
|
+
}
|
|
655
|
+
Bounds.ofElement = ofElement;
|
|
656
|
+
})(exports.Bounds || (exports.Bounds = {}));
|
|
657
|
+
|
|
658
|
+
var ResizeAwareComponent = /** @class */ (function (_super) {
|
|
659
|
+
__extends(ResizeAwareComponent, _super);
|
|
660
|
+
function ResizeAwareComponent(elementRef, ngZone) {
|
|
661
|
+
var _this = _super.call(this) || this;
|
|
662
|
+
_this.elementRef = elementRef;
|
|
663
|
+
_this.ngZone = ngZone;
|
|
664
|
+
_this._boundsModel = new pectin.MutableValueModel(new exports.Bounds(0, 0, 0, 0));
|
|
665
|
+
return _this;
|
|
666
|
+
}
|
|
667
|
+
ResizeAwareComponent.prototype.ngAfterViewInit = function () {
|
|
668
|
+
var _this = this;
|
|
669
|
+
this.updateBounds();
|
|
670
|
+
var element = this.elementRef.nativeElement;
|
|
671
|
+
var ro = new ResizeObserver(function (entries, observer) {
|
|
672
|
+
_this.ngZone.run(function () { return _this.updateBounds(); });
|
|
673
|
+
});
|
|
674
|
+
ro.observe(element);
|
|
675
|
+
this.onDispose(function () { return ro.disconnect(); });
|
|
707
676
|
};
|
|
708
|
-
Object.defineProperty(
|
|
677
|
+
Object.defineProperty(ResizeAwareComponent.prototype, "boundsModel", {
|
|
709
678
|
get: function () {
|
|
710
|
-
return this.
|
|
679
|
+
return this._boundsModel.readonly;
|
|
711
680
|
},
|
|
712
681
|
enumerable: true,
|
|
713
682
|
configurable: true
|
|
714
683
|
});
|
|
715
|
-
|
|
716
|
-
return !this.errorList.query().isEmpty();
|
|
717
|
-
};
|
|
718
|
-
Object.defineProperty(AbstractInputComponent.prototype, "errorList", {
|
|
684
|
+
Object.defineProperty(ResizeAwareComponent.prototype, "nativeElement", {
|
|
719
685
|
get: function () {
|
|
720
|
-
return this.
|
|
686
|
+
return this.elementRef.nativeElement;
|
|
721
687
|
},
|
|
722
688
|
enumerable: true,
|
|
723
689
|
configurable: true
|
|
724
690
|
});
|
|
725
|
-
|
|
691
|
+
// TODO: Make this handle body scroll
|
|
692
|
+
ResizeAwareComponent.prototype.relativePositionOf = function (point) {
|
|
693
|
+
return this.bounds.relativePositionOf(point);
|
|
694
|
+
};
|
|
695
|
+
Object.defineProperty(ResizeAwareComponent.prototype, "bounds", {
|
|
726
696
|
get: function () {
|
|
727
|
-
return this.
|
|
697
|
+
return this._boundsModel.value;
|
|
728
698
|
},
|
|
729
699
|
enumerable: true,
|
|
730
700
|
configurable: true
|
|
731
701
|
});
|
|
702
|
+
ResizeAwareComponent.prototype.updateBounds = function () {
|
|
703
|
+
this._boundsModel.value = exports.Bounds.ofElement(this.nativeElement);
|
|
704
|
+
};
|
|
705
|
+
ResizeAwareComponent.ctorParameters = function () { return [
|
|
706
|
+
{ type: core.ElementRef },
|
|
707
|
+
{ type: core.NgZone }
|
|
708
|
+
]; };
|
|
709
|
+
ResizeAwareComponent = __decorate([
|
|
710
|
+
core.Directive(),
|
|
711
|
+
__metadata("design:paramtypes", [core.ElementRef, core.NgZone])
|
|
712
|
+
], ResizeAwareComponent);
|
|
713
|
+
return ResizeAwareComponent;
|
|
714
|
+
}(DisposableComponent));
|
|
715
|
+
|
|
716
|
+
/**
|
|
717
|
+
* @example
|
|
718
|
+
* // CSS Vars
|
|
719
|
+
* aup-card-container {
|
|
720
|
+
* --card-gap: var(--card-gap, 16px);
|
|
721
|
+
* --card-width: var(--card-width, 300px);
|
|
722
|
+
* --card-height: var(--card-height, auto);
|
|
723
|
+
* --card-min-height: var(--card-min-height, auto);
|
|
724
|
+
* --card-background: var(--card-background, #fcfcfb);
|
|
725
|
+
* }
|
|
726
|
+
*
|
|
727
|
+
* // Content Templates:
|
|
728
|
+
* #addCardTemplate
|
|
729
|
+
* <ng-template #addCardTemplate>
|
|
730
|
+
* This is a new card template, it will the the size of the other cards.
|
|
731
|
+
* </nav-template>
|
|
732
|
+
*
|
|
733
|
+
*/
|
|
734
|
+
var CardContainerComponent = /** @class */ (function (_super) {
|
|
735
|
+
__extends(CardContainerComponent, _super);
|
|
736
|
+
function CardContainerComponent() {
|
|
737
|
+
return _super.call(this) || this;
|
|
738
|
+
}
|
|
739
|
+
CardContainerComponent.prototype.ngOnInit = function () {
|
|
740
|
+
};
|
|
732
741
|
__decorate([
|
|
733
742
|
core.Input(),
|
|
734
|
-
|
|
735
|
-
], AbstractInputComponent.prototype, "label", void 0);
|
|
736
|
-
__decorate([
|
|
737
|
-
core.Input(),
|
|
738
|
-
__metadata("design:type", String)
|
|
739
|
-
], AbstractInputComponent.prototype, "floatLabel", void 0);
|
|
740
|
-
__decorate([
|
|
741
|
-
core.Input(),
|
|
742
|
-
__metadata("design:type", String)
|
|
743
|
-
], AbstractInputComponent.prototype, "hint", void 0);
|
|
744
|
-
__decorate([
|
|
745
|
-
core.Input(),
|
|
746
|
-
__metadata("design:type", String)
|
|
747
|
-
], AbstractInputComponent.prototype, "placeholder", void 0);
|
|
748
|
-
__decorate([
|
|
749
|
-
core.Input('command.focus'),
|
|
750
|
-
__metadata("design:type", pectin.Command)
|
|
751
|
-
], AbstractInputComponent.prototype, "focusCommand", void 0);
|
|
752
|
-
__decorate([
|
|
753
|
-
core.Input('command.blur'),
|
|
754
|
-
__metadata("design:type", pectin.Command)
|
|
755
|
-
], AbstractInputComponent.prototype, "blurCommand", void 0);
|
|
756
|
-
__decorate([
|
|
757
|
-
core.Input('command.enter'),
|
|
758
|
-
__metadata("design:type", pectin.Command)
|
|
759
|
-
], AbstractInputComponent.prototype, "enterCommand", void 0);
|
|
760
|
-
__decorate([
|
|
761
|
-
core.Input('command.escape'),
|
|
762
|
-
__metadata("design:type", pectin.Command)
|
|
763
|
-
], AbstractInputComponent.prototype, "escapeCommand", void 0);
|
|
764
|
-
__decorate([
|
|
765
|
-
core.Input('command.click'),
|
|
743
|
+
pectin.TrackExternal(),
|
|
766
744
|
__metadata("design:type", pectin.Command)
|
|
767
|
-
],
|
|
768
|
-
__decorate([
|
|
769
|
-
core.Output(),
|
|
770
|
-
__metadata("design:type", Object)
|
|
771
|
-
], AbstractInputComponent.prototype, "focus", void 0);
|
|
745
|
+
], CardContainerComponent.prototype, "addCardCommand", void 0);
|
|
772
746
|
__decorate([
|
|
773
|
-
core.
|
|
774
|
-
__metadata("design:type",
|
|
775
|
-
],
|
|
776
|
-
__decorate([
|
|
777
|
-
core.
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
__metadata("design:type", Object)
|
|
783
|
-
], AbstractInputComponent.prototype, "escapeKey", void 0);
|
|
784
|
-
__decorate([
|
|
785
|
-
core.HostListener('click'),
|
|
786
|
-
__metadata("design:type", Function),
|
|
787
|
-
__metadata("design:paramtypes", []),
|
|
788
|
-
__metadata("design:returntype", void 0)
|
|
789
|
-
], AbstractInputComponent.prototype, "notifyClick", null);
|
|
790
|
-
__decorate([
|
|
791
|
-
core.HostListener('focusin'),
|
|
792
|
-
__metadata("design:type", Function),
|
|
793
|
-
__metadata("design:paramtypes", []),
|
|
794
|
-
__metadata("design:returntype", void 0)
|
|
795
|
-
], AbstractInputComponent.prototype, "notifyFocusIn", null);
|
|
796
|
-
__decorate([
|
|
797
|
-
core.HostListener('focusout'),
|
|
798
|
-
__metadata("design:type", Function),
|
|
799
|
-
__metadata("design:paramtypes", []),
|
|
800
|
-
__metadata("design:returntype", void 0)
|
|
801
|
-
], AbstractInputComponent.prototype, "notifyFocusOut", null);
|
|
802
|
-
AbstractInputComponent = __decorate([
|
|
803
|
-
core.Component({ template: '' }),
|
|
747
|
+
core.ContentChild("addCardTemplate"),
|
|
748
|
+
__metadata("design:type", core.TemplateRef)
|
|
749
|
+
], CardContainerComponent.prototype, "addCardTemplate", void 0);
|
|
750
|
+
CardContainerComponent = __decorate([
|
|
751
|
+
core.Component({
|
|
752
|
+
selector: 'aup-card-container',
|
|
753
|
+
template: "<div class=\"card-container\">\n <ng-content></ng-content>\n\n <div class=\"add-card-container\" *ngIf=\"addCardCommand.enabled.value\" [pectinCommand]=\"addCardCommand\">\n <mat-icon>add</mat-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",
|
|
754
|
+
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-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)}aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}: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}"]
|
|
755
|
+
}),
|
|
804
756
|
__metadata("design:paramtypes", [])
|
|
805
|
-
],
|
|
806
|
-
return
|
|
757
|
+
], CardContainerComponent);
|
|
758
|
+
return CardContainerComponent;
|
|
807
759
|
}(DisposableComponent));
|
|
808
760
|
|
|
809
|
-
var
|
|
810
|
-
__extends(
|
|
811
|
-
function
|
|
761
|
+
var FocusContainerComponent = /** @class */ (function (_super) {
|
|
762
|
+
__extends(FocusContainerComponent, _super);
|
|
763
|
+
function FocusContainerComponent(focusManager) {
|
|
812
764
|
var _this = _super.call(this) || this;
|
|
813
|
-
_this.
|
|
814
|
-
_this.
|
|
765
|
+
_this.focusManager = focusManager;
|
|
766
|
+
_this.restoreFocusCommand = pectin.Command.create(function () {
|
|
767
|
+
_this.restoreFocus();
|
|
768
|
+
});
|
|
769
|
+
_this.tabIndex = -1;
|
|
815
770
|
return _this;
|
|
816
771
|
}
|
|
817
|
-
|
|
772
|
+
FocusContainerComponent.prototype.ngOnInit = function () {
|
|
773
|
+
};
|
|
774
|
+
// @Trace()
|
|
775
|
+
FocusContainerComponent.prototype.restoreFocus = function () {
|
|
776
|
+
this.focusManager.restoreFocus();
|
|
818
777
|
};
|
|
778
|
+
FocusContainerComponent.ctorParameters = function () { return [
|
|
779
|
+
{ type: pectin.FocusManager, decorators: [{ type: core.Self }] }
|
|
780
|
+
]; };
|
|
819
781
|
__decorate([
|
|
820
|
-
core.
|
|
782
|
+
core.HostBinding('attr.tabindex'),
|
|
821
783
|
__metadata("design:type", Object)
|
|
822
|
-
],
|
|
823
|
-
__decorate([
|
|
824
|
-
core.Input(),
|
|
825
|
-
__metadata("design:type", String)
|
|
826
|
-
], CheckboxInputComponent.prototype, "color", void 0);
|
|
827
|
-
__decorate([
|
|
828
|
-
core.Input(),
|
|
829
|
-
__metadata("design:type", String)
|
|
830
|
-
], CheckboxInputComponent.prototype, "labelPosition", void 0);
|
|
831
|
-
CheckboxInputComponent = __decorate([
|
|
784
|
+
], FocusContainerComponent.prototype, "tabIndex", void 0);
|
|
785
|
+
FocusContainerComponent = __decorate([
|
|
832
786
|
core.Component({
|
|
833
|
-
selector: 'aup-
|
|
834
|
-
template: "
|
|
835
|
-
|
|
787
|
+
selector: 'aup-focus-container',
|
|
788
|
+
template: "<ng-content></ng-content>\n",
|
|
789
|
+
providers: [
|
|
790
|
+
{ provide: pectin.FocusManager }
|
|
791
|
+
],
|
|
792
|
+
styles: [":host{display:block}"]
|
|
836
793
|
}),
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
794
|
+
__param(0, core.Self()),
|
|
795
|
+
__metadata("design:paramtypes", [pectin.FocusManager])
|
|
796
|
+
], FocusContainerComponent);
|
|
797
|
+
return FocusContainerComponent;
|
|
798
|
+
}(DisposableComponent));
|
|
841
799
|
|
|
842
|
-
var
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
_this
|
|
847
|
-
_this.
|
|
800
|
+
var ACTIVITY_DATA = new core.InjectionToken('InteractionActivityData');
|
|
801
|
+
var Activity = /** @class */ (function (_super) {
|
|
802
|
+
__extends(Activity, _super);
|
|
803
|
+
function Activity() {
|
|
804
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
805
|
+
_this._busyModel = new pectin.DelegatingValueModel().withDefault(false);
|
|
806
|
+
_this.class = 'aup-activity';
|
|
848
807
|
return _this;
|
|
849
808
|
}
|
|
850
|
-
|
|
809
|
+
Activity.prototype.initialise = function (nestedInteractionContext, activityContext) {
|
|
810
|
+
typescriptUtilities.assert.isNil(this._activityContext);
|
|
811
|
+
this._activityContext = activityContext;
|
|
812
|
+
this._interactionContext = nestedInteractionContext;
|
|
813
|
+
};
|
|
814
|
+
Object.defineProperty(Activity.prototype, "interactionContext", {
|
|
815
|
+
get: function () {
|
|
816
|
+
typescriptUtilities.assert.isTruthy(this.isInitialised());
|
|
817
|
+
return this._interactionContext;
|
|
818
|
+
},
|
|
819
|
+
enumerable: true,
|
|
820
|
+
configurable: true
|
|
821
|
+
});
|
|
822
|
+
Activity.prototype.done = function (result) {
|
|
823
|
+
return this._activityContext.onDone(result);
|
|
824
|
+
};
|
|
825
|
+
Activity.prototype.cancel = function (error) {
|
|
826
|
+
this._activityContext.onCancel(error);
|
|
827
|
+
};
|
|
828
|
+
// @Trace()
|
|
829
|
+
Activity.prototype.onActivityReady = function () {
|
|
830
|
+
};
|
|
831
|
+
Object.defineProperty(Activity.prototype, "busy", {
|
|
832
|
+
get: function () {
|
|
833
|
+
return this._busyModel.readonly;
|
|
834
|
+
},
|
|
835
|
+
enumerable: true,
|
|
836
|
+
configurable: true
|
|
837
|
+
});
|
|
838
|
+
Activity.prototype.busyWhile = function (busyModel) {
|
|
839
|
+
this._busyModel.setDelegate(busyModel);
|
|
840
|
+
};
|
|
841
|
+
Activity.prototype.isBusy = function () {
|
|
842
|
+
return this._busyModel.value;
|
|
843
|
+
};
|
|
844
|
+
Activity.prototype.isInitialised = function () {
|
|
845
|
+
return !!this._activityContext;
|
|
851
846
|
};
|
|
852
847
|
__decorate([
|
|
853
|
-
core.
|
|
854
|
-
__metadata("design:type", Object)
|
|
855
|
-
], NumberInputComponent.prototype, "valueModel", void 0);
|
|
856
|
-
__decorate([
|
|
857
|
-
core.Input(),
|
|
858
|
-
__metadata("design:type", Object)
|
|
859
|
-
], NumberInputComponent.prototype, "min", void 0);
|
|
860
|
-
__decorate([
|
|
861
|
-
core.Input(),
|
|
848
|
+
core.HostBinding('class'),
|
|
862
849
|
__metadata("design:type", Object)
|
|
863
|
-
],
|
|
864
|
-
|
|
850
|
+
], Activity.prototype, "class", void 0);
|
|
851
|
+
return Activity;
|
|
852
|
+
}(DisposableComponent));
|
|
853
|
+
|
|
854
|
+
var AlertDialogComponent = /** @class */ (function (_super) {
|
|
855
|
+
__extends(AlertDialogComponent, _super);
|
|
856
|
+
function AlertDialogComponent(alert) {
|
|
857
|
+
var _this = _super.call(this) || this;
|
|
858
|
+
_this.alert = alert;
|
|
859
|
+
return _this;
|
|
860
|
+
}
|
|
861
|
+
AlertDialogComponent.prototype.ngOnInit = function () {
|
|
862
|
+
};
|
|
863
|
+
AlertDialogComponent.ctorParameters = function () { return [
|
|
864
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [ACTIVITY_DATA,] }] }
|
|
865
|
+
]; };
|
|
866
|
+
AlertDialogComponent = __decorate([
|
|
865
867
|
core.Component({
|
|
866
|
-
selector: 'aup-
|
|
867
|
-
template: "<
|
|
868
|
-
styles: [":host{display:block}
|
|
868
|
+
selector: 'aup-alert-dialog',
|
|
869
|
+
template: "<h3 matDialogTitle *ngIf=\"alert.title\">{{alert.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of alert.content()\">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-raised-button color=\"primary\" (click)=\"done()\" data-cy=\"close-button\">{{alert.ok()}}</button>\n</div>\n",
|
|
870
|
+
styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]
|
|
869
871
|
}),
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
872
|
+
__param(0, core.Inject(ACTIVITY_DATA)),
|
|
873
|
+
__metadata("design:paramtypes", [Object])
|
|
874
|
+
], AlertDialogComponent);
|
|
875
|
+
return AlertDialogComponent;
|
|
876
|
+
}(Activity));
|
|
874
877
|
|
|
875
|
-
var
|
|
876
|
-
__extends(
|
|
877
|
-
function
|
|
878
|
-
|
|
878
|
+
var ConfirmThenDialogComponent = /** @class */ (function (_super) {
|
|
879
|
+
__extends(ConfirmThenDialogComponent, _super);
|
|
880
|
+
function ConfirmThenDialogComponent(config) {
|
|
881
|
+
var _this = _super.call(this) || this;
|
|
882
|
+
_this.config = config;
|
|
883
|
+
pectin.assert.notNil(config);
|
|
884
|
+
return _this;
|
|
879
885
|
}
|
|
880
|
-
|
|
886
|
+
ConfirmThenDialogComponent.prototype.ngOnInit = function () {
|
|
881
887
|
};
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
888
|
+
Object.defineProperty(ConfirmThenDialogComponent.prototype, "confirm", {
|
|
889
|
+
get: function () {
|
|
890
|
+
return this.config.confirm;
|
|
891
|
+
},
|
|
892
|
+
enumerable: true,
|
|
893
|
+
configurable: true
|
|
894
|
+
});
|
|
895
|
+
ConfirmThenDialogComponent.prototype.isDestructive = function () {
|
|
896
|
+
return this.confirm.destructive && this.confirm.destructive();
|
|
897
|
+
};
|
|
898
|
+
ConfirmThenDialogComponent.prototype.onConfirm = function () {
|
|
899
|
+
var _this = this;
|
|
900
|
+
this.interactionContext.startActivity(this.config.activityType, this.config.data)
|
|
901
|
+
.then(function (result) { return _this.done(result); })
|
|
902
|
+
.catch(function (error) { return _this.cancel(error); });
|
|
903
|
+
};
|
|
904
|
+
ConfirmThenDialogComponent.ctorParameters = function () { return [
|
|
905
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [ACTIVITY_DATA,] }] }
|
|
906
|
+
]; };
|
|
907
|
+
ConfirmThenDialogComponent = __decorate([
|
|
887
908
|
core.Component({
|
|
888
|
-
selector: 'aup-
|
|
889
|
-
template: "<
|
|
890
|
-
styles: [":host{display:block}
|
|
909
|
+
selector: 'aup-confirmation-dialog',
|
|
910
|
+
template: "<h3 matDialogTitle *ngIf=\"confirm.title\">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-button (click)=\"cancel()\" data-cy=\"cancel-button\">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]=\"isDestructive() ? 'warn' : 'primary'\"\n (click)=\"onConfirm()\" data-cy=\"confirm-button\">{{confirm.ok()}}</button>\n</div>\n\n",
|
|
911
|
+
styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]
|
|
891
912
|
}),
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
913
|
+
__param(0, core.Inject(ACTIVITY_DATA)),
|
|
914
|
+
__metadata("design:paramtypes", [Object])
|
|
915
|
+
], ConfirmThenDialogComponent);
|
|
916
|
+
return ConfirmThenDialogComponent;
|
|
917
|
+
}(Activity));
|
|
896
918
|
|
|
897
|
-
var
|
|
898
|
-
__extends(
|
|
899
|
-
function
|
|
919
|
+
var ConfirmationDialogComponent = /** @class */ (function (_super) {
|
|
920
|
+
__extends(ConfirmationDialogComponent, _super);
|
|
921
|
+
function ConfirmationDialogComponent(confirm) {
|
|
900
922
|
var _this = _super.call(this) || this;
|
|
901
|
-
_this.
|
|
923
|
+
_this.confirm = confirm;
|
|
924
|
+
pectin.assert.notNil(confirm);
|
|
902
925
|
return _this;
|
|
903
926
|
}
|
|
904
|
-
|
|
927
|
+
ConfirmationDialogComponent.prototype.ngOnInit = function () {
|
|
905
928
|
};
|
|
929
|
+
ConfirmationDialogComponent.prototype.isDestructive = function () {
|
|
930
|
+
return this.confirm.destructive && this.confirm.destructive();
|
|
931
|
+
};
|
|
932
|
+
ConfirmationDialogComponent.ctorParameters = function () { return [
|
|
933
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [ACTIVITY_DATA,] }] }
|
|
934
|
+
]; };
|
|
935
|
+
ConfirmationDialogComponent = __decorate([
|
|
936
|
+
core.Component({
|
|
937
|
+
selector: 'aup-confirmation-dialog',
|
|
938
|
+
template: "<h3 matDialogTitle *ngIf=\"confirm.title\">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-button (click)=\"cancel()\" data-cy=\"cancel-button\">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]=\"isDestructive() ? 'warn' : 'primary'\"\n (click)=\"done()\" data-cy=\"confirm-button\">{{confirm.ok()}}</button>\n</div>\n\n",
|
|
939
|
+
styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]
|
|
940
|
+
}),
|
|
941
|
+
__param(0, core.Inject(ACTIVITY_DATA)),
|
|
942
|
+
__metadata("design:paramtypes", [Object])
|
|
943
|
+
], ConfirmationDialogComponent);
|
|
944
|
+
return ConfirmationDialogComponent;
|
|
945
|
+
}(Activity));
|
|
946
|
+
|
|
947
|
+
var AbstractInteractionContext = /** @class */ (function () {
|
|
948
|
+
function AbstractInteractionContext() {
|
|
949
|
+
}
|
|
950
|
+
AbstractInteractionContext.prototype.startActivity = function (activityType, data) {
|
|
951
|
+
return this.createAndLaunchActivity(activityType, data, false);
|
|
952
|
+
};
|
|
953
|
+
AbstractInteractionContext.prototype.confirm = function (confirm) {
|
|
954
|
+
// Important: we have to implement confirmOrReject as the main entry point
|
|
955
|
+
// as the canDeactivation guards need to be able to cancel an interaction
|
|
956
|
+
// without caring about returning a value.
|
|
957
|
+
return this.confirmOrReject(confirm).then(function () { return true; }).catch(function () { return false; });
|
|
958
|
+
};
|
|
959
|
+
AbstractInteractionContext.prototype.alert = function (alert) {
|
|
960
|
+
// TODO: Test disableClose === false
|
|
961
|
+
return this.createAndLaunchActivity(AlertDialogComponent, alert, false);
|
|
962
|
+
};
|
|
963
|
+
AbstractInteractionContext.prototype.confirmOrReject = function (confirm) {
|
|
964
|
+
return this.createAndLaunchActivity(ConfirmationDialogComponent, confirm, true);
|
|
965
|
+
};
|
|
966
|
+
/**
|
|
967
|
+
* Presents the confirmation to the user and runs the activity only if the user confirms.
|
|
968
|
+
* @param confirm:Confirm the confirmation to display.
|
|
969
|
+
* @param activityType the activity to run if confirmed.
|
|
970
|
+
* @param data the activity data.
|
|
971
|
+
*/
|
|
972
|
+
AbstractInteractionContext.prototype.confirmThen = function (confirm, activityType, data) {
|
|
973
|
+
return this.createAndLaunchActivity(ConfirmThenDialogComponent, {
|
|
974
|
+
confirm: confirm,
|
|
975
|
+
activityType: activityType,
|
|
976
|
+
data: data
|
|
977
|
+
}, true);
|
|
978
|
+
};
|
|
979
|
+
return AbstractInteractionContext;
|
|
980
|
+
}());
|
|
981
|
+
|
|
982
|
+
var ActivityRef = /** @class */ (function () {
|
|
983
|
+
function ActivityRef(activityClass, activityData, onComplete) {
|
|
984
|
+
this.activityClass = activityClass;
|
|
985
|
+
this.activityData = activityData;
|
|
986
|
+
this.onComplete = onComplete;
|
|
987
|
+
this._complete = false;
|
|
988
|
+
this.deferredResult = pectin.Deferred.defer();
|
|
989
|
+
}
|
|
990
|
+
ActivityRef.prototype.isActivityRealised = function () {
|
|
991
|
+
return !!this._activity;
|
|
992
|
+
};
|
|
993
|
+
ActivityRef.prototype.isComplete = function () {
|
|
994
|
+
return this._complete;
|
|
995
|
+
};
|
|
996
|
+
Object.defineProperty(ActivityRef.prototype, "activity", {
|
|
997
|
+
get: function () {
|
|
998
|
+
pectin.assert.isTruthy(this.isActivityRealised());
|
|
999
|
+
return this._activity;
|
|
1000
|
+
},
|
|
1001
|
+
enumerable: true,
|
|
1002
|
+
configurable: true
|
|
1003
|
+
});
|
|
1004
|
+
ActivityRef.prototype.notifyActivityCreated = function (activity, nestedInteractionContext) {
|
|
1005
|
+
pectin.assert.isNil(this._activity);
|
|
1006
|
+
this._activity = activity;
|
|
1007
|
+
var self = this;
|
|
1008
|
+
this._activity.initialise(nestedInteractionContext, {
|
|
1009
|
+
onDone: function (result) {
|
|
1010
|
+
self.finishActivity(function (deferred) { return deferred.resolve(result); });
|
|
1011
|
+
},
|
|
1012
|
+
onCancel: function (error) {
|
|
1013
|
+
self.finishActivity(function (deferred) { return deferred.reject(error); });
|
|
1014
|
+
}
|
|
1015
|
+
});
|
|
1016
|
+
};
|
|
1017
|
+
ActivityRef.prototype.finishActivity = function (resolveOrReject) {
|
|
1018
|
+
pectin.assert.isFalsey(this.isComplete());
|
|
1019
|
+
resolveOrReject(this.deferredResult);
|
|
1020
|
+
this._complete = true;
|
|
1021
|
+
this.onComplete(this);
|
|
1022
|
+
};
|
|
1023
|
+
ActivityRef.prototype.cancel = function () {
|
|
1024
|
+
this.activity.cancel();
|
|
1025
|
+
};
|
|
1026
|
+
Object.defineProperty(ActivityRef.prototype, "activityResult", {
|
|
1027
|
+
get: function () {
|
|
1028
|
+
return this.deferredResult.promise;
|
|
1029
|
+
},
|
|
1030
|
+
enumerable: true,
|
|
1031
|
+
configurable: true
|
|
1032
|
+
});
|
|
1033
|
+
return ActivityRef;
|
|
1034
|
+
}());
|
|
1035
|
+
|
|
1036
|
+
/**
|
|
1037
|
+
* ActivityOutletComponent creates and displays an activity and delegates the interaction context functionality to an
|
|
1038
|
+
* external service.
|
|
1039
|
+
*/
|
|
1040
|
+
var ActivityOutletComponent = /** @class */ (function () {
|
|
1041
|
+
function ActivityOutletComponent(componentFactoryResolver, viewContainerRef, injector) {
|
|
1042
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
1043
|
+
this.viewContainerRef = viewContainerRef;
|
|
1044
|
+
this.injector = injector;
|
|
1045
|
+
}
|
|
1046
|
+
Object.defineProperty(ActivityOutletComponent.prototype, "activityRef", {
|
|
1047
|
+
get: function () {
|
|
1048
|
+
return this._activityRef;
|
|
1049
|
+
},
|
|
1050
|
+
set: function (activityRef) {
|
|
1051
|
+
if (this.activityRef && !this.activityRef.isComplete()) {
|
|
1052
|
+
typescriptUtilities.lang.illegalState("changing activity before previous one has completed");
|
|
1053
|
+
}
|
|
1054
|
+
this._activityRef = activityRef;
|
|
1055
|
+
this.loadActivity(activityRef);
|
|
1056
|
+
},
|
|
1057
|
+
enumerable: true,
|
|
1058
|
+
configurable: true
|
|
1059
|
+
});
|
|
1060
|
+
;
|
|
1061
|
+
ActivityOutletComponent.prototype.ngOnInit = function () {
|
|
1062
|
+
};
|
|
1063
|
+
ActivityOutletComponent.prototype.loadActivity = function (activityRef) {
|
|
1064
|
+
var injector = core.Injector.create({
|
|
1065
|
+
providers: [
|
|
1066
|
+
{ provide: ACTIVITY_DATA, useValue: activityRef.activityData }
|
|
1067
|
+
],
|
|
1068
|
+
parent: this.injector
|
|
1069
|
+
});
|
|
1070
|
+
var componentFactory = this.componentFactoryResolver.resolveComponentFactory(activityRef.activityClass);
|
|
1071
|
+
this.viewContainerRef.clear();
|
|
1072
|
+
// console.log(`creating component -> ${activityRef.activityClass.name}`);
|
|
1073
|
+
this.activityComponentRef = this.viewContainerRef.createComponent(componentFactory, 0, injector);
|
|
1074
|
+
this.activityRef.notifyActivityCreated(this.activityComponentRef.instance, this.nestedInteractionContext);
|
|
1075
|
+
};
|
|
1076
|
+
Object.defineProperty(ActivityOutletComponent.prototype, "component", {
|
|
1077
|
+
get: function () {
|
|
1078
|
+
return this.activityComponentRef.instance;
|
|
1079
|
+
},
|
|
1080
|
+
enumerable: true,
|
|
1081
|
+
configurable: true
|
|
1082
|
+
});
|
|
1083
|
+
ActivityOutletComponent.ctorParameters = function () { return [
|
|
1084
|
+
{ type: core.ComponentFactoryResolver },
|
|
1085
|
+
{ type: core.ViewContainerRef },
|
|
1086
|
+
{ type: core.Injector }
|
|
1087
|
+
]; };
|
|
906
1088
|
__decorate([
|
|
907
|
-
core.Input(),
|
|
908
|
-
__metadata("design:type", Object)
|
|
909
|
-
],
|
|
910
|
-
__decorate([
|
|
911
|
-
core.Input(),
|
|
912
|
-
__metadata("design:type",
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
1089
|
+
core.Input(),
|
|
1090
|
+
__metadata("design:type", Object)
|
|
1091
|
+
], ActivityOutletComponent.prototype, "nestedInteractionContext", void 0);
|
|
1092
|
+
__decorate([
|
|
1093
|
+
core.Input(),
|
|
1094
|
+
__metadata("design:type", ActivityRef),
|
|
1095
|
+
__metadata("design:paramtypes", [ActivityRef])
|
|
1096
|
+
], ActivityOutletComponent.prototype, "activityRef", null);
|
|
1097
|
+
ActivityOutletComponent = __decorate([
|
|
1098
|
+
core.Component({
|
|
1099
|
+
selector: 'aup-activity-outlet',
|
|
1100
|
+
template: '',
|
|
1101
|
+
styles: [":host{display:block}"]
|
|
1102
|
+
}),
|
|
1103
|
+
__metadata("design:paramtypes", [core.ComponentFactoryResolver,
|
|
1104
|
+
core.ViewContainerRef,
|
|
1105
|
+
core.Injector])
|
|
1106
|
+
], ActivityOutletComponent);
|
|
1107
|
+
return ActivityOutletComponent;
|
|
1108
|
+
}());
|
|
1109
|
+
|
|
1110
|
+
var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
1111
|
+
__extends(ActivityContainerComponent, _super);
|
|
1112
|
+
function ActivityContainerComponent() {
|
|
1113
|
+
var _this = _super.call(this) || this;
|
|
1114
|
+
_this.dynamicHeight = false;
|
|
1115
|
+
_this.activityTabs = [];
|
|
1116
|
+
_this.garbage = new pectin.GarbageCollector();
|
|
1117
|
+
return _this;
|
|
1118
|
+
}
|
|
1119
|
+
ActivityContainerComponent.prototype.ngOnInit = function () {
|
|
1120
|
+
};
|
|
1121
|
+
ActivityContainerComponent.prototype.ngAfterViewInit = function () {
|
|
1122
|
+
var _this = this;
|
|
1123
|
+
var _a = pectin.Dsl.disposeWith(this), chain = _a.chain, observe = _a.observe;
|
|
1124
|
+
// using the component directly rather than (animationDone)=.. allows us
|
|
1125
|
+
// to keep our callback private.
|
|
1126
|
+
observe.valuesFrom(this.tabs.animationDone).subscribe(function () { return _this.onAnimationFinished(); });
|
|
1127
|
+
};
|
|
1128
|
+
ActivityContainerComponent.prototype.initialise = function (identifier, api) {
|
|
1129
|
+
pectin.assert.isFalsey(this.isInitialised());
|
|
1130
|
+
pectin.assert.notNil(identifier);
|
|
1131
|
+
pectin.assert.notNil(api);
|
|
1132
|
+
this._identifier = identifier;
|
|
1133
|
+
this.interactionServiceApi = api;
|
|
1134
|
+
};
|
|
1135
|
+
Object.defineProperty(ActivityContainerComponent.prototype, "identifier", {
|
|
1136
|
+
get: function () {
|
|
1137
|
+
return this._identifier;
|
|
1138
|
+
},
|
|
1139
|
+
enumerable: true,
|
|
1140
|
+
configurable: true
|
|
1141
|
+
});
|
|
1142
|
+
ActivityContainerComponent.prototype.isInitialised = function () {
|
|
1143
|
+
return !!this.identifier;
|
|
1144
|
+
};
|
|
1145
|
+
/**
|
|
1146
|
+
* Returns true if an activity is currently running.
|
|
1147
|
+
*/
|
|
1148
|
+
ActivityContainerComponent.prototype.isActive = function () {
|
|
1149
|
+
return this.getActiveActivityCount() > 0;
|
|
1150
|
+
};
|
|
1151
|
+
ActivityContainerComponent.prototype.registerDisposable = function (disposable) {
|
|
1152
|
+
return this.garbage.registerDisposable(disposable);
|
|
1153
|
+
};
|
|
1154
|
+
ActivityContainerComponent.prototype.dispose = function () {
|
|
1155
|
+
// TODO: think about auto cancelling any outstanding activity on dispose.
|
|
1156
|
+
// See NavigationState.Navigating for a use-case.
|
|
1157
|
+
pectin.assert.isFalsey(this.isActive());
|
|
1158
|
+
this.garbage.dispose();
|
|
1159
|
+
};
|
|
1160
|
+
ActivityContainerComponent.prototype.getActiveActivityRef = function () {
|
|
1161
|
+
if (!this.isActive()) {
|
|
1162
|
+
typescriptUtilities.lang.illegalState('no activity in progress');
|
|
1163
|
+
}
|
|
1164
|
+
return ___default__default.findLast(this.activityTabs, function (tab) { return !tab.isComplete(); });
|
|
1165
|
+
};
|
|
1166
|
+
/**
|
|
1167
|
+
* Cancels the current activity and returns true the context is no longer active, false if
|
|
1168
|
+
* there is still another activity running.
|
|
1169
|
+
*/
|
|
1170
|
+
// @Trace()
|
|
1171
|
+
ActivityContainerComponent.prototype.cancelActiveActivity = function () {
|
|
1172
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1173
|
+
var activity;
|
|
1174
|
+
return __generator(this, function (_a) {
|
|
1175
|
+
activity = this.getActiveActivityRef();
|
|
1176
|
+
activity.cancel();
|
|
1177
|
+
if (this.isCleaningUp()) {
|
|
1178
|
+
return [2 /*return*/, this.waitForInteractionContextCleanupToFinish()];
|
|
1179
|
+
}
|
|
1180
|
+
else {
|
|
1181
|
+
return [2 /*return*/, !this.isActive()];
|
|
1182
|
+
}
|
|
1183
|
+
return [2 /*return*/];
|
|
1184
|
+
});
|
|
1185
|
+
});
|
|
1186
|
+
};
|
|
1187
|
+
// TODO: this handling of multiple nested activities is only used by the activity component and is not a general case.
|
|
1188
|
+
// @Trace()
|
|
1189
|
+
ActivityContainerComponent.prototype.createAndLaunchActivity = function (activityType, data, disableClose) {
|
|
1190
|
+
var _this = this;
|
|
1191
|
+
pectin.assert.isTruthy(this.isInitialised()); // make sure we've been initialised
|
|
1192
|
+
var activityRef = new ActivityRef(activityType, data, function () {
|
|
1193
|
+
var activeActivityCount = _this.getActiveActivityCount() > 0;
|
|
1194
|
+
if (activeActivityCount) {
|
|
1195
|
+
_this.triggerTabSynchronisation();
|
|
1196
|
+
}
|
|
1197
|
+
else {
|
|
1198
|
+
_this.finishAndStartCleanup();
|
|
1199
|
+
}
|
|
1200
|
+
});
|
|
1201
|
+
this.launchActivity(activityRef);
|
|
1202
|
+
// if this is the first activity let the interaction service know.
|
|
1203
|
+
if (this.activityTabs.length === 1) {
|
|
1204
|
+
// console.log('Now active!!!');
|
|
1205
|
+
this.interactionServiceApi.notifyActive(this);
|
|
1206
|
+
}
|
|
1207
|
+
return activityRef.activityResult;
|
|
1208
|
+
};
|
|
1209
|
+
ActivityContainerComponent.prototype.getActiveActivityCount = function () {
|
|
1210
|
+
return this.activityTabs.filter(function (ref) { return !ref.isComplete(); }).length;
|
|
1211
|
+
};
|
|
1212
|
+
/**
|
|
1213
|
+
* Checks if this interaction context has finished an is in the process of waiting
|
|
1214
|
+
* for all the infrastructure (including route updates) to be completed.
|
|
1215
|
+
*/
|
|
1216
|
+
ActivityContainerComponent.prototype.isCleaningUp = function () {
|
|
1217
|
+
return !!this._deferredCleanUp;
|
|
1218
|
+
};
|
|
1219
|
+
ActivityContainerComponent.prototype.waitForInteractionContextCleanupToFinish = function () {
|
|
1220
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1221
|
+
return __generator(this, function (_a) {
|
|
1222
|
+
return [2 /*return*/, this._deferredCleanUp ?
|
|
1223
|
+
this._deferredCleanUp :
|
|
1224
|
+
true];
|
|
1225
|
+
});
|
|
1226
|
+
});
|
|
1227
|
+
};
|
|
1228
|
+
// @Trace()
|
|
1229
|
+
ActivityContainerComponent.prototype.finishAndStartCleanup = function () {
|
|
1230
|
+
var _this = this;
|
|
1231
|
+
if (!this._deferredCleanUp) {
|
|
1232
|
+
// Important:
|
|
1233
|
+
// Clear our tabs so the next activity triggers a tab change.
|
|
1234
|
+
// Without this our animation done wasn't called when a single
|
|
1235
|
+
// new activity followed a single tab activity (since we're tracking
|
|
1236
|
+
// by activity index)
|
|
1237
|
+
this.activityTabs = [];
|
|
1238
|
+
var promise = this.interactionServiceApi.notifyFinished(this);
|
|
1239
|
+
this._deferredCleanUp = promise
|
|
1240
|
+
.finally(function () {
|
|
1241
|
+
_this._deferredCleanUp = null;
|
|
1242
|
+
});
|
|
1243
|
+
}
|
|
1244
|
+
};
|
|
1245
|
+
// @Trace()
|
|
1246
|
+
ActivityContainerComponent.prototype.launchActivity = function (activityRef) {
|
|
1247
|
+
var cleanedTabs = this.activityTabs.filter(function (tab) { return !tab.isComplete(); });
|
|
1248
|
+
this.activityTabs = cleanedTabs.concat(activityRef);
|
|
1249
|
+
this.synchroniseSelectedTabIndex();
|
|
1250
|
+
};
|
|
1251
|
+
ActivityContainerComponent.prototype.activityIndex = function (index, activityRef) {
|
|
1252
|
+
return index;
|
|
1253
|
+
};
|
|
1254
|
+
;
|
|
1255
|
+
ActivityContainerComponent.prototype.onAnimationFinished = function () {
|
|
1256
|
+
if (this.onAnimationFinishedJob) {
|
|
1257
|
+
this.onAnimationFinishedJob();
|
|
1258
|
+
this.onAnimationFinishedJob = undefined;
|
|
1259
|
+
}
|
|
1260
|
+
};
|
|
1261
|
+
/**
|
|
1262
|
+
* Synchronises the selected tab index.
|
|
1263
|
+
*/
|
|
1264
|
+
ActivityContainerComponent.prototype.synchroniseSelectedTabIndex = function () {
|
|
1265
|
+
var _this = this;
|
|
1266
|
+
var previousIndex = this.tabs.selectedIndex;
|
|
1267
|
+
var newIndex = this.getActiveActivityCount() - 1;
|
|
1268
|
+
if (previousIndex !== newIndex) {
|
|
1269
|
+
this.tabs.selectedIndex = newIndex;
|
|
1270
|
+
this.onAnimationFinishedJob = function () {
|
|
1271
|
+
_this.getSelectedOutlet().component.onActivityReady();
|
|
1272
|
+
_this.activityTabs = _this.activityTabs.filter(function (tab) { return !tab.isComplete(); });
|
|
1273
|
+
};
|
|
1274
|
+
}
|
|
1275
|
+
};
|
|
1276
|
+
ActivityContainerComponent.prototype.getSelectedOutlet = function () {
|
|
1277
|
+
return this.activityOutlets.toArray()[this.tabs.selectedIndex];
|
|
1278
|
+
};
|
|
1279
|
+
// @Trace()
|
|
1280
|
+
ActivityContainerComponent.prototype.triggerTabSynchronisation = function () {
|
|
1281
|
+
var _this = this;
|
|
1282
|
+
if (this.syncSelectedTabTimeout) {
|
|
1283
|
+
clearTimeout(this.syncSelectedTabTimeout);
|
|
1284
|
+
}
|
|
1285
|
+
this.syncSelectedTabTimeout = setTimeout(function () {
|
|
1286
|
+
_this.syncSelectedTabTimeout = null;
|
|
1287
|
+
_this.synchroniseSelectedTabIndex();
|
|
1288
|
+
}, 75);
|
|
1289
|
+
};
|
|
1290
|
+
__decorate([
|
|
1291
|
+
core.Input(),
|
|
1292
|
+
__metadata("design:type", Object)
|
|
1293
|
+
], ActivityContainerComponent.prototype, "dynamicHeight", void 0);
|
|
1294
|
+
__decorate([
|
|
1295
|
+
core.ViewChild('tabs', { static: true }),
|
|
1296
|
+
__metadata("design:type", tabs.MatTabGroup)
|
|
1297
|
+
], ActivityContainerComponent.prototype, "tabs", void 0);
|
|
1298
|
+
__decorate([
|
|
1299
|
+
core.ViewChildren(ActivityOutletComponent),
|
|
1300
|
+
__metadata("design:type", core.QueryList)
|
|
1301
|
+
], ActivityContainerComponent.prototype, "activityOutlets", void 0);
|
|
1302
|
+
__decorate([
|
|
1303
|
+
pectin.Trace(),
|
|
1304
|
+
__metadata("design:type", Function),
|
|
1305
|
+
__metadata("design:paramtypes", []),
|
|
1306
|
+
__metadata("design:returntype", void 0)
|
|
1307
|
+
], ActivityContainerComponent.prototype, "dispose", null);
|
|
1308
|
+
ActivityContainerComponent = __decorate([
|
|
1309
|
+
core.Component({
|
|
1310
|
+
selector: 'aup-activity-container',
|
|
1311
|
+
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",
|
|
1312
|
+
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
|
|
1313
|
+
}),
|
|
1314
|
+
__metadata("design:paramtypes", [])
|
|
1315
|
+
], ActivityContainerComponent);
|
|
1316
|
+
return ActivityContainerComponent;
|
|
1317
|
+
}(AbstractInteractionContext));
|
|
1318
|
+
|
|
1319
|
+
var AddItemInteractionContextComponent = /** @class */ (function (_super) {
|
|
1320
|
+
__extends(AddItemInteractionContextComponent, _super);
|
|
1321
|
+
function AddItemInteractionContextComponent() {
|
|
1322
|
+
var _this = _super.call(this) || this;
|
|
1323
|
+
_this.tabindex = 0;
|
|
1324
|
+
_this.clickCommand = pectin.Command.create(function (context) {
|
|
1325
|
+
if (_this.activityClass) {
|
|
1326
|
+
_this.startActivity(_this.activityClass, _this.activityData).catch(function (e) {
|
|
1327
|
+
// don't care.
|
|
1328
|
+
});
|
|
1329
|
+
}
|
|
1330
|
+
else {
|
|
1331
|
+
_this.addCommand.withContext(context).execute();
|
|
1332
|
+
}
|
|
1333
|
+
});
|
|
1334
|
+
return _this;
|
|
1335
|
+
}
|
|
1336
|
+
Object.defineProperty(AddItemInteractionContextComponent.prototype, "active", {
|
|
1337
|
+
get: function () {
|
|
1338
|
+
return this.interactionContext ? this.interactionContext.isActive() : false;
|
|
1339
|
+
},
|
|
1340
|
+
enumerable: true,
|
|
1341
|
+
configurable: true
|
|
1342
|
+
});
|
|
1343
|
+
AddItemInteractionContextComponent.prototype.startActivity = function (activityType, data) {
|
|
1344
|
+
return this.interactionContext.startActivity(activityType, data);
|
|
1345
|
+
};
|
|
1346
|
+
AddItemInteractionContextComponent.prototype.ngOnInit = function () {
|
|
1347
|
+
};
|
|
1348
|
+
__decorate([
|
|
1349
|
+
core.Input(),
|
|
1350
|
+
__metadata("design:type", String)
|
|
1351
|
+
], AddItemInteractionContextComponent.prototype, "label", void 0);
|
|
1352
|
+
__decorate([
|
|
1353
|
+
core.Input(),
|
|
1354
|
+
__metadata("design:type", Object)
|
|
1355
|
+
], AddItemInteractionContextComponent.prototype, "activityClass", void 0);
|
|
918
1356
|
__decorate([
|
|
919
1357
|
core.Input(),
|
|
920
1358
|
__metadata("design:type", Object)
|
|
921
|
-
],
|
|
1359
|
+
], AddItemInteractionContextComponent.prototype, "activityData", void 0);
|
|
922
1360
|
__decorate([
|
|
923
1361
|
core.Input(),
|
|
924
|
-
|
|
925
|
-
|
|
1362
|
+
pectin.TrackExternal(),
|
|
1363
|
+
__metadata("design:type", pectin.Command)
|
|
1364
|
+
], AddItemInteractionContextComponent.prototype, "addCommand", void 0);
|
|
926
1365
|
__decorate([
|
|
927
|
-
core.
|
|
928
|
-
__metadata("design:type",
|
|
929
|
-
],
|
|
1366
|
+
core.ViewChild(InPlaceInteractionContextComponent),
|
|
1367
|
+
__metadata("design:type", InPlaceInteractionContextComponent)
|
|
1368
|
+
], AddItemInteractionContextComponent.prototype, "interactionContext", void 0);
|
|
930
1369
|
__decorate([
|
|
931
|
-
core.
|
|
932
|
-
__metadata("design:type",
|
|
933
|
-
|
|
1370
|
+
core.HostBinding('class.interaction-active'),
|
|
1371
|
+
__metadata("design:type", Boolean),
|
|
1372
|
+
__metadata("design:paramtypes", [])
|
|
1373
|
+
], AddItemInteractionContextComponent.prototype, "active", null);
|
|
934
1374
|
__decorate([
|
|
935
|
-
core.
|
|
936
|
-
__metadata("design:type",
|
|
937
|
-
],
|
|
938
|
-
|
|
1375
|
+
core.HostBinding('tabindex'),
|
|
1376
|
+
__metadata("design:type", Object)
|
|
1377
|
+
], AddItemInteractionContextComponent.prototype, "tabindex", void 0);
|
|
1378
|
+
AddItemInteractionContextComponent = __decorate([
|
|
939
1379
|
core.Component({
|
|
940
|
-
selector: 'aup-
|
|
941
|
-
template: "<
|
|
942
|
-
styles: [":host{display:
|
|
1380
|
+
selector: 'aup-add-item-interaction-context',
|
|
1381
|
+
template: "<aup-in-place-interaction-context #interactionContext [animateFirstActivity]=\"false\">\n <a part=\"link\" class=\"link\" [pectinCommand]=\"clickCommand\"><mat-icon>add</mat-icon> {{label}}</a>\n</aup-in-place-interaction-context>\n",
|
|
1382
|
+
styles: [":host{--def-link-color:var(--link-color, currentColor);--def-link-backgound:var(--link-background, rgba(0, 0, 0, 0.05));--def-link-border-radius:var(--link-border-radius, 4px);--def-link-padding:var(--link-padding, calc(var(--aup-default-padding) / 2));display:flex;flex-direction:column;border-radius:var(--def-link-border-radius);box-sizing:border-box;outline:0}:host:hover{--link-background:rgba(0,0,0,0.1)}aup-in-place-interaction-context{border-radius:var(--def-link-border-radius)}a.link{display:flex;flex-direction:row;align-items:center;border-radius:var(--def-link-border-radius);color:var(--def-link-color);background:var(--def-link-backgound);padding:var(--def-link-padding);cursor:pointer;text-decoration:none}a.link mat-icon{margin-right:8px}"]
|
|
943
1383
|
}),
|
|
944
1384
|
__metadata("design:paramtypes", [])
|
|
945
|
-
],
|
|
946
|
-
return
|
|
947
|
-
}(
|
|
1385
|
+
], AddItemInteractionContextComponent);
|
|
1386
|
+
return AddItemInteractionContextComponent;
|
|
1387
|
+
}(DisposableComponent));
|
|
948
1388
|
|
|
949
|
-
var
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
_this.clearCommand = pectin.Command.create(function () {
|
|
955
|
-
_this.valueModel.value = null;
|
|
956
|
-
});
|
|
957
|
-
_this.clearCommand.disableWhile(chain.stringValue(_this.valueModel).isBlank());
|
|
958
|
-
return _this;
|
|
1389
|
+
var InteractionServiceRoutingAdapter = /** @class */ (function () {
|
|
1390
|
+
function InteractionServiceRoutingAdapter(activeInteractionContextIds, activeModalContext, createExclusiveInteractionContext) {
|
|
1391
|
+
this.activeInteractionContextIds = activeInteractionContextIds;
|
|
1392
|
+
this.activeModalContext = activeModalContext;
|
|
1393
|
+
this.createExclusiveInteractionContext = createExclusiveInteractionContext;
|
|
959
1394
|
}
|
|
960
|
-
|
|
1395
|
+
InteractionServiceRoutingAdapter.prototype.isActive = function () {
|
|
1396
|
+
return this.getActiveInteractionContextIds().length > 0;
|
|
961
1397
|
};
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
1398
|
+
InteractionServiceRoutingAdapter.prototype.isModalActive = function () {
|
|
1399
|
+
return !!this.activeModalContext.value;
|
|
1400
|
+
};
|
|
1401
|
+
// @Trace()
|
|
1402
|
+
InteractionServiceRoutingAdapter.prototype.isComponentInteracting = function (component) {
|
|
1403
|
+
return component.interactionContext && component.interactionContext.isActive();
|
|
1404
|
+
};
|
|
1405
|
+
InteractionServiceRoutingAdapter.prototype.getActiveInteractionContextIds = function () {
|
|
1406
|
+
return this.activeInteractionContextIds.value;
|
|
1407
|
+
};
|
|
1408
|
+
// @Trace()
|
|
1409
|
+
InteractionServiceRoutingAdapter.prototype.cancelCurrentModalInteraction = function () {
|
|
1410
|
+
return this.activeModalContext.value.cancelActiveActivity();
|
|
1411
|
+
};
|
|
1412
|
+
// @Trace()
|
|
1413
|
+
InteractionServiceRoutingAdapter.prototype.cancelComponentInteraction = function (component) {
|
|
1414
|
+
return component.interactionContext.cancelActiveActivity();
|
|
1415
|
+
};
|
|
1416
|
+
return InteractionServiceRoutingAdapter;
|
|
1417
|
+
}());
|
|
1418
|
+
|
|
1419
|
+
var ModalInteractionContextFactory = /** @class */ (function () {
|
|
1420
|
+
function ModalInteractionContextFactory() {
|
|
1421
|
+
}
|
|
1422
|
+
return ModalInteractionContextFactory;
|
|
1423
|
+
}());
|
|
1424
|
+
|
|
1425
|
+
var inplaceMonitorCount = 0;
|
|
1426
|
+
exports.ɵbw = /** @class */ (function () {
|
|
1427
|
+
function InteractionService(modelInteractionContextFactory) {
|
|
1428
|
+
this.modelInteractionContextFactory = modelInteractionContextFactory;
|
|
1429
|
+
this.garbage = new pectin.GarbageCollector();
|
|
1430
|
+
// private readonly _activeModalContext = new MutableValueModel<InteractionContext>();
|
|
1431
|
+
// private readonly _activeInlineContext = new MutableValueModel<InteractionContext>();
|
|
1432
|
+
// private readonly _activeContext: ValueModelChain<InteractionContext>;
|
|
1433
|
+
this._navigationInProgress = new pectin.DelegatingValueModel().withDefault(false);
|
|
1434
|
+
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;
|
|
1435
|
+
this.exclusiveInteractionRegistry = new InteractionService_1.ContextRegistry();
|
|
1436
|
+
this.modalInteractionRegistry = new InteractionService_1.ContextRegistry();
|
|
1437
|
+
this.inPlaceInteractionRegistry = new InteractionService_1.ContextRegistry();
|
|
1438
|
+
this.modalInteractionRegistry.disableWhen(valueOf.any(this.exclusiveInteractionRegistry.active, this.modalInteractionRegistry.active).areTruthy());
|
|
1439
|
+
this.inPlaceInteractionRegistry.disableWhen(valueOf.any(this.exclusiveInteractionRegistry.active, this.modalInteractionRegistry.active, this.inPlaceInteractionRegistry.active).areTruthy());
|
|
1440
|
+
this.active = valueOf.any(this.inPlaceInteractionRegistry.active, this.modalInteractionRegistry.active).areTruthy();
|
|
1441
|
+
// TODO: chain.concat(listOrValueModels) would be nice.
|
|
1442
|
+
this.activeInteractionContextIds = chain(this.inPlaceInteractionRegistry.interactionContextIds)
|
|
1443
|
+
.concat(this.modalInteractionRegistry.interactionContextIds);
|
|
1444
|
+
this.activeModalContext = chain(this.modalInteractionRegistry.interactionContexts).first();
|
|
1445
|
+
this.inModalInteraction = chain(this.activeModalContext).isNotNil();
|
|
1446
|
+
}
|
|
1447
|
+
InteractionService_1 = InteractionService;
|
|
1448
|
+
InteractionService.prototype.isActive = function () {
|
|
1449
|
+
return this.active.value;
|
|
1450
|
+
};
|
|
1451
|
+
/**
|
|
1452
|
+
* @deprecated use #createModalInteractionContextDisposedWith instead.
|
|
1453
|
+
* @param disposable
|
|
1454
|
+
*/
|
|
1455
|
+
InteractionService.prototype.createModalInteractionContextFor = function (disposable) {
|
|
1456
|
+
return this.createModalInteractionContextDisposedWith(disposable);
|
|
1457
|
+
};
|
|
1458
|
+
/**
|
|
1459
|
+
* Creates a new model interaction context that will be disposed along with the component.
|
|
1460
|
+
* @param disposable
|
|
1461
|
+
*/
|
|
1462
|
+
InteractionService.prototype.createModalInteractionContextDisposedWith = function (disposable) {
|
|
1463
|
+
// TODO: look at making the registry the factory..
|
|
1464
|
+
return this.modelInteractionContextFactory.createInteractionContext('modal', new InteractionService_1.ApiAdapter(this.placeRouter, this.modalInteractionRegistry));
|
|
1465
|
+
};
|
|
1466
|
+
InteractionService.prototype.registerInplaceInteractionContext = function (interactionContext) {
|
|
1467
|
+
// TODO: look at making the registry the factory..
|
|
1468
|
+
// Todo: check for double registration.
|
|
1469
|
+
// Todo: allow multiple inplace interactions..
|
|
1470
|
+
interactionContext.initialise("ip" + ++inplaceMonitorCount, new InteractionService_1.ApiAdapter(this.placeRouter, this.inPlaceInteractionRegistry));
|
|
1471
|
+
};
|
|
1472
|
+
/**
|
|
1473
|
+
* Creates an interaction context that will prevent any other contexts from starting an
|
|
1474
|
+
* activity until it is disposed. This is intended for use by the router for passing
|
|
1475
|
+
* to PlaceComponent.canDeactivate(interactionContext). This ensures components don't
|
|
1476
|
+
* try and interact in a way that we can't track and synchronise with the browser back
|
|
1477
|
+
* button.
|
|
1478
|
+
*/
|
|
1479
|
+
InteractionService.prototype.registerPlaceRouter = function (router) {
|
|
1480
|
+
var _this = this;
|
|
1481
|
+
typescriptUtilities.assert.isFalsey(this.placeRouter);
|
|
1482
|
+
this.placeRouter = router;
|
|
1483
|
+
this._navigationInProgress.setDelegate(this.placeRouter.navigationInProgress);
|
|
1484
|
+
var self = this;
|
|
1485
|
+
return new InteractionServiceRoutingAdapter(this.activeInteractionContextIds, this.activeModalContext, function () {
|
|
1486
|
+
return self.modelInteractionContextFactory.createInteractionContext('exclusive', new InteractionService_1.ApiAdapter(_this.placeRouter, _this.exclusiveInteractionRegistry));
|
|
1487
|
+
});
|
|
1488
|
+
};
|
|
1489
|
+
var InteractionService_1;
|
|
1490
|
+
InteractionService.ctorParameters = function () { return [
|
|
1491
|
+
{ type: ModalInteractionContextFactory }
|
|
1492
|
+
]; };
|
|
1493
|
+
InteractionService.ɵprov = core.ɵɵdefineInjectable({ factory: function InteractionService_Factory() { return new InteractionService(core.ɵɵinject(ModalInteractionContextFactory)); }, token: InteractionService, providedIn: "root" });
|
|
1494
|
+
InteractionService = InteractionService_1 = __decorate([
|
|
1495
|
+
core.Injectable({
|
|
1496
|
+
providedIn: 'root'
|
|
979
1497
|
}),
|
|
980
|
-
__metadata("design:paramtypes", [])
|
|
981
|
-
],
|
|
982
|
-
return
|
|
983
|
-
}(
|
|
1498
|
+
__metadata("design:paramtypes", [ModalInteractionContextFactory])
|
|
1499
|
+
], InteractionService);
|
|
1500
|
+
return InteractionService;
|
|
1501
|
+
}());
|
|
1502
|
+
(function (InteractionService) {
|
|
1503
|
+
/**
|
|
1504
|
+
* Provides a mechanism for the service to keep track of what the API adapters are doing to
|
|
1505
|
+
* ensure the rules are followed, i.e. modal or in-place interaction aren't started while
|
|
1506
|
+
* an exclusive routing interaction is active.
|
|
1507
|
+
*/
|
|
1508
|
+
var ContextRegistry = /** @class */ (function (_super) {
|
|
1509
|
+
__extends(ContextRegistry, _super);
|
|
1510
|
+
function ContextRegistry() {
|
|
1511
|
+
var _this = _super.call(this) || this;
|
|
1512
|
+
_this._interactions = new pectin.MutableListModel();
|
|
1513
|
+
_this._disabledDelegate = new pectin.DelegatingValueModel().withDefault(false);
|
|
1514
|
+
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;
|
|
1515
|
+
_this.active = chain(_this._interactions).isNotEmpty();
|
|
1516
|
+
_this.interactionContextIds = chain(_this._interactions).pluck("identifier");
|
|
1517
|
+
return _this;
|
|
1518
|
+
}
|
|
1519
|
+
Object.defineProperty(ContextRegistry.prototype, "interactionContexts", {
|
|
1520
|
+
get: function () {
|
|
1521
|
+
return this._interactions.readonly;
|
|
1522
|
+
},
|
|
1523
|
+
enumerable: true,
|
|
1524
|
+
configurable: true
|
|
1525
|
+
});
|
|
1526
|
+
ContextRegistry.prototype.start = function (context) {
|
|
1527
|
+
this._interactions.push(context);
|
|
1528
|
+
};
|
|
1529
|
+
ContextRegistry.prototype.finish = function (context) {
|
|
1530
|
+
this._interactions.remove(context);
|
|
1531
|
+
};
|
|
1532
|
+
ContextRegistry.prototype.isActive = function () {
|
|
1533
|
+
return this.active.value;
|
|
1534
|
+
};
|
|
1535
|
+
ContextRegistry.prototype.disableWhen = function (disabled) {
|
|
1536
|
+
this._disabledDelegate.setDelegate(disabled);
|
|
1537
|
+
};
|
|
1538
|
+
return ContextRegistry;
|
|
1539
|
+
}(pectin.GarbageCollector));
|
|
1540
|
+
InteractionService.ContextRegistry = ContextRegistry;
|
|
1541
|
+
var ApiAdapter = /** @class */ (function () {
|
|
1542
|
+
function ApiAdapter(placeRouter, contextRegistry) {
|
|
1543
|
+
this.placeRouter = placeRouter;
|
|
1544
|
+
this.contextRegistry = contextRegistry;
|
|
1545
|
+
}
|
|
1546
|
+
// @Trace()
|
|
1547
|
+
ApiAdapter.prototype.notifyActive = function (context) {
|
|
1548
|
+
typescriptUtilities.assert.isTruthy(context.identifier);
|
|
1549
|
+
this.contextRegistry.start(context);
|
|
1550
|
+
return this.isNavigationInProgress() ? Promise.resolve() : this.placeRouter.syncInteractionContextIdsWithRouter();
|
|
1551
|
+
};
|
|
1552
|
+
// @Trace()
|
|
1553
|
+
ApiAdapter.prototype.isNavigationInProgress = function () {
|
|
1554
|
+
return this.placeRouter.navigationInProgress.value;
|
|
1555
|
+
};
|
|
1556
|
+
// @Trace()
|
|
1557
|
+
ApiAdapter.prototype.notifyFinished = function (context) {
|
|
1558
|
+
this.contextRegistry.finish(context);
|
|
1559
|
+
// :: Important ::
|
|
1560
|
+
// This method will be traversed by both the place router (during can canDeactivate guards) and user land code
|
|
1561
|
+
// (both when routing is idle and while it is active in PlaceComponent.canDeactivate()).
|
|
1562
|
+
// The result of pushInteractionIdsToRoute will not start until after the current route finishes, and the
|
|
1563
|
+
// current route won't finish until after this promise returns... Deadlock.
|
|
1564
|
+
// So in order to keep this logic out of the activities we perform the check here and ensure that
|
|
1565
|
+
// any interactions with the context while routing is active returns immediately.
|
|
1566
|
+
return this.isNavigationInProgress() ? Promise.resolve() : this.placeRouter.syncInteractionContextIdsWithRouter();
|
|
1567
|
+
};
|
|
1568
|
+
return ApiAdapter;
|
|
1569
|
+
}());
|
|
1570
|
+
InteractionService.ApiAdapter = ApiAdapter;
|
|
1571
|
+
})(exports.ɵbw || (exports.ɵbw = {}));
|
|
984
1572
|
|
|
985
|
-
var
|
|
986
|
-
__extends(
|
|
987
|
-
function
|
|
1573
|
+
var InPlaceInteractionContextComponent = /** @class */ (function (_super) {
|
|
1574
|
+
__extends(InPlaceInteractionContextComponent, _super);
|
|
1575
|
+
function InPlaceInteractionContextComponent(interactionService, tabConfig) {
|
|
988
1576
|
var _this = _super.call(this) || this;
|
|
989
|
-
_this.
|
|
1577
|
+
_this.interactionService = interactionService;
|
|
1578
|
+
_this.tabConfig = tabConfig;
|
|
1579
|
+
/**
|
|
1580
|
+
* If true then the first startActivity call will slide the activity into view. If false
|
|
1581
|
+
* the activity will replace the existing content immediately.
|
|
1582
|
+
*/
|
|
1583
|
+
_this.animateFirstActivity = true;
|
|
990
1584
|
return _this;
|
|
991
|
-
// const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
992
1585
|
}
|
|
993
|
-
|
|
1586
|
+
Object.defineProperty(InPlaceInteractionContextComponent.prototype, "animationDuration", {
|
|
1587
|
+
get: function () {
|
|
1588
|
+
var _a;
|
|
1589
|
+
return this.animateFirstActivity ? (((_a = this.tabConfig) === null || _a === void 0 ? void 0 : _a.animationDuration) || '500ms') : "0ms";
|
|
1590
|
+
},
|
|
1591
|
+
enumerable: true,
|
|
1592
|
+
configurable: true
|
|
1593
|
+
});
|
|
1594
|
+
InPlaceInteractionContextComponent.prototype.ngAfterViewInit = function () {
|
|
1595
|
+
this.interactionService.registerInplaceInteractionContext(this);
|
|
994
1596
|
};
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
__metadata("design:type", Object)
|
|
998
|
-
], TextInputComponent.prototype, "valueModel", void 0);
|
|
999
|
-
__decorate([
|
|
1000
|
-
core.Input(),
|
|
1001
|
-
__metadata("design:type", Object)
|
|
1002
|
-
], TextInputComponent.prototype, "rows", void 0);
|
|
1003
|
-
__decorate([
|
|
1004
|
-
core.Input(),
|
|
1005
|
-
__metadata("design:type", Number)
|
|
1006
|
-
], TextInputComponent.prototype, "cols", void 0);
|
|
1007
|
-
TextInputComponent = __decorate([
|
|
1008
|
-
core.Component({
|
|
1009
|
-
selector: 'aup-text-input',
|
|
1010
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"delegatingFormValueModel.focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n </textarea>\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
|
|
1011
|
-
styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}button[disabled]{visibility:hidden}textarea{overflow:auto}"]
|
|
1012
|
-
}),
|
|
1013
|
-
__metadata("design:paramtypes", [])
|
|
1014
|
-
], TextInputComponent);
|
|
1015
|
-
return TextInputComponent;
|
|
1016
|
-
}(AbstractInputComponent));
|
|
1017
|
-
|
|
1018
|
-
var NoopComponent = /** @class */ (function () {
|
|
1019
|
-
function NoopComponent() {
|
|
1020
|
-
}
|
|
1021
|
-
NoopComponent = __decorate([
|
|
1022
|
-
core.Component({
|
|
1023
|
-
selector: 'aup-noop',
|
|
1024
|
-
template: "",
|
|
1025
|
-
styles: [":host{display:block}"]
|
|
1026
|
-
}),
|
|
1027
|
-
__metadata("design:paramtypes", [])
|
|
1028
|
-
], NoopComponent);
|
|
1029
|
-
return NoopComponent;
|
|
1030
|
-
}());
|
|
1031
|
-
|
|
1032
|
-
var ScrollContainerComponent = /** @class */ (function () {
|
|
1033
|
-
function ScrollContainerComponent() {
|
|
1034
|
-
}
|
|
1035
|
-
ScrollContainerComponent.prototype.ngOnInit = function () {
|
|
1597
|
+
InPlaceInteractionContextComponent.prototype.initialise = function (id, api) {
|
|
1598
|
+
this.activityContainerComponent.initialise(id, api);
|
|
1036
1599
|
};
|
|
1037
|
-
|
|
1038
|
-
core.Component({
|
|
1039
|
-
selector: 'aup-scroll-container',
|
|
1040
|
-
template: "<div class=\"container\">\n <ng-content></ng-content>\n</div>\n",
|
|
1041
|
-
styles: [":host{display:flex;flex-direction:column;min-height:0;align-items:stretch}.container{display:flex;flex-direction:column;flex:1;flex-basis:0;overflow-y:scroll;align-items:stretch}"]
|
|
1042
|
-
}),
|
|
1043
|
-
__metadata("design:paramtypes", [])
|
|
1044
|
-
], ScrollContainerComponent);
|
|
1045
|
-
return ScrollContainerComponent;
|
|
1046
|
-
}());
|
|
1047
|
-
|
|
1048
|
-
var SwitchCaseOption = /** @class */ (function () {
|
|
1049
|
-
function SwitchCaseOption(templateRef) {
|
|
1050
|
-
this.templateRef = templateRef;
|
|
1051
|
-
}
|
|
1052
|
-
Object.defineProperty(SwitchCaseOption.prototype, "name", {
|
|
1600
|
+
Object.defineProperty(InPlaceInteractionContextComponent.prototype, "identifier", {
|
|
1053
1601
|
get: function () {
|
|
1054
|
-
return this.
|
|
1602
|
+
return this.activityContainerComponent.identifier;
|
|
1055
1603
|
},
|
|
1056
1604
|
enumerable: true,
|
|
1057
1605
|
configurable: true
|
|
1058
1606
|
});
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
var SwitchCaseWhenDirective = /** @class */ (function (_super) {
|
|
1062
|
-
__extends(SwitchCaseWhenDirective, _super);
|
|
1063
|
-
function SwitchCaseWhenDirective(templateRef) {
|
|
1064
|
-
var _this = _super.call(this, templateRef) || this;
|
|
1065
|
-
_this.isDefault = false;
|
|
1066
|
-
return _this;
|
|
1067
|
-
}
|
|
1068
|
-
SwitchCaseWhenDirective_1 = SwitchCaseWhenDirective;
|
|
1069
|
-
SwitchCaseWhenDirective.prototype.matches = function (value) {
|
|
1070
|
-
return this.aupSwitchCaseWhen === value;
|
|
1607
|
+
InPlaceInteractionContextComponent.prototype.alert = function (alert) {
|
|
1608
|
+
return this.activityContainerComponent.alert(alert);
|
|
1071
1609
|
};
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1610
|
+
InPlaceInteractionContextComponent.prototype.cancelActiveActivity = function () {
|
|
1611
|
+
return this.activityContainerComponent.cancelActiveActivity();
|
|
1612
|
+
};
|
|
1613
|
+
InPlaceInteractionContextComponent.prototype.confirm = function (confirm) {
|
|
1614
|
+
return this.activityContainerComponent.confirm(confirm);
|
|
1615
|
+
};
|
|
1616
|
+
InPlaceInteractionContextComponent.prototype.confirmOrReject = function (confirm) {
|
|
1617
|
+
return this.activityContainerComponent.confirmOrReject(confirm);
|
|
1618
|
+
};
|
|
1619
|
+
InPlaceInteractionContextComponent.prototype.confirmThen = function (confirm, activityType, data) {
|
|
1620
|
+
return this.activityContainerComponent.confirmThen(confirm, activityType);
|
|
1621
|
+
};
|
|
1622
|
+
InPlaceInteractionContextComponent.prototype.isActive = function () {
|
|
1623
|
+
return this.activityContainerComponent.isActive();
|
|
1624
|
+
};
|
|
1625
|
+
InPlaceInteractionContextComponent.prototype.startActivity = function (activityType, data) {
|
|
1626
|
+
return this.activityContainerComponent.startActivity(activityType, data);
|
|
1627
|
+
};
|
|
1628
|
+
InPlaceInteractionContextComponent.ctorParameters = function () { return [
|
|
1629
|
+
{ type: exports.ɵbw },
|
|
1630
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [tabs.MAT_TABS_CONFIG,] }, { type: core.Optional }] }
|
|
1075
1631
|
]; };
|
|
1632
|
+
__decorate([
|
|
1633
|
+
core.ViewChild('activityContainer', { static: true }),
|
|
1634
|
+
__metadata("design:type", ActivityContainerComponent)
|
|
1635
|
+
], InPlaceInteractionContextComponent.prototype, "activityContainerComponent", void 0);
|
|
1076
1636
|
__decorate([
|
|
1077
1637
|
core.Input(),
|
|
1078
1638
|
__metadata("design:type", Object)
|
|
1079
|
-
],
|
|
1080
|
-
|
|
1081
|
-
core.
|
|
1082
|
-
selector: '
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
__metadata("design:paramtypes", [core.TemplateRef])
|
|
1086
|
-
], SwitchCaseWhenDirective);
|
|
1087
|
-
return SwitchCaseWhenDirective;
|
|
1088
|
-
}(SwitchCaseOption));
|
|
1089
|
-
var SwitchCaseDefaultDirective = /** @class */ (function (_super) {
|
|
1090
|
-
__extends(SwitchCaseDefaultDirective, _super);
|
|
1091
|
-
function SwitchCaseDefaultDirective(templateRef) {
|
|
1092
|
-
var _this = _super.call(this, templateRef) || this;
|
|
1093
|
-
_this.isDefault = true;
|
|
1094
|
-
return _this;
|
|
1095
|
-
}
|
|
1096
|
-
SwitchCaseDefaultDirective_1 = SwitchCaseDefaultDirective;
|
|
1097
|
-
SwitchCaseDefaultDirective.prototype.matches = function (value) {
|
|
1098
|
-
return false;
|
|
1099
|
-
};
|
|
1100
|
-
var SwitchCaseDefaultDirective_1;
|
|
1101
|
-
SwitchCaseDefaultDirective.ctorParameters = function () { return [
|
|
1102
|
-
{ type: core.TemplateRef }
|
|
1103
|
-
]; };
|
|
1104
|
-
SwitchCaseDefaultDirective = SwitchCaseDefaultDirective_1 = __decorate([
|
|
1105
|
-
core.Directive({
|
|
1106
|
-
selector: '[aupSwitchCaseDefault]',
|
|
1107
|
-
providers: [{ provide: SwitchCaseOption, useExisting: SwitchCaseDefaultDirective_1 }]
|
|
1639
|
+
], InPlaceInteractionContextComponent.prototype, "animateFirstActivity", void 0);
|
|
1640
|
+
InPlaceInteractionContextComponent = __decorate([
|
|
1641
|
+
core.Component({
|
|
1642
|
+
selector: 'aup-in-place-interaction-context',
|
|
1643
|
+
template: "<mat-tab-group no-tab-header [selectedIndex]=\"isActive() ? 1 : 0\" full-height-tabs [dynamicHeight]=\"false\" [animationDuration]=\"animationDuration\">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer [dynamicHeight]=\"false\"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n",
|
|
1644
|
+
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
|
|
1108
1645
|
}),
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1646
|
+
__param(1, core.Inject(tabs.MAT_TABS_CONFIG)), __param(1, core.Optional()),
|
|
1647
|
+
__metadata("design:paramtypes", [exports.ɵbw, Object])
|
|
1648
|
+
], InPlaceInteractionContextComponent);
|
|
1649
|
+
return InPlaceInteractionContextComponent;
|
|
1650
|
+
}(DisposableComponent));
|
|
1651
|
+
|
|
1652
|
+
var PopupInteractionContextComponent = /** @class */ (function (_super) {
|
|
1653
|
+
__extends(PopupInteractionContextComponent, _super);
|
|
1654
|
+
function PopupInteractionContextComponent(_element, _overlay) {
|
|
1116
1655
|
var _this = _super.call(this) || this;
|
|
1117
|
-
_this.
|
|
1118
|
-
_this.
|
|
1656
|
+
_this._element = _element;
|
|
1657
|
+
_this._overlay = _overlay;
|
|
1658
|
+
_this.outputPortal = new portal.ComponentPortal(InPlaceInteractionContextComponent);
|
|
1659
|
+
_this.anchorX = 'start';
|
|
1660
|
+
_this.anchorY = 'bottom';
|
|
1119
1661
|
return _this;
|
|
1120
1662
|
}
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
this.cdr.detectChanges();
|
|
1130
|
-
};
|
|
1131
|
-
SwitchCaseComponent.prototype.updateSelection = function () {
|
|
1663
|
+
Object.defineProperty(PopupInteractionContextComponent.prototype, "active", {
|
|
1664
|
+
get: function () {
|
|
1665
|
+
return this.isActive();
|
|
1666
|
+
},
|
|
1667
|
+
enumerable: true,
|
|
1668
|
+
configurable: true
|
|
1669
|
+
});
|
|
1670
|
+
PopupInteractionContextComponent.prototype.startActivity = function (activityType, data) {
|
|
1132
1671
|
var _this = this;
|
|
1133
|
-
var
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1672
|
+
var overlayRef = this._overlay.create({
|
|
1673
|
+
hasBackdrop: false,
|
|
1674
|
+
panelClass: 'aup-popup-interaction-panel',
|
|
1675
|
+
positionStrategy: this._overlay.position()
|
|
1676
|
+
.flexibleConnectedTo(this._element)
|
|
1677
|
+
.withPositions(this.computePositions())
|
|
1678
|
+
.withGrowAfterOpen(true)
|
|
1138
1679
|
});
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1680
|
+
var componentRef = overlayRef.attach(this.outputPortal);
|
|
1681
|
+
this.interactionContext = componentRef.instance;
|
|
1682
|
+
return new Promise(function (resolve, reject) {
|
|
1683
|
+
// HACK: afterViewInit won't have been called yet. Need to add when.valueOf(interactionContext.ready).becomesTruthy(...)
|
|
1684
|
+
setTimeout(function () {
|
|
1685
|
+
_this.interactionContext.startActivity(activityType, data)
|
|
1686
|
+
.then(resolve)
|
|
1687
|
+
.catch(reject)
|
|
1688
|
+
.finally(function () { return overlayRef.dispose(); });
|
|
1145
1689
|
});
|
|
1146
|
-
|
|
1147
|
-
console.warn("found " + matchingIndicies.length + " default case values, displaying the first.");
|
|
1148
|
-
}
|
|
1149
|
-
}
|
|
1150
|
-
if (matchingIndicies.length > 0) {
|
|
1151
|
-
this.selectedIndex = matchingIndicies[0];
|
|
1152
|
-
}
|
|
1153
|
-
else {
|
|
1154
|
-
console.warn("found no matching or default case values.");
|
|
1155
|
-
this.selectedIndex = -1;
|
|
1156
|
-
}
|
|
1690
|
+
});
|
|
1157
1691
|
};
|
|
1158
|
-
|
|
1159
|
-
|
|
1692
|
+
PopupInteractionContextComponent.prototype.computePositions = function () {
|
|
1693
|
+
var overlayX = this.anchorX === 'start' ? 'start' : 'end';
|
|
1694
|
+
var overlayY = this.anchorY === 'top' ? 'bottom' : 'top';
|
|
1695
|
+
return [
|
|
1696
|
+
{ originX: this.anchorX, originY: this.anchorY, overlayX: overlayX, overlayY: overlayY }
|
|
1697
|
+
// TODO: compute some meaningful alternatives.
|
|
1698
|
+
// { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },
|
|
1699
|
+
// { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },
|
|
1700
|
+
// { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },
|
|
1701
|
+
// { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' }
|
|
1702
|
+
];
|
|
1703
|
+
};
|
|
1704
|
+
PopupInteractionContextComponent.prototype.cancelActiveActivity = function () {
|
|
1705
|
+
return this.interactionContext.cancelActiveActivity();
|
|
1706
|
+
};
|
|
1707
|
+
PopupInteractionContextComponent.prototype.isActive = function () {
|
|
1708
|
+
return this.interactionContext && this.interactionContext.isActive();
|
|
1709
|
+
};
|
|
1710
|
+
PopupInteractionContextComponent.prototype.ngOnInit = function () {
|
|
1711
|
+
};
|
|
1712
|
+
PopupInteractionContextComponent.ctorParameters = function () { return [
|
|
1713
|
+
{ type: core.ElementRef },
|
|
1714
|
+
{ type: overlay.Overlay }
|
|
1160
1715
|
]; };
|
|
1161
1716
|
__decorate([
|
|
1162
|
-
core.
|
|
1163
|
-
__metadata("design:type",
|
|
1164
|
-
|
|
1717
|
+
core.HostBinding('class.interaction-active'),
|
|
1718
|
+
__metadata("design:type", Boolean),
|
|
1719
|
+
__metadata("design:paramtypes", [])
|
|
1720
|
+
], PopupInteractionContextComponent.prototype, "active", null);
|
|
1165
1721
|
__decorate([
|
|
1166
|
-
core.Input(),
|
|
1167
|
-
__metadata("design:type",
|
|
1168
|
-
],
|
|
1722
|
+
core.Input(),
|
|
1723
|
+
__metadata("design:type", String)
|
|
1724
|
+
], PopupInteractionContextComponent.prototype, "anchorX", void 0);
|
|
1169
1725
|
__decorate([
|
|
1170
|
-
core.
|
|
1171
|
-
__metadata("design:type",
|
|
1172
|
-
],
|
|
1173
|
-
|
|
1726
|
+
core.Input(),
|
|
1727
|
+
__metadata("design:type", String)
|
|
1728
|
+
], PopupInteractionContextComponent.prototype, "anchorY", void 0);
|
|
1729
|
+
PopupInteractionContextComponent = __decorate([
|
|
1174
1730
|
core.Component({
|
|
1175
|
-
selector: 'aup-
|
|
1176
|
-
template: "<
|
|
1177
|
-
styles: [":host{display:
|
|
1731
|
+
selector: 'aup-popup-interaction-context',
|
|
1732
|
+
template: "<ng-content></ng-content>\n",
|
|
1733
|
+
styles: [":host{display:inline}:host.interaction-active{background:rgba(0,0,0,.05)}"]
|
|
1178
1734
|
}),
|
|
1179
|
-
__metadata("design:paramtypes", [core.
|
|
1180
|
-
],
|
|
1181
|
-
return
|
|
1735
|
+
__metadata("design:paramtypes", [core.ElementRef, overlay.Overlay])
|
|
1736
|
+
], PopupInteractionContextComponent);
|
|
1737
|
+
return PopupInteractionContextComponent;
|
|
1182
1738
|
}(DisposableComponent));
|
|
1183
1739
|
|
|
1184
|
-
var
|
|
1185
|
-
__extends(
|
|
1186
|
-
function
|
|
1187
|
-
var _this = _super.call(this
|
|
1188
|
-
_this.
|
|
1740
|
+
var InteractionContextTriggerFor = /** @class */ (function (_super) {
|
|
1741
|
+
__extends(InteractionContextTriggerFor, _super);
|
|
1742
|
+
function InteractionContextTriggerFor() {
|
|
1743
|
+
var _this = _super.call(this) || this;
|
|
1744
|
+
_this.activityDone = new core.EventEmitter();
|
|
1745
|
+
_this.activityCancelled = new core.EventEmitter();
|
|
1189
1746
|
return _this;
|
|
1190
1747
|
}
|
|
1191
|
-
|
|
1192
|
-
if (this.
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1748
|
+
InteractionContextTriggerFor.prototype.onEnter = function (event) {
|
|
1749
|
+
if (!this.aupInteractionContextTriggerFor.isActive()) {
|
|
1750
|
+
this.startActivity();
|
|
1751
|
+
}
|
|
1752
|
+
else {
|
|
1753
|
+
this.aupInteractionContextTriggerFor.cancelActiveActivity();
|
|
1196
1754
|
}
|
|
1197
1755
|
};
|
|
1198
|
-
|
|
1199
|
-
if (this.
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1756
|
+
InteractionContextTriggerFor.prototype.onClick = function (event) {
|
|
1757
|
+
if (!this.aupInteractionContextTriggerFor.isActive()) {
|
|
1758
|
+
this.startActivity();
|
|
1759
|
+
}
|
|
1760
|
+
else {
|
|
1761
|
+
this.aupInteractionContextTriggerFor.cancelActiveActivity();
|
|
1203
1762
|
}
|
|
1204
1763
|
};
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
this.
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1764
|
+
InteractionContextTriggerFor.prototype.startActivity = function () {
|
|
1765
|
+
var _this = this;
|
|
1766
|
+
pectin.assert.isTruthy(this.aupInteractionContextTriggerFor);
|
|
1767
|
+
pectin.assert.isFalsey(this.aupInteractionContextTriggerFor.isActive());
|
|
1768
|
+
pectin.assert.isTruthy(this.activityClass);
|
|
1769
|
+
this.aupInteractionContextTriggerFor.startActivity(this.activityClass, this.activityData)
|
|
1770
|
+
.then(function (result) {
|
|
1771
|
+
_this.activityDone.emit(result);
|
|
1772
|
+
})
|
|
1773
|
+
.catch(function (error) {
|
|
1774
|
+
_this.activityCancelled.emit(error);
|
|
1775
|
+
});
|
|
1214
1776
|
};
|
|
1215
|
-
|
|
1777
|
+
InteractionContextTriggerFor.prototype.prepareActivityData = function () {
|
|
1778
|
+
return ___default__default.isFunction(this.activityDataFactory()) ? this.activityDataFactory() : this.activityData;
|
|
1216
1779
|
};
|
|
1217
|
-
VerticalFocusContainerComponent.ctorParameters = function () { return [
|
|
1218
|
-
{ type: pectin.FocusManager, decorators: [{ type: core.Self }] }
|
|
1219
|
-
]; };
|
|
1220
1780
|
__decorate([
|
|
1221
|
-
core.Input(
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
], VerticalFocusContainerComponent.prototype, "rightArrowCommand", void 0);
|
|
1781
|
+
core.Input(),
|
|
1782
|
+
__metadata("design:type", Object)
|
|
1783
|
+
], InteractionContextTriggerFor.prototype, "aupInteractionContextTriggerFor", void 0);
|
|
1225
1784
|
__decorate([
|
|
1226
|
-
core.Input(
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
], VerticalFocusContainerComponent.prototype, "leftArrowCommand", void 0);
|
|
1785
|
+
core.Input(),
|
|
1786
|
+
__metadata("design:type", Object)
|
|
1787
|
+
], InteractionContextTriggerFor.prototype, "activityClass", void 0);
|
|
1230
1788
|
__decorate([
|
|
1231
|
-
core.
|
|
1232
|
-
__metadata("design:type",
|
|
1233
|
-
|
|
1234
|
-
__metadata("design:returntype", void 0)
|
|
1235
|
-
], VerticalFocusContainerComponent.prototype, "arrowLeft", null);
|
|
1789
|
+
core.Input(),
|
|
1790
|
+
__metadata("design:type", Object)
|
|
1791
|
+
], InteractionContextTriggerFor.prototype, "activityData", void 0);
|
|
1236
1792
|
__decorate([
|
|
1237
|
-
core.
|
|
1238
|
-
__metadata("design:type", Function)
|
|
1239
|
-
|
|
1240
|
-
__metadata("design:returntype", void 0)
|
|
1241
|
-
], VerticalFocusContainerComponent.prototype, "arrowRight", null);
|
|
1793
|
+
core.Input(),
|
|
1794
|
+
__metadata("design:type", Function)
|
|
1795
|
+
], InteractionContextTriggerFor.prototype, "activityDataFactory", void 0);
|
|
1242
1796
|
__decorate([
|
|
1243
|
-
core.
|
|
1797
|
+
core.Output(),
|
|
1798
|
+
__metadata("design:type", Object)
|
|
1799
|
+
], InteractionContextTriggerFor.prototype, "activityDone", void 0);
|
|
1800
|
+
__decorate([
|
|
1801
|
+
core.Output(),
|
|
1802
|
+
__metadata("design:type", Object)
|
|
1803
|
+
], InteractionContextTriggerFor.prototype, "activityCancelled", void 0);
|
|
1804
|
+
__decorate([
|
|
1805
|
+
core.HostListener('keyup.enter'),
|
|
1244
1806
|
__metadata("design:type", Function),
|
|
1245
1807
|
__metadata("design:paramtypes", [KeyboardEvent]),
|
|
1246
1808
|
__metadata("design:returntype", void 0)
|
|
1247
|
-
],
|
|
1809
|
+
], InteractionContextTriggerFor.prototype, "onEnter", null);
|
|
1248
1810
|
__decorate([
|
|
1249
|
-
core.HostListener('
|
|
1811
|
+
core.HostListener('click'),
|
|
1250
1812
|
__metadata("design:type", Function),
|
|
1251
|
-
__metadata("design:paramtypes", [
|
|
1813
|
+
__metadata("design:paramtypes", [MouseEvent]),
|
|
1252
1814
|
__metadata("design:returntype", void 0)
|
|
1253
|
-
],
|
|
1254
|
-
|
|
1255
|
-
core.
|
|
1256
|
-
selector: '
|
|
1257
|
-
template: "<ng-content></ng-content>\n",
|
|
1258
|
-
providers: [
|
|
1259
|
-
{ provide: pectin.FocusManager }
|
|
1260
|
-
],
|
|
1261
|
-
styles: [":host{display:block}"]
|
|
1262
|
-
}),
|
|
1263
|
-
__param(0, core.Self()),
|
|
1264
|
-
__metadata("design:paramtypes", [pectin.FocusManager])
|
|
1265
|
-
], VerticalFocusContainerComponent);
|
|
1266
|
-
return VerticalFocusContainerComponent;
|
|
1267
|
-
}(FocusContainerComponent));
|
|
1268
|
-
|
|
1269
|
-
/**
|
|
1270
|
-
* @example
|
|
1271
|
-
* // CSS Vars
|
|
1272
|
-
* aup-card-container {
|
|
1273
|
-
* --card-gap: var(--card-gap, 16px);
|
|
1274
|
-
* --card-width: var(--card-width, 300px);
|
|
1275
|
-
* --card-height: var(--card-height, auto);
|
|
1276
|
-
* --card-min-height: var(--card-min-height, auto);
|
|
1277
|
-
* --card-background: var(--card-background, #fcfcfb);
|
|
1278
|
-
* }
|
|
1279
|
-
*
|
|
1280
|
-
* // Content Templates:
|
|
1281
|
-
* #addCardTemplate
|
|
1282
|
-
* <ng-template #addCardTemplate>
|
|
1283
|
-
* This is a new card template, it will the the size of the other cards.
|
|
1284
|
-
* </nav-template>
|
|
1285
|
-
*
|
|
1286
|
-
*/
|
|
1287
|
-
var CardContainerComponent = /** @class */ (function (_super) {
|
|
1288
|
-
__extends(CardContainerComponent, _super);
|
|
1289
|
-
function CardContainerComponent() {
|
|
1290
|
-
return _super.call(this) || this;
|
|
1291
|
-
}
|
|
1292
|
-
CardContainerComponent.prototype.ngOnInit = function () {
|
|
1293
|
-
};
|
|
1294
|
-
__decorate([
|
|
1295
|
-
core.Input(),
|
|
1296
|
-
pectin.TrackExternal(),
|
|
1297
|
-
__metadata("design:type", pectin.Command)
|
|
1298
|
-
], CardContainerComponent.prototype, "addCardCommand", void 0);
|
|
1299
|
-
__decorate([
|
|
1300
|
-
core.ContentChild("addCardTemplate"),
|
|
1301
|
-
__metadata("design:type", core.TemplateRef)
|
|
1302
|
-
], CardContainerComponent.prototype, "addCardTemplate", void 0);
|
|
1303
|
-
CardContainerComponent = __decorate([
|
|
1304
|
-
core.Component({
|
|
1305
|
-
selector: 'aup-card-container',
|
|
1306
|
-
template: "<div class=\"card-container\">\n <ng-content></ng-content>\n\n <div class=\"add-card-container\" *ngIf=\"addCardCommand.enabled.value\" [pectinCommand]=\"addCardCommand\">\n <mat-icon>add</mat-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",
|
|
1307
|
-
styles: [":root{--aup-default-padding:var(--default-padding, 18px)}.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}[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}.router-outlet-container>*{position:absolute;top:0;left:0;bottom:0;right:0}: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}"]
|
|
1815
|
+
], InteractionContextTriggerFor.prototype, "onClick", null);
|
|
1816
|
+
InteractionContextTriggerFor = __decorate([
|
|
1817
|
+
core.Directive({
|
|
1818
|
+
selector: '[aupInteractionContextTriggerFor]'
|
|
1308
1819
|
}),
|
|
1309
1820
|
__metadata("design:paramtypes", [])
|
|
1310
|
-
],
|
|
1311
|
-
return
|
|
1312
|
-
}(
|
|
1313
|
-
|
|
1314
|
-
var ComponentsModule = /** @class */ (function () {
|
|
1315
|
-
function ComponentsModule() {
|
|
1316
|
-
}
|
|
1317
|
-
ComponentsModule = __decorate([
|
|
1318
|
-
core.NgModule({
|
|
1319
|
-
declarations: [
|
|
1320
|
-
NumberInputComponent,
|
|
1321
|
-
StringInputComponent,
|
|
1322
|
-
TextInputComponent,
|
|
1323
|
-
PasswordInputComponent,
|
|
1324
|
-
SelectInputComponent,
|
|
1325
|
-
CheckboxInputComponent,
|
|
1326
|
-
ScrollContainerComponent,
|
|
1327
|
-
NoopComponent,
|
|
1328
|
-
AbstractInputComponent,
|
|
1329
|
-
SwitchCaseComponent,
|
|
1330
|
-
SwitchCaseWhenDirective,
|
|
1331
|
-
SwitchCaseDefaultDirective,
|
|
1332
|
-
FocusContainerComponent,
|
|
1333
|
-
VerticalFocusContainerComponent,
|
|
1334
|
-
FocusableComponent,
|
|
1335
|
-
CardContainerComponent
|
|
1336
|
-
],
|
|
1337
|
-
imports: [
|
|
1338
|
-
common.CommonModule,
|
|
1339
|
-
animations.BrowserAnimationsModule,
|
|
1340
|
-
forms.FormsModule,
|
|
1341
|
-
input.MatInputModule,
|
|
1342
|
-
formField.MatFormFieldModule,
|
|
1343
|
-
select.MatSelectModule,
|
|
1344
|
-
tabs.MatTabsModule,
|
|
1345
|
-
DirectivesModule,
|
|
1346
|
-
icon.MatIconModule,
|
|
1347
|
-
button.MatButtonModule,
|
|
1348
|
-
checkbox.MatCheckboxModule
|
|
1349
|
-
],
|
|
1350
|
-
exports: [
|
|
1351
|
-
NumberInputComponent,
|
|
1352
|
-
StringInputComponent,
|
|
1353
|
-
TextInputComponent,
|
|
1354
|
-
PasswordInputComponent,
|
|
1355
|
-
CheckboxInputComponent,
|
|
1356
|
-
SelectInputComponent,
|
|
1357
|
-
ScrollContainerComponent,
|
|
1358
|
-
NoopComponent,
|
|
1359
|
-
SwitchCaseComponent,
|
|
1360
|
-
SwitchCaseWhenDirective,
|
|
1361
|
-
SwitchCaseDefaultDirective,
|
|
1362
|
-
FocusContainerComponent,
|
|
1363
|
-
VerticalFocusContainerComponent,
|
|
1364
|
-
FocusableComponent,
|
|
1365
|
-
CardContainerComponent
|
|
1366
|
-
],
|
|
1367
|
-
providers: [
|
|
1368
|
-
FocusBindingFactory
|
|
1369
|
-
]
|
|
1370
|
-
})
|
|
1371
|
-
], ComponentsModule);
|
|
1372
|
-
return ComponentsModule;
|
|
1373
|
-
}());
|
|
1374
|
-
|
|
1375
|
-
var Dimension = /** @class */ (function () {
|
|
1376
|
-
function Dimension(width, height) {
|
|
1377
|
-
this.width = width;
|
|
1378
|
-
this.height = height;
|
|
1379
|
-
}
|
|
1380
|
-
return Dimension;
|
|
1381
|
-
}());
|
|
1821
|
+
], InteractionContextTriggerFor);
|
|
1822
|
+
return InteractionContextTriggerFor;
|
|
1823
|
+
}(pectin.GarbageCollector));
|
|
1382
1824
|
|
|
1383
|
-
var
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1825
|
+
var DialogInteractionContext = /** @class */ (function (_super) {
|
|
1826
|
+
__extends(DialogInteractionContext, _super);
|
|
1827
|
+
function DialogInteractionContext(identifier, api, dialogService, config) {
|
|
1828
|
+
var _this = _super.call(this) || this;
|
|
1829
|
+
_this.identifier = identifier;
|
|
1830
|
+
_this.api = api;
|
|
1831
|
+
_this.dialogService = dialogService;
|
|
1832
|
+
_this.config = config;
|
|
1833
|
+
_this.garbage = new pectin.GarbageCollector();
|
|
1834
|
+
typescriptUtilities.assert.notNil(dialogService);
|
|
1835
|
+
return _this;
|
|
1387
1836
|
}
|
|
1388
|
-
|
|
1389
|
-
return
|
|
1837
|
+
DialogInteractionContext.prototype.cancelActiveActivity = function () {
|
|
1838
|
+
return this.activityContainer.cancelActiveActivity();
|
|
1390
1839
|
};
|
|
1391
|
-
|
|
1392
|
-
|
|
1840
|
+
DialogInteractionContext.prototype.dispose = function () {
|
|
1841
|
+
if (this.isActive()) {
|
|
1842
|
+
pectin.lang.illegalState('Dispose called while active.');
|
|
1843
|
+
}
|
|
1844
|
+
this.garbage.dispose();
|
|
1845
|
+
};
|
|
1846
|
+
DialogInteractionContext.prototype.registerDisposable = function (disposable) {
|
|
1847
|
+
return this.garbage.registerDisposable(disposable);
|
|
1848
|
+
};
|
|
1849
|
+
DialogInteractionContext.prototype.isActive = function () {
|
|
1850
|
+
return !!this.activityContainer && this.activityContainer.isActive();
|
|
1851
|
+
};
|
|
1852
|
+
DialogInteractionContext.prototype.createAndLaunchActivity = function (activityType, data, disableClose) {
|
|
1853
|
+
var _this = this;
|
|
1854
|
+
typescriptUtilities.assert.isNil(this._currentActivityRef);
|
|
1855
|
+
var config = __assign(__assign({}, this.config), {
|
|
1856
|
+
disableClose: disableClose,
|
|
1857
|
+
panelClass: 'dialog-interaction-context'
|
|
1858
|
+
});
|
|
1859
|
+
var self = this;
|
|
1860
|
+
var matDialogRef = this.dialogService.open(ActivityContainerComponent, config);
|
|
1861
|
+
var activityContainer = this.activityContainer = matDialogRef.componentInstance;
|
|
1862
|
+
this.activityContainer.initialise(this.identifier, this.api);
|
|
1863
|
+
var activityResult = this.activityContainer.startActivity(activityType, data);
|
|
1864
|
+
activityResult.finally(function () { return matDialogRef.close(); });
|
|
1865
|
+
// we need to check if our onDone/onCancel methods above we called or if we were
|
|
1866
|
+
// closed by the user clicking the backdrop. If the later then we need to cancel our
|
|
1867
|
+
// activity.
|
|
1868
|
+
matDialogRef.afterClosed().subscribe(function (promiseAlreadyFinished) {
|
|
1869
|
+
if (activityContainer.isActive()) {
|
|
1870
|
+
activityContainer.cancelActiveActivity();
|
|
1871
|
+
}
|
|
1872
|
+
_this.activityContainer = null;
|
|
1873
|
+
});
|
|
1874
|
+
matDialogRef.updateSize();
|
|
1875
|
+
matDialogRef.afterOpened().subscribe(function (promiseAlreadyFinished) {
|
|
1876
|
+
matDialogRef.updateSize();
|
|
1877
|
+
});
|
|
1878
|
+
return activityResult;
|
|
1879
|
+
};
|
|
1880
|
+
return DialogInteractionContext;
|
|
1881
|
+
}(AbstractInteractionContext));
|
|
1882
|
+
|
|
1883
|
+
var DIALOG_INTERACTION_SERVICE_DEFAULTS = new core.InjectionToken('DIALOG_INTERACTION_SERVICE_DEFAULTS');
|
|
1884
|
+
var DialogInteractionContextFactory = /** @class */ (function (_super) {
|
|
1885
|
+
__extends(DialogInteractionContextFactory, _super);
|
|
1886
|
+
function DialogInteractionContextFactory(dialogService, dialogServiceDefaults, matDialogDefaultConfig) {
|
|
1887
|
+
var _this = _super.call(this) || this;
|
|
1888
|
+
_this.dialogService = dialogService;
|
|
1889
|
+
_this.dialogServiceDefaults = dialogServiceDefaults;
|
|
1890
|
+
_this.matDialogDefaultConfig = matDialogDefaultConfig;
|
|
1891
|
+
typescriptUtilities.assert.notNil(dialogService);
|
|
1892
|
+
return _this;
|
|
1893
|
+
}
|
|
1894
|
+
DialogInteractionContextFactory.prototype.createInteractionContext = function (identifier, api) {
|
|
1895
|
+
var config = __assign(__assign({ autoFocus: false, hasBackdrop: true, closeOnNavigation: false }, this.matDialogDefaultConfig), this.dialogServiceDefaults);
|
|
1896
|
+
return new DialogInteractionContext(identifier, api, this.dialogService, config);
|
|
1393
1897
|
};
|
|
1394
|
-
return
|
|
1395
|
-
|
|
1898
|
+
DialogInteractionContextFactory.ctorParameters = function () { return [
|
|
1899
|
+
{ type: dialog.MatDialog },
|
|
1900
|
+
{ type: dialog.MatDialogConfig, decorators: [{ type: core.Optional }, { type: core.Inject, args: [DIALOG_INTERACTION_SERVICE_DEFAULTS,] }] },
|
|
1901
|
+
{ type: dialog.MatDialogConfig, decorators: [{ type: core.Optional }, { type: core.Inject, args: [dialog.MAT_DIALOG_DEFAULT_OPTIONS,] }] }
|
|
1902
|
+
]; };
|
|
1903
|
+
DialogInteractionContextFactory.ɵprov = core.ɵɵdefineInjectable({ factory: function DialogInteractionContextFactory_Factory() { return new DialogInteractionContextFactory(core.ɵɵinject(dialog.MatDialog), core.ɵɵinject(DIALOG_INTERACTION_SERVICE_DEFAULTS, 8), core.ɵɵinject(dialog.MAT_DIALOG_DEFAULT_OPTIONS, 8)); }, token: DialogInteractionContextFactory, providedIn: "root" });
|
|
1904
|
+
DialogInteractionContextFactory = __decorate([
|
|
1905
|
+
core.Injectable({
|
|
1906
|
+
providedIn: 'root'
|
|
1907
|
+
}),
|
|
1908
|
+
__param(1, core.Optional()), __param(1, core.Inject(DIALOG_INTERACTION_SERVICE_DEFAULTS)),
|
|
1909
|
+
__param(2, core.Optional()), __param(2, core.Inject(dialog.MAT_DIALOG_DEFAULT_OPTIONS)),
|
|
1910
|
+
__metadata("design:paramtypes", [dialog.MatDialog,
|
|
1911
|
+
dialog.MatDialogConfig,
|
|
1912
|
+
dialog.MatDialogConfig])
|
|
1913
|
+
], DialogInteractionContextFactory);
|
|
1914
|
+
return DialogInteractionContextFactory;
|
|
1915
|
+
}(ModalInteractionContextFactory));
|
|
1396
1916
|
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
_this
|
|
1917
|
+
/**
|
|
1918
|
+
* @file Automatically generated by barrelsby.
|
|
1919
|
+
*/
|
|
1920
|
+
|
|
1921
|
+
var AbstractInputActivity = /** @class */ (function (_super) {
|
|
1922
|
+
__extends(AbstractInputActivity, _super);
|
|
1923
|
+
function AbstractInputActivity(data) {
|
|
1924
|
+
var _this = _super.call(this) || this;
|
|
1925
|
+
_this.data = data;
|
|
1926
|
+
_this.class = 'aup-input-activity';
|
|
1927
|
+
var form = new pectin.Form();
|
|
1928
|
+
_this.valueModel = form.valueModel(_this.data.initialValue);
|
|
1929
|
+
_this.valueModel.validateUsing(data.validators || []);
|
|
1930
|
+
_this.confirmCommand = pectin.Command.create(function () {
|
|
1931
|
+
if (_this.valueModel.validate()) {
|
|
1932
|
+
if (data.save) {
|
|
1933
|
+
return Promise.resolve(data.save(_this.valueModel, _this.interactionContext))
|
|
1934
|
+
.then(function () { return _this.done(); });
|
|
1935
|
+
}
|
|
1936
|
+
else {
|
|
1937
|
+
_this.done(_this.valueModel.value);
|
|
1938
|
+
}
|
|
1939
|
+
}
|
|
1940
|
+
});
|
|
1941
|
+
_this.cancelCommand = pectin.Command.create(function () {
|
|
1942
|
+
_this.cancel();
|
|
1943
|
+
});
|
|
1405
1944
|
return _this;
|
|
1406
1945
|
}
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
return new Point(point.clientX - this.left, point.clientY - this.top);
|
|
1410
|
-
}
|
|
1411
|
-
else {
|
|
1412
|
-
return new Point(point.x - this.left, point.y - this.top);
|
|
1413
|
-
}
|
|
1946
|
+
AbstractInputActivity.prototype.onActivityReady = function () {
|
|
1947
|
+
this.valueModel.focusContext.requestFocus();
|
|
1414
1948
|
};
|
|
1415
|
-
return
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1949
|
+
AbstractInputActivity.ctorParameters = function () { return [
|
|
1950
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [ACTIVITY_DATA,] }] }
|
|
1951
|
+
]; };
|
|
1952
|
+
__decorate([
|
|
1953
|
+
core.HostBinding('class'),
|
|
1954
|
+
__metadata("design:type", Object)
|
|
1955
|
+
], AbstractInputActivity.prototype, "class", void 0);
|
|
1956
|
+
AbstractInputActivity = __decorate([
|
|
1957
|
+
core.Component({
|
|
1958
|
+
template: ""
|
|
1959
|
+
}),
|
|
1960
|
+
__param(0, core.Inject(ACTIVITY_DATA)),
|
|
1961
|
+
__metadata("design:paramtypes", [Object])
|
|
1962
|
+
], AbstractInputActivity);
|
|
1963
|
+
return AbstractInputActivity;
|
|
1964
|
+
}(Activity));
|
|
1424
1965
|
|
|
1425
|
-
var
|
|
1426
|
-
__extends(
|
|
1427
|
-
function
|
|
1966
|
+
var AbstractInputComponent = /** @class */ (function (_super) {
|
|
1967
|
+
__extends(AbstractInputComponent, _super);
|
|
1968
|
+
function AbstractInputComponent() {
|
|
1428
1969
|
var _this = _super.call(this) || this;
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1970
|
+
/**
|
|
1971
|
+
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
1972
|
+
*
|
|
1973
|
+
* @Input() @TrackExternal({useExisting: "delegatingFormValueModel"})
|
|
1974
|
+
* valueModel: FormValueModel<string> | MutableValueModel<string>;
|
|
1975
|
+
*
|
|
1976
|
+
* This approach allows the input to accept plain or form models but all backed by a form
|
|
1977
|
+
* friendly delegate. We have to use an existing delegate for union types as pectin just
|
|
1978
|
+
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
1979
|
+
*/
|
|
1980
|
+
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
1981
|
+
_this.delegatingFormValueModel = _this.registerDisposable(new pectin.DelegatingFormValueModel());
|
|
1982
|
+
// TODO: fix this.
|
|
1983
|
+
// tslint:disable-next-line:no-output-native
|
|
1984
|
+
_this.focus = new core.EventEmitter();
|
|
1985
|
+
// tslint:disable-next-line:no-output-native
|
|
1986
|
+
_this.blur = new core.EventEmitter();
|
|
1987
|
+
// tslint:disable-next-line:no-output-native
|
|
1988
|
+
_this.enterKey = new core.EventEmitter();
|
|
1989
|
+
// tslint:disable-next-line:no-output-native
|
|
1990
|
+
_this.escapeKey = new core.EventEmitter();
|
|
1991
|
+
_this.baseClassName = 'aup-input-component';
|
|
1992
|
+
var self = _this;
|
|
1993
|
+
_this.errorStateMatcher = {
|
|
1994
|
+
isErrorState: function (control, form) {
|
|
1995
|
+
return self.hasErrors();
|
|
1996
|
+
}
|
|
1997
|
+
};
|
|
1432
1998
|
return _this;
|
|
1433
1999
|
}
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
this.updateBounds();
|
|
1437
|
-
var element = this.elementRef.nativeElement;
|
|
1438
|
-
var ro = new ResizeObserver(function (entries, observer) {
|
|
1439
|
-
_this.ngZone.run(function () { return _this.updateBounds(); });
|
|
1440
|
-
});
|
|
1441
|
-
ro.observe(element);
|
|
1442
|
-
this.onDispose(function () { return ro.disconnect(); });
|
|
2000
|
+
AbstractInputComponent.prototype.notifyClick = function () {
|
|
2001
|
+
this.safelyInvoke(this.clickCommand);
|
|
1443
2002
|
};
|
|
1444
|
-
|
|
2003
|
+
AbstractInputComponent.prototype.notifyFocusIn = function () {
|
|
2004
|
+
this.safelyInvoke(this.focusCommand);
|
|
2005
|
+
this.focus.emit();
|
|
2006
|
+
};
|
|
2007
|
+
AbstractInputComponent.prototype.notifyFocusOut = function () {
|
|
2008
|
+
this.safelyInvoke(this.blurCommand);
|
|
2009
|
+
this.blur.emit();
|
|
2010
|
+
};
|
|
2011
|
+
AbstractInputComponent.prototype.notifyEnterKey = function () {
|
|
2012
|
+
this.safelyInvoke(this.enterCommand);
|
|
2013
|
+
this.enterKey.emit();
|
|
2014
|
+
};
|
|
2015
|
+
AbstractInputComponent.prototype.notifyEscapeKey = function () {
|
|
2016
|
+
this.safelyInvoke(this.escapeCommand);
|
|
2017
|
+
this.escapeKey.emit();
|
|
2018
|
+
};
|
|
2019
|
+
AbstractInputComponent.prototype.safelyInvoke = function (command) {
|
|
2020
|
+
if (command && command.enabled.value) {
|
|
2021
|
+
command.execute();
|
|
2022
|
+
}
|
|
2023
|
+
};
|
|
2024
|
+
AbstractInputComponent.prototype.ngOnInit = function () {
|
|
2025
|
+
};
|
|
2026
|
+
AbstractInputComponent.prototype.isEnabled = function () {
|
|
2027
|
+
return this.enabled.value;
|
|
2028
|
+
};
|
|
2029
|
+
Object.defineProperty(AbstractInputComponent.prototype, "enabled", {
|
|
1445
2030
|
get: function () {
|
|
1446
|
-
return this.
|
|
2031
|
+
return this.delegatingFormValueModel.enabled;
|
|
1447
2032
|
},
|
|
1448
2033
|
enumerable: true,
|
|
1449
2034
|
configurable: true
|
|
1450
2035
|
});
|
|
1451
|
-
|
|
2036
|
+
AbstractInputComponent.prototype.hasErrors = function () {
|
|
2037
|
+
return !this.errorList.query().isEmpty();
|
|
2038
|
+
};
|
|
2039
|
+
Object.defineProperty(AbstractInputComponent.prototype, "errorList", {
|
|
1452
2040
|
get: function () {
|
|
1453
|
-
return this.
|
|
2041
|
+
return this.delegatingFormValueModel.errorList;
|
|
1454
2042
|
},
|
|
1455
2043
|
enumerable: true,
|
|
1456
2044
|
configurable: true
|
|
1457
2045
|
});
|
|
1458
|
-
|
|
1459
|
-
ResizeAwareComponent.prototype.relativePositionOf = function (point) {
|
|
1460
|
-
return this.bounds.relativePositionOf(point);
|
|
1461
|
-
};
|
|
1462
|
-
Object.defineProperty(ResizeAwareComponent.prototype, "bounds", {
|
|
2046
|
+
Object.defineProperty(AbstractInputComponent.prototype, "firstError", {
|
|
1463
2047
|
get: function () {
|
|
1464
|
-
return this.
|
|
2048
|
+
return this.hasErrors() ? this.errorList.value[0] : null;
|
|
1465
2049
|
},
|
|
1466
2050
|
enumerable: true,
|
|
1467
2051
|
configurable: true
|
|
1468
2052
|
});
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
2053
|
+
__decorate([
|
|
2054
|
+
core.Input(),
|
|
2055
|
+
__metadata("design:type", String)
|
|
2056
|
+
], AbstractInputComponent.prototype, "label", void 0);
|
|
2057
|
+
__decorate([
|
|
2058
|
+
core.Input(),
|
|
2059
|
+
__metadata("design:type", String)
|
|
2060
|
+
], AbstractInputComponent.prototype, "floatLabel", void 0);
|
|
2061
|
+
__decorate([
|
|
2062
|
+
core.Input(),
|
|
2063
|
+
__metadata("design:type", String)
|
|
2064
|
+
], AbstractInputComponent.prototype, "hint", void 0);
|
|
2065
|
+
__decorate([
|
|
2066
|
+
core.Input(),
|
|
2067
|
+
__metadata("design:type", String)
|
|
2068
|
+
], AbstractInputComponent.prototype, "placeholder", void 0);
|
|
2069
|
+
__decorate([
|
|
2070
|
+
core.Input('command.focus'),
|
|
2071
|
+
__metadata("design:type", pectin.Command)
|
|
2072
|
+
], AbstractInputComponent.prototype, "focusCommand", void 0);
|
|
2073
|
+
__decorate([
|
|
2074
|
+
core.Input('command.blur'),
|
|
2075
|
+
__metadata("design:type", pectin.Command)
|
|
2076
|
+
], AbstractInputComponent.prototype, "blurCommand", void 0);
|
|
2077
|
+
__decorate([
|
|
2078
|
+
core.Input('command.enter'),
|
|
2079
|
+
__metadata("design:type", pectin.Command)
|
|
2080
|
+
], AbstractInputComponent.prototype, "enterCommand", void 0);
|
|
2081
|
+
__decorate([
|
|
2082
|
+
core.Input('command.escape'),
|
|
2083
|
+
__metadata("design:type", pectin.Command)
|
|
2084
|
+
], AbstractInputComponent.prototype, "escapeCommand", void 0);
|
|
2085
|
+
__decorate([
|
|
2086
|
+
core.Input('command.click'),
|
|
2087
|
+
__metadata("design:type", pectin.Command)
|
|
2088
|
+
], AbstractInputComponent.prototype, "clickCommand", void 0);
|
|
2089
|
+
__decorate([
|
|
2090
|
+
core.Output(),
|
|
2091
|
+
__metadata("design:type", Object)
|
|
2092
|
+
], AbstractInputComponent.prototype, "focus", void 0);
|
|
2093
|
+
__decorate([
|
|
2094
|
+
core.Output(),
|
|
2095
|
+
__metadata("design:type", Object)
|
|
2096
|
+
], AbstractInputComponent.prototype, "blur", void 0);
|
|
2097
|
+
__decorate([
|
|
2098
|
+
core.Output(),
|
|
2099
|
+
__metadata("design:type", Object)
|
|
2100
|
+
], AbstractInputComponent.prototype, "enterKey", void 0);
|
|
2101
|
+
__decorate([
|
|
2102
|
+
core.Output(),
|
|
2103
|
+
__metadata("design:type", Object)
|
|
2104
|
+
], AbstractInputComponent.prototype, "escapeKey", void 0);
|
|
2105
|
+
__decorate([
|
|
2106
|
+
core.HostBinding('class'),
|
|
2107
|
+
__metadata("design:type", Object)
|
|
2108
|
+
], AbstractInputComponent.prototype, "baseClassName", void 0);
|
|
2109
|
+
__decorate([
|
|
2110
|
+
core.HostListener('click'),
|
|
2111
|
+
__metadata("design:type", Function),
|
|
2112
|
+
__metadata("design:paramtypes", []),
|
|
2113
|
+
__metadata("design:returntype", void 0)
|
|
2114
|
+
], AbstractInputComponent.prototype, "notifyClick", null);
|
|
2115
|
+
__decorate([
|
|
2116
|
+
core.HostListener('focusin'),
|
|
2117
|
+
__metadata("design:type", Function),
|
|
2118
|
+
__metadata("design:paramtypes", []),
|
|
2119
|
+
__metadata("design:returntype", void 0)
|
|
2120
|
+
], AbstractInputComponent.prototype, "notifyFocusIn", null);
|
|
2121
|
+
__decorate([
|
|
2122
|
+
core.HostListener('focusout'),
|
|
2123
|
+
__metadata("design:type", Function),
|
|
2124
|
+
__metadata("design:paramtypes", []),
|
|
2125
|
+
__metadata("design:returntype", void 0)
|
|
2126
|
+
], AbstractInputComponent.prototype, "notifyFocusOut", null);
|
|
2127
|
+
AbstractInputComponent = __decorate([
|
|
2128
|
+
core.Component({ template: '' }),
|
|
2129
|
+
__metadata("design:paramtypes", [])
|
|
2130
|
+
], AbstractInputComponent);
|
|
2131
|
+
return AbstractInputComponent;
|
|
2132
|
+
}(DisposableComponent));
|
|
1486
2133
|
|
|
1487
|
-
var
|
|
1488
|
-
__extends(
|
|
1489
|
-
function
|
|
1490
|
-
var _this = _super
|
|
1491
|
-
_this.
|
|
2134
|
+
var CheckboxInputComponent = /** @class */ (function (_super) {
|
|
2135
|
+
__extends(CheckboxInputComponent, _super);
|
|
2136
|
+
function CheckboxInputComponent() {
|
|
2137
|
+
var _this = _super.call(this) || this;
|
|
2138
|
+
_this.color = 'accent';
|
|
2139
|
+
_this.labelPosition = 'after';
|
|
1492
2140
|
return _this;
|
|
1493
2141
|
}
|
|
1494
|
-
|
|
1495
|
-
get: function () {
|
|
1496
|
-
return this.align === 'end';
|
|
1497
|
-
},
|
|
1498
|
-
enumerable: true,
|
|
1499
|
-
configurable: true
|
|
1500
|
-
});
|
|
1501
|
-
ActivityActionsComponent.prototype.ngOnInit = function () {
|
|
1502
|
-
};
|
|
1503
|
-
ActivityActionsComponent.prototype.hasConfirmText = function () {
|
|
1504
|
-
return !___default__default.isEmpty(this.confirmText);
|
|
2142
|
+
CheckboxInputComponent.prototype.ngOnInit = function () {
|
|
1505
2143
|
};
|
|
1506
2144
|
__decorate([
|
|
1507
|
-
core.Input(),
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
], ActivityActionsComponent.prototype, "confirmCommand", void 0);
|
|
2145
|
+
core.Input(), pectin.TrackExternal({ delegateTo: 'delegatingFormValueModel' }),
|
|
2146
|
+
__metadata("design:type", Object)
|
|
2147
|
+
], CheckboxInputComponent.prototype, "valueModel", void 0);
|
|
1511
2148
|
__decorate([
|
|
1512
2149
|
core.Input(),
|
|
1513
2150
|
__metadata("design:type", String)
|
|
1514
|
-
],
|
|
1515
|
-
__decorate([
|
|
1516
|
-
core.Input(),
|
|
1517
|
-
pectin.TrackExternal(),
|
|
1518
|
-
__metadata("design:type", pectin.Command)
|
|
1519
|
-
], ActivityActionsComponent.prototype, "cancelCommand", void 0);
|
|
2151
|
+
], CheckboxInputComponent.prototype, "color", void 0);
|
|
1520
2152
|
__decorate([
|
|
1521
2153
|
core.Input(),
|
|
1522
2154
|
__metadata("design:type", String)
|
|
1523
|
-
],
|
|
1524
|
-
__decorate([
|
|
1525
|
-
core.HostBinding('class.align-end'),
|
|
1526
|
-
__metadata("design:type", Boolean),
|
|
1527
|
-
__metadata("design:paramtypes", [])
|
|
1528
|
-
], ActivityActionsComponent.prototype, "alignEnd", null);
|
|
1529
|
-
ActivityActionsComponent = __decorate([
|
|
2155
|
+
], CheckboxInputComponent.prototype, "labelPosition", void 0);
|
|
2156
|
+
CheckboxInputComponent = __decorate([
|
|
1530
2157
|
core.Component({
|
|
1531
|
-
selector: 'aup-
|
|
1532
|
-
template: "
|
|
1533
|
-
styles: [":host{display
|
|
1534
|
-
})
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
var ACTIVITY_DATA = new core.InjectionToken('InteractionActivityData');
|
|
1540
|
-
var Activity = /** @class */ (function (_super) {
|
|
1541
|
-
__extends(Activity, _super);
|
|
1542
|
-
function Activity() {
|
|
1543
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
1544
|
-
_this._busyModel = new pectin.DelegatingValueModel().withDefault(false);
|
|
1545
|
-
return _this;
|
|
1546
|
-
}
|
|
1547
|
-
Activity.prototype.initialise = function (nestedInteractionContext, activityContext) {
|
|
1548
|
-
typescriptUtilities.assert.isNil(this._activityContext);
|
|
1549
|
-
this._activityContext = activityContext;
|
|
1550
|
-
this._interactionContext = nestedInteractionContext;
|
|
1551
|
-
};
|
|
1552
|
-
Object.defineProperty(Activity.prototype, "interactionContext", {
|
|
1553
|
-
get: function () {
|
|
1554
|
-
typescriptUtilities.assert.isTruthy(this.isInitialised());
|
|
1555
|
-
return this._interactionContext;
|
|
1556
|
-
},
|
|
1557
|
-
enumerable: true,
|
|
1558
|
-
configurable: true
|
|
1559
|
-
});
|
|
1560
|
-
Activity.prototype.done = function (result) {
|
|
1561
|
-
return this._activityContext.onDone(result);
|
|
1562
|
-
};
|
|
1563
|
-
Activity.prototype.cancel = function (error) {
|
|
1564
|
-
this._activityContext.onCancel(error);
|
|
1565
|
-
};
|
|
1566
|
-
// @Trace()
|
|
1567
|
-
Activity.prototype.onActivityReady = function () {
|
|
1568
|
-
};
|
|
1569
|
-
Object.defineProperty(Activity.prototype, "busy", {
|
|
1570
|
-
get: function () {
|
|
1571
|
-
return this._busyModel.readonly;
|
|
1572
|
-
},
|
|
1573
|
-
enumerable: true,
|
|
1574
|
-
configurable: true
|
|
1575
|
-
});
|
|
1576
|
-
Activity.prototype.busyWhile = function (busyModel) {
|
|
1577
|
-
this._busyModel.setDelegate(busyModel);
|
|
1578
|
-
};
|
|
1579
|
-
Activity.prototype.isBusy = function () {
|
|
1580
|
-
return this._busyModel.value;
|
|
1581
|
-
};
|
|
1582
|
-
Activity.prototype.isInitialised = function () {
|
|
1583
|
-
return !!this._activityContext;
|
|
1584
|
-
};
|
|
1585
|
-
return Activity;
|
|
1586
|
-
}(DisposableComponent));
|
|
2158
|
+
selector: 'aup-checkbox-input',
|
|
2159
|
+
template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"valueModel.value\"\n [color]=\"color\"\n [labelPosition]=\"labelPosition\"\n [disabled]=\"!isEnabled()\"\n>{{label}}</mat-checkbox>\n<mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n<mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n",
|
|
2160
|
+
styles: [":host{display:inline-flex;flex-direction:column;margin-top:24px;margin-bottom:16px}mat-error,mat-hint{margin-top:4px;margin-left:24px;font-size:12px;font-weight:400;line-height:13.5px}"]
|
|
2161
|
+
}),
|
|
2162
|
+
__metadata("design:paramtypes", [])
|
|
2163
|
+
], CheckboxInputComponent);
|
|
2164
|
+
return CheckboxInputComponent;
|
|
2165
|
+
}(AbstractInputComponent));
|
|
1587
2166
|
|
|
1588
|
-
var
|
|
1589
|
-
__extends(
|
|
1590
|
-
function
|
|
2167
|
+
var NumberInputComponent = /** @class */ (function (_super) {
|
|
2168
|
+
__extends(NumberInputComponent, _super);
|
|
2169
|
+
function NumberInputComponent() {
|
|
1591
2170
|
var _this = _super.call(this) || this;
|
|
1592
|
-
_this.
|
|
2171
|
+
_this.min = Number.MIN_SAFE_INTEGER;
|
|
2172
|
+
_this.max = Number.MAX_SAFE_INTEGER;
|
|
1593
2173
|
return _this;
|
|
1594
2174
|
}
|
|
1595
|
-
|
|
2175
|
+
NumberInputComponent.prototype.ngOnInit = function () {
|
|
1596
2176
|
};
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
2177
|
+
__decorate([
|
|
2178
|
+
core.Input(), pectin.TrackExternal({ delegateTo: 'delegatingFormValueModel' }),
|
|
2179
|
+
__metadata("design:type", Object)
|
|
2180
|
+
], NumberInputComponent.prototype, "valueModel", void 0);
|
|
2181
|
+
__decorate([
|
|
2182
|
+
core.Input(),
|
|
2183
|
+
__metadata("design:type", Object)
|
|
2184
|
+
], NumberInputComponent.prototype, "min", void 0);
|
|
2185
|
+
__decorate([
|
|
2186
|
+
core.Input(),
|
|
2187
|
+
__metadata("design:type", Object)
|
|
2188
|
+
], NumberInputComponent.prototype, "max", void 0);
|
|
2189
|
+
NumberInputComponent = __decorate([
|
|
1601
2190
|
core.Component({
|
|
1602
|
-
selector: 'aup-
|
|
1603
|
-
template: "<
|
|
1604
|
-
styles: [":host{display:block
|
|
2191
|
+
selector: 'aup-number-input',
|
|
2192
|
+
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)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"delegatingFormValueModel?.focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [min]=\"min\"\n [max]=\"max\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
2193
|
+
styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}"]
|
|
1605
2194
|
}),
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
}(Activity));
|
|
2195
|
+
__metadata("design:paramtypes", [])
|
|
2196
|
+
], NumberInputComponent);
|
|
2197
|
+
return NumberInputComponent;
|
|
2198
|
+
}(AbstractInputComponent));
|
|
1611
2199
|
|
|
1612
|
-
var
|
|
1613
|
-
__extends(
|
|
1614
|
-
function
|
|
1615
|
-
|
|
1616
|
-
_this.config = config;
|
|
1617
|
-
pectin.assert.notNil(config);
|
|
1618
|
-
return _this;
|
|
2200
|
+
var PasswordInputComponent = /** @class */ (function (_super) {
|
|
2201
|
+
__extends(PasswordInputComponent, _super);
|
|
2202
|
+
function PasswordInputComponent() {
|
|
2203
|
+
return _super.call(this) || this;
|
|
1619
2204
|
}
|
|
1620
|
-
|
|
1621
|
-
};
|
|
1622
|
-
Object.defineProperty(ConfirmThenDialogComponent.prototype, "confirm", {
|
|
1623
|
-
get: function () {
|
|
1624
|
-
return this.config.confirm;
|
|
1625
|
-
},
|
|
1626
|
-
enumerable: true,
|
|
1627
|
-
configurable: true
|
|
1628
|
-
});
|
|
1629
|
-
ConfirmThenDialogComponent.prototype.isDestructive = function () {
|
|
1630
|
-
return this.confirm.destructive && this.confirm.destructive();
|
|
1631
|
-
};
|
|
1632
|
-
ConfirmThenDialogComponent.prototype.onConfirm = function () {
|
|
1633
|
-
var _this = this;
|
|
1634
|
-
this.interactionContext.startActivity(this.config.activityType, this.config.data)
|
|
1635
|
-
.then(function (result) { return _this.done(result); })
|
|
1636
|
-
.catch(function (error) { return _this.cancel(error); });
|
|
2205
|
+
PasswordInputComponent.prototype.ngOnInit = function () {
|
|
1637
2206
|
};
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
2207
|
+
__decorate([
|
|
2208
|
+
core.Input(), pectin.TrackExternal({ delegateTo: "delegatingFormValueModel" }),
|
|
2209
|
+
__metadata("design:type", Object)
|
|
2210
|
+
], PasswordInputComponent.prototype, "valueModel", void 0);
|
|
2211
|
+
PasswordInputComponent = __decorate([
|
|
1642
2212
|
core.Component({
|
|
1643
|
-
selector: 'aup-
|
|
1644
|
-
template: "<
|
|
1645
|
-
styles: [":host{display:block
|
|
2213
|
+
selector: 'aup-password-input',
|
|
2214
|
+
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)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"delegatingFormValueModel.focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
|
|
2215
|
+
styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}"]
|
|
1646
2216
|
}),
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
}(Activity));
|
|
2217
|
+
__metadata("design:paramtypes", [])
|
|
2218
|
+
], PasswordInputComponent);
|
|
2219
|
+
return PasswordInputComponent;
|
|
2220
|
+
}(AbstractInputComponent));
|
|
1652
2221
|
|
|
1653
|
-
var
|
|
1654
|
-
__extends(
|
|
1655
|
-
function
|
|
2222
|
+
var SelectInputComponent = /** @class */ (function (_super) {
|
|
2223
|
+
__extends(SelectInputComponent, _super);
|
|
2224
|
+
function SelectInputComponent() {
|
|
1656
2225
|
var _this = _super.call(this) || this;
|
|
1657
|
-
_this.
|
|
1658
|
-
pectin.assert.notNil(confirm);
|
|
2226
|
+
_this.optionLabelFormat = function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; };
|
|
1659
2227
|
return _this;
|
|
1660
2228
|
}
|
|
1661
|
-
|
|
1662
|
-
};
|
|
1663
|
-
ConfirmationDialogComponent.prototype.isDestructive = function () {
|
|
1664
|
-
return this.confirm.destructive && this.confirm.destructive();
|
|
2229
|
+
SelectInputComponent.prototype.ngOnInit = function () {
|
|
1665
2230
|
};
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
2231
|
+
__decorate([
|
|
2232
|
+
core.Input(), pectin.TrackExternal({ delegateTo: "delegatingFormValueModel" }),
|
|
2233
|
+
__metadata("design:type", Object)
|
|
2234
|
+
], SelectInputComponent.prototype, "valueModel", void 0);
|
|
2235
|
+
__decorate([
|
|
2236
|
+
core.Input(), pectin.TrackExternal(),
|
|
2237
|
+
__metadata("design:type", pectin.ListModel)
|
|
2238
|
+
], SelectInputComponent.prototype, "optionsModel", void 0);
|
|
2239
|
+
__decorate([
|
|
2240
|
+
core.Input(), pectin.StoreInListModel('optionsModel'),
|
|
2241
|
+
__metadata("design:type", Array)
|
|
2242
|
+
], SelectInputComponent.prototype, "options", void 0);
|
|
2243
|
+
__decorate([
|
|
2244
|
+
core.Input(),
|
|
2245
|
+
__metadata("design:type", Object)
|
|
2246
|
+
], SelectInputComponent.prototype, "optionLabel", void 0);
|
|
2247
|
+
__decorate([
|
|
2248
|
+
core.Input(),
|
|
2249
|
+
__metadata("design:type", Boolean)
|
|
2250
|
+
], SelectInputComponent.prototype, "allowNil", void 0);
|
|
2251
|
+
__decorate([
|
|
2252
|
+
core.ContentChild("optionTemplate"),
|
|
2253
|
+
__metadata("design:type", core.TemplateRef)
|
|
2254
|
+
], SelectInputComponent.prototype, "optionTemplateRef", void 0);
|
|
2255
|
+
__decorate([
|
|
2256
|
+
core.ContentChild("nilOptionTemplate"),
|
|
2257
|
+
__metadata("design:type", core.TemplateRef)
|
|
2258
|
+
], SelectInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
2259
|
+
__decorate([
|
|
2260
|
+
core.Input(),
|
|
2261
|
+
__metadata("design:type", Function)
|
|
2262
|
+
], SelectInputComponent.prototype, "optionLabelFormat", void 0);
|
|
2263
|
+
SelectInputComponent = __decorate([
|
|
1670
2264
|
core.Component({
|
|
1671
|
-
selector: 'aup-
|
|
1672
|
-
template: "<
|
|
1673
|
-
styles: [":host{display:block
|
|
2265
|
+
selector: 'aup-select-input',
|
|
2266
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"delegatingFormValueModel.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=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
2267
|
+
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1674
2268
|
}),
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
}(Activity));
|
|
2269
|
+
__metadata("design:paramtypes", [])
|
|
2270
|
+
], SelectInputComponent);
|
|
2271
|
+
return SelectInputComponent;
|
|
2272
|
+
}(AbstractInputComponent));
|
|
1680
2273
|
|
|
1681
|
-
var
|
|
1682
|
-
|
|
2274
|
+
var StringInputActivity = /** @class */ (function (_super) {
|
|
2275
|
+
__extends(StringInputActivity, _super);
|
|
2276
|
+
function StringInputActivity() {
|
|
2277
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1683
2278
|
}
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
};
|
|
1693
|
-
AbstractInteractionContext.prototype.alert = function (alert) {
|
|
1694
|
-
// TODO: Test disableClose === false
|
|
1695
|
-
return this.createAndLaunchActivity(AlertDialogComponent, alert, false);
|
|
1696
|
-
};
|
|
1697
|
-
AbstractInteractionContext.prototype.confirmOrReject = function (confirm) {
|
|
1698
|
-
return this.createAndLaunchActivity(ConfirmationDialogComponent, confirm, true);
|
|
1699
|
-
};
|
|
1700
|
-
/**
|
|
1701
|
-
* Presents the confirmation to the user and runs the activity only if the user confirms.
|
|
1702
|
-
* @param confirm:Confirm the confirmation to display.
|
|
1703
|
-
* @param activityType the activity to run if confirmed.
|
|
1704
|
-
* @param data the activity data.
|
|
1705
|
-
*/
|
|
1706
|
-
AbstractInteractionContext.prototype.confirmThen = function (confirm, activityType, data) {
|
|
1707
|
-
return this.createAndLaunchActivity(ConfirmThenDialogComponent, {
|
|
1708
|
-
confirm: confirm,
|
|
1709
|
-
activityType: activityType,
|
|
1710
|
-
data: data
|
|
1711
|
-
}, true);
|
|
1712
|
-
};
|
|
1713
|
-
return AbstractInteractionContext;
|
|
1714
|
-
}());
|
|
2279
|
+
StringInputActivity = __decorate([
|
|
2280
|
+
core.Component({
|
|
2281
|
+
selector: 'aup-string-input-activity',
|
|
2282
|
+
template: "\n <aup-string-input [valueModel]=\"valueModel\"\n [label]=\"data.label\"\n [placeholder]=\"data.placeholder\"\n [command.enter]=\"confirmCommand\"\n [command.escape]=\"cancelCommand\"></aup-string-input>\n <aup-activity-actions align=\"end\"\n [confirmCommand]=\"confirmCommand\"\n [cancelCommand]=\"cancelCommand\"></aup-activity-actions>\n "
|
|
2283
|
+
})
|
|
2284
|
+
], StringInputActivity);
|
|
2285
|
+
return StringInputActivity;
|
|
2286
|
+
}(AbstractInputActivity));
|
|
1715
2287
|
|
|
1716
|
-
var
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
}
|
|
1724
|
-
ActivityRef.prototype.isActivityRealised = function () {
|
|
1725
|
-
return !!this._activity;
|
|
1726
|
-
};
|
|
1727
|
-
ActivityRef.prototype.isComplete = function () {
|
|
1728
|
-
return this._complete;
|
|
1729
|
-
};
|
|
1730
|
-
Object.defineProperty(ActivityRef.prototype, "activity", {
|
|
1731
|
-
get: function () {
|
|
1732
|
-
pectin.assert.isTruthy(this.isActivityRealised());
|
|
1733
|
-
return this._activity;
|
|
1734
|
-
},
|
|
1735
|
-
enumerable: true,
|
|
1736
|
-
configurable: true
|
|
1737
|
-
});
|
|
1738
|
-
ActivityRef.prototype.notifyActivityCreated = function (activity, nestedInteractionContext) {
|
|
1739
|
-
pectin.assert.isNil(this._activity);
|
|
1740
|
-
this._activity = activity;
|
|
1741
|
-
var self = this;
|
|
1742
|
-
this._activity.initialise(nestedInteractionContext, {
|
|
1743
|
-
onDone: function (result) {
|
|
1744
|
-
self.finishActivity(function (deferred) { return deferred.resolve(result); });
|
|
1745
|
-
},
|
|
1746
|
-
onCancel: function (error) {
|
|
1747
|
-
self.finishActivity(function (deferred) { return deferred.reject(error); });
|
|
1748
|
-
}
|
|
2288
|
+
var StringInputComponent = /** @class */ (function (_super) {
|
|
2289
|
+
__extends(StringInputComponent, _super);
|
|
2290
|
+
function StringInputComponent() {
|
|
2291
|
+
var _this = _super.call(this) || this;
|
|
2292
|
+
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;
|
|
2293
|
+
_this.clearCommand = pectin.Command.create(function () {
|
|
2294
|
+
_this.valueModel.value = null;
|
|
1749
2295
|
});
|
|
2296
|
+
_this.clearCommand.disableWhile(chain.stringValue(_this.valueModel).isBlank());
|
|
2297
|
+
return _this;
|
|
2298
|
+
}
|
|
2299
|
+
StringInputComponent.prototype.ngOnInit = function () {
|
|
1750
2300
|
};
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
2301
|
+
__decorate([
|
|
2302
|
+
core.Input(), pectin.TrackExternal({ delegateTo: 'delegatingFormValueModel' }),
|
|
2303
|
+
__metadata("design:type", Object)
|
|
2304
|
+
], StringInputComponent.prototype, "valueModel", void 0);
|
|
2305
|
+
__decorate([
|
|
2306
|
+
core.Input(), pectin.TrackExternal({ defaultValue: false }),
|
|
2307
|
+
__metadata("design:type", pectin.ValueModel)
|
|
2308
|
+
], StringInputComponent.prototype, "enableClearModel", void 0);
|
|
2309
|
+
__decorate([
|
|
2310
|
+
core.Input(), pectin.StoreInValueModel('enableClearModel'),
|
|
2311
|
+
__metadata("design:type", Boolean)
|
|
2312
|
+
], StringInputComponent.prototype, "enableClear", void 0);
|
|
2313
|
+
StringInputComponent = __decorate([
|
|
2314
|
+
core.Component({
|
|
2315
|
+
selector: 'aup-string-input',
|
|
2316
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"delegatingFormValueModel.focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <mat-icon>close</mat-icon>\n </button>\n</mat-form-field>\n\n",
|
|
2317
|
+
styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}button[disabled]{visibility:hidden}"]
|
|
2318
|
+
}),
|
|
2319
|
+
__metadata("design:paramtypes", [])
|
|
2320
|
+
], StringInputComponent);
|
|
2321
|
+
return StringInputComponent;
|
|
2322
|
+
}(AbstractInputComponent));
|
|
1769
2323
|
|
|
1770
|
-
/**
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
this.viewContainerRef = viewContainerRef;
|
|
1778
|
-
this.injector = injector;
|
|
2324
|
+
var TextInputComponent = /** @class */ (function (_super) {
|
|
2325
|
+
__extends(TextInputComponent, _super);
|
|
2326
|
+
function TextInputComponent() {
|
|
2327
|
+
var _this = _super.call(this) || this;
|
|
2328
|
+
_this.rows = 2;
|
|
2329
|
+
return _this;
|
|
2330
|
+
// const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
1779
2331
|
}
|
|
1780
|
-
|
|
1781
|
-
get: function () {
|
|
1782
|
-
return this._activityRef;
|
|
1783
|
-
},
|
|
1784
|
-
set: function (activityRef) {
|
|
1785
|
-
if (this.activityRef && !this.activityRef.isComplete()) {
|
|
1786
|
-
typescriptUtilities.lang.illegalState("changing activity before previous one has completed");
|
|
1787
|
-
}
|
|
1788
|
-
this._activityRef = activityRef;
|
|
1789
|
-
this.loadActivity(activityRef);
|
|
1790
|
-
},
|
|
1791
|
-
enumerable: true,
|
|
1792
|
-
configurable: true
|
|
1793
|
-
});
|
|
1794
|
-
;
|
|
1795
|
-
ActivityOutletComponent.prototype.ngOnInit = function () {
|
|
1796
|
-
};
|
|
1797
|
-
ActivityOutletComponent.prototype.loadActivity = function (activityRef) {
|
|
1798
|
-
var injector = core.Injector.create({
|
|
1799
|
-
providers: [
|
|
1800
|
-
{ provide: ACTIVITY_DATA, useValue: activityRef.activityData }
|
|
1801
|
-
],
|
|
1802
|
-
parent: this.injector
|
|
1803
|
-
});
|
|
1804
|
-
var componentFactory = this.componentFactoryResolver.resolveComponentFactory(activityRef.activityClass);
|
|
1805
|
-
this.viewContainerRef.clear();
|
|
1806
|
-
// console.log(`creating component -> ${activityRef.activityClass.name}`);
|
|
1807
|
-
this.activityComponentRef = this.viewContainerRef.createComponent(componentFactory, 0, injector);
|
|
1808
|
-
this.activityRef.notifyActivityCreated(this.activityComponentRef.instance, this.nestedInteractionContext);
|
|
2332
|
+
TextInputComponent.prototype.ngOnInit = function () {
|
|
1809
2333
|
};
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
enumerable: true,
|
|
1815
|
-
configurable: true
|
|
1816
|
-
});
|
|
1817
|
-
ActivityOutletComponent.ctorParameters = function () { return [
|
|
1818
|
-
{ type: core.ComponentFactoryResolver },
|
|
1819
|
-
{ type: core.ViewContainerRef },
|
|
1820
|
-
{ type: core.Injector }
|
|
1821
|
-
]; };
|
|
2334
|
+
__decorate([
|
|
2335
|
+
core.Input(), pectin.TrackExternal({ delegateTo: 'delegatingFormValueModel' }),
|
|
2336
|
+
__metadata("design:type", Object)
|
|
2337
|
+
], TextInputComponent.prototype, "valueModel", void 0);
|
|
1822
2338
|
__decorate([
|
|
1823
2339
|
core.Input(),
|
|
1824
2340
|
__metadata("design:type", Object)
|
|
1825
|
-
],
|
|
2341
|
+
], TextInputComponent.prototype, "rows", void 0);
|
|
1826
2342
|
__decorate([
|
|
1827
2343
|
core.Input(),
|
|
1828
|
-
__metadata("design:type",
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
ActivityOutletComponent = __decorate([
|
|
2344
|
+
__metadata("design:type", Number)
|
|
2345
|
+
], TextInputComponent.prototype, "cols", void 0);
|
|
2346
|
+
TextInputComponent = __decorate([
|
|
1832
2347
|
core.Component({
|
|
1833
|
-
selector: 'aup-
|
|
1834
|
-
template:
|
|
2348
|
+
selector: 'aup-text-input',
|
|
2349
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"delegatingFormValueModel.focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n </textarea>\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
|
|
2350
|
+
styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}button[disabled]{visibility:hidden}textarea{overflow:auto}"]
|
|
2351
|
+
}),
|
|
2352
|
+
__metadata("design:paramtypes", [])
|
|
2353
|
+
], TextInputComponent);
|
|
2354
|
+
return TextInputComponent;
|
|
2355
|
+
}(AbstractInputComponent));
|
|
2356
|
+
|
|
2357
|
+
var NoopComponent = /** @class */ (function () {
|
|
2358
|
+
function NoopComponent() {
|
|
2359
|
+
}
|
|
2360
|
+
NoopComponent = __decorate([
|
|
2361
|
+
core.Component({
|
|
2362
|
+
selector: 'aup-noop',
|
|
2363
|
+
template: "",
|
|
1835
2364
|
styles: [":host{display:block}"]
|
|
1836
2365
|
}),
|
|
1837
|
-
__metadata("design:paramtypes", [
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
], ActivityOutletComponent);
|
|
1841
|
-
return ActivityOutletComponent;
|
|
2366
|
+
__metadata("design:paramtypes", [])
|
|
2367
|
+
], NoopComponent);
|
|
2368
|
+
return NoopComponent;
|
|
1842
2369
|
}());
|
|
1843
2370
|
|
|
1844
|
-
var
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
_this.dynamicHeight = false;
|
|
1849
|
-
_this.activityTabs = [];
|
|
1850
|
-
_this.garbage = new pectin.GarbageCollector();
|
|
1851
|
-
return _this;
|
|
1852
|
-
}
|
|
1853
|
-
ActivityContainerComponent.prototype.ngOnInit = function () {
|
|
1854
|
-
};
|
|
1855
|
-
ActivityContainerComponent.prototype.ngAfterViewInit = function () {
|
|
1856
|
-
var _this = this;
|
|
1857
|
-
var _a = pectin.Dsl.disposeWith(this), chain = _a.chain, observe = _a.observe;
|
|
1858
|
-
// using the component directly rather than (animationDone)=.. allows us
|
|
1859
|
-
// to keep our callback private.
|
|
1860
|
-
observe.valuesFrom(this.tabs.animationDone).subscribe(function () { return _this.onAnimationFinished(); });
|
|
1861
|
-
};
|
|
1862
|
-
ActivityContainerComponent.prototype.initialise = function (identifier, api) {
|
|
1863
|
-
pectin.assert.isFalsey(this.isInitialised());
|
|
1864
|
-
pectin.assert.notNil(identifier);
|
|
1865
|
-
pectin.assert.notNil(api);
|
|
1866
|
-
this._identifier = identifier;
|
|
1867
|
-
this.interactionServiceApi = api;
|
|
2371
|
+
var ScrollContainerComponent = /** @class */ (function () {
|
|
2372
|
+
function ScrollContainerComponent() {
|
|
2373
|
+
}
|
|
2374
|
+
ScrollContainerComponent.prototype.ngOnInit = function () {
|
|
1868
2375
|
};
|
|
1869
|
-
|
|
2376
|
+
ScrollContainerComponent = __decorate([
|
|
2377
|
+
core.Component({
|
|
2378
|
+
selector: 'aup-scroll-container',
|
|
2379
|
+
template: "<div class=\"container\">\n <ng-content></ng-content>\n</div>\n",
|
|
2380
|
+
styles: [":host{display:flex;flex-direction:column;min-height:0;align-items:stretch}.container{display:flex;flex-direction:column;flex:1;flex-basis:0;overflow-y:scroll;align-items:stretch}"]
|
|
2381
|
+
}),
|
|
2382
|
+
__metadata("design:paramtypes", [])
|
|
2383
|
+
], ScrollContainerComponent);
|
|
2384
|
+
return ScrollContainerComponent;
|
|
2385
|
+
}());
|
|
2386
|
+
|
|
2387
|
+
var SwitchCaseOption = /** @class */ (function () {
|
|
2388
|
+
function SwitchCaseOption(templateRef) {
|
|
2389
|
+
this.templateRef = templateRef;
|
|
2390
|
+
}
|
|
2391
|
+
Object.defineProperty(SwitchCaseOption.prototype, "name", {
|
|
1870
2392
|
get: function () {
|
|
1871
|
-
return this.
|
|
2393
|
+
return this.constructor.name;
|
|
1872
2394
|
},
|
|
1873
2395
|
enumerable: true,
|
|
1874
2396
|
configurable: true
|
|
1875
2397
|
});
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
return
|
|
1884
|
-
}
|
|
1885
|
-
|
|
1886
|
-
|
|
2398
|
+
return SwitchCaseOption;
|
|
2399
|
+
}());
|
|
2400
|
+
var SwitchCaseWhenDirective = /** @class */ (function (_super) {
|
|
2401
|
+
__extends(SwitchCaseWhenDirective, _super);
|
|
2402
|
+
function SwitchCaseWhenDirective(templateRef) {
|
|
2403
|
+
var _this = _super.call(this, templateRef) || this;
|
|
2404
|
+
_this.isDefault = false;
|
|
2405
|
+
return _this;
|
|
2406
|
+
}
|
|
2407
|
+
SwitchCaseWhenDirective_1 = SwitchCaseWhenDirective;
|
|
2408
|
+
SwitchCaseWhenDirective.prototype.matches = function (value) {
|
|
2409
|
+
return this.aupSwitchCaseWhen === value;
|
|
1887
2410
|
};
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
2411
|
+
var SwitchCaseWhenDirective_1;
|
|
2412
|
+
SwitchCaseWhenDirective.ctorParameters = function () { return [
|
|
2413
|
+
{ type: core.TemplateRef }
|
|
2414
|
+
]; };
|
|
2415
|
+
__decorate([
|
|
2416
|
+
core.Input(),
|
|
2417
|
+
__metadata("design:type", Object)
|
|
2418
|
+
], SwitchCaseWhenDirective.prototype, "aupSwitchCaseWhen", void 0);
|
|
2419
|
+
SwitchCaseWhenDirective = SwitchCaseWhenDirective_1 = __decorate([
|
|
2420
|
+
core.Directive({
|
|
2421
|
+
selector: '[aupSwitchCaseWhen]',
|
|
2422
|
+
providers: [{ provide: SwitchCaseOption, useExisting: SwitchCaseWhenDirective_1 }]
|
|
2423
|
+
}),
|
|
2424
|
+
__metadata("design:paramtypes", [core.TemplateRef])
|
|
2425
|
+
], SwitchCaseWhenDirective);
|
|
2426
|
+
return SwitchCaseWhenDirective;
|
|
2427
|
+
}(SwitchCaseOption));
|
|
2428
|
+
var SwitchCaseDefaultDirective = /** @class */ (function (_super) {
|
|
2429
|
+
__extends(SwitchCaseDefaultDirective, _super);
|
|
2430
|
+
function SwitchCaseDefaultDirective(templateRef) {
|
|
2431
|
+
var _this = _super.call(this, templateRef) || this;
|
|
2432
|
+
_this.isDefault = true;
|
|
2433
|
+
return _this;
|
|
2434
|
+
}
|
|
2435
|
+
SwitchCaseDefaultDirective_1 = SwitchCaseDefaultDirective;
|
|
2436
|
+
SwitchCaseDefaultDirective.prototype.matches = function (value) {
|
|
2437
|
+
return false;
|
|
1893
2438
|
};
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
2439
|
+
var SwitchCaseDefaultDirective_1;
|
|
2440
|
+
SwitchCaseDefaultDirective.ctorParameters = function () { return [
|
|
2441
|
+
{ type: core.TemplateRef }
|
|
2442
|
+
]; };
|
|
2443
|
+
SwitchCaseDefaultDirective = SwitchCaseDefaultDirective_1 = __decorate([
|
|
2444
|
+
core.Directive({
|
|
2445
|
+
selector: '[aupSwitchCaseDefault]',
|
|
2446
|
+
providers: [{ provide: SwitchCaseOption, useExisting: SwitchCaseDefaultDirective_1 }]
|
|
2447
|
+
}),
|
|
2448
|
+
__metadata("design:paramtypes", [core.TemplateRef])
|
|
2449
|
+
], SwitchCaseDefaultDirective);
|
|
2450
|
+
return SwitchCaseDefaultDirective;
|
|
2451
|
+
}(SwitchCaseOption));
|
|
2452
|
+
var SwitchCaseComponent = /** @class */ (function (_super) {
|
|
2453
|
+
__extends(SwitchCaseComponent, _super);
|
|
2454
|
+
function SwitchCaseComponent(cdr) {
|
|
2455
|
+
var _this = _super.call(this) || this;
|
|
2456
|
+
_this.cdr = cdr;
|
|
2457
|
+
_this.selectedIndex = 0;
|
|
2458
|
+
return _this;
|
|
2459
|
+
}
|
|
2460
|
+
SwitchCaseComponent.prototype.ngOnInit = function () {
|
|
1899
2461
|
};
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
var activity;
|
|
1908
|
-
return __generator(this, function (_a) {
|
|
1909
|
-
activity = this.getActiveActivityRef();
|
|
1910
|
-
activity.cancel();
|
|
1911
|
-
if (this.isCleaningUp()) {
|
|
1912
|
-
return [2 /*return*/, this.waitForInteractionContextCleanupToFinish()];
|
|
1913
|
-
}
|
|
1914
|
-
else {
|
|
1915
|
-
return [2 /*return*/, !this.isActive()];
|
|
1916
|
-
}
|
|
1917
|
-
return [2 /*return*/];
|
|
1918
|
-
});
|
|
1919
|
-
});
|
|
2462
|
+
SwitchCaseComponent.prototype.ngAfterContentInit = function () {
|
|
2463
|
+
var _this = this;
|
|
2464
|
+
var subscription = this.switchCaseOptions.changes.subscribe(function (change) { return _this.updateSelection(); });
|
|
2465
|
+
this.onDispose(function () { return subscription.unsubscribe(); });
|
|
2466
|
+
var _a = pectin.Dsl.disposeWith(this), chain = _a.chain, when = _a.when;
|
|
2467
|
+
when.valueOf(this.switchModel).changes(function () { return _this.updateSelection(); }, { initialValue: 'triggerChange' });
|
|
2468
|
+
this.cdr.detectChanges();
|
|
1920
2469
|
};
|
|
1921
|
-
|
|
1922
|
-
// @Trace()
|
|
1923
|
-
ActivityContainerComponent.prototype.createAndLaunchActivity = function (activityType, data, disableClose) {
|
|
2470
|
+
SwitchCaseComponent.prototype.updateSelection = function () {
|
|
1924
2471
|
var _this = this;
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
_this.triggerTabSynchronisation();
|
|
1930
|
-
}
|
|
1931
|
-
else {
|
|
1932
|
-
_this.finishAndStartCleanup();
|
|
2472
|
+
var matchingIndicies = [];
|
|
2473
|
+
this.switchCaseOptions.forEach(function (option, index) {
|
|
2474
|
+
if (option.matches(_this.switchModel.value)) {
|
|
2475
|
+
matchingIndicies.push(index);
|
|
1933
2476
|
}
|
|
1934
2477
|
});
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
if (this.activityTabs.length === 1) {
|
|
1938
|
-
// console.log('Now active!!!');
|
|
1939
|
-
this.interactionServiceApi.notifyActive(this);
|
|
2478
|
+
if (matchingIndicies.length > 1) {
|
|
2479
|
+
console.warn("found " + matchingIndicies.length + " matching case values, displaying the first.");
|
|
1940
2480
|
}
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
return this.activityTabs.filter(function (ref) { return !ref.isComplete(); }).length;
|
|
1945
|
-
};
|
|
1946
|
-
/**
|
|
1947
|
-
* Checks if this interaction context has finished an is in the process of waiting
|
|
1948
|
-
* for all the infrastructure (including route updates) to be completed.
|
|
1949
|
-
*/
|
|
1950
|
-
ActivityContainerComponent.prototype.isCleaningUp = function () {
|
|
1951
|
-
return !!this._deferredCleanUp;
|
|
1952
|
-
};
|
|
1953
|
-
ActivityContainerComponent.prototype.waitForInteractionContextCleanupToFinish = function () {
|
|
1954
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1955
|
-
return __generator(this, function (_a) {
|
|
1956
|
-
return [2 /*return*/, this._deferredCleanUp ?
|
|
1957
|
-
this._deferredCleanUp :
|
|
1958
|
-
true];
|
|
1959
|
-
});
|
|
1960
|
-
});
|
|
1961
|
-
};
|
|
1962
|
-
// @Trace()
|
|
1963
|
-
ActivityContainerComponent.prototype.finishAndStartCleanup = function () {
|
|
1964
|
-
var _this = this;
|
|
1965
|
-
if (!this._deferredCleanUp) {
|
|
1966
|
-
// Important:
|
|
1967
|
-
// Clear our tabs so the next activity triggers a tab change.
|
|
1968
|
-
// Without this our animation done wasn't called when a single
|
|
1969
|
-
// new activity followed a single tab activity (since we're tracking
|
|
1970
|
-
// by activity index)
|
|
1971
|
-
this.activityTabs = [];
|
|
1972
|
-
var promise = this.interactionServiceApi.notifyFinished(this);
|
|
1973
|
-
this._deferredCleanUp = promise
|
|
1974
|
-
.finally(function () {
|
|
1975
|
-
_this._deferredCleanUp = null;
|
|
2481
|
+
if (matchingIndicies.length === 0) {
|
|
2482
|
+
this.switchCaseOptions.forEach(function (option, index) {
|
|
2483
|
+
matchingIndicies.push(index);
|
|
1976
2484
|
});
|
|
2485
|
+
if (matchingIndicies.length > 1) {
|
|
2486
|
+
console.warn("found " + matchingIndicies.length + " default case values, displaying the first.");
|
|
2487
|
+
}
|
|
1977
2488
|
}
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
ActivityContainerComponent.prototype.launchActivity = function (activityRef) {
|
|
1981
|
-
var cleanedTabs = this.activityTabs.filter(function (tab) { return !tab.isComplete(); });
|
|
1982
|
-
this.activityTabs = cleanedTabs.concat(activityRef);
|
|
1983
|
-
this.synchroniseSelectedTabIndex();
|
|
1984
|
-
};
|
|
1985
|
-
ActivityContainerComponent.prototype.activityIndex = function (index, activityRef) {
|
|
1986
|
-
return index;
|
|
1987
|
-
};
|
|
1988
|
-
;
|
|
1989
|
-
ActivityContainerComponent.prototype.onAnimationFinished = function () {
|
|
1990
|
-
if (this.onAnimationFinishedJob) {
|
|
1991
|
-
this.onAnimationFinishedJob();
|
|
1992
|
-
this.onAnimationFinishedJob = undefined;
|
|
1993
|
-
}
|
|
1994
|
-
};
|
|
1995
|
-
/**
|
|
1996
|
-
* Synchronises the selected tab index.
|
|
1997
|
-
*/
|
|
1998
|
-
ActivityContainerComponent.prototype.synchroniseSelectedTabIndex = function () {
|
|
1999
|
-
var _this = this;
|
|
2000
|
-
var previousIndex = this.tabs.selectedIndex;
|
|
2001
|
-
var newIndex = this.getActiveActivityCount() - 1;
|
|
2002
|
-
if (previousIndex !== newIndex) {
|
|
2003
|
-
this.tabs.selectedIndex = newIndex;
|
|
2004
|
-
this.onAnimationFinishedJob = function () {
|
|
2005
|
-
_this.getSelectedOutlet().component.onActivityReady();
|
|
2006
|
-
_this.activityTabs = _this.activityTabs.filter(function (tab) { return !tab.isComplete(); });
|
|
2007
|
-
};
|
|
2489
|
+
if (matchingIndicies.length > 0) {
|
|
2490
|
+
this.selectedIndex = matchingIndicies[0];
|
|
2008
2491
|
}
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
};
|
|
2013
|
-
// @Trace()
|
|
2014
|
-
ActivityContainerComponent.prototype.triggerTabSynchronisation = function () {
|
|
2015
|
-
var _this = this;
|
|
2016
|
-
if (this.syncSelectedTabTimeout) {
|
|
2017
|
-
clearTimeout(this.syncSelectedTabTimeout);
|
|
2492
|
+
else {
|
|
2493
|
+
console.warn("found no matching or default case values.");
|
|
2494
|
+
this.selectedIndex = -1;
|
|
2018
2495
|
}
|
|
2019
|
-
this.syncSelectedTabTimeout = setTimeout(function () {
|
|
2020
|
-
_this.syncSelectedTabTimeout = null;
|
|
2021
|
-
_this.synchroniseSelectedTabIndex();
|
|
2022
|
-
}, 75);
|
|
2023
2496
|
};
|
|
2497
|
+
SwitchCaseComponent.ctorParameters = function () { return [
|
|
2498
|
+
{ type: core.ChangeDetectorRef }
|
|
2499
|
+
]; };
|
|
2024
2500
|
__decorate([
|
|
2025
|
-
core.Input(),
|
|
2026
|
-
__metadata("design:type",
|
|
2027
|
-
],
|
|
2501
|
+
core.Input(), pectin.TrackExternal(),
|
|
2502
|
+
__metadata("design:type", pectin.ValueModel)
|
|
2503
|
+
], SwitchCaseComponent.prototype, "switchModel", void 0);
|
|
2028
2504
|
__decorate([
|
|
2029
|
-
core.
|
|
2030
|
-
__metadata("design:type",
|
|
2031
|
-
],
|
|
2505
|
+
core.Input(), pectin.StoreInValueModel('switchModel'),
|
|
2506
|
+
__metadata("design:type", Object)
|
|
2507
|
+
], SwitchCaseComponent.prototype, "switch", void 0);
|
|
2032
2508
|
__decorate([
|
|
2033
|
-
core.
|
|
2509
|
+
core.ContentChildren(SwitchCaseOption),
|
|
2034
2510
|
__metadata("design:type", core.QueryList)
|
|
2035
|
-
],
|
|
2511
|
+
], SwitchCaseComponent.prototype, "switchCaseOptions", void 0);
|
|
2512
|
+
SwitchCaseComponent = __decorate([
|
|
2513
|
+
core.Component({
|
|
2514
|
+
selector: 'aup-switch-case',
|
|
2515
|
+
template: "<mat-tab-group class=\"content-wrapper\" no-tab-header full-height-tabs [selectedIndex]=\"selectedIndex\">\n <mat-tab *ngFor=\"let option of switchCaseOptions\">\n <ng-template [ngTemplateOutlet]=\"option.templateRef\"></ng-template>\n </mat-tab>\n</mat-tab-group>\n\n\n",
|
|
2516
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch}mat-tab-group{flex:1}"]
|
|
2517
|
+
}),
|
|
2518
|
+
__metadata("design:paramtypes", [core.ChangeDetectorRef])
|
|
2519
|
+
], SwitchCaseComponent);
|
|
2520
|
+
return SwitchCaseComponent;
|
|
2521
|
+
}(DisposableComponent));
|
|
2522
|
+
|
|
2523
|
+
var DefaultCellRendererComponent = /** @class */ (function () {
|
|
2524
|
+
function DefaultCellRendererComponent() {
|
|
2525
|
+
}
|
|
2526
|
+
Object.defineProperty(DefaultCellRendererComponent.prototype, "value", {
|
|
2527
|
+
get: function () {
|
|
2528
|
+
return this._value;
|
|
2529
|
+
},
|
|
2530
|
+
set: function (value) {
|
|
2531
|
+
this._value = value;
|
|
2532
|
+
},
|
|
2533
|
+
enumerable: true,
|
|
2534
|
+
configurable: true
|
|
2535
|
+
});
|
|
2036
2536
|
__decorate([
|
|
2037
|
-
|
|
2038
|
-
__metadata("design:type",
|
|
2039
|
-
__metadata("design:paramtypes", [])
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
ActivityContainerComponent = __decorate([
|
|
2537
|
+
core.Input(),
|
|
2538
|
+
__metadata("design:type", Object),
|
|
2539
|
+
__metadata("design:paramtypes", [Object])
|
|
2540
|
+
], DefaultCellRendererComponent.prototype, "value", null);
|
|
2541
|
+
DefaultCellRendererComponent = __decorate([
|
|
2043
2542
|
core.Component({
|
|
2044
|
-
selector: 'aup-
|
|
2045
|
-
template: "
|
|
2046
|
-
styles: ["
|
|
2543
|
+
selector: 'aup-default-cell-renderer',
|
|
2544
|
+
template: "{{value}}\n",
|
|
2545
|
+
styles: [""]
|
|
2047
2546
|
}),
|
|
2048
2547
|
__metadata("design:paramtypes", [])
|
|
2049
|
-
],
|
|
2050
|
-
return
|
|
2051
|
-
}(
|
|
2548
|
+
], DefaultCellRendererComponent);
|
|
2549
|
+
return DefaultCellRendererComponent;
|
|
2550
|
+
}());
|
|
2052
2551
|
|
|
2053
|
-
var
|
|
2054
|
-
function
|
|
2055
|
-
this.activeInteractionContextIds = activeInteractionContextIds;
|
|
2056
|
-
this.activeModalContext = activeModalContext;
|
|
2057
|
-
this.createExclusiveInteractionContext = createExclusiveInteractionContext;
|
|
2552
|
+
var DefaultHeaderCellRendererComponent = /** @class */ (function () {
|
|
2553
|
+
function DefaultHeaderCellRendererComponent() {
|
|
2058
2554
|
}
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2555
|
+
__decorate([
|
|
2556
|
+
core.Input(),
|
|
2557
|
+
__metadata("design:type", ColumnModel)
|
|
2558
|
+
], DefaultHeaderCellRendererComponent.prototype, "columnModel", void 0);
|
|
2559
|
+
DefaultHeaderCellRendererComponent = __decorate([
|
|
2560
|
+
core.Component({
|
|
2561
|
+
selector: 'aup-default-header-renderer',
|
|
2562
|
+
template: "{{columnModel.getHeaderText()}}\n",
|
|
2563
|
+
styles: [""]
|
|
2564
|
+
}),
|
|
2565
|
+
__metadata("design:paramtypes", [])
|
|
2566
|
+
], DefaultHeaderCellRendererComponent);
|
|
2567
|
+
return DefaultHeaderCellRendererComponent;
|
|
2568
|
+
}());
|
|
2569
|
+
|
|
2570
|
+
// export type StringPropertiesOf<T> = { [K in keyof T]: T[K] extends string ? K : never }[keyof T];
|
|
2571
|
+
// export type NumberPropertiesOf<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];
|
|
2572
|
+
/**
|
|
2573
|
+
* Example:
|
|
2574
|
+
* @example
|
|
2575
|
+
* const model = TableModel.fromList(heroList, table => {
|
|
2576
|
+
* table.pluck("firstName");
|
|
2577
|
+
* table.pluck("lastName");
|
|
2578
|
+
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
2579
|
+
* });
|
|
2580
|
+
*
|
|
2581
|
+
* Editable tables
|
|
2582
|
+
* @example
|
|
2583
|
+
* const saveCommand = UnaryCommand.create((form: Form<Hero>) => {
|
|
2584
|
+
* if (form.validate()) {
|
|
2585
|
+
* // normal form save stuff
|
|
2586
|
+
* return true; // finish editing
|
|
2587
|
+
* }
|
|
2588
|
+
* return false; // continue editiing
|
|
2589
|
+
* }
|
|
2590
|
+
* const colorsNames: ListModel<string> = ...;
|
|
2591
|
+
* const model = TableModel.fromList(heroList, table => {
|
|
2592
|
+
* table.pluck("firstName").cellEditor(StringInputComponent); <-- interface CellEditor { valueModel: FormValueModel<string> | ValueModel<string>; }
|
|
2593
|
+
* table.pluck("lastName").cellEditor(StringInputComponent, {
|
|
2594
|
+
* validators: [Validator.present("We need a last name")]
|
|
2595
|
+
* });
|
|
2596
|
+
* table.pluck("age").cellEditor(NumberInputComponent);
|
|
2597
|
+
* table.pluck("favoriteColor").cellEditor(SelectInputComponent, {
|
|
2598
|
+
* initialiseComponent(component: SelectInputComponent) {
|
|
2599
|
+
* selectInput.optionsModel = colorsNames; // <- initialise our component
|
|
2600
|
+
* }
|
|
2601
|
+
* });
|
|
2602
|
+
* table.addEditControls(saveCommand); // <- required to enable editing
|
|
2603
|
+
* });
|
|
2604
|
+
*
|
|
2605
|
+
* Selection models
|
|
2606
|
+
* @example
|
|
2607
|
+
* const model = TableModel.fromList(heroList, table => {
|
|
2608
|
+
* table.addSelectionColumn(selectionModel); // <- can be single or multiple selection model
|
|
2609
|
+
* table.pluck("firstName");
|
|
2610
|
+
* table.pluck("lastName");
|
|
2611
|
+
* });
|
|
2612
|
+
*
|
|
2613
|
+
* Custom cell renderers and editors
|
|
2614
|
+
* @example
|
|
2615
|
+
* const model = TableModel.fromList(heroList, table => {
|
|
2616
|
+
* table.pluck("favoriteColor")
|
|
2617
|
+
* .cellHeaderRenderer(CellHeaderRendererComponent, (component, column) => {
|
|
2618
|
+
* // configure your component with what ever you need.
|
|
2619
|
+
* });
|
|
2620
|
+
* .cellRenderer(CellRendererComponent) // <-- interface CellEditor { value: string; }
|
|
2621
|
+
* .cellEditor(CellEditorComponent.); // <-- interface CellEditor { valueModel: FormValueModel<string> | ValueModel<string>; }
|
|
2622
|
+
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
2623
|
+
* });
|
|
2624
|
+
*
|
|
2625
|
+
* I18n
|
|
2626
|
+
* @example
|
|
2627
|
+
* [table.yml]
|
|
2628
|
+
* table:
|
|
2629
|
+
* columns(ColumnTextProperties[]):
|
|
2630
|
+
* firstName:
|
|
2631
|
+
* headerText: "First Name"
|
|
2632
|
+
* fullName:
|
|
2633
|
+
* headerText: "Full Name"
|
|
2634
|
+
*
|
|
2635
|
+
* const model = TableModel.fromList(heroList, table => {
|
|
2636
|
+
* table.pluck("favoriteColor").cellRenderer(...).cellEditor(...);
|
|
2637
|
+
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
2638
|
+
*
|
|
2639
|
+
* table.columnTextProperties(I18n.table.columns); // <- configures all columns
|
|
2640
|
+
* });
|
|
2641
|
+
*/
|
|
2642
|
+
exports.TableModel = /** @class */ (function () {
|
|
2643
|
+
function TableModel(sourceOfTruth) {
|
|
2644
|
+
this.sourceOfTruth = sourceOfTruth;
|
|
2645
|
+
this._garbage = new pectin.GarbageCollector();
|
|
2646
|
+
this._columns = new pectin.MutableListModel();
|
|
2647
|
+
this._editorSessions = new pectin.MutableListModel();
|
|
2648
|
+
this.identityOf = sourceOfTruth.identityOf;
|
|
2649
|
+
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;
|
|
2650
|
+
this._columnsById = chain(this._columns).indexBy('columnId');
|
|
2651
|
+
this._rowsBeingEdited = new pectin.MutableListModel([], {
|
|
2652
|
+
identifiedWith: this.identityOf
|
|
2653
|
+
});
|
|
2654
|
+
this._editorSessionByRowId = chain(this._editorSessions).indexBy('rowId');
|
|
2655
|
+
this.editing = chain(this._editorSessions).count().isGreaterThan(0);
|
|
2656
|
+
this.dataSource = chain(this.sourceOfTruth).replaceAll(this.rowsBeingEdited);
|
|
2657
|
+
}
|
|
2658
|
+
TableModel_1 = TableModel;
|
|
2659
|
+
TableModel.fromList = function (sourceOfTruth, builder) {
|
|
2660
|
+
var model = new TableModel_1(sourceOfTruth);
|
|
2661
|
+
builder(model);
|
|
2662
|
+
return model;
|
|
2064
2663
|
};
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2664
|
+
Object.defineProperty(TableModel.prototype, "rowsBeingEdited", {
|
|
2665
|
+
get: function () {
|
|
2666
|
+
return this._rowsBeingEdited.readonly;
|
|
2667
|
+
},
|
|
2668
|
+
enumerable: true,
|
|
2669
|
+
configurable: true
|
|
2670
|
+
});
|
|
2671
|
+
TableModel.prototype.getTrackByFunction = function () {
|
|
2672
|
+
var _this = this;
|
|
2673
|
+
return function (index, item) {
|
|
2674
|
+
return _this.identityOf ? _this.identityOf(item) : index;
|
|
2675
|
+
};
|
|
2068
2676
|
};
|
|
2069
|
-
|
|
2070
|
-
|
|
2677
|
+
Object.defineProperty(TableModel.prototype, "columns", {
|
|
2678
|
+
get: function () {
|
|
2679
|
+
return this._columns.readonly;
|
|
2680
|
+
},
|
|
2681
|
+
enumerable: true,
|
|
2682
|
+
configurable: true
|
|
2683
|
+
});
|
|
2684
|
+
TableModel.prototype.pluck = function (property) {
|
|
2685
|
+
return this.addColumn(new PropertyColumnModel(property, this));
|
|
2071
2686
|
};
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
return this.activeModalContext.value.cancelActiveActivity();
|
|
2687
|
+
TableModel.prototype.addSelectionColumn = function (selectionModel) {
|
|
2688
|
+
return this.addColumn(new SelectionColumnModel('selection', this, selectionModel));
|
|
2075
2689
|
};
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
return
|
|
2690
|
+
TableModel.prototype.addEditControls = function (saveCommand) {
|
|
2691
|
+
this.saveCommand = saveCommand;
|
|
2692
|
+
return this.addColumn(new EditorControlColumnModel('editControls', saveCommand, this));
|
|
2079
2693
|
};
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
var ModalInteractionContextFactory = /** @class */ (function () {
|
|
2084
|
-
function ModalInteractionContextFactory() {
|
|
2085
|
-
}
|
|
2086
|
-
return ModalInteractionContextFactory;
|
|
2087
|
-
}());
|
|
2088
|
-
|
|
2089
|
-
var inplaceMonitorCount = 0;
|
|
2090
|
-
exports.ɵbg = /** @class */ (function () {
|
|
2091
|
-
function InteractionService(modelInteractionContextFactory) {
|
|
2092
|
-
this.modelInteractionContextFactory = modelInteractionContextFactory;
|
|
2093
|
-
this.garbage = new pectin.GarbageCollector();
|
|
2094
|
-
// private readonly _activeModalContext = new MutableValueModel<InteractionContext>();
|
|
2095
|
-
// private readonly _activeInlineContext = new MutableValueModel<InteractionContext>();
|
|
2096
|
-
// private readonly _activeContext: ValueModelChain<InteractionContext>;
|
|
2097
|
-
this._navigationInProgress = new pectin.DelegatingValueModel().withDefault(false);
|
|
2098
|
-
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;
|
|
2099
|
-
this.exclusiveInteractionRegistry = new InteractionService_1.ContextRegistry();
|
|
2100
|
-
this.modalInteractionRegistry = new InteractionService_1.ContextRegistry();
|
|
2101
|
-
this.inPlaceInteractionRegistry = new InteractionService_1.ContextRegistry();
|
|
2102
|
-
this.modalInteractionRegistry.disableWhen(valueOf.any(this.exclusiveInteractionRegistry.active, this.modalInteractionRegistry.active).areTruthy());
|
|
2103
|
-
this.inPlaceInteractionRegistry.disableWhen(valueOf.any(this.exclusiveInteractionRegistry.active, this.modalInteractionRegistry.active, this.inPlaceInteractionRegistry.active).areTruthy());
|
|
2104
|
-
this.active = valueOf.any(this.inPlaceInteractionRegistry.active, this.modalInteractionRegistry.active).areTruthy();
|
|
2105
|
-
// TODO: chain.concat(listOrValueModels) would be nice.
|
|
2106
|
-
this.activeInteractionContextIds = chain(this.inPlaceInteractionRegistry.interactionContextIds)
|
|
2107
|
-
.concat(this.modalInteractionRegistry.interactionContextIds);
|
|
2108
|
-
this.activeModalContext = chain(this.modalInteractionRegistry.interactionContexts).first();
|
|
2109
|
-
this.inModalInteraction = chain(this.activeModalContext).isNotNil();
|
|
2110
|
-
}
|
|
2111
|
-
InteractionService_1 = InteractionService;
|
|
2112
|
-
InteractionService.prototype.isActive = function () {
|
|
2113
|
-
return this.active.value;
|
|
2694
|
+
TableModel.prototype.addCustomColumn = function (columnId, dataAccessor) {
|
|
2695
|
+
return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
|
|
2114
2696
|
};
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2697
|
+
TableModel.prototype.addColumn = function (column) {
|
|
2698
|
+
if (this._columnsById.get(column.columnId)) {
|
|
2699
|
+
pectin.lang.illegalState("Column with id=" + column.columnId + " already exists");
|
|
2700
|
+
}
|
|
2701
|
+
else {
|
|
2702
|
+
this._columns.push(column);
|
|
2703
|
+
}
|
|
2704
|
+
return column;
|
|
2121
2705
|
};
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
* @param disposable
|
|
2125
|
-
*/
|
|
2126
|
-
InteractionService.prototype.createModalInteractionContextDisposedWith = function (disposable) {
|
|
2127
|
-
// TODO: look at making the registry the factory..
|
|
2128
|
-
return this.modelInteractionContextFactory.createInteractionContext('modal', new InteractionService_1.ApiAdapter(this.placeRouter, this.modalInteractionRegistry));
|
|
2706
|
+
TableModel.prototype.columnTextProperties = function (columnTextProperties) {
|
|
2707
|
+
this._columnTextPropertiesLookup = columnTextProperties;
|
|
2129
2708
|
};
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
// Todo: allow multiple inplace interactions..
|
|
2134
|
-
interactionContext.initialise("ip" + ++inplaceMonitorCount, new InteractionService_1.ApiAdapter(this.placeRouter, this.inPlaceInteractionRegistry));
|
|
2709
|
+
TableModel.prototype.getColumnTextProperties = function (column) {
|
|
2710
|
+
var factory = this._columnTextPropertiesLookup[column.columnId];
|
|
2711
|
+
return factory ? factory() : undefined;
|
|
2135
2712
|
};
|
|
2136
|
-
|
|
2137
|
-
* Creates an interaction context that will prevent any other contexts from starting an
|
|
2138
|
-
* activity until it is disposed. This is intended for use by the router for passing
|
|
2139
|
-
* to PlaceComponent.canDeactivate(interactionContext). This ensures components don't
|
|
2140
|
-
* try and interact in a way that we can't track and synchronise with the browser back
|
|
2141
|
-
* button.
|
|
2142
|
-
*/
|
|
2143
|
-
InteractionService.prototype.registerPlaceRouter = function (router) {
|
|
2713
|
+
TableModel.prototype.startEditSession = function (row) {
|
|
2144
2714
|
var _this = this;
|
|
2145
|
-
|
|
2146
|
-
this.
|
|
2147
|
-
|
|
2148
|
-
var self = this;
|
|
2149
|
-
return new InteractionServiceRoutingAdapter(this.activeInteractionContextIds, this.activeModalContext, function () {
|
|
2150
|
-
return self.modelInteractionContextFactory.createInteractionContext('exclusive', new InteractionService_1.ApiAdapter(_this.placeRouter, _this.exclusiveInteractionRegistry));
|
|
2151
|
-
});
|
|
2152
|
-
};
|
|
2153
|
-
var InteractionService_1;
|
|
2154
|
-
InteractionService.ctorParameters = function () { return [
|
|
2155
|
-
{ type: ModalInteractionContextFactory }
|
|
2156
|
-
]; };
|
|
2157
|
-
InteractionService.ɵprov = core.ɵɵdefineInjectable({ factory: function InteractionService_Factory() { return new InteractionService(core.ɵɵinject(ModalInteractionContextFactory)); }, token: InteractionService, providedIn: "root" });
|
|
2158
|
-
InteractionService = InteractionService_1 = __decorate([
|
|
2159
|
-
core.Injectable({
|
|
2160
|
-
providedIn: 'root'
|
|
2161
|
-
}),
|
|
2162
|
-
__metadata("design:paramtypes", [ModalInteractionContextFactory])
|
|
2163
|
-
], InteractionService);
|
|
2164
|
-
return InteractionService;
|
|
2165
|
-
}());
|
|
2166
|
-
(function (InteractionService) {
|
|
2167
|
-
/**
|
|
2168
|
-
* Provides a mechanism for the service to keep track of what the API adapters are doing to
|
|
2169
|
-
* ensure the rules are followed, i.e. modal or in-place interaction aren't started while
|
|
2170
|
-
* an exclusive routing interaction is active.
|
|
2171
|
-
*/
|
|
2172
|
-
var ContextRegistry = /** @class */ (function (_super) {
|
|
2173
|
-
__extends(ContextRegistry, _super);
|
|
2174
|
-
function ContextRegistry() {
|
|
2175
|
-
var _this = _super.call(this) || this;
|
|
2176
|
-
_this._interactions = new pectin.MutableListModel();
|
|
2177
|
-
_this._disabledDelegate = new pectin.DelegatingValueModel().withDefault(false);
|
|
2178
|
-
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;
|
|
2179
|
-
_this.active = chain(_this._interactions).isNotEmpty();
|
|
2180
|
-
_this.interactionContextIds = chain(_this._interactions).pluck("identifier");
|
|
2181
|
-
return _this;
|
|
2715
|
+
var rowId = this.identityOf(row);
|
|
2716
|
+
if (this._rowsBeingEdited.query().indexOf(row) > -1) {
|
|
2717
|
+
return pectin.lang.illegalState("Row with id=" + rowId + " already being edited");
|
|
2182
2718
|
}
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
};
|
|
2196
|
-
ContextRegistry.prototype.isActive = function () {
|
|
2197
|
-
return this.active.value;
|
|
2198
|
-
};
|
|
2199
|
-
ContextRegistry.prototype.disableWhen = function (disabled) {
|
|
2200
|
-
this._disabledDelegate.setDelegate(disabled);
|
|
2201
|
-
};
|
|
2202
|
-
return ContextRegistry;
|
|
2203
|
-
}(pectin.GarbageCollector));
|
|
2204
|
-
InteractionService.ContextRegistry = ContextRegistry;
|
|
2205
|
-
var ApiAdapter = /** @class */ (function () {
|
|
2206
|
-
function ApiAdapter(placeRouter, contextRegistry) {
|
|
2207
|
-
this.placeRouter = placeRouter;
|
|
2208
|
-
this.contextRegistry = contextRegistry;
|
|
2719
|
+
else {
|
|
2720
|
+
var editSession_1 = new TableModel_1.EditSession(rowId, row, this.saveCommand);
|
|
2721
|
+
var when = pectin.Dsl.disposeWith(editSession_1).when;
|
|
2722
|
+
when.valueOf(editSession_1.rowValueModel).changes(function (editedValue) {
|
|
2723
|
+
_this._rowsBeingEdited.replaceOrPush(editedValue);
|
|
2724
|
+
}, { initialValue: 'triggerChangeUnlessNil' });
|
|
2725
|
+
this._editorSessions.push(editSession_1);
|
|
2726
|
+
editSession_1.onDispose(function () {
|
|
2727
|
+
_this._rowsBeingEdited.remove(editSession_1.rowValueModel.value);
|
|
2728
|
+
_this._editorSessions.remove(editSession_1);
|
|
2729
|
+
});
|
|
2730
|
+
return editSession_1;
|
|
2209
2731
|
}
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2732
|
+
};
|
|
2733
|
+
TableModel.prototype.getEditSessionFor = function (row) {
|
|
2734
|
+
return this._editorSessionByRowId.get(this.identityOf(row));
|
|
2735
|
+
};
|
|
2736
|
+
TableModel.prototype.cancelAllEditorSessions = function () {
|
|
2737
|
+
var _this = this;
|
|
2738
|
+
this._editorSessions.runInTransaction(function (draft) {
|
|
2739
|
+
_this._rowsBeingEdited.runInTransaction(function () {
|
|
2740
|
+
draft.value.forEach(function (session) { return session.dispose(); });
|
|
2741
|
+
});
|
|
2742
|
+
});
|
|
2743
|
+
};
|
|
2744
|
+
var TableModel_1;
|
|
2745
|
+
TableModel.ctorParameters = function () { return [
|
|
2746
|
+
{ type: pectin.ListModel }
|
|
2747
|
+
]; };
|
|
2748
|
+
TableModel = TableModel_1 = __decorate([
|
|
2749
|
+
pectin.TrackExternal.Strategy(new pectin.TrackExternal.OneTimeBinding()),
|
|
2750
|
+
__metadata("design:paramtypes", [pectin.ListModel])
|
|
2751
|
+
], TableModel);
|
|
2752
|
+
return TableModel;
|
|
2753
|
+
}());
|
|
2754
|
+
(function (TableModel) {
|
|
2755
|
+
var EditSession = /** @class */ (function (_super) {
|
|
2756
|
+
__extends(EditSession, _super);
|
|
2757
|
+
function EditSession(rowId, row, saveCommand) {
|
|
2758
|
+
var _this = _super.call(this) || this;
|
|
2759
|
+
_this.rowId = rowId;
|
|
2760
|
+
_this.saveCommand = saveCommand;
|
|
2761
|
+
_this._editorValue = new pectin.MutableValueModel();
|
|
2762
|
+
_this.rowValueModel = _this._editorValue.readonly;
|
|
2763
|
+
_this.form = new pectin.Form();
|
|
2764
|
+
_this.form.load(row);
|
|
2765
|
+
_this._editorValue.value = row;
|
|
2766
|
+
_this.form.onEdit(function () {
|
|
2767
|
+
_this._editorValue.value = produce(_this._editorValue.value, function (draft) {
|
|
2768
|
+
_this.form.writeDirtyStateTo(draft);
|
|
2769
|
+
});
|
|
2770
|
+
});
|
|
2771
|
+
return _this;
|
|
2772
|
+
}
|
|
2773
|
+
return EditSession;
|
|
2774
|
+
}(pectin.GarbageCollector));
|
|
2775
|
+
TableModel.EditSession = EditSession;
|
|
2776
|
+
})(exports.TableModel || (exports.TableModel = {}));
|
|
2236
2777
|
|
|
2237
|
-
var
|
|
2238
|
-
__extends(
|
|
2239
|
-
function
|
|
2778
|
+
var EditRowControls = /** @class */ (function (_super) {
|
|
2779
|
+
__extends(EditRowControls, _super);
|
|
2780
|
+
function EditRowControls() {
|
|
2240
2781
|
var _this = _super.call(this) || this;
|
|
2241
|
-
_this.
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2782
|
+
_this.saveCommand = pectin.Command.create(function () {
|
|
2783
|
+
_this.editSession.saveCommand.execute(_this.editSession.form)
|
|
2784
|
+
.then(function (finished) {
|
|
2785
|
+
if (finished) {
|
|
2786
|
+
_this.editSession.dispose();
|
|
2787
|
+
}
|
|
2788
|
+
});
|
|
2789
|
+
});
|
|
2790
|
+
_this.cancelCommand = pectin.Command.create(function () {
|
|
2791
|
+
_this.editSession.dispose();
|
|
2792
|
+
});
|
|
2248
2793
|
return _this;
|
|
2249
2794
|
}
|
|
2250
|
-
|
|
2795
|
+
EditRowControls.prototype.ngOnInit = function () {
|
|
2796
|
+
};
|
|
2797
|
+
Object.defineProperty(EditRowControls.prototype, "form", {
|
|
2251
2798
|
get: function () {
|
|
2252
2799
|
var _a;
|
|
2253
|
-
return
|
|
2800
|
+
return (_a = this.editSession) === null || _a === void 0 ? void 0 : _a.form;
|
|
2254
2801
|
},
|
|
2255
2802
|
enumerable: true,
|
|
2256
2803
|
configurable: true
|
|
2257
2804
|
});
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2805
|
+
__decorate([
|
|
2806
|
+
core.Input(),
|
|
2807
|
+
__metadata("design:type", Object)
|
|
2808
|
+
], EditRowControls.prototype, "row", void 0);
|
|
2809
|
+
__decorate([
|
|
2810
|
+
core.Input(),
|
|
2811
|
+
pectin.TrackExternal(),
|
|
2812
|
+
__metadata("design:type", pectin.Command)
|
|
2813
|
+
], EditRowControls.prototype, "editRowCommand", void 0);
|
|
2814
|
+
__decorate([
|
|
2815
|
+
core.Input(),
|
|
2816
|
+
__metadata("design:type", exports.TableModel.EditSession)
|
|
2817
|
+
], EditRowControls.prototype, "editSession", void 0);
|
|
2818
|
+
EditRowControls = __decorate([
|
|
2819
|
+
core.Component({
|
|
2820
|
+
selector: 'aup-row-editor-controls',
|
|
2821
|
+
template: "<button *ngIf=\"!editSession\" mat-icon-button [pectinCommand]=\"editRowCommand\" class=\"edit-button\"><mat-icon>edit</mat-icon></button>\n<button *ngIf=\"editSession\" mat-icon-button [pectinCommand]=\"saveCommand\"><mat-icon>done</mat-icon></button>\n<button *ngIf=\"editSession\" mat-icon-button [pectinCommand]=\"cancelCommand\"><mat-icon>clear</mat-icon></button>\n",
|
|
2822
|
+
styles: [":host{display:block;width:80px}.edit-button{visibility:hidden}:host-context(tr:hover) .edit-button{visibility:visible}"]
|
|
2823
|
+
}),
|
|
2824
|
+
__metadata("design:paramtypes", [])
|
|
2825
|
+
], EditRowControls);
|
|
2826
|
+
return EditRowControls;
|
|
2827
|
+
}(DisposableComponent));
|
|
2828
|
+
|
|
2829
|
+
var SelectCellRendererComponent = /** @class */ (function (_super) {
|
|
2830
|
+
__extends(SelectCellRendererComponent, _super);
|
|
2831
|
+
function SelectCellRendererComponent() {
|
|
2832
|
+
var _this = _super.call(this) || this;
|
|
2833
|
+
_this.selectCommand = pectin.Command.create(function () {
|
|
2834
|
+
_this.selectionModel.selectCommand.execute(_this.row);
|
|
2835
|
+
});
|
|
2836
|
+
return _this;
|
|
2837
|
+
}
|
|
2838
|
+
Object.defineProperty(SelectCellRendererComponent.prototype, "row", {
|
|
2265
2839
|
get: function () {
|
|
2266
|
-
return this.
|
|
2840
|
+
return this._row;
|
|
2841
|
+
},
|
|
2842
|
+
set: function (value) {
|
|
2843
|
+
this._row = value;
|
|
2267
2844
|
},
|
|
2268
2845
|
enumerable: true,
|
|
2269
2846
|
configurable: true
|
|
2270
2847
|
});
|
|
2271
|
-
|
|
2272
|
-
return this.
|
|
2273
|
-
};
|
|
2274
|
-
InPlaceInteractionContextComponent.prototype.cancelActiveActivity = function () {
|
|
2275
|
-
return this.activityContainerComponent.cancelActiveActivity();
|
|
2276
|
-
};
|
|
2277
|
-
InPlaceInteractionContextComponent.prototype.confirm = function (confirm) {
|
|
2278
|
-
return this.activityContainerComponent.confirm(confirm);
|
|
2279
|
-
};
|
|
2280
|
-
InPlaceInteractionContextComponent.prototype.confirmOrReject = function (confirm) {
|
|
2281
|
-
return this.activityContainerComponent.confirmOrReject(confirm);
|
|
2282
|
-
};
|
|
2283
|
-
InPlaceInteractionContextComponent.prototype.confirmThen = function (confirm, activityType, data) {
|
|
2284
|
-
return this.activityContainerComponent.confirmThen(confirm, activityType);
|
|
2285
|
-
};
|
|
2286
|
-
InPlaceInteractionContextComponent.prototype.isActive = function () {
|
|
2287
|
-
return this.activityContainerComponent.isActive();
|
|
2288
|
-
};
|
|
2289
|
-
InPlaceInteractionContextComponent.prototype.startActivity = function (activityType, data) {
|
|
2290
|
-
return this.activityContainerComponent.startActivity(activityType, data);
|
|
2848
|
+
SelectCellRendererComponent.prototype.isSelected = function () {
|
|
2849
|
+
return this.selectionModel.isSelected(this.row);
|
|
2291
2850
|
};
|
|
2292
|
-
InPlaceInteractionContextComponent.ctorParameters = function () { return [
|
|
2293
|
-
{ type: exports.ɵbg },
|
|
2294
|
-
{ type: undefined, decorators: [{ type: core.Inject, args: [tabs.MAT_TABS_CONFIG,] }, { type: core.Optional }] }
|
|
2295
|
-
]; };
|
|
2296
2851
|
__decorate([
|
|
2297
|
-
core.
|
|
2298
|
-
__metadata("design:type",
|
|
2299
|
-
|
|
2852
|
+
core.Input(),
|
|
2853
|
+
__metadata("design:type", Object),
|
|
2854
|
+
__metadata("design:paramtypes", [Object])
|
|
2855
|
+
], SelectCellRendererComponent.prototype, "row", null);
|
|
2300
2856
|
__decorate([
|
|
2301
2857
|
core.Input(),
|
|
2302
2858
|
__metadata("design:type", Object)
|
|
2303
|
-
],
|
|
2304
|
-
|
|
2859
|
+
], SelectCellRendererComponent.prototype, "selectionModel", void 0);
|
|
2860
|
+
SelectCellRendererComponent = __decorate([
|
|
2305
2861
|
core.Component({
|
|
2306
|
-
selector: 'aup-
|
|
2307
|
-
template: "<mat-
|
|
2308
|
-
styles: ["
|
|
2862
|
+
selector: 'aup-select-cell-renderer',
|
|
2863
|
+
template: "<mat-checkbox [pectinCommand]=\"selectCommand\" [checked]=\"isSelected()\"></mat-checkbox>\n",
|
|
2864
|
+
styles: [""]
|
|
2309
2865
|
}),
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
return InPlaceInteractionContextComponent;
|
|
2866
|
+
__metadata("design:paramtypes", [])
|
|
2867
|
+
], SelectCellRendererComponent);
|
|
2868
|
+
return SelectCellRendererComponent;
|
|
2314
2869
|
}(DisposableComponent));
|
|
2315
2870
|
|
|
2316
|
-
var
|
|
2317
|
-
__extends(
|
|
2318
|
-
function
|
|
2871
|
+
var SelectHeaderCellRendererComponent = /** @class */ (function (_super) {
|
|
2872
|
+
__extends(SelectHeaderCellRendererComponent, _super);
|
|
2873
|
+
function SelectHeaderCellRendererComponent() {
|
|
2319
2874
|
var _this = _super.call(this) || this;
|
|
2320
|
-
_this.
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
_this.config = config;
|
|
2324
|
-
_this.garbage = new pectin.GarbageCollector();
|
|
2325
|
-
typescriptUtilities.assert.notNil(dialogService);
|
|
2875
|
+
_this.selectCommand = pectin.Command.create(function () {
|
|
2876
|
+
_this.selectionModel.toggleAllCommand.execute();
|
|
2877
|
+
});
|
|
2326
2878
|
return _this;
|
|
2327
2879
|
}
|
|
2328
|
-
|
|
2329
|
-
return this.
|
|
2880
|
+
SelectHeaderCellRendererComponent.prototype.isSelected = function () {
|
|
2881
|
+
return this.selectionModel.allSelected.value;
|
|
2330
2882
|
};
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
pectin.lang.illegalState('Dispose called while active.');
|
|
2334
|
-
}
|
|
2335
|
-
this.garbage.dispose();
|
|
2883
|
+
SelectHeaderCellRendererComponent.prototype.isIntermediate = function () {
|
|
2884
|
+
return this.selectionModel.someSelected.value;
|
|
2336
2885
|
};
|
|
2337
|
-
|
|
2338
|
-
|
|
2886
|
+
__decorate([
|
|
2887
|
+
core.Input(),
|
|
2888
|
+
__metadata("design:type", pectin.MultipleSelectionModel)
|
|
2889
|
+
], SelectHeaderCellRendererComponent.prototype, "selectionModel", void 0);
|
|
2890
|
+
SelectHeaderCellRendererComponent = __decorate([
|
|
2891
|
+
core.Component({
|
|
2892
|
+
selector: 'aup-select-header-cell-renderer',
|
|
2893
|
+
template: "<mat-checkbox [pectinCommand]=\"selectCommand\" [checked]=\"isSelected()\" [indeterminate]=\"this.isIntermediate()\"></mat-checkbox>\n",
|
|
2894
|
+
styles: [""]
|
|
2895
|
+
}),
|
|
2896
|
+
__metadata("design:paramtypes", [])
|
|
2897
|
+
], SelectHeaderCellRendererComponent);
|
|
2898
|
+
return SelectHeaderCellRendererComponent;
|
|
2899
|
+
}(DisposableComponent));
|
|
2900
|
+
|
|
2901
|
+
var ColumnModel = /** @class */ (function () {
|
|
2902
|
+
function ColumnModel(columnId, defaults) {
|
|
2903
|
+
this.columnId = columnId;
|
|
2904
|
+
this.defaults = defaults;
|
|
2905
|
+
this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, function (component, column) {
|
|
2906
|
+
component.columnModel = column;
|
|
2907
|
+
});
|
|
2908
|
+
}
|
|
2909
|
+
ColumnModel.prototype.getHeaderText = function () {
|
|
2910
|
+
var _a;
|
|
2911
|
+
return ((_a = this.getColumnTextProperties()) === null || _a === void 0 ? void 0 : _a.headerText()) || this.getDefaultHeaderText();
|
|
2339
2912
|
};
|
|
2340
|
-
|
|
2341
|
-
return
|
|
2913
|
+
ColumnModel.prototype.getDefaultHeaderText = function () {
|
|
2914
|
+
return this.columnId;
|
|
2342
2915
|
};
|
|
2343
|
-
|
|
2916
|
+
ColumnModel.prototype.getColumnTextProperties = function () {
|
|
2917
|
+
return this._columnTextProperties || this.defaults.getColumnTextProperties(this);
|
|
2918
|
+
};
|
|
2919
|
+
ColumnModel.prototype.textProperties = function (columnTextProperties) {
|
|
2920
|
+
this._columnTextProperties = columnTextProperties;
|
|
2921
|
+
return this;
|
|
2922
|
+
};
|
|
2923
|
+
ColumnModel.prototype.setCellRenderer = function (cellRenderer, initialiser) {
|
|
2924
|
+
this._cellRendererConfig = {
|
|
2925
|
+
portal: new portal.ComponentPortal(cellRenderer),
|
|
2926
|
+
pushState: initialiser
|
|
2927
|
+
};
|
|
2928
|
+
};
|
|
2929
|
+
ColumnModel.prototype.cellHeaderRenderer = function (cellRenderer, initialiser) {
|
|
2930
|
+
this._columnHeaderConfig = {
|
|
2931
|
+
portal: new portal.ComponentPortal(cellRenderer),
|
|
2932
|
+
initialiseComponent: initialiser
|
|
2933
|
+
};
|
|
2934
|
+
};
|
|
2935
|
+
ColumnModel.prototype.setCellEditor = function (cellEditor) {
|
|
2936
|
+
this._cellEditorConfig = cellEditor;
|
|
2937
|
+
};
|
|
2938
|
+
Object.defineProperty(ColumnModel.prototype, "cellRendererPortal", {
|
|
2939
|
+
get: function () {
|
|
2940
|
+
return this._cellRendererConfig.portal;
|
|
2941
|
+
},
|
|
2942
|
+
enumerable: true,
|
|
2943
|
+
configurable: true
|
|
2944
|
+
});
|
|
2945
|
+
Object.defineProperty(ColumnModel.prototype, "columnHeaderCellRendererPortal", {
|
|
2946
|
+
get: function () {
|
|
2947
|
+
return this._columnHeaderConfig.portal;
|
|
2948
|
+
},
|
|
2949
|
+
enumerable: true,
|
|
2950
|
+
configurable: true
|
|
2951
|
+
});
|
|
2952
|
+
Object.defineProperty(ColumnModel.prototype, "cellEditorPortal", {
|
|
2953
|
+
get: function () {
|
|
2954
|
+
var _a;
|
|
2955
|
+
return (_a = this._cellEditorConfig) === null || _a === void 0 ? void 0 : _a.portal;
|
|
2956
|
+
},
|
|
2957
|
+
enumerable: true,
|
|
2958
|
+
configurable: true
|
|
2959
|
+
});
|
|
2960
|
+
ColumnModel.prototype.hasEditor = function () {
|
|
2961
|
+
return !!this._cellEditorConfig;
|
|
2962
|
+
};
|
|
2963
|
+
ColumnModel.prototype.updateCellRenderer = function (component, row, editRowCommand, editSession) {
|
|
2964
|
+
this._cellRendererConfig.pushState(component, row, editRowCommand, editSession);
|
|
2965
|
+
};
|
|
2966
|
+
ColumnModel.prototype.initialiseHeader = function (component) {
|
|
2967
|
+
this._columnHeaderConfig.initialiseComponent(component, this);
|
|
2968
|
+
};
|
|
2969
|
+
ColumnModel.prototype.initialiseEditor = function (component, editSession) {
|
|
2970
|
+
this._cellEditorConfig.initialiseComponent(component, editSession);
|
|
2971
|
+
};
|
|
2972
|
+
__decorate([
|
|
2973
|
+
src.Memoize(),
|
|
2974
|
+
__metadata("design:type", Function),
|
|
2975
|
+
__metadata("design:paramtypes", []),
|
|
2976
|
+
__metadata("design:returntype", String)
|
|
2977
|
+
], ColumnModel.prototype, "getHeaderText", null);
|
|
2978
|
+
__decorate([
|
|
2979
|
+
src.Memoize(),
|
|
2980
|
+
__metadata("design:type", Function),
|
|
2981
|
+
__metadata("design:paramtypes", []),
|
|
2982
|
+
__metadata("design:returntype", Object)
|
|
2983
|
+
], ColumnModel.prototype, "getColumnTextProperties", null);
|
|
2984
|
+
return ColumnModel;
|
|
2985
|
+
}());
|
|
2986
|
+
var PropertyColumnModel = /** @class */ (function (_super) {
|
|
2987
|
+
__extends(PropertyColumnModel, _super);
|
|
2988
|
+
function PropertyColumnModel(property, defaults) {
|
|
2989
|
+
var _this = _super.call(this, property.toString(), defaults) || this;
|
|
2990
|
+
_this.property = property;
|
|
2991
|
+
_this.cellRenderer(DefaultCellRendererComponent);
|
|
2992
|
+
return _this;
|
|
2993
|
+
}
|
|
2994
|
+
PropertyColumnModel.prototype.cellRenderer = function (componentType) {
|
|
2344
2995
|
var _this = this;
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
disableClose: disableClose,
|
|
2348
|
-
panelClass: 'dialog-interaction-context'
|
|
2996
|
+
this.setCellRenderer(componentType, function (component, row) {
|
|
2997
|
+
component.value = row[_this.property];
|
|
2349
2998
|
});
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
var
|
|
2353
|
-
this.
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2999
|
+
};
|
|
3000
|
+
PropertyColumnModel.prototype.cellEditor = function (editor, options) {
|
|
3001
|
+
var _this = this;
|
|
3002
|
+
this.setCellEditor({
|
|
3003
|
+
portal: new portal.ComponentPortal(editor),
|
|
3004
|
+
initialiseComponent: function (component, editSession) {
|
|
3005
|
+
var formValueModel = editSession.form.pluck(_this.property);
|
|
3006
|
+
if (options === null || options === void 0 ? void 0 : options.validators) {
|
|
3007
|
+
formValueModel.validateUsing(options.validators);
|
|
3008
|
+
}
|
|
3009
|
+
component.valueModel = formValueModel;
|
|
3010
|
+
if (options === null || options === void 0 ? void 0 : options.initialiseComponent) {
|
|
3011
|
+
options.initialiseComponent(component);
|
|
3012
|
+
}
|
|
2362
3013
|
}
|
|
2363
|
-
_this.activityContainer = null;
|
|
2364
3014
|
});
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
3015
|
+
return this;
|
|
3016
|
+
};
|
|
3017
|
+
return PropertyColumnModel;
|
|
3018
|
+
}(ColumnModel));
|
|
3019
|
+
var CustomValueColumnModel = /** @class */ (function (_super) {
|
|
3020
|
+
__extends(CustomValueColumnModel, _super);
|
|
3021
|
+
function CustomValueColumnModel(columnId, defaults, getValue) {
|
|
3022
|
+
var _this = _super.call(this, columnId, defaults) || this;
|
|
3023
|
+
_this.getValue = getValue;
|
|
3024
|
+
_this.cellRenderer(DefaultCellRendererComponent);
|
|
3025
|
+
return _this;
|
|
3026
|
+
}
|
|
3027
|
+
CustomValueColumnModel.prototype.cellRenderer = function (componentType) {
|
|
3028
|
+
var _this = this;
|
|
3029
|
+
this.setCellRenderer(componentType, function (component, row) {
|
|
3030
|
+
component.value = _this.getValue(row);
|
|
2368
3031
|
});
|
|
2369
|
-
return activityResult;
|
|
2370
3032
|
};
|
|
2371
|
-
return
|
|
2372
|
-
}(
|
|
3033
|
+
return CustomValueColumnModel;
|
|
3034
|
+
}(ColumnModel));
|
|
3035
|
+
var EditorControlColumnModel = /** @class */ (function (_super) {
|
|
3036
|
+
__extends(EditorControlColumnModel, _super);
|
|
3037
|
+
function EditorControlColumnModel(columnId, saveCommand, defaults) {
|
|
3038
|
+
var _this = _super.call(this, columnId, defaults) || this;
|
|
3039
|
+
_this.cellRenderer(EditRowControls);
|
|
3040
|
+
return _this;
|
|
3041
|
+
}
|
|
3042
|
+
EditorControlColumnModel.prototype.cellRenderer = function (componentType) {
|
|
3043
|
+
this.setCellRenderer(componentType, function (component, row, editRowCommand, editSession) {
|
|
3044
|
+
component.row = row;
|
|
3045
|
+
component.editSession = editSession;
|
|
3046
|
+
component.editRowCommand = editRowCommand;
|
|
3047
|
+
});
|
|
3048
|
+
};
|
|
3049
|
+
EditorControlColumnModel.prototype.getDefaultHeaderText = function () {
|
|
3050
|
+
return '';
|
|
3051
|
+
};
|
|
3052
|
+
return EditorControlColumnModel;
|
|
3053
|
+
}(ColumnModel));
|
|
3054
|
+
var CustomTemplateColumnModel = /** @class */ (function (_super) {
|
|
3055
|
+
__extends(CustomTemplateColumnModel, _super);
|
|
3056
|
+
function CustomTemplateColumnModel(columnId, defaults, component) {
|
|
3057
|
+
return _super.call(this, columnId, defaults) || this;
|
|
3058
|
+
}
|
|
3059
|
+
return CustomTemplateColumnModel;
|
|
3060
|
+
}(ColumnModel));
|
|
3061
|
+
var SelectionColumnModel = /** @class */ (function (_super) {
|
|
3062
|
+
__extends(SelectionColumnModel, _super);
|
|
3063
|
+
function SelectionColumnModel(columnId, defaults, selectionModel) {
|
|
3064
|
+
var _this = _super.call(this, columnId, defaults) || this;
|
|
3065
|
+
if (selectionModel instanceof pectin.MultipleSelectionModel) {
|
|
3066
|
+
_this.cellHeaderRenderer(SelectHeaderCellRendererComponent, function (component) {
|
|
3067
|
+
component.selectionModel = selectionModel;
|
|
3068
|
+
});
|
|
3069
|
+
}
|
|
3070
|
+
_this.setCellRenderer(SelectCellRendererComponent, function (component, row, editRowCommand, editSession) {
|
|
3071
|
+
component.row = row;
|
|
3072
|
+
component.selectionModel = selectionModel;
|
|
3073
|
+
});
|
|
3074
|
+
return _this;
|
|
3075
|
+
}
|
|
3076
|
+
SelectionColumnModel.prototype.getDefaultHeaderText = function () {
|
|
3077
|
+
return '';
|
|
3078
|
+
};
|
|
3079
|
+
return SelectionColumnModel;
|
|
3080
|
+
}(ColumnModel));
|
|
3081
|
+
|
|
3082
|
+
/**
|
|
3083
|
+
* Create your model:
|
|
3084
|
+
* @example
|
|
3085
|
+
* this.heroTableModel = TableModel.fromList(heroList, table => {
|
|
3086
|
+
* table.pluck("firstName");
|
|
3087
|
+
* table.pluck("lastName");
|
|
3088
|
+
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
3089
|
+
* });
|
|
3090
|
+
*
|
|
3091
|
+
* Create your table
|
|
3092
|
+
* @example
|
|
3093
|
+
* <aup-table [tableModel]="heroTableModel"></aup-table>
|
|
3094
|
+
*
|
|
3095
|
+
* Styling
|
|
3096
|
+
* @example
|
|
3097
|
+
* aup-table {
|
|
3098
|
+
* --column-gap: 10px; // defaults to 24px
|
|
3099
|
+
* aup-table-cell-renderer {
|
|
3100
|
+
* &:first-column {
|
|
3101
|
+
* // do stuff
|
|
3102
|
+
* }
|
|
3103
|
+
* &:last-column {
|
|
3104
|
+
* // do stuff
|
|
3105
|
+
* }
|
|
3106
|
+
* }
|
|
3107
|
+
* }
|
|
3108
|
+
*/
|
|
3109
|
+
var TableComponent = /** @class */ (function (_super) {
|
|
3110
|
+
__extends(TableComponent, _super);
|
|
3111
|
+
function TableComponent() {
|
|
3112
|
+
return _super.call(this) || this;
|
|
3113
|
+
}
|
|
3114
|
+
TableComponent.prototype.ngOnInit = function () {
|
|
3115
|
+
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;
|
|
3116
|
+
this.columns = chain(this.tableModel.columns);
|
|
3117
|
+
this.columnIds = chain(this.columns).pluck('columnId');
|
|
3118
|
+
};
|
|
3119
|
+
TableComponent.prototype.isEditing = function (row) {
|
|
3120
|
+
return !!this.tableModel.getEditSessionFor(row);
|
|
3121
|
+
};
|
|
3122
|
+
__decorate([
|
|
3123
|
+
core.Input(),
|
|
3124
|
+
pectin.TrackExternal(),
|
|
3125
|
+
__metadata("design:type", exports.TableModel)
|
|
3126
|
+
], TableComponent.prototype, "tableModel", void 0);
|
|
3127
|
+
TableComponent = __decorate([
|
|
3128
|
+
core.Component({
|
|
3129
|
+
selector: 'aup-table',
|
|
3130
|
+
template: "<table mat-table [dataSource]=\"tableModel.dataSource.value\" [trackBy]=\"tableModel.getTrackByFunction()\">\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 [class.first-column]=\"first\"\n [class.last-column]=\"last\"\n ></aup-table-header-cell-renderer>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <aup-table-cell-renderer [column]=\"column\"\n [row]=\"row\"\n [tableModel]=\"tableModel\"\n [editSession]=\"tableModel.getEditSessionFor(row)\"\n [attr.column-index]=\"index\"\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;\"></tr>\n\n</table>\n",
|
|
3131
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{flex:1}"]
|
|
3132
|
+
}),
|
|
3133
|
+
__metadata("design:paramtypes", [])
|
|
3134
|
+
], TableComponent);
|
|
3135
|
+
return TableComponent;
|
|
3136
|
+
}(DisposableComponent));
|
|
3137
|
+
|
|
3138
|
+
var ColumnTemplateDirective = /** @class */ (function () {
|
|
3139
|
+
function ColumnTemplateDirective(host, templateRef, viewContainer) {
|
|
3140
|
+
this.templateRef = templateRef;
|
|
3141
|
+
this.viewContainer = viewContainer;
|
|
3142
|
+
}
|
|
3143
|
+
ColumnTemplateDirective.ctorParameters = function () { return [
|
|
3144
|
+
{ type: TableComponent },
|
|
3145
|
+
{ type: core.TemplateRef },
|
|
3146
|
+
{ type: core.ViewContainerRef }
|
|
3147
|
+
]; };
|
|
3148
|
+
ColumnTemplateDirective = __decorate([
|
|
3149
|
+
core.Directive({
|
|
3150
|
+
selector: '[aupColumnTemplate]'
|
|
3151
|
+
}),
|
|
3152
|
+
__metadata("design:paramtypes", [TableComponent,
|
|
3153
|
+
core.TemplateRef,
|
|
3154
|
+
core.ViewContainerRef])
|
|
3155
|
+
], ColumnTemplateDirective);
|
|
3156
|
+
return ColumnTemplateDirective;
|
|
3157
|
+
}());
|
|
3158
|
+
|
|
3159
|
+
var TableCellRendererComponent = /** @class */ (function () {
|
|
3160
|
+
function TableCellRendererComponent() {
|
|
3161
|
+
var _this = this;
|
|
3162
|
+
this.defaultClassNames = "aup-header-cell-renderer";
|
|
3163
|
+
this.editRowCommand = pectin.Command.create(function () {
|
|
3164
|
+
_this.tableModel.startEditSession(_this.row);
|
|
3165
|
+
});
|
|
3166
|
+
}
|
|
3167
|
+
TableCellRendererComponent.prototype.initialiseRenderer = function (instance) {
|
|
3168
|
+
if (this.renderer !== instance) {
|
|
3169
|
+
this.renderer = instance;
|
|
3170
|
+
this.column.updateCellRenderer(this.renderer, this.row, this.editRowCommand, this.editSession);
|
|
3171
|
+
}
|
|
3172
|
+
};
|
|
3173
|
+
TableCellRendererComponent.prototype.initialiseEditor = function (instance) {
|
|
3174
|
+
if (this.editor !== instance) {
|
|
3175
|
+
this.editor = instance;
|
|
3176
|
+
this.column.initialiseEditor(this.editor, this.editSession);
|
|
3177
|
+
}
|
|
3178
|
+
};
|
|
3179
|
+
TableCellRendererComponent.prototype.ngOnChanges = function (changes) {
|
|
3180
|
+
if (this.renderer) {
|
|
3181
|
+
this.column.updateCellRenderer(this.renderer, this.row, this.editRowCommand, this.editSession);
|
|
3182
|
+
this.renderer.editSession = this.editSession;
|
|
3183
|
+
}
|
|
3184
|
+
};
|
|
3185
|
+
TableCellRendererComponent.prototype.hasActiveEditor = function () {
|
|
3186
|
+
return this.editSession && this.column.hasEditor();
|
|
3187
|
+
};
|
|
3188
|
+
__decorate([
|
|
3189
|
+
core.Input(),
|
|
3190
|
+
__metadata("design:type", Object)
|
|
3191
|
+
], TableCellRendererComponent.prototype, "row", void 0);
|
|
3192
|
+
__decorate([
|
|
3193
|
+
core.Input(),
|
|
3194
|
+
__metadata("design:type", ColumnModel)
|
|
3195
|
+
], TableCellRendererComponent.prototype, "column", void 0);
|
|
3196
|
+
__decorate([
|
|
3197
|
+
core.Input(),
|
|
3198
|
+
__metadata("design:type", exports.TableModel.EditSession)
|
|
3199
|
+
], TableCellRendererComponent.prototype, "editSession", void 0);
|
|
3200
|
+
__decorate([
|
|
3201
|
+
core.Input(),
|
|
3202
|
+
__metadata("design:type", exports.TableModel)
|
|
3203
|
+
], TableCellRendererComponent.prototype, "tableModel", void 0);
|
|
3204
|
+
__decorate([
|
|
3205
|
+
core.HostBinding('class'),
|
|
3206
|
+
__metadata("design:type", Object)
|
|
3207
|
+
], TableCellRendererComponent.prototype, "defaultClassNames", void 0);
|
|
3208
|
+
TableCellRendererComponent = __decorate([
|
|
3209
|
+
core.Component({
|
|
3210
|
+
selector: 'aup-table-cell-renderer',
|
|
3211
|
+
template: "<ng-container *ngIf=\"!hasActiveEditor()\" [cdkPortalOutlet]=\"column.cellRendererPortal\" (attached)=\"initialiseRenderer($event.instance)\"></ng-container>\n<ng-container *ngIf=\"hasActiveEditor()\" [cdkPortalOutlet]=\"column.cellEditorPortal\" (attached)=\"initialiseEditor($event.instance)\"></ng-container>\n",
|
|
3212
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch}"]
|
|
3213
|
+
}),
|
|
3214
|
+
__metadata("design:paramtypes", [])
|
|
3215
|
+
], TableCellRendererComponent);
|
|
3216
|
+
return TableCellRendererComponent;
|
|
3217
|
+
}());
|
|
3218
|
+
|
|
3219
|
+
var TableHeaderCellRendererComponent = /** @class */ (function () {
|
|
3220
|
+
function TableHeaderCellRendererComponent() {
|
|
3221
|
+
this.defaultClassNames = "aup-header-cell-renderer";
|
|
3222
|
+
}
|
|
3223
|
+
TableHeaderCellRendererComponent.prototype.initialiseHeader = function (instance) {
|
|
3224
|
+
if (this.renderer !== instance) {
|
|
3225
|
+
this.renderer = instance;
|
|
3226
|
+
this.column.initialiseHeader(this.renderer);
|
|
3227
|
+
}
|
|
3228
|
+
};
|
|
3229
|
+
__decorate([
|
|
3230
|
+
core.Input(),
|
|
3231
|
+
__metadata("design:type", ColumnModel)
|
|
3232
|
+
], TableHeaderCellRendererComponent.prototype, "column", void 0);
|
|
3233
|
+
__decorate([
|
|
3234
|
+
core.HostBinding('class'),
|
|
3235
|
+
__metadata("design:type", Object)
|
|
3236
|
+
], TableHeaderCellRendererComponent.prototype, "defaultClassNames", void 0);
|
|
3237
|
+
TableHeaderCellRendererComponent = __decorate([
|
|
3238
|
+
core.Component({
|
|
3239
|
+
selector: 'aup-table-header-cell-renderer',
|
|
3240
|
+
template: "<ng-container [cdkPortalOutlet]=\"column.columnHeaderCellRendererPortal\" (attached)=\"initialiseHeader($event.instance)\"></ng-container>\n",
|
|
3241
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch}"]
|
|
3242
|
+
}),
|
|
3243
|
+
__metadata("design:paramtypes", [])
|
|
3244
|
+
], TableHeaderCellRendererComponent);
|
|
3245
|
+
return TableHeaderCellRendererComponent;
|
|
3246
|
+
}());
|
|
2373
3247
|
|
|
2374
|
-
var
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
_this.dialogService = dialogService;
|
|
2380
|
-
_this.dialogServiceDefaults = dialogServiceDefaults;
|
|
2381
|
-
_this.matDialogDefaultConfig = matDialogDefaultConfig;
|
|
2382
|
-
typescriptUtilities.assert.notNil(dialogService);
|
|
3248
|
+
var VerticalFocusContainerComponent = /** @class */ (function (_super) {
|
|
3249
|
+
__extends(VerticalFocusContainerComponent, _super);
|
|
3250
|
+
function VerticalFocusContainerComponent(focusManager) {
|
|
3251
|
+
var _this = _super.call(this, focusManager) || this;
|
|
3252
|
+
_this.focusManager = focusManager;
|
|
2383
3253
|
return _this;
|
|
2384
3254
|
}
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
3255
|
+
VerticalFocusContainerComponent.prototype.arrowLeft = function (event) {
|
|
3256
|
+
if (this.leftArrowCommand.enabled.value) {
|
|
3257
|
+
event.preventDefault();
|
|
3258
|
+
event.stopPropagation();
|
|
3259
|
+
this.leftArrowCommand.execute();
|
|
3260
|
+
}
|
|
2388
3261
|
};
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
3262
|
+
VerticalFocusContainerComponent.prototype.arrowRight = function (event) {
|
|
3263
|
+
if (this.rightArrowCommand.enabled.value) {
|
|
3264
|
+
event.preventDefault();
|
|
3265
|
+
event.stopPropagation();
|
|
3266
|
+
this.rightArrowCommand.execute();
|
|
3267
|
+
}
|
|
3268
|
+
};
|
|
3269
|
+
VerticalFocusContainerComponent.prototype.arrowDown = function (event) {
|
|
3270
|
+
event.preventDefault();
|
|
3271
|
+
event.stopPropagation();
|
|
3272
|
+
this.focusManager.focusNext();
|
|
3273
|
+
};
|
|
3274
|
+
VerticalFocusContainerComponent.prototype.arrowUp = function (event) {
|
|
3275
|
+
event.preventDefault();
|
|
3276
|
+
event.stopPropagation();
|
|
3277
|
+
this.focusManager.focusPrevious();
|
|
3278
|
+
};
|
|
3279
|
+
VerticalFocusContainerComponent.prototype.ngOnInit = function () {
|
|
3280
|
+
};
|
|
3281
|
+
VerticalFocusContainerComponent.ctorParameters = function () { return [
|
|
3282
|
+
{ type: pectin.FocusManager, decorators: [{ type: core.Self }] }
|
|
2393
3283
|
]; };
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
3284
|
+
__decorate([
|
|
3285
|
+
core.Input('command.arrowRight'),
|
|
3286
|
+
pectin.TrackExternal(),
|
|
3287
|
+
__metadata("design:type", pectin.Command)
|
|
3288
|
+
], VerticalFocusContainerComponent.prototype, "rightArrowCommand", void 0);
|
|
3289
|
+
__decorate([
|
|
3290
|
+
core.Input('command.arrowLeft'),
|
|
3291
|
+
pectin.TrackExternal(),
|
|
3292
|
+
__metadata("design:type", pectin.Command)
|
|
3293
|
+
], VerticalFocusContainerComponent.prototype, "leftArrowCommand", void 0);
|
|
3294
|
+
__decorate([
|
|
3295
|
+
core.HostListener('keyup.arrowLeft', ['$event']),
|
|
3296
|
+
__metadata("design:type", Function),
|
|
3297
|
+
__metadata("design:paramtypes", [KeyboardEvent]),
|
|
3298
|
+
__metadata("design:returntype", void 0)
|
|
3299
|
+
], VerticalFocusContainerComponent.prototype, "arrowLeft", null);
|
|
3300
|
+
__decorate([
|
|
3301
|
+
core.HostListener('keyup.arrowRight', ['$event']),
|
|
3302
|
+
__metadata("design:type", Function),
|
|
3303
|
+
__metadata("design:paramtypes", [KeyboardEvent]),
|
|
3304
|
+
__metadata("design:returntype", void 0)
|
|
3305
|
+
], VerticalFocusContainerComponent.prototype, "arrowRight", null);
|
|
3306
|
+
__decorate([
|
|
3307
|
+
core.HostListener('keyup.arrowDown', ['$event']),
|
|
3308
|
+
__metadata("design:type", Function),
|
|
3309
|
+
__metadata("design:paramtypes", [KeyboardEvent]),
|
|
3310
|
+
__metadata("design:returntype", void 0)
|
|
3311
|
+
], VerticalFocusContainerComponent.prototype, "arrowDown", null);
|
|
3312
|
+
__decorate([
|
|
3313
|
+
core.HostListener('keyup.arrowUp', ['$event']),
|
|
3314
|
+
__metadata("design:type", Function),
|
|
3315
|
+
__metadata("design:paramtypes", [KeyboardEvent]),
|
|
3316
|
+
__metadata("design:returntype", void 0)
|
|
3317
|
+
], VerticalFocusContainerComponent.prototype, "arrowUp", null);
|
|
3318
|
+
VerticalFocusContainerComponent = __decorate([
|
|
3319
|
+
core.Component({
|
|
3320
|
+
selector: 'aup-vertical-focus-container',
|
|
3321
|
+
template: "<ng-content></ng-content>\n",
|
|
3322
|
+
providers: [
|
|
3323
|
+
{ provide: pectin.FocusManager }
|
|
3324
|
+
],
|
|
3325
|
+
styles: [":host{display:block}"]
|
|
2398
3326
|
}),
|
|
2399
|
-
__param(
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
], DialogInteractionContextFactory);
|
|
2405
|
-
return DialogInteractionContextFactory;
|
|
2406
|
-
}(ModalInteractionContextFactory));
|
|
3327
|
+
__param(0, core.Self()),
|
|
3328
|
+
__metadata("design:paramtypes", [pectin.FocusManager])
|
|
3329
|
+
], VerticalFocusContainerComponent);
|
|
3330
|
+
return VerticalFocusContainerComponent;
|
|
3331
|
+
}(FocusContainerComponent));
|
|
2407
3332
|
|
|
2408
3333
|
/**
|
|
2409
3334
|
* @file Automatically generated by barrelsby.
|
|
2410
3335
|
*/
|
|
2411
3336
|
|
|
2412
|
-
var
|
|
2413
|
-
__extends(
|
|
2414
|
-
function
|
|
2415
|
-
var _this = _super.
|
|
2416
|
-
_this.
|
|
2417
|
-
_this.clickCommand = pectin.Command.create(function (context) {
|
|
2418
|
-
if (_this.activityClass) {
|
|
2419
|
-
_this.startActivity(_this.activityClass, _this.activityData).catch(function (e) {
|
|
2420
|
-
// don't care.
|
|
2421
|
-
});
|
|
2422
|
-
}
|
|
2423
|
-
else {
|
|
2424
|
-
_this.addCommand.withContext(context).execute();
|
|
2425
|
-
}
|
|
2426
|
-
});
|
|
3337
|
+
var ActivityActionsComponent = /** @class */ (function (_super) {
|
|
3338
|
+
__extends(ActivityActionsComponent, _super);
|
|
3339
|
+
function ActivityActionsComponent() {
|
|
3340
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
3341
|
+
_this.align = 'start';
|
|
2427
3342
|
return _this;
|
|
2428
3343
|
}
|
|
2429
|
-
Object.defineProperty(
|
|
3344
|
+
Object.defineProperty(ActivityActionsComponent.prototype, "alignEnd", {
|
|
2430
3345
|
get: function () {
|
|
2431
|
-
return this.
|
|
3346
|
+
return this.align === 'end';
|
|
2432
3347
|
},
|
|
2433
3348
|
enumerable: true,
|
|
2434
3349
|
configurable: true
|
|
2435
3350
|
});
|
|
2436
|
-
|
|
2437
|
-
return this.interactionContext.startActivity(activityType, data);
|
|
3351
|
+
ActivityActionsComponent.prototype.ngOnInit = function () {
|
|
2438
3352
|
};
|
|
2439
|
-
|
|
3353
|
+
ActivityActionsComponent.prototype.hasConfirmText = function () {
|
|
3354
|
+
return !___default__default.isEmpty(this.confirmText);
|
|
2440
3355
|
};
|
|
2441
3356
|
__decorate([
|
|
2442
3357
|
core.Input(),
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
core.Input(),
|
|
2447
|
-
__metadata("design:type", Object)
|
|
2448
|
-
], AddItemInteractionContextComponent.prototype, "activityClass", void 0);
|
|
3358
|
+
pectin.TrackExternal(),
|
|
3359
|
+
__metadata("design:type", pectin.Command)
|
|
3360
|
+
], ActivityActionsComponent.prototype, "confirmCommand", void 0);
|
|
2449
3361
|
__decorate([
|
|
2450
3362
|
core.Input(),
|
|
2451
|
-
__metadata("design:type",
|
|
2452
|
-
],
|
|
3363
|
+
__metadata("design:type", String)
|
|
3364
|
+
], ActivityActionsComponent.prototype, "confirmText", void 0);
|
|
2453
3365
|
__decorate([
|
|
2454
3366
|
core.Input(),
|
|
2455
3367
|
pectin.TrackExternal(),
|
|
2456
3368
|
__metadata("design:type", pectin.Command)
|
|
2457
|
-
],
|
|
3369
|
+
], ActivityActionsComponent.prototype, "cancelCommand", void 0);
|
|
2458
3370
|
__decorate([
|
|
2459
|
-
core.
|
|
2460
|
-
__metadata("design:type",
|
|
2461
|
-
],
|
|
3371
|
+
core.Input(),
|
|
3372
|
+
__metadata("design:type", String)
|
|
3373
|
+
], ActivityActionsComponent.prototype, "align", void 0);
|
|
2462
3374
|
__decorate([
|
|
2463
|
-
core.HostBinding('class.
|
|
3375
|
+
core.HostBinding('class.align-end'),
|
|
2464
3376
|
__metadata("design:type", Boolean),
|
|
2465
3377
|
__metadata("design:paramtypes", [])
|
|
2466
|
-
],
|
|
2467
|
-
__decorate([
|
|
2468
|
-
core.HostBinding('tabindex'),
|
|
2469
|
-
__metadata("design:type", Object)
|
|
2470
|
-
], AddItemInteractionContextComponent.prototype, "tabindex", void 0);
|
|
2471
|
-
AddItemInteractionContextComponent = __decorate([
|
|
3378
|
+
], ActivityActionsComponent.prototype, "alignEnd", null);
|
|
3379
|
+
ActivityActionsComponent = __decorate([
|
|
2472
3380
|
core.Component({
|
|
2473
|
-
selector: 'aup-
|
|
2474
|
-
template: "<
|
|
2475
|
-
styles: [":host{
|
|
2476
|
-
})
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
return AddItemInteractionContextComponent;
|
|
3381
|
+
selector: 'aup-activity-actions',
|
|
3382
|
+
template: "<button class=\"cancel\" mat-icon-button [pectinCommand]=\"cancelCommand\">\n <mat-icon>clear</mat-icon>\n</button>\n<button class=\"confirm\" *ngIf=\"!hasConfirmText()\" mat-icon-button [pectinCommand]=\"confirmCommand\">\n <mat-icon>done</mat-icon>\n</button>\n<button class=\"confirm\" *ngIf=\"hasConfirmText()\" mat-button [pectinCommand]=\"confirmCommand\">{{confirmText}}</button>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>\n",
|
|
3383
|
+
styles: [":host{display:-ms-grid;display:grid;grid-template-areas:\"cancel confirm content\";-ms-grid-columns:auto auto 1fr;grid-template-columns:auto auto 1fr;-ms-grid-rows:auto;grid-template-rows:auto;align-items:center;justify-content:end}:host.align-end{grid-template-areas:\"content cancel confirm\";-ms-grid-columns:1fr auto auto;grid-template-columns:1fr auto auto}.cancel{-ms-grid-row:1;-ms-grid-column:1;grid-area:cancel}:host.align-end>.cancel{-ms-grid-row:1;-ms-grid-column:2}.confirm{-ms-grid-row:1;-ms-grid-column:2;grid-area:confirm}:host.align-end>.confirm{-ms-grid-row:1;-ms-grid-column:3}.content{-ms-grid-row:1;-ms-grid-column:3;grid-area:content;text-align:left}:host.align-end>.content{-ms-grid-row:1;-ms-grid-column:1}"]
|
|
3384
|
+
})
|
|
3385
|
+
], ActivityActionsComponent);
|
|
3386
|
+
return ActivityActionsComponent;
|
|
2480
3387
|
}(DisposableComponent));
|
|
2481
3388
|
|
|
2482
3389
|
var InteractionModule = /** @class */ (function () {
|
|
@@ -2504,14 +3411,18 @@
|
|
|
2504
3411
|
ActivityOutletComponent,
|
|
2505
3412
|
InPlaceInteractionContextComponent,
|
|
2506
3413
|
AddItemInteractionContextComponent,
|
|
2507
|
-
ActivityActionsComponent
|
|
3414
|
+
ActivityActionsComponent,
|
|
3415
|
+
PopupInteractionContextComponent,
|
|
3416
|
+
InteractionContextTriggerFor
|
|
2508
3417
|
],
|
|
2509
3418
|
exports: [
|
|
2510
3419
|
ActivityContainerComponent,
|
|
2511
3420
|
ActivityOutletComponent,
|
|
2512
3421
|
InPlaceInteractionContextComponent,
|
|
2513
3422
|
AddItemInteractionContextComponent,
|
|
2514
|
-
ActivityActionsComponent
|
|
3423
|
+
ActivityActionsComponent,
|
|
3424
|
+
PopupInteractionContextComponent,
|
|
3425
|
+
InteractionContextTriggerFor
|
|
2515
3426
|
],
|
|
2516
3427
|
entryComponents: [
|
|
2517
3428
|
ActivityContainerComponent,
|
|
@@ -2520,13 +3431,94 @@
|
|
|
2520
3431
|
AlertDialogComponent
|
|
2521
3432
|
],
|
|
2522
3433
|
providers: [
|
|
2523
|
-
exports.ɵ
|
|
3434
|
+
exports.ɵbw
|
|
3435
|
+
// {
|
|
3436
|
+
// provide: MAT_TABS_CONFIG, useValue: { animationDuration: "2s" }
|
|
3437
|
+
// }
|
|
2524
3438
|
]
|
|
2525
3439
|
})
|
|
2526
3440
|
], InteractionModule);
|
|
2527
3441
|
return InteractionModule;
|
|
2528
3442
|
}());
|
|
2529
3443
|
|
|
3444
|
+
var ComponentsModule = /** @class */ (function () {
|
|
3445
|
+
function ComponentsModule() {
|
|
3446
|
+
}
|
|
3447
|
+
ComponentsModule = __decorate([
|
|
3448
|
+
core.NgModule({
|
|
3449
|
+
declarations: [
|
|
3450
|
+
AbstractInputComponent,
|
|
3451
|
+
AbstractInputActivity,
|
|
3452
|
+
NumberInputComponent,
|
|
3453
|
+
StringInputComponent,
|
|
3454
|
+
StringInputActivity,
|
|
3455
|
+
TextInputComponent,
|
|
3456
|
+
PasswordInputComponent,
|
|
3457
|
+
SelectInputComponent,
|
|
3458
|
+
CheckboxInputComponent,
|
|
3459
|
+
ScrollContainerComponent,
|
|
3460
|
+
NoopComponent,
|
|
3461
|
+
SwitchCaseComponent,
|
|
3462
|
+
SwitchCaseWhenDirective,
|
|
3463
|
+
SwitchCaseDefaultDirective,
|
|
3464
|
+
FocusContainerComponent,
|
|
3465
|
+
VerticalFocusContainerComponent,
|
|
3466
|
+
FocusableComponent,
|
|
3467
|
+
CardContainerComponent,
|
|
3468
|
+
TableComponent,
|
|
3469
|
+
EditRowControls,
|
|
3470
|
+
ColumnTemplateDirective,
|
|
3471
|
+
DefaultCellRendererComponent,
|
|
3472
|
+
TableCellRendererComponent,
|
|
3473
|
+
SelectCellRendererComponent,
|
|
3474
|
+
SelectHeaderCellRendererComponent,
|
|
3475
|
+
DefaultHeaderCellRendererComponent,
|
|
3476
|
+
TableHeaderCellRendererComponent
|
|
3477
|
+
],
|
|
3478
|
+
imports: [
|
|
3479
|
+
common.CommonModule,
|
|
3480
|
+
animations.BrowserAnimationsModule,
|
|
3481
|
+
forms.FormsModule,
|
|
3482
|
+
input.MatInputModule,
|
|
3483
|
+
formField.MatFormFieldModule,
|
|
3484
|
+
select.MatSelectModule,
|
|
3485
|
+
tabs.MatTabsModule,
|
|
3486
|
+
DirectivesModule,
|
|
3487
|
+
icon.MatIconModule,
|
|
3488
|
+
button.MatButtonModule,
|
|
3489
|
+
checkbox.MatCheckboxModule,
|
|
3490
|
+
InteractionModule,
|
|
3491
|
+
table.MatTableModule,
|
|
3492
|
+
portal.PortalModule
|
|
3493
|
+
],
|
|
3494
|
+
exports: [
|
|
3495
|
+
NumberInputComponent,
|
|
3496
|
+
StringInputComponent,
|
|
3497
|
+
TextInputComponent,
|
|
3498
|
+
PasswordInputComponent,
|
|
3499
|
+
CheckboxInputComponent,
|
|
3500
|
+
SelectInputComponent,
|
|
3501
|
+
ScrollContainerComponent,
|
|
3502
|
+
NoopComponent,
|
|
3503
|
+
SwitchCaseComponent,
|
|
3504
|
+
SwitchCaseWhenDirective,
|
|
3505
|
+
SwitchCaseDefaultDirective,
|
|
3506
|
+
FocusContainerComponent,
|
|
3507
|
+
VerticalFocusContainerComponent,
|
|
3508
|
+
FocusableComponent,
|
|
3509
|
+
CardContainerComponent,
|
|
3510
|
+
TableComponent,
|
|
3511
|
+
EditRowControls,
|
|
3512
|
+
ColumnTemplateDirective
|
|
3513
|
+
],
|
|
3514
|
+
providers: [
|
|
3515
|
+
FocusBindingFactory,
|
|
3516
|
+
]
|
|
3517
|
+
})
|
|
3518
|
+
], ComponentsModule);
|
|
3519
|
+
return ComponentsModule;
|
|
3520
|
+
}());
|
|
3521
|
+
|
|
2530
3522
|
exports.ParameterDefinition = /** @class */ (function () {
|
|
2531
3523
|
function ParameterDefinition(propertyName, options, urlFormat) {
|
|
2532
3524
|
this.propertyName = propertyName;
|
|
@@ -3639,7 +4631,7 @@
|
|
|
3639
4631
|
return PopStateNavigation;
|
|
3640
4632
|
}(AbstractPopStateNavigation));
|
|
3641
4633
|
|
|
3642
|
-
exports.ɵ
|
|
4634
|
+
exports.ɵco = /** @class */ (function () {
|
|
3643
4635
|
function PlaceHistory() {
|
|
3644
4636
|
this._archive = new Map();
|
|
3645
4637
|
this.placeHistoryDepth = 4;
|
|
@@ -3776,7 +4768,7 @@
|
|
|
3776
4768
|
// }
|
|
3777
4769
|
//
|
|
3778
4770
|
// }
|
|
3779
|
-
})(exports.ɵ
|
|
4771
|
+
})(exports.ɵco || (exports.ɵco = {}));
|
|
3780
4772
|
|
|
3781
4773
|
exports.UrlSnapshot = /** @class */ (function () {
|
|
3782
4774
|
// TODO: Update this accept a url Parser so it can be immutable and generate new trees on mutation using toString() are parseUrl.
|
|
@@ -4299,11 +5291,11 @@
|
|
|
4299
5291
|
PlaceRouter.ctorParameters = function () { return [
|
|
4300
5292
|
{ type: router.Router },
|
|
4301
5293
|
{ type: common.Location },
|
|
4302
|
-
{ type: exports.ɵ
|
|
5294
|
+
{ type: exports.ɵbw },
|
|
4303
5295
|
{ type: UrlService },
|
|
4304
|
-
{ type: exports.ɵ
|
|
5296
|
+
{ type: exports.ɵco }
|
|
4305
5297
|
]; };
|
|
4306
|
-
PlaceRouter.ɵprov = core.ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(core.ɵɵinject(router.Router), core.ɵɵinject(common.Location), core.ɵɵinject(exports.ɵ
|
|
5298
|
+
PlaceRouter.ɵprov = core.ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(core.ɵɵinject(router.Router), core.ɵɵinject(common.Location), core.ɵɵinject(exports.ɵbw), core.ɵɵinject(UrlService), core.ɵɵinject(exports.ɵco)); }, token: PlaceRouter, providedIn: "root" });
|
|
4307
5299
|
__decorate([
|
|
4308
5300
|
pectin.Trace(),
|
|
4309
5301
|
__metadata("design:type", Function),
|
|
@@ -4316,9 +5308,9 @@
|
|
|
4316
5308
|
}),
|
|
4317
5309
|
__metadata("design:paramtypes", [router.Router,
|
|
4318
5310
|
common.Location,
|
|
4319
|
-
exports.ɵ
|
|
5311
|
+
exports.ɵbw,
|
|
4320
5312
|
UrlService,
|
|
4321
|
-
exports.ɵ
|
|
5313
|
+
exports.ɵco])
|
|
4322
5314
|
], PlaceRouter);
|
|
4323
5315
|
return PlaceRouter;
|
|
4324
5316
|
}(pectin.GarbageCollector));
|
|
@@ -5297,6 +6289,7 @@
|
|
|
5297
6289
|
|
|
5298
6290
|
exports.ACTIVITY_DATA = ACTIVITY_DATA;
|
|
5299
6291
|
exports.AUP_PLACE_CONFIG = AUP_PLACE_CONFIG;
|
|
6292
|
+
exports.AbstractInputActivity = AbstractInputActivity;
|
|
5300
6293
|
exports.AbstractInputComponent = AbstractInputComponent;
|
|
5301
6294
|
exports.AbstractInteractionContext = AbstractInteractionContext;
|
|
5302
6295
|
exports.AbstractPlaceNavigationComponent = AbstractPlaceNavigationComponent;
|
|
@@ -5312,18 +6305,26 @@
|
|
|
5312
6305
|
exports.BusyOverlayComponent = BusyOverlayComponent;
|
|
5313
6306
|
exports.CardContainerComponent = CardContainerComponent;
|
|
5314
6307
|
exports.CheckboxInputComponent = CheckboxInputComponent;
|
|
6308
|
+
exports.ColumnModel = ColumnModel;
|
|
6309
|
+
exports.ColumnTemplateDirective = ColumnTemplateDirective;
|
|
5315
6310
|
exports.CommandDirective = CommandDirective;
|
|
5316
6311
|
exports.ComponentsModule = ComponentsModule;
|
|
5317
6312
|
exports.ConfirmThenDialogComponent = ConfirmThenDialogComponent;
|
|
5318
6313
|
exports.ConfirmationDialogComponent = ConfirmationDialogComponent;
|
|
5319
6314
|
exports.ConsolidatedParameterMap = ConsolidatedParameterMap;
|
|
6315
|
+
exports.CustomTemplateColumnModel = CustomTemplateColumnModel;
|
|
6316
|
+
exports.CustomValueColumnModel = CustomValueColumnModel;
|
|
5320
6317
|
exports.DEFINITION_META_DATA_KEY = DEFINITION_META_DATA_KEY;
|
|
5321
6318
|
exports.DIALOG_INTERACTION_SERVICE_DEFAULTS = DIALOG_INTERACTION_SERVICE_DEFAULTS;
|
|
6319
|
+
exports.DefaultCellRendererComponent = DefaultCellRendererComponent;
|
|
6320
|
+
exports.DefaultHeaderCellRendererComponent = DefaultHeaderCellRendererComponent;
|
|
5322
6321
|
exports.DialogInteractionContext = DialogInteractionContext;
|
|
5323
6322
|
exports.DialogInteractionContextFactory = DialogInteractionContextFactory;
|
|
5324
6323
|
exports.Dimension = Dimension;
|
|
5325
6324
|
exports.DirectivesModule = DirectivesModule;
|
|
5326
6325
|
exports.DisposableComponent = DisposableComponent;
|
|
6326
|
+
exports.EditRowControls = EditRowControls;
|
|
6327
|
+
exports.EditorControlColumnModel = EditorControlColumnModel;
|
|
5327
6328
|
exports.EmptyStateComponent = EmptyStateComponent;
|
|
5328
6329
|
exports.EventCleanUpSession = EventCleanUpSession;
|
|
5329
6330
|
exports.FocusBinding = FocusBinding;
|
|
@@ -5332,8 +6333,9 @@
|
|
|
5332
6333
|
exports.FocusContainerComponent = FocusContainerComponent;
|
|
5333
6334
|
exports.FocusableComponent = FocusableComponent;
|
|
5334
6335
|
exports.InPlaceInteractionContextComponent = InPlaceInteractionContextComponent;
|
|
6336
|
+
exports.InteractionContextTriggerFor = InteractionContextTriggerFor;
|
|
5335
6337
|
exports.InteractionModule = InteractionModule;
|
|
5336
|
-
exports.InteractionService = exports.ɵ
|
|
6338
|
+
exports.InteractionService = exports.ɵbw;
|
|
5337
6339
|
exports.InteractionServiceRoutingAdapter = InteractionServiceRoutingAdapter;
|
|
5338
6340
|
exports.LEFT_RIGHT_PLACE_ANIMATION = LEFT_RIGHT_PLACE_ANIMATION;
|
|
5339
6341
|
exports.ListPlaceNavComponent = ListPlaceNavComponent;
|
|
@@ -5349,20 +6351,26 @@
|
|
|
5349
6351
|
exports.PlaceComponentDeactivationHandler = PlaceComponentDeactivationHandler;
|
|
5350
6352
|
exports.PlaceDefinition = PlaceDefinition;
|
|
5351
6353
|
exports.PlaceGuard = PlaceGuard;
|
|
5352
|
-
exports.PlaceHistory = exports.ɵ
|
|
6354
|
+
exports.PlaceHistory = exports.ɵco;
|
|
5353
6355
|
exports.PlaceModule = PlaceModule;
|
|
5354
6356
|
exports.PlaceOutletComponent = PlaceOutletComponent;
|
|
5355
6357
|
exports.PlaceRouter = PlaceRouter;
|
|
5356
6358
|
exports.Point = Point;
|
|
5357
6359
|
exports.PopStateDuringInteractionNavigation = PopStateDuringInteractionNavigation;
|
|
5358
6360
|
exports.PopStateNavigation = PopStateNavigation;
|
|
6361
|
+
exports.PopupInteractionContextComponent = PopupInteractionContextComponent;
|
|
6362
|
+
exports.PropertyColumnModel = PropertyColumnModel;
|
|
5359
6363
|
exports.ROUTE_PARAMETER_LIST_KEY = ROUTE_PARAMETER_LIST_KEY;
|
|
5360
6364
|
exports.RemoveLastInteractionFromUrlNavigationSession = RemoveLastInteractionFromUrlNavigationSession;
|
|
5361
6365
|
exports.ResizeAwareComponent = ResizeAwareComponent;
|
|
5362
6366
|
exports.RouteId = RouteId;
|
|
5363
6367
|
exports.ScrollContainerComponent = ScrollContainerComponent;
|
|
6368
|
+
exports.SelectCellRendererComponent = SelectCellRendererComponent;
|
|
6369
|
+
exports.SelectHeaderCellRendererComponent = SelectHeaderCellRendererComponent;
|
|
5364
6370
|
exports.SelectInputComponent = SelectInputComponent;
|
|
6371
|
+
exports.SelectionColumnModel = SelectionColumnModel;
|
|
5365
6372
|
exports.SidePlaceNavigationComponent = SidePlaceNavigationComponent;
|
|
6373
|
+
exports.StringInputActivity = StringInputActivity;
|
|
5366
6374
|
exports.StringInputComponent = StringInputComponent;
|
|
5367
6375
|
exports.SwitchCaseComponent = SwitchCaseComponent;
|
|
5368
6376
|
exports.SwitchCaseDefaultDirective = SwitchCaseDefaultDirective;
|
|
@@ -5370,6 +6378,9 @@
|
|
|
5370
6378
|
exports.SwitchCaseWhenDirective = SwitchCaseWhenDirective;
|
|
5371
6379
|
exports.SynchroniseInteractionContextIdsWithRoute = SynchroniseInteractionContextIdsWithRoute;
|
|
5372
6380
|
exports.TabbedPlaceNavigationComponent = TabbedPlaceNavigationComponent;
|
|
6381
|
+
exports.TableCellRendererComponent = TableCellRendererComponent;
|
|
6382
|
+
exports.TableComponent = TableComponent;
|
|
6383
|
+
exports.TableHeaderCellRendererComponent = TableHeaderCellRendererComponent;
|
|
5373
6384
|
exports.TextInputComponent = TextInputComponent;
|
|
5374
6385
|
exports.UrlService = UrlService;
|
|
5375
6386
|
exports.VerticalFocusContainerComponent = VerticalFocusContainerComponent;
|
|
@@ -5385,55 +6396,70 @@
|
|
|
5385
6396
|
exports.slideRightOnEnterAnimation = slideRightOnEnterAnimation;
|
|
5386
6397
|
exports.ɵa = DirectivesModule;
|
|
5387
6398
|
exports.ɵb = CommandDirective;
|
|
5388
|
-
exports.ɵba =
|
|
5389
|
-
exports.ɵbb =
|
|
5390
|
-
exports.ɵbc =
|
|
5391
|
-
exports.ɵbd =
|
|
5392
|
-
exports.ɵ
|
|
5393
|
-
exports.ɵ
|
|
5394
|
-
exports.ɵ
|
|
5395
|
-
exports.ɵ
|
|
5396
|
-
exports.ɵ
|
|
5397
|
-
exports.ɵ
|
|
5398
|
-
exports.ɵ
|
|
5399
|
-
exports.ɵ
|
|
5400
|
-
exports.ɵ
|
|
5401
|
-
exports.ɵ
|
|
5402
|
-
exports.ɵ
|
|
5403
|
-
exports.ɵ
|
|
5404
|
-
exports.ɵ
|
|
5405
|
-
exports.ɵ
|
|
5406
|
-
exports.ɵ
|
|
5407
|
-
exports.ɵ
|
|
5408
|
-
exports.ɵ
|
|
6399
|
+
exports.ɵba = CardContainerComponent;
|
|
6400
|
+
exports.ɵbb = TableComponent;
|
|
6401
|
+
exports.ɵbc = EditRowControls;
|
|
6402
|
+
exports.ɵbd = ColumnTemplateDirective;
|
|
6403
|
+
exports.ɵbe = DefaultCellRendererComponent;
|
|
6404
|
+
exports.ɵbf = TableCellRendererComponent;
|
|
6405
|
+
exports.ɵbg = SelectCellRendererComponent;
|
|
6406
|
+
exports.ɵbh = SelectHeaderCellRendererComponent;
|
|
6407
|
+
exports.ɵbi = DefaultHeaderCellRendererComponent;
|
|
6408
|
+
exports.ɵbj = TableHeaderCellRendererComponent;
|
|
6409
|
+
exports.ɵbk = InteractionModule;
|
|
6410
|
+
exports.ɵbl = ActivityContainerComponent;
|
|
6411
|
+
exports.ɵbm = AbstractInteractionContext;
|
|
6412
|
+
exports.ɵbn = ActivityOutletComponent;
|
|
6413
|
+
exports.ɵbo = ConfirmationDialogComponent;
|
|
6414
|
+
exports.ɵbp = ACTIVITY_DATA;
|
|
6415
|
+
exports.ɵbq = Activity;
|
|
6416
|
+
exports.ɵbs = ConfirmThenDialogComponent;
|
|
6417
|
+
exports.ɵbt = AlertDialogComponent;
|
|
6418
|
+
exports.ɵbv = InPlaceInteractionContextComponent;
|
|
6419
|
+
exports.ɵbx = ModalInteractionContextFactory;
|
|
6420
|
+
exports.ɵby = AddItemInteractionContextComponent;
|
|
6421
|
+
exports.ɵbz = DisposableComponent;
|
|
5409
6422
|
exports.ɵc = FocusBindingDirective;
|
|
5410
|
-
exports.ɵca =
|
|
5411
|
-
exports.ɵcb =
|
|
5412
|
-
exports.ɵcc =
|
|
5413
|
-
exports.ɵcd =
|
|
6423
|
+
exports.ɵca = InPlaceInteractionContextComponent;
|
|
6424
|
+
exports.ɵcb = ActivityActionsComponent;
|
|
6425
|
+
exports.ɵcc = PopupInteractionContextComponent;
|
|
6426
|
+
exports.ɵcd = InteractionContextTriggerFor;
|
|
6427
|
+
exports.ɵce = PlaceModule;
|
|
6428
|
+
exports.ɵcf = EmptyStateComponent;
|
|
6429
|
+
exports.ɵcg = BusyOverlayComponent;
|
|
6430
|
+
exports.ɵch = PlaceOutletComponent;
|
|
6431
|
+
exports.ɵci = leftRightPlaceAnimation;
|
|
6432
|
+
exports.ɵcj = LEFT_RIGHT_PLACE_ANIMATION;
|
|
6433
|
+
exports.ɵck = AUP_PLACE_CONFIG;
|
|
6434
|
+
exports.ɵcm = PlaceRouter;
|
|
6435
|
+
exports.ɵcn = UrlService;
|
|
6436
|
+
exports.ɵcp = TabbedPlaceNavigationComponent;
|
|
6437
|
+
exports.ɵcq = AbstractPlaceNavigationComponent;
|
|
6438
|
+
exports.ɵcr = ListPlaceNavComponent;
|
|
6439
|
+
exports.ɵcs = SidePlaceNavigationComponent;
|
|
5414
6440
|
exports.ɵd = DisposableComponent;
|
|
5415
6441
|
exports.ɵe = FocusBindingFactory;
|
|
5416
6442
|
exports.ɵf = ComponentsModule;
|
|
5417
|
-
exports.ɵg =
|
|
5418
|
-
exports.ɵh =
|
|
5419
|
-
exports.ɵi =
|
|
5420
|
-
exports.ɵj =
|
|
5421
|
-
exports.ɵk =
|
|
5422
|
-
exports.ɵl =
|
|
5423
|
-
exports.ɵm =
|
|
5424
|
-
exports.ɵn =
|
|
5425
|
-
exports.ɵo =
|
|
5426
|
-
exports.ɵp =
|
|
5427
|
-
exports.ɵq =
|
|
5428
|
-
exports.ɵr =
|
|
5429
|
-
exports.ɵs =
|
|
5430
|
-
exports.ɵt =
|
|
5431
|
-
exports.ɵu =
|
|
5432
|
-
exports.ɵv =
|
|
5433
|
-
exports.ɵw =
|
|
5434
|
-
exports.ɵx =
|
|
5435
|
-
exports.ɵy =
|
|
5436
|
-
exports.ɵz =
|
|
6443
|
+
exports.ɵg = AbstractInputComponent;
|
|
6444
|
+
exports.ɵh = AbstractInputActivity;
|
|
6445
|
+
exports.ɵi = Activity;
|
|
6446
|
+
exports.ɵj = ACTIVITY_DATA;
|
|
6447
|
+
exports.ɵk = NumberInputComponent;
|
|
6448
|
+
exports.ɵl = StringInputComponent;
|
|
6449
|
+
exports.ɵm = StringInputActivity;
|
|
6450
|
+
exports.ɵn = TextInputComponent;
|
|
6451
|
+
exports.ɵo = PasswordInputComponent;
|
|
6452
|
+
exports.ɵp = SelectInputComponent;
|
|
6453
|
+
exports.ɵq = CheckboxInputComponent;
|
|
6454
|
+
exports.ɵr = ScrollContainerComponent;
|
|
6455
|
+
exports.ɵs = NoopComponent;
|
|
6456
|
+
exports.ɵt = SwitchCaseOption;
|
|
6457
|
+
exports.ɵu = SwitchCaseWhenDirective;
|
|
6458
|
+
exports.ɵv = SwitchCaseDefaultDirective;
|
|
6459
|
+
exports.ɵw = SwitchCaseComponent;
|
|
6460
|
+
exports.ɵx = FocusContainerComponent;
|
|
6461
|
+
exports.ɵy = VerticalFocusContainerComponent;
|
|
6462
|
+
exports.ɵz = FocusableComponent;
|
|
5437
6463
|
|
|
5438
6464
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5439
6465
|
|