@trackunit/iris-app-runtime-core 0.0.47 → 0.0.51

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/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  The `@trackunit/iris-app-runtime-core` package is used for development with the Trackunit [Iris App SDK](https://www.npmjs.com/package/@trackunit/iris-app).
4
4
 
5
- For more info and a full guide on Iris App SDK Development, please visit our [Developer Hub](https://developers.trackunit.com/)
5
+ For more info and a full guide on Iris App SDK Development, please visit our [Developer Hub](https://developers.trackunit.com/).
6
6
  ## Trackunit
7
- This package was developed by Trackunit ApS.
7
+ This package was developed by Trackunit ApS.
8
8
  Trackunit is the leading SaaS-based IoT solution for the construction industry, offering an ecosystem of hardware, fleet management software & telematics.
9
9
 
10
10
  ![The Trackunit logo](https://trackunit.com/wp-content/uploads/2022/03/top-logo.svg)
package/ToastRuntime.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { PublicToast } from "@trackunit/iris-app-runtime-core-api";
1
+ import { Toast } from "@trackunit/react-core-contexts-api";
2
2
  export declare const ToastRuntime: {
3
- addToast(toast: PublicToast): Promise<void | "primaryAction" | "secondaryAction">;
3
+ addToast(toast: Toast): Promise<void | "primaryAction" | "secondaryAction">;
4
4
  };
package/index.js CHANGED
@@ -68,7 +68,7 @@ var global$p =
68
68
 
69
69
  var objectGetOwnPropertyDescriptor = {};
70
70
 
71
- var fails$a = function (exec) {
71
+ var fails$b = function (exec) {
72
72
  try {
73
73
  return !!exec();
74
74
  } catch (error) {
@@ -76,17 +76,17 @@ var fails$a = function (exec) {
76
76
  }
77
77
  };
78
78
 
79
- var fails$9 = fails$a;
79
+ var fails$a = fails$b;
80
80
 
81
81
  // Detect IE8's incomplete defineProperty implementation
82
- var descriptors = !fails$9(function () {
82
+ var descriptors = !fails$a(function () {
83
83
  // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
84
84
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
85
85
  });
86
86
 
87
- var fails$8 = fails$a;
87
+ var fails$9 = fails$b;
88
88
 
89
- var functionBindNative = !fails$8(function () {
89
+ var functionBindNative = !fails$9(function () {
90
90
  // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
91
91
  var test = (function () { /* empty */ }).bind();
92
92
  // eslint-disable-next-line no-prototype-builtins -- safe
@@ -95,10 +95,10 @@ var functionBindNative = !fails$8(function () {
95
95
 
96
96
  var NATIVE_BIND$1 = functionBindNative;
97
97
 
98
- var call$4 = Function.prototype.call;
98
+ var call$5 = Function.prototype.call;
99
99
 
100
- var functionCall = NATIVE_BIND$1 ? call$4.bind(call$4) : function () {
101
- return call$4.apply(call$4, arguments);
100
+ var functionCall = NATIVE_BIND$1 ? call$5.bind(call$5) : function () {
101
+ return call$5.apply(call$5, arguments);
102
102
  };
103
103
 
104
104
  var objectPropertyIsEnumerable = {};
@@ -130,36 +130,36 @@ var NATIVE_BIND = functionBindNative;
130
130
 
131
131
  var FunctionPrototype$1 = Function.prototype;
132
132
  var bind = FunctionPrototype$1.bind;
133
- var call$3 = FunctionPrototype$1.call;
134
- var uncurryThis$c = NATIVE_BIND && bind.bind(call$3, call$3);
133
+ var call$4 = FunctionPrototype$1.call;
134
+ var uncurryThis$d = NATIVE_BIND && bind.bind(call$4, call$4);
135
135
 
136
136
  var functionUncurryThis = NATIVE_BIND ? function (fn) {
137
- return fn && uncurryThis$c(fn);
137
+ return fn && uncurryThis$d(fn);
138
138
  } : function (fn) {
139
139
  return fn && function () {
140
- return call$3.apply(fn, arguments);
140
+ return call$4.apply(fn, arguments);
141
141
  };
142
142
  };
143
143
 
144
- var uncurryThis$b = functionUncurryThis;
144
+ var uncurryThis$c = functionUncurryThis;
145
145
 
146
- var toString$5 = uncurryThis$b({}.toString);
147
- var stringSlice = uncurryThis$b(''.slice);
146
+ var toString$5 = uncurryThis$c({}.toString);
147
+ var stringSlice = uncurryThis$c(''.slice);
148
148
 
149
149
  var classofRaw$1 = function (it) {
150
150
  return stringSlice(toString$5(it), 8, -1);
151
151
  };
152
152
 
153
153
  var global$o = global$p;
154
- var uncurryThis$a = functionUncurryThis;
155
- var fails$7 = fails$a;
154
+ var uncurryThis$b = functionUncurryThis;
155
+ var fails$8 = fails$b;
156
156
  var classof$2 = classofRaw$1;
157
157
 
158
158
  var Object$4 = global$o.Object;
159
- var split = uncurryThis$a(''.split);
159
+ var split = uncurryThis$b(''.split);
160
160
 
161
161
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
162
- var indexedObject = fails$7(function () {
162
+ var indexedObject = fails$8(function () {
163
163
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
164
164
  // eslint-disable-next-line no-prototype-builtins -- safe
165
165
  return !Object$4('z').propertyIsEnumerable(0);
@@ -179,11 +179,11 @@ var requireObjectCoercible$3 = function (it) {
179
179
  };
180
180
 
181
181
  // toObject with fallback for non-array-like ES3 strings
182
- var IndexedObject = indexedObject;
182
+ var IndexedObject$1 = indexedObject;
183
183
  var requireObjectCoercible$2 = requireObjectCoercible$3;
184
184
 
185
185
  var toIndexedObject$3 = function (it) {
186
- return IndexedObject(requireObjectCoercible$2(it));
186
+ return IndexedObject$1(requireObjectCoercible$2(it));
187
187
  };
188
188
 
189
189
  // `IsCallable` abstract operation
@@ -209,9 +209,9 @@ var getBuiltIn$3 = function (namespace, method) {
209
209
  return arguments.length < 2 ? aFunction(global$m[namespace]) : global$m[namespace] && global$m[namespace][method];
210
210
  };
211
211
 
212
- var uncurryThis$9 = functionUncurryThis;
212
+ var uncurryThis$a = functionUncurryThis;
213
213
 
214
- var objectIsPrototypeOf = uncurryThis$9({}.isPrototypeOf);
214
+ var objectIsPrototypeOf = uncurryThis$a({}.isPrototypeOf);
215
215
 
216
216
  var getBuiltIn$2 = getBuiltIn$3;
217
217
 
@@ -248,10 +248,10 @@ var engineV8Version = version;
248
248
  /* eslint-disable es-x/no-symbol -- required for testing */
249
249
 
250
250
  var V8_VERSION = engineV8Version;
251
- var fails$6 = fails$a;
251
+ var fails$7 = fails$b;
252
252
 
253
253
  // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
254
- var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$6(function () {
254
+ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$7(function () {
255
255
  var symbol = Symbol();
256
256
  // Chrome 38 Symbol has incorrect toString conversion
257
257
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -317,7 +317,7 @@ var getMethod$1 = function (V, P) {
317
317
  };
318
318
 
319
319
  var global$h = global$p;
320
- var call$2 = functionCall;
320
+ var call$3 = functionCall;
321
321
  var isCallable$5 = isCallable$a;
322
322
  var isObject$4 = isObject$5;
323
323
 
@@ -327,9 +327,9 @@ var TypeError$5 = global$h.TypeError;
327
327
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
328
328
  var ordinaryToPrimitive$1 = function (input, pref) {
329
329
  var fn, val;
330
- if (pref === 'string' && isCallable$5(fn = input.toString) && !isObject$4(val = call$2(fn, input))) return val;
331
- if (isCallable$5(fn = input.valueOf) && !isObject$4(val = call$2(fn, input))) return val;
332
- if (pref !== 'string' && isCallable$5(fn = input.toString) && !isObject$4(val = call$2(fn, input))) return val;
330
+ if (pref === 'string' && isCallable$5(fn = input.toString) && !isObject$4(val = call$3(fn, input))) return val;
331
+ if (isCallable$5(fn = input.valueOf) && !isObject$4(val = call$3(fn, input))) return val;
332
+ if (pref !== 'string' && isCallable$5(fn = input.toString) && !isObject$4(val = call$3(fn, input))) return val;
333
333
  throw TypeError$5("Can't convert object to primitive value");
334
334
  };
335
335
 
@@ -338,11 +338,11 @@ var shared$3 = {exports: {}};
338
338
  var global$g = global$p;
339
339
 
340
340
  // eslint-disable-next-line es-x/no-object-defineproperty -- safe
341
- var defineProperty = Object.defineProperty;
341
+ var defineProperty$1 = Object.defineProperty;
342
342
 
343
343
  var setGlobal$3 = function (key, value) {
344
344
  try {
345
- defineProperty(global$g, key, { value: value, configurable: true, writable: true });
345
+ defineProperty$1(global$g, key, { value: value, configurable: true, writable: true });
346
346
  } catch (error) {
347
347
  global$g[key] = value;
348
348
  } return value;
@@ -375,27 +375,27 @@ var Object$2 = global$e.Object;
375
375
 
376
376
  // `ToObject` abstract operation
377
377
  // https://tc39.es/ecma262/#sec-toobject
378
- var toObject$1 = function (argument) {
378
+ var toObject$2 = function (argument) {
379
379
  return Object$2(requireObjectCoercible$1(argument));
380
380
  };
381
381
 
382
- var uncurryThis$8 = functionUncurryThis;
383
- var toObject = toObject$1;
382
+ var uncurryThis$9 = functionUncurryThis;
383
+ var toObject$1 = toObject$2;
384
384
 
385
- var hasOwnProperty = uncurryThis$8({}.hasOwnProperty);
385
+ var hasOwnProperty = uncurryThis$9({}.hasOwnProperty);
386
386
 
387
387
  // `HasOwnProperty` abstract operation
388
388
  // https://tc39.es/ecma262/#sec-hasownproperty
389
389
  // eslint-disable-next-line es-x/no-object-hasown -- safe
390
390
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
391
- return hasOwnProperty(toObject(it), key);
391
+ return hasOwnProperty(toObject$1(it), key);
392
392
  };
393
393
 
394
- var uncurryThis$7 = functionUncurryThis;
394
+ var uncurryThis$8 = functionUncurryThis;
395
395
 
396
396
  var id = 0;
397
397
  var postfix = Math.random();
398
- var toString$4 = uncurryThis$7(1.0.toString);
398
+ var toString$4 = uncurryThis$8(1.0.toString);
399
399
 
400
400
  var uid$2 = function (key) {
401
401
  return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$4(++id + postfix, 36);
@@ -427,7 +427,7 @@ var wellKnownSymbol$3 = function (name) {
427
427
  };
428
428
 
429
429
  var global$c = global$p;
430
- var call$1 = functionCall;
430
+ var call$2 = functionCall;
431
431
  var isObject$3 = isObject$5;
432
432
  var isSymbol$1 = isSymbol$2;
433
433
  var getMethod = getMethod$1;
@@ -445,7 +445,7 @@ var toPrimitive$1 = function (input, pref) {
445
445
  var result;
446
446
  if (exoticToPrim) {
447
447
  if (pref === undefined) pref = 'default';
448
- result = call$1(exoticToPrim, input, pref);
448
+ result = call$2(exoticToPrim, input, pref);
449
449
  if (!isObject$3(result) || isSymbol$1(result)) return result;
450
450
  throw TypeError$4("Can't convert object to primitive value");
451
451
  }
@@ -474,21 +474,21 @@ var documentCreateElement = function (it) {
474
474
  return EXISTS$1 ? document.createElement(it) : {};
475
475
  };
476
476
 
477
- var DESCRIPTORS$5 = descriptors;
478
- var fails$5 = fails$a;
477
+ var DESCRIPTORS$6 = descriptors;
478
+ var fails$6 = fails$b;
479
479
  var createElement = documentCreateElement;
480
480
 
481
481
  // Thanks to IE8 for its funny defineProperty
482
- var ie8DomDefine = !DESCRIPTORS$5 && !fails$5(function () {
482
+ var ie8DomDefine = !DESCRIPTORS$6 && !fails$6(function () {
483
483
  // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
484
484
  return Object.defineProperty(createElement('div'), 'a', {
485
485
  get: function () { return 7; }
486
486
  }).a != 7;
487
487
  });
488
488
 
489
- var DESCRIPTORS$4 = descriptors;
490
- var call = functionCall;
491
- var propertyIsEnumerableModule = objectPropertyIsEnumerable;
489
+ var DESCRIPTORS$5 = descriptors;
490
+ var call$1 = functionCall;
491
+ var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
492
492
  var createPropertyDescriptor$1 = createPropertyDescriptor$2;
493
493
  var toIndexedObject$2 = toIndexedObject$3;
494
494
  var toPropertyKey$1 = toPropertyKey$2;
@@ -500,23 +500,23 @@ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
500
500
 
501
501
  // `Object.getOwnPropertyDescriptor` method
502
502
  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
503
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$4 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
503
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$5 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
504
504
  O = toIndexedObject$2(O);
505
505
  P = toPropertyKey$1(P);
506
506
  if (IE8_DOM_DEFINE$1) try {
507
507
  return $getOwnPropertyDescriptor$1(O, P);
508
508
  } catch (error) { /* empty */ }
509
- if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call(propertyIsEnumerableModule.f, O, P), O[P]);
509
+ if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call$1(propertyIsEnumerableModule$1.f, O, P), O[P]);
510
510
  };
511
511
 
512
512
  var objectDefineProperty = {};
513
513
 
514
- var DESCRIPTORS$3 = descriptors;
515
- var fails$4 = fails$a;
514
+ var DESCRIPTORS$4 = descriptors;
515
+ var fails$5 = fails$b;
516
516
 
517
517
  // V8 ~ Chrome 36-
518
518
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
519
- var v8PrototypeDefineBug = DESCRIPTORS$3 && fails$4(function () {
519
+ var v8PrototypeDefineBug = DESCRIPTORS$4 && fails$5(function () {
520
520
  // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
521
521
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
522
522
  value: 42,
@@ -537,7 +537,7 @@ var anObject$2 = function (argument) {
537
537
  };
538
538
 
539
539
  var global$9 = global$p;
540
- var DESCRIPTORS$2 = descriptors;
540
+ var DESCRIPTORS$3 = descriptors;
541
541
  var IE8_DOM_DEFINE = ie8DomDefine;
542
542
  var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
543
543
  var anObject$1 = anObject$2;
@@ -554,7 +554,7 @@ var WRITABLE = 'writable';
554
554
 
555
555
  // `Object.defineProperty` method
556
556
  // https://tc39.es/ecma262/#sec-object.defineproperty
557
- objectDefineProperty.f = DESCRIPTORS$2 ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
557
+ objectDefineProperty.f = DESCRIPTORS$3 ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
558
558
  anObject$1(O);
559
559
  P = toPropertyKey(P);
560
560
  anObject$1(Attributes);
@@ -581,11 +581,11 @@ objectDefineProperty.f = DESCRIPTORS$2 ? V8_PROTOTYPE_DEFINE_BUG ? function defi
581
581
  return O;
582
582
  };
583
583
 
584
- var DESCRIPTORS$1 = descriptors;
584
+ var DESCRIPTORS$2 = descriptors;
585
585
  var definePropertyModule$1 = objectDefineProperty;
586
586
  var createPropertyDescriptor = createPropertyDescriptor$2;
587
587
 
588
- var createNonEnumerableProperty$3 = DESCRIPTORS$1 ? function (object, key, value) {
588
+ var createNonEnumerableProperty$3 = DESCRIPTORS$2 ? function (object, key, value) {
589
589
  return definePropertyModule$1.f(object, key, createPropertyDescriptor(1, value));
590
590
  } : function (object, key, value) {
591
591
  object[key] = value;
@@ -594,11 +594,11 @@ var createNonEnumerableProperty$3 = DESCRIPTORS$1 ? function (object, key, value
594
594
 
595
595
  var redefine$1 = {exports: {}};
596
596
 
597
- var uncurryThis$6 = functionUncurryThis;
597
+ var uncurryThis$7 = functionUncurryThis;
598
598
  var isCallable$4 = isCallable$a;
599
599
  var store$1 = sharedStore;
600
600
 
601
- var functionToString = uncurryThis$6(Function.toString);
601
+ var functionToString = uncurryThis$7(Function.toString);
602
602
 
603
603
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
604
604
  if (!isCallable$4(store$1.inspectSource)) {
@@ -630,7 +630,7 @@ var hiddenKeys$3 = {};
630
630
 
631
631
  var NATIVE_WEAK_MAP = nativeWeakMap;
632
632
  var global$7 = global$p;
633
- var uncurryThis$5 = functionUncurryThis;
633
+ var uncurryThis$6 = functionUncurryThis;
634
634
  var isObject = isObject$5;
635
635
  var createNonEnumerableProperty$2 = createNonEnumerableProperty$3;
636
636
  var hasOwn$4 = hasOwnProperty_1;
@@ -658,9 +658,9 @@ var getterFor = function (TYPE) {
658
658
 
659
659
  if (NATIVE_WEAK_MAP || shared.state) {
660
660
  var store = shared.state || (shared.state = new WeakMap());
661
- var wmget = uncurryThis$5(store.get);
662
- var wmhas = uncurryThis$5(store.has);
663
- var wmset = uncurryThis$5(store.set);
661
+ var wmget = uncurryThis$6(store.get);
662
+ var wmhas = uncurryThis$6(store.has);
663
+ var wmset = uncurryThis$6(store.set);
664
664
  set = function (it, metadata) {
665
665
  if (wmhas(store, it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
666
666
  metadata.facade = it;
@@ -698,17 +698,17 @@ var internalState = {
698
698
  getterFor: getterFor
699
699
  };
700
700
 
701
- var DESCRIPTORS = descriptors;
701
+ var DESCRIPTORS$1 = descriptors;
702
702
  var hasOwn$3 = hasOwnProperty_1;
703
703
 
704
704
  var FunctionPrototype = Function.prototype;
705
705
  // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
706
- var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
706
+ var getDescriptor = DESCRIPTORS$1 && Object.getOwnPropertyDescriptor;
707
707
 
708
708
  var EXISTS = hasOwn$3(FunctionPrototype, 'name');
709
709
  // additional protection from minified / mangled / dropped function names
710
710
  var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
711
- var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));
711
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$1 || (DESCRIPTORS$1 && getDescriptor(FunctionPrototype, 'name').configurable));
712
712
 
713
713
  var functionName = {
714
714
  EXISTS: EXISTS,
@@ -840,13 +840,13 @@ var arrayIncludes = {
840
840
  indexOf: createMethod$1(false)
841
841
  };
842
842
 
843
- var uncurryThis$4 = functionUncurryThis;
843
+ var uncurryThis$5 = functionUncurryThis;
844
844
  var hasOwn$1 = hasOwnProperty_1;
845
845
  var toIndexedObject = toIndexedObject$3;
846
846
  var indexOf = arrayIncludes.indexOf;
847
847
  var hiddenKeys$1 = hiddenKeys$3;
848
848
 
849
- var push = uncurryThis$4([].push);
849
+ var push = uncurryThis$5([].push);
850
850
 
851
851
  var objectKeysInternal = function (object, names) {
852
852
  var O = toIndexedObject(object);
@@ -862,7 +862,7 @@ var objectKeysInternal = function (object, names) {
862
862
  };
863
863
 
864
864
  // IE8- don't enum bug keys
865
- var enumBugKeys$1 = [
865
+ var enumBugKeys$2 = [
866
866
  'constructor',
867
867
  'hasOwnProperty',
868
868
  'isPrototypeOf',
@@ -872,16 +872,16 @@ var enumBugKeys$1 = [
872
872
  'valueOf'
873
873
  ];
874
874
 
875
- var internalObjectKeys = objectKeysInternal;
876
- var enumBugKeys = enumBugKeys$1;
875
+ var internalObjectKeys$1 = objectKeysInternal;
876
+ var enumBugKeys$1 = enumBugKeys$2;
877
877
 
878
- var hiddenKeys = enumBugKeys.concat('length', 'prototype');
878
+ var hiddenKeys = enumBugKeys$1.concat('length', 'prototype');
879
879
 
880
880
  // `Object.getOwnPropertyNames` method
881
881
  // https://tc39.es/ecma262/#sec-object.getownpropertynames
882
882
  // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
883
883
  objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
884
- return internalObjectKeys(O, hiddenKeys);
884
+ return internalObjectKeys$1(O, hiddenKeys);
885
885
  };
886
886
 
887
887
  var objectGetOwnPropertySymbols = {};
@@ -890,18 +890,18 @@ var objectGetOwnPropertySymbols = {};
890
890
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
891
891
 
892
892
  var getBuiltIn = getBuiltIn$3;
893
- var uncurryThis$3 = functionUncurryThis;
893
+ var uncurryThis$4 = functionUncurryThis;
894
894
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
895
- var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
895
+ var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
896
896
  var anObject = anObject$2;
897
897
 
898
- var concat = uncurryThis$3([].concat);
898
+ var concat$1 = uncurryThis$4([].concat);
899
899
 
900
900
  // all object keys, includes non-enumerable and symbols
901
901
  var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
902
902
  var keys = getOwnPropertyNamesModule.f(anObject(it));
903
- var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
904
- return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
903
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
904
+ return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
905
905
  };
906
906
 
907
907
  var hasOwn = hasOwnProperty_1;
@@ -921,7 +921,7 @@ var copyConstructorProperties$1 = function (target, source, exceptions) {
921
921
  }
922
922
  };
923
923
 
924
- var fails$3 = fails$a;
924
+ var fails$4 = fails$b;
925
925
  var isCallable$1 = isCallable$a;
926
926
 
927
927
  var replacement = /#|\.prototype\./;
@@ -930,7 +930,7 @@ var isForced$1 = function (feature, detection) {
930
930
  var value = data[normalize(feature)];
931
931
  return value == POLYFILL ? true
932
932
  : value == NATIVE ? false
933
- : isCallable$1(detection) ? fails$3(detection)
933
+ : isCallable$1(detection) ? fails$4(detection)
934
934
  : !!detection;
935
935
  };
936
936
 
@@ -1054,12 +1054,12 @@ var toString$3 = function (argument) {
1054
1054
  var whitespaces$4 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
1055
1055
  '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
1056
1056
 
1057
- var uncurryThis$2 = functionUncurryThis;
1057
+ var uncurryThis$3 = functionUncurryThis;
1058
1058
  var requireObjectCoercible = requireObjectCoercible$3;
1059
1059
  var toString$2 = toString$3;
1060
1060
  var whitespaces$3 = whitespaces$4;
1061
1061
 
1062
- var replace = uncurryThis$2(''.replace);
1062
+ var replace = uncurryThis$3(''.replace);
1063
1063
  var whitespace = '[' + whitespaces$3 + ']';
1064
1064
  var ltrim = RegExp('^' + whitespace + whitespace + '*');
1065
1065
  var rtrim = RegExp(whitespace + whitespace + '*$');
@@ -1087,8 +1087,8 @@ var stringTrim = {
1087
1087
  };
1088
1088
 
1089
1089
  var global$2 = global$p;
1090
- var fails$2 = fails$a;
1091
- var uncurryThis$1 = functionUncurryThis;
1090
+ var fails$3 = fails$b;
1091
+ var uncurryThis$2 = functionUncurryThis;
1092
1092
  var toString$1 = toString$3;
1093
1093
  var trim$1 = stringTrim.trim;
1094
1094
  var whitespaces$2 = whitespaces$4;
@@ -1097,10 +1097,10 @@ var $parseInt$1 = global$2.parseInt;
1097
1097
  var Symbol$2 = global$2.Symbol;
1098
1098
  var ITERATOR$1 = Symbol$2 && Symbol$2.iterator;
1099
1099
  var hex = /^[+-]?0x/i;
1100
- var exec = uncurryThis$1(hex.exec);
1100
+ var exec = uncurryThis$2(hex.exec);
1101
1101
  var FORCED$1 = $parseInt$1(whitespaces$2 + '08') !== 8 || $parseInt$1(whitespaces$2 + '0x16') !== 22
1102
1102
  // MS Edge 18- broken with boxed symbols
1103
- || (ITERATOR$1 && !fails$2(function () { $parseInt$1(Object(ITERATOR$1)); }));
1103
+ || (ITERATOR$1 && !fails$3(function () { $parseInt$1(Object(ITERATOR$1)); }));
1104
1104
 
1105
1105
  // `parseInt` method
1106
1106
  // https://tc39.es/ecma262/#sec-parseint-string-radix
@@ -1109,29 +1109,29 @@ var numberParseInt = FORCED$1 ? function parseInt(string, radix) {
1109
1109
  return $parseInt$1(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));
1110
1110
  } : $parseInt$1;
1111
1111
 
1112
- var $$2 = _export;
1112
+ var $$3 = _export;
1113
1113
  var $parseInt = numberParseInt;
1114
1114
 
1115
1115
  // `parseInt` method
1116
1116
  // https://tc39.es/ecma262/#sec-parseint-string-radix
1117
- $$2({ global: true, forced: parseInt != $parseInt }, {
1117
+ $$3({ global: true, forced: parseInt != $parseInt }, {
1118
1118
  parseInt: $parseInt
1119
1119
  });
1120
1120
 
1121
1121
  var global$1 = global$p;
1122
- var fails$1 = fails$a;
1123
- var uncurryThis = functionUncurryThis;
1122
+ var fails$2 = fails$b;
1123
+ var uncurryThis$1 = functionUncurryThis;
1124
1124
  var toString = toString$3;
1125
1125
  var trim = stringTrim.trim;
1126
1126
  var whitespaces$1 = whitespaces$4;
1127
1127
 
1128
- var charAt = uncurryThis(''.charAt);
1128
+ var charAt = uncurryThis$1(''.charAt);
1129
1129
  var n$ParseFloat = global$1.parseFloat;
1130
1130
  var Symbol$1 = global$1.Symbol;
1131
1131
  var ITERATOR = Symbol$1 && Symbol$1.iterator;
1132
1132
  var FORCED = 1 / n$ParseFloat(whitespaces$1 + '-0') !== -Infinity
1133
1133
  // MS Edge 18- broken with boxed symbols
1134
- || (ITERATOR && !fails$1(function () { n$ParseFloat(Object(ITERATOR)); }));
1134
+ || (ITERATOR && !fails$2(function () { n$ParseFloat(Object(ITERATOR)); }));
1135
1135
 
1136
1136
  // `parseFloat` method
1137
1137
  // https://tc39.es/ecma262/#sec-parsefloat-string
@@ -1141,17 +1141,17 @@ var numberParseFloat = FORCED ? function parseFloat(string) {
1141
1141
  return result === 0 && charAt(trimmedString, 0) == '-' ? -0 : result;
1142
1142
  } : n$ParseFloat;
1143
1143
 
1144
- var $$1 = _export;
1144
+ var $$2 = _export;
1145
1145
  var $parseFloat = numberParseFloat;
1146
1146
 
1147
1147
  // `parseFloat` method
1148
1148
  // https://tc39.es/ecma262/#sec-parsefloat-string
1149
- $$1({ global: true, forced: parseFloat != $parseFloat }, {
1149
+ $$2({ global: true, forced: parseFloat != $parseFloat }, {
1150
1150
  parseFloat: $parseFloat
1151
1151
  });
1152
1152
 
1153
1153
  var PROPER_FUNCTION_NAME = functionName.PROPER;
1154
- var fails = fails$a;
1154
+ var fails$1 = fails$b;
1155
1155
  var whitespaces = whitespaces$4;
1156
1156
 
1157
1157
  var non = '\u200B\u0085\u180E';
@@ -1159,20 +1159,20 @@ var non = '\u200B\u0085\u180E';
1159
1159
  // check that a method works with the correct list
1160
1160
  // of whitespaces and has a correct name
1161
1161
  var stringTrimForced = function (METHOD_NAME) {
1162
- return fails(function () {
1162
+ return fails$1(function () {
1163
1163
  return !!whitespaces[METHOD_NAME]()
1164
1164
  || non[METHOD_NAME]() !== non
1165
1165
  || (PROPER_FUNCTION_NAME && whitespaces[METHOD_NAME].name !== METHOD_NAME);
1166
1166
  });
1167
1167
  };
1168
1168
 
1169
- var $ = _export;
1169
+ var $$1 = _export;
1170
1170
  var $trim = stringTrim.trim;
1171
1171
  var forcedStringTrimMethod = stringTrimForced;
1172
1172
 
1173
1173
  // `String.prototype.trim` method
1174
1174
  // https://tc39.es/ecma262/#sec-string.prototype.trim
1175
- $({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
1175
+ $$1({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
1176
1176
  trim: function trim() {
1177
1177
  return $trim(this);
1178
1178
  }
@@ -1310,11 +1310,105 @@ const RestRuntime = {
1310
1310
 
1311
1311
  };
1312
1312
 
1313
+ var internalObjectKeys = objectKeysInternal;
1314
+ var enumBugKeys = enumBugKeys$2;
1315
+
1316
+ // `Object.keys` method
1317
+ // https://tc39.es/ecma262/#sec-object.keys
1318
+ // eslint-disable-next-line es-x/no-object-keys -- safe
1319
+ var objectKeys$1 = Object.keys || function keys(O) {
1320
+ return internalObjectKeys(O, enumBugKeys);
1321
+ };
1322
+
1323
+ var DESCRIPTORS = descriptors;
1324
+ var uncurryThis = functionUncurryThis;
1325
+ var call = functionCall;
1326
+ var fails = fails$b;
1327
+ var objectKeys = objectKeys$1;
1328
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1329
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1330
+ var toObject = toObject$2;
1331
+ var IndexedObject = indexedObject;
1332
+
1333
+ // eslint-disable-next-line es-x/no-object-assign -- safe
1334
+ var $assign = Object.assign;
1335
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
1336
+ var defineProperty = Object.defineProperty;
1337
+ var concat = uncurryThis([].concat);
1338
+
1339
+ // `Object.assign` method
1340
+ // https://tc39.es/ecma262/#sec-object.assign
1341
+ var objectAssign = !$assign || fails(function () {
1342
+ // should have correct order of operations (Edge bug)
1343
+ if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
1344
+ enumerable: true,
1345
+ get: function () {
1346
+ defineProperty(this, 'b', {
1347
+ value: 3,
1348
+ enumerable: false
1349
+ });
1350
+ }
1351
+ }), { b: 2 })).b !== 1) return true;
1352
+ // should work with symbols and should have deterministic property order (V8 bug)
1353
+ var A = {};
1354
+ var B = {};
1355
+ // eslint-disable-next-line es-x/no-symbol -- safe
1356
+ var symbol = Symbol();
1357
+ var alphabet = 'abcdefghijklmnopqrst';
1358
+ A[symbol] = 7;
1359
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1360
+ return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
1361
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1362
+ var T = toObject(target);
1363
+ var argumentsLength = arguments.length;
1364
+ var index = 1;
1365
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1366
+ var propertyIsEnumerable = propertyIsEnumerableModule.f;
1367
+ while (argumentsLength > index) {
1368
+ var S = IndexedObject(arguments[index++]);
1369
+ var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
1370
+ var length = keys.length;
1371
+ var j = 0;
1372
+ var key;
1373
+ while (length > j) {
1374
+ key = keys[j++];
1375
+ if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
1376
+ }
1377
+ } return T;
1378
+ } : $assign;
1379
+
1380
+ var $ = _export;
1381
+ var assign = objectAssign;
1382
+
1383
+ // `Object.assign` method
1384
+ // https://tc39.es/ecma262/#sec-object.assign
1385
+ // eslint-disable-next-line es-x/no-object-assign -- required for testing
1386
+ $({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
1387
+ assign: assign
1388
+ });
1389
+
1313
1390
  const ToastRuntime = {
1314
1391
  addToast(toast) {
1392
+ var _a, _b;
1393
+
1315
1394
  return __awaiter(this, void 0, void 0, function* () {
1316
1395
  const api = yield getHostConnector();
1317
- return api.addToast(toast);
1396
+ return api.addToast(Object.assign(Object.assign({}, toast), {
1397
+ primaryAction: (_a = toast.primaryAction) === null || _a === void 0 ? void 0 : _a.label,
1398
+ secondaryAction: (_b = toast.secondaryAction) === null || _b === void 0 ? void 0 : _b.label
1399
+ })).then(res => {
1400
+ var _a, _b, _c, _d;
1401
+
1402
+ switch (res) {
1403
+ case "primaryAction":
1404
+ (_b = (_a = toast.primaryAction) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.call(_a);
1405
+ break;
1406
+
1407
+ case "secondaryAction":
1408
+ (_d = (_c = toast.secondaryAction) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.call(_c);
1409
+ break;
1410
+ }
1411
+ });
1318
1412
  });
1319
1413
  }
1320
1414
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/iris-app-runtime-core",
3
- "version": "0.0.47",
3
+ "version": "0.0.51",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "MIT",
6
6
  "module": "./index.js",
@@ -8,8 +8,8 @@
8
8
  "type": "module",
9
9
  "types": "./index.d.ts",
10
10
  "dependencies": {
11
- "@trackunit/iris-app-runtime-core-api": "0.0.45",
12
- "@trackunit/react-core-contexts-api": "0.0.43"
11
+ "@trackunit/iris-app-runtime-core-api": "0.0.49",
12
+ "@trackunit/react-core-contexts-api": "0.0.47"
13
13
  },
14
14
  "peerDependencies": {}
15
15
  }