@telia-ace/knowledge-widget-core 1.0.6 → 1.0.9
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/LICENSE.txt +5 -5
- package/README.md +3 -3
- package/{lib-esm → dist}/bootstrap.d.ts +15 -15
- package/{lib → dist}/data-types.d.ts +87 -87
- package/{lib-esm → dist}/humany.d.ts +48 -48
- package/{lib-esm → dist}/implementation.d.ts +7 -7
- package/{lib-esm → dist}/index.d.ts +13 -13
- package/dist/index.js +122 -0
- package/dist/index.js.map +1 -0
- package/{lib → dist}/load-implementation.d.ts +8 -8
- package/{lib-esm → dist}/plugin.d.ts +7 -7
- package/{lib-esm → dist}/verify-auth.d.ts +2 -2
- package/{lib-esm → dist}/version.d.ts +2 -2
- package/{lib → dist}/widget-type.d.ts +7 -7
- package/package.json +11 -11
- package/lib/bootstrap.d.ts +0 -15
- package/lib/bootstrap.js +0 -26
- package/lib/data-types.js +0 -16
- package/lib/humany.d.ts +0 -48
- package/lib/humany.js +0 -119
- package/lib/implementation.d.ts +0 -7
- package/lib/implementation.js +0 -31
- package/lib/index.d.ts +0 -13
- package/lib/index.js +0 -43
- package/lib/load-implementation.js +0 -15
- package/lib/plugin.d.ts +0 -7
- package/lib/plugin.js +0 -29
- package/lib/verify-auth.d.ts +0 -2
- package/lib/verify-auth.js +0 -10
- package/lib/version.d.ts +0 -2
- package/lib/version.js +0 -3
- package/lib/widget-type.js +0 -29
- package/lib-esm/bootstrap.js +0 -24
- package/lib-esm/data-types.d.ts +0 -87
- package/lib-esm/data-types.js +0 -13
- package/lib-esm/humany.js +0 -114
- package/lib-esm/implementation.js +0 -29
- package/lib-esm/index.js +0 -12
- package/lib-esm/load-implementation.d.ts +0 -8
- package/lib-esm/load-implementation.js +0 -13
- package/lib-esm/plugin.js +0 -27
- package/lib-esm/verify-auth.js +0 -8
- package/lib-esm/version.js +0 -1
- package/lib-esm/widget-type.d.ts +0 -7
- package/lib-esm/widget-type.js +0 -27
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
import { Implementation as ImplementationBase } from '@webprovisions/platform';
|
|
17
|
-
/**
|
|
18
|
-
* Represents a Humany implementation.
|
|
19
|
-
*/
|
|
20
|
-
var Implementation = /** @class */ (function (_super) {
|
|
21
|
-
__extends(Implementation, _super);
|
|
22
|
-
function Implementation() {
|
|
23
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
-
_this.bindings = [];
|
|
25
|
-
return _this;
|
|
26
|
-
}
|
|
27
|
-
return Implementation;
|
|
28
|
-
}(ImplementationBase));
|
|
29
|
-
export default Implementation;
|
package/lib-esm/index.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from '@telia-ace/widget-core';
|
|
2
|
-
export { supportBootstrapping } from '@webprovisions/bootstrapping';
|
|
3
|
-
export { destroyWidget as destroy, Widget } from '@webprovisions/platform';
|
|
4
|
-
export { default as bootstrap } from './bootstrap';
|
|
5
|
-
export * from './data-types';
|
|
6
|
-
export { default as Humany } from './humany';
|
|
7
|
-
export { default as Implementation } from './implementation';
|
|
8
|
-
export { default as loadImplementation } from './load-implementation';
|
|
9
|
-
export { default as Plugin } from './plugin';
|
|
10
|
-
export { default as verifyAuth } from './verify-auth';
|
|
11
|
-
export { default as version } from './version';
|
|
12
|
-
export { default as WidgetType } from './widget-type';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import Humany from './humany';
|
|
2
|
-
import Implementation from './implementation';
|
|
3
|
-
/**
|
|
4
|
-
* Loads a Humany implementation by fetching the configuration from the specified URL.
|
|
5
|
-
* @param implementationPath Implementation URL.
|
|
6
|
-
*/
|
|
7
|
-
declare const loadImplementation: (humany: Humany, url: string) => Promise<Implementation>;
|
|
8
|
-
export default loadImplementation;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Loads a Humany implementation by fetching the configuration from the specified URL.
|
|
3
|
-
* @param implementationPath Implementation URL.
|
|
4
|
-
*/
|
|
5
|
-
var loadImplementation = function (humany, url) {
|
|
6
|
-
return fetch(url + '/config.json')
|
|
7
|
-
.then(function (response) { return response.json(); })
|
|
8
|
-
.then(function (json) { return json.implementation; })
|
|
9
|
-
.then(function (configuration) {
|
|
10
|
-
return humany.createImplementation(configuration);
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
export default loadImplementation;
|
package/lib-esm/plugin.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
import { Plugin as PluginBase } from '@webprovisions/platform';
|
|
17
|
-
/**
|
|
18
|
-
* Base class for a Humany plugin.
|
|
19
|
-
*/
|
|
20
|
-
var Plugin = /** @class */ (function (_super) {
|
|
21
|
-
__extends(Plugin, _super);
|
|
22
|
-
function Plugin(container, settings) {
|
|
23
|
-
return _super.call(this, container, settings) || this;
|
|
24
|
-
}
|
|
25
|
-
return Plugin;
|
|
26
|
-
}(PluginBase));
|
|
27
|
-
export default Plugin;
|
package/lib-esm/verify-auth.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
var verifyAuth = function (host, widgetName) {
|
|
2
|
-
var url = "".concat(host).concat(widgetName, "/interfaceauthorized");
|
|
3
|
-
return fetch(url, {
|
|
4
|
-
method: 'GET',
|
|
5
|
-
credentials: 'include',
|
|
6
|
-
}).then(function (response) { return response.status === 200 && response.ok; });
|
|
7
|
-
};
|
|
8
|
-
export default verifyAuth;
|
package/lib-esm/version.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default '#____version____#';
|
package/lib-esm/widget-type.d.ts
DELETED
package/lib-esm/widget-type.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
import { WidgetType as WidgetTypeBase } from '@webprovisions/platform';
|
|
17
|
-
/**
|
|
18
|
-
* Base class for a Humany widget.
|
|
19
|
-
*/
|
|
20
|
-
var WidgetType = /** @class */ (function (_super) {
|
|
21
|
-
__extends(WidgetType, _super);
|
|
22
|
-
function WidgetType(container) {
|
|
23
|
-
return _super.call(this, container) || this;
|
|
24
|
-
}
|
|
25
|
-
return WidgetType;
|
|
26
|
-
}(WidgetTypeBase));
|
|
27
|
-
export default WidgetType;
|