@supersoniks/concorde 1.1.12 → 1.1.14

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,5 +1,5 @@
1
1
  import { LitElement, nothing } from "lit";
2
- import '../list/list';
2
+ import '@supersoniks/concorde/core/components/functional/list/list';
3
3
  import { PublisherProxy } from "@supersoniks/concorde/core/utils/PublisherProxy.mjs";
4
4
  declare const Queue_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface) & typeof LitElement;
5
5
  /**
@@ -11,7 +11,7 @@ import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
11
11
  import { repeat } from 'lit/directives/repeat.js';
12
12
  import { PublisherManager } from "@supersoniks/concorde/core/utils/PublisherProxy.mjs";
13
13
  import { ifDefined } from "lit/directives/if-defined.js";
14
- import '../list/list';
14
+ import '@supersoniks/concorde/core/components/functional/list/list';
15
15
  /**
16
16
  *### Une Queue charge du contenu par lot selon l'expression renseignée dans l'attribut *dataProviderExpression*.
17
17
  * * Chaque lot est chargé par un composant [List](./?path=/docs/core-components-functional-list-list--basic) dont le dataProvider créé à partir de l'attribut dataProviderExpression
@@ -58,13 +58,15 @@ let Queue = Queue_1 = class Queue extends Subscriber(LitElement) {
58
58
  this.configFilter();
59
59
  super.connectedCallback();
60
60
  this.key = this.getAttribute("key");
61
- this.templates = [...this.querySelectorAll("template")];
61
+ if (!this.templates)
62
+ this.templates = Array.from(this.querySelectorAll("template"));
62
63
  this.lastRequestTime = new Date().getTime();
63
64
  this.next();
64
65
  }
65
66
  configFilter() {
66
67
  var _a;
67
68
  let dataFilterProvider = this.getAncestorAttributeValue("dataFilterProvider");
69
+ console.log(dataFilterProvider);
68
70
  if (!dataFilterProvider)
69
71
  return;
70
72
  this.filterPublisher = PublisherManager.getInstance().get(dataFilterProvider);
@@ -168,6 +170,9 @@ let Queue = Queue_1 = class Queue extends Subscriber(LitElement) {
168
170
  }
169
171
  };
170
172
  Queue.instanceCounter = 0;
173
+ __decorate([
174
+ property({ type: Array })
175
+ ], Queue.prototype, "templates", void 0);
171
176
  __decorate([
172
177
  property({ type: Object })
173
178
  ], Queue.prototype, "itemPropertyMap", void 0);
@@ -1,5 +1,5 @@
1
1
  import { LitElement } from "lit";
2
- import './legend-description.ts';
2
+ import "@supersoniks/concorde/core/components/ui/form/fieldset/legend-description";
3
3
  export declare class Legend extends LitElement {
4
4
  static styles: import("lit").CSSResult[];
5
5
  description: string;
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { html, LitElement, css } from "lit";
8
8
  import { customElement, property } from "lit/decorators.js";
9
- import './legend-description.ts';
9
+ import "@supersoniks/concorde/core/components/ui/form/fieldset/legend-description";
10
10
  let Legend = class Legend extends LitElement {
11
11
  constructor() {
12
12
  super(...arguments);
@@ -53,11 +53,11 @@ let Pop = Pop_1 = class Pop extends LitElement {
53
53
  this.positioningRuns = false;
54
54
  }
55
55
  _handleClosePop(e) {
56
- let target = e.target;
56
+ let path = e.composedPath();
57
+ let target = path[0];
57
58
  Pop_1.pops.forEach((pop) => {
58
- var _a;
59
- const popContainsTarget = pop.contains(target);
60
- const popContentContainsTarget = (_a = pop.querySelector('[slot="content"]')) === null || _a === void 0 ? void 0 : _a.contains(target);
59
+ const popContainsTarget = path.includes(pop);
60
+ const popContentContainsTarget = path.includes(pop.querySelector('[slot="content"]'));
61
61
  const isCloseManual = HTML.getAncestorAttributeValue(target, "data-on-select") === "keep";
62
62
  if (e.type == "pointerdown" && popContainsTarget)
63
63
  return;
@@ -49,18 +49,18 @@ declare class API {
49
49
  * Concatène le serviceURL et le endpoint donné en paramètre
50
50
  */
51
51
  computeURL(path: String): string;
52
- send(path: String, data: any, method?: string): Promise<any>;
52
+ send(path: String, data: any, method?: string, additionalHeaders?: HeadersInit): Promise<any>;
53
53
  /**
54
54
  * Appel send en utilisant le méthode PUT
55
55
  */
56
- put(path: String, data: any): Promise<any>;
56
+ put(path: String, data: any, additionalHeaders?: HeadersInit): Promise<any>;
57
57
  /**
58
58
  * Appel send en utilisant le méthode POST
59
59
  */
60
- post(path: String, data: any): Promise<any>;
60
+ post(path: String, data: any, additionalHeaders?: HeadersInit): Promise<any>;
61
61
  /**
62
62
  * Appel send en utilisant le méthode delete
63
63
  */
64
- delete(path: String, data: any): Promise<any>;
64
+ delete(path: String, data: any, additionalHeaders?: HeadersInit): Promise<any>;
65
65
  }
66
66
  export default API;
package/core/utils/api.js CHANGED
@@ -89,12 +89,15 @@ class API {
89
89
  /*
90
90
  * Envoie des données au endPoint passé en paramètre. par défaut en POST
91
91
  */
92
- send(path, data, method = "POST") {
92
+ send(path, data, method = "POST", additionalHeaders) {
93
93
  return __awaiter(this, void 0, void 0, function* () {
94
94
  yield this.auth();
95
95
  let headers = yield this.createHeaders();
96
96
  headers["Accept"] = "application/json";
97
97
  headers["Content-Type"] = "application/json";
98
+ if (additionalHeaders) {
99
+ Object.assign(headers, additionalHeaders);
100
+ }
98
101
  let result = yield fetch(this.computeURL(path), {
99
102
  headers: headers,
100
103
  method: method,
@@ -112,25 +115,25 @@ class API {
112
115
  /**
113
116
  * Appel send en utilisant le méthode PUT
114
117
  */
115
- put(path, data) {
118
+ put(path, data, additionalHeaders) {
116
119
  return __awaiter(this, void 0, void 0, function* () {
117
- return this.send(path, data, "PUT");
120
+ return this.send(path, data, "PUT", additionalHeaders);
118
121
  });
119
122
  }
120
123
  /**
121
124
  * Appel send en utilisant le méthode POST
122
125
  */
123
- post(path, data) {
126
+ post(path, data, additionalHeaders) {
124
127
  return __awaiter(this, void 0, void 0, function* () {
125
- return this.send(path, data, "POST");
128
+ return this.send(path, data, "POST", additionalHeaders);
126
129
  });
127
130
  }
128
131
  /**
129
132
  * Appel send en utilisant le méthode delete
130
133
  */
131
- delete(path, data) {
134
+ delete(path, data, additionalHeaders) {
132
135
  return __awaiter(this, void 0, void 0, function* () {
133
- return this.send(path, data, "POST");
136
+ return this.send(path, data, "delete", additionalHeaders);
134
137
  });
135
138
  }
136
139
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supersoniks/concorde",
3
- "version": "1.1.12",
3
+ "version": "1.1.14",
4
4
  "customElements": "custom-elements.json",
5
5
  "license": "MIT",
6
6
  "publishConfig": {