@shoper/phoenix_design_system 0.1.0 → 0.1.1
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/build/cjs/external/tslib/tslib.es6.js +48 -0
- package/build/cjs/external/tslib/tslib.es6.js.map +1 -0
- package/build/cjs/packages/phoenix/src/context/context_consumer_controller.js +32 -0
- package/build/cjs/packages/phoenix/src/context/context_consumer_controller.js.map +1 -0
- package/build/cjs/packages/phoenix/src/context/context_consumer_messages_names.js +10 -0
- package/build/cjs/packages/phoenix/src/context/context_consumer_messages_names.js.map +1 -0
- package/build/cjs/packages/phoenix/src/context/context_provider_controller.js +39 -0
- package/build/cjs/packages/phoenix/src/context/context_provider_controller.js.map +1 -0
- package/build/cjs/packages/phoenix/src/hello_button.js +51 -0
- package/build/cjs/packages/phoenix/src/hello_button.js.map +1 -0
- package/build/cjs/packages/phoenix/src/index.js +19 -0
- package/build/cjs/packages/phoenix/src/index.js.map +1 -0
- package/build/cjs/packages/star_core/build/esm/external/tslib/tslib.es6.js +35 -0
- package/build/cjs/packages/star_core/build/esm/external/tslib/tslib.es6.js.map +1 -0
- package/build/cjs/packages/star_core/build/esm/packages/star_core/src/classes/values_container/values_container.js +66 -0
- package/build/cjs/packages/star_core/build/esm/packages/star_core/src/classes/values_container/values_container.js.map +1 -0
- package/build/cjs/packages/star_core/build/esm/packages/star_core/src/classes/values_container/values_container_error.js +11 -0
- package/build/cjs/packages/star_core/build/esm/packages/star_core/src/classes/values_container/values_container_error.js.map +1 -0
- package/build/cjs/packages/star_core/build/esm/packages/star_core/src/core/errors/app_error.js +20 -0
- package/build/cjs/packages/star_core/build/esm/packages/star_core/src/core/errors/app_error.js.map +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
/******************************************************************************
|
|
6
|
+
Copyright (c) Microsoft Corporation.
|
|
7
|
+
|
|
8
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
9
|
+
purpose with or without fee is hereby granted.
|
|
10
|
+
|
|
11
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
12
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
13
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
14
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
15
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
16
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
17
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
18
|
+
***************************************************************************** */
|
|
19
|
+
|
|
20
|
+
function __decorate(decorators, target, key, desc) {
|
|
21
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
22
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
23
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
24
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function __metadata(metadataKey, metadataValue) {
|
|
28
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
32
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
33
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
34
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
38
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
39
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
40
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
41
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
exports.__classPrivateFieldGet = __classPrivateFieldGet;
|
|
45
|
+
exports.__classPrivateFieldSet = __classPrivateFieldSet;
|
|
46
|
+
exports.__decorate = __decorate;
|
|
47
|
+
exports.__metadata = __metadata;
|
|
48
|
+
//# sourceMappingURL=tslib.es6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib_es6 = require('../../../../external/tslib/tslib.es6.js');
|
|
6
|
+
require('lit');
|
|
7
|
+
var context_consumer_messages_names = require('./context_consumer_messages_names.js');
|
|
8
|
+
|
|
9
|
+
var _ContextConsumerController_host;
|
|
10
|
+
class ContextConsumerController {
|
|
11
|
+
constructor(host) {
|
|
12
|
+
_ContextConsumerController_host.set(this, void 0);
|
|
13
|
+
tslib_es6.__classPrivateFieldSet(this, _ContextConsumerController_host, host, "f");
|
|
14
|
+
tslib_es6.__classPrivateFieldGet(this, _ContextConsumerController_host, "f").addController(this);
|
|
15
|
+
}
|
|
16
|
+
consume(key) {
|
|
17
|
+
const consumeEvent = new CustomEvent(context_consumer_messages_names.WEB_COMPONENT_CONTEXT_EVENTS.valueRequested, {
|
|
18
|
+
bubbles: true,
|
|
19
|
+
cancelable: true,
|
|
20
|
+
detail: { key }
|
|
21
|
+
});
|
|
22
|
+
tslib_es6.__classPrivateFieldGet(this, _ContextConsumerController_host, "f").dispatchEvent(consumeEvent);
|
|
23
|
+
return consumeEvent.detail[key];
|
|
24
|
+
}
|
|
25
|
+
// Added to fix typescript error
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
27
|
+
hostConnected() { }
|
|
28
|
+
}
|
|
29
|
+
_ContextConsumerController_host = new WeakMap();
|
|
30
|
+
|
|
31
|
+
exports.ContextConsumerController = ContextConsumerController;
|
|
32
|
+
//# sourceMappingURL=context_consumer_controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,yCAA6C;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const WEB_COMPONENT_CONTEXT_EVENTS = {
|
|
6
|
+
valueRequested: 'value-requested'
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
exports.WEB_COMPONENT_CONTEXT_EVENTS = WEB_COMPONENT_CONTEXT_EVENTS;
|
|
10
|
+
//# sourceMappingURL=context_consumer_messages_names.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib_es6 = require('../../../../external/tslib/tslib.es6.js');
|
|
6
|
+
require('lit');
|
|
7
|
+
var context_consumer_messages_names = require('./context_consumer_messages_names.js');
|
|
8
|
+
var values_container = require('../../../star_core/build/esm/packages/star_core/src/classes/values_container/values_container.js');
|
|
9
|
+
|
|
10
|
+
var _ContextProviderController_host, _ContextProviderController_contextValues, _ContextProviderController_handleRequestedValue;
|
|
11
|
+
class ContextProviderController {
|
|
12
|
+
constructor(host) {
|
|
13
|
+
_ContextProviderController_host.set(this, void 0);
|
|
14
|
+
_ContextProviderController_contextValues.set(this, new values_container.ValuesContainer());
|
|
15
|
+
_ContextProviderController_handleRequestedValue.set(this, (event) => {
|
|
16
|
+
const customEvent = event;
|
|
17
|
+
const valueKey = customEvent.detail.key;
|
|
18
|
+
if (!tslib_es6.__classPrivateFieldGet(this, _ContextProviderController_contextValues, "f").has(valueKey))
|
|
19
|
+
return;
|
|
20
|
+
customEvent.detail[valueKey] = tslib_es6.__classPrivateFieldGet(this, _ContextProviderController_contextValues, "f").get(valueKey);
|
|
21
|
+
event.stopPropagation();
|
|
22
|
+
});
|
|
23
|
+
tslib_es6.__classPrivateFieldSet(this, _ContextProviderController_host, host, "f");
|
|
24
|
+
tslib_es6.__classPrivateFieldGet(this, _ContextProviderController_host, "f").addController(this);
|
|
25
|
+
}
|
|
26
|
+
provide(key, value) {
|
|
27
|
+
tslib_es6.__classPrivateFieldGet(this, _ContextProviderController_contextValues, "f").add(key, value);
|
|
28
|
+
}
|
|
29
|
+
hostConnected() {
|
|
30
|
+
tslib_es6.__classPrivateFieldGet(this, _ContextProviderController_host, "f").addEventListener(context_consumer_messages_names.WEB_COMPONENT_CONTEXT_EVENTS.valueRequested, tslib_es6.__classPrivateFieldGet(this, _ContextProviderController_handleRequestedValue, "f"));
|
|
31
|
+
}
|
|
32
|
+
hostDisconnected() {
|
|
33
|
+
tslib_es6.__classPrivateFieldGet(this, _ContextProviderController_host, "f").removeEventListener(context_consumer_messages_names.WEB_COMPONENT_CONTEXT_EVENTS.valueRequested, tslib_es6.__classPrivateFieldGet(this, _ContextProviderController_handleRequestedValue, "f"));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
_ContextProviderController_host = new WeakMap(), _ContextProviderController_contextValues = new WeakMap(), _ContextProviderController_handleRequestedValue = new WeakMap();
|
|
37
|
+
|
|
38
|
+
exports.ContextProviderController = ContextProviderController;
|
|
39
|
+
//# sourceMappingURL=context_provider_controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,yCAA6C;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib_es6 = require('../../../external/tslib/tslib.es6.js');
|
|
6
|
+
var lit = require('lit');
|
|
7
|
+
var decorators = require('lit/decorators');
|
|
8
|
+
|
|
9
|
+
exports.HelloButton = class HelloButton extends lit.LitElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.greeting = 'Hello';
|
|
13
|
+
this.planet = 'World';
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
super.render();
|
|
17
|
+
return lit.html `
|
|
18
|
+
<span @click="${this.togglePlanet}"
|
|
19
|
+
>${this.greeting}
|
|
20
|
+
<span class="planet">${this.planet}</span>
|
|
21
|
+
<slot></slot>
|
|
22
|
+
</span>
|
|
23
|
+
`;
|
|
24
|
+
}
|
|
25
|
+
togglePlanet() {
|
|
26
|
+
this.planet = this.planet === 'World' ? 'Mars' : 'World';
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.HelloButton.moduleName = 'my-element';
|
|
30
|
+
exports.HelloButton.styles = lit.css `
|
|
31
|
+
:host {
|
|
32
|
+
display: inline-block;
|
|
33
|
+
padding: 10px;
|
|
34
|
+
background: lightgray;
|
|
35
|
+
}
|
|
36
|
+
.planet {
|
|
37
|
+
color: var(--planet-color, blue);
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
40
|
+
tslib_es6.__decorate([
|
|
41
|
+
decorators.state(),
|
|
42
|
+
tslib_es6.__metadata("design:type", Object)
|
|
43
|
+
], exports.HelloButton.prototype, "greeting", void 0);
|
|
44
|
+
tslib_es6.__decorate([
|
|
45
|
+
decorators.state(),
|
|
46
|
+
tslib_es6.__metadata("design:type", Object)
|
|
47
|
+
], exports.HelloButton.prototype, "planet", void 0);
|
|
48
|
+
exports.HelloButton = tslib_es6.__decorate([
|
|
49
|
+
decorators.customElement('hello-button')
|
|
50
|
+
], exports.HelloButton);
|
|
51
|
+
//# sourceMappingURL=hello_button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,sCAA0C;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var hello_button = require('./hello_button.js');
|
|
6
|
+
var context_provider_controller = require('./context/context_provider_controller.js');
|
|
7
|
+
var context_consumer_controller = require('./context/context_consumer_controller.js');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
Object.defineProperty(exports, 'HelloButton', {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () {
|
|
14
|
+
return hello_button.HelloButton;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
exports.ContextProviderController = context_provider_controller.ContextProviderController;
|
|
18
|
+
exports.ContextConsumerController = context_consumer_controller.ContextConsumerController;
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
/******************************************************************************
|
|
6
|
+
Copyright (c) Microsoft Corporation.
|
|
7
|
+
|
|
8
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
9
|
+
purpose with or without fee is hereby granted.
|
|
10
|
+
|
|
11
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
12
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
13
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
14
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
15
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
16
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
17
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
18
|
+
***************************************************************************** */
|
|
19
|
+
|
|
20
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
21
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
22
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
23
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
27
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
28
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
29
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
30
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
exports.__classPrivateFieldGet = __classPrivateFieldGet;
|
|
34
|
+
exports.__classPrivateFieldSet = __classPrivateFieldSet;
|
|
35
|
+
//# sourceMappingURL=tslib.es6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
|
|
6
|
+
var values_container_error = require('./values_container_error.js');
|
|
7
|
+
|
|
8
|
+
var _ValuesContainer_valuesContainer, _ValuesContainer_settings;
|
|
9
|
+
class ValuesContainer {
|
|
10
|
+
constructor(settings = {}) {
|
|
11
|
+
_ValuesContainer_valuesContainer.set(this, {});
|
|
12
|
+
_ValuesContainer_settings.set(this, {
|
|
13
|
+
silentMode: true,
|
|
14
|
+
allowOverwrite: false
|
|
15
|
+
});
|
|
16
|
+
tslib_es6.__classPrivateFieldSet(this, _ValuesContainer_settings, {
|
|
17
|
+
...tslib_es6.__classPrivateFieldGet(this, _ValuesContainer_settings, "f"),
|
|
18
|
+
...settings
|
|
19
|
+
}, "f");
|
|
20
|
+
}
|
|
21
|
+
add(key, value) {
|
|
22
|
+
if (this.has(key) && !tslib_es6.__classPrivateFieldGet(this, _ValuesContainer_settings, "f").allowOverwrite)
|
|
23
|
+
this._handleError(new values_container_error.ValuesContainerError(`value under key [${key}] already exists`));
|
|
24
|
+
tslib_es6.__classPrivateFieldGet(this, _ValuesContainer_valuesContainer, "f")[key] = value;
|
|
25
|
+
}
|
|
26
|
+
update(key, value) {
|
|
27
|
+
if (!this.has(key))
|
|
28
|
+
this._handleError(new values_container_error.ValuesContainerError(`value under key [${key}] doesn't exist`));
|
|
29
|
+
tslib_es6.__classPrivateFieldGet(this, _ValuesContainer_valuesContainer, "f")[key] = value;
|
|
30
|
+
}
|
|
31
|
+
remove(key) {
|
|
32
|
+
if (!this.has(key))
|
|
33
|
+
this._handleError(new values_container_error.ValuesContainerError(`${key} doesn't exist, cannot be removed`));
|
|
34
|
+
delete tslib_es6.__classPrivateFieldGet(this, _ValuesContainer_valuesContainer, "f")[key];
|
|
35
|
+
}
|
|
36
|
+
has(key) {
|
|
37
|
+
return this.get(key) !== undefined;
|
|
38
|
+
}
|
|
39
|
+
get(key) {
|
|
40
|
+
return tslib_es6.__classPrivateFieldGet(this, _ValuesContainer_valuesContainer, "f")[key];
|
|
41
|
+
}
|
|
42
|
+
keys() {
|
|
43
|
+
return Object.keys(tslib_es6.__classPrivateFieldGet(this, _ValuesContainer_valuesContainer, "f"));
|
|
44
|
+
}
|
|
45
|
+
values() {
|
|
46
|
+
return Object.values(tslib_es6.__classPrivateFieldGet(this, _ValuesContainer_valuesContainer, "f"));
|
|
47
|
+
}
|
|
48
|
+
entries() {
|
|
49
|
+
return Object.entries(tslib_es6.__classPrivateFieldGet(this, _ValuesContainer_valuesContainer, "f"));
|
|
50
|
+
}
|
|
51
|
+
clear() {
|
|
52
|
+
tslib_es6.__classPrivateFieldSet(this, _ValuesContainer_valuesContainer, {}, "f");
|
|
53
|
+
}
|
|
54
|
+
size() {
|
|
55
|
+
return this.keys().length;
|
|
56
|
+
}
|
|
57
|
+
_handleError(error) {
|
|
58
|
+
if (tslib_es6.__classPrivateFieldGet(this, _ValuesContainer_settings, "f").silentMode)
|
|
59
|
+
return;
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
_ValuesContainer_valuesContainer = new WeakMap(), _ValuesContainer_settings = new WeakMap();
|
|
64
|
+
|
|
65
|
+
exports.ValuesContainer = ValuesContainer;
|
|
66
|
+
//# sourceMappingURL=values_container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var app_error = require('../../core/errors/app_error.js');
|
|
6
|
+
|
|
7
|
+
class ValuesContainerError extends app_error.AppError {
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
exports.ValuesContainerError = ValuesContainerError;
|
|
11
|
+
//# sourceMappingURL=values_container_error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
package/build/cjs/packages/star_core/build/esm/packages/star_core/src/core/errors/app_error.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
|
|
6
|
+
|
|
7
|
+
var _AppError_message, _AppError_options;
|
|
8
|
+
class AppError extends Error {
|
|
9
|
+
constructor(message, options = {}) {
|
|
10
|
+
super(message);
|
|
11
|
+
_AppError_message.set(this, void 0);
|
|
12
|
+
_AppError_options.set(this, void 0);
|
|
13
|
+
tslib_es6.__classPrivateFieldSet(this, _AppError_message, message, "f");
|
|
14
|
+
tslib_es6.__classPrivateFieldSet(this, _AppError_options, options, "f");
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
_AppError_message = new WeakMap(), _AppError_options = new WeakMap();
|
|
18
|
+
|
|
19
|
+
exports.AppError = AppError;
|
|
20
|
+
//# sourceMappingURL=app_error.js.map
|
package/build/cjs/packages/star_core/build/esm/packages/star_core/src/core/errors/app_error.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
package/package.json
CHANGED
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
"name": "@shoper/phoenix_design_system",
|
|
3
3
|
"packageManager": "yarn@3.2.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.1",
|
|
6
6
|
"description": "phoenix design system",
|
|
7
7
|
"author": "zefirek",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"source": "src/index.ts",
|
|
10
|
+
"main": "build/cjs/packages/phoenix/src/index.js",
|
|
10
11
|
"module": "build/esm/packages/phoenix/src/index.js",
|
|
11
12
|
"jsnext:main": "build/esm/packages/phoenix/src/index.js",
|
|
12
13
|
"types": "build/esm/packages/phoenix/src/index.d.ts",
|