sample-piral 1.5.0-beta.6586 → 1.5.0-beta.6618

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.
@@ -2927,21 +2927,23 @@ __webpack_require__.r(__webpack_exports__);
2927
2927
  /* harmony export */ });
2928
2928
  /* harmony import */ var piral_debug_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! piral-debug-utils */ "../../utilities/piral-debug-utils/esm/debug.js");
2929
2929
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2930
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2931
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2932
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2933
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
2934
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
2930
2935
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2931
2936
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2932
2937
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2933
2938
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
2934
2939
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
2935
2940
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
2936
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2937
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2938
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2939
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
2940
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
2941
2941
 
2942
2942
  function integrateDebugger(context, options) {
2943
2943
  var debug = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
2944
- (0,piral_debug_utils__WEBPACK_IMPORTED_MODULE_0__.installPiralDebug)(_objectSpread(_objectSpread({}, debug), {}, {
2944
+ (0,piral_debug_utils__WEBPACK_IMPORTED_MODULE_0__.installPiralDebug)({
2945
+ customSettings: debug.customSettings,
2946
+ defaultSettings: debug.defaultSettings,
2945
2947
  addPilet: context.addPilet,
2946
2948
  removePilet: context.removePilet,
2947
2949
  updatePilet: function updatePilet(pilet) {
@@ -3001,7 +3003,7 @@ function integrateDebugger(context, options) {
3001
3003
  });
3002
3004
  });
3003
3005
  }
3004
- }));
3006
+ });
3005
3007
  }
3006
3008
 
3007
3009
  /***/ }),
@@ -3020,7 +3022,9 @@ __webpack_require__.r(__webpack_exports__);
3020
3022
  /* harmony import */ var piral_debug_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! piral-debug-utils */ "../../utilities/piral-debug-utils/esm/emulator.js");
3021
3023
 
3022
3024
  function integrateEmulator(context, options) {
3025
+ var debug = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
3023
3026
  (0,piral_debug_utils__WEBPACK_IMPORTED_MODULE_0__.installPiletEmulator)(options.fetchPilets, {
3027
+ defaultFeedUrl: debug.defaultFeedUrl,
3024
3028
  addPilet: context.addPilet,
3025
3029
  removePilet: context.removePilet,
3026
3030
  integrate: function integrate(requester) {
@@ -6587,12 +6591,12 @@ function installPiralDebug(options) {
6587
6591
  debug: debugApiVersion,
6588
6592
  instance: {
6589
6593
  name: "sample-piral",
6590
- version: "1.5.0-beta.6586",
6594
+ version: "1.5.0-beta.6618",
6591
6595
  dependencies: "reactstrap,tslib,react,react-dom,react-router,react-router-dom"
6592
6596
  },
6593
6597
  build: {
6594
- date: "2024-01-25T12:53:20.799Z",
6595
- cli: "1.5.0-beta.6586",
6598
+ date: "2024-01-29T21:45:57.523Z",
6599
+ cli: "1.5.0-beta.6618",
6596
6600
  compat: "1"
6597
6601
  }
6598
6602
  };
@@ -6898,8 +6902,8 @@ function installPiletEmulator(requestPilets, options) {
6898
6902
  var addPilet = options.addPilet,
6899
6903
  removePilet = options.removePilet,
6900
6904
  integrate = options.integrate,
6901
- _options$piletApiFall = options.piletApiFallback,
6902
- piletApiFallback = _options$piletApiFall === void 0 ? 'https://feed.piral.cloud/api/v1/pilet/emulator-website' : _options$piletApiFall;
6905
+ _options$defaultFeedU = options.defaultFeedUrl,
6906
+ defaultFeedUrl = _options$defaultFeedU === void 0 ? 'https://feed.piral.cloud/api/v1/pilet/emulator-website' : _options$defaultFeedU;
6903
6907
  integrate(function () {
6904
6908
  // check if pilets should be loaded
6905
6909
  var dbgPiletApiKey = 'dbg:pilet-api';
@@ -6910,9 +6914,9 @@ function installPiletEmulator(requestPilets, options) {
6910
6914
  var requester = loadPilets ? requestPilets : noPilets;
6911
6915
  var promise = requester();
6912
6916
  // the window['dbg:pilet-api'] should point to an API address used as a proxy, fall back to '/$pilet-api' if unavailable
6913
- var piletApi = window[dbgPiletApiKey] || sessionStorage.getItem(dbgPiletApiKey) || piletApiFallback;
6917
+ var feedUrl = window[dbgPiletApiKey] || sessionStorage.getItem(dbgPiletApiKey) || defaultFeedUrl;
6914
6918
  // either take a full URI or make it an absolute path relative to the current origin
6915
- var initialTarget = /^https?:/.test(piletApi) ? piletApi : "".concat(location.origin).concat(piletApi[0] === '/' ? '' : '/').concat(piletApi);
6919
+ var initialTarget = /^https?:/.test(feedUrl) ? feedUrl : "".concat(location.origin).concat(feedUrl[0] === '/' ? '' : '/').concat(feedUrl);
6916
6920
  var updateTarget = initialTarget.replace('http', 'ws');
6917
6921
  var ws = new WebSocket(updateTarget);
6918
6922
  var timeoutCache = {};
@@ -66589,6 +66593,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
66589
66593
 
66590
66594
 
66591
66595
 
66596
+ var defaultFeedUrl = 'https://feed.piral.cloud/api/v1/pilet/sample';
66592
66597
  var instance = (0,piral__WEBPACK_IMPORTED_MODULE_5__.createInstance)({
66593
66598
  plugins: [(0,piral_auth__WEBPACK_IMPORTED_MODULE_6__.createAuthApi)(), (0,piral_search__WEBPACK_IMPORTED_MODULE_7__.createSearchApi)()].concat(_toConsumableArray((0,piral__WEBPACK_IMPORTED_MODULE_8__.createStandardApi)({
66594
66599
  locale: (0,piral__WEBPACK_IMPORTED_MODULE_9__.setupLocalizer)({
@@ -66602,8 +66607,11 @@ var instance = (0,piral__WEBPACK_IMPORTED_MODULE_5__.createInstance)({
66602
66607
  items: [].concat(_toConsumableArray((0,_parts__WEBPACK_IMPORTED_MODULE_3__.setupMenu)()), _toConsumableArray((0,_parts__WEBPACK_IMPORTED_MODULE_3__.setupFooter)()))
66603
66608
  }
66604
66609
  }))),
66610
+ debug: {
66611
+ defaultFeedUrl: defaultFeedUrl
66612
+ },
66605
66613
  requestPilets: function requestPilets() {
66606
- return fetch('https://feed.piral.cloud/api/v1/pilet/sample').then(function (res) {
66614
+ return fetch(defaultFeedUrl).then(function (res) {
66607
66615
  return res.json();
66608
66616
  }).then(function (res) {
66609
66617
  return res.items;
@@ -66622,4 +66630,4 @@ root.render( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(piral
66622
66630
 
66623
66631
  /******/ })()
66624
66632
  ;
66625
- //# sourceMappingURL=index.13946e.js.map
66633
+ //# sourceMappingURL=index.150650.js.map