@fluxo-dev/shell 0.0.22 → 0.0.23
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/index.esm.css +4 -0
- package/index.esm.js +669 -196
- package/package.json +7 -7
- package/src/index.d.ts +2 -1
- package/src/lib/app.d.ts +12 -3
- package/src/lib/components/frontend-switch/frontend-switch.d.ts +1 -0
- package/src/lib/components/frontend-switch/index.d.ts +1 -0
- package/src/lib/components/routes/main-routes.d.ts +3 -2
- package/src/lib/layouts/main/app-layout.d.ts +1 -0
- package/src/lib/layouts/main/footer-bar.d.ts +1 -0
- package/src/lib/pages/frontend-switcher/frontend-switcher.d.ts +3 -0
- package/src/lib/pages/login/login-page.d.ts +4 -1
- package/src/lib/pages/settings/menu-designer/menu-designer.d.ts +5 -1
- package/src/lib/pages/settings/settings.d.ts +2 -2
package/index.esm.js
CHANGED
|
@@ -6,7 +6,7 @@ import { useLocation, Navigate, matchPath, Outlet, useNavigate, Link, Route, use
|
|
|
6
6
|
import { FluxoClientSys, AppType, AppState, FluxoStateDispatcher, UserService, AppMenuContextType, ApiKeyService, DomainRoleService } from '@fluxo-dev/api-client-base';
|
|
7
7
|
import { AccessDenied, DataCard, NoData, ConfirmModal, ShellPage, ErrorPage as ErrorPage$1, WaitData, FlxRoutes } from '@fluxo-dev/ui-components';
|
|
8
8
|
import { ModuleLoader } from '@fluxo-dev/shell-mfe';
|
|
9
|
-
import { Text, TextInput, useMantineTheme, AppShell, Stack, Group, Burger, Badge,
|
|
9
|
+
import { Text, TextInput, ActionIcon, useMantineTheme, AppShell, Stack, Group, Burger, Badge, Drawer, NavLink, Avatar, Anchor, Tooltip, Divider, Space, useMantineColorScheme, UnstyledButton, Box, ThemeIcon, Collapse, ScrollArea, rem, Loader, Grid, Center, PasswordInput, Button, ColorSwatch, FileButton, NumberInput, Alert, ColorInput, Checkbox, Modal, Switch, Select, Chip, LoadingOverlay, Image as Image$1, Menu, Textarea, Table, MultiSelect, MantineProvider } from '@mantine/core';
|
|
10
10
|
import { openSpotlight, Spotlight } from '@mantine/spotlight';
|
|
11
11
|
import { useOs, useHotkeys, useIdle } from '@mantine/hooks';
|
|
12
12
|
import { showNotification, Notifications } from '@mantine/notifications';
|
|
@@ -41,7 +41,7 @@ var classofRaw$1 = function (it) {
|
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
var fails$b = fails$c;
|
|
44
|
-
var classof$
|
|
44
|
+
var classof$7 = classofRaw$1;
|
|
45
45
|
|
|
46
46
|
var split = ''.split;
|
|
47
47
|
|
|
@@ -51,7 +51,7 @@ var indexedObject = fails$b(function () {
|
|
|
51
51
|
// eslint-disable-next-line no-prototype-builtins
|
|
52
52
|
return !Object('z').propertyIsEnumerable(0);
|
|
53
53
|
}) ? function (it) {
|
|
54
|
-
return classof$
|
|
54
|
+
return classof$7(it) == 'String' ? split.call(it, '') : Object(it);
|
|
55
55
|
} : Object;
|
|
56
56
|
|
|
57
57
|
// `RequireObjectCoercible` abstract operation
|
|
@@ -94,16 +94,16 @@ var descriptors = !fails$a(function () {
|
|
|
94
94
|
|
|
95
95
|
var objectDefineProperty = {};
|
|
96
96
|
|
|
97
|
-
var isObject$
|
|
97
|
+
var isObject$b = function (it) {
|
|
98
98
|
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
|
99
99
|
};
|
|
100
100
|
|
|
101
101
|
var global$k = global$l;
|
|
102
|
-
var isObject$
|
|
102
|
+
var isObject$a = isObject$b;
|
|
103
103
|
|
|
104
104
|
var document$2 = global$k.document;
|
|
105
105
|
// typeof document.createElement is 'object' in old IE
|
|
106
|
-
var EXISTS = isObject$
|
|
106
|
+
var EXISTS = isObject$a(document$2) && isObject$a(document$2.createElement);
|
|
107
107
|
|
|
108
108
|
var documentCreateElement$1 = function (it) {
|
|
109
109
|
return EXISTS ? document$2.createElement(it) : {};
|
|
@@ -120,26 +120,26 @@ var ie8DomDefine = !DESCRIPTORS$8 && !fails$9(function () {
|
|
|
120
120
|
}).a != 7;
|
|
121
121
|
});
|
|
122
122
|
|
|
123
|
-
var isObject$
|
|
123
|
+
var isObject$9 = isObject$b;
|
|
124
124
|
|
|
125
125
|
var anObject$b = function (it) {
|
|
126
|
-
if (!isObject$
|
|
126
|
+
if (!isObject$9(it)) {
|
|
127
127
|
throw TypeError(String(it) + ' is not an object');
|
|
128
128
|
} return it;
|
|
129
129
|
};
|
|
130
130
|
|
|
131
|
-
var isObject$
|
|
131
|
+
var isObject$8 = isObject$b;
|
|
132
132
|
|
|
133
133
|
// `ToPrimitive` abstract operation
|
|
134
134
|
// https://tc39.github.io/ecma262/#sec-toprimitive
|
|
135
135
|
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
|
136
136
|
// and the second argument - flag - preferred type is a string
|
|
137
137
|
var toPrimitive$2 = function (input, PREFERRED_STRING) {
|
|
138
|
-
if (!isObject$
|
|
138
|
+
if (!isObject$8(input)) return input;
|
|
139
139
|
var fn, val;
|
|
140
|
-
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject$
|
|
141
|
-
if (typeof (fn = input.valueOf) == 'function' && !isObject$
|
|
142
|
-
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject$
|
|
140
|
+
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject$8(val = fn.call(input))) return val;
|
|
141
|
+
if (typeof (fn = input.valueOf) == 'function' && !isObject$8(val = fn.call(input))) return val;
|
|
142
|
+
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject$8(val = fn.call(input))) return val;
|
|
143
143
|
throw TypeError("Can't convert object to primitive value");
|
|
144
144
|
};
|
|
145
145
|
|
|
@@ -253,7 +253,7 @@ var WellKnownSymbolsStore = shared$1('wks');
|
|
|
253
253
|
var Symbol$1 = global$h.Symbol;
|
|
254
254
|
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
255
255
|
|
|
256
|
-
var wellKnownSymbol$
|
|
256
|
+
var wellKnownSymbol$g = function (name) {
|
|
257
257
|
if (!has$d(WellKnownSymbolsStore, name)) {
|
|
258
258
|
if (NATIVE_SYMBOL && has$d(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name];
|
|
259
259
|
else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
|
|
@@ -265,21 +265,21 @@ var floor = Math.floor;
|
|
|
265
265
|
|
|
266
266
|
// `ToInteger` abstract operation
|
|
267
267
|
// https://tc39.github.io/ecma262/#sec-tointeger
|
|
268
|
-
var toInteger$
|
|
268
|
+
var toInteger$3 = function (argument) {
|
|
269
269
|
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
|
|
270
270
|
};
|
|
271
271
|
|
|
272
|
-
var toInteger$
|
|
272
|
+
var toInteger$2 = toInteger$3;
|
|
273
273
|
|
|
274
274
|
var min$1 = Math.min;
|
|
275
275
|
|
|
276
276
|
// `ToLength` abstract operation
|
|
277
277
|
// https://tc39.github.io/ecma262/#sec-tolength
|
|
278
|
-
var toLength$
|
|
279
|
-
return argument > 0 ? min$1(toInteger$
|
|
278
|
+
var toLength$4 = function (argument) {
|
|
279
|
+
return argument > 0 ? min$1(toInteger$2(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
280
280
|
};
|
|
281
281
|
|
|
282
|
-
var toInteger = toInteger$
|
|
282
|
+
var toInteger$1 = toInteger$3;
|
|
283
283
|
|
|
284
284
|
var max = Math.max;
|
|
285
285
|
var min = Math.min;
|
|
@@ -288,19 +288,19 @@ var min = Math.min;
|
|
|
288
288
|
// Let integer be ? ToInteger(index).
|
|
289
289
|
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
290
290
|
var toAbsoluteIndex$1 = function (index, length) {
|
|
291
|
-
var integer = toInteger(index);
|
|
291
|
+
var integer = toInteger$1(index);
|
|
292
292
|
return integer < 0 ? max(integer + length, 0) : min(integer, length);
|
|
293
293
|
};
|
|
294
294
|
|
|
295
295
|
var toIndexedObject$3 = toIndexedObject$4;
|
|
296
|
-
var toLength$
|
|
296
|
+
var toLength$3 = toLength$4;
|
|
297
297
|
var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
298
298
|
|
|
299
299
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
300
300
|
var createMethod$1 = function (IS_INCLUDES) {
|
|
301
301
|
return function ($this, el, fromIndex) {
|
|
302
302
|
var O = toIndexedObject$3($this);
|
|
303
|
-
var length = toLength$
|
|
303
|
+
var length = toLength$3(O.length);
|
|
304
304
|
var index = toAbsoluteIndex(fromIndex, length);
|
|
305
305
|
var value;
|
|
306
306
|
// Array#includes uses SameValueZero equality algorithm
|
|
@@ -490,11 +490,11 @@ var objectCreate = Object.create || function create(O, Properties) {
|
|
|
490
490
|
return Properties === undefined ? result : defineProperties(result, Properties);
|
|
491
491
|
};
|
|
492
492
|
|
|
493
|
-
var wellKnownSymbol$
|
|
493
|
+
var wellKnownSymbol$f = wellKnownSymbol$g;
|
|
494
494
|
var create$1 = objectCreate;
|
|
495
495
|
var definePropertyModule$2 = objectDefineProperty;
|
|
496
496
|
|
|
497
|
-
var UNSCOPABLES = wellKnownSymbol$
|
|
497
|
+
var UNSCOPABLES = wellKnownSymbol$f('unscopables');
|
|
498
498
|
var ArrayPrototype$1 = Array.prototype;
|
|
499
499
|
|
|
500
500
|
// Array.prototype[@@unscopables]
|
|
@@ -507,7 +507,7 @@ if (ArrayPrototype$1[UNSCOPABLES] == undefined) {
|
|
|
507
507
|
}
|
|
508
508
|
|
|
509
509
|
// add a key to Array.prototype[@@unscopables]
|
|
510
|
-
var addToUnscopables$
|
|
510
|
+
var addToUnscopables$3 = function (key) {
|
|
511
511
|
ArrayPrototype$1[UNSCOPABLES][key] = true;
|
|
512
512
|
};
|
|
513
513
|
|
|
@@ -535,7 +535,7 @@ var nativeWeakMap = typeof WeakMap$2 === 'function' && /native code/.test(inspec
|
|
|
535
535
|
|
|
536
536
|
var NATIVE_WEAK_MAP = nativeWeakMap;
|
|
537
537
|
var global$d = global$l;
|
|
538
|
-
var isObject$
|
|
538
|
+
var isObject$7 = isObject$b;
|
|
539
539
|
var createNonEnumerableProperty$5 = createNonEnumerableProperty$7;
|
|
540
540
|
var objectHas = has$e;
|
|
541
541
|
var sharedKey$1 = sharedKey$3;
|
|
@@ -551,7 +551,7 @@ var enforce = function (it) {
|
|
|
551
551
|
var getterFor = function (TYPE) {
|
|
552
552
|
return function (it) {
|
|
553
553
|
var state;
|
|
554
|
-
if (!isObject$
|
|
554
|
+
if (!isObject$7(it) || (state = get$1(it)).type !== TYPE) {
|
|
555
555
|
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
|
556
556
|
} return state;
|
|
557
557
|
};
|
|
@@ -795,7 +795,7 @@ var requireObjectCoercible$2 = requireObjectCoercible$4;
|
|
|
795
795
|
|
|
796
796
|
// `ToObject` abstract operation
|
|
797
797
|
// https://tc39.github.io/ecma262/#sec-toobject
|
|
798
|
-
var toObject$
|
|
798
|
+
var toObject$4 = function (argument) {
|
|
799
799
|
return Object(requireObjectCoercible$2(argument));
|
|
800
800
|
};
|
|
801
801
|
|
|
@@ -808,7 +808,7 @@ var correctPrototypeGetter = !fails$6(function () {
|
|
|
808
808
|
});
|
|
809
809
|
|
|
810
810
|
var has$7 = has$e;
|
|
811
|
-
var toObject$
|
|
811
|
+
var toObject$3 = toObject$4;
|
|
812
812
|
var sharedKey = sharedKey$3;
|
|
813
813
|
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
814
814
|
|
|
@@ -818,7 +818,7 @@ var ObjectPrototype = Object.prototype;
|
|
|
818
818
|
// `Object.getPrototypeOf` method
|
|
819
819
|
// https://tc39.github.io/ecma262/#sec-object.getprototypeof
|
|
820
820
|
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
|
|
821
|
-
O = toObject$
|
|
821
|
+
O = toObject$3(O);
|
|
822
822
|
if (has$7(O, IE_PROTO)) return O[IE_PROTO];
|
|
823
823
|
if (typeof O.constructor == 'function' && O instanceof O.constructor) {
|
|
824
824
|
return O.constructor.prototype;
|
|
@@ -828,9 +828,9 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : fu
|
|
|
828
828
|
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
829
829
|
var createNonEnumerableProperty$2 = createNonEnumerableProperty$7;
|
|
830
830
|
var has$6 = has$e;
|
|
831
|
-
var wellKnownSymbol$
|
|
831
|
+
var wellKnownSymbol$e = wellKnownSymbol$g;
|
|
832
832
|
|
|
833
|
-
var ITERATOR$5 = wellKnownSymbol$
|
|
833
|
+
var ITERATOR$5 = wellKnownSymbol$e('iterator');
|
|
834
834
|
var BUGGY_SAFARI_ITERATORS$1 = false;
|
|
835
835
|
|
|
836
836
|
var returnThis$2 = function () { return this; };
|
|
@@ -863,9 +863,9 @@ var iteratorsCore = {
|
|
|
863
863
|
|
|
864
864
|
var defineProperty$3 = objectDefineProperty.f;
|
|
865
865
|
var has$5 = has$e;
|
|
866
|
-
var wellKnownSymbol$
|
|
866
|
+
var wellKnownSymbol$d = wellKnownSymbol$g;
|
|
867
867
|
|
|
868
|
-
var TO_STRING_TAG$3 = wellKnownSymbol$
|
|
868
|
+
var TO_STRING_TAG$3 = wellKnownSymbol$d('toStringTag');
|
|
869
869
|
|
|
870
870
|
var setToStringTag$3 = function (it, TAG, STATIC) {
|
|
871
871
|
if (it && !has$5(it = STATIC ? it : it.prototype, TO_STRING_TAG$3)) {
|
|
@@ -889,10 +889,10 @@ var createIteratorConstructor$1 = function (IteratorConstructor, NAME, next) {
|
|
|
889
889
|
return IteratorConstructor;
|
|
890
890
|
};
|
|
891
891
|
|
|
892
|
-
var isObject$
|
|
892
|
+
var isObject$6 = isObject$b;
|
|
893
893
|
|
|
894
894
|
var aPossiblePrototype$1 = function (it) {
|
|
895
|
-
if (!isObject$
|
|
895
|
+
if (!isObject$6(it) && it !== null) {
|
|
896
896
|
throw TypeError("Can't set " + String(it) + ' as a prototype');
|
|
897
897
|
} return it;
|
|
898
898
|
};
|
|
@@ -922,20 +922,20 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
922
922
|
};
|
|
923
923
|
}() : undefined);
|
|
924
924
|
|
|
925
|
-
var $$
|
|
925
|
+
var $$9 = _export;
|
|
926
926
|
var createIteratorConstructor = createIteratorConstructor$1;
|
|
927
927
|
var getPrototypeOf = objectGetPrototypeOf;
|
|
928
928
|
var setPrototypeOf = objectSetPrototypeOf;
|
|
929
929
|
var setToStringTag$1 = setToStringTag$3;
|
|
930
930
|
var createNonEnumerableProperty$1 = createNonEnumerableProperty$7;
|
|
931
931
|
var redefine$4 = redefine$6.exports;
|
|
932
|
-
var wellKnownSymbol$
|
|
932
|
+
var wellKnownSymbol$c = wellKnownSymbol$g;
|
|
933
933
|
var Iterators$3 = iterators;
|
|
934
934
|
var IteratorsCore = iteratorsCore;
|
|
935
935
|
|
|
936
936
|
var IteratorPrototype = IteratorsCore.IteratorPrototype;
|
|
937
937
|
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
|
|
938
|
-
var ITERATOR$4 = wellKnownSymbol$
|
|
938
|
+
var ITERATOR$4 = wellKnownSymbol$c('iterator');
|
|
939
939
|
var KEYS = 'keys';
|
|
940
940
|
var VALUES = 'values';
|
|
941
941
|
var ENTRIES = 'entries';
|
|
@@ -1004,14 +1004,14 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
|
|
|
1004
1004
|
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
1005
1005
|
redefine$4(IterablePrototype, KEY, methods[KEY]);
|
|
1006
1006
|
}
|
|
1007
|
-
} else $$
|
|
1007
|
+
} else $$9({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
1008
1008
|
}
|
|
1009
1009
|
|
|
1010
1010
|
return methods;
|
|
1011
1011
|
};
|
|
1012
1012
|
|
|
1013
1013
|
var toIndexedObject = toIndexedObject$4;
|
|
1014
|
-
var addToUnscopables$
|
|
1014
|
+
var addToUnscopables$2 = addToUnscopables$3;
|
|
1015
1015
|
var Iterators$2 = iterators;
|
|
1016
1016
|
var InternalStateModule$1 = internalState;
|
|
1017
1017
|
var defineIterator = defineIterator$1;
|
|
@@ -1059,9 +1059,9 @@ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind)
|
|
|
1059
1059
|
Iterators$2.Arguments = Iterators$2.Array;
|
|
1060
1060
|
|
|
1061
1061
|
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
|
1062
|
-
addToUnscopables$
|
|
1063
|
-
addToUnscopables$
|
|
1064
|
-
addToUnscopables$
|
|
1062
|
+
addToUnscopables$2('keys');
|
|
1063
|
+
addToUnscopables$2('values');
|
|
1064
|
+
addToUnscopables$2('entries');
|
|
1065
1065
|
|
|
1066
1066
|
// iterable DOM collections
|
|
1067
1067
|
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
|
@@ -1103,10 +1103,10 @@ var global$a = global$l;
|
|
|
1103
1103
|
var DOMIterables = domIterables;
|
|
1104
1104
|
var ArrayIteratorMethods = es_array_iterator;
|
|
1105
1105
|
var createNonEnumerableProperty = createNonEnumerableProperty$7;
|
|
1106
|
-
var wellKnownSymbol$
|
|
1106
|
+
var wellKnownSymbol$b = wellKnownSymbol$g;
|
|
1107
1107
|
|
|
1108
|
-
var ITERATOR$3 = wellKnownSymbol$
|
|
1109
|
-
var TO_STRING_TAG$2 = wellKnownSymbol$
|
|
1108
|
+
var ITERATOR$3 = wellKnownSymbol$b('iterator');
|
|
1109
|
+
var TO_STRING_TAG$2 = wellKnownSymbol$b('toStringTag');
|
|
1110
1110
|
var ArrayValues = ArrayIteratorMethods.values;
|
|
1111
1111
|
|
|
1112
1112
|
for (var COLLECTION_NAME in DOMIterables) {
|
|
@@ -1133,11 +1133,11 @@ for (var COLLECTION_NAME in DOMIterables) {
|
|
|
1133
1133
|
}
|
|
1134
1134
|
}
|
|
1135
1135
|
|
|
1136
|
-
var $$
|
|
1136
|
+
var $$8 = _export;
|
|
1137
1137
|
var DESCRIPTORS$3 = descriptors;
|
|
1138
1138
|
var global$9 = global$l;
|
|
1139
1139
|
var has$4 = has$e;
|
|
1140
|
-
var isObject$
|
|
1140
|
+
var isObject$5 = isObject$b;
|
|
1141
1141
|
var defineProperty$2 = objectDefineProperty.f;
|
|
1142
1142
|
var copyConstructorProperties = copyConstructorProperties$2;
|
|
1143
1143
|
|
|
@@ -1168,7 +1168,7 @@ if (DESCRIPTORS$3 && typeof NativeSymbol == 'function' && (!('description' in Na
|
|
|
1168
1168
|
defineProperty$2(symbolPrototype, 'description', {
|
|
1169
1169
|
configurable: true,
|
|
1170
1170
|
get: function description() {
|
|
1171
|
-
var symbol = isObject$
|
|
1171
|
+
var symbol = isObject$5(this) ? this.valueOf() : this;
|
|
1172
1172
|
var string = symbolToString.call(symbol);
|
|
1173
1173
|
if (has$4(EmptyStringDescriptionStore, symbol)) return '';
|
|
1174
1174
|
var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');
|
|
@@ -1176,7 +1176,7 @@ if (DESCRIPTORS$3 && typeof NativeSymbol == 'function' && (!('description' in Na
|
|
|
1176
1176
|
}
|
|
1177
1177
|
});
|
|
1178
1178
|
|
|
1179
|
-
$$
|
|
1179
|
+
$$8({ global: true, forced: true }, {
|
|
1180
1180
|
Symbol: SymbolWrapper
|
|
1181
1181
|
});
|
|
1182
1182
|
}
|
|
@@ -1194,17 +1194,17 @@ var redefineAll$1 = function (target, src, options) {
|
|
|
1194
1194
|
|
|
1195
1195
|
var getBuiltIn$3 = getBuiltIn$6;
|
|
1196
1196
|
var definePropertyModule = objectDefineProperty;
|
|
1197
|
-
var wellKnownSymbol$
|
|
1197
|
+
var wellKnownSymbol$a = wellKnownSymbol$g;
|
|
1198
1198
|
var DESCRIPTORS$2 = descriptors;
|
|
1199
1199
|
|
|
1200
|
-
var SPECIES$
|
|
1200
|
+
var SPECIES$3 = wellKnownSymbol$a('species');
|
|
1201
1201
|
|
|
1202
1202
|
var setSpecies$1 = function (CONSTRUCTOR_NAME) {
|
|
1203
1203
|
var Constructor = getBuiltIn$3(CONSTRUCTOR_NAME);
|
|
1204
1204
|
var defineProperty = definePropertyModule.f;
|
|
1205
1205
|
|
|
1206
|
-
if (DESCRIPTORS$2 && Constructor && !Constructor[SPECIES$
|
|
1207
|
-
defineProperty(Constructor, SPECIES$
|
|
1206
|
+
if (DESCRIPTORS$2 && Constructor && !Constructor[SPECIES$3]) {
|
|
1207
|
+
defineProperty(Constructor, SPECIES$3, {
|
|
1208
1208
|
configurable: true,
|
|
1209
1209
|
get: function () { return this; }
|
|
1210
1210
|
});
|
|
@@ -1225,10 +1225,10 @@ var anInstance$1 = function (it, Constructor, name) {
|
|
|
1225
1225
|
|
|
1226
1226
|
var iterate$2 = {exports: {}};
|
|
1227
1227
|
|
|
1228
|
-
var wellKnownSymbol$
|
|
1228
|
+
var wellKnownSymbol$9 = wellKnownSymbol$g;
|
|
1229
1229
|
var Iterators$1 = iterators;
|
|
1230
1230
|
|
|
1231
|
-
var ITERATOR$2 = wellKnownSymbol$
|
|
1231
|
+
var ITERATOR$2 = wellKnownSymbol$9('iterator');
|
|
1232
1232
|
var ArrayPrototype = Array.prototype;
|
|
1233
1233
|
|
|
1234
1234
|
// check on default Array iterator
|
|
@@ -1261,9 +1261,9 @@ var functionBindContext = function (fn, that, length) {
|
|
|
1261
1261
|
};
|
|
1262
1262
|
};
|
|
1263
1263
|
|
|
1264
|
-
var wellKnownSymbol$
|
|
1264
|
+
var wellKnownSymbol$8 = wellKnownSymbol$g;
|
|
1265
1265
|
|
|
1266
|
-
var TO_STRING_TAG$1 = wellKnownSymbol$
|
|
1266
|
+
var TO_STRING_TAG$1 = wellKnownSymbol$8('toStringTag');
|
|
1267
1267
|
var test$1 = {};
|
|
1268
1268
|
|
|
1269
1269
|
test$1[TO_STRING_TAG$1] = 'z';
|
|
@@ -1272,9 +1272,9 @@ var toStringTagSupport = String(test$1) === '[object z]';
|
|
|
1272
1272
|
|
|
1273
1273
|
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
1274
1274
|
var classofRaw = classofRaw$1;
|
|
1275
|
-
var wellKnownSymbol$
|
|
1275
|
+
var wellKnownSymbol$7 = wellKnownSymbol$g;
|
|
1276
1276
|
|
|
1277
|
-
var TO_STRING_TAG = wellKnownSymbol$
|
|
1277
|
+
var TO_STRING_TAG = wellKnownSymbol$7('toStringTag');
|
|
1278
1278
|
// ES3 wrong here
|
|
1279
1279
|
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
1280
1280
|
|
|
@@ -1286,7 +1286,7 @@ var tryGet = function (it, key) {
|
|
|
1286
1286
|
};
|
|
1287
1287
|
|
|
1288
1288
|
// getting tag from ES6+ `Object.prototype.toString`
|
|
1289
|
-
var classof$
|
|
1289
|
+
var classof$6 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
1290
1290
|
var O, tag, result;
|
|
1291
1291
|
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
1292
1292
|
// @@toStringTag case
|
|
@@ -1297,16 +1297,16 @@ var classof$5 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
|
1297
1297
|
: (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
|
|
1298
1298
|
};
|
|
1299
1299
|
|
|
1300
|
-
var classof$
|
|
1300
|
+
var classof$5 = classof$6;
|
|
1301
1301
|
var Iterators = iterators;
|
|
1302
|
-
var wellKnownSymbol$
|
|
1302
|
+
var wellKnownSymbol$6 = wellKnownSymbol$g;
|
|
1303
1303
|
|
|
1304
|
-
var ITERATOR$1 = wellKnownSymbol$
|
|
1304
|
+
var ITERATOR$1 = wellKnownSymbol$6('iterator');
|
|
1305
1305
|
|
|
1306
1306
|
var getIteratorMethod$1 = function (it) {
|
|
1307
1307
|
if (it != undefined) return it[ITERATOR$1]
|
|
1308
1308
|
|| it['@@iterator']
|
|
1309
|
-
|| Iterators[classof$
|
|
1309
|
+
|| Iterators[classof$5(it)];
|
|
1310
1310
|
};
|
|
1311
1311
|
|
|
1312
1312
|
var anObject$5 = anObject$b;
|
|
@@ -1325,8 +1325,8 @@ var callWithSafeIterationClosing$1 = function (iterator, fn, value, ENTRIES) {
|
|
|
1325
1325
|
|
|
1326
1326
|
var anObject$4 = anObject$b;
|
|
1327
1327
|
var isArrayIteratorMethod = isArrayIteratorMethod$1;
|
|
1328
|
-
var toLength = toLength$
|
|
1329
|
-
var bind$
|
|
1328
|
+
var toLength$2 = toLength$4;
|
|
1329
|
+
var bind$3 = functionBindContext;
|
|
1330
1330
|
var getIteratorMethod = getIteratorMethod$1;
|
|
1331
1331
|
var callWithSafeIterationClosing = callWithSafeIterationClosing$1;
|
|
1332
1332
|
|
|
@@ -1336,7 +1336,7 @@ var Result = function (stopped, result) {
|
|
|
1336
1336
|
};
|
|
1337
1337
|
|
|
1338
1338
|
var iterate$1 = iterate$2.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {
|
|
1339
|
-
var boundFunction = bind$
|
|
1339
|
+
var boundFunction = bind$3(fn, that, AS_ENTRIES ? 2 : 1);
|
|
1340
1340
|
var iterator, iterFn, index, length, result, next, step;
|
|
1341
1341
|
|
|
1342
1342
|
if (IS_ITERATOR) {
|
|
@@ -1346,7 +1346,7 @@ var iterate$1 = iterate$2.exports = function (iterable, fn, that, AS_ENTRIES, IS
|
|
|
1346
1346
|
if (typeof iterFn != 'function') throw TypeError('Target is not iterable');
|
|
1347
1347
|
// optimisation for array iterators
|
|
1348
1348
|
if (isArrayIteratorMethod(iterFn)) {
|
|
1349
|
-
for (index = 0, length = toLength(iterable.length); length > index; index++) {
|
|
1349
|
+
for (index = 0, length = toLength$2(iterable.length); length > index; index++) {
|
|
1350
1350
|
result = AS_ENTRIES
|
|
1351
1351
|
? boundFunction(anObject$4(step = iterable[index])[0], step[1])
|
|
1352
1352
|
: boundFunction(iterable[index]);
|
|
@@ -1367,9 +1367,9 @@ iterate$1.stop = function (result) {
|
|
|
1367
1367
|
return new Result(true, result);
|
|
1368
1368
|
};
|
|
1369
1369
|
|
|
1370
|
-
var wellKnownSymbol$
|
|
1370
|
+
var wellKnownSymbol$5 = wellKnownSymbol$g;
|
|
1371
1371
|
|
|
1372
|
-
var ITERATOR = wellKnownSymbol$
|
|
1372
|
+
var ITERATOR = wellKnownSymbol$5('iterator');
|
|
1373
1373
|
var SAFE_CLOSING = false;
|
|
1374
1374
|
|
|
1375
1375
|
try {
|
|
@@ -1408,16 +1408,16 @@ var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
|
|
|
1408
1408
|
|
|
1409
1409
|
var anObject$3 = anObject$b;
|
|
1410
1410
|
var aFunction$2 = aFunction$4;
|
|
1411
|
-
var wellKnownSymbol$
|
|
1411
|
+
var wellKnownSymbol$4 = wellKnownSymbol$g;
|
|
1412
1412
|
|
|
1413
|
-
var SPECIES$
|
|
1413
|
+
var SPECIES$2 = wellKnownSymbol$4('species');
|
|
1414
1414
|
|
|
1415
1415
|
// `SpeciesConstructor` abstract operation
|
|
1416
1416
|
// https://tc39.github.io/ecma262/#sec-speciesconstructor
|
|
1417
1417
|
var speciesConstructor$2 = function (O, defaultConstructor) {
|
|
1418
1418
|
var C = anObject$3(O).constructor;
|
|
1419
1419
|
var S;
|
|
1420
|
-
return C === undefined || (S = anObject$3(C)[SPECIES$
|
|
1420
|
+
return C === undefined || (S = anObject$3(C)[SPECIES$2]) == undefined ? defaultConstructor : aFunction$2(S);
|
|
1421
1421
|
};
|
|
1422
1422
|
|
|
1423
1423
|
var getBuiltIn$2 = getBuiltIn$6;
|
|
@@ -1430,8 +1430,8 @@ var engineIsIos = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent$1);
|
|
|
1430
1430
|
|
|
1431
1431
|
var global$7 = global$l;
|
|
1432
1432
|
var fails$5 = fails$c;
|
|
1433
|
-
var classof$
|
|
1434
|
-
var bind$
|
|
1433
|
+
var classof$4 = classofRaw$1;
|
|
1434
|
+
var bind$2 = functionBindContext;
|
|
1435
1435
|
var html = html$2;
|
|
1436
1436
|
var createElement = documentCreateElement$1;
|
|
1437
1437
|
var IS_IOS$1 = engineIsIos;
|
|
@@ -1488,7 +1488,7 @@ if (!set || !clear) {
|
|
|
1488
1488
|
delete queue[id];
|
|
1489
1489
|
};
|
|
1490
1490
|
// Node.js 0.8-
|
|
1491
|
-
if (classof$
|
|
1491
|
+
if (classof$4(process$5) == 'process') {
|
|
1492
1492
|
defer = function (id) {
|
|
1493
1493
|
process$5.nextTick(runner(id));
|
|
1494
1494
|
};
|
|
@@ -1503,7 +1503,7 @@ if (!set || !clear) {
|
|
|
1503
1503
|
channel = new MessageChannel();
|
|
1504
1504
|
port = channel.port2;
|
|
1505
1505
|
channel.port1.onmessage = listener;
|
|
1506
|
-
defer = bind$
|
|
1506
|
+
defer = bind$2(port.postMessage, port, 1);
|
|
1507
1507
|
// Browsers with postMessage, skip WebWorkers
|
|
1508
1508
|
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
1509
1509
|
} else if (
|
|
@@ -1538,14 +1538,14 @@ var task$1 = {
|
|
|
1538
1538
|
|
|
1539
1539
|
var global$6 = global$l;
|
|
1540
1540
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
1541
|
-
var classof$
|
|
1541
|
+
var classof$3 = classofRaw$1;
|
|
1542
1542
|
var macrotask = task$1.set;
|
|
1543
1543
|
var IS_IOS = engineIsIos;
|
|
1544
1544
|
|
|
1545
1545
|
var MutationObserver$1 = global$6.MutationObserver || global$6.WebKitMutationObserver;
|
|
1546
1546
|
var process$4 = global$6.process;
|
|
1547
1547
|
var Promise$1 = global$6.Promise;
|
|
1548
|
-
var IS_NODE$1 = classof$
|
|
1548
|
+
var IS_NODE$1 = classof$3(process$4) == 'process';
|
|
1549
1549
|
// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
|
|
1550
1550
|
var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$6, 'queueMicrotask');
|
|
1551
1551
|
var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
|
|
@@ -1636,12 +1636,12 @@ newPromiseCapability$2.f = function (C) {
|
|
|
1636
1636
|
};
|
|
1637
1637
|
|
|
1638
1638
|
var anObject$2 = anObject$b;
|
|
1639
|
-
var isObject$
|
|
1639
|
+
var isObject$4 = isObject$b;
|
|
1640
1640
|
var newPromiseCapability$1 = newPromiseCapability$2;
|
|
1641
1641
|
|
|
1642
1642
|
var promiseResolve$2 = function (C, x) {
|
|
1643
1643
|
anObject$2(C);
|
|
1644
|
-
if (isObject$
|
|
1644
|
+
if (isObject$4(x) && x.constructor === C) return x;
|
|
1645
1645
|
var promiseCapability = newPromiseCapability$1.f(C);
|
|
1646
1646
|
var resolve = promiseCapability.resolve;
|
|
1647
1647
|
resolve(x);
|
|
@@ -1686,7 +1686,7 @@ if (v8) {
|
|
|
1686
1686
|
|
|
1687
1687
|
var engineV8Version = version && +version;
|
|
1688
1688
|
|
|
1689
|
-
var $$
|
|
1689
|
+
var $$7 = _export;
|
|
1690
1690
|
var global$3 = global$l;
|
|
1691
1691
|
var getBuiltIn$1 = getBuiltIn$6;
|
|
1692
1692
|
var NativePromise$1 = nativePromiseConstructor;
|
|
@@ -1694,10 +1694,10 @@ var redefine$2 = redefine$6.exports;
|
|
|
1694
1694
|
var redefineAll = redefineAll$1;
|
|
1695
1695
|
var setToStringTag = setToStringTag$3;
|
|
1696
1696
|
var setSpecies = setSpecies$1;
|
|
1697
|
-
var isObject$
|
|
1697
|
+
var isObject$3 = isObject$b;
|
|
1698
1698
|
var aFunction = aFunction$4;
|
|
1699
1699
|
var anInstance = anInstance$1;
|
|
1700
|
-
var classof$
|
|
1700
|
+
var classof$2 = classofRaw$1;
|
|
1701
1701
|
var inspectSource = inspectSource$3;
|
|
1702
1702
|
var iterate = iterate$2.exports;
|
|
1703
1703
|
var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
|
|
@@ -1710,10 +1710,10 @@ var newPromiseCapabilityModule = newPromiseCapability$2;
|
|
|
1710
1710
|
var perform = perform$1;
|
|
1711
1711
|
var InternalStateModule = internalState;
|
|
1712
1712
|
var isForced = isForced_1;
|
|
1713
|
-
var wellKnownSymbol$
|
|
1713
|
+
var wellKnownSymbol$3 = wellKnownSymbol$g;
|
|
1714
1714
|
var V8_VERSION = engineV8Version;
|
|
1715
1715
|
|
|
1716
|
-
var SPECIES = wellKnownSymbol$
|
|
1716
|
+
var SPECIES$1 = wellKnownSymbol$3('species');
|
|
1717
1717
|
var PROMISE = 'Promise';
|
|
1718
1718
|
var getInternalState = InternalStateModule.get;
|
|
1719
1719
|
var setInternalState = InternalStateModule.set;
|
|
@@ -1725,7 +1725,7 @@ var process$2 = global$3.process;
|
|
|
1725
1725
|
var $fetch = getBuiltIn$1('fetch');
|
|
1726
1726
|
var newPromiseCapability = newPromiseCapabilityModule.f;
|
|
1727
1727
|
var newGenericPromiseCapability = newPromiseCapability;
|
|
1728
|
-
var IS_NODE = classof$
|
|
1728
|
+
var IS_NODE = classof$2(process$2) == 'process';
|
|
1729
1729
|
var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$3.dispatchEvent);
|
|
1730
1730
|
var UNHANDLED_REJECTION = 'unhandledrejection';
|
|
1731
1731
|
var REJECTION_HANDLED = 'rejectionhandled';
|
|
@@ -1756,7 +1756,7 @@ var FORCED$1 = isForced(PROMISE, function () {
|
|
|
1756
1756
|
exec(function () { /* empty */ }, function () { /* empty */ });
|
|
1757
1757
|
};
|
|
1758
1758
|
var constructor = promise.constructor = {};
|
|
1759
|
-
constructor[SPECIES] = FakePromise;
|
|
1759
|
+
constructor[SPECIES$1] = FakePromise;
|
|
1760
1760
|
return !(promise.then(function () { /* empty */ }) instanceof FakePromise);
|
|
1761
1761
|
});
|
|
1762
1762
|
|
|
@@ -1767,7 +1767,7 @@ var INCORRECT_ITERATION = FORCED$1 || !checkCorrectnessOfIteration(function (ite
|
|
|
1767
1767
|
// helpers
|
|
1768
1768
|
var isThenable = function (it) {
|
|
1769
1769
|
var then;
|
|
1770
|
-
return isObject$
|
|
1770
|
+
return isObject$3(it) && typeof (then = it.then) == 'function' ? then : false;
|
|
1771
1771
|
};
|
|
1772
1772
|
|
|
1773
1773
|
var notify$1 = function (promise, state, isReject) {
|
|
@@ -1861,7 +1861,7 @@ var onHandleUnhandled = function (promise, state) {
|
|
|
1861
1861
|
});
|
|
1862
1862
|
};
|
|
1863
1863
|
|
|
1864
|
-
var bind = function (fn, promise, state, unwrap) {
|
|
1864
|
+
var bind$1 = function (fn, promise, state, unwrap) {
|
|
1865
1865
|
return function (value) {
|
|
1866
1866
|
fn(promise, state, value, unwrap);
|
|
1867
1867
|
};
|
|
@@ -1888,8 +1888,8 @@ var internalResolve = function (promise, state, value, unwrap) {
|
|
|
1888
1888
|
var wrapper = { done: false };
|
|
1889
1889
|
try {
|
|
1890
1890
|
then.call(value,
|
|
1891
|
-
bind(internalResolve, promise, wrapper, state),
|
|
1892
|
-
bind(internalReject, promise, wrapper, state)
|
|
1891
|
+
bind$1(internalResolve, promise, wrapper, state),
|
|
1892
|
+
bind$1(internalReject, promise, wrapper, state)
|
|
1893
1893
|
);
|
|
1894
1894
|
} catch (error) {
|
|
1895
1895
|
internalReject(promise, wrapper, error, state);
|
|
@@ -1914,7 +1914,7 @@ if (FORCED$1) {
|
|
|
1914
1914
|
Internal.call(this);
|
|
1915
1915
|
var state = getInternalState(this);
|
|
1916
1916
|
try {
|
|
1917
|
-
executor(bind(internalResolve, this, state), bind(internalReject, this, state));
|
|
1917
|
+
executor(bind$1(internalResolve, this, state), bind$1(internalReject, this, state));
|
|
1918
1918
|
} catch (error) {
|
|
1919
1919
|
internalReject(this, state, error);
|
|
1920
1920
|
}
|
|
@@ -1956,8 +1956,8 @@ if (FORCED$1) {
|
|
|
1956
1956
|
var promise = new Internal();
|
|
1957
1957
|
var state = getInternalState(promise);
|
|
1958
1958
|
this.promise = promise;
|
|
1959
|
-
this.resolve = bind(internalResolve, promise, state);
|
|
1960
|
-
this.reject = bind(internalReject, promise, state);
|
|
1959
|
+
this.resolve = bind$1(internalResolve, promise, state);
|
|
1960
|
+
this.reject = bind$1(internalReject, promise, state);
|
|
1961
1961
|
};
|
|
1962
1962
|
newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
|
|
1963
1963
|
return C === PromiseConstructor || C === PromiseWrapper
|
|
@@ -1978,7 +1978,7 @@ if (FORCED$1) {
|
|
|
1978
1978
|
}, { unsafe: true });
|
|
1979
1979
|
|
|
1980
1980
|
// wrap fetch result
|
|
1981
|
-
if (typeof $fetch == 'function') $$
|
|
1981
|
+
if (typeof $fetch == 'function') $$7({ global: true, enumerable: true, forced: true }, {
|
|
1982
1982
|
// eslint-disable-next-line no-unused-vars
|
|
1983
1983
|
fetch: function fetch(input /* , init */) {
|
|
1984
1984
|
return promiseResolve$1(PromiseConstructor, $fetch.apply(global$3, arguments));
|
|
@@ -1987,7 +1987,7 @@ if (FORCED$1) {
|
|
|
1987
1987
|
}
|
|
1988
1988
|
}
|
|
1989
1989
|
|
|
1990
|
-
$$
|
|
1990
|
+
$$7({ global: true, wrap: true, forced: FORCED$1 }, {
|
|
1991
1991
|
Promise: PromiseConstructor
|
|
1992
1992
|
});
|
|
1993
1993
|
|
|
@@ -1997,7 +1997,7 @@ setSpecies(PROMISE);
|
|
|
1997
1997
|
PromiseWrapper = getBuiltIn$1(PROMISE);
|
|
1998
1998
|
|
|
1999
1999
|
// statics
|
|
2000
|
-
$$
|
|
2000
|
+
$$7({ target: PROMISE, stat: true, forced: FORCED$1 }, {
|
|
2001
2001
|
// `Promise.reject` method
|
|
2002
2002
|
// https://tc39.github.io/ecma262/#sec-promise.reject
|
|
2003
2003
|
reject: function reject(r) {
|
|
@@ -2007,7 +2007,7 @@ $$6({ target: PROMISE, stat: true, forced: FORCED$1 }, {
|
|
|
2007
2007
|
}
|
|
2008
2008
|
});
|
|
2009
2009
|
|
|
2010
|
-
$$
|
|
2010
|
+
$$7({ target: PROMISE, stat: true, forced: FORCED$1 }, {
|
|
2011
2011
|
// `Promise.resolve` method
|
|
2012
2012
|
// https://tc39.github.io/ecma262/#sec-promise.resolve
|
|
2013
2013
|
resolve: function resolve(x) {
|
|
@@ -2015,7 +2015,7 @@ $$6({ target: PROMISE, stat: true, forced: FORCED$1 }, {
|
|
|
2015
2015
|
}
|
|
2016
2016
|
});
|
|
2017
2017
|
|
|
2018
|
-
$$
|
|
2018
|
+
$$7({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
|
|
2019
2019
|
// `Promise.all` method
|
|
2020
2020
|
// https://tc39.github.io/ecma262/#sec-promise.all
|
|
2021
2021
|
all: function all(iterable) {
|
|
@@ -2062,7 +2062,7 @@ $$6({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
|
|
|
2062
2062
|
}
|
|
2063
2063
|
});
|
|
2064
2064
|
|
|
2065
|
-
var $$
|
|
2065
|
+
var $$6 = _export;
|
|
2066
2066
|
var NativePromise = nativePromiseConstructor;
|
|
2067
2067
|
var fails$4 = fails$c;
|
|
2068
2068
|
var getBuiltIn = getBuiltIn$6;
|
|
@@ -2077,7 +2077,7 @@ var NON_GENERIC = !!NativePromise && fails$4(function () {
|
|
|
2077
2077
|
|
|
2078
2078
|
// `Promise.prototype.finally` method
|
|
2079
2079
|
// https://tc39.github.io/ecma262/#sec-promise.prototype.finally
|
|
2080
|
-
$$
|
|
2080
|
+
$$6({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {
|
|
2081
2081
|
'finally': function (onFinally) {
|
|
2082
2082
|
var C = speciesConstructor(this, getBuiltIn('Promise'));
|
|
2083
2083
|
var isFunction = typeof onFinally == 'function';
|
|
@@ -2232,7 +2232,7 @@ function ProtectedRoute(_a) {
|
|
|
2232
2232
|
if (routeRule.permissions.length === 0) {
|
|
2233
2233
|
return;
|
|
2234
2234
|
} else {
|
|
2235
|
-
const res = FluxoClientSys.Instance.security.
|
|
2235
|
+
const res = FluxoClientSys.Instance.security.currentUser.hasPermissions(routeRule.permissions);
|
|
2236
2236
|
if (!res) {
|
|
2237
2237
|
accessDenied = true;
|
|
2238
2238
|
requiredPermissions = routeRule.permissions;
|
|
@@ -2501,7 +2501,7 @@ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
|
2501
2501
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
2502
2502
|
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
2503
2503
|
|
|
2504
|
-
function toObject$
|
|
2504
|
+
function toObject$2(val) {
|
|
2505
2505
|
if (val === null || val === undefined) {
|
|
2506
2506
|
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
2507
2507
|
}
|
|
@@ -2555,7 +2555,7 @@ function shouldUseNative() {
|
|
|
2555
2555
|
|
|
2556
2556
|
var objectAssign$1 = shouldUseNative() ? Object.assign : function (target, source) {
|
|
2557
2557
|
var from;
|
|
2558
|
-
var to = toObject$
|
|
2558
|
+
var to = toObject$2(target);
|
|
2559
2559
|
var symbols;
|
|
2560
2560
|
|
|
2561
2561
|
for (var s = 1; s < arguments.length; s++) {
|
|
@@ -3521,6 +3521,16 @@ var IconArrowDown = createReactComponent("arrow-down", "IconArrowDown", [
|
|
|
3521
3521
|
["path", { d: "M6 13l6 6", key: "svg-2" }]
|
|
3522
3522
|
]);
|
|
3523
3523
|
|
|
3524
|
+
/**
|
|
3525
|
+
* @tabler/icons-react v2.42.0 - MIT
|
|
3526
|
+
*/
|
|
3527
|
+
|
|
3528
|
+
var IconArrowLeft = createReactComponent("arrow-left", "IconArrowLeft", [
|
|
3529
|
+
["path", { d: "M5 12l14 0", key: "svg-0" }],
|
|
3530
|
+
["path", { d: "M5 12l6 6", key: "svg-1" }],
|
|
3531
|
+
["path", { d: "M5 12l6 -6", key: "svg-2" }]
|
|
3532
|
+
]);
|
|
3533
|
+
|
|
3524
3534
|
/**
|
|
3525
3535
|
* @tabler/icons-react v2.42.0 - MIT
|
|
3526
3536
|
*/
|
|
@@ -3593,6 +3603,30 @@ var IconBug = createReactComponent("bug", "IconBug", [
|
|
|
3593
3603
|
["path", { d: "M20 7l-3.75 2.4", key: "svg-8" }]
|
|
3594
3604
|
]);
|
|
3595
3605
|
|
|
3606
|
+
/**
|
|
3607
|
+
* @tabler/icons-react v2.42.0 - MIT
|
|
3608
|
+
*/
|
|
3609
|
+
|
|
3610
|
+
var IconCategory = createReactComponent("category", "IconCategory", [
|
|
3611
|
+
["path", { d: "M4 4h6v6h-6z", key: "svg-0" }],
|
|
3612
|
+
["path", { d: "M14 4h6v6h-6z", key: "svg-1" }],
|
|
3613
|
+
["path", { d: "M4 14h6v6h-6z", key: "svg-2" }],
|
|
3614
|
+
["path", { d: "M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", key: "svg-3" }]
|
|
3615
|
+
]);
|
|
3616
|
+
|
|
3617
|
+
/**
|
|
3618
|
+
* @tabler/icons-react v2.42.0 - MIT
|
|
3619
|
+
*/
|
|
3620
|
+
|
|
3621
|
+
var IconChartHistogram = createReactComponent("chart-histogram", "IconChartHistogram", [
|
|
3622
|
+
["path", { d: "M3 3v18h18", key: "svg-0" }],
|
|
3623
|
+
["path", { d: "M20 18v3", key: "svg-1" }],
|
|
3624
|
+
["path", { d: "M16 16v5", key: "svg-2" }],
|
|
3625
|
+
["path", { d: "M12 13v8", key: "svg-3" }],
|
|
3626
|
+
["path", { d: "M8 16v5", key: "svg-4" }],
|
|
3627
|
+
["path", { d: "M3 11c6 0 5 -5 9 -5s3 5 9 5", key: "svg-5" }]
|
|
3628
|
+
]);
|
|
3629
|
+
|
|
3596
3630
|
/**
|
|
3597
3631
|
* @tabler/icons-react v2.42.0 - MIT
|
|
3598
3632
|
*/
|
|
@@ -3747,6 +3781,21 @@ var IconEye = createReactComponent("eye", "IconEye", [
|
|
|
3747
3781
|
]
|
|
3748
3782
|
]);
|
|
3749
3783
|
|
|
3784
|
+
/**
|
|
3785
|
+
* @tabler/icons-react v2.42.0 - MIT
|
|
3786
|
+
*/
|
|
3787
|
+
|
|
3788
|
+
var IconFileImport = createReactComponent("file-import", "IconFileImport", [
|
|
3789
|
+
["path", { d: "M14 3v4a1 1 0 0 0 1 1h4", key: "svg-0" }],
|
|
3790
|
+
[
|
|
3791
|
+
"path",
|
|
3792
|
+
{
|
|
3793
|
+
d: "M5 13v-8a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-5.5m-9.5 -2h7m-3 -3l3 3l-3 3",
|
|
3794
|
+
key: "svg-1"
|
|
3795
|
+
}
|
|
3796
|
+
]
|
|
3797
|
+
]);
|
|
3798
|
+
|
|
3750
3799
|
/**
|
|
3751
3800
|
* @tabler/icons-react v2.42.0 - MIT
|
|
3752
3801
|
*/
|
|
@@ -3797,6 +3846,22 @@ var IconFolderPlus = createReactComponent("folder-plus", "IconFolderPlus", [
|
|
|
3797
3846
|
["path", { d: "M19 16v6", key: "svg-2" }]
|
|
3798
3847
|
]);
|
|
3799
3848
|
|
|
3849
|
+
/**
|
|
3850
|
+
* @tabler/icons-react v2.42.0 - MIT
|
|
3851
|
+
*/
|
|
3852
|
+
|
|
3853
|
+
var IconGridDots = createReactComponent("grid-dots", "IconGridDots", [
|
|
3854
|
+
["path", { d: "M5 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-0" }],
|
|
3855
|
+
["path", { d: "M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-1" }],
|
|
3856
|
+
["path", { d: "M19 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-2" }],
|
|
3857
|
+
["path", { d: "M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-3" }],
|
|
3858
|
+
["path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-4" }],
|
|
3859
|
+
["path", { d: "M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-5" }],
|
|
3860
|
+
["path", { d: "M5 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-6" }],
|
|
3861
|
+
["path", { d: "M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-7" }],
|
|
3862
|
+
["path", { d: "M19 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-8" }]
|
|
3863
|
+
]);
|
|
3864
|
+
|
|
3800
3865
|
/**
|
|
3801
3866
|
* @tabler/icons-react v2.42.0 - MIT
|
|
3802
3867
|
*/
|
|
@@ -3873,6 +3938,18 @@ var IconLink = createReactComponent("link", "IconLink", [
|
|
|
3873
3938
|
]
|
|
3874
3939
|
]);
|
|
3875
3940
|
|
|
3941
|
+
/**
|
|
3942
|
+
* @tabler/icons-react v2.42.0 - MIT
|
|
3943
|
+
*/
|
|
3944
|
+
|
|
3945
|
+
var IconListSearch = createReactComponent("list-search", "IconListSearch", [
|
|
3946
|
+
["path", { d: "M15 15m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0", key: "svg-0" }],
|
|
3947
|
+
["path", { d: "M18.5 18.5l2.5 2.5", key: "svg-1" }],
|
|
3948
|
+
["path", { d: "M4 6h16", key: "svg-2" }],
|
|
3949
|
+
["path", { d: "M4 12h4", key: "svg-3" }],
|
|
3950
|
+
["path", { d: "M4 18h4", key: "svg-4" }]
|
|
3951
|
+
]);
|
|
3952
|
+
|
|
3876
3953
|
/**
|
|
3877
3954
|
* @tabler/icons-react v2.42.0 - MIT
|
|
3878
3955
|
*/
|
|
@@ -3957,6 +4034,35 @@ var IconRefresh = createReactComponent("refresh", "IconRefresh", [
|
|
|
3957
4034
|
["path", { d: "M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4", key: "svg-1" }]
|
|
3958
4035
|
]);
|
|
3959
4036
|
|
|
4037
|
+
/**
|
|
4038
|
+
* @tabler/icons-react v2.42.0 - MIT
|
|
4039
|
+
*/
|
|
4040
|
+
|
|
4041
|
+
var IconReportSearch = createReactComponent("report-search", "IconReportSearch", [
|
|
4042
|
+
[
|
|
4043
|
+
"path",
|
|
4044
|
+
{ d: "M8 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h5.697", key: "svg-0" }
|
|
4045
|
+
],
|
|
4046
|
+
["path", { d: "M18 12v-5a2 2 0 0 0 -2 -2h-2", key: "svg-1" }],
|
|
4047
|
+
[
|
|
4048
|
+
"path",
|
|
4049
|
+
{
|
|
4050
|
+
d: "M8 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z",
|
|
4051
|
+
key: "svg-2"
|
|
4052
|
+
}
|
|
4053
|
+
],
|
|
4054
|
+
["path", { d: "M8 11h4", key: "svg-3" }],
|
|
4055
|
+
["path", { d: "M8 15h3", key: "svg-4" }],
|
|
4056
|
+
[
|
|
4057
|
+
"path",
|
|
4058
|
+
{
|
|
4059
|
+
d: "M16.5 17.5m-2.5 0a2.5 2.5 0 1 0 5 0a2.5 2.5 0 1 0 -5 0",
|
|
4060
|
+
key: "svg-5"
|
|
4061
|
+
}
|
|
4062
|
+
],
|
|
4063
|
+
["path", { d: "M18.5 19.5l2.5 2.5", key: "svg-6" }]
|
|
4064
|
+
]);
|
|
4065
|
+
|
|
3960
4066
|
/**
|
|
3961
4067
|
* @tabler/icons-react v2.42.0 - MIT
|
|
3962
4068
|
*/
|
|
@@ -3982,6 +4088,21 @@ var IconSearch = createReactComponent("search", "IconSearch", [
|
|
|
3982
4088
|
["path", { d: "M21 21l-6 -6", key: "svg-1" }]
|
|
3983
4089
|
]);
|
|
3984
4090
|
|
|
4091
|
+
/**
|
|
4092
|
+
* @tabler/icons-react v2.42.0 - MIT
|
|
4093
|
+
*/
|
|
4094
|
+
|
|
4095
|
+
var IconSend = createReactComponent("send", "IconSend", [
|
|
4096
|
+
["path", { d: "M10 14l11 -11", key: "svg-0" }],
|
|
4097
|
+
[
|
|
4098
|
+
"path",
|
|
4099
|
+
{
|
|
4100
|
+
d: "M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5",
|
|
4101
|
+
key: "svg-1"
|
|
4102
|
+
}
|
|
4103
|
+
]
|
|
4104
|
+
]);
|
|
4105
|
+
|
|
3985
4106
|
/**
|
|
3986
4107
|
* @tabler/icons-react v2.42.0 - MIT
|
|
3987
4108
|
*/
|
|
@@ -4186,6 +4307,22 @@ class AppJitManager {
|
|
|
4186
4307
|
}
|
|
4187
4308
|
}
|
|
4188
4309
|
|
|
4310
|
+
function FrontendSwitch() {
|
|
4311
|
+
const {
|
|
4312
|
+
allowedFrontends
|
|
4313
|
+
} = useAppSelector(a => a.layout);
|
|
4314
|
+
const navigate = useNavigate();
|
|
4315
|
+
return jsx(Fragment, {
|
|
4316
|
+
children: allowedFrontends.length > 1 && jsx(ActionIcon, {
|
|
4317
|
+
children: jsx(IconGridDots, {
|
|
4318
|
+
size: 24,
|
|
4319
|
+
color: '#fff',
|
|
4320
|
+
onClick: () => navigate('frontend-switcher')
|
|
4321
|
+
})
|
|
4322
|
+
})
|
|
4323
|
+
});
|
|
4324
|
+
}
|
|
4325
|
+
|
|
4189
4326
|
function AppBar(props) {
|
|
4190
4327
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
4191
4328
|
const {
|
|
@@ -4299,7 +4436,7 @@ function AppBar(props) {
|
|
|
4299
4436
|
children: [developmentMode && jsx(Badge, {
|
|
4300
4437
|
color: 'red',
|
|
4301
4438
|
children: "Development mode"
|
|
4302
|
-
}), jitApps && jitApps.length > 0 && jsxs(Fragment, {
|
|
4439
|
+
}), jsx(FrontendSwitch, {}), jitApps && jitApps.length > 0 && jsxs(Fragment, {
|
|
4303
4440
|
children: [jsx(ActionIcon, {
|
|
4304
4441
|
variant: 'transparent',
|
|
4305
4442
|
onClick: () => setJitAppsDrawerOpened(true),
|
|
@@ -4459,10 +4596,10 @@ function FooterBar(props) {
|
|
|
4459
4596
|
})
|
|
4460
4597
|
}), jsx(Divider, {
|
|
4461
4598
|
orientation: 'vertical'
|
|
4462
|
-
}),
|
|
4599
|
+
}), jsxs(Text, {
|
|
4463
4600
|
c: "dimmed",
|
|
4464
4601
|
fz: "xs",
|
|
4465
|
-
children: "
|
|
4602
|
+
children: [props.brandName, " \u00A9", new Date().getFullYear()]
|
|
4466
4603
|
}), jsx(Divider, {
|
|
4467
4604
|
orientation: 'vertical'
|
|
4468
4605
|
}), jsxs(Text, {
|
|
@@ -4494,10 +4631,9 @@ function NavBarItem({
|
|
|
4494
4631
|
const theme = useMantineTheme();
|
|
4495
4632
|
const colorScheme = useMantineColorScheme();
|
|
4496
4633
|
const ChevronIcon = IconChevronLeft;
|
|
4497
|
-
const userService = new UserService();
|
|
4498
4634
|
const items = (hasLinks ? links : []).map((link, i) => {
|
|
4499
4635
|
if (link.hasPermissions) {
|
|
4500
|
-
if (!
|
|
4636
|
+
if (!FluxoClientSys.Instance.security.currentUser.hasPermissions(link.permissions)) {
|
|
4501
4637
|
return null;
|
|
4502
4638
|
}
|
|
4503
4639
|
}
|
|
@@ -4605,6 +4741,41 @@ IconFactory.icons = [{
|
|
|
4605
4741
|
element: jsx(IconPlus, {
|
|
4606
4742
|
size: 18
|
|
4607
4743
|
})
|
|
4744
|
+
}, {
|
|
4745
|
+
value: 'report-search',
|
|
4746
|
+
element: jsx(IconReportSearch, {
|
|
4747
|
+
size: 18
|
|
4748
|
+
})
|
|
4749
|
+
}, {
|
|
4750
|
+
value: 'chart-histogram',
|
|
4751
|
+
element: jsx(IconChartHistogram, {
|
|
4752
|
+
size: 18
|
|
4753
|
+
})
|
|
4754
|
+
}, {
|
|
4755
|
+
value: 'file-import',
|
|
4756
|
+
element: jsx(IconFileImport, {
|
|
4757
|
+
size: 18
|
|
4758
|
+
})
|
|
4759
|
+
}, {
|
|
4760
|
+
value: 'list-search',
|
|
4761
|
+
element: jsx(IconListSearch, {
|
|
4762
|
+
size: 18
|
|
4763
|
+
})
|
|
4764
|
+
}, {
|
|
4765
|
+
value: 'users',
|
|
4766
|
+
element: jsx(IconUsers, {
|
|
4767
|
+
size: 18
|
|
4768
|
+
})
|
|
4769
|
+
}, {
|
|
4770
|
+
value: 'send',
|
|
4771
|
+
element: jsx(IconSend, {
|
|
4772
|
+
size: 18
|
|
4773
|
+
})
|
|
4774
|
+
}, {
|
|
4775
|
+
value: 'category',
|
|
4776
|
+
element: jsx(IconCategory, {
|
|
4777
|
+
size: 18
|
|
4778
|
+
})
|
|
4608
4779
|
}];
|
|
4609
4780
|
|
|
4610
4781
|
function Navbar() {
|
|
@@ -4612,12 +4783,10 @@ function Navbar() {
|
|
|
4612
4783
|
navbarOpened,
|
|
4613
4784
|
appMenu
|
|
4614
4785
|
} = useSelector(state => state.layout);
|
|
4615
|
-
useMantineTheme();
|
|
4616
4786
|
const getPermittedNavBarItems = () => {
|
|
4617
|
-
const userService = new UserService();
|
|
4618
4787
|
return appMenu === null || appMenu === void 0 ? void 0 : appMenu.filter(a => {
|
|
4619
4788
|
var _a;
|
|
4620
|
-
return !a.hasPermissions ||
|
|
4789
|
+
return !a.hasPermissions || FluxoClientSys.Instance.security.currentUser.hasPermissions((_a = a.permissions) !== null && _a !== void 0 ? _a : []);
|
|
4621
4790
|
});
|
|
4622
4791
|
};
|
|
4623
4792
|
return jsx(AppShell.Navbar, {
|
|
@@ -4649,7 +4818,7 @@ var fails$3 = fails$c;
|
|
|
4649
4818
|
var objectKeys = objectKeys$2;
|
|
4650
4819
|
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
4651
4820
|
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
4652
|
-
var toObject = toObject$
|
|
4821
|
+
var toObject$1 = toObject$4;
|
|
4653
4822
|
var IndexedObject = indexedObject;
|
|
4654
4823
|
|
|
4655
4824
|
var nativeAssign = Object.assign;
|
|
@@ -4678,7 +4847,7 @@ var objectAssign = !nativeAssign || fails$3(function () {
|
|
|
4678
4847
|
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
4679
4848
|
return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
|
|
4680
4849
|
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
|
|
4681
|
-
var T = toObject(target);
|
|
4850
|
+
var T = toObject$1(target);
|
|
4682
4851
|
var argumentsLength = arguments.length;
|
|
4683
4852
|
var index = 1;
|
|
4684
4853
|
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
@@ -4696,12 +4865,12 @@ var objectAssign = !nativeAssign || fails$3(function () {
|
|
|
4696
4865
|
} return T;
|
|
4697
4866
|
} : nativeAssign;
|
|
4698
4867
|
|
|
4699
|
-
var $$
|
|
4868
|
+
var $$5 = _export;
|
|
4700
4869
|
var assign = objectAssign;
|
|
4701
4870
|
|
|
4702
4871
|
// `Object.assign` method
|
|
4703
4872
|
// https://tc39.github.io/ecma262/#sec-object.assign
|
|
4704
|
-
$$
|
|
4873
|
+
$$5({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
|
|
4705
4874
|
assign: assign
|
|
4706
4875
|
});
|
|
4707
4876
|
|
|
@@ -4812,6 +4981,7 @@ function AppLayout(props) {
|
|
|
4812
4981
|
})
|
|
4813
4982
|
}), jsx(AppShell.Footer, {
|
|
4814
4983
|
children: jsx(FooterBar, {
|
|
4984
|
+
brandName: props.brandName,
|
|
4815
4985
|
appVersion: props.appVersion
|
|
4816
4986
|
})
|
|
4817
4987
|
})]
|
|
@@ -4819,7 +4989,7 @@ function AppLayout(props) {
|
|
|
4819
4989
|
});
|
|
4820
4990
|
}
|
|
4821
4991
|
|
|
4822
|
-
function LoginPage() {
|
|
4992
|
+
function LoginPage(props) {
|
|
4823
4993
|
const {
|
|
4824
4994
|
loading,
|
|
4825
4995
|
error
|
|
@@ -4847,6 +5017,7 @@ function LoginPage() {
|
|
|
4847
5017
|
});
|
|
4848
5018
|
};
|
|
4849
5019
|
return jsxs(Grid, {
|
|
5020
|
+
className: 'flxLogin',
|
|
4850
5021
|
h: '100vh',
|
|
4851
5022
|
w: '100%',
|
|
4852
5023
|
m: 0,
|
|
@@ -4869,8 +5040,10 @@ function LoginPage() {
|
|
|
4869
5040
|
bg: fluxoTheme.colors["brand"][7],
|
|
4870
5041
|
h: '100vh',
|
|
4871
5042
|
children: jsx(Center, {
|
|
5043
|
+
className: 'logoContainer',
|
|
4872
5044
|
h: '100%',
|
|
4873
5045
|
children: jsx("img", {
|
|
5046
|
+
className: 'logoImg',
|
|
4874
5047
|
src: configuration.logo,
|
|
4875
5048
|
style: {
|
|
4876
5049
|
textAlign: 'center',
|
|
@@ -4930,14 +5103,14 @@ function LoginPage() {
|
|
|
4930
5103
|
loading: onLogin,
|
|
4931
5104
|
type: "submit",
|
|
4932
5105
|
children: "Accedi"
|
|
4933
|
-
}),
|
|
5106
|
+
}), jsxs(Text, {
|
|
4934
5107
|
c: "dimmed",
|
|
4935
5108
|
fz: "xs",
|
|
4936
5109
|
style: {
|
|
4937
5110
|
textAlign: 'center'
|
|
4938
5111
|
},
|
|
4939
5112
|
mt: 16,
|
|
4940
|
-
children: "
|
|
5113
|
+
children: [props.brandName, " \u00A9", new Date().getFullYear()]
|
|
4941
5114
|
})]
|
|
4942
5115
|
})]
|
|
4943
5116
|
}), error && jsx(Center, {
|
|
@@ -5018,6 +5191,93 @@ function ChangePassword() {
|
|
|
5018
5191
|
});
|
|
5019
5192
|
}
|
|
5020
5193
|
|
|
5194
|
+
var classof$1 = classofRaw$1;
|
|
5195
|
+
|
|
5196
|
+
// `IsArray` abstract operation
|
|
5197
|
+
// https://tc39.github.io/ecma262/#sec-isarray
|
|
5198
|
+
var isArray$2 = Array.isArray || function isArray(arg) {
|
|
5199
|
+
return classof$1(arg) == 'Array';
|
|
5200
|
+
};
|
|
5201
|
+
|
|
5202
|
+
var isArray$1 = isArray$2;
|
|
5203
|
+
var toLength$1 = toLength$4;
|
|
5204
|
+
var bind = functionBindContext;
|
|
5205
|
+
|
|
5206
|
+
// `FlattenIntoArray` abstract operation
|
|
5207
|
+
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
|
5208
|
+
var flattenIntoArray$1 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
|
|
5209
|
+
var targetIndex = start;
|
|
5210
|
+
var sourceIndex = 0;
|
|
5211
|
+
var mapFn = mapper ? bind(mapper, thisArg, 3) : false;
|
|
5212
|
+
var element;
|
|
5213
|
+
|
|
5214
|
+
while (sourceIndex < sourceLen) {
|
|
5215
|
+
if (sourceIndex in source) {
|
|
5216
|
+
element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
|
|
5217
|
+
|
|
5218
|
+
if (depth > 0 && isArray$1(element)) {
|
|
5219
|
+
targetIndex = flattenIntoArray$1(target, original, element, toLength$1(element.length), targetIndex, depth - 1) - 1;
|
|
5220
|
+
} else {
|
|
5221
|
+
if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');
|
|
5222
|
+
target[targetIndex] = element;
|
|
5223
|
+
}
|
|
5224
|
+
|
|
5225
|
+
targetIndex++;
|
|
5226
|
+
}
|
|
5227
|
+
sourceIndex++;
|
|
5228
|
+
}
|
|
5229
|
+
return targetIndex;
|
|
5230
|
+
};
|
|
5231
|
+
|
|
5232
|
+
var flattenIntoArray_1 = flattenIntoArray$1;
|
|
5233
|
+
|
|
5234
|
+
var isObject$2 = isObject$b;
|
|
5235
|
+
var isArray = isArray$2;
|
|
5236
|
+
var wellKnownSymbol$2 = wellKnownSymbol$g;
|
|
5237
|
+
|
|
5238
|
+
var SPECIES = wellKnownSymbol$2('species');
|
|
5239
|
+
|
|
5240
|
+
// `ArraySpeciesCreate` abstract operation
|
|
5241
|
+
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
|
5242
|
+
var arraySpeciesCreate$1 = function (originalArray, length) {
|
|
5243
|
+
var C;
|
|
5244
|
+
if (isArray(originalArray)) {
|
|
5245
|
+
C = originalArray.constructor;
|
|
5246
|
+
// cross-realm fallback
|
|
5247
|
+
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
|
|
5248
|
+
else if (isObject$2(C)) {
|
|
5249
|
+
C = C[SPECIES];
|
|
5250
|
+
if (C === null) C = undefined;
|
|
5251
|
+
}
|
|
5252
|
+
} return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
|
5253
|
+
};
|
|
5254
|
+
|
|
5255
|
+
var $$4 = _export;
|
|
5256
|
+
var flattenIntoArray = flattenIntoArray_1;
|
|
5257
|
+
var toObject = toObject$4;
|
|
5258
|
+
var toLength = toLength$4;
|
|
5259
|
+
var toInteger = toInteger$3;
|
|
5260
|
+
var arraySpeciesCreate = arraySpeciesCreate$1;
|
|
5261
|
+
|
|
5262
|
+
// `Array.prototype.flat` method
|
|
5263
|
+
// https://github.com/tc39/proposal-flatMap
|
|
5264
|
+
$$4({ target: 'Array', proto: true }, {
|
|
5265
|
+
flat: function flat(/* depthArg = 1 */) {
|
|
5266
|
+
var depthArg = arguments.length ? arguments[0] : undefined;
|
|
5267
|
+
var O = toObject(this);
|
|
5268
|
+
var sourceLen = toLength(O.length);
|
|
5269
|
+
var A = arraySpeciesCreate(O, 0);
|
|
5270
|
+
A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg));
|
|
5271
|
+
return A;
|
|
5272
|
+
}
|
|
5273
|
+
});
|
|
5274
|
+
|
|
5275
|
+
// this method was added to unscopables after implementation
|
|
5276
|
+
// in popular engines, so it's moved to a separate module
|
|
5277
|
+
var addToUnscopables$1 = addToUnscopables$3;
|
|
5278
|
+
|
|
5279
|
+
addToUnscopables$1('flat');
|
|
5280
|
+
|
|
5021
5281
|
var anObject$1 = anObject$b;
|
|
5022
5282
|
|
|
5023
5283
|
// `RegExp.prototype.flags` getter implementation
|
|
@@ -19853,7 +20113,7 @@ var arrayMethodUsesToLength$1 = function (METHOD_NAME, options) {
|
|
|
19853
20113
|
|
|
19854
20114
|
var $$3 = _export;
|
|
19855
20115
|
var $includes = arrayIncludes.includes;
|
|
19856
|
-
var addToUnscopables = addToUnscopables$
|
|
20116
|
+
var addToUnscopables = addToUnscopables$3;
|
|
19857
20117
|
var arrayMethodUsesToLength = arrayMethodUsesToLength$1;
|
|
19858
20118
|
|
|
19859
20119
|
var USES_TO_LENGTH = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
|
|
@@ -19869,9 +20129,9 @@ $$3({ target: 'Array', proto: true, forced: !USES_TO_LENGTH }, {
|
|
|
19869
20129
|
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
|
19870
20130
|
addToUnscopables('includes');
|
|
19871
20131
|
|
|
19872
|
-
var isObject = isObject$
|
|
20132
|
+
var isObject = isObject$b;
|
|
19873
20133
|
var classof = classofRaw$1;
|
|
19874
|
-
var wellKnownSymbol$1 = wellKnownSymbol$
|
|
20134
|
+
var wellKnownSymbol$1 = wellKnownSymbol$g;
|
|
19875
20135
|
|
|
19876
20136
|
var MATCH$1 = wellKnownSymbol$1('match');
|
|
19877
20137
|
|
|
@@ -19890,7 +20150,7 @@ var notARegexp = function (it) {
|
|
|
19890
20150
|
} return it;
|
|
19891
20151
|
};
|
|
19892
20152
|
|
|
19893
|
-
var wellKnownSymbol = wellKnownSymbol$
|
|
20153
|
+
var wellKnownSymbol = wellKnownSymbol$g;
|
|
19894
20154
|
|
|
19895
20155
|
var MATCH = wellKnownSymbol('match');
|
|
19896
20156
|
|
|
@@ -20604,8 +20864,10 @@ function MenuCreateForm(props) {
|
|
|
20604
20864
|
const [user, setUser] = useState();
|
|
20605
20865
|
const [role, setRole] = useState();
|
|
20606
20866
|
const [name, setName] = useState();
|
|
20867
|
+
const [frontend, setFrontend] = useState('admin');
|
|
20607
20868
|
const [roles, setRoles] = useState([]);
|
|
20608
20869
|
const [users, setUsers] = useState([]);
|
|
20870
|
+
const frontends = useAppSelector(state => state.layout.frontends);
|
|
20609
20871
|
useEffect(() => {
|
|
20610
20872
|
FluxoClientSys.Instance.security.domainRole.find(999, 0).then(roles => {
|
|
20611
20873
|
setRoles(roles.results);
|
|
@@ -20627,7 +20889,8 @@ function MenuCreateForm(props) {
|
|
|
20627
20889
|
name: name,
|
|
20628
20890
|
domainRoleId: context === '1' ? +role : 0,
|
|
20629
20891
|
copyItemsFromWebMenuId: 0,
|
|
20630
|
-
userId: context === '2' ? user : undefined
|
|
20892
|
+
userId: context === '2' ? user : undefined,
|
|
20893
|
+
frontend: frontend
|
|
20631
20894
|
}).then(() => {
|
|
20632
20895
|
props.onCreated();
|
|
20633
20896
|
showNotification({
|
|
@@ -20651,6 +20914,16 @@ function MenuCreateForm(props) {
|
|
|
20651
20914
|
value: name,
|
|
20652
20915
|
onChange: e => setName(e.currentTarget.value),
|
|
20653
20916
|
placeholder: 'Ruolo amministrazione'
|
|
20917
|
+
}), jsx(Select, {
|
|
20918
|
+
allowDeselect: false,
|
|
20919
|
+
label: 'Interfaccia',
|
|
20920
|
+
value: frontend,
|
|
20921
|
+
description: 'Seleziona l\'interfaccia in cui il menu sarà visibile',
|
|
20922
|
+
onChange: value => setFrontend(value),
|
|
20923
|
+
data: frontends.map(frontend => ({
|
|
20924
|
+
label: frontend.name,
|
|
20925
|
+
value: frontend.id
|
|
20926
|
+
}))
|
|
20654
20927
|
}), jsx(Select, {
|
|
20655
20928
|
allowDeselect: false,
|
|
20656
20929
|
label: 'Contesto',
|
|
@@ -20658,6 +20931,9 @@ function MenuCreateForm(props) {
|
|
|
20658
20931
|
description: 'Seleziona il contesto in cui il menu sarà visibile (Ruolo o Utente)',
|
|
20659
20932
|
onChange: value => setContext(value),
|
|
20660
20933
|
data: [{
|
|
20934
|
+
label: 'Default',
|
|
20935
|
+
value: '0'
|
|
20936
|
+
}, {
|
|
20661
20937
|
label: 'Ruolo',
|
|
20662
20938
|
value: '1'
|
|
20663
20939
|
}, {
|
|
@@ -20697,7 +20973,7 @@ function MenuCreateForm(props) {
|
|
|
20697
20973
|
});
|
|
20698
20974
|
}
|
|
20699
20975
|
|
|
20700
|
-
function MenuDesigner() {
|
|
20976
|
+
function MenuDesigner(props) {
|
|
20701
20977
|
const [sysFeatures, setSysFeatures] = useState();
|
|
20702
20978
|
const [currentSelectedFeatures, setCurrentSelectedFeatures] = useState();
|
|
20703
20979
|
const [currentSelectedFeatureId, setCurrentSelectedFeatureId] = useState();
|
|
@@ -20711,12 +20987,31 @@ function MenuDesigner() {
|
|
|
20711
20987
|
const [currentWebMenu, setCurrentWebMenu] = useState(undefined);
|
|
20712
20988
|
const [currentWebMenuLoaded, setCurrentWebMenuLoaded] = useState(false);
|
|
20713
20989
|
const [showMenuCreateForm, setShowMenuCreateForm] = useState(false);
|
|
20990
|
+
const [showMenuDeleteConfirmation, setShowMenuDeleteConfirmation] = useState(false);
|
|
20991
|
+
const [menuList, setMenuList] = useState([]);
|
|
20714
20992
|
const [currentAppMenuItemsAreChanged, setCurrentAppMenuItemsAreChanged] = useState(false);
|
|
20715
20993
|
const handleDrop = newTree => setTreeData(newTree);
|
|
20716
20994
|
const {
|
|
20717
20995
|
appMenu
|
|
20718
20996
|
} = useAppSelector(state => state.layout);
|
|
20719
20997
|
const navigation = useNavigate();
|
|
20998
|
+
useEffect(() => {
|
|
20999
|
+
const groups = [];
|
|
21000
|
+
const groupDistinct = [...new Set(webMenu.map(item => item.frontend))];
|
|
21001
|
+
groupDistinct.forEach(group => {
|
|
21002
|
+
const groupItems = webMenu.filter(a => a.frontend === group).map(item => {
|
|
21003
|
+
return {
|
|
21004
|
+
value: item.id.toString(),
|
|
21005
|
+
label: `${item.name} (${group})`
|
|
21006
|
+
};
|
|
21007
|
+
});
|
|
21008
|
+
groups.push({
|
|
21009
|
+
group: group,
|
|
21010
|
+
items: groupItems
|
|
21011
|
+
});
|
|
21012
|
+
});
|
|
21013
|
+
setMenuList(groups);
|
|
21014
|
+
}, [webMenu]);
|
|
20720
21015
|
useEffect(() => {
|
|
20721
21016
|
//const result = generateMenuObjectFromMenu((appMenu as AppMenuItem[]));
|
|
20722
21017
|
//setTreeData(result);
|
|
@@ -20889,6 +21184,32 @@ function MenuDesigner() {
|
|
|
20889
21184
|
setCurrentAppMenuItemsAreChanged(false);
|
|
20890
21185
|
});
|
|
20891
21186
|
};
|
|
21187
|
+
const isModuleAttachedToFrontend = (module, frontend) => {
|
|
21188
|
+
const shellFrontend = props.frontends.find(a => a.id === (currentWebMenu === null || currentWebMenu === void 0 ? void 0 : currentWebMenu.frontend));
|
|
21189
|
+
if ((shellFrontend === null || shellFrontend === void 0 ? void 0 : shellFrontend.modules.filter(a => a.scope === module.key).length) === 0) return false;
|
|
21190
|
+
return true;
|
|
21191
|
+
};
|
|
21192
|
+
const deleteWebMenu = webMenuId => {
|
|
21193
|
+
FluxoClientSys.Instance.configuration.deleteWebMenu(webMenuId).then(() => {
|
|
21194
|
+
showNotification({
|
|
21195
|
+
title: 'Menu eliminato',
|
|
21196
|
+
message: 'Il menu è stato eliminato con successo',
|
|
21197
|
+
color: 'green',
|
|
21198
|
+
autoClose: 5000
|
|
21199
|
+
});
|
|
21200
|
+
setShowMenuDeleteConfirmation(false);
|
|
21201
|
+
loadAppMenuList();
|
|
21202
|
+
setCurrentWebMenu(undefined);
|
|
21203
|
+
}).catch(() => {
|
|
21204
|
+
setShowMenuDeleteConfirmation(false);
|
|
21205
|
+
showNotification({
|
|
21206
|
+
title: 'Errore',
|
|
21207
|
+
message: 'Si è verificato un errore durante l\'eliminazione del menu',
|
|
21208
|
+
color: 'red',
|
|
21209
|
+
autoClose: 5000
|
|
21210
|
+
});
|
|
21211
|
+
});
|
|
21212
|
+
};
|
|
20892
21213
|
return jsxs(Stack, {
|
|
20893
21214
|
gap: 8,
|
|
20894
21215
|
children: [jsx(DataCard, {
|
|
@@ -20902,12 +21223,7 @@ function MenuDesigner() {
|
|
|
20902
21223
|
children: jsx(Select, {
|
|
20903
21224
|
allowDeselect: false,
|
|
20904
21225
|
value: currentWebMenu === null || currentWebMenu === void 0 ? void 0 : currentWebMenu.id.toString(),
|
|
20905
|
-
data:
|
|
20906
|
-
return {
|
|
20907
|
-
label: a.name,
|
|
20908
|
-
value: a.id.toString()
|
|
20909
|
-
};
|
|
20910
|
-
}),
|
|
21226
|
+
data: menuList,
|
|
20911
21227
|
onChange: v => {
|
|
20912
21228
|
const tmp = webMenu === null || webMenu === void 0 ? void 0 : webMenu.filter(a => a.id.toString() === v)[0];
|
|
20913
21229
|
setCurrentWebMenu(tmp);
|
|
@@ -20969,7 +21285,7 @@ function MenuDesigner() {
|
|
|
20969
21285
|
setFeatureSearchValue(undefined);
|
|
20970
21286
|
},
|
|
20971
21287
|
leftSection: jsx(IconBoxModel, {}),
|
|
20972
|
-
data: sysFeatures === null || sysFeatures === void 0 ? void 0 : sysFeatures.modules.map(e => {
|
|
21288
|
+
data: sysFeatures === null || sysFeatures === void 0 ? void 0 : sysFeatures.modules.filter(a => isModuleAttachedToFrontend(a, currentWebMenu.frontend)).map(e => {
|
|
20973
21289
|
return {
|
|
20974
21290
|
value: `${e.key}.${e.name}`,
|
|
20975
21291
|
label: `${e.description} (${e.name})`
|
|
@@ -21103,7 +21419,7 @@ function MenuDesigner() {
|
|
|
21103
21419
|
children: [jsx(Button, {
|
|
21104
21420
|
color: 'red',
|
|
21105
21421
|
disabled: currentWebMenu.contextType == AppMenuContextType.Default,
|
|
21106
|
-
onClick: () =>
|
|
21422
|
+
onClick: () => setShowMenuDeleteConfirmation(true),
|
|
21107
21423
|
variant: 'outline',
|
|
21108
21424
|
children: "Elimina"
|
|
21109
21425
|
}), jsx(Button, {
|
|
@@ -21113,6 +21429,12 @@ function MenuDesigner() {
|
|
|
21113
21429
|
})]
|
|
21114
21430
|
})
|
|
21115
21431
|
})]
|
|
21432
|
+
}), currentWebMenu && jsx(ConfirmModal, {
|
|
21433
|
+
title: 'Eliminazione menu',
|
|
21434
|
+
messageText: `Sei sicuro di voler eliminare il menu ${currentWebMenu.name}`,
|
|
21435
|
+
open: showMenuDeleteConfirmation,
|
|
21436
|
+
onButtonCancelClick: () => setShowMenuDeleteConfirmation(false),
|
|
21437
|
+
onButtonConfirmClick: () => deleteWebMenu(currentWebMenu.id)
|
|
21116
21438
|
}), jsx(Modal, {
|
|
21117
21439
|
centered: true,
|
|
21118
21440
|
title: 'Aggiungi menu',
|
|
@@ -28282,6 +28604,7 @@ function DomainRoleGrid() {
|
|
|
28282
28604
|
children: [jsx(Table.Thead, {
|
|
28283
28605
|
children: jsxs(Table.Tr, {
|
|
28284
28606
|
children: [jsx(Table.Th, {
|
|
28607
|
+
w: 80,
|
|
28285
28608
|
children: "Id"
|
|
28286
28609
|
}), jsx(Table.Th, {
|
|
28287
28610
|
children: "Identificatore"
|
|
@@ -28290,22 +28613,28 @@ function DomainRoleGrid() {
|
|
|
28290
28613
|
}), jsx(Table.Th, {
|
|
28291
28614
|
children: "Descrizione"
|
|
28292
28615
|
}), jsx(Table.Th, {
|
|
28616
|
+
w: 100,
|
|
28293
28617
|
children: "Permessi"
|
|
28294
|
-
}), jsx(Table.Th, {
|
|
28618
|
+
}), jsx(Table.Th, {
|
|
28619
|
+
w: 100
|
|
28620
|
+
})]
|
|
28295
28621
|
})
|
|
28296
|
-
}), jsx(
|
|
28622
|
+
}), jsx(Table.Tbody, {
|
|
28297
28623
|
children: domainRoles.map((element, i) => jsxs(Table.Tr, {
|
|
28298
|
-
children: [jsx(
|
|
28624
|
+
children: [jsx(Table.Td, {
|
|
28625
|
+
w: 80,
|
|
28299
28626
|
children: element.id
|
|
28300
|
-
}), jsx(
|
|
28627
|
+
}), jsx(Table.Td, {
|
|
28301
28628
|
children: element.identifier
|
|
28302
|
-
}), jsx(
|
|
28629
|
+
}), jsx(Table.Td, {
|
|
28303
28630
|
children: element.name
|
|
28304
|
-
}), jsx(
|
|
28631
|
+
}), jsx(Table.Td, {
|
|
28305
28632
|
children: element.description
|
|
28306
|
-
}), jsx(
|
|
28633
|
+
}), jsx(Table.Td, {
|
|
28634
|
+
w: 100,
|
|
28307
28635
|
children: element.permissionCount
|
|
28308
28636
|
}), jsx(Table.Td, {
|
|
28637
|
+
w: 100,
|
|
28309
28638
|
align: "right",
|
|
28310
28639
|
children: jsxs(Menu, {
|
|
28311
28640
|
shadow: "md",
|
|
@@ -28445,7 +28774,6 @@ $({ global: true, forced: parseInt != parseIntImplementation }, {
|
|
|
28445
28774
|
|
|
28446
28775
|
function UserForm(props) {
|
|
28447
28776
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
28448
|
-
const userService = new UserService();
|
|
28449
28777
|
const roles = [{
|
|
28450
28778
|
value: 'administrator',
|
|
28451
28779
|
label: 'Amministratore'
|
|
@@ -28487,7 +28815,7 @@ function UserForm(props) {
|
|
|
28487
28815
|
assignToRoles: value.assignToRoles,
|
|
28488
28816
|
assignToDomainRoles: value.assignToDomainRoles.map(a => parseInt(a))
|
|
28489
28817
|
};
|
|
28490
|
-
(props.user ?
|
|
28818
|
+
(props.user ? FluxoClientSys.Instance.security.user.updateUser(props.user.id, newUser) : FluxoClientSys.Instance.security.user.createUser(newUser)).then(res => {
|
|
28491
28819
|
if (res.success) {
|
|
28492
28820
|
showNotification({
|
|
28493
28821
|
title: 'Operazione completata',
|
|
@@ -29201,7 +29529,9 @@ function Settings(props) {
|
|
|
29201
29529
|
case 'ui':
|
|
29202
29530
|
return jsx(Ui, {});
|
|
29203
29531
|
case 'menu':
|
|
29204
|
-
return jsx(MenuDesigner, {
|
|
29532
|
+
return jsx(MenuDesigner, {
|
|
29533
|
+
frontends: props.frontends
|
|
29534
|
+
});
|
|
29205
29535
|
case 'tokens':
|
|
29206
29536
|
return jsx(Tokens, {});
|
|
29207
29537
|
case 'users':
|
|
@@ -29224,7 +29554,7 @@ function Settings(props) {
|
|
|
29224
29554
|
case 'plugin':
|
|
29225
29555
|
return jsx(AppsList, {
|
|
29226
29556
|
pluginEndpoint: props.pluginEndpoint,
|
|
29227
|
-
modules: props.modules
|
|
29557
|
+
modules: props.frontends.map(f => f.modules).flat()
|
|
29228
29558
|
});
|
|
29229
29559
|
default:
|
|
29230
29560
|
return jsx(ErrorPage$1, {});
|
|
@@ -29249,22 +29579,23 @@ function MainRoutes(props) {
|
|
|
29249
29579
|
}) => ({
|
|
29250
29580
|
default: KorebiIde
|
|
29251
29581
|
})));
|
|
29252
|
-
new UserService();
|
|
29253
29582
|
return jsxs(FlxRoutes, {
|
|
29254
|
-
children: [
|
|
29255
|
-
|
|
29256
|
-
|
|
29257
|
-
|
|
29258
|
-
|
|
29259
|
-
|
|
29583
|
+
children: [props.isAdminFrontend && jsxs(Fragment, {
|
|
29584
|
+
children: [jsx(Route, {
|
|
29585
|
+
path: 'settings',
|
|
29586
|
+
element: jsx(Settings, {
|
|
29587
|
+
pluginEndpoint: props.pluginEndpoint,
|
|
29588
|
+
frontends: props.frontends
|
|
29589
|
+
})
|
|
29590
|
+
}), jsx(Route, {
|
|
29591
|
+
path: 'korebi-ide',
|
|
29592
|
+
element: jsx(Suspense, {
|
|
29593
|
+
children: jsx(KIde, {})
|
|
29594
|
+
})
|
|
29595
|
+
})]
|
|
29260
29596
|
}), jsx(Route, {
|
|
29261
29597
|
path: 'change-password',
|
|
29262
29598
|
element: jsx(ChangePassword, {})
|
|
29263
|
-
}), jsx(Route, {
|
|
29264
|
-
path: 'korebi-ide',
|
|
29265
|
-
element: jsx(Suspense, {
|
|
29266
|
-
children: jsx(KIde, {})
|
|
29267
|
-
})
|
|
29268
29599
|
})]
|
|
29269
29600
|
});
|
|
29270
29601
|
}
|
|
@@ -29285,6 +29616,7 @@ function ForgotPassword() {
|
|
|
29285
29616
|
}
|
|
29286
29617
|
};
|
|
29287
29618
|
return jsxs(Grid, {
|
|
29619
|
+
className: 'flxLogin',
|
|
29288
29620
|
h: '100vh',
|
|
29289
29621
|
w: '100%',
|
|
29290
29622
|
m: 0,
|
|
@@ -29296,12 +29628,21 @@ function ForgotPassword() {
|
|
|
29296
29628
|
}
|
|
29297
29629
|
},
|
|
29298
29630
|
children: [jsx(Grid.Col, {
|
|
29299
|
-
span:
|
|
29631
|
+
span: {
|
|
29632
|
+
base: 8,
|
|
29633
|
+
xs: 0,
|
|
29634
|
+
sm: 0,
|
|
29635
|
+
md: 6,
|
|
29636
|
+
lg: 8,
|
|
29637
|
+
xl: 8
|
|
29638
|
+
},
|
|
29300
29639
|
bg: fluxoTheme.colors["brand"][7],
|
|
29301
29640
|
h: '100vh',
|
|
29302
29641
|
children: jsx(Center, {
|
|
29642
|
+
className: 'logoContainer',
|
|
29303
29643
|
h: '100%',
|
|
29304
29644
|
children: jsx("img", {
|
|
29645
|
+
className: 'logoImg',
|
|
29305
29646
|
src: configuration.logo,
|
|
29306
29647
|
style: {
|
|
29307
29648
|
textAlign: 'center',
|
|
@@ -29599,12 +29940,93 @@ var it = {exports: {}};
|
|
|
29599
29940
|
!function(e,o){module.exports=o(dayjs_min.exports);}(commonjsGlobal,(function(e){function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=o(e),n={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un' ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(e){return e+"º"}};return t.default.locale(n,null,!0),n}));
|
|
29600
29941
|
}(it));
|
|
29601
29942
|
|
|
29943
|
+
var classes = {"box":"frontend-switcher-module_box__uas-n"};
|
|
29944
|
+
|
|
29945
|
+
function FrontendSwitcher(props) {
|
|
29946
|
+
const {
|
|
29947
|
+
frontends,
|
|
29948
|
+
currentFrontend,
|
|
29949
|
+
allowedFrontends
|
|
29950
|
+
} = useAppSelector(a => a.layout);
|
|
29951
|
+
const [loading, setLoading] = React__default.useState(false);
|
|
29952
|
+
const navigateTo = useNavigate();
|
|
29953
|
+
return jsx(Center, {
|
|
29954
|
+
h: '100vh',
|
|
29955
|
+
children: loading ? jsx(Center, {
|
|
29956
|
+
w: '100vw',
|
|
29957
|
+
h: '100vh',
|
|
29958
|
+
children: jsx(Loader, {
|
|
29959
|
+
size: 48
|
|
29960
|
+
})
|
|
29961
|
+
}) : jsxs(Stack, {
|
|
29962
|
+
gap: 64,
|
|
29963
|
+
align: 'center',
|
|
29964
|
+
children: [jsx(Text, {
|
|
29965
|
+
size: 'xl',
|
|
29966
|
+
style: {
|
|
29967
|
+
textAlign: 'center'
|
|
29968
|
+
},
|
|
29969
|
+
children: "Scegli l'applicazione"
|
|
29970
|
+
}), jsx(Group, {
|
|
29971
|
+
wrap: 'wrap',
|
|
29972
|
+
children: allowedFrontends.map(f => {
|
|
29973
|
+
return jsx(Box, {
|
|
29974
|
+
className: classes["box"],
|
|
29975
|
+
onClick: () => {
|
|
29976
|
+
setLoading(true);
|
|
29977
|
+
FluxoClientSys.Instance.configuration.setLastFrontend(f).then(() => {
|
|
29978
|
+
window.location.href = `/`;
|
|
29979
|
+
}).catch(err => {
|
|
29980
|
+
showNotification({
|
|
29981
|
+
title: 'Errore',
|
|
29982
|
+
message: 'Errore durante il cambio di applicazione',
|
|
29983
|
+
color: 'red',
|
|
29984
|
+
autoClose: 5000
|
|
29985
|
+
});
|
|
29986
|
+
});
|
|
29987
|
+
},
|
|
29988
|
+
w: 180,
|
|
29989
|
+
h: 180,
|
|
29990
|
+
style: {
|
|
29991
|
+
border: '1px solid #ececec',
|
|
29992
|
+
cursor: 'pointer'
|
|
29993
|
+
},
|
|
29994
|
+
children: jsx(Center, {
|
|
29995
|
+
w: 180,
|
|
29996
|
+
h: 180,
|
|
29997
|
+
children: jsxs(Stack, {
|
|
29998
|
+
justify: 'center',
|
|
29999
|
+
align: 'center',
|
|
30000
|
+
children: [jsx(IconApps, {
|
|
30001
|
+
size: 48
|
|
30002
|
+
}), jsx(Text, {
|
|
30003
|
+
size: 'lg',
|
|
30004
|
+
children: frontends.filter(a => a.id === f)[0].name
|
|
30005
|
+
})]
|
|
30006
|
+
})
|
|
30007
|
+
})
|
|
30008
|
+
});
|
|
30009
|
+
})
|
|
30010
|
+
}), jsx(Button, {
|
|
30011
|
+
leftSection: jsx(IconArrowLeft, {
|
|
30012
|
+
size: 18
|
|
30013
|
+
}),
|
|
30014
|
+
variant: 'transparent',
|
|
30015
|
+
onClick: () => {
|
|
30016
|
+
navigateTo(-1);
|
|
30017
|
+
},
|
|
30018
|
+
children: "Indietro"
|
|
30019
|
+
})]
|
|
30020
|
+
})
|
|
30021
|
+
});
|
|
30022
|
+
}
|
|
30023
|
+
|
|
29602
30024
|
function FluxoShell(props) {
|
|
29603
30025
|
const [initialOperationsFinished, setInitialOperationsFinished] = useState(false);
|
|
29604
30026
|
const [router, setRouter] = useState();
|
|
29605
30027
|
const [brandColors, setBrandColors] = useState(["#e9f4ff", "#c2d8ef", "#9bbae1", "#749ad6", "#4d7aca", "#355db2", "#29458a", "#1d2e63", "#101b3d", "#030a18"]);
|
|
29606
|
-
const generateRoutesFromEmbeddedModules =
|
|
29607
|
-
const embeddedModules = [...
|
|
30028
|
+
const generateRoutesFromEmbeddedModules = frontend => {
|
|
30029
|
+
const embeddedModules = [...frontend.modules, reportsModule, workflowModule];
|
|
29608
30030
|
const rObjs = [];
|
|
29609
30031
|
embeddedModules.forEach(eModule => {
|
|
29610
30032
|
rObjs.push({
|
|
@@ -29614,7 +30036,9 @@ function FluxoShell(props) {
|
|
|
29614
30036
|
});
|
|
29615
30037
|
return rObjs;
|
|
29616
30038
|
};
|
|
29617
|
-
const generateRoutesFromJitApps =
|
|
30039
|
+
const generateRoutesFromJitApps = frontend => {
|
|
30040
|
+
// todo: for now we don't support jit apps in alternative frontends
|
|
30041
|
+
if (frontend.renderWhen) return [];
|
|
29618
30042
|
const jitAppManager = new AppJitManager();
|
|
29619
30043
|
const jitApps = jitAppManager.loadAppConfigurations();
|
|
29620
30044
|
const rObjs = [];
|
|
@@ -29660,7 +30084,9 @@ function FluxoShell(props) {
|
|
|
29660
30084
|
FluxoStateDispatcher.dispatchSetJitAppsFeatures(jitAppsFeatures);
|
|
29661
30085
|
return rObjs;
|
|
29662
30086
|
};
|
|
29663
|
-
const generateRoutesFromDeployedApps = apps => {
|
|
30087
|
+
const generateRoutesFromDeployedApps = (frontend, apps) => {
|
|
30088
|
+
// todo: for now we don't support apps in alternative frontends
|
|
30089
|
+
if (frontend.renderWhen) return [];
|
|
29664
30090
|
const rObjs = [];
|
|
29665
30091
|
apps.map(app => {
|
|
29666
30092
|
rObjs.push({
|
|
@@ -29678,6 +30104,7 @@ function FluxoShell(props) {
|
|
|
29678
30104
|
return rObjs;
|
|
29679
30105
|
};
|
|
29680
30106
|
const generateAuthRoutes = () => {
|
|
30107
|
+
var _a;
|
|
29681
30108
|
return {
|
|
29682
30109
|
path: "/auth",
|
|
29683
30110
|
element: jsx(OnlyNotLoggedRoute, {
|
|
@@ -29685,7 +30112,9 @@ function FluxoShell(props) {
|
|
|
29685
30112
|
}),
|
|
29686
30113
|
children: [{
|
|
29687
30114
|
path: "login",
|
|
29688
|
-
element: jsx(LoginPage, {
|
|
30115
|
+
element: jsx(LoginPage, {
|
|
30116
|
+
brandName: (_a = props.brandName) !== null && _a !== void 0 ? _a : 'Fluxo'
|
|
30117
|
+
})
|
|
29689
30118
|
}, {
|
|
29690
30119
|
path: "forgot-password",
|
|
29691
30120
|
element: jsx(ForgotPassword, {})
|
|
@@ -29698,41 +30127,85 @@ function FluxoShell(props) {
|
|
|
29698
30127
|
}]
|
|
29699
30128
|
};
|
|
29700
30129
|
};
|
|
30130
|
+
const checkFrontendSetup = frontends => {
|
|
30131
|
+
const getAdminFrontend = frontends.find(f => f.id === 'admin');
|
|
30132
|
+
if (!getAdminFrontend) {
|
|
30133
|
+
throw new Error('Admin frontend is required');
|
|
30134
|
+
}
|
|
30135
|
+
if (getAdminFrontend.renderWhen !== undefined) {
|
|
30136
|
+
throw new Error('Admin frontend cannot have a renderWhen function');
|
|
30137
|
+
}
|
|
30138
|
+
};
|
|
29701
30139
|
useEffect(() => {
|
|
29702
|
-
|
|
29703
|
-
|
|
29704
|
-
|
|
29705
|
-
|
|
29706
|
-
|
|
29707
|
-
|
|
29708
|
-
|
|
29709
|
-
|
|
29710
|
-
|
|
30140
|
+
// Start the client initialization
|
|
30141
|
+
props.clientInitialization().then(() => {
|
|
30142
|
+
// Check if the frontend setup is correct
|
|
30143
|
+
checkFrontendSetup(props.frontends);
|
|
30144
|
+
// Get the initial configuration
|
|
30145
|
+
FluxoClientSys.Instance.configuration.getInitialConfiguration().then(res => {
|
|
30146
|
+
// Get the frontend to render
|
|
30147
|
+
let frontendByRender = props.frontends.find(f => f.id === res.currentFrontend);
|
|
30148
|
+
// If no frontend to render is found, get the default one
|
|
30149
|
+
if (!frontendByRender) {
|
|
30150
|
+
frontendByRender = props.frontends[0];
|
|
30151
|
+
}
|
|
30152
|
+
// Create the Layout component based on the frontend to render
|
|
30153
|
+
// if no layout is provided, use the default one
|
|
30154
|
+
const FrontendLayout = () => {
|
|
30155
|
+
var _a, _b;
|
|
30156
|
+
return (_a = frontendByRender === null || frontendByRender === void 0 ? void 0 : frontendByRender.layout) !== null && _a !== void 0 ? _a : jsx(AppLayout, {
|
|
30157
|
+
brandName: (_b = props.brandName) !== null && _b !== void 0 ? _b : 'Fluxo',
|
|
29711
30158
|
appVersion: props.appVersion
|
|
30159
|
+
});
|
|
30160
|
+
};
|
|
30161
|
+
// Set the frontend to render
|
|
30162
|
+
const flxFrontend = frontendByRender;
|
|
30163
|
+
// Write the initial configuration to the state
|
|
30164
|
+
FluxoStateDispatcher.dispatchSetConfiguration(res.ui);
|
|
30165
|
+
FluxoStateDispatcher.dispatchSetAppMenu(res.menu);
|
|
30166
|
+
FluxoStateDispatcher.dispatchSetSysFeatures(res.features);
|
|
30167
|
+
FluxoStateDispatcher.dispatchSetUserPermissions(res.permissions.map(a => a.fullIdentifier));
|
|
30168
|
+
FluxoStateDispatcher.dispatchSetUserDomainRoles(res.domainRoles);
|
|
30169
|
+
FluxoStateDispatcher.dispatchSetRouteRules(res.routeRules);
|
|
30170
|
+
FluxoStateDispatcher.dispatchSetFrontends(props.frontends.map(a => ({
|
|
30171
|
+
id: a.id,
|
|
30172
|
+
name: a.name
|
|
30173
|
+
})));
|
|
30174
|
+
FluxoStateDispatcher.dispatchSetCurrentFrontend(res.currentFrontend);
|
|
30175
|
+
FluxoStateDispatcher.dispatchAllowedFrontends(res.frontends);
|
|
30176
|
+
const rObjs = [generateAuthRoutes(), {
|
|
30177
|
+
path: 'frontend-switcher',
|
|
30178
|
+
element: jsx(ProtectedRoute, {
|
|
30179
|
+
children: jsx(FrontendSwitcher, {})
|
|
29712
30180
|
})
|
|
29713
|
-
}),
|
|
29714
|
-
errorElement: jsx(ErrorPage, {}),
|
|
29715
|
-
children: [{
|
|
29716
|
-
index: true,
|
|
29717
|
-
element: props.dashboardComponent
|
|
29718
30181
|
}, {
|
|
29719
|
-
|
|
29720
|
-
|
|
29721
|
-
|
|
29722
|
-
|
|
29723
|
-
|
|
29724
|
-
|
|
29725
|
-
|
|
29726
|
-
|
|
29727
|
-
|
|
29728
|
-
|
|
29729
|
-
|
|
29730
|
-
|
|
30182
|
+
element: jsx(ProtectedRoute, {
|
|
30183
|
+
children: jsx(FrontendLayout, {})
|
|
30184
|
+
}),
|
|
30185
|
+
errorElement: jsx(ErrorPage, {}),
|
|
30186
|
+
children: [{
|
|
30187
|
+
index: true,
|
|
30188
|
+
element: flxFrontend.dashboardComponent
|
|
30189
|
+
}, {
|
|
30190
|
+
path: '/*',
|
|
30191
|
+
element: jsx(MainRoutes, {
|
|
30192
|
+
isAdminFrontend: flxFrontend.id === 'admin',
|
|
30193
|
+
pluginEndpoint: props.pluginEndpoint,
|
|
30194
|
+
frontends: props.frontends
|
|
30195
|
+
})
|
|
30196
|
+
}, ...generateRoutesFromEmbeddedModules(flxFrontend), ...generateRoutesFromDeployedApps(flxFrontend, res.apps), ...generateRoutesFromJitApps(flxFrontend)]
|
|
30197
|
+
}, {
|
|
30198
|
+
path: '*',
|
|
30199
|
+
element: jsx(ErrorPage, {})
|
|
30200
|
+
}];
|
|
30201
|
+
const router1 = createBrowserRouter(rObjs, {
|
|
30202
|
+
basename: '/'
|
|
30203
|
+
});
|
|
30204
|
+
setRouter(router1);
|
|
30205
|
+
setBrandColors(res.ui.colors);
|
|
30206
|
+
}).finally(() => {
|
|
30207
|
+
setInitialOperationsFinished(true);
|
|
29731
30208
|
});
|
|
29732
|
-
setRouter(router1);
|
|
29733
|
-
setBrandColors(res.ui.colors);
|
|
29734
|
-
}).finally(() => {
|
|
29735
|
-
setInitialOperationsFinished(true);
|
|
29736
30209
|
});
|
|
29737
30210
|
}, []);
|
|
29738
30211
|
return jsx(MantineProvider, {
|
|
@@ -29894,4 +30367,4 @@ function AppInner(props) {
|
|
|
29894
30367
|
});
|
|
29895
30368
|
}
|
|
29896
30369
|
|
|
29897
|
-
export { FluxoShell };
|
|
30370
|
+
export { FluxoShell, FrontendSwitch };
|