versacall-core-library-react 2.0.65 → 2.0.67
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/dist/components/CoreAlert/CoreAlert.js +43 -107
- package/dist/components/CoreAlert/index.js +2 -4
- package/dist/components/CoreAppBar/CoreAppBar.js +275 -418
- package/dist/components/CoreAppBar/CoreAppBarDrawer.js +88 -171
- package/dist/components/CoreAppBar/index.js +2 -4
- package/dist/components/CoreAppSelector/AppLink.js +36 -60
- package/dist/components/CoreAppSelector/CoreAppSelector.js +109 -200
- package/dist/components/CoreAppSelector/index.js +2 -4
- package/dist/components/CoreDialogueToolBar/CoreDialogueToolBar.js +43 -69
- package/dist/components/CoreDialogueToolBar/index.js +2 -4
- package/dist/components/CoreDrawer/CoreDrawer.js +168 -286
- package/dist/components/CoreDrawer/index.js +2 -4
- package/dist/components/CoreDropDownTextfield/CoreDropDownTextfield.js +57 -121
- package/dist/components/CoreDropDownTextfield/index.js +2 -4
- package/dist/components/CoreElapsedTime/CoreElapsedTime.js +38 -97
- package/dist/components/CoreElapsedTime/index.js +2 -4
- package/dist/components/CoreFrame/CoreFrame.js +17 -28
- package/dist/components/CoreFrame/index.js +2 -4
- package/dist/components/CoreImportDialog/CoreImportDialog.js +87 -189
- package/dist/components/CoreImportDialog/index.js +2 -4
- package/dist/components/CoreImportResultsDialog/CoreImportResultsDialog.js +19 -45
- package/dist/components/CoreImportResultsDialog/index.js +2 -4
- package/dist/components/CoreImporting/CoreImporting.js +23 -39
- package/dist/components/CoreImporting/index.js +2 -4
- package/dist/components/CorePlugin/CorePlugin.js +83 -160
- package/dist/components/CorePlugin/OldCorePlugin.js +73 -149
- package/dist/components/CorePlugin/index.js +2 -4
- package/dist/components/CoreSaveChangesDialog/CoreSaveChangesDialog.js +10 -32
- package/dist/components/CoreSaveChangesDialog/index.js +2 -4
- package/dist/components/CoreShiftTagFilter/CoreShiftTagFilter.js +288 -408
- package/dist/components/CoreShiftTagFilter/OldCoreShiftTagFilter.js +161 -257
- package/dist/components/CoreShiftTagFilter/index.js +2 -4
- package/dist/components/CoreSideBar/CoreSideBar.js +578 -737
- package/dist/components/CoreSideBar/CoreSideBarDrawer.js +122 -212
- package/dist/components/CoreSideBar/index.js +2 -4
- package/dist/components/CoreSnackBar/CoreSnackBar.js +76 -143
- package/dist/components/CoreSnackBar/index.js +2 -4
- package/dist/components/CoreTable/CoreTable.js +219 -337
- package/dist/components/CoreTable/CoreTableChips.js +11 -19
- package/dist/components/CoreTable/CoreTableHead.js +125 -205
- package/dist/components/CoreTable/CoreTableToolbar.js +34 -56
- package/dist/components/CoreTable/index.js +2 -4
- package/dist/components/CoreTagFilter/CoreTagFilter.js +212 -319
- package/dist/components/CoreTagFilter/OldCoreTagFilter.js +270 -402
- package/dist/components/CoreTagFilter/OldTagChip.js +10 -20
- package/dist/components/CoreTagFilter/OldTagFilterSelector.js +77 -148
- package/dist/components/CoreTagFilter/OldTagOption.js +21 -47
- package/dist/components/CoreTagFilter/TagFilterBuilder.js +114 -274
- package/dist/components/CoreTagFilter/index.js +2 -4
- package/dist/components/CoreTextField/CoreTextField.js +69 -132
- package/dist/components/CoreTextField/index.js +2 -4
- package/dist/components/CoreTheme/CoreTheme.js +13 -27
- package/dist/components/CoreTheme/index.js +2 -4
- package/dist/components/CoreTile/CoreTile.js +21 -34
- package/dist/components/CoreTile/CoreTileToolbar.js +21 -36
- package/dist/components/CoreTile/index.js +2 -4
- package/dist/components/CoreTimerInput/CoreTimerInput.js +36 -60
- package/dist/components/CoreTimerInput/CoreTimerInputOld.js +29 -47
- package/dist/components/CoreTimerInput/index.js +2 -4
- package/dist/components/CoreToolbar/CoreToolbar.js +65 -95
- package/dist/components/CoreToolbar/index.js +2 -4
- package/dist/components/CoreTracker/CoreTracker.js +32 -91
- package/dist/components/CoreTracker/index.js +2 -4
- package/dist/components/CoreTranslate/CoreTranslate.js +17 -48
- package/dist/components/CoreTranslate/index.js +2 -4
- package/dist/components/CoreTranslateWrapper/CoreTranslateWrapper.js +7 -15
- package/dist/components/CoreTranslateWrapper/index.js +2 -4
- package/dist/components/CoreWidget/CoreWidget.js +81 -149
- package/dist/components/CoreWidget/index.js +2 -4
- package/dist/components/CoreWrapper/CoreWrapper.js +8 -16
- package/dist/components/CoreWrapper/index.js +2 -4
- package/dist/components/index.js +29 -58
- package/dist/constants/index.js +3 -6
- package/dist/constants/testOrganization.js +2 -3
- package/dist/constants/testToken.js +2 -3
- package/dist/context/Authentication/AuthenticationContext.js +3 -8
- package/dist/context/Authentication/AuthenticationProvider.js +156 -257
- package/dist/context/Authentication/index.js +4 -8
- package/dist/context/Authentication/withAuthentication.js +5 -14
- package/dist/context/Channels/ChannelsConsumer.js +14 -70
- package/dist/context/Channels/ChannelsContext.js +3 -8
- package/dist/context/Channels/ChannelsProvider.js +132 -278
- package/dist/context/Channels/DataChannel.js +39 -103
- package/dist/context/Channels/EntityChannel.js +40 -104
- package/dist/context/Channels/EveryoneChannel.js +32 -92
- package/dist/context/Channels/OrganizationChannel.js +40 -104
- package/dist/context/Channels/UserChannel.js +37 -99
- package/dist/context/Channels/index.js +10 -20
- package/dist/context/Channels/withChannels.js +5 -14
- package/dist/context/Core/CoreContext.js +3 -8
- package/dist/context/Core/CoreProvider.js +68 -132
- package/dist/context/Core/index.js +4 -8
- package/dist/context/Core/withCore.js +5 -14
- package/dist/context/Organization/OrganizationContext.js +3 -8
- package/dist/context/Organization/OrganizationProvider.js +48 -120
- package/dist/context/Organization/index.js +4 -8
- package/dist/context/Organization/withOrganization.js +5 -14
- package/dist/context/Plugin/PluginContext.js +3 -8
- package/dist/context/Plugin/PluginProvider.js +55 -112
- package/dist/context/Plugin/index.js +4 -8
- package/dist/context/Plugin/withPlugin.js +5 -14
- package/dist/context/index.js +5 -15
- package/dist/css/index.js +3 -6
- package/dist/functions/TagEvaluator.js +107 -156
- package/dist/functions/compareObjects.js +0 -7
- package/dist/functions/formatElapsedTime.js +5 -6
- package/dist/functions/formatNameFileSafe.js +3 -4
- package/dist/functions/getIconUrl.js +0 -3
- package/dist/functions/getParameterByName.js +9 -12
- package/dist/functions/getProperty.js +4 -8
- package/dist/functions/getUrl.js +0 -3
- package/dist/functions/index.js +9 -18
- package/dist/icons/CopyIcon.js +11 -22
- package/dist/icons/DeleteIcon.js +11 -22
- package/dist/icons/DuplicateIcon.js +11 -22
- package/dist/icons/EditIcon.js +11 -22
- package/dist/icons/FabAddIcon.js +19 -35
- package/dist/icons/PasteIcon.js +11 -22
- package/dist/icons/index.js +7 -14
- package/dist/index.js +6 -18
- package/package.json +89 -79
|
@@ -4,14 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
9
|
-
|
|
10
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
11
|
-
|
|
12
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
13
|
-
|
|
14
|
-
var operators = {
|
|
7
|
+
const operators = {
|
|
15
8
|
NONE: 'none',
|
|
16
9
|
AND: 'and',
|
|
17
10
|
OR: 'or',
|
|
@@ -20,21 +13,19 @@ var operators = {
|
|
|
20
13
|
XOR: 'xor',
|
|
21
14
|
XNOR: 'xnor'
|
|
22
15
|
};
|
|
23
|
-
|
|
24
16
|
function randomId() {
|
|
25
17
|
return "_".concat(Math.random().toString(36).substr(2, 9));
|
|
26
18
|
}
|
|
27
|
-
|
|
28
19
|
function breakIntoSegments(tagFilter) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
const segments = [];
|
|
21
|
+
const stack = [];
|
|
22
|
+
let currentSegment = {
|
|
32
23
|
id: randomId(),
|
|
33
24
|
priority: 0,
|
|
34
25
|
expression: ''
|
|
35
26
|
};
|
|
36
|
-
|
|
37
|
-
tagFilter.split('').forEach(
|
|
27
|
+
let depth = 0;
|
|
28
|
+
tagFilter.split('').forEach(character => {
|
|
38
29
|
switch (character) {
|
|
39
30
|
case '(':
|
|
40
31
|
depth++;
|
|
@@ -45,170 +36,130 @@ function breakIntoSegments(tagFilter) {
|
|
|
45
36
|
expression: ''
|
|
46
37
|
};
|
|
47
38
|
break;
|
|
48
|
-
|
|
49
39
|
case ')':
|
|
50
40
|
{
|
|
51
41
|
depth--;
|
|
52
|
-
|
|
42
|
+
const segmentId = currentSegment.id;
|
|
53
43
|
segments.push(JSON.parse(JSON.stringify(currentSegment)));
|
|
54
44
|
currentSegment = JSON.parse(JSON.stringify(stack.pop()));
|
|
55
45
|
currentSegment.expression += "[".concat(segmentId, "]");
|
|
56
46
|
break;
|
|
57
47
|
}
|
|
58
|
-
|
|
59
48
|
default:
|
|
60
49
|
currentSegment.expression += character;
|
|
61
50
|
}
|
|
62
51
|
});
|
|
63
52
|
segments.push(JSON.parse(JSON.stringify(currentSegment)));
|
|
64
|
-
return segments.sort(
|
|
53
|
+
return segments.sort((segmentOne, segmentTwo) => {
|
|
65
54
|
if (segmentOne.priority < segmentTwo.priority) {
|
|
66
55
|
return 1;
|
|
67
56
|
}
|
|
68
|
-
|
|
69
57
|
return segmentOne.priority > segmentTwo.priority ? -1 : 0;
|
|
70
58
|
});
|
|
71
59
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
function TagEvaluator(tagFilter) {
|
|
75
|
-
_classCallCheck(this, TagEvaluator);
|
|
76
|
-
|
|
60
|
+
class TagEvaluator {
|
|
61
|
+
constructor(tagFilter) {
|
|
77
62
|
this.segments = breakIntoSegments(tagFilter);
|
|
78
63
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
var invertPartResult = false;
|
|
112
|
-
|
|
113
|
-
if (part.startsWith('!')) {
|
|
114
|
-
part = part.substring(1);
|
|
115
|
-
invertPartResult = true;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
if (part.startsWith('[')) {
|
|
119
|
-
var id = part.substring(1, part.length - 1);
|
|
120
|
-
|
|
121
|
-
if (segmentResults[id]) {
|
|
122
|
-
partResult = segmentResults[id];
|
|
123
|
-
}
|
|
124
|
-
} else {
|
|
125
|
-
partResult = tagsLower.includes(part);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
if (invertPartResult) {
|
|
129
|
-
partResult = !partResult;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
switch (currentOperator) {
|
|
133
|
-
case operators.NONE:
|
|
134
|
-
segmentResult = partResult;
|
|
135
|
-
break;
|
|
136
|
-
|
|
137
|
-
case operators.AND:
|
|
138
|
-
segmentResult = segmentResult && partResult;
|
|
139
|
-
break;
|
|
140
|
-
|
|
141
|
-
case operators.OR:
|
|
142
|
-
segmentResult = segmentResult || partResult;
|
|
143
|
-
break;
|
|
144
|
-
|
|
145
|
-
case operators.NAND:
|
|
146
|
-
segmentResult = !(segmentResult && partResult);
|
|
147
|
-
break;
|
|
148
|
-
|
|
149
|
-
case operators.NOR:
|
|
150
|
-
segmentResult = !segmentResult && !partResult;
|
|
151
|
-
break;
|
|
152
|
-
|
|
153
|
-
case operators.XOR:
|
|
154
|
-
segmentResult = segmentResult !== partResult;
|
|
155
|
-
break;
|
|
156
|
-
|
|
157
|
-
case operators.XNOR:
|
|
158
|
-
segmentResult = segmentResult === partResult;
|
|
159
|
-
break;
|
|
160
|
-
|
|
161
|
-
default:
|
|
64
|
+
evaluate() {
|
|
65
|
+
let tags = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
66
|
+
let result = true;
|
|
67
|
+
const segmentResults = {};
|
|
68
|
+
const tagsLower = tags.map(tag => tag.toLowerCase());
|
|
69
|
+
this.segments.forEach(segment => {
|
|
70
|
+
let segmentResult = true;
|
|
71
|
+
const parts = segment.expression.trim().split(' ').filter(part => part !== null && part !== '' && part !== ' ');
|
|
72
|
+
let currentOperator = operators.NONE;
|
|
73
|
+
parts.forEach(aPart => {
|
|
74
|
+
let part = aPart.toLowerCase();
|
|
75
|
+
switch (part) {
|
|
76
|
+
case operators.AND:
|
|
77
|
+
case operators.OR:
|
|
78
|
+
case operators.NAND:
|
|
79
|
+
case operators.NOR:
|
|
80
|
+
case operators.XOR:
|
|
81
|
+
case operators.XNOR:
|
|
82
|
+
currentOperator = part;
|
|
83
|
+
break;
|
|
84
|
+
default:
|
|
85
|
+
{
|
|
86
|
+
let partResult = false;
|
|
87
|
+
let invertPartResult = false;
|
|
88
|
+
if (part.startsWith('!')) {
|
|
89
|
+
part = part.substring(1);
|
|
90
|
+
invertPartResult = true;
|
|
91
|
+
}
|
|
92
|
+
if (part.startsWith('[')) {
|
|
93
|
+
const id = part.substring(1, part.length - 1);
|
|
94
|
+
if (segmentResults[id]) {
|
|
95
|
+
partResult = segmentResults[id];
|
|
162
96
|
}
|
|
163
|
-
|
|
164
|
-
|
|
97
|
+
} else {
|
|
98
|
+
partResult = tagsLower.includes(part);
|
|
99
|
+
}
|
|
100
|
+
if (invertPartResult) {
|
|
101
|
+
partResult = !partResult;
|
|
102
|
+
}
|
|
103
|
+
switch (currentOperator) {
|
|
104
|
+
case operators.NONE:
|
|
105
|
+
segmentResult = partResult;
|
|
106
|
+
break;
|
|
107
|
+
case operators.AND:
|
|
108
|
+
segmentResult = segmentResult && partResult;
|
|
109
|
+
break;
|
|
110
|
+
case operators.OR:
|
|
111
|
+
segmentResult = segmentResult || partResult;
|
|
112
|
+
break;
|
|
113
|
+
case operators.NAND:
|
|
114
|
+
segmentResult = !(segmentResult && partResult);
|
|
115
|
+
break;
|
|
116
|
+
case operators.NOR:
|
|
117
|
+
segmentResult = !segmentResult && !partResult;
|
|
118
|
+
break;
|
|
119
|
+
case operators.XOR:
|
|
120
|
+
segmentResult = segmentResult !== partResult;
|
|
121
|
+
break;
|
|
122
|
+
case operators.XNOR:
|
|
123
|
+
segmentResult = segmentResult === partResult;
|
|
124
|
+
break;
|
|
125
|
+
default:
|
|
165
126
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
result = segmentResult;
|
|
127
|
+
currentOperator = operators.NONE;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
170
130
|
});
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
if (!part.startsWith('[') && !tags.includes(part)) {
|
|
200
|
-
tags.push(part);
|
|
201
|
-
}
|
|
131
|
+
segmentResults[segment.id] = segmentResult;
|
|
132
|
+
result = segmentResult;
|
|
133
|
+
});
|
|
134
|
+
return result;
|
|
135
|
+
}
|
|
136
|
+
tags() {
|
|
137
|
+
const tags = [];
|
|
138
|
+
this.segments.forEach(segment => {
|
|
139
|
+
const parts = segment.expression.trim().split(' ').filter(part => part !== null && part !== '' && part !== ' ');
|
|
140
|
+
parts.forEach(aPart => {
|
|
141
|
+
let part = aPart.toLowerCase();
|
|
142
|
+
switch (part) {
|
|
143
|
+
case operators.AND:
|
|
144
|
+
case operators.OR:
|
|
145
|
+
case operators.NAND:
|
|
146
|
+
case operators.NOR:
|
|
147
|
+
case operators.XOR:
|
|
148
|
+
case operators.XNOR:
|
|
149
|
+
break;
|
|
150
|
+
default:
|
|
151
|
+
{
|
|
152
|
+
if (part.startsWith('!')) {
|
|
153
|
+
part = part.substring(1);
|
|
154
|
+
}
|
|
155
|
+
if (!part.startsWith('[') && !tags.includes(part)) {
|
|
156
|
+
tags.push(part);
|
|
202
157
|
}
|
|
203
|
-
|
|
204
|
-
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
205
160
|
});
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}();
|
|
212
|
-
|
|
213
|
-
var _default = TagEvaluator;
|
|
214
|
-
exports.default = _default;
|
|
161
|
+
});
|
|
162
|
+
return tags;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
var _default = exports.default = TagEvaluator;
|
|
@@ -4,31 +4,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = compareObjects;
|
|
7
|
-
|
|
8
7
|
function compareObjects(obj1, obj2) {
|
|
9
8
|
if (obj1 === null) {
|
|
10
9
|
if (obj2 === null) {
|
|
11
10
|
return true;
|
|
12
11
|
}
|
|
13
|
-
|
|
14
12
|
return false;
|
|
15
13
|
}
|
|
16
|
-
|
|
17
14
|
if (obj2 === null) {
|
|
18
15
|
return false;
|
|
19
16
|
}
|
|
20
|
-
|
|
21
17
|
if (obj1.id !== undefined && obj2.id !== undefined) {
|
|
22
18
|
if (obj1.id === obj2.id) {
|
|
23
19
|
return true;
|
|
24
20
|
}
|
|
25
|
-
|
|
26
21
|
return false;
|
|
27
22
|
}
|
|
28
|
-
|
|
29
23
|
if (obj1.key === obj2.key) {
|
|
30
24
|
return true;
|
|
31
25
|
}
|
|
32
|
-
|
|
33
26
|
return false;
|
|
34
27
|
}
|
|
@@ -4,13 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = formatElapsedTime;
|
|
7
|
-
|
|
8
7
|
function formatElapsedTime(fromSeconds) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
const days = Math.floor(fromSeconds / 86400);
|
|
9
|
+
const hours = Math.floor((fromSeconds - days * 86400) / 3600);
|
|
10
|
+
const minutes = Math.floor((fromSeconds - days * 86400 - hours * 3600) / 60);
|
|
11
|
+
const seconds = fromSeconds - days * 86400 - hours * 3600 - minutes * 60;
|
|
12
|
+
let str = '';
|
|
14
13
|
str += days > 0 ? "".concat(days, "d") : '';
|
|
15
14
|
str += hours > 0 ? " ".concat(hours, "h") : '';
|
|
16
15
|
str += minutes > 0 ? " ".concat(minutes, "m") : '';
|
|
@@ -4,13 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = formatNameFileSafe;
|
|
7
|
-
|
|
8
7
|
function formatNameFileSafe(name) {
|
|
9
|
-
|
|
8
|
+
let nameAdjusted = name.split(' ').join('_');
|
|
10
9
|
nameAdjusted = nameAdjusted.toLowerCase();
|
|
11
10
|
nameAdjusted = nameAdjusted.split('');
|
|
12
|
-
|
|
13
|
-
nameAdjusted.forEach(
|
|
11
|
+
let newName = '';
|
|
12
|
+
nameAdjusted.forEach(character => {
|
|
14
13
|
if (/[a-z0-9_]+/.exec(character) !== null) newName += character;
|
|
15
14
|
});
|
|
16
15
|
return newName;
|
|
@@ -4,15 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = getIconUrl;
|
|
7
|
-
|
|
8
7
|
function getIconUrl(metadata) {
|
|
9
8
|
if (metadata.IconURL) {
|
|
10
9
|
return metadata.IconURL;
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
if (metadata.iconUrl) {
|
|
14
12
|
return metadata.iconUrl;
|
|
15
13
|
}
|
|
16
|
-
|
|
17
14
|
return '';
|
|
18
15
|
}
|
|
@@ -4,34 +4,31 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = getParameterByName;
|
|
7
|
-
|
|
8
7
|
/* eslint-disable prefer-template */
|
|
9
|
-
|
|
10
8
|
/* eslint-disable no-useless-escape */
|
|
11
|
-
function getParameterByName(nameParam, urlParam) {
|
|
12
|
-
var url = urlParam;
|
|
13
9
|
|
|
10
|
+
function getParameterByName(nameParam, urlParam) {
|
|
11
|
+
let url = urlParam;
|
|
14
12
|
if (!urlParam) {
|
|
15
13
|
url = window.location.href;
|
|
16
14
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var results = regex.exec(url);
|
|
21
|
-
|
|
15
|
+
const name = nameParam.replace(/[\[\]]/g, '\\$&');
|
|
16
|
+
const regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)');
|
|
17
|
+
const results = regex.exec(url);
|
|
22
18
|
if (!results) {
|
|
23
19
|
return null;
|
|
24
20
|
}
|
|
25
|
-
|
|
26
21
|
if (!results[2]) {
|
|
27
22
|
return '';
|
|
28
23
|
}
|
|
29
|
-
|
|
30
24
|
return decodeURIComponent(results[2].replace(/\+/g, ' '));
|
|
31
|
-
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
//! ! EXAMPLES
|
|
32
28
|
// query string: ?foo=lorem&bar=&baz
|
|
33
29
|
// var foo = getParameterByName('foo'); -> "lorem"
|
|
34
30
|
// var bar = getParameterByName('bar'); -> "" (present with empty value)
|
|
35
31
|
// var baz = getParameterByName('baz'); -> "" (present with no value)
|
|
36
32
|
// var qux = getParameterByName('qux'); -> null (absent)
|
|
33
|
+
|
|
37
34
|
// Note: If a parameter is present several times (?foo=lorem&foo=ipsum), you will get the first value
|
|
@@ -4,18 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = getProperty;
|
|
7
|
-
|
|
8
7
|
function getProperty(obj, prop) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var key = keys[index];
|
|
14
|
-
|
|
8
|
+
const propLower = "".concat(prop).toLowerCase();
|
|
9
|
+
const keys = Object.keys(obj);
|
|
10
|
+
for (let index = 0; index < keys.length; index++) {
|
|
11
|
+
const key = keys[index];
|
|
15
12
|
if (obj.hasOwnProperty(key) && propLower === "".concat(key).toLowerCase()) {
|
|
16
13
|
return obj[key];
|
|
17
14
|
}
|
|
18
15
|
}
|
|
19
|
-
|
|
20
16
|
return undefined;
|
|
21
17
|
}
|
package/dist/functions/getUrl.js
CHANGED
|
@@ -4,15 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = getUrl;
|
|
7
|
-
|
|
8
7
|
function getUrl(metadata) {
|
|
9
8
|
if (metadata.URL) {
|
|
10
9
|
return metadata.URL;
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
if (metadata.url) {
|
|
14
12
|
return metadata.url;
|
|
15
13
|
}
|
|
16
|
-
|
|
17
14
|
return '';
|
|
18
15
|
}
|
package/dist/functions/index.js
CHANGED
|
@@ -5,67 +5,58 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "TagEvaluator", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _TagEvaluator.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "compareObjects", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _compareObjects.default;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "formatElapsedTime", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function
|
|
20
|
+
get: function () {
|
|
21
21
|
return _formatElapsedTime.default;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "formatNameFileSafe", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function
|
|
26
|
+
get: function () {
|
|
27
27
|
return _formatNameFileSafe.default;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "getIconUrl", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function
|
|
32
|
+
get: function () {
|
|
33
33
|
return _getIconUrl.default;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "getParameterByName", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function
|
|
38
|
+
get: function () {
|
|
39
39
|
return _getParameterByName.default;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "getProperty", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function
|
|
44
|
+
get: function () {
|
|
45
45
|
return _getProperty.default;
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "getUrl", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function
|
|
50
|
+
get: function () {
|
|
51
51
|
return _getUrl.default;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
-
|
|
55
54
|
var _getParameterByName = _interopRequireDefault(require("./getParameterByName"));
|
|
56
|
-
|
|
57
55
|
var _formatElapsedTime = _interopRequireDefault(require("./formatElapsedTime"));
|
|
58
|
-
|
|
59
56
|
var _formatNameFileSafe = _interopRequireDefault(require("./formatNameFileSafe"));
|
|
60
|
-
|
|
61
57
|
var _compareObjects = _interopRequireDefault(require("./compareObjects"));
|
|
62
|
-
|
|
63
58
|
var _getProperty = _interopRequireDefault(require("./getProperty"));
|
|
64
|
-
|
|
65
59
|
var _getIconUrl = _interopRequireDefault(require("./getIconUrl"));
|
|
66
|
-
|
|
67
60
|
var _getUrl = _interopRequireDefault(require("./getUrl"));
|
|
68
|
-
|
|
69
61
|
var _TagEvaluator = _interopRequireDefault(require("./TagEvaluator"));
|
|
70
|
-
|
|
71
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
62
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
package/dist/icons/CopyIcon.js
CHANGED
|
@@ -4,40 +4,32 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _FileCopy = _interopRequireDefault(require("@material-ui/icons/FileCopy"));
|
|
11
|
-
|
|
12
9
|
var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
|
|
13
|
-
|
|
14
10
|
var _Tooltip = _interopRequireDefault(require("@material-ui/core/Tooltip"));
|
|
15
|
-
|
|
16
11
|
var _reactIntl = require("react-intl");
|
|
17
|
-
|
|
18
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
const CopyIcon = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
title,
|
|
17
|
+
onClick,
|
|
18
|
+
style,
|
|
19
|
+
intl
|
|
20
|
+
} = _ref;
|
|
27
21
|
return /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
28
22
|
title: intl.formatMessage({
|
|
29
23
|
id: title
|
|
30
24
|
})
|
|
31
25
|
}, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
32
|
-
onClick:
|
|
26
|
+
onClick: e => {
|
|
33
27
|
e.stopPropagation();
|
|
34
|
-
|
|
35
|
-
_onClick(e);
|
|
28
|
+
onClick(e);
|
|
36
29
|
},
|
|
37
30
|
style: style
|
|
38
31
|
}, /*#__PURE__*/_react.default.createElement(_FileCopy.default, null)));
|
|
39
32
|
};
|
|
40
|
-
|
|
41
33
|
CopyIcon.propTypes = {
|
|
42
34
|
title: _propTypes.default.string,
|
|
43
35
|
onClick: _propTypes.default.func.isRequired,
|
|
@@ -47,7 +39,4 @@ CopyIcon.defaultProps = {
|
|
|
47
39
|
title: '__copy',
|
|
48
40
|
style: {}
|
|
49
41
|
};
|
|
50
|
-
|
|
51
|
-
var _default = (0, _reactIntl.injectIntl)(CopyIcon);
|
|
52
|
-
|
|
53
|
-
exports.default = _default;
|
|
42
|
+
var _default = exports.default = (0, _reactIntl.injectIntl)(CopyIcon);
|