@entur-partner/common 4.0.6 → 4.2.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 +23 -0
- package/dist/Box.d.ts +1 -1
- package/dist/ExpandableMultiLanguageInput.d.ts +1 -3
- package/dist/FeatureToggle.d.ts +8 -0
- package/dist/common.cjs.development.js +174 -131
- package/dist/common.cjs.development.js.map +1 -1
- package/dist/common.cjs.production.min.js +1 -1
- package/dist/common.cjs.production.min.js.map +1 -1
- package/dist/common.esm.js +81 -41
- package/dist/common.esm.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/styles.css +43 -43
- package/package.json +10 -10
package/dist/common.esm.js
CHANGED
|
@@ -32,7 +32,17 @@ function _extends() {
|
|
|
32
32
|
function _inheritsLoose(subClass, superClass) {
|
|
33
33
|
subClass.prototype = Object.create(superClass.prototype);
|
|
34
34
|
subClass.prototype.constructor = subClass;
|
|
35
|
-
|
|
35
|
+
|
|
36
|
+
_setPrototypeOf(subClass, superClass);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function _setPrototypeOf(o, p) {
|
|
40
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
41
|
+
o.__proto__ = p;
|
|
42
|
+
return o;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
return _setPrototypeOf(o, p);
|
|
36
46
|
}
|
|
37
47
|
|
|
38
48
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -50,6 +60,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
50
60
|
return target;
|
|
51
61
|
}
|
|
52
62
|
|
|
63
|
+
var _excluded$f = ["as", "children", "contrast", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "paddingX", "paddingY", "padding", "marginTop", "marginRight", "marginBottom", "marginLeft", "marginX", "marginY", "margin", "display", "justifyContent", "alignItems", "maxWidth", "width", "background", "color", "flexDirection", "flexWrap", "className"];
|
|
53
64
|
function responsiveProp(prefix, prop) {
|
|
54
65
|
if (Array.isArray(prop)) {
|
|
55
66
|
var classes = [];
|
|
@@ -82,6 +93,7 @@ var Box = function Box(_ref) {
|
|
|
82
93
|
margin = _ref.margin,
|
|
83
94
|
display = _ref.display,
|
|
84
95
|
justifyContent = _ref.justifyContent,
|
|
96
|
+
alignItems = _ref.alignItems,
|
|
85
97
|
maxWidth = _ref.maxWidth,
|
|
86
98
|
width = _ref.width,
|
|
87
99
|
background = _ref.background,
|
|
@@ -89,7 +101,7 @@ var Box = function Box(_ref) {
|
|
|
89
101
|
flexDirection = _ref.flexDirection,
|
|
90
102
|
flexWrap = _ref.flexWrap,
|
|
91
103
|
className = _ref.className,
|
|
92
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
104
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$f);
|
|
93
105
|
|
|
94
106
|
var classes = [];
|
|
95
107
|
var resolvedPaddingTop = paddingTop || paddingY || padding;
|
|
@@ -111,6 +123,11 @@ var Box = function Box(_ref) {
|
|
|
111
123
|
resolvedMarginRight && classes.push.apply(classes, responsiveProp('eps-mr-', resolvedMarginRight));
|
|
112
124
|
display && classes.push.apply(classes, responsiveProp('eps-', display));
|
|
113
125
|
justifyContent && classes.push.apply(classes, responsiveProp('eps-justify-', justifyContent));
|
|
126
|
+
|
|
127
|
+
if (alignItems) {
|
|
128
|
+
classes.push.apply(classes, responsiveProp('eps-items-', alignItems));
|
|
129
|
+
}
|
|
130
|
+
|
|
114
131
|
maxWidth && classes.push.apply(classes, responsiveProp('eps-max-w-', maxWidth));
|
|
115
132
|
width && classes.push.apply(classes, responsiveProp('eps-w-', width));
|
|
116
133
|
color && classes.push("eps-color-" + color);
|
|
@@ -118,7 +135,7 @@ var Box = function Box(_ref) {
|
|
|
118
135
|
flexDirection && classes.push.apply(classes, responsiveProp('eps-flex-', flexDirection));
|
|
119
136
|
flexWrap && classes.push.apply(classes, responsiveProp('eps-flex-wrap-', flexWrap));
|
|
120
137
|
var classList = cx(classes, className);
|
|
121
|
-
return React.createElement(Component,
|
|
138
|
+
return React.createElement(Component, _extends({
|
|
122
139
|
className: classList
|
|
123
140
|
}, rest), children);
|
|
124
141
|
};
|
|
@@ -168,12 +185,13 @@ var ActionBar = function ActionBar(_ref3) {
|
|
|
168
185
|
}, children));
|
|
169
186
|
};
|
|
170
187
|
|
|
188
|
+
var _excluded$e = ["children", "className"];
|
|
171
189
|
var LinkButton = function LinkButton(_ref) {
|
|
172
190
|
var children = _ref.children,
|
|
173
191
|
className = _ref.className,
|
|
174
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
192
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
175
193
|
|
|
176
|
-
return React.createElement(Link$1,
|
|
194
|
+
return React.createElement(Link$1, _extends({}, rest, {
|
|
177
195
|
as: "button",
|
|
178
196
|
className: cx('eps-link-button', className)
|
|
179
197
|
}), children);
|
|
@@ -187,14 +205,21 @@ var LinkButton = function LinkButton(_ref) {
|
|
|
187
205
|
* you can drop the REACT_APP_ prefix.
|
|
188
206
|
*/
|
|
189
207
|
|
|
190
|
-
function
|
|
208
|
+
function featureFlag(flag) {
|
|
191
209
|
var _window$localStorage, _window$localStorage2;
|
|
192
210
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
211
|
+
return process.env["REACT_APP_" + flag] === 'true' || ((_window$localStorage = window.localStorage) == null ? void 0 : _window$localStorage.getItem(flag)) === 'true' || ((_window$localStorage2 = window.localStorage) == null ? void 0 : _window$localStorage2.getItem("REACT_APP_" + flag)) === 'true';
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Returns true if the provided flag exist in localStorage
|
|
215
|
+
* or is set as an environment variable.
|
|
216
|
+
*
|
|
217
|
+
* @param flag case sensitive flag. If it is an environment variable
|
|
218
|
+
* you can drop the REACT_APP_ prefix.
|
|
219
|
+
*/
|
|
196
220
|
|
|
197
|
-
|
|
221
|
+
function useFeatureToggle(flag) {
|
|
222
|
+
return featureFlag(flag);
|
|
198
223
|
}
|
|
199
224
|
var FeatureToggle = function FeatureToggle(_ref) {
|
|
200
225
|
var children = _ref.children,
|
|
@@ -208,11 +233,12 @@ var FeatureToggle = function FeatureToggle(_ref) {
|
|
|
208
233
|
return null;
|
|
209
234
|
};
|
|
210
235
|
|
|
236
|
+
var _excluded$d = ["title"];
|
|
211
237
|
var EnturPartnerLogoSvg = function EnturPartnerLogoSvg(_ref) {
|
|
212
238
|
var title = _ref.title,
|
|
213
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
239
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$d);
|
|
214
240
|
|
|
215
|
-
return React.createElement("svg",
|
|
241
|
+
return React.createElement("svg", _extends({
|
|
216
242
|
width: 257,
|
|
217
243
|
height: 37,
|
|
218
244
|
viewBox: "0 0 257 37"
|
|
@@ -270,6 +296,7 @@ var Content = function Content(_ref) {
|
|
|
270
296
|
}, children);
|
|
271
297
|
};
|
|
272
298
|
|
|
299
|
+
var _excluded$c = ["className", "children", "userName", "open", "onOpenChange"];
|
|
273
300
|
var UserMenu = function UserMenu(_ref) {
|
|
274
301
|
var className = _ref.className,
|
|
275
302
|
messages = _ref.messages,
|
|
@@ -352,7 +379,7 @@ var CustomOverflowMenu = function CustomOverflowMenu(_ref2) {
|
|
|
352
379
|
userName = _ref2.userName,
|
|
353
380
|
open = _ref2.open,
|
|
354
381
|
onOpenChange = _ref2.onOpenChange,
|
|
355
|
-
rest = _objectWithoutPropertiesLoose(_ref2,
|
|
382
|
+
rest = _objectWithoutPropertiesLoose(_ref2, _excluded$c);
|
|
356
383
|
|
|
357
384
|
var overflowItemsClasses = cx('eps-overflow-menu__group', {
|
|
358
385
|
'eps-overflow-menu__group--open': open
|
|
@@ -362,7 +389,7 @@ var CustomOverflowMenu = function CustomOverflowMenu(_ref2) {
|
|
|
362
389
|
useOutsideClick(overflowContentRef, overflowMenuTriggerRef, function () {
|
|
363
390
|
return onOpenChange(false);
|
|
364
391
|
});
|
|
365
|
-
return React.createElement("div", null, React.createElement(SecondaryButton,
|
|
392
|
+
return React.createElement("div", null, React.createElement(SecondaryButton, _extends({
|
|
366
393
|
className: cx('eps-overflow-menu__button', className),
|
|
367
394
|
onClick: function onClick() {
|
|
368
395
|
return onOpenChange(open ? false : true);
|
|
@@ -392,7 +419,7 @@ var CustomOverflowMenu = function CustomOverflowMenu(_ref2) {
|
|
|
392
419
|
};
|
|
393
420
|
|
|
394
421
|
var CustomOverflowMenuItem = function CustomOverflowMenuItem(props) {
|
|
395
|
-
return React.createElement("button",
|
|
422
|
+
return React.createElement("button", _extends({
|
|
396
423
|
className: cx(props.className, 'eps-overflow-menu__item'),
|
|
397
424
|
role: "menuitem"
|
|
398
425
|
}, props));
|
|
@@ -441,17 +468,18 @@ function useOutsideClick(ref, buttonRef, handler) {
|
|
|
441
468
|
}, [ref, buttonRef, handler]);
|
|
442
469
|
}
|
|
443
470
|
|
|
471
|
+
var _excluded$b = ["label", "organisations", "onChange", "selectedOrganisationId"];
|
|
444
472
|
var OrganisationDropDown = function OrganisationDropDown(_ref) {
|
|
445
473
|
var label = _ref.label,
|
|
446
474
|
organisations = _ref.organisations,
|
|
447
475
|
handleChange = _ref.onChange,
|
|
448
476
|
selectedOrganisationId = _ref.selectedOrganisationId,
|
|
449
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
477
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$b);
|
|
450
478
|
|
|
451
479
|
var selectedOrganisation = organisations.find(function (org) {
|
|
452
480
|
return org.id === selectedOrganisationId;
|
|
453
481
|
});
|
|
454
|
-
return React.createElement(Dropdown,
|
|
482
|
+
return React.createElement(Dropdown, _extends({
|
|
455
483
|
label: label,
|
|
456
484
|
searchable: true,
|
|
457
485
|
clearable: true,
|
|
@@ -476,6 +504,7 @@ var OrganisationDropDown = function OrganisationDropDown(_ref) {
|
|
|
476
504
|
}, rest));
|
|
477
505
|
};
|
|
478
506
|
|
|
507
|
+
/*global EventListener WindowEventHandlers*/
|
|
479
508
|
function useEventListener(eventName, handler, element) {
|
|
480
509
|
if (element === void 0) {
|
|
481
510
|
element = window;
|
|
@@ -500,15 +529,16 @@ function useEventListener(eventName, handler, element) {
|
|
|
500
529
|
}, [eventName, element]);
|
|
501
530
|
}
|
|
502
531
|
|
|
532
|
+
var _excluded$a = ["language", "options", "className", "onChange"];
|
|
503
533
|
var LanguageSelect = function LanguageSelect(_ref) {
|
|
504
534
|
var language = _ref.language,
|
|
505
535
|
options = _ref.options,
|
|
506
536
|
className = _ref.className,
|
|
507
537
|
_onChange = _ref.onChange,
|
|
508
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
538
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
509
539
|
|
|
510
540
|
var classNames = cx('eps-language-select', className);
|
|
511
|
-
return React.createElement("div",
|
|
541
|
+
return React.createElement("div", _extends({}, rest, {
|
|
512
542
|
className: classNames
|
|
513
543
|
}), React.createElement(SegmentedControl, {
|
|
514
544
|
onChange: function onChange(language) {
|
|
@@ -527,6 +557,7 @@ var LanguageSelect = function LanguageSelect(_ref) {
|
|
|
527
557
|
})));
|
|
528
558
|
};
|
|
529
559
|
|
|
560
|
+
var _excluded$9 = ["title", "inputComponent", "languages", "values", "onChange", "name", "variant", "feedback"];
|
|
530
561
|
var ExpandableMultiLanguageInput = function ExpandableMultiLanguageInput(_ref) {
|
|
531
562
|
var title = _ref.title,
|
|
532
563
|
InputComponent = _ref.inputComponent,
|
|
@@ -536,7 +567,7 @@ var ExpandableMultiLanguageInput = function ExpandableMultiLanguageInput(_ref) {
|
|
|
536
567
|
name = _ref.name,
|
|
537
568
|
variant = _ref.variant,
|
|
538
569
|
feedback = _ref.feedback,
|
|
539
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
570
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
|
540
571
|
|
|
541
572
|
var handleOnChange = function handleOnChange(language, value) {
|
|
542
573
|
var changes = _extends({}, values);
|
|
@@ -564,7 +595,7 @@ var ExpandableMultiLanguageInput = function ExpandableMultiLanguageInput(_ref) {
|
|
|
564
595
|
var langKey = _ref2.value,
|
|
565
596
|
label = _ref2.label,
|
|
566
597
|
required = _ref2.required;
|
|
567
|
-
return React.createElement(InputComponent,
|
|
598
|
+
return React.createElement(InputComponent, _extends({
|
|
568
599
|
"data-testid": "multi-lang-input-" + name + "-" + langKey,
|
|
569
600
|
key: title + langKey,
|
|
570
601
|
label: required ? label + '*' : label,
|
|
@@ -579,6 +610,7 @@ var ExpandableMultiLanguageInput = function ExpandableMultiLanguageInput(_ref) {
|
|
|
579
610
|
})));
|
|
580
611
|
};
|
|
581
612
|
|
|
613
|
+
var _excluded$8 = ["className", "inputComponent", "alertLabel", "alertLevel", "name", "languages", "values", "onChange", "defaultLanguage", "label", "onBlur"];
|
|
582
614
|
/**
|
|
583
615
|
* @deprecated use ExpandableMultiLanguageInput
|
|
584
616
|
*/
|
|
@@ -598,7 +630,7 @@ var MultiLanguageInput = function MultiLanguageInput(_ref) {
|
|
|
598
630
|
label = _ref$label === void 0 ? '' : _ref$label,
|
|
599
631
|
_ref$onBlur = _ref.onBlur,
|
|
600
632
|
onBlur = _ref$onBlur === void 0 ? function () {} : _ref$onBlur,
|
|
601
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
633
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
602
634
|
|
|
603
635
|
var _useState = useState(defaultLanguage),
|
|
604
636
|
language = _useState[0],
|
|
@@ -646,7 +678,7 @@ var MultiLanguageInput = function MultiLanguageInput(_ref) {
|
|
|
646
678
|
onChange: function onChange(lang) {
|
|
647
679
|
return handleLanguageChange(lang);
|
|
648
680
|
}
|
|
649
|
-
}), React.createElement(InputComponent,
|
|
681
|
+
}), React.createElement(InputComponent, _extends({
|
|
650
682
|
label: label,
|
|
651
683
|
variant: alertLevel,
|
|
652
684
|
feedback: alertLabel,
|
|
@@ -659,12 +691,13 @@ var MultiLanguageInput = function MultiLanguageInput(_ref) {
|
|
|
659
691
|
}, rest))));
|
|
660
692
|
};
|
|
661
693
|
|
|
694
|
+
var _excluded$7 = ["children", "className"];
|
|
662
695
|
var Unbutton = function Unbutton(_ref) {
|
|
663
696
|
var children = _ref.children,
|
|
664
697
|
className = _ref.className,
|
|
665
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
698
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
666
699
|
|
|
667
|
-
return React.createElement(Button,
|
|
700
|
+
return React.createElement(Button, _extends({
|
|
668
701
|
variant: "primary"
|
|
669
702
|
}, rest, {
|
|
670
703
|
className: cx('eps-unbutton', className)
|
|
@@ -732,39 +765,42 @@ var ErrorBoundary = /*#__PURE__*/function (_Component) {
|
|
|
732
765
|
return ErrorBoundary;
|
|
733
766
|
}(Component);
|
|
734
767
|
|
|
768
|
+
var _excluded$6 = ["date", "locale", "as", "hideTime"];
|
|
735
769
|
var FormatDateTime = function FormatDateTime(_ref) {
|
|
736
770
|
var date = _ref.date,
|
|
737
771
|
locale = _ref.locale,
|
|
738
772
|
_ref$as = _ref.as,
|
|
739
773
|
Component = _ref$as === void 0 ? 'main' : _ref$as,
|
|
740
774
|
hideTime = _ref.hideTime,
|
|
741
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
775
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
742
776
|
|
|
743
|
-
return React.createElement(Component,
|
|
777
|
+
return React.createElement(Component, _extends({}, rest), hideTime ? localeDate(date, locale) : localeDateTime(date, locale));
|
|
744
778
|
};
|
|
745
779
|
|
|
780
|
+
var _excluded$5 = ["amount", "as"];
|
|
746
781
|
var FormatCurrencyAmount = function FormatCurrencyAmount(_ref) {
|
|
747
782
|
var amount = _ref.amount,
|
|
748
783
|
_ref$as = _ref.as,
|
|
749
784
|
Component = _ref$as === void 0 ? 'span' : _ref$as,
|
|
750
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
785
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
751
786
|
|
|
752
787
|
var parsedAmount = Number(amount) || 0;
|
|
753
788
|
var formattedAmount = new Intl.NumberFormat('nb-NO', {
|
|
754
789
|
maximumFractionDigits: 2,
|
|
755
790
|
minimumFractionDigits: 2
|
|
756
791
|
}).format(parsedAmount);
|
|
757
|
-
return React.createElement(Component,
|
|
792
|
+
return React.createElement(Component, _extends({}, rest), formattedAmount);
|
|
758
793
|
};
|
|
759
794
|
|
|
795
|
+
var _excluded$4 = ["items", "locale", "className"];
|
|
760
796
|
var AuditInfo = function AuditInfo(_ref) {
|
|
761
797
|
var items = _ref.items,
|
|
762
798
|
locale = _ref.locale,
|
|
763
799
|
className = _ref.className,
|
|
764
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
800
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
765
801
|
|
|
766
802
|
var classNames = cx('ep-audit-info', className);
|
|
767
|
-
return React.createElement("div",
|
|
803
|
+
return React.createElement("div", _extends({
|
|
768
804
|
className: classNames
|
|
769
805
|
}, rest), items.map(function (_ref2, i) {
|
|
770
806
|
var label = _ref2.label,
|
|
@@ -781,6 +817,7 @@ var AuditInfo = function AuditInfo(_ref) {
|
|
|
781
817
|
}));
|
|
782
818
|
};
|
|
783
819
|
|
|
820
|
+
var _excluded$3 = ["isOpen", "children", "message", "size", "buttons", "onConfirm", "messages", "onClose", "onDismiss"];
|
|
784
821
|
var ConfirmModal = function ConfirmModal(_ref) {
|
|
785
822
|
var _ref$isOpen = _ref.isOpen,
|
|
786
823
|
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
|
|
@@ -793,11 +830,11 @@ var ConfirmModal = function ConfirmModal(_ref) {
|
|
|
793
830
|
messages = _ref.messages,
|
|
794
831
|
onClose = _ref.onClose,
|
|
795
832
|
onDismiss = _ref.onDismiss,
|
|
796
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
833
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
797
834
|
|
|
798
835
|
var childrenToRender = children ? children : message;
|
|
799
836
|
var handleDismiss = onClose ? onClose : onDismiss;
|
|
800
|
-
return React.createElement(Modal,
|
|
837
|
+
return React.createElement(Modal, _extends({
|
|
801
838
|
size: size,
|
|
802
839
|
open: isOpen,
|
|
803
840
|
onDismiss: handleDismiss
|
|
@@ -812,10 +849,11 @@ var ConfirmModal = function ConfirmModal(_ref) {
|
|
|
812
849
|
}, messages.confirm)) : buttons));
|
|
813
850
|
};
|
|
814
851
|
|
|
852
|
+
var _excluded$2 = ["children", "shouldBlockNavigation"];
|
|
815
853
|
var RouteLeavingGuard = function RouteLeavingGuard(_ref) {
|
|
816
854
|
var children = _ref.children,
|
|
817
855
|
shouldBlockNavigation = _ref.shouldBlockNavigation,
|
|
818
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
856
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
819
857
|
|
|
820
858
|
var history = useHistory();
|
|
821
859
|
|
|
@@ -847,7 +885,7 @@ var RouteLeavingGuard = function RouteLeavingGuard(_ref) {
|
|
|
847
885
|
|
|
848
886
|
return React.createElement(React.Fragment, null, React.createElement(Prompt, {
|
|
849
887
|
message: allowNavigation
|
|
850
|
-
}), React.createElement(ConfirmModal,
|
|
888
|
+
}), React.createElement(ConfirmModal, _extends({
|
|
851
889
|
onDismiss: closeModal,
|
|
852
890
|
open: status === 'BLOCKED',
|
|
853
891
|
onConfirm: handleConfirm
|
|
@@ -912,13 +950,14 @@ var PermissionCheck = function PermissionCheck(_ref) {
|
|
|
912
950
|
return React.createElement(React.Fragment, null, allowed ? children : fallback);
|
|
913
951
|
};
|
|
914
952
|
|
|
953
|
+
var _excluded$1 = ["children", "actualPermissions", "all", "oneOf", "onReject"];
|
|
915
954
|
var PermissionCheckedRoute = function PermissionCheckedRoute(_ref) {
|
|
916
955
|
var children = _ref.children,
|
|
917
956
|
actualPermissions = _ref.actualPermissions,
|
|
918
957
|
all = _ref.all,
|
|
919
958
|
oneOf = _ref.oneOf,
|
|
920
959
|
onReject = _ref.onReject,
|
|
921
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
960
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
922
961
|
|
|
923
962
|
var redirect = React.createElement(Redirect, {
|
|
924
963
|
to: {
|
|
@@ -933,7 +972,7 @@ var PermissionCheckedRoute = function PermissionCheckedRoute(_ref) {
|
|
|
933
972
|
all: all,
|
|
934
973
|
oneOf: oneOf,
|
|
935
974
|
fallback: onReject ? onReject : redirect
|
|
936
|
-
}, React.createElement(Route,
|
|
975
|
+
}, React.createElement(Route, _extends({}, props), children));
|
|
937
976
|
};
|
|
938
977
|
|
|
939
978
|
var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
@@ -984,11 +1023,12 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
984
1023
|
};
|
|
985
1024
|
|
|
986
1025
|
var Link = function Link(props) {
|
|
987
|
-
return React.createElement(Link$1,
|
|
1026
|
+
return React.createElement(Link$1, _extends({}, props, {
|
|
988
1027
|
as: Link$2
|
|
989
1028
|
}), props.children);
|
|
990
1029
|
};
|
|
991
1030
|
|
|
1031
|
+
var _excluded = ["as", "children", "fontSize", "color", "lineHeight", "fontWeight", "className"];
|
|
992
1032
|
var Text = function Text(_ref) {
|
|
993
1033
|
var _ref$as = _ref.as,
|
|
994
1034
|
component = _ref$as === void 0 ? 'span' : _ref$as,
|
|
@@ -998,19 +1038,19 @@ var Text = function Text(_ref) {
|
|
|
998
1038
|
lineHeight = _ref.lineHeight,
|
|
999
1039
|
fontWeight = _ref.fontWeight,
|
|
1000
1040
|
className = _ref.className,
|
|
1001
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
1041
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
1002
1042
|
|
|
1003
1043
|
var classes = [];
|
|
1004
1044
|
fontSize && classes.push.apply(classes, responsiveProp('eps-font-size-', fontSize));
|
|
1005
1045
|
lineHeight && classes.push.apply(classes, responsiveProp('eps-line-height-', lineHeight));
|
|
1006
1046
|
fontWeight && classes.push('eps-font-weight-' + fontWeight);
|
|
1007
1047
|
var classList = cx(classes, className);
|
|
1008
|
-
return React.createElement(Box,
|
|
1048
|
+
return React.createElement(Box, _extends({
|
|
1009
1049
|
as: component,
|
|
1010
1050
|
color: color,
|
|
1011
1051
|
className: classList
|
|
1012
1052
|
}, rest), children);
|
|
1013
1053
|
};
|
|
1014
1054
|
|
|
1015
|
-
export { ActionBar, ActionBarLeft, ActionBarRight, AuditInfo, Box, Breadcrumbs, ConfirmModal, Content, EnturPartnerLogo, EnturPartnerLogoSvg, ErrorBoundary, ExpandableMultiLanguageInput, FeatureToggle, FormatCurrencyAmount, FormatDateTime, LanguageSelect, Link, LinkButton, Menu, MultiLanguageInput, OrganisationDropDown, Pager, PermissionCheck, PermissionCheckedRoute, RouteLeavingGuard, Stack, StatusLabel, Text, Unbutton, UserMenu, responsiveProp, useEventListener, useFeatureToggle };
|
|
1055
|
+
export { ActionBar, ActionBarLeft, ActionBarRight, AuditInfo, Box, Breadcrumbs, ConfirmModal, Content, EnturPartnerLogo, EnturPartnerLogoSvg, ErrorBoundary, ExpandableMultiLanguageInput, FeatureToggle, FormatCurrencyAmount, FormatDateTime, LanguageSelect, Link, LinkButton, Menu, MultiLanguageInput, OrganisationDropDown, Pager, PermissionCheck, PermissionCheckedRoute, RouteLeavingGuard, Stack, StatusLabel, Text, Unbutton, UserMenu, featureFlag, responsiveProp, useEventListener, useFeatureToggle };
|
|
1016
1056
|
//# sourceMappingURL=common.esm.js.map
|