@omegagrid/core 0.6.81 → 0.6.83
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/model/component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAO,MAAM,KAAK,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/model/component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAO,MAAM,KAAK,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAKrD,8BAAsB,cAAc,CAAC,MAAM,SAAS,cAAc,GAAG,cAAc,CAAE,SAAQ,UAAW,YAAW,SAAS;;IAE3H,MAAM,CAAC,MAAM,EAAE,cAAc,CAU3B;IAEF,IAAI,eAAe,IAC8D,UAAU,CAC1F;IAED,IAAI,oBAAoB,IAC6D,cAAc,CAClG;IAED,OAAO,CAAC,MAAM,CAAS;IACvB,IACI,KAAK,IAIM,MAAM,CAFpB;IAED,IAAI,KAAK,CAAC,GAAG,EAAE,MAAM,EAIpB;IAED,QAAQ,IAAI,MAAM;IAIlB,QAAQ,CAAC,KAAK,EAAE,MAAM;IAItB,iBAAiB,IAAI,IAAI;IAKzB,oBAAoB,IAAI,IAAI;IAS5B,kBAAkB;CAIlB"}
|
package/dist/model/component.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-this-alias */
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
2
8
|
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
9
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
10
|
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");
|
|
@@ -8,6 +14,7 @@ var _OmegaComponent_debounceDispatchStateEvent;
|
|
|
8
14
|
import { LitElement, css } from "lit";
|
|
9
15
|
import { debounce } from "ts-debounce";
|
|
10
16
|
import { dom } from "../common";
|
|
17
|
+
import { property } from "lit/decorators.js";
|
|
11
18
|
export class OmegaComponent extends LitElement {
|
|
12
19
|
constructor() {
|
|
13
20
|
super(...arguments);
|
|
@@ -25,8 +32,9 @@ export class OmegaComponent extends LitElement {
|
|
|
25
32
|
return this._state;
|
|
26
33
|
}
|
|
27
34
|
set state(val) {
|
|
35
|
+
const oldState = this._state;
|
|
28
36
|
this._state = val;
|
|
29
|
-
this.requestUpdate();
|
|
37
|
+
this.requestUpdate('state', oldState);
|
|
30
38
|
}
|
|
31
39
|
getState() {
|
|
32
40
|
return this._state;
|
|
@@ -58,4 +66,7 @@ OmegaComponent.styles = css `
|
|
|
58
66
|
font-family: var(--og-font-family);
|
|
59
67
|
}
|
|
60
68
|
`;
|
|
69
|
+
__decorate([
|
|
70
|
+
property({ type: Object, noAccessor: true })
|
|
71
|
+
], OmegaComponent.prototype, "state", null);
|
|
61
72
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../src/model/component.ts"],"names":[],"mapp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AAC,MAAM,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,iBAAiB;QAChB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;IAC5C,CAAC;IAED,oBAAoB;QACnB,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,IAAI,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC;IAC/C,CAAC;IAMD,kBAAkB;QACjB,uBAAA,IAAI,kDAA4B,MAAhC,IAAI,CAA8B,CAAC;IACpC,CAAC;;;AAxDM,qBAAM,GAAmB,GAAG,CAAA;;;;;;;;;;EAUlC,AAVY,CAUX;AAYF;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAC,CAAC;2CAG1C","sourcesContent":["/* eslint-disable @typescript-eslint/no-this-alias */\n\nimport { CSSResultGroup, LitElement, css } from \"lit\";\nimport { ComponentState, Statefull } from \"../types\";\nimport { debounce } from \"ts-debounce\";\nimport { dom } from \"../common\";\nimport { property } from \"lit/decorators.js\";\n\nexport abstract class OmegaComponent<TState extends ComponentState = ComponentState> extends LitElement implements Statefull {\n\n\tstatic styles: CSSResultGroup = css`\n\t\t* {\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\t:host {\n\t\t\tdisplay: block;\n\t\t\tfont-size: var(--og-font-size);\n\t\t\tfont-family: var(--og-font-family);\n\t\t}\n\t`;\n\n\tget parentComponent() {\n\t\treturn dom.findParent(this, (elm: HTMLElement) => elm instanceof LitElement) as LitElement;\n\t}\n\n\tget parentOmegaComponent() {\n\t\treturn dom.findParent(this, (elm: HTMLElement) => elm instanceof OmegaComponent) as OmegaComponent;\n\t}\n\n\tprivate _state: TState;\n\t@property({type: Object, noAccessor: true})\n\tget state() {\n\t\treturn this._state;\n\t}\n\n\tset state(val: TState) {\n\t\tconst oldState = this._state;\n\t\tthis._state = val;\n\t\tthis.requestUpdate('state', oldState);\n\t}\n\n\tgetState(): TState {\n\t\treturn this._state;\n\t}\n\n\tsetState(state: TState) {\n\t\tthis._state = state;\n\t}\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback();\n\t\tthis.dispatchEvent(new Event('connected'));\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tsuper.disconnectedCallback();\n\t\tthis.dispatchEvent(new Event('disconnected'));\n\t}\n\n\t#debounceDispatchStateEvent = debounce(() => {\n\t\tthis.dispatchEvent(new Event('state', {bubbles: true, composed: true}));\n\t});\n\t\n\tdispatchStateEvent() {\n\t\tthis.#debounceDispatchStateEvent();\n\t}\n\n}"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omegagrid/core",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.83",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "Core components",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@fortawesome/fontawesome-svg-core": "6.4.2",
|
|
39
|
-
"@omegagrid/localize": "^0.6.
|
|
39
|
+
"@omegagrid/localize": "^0.6.83",
|
|
40
40
|
"@riovir/wc-fontawesome": "^0.1.9",
|
|
41
41
|
"color": "^4.2.3",
|
|
42
42
|
"date-fns": "^3.2.0",
|