@aj-shadow/z-abs-complayer-bootstrap-client 0.0.0-aj-beta.227 → 0.0.0-aj-beta.237
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/npm-shrinkwrap.json +3 -3
- package/package.json +2 -2
- package/project/client/_build/Bundle-CompLayer-Bootstrap-client.bld +11 -20
- package/project/client/breadcrump.jsx +7 -7
- package/project/client/button-new.jsx +24 -107
- package/project/client/button-text.jsx +43 -105
- package/project/client/button.jsx +6 -9
- package/project/client/core-components/{button.jsx → orig-button.jsx} +6 -9
- package/project/client/css/button.css +2 -0
- package/project/client/css/modal.css +1 -1
- package/project/client/css/original/bootstrap.css +1 -1
- package/project/client/css/popup.css +167 -10
- package/project/client/icons/file-icons.js +4 -5
- package/project/client/icons/folder-icons.js +5 -6
- package/project/client/icons-inline/const.js +2 -5
- package/project/client/icons-inline/icon-align.jsx +5 -5
- package/project/client/icons-inline/icon-checkbox.jsx +4 -4
- package/project/client/icons-inline/icon-communication-address.jsx +5 -5
- package/project/client/icons-inline/icon-communication-info.jsx +6 -6
- package/project/client/icons-inline/icon-communication-instance.jsx +6 -6
- package/project/client/icons-inline/icon-communication-ip.jsx +5 -5
- package/project/client/icons-inline/icon-communication-stack.jsx +6 -6
- package/project/client/icons-inline/icon-communication-transport.jsx +5 -5
- package/project/client/icons-inline/icon-communication.jsx +5 -5
- package/project/client/icons-inline/icon-con-connection-events.jsx +5 -5
- package/project/client/icons-inline/icon-con-message-events.jsx +5 -5
- package/project/client/icons-inline/icon-con-messages.jsx +4 -4
- package/project/client/icons-inline/icon-con-server-events.jsx +5 -5
- package/project/client/icons-inline/icon-debug-breakpoints-deactivate.jsx +4 -4
- package/project/client/icons-inline/icon-debug-breakpoints-remove.jsx +4 -4
- package/project/client/icons-inline/icon-debug-continue.jsx +4 -4
- package/project/client/icons-inline/icon-debug-enter.jsx +4 -4
- package/project/client/icons-inline/icon-debug-gui.jsx +4 -4
- package/project/client/icons-inline/icon-debug-ip.jsx +4 -4
- package/project/client/icons-inline/icon-debug-leave.jsx +4 -4
- package/project/client/icons-inline/icon-debug-pause.jsx +4 -4
- package/project/client/icons-inline/icon-debug-step-in.jsx +4 -4
- package/project/client/icons-inline/icon-debug-step-out.jsx +4 -4
- package/project/client/icons-inline/icon-debug-step-over.jsx +4 -4
- package/project/client/icons-inline/icon-debug-step.jsx +4 -4
- package/project/client/icons-inline/icon-doc-docs.jsx +4 -4
- package/project/client/icons-inline/icon-doc-documentation.jsx +4 -4
- package/project/client/icons-inline/icon-doc-education.jsx +4 -4
- package/project/client/icons-inline/icon-doc-markup-preview.jsx +4 -4
- package/project/client/icons-inline/icon-doc-markup.jsx +4 -4
- package/project/client/icons-inline/icon-doc-navigation-preview.jsx +4 -4
- package/project/client/icons-inline/icon-doc-navigation.jsx +4 -4
- package/project/client/icons-inline/icon-doc-video.jsx +4 -4
- package/project/client/icons-inline/icon-doc-workshop.jsx +4 -4
- package/project/client/icons-inline/icon-empty-line.jsx +4 -4
- package/project/client/icons-inline/icon-execution-as-service.jsx +4 -4
- package/project/client/icons-inline/icon-execution-clear.jsx +4 -4
- package/project/client/icons-inline/icon-execution-gui-slow.jsx +4 -4
- package/project/client/icons-inline/icon-execution-ip-slow.jsx +4 -4
- package/project/client/icons-inline/icon-execution-logs.jsx +4 -4
- package/project/client/icons-inline/icon-execution-play-slow.jsx +4 -4
- package/project/client/icons-inline/icon-execution-play.jsx +4 -4
- package/project/client/icons-inline/icon-execution-stop.jsx +4 -4
- package/project/client/icons-inline/icon-file-add.jsx +5 -5
- package/project/client/icons-inline/icon-file-delete.jsx +6 -6
- package/project/client/icons-inline/icon-file-new.jsx +5 -5
- package/project/client/icons-inline/icon-file-property.jsx +5 -5
- package/project/client/icons-inline/icon-file-save.jsx +6 -6
- package/project/client/icons-inline/icon-file-search.jsx +5 -5
- package/project/client/icons-inline/icon-files-save.jsx +6 -6
- package/project/client/icons-inline/icon-filter-hide.jsx +4 -4
- package/project/client/icons-inline/icon-filter-show.jsx +4 -4
- package/project/client/icons-inline/icon-filter.jsx +4 -4
- package/project/client/icons-inline/icon-folder-add.jsx +5 -5
- package/project/client/icons-inline/icon-folder-delete.jsx +6 -6
- package/project/client/icons-inline/icon-folder-new.jsx +5 -5
- package/project/client/icons-inline/icon-folder-property.jsx +5 -5
- package/project/client/icons-inline/icon-gui-event-action.jsx +6 -6
- package/project/client/icons-inline/icon-gui-event-function.jsx +6 -6
- package/project/client/icons-inline/icon-gui-event-info.jsx +6 -6
- package/project/client/icons-inline/icon-gui-event-instance.jsx +6 -6
- package/project/client/icons-inline/icon-gui-event-object.jsx +5 -5
- package/project/client/icons-inline/icon-gui-event-stack.jsx +6 -6
- package/project/client/icons-inline/icon-gui-events.jsx +5 -5
- package/project/client/icons-inline/icon-guid.jsx +4 -4
- package/project/client/icons-inline/icon-line-first.jsx +4 -4
- package/project/client/icons-inline/icon-line-last.jsx +4 -4
- package/project/client/icons-inline/icon-line-next-block.jsx +4 -4
- package/project/client/icons-inline/icon-line-next-line.jsx +4 -4
- package/project/client/icons-inline/icon-line-previous-block.jsx +4 -4
- package/project/client/icons-inline/icon-line-previous-line.jsx +4 -4
- package/project/client/icons-inline/icon-link.jsx +4 -4
- package/project/client/icons-inline/icon-markup-close.jsx +4 -4
- package/project/client/icons-inline/icon-markup-copy.jsx +4 -4
- package/project/client/icons-inline/icon-markup-help.jsx +4 -4
- package/project/client/icons-inline/icon-markup-open.jsx +4 -4
- package/project/client/icons-inline/icon-markup-save.jsx +4 -4
- package/project/client/icons-inline/icon-mode-dark.jsx +4 -4
- package/project/client/icons-inline/icon-mode-light.jsx +4 -4
- package/project/client/icons-inline/icon-not-implemented.jsx +5 -5
- package/project/client/icons-inline/icon-phase-data.jsx +4 -4
- package/project/client/icons-inline/icon-phase-execution.jsx +4 -4
- package/project/client/icons-inline/icon-phase-none.jsx +4 -4
- package/project/client/icons-inline/icon-phase-postcondition.jsx +4 -4
- package/project/client/icons-inline/icon-phase-precondition.jsx +4 -4
- package/project/client/icons-inline/icon-project-save.jsx +6 -6
- package/project/client/icons-inline/icon-repo.jsx +4 -4
- package/project/client/icons-inline/icon-resize-horizontal-decrease.jsx +4 -4
- package/project/client/icons-inline/icon-resize-horizontal-increase.jsx +5 -5
- package/project/client/icons-inline/icon-scroll-auto.jsx +4 -4
- package/project/client/icons-inline/icon-stack-event-info.jsx +6 -6
- package/project/client/icons-inline/icon-stack-event-instance.jsx +6 -6
- package/project/client/icons-inline/icon-stack-event-stack.jsx +6 -6
- package/project/client/icons-inline/icon-stack-events.jsx +6 -6
- package/project/client/icons-inline/icon-stage-create-static-ip-address.jsx +4 -4
- package/project/client/icons-inline/icon-stage-delete-static-ip-address.jsx +4 -4
- package/project/client/icons-inline/icon-stage-host.jsx +10 -10
- package/project/client/icons-inline/icon-stage-ping.jsx +4 -4
- package/project/client/icons-inline/icon-stage.jsx +4 -4
- package/project/client/icons-inline/icon-state-event-executed.jsx +5 -5
- package/project/client/icons-inline/icon-state-event-not-executed.jsx +5 -5
- package/project/client/icons-inline/icon-zoom-in.jsx +4 -4
- package/project/client/icons-inline/icon-zoom-out.jsx +5 -5
- package/project/client/icons-inline/icon.jsx +107 -107
- package/project/client/icons-inline/inner-icons/inner-icon-connection.jsx +4 -4
- package/project/client/icons-inline/inner-icons/inner-icon-file-delete.jsx +5 -5
- package/project/client/icons-inline/inner-icons/inner-icon-file-save.jsx +4 -4
- package/project/client/icons-inline/inner-icons/inner-icon-file.jsx +4 -4
- package/project/client/icons-inline/inner-icons/inner-icon-folder.jsx +4 -4
- package/project/client/icons-inline/inner-icons/inner-icon-gui.jsx +4 -4
- package/project/client/icons-inline/inner-icons/inner-icon-info-type.jsx +5 -5
- package/project/client/icons-inline/inner-icons/inner-icon-instance-type.jsx +5 -5
- package/project/client/icons-inline/inner-icons/inner-icon-item.jsx +4 -4
- package/project/client/icons-inline/inner-icons/inner-icon-message.jsx +4 -4
- package/project/client/icons-inline/inner-icons/inner-icon-project.jsx +4 -4
- package/project/client/icons-inline/inner-icons/inner-icon-server.jsx +4 -4
- package/project/client/icons-inline/inner-icons/inner-icon-stack-event.jsx +5 -5
- package/project/client/icons-inline/inner-icons/inner-icon-stack-type.jsx +6 -7
- package/project/client/icons-inline/inner-icons/inner-icon-state-event.jsx +5 -5
- package/project/client/image.jsx +6 -8
- package/project/client/marked-textarea.jsx +4 -7
- package/project/client/modal-body.jsx +4 -7
- package/project/client/modal-footer.jsx +4 -7
- package/project/client/modal-header.jsx +4 -7
- package/project/client/modal.jsx +55 -45
- package/project/client/popover-group.jsx +43 -0
- package/project/client/popover.jsx +203 -98
- package/project/client/realtime-components/realtime-button.jsx +5 -5
- package/project/client/realtime-components/realtime-press-down-button.jsx +5 -5
- package/project/client/realtime-components/realtime-width/realtime-button-width-decrease.jsx +8 -8
- package/project/client/realtime-components/realtime-width/realtime-button-width-increase.jsx +8 -8
- package/project/client/realtime-components/realtime-width/realtime-width-const.js +6 -9
- package/project/client/realtime-components/realtime-width/realtime-width-display.jsx +4 -4
- package/project/client/realtime-components/realtime-width.jsx +7 -7
- package/project/client/realtime-components/realtime-zoom/realtime-button-zoom-in.jsx +11 -11
- package/project/client/realtime-components/realtime-zoom/realtime-button-zoom-out.jsx +10 -10
- package/project/client/realtime-components/realtime-zoom/realtime-zoom-const.js +4 -7
- package/project/client/realtime-components/realtime-zoom/realtime-zoom-display.jsx +4 -4
- package/project/client/realtime-components/realtime-zoom.jsx +7 -7
- package/project/client/scroll-list/scroll-list-cache.js +6 -9
- package/project/client/scroll-list/scroll-list-frame.js +2 -5
- package/project/client/scroll-list/scroll-list-node.js +6 -7
- package/project/client/scroll-list/scroll-list-template-data.js +2 -5
- package/project/client/scroll-list/scroll-list-zero-height.js +4 -7
- package/project/client/scroll-list/scroll-list.js +7 -10
- package/project/client/tab.jsx +6 -8
- package/project/client/tabs.jsx +4 -7
- package/project/z-abs-complayer-bootstrap-client.tree +3 -12
- package/LICENSE.txt +0 -96
- package/project/client/core-components/original/modal.js +0 -358
- package/project/client/core-components/original/popover.js +0 -125
- package/project/client/core-components/original/tooltip.js +0 -677
- package/project/client/group.jsx +0 -96
- /package/project/client/core-components/original/{dropdown.js → dropdown-inner.js} +0 -0
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aj-shadow/z-abs-complayer-bootstrap-client",
|
|
3
|
-
"version": "0.0.0-aj-beta.
|
|
3
|
+
"version": "0.0.0-aj-beta.237",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@aj-shadow/z-abs-complayer-bootstrap-client",
|
|
9
|
-
"version": "0.0.0-aj-beta.
|
|
10
|
-
"license": "
|
|
9
|
+
"version": "0.0.0-aj-beta.237",
|
|
10
|
+
"license": "MIT"
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aj-shadow/z-abs-complayer-bootstrap-client",
|
|
3
|
-
"version": "0.0.0-aj-beta.
|
|
3
|
+
"version": "0.0.0-aj-beta.237",
|
|
4
4
|
"release-step": "delivery",
|
|
5
5
|
"description": "Library used by @actorjs/actorjs",
|
|
6
6
|
"author": "ActorJs",
|
|
7
|
-
"license": "
|
|
7
|
+
"license": "MIT",
|
|
8
8
|
"repository": "https://gitlab.com/actorjs-shadow-delivery-public/z-abs-complayer-bootstrap-client.git",
|
|
9
9
|
"dependencies": {}
|
|
10
10
|
}
|
|
@@ -2,29 +2,20 @@
|
|
|
2
2
|
"layer": "Comp",
|
|
3
3
|
"part": "Bootstrap-client",
|
|
4
4
|
"source": {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
"path": "./build/z-abs-complayer-bootstrap-client/client",
|
|
6
|
+
"filters": ["js"]
|
|
7
7
|
},
|
|
8
8
|
"dest": "./dist/scripts",
|
|
9
9
|
"_bundle": true,
|
|
10
10
|
"ignores": null,
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
"dictionary": [],
|
|
12
|
+
"exports": [],
|
|
13
|
+
"dependencies": [
|
|
14
|
+
["z-abs-complayer-bootstrap-client", "client"],
|
|
15
|
+
["z-abs-complayer-router-client", "client"],
|
|
16
|
+
["z-abs-corelayer-client", "client"],
|
|
17
|
+
["z-abs-corelayer-cs", "cs"],
|
|
18
|
+
["z-abs-3pplayer-react-client", "client"]
|
|
14
19
|
],
|
|
15
|
-
"
|
|
16
|
-
"./build/z-abs-corelayer-client/**/*.js",
|
|
17
|
-
"./build/z-abs-corelayer-cs/**/*.js"
|
|
18
|
-
],
|
|
19
|
-
"exports": null,
|
|
20
|
-
"exportSource": true,
|
|
21
|
-
"dependencyNames": [
|
|
22
|
-
"Client:CompLayer/Bootstrap-client",
|
|
23
|
-
"Client:CompLayer/Bootstrap-client-jsx",
|
|
24
|
-
"Client:CoreLayer/client",
|
|
25
|
-
"Client:CoreLayer/client-jsx",
|
|
26
|
-
"Client:CoreLayer/cs",
|
|
27
|
-
"Client:3ppLayer/Reactdom-client",
|
|
28
|
-
"Client:3ppLayer/React-client"
|
|
29
|
-
]
|
|
20
|
+
"allowRequire": false
|
|
30
21
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
// SPDX-License-Identifier: MIT; Copyright (c) 2026 Hagnell Konsulting AB
|
|
3
3
|
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import React from 'react';
|
|
4
|
+
import * as CoreLayerClient from 'z-abs-corelayer-client/client/react-component/react-component-base';
|
|
5
|
+
import * as CompLayerRouterClient from 'z-abs-complayer-router-client/client/react-component/link';
|
|
6
|
+
import * as React from 'react';
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
export
|
|
9
|
+
export class Breadcrump extends CoreLayerClient.ReactComponentBase {
|
|
10
10
|
constructor(props) {
|
|
11
11
|
super(props);
|
|
12
12
|
}
|
|
@@ -30,11 +30,11 @@ export default class ComponentBreadcrump extends ReactComponentBase {
|
|
|
30
30
|
return (
|
|
31
31
|
<div key={index}>
|
|
32
32
|
{this.renderBreadcrumbSlash(index)}
|
|
33
|
-
<Link className="bootstrap_breadcrump_item" href={link} replace>
|
|
33
|
+
<CompLayerRouterClient.Link className="bootstrap_breadcrump_item" href={link} replace>
|
|
34
34
|
<div className="bootstrap_breadcrump_item">
|
|
35
35
|
{name}
|
|
36
36
|
</div>
|
|
37
|
-
</Link>
|
|
37
|
+
</CompLayerRouterClient.Link>
|
|
38
38
|
</div>
|
|
39
39
|
);
|
|
40
40
|
}
|
|
@@ -1,141 +1,58 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
// SPDX-License-Identifier: MIT; Copyright (c) 2026 Hagnell Konsulting AB
|
|
3
3
|
|
|
4
|
-
import Icon from './icons-inline/icon';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
4
|
+
import { Icon } from './icons-inline/icon';
|
|
5
|
+
import { Popover } from './popover';
|
|
6
|
+
import * as CoreLayerClient from 'z-abs-corelayer-client/client/react-component/react-component-base';
|
|
7
|
+
import * as CoreLayerCs from 'z-abs-corelayer-cs/client/guid-generator';
|
|
8
|
+
import * as React from 'react';
|
|
8
9
|
|
|
9
10
|
|
|
10
|
-
class ButtonNew extends ReactComponentBase {
|
|
11
|
+
export class ButtonNew extends CoreLayerClient.ReactComponentBase {
|
|
11
12
|
constructor(props) {
|
|
12
13
|
super(props);
|
|
13
|
-
this.id = this.props.id ? this.props.id : GuidGenerator.create();
|
|
14
|
-
this
|
|
15
|
-
this.clearId = 0;
|
|
14
|
+
this.id = this.props.id ? this.props.id : CoreLayerCs.GuidGenerator.create();
|
|
15
|
+
this.refPopover = React.createRef();
|
|
16
16
|
this.refButton = props.onLoad ? React.createRef() : null;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
shouldUpdate(nextProps, nextState) {
|
|
20
20
|
return !this.shallowCompare(this.props.active, nextProps.active)
|
|
21
|
-
|| !this.shallowCompare(this.props.content, nextProps.content)
|
|
22
21
|
|| !this.shallowCompare(this.props.disabled, nextProps.disabled)
|
|
23
22
|
|| !this.shallowCompare(this.props.heading, nextProps.heading)
|
|
23
|
+
|| !this.shallowCompare(this.props.content, nextProps.content)
|
|
24
24
|
|| !this.shallowCompare(this.props.text, nextProps.text)
|
|
25
25
|
|| !this.shallowCompare(this.props.placement, nextProps.placement)
|
|
26
26
|
|| !this.shallowCompare(this.props.shortcut, nextProps.shortcut);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
didMount() {
|
|
30
|
-
this._createPopover();
|
|
31
30
|
if(this.refButton) {
|
|
32
31
|
this.props.onLoad(this.refButton.current);
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
34
|
|
|
36
|
-
didUpdate() {
|
|
37
|
-
this._createPopover();
|
|
38
|
-
if(null !== this.$popover) {
|
|
39
|
-
const popover = this.$popover.data('bs.popover');
|
|
40
|
-
if(null !== popover.tip()[0].lastChild.firstChild) {
|
|
41
|
-
popover.tip()[0].lastChild.firstChild.lastChild.outerHTML = this._getContent();
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
willUnmount() {
|
|
47
|
-
this.onHide();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
onHide() {
|
|
51
|
-
if(0 !== this.clearId) {
|
|
52
|
-
clearTimeout(this.clearId);
|
|
53
|
-
this.clearId = 0;
|
|
54
|
-
}
|
|
55
|
-
if(null !== this.$popover) {
|
|
56
|
-
this.$popover.popover('destroy');
|
|
57
|
-
this.$popover = null;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
35
|
render() {
|
|
62
|
-
const placement = this.props.placement
|
|
36
|
+
const placement = this.props.placement || 'bottom';
|
|
63
37
|
const title = this.props.title ? { title: this.props.title } : {};
|
|
64
38
|
const size = this.props.size ? ` ${this.props.size}` : ' aj_btn_xs';
|
|
65
39
|
const active = this.props.active ? ' active' : '';
|
|
66
40
|
const disabled = this.props.disabled ? ' disabled' : '';
|
|
67
41
|
const className = this.props.className ? ` ${this.props.className}` : '';
|
|
68
|
-
const
|
|
69
|
-
const
|
|
70
|
-
const ref = this.refButton ? {ref: this.refButton} : {};
|
|
42
|
+
const ariaLabel = this.props['aria-label'] ? { 'aria-label': this.props['aria-label'] } : {};
|
|
43
|
+
const ref = this.refButton ? { ref: this.refButton } : {};
|
|
71
44
|
return (
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
this.props.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
45
|
+
<Popover heading={this.props.heading} content={this.props.content} placement={this.props.placement} shortcut={this.props.shortcut}>
|
|
46
|
+
<button {...ref} id={this.id} type="button" className={`aj_btn${size}${disabled}${active}${className}`} data-placement={placement} data-img="/abs-images/svg/ActorJsA.svg" style={this.props.style} {...title} {...ariaLabel}
|
|
47
|
+
onClick={(e) => {
|
|
48
|
+
if(!this.props.disabled) {
|
|
49
|
+
this.props.onClick && this.props.onClick(e);
|
|
50
|
+
}
|
|
51
|
+
}}
|
|
52
|
+
>
|
|
53
|
+
<Icon active={active} name={this.props.icon} text={this.props.text} colorMark={this.props.colorMark} />
|
|
54
|
+
</button>
|
|
55
|
+
</Popover>
|
|
80
56
|
);
|
|
81
57
|
}
|
|
82
|
-
|
|
83
|
-
_createPopover() {
|
|
84
|
-
if(!this.props.disabled && !this.$popover) {
|
|
85
|
-
const self = this;
|
|
86
|
-
const showDelay = this.props.showDelay ? this.props.showDelay : 1000;
|
|
87
|
-
const hideDelay = this.props.hideDelay ? this.props.hideDelay : 50;
|
|
88
|
-
const autoHideDelay = this.props.autoHideDelay ? this.props.autoHideDelay : 5000;
|
|
89
|
-
this.$popover = $(`#${this.id}`).popover({html:true,container:'body',delay:{show:showDelay,hide:hideDelay},trigger:'hover',content:function() {
|
|
90
|
-
const image = $(this).data('img');
|
|
91
|
-
return `<div class="bootstrap_popover"><img class="bootstrap_popover" src="${image}" />${self._getContent()}</div>`;
|
|
92
|
-
}});
|
|
93
|
-
this.$popover.on('shown.bs.popover', function () {
|
|
94
|
-
self.clearId = setTimeout(() => {
|
|
95
|
-
if(self.$popover) {
|
|
96
|
-
self.$popover.popover('hide');
|
|
97
|
-
}
|
|
98
|
-
}, autoHideDelay);
|
|
99
|
-
});
|
|
100
|
-
this.$popover.on('hidden.bs.popover', function () {
|
|
101
|
-
if(0 !== self.clearId) {
|
|
102
|
-
clearTimeout(self.clearId);
|
|
103
|
-
self.clearId = 0;
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
if(this.props.disabled && this.$popover) {
|
|
108
|
-
if(self.$popover) {
|
|
109
|
-
this.$popover.popover('destroy');
|
|
110
|
-
this.$popover = null;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
_getContent() {
|
|
116
|
-
let content = '';
|
|
117
|
-
if(typeof this.props.content === 'string') {
|
|
118
|
-
content = this.props.content;
|
|
119
|
-
}
|
|
120
|
-
else if(typeof this.props.content === 'function') {
|
|
121
|
-
content = this.props.content();
|
|
122
|
-
}
|
|
123
|
-
let innerContent = '';
|
|
124
|
-
if(typeof this.props.innerContent === 'string') {
|
|
125
|
-
innerContent = this.props.innerContent;
|
|
126
|
-
}
|
|
127
|
-
else if(typeof this.props.innerContent === 'function') {
|
|
128
|
-
innerContent = this.props.innerContent();
|
|
129
|
-
}
|
|
130
|
-
const shortcut = this.props.shortcut ? `<span class="bootstrap_popover"> (${this.props.shortcut})</span>` : '';
|
|
131
|
-
if(this.props.heading) {
|
|
132
|
-
return `<p class="bootstrap_popover_heading"><strong>${this.props.heading}: </strong>${content + shortcut + '</p>'}${innerContent}`;
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
return `<p class="bootstrap_popover">${content + shortcut + '</p>'}${innerContent}`;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
58
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
module.exports = ButtonNew;
|
|
@@ -1,142 +1,80 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
// SPDX-License-Identifier: MIT; Copyright (c) 2026 Hagnell Konsulting AB
|
|
3
3
|
|
|
4
|
-
import Icon from './icons-inline/icon';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
4
|
+
import { Icon } from './icons-inline/icon';
|
|
5
|
+
import { Popover } from './popover';
|
|
6
|
+
import * as CoreLayerClient from 'z-abs-corelayer-client/client/react-component/react-component-base';
|
|
7
|
+
import * as CoreLayerCs from 'z-abs-corelayer-cs/client/guid-generator';
|
|
8
|
+
import * as React from 'react';
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
class ButtonText extends ReactComponentBase {
|
|
10
|
+
export class ButtonText extends CoreLayerClient.ReactComponentBase {
|
|
11
11
|
constructor(props) {
|
|
12
12
|
super(props);
|
|
13
|
-
this.id = this.props.id ? this.props.id : GuidGenerator.create();
|
|
14
|
-
this.$popover = null;
|
|
15
|
-
this.clearId = 0;
|
|
13
|
+
this.id = this.props.id ? this.props.id : CoreLayerCs.GuidGenerator.create();
|
|
16
14
|
this.refButton = props.onLoad ? React.createRef() : null;
|
|
17
15
|
}
|
|
18
16
|
|
|
19
17
|
shouldUpdate(nextProps, nextState) {
|
|
20
18
|
return !this.shallowCompare(this.props.active, nextProps.active)
|
|
21
|
-
|| !this.shallowCompare(this.props.content, nextProps.content)
|
|
22
19
|
|| !this.shallowCompare(this.props.disabled, nextProps.disabled)
|
|
23
20
|
|| !this.shallowCompare(this.props.heading, nextProps.heading)
|
|
21
|
+
|| !this.shallowCompare(this.props.content, nextProps.content)
|
|
24
22
|
|| !this.shallowCompare(this.props.text, nextProps.text)
|
|
25
23
|
|| !this.shallowCompare(this.props.placement, nextProps.placement)
|
|
26
24
|
|| !this.shallowCompare(this.props.shortcut, nextProps.shortcut);
|
|
27
25
|
}
|
|
28
26
|
|
|
29
27
|
didMount() {
|
|
30
|
-
this._createPopover();
|
|
31
28
|
if(this.refButton) {
|
|
32
29
|
this.props.onLoad(this.refButton.current);
|
|
33
30
|
}
|
|
34
31
|
}
|
|
35
32
|
|
|
36
|
-
didUpdate() {
|
|
37
|
-
this._createPopover();
|
|
38
|
-
if(null !== this.$popover) {
|
|
39
|
-
const popover = this.$popover.data('bs.popover');
|
|
40
|
-
if(null !== popover.tip()[0].lastChild.firstChild) {
|
|
41
|
-
popover.tip()[0].lastChild.firstChild.lastChild.outerHTML = this._getContent();
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
willUnmount() {
|
|
47
|
-
this.onHide();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
onHide() {
|
|
51
|
-
if(0 !== this.clearId) {
|
|
52
|
-
clearTimeout(this.clearId);
|
|
53
|
-
this.clearId = 0;
|
|
54
|
-
}
|
|
55
|
-
if(null !== this.$popover) {
|
|
56
|
-
this.$popover.popover('destroy');
|
|
57
|
-
this.$popover = null;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
33
|
render() {
|
|
62
|
-
const placement = this.props.placement
|
|
34
|
+
const placement = this.props.placement || 'bottom';
|
|
63
35
|
const title = this.props.title ? { title: this.props.title } : {};
|
|
64
36
|
const size = this.props.size ? ` ${this.props.size}` : ' aj_btn_xs';
|
|
65
37
|
const active = this.props.active ? ' active' : '';
|
|
66
38
|
const disabled = this.props.disabled ? ' disabled' : '';
|
|
67
39
|
const className = this.props.className ? ` ${this.props.className}` : '';
|
|
68
|
-
const
|
|
69
|
-
const
|
|
70
|
-
const ref = this.refButton ? {ref: this.refButton} : {};
|
|
40
|
+
const ariaLabel = this.props['aria-label'] ? { 'aria-label': this.props['aria-label'] } : {};
|
|
41
|
+
const ref = this.refButton ? { ref: this.refButton } : {};
|
|
71
42
|
return (
|
|
72
|
-
<
|
|
43
|
+
<Popover heading={this.props.heading} content={this.props.content} placement={this.props.placement} shortcut={this.props.shortcut}>
|
|
44
|
+
<button {...ref} id={this.id} type="button" className={`aj_btn${size}${disabled}${active}${className} aj_btn_txt_xs`} data-placement={placement} data-img="/abs-images/svg/ActorJsA.svg" style={this.props.style} {...title} {...ariaLabel}
|
|
45
|
+
onClick={(e) => {
|
|
46
|
+
if(!this.props.disabled) {
|
|
47
|
+
this.props.onClick && this.props.onClick(e);
|
|
48
|
+
}
|
|
49
|
+
}}
|
|
50
|
+
>
|
|
51
|
+
<Icon active={active} name={this.props.icon} text={this.props.text} colorMark={this.props.colorMark} />
|
|
52
|
+
<span>{this.props.text}</span>
|
|
53
|
+
</button>
|
|
54
|
+
</Popover>
|
|
55
|
+
);
|
|
56
|
+
/*return (
|
|
57
|
+
<button {...ref} id={this.id} type="button"
|
|
58
|
+
className={`aj_btn${size}${disabled}${active}${className} aj_btn_txt_xs`}
|
|
59
|
+
data-placement={placement}
|
|
60
|
+
data-img="/abs-images/svg/ActorJsA.svg"
|
|
61
|
+
style={this.props.style}
|
|
62
|
+
{...title}
|
|
63
|
+
{...ariaLabel}
|
|
73
64
|
onClick={(e) => {
|
|
74
|
-
if(!this.props.disabled) {
|
|
65
|
+
if (!this.props.disabled) {
|
|
75
66
|
this.props.onClick && this.props.onClick(e);
|
|
76
67
|
}
|
|
77
|
-
}}
|
|
78
|
-
|
|
68
|
+
}}
|
|
69
|
+
>
|
|
70
|
+
<Icon
|
|
71
|
+
active={active}
|
|
72
|
+
name={this.props.icon}
|
|
73
|
+
text={this.props.text}
|
|
74
|
+
colorMark={this.props.colorMark}
|
|
75
|
+
/>
|
|
79
76
|
<span>{this.props.text}</span>
|
|
80
77
|
</button>
|
|
81
|
-
)
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
_createPopover() {
|
|
85
|
-
if(!this.props.disabled && !this.$popover) {
|
|
86
|
-
const self = this;
|
|
87
|
-
const showDelay = this.props.showDelay ? this.props.showDelay : 1000;
|
|
88
|
-
const hideDelay = this.props.hideDelay ? this.props.hideDelay : 50;
|
|
89
|
-
const autoHideDelay = this.props.autoHideDelay ? this.props.autoHideDelay : 5000;
|
|
90
|
-
this.$popover = $(`#${this.id}`).popover({html:true,container:'body',delay:{show:showDelay,hide:hideDelay},trigger:'hover',content:function() {
|
|
91
|
-
const image = $(this).data('img');
|
|
92
|
-
return `<div class="bootstrap_popover"><img class="bootstrap_popover" src="${image}" />${self._getContent()}</div>`;
|
|
93
|
-
}});
|
|
94
|
-
this.$popover.on('shown.bs.popover', function () {
|
|
95
|
-
self.clearId = setTimeout(() => {
|
|
96
|
-
if(self.$popover) {
|
|
97
|
-
self.$popover.popover('hide');
|
|
98
|
-
}
|
|
99
|
-
}, autoHideDelay);
|
|
100
|
-
});
|
|
101
|
-
this.$popover.on('hidden.bs.popover', function () {
|
|
102
|
-
if(0 !== self.clearId) {
|
|
103
|
-
clearTimeout(self.clearId);
|
|
104
|
-
self.clearId = 0;
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
if(this.props.disabled && this.$popover) {
|
|
109
|
-
if(self.$popover) {
|
|
110
|
-
this.$popover.popover('destroy');
|
|
111
|
-
this.$popover = null;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
_getContent() {
|
|
117
|
-
let content = '';
|
|
118
|
-
if(typeof this.props.content === 'string') {
|
|
119
|
-
content = this.props.content;
|
|
120
|
-
}
|
|
121
|
-
else if(typeof this.props.content === 'function') {
|
|
122
|
-
content = this.props.content();
|
|
123
|
-
}
|
|
124
|
-
let innerContent = '';
|
|
125
|
-
if(typeof this.props.innerContent === 'string') {
|
|
126
|
-
innerContent = this.props.innerContent;
|
|
127
|
-
}
|
|
128
|
-
else if(typeof this.props.innerContent === 'function') {
|
|
129
|
-
innerContent = this.props.innerContent();
|
|
130
|
-
}
|
|
131
|
-
const shortcut = this.props.shortcut ? `<span class="bootstrap_popover"> (${this.props.shortcut})</span>` : '';
|
|
132
|
-
if(this.props.heading) {
|
|
133
|
-
return `<p class="bootstrap_popover_heading"><strong>${this.props.heading}: </strong>${content + shortcut + '</p>'}${innerContent}`;
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
return `<p class="bootstrap_popover">${content + shortcut + '</p>'}${innerContent}`;
|
|
137
|
-
}
|
|
78
|
+
);*/
|
|
138
79
|
}
|
|
139
80
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
module.exports = ButtonText;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
// SPDX-License-Identifier: MIT; Copyright (c) 2026 Hagnell Konsulting AB
|
|
3
3
|
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import React from 'react';
|
|
4
|
+
import * as CoreLayerClient from 'z-abs-corelayer-client/client/react-component/react-component-base';
|
|
5
|
+
import * as CoreLayerCs1 from 'z-abs-corelayer-cs/client/guid-generator';
|
|
6
|
+
import * as React from 'react';
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class Button extends ReactComponentBase {
|
|
9
|
+
export class Button extends CoreLayerClient.ReactComponentBase {
|
|
10
10
|
constructor(props) {
|
|
11
11
|
super(props);
|
|
12
|
-
this.id = this.props.id ? this.props.id : GuidGenerator.create();
|
|
12
|
+
this.id = this.props.id ? this.props.id : CoreLayerCs.GuidGenerator.create();
|
|
13
13
|
this.$popover = null;
|
|
14
14
|
this.clearId = 0;
|
|
15
15
|
this.refButton = props.onLoad ? React.createRef() : null;
|
|
@@ -135,6 +135,3 @@ class Button extends ReactComponentBase {
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
module.exports = Button;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
// SPDX-License-Identifier: MIT; Copyright (c) 2026 Hagnell Konsulting AB
|
|
3
3
|
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import React from 'react';
|
|
4
|
+
import * as CoreLayerClient from 'z-abs-corelayer-client/client/react-component/react-component-base';
|
|
5
|
+
import * as CoreLayerCs1 from 'z-abs-corelayer-cs/client/guid-generator';
|
|
6
|
+
import * as React from 'react';
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class
|
|
9
|
+
export class OrigButton extends CoreLayerClient.ReactComponentBase {
|
|
10
10
|
constructor(props) {
|
|
11
11
|
super(props);
|
|
12
|
-
this.id = this.props.id ? this.props.id : GuidGenerator.create();
|
|
12
|
+
this.id = this.props.id ? this.props.id : CoreLayerCs.GuidGenerator.create();
|
|
13
13
|
this.$popover = null;
|
|
14
14
|
this.clearId = 0;
|
|
15
15
|
this.refButton = props.onLoad ? React.createRef() : null;
|
|
@@ -134,6 +134,3 @@ class Button extends ReactComponentBase {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
module.exports = Button;
|