@jetbrains/ring-ui 4.1.28 → 4.2.2
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 +12 -0
- package/components/alert/alert.test.js +2 -2
- package/components/alert-service/alert-service.js +1 -1
- package/components/analytics/analytics__ga-plugin.js +1 -0
- package/components/auth-dialog-service/auth-dialog-service.js +1 -1
- package/components/confirm-service/confirm-service.js +1 -1
- package/components/confirm-service/confirm-service.test.js +1 -1
- package/components/global/angular-component-factory.js +1 -1
- package/components/global/react-render-adapter.js +36 -0
- package/components/global/rerender-hoc.js +5 -2
- package/components/login-dialog/service.js +2 -1
- package/components/select/select.examples.js +27 -0
- package/components/select/select__popup.js +10 -4
- package/components/select-ng/select-ng.js +16 -5
- package/components/select-ng/select-ng__lazy.js +11 -6
- package/components/select-ng/select-ng__lazy.test.js +3 -1
- package/components/table/table.examples.js +3 -1
- package/components/tooltip-ng/tooltip-ng.js +13 -10
- package/components/user-agreement/service.js +1 -1
- package/dist/alert-service/alert-service.js +2 -1
- package/dist/analytics/analytics__ga-plugin.js +1 -0
- package/dist/auth/auth.js +1 -0
- package/dist/auth/auth__core.js +1 -0
- package/dist/auth/down-notification.js +1 -0
- package/dist/auth/iframe-flow.js +2 -1
- package/dist/auth/landing.js +1 -0
- package/dist/auth/storage.js +1 -0
- package/dist/auth-dialog-service/auth-dialog-service.js +3 -2
- package/dist/auth-ng/auth-ng.js +1 -0
- package/dist/avatar-editor-ng/avatar-editor-ng.js +1 -0
- package/dist/avatar-ng/avatar-ng.js +1 -0
- package/dist/badge-ng/badge-ng.js +1 -0
- package/dist/confirm-ng/confirm-ng.js +2 -1
- package/dist/confirm-service/confirm-service.js +3 -2
- package/dist/data-list-ng/data-list-ng.js +1 -0
- package/dist/global/angular-component-factory.js +2 -1
- package/dist/global/react-render-adapter.js +41 -0
- package/dist/global/rerender-hoc.js +5 -2
- package/dist/header/header.js +1 -0
- package/dist/header/smart-profile.js +1 -0
- package/dist/header/smart-services.js +1 -0
- package/dist/login-dialog/service.js +3 -2
- package/dist/pager/pager.js +2 -0
- package/dist/pager-ng/pager-ng.js +2 -0
- package/dist/permissions-ng/permissions-ng.js +1 -0
- package/dist/progress-bar-ng/progress-bar-ng.js +1 -0
- package/dist/query-assist/query-assist.js +2 -0
- package/dist/query-assist-ng/query-assist-ng.js +2 -0
- package/dist/select/select.js +2 -0
- package/dist/select/select__popup.js +7 -2
- package/dist/select-ng/select-ng.js +20 -6
- package/dist/select-ng/select-ng__lazy.js +11 -8
- package/dist/storage/storage.js +1 -0
- package/dist/storage/storage__local.js +1 -0
- package/dist/table-legacy-ng/table-legacy-ng.js +2 -0
- package/dist/table-legacy-ng/table-legacy-ng__pager.js +2 -0
- package/dist/table-ng/smart-table-ng.js +1 -0
- package/dist/table-ng/table-ng.js +1 -0
- package/dist/tags-input/tags-input.js +2 -0
- package/dist/tags-input-ng/tags-input-ng.js +2 -0
- package/dist/toggle-ng/toggle-ng.js +1 -0
- package/dist/tooltip-ng/tooltip-ng.js +11 -7
- package/dist/user-agreement/service.js +2 -1
- package/dist/user-card-ng/user-card-ng.js +1 -0
- package/package.json +26 -26
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [4.2.0]
|
|
2
|
+
|
|
3
|
+
### React 18 support
|
|
4
|
+
|
|
5
|
+
To enable the new root API, add the following code before any rendering:
|
|
6
|
+
```js
|
|
7
|
+
import * as client from 'react-dom/client'
|
|
8
|
+
import {setClient} from '@jetbrains/ring-ui/components/global/react-render-adapter'
|
|
9
|
+
|
|
10
|
+
setClient(client)
|
|
11
|
+
```
|
|
12
|
+
|
|
1
13
|
## [4.1.0]
|
|
2
14
|
|
|
3
15
|
### Pre-built version
|
|
@@ -41,11 +41,11 @@ describe('Alert', () => {
|
|
|
41
41
|
should.not.exist(screen.queryByRole('button', {name: 'close alert'}));
|
|
42
42
|
});
|
|
43
43
|
|
|
44
|
-
it('should call onCloseRequest on click by close button', () => {
|
|
44
|
+
it('should call onCloseRequest on click by close button', async () => {
|
|
45
45
|
const closeSpy = sandbox.spy();
|
|
46
46
|
render(<Alert onCloseRequest={closeSpy}>{'Test element'}</Alert>);
|
|
47
47
|
const closeElement = screen.queryByRole('button', {name: 'close alert'});
|
|
48
|
-
userEvent.click(closeElement);
|
|
48
|
+
await userEvent.click(closeElement);
|
|
49
49
|
closeSpy.should.have.been.called;
|
|
50
50
|
});
|
|
51
51
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {Simulate} from 'react-dom/test-utils';
|
|
2
|
-
import {unmountComponentAtNode} from 'react-dom';
|
|
3
2
|
|
|
3
|
+
import {unmountComponentAtNode} from '../global/react-render-adapter';
|
|
4
4
|
import islandStyles from '../island/island.css';
|
|
5
5
|
|
|
6
6
|
import confirm, {containerElement} from './confirm-service';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import angular from 'angular';
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import {render, unmountComponentAtNode} from 'react-dom';
|
|
5
4
|
|
|
5
|
+
import {render, unmountComponentAtNode} from './react-render-adapter';
|
|
6
6
|
import RingAngularComponent from './ring-angular-component';
|
|
7
7
|
|
|
8
8
|
import DomRenderer from './react-dom-renderer';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Allows overriding ReactDOM.render when using React 18:
|
|
2
|
+
// import * as client from 'react-dom/client'
|
|
3
|
+
// import {setClient} from '@jetbrains/ring-ui/components/global/react-render-adapter'
|
|
4
|
+
//
|
|
5
|
+
// setClient(client)
|
|
6
|
+
import {
|
|
7
|
+
render as legacyRender,
|
|
8
|
+
unmountComponentAtNode as legacyUnmountComponentAtNode,
|
|
9
|
+
hydrate as legacyHydrate
|
|
10
|
+
} from 'react-dom';
|
|
11
|
+
|
|
12
|
+
/* eslint-disable import/no-mutable-exports */
|
|
13
|
+
export let render = legacyRender;
|
|
14
|
+
export let unmountComponentAtNode = legacyUnmountComponentAtNode;
|
|
15
|
+
export let hydrate = legacyHydrate;
|
|
16
|
+
/* eslint-enable */
|
|
17
|
+
|
|
18
|
+
export function setClient({createRoot, hydrateRoot}) {
|
|
19
|
+
const roots = new WeakMap();
|
|
20
|
+
|
|
21
|
+
render = (element, container) => {
|
|
22
|
+
let root = roots.get(container);
|
|
23
|
+
if (root == null) {
|
|
24
|
+
root = createRoot(container);
|
|
25
|
+
roots.set(container, root);
|
|
26
|
+
}
|
|
27
|
+
root.render(element);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
unmountComponentAtNode = container => roots.get(container)?.unmount();
|
|
31
|
+
|
|
32
|
+
hydrate = (element, container) => {
|
|
33
|
+
const root = hydrateRoot(container, element);
|
|
34
|
+
roots.set(container, root);
|
|
35
|
+
};
|
|
36
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import {createElement} from 'react';
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import {render} from './react-render-adapter';
|
|
4
|
+
import composeRefs from './composeRefs';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* Wraps a component to add a "rerender" method
|
|
@@ -28,8 +30,9 @@ export default function rerenderHOC(ComposedComponent, {captureNode} = {captureN
|
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
this._propsCache = Object.assign({}, this.props, this._propsCache, props);
|
|
33
|
+
this._propsCache.ref = composeRefs(this._propsCache.ref, callback);
|
|
31
34
|
|
|
32
|
-
|
|
35
|
+
render(createElement(this.constructor, this._propsCache), container);
|
|
33
36
|
}
|
|
34
37
|
};
|
|
35
38
|
}
|
|
@@ -5,6 +5,8 @@ import warningIcon from '@jetbrains/icons/warning';
|
|
|
5
5
|
import reactDecorator from '../../.storybook/react-decorator';
|
|
6
6
|
import hubConfig from '../../.storybook/hub-config';
|
|
7
7
|
|
|
8
|
+
import Text from '../text/text';
|
|
9
|
+
|
|
8
10
|
import Link from '@jetbrains/ring-ui/components/link/link';
|
|
9
11
|
import Popup from '@jetbrains/ring-ui/components/popup/popup';
|
|
10
12
|
import List from '@jetbrains/ring-ui/components/list/list';
|
|
@@ -961,6 +963,31 @@ export const multipleWithSelectAllAndDisabledItem = args => <Select {...args}/>;
|
|
|
961
963
|
multipleWithSelectAllAndDisabledItem.storyName = 'multiple with select all and disabled item';
|
|
962
964
|
multipleWithSelectAllAndDisabledItem.parameters = {hermione: {skip: true}};
|
|
963
965
|
|
|
966
|
+
export const multipleWithSelectAllAndCustomLabels = args => <Select {...args}/>;
|
|
967
|
+
{
|
|
968
|
+
const data = [
|
|
969
|
+
{label: 'One long label', key: '1'},
|
|
970
|
+
{label: 'Two long label', key: '2'},
|
|
971
|
+
{label: 'Three long label', key: '3'}
|
|
972
|
+
];
|
|
973
|
+
|
|
974
|
+
const multipleConfig = {
|
|
975
|
+
selectAll: true,
|
|
976
|
+
selectAllLabel: 'All Items',
|
|
977
|
+
deselectAllLabel: 'None Items',
|
|
978
|
+
renderSelectedItemsDescription: selected => <Text info>{`${selected.length} items selected`}</Text>
|
|
979
|
+
};
|
|
980
|
+
|
|
981
|
+
multipleWithSelectAllAndCustomLabels.args = {
|
|
982
|
+
filter: true,
|
|
983
|
+
multiple: multipleConfig,
|
|
984
|
+
selected: [data[1]],
|
|
985
|
+
data
|
|
986
|
+
};
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
multipleWithSelectAllAndCustomLabels.storyName = 'multiple with select all and custom labels';
|
|
990
|
+
multipleWithSelectAllAndCustomLabels.parameters = {hermione: {skip: true}};
|
|
964
991
|
|
|
965
992
|
export const multipleWithLimit = args => <Select {...args}/>;
|
|
966
993
|
{
|
|
@@ -63,7 +63,10 @@ export default class SelectPopup extends PureComponent {
|
|
|
63
63
|
multiple: PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({
|
|
64
64
|
label: PropTypes.string,
|
|
65
65
|
limit: PropTypes.number,
|
|
66
|
-
selectAll: PropTypes.bool
|
|
66
|
+
selectAll: PropTypes.bool,
|
|
67
|
+
selectAllLabel: PropTypes.string,
|
|
68
|
+
deselectAllLabel: PropTypes.string,
|
|
69
|
+
renderSelectedItemsDescription: PropTypes.func
|
|
67
70
|
})]),
|
|
68
71
|
left: PropTypes.bool,
|
|
69
72
|
loading: PropTypes.bool,
|
|
@@ -406,12 +409,15 @@ export default class SelectPopup extends PureComponent {
|
|
|
406
409
|
onClick={this.handleSelectAll}
|
|
407
410
|
>
|
|
408
411
|
{activeFilters.length !== this.props.selected.length
|
|
409
|
-
? 'Select all'
|
|
410
|
-
: 'Deselect all'}
|
|
412
|
+
? this.props.multiple.selectAllLabel || 'Select all'
|
|
413
|
+
: this.props.multiple.deselectAllLabel || 'Deselect all'}
|
|
411
414
|
</Button>
|
|
412
415
|
)
|
|
413
416
|
}
|
|
414
|
-
|
|
417
|
+
{this.props.multiple.renderSelectedItemsDescription
|
|
418
|
+
?.(this.props.selected, activeFilters.length) || (
|
|
419
|
+
<Text info>{`${this.props.selected.length} selected`}</Text>
|
|
420
|
+
)}
|
|
415
421
|
</div>
|
|
416
422
|
);
|
|
417
423
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import angular from 'angular';
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import {render, unmountComponentAtNode} from 'react-dom';
|
|
5
4
|
|
|
5
|
+
import {render, unmountComponentAtNode} from '../global/react-render-adapter';
|
|
6
6
|
import getEventKey from '../global/get-event-key';
|
|
7
7
|
import Select, {RerenderableSelect} from '../select/select';
|
|
8
8
|
import MessageBundle from '../message-bundle-ng/message-bundle-ng';
|
|
@@ -375,9 +375,15 @@ angularModule.directive('rgSelect', function rgSelectDirective() {
|
|
|
375
375
|
return sizes[ctrl.size] || sizes.FULL;
|
|
376
376
|
}
|
|
377
377
|
|
|
378
|
+
function selectRef(instance) {
|
|
379
|
+
if (instance != null) {
|
|
380
|
+
ctrl.selectInstance = instance;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
378
384
|
function reRenderSelect(props) {
|
|
379
|
-
if (ctrl.selectInstance
|
|
380
|
-
ctrl.selectInstance.rerender(props);
|
|
385
|
+
if (ctrl.selectInstance?.node) {
|
|
386
|
+
ctrl.selectInstance.rerender({...props, ref: selectRef});
|
|
381
387
|
}
|
|
382
388
|
}
|
|
383
389
|
|
|
@@ -516,9 +522,14 @@ angularModule.directive('rgSelect', function rgSelectDirective() {
|
|
|
516
522
|
ctrl.config = angular.extend({}, ctrl.defaultConfig, ctrl.config || {});
|
|
517
523
|
|
|
518
524
|
if (getType() === 'suggest' || getType() === 'input') {
|
|
519
|
-
|
|
525
|
+
render(
|
|
526
|
+
<RerenderableSelect
|
|
527
|
+
ref={selectRef}
|
|
528
|
+
{...ctrl.config}
|
|
529
|
+
/>,
|
|
530
|
+
container);
|
|
520
531
|
} else {
|
|
521
|
-
ctrl.selectInstance = new SelectLazy(container, ctrl.config, ctrl, getType());
|
|
532
|
+
ctrl.selectInstance = new SelectLazy(container, ctrl.config, ctrl, getType(), selectRef);
|
|
522
533
|
}
|
|
523
534
|
|
|
524
535
|
// Preserve existing contents of the directive
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import angular from 'angular';
|
|
2
2
|
|
|
3
|
-
import {render, hydrate} from 'react-dom';
|
|
4
3
|
import React from 'react';
|
|
5
4
|
|
|
5
|
+
import {render, hydrate} from '../global/react-render-adapter';
|
|
6
6
|
import {RerenderableSelect} from '../select/select';
|
|
7
7
|
|
|
8
8
|
class SelectLazy {
|
|
9
|
-
constructor(container, props, ctrl, type) {
|
|
9
|
+
constructor(container, props, ctrl, type, selectRef) {
|
|
10
10
|
this.container = container;
|
|
11
11
|
this.ctrl = ctrl;
|
|
12
12
|
this.props = props || {};
|
|
13
13
|
this.type = type;
|
|
14
14
|
this.node = container;
|
|
15
|
+
this.selectRef = selectRef;
|
|
15
16
|
this._popup = {
|
|
16
17
|
isVisible: angular.noop
|
|
17
18
|
};
|
|
@@ -46,7 +47,12 @@ class SelectLazy {
|
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
render(props) {
|
|
49
|
-
this.reactSelect =
|
|
50
|
+
this.reactSelect = (
|
|
51
|
+
<RerenderableSelect
|
|
52
|
+
ref={this.selectRef}
|
|
53
|
+
{...Object.assign({}, this.props, props || {})}
|
|
54
|
+
/>
|
|
55
|
+
);
|
|
50
56
|
this.props = this.reactSelect.props;
|
|
51
57
|
|
|
52
58
|
if (this.type !== 'dropdown') {
|
|
@@ -58,10 +64,9 @@ class SelectLazy {
|
|
|
58
64
|
_clickHandler() {
|
|
59
65
|
this.detachEvents();
|
|
60
66
|
if (this.type === 'dropdown') {
|
|
61
|
-
|
|
62
|
-
this.ctrl.selectInstance._openPopupIfClosed();
|
|
67
|
+
render(this.reactSelect, this.container);
|
|
63
68
|
} else {
|
|
64
|
-
|
|
69
|
+
hydrate(this.reactSelect, this.container);
|
|
65
70
|
}
|
|
66
71
|
}
|
|
67
72
|
}
|
|
@@ -67,7 +67,9 @@ describe('Select Lazy', () => {
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
function renderLazySelect(type = 'button') {
|
|
70
|
-
const lazySelect = new SelectLazy(containerNode, {}, ctrl, type
|
|
70
|
+
const lazySelect = new SelectLazy(containerNode, {}, ctrl, type, instance => {
|
|
71
|
+
ctrl.selectInstance = instance;
|
|
72
|
+
});
|
|
71
73
|
lazySelect.render();
|
|
72
74
|
return lazySelect;
|
|
73
75
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import angular from 'angular';
|
|
2
2
|
|
|
3
3
|
import {createElement} from 'react';
|
|
4
|
-
import {render} from 'react-dom';
|
|
5
4
|
import classNames from 'classnames';
|
|
6
5
|
|
|
6
|
+
import {render} from '../global/react-render-adapter';
|
|
7
7
|
import Popup from '../popup/popup';
|
|
8
8
|
|
|
9
9
|
import './tooltip-ng.css';
|
|
@@ -58,15 +58,18 @@ name.factory('RgTooltipPopup', function RgTooltipPopupDirective() {
|
|
|
58
58
|
trapFocus: false
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
-
this.renderPopup = props =>
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
61
|
+
this.renderPopup = props => render(
|
|
62
|
+
createElement(Popup, {
|
|
63
|
+
...this.defaultProps,
|
|
64
|
+
...props,
|
|
65
|
+
ref: instance => {
|
|
66
|
+
if (instance != null) {
|
|
67
|
+
this.popup = instance;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}, this.text),
|
|
71
|
+
this.wrapperElement
|
|
72
|
+
);
|
|
70
73
|
|
|
71
74
|
this.displayTooltip = customClass => {
|
|
72
75
|
const text = textGetter();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {render, unmountComponentAtNode} from 'react-dom';
|
|
3
2
|
|
|
3
|
+
import {render, unmountComponentAtNode} from '../global/react-render-adapter';
|
|
4
4
|
import Storage from '../storage/storage';
|
|
5
5
|
import alertService from '../alert-service/alert-service';
|
|
6
6
|
import Link from '../link/link';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { _ as _defineProperty, a as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { render } from 'react-
|
|
4
|
+
import { render } from '../global/react-render-adapter.js';
|
|
5
5
|
import getUID from '../global/get-uid.js';
|
|
6
6
|
import Alert, { ANIMATION_TIME } from '../alert/alert.js';
|
|
7
7
|
import Alerts from '../alert/container.js';
|
|
8
|
+
import 'react-dom';
|
|
8
9
|
import 'classnames';
|
|
9
10
|
import 'prop-types';
|
|
10
11
|
import '@jetbrains/icons/exception';
|
package/dist/auth/auth.js
CHANGED
|
@@ -11,6 +11,7 @@ import 'react';
|
|
|
11
11
|
import 'prop-types';
|
|
12
12
|
import '../alert-service/alert-service.js';
|
|
13
13
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
14
|
+
import '../global/react-render-adapter.js';
|
|
14
15
|
import 'react-dom';
|
|
15
16
|
import '../global/get-uid.js';
|
|
16
17
|
import '../alert/alert.js';
|
package/dist/auth/auth__core.js
CHANGED
|
@@ -15,6 +15,7 @@ import '../storage/storage.js';
|
|
|
15
15
|
import '../storage/storage__local.js';
|
|
16
16
|
import '../alert-service/alert-service.js';
|
|
17
17
|
import 'react';
|
|
18
|
+
import '../global/react-render-adapter.js';
|
|
18
19
|
import 'react-dom';
|
|
19
20
|
import '../global/get-uid.js';
|
|
20
21
|
import '../alert/alert.js';
|
|
@@ -6,6 +6,7 @@ import Link from '../link/link.js';
|
|
|
6
6
|
import Group from '../group/group.js';
|
|
7
7
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
8
8
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
9
|
+
import '../global/react-render-adapter.js';
|
|
9
10
|
import 'react-dom';
|
|
10
11
|
import '../global/get-uid.js';
|
|
11
12
|
import '../alert/container.js';
|
package/dist/auth/iframe-flow.js
CHANGED
|
@@ -3,9 +3,10 @@ import React from 'react';
|
|
|
3
3
|
import showAuthDialog from '../login-dialog/service.js';
|
|
4
4
|
import Link from '../link/link.js';
|
|
5
5
|
import AuthResponseParser from './response-parser.js';
|
|
6
|
+
import '../global/react-render-adapter.js';
|
|
7
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
6
8
|
import 'react-dom';
|
|
7
9
|
import '../login-dialog/login-dialog.js';
|
|
8
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
9
10
|
import 'prop-types';
|
|
10
11
|
import '../dialog/dialog.js';
|
|
11
12
|
import 'classnames';
|
package/dist/auth/landing.js
CHANGED
package/dist/auth/storage.js
CHANGED
|
@@ -4,6 +4,7 @@ import '../storage/storage__local.js';
|
|
|
4
4
|
import '../alert-service/alert-service.js';
|
|
5
5
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
6
6
|
import 'react';
|
|
7
|
+
import '../global/react-render-adapter.js';
|
|
7
8
|
import 'react-dom';
|
|
8
9
|
import '../global/get-uid.js';
|
|
9
10
|
import '../alert/alert.js';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { render } from 'react-
|
|
2
|
+
import { render } from '../global/react-render-adapter.js';
|
|
3
3
|
import AuthDialog from '../auth-dialog/auth-dialog.js';
|
|
4
|
-
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
5
4
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
6
7
|
import 'core-js/modules/es.string.replace.js';
|
|
7
8
|
import 'prop-types';
|
|
8
9
|
import 'classnames';
|
package/dist/auth-ng/auth-ng.js
CHANGED
|
@@ -12,6 +12,7 @@ import 'react';
|
|
|
12
12
|
import 'prop-types';
|
|
13
13
|
import '../alert-service/alert-service.js';
|
|
14
14
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
15
|
+
import '../global/react-render-adapter.js';
|
|
15
16
|
import 'react-dom';
|
|
16
17
|
import '../global/get-uid.js';
|
|
17
18
|
import '../alert/alert.js';
|
|
@@ -7,6 +7,7 @@ import template from './avatar-editor-ng__template.js';
|
|
|
7
7
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
8
8
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
9
9
|
import 'react';
|
|
10
|
+
import '../global/react-render-adapter.js';
|
|
10
11
|
import 'react-dom';
|
|
11
12
|
import '../global/get-uid.js';
|
|
12
13
|
import '../alert/alert.js';
|
|
@@ -4,6 +4,7 @@ import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
|
4
4
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
5
|
import 'angular';
|
|
6
6
|
import 'react';
|
|
7
|
+
import '../global/react-render-adapter.js';
|
|
7
8
|
import 'react-dom';
|
|
8
9
|
import '../global/ring-angular-component.js';
|
|
9
10
|
import '../global/react-dom-renderer.js';
|
|
@@ -4,6 +4,7 @@ import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
|
4
4
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
5
|
import 'angular';
|
|
6
6
|
import 'react';
|
|
7
|
+
import '../global/react-render-adapter.js';
|
|
7
8
|
import 'react-dom';
|
|
8
9
|
import '../global/ring-angular-component.js';
|
|
9
10
|
import '../global/react-dom-renderer.js';
|
|
@@ -2,10 +2,11 @@ import angular from 'angular';
|
|
|
2
2
|
import confirm from '../confirm-service/confirm-service.js';
|
|
3
3
|
import MessageBundle from '../message-bundle-ng/message-bundle-ng.js';
|
|
4
4
|
import 'react';
|
|
5
|
+
import '../global/react-render-adapter.js';
|
|
6
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
7
|
import 'react-dom';
|
|
6
8
|
import '../confirm/confirm.js';
|
|
7
9
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
8
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
9
10
|
import 'prop-types';
|
|
10
11
|
import '../dialog/dialog.js';
|
|
11
12
|
import 'classnames';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { render } from 'react-
|
|
2
|
+
import { render } from '../global/react-render-adapter.js';
|
|
3
3
|
import Confirm from '../confirm/confirm.js';
|
|
4
|
-
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
5
4
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
6
7
|
import 'prop-types';
|
|
7
8
|
import '../dialog/dialog.js';
|
|
8
9
|
import 'classnames';
|
|
@@ -4,6 +4,7 @@ import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
|
4
4
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
5
|
import 'angular';
|
|
6
6
|
import 'react';
|
|
7
|
+
import '../global/react-render-adapter.js';
|
|
7
8
|
import 'react-dom';
|
|
8
9
|
import '../global/ring-angular-component.js';
|
|
9
10
|
import '../global/react-dom-renderer.js';
|
|
@@ -2,9 +2,10 @@ import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
|
2
2
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
3
|
import angular from 'angular';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { unmountComponentAtNode, render } from 'react-
|
|
5
|
+
import { unmountComponentAtNode, render } from './react-render-adapter.js';
|
|
6
6
|
import RingAngularComponent from './ring-angular-component.js';
|
|
7
7
|
import Renderer from './react-dom-renderer.js';
|
|
8
|
+
import 'react-dom';
|
|
8
9
|
import 'prop-types';
|
|
9
10
|
|
|
10
11
|
function getAngularComponentName(name) {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
|
+
import { render as render$1, unmountComponentAtNode as unmountComponentAtNode$1, hydrate as hydrate$1 } from 'react-dom';
|
|
3
|
+
|
|
4
|
+
/* eslint-disable import/no-mutable-exports */
|
|
5
|
+
|
|
6
|
+
let render = render$1;
|
|
7
|
+
let unmountComponentAtNode = unmountComponentAtNode$1;
|
|
8
|
+
let hydrate = hydrate$1;
|
|
9
|
+
/* eslint-enable */
|
|
10
|
+
|
|
11
|
+
function setClient(_ref) {
|
|
12
|
+
let {
|
|
13
|
+
createRoot,
|
|
14
|
+
hydrateRoot
|
|
15
|
+
} = _ref;
|
|
16
|
+
const roots = new WeakMap();
|
|
17
|
+
|
|
18
|
+
render = (element, container) => {
|
|
19
|
+
let root = roots.get(container);
|
|
20
|
+
|
|
21
|
+
if (root == null) {
|
|
22
|
+
root = createRoot(container);
|
|
23
|
+
roots.set(container, root);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
root.render(element);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
unmountComponentAtNode = container => {
|
|
30
|
+
var _roots$get;
|
|
31
|
+
|
|
32
|
+
return (_roots$get = roots.get(container)) === null || _roots$get === void 0 ? void 0 : _roots$get.unmount();
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
hydrate = (element, container) => {
|
|
36
|
+
const root = hydrateRoot(container, element);
|
|
37
|
+
roots.set(container, root);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { hydrate, render, setClient, unmountComponentAtNode };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
3
|
import { createElement } from 'react';
|
|
4
|
-
import { render } from 'react-
|
|
4
|
+
import { render } from './react-render-adapter.js';
|
|
5
|
+
import composeRefs from './composeRefs.js';
|
|
6
|
+
import 'react-dom';
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* Wraps a component to add a "rerender" method
|
|
@@ -43,7 +45,8 @@ function rerenderHOC(ComposedComponent) {
|
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
this._propsCache = Object.assign({}, this.props, this._propsCache, props);
|
|
46
|
-
|
|
48
|
+
this._propsCache.ref = composeRefs(this._propsCache.ref, callback);
|
|
49
|
+
render( /*#__PURE__*/createElement(this.constructor, this._propsCache), container);
|
|
47
50
|
}
|
|
48
51
|
|
|
49
52
|
};
|
package/dist/header/header.js
CHANGED
|
@@ -75,6 +75,7 @@ import '../auth/response-parser.js';
|
|
|
75
75
|
import 'es6-error';
|
|
76
76
|
import '../auth/down-notification.js';
|
|
77
77
|
import '../alert-service/alert-service.js';
|
|
78
|
+
import '../global/react-render-adapter.js';
|
|
78
79
|
import '../alert/alert.js';
|
|
79
80
|
import '@jetbrains/icons/exception';
|
|
80
81
|
import '@jetbrains/icons/warning';
|