@supersoniks/concorde 1.1.7 → 1.1.10
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/core/components/functional/configuration/configuration.d.ts +5 -0
- package/core/components/functional/configuration/configuration.js +21 -0
- package/core/components/functional/date/date.d.ts +2 -1
- package/core/components/functional/date/date.js +9 -2
- package/core/components/functional/fetch/fetch.d.ts +27 -10
- package/core/components/functional/fetch/fetch.js +27 -12
- package/core/components/functional/functional.d.ts +1 -0
- package/core/components/functional/functional.js +1 -0
- package/core/components/functional/list/list.d.ts +12 -7
- package/core/components/functional/list/list.js +55 -17
- package/core/components/functional/queue/queue.js +7 -3
- package/core/components/functional/sonic-scope/sonic-scope.d.ts +5 -0
- package/core/components/functional/sonic-scope/sonic-scope.js +20 -0
- package/core/components/functional/states/states.js +0 -2
- package/core/components/functional/submit/submit.d.ts +2 -0
- package/core/components/functional/submit/submit.js +23 -8
- package/core/components/ui/badge/badge.js +0 -1
- package/core/components/ui/button/button.d.ts +10 -2
- package/core/components/ui/button/button.js +10 -2
- package/core/components/ui/card/card-footer.d.ts +5 -0
- package/core/components/ui/card/card-footer.js +27 -0
- package/core/components/ui/card/card-header-descripton.d.ts +5 -0
- package/core/components/ui/card/card-header-descripton.js +33 -0
- package/core/components/ui/card/card-header.d.ts +8 -0
- package/core/components/ui/card/card-header.js +67 -0
- package/core/components/ui/card/card-main.d.ts +5 -0
- package/core/components/ui/card/card-main.js +29 -0
- package/core/components/ui/card/card.d.ts +12 -0
- package/core/components/ui/card/card.js +90 -0
- package/core/components/ui/form/checkbox/checkbox.d.ts +0 -2
- package/core/components/ui/form/checkbox/checkbox.js +3 -3
- package/core/components/ui/form/css/form-control.js +2 -0
- package/core/components/ui/form/fieldset/fieldset.js +1 -1
- package/core/components/ui/form/fieldset/legend-description.d.ts +5 -0
- package/core/components/ui/form/fieldset/legend-description.js +35 -0
- package/core/components/ui/form/fieldset/legend.d.ts +4 -5
- package/core/components/ui/form/fieldset/legend.js +21 -25
- package/core/components/ui/form/input/input.d.ts +1 -2
- package/core/components/ui/form/input/input.js +3 -3
- package/core/components/ui/form/textarea/textarea.d.ts +0 -1
- package/core/components/ui/form/textarea/textarea.js +2 -2
- package/core/components/ui/progress/progress.d.ts +7 -0
- package/core/components/ui/progress/progress.js +63 -0
- package/core/components/ui/table/table-caption.d.ts +5 -0
- package/core/components/ui/table/table-caption.js +24 -0
- package/core/components/ui/table/table-tbody.d.ts +5 -0
- package/core/components/ui/table/table-tbody.js +37 -0
- package/core/components/ui/table/table-td.d.ts +7 -0
- package/core/components/ui/table/table-td.js +45 -0
- package/core/components/ui/table/table-tfoot.d.ts +5 -0
- package/core/components/ui/table/table-tfoot.js +23 -0
- package/core/components/ui/table/table-th.d.ts +6 -0
- package/core/components/ui/table/table-th.js +43 -0
- package/core/components/ui/table/table-thead.d.ts +5 -0
- package/core/components/ui/table/table-thead.js +24 -0
- package/core/components/ui/table/table-tr.d.ts +5 -0
- package/core/components/ui/table/table-tr.js +24 -0
- package/core/components/ui/table/table.d.ts +16 -0
- package/core/components/ui/table/table.js +88 -0
- package/core/components/ui/theme/theme-collection/core-variables.js +2 -2
- package/core/components/ui/theme/theme-collection/dark.js +3 -2
- package/core/components/ui/theme/theme-collection/light.js +1 -0
- package/core/components/ui/ui.d.ts +3 -0
- package/core/components/ui/ui.js +3 -0
- package/core/mixins/Fetcher.d.ts +1 -4
- package/core/mixins/Fetcher.js +2 -2
- package/core/mixins/FormCheckable.d.ts +3 -2
- package/core/mixins/FormInput.d.ts +0 -1
- package/core/mixins/Subscriber.d.ts +0 -1
- package/core/mixins/Subscriber.js +0 -15
- package/core/utils/DataBindObserver.js +0 -2
- package/core/utils/Objects.d.ts +2 -1
- package/core/utils/Objects.js +8 -2
- package/core/utils/PublisherProxy.mjs +42 -12
- package/core/utils/api.js +1 -1
- package/package.json +36 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { html, LitElement, css } from "lit";
|
|
8
|
+
import { customElement } from "lit/decorators.js";
|
|
9
|
+
let TableTbody = class TableTbody extends LitElement {
|
|
10
|
+
render() {
|
|
11
|
+
return html `<tbody><slot></slot></tbody>`;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
TableTbody.styles = [
|
|
15
|
+
css `
|
|
16
|
+
:host {
|
|
17
|
+
display: contents;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
::slotted(sonic-tr:nth-child(odd)){
|
|
21
|
+
background:var(--sc-base-50);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
::slotted(sonic-tr:hover) {
|
|
25
|
+
background:var(--sc-base-100);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
::slotted(sonic-tr:not(:last-child)){
|
|
29
|
+
border-bottom:var(--sc-form-border-width) solid var(--sc-base-200) !important;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
`
|
|
33
|
+
];
|
|
34
|
+
TableTbody = __decorate([
|
|
35
|
+
customElement("sonic-tbody")
|
|
36
|
+
], TableTbody);
|
|
37
|
+
export { TableTbody };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { html, LitElement, css } from "lit";
|
|
8
|
+
import { customElement, property } from "lit/decorators.js";
|
|
9
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
10
|
+
let TableTd = class TableTd extends LitElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.colSpan = null;
|
|
14
|
+
this.rowSpan = null;
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
return html `<td
|
|
18
|
+
colspan=${ifDefined(this.colSpan)}
|
|
19
|
+
rowspan=${ifDefined(this.rowSpan)}
|
|
20
|
+
part="td"
|
|
21
|
+
><slot></slot></td>`;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
TableTd.styles = [
|
|
25
|
+
css `
|
|
26
|
+
:host {
|
|
27
|
+
display: contents;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
td {
|
|
31
|
+
text-transform:var(--sc-th-tt);
|
|
32
|
+
text-align:inherit;
|
|
33
|
+
padding:.3em .5em;
|
|
34
|
+
}`
|
|
35
|
+
];
|
|
36
|
+
__decorate([
|
|
37
|
+
property({ type: Number })
|
|
38
|
+
], TableTd.prototype, "colSpan", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
property({ type: Number })
|
|
41
|
+
], TableTd.prototype, "rowSpan", void 0);
|
|
42
|
+
TableTd = __decorate([
|
|
43
|
+
customElement("sonic-td")
|
|
44
|
+
], TableTd);
|
|
45
|
+
export { TableTd };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { html, LitElement, css } from "lit";
|
|
8
|
+
import { customElement } from "lit/decorators.js";
|
|
9
|
+
let TableTfoot = class TableTfoot extends LitElement {
|
|
10
|
+
render() {
|
|
11
|
+
return html `<tfoot><slot></slot></tfoot>`;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
TableTfoot.styles = [
|
|
15
|
+
css `
|
|
16
|
+
:host {
|
|
17
|
+
display: contents;
|
|
18
|
+
}`
|
|
19
|
+
];
|
|
20
|
+
TableTfoot = __decorate([
|
|
21
|
+
customElement("sonic-tfoot")
|
|
22
|
+
], TableTfoot);
|
|
23
|
+
export { TableTfoot };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { html, LitElement, css } from "lit";
|
|
8
|
+
import { customElement, property } from "lit/decorators.js";
|
|
9
|
+
import { styleMap } from "lit/directives/style-map.js";
|
|
10
|
+
let TableTh = class TableTh extends LitElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.align = "left";
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
const styles = {
|
|
17
|
+
textAlign: this.align,
|
|
18
|
+
};
|
|
19
|
+
return html `<th part="th" style=${styleMap(styles)} ><slot></slot></th>
|
|
20
|
+
`;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
TableTh.styles = [
|
|
24
|
+
css `
|
|
25
|
+
:host {
|
|
26
|
+
display: contents;
|
|
27
|
+
--sc-th-tt:uppercase;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
th {
|
|
31
|
+
text-transform:var(--sc-th-tt);
|
|
32
|
+
text-align:inherit;
|
|
33
|
+
padding:.3em .5em;
|
|
34
|
+
}
|
|
35
|
+
`
|
|
36
|
+
];
|
|
37
|
+
__decorate([
|
|
38
|
+
property({ type: String, reflect: true })
|
|
39
|
+
], TableTh.prototype, "align", void 0);
|
|
40
|
+
TableTh = __decorate([
|
|
41
|
+
customElement("sonic-th")
|
|
42
|
+
], TableTh);
|
|
43
|
+
export { TableTh };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { html, LitElement, css } from "lit";
|
|
8
|
+
import { customElement } from "lit/decorators.js";
|
|
9
|
+
let TableThead = class TableThead extends LitElement {
|
|
10
|
+
render() {
|
|
11
|
+
return html `<slot></slot>`;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
TableThead.styles = [
|
|
15
|
+
css `
|
|
16
|
+
:host {
|
|
17
|
+
display: table-row-group;
|
|
18
|
+
}
|
|
19
|
+
`
|
|
20
|
+
];
|
|
21
|
+
TableThead = __decorate([
|
|
22
|
+
customElement("sonic-thead")
|
|
23
|
+
], TableThead);
|
|
24
|
+
export { TableThead };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { html, LitElement, css } from "lit";
|
|
8
|
+
import { customElement } from "lit/decorators.js";
|
|
9
|
+
let TableTr = class TableTr extends LitElement {
|
|
10
|
+
render() {
|
|
11
|
+
return html `<slot></slot>`;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
TableTr.styles = [
|
|
15
|
+
css `
|
|
16
|
+
:host {
|
|
17
|
+
display: table-row;
|
|
18
|
+
}
|
|
19
|
+
`
|
|
20
|
+
];
|
|
21
|
+
TableTr = __decorate([
|
|
22
|
+
customElement("sonic-tr")
|
|
23
|
+
], TableTr);
|
|
24
|
+
export { TableTr };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import "./table-tr.ts";
|
|
3
|
+
import "./table-th.ts";
|
|
4
|
+
import "./table-td.ts";
|
|
5
|
+
import "./table-thead.ts";
|
|
6
|
+
import "./table-tbody.ts";
|
|
7
|
+
import "./table-tfoot.ts";
|
|
8
|
+
import "./table-caption.ts";
|
|
9
|
+
export declare class Table extends LitElement {
|
|
10
|
+
static styles: import("lit").CSSResult[];
|
|
11
|
+
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
12
|
+
striped: boolean;
|
|
13
|
+
sticky: boolean;
|
|
14
|
+
hover: boolean;
|
|
15
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { html, LitElement, css } from "lit";
|
|
8
|
+
import { customElement, property } from "lit/decorators.js";
|
|
9
|
+
import "./table-tr.ts";
|
|
10
|
+
import "./table-th.ts";
|
|
11
|
+
import "./table-td.ts";
|
|
12
|
+
import "./table-thead.ts";
|
|
13
|
+
import "./table-tbody.ts";
|
|
14
|
+
import "./table-tfoot.ts";
|
|
15
|
+
import "./table-caption.ts";
|
|
16
|
+
let Table = class Table extends LitElement {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments);
|
|
19
|
+
this.size = "md";
|
|
20
|
+
this.striped = false;
|
|
21
|
+
this.sticky = false;
|
|
22
|
+
this.hover = false;
|
|
23
|
+
}
|
|
24
|
+
render() {
|
|
25
|
+
return html `
|
|
26
|
+
<div class="table-container">
|
|
27
|
+
<div class="table" ?striped=${this.striped} ?hover=${this.hover} ?sticky=${this.sticky}>
|
|
28
|
+
<slot></slot>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
`;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
Table.styles = [
|
|
35
|
+
css `
|
|
36
|
+
:host {
|
|
37
|
+
--sc-table-fw: var(--sc-font-weight-base);
|
|
38
|
+
--sc-table-fst: var(--sc-font-style-base);
|
|
39
|
+
--sc-table-fs: 1rem;
|
|
40
|
+
--sc-table-th-fw: bold;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.table-container {
|
|
44
|
+
overflow-x: auto;
|
|
45
|
+
-webkit-overflow-scrolling: touch;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.table {
|
|
49
|
+
width: 100%;
|
|
50
|
+
font-size: var(--sc-table-fs);
|
|
51
|
+
display: table;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/*SIZE*/
|
|
55
|
+
:host([size="2xs"]) {
|
|
56
|
+
--sc-table-fs: 0.6rem;
|
|
57
|
+
}
|
|
58
|
+
:host([size="xs"]) {
|
|
59
|
+
--sc-table-fs: 0.75rem;
|
|
60
|
+
}
|
|
61
|
+
:host([size="sm"]) {
|
|
62
|
+
--sc-table-fs: 0.85rem;
|
|
63
|
+
}
|
|
64
|
+
:host([size="lg"]) {
|
|
65
|
+
--sc-table-fs: 1.2rem;
|
|
66
|
+
}
|
|
67
|
+
:host([size="xl"]) {
|
|
68
|
+
--sc-table-fs: 1.5rem;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
`,
|
|
72
|
+
];
|
|
73
|
+
__decorate([
|
|
74
|
+
property({ type: String, reflect: true })
|
|
75
|
+
], Table.prototype, "size", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
property({ type: Boolean, reflect: true })
|
|
78
|
+
], Table.prototype, "striped", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
property({ type: Boolean, reflect: true })
|
|
81
|
+
], Table.prototype, "sticky", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
property({ type: Boolean, reflect: true })
|
|
84
|
+
], Table.prototype, "hover", void 0);
|
|
85
|
+
Table = __decorate([
|
|
86
|
+
customElement("sonic-table")
|
|
87
|
+
], Table);
|
|
88
|
+
export { Table };
|
|
@@ -4,10 +4,10 @@ export const coreVariables = css `
|
|
|
4
4
|
/* --sc-rfs: 16px; */
|
|
5
5
|
|
|
6
6
|
/* polices*/
|
|
7
|
-
--sc-font-family-base: "
|
|
7
|
+
--sc-font-family-base: "Inter var", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
8
8
|
"Helvetica Neue", Arial, sans-serif;
|
|
9
9
|
--sc-font-weight-base: 400;
|
|
10
|
-
--sc-font-style-base:
|
|
10
|
+
--sc-font-style-base: normal;
|
|
11
11
|
|
|
12
12
|
--sc-headings-font-family: var(--sc-font-family-base);
|
|
13
13
|
--sc-headings-font-style: var(--sc-font-family-base);
|
|
@@ -12,8 +12,9 @@ const darkCss = css `
|
|
|
12
12
|
--sc-warning-content: var(--sc-dark-warning-content, #382800);
|
|
13
13
|
--sc-success-content: var(--sc-dark-success-content, #003320);
|
|
14
14
|
|
|
15
|
-
--sc-base: var(--sc-dark-base, #
|
|
16
|
-
--sc-base-
|
|
15
|
+
--sc-base: var(--sc-dark-base, #1d2634);
|
|
16
|
+
--sc-base-50: var(--sc-dark-base-50, #1f2937);
|
|
17
|
+
--sc-base-100: var(--sc-dark-base-100, #252C36);
|
|
17
18
|
--sc-base-200: var(--sc-dark-base-200, #2c3543);
|
|
18
19
|
--sc-base-300: var(--sc-dark-base-300, #38414e);
|
|
19
20
|
--sc-base-400: var(--sc-dark-base-400, #515964);
|
|
@@ -2,6 +2,7 @@ import "./theme/theme";
|
|
|
2
2
|
import "./badge/badge";
|
|
3
3
|
import "./button/button";
|
|
4
4
|
import "./link/link";
|
|
5
|
+
import "./progress/progress";
|
|
5
6
|
import "./form/input/input";
|
|
6
7
|
import "./form/checkbox/checkbox";
|
|
7
8
|
import "./form/radio/radio";
|
|
@@ -25,3 +26,5 @@ import "./toast/toast";
|
|
|
25
26
|
import "./tooltip/tooltip";
|
|
26
27
|
import "./pop/pop";
|
|
27
28
|
import "./divider/divider";
|
|
29
|
+
import "./card/card";
|
|
30
|
+
import "./table/table";
|
package/core/components/ui/ui.js
CHANGED
|
@@ -4,6 +4,7 @@ import "./theme/theme";
|
|
|
4
4
|
import "./badge/badge";
|
|
5
5
|
import "./button/button";
|
|
6
6
|
import "./link/link";
|
|
7
|
+
import "./progress/progress";
|
|
7
8
|
// FORMS
|
|
8
9
|
import "./form/input/input";
|
|
9
10
|
import "./form/checkbox/checkbox";
|
|
@@ -32,3 +33,5 @@ import "./toast/toast";
|
|
|
32
33
|
import "./tooltip/tooltip";
|
|
33
34
|
import "./pop/pop";
|
|
34
35
|
import "./divider/divider";
|
|
36
|
+
import "./card/card";
|
|
37
|
+
import "./table/table";
|
package/core/mixins/Fetcher.d.ts
CHANGED
|
@@ -58,10 +58,7 @@ declare const Fetcher: <T extends Constructor<SubscriberInterface>>(superClass:
|
|
|
58
58
|
noShadowDom: string | null;
|
|
59
59
|
debug: HTMLElement | null;
|
|
60
60
|
defferedDebug: boolean | null;
|
|
61
|
-
|
|
62
|
-
dispatchEvent(event: Event): void; /**
|
|
63
|
-
* IObserver est l'intersection observer qui permet de charger les données au scroll si l'attribut lazyload est renseigné
|
|
64
|
-
*/
|
|
61
|
+
dispatchEvent(event: Event): void;
|
|
65
62
|
setAttribute(name: string, value: string): void;
|
|
66
63
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
67
64
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
|
package/core/mixins/Fetcher.js
CHANGED
|
@@ -56,6 +56,7 @@ const Fetcher = (superClass) => {
|
|
|
56
56
|
return __awaiter(this, void 0, void 0, function* () {
|
|
57
57
|
if (!this.isFetchEnabled)
|
|
58
58
|
return;
|
|
59
|
+
this.api = new API(this.getApiConfiguration());
|
|
59
60
|
if (!this.api)
|
|
60
61
|
return;
|
|
61
62
|
if (!this.dataProvider)
|
|
@@ -78,7 +79,7 @@ const Fetcher = (superClass) => {
|
|
|
78
79
|
if (hasLoader)
|
|
79
80
|
Loader.hide();
|
|
80
81
|
if (this.key) {
|
|
81
|
-
data = Objects.traverse(data, this.key.split("."));
|
|
82
|
+
data = Objects.traverse(data, this.key.split("."), true);
|
|
82
83
|
}
|
|
83
84
|
this.props = data;
|
|
84
85
|
this.dispatchEvent(new CustomEvent("load", { detail: this }));
|
|
@@ -101,7 +102,6 @@ const Fetcher = (superClass) => {
|
|
|
101
102
|
}
|
|
102
103
|
super.connectedCallback();
|
|
103
104
|
this.key = this.getAncestorAttributeValue("key");
|
|
104
|
-
this.api = new API(this.getApiConfiguration());
|
|
105
105
|
if (this.props) {
|
|
106
106
|
this.publisher.set(this.props);
|
|
107
107
|
}
|
|
@@ -55,7 +55,6 @@ declare const Form: <T extends Constructor<FormElementInterface>>(superClass: T)
|
|
|
55
55
|
noShadowDom: string | null;
|
|
56
56
|
debug: HTMLElement | null;
|
|
57
57
|
defferedDebug: boolean | null;
|
|
58
|
-
makeShadow(props: Record<string, any>, value: any): any;
|
|
59
58
|
dispatchEvent(event: Event): void;
|
|
60
59
|
setAttribute(name: string, value: string): void;
|
|
61
60
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
@@ -65,7 +64,9 @@ declare const Form: <T extends Constructor<FormElementInterface>>(superClass: T)
|
|
|
65
64
|
connectedCallback(): void;
|
|
66
65
|
requestUpdate(): void;
|
|
67
66
|
getAttribute(name: string): string;
|
|
68
|
-
hasAttribute(attributeName: String): boolean;
|
|
67
|
+
hasAttribute(attributeName: String): boolean; /**
|
|
68
|
+
* comme radio,mais peut être désélectionné après sélection
|
|
69
|
+
*/
|
|
69
70
|
disconnectedCallback(): void;
|
|
70
71
|
};
|
|
71
72
|
} & T;
|
|
@@ -31,7 +31,6 @@ declare const Form: <T extends Constructor<FormElementInterface>>(superClass: T)
|
|
|
31
31
|
noShadowDom: string | null;
|
|
32
32
|
debug: HTMLElement | null;
|
|
33
33
|
defferedDebug: boolean | null;
|
|
34
|
-
makeShadow(props: Record<string, any>, value: any): any;
|
|
35
34
|
dispatchEvent(event: Event): void;
|
|
36
35
|
setAttribute(name: string, value: string): void;
|
|
37
36
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
@@ -12,7 +12,6 @@ export interface SubscriberInterface {
|
|
|
12
12
|
noShadowDom: string | null;
|
|
13
13
|
debug: HTMLElement | null;
|
|
14
14
|
defferedDebug: boolean | null;
|
|
15
|
-
makeShadow(props: Record<string, any>, value: any): any;
|
|
16
15
|
dispatchEvent(event: Event): void;
|
|
17
16
|
setAttribute(name: string, value: string): void;
|
|
18
17
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -92,21 +92,6 @@ const Subscriber = (superClass) => {
|
|
|
92
92
|
this.onAssign = null;
|
|
93
93
|
this.args = args;
|
|
94
94
|
}
|
|
95
|
-
/**
|
|
96
|
-
* retourne un objet contenant les propriétés de value + celle de props si elle ne sont pas déjà dans value.
|
|
97
|
-
*/
|
|
98
|
-
makeShadow(props, value) {
|
|
99
|
-
if (typeof value == "object" && value !== null) {
|
|
100
|
-
let newValue = Array.isArray(value) ? [] : {};
|
|
101
|
-
Object.assign(newValue, value);
|
|
102
|
-
value = newValue;
|
|
103
|
-
for (let key in props) {
|
|
104
|
-
if (!value[key])
|
|
105
|
-
value[key] = props[key];
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
return value;
|
|
109
|
-
}
|
|
110
95
|
/**
|
|
111
96
|
* va de parent en parent pour trouver un attribut
|
|
112
97
|
* @param attributeName nom de l'attribut
|
|
@@ -15,12 +15,10 @@ export default class DataBindObserver {
|
|
|
15
15
|
return;
|
|
16
16
|
this.enabled = false;
|
|
17
17
|
Array.from(DataBindObserver.observedElements.keys()).forEach((k) => DataBindObserver.unObserve(k));
|
|
18
|
-
console.log("disabled");
|
|
19
18
|
}
|
|
20
19
|
static observe(element) {
|
|
21
20
|
if (!DataBindObserver.enabled)
|
|
22
21
|
return;
|
|
23
|
-
console.log("Observe");
|
|
24
22
|
if (DataBindObserver.observedElements.has(element))
|
|
25
23
|
return;
|
|
26
24
|
let obs = new MutationObserver(DataBindObserver.onMutation);
|
package/core/utils/Objects.d.ts
CHANGED
|
@@ -17,7 +17,8 @@ declare class Objects {
|
|
|
17
17
|
static isUndefindOrNull(object: any): boolean;
|
|
18
18
|
/**
|
|
19
19
|
* traverse l'objet pour obtenir la valeur a l'adresse donnée via le tableau de clés pathArray.
|
|
20
|
+
* Si extendValues = true, les propriétés des objets parents sont copiées au fur et a mesure de la descente dans la hierarchie, avant l'assignation des propriétés de l'objet lui même.
|
|
20
21
|
*/
|
|
21
|
-
static traverse(obj: any, pathArray: string[]): any;
|
|
22
|
+
static traverse(obj: any, pathArray: string[], extendValues?: boolean): any;
|
|
22
23
|
}
|
|
23
24
|
export default Objects;
|
package/core/utils/Objects.js
CHANGED
|
@@ -48,14 +48,20 @@ class Objects {
|
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
50
|
* traverse l'objet pour obtenir la valeur a l'adresse donnée via le tableau de clés pathArray.
|
|
51
|
+
* Si extendValues = true, les propriétés des objets parents sont copiées au fur et a mesure de la descente dans la hierarchie, avant l'assignation des propriétés de l'objet lui même.
|
|
51
52
|
*/
|
|
52
|
-
static traverse(obj, pathArray) {
|
|
53
|
+
static traverse(obj, pathArray, extendValues = false) {
|
|
53
54
|
for (let key of pathArray) {
|
|
54
55
|
let newObj = obj[key];
|
|
55
56
|
if (newObj === undefined) {
|
|
56
57
|
return undefined;
|
|
57
58
|
}
|
|
58
|
-
|
|
59
|
+
if (extendValues && Objects.isObject(newObj)) {
|
|
60
|
+
obj = Object.assign(Array.isArray(newObj) ? [] : {}, obj, newObj);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
obj = obj[key];
|
|
64
|
+
}
|
|
59
65
|
}
|
|
60
66
|
return obj;
|
|
61
67
|
}
|