@forge/react 9.2.0-next.5-experimental-cf84ac7 → 9.3.0-next.0
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 +6 -4
- package/out/__test__/defaultReconciler.test.d.ts +2 -0
- package/out/__test__/defaultReconciler.test.d.ts.map +1 -0
- package/out/__test__/defaultReconciler.test.js +51 -0
- package/out/__test__/hostConfig.test.js +2 -0
- package/out/__test__/inline.test.js +1 -1
- package/out/__test__/reconciler.test.js +72 -36
- package/out/__test__/stack.test.js +1 -1
- package/out/__test__/table.test.d.ts +2 -0
- package/out/__test__/table.test.d.ts.map +1 -0
- package/out/__test__/table.test.js +23 -0
- package/out/__test__/testUtils.d.ts.map +1 -1
- package/out/components.d.ts +37 -4
- package/out/components.d.ts.map +1 -1
- package/out/components.js +36 -56
- package/out/index.d.ts +0 -2
- package/out/index.d.ts.map +1 -1
- package/out/index.js +1 -4
- package/out/reconciler.d.ts +11 -2
- package/out/reconciler.d.ts.map +1 -1
- package/out/reconciler.js +64 -21
- package/package.json +4 -7
- package/tsconfig.tsbuildinfo +1 -1
- package/out/hooks/__test__/useForm.test.d.ts +0 -2
- package/out/hooks/__test__/useForm.test.d.ts.map +0 -1
- package/out/hooks/__test__/useForm.test.js +0 -36
- package/out/hooks/useForm.d.ts +0 -34
- package/out/hooks/useForm.d.ts.map +0 -1
- package/out/hooks/useForm.js +0 -67
- package/out/package-types.d.ts +0 -19
- package/out/package-types.d.ts.map +0 -1
- package/out/package-types.js +0 -2
- package/out/uikit2-components.d.ts +0 -55
- package/out/uikit2-components.d.ts.map +0 -1
- package/out/uikit2-components.js +0 -55
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# @forge/react
|
|
2
2
|
|
|
3
|
-
## 9.
|
|
3
|
+
## 9.3.0-next.0
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### Minor Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- 428a4b4: Correct version to apply changes to peer dependencies
|
|
8
|
+
|
|
9
|
+
## 9.2.0
|
|
8
10
|
|
|
9
11
|
### Minor Changes
|
|
10
12
|
|
|
@@ -13,7 +15,7 @@
|
|
|
13
15
|
### Patch Changes
|
|
14
16
|
|
|
15
17
|
- Updated dependencies [d36502b]
|
|
16
|
-
- @forge/bridge@3.3.0
|
|
18
|
+
- @forge/bridge@3.3.0
|
|
17
19
|
|
|
18
20
|
## 9.2.0-next.5
|
|
19
21
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultReconciler.test.d.ts","sourceRoot":"","sources":["../../src/__test__/defaultReconciler.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
let keyCount = 0;
|
|
6
|
+
jest.mock('uuid', () => (Object.assign(Object.assign({}, jest.requireActual('uuid')), { v4: () => `${keyCount++}` })));
|
|
7
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
8
|
+
const reconcilerTestRenderer_1 = tslib_1.__importDefault(require("./reconcilerTestRenderer"));
|
|
9
|
+
const components_1 = require("../components");
|
|
10
|
+
const get_1 = tslib_1.__importDefault(require("lodash/get"));
|
|
11
|
+
const testUtils_1 = require("./testUtils");
|
|
12
|
+
describe('Disabled reconcilation counting (default behaviour)', () => {
|
|
13
|
+
let bridgeCalls = [];
|
|
14
|
+
const TEXT = 0;
|
|
15
|
+
const BUTTON = 1;
|
|
16
|
+
const STATIC_TEXT = 2;
|
|
17
|
+
const STRING = 0;
|
|
18
|
+
beforeAll(async () => {
|
|
19
|
+
bridgeCalls = (0, testUtils_1.setupBridge)();
|
|
20
|
+
const Test = () => {
|
|
21
|
+
const [bool, setBool] = (0, react_1.useState)(false);
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Text, { children: !bool ? 'Loading...' : 'Now loaded...' }), (0, jsx_runtime_1.jsx)(components_1.Button, Object.assign({ onClick: () => setBool(true) }, { children: "Click" })), (0, jsx_runtime_1.jsx)(components_1.StatusLozenge, Object.assign({ appearance: "inprogress" }, { children: "Test" }))] }));
|
|
23
|
+
};
|
|
24
|
+
await reconcilerTestRenderer_1.default.create((0, jsx_runtime_1.jsx)(Test, {}));
|
|
25
|
+
});
|
|
26
|
+
it('No reconciliation counts are present', () => {
|
|
27
|
+
const forgeDoc = (0, testUtils_1.getLastBridgeCallForgeDoc)(bridgeCalls);
|
|
28
|
+
expect(forgeDoc).not.toHaveProperty('reconciliationCount');
|
|
29
|
+
expect(forgeDoc).toHaveProperty(`children[${TEXT}].type`, 'Text');
|
|
30
|
+
expect(forgeDoc).not.toHaveProperty(`children[${TEXT}].reconciliationCount`);
|
|
31
|
+
expect(forgeDoc).toHaveProperty(`children[${BUTTON}].type`, 'Button');
|
|
32
|
+
expect(forgeDoc).not.toHaveProperty(`children[${BUTTON}].reconciliationCount`);
|
|
33
|
+
expect(forgeDoc).toHaveProperty(`children[${STATIC_TEXT}].type`, 'StatusLozenge');
|
|
34
|
+
expect(forgeDoc).not.toHaveProperty(`children[${STATIC_TEXT}].reconciliationCount`);
|
|
35
|
+
expect(forgeDoc).toMatchSnapshot();
|
|
36
|
+
});
|
|
37
|
+
it('calling the button click handler DOES NOT add reconciliation count', () => {
|
|
38
|
+
let forgeDoc = (0, testUtils_1.getLastBridgeCallForgeDoc)(bridgeCalls);
|
|
39
|
+
const onClick = (0, get_1.default)(forgeDoc, `children[${BUTTON}].props.onClick`);
|
|
40
|
+
expect(onClick).not.toBeUndefined();
|
|
41
|
+
onClick();
|
|
42
|
+
forgeDoc = (0, testUtils_1.getLastBridgeCallForgeDoc)(bridgeCalls);
|
|
43
|
+
expect(forgeDoc).not.toHaveProperty('reconciliationCount');
|
|
44
|
+
expect(forgeDoc).not.toHaveProperty(`children[${TEXT}].reconciliationCount`);
|
|
45
|
+
expect(forgeDoc).toHaveProperty(`children[${TEXT}].children[${STRING}].type`, 'String');
|
|
46
|
+
expect(forgeDoc).not.toHaveProperty(`children[${TEXT}].children[${STRING}].reconciliationCount`);
|
|
47
|
+
expect(forgeDoc).not.toHaveProperty(`children[${BUTTON}].reconciliationCount`, 2);
|
|
48
|
+
expect(forgeDoc).not.toHaveProperty(`children[${STATIC_TEXT}].reconciliationCount`);
|
|
49
|
+
expect(forgeDoc).toMatchSnapshot();
|
|
50
|
+
});
|
|
51
|
+
});
|
|
@@ -4,6 +4,7 @@ let keyCount = 0;
|
|
|
4
4
|
jest.mock('uuid', () => (Object.assign(Object.assign({}, jest.requireActual('uuid')), { v4: () => `${keyCount++}` })));
|
|
5
5
|
const reconciler_1 = require("../reconciler");
|
|
6
6
|
const testUtils_1 = require("./testUtils");
|
|
7
|
+
reconciler_1.ReconciliationCounter.getInstance(false);
|
|
7
8
|
const emptyForgeDoc = (0, reconciler_1.createElement)({ type: 'root', props: {} });
|
|
8
9
|
describe('hostConfig used functions', () => {
|
|
9
10
|
let bridgeCalls = [];
|
|
@@ -69,6 +70,7 @@ describe('hostConfig used functions', () => {
|
|
|
69
70
|
expect(reconciler_1.hostConfig.prepareUpdate(instance, 'test', {}, newProps, emptyForgeDoc, null)).toBe(newProps);
|
|
70
71
|
expect(instance).not.toHaveProperty('oldProps');
|
|
71
72
|
expect(instance).toHaveProperty('props', newProps);
|
|
73
|
+
expect(instance).toHaveProperty('reconciliationCount', 2);
|
|
72
74
|
});
|
|
73
75
|
it('shouldSetTextContent returns false', () => {
|
|
74
76
|
expect(reconciler_1.hostConfig.shouldSetTextContent('test', {})).toBe(false);
|
|
@@ -13,7 +13,7 @@ describe('reconciled output', () => {
|
|
|
13
13
|
});
|
|
14
14
|
it('renders Inline ForgeDoc', async () => {
|
|
15
15
|
const Test = () => {
|
|
16
|
-
return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: (0, jsx_runtime_1.jsxs)(components_1.Inline, Object.assign({ space: "space.500" }, { children: [(0, jsx_runtime_1.jsxs)(components_1.Inline, Object.assign({ alignInline: "start", space: "space.100" }, { children: [(0, jsx_runtime_1.jsx)(components_1.Heading,
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: (0, jsx_runtime_1.jsxs)(components_1.Inline, Object.assign({ grow: "fill", space: "space.500" }, { children: [(0, jsx_runtime_1.jsxs)(components_1.Inline, Object.assign({ grow: "hug", alignInline: "start", space: "space.100" }, { children: [(0, jsx_runtime_1.jsx)(components_1.Heading, { children: "Hug" }), (0, jsx_runtime_1.jsx)(components_1.Tag, Object.assign({ color: "grey-light" }, { children: "1" })), (0, jsx_runtime_1.jsx)(components_1.Tag, Object.assign({ color: "blue-light" }, { children: "2" })), (0, jsx_runtime_1.jsx)(components_1.Tag, Object.assign({ color: "green-light" }, { children: "3" })), (0, jsx_runtime_1.jsx)(components_1.Tag, Object.assign({ color: "red" }, { children: "Really looooooooooooooooooong tag" })), (0, jsx_runtime_1.jsx)(components_1.Button, Object.assign({ appearance: "primary", onClick: jest.fn() }, { children: "Button" }))] })), (0, jsx_runtime_1.jsxs)(components_1.Inline, Object.assign({ grow: "fill", alignInline: "start", space: "space.100" }, { children: [(0, jsx_runtime_1.jsx)(components_1.Heading, { children: "Fill" }), (0, jsx_runtime_1.jsx)(components_1.Tag, Object.assign({ color: "grey-light" }, { children: "1" })), (0, jsx_runtime_1.jsx)(components_1.Tag, Object.assign({ color: "blue-light" }, { children: "2" })), (0, jsx_runtime_1.jsx)(components_1.Tag, Object.assign({ color: "green-light" }, { children: "3" })), (0, jsx_runtime_1.jsx)(components_1.Tag, Object.assign({ color: "red" }, { children: "Really looooooooooooooooooong tag" })), (0, jsx_runtime_1.jsx)(components_1.Button, Object.assign({ appearance: "primary", onClick: jest.fn() }, { children: "Button" }))] }))] })) }));
|
|
17
17
|
};
|
|
18
18
|
await reconcilerTestRenderer_1.default.create((0, jsx_runtime_1.jsx)(Test, {}));
|
|
19
19
|
const forgeDoc = (0, testUtils_1.getLastBridgeCallForgeDoc)(bridgeCalls);
|
|
@@ -4,16 +4,14 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
let keyCount = 0;
|
|
6
6
|
jest.mock('uuid', () => (Object.assign(Object.assign({}, jest.requireActual('uuid')), { v4: () => `${keyCount++}` })));
|
|
7
|
-
const resetKeyCount = () => {
|
|
8
|
-
keyCount = 0;
|
|
9
|
-
};
|
|
10
7
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
11
8
|
const reconcilerTestRenderer_1 = tslib_1.__importDefault(require("./reconcilerTestRenderer"));
|
|
12
9
|
const components_1 = require("../components");
|
|
13
10
|
const get_1 = tslib_1.__importDefault(require("lodash/get"));
|
|
14
11
|
const testUtils_1 = require("./testUtils");
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
const reconciler_1 = require("../reconciler");
|
|
13
|
+
reconciler_1.ReconciliationCounter.getInstance(false);
|
|
14
|
+
describe('Reconciliation counting', () => {
|
|
17
15
|
let bridgeCalls = [];
|
|
18
16
|
const TEXT = 0;
|
|
19
17
|
const BUTTON = 1;
|
|
@@ -23,27 +21,32 @@ describe('Reconcilation', () => {
|
|
|
23
21
|
bridgeCalls = (0, testUtils_1.setupBridge)();
|
|
24
22
|
const Test = () => {
|
|
25
23
|
const [bool, setBool] = (0, react_1.useState)(false);
|
|
26
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Text, { children: !bool ? 'Loading...' : 'Now loaded...' }), (0, jsx_runtime_1.jsx)(components_1.Button, Object.assign({ onClick: () => setBool(true) }, { children: "Click" })), (0, jsx_runtime_1.jsx)(components_1.
|
|
24
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Text, { children: !bool ? 'Loading...' : 'Now loaded...' }), (0, jsx_runtime_1.jsx)(components_1.Button, Object.assign({ onClick: () => setBool(true) }, { children: "Click" })), (0, jsx_runtime_1.jsx)(components_1.StatusLozenge, Object.assign({ appearance: "inprogress" }, { children: "Test" }))] }));
|
|
27
25
|
};
|
|
28
|
-
resetKeyCount();
|
|
29
26
|
await reconcilerTestRenderer_1.default.create((0, jsx_runtime_1.jsx)(Test, {}));
|
|
30
27
|
});
|
|
31
|
-
it('
|
|
28
|
+
it('initial reconcilation output is correct', () => {
|
|
32
29
|
const forgeDoc = (0, testUtils_1.getLastBridgeCallForgeDoc)(bridgeCalls);
|
|
30
|
+
expect(forgeDoc).toHaveProperty('reconciliationCount', 1);
|
|
33
31
|
expect(forgeDoc).toHaveProperty(`children[${TEXT}].type`, 'Text');
|
|
32
|
+
expect(forgeDoc).toHaveProperty(`children[${TEXT}].reconciliationCount`, 1);
|
|
34
33
|
expect(forgeDoc).toHaveProperty(`children[${BUTTON}].type`, 'Button');
|
|
35
|
-
expect(forgeDoc).toHaveProperty(`children[${
|
|
36
|
-
expect(forgeDoc).
|
|
34
|
+
expect(forgeDoc).toHaveProperty(`children[${BUTTON}].reconciliationCount`, 1);
|
|
35
|
+
expect(forgeDoc).toHaveProperty(`children[${STATIC_TEXT}].type`, 'StatusLozenge');
|
|
36
|
+
expect(forgeDoc).toHaveProperty(`children[${STATIC_TEXT}].reconciliationCount`, 1);
|
|
37
37
|
});
|
|
38
|
-
it('
|
|
38
|
+
it('calling the button click handler triggers reconciliation', () => {
|
|
39
39
|
let forgeDoc = (0, testUtils_1.getLastBridgeCallForgeDoc)(bridgeCalls);
|
|
40
40
|
const onClick = (0, get_1.default)(forgeDoc, `children[${BUTTON}].props.onClick`);
|
|
41
41
|
expect(onClick).not.toBeUndefined();
|
|
42
42
|
onClick();
|
|
43
43
|
forgeDoc = (0, testUtils_1.getLastBridgeCallForgeDoc)(bridgeCalls);
|
|
44
|
+
expect(forgeDoc).toHaveProperty('reconciliationCount', 2);
|
|
45
|
+
expect(forgeDoc).toHaveProperty(`children[${TEXT}].reconciliationCount`, 1);
|
|
44
46
|
expect(forgeDoc).toHaveProperty(`children[${TEXT}].children[${STRING}].type`, 'String');
|
|
45
|
-
expect(forgeDoc).toHaveProperty(`children[${TEXT}].children[${STRING}].
|
|
46
|
-
expect(forgeDoc).
|
|
47
|
+
expect(forgeDoc).toHaveProperty(`children[${TEXT}].children[${STRING}].reconciliationCount`, 2);
|
|
48
|
+
expect(forgeDoc).toHaveProperty(`children[${BUTTON}].reconciliationCount`, 2);
|
|
49
|
+
expect(forgeDoc).toHaveProperty(`children[${STATIC_TEXT}].reconciliationCount`, 1);
|
|
47
50
|
});
|
|
48
51
|
});
|
|
49
52
|
describe('deep tree reconciliation', () => {
|
|
@@ -57,7 +60,6 @@ describe('deep tree reconciliation', () => {
|
|
|
57
60
|
}
|
|
58
61
|
return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: (0, jsx_runtime_1.jsxs)(components_1.Inline, { children: [(0, jsx_runtime_1.jsx)(components_1.Stack, { children: (0, jsx_runtime_1.jsx)(components_1.Text, { children: count }) }), (0, jsx_runtime_1.jsxs)(components_1.Stack, { children: [(0, jsx_runtime_1.jsx)(components_1.Text, { children: "Should not update" }), (0, jsx_runtime_1.jsx)(components_1.Button, Object.assign({ onClick: incrementCount }, { children: "Click" }))] })] }) }));
|
|
59
62
|
};
|
|
60
|
-
resetKeyCount();
|
|
61
63
|
await reconcilerTestRenderer_1.default.create((0, jsx_runtime_1.jsx)(Test, {}));
|
|
62
64
|
});
|
|
63
65
|
it('should match the initially rendered ForgeDoc snaphot', () => {
|
|
@@ -68,43 +70,77 @@ describe('deep tree reconciliation', () => {
|
|
|
68
70
|
var _a, _b;
|
|
69
71
|
let forgeDoc = (0, testUtils_1.getLastBridgeCallForgeDoc)(bridgeCalls);
|
|
70
72
|
expect(forgeDoc).not.toBeNull();
|
|
71
|
-
const button = (0, testUtils_1.findElementInForgeDoc)(forgeDoc, '
|
|
73
|
+
const button = (0, testUtils_1.findElementInForgeDoc)(forgeDoc, '14');
|
|
72
74
|
expect(button).not.toBeUndefined();
|
|
73
75
|
expect((_a = button === null || button === void 0 ? void 0 : button.props) === null || _a === void 0 ? void 0 : _a.onClick).not.toBeUndefined();
|
|
74
76
|
(_b = button === null || button === void 0 ? void 0 : button.props) === null || _b === void 0 ? void 0 : _b.onClick();
|
|
75
77
|
forgeDoc = (0, testUtils_1.getLastBridgeCallForgeDoc)(bridgeCalls);
|
|
76
78
|
expect(forgeDoc).toMatchSnapshot();
|
|
77
79
|
});
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
};
|
|
88
|
-
await reconcilerTestRenderer_1.default.create((0, jsx_runtime_1.jsx)(App, {}));
|
|
89
|
-
await reconcilerTestRenderer_1.default.addConfig((0, jsx_runtime_1.jsx)(Config, {}));
|
|
90
|
-
const configForgeDoc = (0, testUtils_1.getLastBridgeCallForgeDoc)(bridgeCalls);
|
|
91
|
-
expect(configForgeDoc === null || configForgeDoc === void 0 ? void 0 : configForgeDoc.type).toEqual('MacroConfig');
|
|
92
|
-
expect(configForgeDoc === null || configForgeDoc === void 0 ? void 0 : configForgeDoc.children[0].type).toEqual('Textfield');
|
|
80
|
+
it('should set accurate reconciliation counts for updated text and string components', () => {
|
|
81
|
+
const forgeDoc = (0, testUtils_1.getLastBridgeCallForgeDoc)(bridgeCalls);
|
|
82
|
+
expect(forgeDoc).not.toBeNull();
|
|
83
|
+
const textComponent = (0, testUtils_1.findElementInForgeDoc)(forgeDoc, '9');
|
|
84
|
+
expect(textComponent).not.toBeUndefined();
|
|
85
|
+
expect(textComponent === null || textComponent === void 0 ? void 0 : textComponent.reconciliationCount).toBe(3);
|
|
86
|
+
const stringComponent = (0, testUtils_1.findElementInForgeDoc)(forgeDoc, '8');
|
|
87
|
+
expect(stringComponent).not.toBeUndefined();
|
|
88
|
+
expect(stringComponent === null || stringComponent === void 0 ? void 0 : stringComponent.reconciliationCount).toBe(4);
|
|
93
89
|
});
|
|
94
90
|
});
|
|
95
|
-
describe('
|
|
91
|
+
describe('swapping component type with same props', () => {
|
|
96
92
|
let bridgeCalls = [];
|
|
97
93
|
beforeAll(async () => {
|
|
98
94
|
bridgeCalls = (0, testUtils_1.setupBridge)();
|
|
99
95
|
const Test = () => {
|
|
100
|
-
|
|
96
|
+
const [bool, setBool] = (0, react_1.useState)(false);
|
|
97
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [bool ? (0, jsx_runtime_1.jsx)(components_1.Text, { children: "Text" }) : (0, jsx_runtime_1.jsx)(components_1.Heading, Object.assign({ size: "medium" }, { children: "Text" })), (0, jsx_runtime_1.jsx)(components_1.Button, Object.assign({ onClick: () => setBool(!bool) }, { children: "Click" }))] }));
|
|
101
98
|
};
|
|
102
99
|
await reconcilerTestRenderer_1.default.create((0, jsx_runtime_1.jsx)(Test, {}));
|
|
103
100
|
});
|
|
104
|
-
it('should
|
|
101
|
+
it('should match the initially rendered ForgeDoc snaphot', () => {
|
|
105
102
|
const forgeDoc = (0, testUtils_1.getLastBridgeCallForgeDoc)(bridgeCalls);
|
|
106
|
-
expect(forgeDoc).
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
expect(forgeDoc).toMatchSnapshot();
|
|
104
|
+
});
|
|
105
|
+
it('should match snapshot after triggering update', () => {
|
|
106
|
+
var _a, _b;
|
|
107
|
+
let forgeDoc = (0, testUtils_1.getLastBridgeCallForgeDoc)(bridgeCalls);
|
|
108
|
+
expect(forgeDoc).not.toBeNull();
|
|
109
|
+
if (forgeDoc !== null) {
|
|
110
|
+
const button = (0, testUtils_1.findElementInForgeDoc)(forgeDoc, '21');
|
|
111
|
+
expect(button).not.toBeUndefined();
|
|
112
|
+
expect((_a = button === null || button === void 0 ? void 0 : button.props) === null || _a === void 0 ? void 0 : _a.onClick).not.toBeUndefined();
|
|
113
|
+
(_b = button === null || button === void 0 ? void 0 : button.props) === null || _b === void 0 ? void 0 : _b.onClick();
|
|
114
|
+
forgeDoc = (0, testUtils_1.getLastBridgeCallForgeDoc)(bridgeCalls);
|
|
115
|
+
expect(forgeDoc).toMatchSnapshot();
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
it('should set accurate reconciliation counts for swapped in text and string components', () => {
|
|
119
|
+
const forgeDoc = (0, testUtils_1.getLastBridgeCallForgeDoc)(bridgeCalls);
|
|
120
|
+
expect(forgeDoc).not.toBeNull();
|
|
121
|
+
if (forgeDoc !== null) {
|
|
122
|
+
const textComponent = (0, testUtils_1.findElementInForgeDoc)(forgeDoc, '23');
|
|
123
|
+
expect(textComponent).not.toBeUndefined();
|
|
124
|
+
expect(textComponent === null || textComponent === void 0 ? void 0 : textComponent.reconciliationCount).toBe(6);
|
|
125
|
+
const stringComponent = (0, testUtils_1.findElementInForgeDoc)(forgeDoc, '22');
|
|
126
|
+
expect(stringComponent).not.toBeUndefined();
|
|
127
|
+
expect(stringComponent === null || stringComponent === void 0 ? void 0 : stringComponent.reconciliationCount).toBe(6);
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
describe('macro config', () => {
|
|
131
|
+
it('should create forgeDoc tree for macro config', async () => {
|
|
132
|
+
const bridgeCalls = (0, testUtils_1.setupBridge)();
|
|
133
|
+
const App = () => {
|
|
134
|
+
return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: (0, jsx_runtime_1.jsx)(components_1.Text, { children: "Hello World" }) }));
|
|
135
|
+
};
|
|
136
|
+
const Config = () => {
|
|
137
|
+
return (0, jsx_runtime_1.jsx)(components_1.TextField, { name: "age", label: "Age" });
|
|
138
|
+
};
|
|
139
|
+
await reconcilerTestRenderer_1.default.create((0, jsx_runtime_1.jsx)(App, {}));
|
|
140
|
+
await reconcilerTestRenderer_1.default.addConfig((0, jsx_runtime_1.jsx)(Config, {}));
|
|
141
|
+
const configForgeDoc = (0, testUtils_1.getLastBridgeCallForgeDoc)(bridgeCalls);
|
|
142
|
+
expect(configForgeDoc === null || configForgeDoc === void 0 ? void 0 : configForgeDoc.type).toEqual('MacroConfig');
|
|
143
|
+
expect(configForgeDoc === null || configForgeDoc === void 0 ? void 0 : configForgeDoc.children[0].type).toEqual('TextField');
|
|
144
|
+
});
|
|
109
145
|
});
|
|
110
146
|
});
|
|
@@ -13,7 +13,7 @@ describe('reconciled output', () => {
|
|
|
13
13
|
});
|
|
14
14
|
it('renders Stack ForgeDoc', async () => {
|
|
15
15
|
const Test = () => {
|
|
16
|
-
return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: (0, jsx_runtime_1.jsxs)(components_1.Stack, Object.assign({ space: "space.200" }, { children: [(0, jsx_runtime_1.jsxs)(components_1.Stack, Object.assign({ space: "space.100" }, { children: [(0, jsx_runtime_1.jsx)(components_1.Heading, Object.assign({
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: (0, jsx_runtime_1.jsxs)(components_1.Stack, Object.assign({ space: "space.200" }, { children: [(0, jsx_runtime_1.jsxs)(components_1.Stack, Object.assign({ space: "space.100" }, { children: [(0, jsx_runtime_1.jsx)(components_1.Heading, Object.assign({ size: "small" }, { children: "default align" })), (0, jsx_runtime_1.jsxs)(components_1.Stack, Object.assign({ space: "space.100" }, { children: [(0, jsx_runtime_1.jsx)(components_1.Tag, Object.assign({ color: "grey-light" }, { children: "1" })), (0, jsx_runtime_1.jsx)(components_1.Tag, Object.assign({ color: "blue-light" }, { children: "2" })), (0, jsx_runtime_1.jsx)(components_1.Tag, Object.assign({ color: "green-light" }, { children: "3" }))] }))] })), (0, jsx_runtime_1.jsxs)(components_1.Stack, Object.assign({ space: "space.100" }, { children: [(0, jsx_runtime_1.jsx)(components_1.Heading, Object.assign({ size: "small" }, { children: "start align" })), (0, jsx_runtime_1.jsxs)(components_1.Stack, Object.assign({ space: "space.100", alignInline: "start" }, { children: [(0, jsx_runtime_1.jsx)(components_1.Tag, Object.assign({ color: "grey-light" }, { children: "1" })), (0, jsx_runtime_1.jsx)(components_1.Tag, Object.assign({ color: "blue-light" }, { children: "2" })), (0, jsx_runtime_1.jsx)(components_1.Tag, Object.assign({ color: "green-light" }, { children: "3" }))] }))] })), (0, jsx_runtime_1.jsxs)(components_1.Stack, Object.assign({ space: "space.100" }, { children: [(0, jsx_runtime_1.jsx)(components_1.Heading, Object.assign({ size: "small" }, { children: "center align" })), (0, jsx_runtime_1.jsxs)(components_1.Stack, Object.assign({ space: "space.100", alignInline: "center" }, { children: [(0, jsx_runtime_1.jsx)(components_1.Tag, Object.assign({ color: "grey-light" }, { children: "1" })), (0, jsx_runtime_1.jsx)(components_1.Tag, Object.assign({ color: "blue-light" }, { children: "2" })), (0, jsx_runtime_1.jsx)(components_1.Tag, Object.assign({ color: "green-light" }, { children: "3" }))] }))] })), (0, jsx_runtime_1.jsxs)(components_1.Stack, Object.assign({ space: "space.100" }, { children: [(0, jsx_runtime_1.jsx)(components_1.Heading, Object.assign({ size: "small" }, { children: "end align" })), (0, jsx_runtime_1.jsxs)(components_1.Stack, Object.assign({ space: "space.100", alignInline: "end" }, { children: [(0, jsx_runtime_1.jsx)(components_1.Tag, Object.assign({ color: "grey-light" }, { children: "1" })), (0, jsx_runtime_1.jsx)(components_1.Tag, Object.assign({ color: "blue-light" }, { children: "2" })), (0, jsx_runtime_1.jsx)(components_1.Tag, Object.assign({ color: "green-light" }, { children: "3" }))] }))] }))] })) }));
|
|
17
17
|
};
|
|
18
18
|
await reconcilerTestRenderer_1.default.create((0, jsx_runtime_1.jsx)(Test, {}));
|
|
19
19
|
const forgeDoc = (0, testUtils_1.getLastBridgeCallForgeDoc)(bridgeCalls);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.test.d.ts","sourceRoot":"","sources":["../../src/__test__/table.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const components_1 = require("../components");
|
|
7
|
+
const reconcilerTestRenderer_1 = tslib_1.__importDefault(require("./reconcilerTestRenderer"));
|
|
8
|
+
const testUtils_1 = require("./testUtils");
|
|
9
|
+
describe('reconciled output', () => {
|
|
10
|
+
let bridgeCalls = [];
|
|
11
|
+
beforeAll(async () => {
|
|
12
|
+
bridgeCalls = (0, testUtils_1.setupBridge)();
|
|
13
|
+
});
|
|
14
|
+
it('renders legacy Table ForgeDoc', async () => {
|
|
15
|
+
const Test = () => {
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: (0, jsx_runtime_1.jsxs)(components_1.Table, Object.assign({ rowsPerPage: 2 }, { children: [(0, jsx_runtime_1.jsxs)(components_1.Head, { children: [(0, jsx_runtime_1.jsx)(components_1.Cell, { children: (0, jsx_runtime_1.jsx)(components_1.Text, { children: "Issue Key" }) }), (0, jsx_runtime_1.jsx)(components_1.Cell, { children: (0, jsx_runtime_1.jsx)(components_1.Text, { children: "Status" }) })] }), (0, jsx_runtime_1.jsxs)(components_1.Row, { children: [(0, jsx_runtime_1.jsx)(components_1.Cell, { children: (0, jsx_runtime_1.jsx)(components_1.Text, { children: "XEN-1" }) }), (0, jsx_runtime_1.jsx)(components_1.Cell, { children: (0, jsx_runtime_1.jsx)(components_1.Text, { children: "In Progress" }) })] }), (0, jsx_runtime_1.jsxs)(components_1.Row, { children: [(0, jsx_runtime_1.jsx)(components_1.Cell, { children: (0, jsx_runtime_1.jsx)(components_1.Text, { children: "XEN-2" }) }), (0, jsx_runtime_1.jsx)(components_1.Cell, { children: (0, jsx_runtime_1.jsx)(components_1.Text, { children: "To Do" }) })] }), (0, jsx_runtime_1.jsxs)(components_1.Row, { children: [(0, jsx_runtime_1.jsx)(components_1.Cell, { children: (0, jsx_runtime_1.jsx)(components_1.Text, { children: "XEN-3" }) }), (0, jsx_runtime_1.jsx)(components_1.Cell, { children: (0, jsx_runtime_1.jsx)(components_1.Text, { children: "Done" }) })] }), (0, jsx_runtime_1.jsxs)(components_1.Row, { children: [(0, jsx_runtime_1.jsx)(components_1.Cell, { children: (0, jsx_runtime_1.jsx)(components_1.Text, { children: "XEN-4" }) }), (0, jsx_runtime_1.jsx)(components_1.Cell, { children: (0, jsx_runtime_1.jsx)(components_1.Text, { children: "In Progress" }) })] }), (0, jsx_runtime_1.jsxs)(components_1.Row, { children: [(0, jsx_runtime_1.jsx)(components_1.Cell, { children: (0, jsx_runtime_1.jsx)(components_1.Text, { children: "XEN-5" }) }), (0, jsx_runtime_1.jsx)(components_1.Cell, { children: (0, jsx_runtime_1.jsx)(components_1.Text, { children: "Cancelled" }) })] })] })) }));
|
|
17
|
+
};
|
|
18
|
+
await reconcilerTestRenderer_1.default.create((0, jsx_runtime_1.jsx)(Test, {}));
|
|
19
|
+
const forgeDoc = (0, testUtils_1.getLastBridgeCallForgeDoc)(bridgeCalls);
|
|
20
|
+
expect(forgeDoc).toHaveProperty('type', 'Root');
|
|
21
|
+
expect(forgeDoc).toHaveProperty('children[0].type', 'Table');
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testUtils.d.ts","sourceRoot":"","sources":["../../src/__test__/testUtils.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"testUtils.d.ts","sourceRoot":"","sources":["../../src/__test__/testUtils.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,oBAAY,UAAU,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,cAAc,CAAA;CAAE,CAAC;AAC/D,aAAK,WAAW,GAAG,MAAM,UAAU,EAAE,CAAC;AAEtC,aAAK,iBAAiB,GAAG,CAAC,WAAW,EAAE,UAAU,EAAE,KAAK,UAAU,GAAG,IAAI,CAAC;AAC1E,aAAK,yBAAyB,GAAG,CAAC,WAAW,EAAE,UAAU,EAAE,KAAK,QAAQ,GAAG,IAAI,CAAC;AAChF,aAAK,qBAAqB,GAAG,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,QAAQ,GAAG,SAAS,CAAC;AAE9F,aAAK,cAAc,GAAG;IACpB,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAMF,eAAO,MAAM,WAAW,EAAE,WAYzB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,iBAK/B,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,yBAMvC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,qBAkBnC,CAAC"}
|
package/out/components.d.ts
CHANGED
|
@@ -1,13 +1,46 @@
|
|
|
1
|
-
import { ForgeElement, MarkupProps, NativeImageProps as ImageProps, NativeLinkProps as LinkProps, NativeTextProps as TextProps, NativeUserPickerProps as UserPickerProps, UserGroupProps, UserProps } from './types';
|
|
1
|
+
import { ButtonSetProps, CellProps, DateLozengeProps, ForgeElement, FormData, FormProps, HeadProps, HeadingProps, InlineDialogProps, MarkupProps, ModalDialogProps, NativeButtonProps as ButtonProps, NativeCheckboxGroupProps as CheckboxGroupProps, NativeCheckboxProps as CheckboxProps, NativeDatePickerProps as DatePickerProps, NativeImageProps as ImageProps, NativeInlineProps as InlineProps, NativeLinkProps as LinkProps, NativeRadioGroupProps as RadioGroupProps, NativeRangeProps as RangeProps, NativeSelectProps as SelectProps, NativeStackProps as StackProps, NativeTextAreaProps as TextAreaProps, NativeTextFieldProps as TextFieldProps, NativeTextProps as TextProps, NativeToggleProps as ToggleProps, NativeUserPickerProps as UserPickerProps, NativeBadgeProps as BadgeProps, OptionProps, RadioProps, RowProps, SectionMessageProps, TabProps, TableProps, TabsProps, TagGroupProps, TooltipProps, UserGroupProps, UserProps } from './types';
|
|
2
|
+
import { NativeCodeProps, NativeStatusLozengeProps, NativeTagProps } from './types';
|
|
2
3
|
export { UserPickerValue } from './types';
|
|
4
|
+
export declare const Button: (props: ButtonProps) => ForgeElement;
|
|
5
|
+
export declare const Checkbox: (props: CheckboxProps) => ForgeElement;
|
|
6
|
+
export declare const CheckboxGroup: (props: CheckboxGroupProps) => ForgeElement;
|
|
7
|
+
export declare const DatePicker: (props: DatePickerProps) => ForgeElement;
|
|
8
|
+
export declare const Form: <T extends FormData>(props: FormProps<T>) => ForgeElement;
|
|
3
9
|
export declare const Image: (props: ImageProps) => ForgeElement;
|
|
10
|
+
export declare const Inline: (props: InlineProps) => ForgeElement;
|
|
4
11
|
export declare const Link: (props: LinkProps) => ForgeElement;
|
|
12
|
+
export declare const ModalDialog: (props: ModalDialogProps) => ForgeElement;
|
|
13
|
+
export declare const RadioGroup: (props: RadioGroupProps) => ForgeElement;
|
|
14
|
+
export declare const Range: (props: RangeProps) => ForgeElement;
|
|
15
|
+
export declare const Select: (props: SelectProps) => ForgeElement;
|
|
16
|
+
export declare const Stack: (props: StackProps) => ForgeElement;
|
|
5
17
|
export declare const Text: (props: TextProps) => ForgeElement;
|
|
18
|
+
export declare const TextArea: (props: TextAreaProps) => ForgeElement;
|
|
19
|
+
export declare const TextField: (props: TextFieldProps) => ForgeElement;
|
|
20
|
+
export declare const Toggle: (props: ToggleProps) => ForgeElement;
|
|
6
21
|
export declare const UserPicker: (props: UserPickerProps) => ForgeElement;
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
22
|
+
export declare const Badge: (props: BadgeProps) => ForgeElement;
|
|
23
|
+
export declare const ButtonSet: (props: ButtonSetProps) => ForgeElement;
|
|
24
|
+
export declare const Code: (props: NativeCodeProps) => ForgeElement;
|
|
25
|
+
export declare const DateLozenge: (props: DateLozengeProps) => ForgeElement;
|
|
26
|
+
export declare const Heading: (props: HeadingProps) => ForgeElement;
|
|
27
|
+
export declare const InlineDialog: (props: InlineDialogProps) => ForgeElement;
|
|
28
|
+
export declare const Option: (props: OptionProps) => ForgeElement;
|
|
29
|
+
export declare const Radio: (props: RadioProps) => ForgeElement;
|
|
30
|
+
export declare const SectionMessage: (props: SectionMessageProps) => ForgeElement;
|
|
31
|
+
export declare const StatusLozenge: (props: NativeStatusLozengeProps) => ForgeElement;
|
|
32
|
+
export declare const Tooltip: (props: TooltipProps) => ForgeElement;
|
|
9
33
|
export declare const Em: (props: MarkupProps) => ForgeElement;
|
|
10
34
|
export declare const Strike: (props: MarkupProps) => ForgeElement;
|
|
11
35
|
export declare const Strong: (props: MarkupProps) => ForgeElement;
|
|
12
|
-
export
|
|
36
|
+
export declare const Tab: (props: TabProps) => ForgeElement;
|
|
37
|
+
export declare const Tabs: (props: TabsProps) => ForgeElement;
|
|
38
|
+
export declare const Cell: (props: CellProps) => ForgeElement;
|
|
39
|
+
export declare const Head: (props: HeadProps) => ForgeElement;
|
|
40
|
+
export declare const Row: (props: RowProps) => ForgeElement;
|
|
41
|
+
export declare const Table: (props: TableProps) => ForgeElement;
|
|
42
|
+
export declare const Tag: (props: NativeTagProps) => ForgeElement;
|
|
43
|
+
export declare const TagGroup: (props: TagGroupProps) => ForgeElement;
|
|
44
|
+
export declare const User: (props: UserProps) => ForgeElement;
|
|
45
|
+
export declare const UserGroup: (props: UserGroupProps) => ForgeElement;
|
|
13
46
|
//# sourceMappingURL=components.d.ts.map
|
package/out/components.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../src/components.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,WAAW,EACX,gBAAgB,IAAI,UAAU,EAC9B,eAAe,IAAI,SAAS,EAC5B,eAAe,IAAI,SAAS,EAC5B,qBAAqB,IAAI,eAAe,EACxC,cAAc,EACd,SAAS,EACV,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../src/components.tsx"],"names":[],"mappings":"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"}
|
package/out/components.js
CHANGED
|
@@ -1,65 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
3
|
+
exports.UserGroup = exports.User = exports.TagGroup = exports.Tag = exports.Table = exports.Row = exports.Head = exports.Cell = exports.Tabs = exports.Tab = exports.Strong = exports.Strike = exports.Em = exports.Tooltip = exports.StatusLozenge = exports.SectionMessage = exports.Radio = exports.Option = exports.InlineDialog = exports.Heading = exports.DateLozenge = exports.Code = exports.ButtonSet = exports.Badge = exports.UserPicker = exports.Toggle = exports.TextField = exports.TextArea = exports.Text = exports.Stack = exports.Select = exports.Range = exports.RadioGroup = exports.ModalDialog = exports.Link = exports.Inline = exports.Image = exports.Form = exports.DatePicker = exports.CheckboxGroup = exports.Checkbox = exports.Button = void 0;
|
|
4
|
+
exports.Button = 'Button';
|
|
5
|
+
exports.Checkbox = 'Checkbox';
|
|
6
|
+
exports.CheckboxGroup = 'CheckboxGroup';
|
|
7
|
+
exports.DatePicker = 'DatePicker';
|
|
8
|
+
exports.Form = 'Form';
|
|
5
9
|
exports.Image = 'Image';
|
|
10
|
+
exports.Inline = 'Inline';
|
|
6
11
|
exports.Link = 'Link';
|
|
12
|
+
exports.ModalDialog = 'ModalDialog';
|
|
13
|
+
exports.RadioGroup = 'RadioGroup';
|
|
14
|
+
exports.Range = 'Range';
|
|
15
|
+
exports.Select = 'Select';
|
|
16
|
+
exports.Stack = 'Stack';
|
|
7
17
|
exports.Text = 'Text';
|
|
18
|
+
exports.TextArea = 'TextArea';
|
|
19
|
+
exports.TextField = 'TextField';
|
|
20
|
+
exports.Toggle = 'Toggle';
|
|
8
21
|
exports.UserPicker = 'UserPicker';
|
|
9
|
-
exports.
|
|
10
|
-
exports.
|
|
22
|
+
exports.Badge = 'Badge';
|
|
23
|
+
exports.ButtonSet = 'ButtonSet';
|
|
24
|
+
exports.Code = 'Code';
|
|
25
|
+
exports.DateLozenge = 'DateLozenge';
|
|
26
|
+
exports.Heading = 'Heading';
|
|
27
|
+
exports.InlineDialog = 'InlineDialog';
|
|
28
|
+
exports.Option = 'Option';
|
|
29
|
+
exports.Radio = 'Radio';
|
|
30
|
+
exports.SectionMessage = 'SectionMessage';
|
|
31
|
+
exports.StatusLozenge = 'StatusLozenge';
|
|
32
|
+
exports.Tooltip = 'Tooltip';
|
|
11
33
|
exports.Em = 'Em';
|
|
12
34
|
exports.Strike = 'Strike';
|
|
13
35
|
exports.Strong = 'Strong';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
Object.defineProperty(exports, "DynamicTable", { enumerable: true, get: function () { return uikit2_components_1.DynamicTable; } });
|
|
25
|
-
Object.defineProperty(exports, "ErrorMessage", { enumerable: true, get: function () { return uikit2_components_1.ErrorMessage; } });
|
|
26
|
-
Object.defineProperty(exports, "Flex", { enumerable: true, get: function () { return uikit2_components_1.Flex; } });
|
|
27
|
-
Object.defineProperty(exports, "Form", { enumerable: true, get: function () { return uikit2_components_1.Form; } });
|
|
28
|
-
Object.defineProperty(exports, "FormFooter", { enumerable: true, get: function () { return uikit2_components_1.FormFooter; } });
|
|
29
|
-
Object.defineProperty(exports, "FormHeader", { enumerable: true, get: function () { return uikit2_components_1.FormHeader; } });
|
|
30
|
-
Object.defineProperty(exports, "FormSection", { enumerable: true, get: function () { return uikit2_components_1.FormSection; } });
|
|
31
|
-
Object.defineProperty(exports, "Grid", { enumerable: true, get: function () { return uikit2_components_1.Grid; } });
|
|
32
|
-
Object.defineProperty(exports, "Heading", { enumerable: true, get: function () { return uikit2_components_1.Heading; } });
|
|
33
|
-
Object.defineProperty(exports, "HelperMessage", { enumerable: true, get: function () { return uikit2_components_1.HelperMessage; } });
|
|
34
|
-
Object.defineProperty(exports, "Inline", { enumerable: true, get: function () { return uikit2_components_1.Inline; } });
|
|
35
|
-
Object.defineProperty(exports, "Label", { enumerable: true, get: function () { return uikit2_components_1.Label; } });
|
|
36
|
-
Object.defineProperty(exports, "LinkButton", { enumerable: true, get: function () { return uikit2_components_1.LinkButton; } });
|
|
37
|
-
Object.defineProperty(exports, "LoadingButton", { enumerable: true, get: function () { return uikit2_components_1.LoadingButton; } });
|
|
38
|
-
Object.defineProperty(exports, "Lozenge", { enumerable: true, get: function () { return uikit2_components_1.Lozenge; } });
|
|
39
|
-
Object.defineProperty(exports, "Modal", { enumerable: true, get: function () { return uikit2_components_1.Modal; } });
|
|
40
|
-
Object.defineProperty(exports, "ModalBody", { enumerable: true, get: function () { return uikit2_components_1.ModalBody; } });
|
|
41
|
-
Object.defineProperty(exports, "ModalFooter", { enumerable: true, get: function () { return uikit2_components_1.ModalFooter; } });
|
|
42
|
-
Object.defineProperty(exports, "ModalHeader", { enumerable: true, get: function () { return uikit2_components_1.ModalHeader; } });
|
|
43
|
-
Object.defineProperty(exports, "ModalTitle", { enumerable: true, get: function () { return uikit2_components_1.ModalTitle; } });
|
|
44
|
-
Object.defineProperty(exports, "ModalTransition", { enumerable: true, get: function () { return uikit2_components_1.ModalTransition; } });
|
|
45
|
-
Object.defineProperty(exports, "ProgressBar", { enumerable: true, get: function () { return uikit2_components_1.ProgressBar; } });
|
|
46
|
-
Object.defineProperty(exports, "ProgressTracker", { enumerable: true, get: function () { return uikit2_components_1.ProgressTracker; } });
|
|
47
|
-
Object.defineProperty(exports, "Radio", { enumerable: true, get: function () { return uikit2_components_1.Radio; } });
|
|
48
|
-
Object.defineProperty(exports, "RadioGroup", { enumerable: true, get: function () { return uikit2_components_1.RadioGroup; } });
|
|
49
|
-
Object.defineProperty(exports, "Range", { enumerable: true, get: function () { return uikit2_components_1.Range; } });
|
|
50
|
-
Object.defineProperty(exports, "RequiredAsterisk", { enumerable: true, get: function () { return uikit2_components_1.RequiredAsterisk; } });
|
|
51
|
-
Object.defineProperty(exports, "SectionMessage", { enumerable: true, get: function () { return uikit2_components_1.SectionMessage; } });
|
|
52
|
-
Object.defineProperty(exports, "SectionMessageAction", { enumerable: true, get: function () { return uikit2_components_1.SectionMessageAction; } });
|
|
53
|
-
Object.defineProperty(exports, "Spinner", { enumerable: true, get: function () { return uikit2_components_1.Spinner; } });
|
|
54
|
-
Object.defineProperty(exports, "Stack", { enumerable: true, get: function () { return uikit2_components_1.Stack; } });
|
|
55
|
-
Object.defineProperty(exports, "Tab", { enumerable: true, get: function () { return uikit2_components_1.Tab; } });
|
|
56
|
-
Object.defineProperty(exports, "TabList", { enumerable: true, get: function () { return uikit2_components_1.TabList; } });
|
|
57
|
-
Object.defineProperty(exports, "TabPanel", { enumerable: true, get: function () { return uikit2_components_1.TabPanel; } });
|
|
58
|
-
Object.defineProperty(exports, "Tabs", { enumerable: true, get: function () { return uikit2_components_1.Tabs; } });
|
|
59
|
-
Object.defineProperty(exports, "Tag", { enumerable: true, get: function () { return uikit2_components_1.Tag; } });
|
|
60
|
-
Object.defineProperty(exports, "TagGroup", { enumerable: true, get: function () { return uikit2_components_1.TagGroup; } });
|
|
61
|
-
Object.defineProperty(exports, "TextArea", { enumerable: true, get: function () { return uikit2_components_1.TextArea; } });
|
|
62
|
-
Object.defineProperty(exports, "Textfield", { enumerable: true, get: function () { return uikit2_components_1.Textfield; } });
|
|
63
|
-
Object.defineProperty(exports, "Toggle", { enumerable: true, get: function () { return uikit2_components_1.Toggle; } });
|
|
64
|
-
Object.defineProperty(exports, "Tooltip", { enumerable: true, get: function () { return uikit2_components_1.Tooltip; } });
|
|
65
|
-
Object.defineProperty(exports, "ValidMessage", { enumerable: true, get: function () { return uikit2_components_1.ValidMessage; } });
|
|
36
|
+
exports.Tab = 'Tab';
|
|
37
|
+
exports.Tabs = 'Tabs';
|
|
38
|
+
exports.Cell = 'Cell';
|
|
39
|
+
exports.Head = 'Head';
|
|
40
|
+
exports.Row = 'Row';
|
|
41
|
+
exports.Table = 'Table';
|
|
42
|
+
exports.Tag = 'Tag';
|
|
43
|
+
exports.TagGroup = 'TagGroup';
|
|
44
|
+
exports.User = 'User';
|
|
45
|
+
exports.UserGroup = 'UserGroup';
|
package/out/index.d.ts
CHANGED
|
@@ -5,6 +5,4 @@ export * from './components';
|
|
|
5
5
|
export { useContentProperty } from './hooks/useContentProperty';
|
|
6
6
|
export { useSpaceProperty } from './hooks/useSpaceProperty';
|
|
7
7
|
export { useIssueProperty } from './hooks/useIssueProperty';
|
|
8
|
-
export { useForm } from './hooks/useForm';
|
|
9
|
-
export * from './package-types';
|
|
10
8
|
//# sourceMappingURL=index.d.ts.map
|
package/out/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAE1D,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAE1D,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC"}
|
package/out/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.useIssueProperty = exports.useSpaceProperty = exports.useContentProperty = exports.default = exports.useConfig = exports.useProductContext = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
var useProductContext_1 = require("./hooks/useProductContext");
|
|
6
6
|
Object.defineProperty(exports, "useProductContext", { enumerable: true, get: function () { return useProductContext_1.useProductContext; } });
|
|
@@ -15,6 +15,3 @@ var useSpaceProperty_1 = require("./hooks/useSpaceProperty");
|
|
|
15
15
|
Object.defineProperty(exports, "useSpaceProperty", { enumerable: true, get: function () { return useSpaceProperty_1.useSpaceProperty; } });
|
|
16
16
|
var useIssueProperty_1 = require("./hooks/useIssueProperty");
|
|
17
17
|
Object.defineProperty(exports, "useIssueProperty", { enumerable: true, get: function () { return useIssueProperty_1.useIssueProperty; } });
|
|
18
|
-
var useForm_1 = require("./hooks/useForm");
|
|
19
|
-
Object.defineProperty(exports, "useForm", { enumerable: true, get: function () { return useForm_1.useForm; } });
|
|
20
|
-
tslib_1.__exportStar(require("./package-types"), exports);
|
package/out/reconciler.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export interface ForgeDoc {
|
|
|
7
7
|
props: ElementProps;
|
|
8
8
|
children: ForgeDoc[];
|
|
9
9
|
key: string;
|
|
10
|
-
|
|
10
|
+
reconciliationCount?: number;
|
|
11
11
|
}
|
|
12
12
|
export declare type CallBridge = (cmd: string, data: {
|
|
13
13
|
forgeDoc: ForgeDoc;
|
|
@@ -16,8 +16,17 @@ export declare const callBridge: CallBridge;
|
|
|
16
16
|
declare type CreateElement = (args: {
|
|
17
17
|
type: ElementType;
|
|
18
18
|
props: InstanceProps;
|
|
19
|
-
forgeReactMajorVersion?: number;
|
|
20
19
|
}) => ForgeDoc;
|
|
20
|
+
export declare class ReconciliationCounter {
|
|
21
|
+
private count;
|
|
22
|
+
private disabled;
|
|
23
|
+
private static instance;
|
|
24
|
+
private constructor();
|
|
25
|
+
static getInstance(disable?: boolean): ReconciliationCounter;
|
|
26
|
+
increment(): void;
|
|
27
|
+
getCount(): number | undefined;
|
|
28
|
+
getNextCount(): number | undefined;
|
|
29
|
+
}
|
|
21
30
|
export declare const createElement: CreateElement;
|
|
22
31
|
export declare const appendChild: (parent: ForgeDoc, child: ForgeDoc) => void;
|
|
23
32
|
export declare const insertBefore: (parent: ForgeDoc, child: ForgeDoc, beforeChild: ForgeDoc) => void;
|