From 718b014d9e554167a1df802b9f30080f08a1e5ac Mon Sep 17 00:00:00 2001
From: Axel Peter
Date: Fri, 27 Jul 2018 13:58:49 +0200
Subject: [PATCH 1/3] fix(oui-button): add transclude support
---
packages/oui-button/README.md | 18 +++++++++---------
packages/oui-button/src/button.component.js | 3 ++-
packages/oui-button/src/button.html | 2 +-
3 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/packages/oui-button/README.md b/packages/oui-button/README.md
index db996bc8..5349de49 100644
--- a/packages/oui-button/README.md
+++ b/packages/oui-button/README.md
@@ -7,37 +7,37 @@
### Default
```html:preview
-
+Default button
```
### Action buttons
```html:preview
-
+
-
+
```
### Steps buttons
```html:preview
-
+
-
+
```
### Accessibility
diff --git a/packages/oui-button/src/button.component.js b/packages/oui-button/src/button.component.js
index e2de9edd..8c75fc2b 100644
--- a/packages/oui-button/src/button.component.js
+++ b/packages/oui-button/src/button.component.js
@@ -16,5 +16,6 @@ export default {
onClick: "&?"
},
controller,
- template
+ template,
+ transclude: true
};
diff --git a/packages/oui-button/src/button.html b/packages/oui-button/src/button.html
index 4d002518..1106a01d 100644
--- a/packages/oui-button/src/button.html
+++ b/packages/oui-button/src/button.html
@@ -16,7 +16,7 @@
>
-
+ {{::$ctrl.text}}
From 59f8e197fd17b339f3850694a2af3f853ee58915 Mon Sep 17 00:00:00 2001
From: Axel Peter
Date: Fri, 27 Jul 2018 14:14:58 +0200
Subject: [PATCH 2/3] fix(oui-back-button): add transclude support
---
packages/oui-back-button/README.md | 21 ++++++++++---------
.../src/back-button.component.js | 3 ++-
packages/oui-back-button/src/back-button.html | 2 +-
3 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/packages/oui-back-button/README.md b/packages/oui-back-button/README.md
index 421fc705..a6012b08 100644
--- a/packages/oui-back-button/README.md
+++ b/packages/oui-back-button/README.md
@@ -7,8 +7,7 @@
### Default
```html:preview
-
-
+Title
```
### Aria label
@@ -27,11 +26,13 @@
## API
-| Attribute | Type | Binding | One-time binding | Values | Default | Description |
-| ---- | ---- | ---- | ---- | ---- | ---- | ---- |
-| id | string | @? | true | | | id attribute of the input |
-| name | string | @? | true | | | name attribute of the input |
-| aria-label | string | @? | true | | | accessibility label |
-| heading | string | @? | true | | | text of the header |
-| on-click | function | &? | | | | callback on component click |
-| href | string | @? | true | | | link url |
+| Attribute | Type | Binding | One-time binding | Values | Default | Description
+| ---- | ---- | ---- | ---- | ---- | ---- | ----
+| `id` | string | @? | true | | | id attribute of the input
+| `name` | string | @? | true | | | name attribute of the input
+| `aria-label` | string | @? | true | | | accessibility label
+| `heading` | string | @? | true | | | text of the header
+| `on-click` | function | &? | | | | callback on component click
+| `href` | string | @? | true | | | url of the return link
+| `state` | string | @? | yes | | | state of the return link
+| `stateParams` | object | | | | | state params of the return link
diff --git a/packages/oui-back-button/src/back-button.component.js b/packages/oui-back-button/src/back-button.component.js
index 6f1f9626..6e5374ae 100644
--- a/packages/oui-back-button/src/back-button.component.js
+++ b/packages/oui-back-button/src/back-button.component.js
@@ -12,5 +12,6 @@ export default {
title: "@?", // Deprecated: Replaced by 'heading'
onClick: "&?",
href: "@?"
- }
+ },
+ transclude: true
};
diff --git a/packages/oui-back-button/src/back-button.html b/packages/oui-back-button/src/back-button.html
index 7281db31..3d45977c 100644
--- a/packages/oui-back-button/src/back-button.html
+++ b/packages/oui-back-button/src/back-button.html
@@ -12,4 +12,4 @@
ng-href="{{:: $ctrl.href }}">
-
+
From 6e188ca5633c9467be761adf41c31f417a413d13 Mon Sep 17 00:00:00 2001
From: Axel Peter
Date: Fri, 27 Jul 2018 16:04:28 +0200
Subject: [PATCH 3/3] fix(oui-back-button): add ui-router support
---
packages/oui-back-button/src/back-button.component.js | 4 +++-
packages/oui-back-button/src/back-button.controller.js | 5 +++++
packages/oui-back-button/src/back-button.html | 9 ++++++++-
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/packages/oui-back-button/src/back-button.component.js b/packages/oui-back-button/src/back-button.component.js
index 6e5374ae..aff90480 100644
--- a/packages/oui-back-button/src/back-button.component.js
+++ b/packages/oui-back-button/src/back-button.component.js
@@ -11,7 +11,9 @@ export default {
heading: "@?",
title: "@?", // Deprecated: Replaced by 'heading'
onClick: "&?",
- href: "@?"
+ href: "@?",
+ state: "@?",
+ stateParams: ""
},
transclude: true
};
diff --git a/packages/oui-back-button/src/back-button.controller.js b/packages/oui-back-button/src/back-button.controller.js
index 5632fb2c..63fdf246 100644
--- a/packages/oui-back-button/src/back-button.controller.js
+++ b/packages/oui-back-button/src/back-button.controller.js
@@ -37,4 +37,9 @@ export default class {
}
}
+ // Return value of "ui-sref"
+ getFullSref () {
+ return `${this.state}(${JSON.stringify(this.stateParams)})`;
+ }
+
}
diff --git a/packages/oui-back-button/src/back-button.html b/packages/oui-back-button/src/back-button.html
index 3d45977c..aabc6d51 100644
--- a/packages/oui-back-button/src/back-button.html
+++ b/packages/oui-back-button/src/back-button.html
@@ -1,4 +1,4 @@
-