@coolon/angular-ui-powerups 12.4.0-alpha.36 → 12.4.0-alpha.38

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.
@@ -1,65 +1,86 @@
1
1
  @use "../../forms/mixins";
2
- @use "~@angular/material/core/typography/typography-utils";
2
+ @use "~@angular/material/theming";
3
3
 
4
4
  @mixin apply-theme($color-config, $typography-config) {
5
5
 
6
6
  aup-inline-string-editor {
7
- display: inline-block;
8
-
9
- .content {
10
- position: relative;
11
- display: grid;
12
- grid-template-areas: "label edit-control" "content edit-control";
13
- grid-template-columns: 1fr auto;
14
- grid-template-rows: auto;
15
-
16
- font-size: typography-utils.font-size($typography-config, input);
17
-
18
- //box-sizing: border-box;
19
- // copied from mat input...
20
- border-top: 0.84375em solid transparent;
21
- padding-bottom: 1.34375em;
22
-
23
- $top-padding-tweak: 1px;
24
- padding-top: $top-padding-tweak;
25
-
26
- > label {
27
- position: absolute;
28
- transform: translateY(-100%);
29
- @include mixins.floating-label-style();
30
- }
31
-
32
- > p {
33
- grid-area: content;
34
- @include typography-utils.typography-level($typography-config, input);
35
-
36
- // copied from mat input...
37
- padding: 0.5em 0;
38
- margin: -0.0625em 0 0 0;
39
-
40
- box-sizing: border-box;
41
- flex: 1;
42
-
43
- &.editing-enabled {
44
- cursor: pointer;
7
+ display: block;
8
+
9
+ .container {
10
+ mat-form-field {
11
+ &:not(.empty) {
12
+ input {
13
+ color: currentColor;
14
+ //color: theming.mat-color($color-config, text);
15
+ }
45
16
  }
46
-
47
- &.place-holder {
48
- color: rgba(0,0,0,0.5); // TODO: get the angular theme value for disabled form elements...
17
+ &.editable {
18
+ .mat-form-field-flex, input {
19
+ cursor: pointer;
20
+ }
21
+ }
22
+ .mat-form-field-infix {
23
+ width: auto;
24
+ }
25
+ .mat-form-field-underline {
26
+ //opacity: 0; // hide the underline...
49
27
  }
50
-
51
- }
52
-
53
- &:hover {
54
- //background-color: rgba(0, 0, 0, 0.03);
55
- }
56
-
57
- > aup-command {
58
- grid-area: edit-control;
59
- align-self: end;
60
- transform: translateY(3px); // hack to line up with activity actions...!
61
28
  }
62
29
  }
30
+ //.content {
31
+ // position: relative;
32
+ // display: grid;
33
+ // grid-template-areas: "label edit-control" "content edit-control";
34
+ // grid-template-columns: 1fr auto;
35
+ // grid-template-rows: auto;
36
+ //
37
+ // font-size: typography-utils.font-size($typography-config, input);
38
+ //
39
+ // //box-sizing: border-box;
40
+ // // copied from mat input...
41
+ // border-top: 0.84375em solid transparent;
42
+ // padding-bottom: 1.34375em;
43
+ //
44
+ // $top-padding-tweak: 1px;
45
+ // padding-top: $top-padding-tweak;
46
+ //
47
+ // > label {
48
+ // position: absolute;
49
+ // transform: translateY(-100%);
50
+ // @include mixins.floating-label-style();
51
+ // }
52
+ //
53
+ // > p {
54
+ // grid-area: content;
55
+ // @include typography-utils.typography-level($typography-config, input);
56
+ //
57
+ // // copied from mat input...
58
+ // padding: 0.5em 0;
59
+ // margin: -0.0625em 0 0 0;
60
+ //
61
+ // box-sizing: border-box;
62
+ // flex: 1;
63
+ //
64
+ // &.editing-enabled {
65
+ // cursor: pointer;
66
+ // }
67
+ //
68
+ // &.place-holder {
69
+ // color: rgba(0,0,0,0.5); // TODO: get the angular theme value for disabled form elements...
70
+ // }
71
+ //
72
+ // }
73
+ //
74
+ // &:hover {
75
+ // //background-color: rgba(0, 0, 0, 0.03);
76
+ // }
77
+ //
78
+ // > aup-command {
79
+ // grid-area: edit-control;
80
+ // align-self: end;
81
+ // transform: translateY(3px); // hack to line up with activity actions...!
82
+ // }
83
+ //}
63
84
  }
64
85
  }
65
86
 
@@ -12,18 +12,7 @@
12
12
  @use "./icons";
13
13
  @use "./empty-state";
14
14
 
15
- @mixin apply-light-theme($primary, $accent, $warn:ng.mat-palette(ng.$mat-red), $typography: ng.mat-typography-config()) {
16
-
17
- $theme: ng.mat-light-theme((
18
- color: (
19
- primary: $primary,
20
- accent: $accent,
21
- warn: $warn,
22
- )
23
- ));
24
-
25
- @include ng.mat-core($typography);
26
- @include ng.angular-material-theme($theme);
15
+ @mixin apply-light-theme($theme, $typography) {
27
16
 
28
17
  $color-config: ng.mat-get-color-config($theme);
29
18
 
@@ -6923,7 +6923,7 @@
6923
6923
  exports.InlineStringEditorComponent.decorators = [
6924
6924
  { type: i0.Component, args: [{
6925
6925
  selector: 'aup-inline-string-editor',
6926
- template: "<ng-container *ngIf=\"!editorModel.isEditing()\">\n <div class=\"content\" [class.editable]=\"editCommand.enabled.value\">\n <label>{{label}}</label>\n <p [class.place-holder]=\"empty.value\" [class.editing-enabled]=\"editingEnabled.value\" (click)=\"startEdit()\">{{displayValue.value}}</p>\n <aup-command *ngIf=\"editCommand.enabled.value\" [command]=\"editCommand\" [faceModel]=\"editFaceModel\"></aup-command>\n </div>\n</ng-container>\n<aup-in-place-interaction-context [animateFirstActivity]=\"false\"></aup-in-place-interaction-context>\n"
6926
+ template: "<div class=\"container\" *ngIf=\"!editorModel.isEditing()\">\n <mat-form-field appearance=\"standard\" floatLabel=\"always\" (click)=\"startEdit()\"\n [class.editable]=\"editingEnabled.value\" [class.empty]=\"isEmpty()\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeHolder}}\"\n [ngModel]=\"editorModel.valueModel.value\"\n [disabled]=\"true\"\n >\n <!-- <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>-->\n <!-- <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>-->\n <!-- <aup-icon *ngIf=\"iconPrefix\" matPrefix [icon]=\"iconPrefix\"></aup-icon>-->\n </mat-form-field>\n <aup-command *ngIf=\"editCommand.enabled.value\" [command]=\"editCommand\" [faceModel]=\"editFaceModel\"></aup-command>\n</div>\n<aup-in-place-interaction-context [animateFirstActivity]=\"false\"></aup-in-place-interaction-context>\n"
6927
6927
  },] }
6928
6928
  ];
6929
6929
  exports.InlineStringEditorComponent.ctorParameters = function () { return [
@@ -6990,7 +6990,10 @@
6990
6990
  DirectivesModule,
6991
6991
  flexLayout.FlexModule,
6992
6992
  flexLayout.GridModule,
6993
- ComponentsModule
6993
+ ComponentsModule,
6994
+ forms.FormsModule,
6995
+ input.MatInputModule,
6996
+ formField.MatFormFieldModule,
6994
6997
  ],
6995
6998
  declarations: [
6996
6999
  ActivityContainerComponent,
@@ -8581,7 +8584,7 @@
8581
8584
  };
8582
8585
  Object.defineProperty(ConsolidatedParameterMap.prototype, "keys", {
8583
8586
  get: function () {
8584
- return this.paramMaps.reduce(function (result, params) { return result.concat(params.keys); }, []);
8587
+ return ___namespace.uniq(this.paramMaps.reduce(function (result, params) { return result.concat(params.keys); }, []));
8585
8588
  },
8586
8589
  enumerable: false,
8587
8590
  configurable: true
@@ -10050,13 +10053,13 @@
10050
10053
  }
10051
10054
  _a.label = 2;
10052
10055
  case 2: return [4 /*yield*/, this.cleanInteractionState(activatedRoute, state, function () { return __awaiter(_this, void 0, void 0, function () {
10053
- var params, parsedParams, navigationSession, initialVisit, sanitiser, sanitisedVisit, urlSnapshot;
10056
+ var navigationSession, params, parsedParams, initialVisit, sanitiser, sanitisedVisit, urlSnapshot;
10054
10057
  return __generator(this, function (_a) {
10055
10058
  switch (_a.label) {
10056
10059
  case 0:
10060
+ navigationSession = this.placeRouter.navigationSession;
10057
10061
  params = new ConsolidatedParameterMap(activatedRoute.url, activatedRoute.paramMap);
10058
10062
  parsedParams = placeDefinition_1.parseRouteParams(params);
10059
- navigationSession = this.placeRouter.navigationSession;
10060
10063
  initialVisit = navigationSession.getVisitFor(placeDefinition_1) || new Visit(placeDefinition_1, parsedParams);
10061
10064
  sanitiser = new VisitSanitiser(navigationSession, activatedRoute, this.router, this.placeHistory, this.injector);
10062
10065
  return [4 /*yield*/, sanitiser.sanitise(initialVisit.mergeRouteParameters(parsedParams))];