@vendure/ui-devkit 1.3.4 → 1.4.2
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/client/devkit-client-api.d.ts +59 -1
- package/client/index.js +1 -1
- package/package.json +5 -5
- package/scaffold/angular.json +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NotificationMessage, WatchQueryFetchPolicy } from '@vendure/common/lib/extension-host-types';
|
|
1
|
+
import { ActiveRouteData, NotificationMessage, WatchQueryFetchPolicy } from '@vendure/common/lib/extension-host-types';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
/**
|
|
4
4
|
* @description
|
|
@@ -11,10 +11,42 @@ import { Observable } from 'rxjs';
|
|
|
11
11
|
* @docsPage UiDevkitClient
|
|
12
12
|
*/
|
|
13
13
|
export declare function setTargetOrigin(value: string): void;
|
|
14
|
+
/**
|
|
15
|
+
* @description
|
|
16
|
+
* Retrieves information about the current route of the host application, since it is not possible
|
|
17
|
+
* to otherwise get this information from within the child iframe.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```TypeScript
|
|
21
|
+
* import { getActivatedRoute } from '\@vendure/ui-devkit';
|
|
22
|
+
*
|
|
23
|
+
* const route = await getActivatedRoute();
|
|
24
|
+
* const slug = route.params.slug;
|
|
25
|
+
* ```
|
|
26
|
+
* @docsCategory ui-devkit
|
|
27
|
+
* @docsPage UiDevkitClient
|
|
28
|
+
*/
|
|
29
|
+
export declare function getActivatedRoute(): Promise<ActiveRouteData>;
|
|
14
30
|
/**
|
|
15
31
|
* @description
|
|
16
32
|
* Perform a GraphQL query and returns either an Observable or a Promise of the result.
|
|
17
33
|
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```TypeScript
|
|
36
|
+
* import { graphQlQuery } from '\@vendure/ui-devkit';
|
|
37
|
+
*
|
|
38
|
+
* const productList = await graphQlQuery(`
|
|
39
|
+
* query GetProducts($skip: Int, $take: Int) {
|
|
40
|
+
* products(options: { skip: $skip, take: $take }) {
|
|
41
|
+
* items { id, name, enabled },
|
|
42
|
+
* totalItems
|
|
43
|
+
* }
|
|
44
|
+
* }`, {
|
|
45
|
+
* skip: 0,
|
|
46
|
+
* take: 10,
|
|
47
|
+
* }).then(data => data.products);
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
18
50
|
* @docsCategory ui-devkit
|
|
19
51
|
* @docsPage UiDevkitClient
|
|
20
52
|
*/
|
|
@@ -30,6 +62,22 @@ export declare function graphQlQuery<T, V extends {
|
|
|
30
62
|
* @description
|
|
31
63
|
* Perform a GraphQL mutation and returns either an Observable or a Promise of the result.
|
|
32
64
|
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```TypeScript
|
|
67
|
+
* import { graphQlMutation } from '\@vendure/ui-devkit';
|
|
68
|
+
*
|
|
69
|
+
* const disableProduct = (id: string) => {
|
|
70
|
+
* return graphQlMutation(`
|
|
71
|
+
* mutation DisableProduct($id: ID!) {
|
|
72
|
+
* updateProduct(input: { id: $id, enabled: false }) {
|
|
73
|
+
* id
|
|
74
|
+
* enabled
|
|
75
|
+
* }
|
|
76
|
+
* }`, { id })
|
|
77
|
+
* .then(data => data.updateProduct)
|
|
78
|
+
* }
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
33
81
|
* @docsCategory ui-devkit
|
|
34
82
|
* @docsPage UiDevkitClient
|
|
35
83
|
*/
|
|
@@ -45,6 +93,16 @@ export declare function graphQlMutation<T, V extends {
|
|
|
45
93
|
* @description
|
|
46
94
|
* Display a toast notification.
|
|
47
95
|
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```TypeScript
|
|
98
|
+
* import { notify } from '\@vendure/ui-devkit';
|
|
99
|
+
*
|
|
100
|
+
* notify({
|
|
101
|
+
* message: 'Updated Product',
|
|
102
|
+
* type: 'success'
|
|
103
|
+
* });
|
|
104
|
+
* ```
|
|
105
|
+
*
|
|
48
106
|
* @docsCategory ui-devkit
|
|
49
107
|
* @docsPage UiDevkitClient
|
|
50
108
|
*/
|
package/client/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(r,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((r="undefined"!=typeof globalThis?globalThis:r||self).VendureUiClient={})}(this,(function(r){"use strict";var t=function(r,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n])})(r,n)};function n(r,n){function e(){this.constructor=r}t(r,n),r.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}function e(r){return"function"==typeof r}var o=!1,i={Promise:void 0,set useDeprecatedSynchronousErrorHandling(r){r&&(new Error).stack;o=r},get useDeprecatedSynchronousErrorHandling(){return o}};function s(r){setTimeout((function(){throw r}),0)}var u={closed:!0,next:function(r){},error:function(r){if(i.useDeprecatedSynchronousErrorHandling)throw r;s(r)},complete:function(){}},c=function(){return Array.isArray||function(r){return r&&"number"==typeof r.length}}();var a=function(){function r(r){return Error.call(this),this.message=r?r.length+" errors occurred during unsubscription:\n"+r.map((function(r,t){return t+1+") "+r.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=r,this}return r.prototype=Object.create(Error.prototype),r}(),h=function(){function r(r){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,r&&(this._ctorUnsubscribe=!0,this._unsubscribe=r)}return r.prototype.unsubscribe=function(){var t;if(!this.closed){var n,o=this,i=o._parentOrParents,s=o._ctorUnsubscribe,u=o._unsubscribe,h=o._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,i instanceof r)i.remove(this);else if(null!==i)for(var f=0;f<i.length;++f){i[f].remove(this)}if(e(u)){s&&(this._unsubscribe=void 0);try{u.call(this)}catch(r){t=r instanceof a?p(r.errors):[r]}}if(c(h)){f=-1;for(var l=h.length;++f<l;){var b=h[f];if(null!==(n=b)&&"object"==typeof n)try{b.unsubscribe()}catch(r){t=t||[],r instanceof a?t=t.concat(p(r.errors)):t.push(r)}}}if(t)throw new a(t)}},r.prototype.add=function(t){var n=t;if(!t)return r.EMPTY;switch(typeof t){case"function":n=new r(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof r)){var e=n;(n=new r)._subscriptions=[e]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(o instanceof r){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n},r.prototype.remove=function(r){var t=this._subscriptions;if(t){var n=t.indexOf(r);-1!==n&&t.splice(n,1)}},r.EMPTY=function(r){return r.closed=!0,r}(new r),r}();function p(r){return r.reduce((function(r,t){return r.concat(t instanceof a?t.errors:t)}),[])}var f=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}(),l=function(r){function t(n,e,o){var i=r.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=u;break;case 1:if(!n){i.destination=u;break}if("object"==typeof n){n instanceof t?(i.syncErrorThrowable=n.syncErrorThrowable,i.destination=n,n.add(i)):(i.syncErrorThrowable=!0,i.destination=new b(i,n));break}default:i.syncErrorThrowable=!0,i.destination=new b(i,n,e,o)}return i}return n(t,r),t.prototype[f]=function(){return this},t.create=function(r,n,e){var o=new t(r,n,e);return o.syncErrorThrowable=!1,o},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this))},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){this.destination.error(r),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var r=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=r,this},t}(h),b=function(r){function t(t,n,o,i){var s,c=r.call(this)||this;c._parentSubscriber=t;var a=c;return e(n)?s=n:n&&(s=n.next,o=n.error,i=n.complete,n!==u&&(e((a=Object.create(n)).unsubscribe)&&c.add(a.unsubscribe.bind(a)),a.unsubscribe=c.unsubscribe.bind(c))),c._context=a,c._next=s,c._error=o,c._complete=i,c}return n(t,r),t.prototype.next=function(r){if(!this.isStopped&&this._next){var t=this._parentSubscriber;i.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,r)&&this.unsubscribe():this.__tryOrUnsub(this._next,r)}},t.prototype.error=function(r){if(!this.isStopped){var t=this._parentSubscriber,n=i.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,r),this.unsubscribe()):(this.__tryOrUnsub(this._error,r),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=r,t.syncErrorThrown=!0):s(r),this.unsubscribe();else{if(this.unsubscribe(),n)throw r;s(r)}}},t.prototype.complete=function(){var r=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return r._complete.call(r._context)};i.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(r,t){try{r.call(this._context,t)}catch(r){if(this.unsubscribe(),i.useDeprecatedSynchronousErrorHandling)throw r;s(r)}},t.prototype.__tryOrSetError=function(r,t,n){if(!i.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return i.useDeprecatedSynchronousErrorHandling?(r.syncErrorValue=t,r.syncErrorThrown=!0,!0):(s(t),!0)}return!1},t.prototype._unsubscribe=function(){var r=this._parentSubscriber;this._context=null,this._parentSubscriber=null,r.unsubscribe()},t}(l);var d=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function y(r){return r}function _(r){return 0===r.length?y:1===r.length?r[0]:function(t){return r.reduce((function(r,t){return t(r)}),t)}}var v=function(){function r(r){this._isScalar=!1,r&&(this._subscribe=r)}return r.prototype.lift=function(t){var n=new r;return n.source=this,n.operator=t,n},r.prototype.subscribe=function(r,t,n){var e=this.operator,o=function(r,t,n){if(r){if(r instanceof l)return r;if(r[f])return r[f]()}return r||t||n?new l(r,t,n):new l(u)}(r,t,n);if(e?o.add(e.call(o,this.source)):o.add(this.source||i.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),i.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},r.prototype._trySubscribe=function(r){try{return this._subscribe(r)}catch(t){i.useDeprecatedSynchronousErrorHandling&&(r.syncErrorThrown=!0,r.syncErrorValue=t),!function(r){for(;r;){var t=r,n=t.closed,e=t.destination,o=t.isStopped;if(n||o)return!1;r=e&&e instanceof l?e:null}return!0}(r)?console.warn(t):r.error(t)}},r.prototype.forEach=function(r,t){var n=this;return new(t=w(t))((function(t,e){var o;o=n.subscribe((function(t){try{r(t)}catch(r){e(r),o&&o.unsubscribe()}}),e,t)}))},r.prototype._subscribe=function(r){var t=this.source;return t&&t.subscribe(r)},r.prototype[d]=function(){return this},r.prototype.pipe=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return 0===r.length?this:_(r)(this)},r.prototype.toPromise=function(r){var t=this;return new(r=w(r))((function(r,n){var e;t.subscribe((function(r){return e=r}),(function(r){return n(r)}),(function(){return r(e)}))}))},r.create=function(t){return new r(t)},r}();function w(r){if(r||(r=i.Promise||Promise),!r)throw new Error("no Promise impl found");return r}var E=new v((function(r){return r.complete()}));function m(r){return r?function(r){return new v((function(t){return r.schedule((function(){return t.complete()}))}))}(r):E}var S=function(){function r(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return r.prototype=Object.create(Error.prototype),r}();function g(r){return function(t){return 0===r?m():t.lift(new O(r))}}var O=function(){function r(r){if(this.total=r,this.total<0)throw new S}return r.prototype.call=function(r,t){return t.subscribe(new x(r,this.total))},r}(),x=function(r){function t(t,n){var e=r.call(this,t)||this;return e.total=n,e.count=0,e}return n(t,r),t.prototype._next=function(r){var t=this.total,n=++this.count;n<=t&&(this.destination.next(r),n===t&&(this.destination.complete(),this.unsubscribe()))},t}(l),T="http://localhost:3000";function P(r,t){var n=r+"__"+Math.random().toString(36).substr(3),e={requestId:n,type:r,data:t};return new v((function(r){var t=window.opener||window.parent,o=function(){t.postMessage({requestId:n,type:"cancellation",data:null},T)};return window.addEventListener("message",(function(t){var e=t.data;if(e&&e.requestId===n){if(e.complete)return r.complete(),void o();if(e.error)return r.error(e.data),void o();r.next(e.data)}})),t.postMessage(e,T),o}))}r.graphQlMutation=function(r,t){var n=P("graphql-mutation",{document:r,variables:t});return{then:function(){for(var r,t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(r=n.pipe(g(1)).toPromise()).then.apply(r,t)},stream:n}},r.graphQlQuery=function(r,t,n){var e=P("graphql-query",{document:r,variables:t,fetchPolicy:n});return{then:function(){for(var r,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(r=e.pipe(g(1)).toPromise()).then.apply(r,t)},stream:e}},r.notify=function(r){P("notification",r).toPromise()},r.setTargetOrigin=function(r){T=r},Object.defineProperty(r,"__esModule",{value:!0})}));
|
|
1
|
+
!function(r,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((r="undefined"!=typeof globalThis?globalThis:r||self).VendureUiClient={})}(this,(function(r){"use strict";var t=function(r,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n])})(r,n)};function n(r,n){function e(){this.constructor=r}t(r,n),r.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}function e(r){return"function"==typeof r}var o=!1,i={Promise:void 0,set useDeprecatedSynchronousErrorHandling(r){r&&(new Error).stack;o=r},get useDeprecatedSynchronousErrorHandling(){return o}};function s(r){setTimeout((function(){throw r}),0)}var u={closed:!0,next:function(r){},error:function(r){if(i.useDeprecatedSynchronousErrorHandling)throw r;s(r)},complete:function(){}},c=function(){return Array.isArray||function(r){return r&&"number"==typeof r.length}}();var a=function(){function r(r){return Error.call(this),this.message=r?r.length+" errors occurred during unsubscription:\n"+r.map((function(r,t){return t+1+") "+r.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=r,this}return r.prototype=Object.create(Error.prototype),r}(),h=function(){function r(r){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,r&&(this._ctorUnsubscribe=!0,this._unsubscribe=r)}return r.prototype.unsubscribe=function(){var t;if(!this.closed){var n,o=this,i=o._parentOrParents,s=o._ctorUnsubscribe,u=o._unsubscribe,h=o._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,i instanceof r)i.remove(this);else if(null!==i)for(var f=0;f<i.length;++f){i[f].remove(this)}if(e(u)){s&&(this._unsubscribe=void 0);try{u.call(this)}catch(r){t=r instanceof a?p(r.errors):[r]}}if(c(h)){f=-1;for(var l=h.length;++f<l;){var b=h[f];if(null!==(n=b)&&"object"==typeof n)try{b.unsubscribe()}catch(r){t=t||[],r instanceof a?t=t.concat(p(r.errors)):t.push(r)}}}if(t)throw new a(t)}},r.prototype.add=function(t){var n=t;if(!t)return r.EMPTY;switch(typeof t){case"function":n=new r(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof r)){var e=n;(n=new r)._subscriptions=[e]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(o instanceof r){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n},r.prototype.remove=function(r){var t=this._subscriptions;if(t){var n=t.indexOf(r);-1!==n&&t.splice(n,1)}},r.EMPTY=function(r){return r.closed=!0,r}(new r),r}();function p(r){return r.reduce((function(r,t){return r.concat(t instanceof a?t.errors:t)}),[])}var f=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}(),l=function(r){function t(n,e,o){var i=r.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=u;break;case 1:if(!n){i.destination=u;break}if("object"==typeof n){n instanceof t?(i.syncErrorThrowable=n.syncErrorThrowable,i.destination=n,n.add(i)):(i.syncErrorThrowable=!0,i.destination=new b(i,n));break}default:i.syncErrorThrowable=!0,i.destination=new b(i,n,e,o)}return i}return n(t,r),t.prototype[f]=function(){return this},t.create=function(r,n,e){var o=new t(r,n,e);return o.syncErrorThrowable=!1,o},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this))},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){this.destination.error(r),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var r=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=r,this},t}(h),b=function(r){function t(t,n,o,i){var s,c=r.call(this)||this;c._parentSubscriber=t;var a=c;return e(n)?s=n:n&&(s=n.next,o=n.error,i=n.complete,n!==u&&(e((a=Object.create(n)).unsubscribe)&&c.add(a.unsubscribe.bind(a)),a.unsubscribe=c.unsubscribe.bind(c))),c._context=a,c._next=s,c._error=o,c._complete=i,c}return n(t,r),t.prototype.next=function(r){if(!this.isStopped&&this._next){var t=this._parentSubscriber;i.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,r)&&this.unsubscribe():this.__tryOrUnsub(this._next,r)}},t.prototype.error=function(r){if(!this.isStopped){var t=this._parentSubscriber,n=i.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,r),this.unsubscribe()):(this.__tryOrUnsub(this._error,r),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=r,t.syncErrorThrown=!0):s(r),this.unsubscribe();else{if(this.unsubscribe(),n)throw r;s(r)}}},t.prototype.complete=function(){var r=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return r._complete.call(r._context)};i.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(r,t){try{r.call(this._context,t)}catch(r){if(this.unsubscribe(),i.useDeprecatedSynchronousErrorHandling)throw r;s(r)}},t.prototype.__tryOrSetError=function(r,t,n){if(!i.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return i.useDeprecatedSynchronousErrorHandling?(r.syncErrorValue=t,r.syncErrorThrown=!0,!0):(s(t),!0)}return!1},t.prototype._unsubscribe=function(){var r=this._parentSubscriber;this._context=null,this._parentSubscriber=null,r.unsubscribe()},t}(l);var d=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function y(r){return r}function _(r){return 0===r.length?y:1===r.length?r[0]:function(t){return r.reduce((function(r,t){return t(r)}),t)}}var v=function(){function r(r){this._isScalar=!1,r&&(this._subscribe=r)}return r.prototype.lift=function(t){var n=new r;return n.source=this,n.operator=t,n},r.prototype.subscribe=function(r,t,n){var e=this.operator,o=function(r,t,n){if(r){if(r instanceof l)return r;if(r[f])return r[f]()}return r||t||n?new l(r,t,n):new l(u)}(r,t,n);if(e?o.add(e.call(o,this.source)):o.add(this.source||i.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),i.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},r.prototype._trySubscribe=function(r){try{return this._subscribe(r)}catch(t){i.useDeprecatedSynchronousErrorHandling&&(r.syncErrorThrown=!0,r.syncErrorValue=t),!function(r){for(;r;){var t=r,n=t.closed,e=t.destination,o=t.isStopped;if(n||o)return!1;r=e&&e instanceof l?e:null}return!0}(r)?console.warn(t):r.error(t)}},r.prototype.forEach=function(r,t){var n=this;return new(t=w(t))((function(t,e){var o;o=n.subscribe((function(t){try{r(t)}catch(r){e(r),o&&o.unsubscribe()}}),e,t)}))},r.prototype._subscribe=function(r){var t=this.source;return t&&t.subscribe(r)},r.prototype[d]=function(){return this},r.prototype.pipe=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return 0===r.length?this:_(r)(this)},r.prototype.toPromise=function(r){var t=this;return new(r=w(r))((function(r,n){var e;t.subscribe((function(r){return e=r}),(function(r){return n(r)}),(function(){return r(e)}))}))},r.create=function(t){return new r(t)},r}();function w(r){if(r||(r=i.Promise||Promise),!r)throw new Error("no Promise impl found");return r}var E=new v((function(r){return r.complete()}));function m(r){return r?function(r){return new v((function(t){return r.schedule((function(){return t.complete()}))}))}(r):E}var g=function(){function r(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return r.prototype=Object.create(Error.prototype),r}();function S(r){return function(t){return 0===r?m():t.lift(new O(r))}}var O=function(){function r(r){if(this.total=r,this.total<0)throw new g}return r.prototype.call=function(r,t){return t.subscribe(new x(r,this.total))},r}(),x=function(r){function t(t,n){var e=r.call(this,t)||this;return e.total=n,e.count=0,e}return n(t,r),t.prototype._next=function(r){var t=this.total,n=++this.count;n<=t&&(this.destination.next(r),n===t&&(this.destination.complete(),this.unsubscribe()))},t}(l),P="http://localhost:3000";function T(r,t){var n=r+"__"+Math.random().toString(36).substr(3),e={requestId:n,type:r,data:t};return new v((function(r){var t=window.opener||window.parent,o=function(){t.postMessage({requestId:n,type:"cancellation",data:null},P)};return window.addEventListener("message",(function(t){var e=t.data;if(e&&e.requestId===n){if(e.complete)return r.complete(),void o();if(e.error)return r.error(e.data),void o();r.next(e.data)}})),t.postMessage(e,P),o}))}r.getActivatedRoute=function(){return T("active-route",{}).toPromise()},r.graphQlMutation=function(r,t){var n=T("graphql-mutation",{document:r,variables:t});return{then:function(){for(var r,t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(r=n.pipe(S(1)).toPromise()).then.apply(r,t)},stream:n}},r.graphQlQuery=function(r,t,n){var e=T("graphql-query",{document:r,variables:t,fetchPolicy:n});return{then:function(){for(var r,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(r=e.pipe(S(1)).toPromise()).then.apply(r,t)},stream:e}},r.notify=function(r){T("notification",r).toPromise()},r.setTargetOrigin=function(r){P=r},Object.defineProperty(r,"__esModule",{value:!0})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vendure/ui-devkit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "A library for authoring Vendure Admin UI extensions",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vendure",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"@angular/cli": "12.2.2",
|
|
41
41
|
"@angular/compiler": "12.2.2",
|
|
42
42
|
"@angular/compiler-cli": "12.2.2",
|
|
43
|
-
"@vendure/admin-ui": "^1.
|
|
44
|
-
"@vendure/common": "^1.
|
|
43
|
+
"@vendure/admin-ui": "^1.4.2",
|
|
44
|
+
"@vendure/common": "^1.4.2",
|
|
45
45
|
"chalk": "^4.1.0",
|
|
46
46
|
"chokidar": "^3.5.1",
|
|
47
47
|
"fs-extra": "^10.0.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@rollup/plugin-node-resolve": "^11.2.0",
|
|
53
53
|
"@types/fs-extra": "^9.0.8",
|
|
54
54
|
"@types/glob": "^7.1.3",
|
|
55
|
-
"@vendure/core": "^1.
|
|
55
|
+
"@vendure/core": "^1.4.2",
|
|
56
56
|
"rimraf": "^3.0.2",
|
|
57
57
|
"rollup": "^2.40.0",
|
|
58
58
|
"rollup-plugin-terser": "^7.0.2",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"tslib": "^2.1.0",
|
|
61
61
|
"typescript": "4.3.5"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "0418d311a406ce475d83b96ff96c100e8b468cc6"
|
|
64
64
|
}
|