sample-piral 0.14.16 → 0.14.18-beta.3923

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.
@@ -842,8 +842,17 @@ __webpack_require__.r(__webpack_exports__);
842
842
  /* harmony export */ "includeDependency": () => (/* binding */ includeDependency),
843
843
  /* harmony export */ "includeBundle": () => (/* binding */ includeBundle)
844
844
  /* harmony export */ });
845
+ function tryResolve(name, parent) {
846
+ try {
847
+ return System.resolve(name, parent);
848
+ } catch (_a) {
849
+ // just ignore - will be handled differently later.
850
+ return undefined;
851
+ }
852
+ }
853
+
845
854
  function requireModule(name, parent) {
846
- var moduleId = System.resolve(name, parent);
855
+ var moduleId = tryResolve(name, parent);
847
856
  var dependency = moduleId && System.get(moduleId);
848
857
 
849
858
  if (!dependency) {
@@ -1663,7 +1672,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
1663
1672
  function isPrimitiveExport(content) {
1664
1673
  var type = _typeof(content);
1665
1674
 
1666
- return type === 'function' || type === 'number' || type === 'boolean' || type === 'symbol' || type === 'string' || type === 'bigint' || Array.isArray(content);
1675
+ return type === 'number' || type === 'boolean' || type === 'symbol' || type === 'string' || type === 'bigint' || Array.isArray(content);
1667
1676
  }
1668
1677
 
1669
1678
  var systemRegister = System.constructor.prototype.register;
@@ -1681,6 +1690,14 @@ System.constructor.prototype.register = function () {
1681
1690
 
1682
1691
  if (content instanceof Promise) {
1683
1692
  return content.then(exp);
1693
+ } else if (typeof content === 'function') {
1694
+ _export('__esModule', true);
1695
+
1696
+ Object.keys(content).forEach(function (prop) {
1697
+ _export(prop, content[prop]);
1698
+ });
1699
+
1700
+ _export('default', content);
1684
1701
  } else if (isPrimitiveExport(content)) {
1685
1702
  _export('__esModule', true);
1686
1703
 
@@ -2660,6 +2677,7 @@ var ForeignComponentContainer = /*#__PURE__*/function (_React$Component) {
2660
2677
  _classCallCheck(this, ForeignComponentContainer);
2661
2678
 
2662
2679
  _this = _super.apply(this, arguments);
2680
+ _this.local = {};
2663
2681
 
2664
2682
  _this.handler = function (ev) {
2665
2683
  var innerProps = _this.props.innerProps;
@@ -2685,7 +2703,7 @@ var ForeignComponentContainer = /*#__PURE__*/function (_React$Component) {
2685
2703
  var mount = $component.mount;
2686
2704
 
2687
2705
  if (node && (0,piral_base__WEBPACK_IMPORTED_MODULE_1__.isfunc)(mount)) {
2688
- mount(node, innerProps, $context);
2706
+ mount(node, innerProps, $context, this.local);
2689
2707
  node.addEventListener('render-html', this.handler, false);
2690
2708
  }
2691
2709
 
@@ -2706,7 +2724,7 @@ var ForeignComponentContainer = /*#__PURE__*/function (_React$Component) {
2706
2724
  previous && this.componentWillUnmount();
2707
2725
  current && this.componentDidMount();
2708
2726
  } else if ((0,piral_base__WEBPACK_IMPORTED_MODULE_1__.isfunc)(update)) {
2709
- update(current, innerProps, $context);
2727
+ update(current, innerProps, $context, this.local);
2710
2728
  }
2711
2729
  }
2712
2730
  }, {
@@ -2717,7 +2735,7 @@ var ForeignComponentContainer = /*#__PURE__*/function (_React$Component) {
2717
2735
  var unmount = $component.unmount;
2718
2736
 
2719
2737
  if (node && (0,piral_base__WEBPACK_IMPORTED_MODULE_1__.isfunc)(unmount)) {
2720
- unmount(node);
2738
+ unmount(node, this.local);
2721
2739
  node.removeEventListener('render-html', this.handler, false);
2722
2740
  }
2723
2741
 
@@ -3625,7 +3643,7 @@ function createInstance() {
3625
3643
  var createApi = apiFactory(context, usedPlugins);
3626
3644
  var root = createApi({
3627
3645
  name: 'root',
3628
- version: "0.14.16" || 0,
3646
+ version: "0.14.18-beta.3923" || 0,
3629
3647
  spec: ''
3630
3648
  });
3631
3649
  var options = (0,_helpers__WEBPACK_IMPORTED_MODULE_6__.createPiletOptions)({
@@ -9496,12 +9514,12 @@ function installPiralDebug(options) {
9496
9514
  debug: debugApiVersion,
9497
9515
  instance: {
9498
9516
  name: "sample-piral",
9499
- version: "0.14.16",
9517
+ version: "0.14.18-beta.3923",
9500
9518
  dependencies: "reactstrap,react,react-dom,react-router,react-router-dom,history,tslib,path-to-regexp,@libre/atom,@dbeining/react-atom"
9501
9519
  },
9502
9520
  build: {
9503
- date: "2022-03-10T15:25:52.075Z",
9504
- cli: "0.14.15",
9521
+ date: "2022-03-15T00:46:28.335Z",
9522
+ cli: "0.14.17",
9505
9523
  compat: "0.14"
9506
9524
  },
9507
9525
  pilets: {
@@ -80914,4 +80932,4 @@ var layout_1 = __webpack_require__(/*! ./layout */ "./src/layout.tsx");
80914
80932
 
80915
80933
  /******/ })()
80916
80934
  ;
80917
- //# sourceMappingURL=index.b61165.js.map
80935
+ //# sourceMappingURL=index.117991.js.map