@dbmx/toasts 0.0.18 → 0.0.20
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/cjs/_virtual/_rollupPluginBabelHelpers.cjs +150 -0
- package/cjs/components/HelloWorld/index.cjs +22 -0
- package/cjs/index.cjs +75 -25
- package/cjs/node_modules/react-dom/client.cjs +18 -0
- package/cjs/webComponents/HelloWorld/index.cjs +54 -0
- package/cjs/webComponents/SDMXDatagrid/index.cjs +81 -0
- package/esm/client-gw8asYiR.js +650 -0
- package/esm/client-gw8asYiR.js.map +1 -0
- package/esm/index-FCPRKLj2.js +720 -0
- package/esm/index-FCPRKLj2.js.map +1 -0
- package/esm/index-T2bcfyHI.js +8510 -0
- package/esm/index-T2bcfyHI.js.map +1 -0
- package/esm/index-W7MLRHBf.js +87 -0
- package/esm/index-W7MLRHBf.js.map +1 -0
- package/esm/index-WUvbDMmw.js +69 -0
- package/esm/index-WUvbDMmw.js.map +1 -0
- package/esm/index-ndYjFD6I.js +8438 -0
- package/esm/index-ndYjFD6I.js.map +1 -0
- package/esm/index.js +121 -2
- package/esm/index.js.map +1 -1
- package/package.json +4 -2
|
@@ -379,6 +379,28 @@ function _asyncToGenerator(fn) {
|
|
|
379
379
|
});
|
|
380
380
|
};
|
|
381
381
|
}
|
|
382
|
+
function _classCallCheck(instance, Constructor) {
|
|
383
|
+
if (!(instance instanceof Constructor)) {
|
|
384
|
+
throw new TypeError("Cannot call a class as a function");
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
function _defineProperties(target, props) {
|
|
388
|
+
for (var i = 0; i < props.length; i++) {
|
|
389
|
+
var descriptor = props[i];
|
|
390
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
391
|
+
descriptor.configurable = true;
|
|
392
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
393
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
397
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
398
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
399
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
400
|
+
writable: false
|
|
401
|
+
});
|
|
402
|
+
return Constructor;
|
|
403
|
+
}
|
|
382
404
|
function _defineProperty(obj, key, value) {
|
|
383
405
|
key = _toPropertyKey(key);
|
|
384
406
|
if (key in obj) {
|
|
@@ -393,6 +415,122 @@ function _defineProperty(obj, key, value) {
|
|
|
393
415
|
}
|
|
394
416
|
return obj;
|
|
395
417
|
}
|
|
418
|
+
function _inherits(subClass, superClass) {
|
|
419
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
420
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
421
|
+
}
|
|
422
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
423
|
+
constructor: {
|
|
424
|
+
value: subClass,
|
|
425
|
+
writable: true,
|
|
426
|
+
configurable: true
|
|
427
|
+
}
|
|
428
|
+
});
|
|
429
|
+
Object.defineProperty(subClass, "prototype", {
|
|
430
|
+
writable: false
|
|
431
|
+
});
|
|
432
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
433
|
+
}
|
|
434
|
+
function _getPrototypeOf(o) {
|
|
435
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
436
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
437
|
+
};
|
|
438
|
+
return _getPrototypeOf(o);
|
|
439
|
+
}
|
|
440
|
+
function _setPrototypeOf(o, p) {
|
|
441
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
442
|
+
o.__proto__ = p;
|
|
443
|
+
return o;
|
|
444
|
+
};
|
|
445
|
+
return _setPrototypeOf(o, p);
|
|
446
|
+
}
|
|
447
|
+
function _isNativeReflectConstruct() {
|
|
448
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
449
|
+
if (Reflect.construct.sham) return false;
|
|
450
|
+
if (typeof Proxy === "function") return true;
|
|
451
|
+
try {
|
|
452
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
453
|
+
return true;
|
|
454
|
+
} catch (e) {
|
|
455
|
+
return false;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
function _construct(Parent, args, Class) {
|
|
459
|
+
if (_isNativeReflectConstruct()) {
|
|
460
|
+
_construct = Reflect.construct.bind();
|
|
461
|
+
} else {
|
|
462
|
+
_construct = function _construct(Parent, args, Class) {
|
|
463
|
+
var a = [null];
|
|
464
|
+
a.push.apply(a, args);
|
|
465
|
+
var Constructor = Function.bind.apply(Parent, a);
|
|
466
|
+
var instance = new Constructor();
|
|
467
|
+
if (Class) _setPrototypeOf(instance, Class.prototype);
|
|
468
|
+
return instance;
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
return _construct.apply(null, arguments);
|
|
472
|
+
}
|
|
473
|
+
function _isNativeFunction(fn) {
|
|
474
|
+
try {
|
|
475
|
+
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
476
|
+
} catch (e) {
|
|
477
|
+
return typeof fn === "function";
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
function _wrapNativeSuper(Class) {
|
|
481
|
+
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
482
|
+
_wrapNativeSuper = function _wrapNativeSuper(Class) {
|
|
483
|
+
if (Class === null || !_isNativeFunction(Class)) return Class;
|
|
484
|
+
if (typeof Class !== "function") {
|
|
485
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
486
|
+
}
|
|
487
|
+
if (typeof _cache !== "undefined") {
|
|
488
|
+
if (_cache.has(Class)) return _cache.get(Class);
|
|
489
|
+
_cache.set(Class, Wrapper);
|
|
490
|
+
}
|
|
491
|
+
function Wrapper() {
|
|
492
|
+
return _construct(Class, arguments, _getPrototypeOf(this).constructor);
|
|
493
|
+
}
|
|
494
|
+
Wrapper.prototype = Object.create(Class.prototype, {
|
|
495
|
+
constructor: {
|
|
496
|
+
value: Wrapper,
|
|
497
|
+
enumerable: false,
|
|
498
|
+
writable: true,
|
|
499
|
+
configurable: true
|
|
500
|
+
}
|
|
501
|
+
});
|
|
502
|
+
return _setPrototypeOf(Wrapper, Class);
|
|
503
|
+
};
|
|
504
|
+
return _wrapNativeSuper(Class);
|
|
505
|
+
}
|
|
506
|
+
function _assertThisInitialized(self) {
|
|
507
|
+
if (self === void 0) {
|
|
508
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
509
|
+
}
|
|
510
|
+
return self;
|
|
511
|
+
}
|
|
512
|
+
function _possibleConstructorReturn(self, call) {
|
|
513
|
+
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
514
|
+
return call;
|
|
515
|
+
} else if (call !== void 0) {
|
|
516
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
517
|
+
}
|
|
518
|
+
return _assertThisInitialized(self);
|
|
519
|
+
}
|
|
520
|
+
function _createSuper(Derived) {
|
|
521
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
522
|
+
return function _createSuperInternal() {
|
|
523
|
+
var Super = _getPrototypeOf(Derived),
|
|
524
|
+
result;
|
|
525
|
+
if (hasNativeReflectConstruct) {
|
|
526
|
+
var NewTarget = _getPrototypeOf(this).constructor;
|
|
527
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
528
|
+
} else {
|
|
529
|
+
result = Super.apply(this, arguments);
|
|
530
|
+
}
|
|
531
|
+
return _possibleConstructorReturn(this, result);
|
|
532
|
+
};
|
|
533
|
+
}
|
|
396
534
|
function _slicedToArray(arr, i) {
|
|
397
535
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
398
536
|
}
|
|
@@ -496,17 +634,29 @@ function _toPropertyKey(arg) {
|
|
|
496
634
|
exports.arrayLikeToArray = _arrayLikeToArray;
|
|
497
635
|
exports.arrayWithHoles = _arrayWithHoles;
|
|
498
636
|
exports.arrayWithoutHoles = _arrayWithoutHoles;
|
|
637
|
+
exports.assertThisInitialized = _assertThisInitialized;
|
|
499
638
|
exports.asyncToGenerator = _asyncToGenerator;
|
|
639
|
+
exports.classCallCheck = _classCallCheck;
|
|
640
|
+
exports.construct = _construct;
|
|
641
|
+
exports.createClass = _createClass;
|
|
500
642
|
exports.createForOfIteratorHelper = _createForOfIteratorHelper;
|
|
643
|
+
exports.createSuper = _createSuper;
|
|
501
644
|
exports.defineProperty = _defineProperty;
|
|
645
|
+
exports.getPrototypeOf = _getPrototypeOf;
|
|
646
|
+
exports.inherits = _inherits;
|
|
647
|
+
exports.isNativeFunction = _isNativeFunction;
|
|
648
|
+
exports.isNativeReflectConstruct = _isNativeReflectConstruct;
|
|
502
649
|
exports.iterableToArray = _iterableToArray;
|
|
503
650
|
exports.iterableToArrayLimit = _iterableToArrayLimit;
|
|
504
651
|
exports.nonIterableRest = _nonIterableRest;
|
|
505
652
|
exports.nonIterableSpread = _nonIterableSpread;
|
|
506
653
|
exports.objectSpread2 = _objectSpread2;
|
|
654
|
+
exports.possibleConstructorReturn = _possibleConstructorReturn;
|
|
507
655
|
exports.regeneratorRuntime = _regeneratorRuntime;
|
|
656
|
+
exports.setPrototypeOf = _setPrototypeOf;
|
|
508
657
|
exports.slicedToArray = _slicedToArray;
|
|
509
658
|
exports.toConsumableArray = _toConsumableArray;
|
|
510
659
|
exports.toPrimitive = _toPrimitive;
|
|
511
660
|
exports.toPropertyKey = _toPropertyKey;
|
|
512
661
|
exports.unsupportedIterableToArray = _unsupportedIterableToArray;
|
|
662
|
+
exports.wrapNativeSuper = _wrapNativeSuper;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
|
|
5
|
+
var HelloWorld = function HelloWorld(_ref) {
|
|
6
|
+
var name = _ref.name;
|
|
7
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
8
|
+
style: {
|
|
9
|
+
backgroundColor: '#cfe8ff60',
|
|
10
|
+
padding: 15
|
|
11
|
+
}
|
|
12
|
+
}, /*#__PURE__*/React.createElement("h2", null, "testing react component"), /*#__PURE__*/React.createElement("p", null, "Your name is: ", /*#__PURE__*/React.createElement("i", {
|
|
13
|
+
style: {
|
|
14
|
+
color: '#9c9c9c'
|
|
15
|
+
}
|
|
16
|
+
}, name)), /*#__PURE__*/React.createElement("input", {
|
|
17
|
+
type: "text",
|
|
18
|
+
placeholder: "filter"
|
|
19
|
+
}));
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
module.exports = HelloWorld;
|
package/cjs/index.cjs
CHANGED
|
@@ -1,36 +1,68 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
var React = require('react');
|
|
5
|
-
|
|
6
|
-
function _interopNamespaceDefaultOnly (e) { return Object.freeze({ __proto__: null, default: e }); }
|
|
3
|
+
// import { lazy } from 'react'
|
|
7
4
|
|
|
8
5
|
var importPath = '@dbmx/toasts';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
// const type = importPath
|
|
7
|
+
// const tag = 'toast'
|
|
8
|
+
|
|
9
|
+
var toasts = [
|
|
10
|
+
// {
|
|
11
|
+
// id: 'sdmxDatagrid',
|
|
12
|
+
// importPath,
|
|
13
|
+
// type,
|
|
14
|
+
// tag,
|
|
15
|
+
// name: 'SDMX Datagrid',
|
|
16
|
+
// tech: 'react',
|
|
17
|
+
// description:
|
|
18
|
+
// 'SDMX, which stands for Statistical Data and Metadata eXchange, is an international initiative that aims at standardising and modernising ("industrialising") the mechanisms and processes for the exchange of statistical data and metadata among international organisations and their member countries.',
|
|
19
|
+
// component: lazy(async () => {
|
|
20
|
+
// const obj = await import('./components/SdmxDatagrid/index.jsx')
|
|
21
|
+
// return typeof obj.default === 'function' ? obj : obj.default
|
|
22
|
+
// }),
|
|
23
|
+
// image: '/images/toasts/sdmx_datagrid.png', // TODO
|
|
24
|
+
// props: {
|
|
25
|
+
// endpoint: {
|
|
26
|
+
// type: 'url',
|
|
27
|
+
// required: true,
|
|
28
|
+
// },
|
|
29
|
+
// resourceType: {
|
|
30
|
+
// type: 'select',
|
|
31
|
+
// required: true,
|
|
32
|
+
// defaultValue: 'dataflow',
|
|
33
|
+
// data: [
|
|
34
|
+
// { value: 'dataflow', label: 'Dataflow' },
|
|
35
|
+
// { value: 'datastructure', label: 'DataStructure' },
|
|
36
|
+
// { value: 'dataproviderscheme', label: 'DataProvider' },
|
|
37
|
+
// ],
|
|
38
|
+
// },
|
|
39
|
+
// agencyID: {
|
|
40
|
+
// type: 'string',
|
|
41
|
+
// required: true,
|
|
42
|
+
// defaultValue: '*',
|
|
43
|
+
// },
|
|
44
|
+
// id: {
|
|
45
|
+
// type: 'string',
|
|
46
|
+
// required: true,
|
|
47
|
+
// },
|
|
48
|
+
// version: {
|
|
49
|
+
// type: 'string',
|
|
50
|
+
// required: true,
|
|
51
|
+
// defaultValue: '~',
|
|
52
|
+
// },
|
|
53
|
+
// },
|
|
54
|
+
// },
|
|
55
|
+
|
|
56
|
+
{
|
|
12
57
|
id: 'sdmxDatagrid',
|
|
13
58
|
importPath: importPath,
|
|
14
|
-
|
|
15
|
-
tag:
|
|
59
|
+
brand: 'web-component',
|
|
60
|
+
tag: 'sdmx-datagrid',
|
|
16
61
|
name: 'SDMX Datagrid',
|
|
17
62
|
description: 'SDMX, which stands for Statistical Data and Metadata eXchange, is an international initiative that aims at standardising and modernising ("industrialising") the mechanisms and processes for the exchange of statistical data and metadata among international organisations and their member countries.',
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
while (1) switch (_context.prev = _context.next) {
|
|
22
|
-
case 0:
|
|
23
|
-
_context.next = 2;
|
|
24
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespaceDefaultOnly(require('./components/SdmxDatagrid/index.cjs')); });
|
|
25
|
-
case 2:
|
|
26
|
-
obj = _context.sent;
|
|
27
|
-
return _context.abrupt("return", typeof obj["default"] === 'function' ? obj : obj["default"]);
|
|
28
|
-
case 4:
|
|
29
|
-
case "end":
|
|
30
|
-
return _context.stop();
|
|
31
|
-
}
|
|
32
|
-
}, _callee);
|
|
33
|
-
}))),
|
|
63
|
+
"import": function _import() {
|
|
64
|
+
return Promise.resolve().then(function () { return require('./webComponents/SDMXDatagrid/index.cjs'); });
|
|
65
|
+
},
|
|
34
66
|
image: '/images/toasts/sdmx_datagrid.png',
|
|
35
67
|
// TODO
|
|
36
68
|
props: {
|
|
@@ -68,6 +100,24 @@ var toasts = [{
|
|
|
68
100
|
defaultValue: '~'
|
|
69
101
|
}
|
|
70
102
|
}
|
|
103
|
+
}, {
|
|
104
|
+
id: 'helloWorld',
|
|
105
|
+
importPath: '@dbmx/webComponents',
|
|
106
|
+
brand: 'web-component',
|
|
107
|
+
tag: 'hello-world',
|
|
108
|
+
name: 'Hello World',
|
|
109
|
+
description: 'web component demonstration',
|
|
110
|
+
"import": function _import() {
|
|
111
|
+
return Promise.resolve().then(function () { return require('./webComponents/HelloWorld/index.cjs'); });
|
|
112
|
+
},
|
|
113
|
+
image: 'https://ui.mantine.dev/_next/static/media/comments-light.9c0747c0.svg',
|
|
114
|
+
props: {
|
|
115
|
+
name: {
|
|
116
|
+
type: 'string',
|
|
117
|
+
required: true,
|
|
118
|
+
"default": 'test'
|
|
119
|
+
}
|
|
120
|
+
}
|
|
71
121
|
}];
|
|
72
122
|
|
|
73
123
|
module.exports = toasts;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var require$$0 = require('react-dom');
|
|
4
|
+
|
|
5
|
+
exports.createRoot = void 0;
|
|
6
|
+
|
|
7
|
+
var m = require$$0;
|
|
8
|
+
{
|
|
9
|
+
var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
10
|
+
exports.createRoot = function (c, o) {
|
|
11
|
+
i.usingClientEntryPoint = true;
|
|
12
|
+
try {
|
|
13
|
+
return m.createRoot(c, o);
|
|
14
|
+
} finally {
|
|
15
|
+
i.usingClientEntryPoint = false;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.cjs');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var client = require('../../node_modules/react-dom/client.cjs');
|
|
6
|
+
var index = require('../../components/HelloWorld/index.cjs');
|
|
7
|
+
|
|
8
|
+
var HelloWorld = /*#__PURE__*/function (_HTMLElement) {
|
|
9
|
+
_rollupPluginBabelHelpers.inherits(HelloWorld, _HTMLElement);
|
|
10
|
+
var _super = _rollupPluginBabelHelpers.createSuper(HelloWorld);
|
|
11
|
+
function HelloWorld() {
|
|
12
|
+
var _this;
|
|
13
|
+
_rollupPluginBabelHelpers.classCallCheck(this, HelloWorld);
|
|
14
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
15
|
+
args[_key] = arguments[_key];
|
|
16
|
+
}
|
|
17
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
18
|
+
_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.assertThisInitialized(_this), "forceUpdateComponent", void 0);
|
|
19
|
+
_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.assertThisInitialized(_this), "container", function () {
|
|
20
|
+
var forceUpdate = React.useReducer(function () {
|
|
21
|
+
return {};
|
|
22
|
+
}, {})[1];
|
|
23
|
+
_this.forceUpdateComponent = forceUpdate;
|
|
24
|
+
var name = _this.getAttribute('name');
|
|
25
|
+
return /*#__PURE__*/React.createElement(index, {
|
|
26
|
+
name: name
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
return _this;
|
|
30
|
+
}
|
|
31
|
+
_rollupPluginBabelHelpers.createClass(HelloWorld, [{
|
|
32
|
+
key: "connectedCallback",
|
|
33
|
+
value: function connectedCallback() {
|
|
34
|
+
var mountPoint = document.createElement('div');
|
|
35
|
+
this.attachShadow({
|
|
36
|
+
mode: 'open'
|
|
37
|
+
}).appendChild(mountPoint);
|
|
38
|
+
var root = client.createRoot(mountPoint);
|
|
39
|
+
root.render( /*#__PURE__*/React.createElement(this.container, null));
|
|
40
|
+
}
|
|
41
|
+
}, {
|
|
42
|
+
key: "attributeChangedCallback",
|
|
43
|
+
value: function attributeChangedCallback() {
|
|
44
|
+
if (typeof this.forceUpdateComponent === 'function') this.forceUpdateComponent();
|
|
45
|
+
}
|
|
46
|
+
}], [{
|
|
47
|
+
key: "observedAttributes",
|
|
48
|
+
get: function get() {
|
|
49
|
+
return ['name'];
|
|
50
|
+
}
|
|
51
|
+
}]);
|
|
52
|
+
return HelloWorld;
|
|
53
|
+
}( /*#__PURE__*/_rollupPluginBabelHelpers.wrapNativeSuper(HTMLElement));
|
|
54
|
+
customElements.define('hello-world', HelloWorld);
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.cjs');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var client = require('../../node_modules/react-dom/client.cjs');
|
|
6
|
+
var reactIntl = require('react-intl');
|
|
7
|
+
var core = require('@mantine/core');
|
|
8
|
+
var index = require('../../components/SdmxDatagrid/index.cjs');
|
|
9
|
+
|
|
10
|
+
var SDMXDatagrid = /*#__PURE__*/function (_HTMLElement) {
|
|
11
|
+
_rollupPluginBabelHelpers.inherits(SDMXDatagrid, _HTMLElement);
|
|
12
|
+
var _super = _rollupPluginBabelHelpers.createSuper(SDMXDatagrid);
|
|
13
|
+
function SDMXDatagrid() {
|
|
14
|
+
var _this;
|
|
15
|
+
_rollupPluginBabelHelpers.classCallCheck(this, SDMXDatagrid);
|
|
16
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
17
|
+
args[_key] = arguments[_key];
|
|
18
|
+
}
|
|
19
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
20
|
+
_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.assertThisInitialized(_this), "forceUpdateComponent", void 0);
|
|
21
|
+
_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.assertThisInitialized(_this), "container", function () {
|
|
22
|
+
var forceUpdate = React.useReducer(function () {
|
|
23
|
+
return {};
|
|
24
|
+
}, {})[1];
|
|
25
|
+
_this.forceUpdateComponent = forceUpdate;
|
|
26
|
+
var props = {
|
|
27
|
+
endpoint: _this.getAttribute('endpoint'),
|
|
28
|
+
resourceType: _this.getAttribute('resourceType'),
|
|
29
|
+
agencyID: _this.getAttribute('agencyID'),
|
|
30
|
+
id: _this.getAttribute('id'),
|
|
31
|
+
version: _this.getAttribute('version')
|
|
32
|
+
};
|
|
33
|
+
var containerProps = _this.getAttribute('containerProps') || {};
|
|
34
|
+
var containerPropsValue = typeof containerProps === 'string' ? JSON.parse(containerProps) : {};
|
|
35
|
+
return /*#__PURE__*/React.createElement(reactIntl.IntlProvider, {
|
|
36
|
+
defaultLocale: "en",
|
|
37
|
+
locale: "en",
|
|
38
|
+
messages: {}
|
|
39
|
+
}, /*#__PURE__*/React.createElement("div", containerPropsValue, /*#__PURE__*/React.createElement(index, props)));
|
|
40
|
+
});
|
|
41
|
+
return _this;
|
|
42
|
+
}
|
|
43
|
+
_rollupPluginBabelHelpers.createClass(SDMXDatagrid, [{
|
|
44
|
+
key: "connectedCallback",
|
|
45
|
+
value: function connectedCallback() {
|
|
46
|
+
var shadowRoot = this.attachShadow({
|
|
47
|
+
mode: 'open'
|
|
48
|
+
});
|
|
49
|
+
var mountPoint = document.createElement('div');
|
|
50
|
+
var emotionRoot = document.createElement('div');
|
|
51
|
+
shadowRoot.appendChild(mountPoint);
|
|
52
|
+
shadowRoot.appendChild(emotionRoot);
|
|
53
|
+
var appendCache = core.createEmotionCache({
|
|
54
|
+
key: 'mantine-wc',
|
|
55
|
+
container: emotionRoot
|
|
56
|
+
});
|
|
57
|
+
var root = client.createRoot(mountPoint);
|
|
58
|
+
root.render( /*#__PURE__*/React.createElement(core.MantineProvider, {
|
|
59
|
+
emotionCache: appendCache,
|
|
60
|
+
withGlobalStyles: true,
|
|
61
|
+
withNormalizeCSS: true
|
|
62
|
+
}, /*#__PURE__*/React.createElement(reactIntl.IntlProvider, {
|
|
63
|
+
defaultLocale: "en",
|
|
64
|
+
locale: "en",
|
|
65
|
+
messages: {}
|
|
66
|
+
}, /*#__PURE__*/React.createElement(this.container, null))));
|
|
67
|
+
}
|
|
68
|
+
}, {
|
|
69
|
+
key: "attributeChangedCallback",
|
|
70
|
+
value: function attributeChangedCallback() {
|
|
71
|
+
if (typeof this.forceUpdateComponent === 'function') this.forceUpdateComponent();
|
|
72
|
+
}
|
|
73
|
+
}], [{
|
|
74
|
+
key: "observedAttributes",
|
|
75
|
+
get: function get() {
|
|
76
|
+
return ['endpoint', 'resourceType', 'agencyID', 'id', 'version'];
|
|
77
|
+
}
|
|
78
|
+
}]);
|
|
79
|
+
return SDMXDatagrid;
|
|
80
|
+
}( /*#__PURE__*/_rollupPluginBabelHelpers.wrapNativeSuper(HTMLElement));
|
|
81
|
+
customElements.define('sdmx-datagrid', SDMXDatagrid);
|