@telia-ace/widget-types-grid 1.0.2 → 1.0.6

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/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
- Copyright © 2021, Telia Company AB. All rights reserved.
2
-
3
- THIS PACKAGE AND CONTAINING SOFTWARE IS PART OF
4
- THE HUMANY SERVICE. BY USING THIS SOFTWARE YOU
5
- AGREE TO THE FOLLOWING TERMS AND CONDITIONS:
1
+ Copyright © 2021, Telia Company AB. All rights reserved.
2
+
3
+ THIS PACKAGE AND CONTAINING SOFTWARE IS PART OF
4
+ THE HUMANY SERVICE. BY USING THIS SOFTWARE YOU
5
+ AGREE TO THE FOLLOWING TERMS AND CONDITIONS:
6
6
  http://www.humany.com/legal
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # `@telia-ace/widget-types-grid`
2
-
3
- The type definition for ACE One Widget (exported as `GridWidget`).
1
+ # `@telia-ace/widget-types-grid`
2
+
3
+ The type definition for ACE One Widget (exported as `GridWidget`).
@@ -9,6 +9,9 @@ declare type Props = {
9
9
  node?: ComponentNode;
10
10
  ariaLabel?: string;
11
11
  tabIndex?: number;
12
+ context?: {
13
+ [key: string]: any;
14
+ };
12
15
  };
13
16
  declare const Component: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLElement>>;
14
17
  export declare const styling: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<{
@@ -88,7 +88,7 @@ var isVisible = function (size, node) {
88
88
  };
89
89
  var Component = (0, react_1.forwardRef)(function (_a, ref) {
90
90
  var _b;
91
- var _c = _a.className, className = _c === void 0 ? '' : _c, _d = _a.isTabbing, isTabbing = _d === void 0 ? false : _d, id = _a.id, branch = _a.branch, node = _a.node, ariaLabel = _a.ariaLabel, tabIndex = _a.tabIndex, other = __rest(_a, ["className", "isTabbing", "id", "branch", "node", "ariaLabel", "tabIndex"]);
91
+ var _c = _a.className, className = _c === void 0 ? '' : _c, _d = _a.isTabbing, isTabbing = _d === void 0 ? false : _d, id = _a.id, branch = _a.branch, node = _a.node, ariaLabel = _a.ariaLabel, tabIndex = _a.tabIndex, extraContext = _a.context, other = __rest(_a, ["className", "isTabbing", "id", "branch", "node", "ariaLabel", "tabIndex", "context"]);
92
92
  var components = (0, widget_ui_1.useComponentPlatform)();
93
93
  var container = (0, widget_ui_1.useContainer)();
94
94
  var _e = __read((0, react_1.useState)(), 2), descriptor = _e[0], setDescriptor = _e[1];
@@ -124,7 +124,8 @@ var Component = (0, react_1.forwardRef)(function (_a, ref) {
124
124
  if (!descriptor || !visible) {
125
125
  return null;
126
126
  }
127
- var cardinal = context.cardinal, _j = context.fonts, contextFonts = _j === void 0 ? {} : _j, _k = context.accessibility, accessibility = _k === void 0 ? {} : _k, restContext = __rest(context, ["cardinal", "fonts", "accessibility"]);
127
+ var mergedContexts = __assign(__assign({}, context), (extraContext || {}));
128
+ var cardinal = mergedContexts.cardinal, _j = mergedContexts.fonts, contextFonts = _j === void 0 ? {} : _j, _k = mergedContexts.accessibility, accessibility = _k === void 0 ? {} : _k, restContext = __rest(mergedContexts, ["cardinal", "fonts", "accessibility"]);
128
129
  var fonts = {
129
130
  type: contextFonts.type,
130
131
  base: contextFonts.base || '16px',
@@ -9,6 +9,9 @@ declare type Props = {
9
9
  node?: ComponentNode;
10
10
  ariaLabel?: string;
11
11
  tabIndex?: number;
12
+ context?: {
13
+ [key: string]: any;
14
+ };
12
15
  };
13
16
  declare const Component: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLElement>>;
14
17
  export declare const styling: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<{
@@ -59,7 +59,7 @@ var isVisible = function (size, node) {
59
59
  };
60
60
  var Component = forwardRef(function (_a, ref) {
61
61
  var _b;
62
- var _c = _a.className, className = _c === void 0 ? '' : _c, _d = _a.isTabbing, isTabbing = _d === void 0 ? false : _d, id = _a.id, branch = _a.branch, node = _a.node, ariaLabel = _a.ariaLabel, tabIndex = _a.tabIndex, other = __rest(_a, ["className", "isTabbing", "id", "branch", "node", "ariaLabel", "tabIndex"]);
62
+ var _c = _a.className, className = _c === void 0 ? '' : _c, _d = _a.isTabbing, isTabbing = _d === void 0 ? false : _d, id = _a.id, branch = _a.branch, node = _a.node, ariaLabel = _a.ariaLabel, tabIndex = _a.tabIndex, extraContext = _a.context, other = __rest(_a, ["className", "isTabbing", "id", "branch", "node", "ariaLabel", "tabIndex", "context"]);
63
63
  var components = useComponentPlatform();
64
64
  var container = useContainer();
65
65
  var _e = __read(useState(), 2), descriptor = _e[0], setDescriptor = _e[1];
@@ -95,7 +95,8 @@ var Component = forwardRef(function (_a, ref) {
95
95
  if (!descriptor || !visible) {
96
96
  return null;
97
97
  }
98
- var cardinal = context.cardinal, _j = context.fonts, contextFonts = _j === void 0 ? {} : _j, _k = context.accessibility, accessibility = _k === void 0 ? {} : _k, restContext = __rest(context, ["cardinal", "fonts", "accessibility"]);
98
+ var mergedContexts = __assign(__assign({}, context), (extraContext || {}));
99
+ var cardinal = mergedContexts.cardinal, _j = mergedContexts.fonts, contextFonts = _j === void 0 ? {} : _j, _k = mergedContexts.accessibility, accessibility = _k === void 0 ? {} : _k, restContext = __rest(mergedContexts, ["cardinal", "fonts", "accessibility"]);
99
100
  var fonts = {
100
101
  type: contextFonts.type,
101
102
  base: contextFonts.base || '16px',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-types-grid",
3
- "version": "1.0.2",
3
+ "version": "1.0.6",
4
4
  "description": "Type definition for Grid widget.",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "Telia Company AB",
@@ -25,12 +25,12 @@
25
25
  "sideEffects": false,
26
26
  "typings": "lib/index.d.ts",
27
27
  "dependencies": {
28
- "@telia-ace/knowledge-serviceclient": "^1.0.0",
29
- "@telia-ace/widget-core": "^1.0.1",
30
- "@telia-ace/widget-forms": "^1.0.2",
31
- "@telia-ace/widget-routing": "^1.0.1",
32
- "@telia-ace/widget-services": "^1.0.1",
33
- "@telia-ace/widget-ui": "^1.0.2",
28
+ "@telia-ace/knowledge-serviceclient": "^1.0.3",
29
+ "@telia-ace/widget-core": "^1.0.4",
30
+ "@telia-ace/widget-forms": "^1.0.6",
31
+ "@telia-ace/widget-routing": "^1.0.5",
32
+ "@telia-ace/widget-services": "^1.0.4",
33
+ "@telia-ace/widget-ui": "^1.0.6",
34
34
  "@telia-ace/widget-utilities": "^1.0.1",
35
35
  "@webprovisions/bootstrapping": "^1.0.12",
36
36
  "@webprovisions/platform": "^1.1.2",
@@ -48,5 +48,5 @@
48
48
  "@types/react-transition-group": "^4.4.4",
49
49
  "@types/styled-components": "^5.1.7"
50
50
  },
51
- "gitHead": "cfdc4aa8242f645bb32e1293c13539462d03a9c9"
51
+ "gitHead": "34cb85e421c0c4a5bd08ccd899291683a11b3cf9"
52
52
  }