sample-cross-fx 0.14.8-beta.3509 → 0.14.8-beta.3515
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/app/{index.59e19b.js → index.b1d1f6.js} +268 -147
- package/app/{index.59e19b.js.map → index.b1d1f6.js.map} +1 -1
- package/app/index.d.ts +4 -0
- package/app/index.html +1 -1
- package/app/index.js +1 -1
- package/files.tar +0 -0
- package/files_once.tar +0 -0
- package/package.json +1 -1
|
@@ -129479,8 +129479,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
129479
129479
|
/* harmony import */ var _createInstance__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./createInstance */ "../../framework/piral-core/esm/createInstance.js");
|
|
129480
129480
|
/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components */ "../../framework/piral-core/esm/components/ResponsiveLayout.js");
|
|
129481
129481
|
/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components */ "../../framework/piral-core/esm/components/Mediator.js");
|
|
129482
|
-
/* harmony import */ var
|
|
129483
|
-
/* harmony import */ var
|
|
129482
|
+
/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components */ "../../framework/piral-core/esm/components/PiralView.js");
|
|
129483
|
+
/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components */ "../../framework/piral-core/esm/components/PortalRenderer.js");
|
|
129484
|
+
/* harmony import */ var _RootListener__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./RootListener */ "../../framework/piral-core/esm/RootListener.js");
|
|
129485
|
+
|
|
129484
129486
|
|
|
129485
129487
|
|
|
129486
129488
|
|
|
@@ -129512,13 +129514,56 @@ const Piral = ({
|
|
|
129512
129514
|
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components__WEBPACK_IMPORTED_MODULE_4__.Mediator, {
|
|
129513
129515
|
options: instance.options,
|
|
129514
129516
|
key: instance.id
|
|
129515
|
-
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(
|
|
129517
|
+
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_RootListener__WEBPACK_IMPORTED_MODULE_5__.RootListener, null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components__WEBPACK_IMPORTED_MODULE_6__.PiralView, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components__WEBPACK_IMPORTED_MODULE_7__.PortalRenderer, {
|
|
129516
129518
|
id: "root"
|
|
129517
129519
|
}), children));
|
|
129518
129520
|
Piral.displayName = 'Piral';
|
|
129519
129521
|
|
|
129520
129522
|
/***/ }),
|
|
129521
129523
|
|
|
129524
|
+
/***/ "../../framework/piral-core/esm/RootListener.js":
|
|
129525
|
+
/*!******************************************************!*\
|
|
129526
|
+
!*** ../../framework/piral-core/esm/RootListener.js ***!
|
|
129527
|
+
\******************************************************/
|
|
129528
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
129529
|
+
|
|
129530
|
+
"use strict";
|
|
129531
|
+
__webpack_require__.r(__webpack_exports__);
|
|
129532
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
129533
|
+
/* harmony export */ "RootListener": () => (/* binding */ RootListener)
|
|
129534
|
+
/* harmony export */ });
|
|
129535
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../../../node_modules/react/index.js");
|
|
129536
|
+
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! . */ "../../framework/piral-core/esm/hooks/globalState.js");
|
|
129537
|
+
/* harmony import */ var _modules__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modules */ "../../framework/piral-core/esm/modules/element.js");
|
|
129538
|
+
|
|
129539
|
+
|
|
129540
|
+
|
|
129541
|
+
const RootListener = () => {
|
|
129542
|
+
const context = (0,___WEBPACK_IMPORTED_MODULE_1__.useGlobalStateContext)();
|
|
129543
|
+
react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect(() => {
|
|
129544
|
+
if (typeof document !== 'undefined') {
|
|
129545
|
+
const handler = ev => {
|
|
129546
|
+
ev.stopPropagation();
|
|
129547
|
+
const {
|
|
129548
|
+
target,
|
|
129549
|
+
props
|
|
129550
|
+
} = ev.detail;
|
|
129551
|
+
const [dispose, update] = (0,_modules__WEBPACK_IMPORTED_MODULE_2__.renderElement)(context, target, props);
|
|
129552
|
+
target.dispose = dispose;
|
|
129553
|
+
target.update = update;
|
|
129554
|
+
};
|
|
129555
|
+
|
|
129556
|
+
document.body.addEventListener('render-html', handler, false);
|
|
129557
|
+
return () => {
|
|
129558
|
+
document.body.removeEventListener('render-html', handler, false);
|
|
129559
|
+
};
|
|
129560
|
+
}
|
|
129561
|
+
}, [context]);
|
|
129562
|
+
return null;
|
|
129563
|
+
};
|
|
129564
|
+
|
|
129565
|
+
/***/ }),
|
|
129566
|
+
|
|
129522
129567
|
/***/ "../../framework/piral-core/esm/actions/app.js":
|
|
129523
129568
|
/*!*****************************************************!*\
|
|
129524
129569
|
!*** ../../framework/piral-core/esm/actions/app.js ***!
|
|
@@ -130021,7 +130066,8 @@ function ExtensionSlot(props) {
|
|
|
130021
130066
|
name,
|
|
130022
130067
|
render = _utils__WEBPACK_IMPORTED_MODULE_1__.defaultRender,
|
|
130023
130068
|
empty,
|
|
130024
|
-
params
|
|
130069
|
+
params,
|
|
130070
|
+
children
|
|
130025
130071
|
} = props;
|
|
130026
130072
|
const extensions = (0,_hooks__WEBPACK_IMPORTED_MODULE_2__.useGlobalState)(s => s.registry.extensions[name] || _utils__WEBPACK_IMPORTED_MODULE_3__.none);
|
|
130027
130073
|
return render(extensions.length === 0 && (0,piral_base__WEBPACK_IMPORTED_MODULE_4__.isfunc)(empty) ? [(0,_utils__WEBPACK_IMPORTED_MODULE_1__.defaultRender)(empty(), 'empty')] : extensions.map(({
|
|
@@ -130030,6 +130076,7 @@ function ExtensionSlot(props) {
|
|
|
130030
130076
|
defaults = {}
|
|
130031
130077
|
}, i) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component, {
|
|
130032
130078
|
key: `${(reference === null || reference === void 0 ? void 0 : reference.displayName) || '_'}${i}`,
|
|
130079
|
+
children: children,
|
|
130033
130080
|
params: Object.assign(Object.assign({}, defaults), params || {})
|
|
130034
130081
|
})));
|
|
130035
130082
|
}
|
|
@@ -130764,7 +130811,7 @@ function createInstance(config = {}) {
|
|
|
130764
130811
|
const createApi = apiFactory(context, usedPlugins);
|
|
130765
130812
|
const root = createApi({
|
|
130766
130813
|
name: 'root',
|
|
130767
|
-
version: "0.14.8-beta.
|
|
130814
|
+
version: "0.14.8-beta.3515" || 0,
|
|
130768
130815
|
spec: ''
|
|
130769
130816
|
});
|
|
130770
130817
|
const options = (0,_helpers__WEBPACK_IMPORTED_MODULE_6__.createPiletOptions)({
|
|
@@ -131159,6 +131206,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
131159
131206
|
/* harmony export */ "noop": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_6__.noop),
|
|
131160
131207
|
/* harmony export */ "prependItem": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_6__.prependItem),
|
|
131161
131208
|
/* harmony export */ "prependItems": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_6__.prependItems),
|
|
131209
|
+
/* harmony export */ "reactifyContent": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_6__.reactifyContent),
|
|
131162
131210
|
/* harmony export */ "removeIndicator": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_6__.removeIndicator),
|
|
131163
131211
|
/* harmony export */ "removeNested": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_6__.removeNested),
|
|
131164
131212
|
/* harmony export */ "renderInDom": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_6__.renderInDom),
|
|
@@ -131205,133 +131253,59 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
131205
131253
|
"use strict";
|
|
131206
131254
|
__webpack_require__.r(__webpack_exports__);
|
|
131207
131255
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
131208
|
-
/* harmony export */ "createCoreApi": () => (/* binding */ createCoreApi),
|
|
131209
131256
|
/* harmony export */ "createExtenders": () => (/* binding */ createExtenders),
|
|
131210
131257
|
/* harmony export */ "defaultApiFactory": () => (/* binding */ defaultApiFactory)
|
|
131211
131258
|
/* harmony export */ });
|
|
131212
|
-
/* harmony import */ var
|
|
131213
|
-
/* harmony import */ var
|
|
131214
|
-
/* harmony import */ var
|
|
131215
|
-
/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components */ "../../framework/piral-core/esm/components/ExtensionSlot.js");
|
|
131216
|
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ "../../framework/piral-core/esm/utils/helpers.js");
|
|
131217
|
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ "../../framework/piral-core/esm/utils/foreign.js");
|
|
131218
|
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ "../../framework/piral-core/esm/utils/data.js");
|
|
131219
|
-
|
|
131220
|
-
|
|
131221
|
-
|
|
131222
|
-
|
|
131223
|
-
|
|
131224
|
-
if (typeof window !== 'undefined' && 'customElements' in window) {
|
|
131225
|
-
class PiralExtension extends HTMLElement {
|
|
131226
|
-
constructor() {
|
|
131227
|
-
super(...arguments);
|
|
131228
|
-
this.dispose = _utils__WEBPACK_IMPORTED_MODULE_0__.noop;
|
|
131229
|
-
this.update = _utils__WEBPACK_IMPORTED_MODULE_0__.noop;
|
|
131230
|
-
this.props = {
|
|
131231
|
-
name: this.getAttribute('name'),
|
|
131232
|
-
params: (0,_utils__WEBPACK_IMPORTED_MODULE_0__.tryParseJson)(this.getAttribute('params')),
|
|
131233
|
-
empty: undefined
|
|
131234
|
-
};
|
|
131235
|
-
}
|
|
131236
|
-
|
|
131237
|
-
get params() {
|
|
131238
|
-
return this.props.params;
|
|
131239
|
-
}
|
|
131240
|
-
|
|
131241
|
-
set params(value) {
|
|
131242
|
-
this.props.params = value;
|
|
131243
|
-
this.update(this.props);
|
|
131244
|
-
}
|
|
131245
|
-
|
|
131246
|
-
get name() {
|
|
131247
|
-
return this.props.name;
|
|
131248
|
-
}
|
|
131249
|
-
|
|
131250
|
-
set name(value) {
|
|
131251
|
-
this.props.name = value;
|
|
131252
|
-
this.update(this.props);
|
|
131253
|
-
}
|
|
131254
|
-
|
|
131255
|
-
get empty() {
|
|
131256
|
-
return this.props.empty;
|
|
131257
|
-
}
|
|
131258
|
-
|
|
131259
|
-
set empty(value) {
|
|
131260
|
-
this.props.empty = value;
|
|
131261
|
-
this.update(this.props);
|
|
131262
|
-
}
|
|
131263
|
-
|
|
131264
|
-
connectedCallback() {
|
|
131265
|
-
if (this.isConnected) {
|
|
131266
|
-
this.dispatchEvent(new CustomEvent('render-html', {
|
|
131267
|
-
bubbles: true,
|
|
131268
|
-
detail: {
|
|
131269
|
-
target: this,
|
|
131270
|
-
props: this.props
|
|
131271
|
-
}
|
|
131272
|
-
}));
|
|
131273
|
-
}
|
|
131274
|
-
}
|
|
131275
|
-
|
|
131276
|
-
disconnectedCallback() {
|
|
131277
|
-
this.dispose();
|
|
131278
|
-
this.dispose = _utils__WEBPACK_IMPORTED_MODULE_0__.noop;
|
|
131279
|
-
this.update = _utils__WEBPACK_IMPORTED_MODULE_0__.noop;
|
|
131280
|
-
}
|
|
131259
|
+
/* harmony import */ var piral_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! piral-base */ "../../framework/piral-base/esm/utils.js");
|
|
131260
|
+
/* harmony import */ var piral_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! piral-base */ "../../framework/piral-base/esm/api.js");
|
|
131261
|
+
/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core */ "../../framework/piral-core/esm/modules/core.js");
|
|
131281
131262
|
|
|
131282
|
-
attributeChangedCallback(name, _, newValue) {
|
|
131283
|
-
switch (name) {
|
|
131284
|
-
case 'name':
|
|
131285
|
-
this.name = newValue;
|
|
131286
|
-
break;
|
|
131287
131263
|
|
|
131288
|
-
|
|
131289
|
-
|
|
131290
|
-
|
|
131291
|
-
|
|
131292
|
-
}
|
|
131264
|
+
function createExtenders(context, apis) {
|
|
131265
|
+
const creators = [_core__WEBPACK_IMPORTED_MODULE_0__.createCoreApi, ...apis.filter(piral_base__WEBPACK_IMPORTED_MODULE_1__.isfunc)];
|
|
131266
|
+
return creators.map(c => {
|
|
131267
|
+
const ctx = c(context);
|
|
131293
131268
|
|
|
131294
|
-
|
|
131295
|
-
return
|
|
131269
|
+
if ((0,piral_base__WEBPACK_IMPORTED_MODULE_1__.isfunc)(ctx)) {
|
|
131270
|
+
return ctx;
|
|
131271
|
+
} else {
|
|
131272
|
+
return () => Object.assign({}, ctx);
|
|
131296
131273
|
}
|
|
131297
|
-
|
|
131298
|
-
|
|
131299
|
-
|
|
131300
|
-
|
|
131274
|
+
});
|
|
131275
|
+
}
|
|
131276
|
+
function defaultApiFactory(context, apis) {
|
|
131277
|
+
const extenders = createExtenders(context, apis);
|
|
131278
|
+
return target => {
|
|
131279
|
+
const api = (0,piral_base__WEBPACK_IMPORTED_MODULE_2__.initializeApi)(target, context);
|
|
131280
|
+
context.apis[target.name] = api;
|
|
131281
|
+
return (0,piral_base__WEBPACK_IMPORTED_MODULE_2__.mergeApis)(api, extenders, target);
|
|
131282
|
+
};
|
|
131301
131283
|
}
|
|
131302
131284
|
|
|
131303
|
-
|
|
131304
|
-
let [id, portal] = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.renderInDom)(context, element, _components__WEBPACK_IMPORTED_MODULE_2__.ExtensionSlot, props);
|
|
131305
|
-
const evName = 'extension-props-changed';
|
|
131285
|
+
/***/ }),
|
|
131306
131286
|
|
|
131307
|
-
|
|
131287
|
+
/***/ "../../framework/piral-core/esm/modules/core.js":
|
|
131288
|
+
/*!******************************************************!*\
|
|
131289
|
+
!*** ../../framework/piral-core/esm/modules/core.js ***!
|
|
131290
|
+
\******************************************************/
|
|
131291
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
131308
131292
|
|
|
131309
|
-
|
|
131310
|
-
|
|
131311
|
-
|
|
131312
|
-
|
|
131293
|
+
"use strict";
|
|
131294
|
+
__webpack_require__.r(__webpack_exports__);
|
|
131295
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
131296
|
+
/* harmony export */ "createCoreApi": () => (/* binding */ createCoreApi)
|
|
131297
|
+
/* harmony export */ });
|
|
131298
|
+
/* harmony import */ var _element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./element */ "../../framework/piral-core/esm/modules/element.js");
|
|
131299
|
+
/* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../state */ "../../framework/piral-core/esm/state/withApi.js");
|
|
131300
|
+
/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../components */ "../../framework/piral-core/esm/components/ExtensionSlot.js");
|
|
131301
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ "../../framework/piral-core/esm/utils/data.js");
|
|
131313
131302
|
|
|
131314
|
-
const update = newProps => {
|
|
131315
|
-
[id, portal] = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.changeDomPortal)(id, portal, context, element, _components__WEBPACK_IMPORTED_MODULE_2__.ExtensionSlot, newProps);
|
|
131316
|
-
};
|
|
131317
131303
|
|
|
131318
|
-
element.addEventListener(evName, handler);
|
|
131319
|
-
return [dispose, update];
|
|
131320
|
-
}
|
|
131321
131304
|
|
|
131322
|
-
function createCoreApi(context) {
|
|
131323
|
-
if (typeof document !== 'undefined') {
|
|
131324
|
-
document.body.addEventListener('render-html', ev => {
|
|
131325
|
-
ev.stopPropagation();
|
|
131326
|
-
const container = ev.detail.target;
|
|
131327
|
-
const [dispose, update] = render(context, container, ev.detail.props);
|
|
131328
|
-
container.dispose = dispose;
|
|
131329
|
-
container.update = update;
|
|
131330
|
-
}, false);
|
|
131331
|
-
}
|
|
131332
131305
|
|
|
131333
|
-
|
|
131334
|
-
|
|
131306
|
+
function createCoreApi(context) {
|
|
131307
|
+
return (api, meta) => {
|
|
131308
|
+
const pilet = meta.name;
|
|
131335
131309
|
return {
|
|
131336
131310
|
getData(name) {
|
|
131337
131311
|
return context.readDataValue(name);
|
|
@@ -131341,8 +131315,8 @@ function createCoreApi(context) {
|
|
|
131341
131315
|
const {
|
|
131342
131316
|
target = 'memory',
|
|
131343
131317
|
expires
|
|
131344
|
-
} = (0,
|
|
131345
|
-
const expiration = (0,
|
|
131318
|
+
} = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.createDataOptions)(options);
|
|
131319
|
+
const expiration = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.getDataExpiration)(expires);
|
|
131346
131320
|
return context.tryWriteDataItem(name, value, pilet, target, expiration);
|
|
131347
131321
|
},
|
|
131348
131322
|
|
|
@@ -131350,7 +131324,7 @@ function createCoreApi(context) {
|
|
|
131350
131324
|
context.registerPage(route, {
|
|
131351
131325
|
pilet,
|
|
131352
131326
|
meta,
|
|
131353
|
-
component: (0,
|
|
131327
|
+
component: (0,_state__WEBPACK_IMPORTED_MODULE_1__.withApi)(context, arg, api, 'page')
|
|
131354
131328
|
});
|
|
131355
131329
|
return () => api.unregisterPage(route);
|
|
131356
131330
|
},
|
|
@@ -131362,7 +131336,7 @@ function createCoreApi(context) {
|
|
|
131362
131336
|
registerExtension(name, arg, defaults) {
|
|
131363
131337
|
context.registerExtension(name, {
|
|
131364
131338
|
pilet,
|
|
131365
|
-
component: (0,
|
|
131339
|
+
component: (0,_state__WEBPACK_IMPORTED_MODULE_1__.withApi)(context, arg, api, 'extension'),
|
|
131366
131340
|
reference: arg,
|
|
131367
131341
|
defaults
|
|
131368
131342
|
});
|
|
@@ -131374,34 +131348,14 @@ function createCoreApi(context) {
|
|
|
131374
131348
|
},
|
|
131375
131349
|
|
|
131376
131350
|
renderHtmlExtension(element, props) {
|
|
131377
|
-
const [dispose] =
|
|
131351
|
+
const [dispose] = (0,_element__WEBPACK_IMPORTED_MODULE_2__.renderElement)(context, element, props);
|
|
131378
131352
|
return dispose;
|
|
131379
131353
|
},
|
|
131380
131354
|
|
|
131381
|
-
Extension:
|
|
131355
|
+
Extension: _components__WEBPACK_IMPORTED_MODULE_3__.ExtensionSlot
|
|
131382
131356
|
};
|
|
131383
131357
|
};
|
|
131384
131358
|
}
|
|
131385
|
-
function createExtenders(context, apis) {
|
|
131386
|
-
const creators = [createCoreApi, ...apis.filter(piral_base__WEBPACK_IMPORTED_MODULE_5__.isfunc)];
|
|
131387
|
-
return creators.map(c => {
|
|
131388
|
-
const ctx = c(context);
|
|
131389
|
-
|
|
131390
|
-
if ((0,piral_base__WEBPACK_IMPORTED_MODULE_5__.isfunc)(ctx)) {
|
|
131391
|
-
return ctx;
|
|
131392
|
-
} else {
|
|
131393
|
-
return () => Object.assign({}, ctx);
|
|
131394
|
-
}
|
|
131395
|
-
});
|
|
131396
|
-
}
|
|
131397
|
-
function defaultApiFactory(context, apis) {
|
|
131398
|
-
const extenders = createExtenders(context, apis);
|
|
131399
|
-
return target => {
|
|
131400
|
-
const api = (0,piral_base__WEBPACK_IMPORTED_MODULE_6__.initializeApi)(target, context);
|
|
131401
|
-
context.apis[target.name] = api;
|
|
131402
|
-
return (0,piral_base__WEBPACK_IMPORTED_MODULE_6__.mergeApis)(api, extenders, target);
|
|
131403
|
-
};
|
|
131404
|
-
}
|
|
131405
131359
|
|
|
131406
131360
|
/***/ }),
|
|
131407
131361
|
|
|
@@ -131476,6 +131430,125 @@ function defaultModuleRequester() {
|
|
|
131476
131430
|
|
|
131477
131431
|
/***/ }),
|
|
131478
131432
|
|
|
131433
|
+
/***/ "../../framework/piral-core/esm/modules/element.js":
|
|
131434
|
+
/*!*********************************************************!*\
|
|
131435
|
+
!*** ../../framework/piral-core/esm/modules/element.js ***!
|
|
131436
|
+
\*********************************************************/
|
|
131437
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
131438
|
+
|
|
131439
|
+
"use strict";
|
|
131440
|
+
__webpack_require__.r(__webpack_exports__);
|
|
131441
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
131442
|
+
/* harmony export */ "renderElement": () => (/* binding */ renderElement)
|
|
131443
|
+
/* harmony export */ });
|
|
131444
|
+
/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../components */ "../../framework/piral-core/esm/components/ExtensionSlot.js");
|
|
131445
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ "../../framework/piral-core/esm/utils/helpers.js");
|
|
131446
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ "../../framework/piral-core/esm/utils/extension.js");
|
|
131447
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ "../../framework/piral-core/esm/utils/foreign.js");
|
|
131448
|
+
|
|
131449
|
+
|
|
131450
|
+
|
|
131451
|
+
if (typeof window !== 'undefined' && 'customElements' in window) {
|
|
131452
|
+
class PiralExtension extends HTMLElement {
|
|
131453
|
+
constructor() {
|
|
131454
|
+
super(...arguments);
|
|
131455
|
+
this.dispose = _utils__WEBPACK_IMPORTED_MODULE_0__.noop;
|
|
131456
|
+
this.update = _utils__WEBPACK_IMPORTED_MODULE_0__.noop;
|
|
131457
|
+
this.props = {
|
|
131458
|
+
name: this.getAttribute('name'),
|
|
131459
|
+
params: (0,_utils__WEBPACK_IMPORTED_MODULE_0__.tryParseJson)(this.getAttribute('params')),
|
|
131460
|
+
empty: undefined,
|
|
131461
|
+
children: (0,_utils__WEBPACK_IMPORTED_MODULE_1__.reactifyContent)(this.childNodes)
|
|
131462
|
+
};
|
|
131463
|
+
}
|
|
131464
|
+
|
|
131465
|
+
get params() {
|
|
131466
|
+
return this.props.params;
|
|
131467
|
+
}
|
|
131468
|
+
|
|
131469
|
+
set params(value) {
|
|
131470
|
+
this.props.params = value;
|
|
131471
|
+
this.update(this.props);
|
|
131472
|
+
}
|
|
131473
|
+
|
|
131474
|
+
get name() {
|
|
131475
|
+
return this.props.name;
|
|
131476
|
+
}
|
|
131477
|
+
|
|
131478
|
+
set name(value) {
|
|
131479
|
+
this.props.name = value;
|
|
131480
|
+
this.update(this.props);
|
|
131481
|
+
}
|
|
131482
|
+
|
|
131483
|
+
get empty() {
|
|
131484
|
+
return this.props.empty;
|
|
131485
|
+
}
|
|
131486
|
+
|
|
131487
|
+
set empty(value) {
|
|
131488
|
+
this.props.empty = value;
|
|
131489
|
+
this.update(this.props);
|
|
131490
|
+
}
|
|
131491
|
+
|
|
131492
|
+
connectedCallback() {
|
|
131493
|
+
if (this.isConnected) {
|
|
131494
|
+
this.dispatchEvent(new CustomEvent('render-html', {
|
|
131495
|
+
bubbles: true,
|
|
131496
|
+
detail: {
|
|
131497
|
+
target: this,
|
|
131498
|
+
props: this.props
|
|
131499
|
+
}
|
|
131500
|
+
}));
|
|
131501
|
+
}
|
|
131502
|
+
}
|
|
131503
|
+
|
|
131504
|
+
disconnectedCallback() {
|
|
131505
|
+
this.dispose();
|
|
131506
|
+
this.dispose = _utils__WEBPACK_IMPORTED_MODULE_0__.noop;
|
|
131507
|
+
this.update = _utils__WEBPACK_IMPORTED_MODULE_0__.noop;
|
|
131508
|
+
}
|
|
131509
|
+
|
|
131510
|
+
attributeChangedCallback(name, _, newValue) {
|
|
131511
|
+
switch (name) {
|
|
131512
|
+
case 'name':
|
|
131513
|
+
this.name = newValue;
|
|
131514
|
+
break;
|
|
131515
|
+
|
|
131516
|
+
case 'params':
|
|
131517
|
+
this.params = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.tryParseJson)(newValue);
|
|
131518
|
+
break;
|
|
131519
|
+
}
|
|
131520
|
+
}
|
|
131521
|
+
|
|
131522
|
+
static get observedAttributes() {
|
|
131523
|
+
return ['name', 'params'];
|
|
131524
|
+
}
|
|
131525
|
+
|
|
131526
|
+
}
|
|
131527
|
+
|
|
131528
|
+
customElements.define('piral-extension', PiralExtension);
|
|
131529
|
+
}
|
|
131530
|
+
|
|
131531
|
+
function renderElement(context, element, props) {
|
|
131532
|
+
let [id, portal] = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.renderInDom)(context, element, _components__WEBPACK_IMPORTED_MODULE_3__.ExtensionSlot, props);
|
|
131533
|
+
const evName = 'extension-props-changed';
|
|
131534
|
+
|
|
131535
|
+
const handler = ev => update(ev.detail);
|
|
131536
|
+
|
|
131537
|
+
const dispose = () => {
|
|
131538
|
+
context.hidePortal(id, portal);
|
|
131539
|
+
element.removeEventListener(evName, handler);
|
|
131540
|
+
};
|
|
131541
|
+
|
|
131542
|
+
const update = newProps => {
|
|
131543
|
+
[id, portal] = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.changeDomPortal)(id, portal, context, element, _components__WEBPACK_IMPORTED_MODULE_3__.ExtensionSlot, newProps);
|
|
131544
|
+
};
|
|
131545
|
+
|
|
131546
|
+
element.addEventListener(evName, handler);
|
|
131547
|
+
return [dispose, update];
|
|
131548
|
+
}
|
|
131549
|
+
|
|
131550
|
+
/***/ }),
|
|
131551
|
+
|
|
131479
131552
|
/***/ "../../framework/piral-core/esm/state/createActions.js":
|
|
131480
131553
|
/*!*************************************************************!*\
|
|
131481
131554
|
!*** ../../framework/piral-core/esm/state/createActions.js ***!
|
|
@@ -131945,13 +132018,60 @@ function getDataExpiration(expires) {
|
|
|
131945
132018
|
"use strict";
|
|
131946
132019
|
__webpack_require__.r(__webpack_exports__);
|
|
131947
132020
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
131948
|
-
/* harmony export */ "toExtension": () => (/* binding */ toExtension)
|
|
132021
|
+
/* harmony export */ "toExtension": () => (/* binding */ toExtension),
|
|
132022
|
+
/* harmony export */ "reactifyContent": () => (/* binding */ reactifyContent)
|
|
131949
132023
|
/* harmony export */ });
|
|
131950
132024
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../../../node_modules/react/index.js");
|
|
131951
132025
|
|
|
132026
|
+
|
|
132027
|
+
function removeAll(nodes) {
|
|
132028
|
+
nodes.forEach(node => node.remove());
|
|
132029
|
+
}
|
|
132030
|
+
|
|
132031
|
+
const SlotCarrier = ({
|
|
132032
|
+
nodes
|
|
132033
|
+
}) => {
|
|
132034
|
+
const host = react__WEBPACK_IMPORTED_MODULE_0__.useRef();
|
|
132035
|
+
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {
|
|
132036
|
+
var _a;
|
|
132037
|
+
|
|
132038
|
+
(_a = host.current) === null || _a === void 0 ? void 0 : _a.append(...nodes);
|
|
132039
|
+
return () => removeAll(nodes);
|
|
132040
|
+
}, [nodes]);
|
|
132041
|
+
|
|
132042
|
+
if (nodes.length) {
|
|
132043
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("slot", {
|
|
132044
|
+
ref: host
|
|
132045
|
+
});
|
|
132046
|
+
}
|
|
132047
|
+
|
|
132048
|
+
return null;
|
|
132049
|
+
};
|
|
132050
|
+
/**
|
|
132051
|
+
* Transforms the given component to an extension component.
|
|
132052
|
+
* @param Component The component to transform.
|
|
132053
|
+
* @returns The extension component (receiving its props via params).
|
|
132054
|
+
*/
|
|
132055
|
+
|
|
132056
|
+
|
|
131952
132057
|
function toExtension(Component) {
|
|
131953
132058
|
return props => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component, Object.assign({}, props.params));
|
|
131954
132059
|
}
|
|
132060
|
+
/**
|
|
132061
|
+
* Reactifies the list of child nodes to a React Node by removing the
|
|
132062
|
+
* nodes from the DOM and carrying it in a React Node, where it would be
|
|
132063
|
+
* attached at a slot.
|
|
132064
|
+
* @param childNodes The child nodes to reactify.
|
|
132065
|
+
* @returns The React Node.
|
|
132066
|
+
*/
|
|
132067
|
+
|
|
132068
|
+
function reactifyContent(childNodes) {
|
|
132069
|
+
const nodes = Array.prototype.filter.call(childNodes, Boolean);
|
|
132070
|
+
removeAll(nodes);
|
|
132071
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(SlotCarrier, {
|
|
132072
|
+
nodes: nodes
|
|
132073
|
+
});
|
|
132074
|
+
}
|
|
131955
132075
|
|
|
131956
132076
|
/***/ }),
|
|
131957
132077
|
|
|
@@ -132159,6 +132279,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
132159
132279
|
/* harmony export */ "createDataOptions": () => (/* reexport safe */ _data__WEBPACK_IMPORTED_MODULE_1__.createDataOptions),
|
|
132160
132280
|
/* harmony export */ "createDataView": () => (/* reexport safe */ _data__WEBPACK_IMPORTED_MODULE_1__.createDataView),
|
|
132161
132281
|
/* harmony export */ "getDataExpiration": () => (/* reexport safe */ _data__WEBPACK_IMPORTED_MODULE_1__.getDataExpiration),
|
|
132282
|
+
/* harmony export */ "reactifyContent": () => (/* reexport safe */ _extension__WEBPACK_IMPORTED_MODULE_2__.reactifyContent),
|
|
132162
132283
|
/* harmony export */ "toExtension": () => (/* reexport safe */ _extension__WEBPACK_IMPORTED_MODULE_2__.toExtension),
|
|
132163
132284
|
/* harmony export */ "attachDomPortal": () => (/* reexport safe */ _foreign__WEBPACK_IMPORTED_MODULE_3__.attachDomPortal),
|
|
132164
132285
|
/* harmony export */ "changeDomPortal": () => (/* reexport safe */ _foreign__WEBPACK_IMPORTED_MODULE_3__.changeDomPortal),
|
|
@@ -133232,11 +133353,11 @@ function installPiralDebug(options) {
|
|
|
133232
133353
|
debug: debugApiVersion,
|
|
133233
133354
|
instance: {
|
|
133234
133355
|
name: "sample-cross-fx",
|
|
133235
|
-
version: "0.14.8-beta.
|
|
133356
|
+
version: "0.14.8-beta.3515",
|
|
133236
133357
|
dependencies: "@angular/common,@angular/compiler,@angular/core,@angular/platform-browser,@angular/platform-browser-dynamic,@webcomponents/webcomponentsjs,angular,aurelia-framework,aurelia-templating-binding,aurelia-templating-resources,aurelia-pal-browser,aurelia-event-aggregator,aurelia-history-browser,hyperapp,inferno,inferno-create-element,mithril,lit-element,solid-js,solid-js/dom,preact,riot,rxjs,vue,zone.js,react,react-dom,react-router,react-router-dom,history,tslib,path-to-regexp,@libre/atom,@dbeining/react-atom"
|
|
133237
133358
|
},
|
|
133238
133359
|
build: {
|
|
133239
|
-
date: "2022-01-
|
|
133360
|
+
date: "2022-01-20T12:10:29.733Z",
|
|
133240
133361
|
cli: "0.14.7",
|
|
133241
133362
|
compat: "0.14"
|
|
133242
133363
|
},
|
|
@@ -255314,4 +255435,4 @@ const app = React.createElement(piral_core_1.Piral, {
|
|
|
255314
255435
|
|
|
255315
255436
|
/******/ })()
|
|
255316
255437
|
;
|
|
255317
|
-
//# sourceMappingURL=index.
|
|
255438
|
+
//# sourceMappingURL=index.b1d1f6.js.map
|