@supersoniks/concorde 1.1.26 → 1.1.28

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 (56) hide show
  1. package/components.d.ts +2 -2
  2. package/components.js +2 -2
  3. package/concorde-core.bundle.js +18 -18
  4. package/concorde-core.es.js +16 -16
  5. package/core/components/functional/list/list.d.ts +1 -4
  6. package/core/components/functional/list/list.js +1 -1
  7. package/core/components/ui/button/button.d.ts +1 -1
  8. package/core/components/ui/form/checkbox/checkbox.d.ts +2 -2
  9. package/core/components/ui/form/checkbox/checkbox.js +2 -2
  10. package/core/components/ui/form/input/input.d.ts +1 -4
  11. package/core/components/ui/form/input/input.js +1 -1
  12. package/core/components/ui/form/radio/radio.d.ts +1 -1
  13. package/core/components/ui/form/radio/radio.js +1 -1
  14. package/core/components/ui/form/select/select.js +1 -1
  15. package/core/components/ui/form/textarea/textarea.d.ts +1 -1
  16. package/core/components/ui/form/textarea/textarea.js +1 -1
  17. package/core/components/ui/icon/icon.js +1 -1
  18. package/core/components/ui/icon/icons.js +5 -1
  19. package/core/components/ui/icon/icons.json +1 -1
  20. package/core/components/ui/loader/loader.js +2 -2
  21. package/core/components/ui/menu/menu-item.d.ts +1 -1
  22. package/core/components/ui/menu/menu-item.js +1 -1
  23. package/core/components/ui/menu/menu.d.ts +1 -1
  24. package/core/components/ui/menu/menu.js +1 -1
  25. package/core/components/ui/modal/modal.d.ts +5 -5
  26. package/core/components/ui/modal/modal.js +5 -5
  27. package/core/components/ui/table/table.d.ts +7 -7
  28. package/core/components/ui/table/table.js +7 -7
  29. package/core/components/ui/tabs/tab.d.ts +1 -1
  30. package/core/components/ui/tabs/tab.js +1 -1
  31. package/core/components/ui/tabs/tabs.js +0 -1
  32. package/core/components/ui/taxonomy/taxonomy.d.ts +2 -2
  33. package/core/components/ui/taxonomy/taxonomy.js +2 -2
  34. package/core/components/ui/theme/theme.js +3 -3
  35. package/core/components/ui/toast/message-subscriber.js +1 -1
  36. package/core/components/ui/toast/toast-item.d.ts +4 -2
  37. package/core/components/ui/toast/toast-item.js +24 -1
  38. package/core/components/ui/toast/toast.d.ts +4 -3
  39. package/core/components/ui/toast/toast.js +17 -3
  40. package/core/components/ui/toast/types.d.ts +1 -0
  41. package/core/mixins/Fetcher.d.ts +3 -5
  42. package/core/mixins/Fetcher.js +4 -4
  43. package/core/mixins/FormCheckable.d.ts +4 -1
  44. package/core/mixins/FormCheckable.js +2 -2
  45. package/core/mixins/FormElement.d.ts +1 -1
  46. package/core/mixins/FormElement.js +2 -2
  47. package/core/mixins/FormInput.d.ts +9 -1
  48. package/core/mixins/Subscriber.js +1 -1
  49. package/core/utils/DataBindObserver.js +4 -0
  50. package/core/utils/LocationHandler.js +4 -2
  51. package/core/utils/api.js +1 -1
  52. package/mixins.d.ts +5 -5
  53. package/mixins.js +6 -6
  54. package/package.json +192 -189
  55. package/utils.d.ts +8 -8
  56. package/utils.js +8 -8
@@ -43,7 +43,7 @@ declare const Form: <T extends Constructor<FormElementInterface>>(superClass: T)
43
43
  getFormPublisher(): any;
44
44
  updateDataValue(): void;
45
45
  error: true | null;
46
- autofocus: true | null;
46
+ autofocus: boolean;
47
47
  disabled: true | null;
48
48
  required: true | null;
49
49
  formDataProvider: string;
@@ -67,6 +67,9 @@ declare const Form: <T extends Constructor<FormElementInterface>>(superClass: T)
67
67
  requestUpdate(): void;
68
68
  getAttribute(name: string): string;
69
69
  hasAttribute(attributeName: String): boolean;
70
+ /**
71
+ * comme radio,mais peut être désélectionné après sélection
72
+ */
70
73
  disconnectedCallback(): void;
71
74
  };
72
75
  } & T;
@@ -97,10 +97,10 @@ const Form = (superClass) => {
97
97
  */
98
98
  getValueForFormPublisher() {
99
99
  let publisher = this.getFormPublisher();
100
- let currentValue = publisher[this.name].get();
101
100
  if (this.unique || this.radio) {
102
- return this.checked && this.value != null ? this.value : currentValue;
101
+ return this.checked && this.value != null ? this.value : null;
103
102
  }
103
+ let currentValue = publisher[this.name].get();
104
104
  if (!Array.isArray(currentValue)) {
105
105
  currentValue = [];
106
106
  }
@@ -6,7 +6,7 @@ export interface FormElementInterface extends SubscriberInterface {
6
6
  handleChange(e?: any): void;
7
7
  getValueForFormPublisher(): any;
8
8
  error: true | null;
9
- autofocus: true | null;
9
+ autofocus: boolean;
10
10
  disabled: true | null;
11
11
  required: true | null;
12
12
  formDataProvider: string;
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { PublisherManager } from "@supersoniks/concorde/core/utils/PublisherProxy.mjs";
8
8
  import { property } from "lit/decorators.js";
9
- import Objects from "../utils/Objects";
9
+ import Objects from "@supersoniks/concorde/core/utils/Objects";
10
10
  const keyboardLoops = new Map();
11
11
  const Form = (superClass) => {
12
12
  /**
@@ -22,7 +22,7 @@ const Form = (superClass) => {
22
22
  super();
23
23
  this.touched = false;
24
24
  this.error = null;
25
- this.autofocus = null;
25
+ this.autofocus = false;
26
26
  this.disabled = null;
27
27
  this.required = null;
28
28
  this.onValueAssign = null;
@@ -15,16 +15,24 @@ declare const Form: <T extends Constructor<FormElementInterface>>(superClass: T)
15
15
  handleChange(e?: any): void;
16
16
  getValueForFormPublisher(): any;
17
17
  error: true | null;
18
- autofocus: true | null;
18
+ autofocus: boolean;
19
19
  disabled: true | null;
20
20
  required: true | null;
21
21
  formDataProvider: string;
22
22
  _value: any;
23
+ /**
24
+ * Le type De l'input, comme en html cependant tous les types ne sont pas actuellements compatibles en raison du style en vigueur
25
+ * On peut essayer text, date, color, email par exemple, mais pas radio/checkbox/range a priori
26
+ */
23
27
  value: any;
24
28
  _name: string;
25
29
  name: string;
26
30
  props: any;
27
31
  isConnected: boolean;
32
+ /**
33
+ * Le type De l'input, comme en html cependant tous les types ne sont pas actuellements compatibles en raison du style en vigueur
34
+ * On peut essayer text, date, color, email par exemple, mais pas radio/checkbox/range a priori
35
+ */
28
36
  getAncestorAttributeValue(attributeName: string): string;
29
37
  hasAncestorAttribute(attributeName: string): boolean;
30
38
  querySelectorAll(selector: string): NodeListOf<Element>;
@@ -18,7 +18,7 @@ import { property } from "lit/decorators.js";
18
18
  import API from "@supersoniks/concorde/core/utils/api";
19
19
  import HTML from "@supersoniks/concorde/core/utils/HTML";
20
20
  import DataBindObserver from "@supersoniks/concorde/core/utils/DataBindObserver";
21
- import Objects from "../utils/Objects";
21
+ import Objects from "@supersoniks/concorde/core/utils/Objects";
22
22
  let keepDebugOnMouseOut = false;
23
23
  let debugs = new Set();
24
24
  //Pour référence
@@ -17,6 +17,8 @@ export default class DataBindObserver {
17
17
  Array.from(DataBindObserver.observedElements.keys()).forEach((k) => DataBindObserver.unObserve(k));
18
18
  }
19
19
  static observe(element) {
20
+ if (!element)
21
+ return;
20
22
  if (!DataBindObserver.enabled)
21
23
  return;
22
24
  if (DataBindObserver.observedElements.has(element))
@@ -35,6 +37,8 @@ export default class DataBindObserver {
35
37
  * Arrêter à observer un élément html.
36
38
  */
37
39
  static unObserve(element) {
40
+ if (!element)
41
+ return;
38
42
  let observer = this.observedElements.get(element);
39
43
  if (!observer)
40
44
  return;
@@ -1,3 +1,4 @@
1
+ var _a;
1
2
  /**
2
3
  * Gestionnaire d'écoute des modifications sur l'url courante.
3
4
  * On peut s'y abonner via la methode statique onChange()
@@ -5,10 +6,11 @@
5
6
  */
6
7
  export default class LocationHandler {
7
8
  static listen() {
9
+ var _a;
8
10
  if (!LocationHandler.listening) {
9
11
  return;
10
12
  }
11
- let newURL = document.location.href.replace(document.location.origin, "");
13
+ let newURL = (_a = document.location) === null || _a === void 0 ? void 0 : _a.href.replace(document.location.origin, "");
12
14
  if (LocationHandler.prevURL && LocationHandler.prevURL != newURL) {
13
15
  LocationHandler.prevURL = newURL;
14
16
  LocationHandler.listeners.forEach((listener) => {
@@ -116,4 +118,4 @@ export default class LocationHandler {
116
118
  }
117
119
  LocationHandler.listeners = [];
118
120
  LocationHandler.listening = false;
119
- LocationHandler.prevURL = document.location.href.replace(document.location.origin, "");
121
+ LocationHandler.prevURL = (_a = document.location) === null || _a === void 0 ? void 0 : _a.href.replace(document.location.origin, "");
package/core/utils/api.js CHANGED
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import HTML from "./HTML";
10
+ import HTML from "@supersoniks/concorde/core/utils/HTML";
11
11
  class API {
12
12
  constructor(config) {
13
13
  this.serviceURL = config.serviceURL;
package/mixins.d.ts CHANGED
@@ -56,7 +56,7 @@ export declare const FormCheckable: <T extends new (...args: any[]) => myFormEle
56
56
  getFormPublisher(): any;
57
57
  updateDataValue(): void;
58
58
  error: true | null;
59
- autofocus: true | null;
59
+ autofocus: boolean;
60
60
  disabled: true | null;
61
61
  required: true | null;
62
62
  formDataProvider: string;
@@ -83,7 +83,7 @@ export declare const FormCheckable: <T extends new (...args: any[]) => myFormEle
83
83
  disconnectedCallback(): void;
84
84
  };
85
85
  } & T;
86
- import * as myFormElement from "./core/mixins/FormElement";
86
+ import * as myFormElement from "@supersoniks/concorde/core/mixins/FormElement";
87
87
  export declare const FormElement: <T extends new (...args: any[]) => mySubscriber.SubscriberInterface>(superClass: T) => (new (...args: any[]) => myFormElement.FormElementInterface) & T;
88
88
  export declare const FormInput: <T extends new (...args: any[]) => myFormElement.FormElementInterface>(superClass: T) => {
89
89
  new (...args: any[]): {
@@ -96,7 +96,7 @@ export declare const FormInput: <T extends new (...args: any[]) => myFormElement
96
96
  handleChange(e?: any): void;
97
97
  getValueForFormPublisher(): any;
98
98
  error: true | null;
99
- autofocus: true | null;
99
+ autofocus: boolean;
100
100
  disabled: true | null;
101
101
  required: true | null;
102
102
  formDataProvider: string;
@@ -128,7 +128,7 @@ export declare const FormInput: <T extends new (...args: any[]) => myFormElement
128
128
  disconnectedCallback(): void;
129
129
  };
130
130
  } & T;
131
- import * as mySubscriber from "./core/mixins/Subscriber";
131
+ import * as mySubscriber from "@supersoniks/concorde/core/mixins/Subscriber";
132
132
  export declare const Subscriber: <T extends new (...args: any[]) => import("lit").LitElement>(superClass: T) => (new (...args: any[]) => mySubscriber.SubscriberInterface) & T;
133
- import * as myTemplatesContainer from "./core/mixins/TemplatesContainer";
133
+ import * as myTemplatesContainer from "@supersoniks/concorde/core/mixins/TemplatesContainer";
134
134
  export declare const TemplatesContainer: <T extends new (...args: any[]) => import("lit").LitElement>(superClass: T) => (new (...args: any[]) => myTemplatesContainer.TemplatesContainerInterface) & T;
package/mixins.js CHANGED
@@ -1,15 +1,15 @@
1
1
  //
2
- import * as myFetcher from "./core/mixins/Fetcher";
2
+ import * as myFetcher from "@supersoniks/concorde/core/mixins/Fetcher";
3
3
  export const Fetcher = myFetcher.default;
4
- import * as myFormCheckable from "./core/mixins/FormCheckable";
4
+ import * as myFormCheckable from "@supersoniks/concorde/core/mixins/FormCheckable";
5
5
  export const FormCheckable = myFormCheckable.default;
6
- import * as myFormElement from "./core/mixins/FormElement";
6
+ import * as myFormElement from "@supersoniks/concorde/core/mixins/FormElement";
7
7
  export const FormElement = myFormElement.default;
8
- import * as myFormInput from "./core/mixins/FormInput";
8
+ import * as myFormInput from "@supersoniks/concorde/core/mixins/FormInput";
9
9
  export const FormInput = myFormInput.default;
10
- import * as mySubscriber from "./core/mixins/Subscriber";
10
+ import * as mySubscriber from "@supersoniks/concorde/core/mixins/Subscriber";
11
11
  export const Subscriber = mySubscriber.default;
12
- import * as myTemplatesContainer from "./core/mixins/TemplatesContainer";
12
+ import * as myTemplatesContainer from "@supersoniks/concorde/core/mixins/TemplatesContainer";
13
13
  export const TemplatesContainer = myTemplatesContainer.default;
14
14
  let win = window;
15
15
  win["concorde-mixins"] = win["concorde-mixins"] || {};