@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.
Files changed (76) hide show
  1. package/core/components/functional/configuration/configuration.d.ts +5 -0
  2. package/core/components/functional/configuration/configuration.js +21 -0
  3. package/core/components/functional/date/date.d.ts +2 -1
  4. package/core/components/functional/date/date.js +9 -2
  5. package/core/components/functional/fetch/fetch.d.ts +27 -10
  6. package/core/components/functional/fetch/fetch.js +27 -12
  7. package/core/components/functional/functional.d.ts +1 -0
  8. package/core/components/functional/functional.js +1 -0
  9. package/core/components/functional/list/list.d.ts +12 -7
  10. package/core/components/functional/list/list.js +55 -17
  11. package/core/components/functional/queue/queue.js +7 -3
  12. package/core/components/functional/sonic-scope/sonic-scope.d.ts +5 -0
  13. package/core/components/functional/sonic-scope/sonic-scope.js +20 -0
  14. package/core/components/functional/states/states.js +0 -2
  15. package/core/components/functional/submit/submit.d.ts +2 -0
  16. package/core/components/functional/submit/submit.js +23 -8
  17. package/core/components/ui/badge/badge.js +0 -1
  18. package/core/components/ui/button/button.d.ts +10 -2
  19. package/core/components/ui/button/button.js +10 -2
  20. package/core/components/ui/card/card-footer.d.ts +5 -0
  21. package/core/components/ui/card/card-footer.js +27 -0
  22. package/core/components/ui/card/card-header-descripton.d.ts +5 -0
  23. package/core/components/ui/card/card-header-descripton.js +33 -0
  24. package/core/components/ui/card/card-header.d.ts +8 -0
  25. package/core/components/ui/card/card-header.js +67 -0
  26. package/core/components/ui/card/card-main.d.ts +5 -0
  27. package/core/components/ui/card/card-main.js +29 -0
  28. package/core/components/ui/card/card.d.ts +12 -0
  29. package/core/components/ui/card/card.js +90 -0
  30. package/core/components/ui/form/checkbox/checkbox.d.ts +0 -2
  31. package/core/components/ui/form/checkbox/checkbox.js +3 -3
  32. package/core/components/ui/form/css/form-control.js +2 -0
  33. package/core/components/ui/form/fieldset/fieldset.js +1 -1
  34. package/core/components/ui/form/fieldset/legend-description.d.ts +5 -0
  35. package/core/components/ui/form/fieldset/legend-description.js +35 -0
  36. package/core/components/ui/form/fieldset/legend.d.ts +4 -5
  37. package/core/components/ui/form/fieldset/legend.js +21 -25
  38. package/core/components/ui/form/input/input.d.ts +1 -2
  39. package/core/components/ui/form/input/input.js +3 -3
  40. package/core/components/ui/form/textarea/textarea.d.ts +0 -1
  41. package/core/components/ui/form/textarea/textarea.js +2 -2
  42. package/core/components/ui/progress/progress.d.ts +7 -0
  43. package/core/components/ui/progress/progress.js +63 -0
  44. package/core/components/ui/table/table-caption.d.ts +5 -0
  45. package/core/components/ui/table/table-caption.js +24 -0
  46. package/core/components/ui/table/table-tbody.d.ts +5 -0
  47. package/core/components/ui/table/table-tbody.js +37 -0
  48. package/core/components/ui/table/table-td.d.ts +7 -0
  49. package/core/components/ui/table/table-td.js +45 -0
  50. package/core/components/ui/table/table-tfoot.d.ts +5 -0
  51. package/core/components/ui/table/table-tfoot.js +23 -0
  52. package/core/components/ui/table/table-th.d.ts +6 -0
  53. package/core/components/ui/table/table-th.js +43 -0
  54. package/core/components/ui/table/table-thead.d.ts +5 -0
  55. package/core/components/ui/table/table-thead.js +24 -0
  56. package/core/components/ui/table/table-tr.d.ts +5 -0
  57. package/core/components/ui/table/table-tr.js +24 -0
  58. package/core/components/ui/table/table.d.ts +16 -0
  59. package/core/components/ui/table/table.js +88 -0
  60. package/core/components/ui/theme/theme-collection/core-variables.js +2 -2
  61. package/core/components/ui/theme/theme-collection/dark.js +3 -2
  62. package/core/components/ui/theme/theme-collection/light.js +1 -0
  63. package/core/components/ui/ui.d.ts +3 -0
  64. package/core/components/ui/ui.js +3 -0
  65. package/core/mixins/Fetcher.d.ts +1 -4
  66. package/core/mixins/Fetcher.js +2 -2
  67. package/core/mixins/FormCheckable.d.ts +3 -2
  68. package/core/mixins/FormInput.d.ts +0 -1
  69. package/core/mixins/Subscriber.d.ts +0 -1
  70. package/core/mixins/Subscriber.js +0 -15
  71. package/core/utils/DataBindObserver.js +0 -2
  72. package/core/utils/Objects.d.ts +2 -1
  73. package/core/utils/Objects.js +8 -2
  74. package/core/utils/PublisherProxy.mjs +42 -12
  75. package/core/utils/api.js +1 -1
  76. package/package.json +36 -1
@@ -0,0 +1,5 @@
1
+ import { LitElement } from "lit";
2
+ export declare class TableTbody extends LitElement {
3
+ static styles: import("lit").CSSResult[];
4
+ render(): import("lit-html").TemplateResult<1>;
5
+ }
@@ -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,7 @@
1
+ import { LitElement } from "lit";
2
+ export declare class TableTd extends LitElement {
3
+ static styles: import("lit").CSSResult[];
4
+ colSpan: number | null;
5
+ rowSpan: number | null;
6
+ render(): import("lit-html").TemplateResult<1>;
7
+ }
@@ -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,5 @@
1
+ import { LitElement } from "lit";
2
+ export declare class TableTfoot extends LitElement {
3
+ static styles: import("lit").CSSResult[];
4
+ render(): import("lit-html").TemplateResult<1>;
5
+ }
@@ -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,6 @@
1
+ import { LitElement } from "lit";
2
+ export declare class TableTh extends LitElement {
3
+ static styles: import("lit").CSSResult[];
4
+ align: "left" | "right" | "left" | "center";
5
+ render(): import("lit-html").TemplateResult<1>;
6
+ }
@@ -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,5 @@
1
+ import { LitElement } from "lit";
2
+ export declare class TableThead extends LitElement {
3
+ static styles: import("lit").CSSResult[];
4
+ render(): import("lit-html").TemplateResult<1>;
5
+ }
@@ -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,5 @@
1
+ import { LitElement } from "lit";
2
+ export declare class TableTr extends LitElement {
3
+ static styles: import("lit").CSSResult[];
4
+ render(): import("lit-html").TemplateResult<1>;
5
+ }
@@ -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: "neue-haas-unica", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto,
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: inherit;
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, #1f2937);
16
- --sc-base-100: var(--sc-dark-base-100, #262f3d);
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);
@@ -16,6 +16,7 @@ export const light = css `
16
16
 
17
17
  /*Bases*/
18
18
  --sc-base: #fff;
19
+ --sc-base-50: #f8fafc;
19
20
  --sc-base-100: #f1f5f9;
20
21
  --sc-base-200: #e2e8f0;
21
22
  --sc-base-300: #cbd5e1;
@@ -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";
@@ -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";
@@ -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
- makeShadow(props: Record<string, any>, value: any): any;
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;
@@ -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);
@@ -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;
@@ -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
- obj = obj[key];
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
  }