@shoper/phoenix_design_system 0.0.1 → 0.1.0

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