@supersoniks/concorde 1.1.42 → 1.1.44

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 (189) hide show
  1. package/components.js +2 -3
  2. package/concorde-core.bundle.js +37 -35
  3. package/concorde-core.es.js +5283 -4453
  4. package/core/_types/types.d.ts +31 -0
  5. package/core/_types/types.js +2 -0
  6. package/core/components/functional/date/date.d.ts +13 -5
  7. package/core/components/functional/date/date.js +57 -38
  8. package/core/components/functional/example/example.d.ts +1 -1
  9. package/core/components/functional/example/example.js +1 -1
  10. package/core/components/functional/fetch/fetch.d.ts +45 -6
  11. package/core/components/functional/fetch/fetch.js +2 -6
  12. package/core/components/functional/functional.d.ts +2 -0
  13. package/core/components/functional/functional.js +2 -0
  14. package/core/components/functional/if/if.d.ts +3 -0
  15. package/core/components/functional/if/if.js +6 -12
  16. package/core/components/functional/if/if.test.d.ts +1 -0
  17. package/core/components/functional/if/if.test.js +44 -0
  18. package/core/components/functional/list/list.d.ts +44 -12
  19. package/core/components/functional/list/list.js +54 -49
  20. package/core/components/functional/mix/mix.d.ts +22 -0
  21. package/core/components/functional/mix/mix.js +102 -0
  22. package/core/components/functional/queue/queue.d.ts +27 -5
  23. package/core/components/functional/queue/queue.js +88 -26
  24. package/core/components/functional/router/redirect.d.ts +11 -2
  25. package/core/components/functional/router/redirect.js +7 -12
  26. package/core/components/functional/router/router.d.ts +15 -1
  27. package/core/components/functional/router/router.js +11 -16
  28. package/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts +1 -2
  29. package/core/components/functional/sdui/SDUIDescriptorTransformer.js +56 -45
  30. package/core/components/functional/sdui/default-library.json +108 -0
  31. package/core/components/functional/sdui/sdui-utils.d.ts +5 -0
  32. package/core/components/functional/sdui/sdui-utils.js +63 -0
  33. package/core/components/functional/sdui/sdui.d.ts +21 -13
  34. package/core/components/functional/sdui/sdui.js +70 -44
  35. package/core/components/functional/sdui/types.d.ts +10 -8
  36. package/core/components/functional/states/states.d.ts +20 -4
  37. package/core/components/functional/states/states.js +15 -20
  38. package/core/components/functional/submit/submit.d.ts +16 -1
  39. package/core/components/functional/submit/submit.js +95 -25
  40. package/core/components/functional/subscriber/subscriber.d.ts +4 -1
  41. package/core/components/functional/subscriber/subscriber.js +1 -6
  42. package/core/components/functional/value/value.d.ts +7 -0
  43. package/core/components/functional/value/value.js +26 -0
  44. package/core/components/ui/_css/scroll.js +6 -7
  45. package/core/components/ui/_css/size.d.ts +1 -0
  46. package/core/components/ui/_css/size.js +3 -1
  47. package/core/components/ui/alert/alert.d.ts +2 -2
  48. package/core/components/ui/alert/alert.js +11 -16
  49. package/core/components/ui/badge/badge.d.ts +3 -1
  50. package/core/components/ui/badge/badge.js +36 -22
  51. package/core/components/ui/button/button.d.ts +28 -23
  52. package/core/components/ui/button/button.js +60 -43
  53. package/core/components/ui/captcha/captcha.d.ts +14 -2
  54. package/core/components/ui/captcha/captcha.js +18 -13
  55. package/core/components/ui/card/card-footer.js +1 -8
  56. package/core/components/ui/card/card-header-descripton.js +3 -9
  57. package/core/components/ui/card/card-header.js +6 -7
  58. package/core/components/ui/card/card-main.js +0 -5
  59. package/core/components/ui/card/card.d.ts +1 -1
  60. package/core/components/ui/card/card.js +30 -12
  61. package/core/components/ui/divider/divider.d.ts +2 -0
  62. package/core/components/ui/divider/divider.js +43 -16
  63. package/core/components/ui/form/checkbox/checkbox.d.ts +86 -25
  64. package/core/components/ui/form/checkbox/checkbox.js +53 -28
  65. package/core/components/ui/form/css/form-control.d.ts +2 -0
  66. package/core/components/ui/form/css/form-control.js +145 -67
  67. package/core/components/ui/form/fieldset/fieldset.d.ts +8 -1
  68. package/core/components/ui/form/fieldset/fieldset.js +45 -8
  69. package/core/components/ui/form/fieldset/legend-description.js +0 -5
  70. package/core/components/ui/form/fieldset/legend.js +3 -6
  71. package/core/components/ui/form/form-actions/form-actions.d.ts +2 -0
  72. package/core/components/ui/form/form-actions/form-actions.js +26 -11
  73. package/core/components/ui/form/form-layout/form-layout.d.ts +5 -2
  74. package/core/components/ui/form/form-layout/form-layout.js +31 -9
  75. package/core/components/ui/form/input/input.d.ts +26 -24
  76. package/core/components/ui/form/input/input.js +87 -52
  77. package/core/components/ui/form/input/password-helper.d.ts +1 -1
  78. package/core/components/ui/form/input/password-helper.js +4 -3
  79. package/core/components/ui/form/input/same-value-helper.d.ts +1 -1
  80. package/core/components/ui/form/input/same-value-helper.js +3 -2
  81. package/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +2 -3
  82. package/core/components/ui/form/input-autocomplete/input-autocomplete.js +2 -6
  83. package/core/components/ui/form/radio/radio.d.ts +6 -0
  84. package/core/components/ui/form/radio/radio.js +7 -12
  85. package/core/components/ui/form/select/select.d.ts +25 -8
  86. package/core/components/ui/form/select/select.js +72 -41
  87. package/core/components/ui/form/textarea/textarea.d.ts +21 -19
  88. package/core/components/ui/form/textarea/textarea.js +29 -36
  89. package/core/components/ui/group/group.d.ts +11 -1
  90. package/core/components/ui/group/group.js +79 -17
  91. package/core/components/ui/icon/icon.d.ts +10 -3
  92. package/core/components/ui/icon/icon.js +16 -15
  93. package/core/components/ui/icon/icons.js +25 -20
  94. package/core/components/ui/icon/icons.json +1 -1
  95. package/core/components/ui/image/image.js +0 -5
  96. package/core/components/ui/link/link.d.ts +1 -1
  97. package/core/components/ui/link/link.js +2 -6
  98. package/core/components/ui/loader/loader.d.ts +1 -1
  99. package/core/components/ui/loader/loader.js +3 -9
  100. package/core/components/ui/menu/menu-item.js +4 -9
  101. package/core/components/ui/menu/menu.d.ts +9 -1
  102. package/core/components/ui/menu/menu.js +182 -27
  103. package/core/components/ui/modal/modal-actions.js +1 -6
  104. package/core/components/ui/modal/modal-close.d.ts +1 -0
  105. package/core/components/ui/modal/modal-close.js +14 -10
  106. package/core/components/ui/modal/modal-content.js +0 -5
  107. package/core/components/ui/modal/modal-subtitle.js +2 -6
  108. package/core/components/ui/modal/modal-title.js +0 -5
  109. package/core/components/ui/modal/modal.d.ts +7 -7
  110. package/core/components/ui/modal/modal.js +37 -37
  111. package/core/components/ui/pop/pop.d.ts +6 -5
  112. package/core/components/ui/pop/pop.js +57 -57
  113. package/core/components/ui/progress/progress.js +34 -32
  114. package/core/components/ui/table/table-caption.js +5 -10
  115. package/core/components/ui/table/table-tbody.js +10 -14
  116. package/core/components/ui/table/table-td.d.ts +2 -0
  117. package/core/components/ui/table/table-td.js +8 -5
  118. package/core/components/ui/table/table-tfoot.js +5 -7
  119. package/core/components/ui/table/table-th.d.ts +2 -0
  120. package/core/components/ui/table/table-th.js +12 -9
  121. package/core/components/ui/table/table-thead.js +1 -6
  122. package/core/components/ui/table/table-tr.js +4 -6
  123. package/core/components/ui/table/table.d.ts +0 -3
  124. package/core/components/ui/table/table.js +14 -31
  125. package/core/components/ui/theme/theme-collection/core-variables.js +13 -11
  126. package/core/components/ui/theme/theme-collection/dark.js +1 -1
  127. package/core/components/ui/theme/theme.d.ts +1 -6
  128. package/core/components/ui/theme/theme.js +19 -46
  129. package/core/components/ui/toast/message-subscriber.d.ts +16 -7
  130. package/core/components/ui/toast/message-subscriber.js +10 -8
  131. package/core/components/ui/toast/toast-item.js +1 -1
  132. package/core/components/ui/toast/toast.d.ts +3 -2
  133. package/core/components/ui/toast/toast.js +33 -19
  134. package/core/components/ui/toast/types.d.ts +3 -2
  135. package/core/components/ui/tooltip/tooltip.d.ts +1 -0
  136. package/core/components/ui/tooltip/tooltip.js +36 -15
  137. package/core/components/ui/ui.d.ts +1 -1
  138. package/core/components/ui/ui.js +1 -4
  139. package/core/core.js +5 -6
  140. package/core/mixins/Fetcher.d.ts +20 -13
  141. package/core/mixins/Fetcher.js +44 -19
  142. package/core/mixins/FormCheckable.d.ts +25 -13
  143. package/core/mixins/FormCheckable.js +180 -23
  144. package/core/mixins/FormElement.d.ts +17 -9
  145. package/core/mixins/FormElement.js +56 -39
  146. package/core/mixins/FormInput.d.ts +22 -12
  147. package/core/mixins/FormInput.js +4 -3
  148. package/core/mixins/Subscriber.d.ts +12 -8
  149. package/core/mixins/Subscriber.js +51 -48
  150. package/core/mixins/TemplatesContainer.d.ts +2 -1
  151. package/core/mixins/TemplatesContainer.js +2 -2
  152. package/core/utils/Arrays.d.ts +15 -15
  153. package/core/utils/Arrays.js +12 -9
  154. package/core/utils/DataBindObserver.d.ts +18 -11
  155. package/core/utils/DataBindObserver.js +47 -54
  156. package/core/utils/Electron.d.ts +5 -1
  157. package/core/utils/Electron.js +4 -2
  158. package/core/utils/HTML.d.ts +9 -2
  159. package/core/utils/HTML.js +24 -5
  160. package/core/utils/LocationHandler.d.ts +6 -5
  161. package/core/utils/LocationHandler.js +27 -16
  162. package/core/utils/Objects.d.ts +7 -4
  163. package/core/utils/Objects.js +37 -9
  164. package/core/utils/{PublisherProxy.d.mts → PublisherProxy.d.ts} +49 -34
  165. package/core/utils/{PublisherProxy.mjs → PublisherProxy.js} +107 -77
  166. package/core/utils/Utils.d.ts +3 -0
  167. package/core/utils/Utils.js +18 -0
  168. package/core/utils/api.d.ts +26 -9
  169. package/core/utils/api.js +62 -45
  170. package/img/concorde-logo.svg +1 -0
  171. package/img/concorde.png +0 -0
  172. package/img/concorde_def.png +0 -0
  173. package/mixins.d.ts +53 -29
  174. package/mixins.js +3 -4
  175. package/package.json +51 -12
  176. package/svg/regular/plane.svg +1 -0
  177. package/svg/solid/plane.svg +1 -0
  178. package/test-utils/TestUtils.d.ts +4 -0
  179. package/test-utils/TestUtils.js +12 -0
  180. package/utils.d.ts +3 -1
  181. package/utils.js +7 -5
  182. package/core/components/functional/configuration/configuration.d.ts +0 -5
  183. package/core/components/functional/configuration/configuration.js +0 -22
  184. package/core/components/ui/tabs/tab.d.ts +0 -6
  185. package/core/components/ui/tabs/tab.js +0 -46
  186. package/core/components/ui/tabs/tabs.d.ts +0 -15
  187. package/core/components/ui/tabs/tabs.js +0 -129
  188. package/core/components/ui/taxonomy/taxonomy.d.ts +0 -41
  189. package/core/components/ui/taxonomy/taxonomy.js +0 -115
@@ -10,7 +10,7 @@ export default class LocationHandler {
10
10
  if (!LocationHandler.listening) {
11
11
  return;
12
12
  }
13
- let newURL = (_a = document.location) === null || _a === void 0 ? void 0 : _a.href.replace(document.location.origin, "");
13
+ const newURL = (_a = document.location) === null || _a === void 0 ? void 0 : _a.href.replace(document.location.origin, "");
14
14
  if (LocationHandler.prevURL && LocationHandler.prevURL != newURL) {
15
15
  LocationHandler.prevURL = newURL;
16
16
  LocationHandler.listeners.forEach((listener) => {
@@ -23,7 +23,7 @@ export default class LocationHandler {
23
23
  * Arrête l'écoute des changements de location pour le listener fournit
24
24
  */
25
25
  static offChange(listener) {
26
- let idx = LocationHandler.listeners.indexOf(listener);
26
+ const idx = LocationHandler.listeners.indexOf(listener);
27
27
  if (idx == -1)
28
28
  return;
29
29
  LocationHandler.listeners.splice(idx, 1);
@@ -39,6 +39,7 @@ export default class LocationHandler {
39
39
  LocationHandler.listen();
40
40
  }
41
41
  LocationHandler.listeners.push(listener);
42
+ listener.location = this.prevURL;
42
43
  }
43
44
  /**
44
45
  *
@@ -49,35 +50,45 @@ export default class LocationHandler {
49
50
  * Voir link et button pour les exemples d'implémentation
50
51
  **/
51
52
  static changeFromComponent(component) {
52
- if (component.goBack !== null) {
53
+ const goBack = component.goBack;
54
+ const referrer = document.referrer;
55
+ if (goBack !== null && goBack !== undefined) {
53
56
  const origin = document.location.origin;
54
- let urlDest = component.goBack || origin;
55
- if ((document.referrer.indexOf("http") != 0 || new URL(document.referrer).origin != origin) && urlDest != document.location.href) {
56
- let state = history.state || {};
57
+ const urlDest = goBack || origin;
58
+ const isHTTP = referrer.indexOf("http") == 0;
59
+ const isNotSameOrigin = isHTTP ? new URL(referrer).origin != origin : false;
60
+ const isReferrerEmpty = referrer == "";
61
+ const isFirstPage = history.length < 3; // imparfait mais variabsle selon les situations
62
+ const isFallbackNoReferer = isReferrerEmpty && isFirstPage; // fallback pour ff qui a parfois un referer nulle ex : drupal 9
63
+ const isNotSameURL = urlDest != document.location.href;
64
+ const goToURLDest = (isNotSameOrigin && isNotSameURL) || isFallbackNoReferer;
65
+ if (goToURLDest) {
66
+ const state = history.state || {};
57
67
  state.concorde = state.concorde || {};
58
- state.concorde.hasDoneHistoryBack = true; // maybe for debugging
68
+ state.concorde.hasDoneHistoryBack = true;
59
69
  history.pushState(state, document.title);
60
70
  history.back();
61
71
  document.location.replace(urlDest);
62
72
  }
63
- else
73
+ else {
64
74
  history.back();
75
+ }
65
76
  return;
66
77
  }
67
- let to = component.getAttribute("to");
78
+ let to = component.getAttribute("to") || "";
68
79
  if (!to)
69
- to = component.href;
80
+ to = component.href || "";
70
81
  if (!to)
71
82
  return;
72
83
  if (to.indexOf("#") == 0) {
73
84
  document.location.hash = to.substring(1);
74
85
  return;
75
86
  }
76
- let url = new URL(to, document.location.href);
77
- let split = url.pathname.split("/");
78
- let newPathName = [];
87
+ const url = new URL(to, document.location.href);
88
+ const split = url.pathname.split("/");
89
+ const newPathName = [];
79
90
  let prevSp = "";
80
- for (let sp of split) {
91
+ for (const sp of split) {
81
92
  if (sp != prevSp)
82
93
  newPathName.push(sp);
83
94
  prevSp = sp;
@@ -101,8 +112,8 @@ export default class LocationHandler {
101
112
  if (component.autoActive == "disabled")
102
113
  return;
103
114
  if (component.href && component.href.indexOf("http") != 0) {
104
- let url1 = new URL(component.href, document.location.href);
105
- let url2 = new URL(component.location, document.location.origin);
115
+ const url1 = new URL(component.href, document.location.href);
116
+ const url2 = new URL(component.location || "", document.location.origin);
106
117
  let isActive = false;
107
118
  if (component.autoActive == "strict") {
108
119
  isActive = url1.pathname == url2.pathname && url1.hash == url2.hash && url1.search == url2.search;
@@ -1,24 +1,27 @@
1
+ import { TypeAndRecordOfType } from "../_types/types";
1
2
  declare class Objects {
2
3
  /**
3
4
  * Effectue une comparaison d'égalité non profonde entre deux objets.
4
5
  */
5
- static shallowEqual(object1: any, object2: any): boolean;
6
+ static shallowEqual(object1: any, object2: any, useStrictComparaison?: boolean): boolean;
6
7
  /**
7
8
  * Effectue une comparaison d'égalité profonde entre deux objets.
8
9
  */
9
- static deepEqual(object1: any, object2: any): boolean;
10
+ static deepEqual(object1: any, object2: any, useStrictComparaison?: boolean): boolean;
10
11
  /**
11
12
  * @returns true si l'objet est un objet ou un tableau (qui est un objet). mais false si null (car sinon typeof null "object")
12
13
  */
13
- static isObject(object: any): boolean;
14
+ static isObject<T>(object: T): boolean;
14
15
  /**
15
16
  * @returns true si l'argument est null ou undefined
16
17
  */
17
- static isUndefindOrNull(object: any): boolean;
18
+ static isUndefindOrNull<T>(object: T): boolean;
18
19
  /**
19
20
  * traverse l'objet pour obtenir la valeur a l'adresse donnée via le tableau de clés pathArray.
20
21
  * 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.
21
22
  */
22
23
  static traverse(obj: any, pathArray: string[], extendValues?: boolean): any;
24
+ static getURLSearchArray(sourceObject?: TypeAndRecordOfType<string>, prefix?: string): string[];
25
+ static getURLSearchString(sourceObject: TypeAndRecordOfType<string>): string;
23
26
  }
24
27
  export default Objects;
@@ -2,38 +2,46 @@ class Objects {
2
2
  /**
3
3
  * Effectue une comparaison d'égalité non profonde entre deux objets.
4
4
  */
5
- static shallowEqual(object1, object2) {
5
+ /*eslint-disable @typescript-eslint/no-explicit-any*/
6
+ static shallowEqual(object1, object2, useStrictComparaison = true) {
6
7
  const keys1 = Object.keys(object1);
7
8
  const keys2 = Object.keys(object2);
8
- if (keys1.length !== keys2.length) {
9
+ if (keys1.length !== keys2.length && useStrictComparaison) {
9
10
  return false;
10
11
  }
11
- for (let key of keys1) {
12
- if (object1[key] !== object2[key]) {
12
+ for (const key of keys1) {
13
+ const val1 = object1[key];
14
+ const val2 = object2[key];
15
+ const areEqual = useStrictComparaison ? val1 !== val2 : val1 != val2;
16
+ if (areEqual) {
13
17
  return false;
14
18
  }
15
19
  }
16
20
  return true;
17
21
  }
22
+ /*eslint-enable @typescript-eslint/no-explicit-any*/
18
23
  /**
19
24
  * Effectue une comparaison d'égalité profonde entre deux objets.
20
25
  */
21
- static deepEqual(object1, object2) {
26
+ /*eslint-disable @typescript-eslint/no-explicit-any*/
27
+ static deepEqual(object1, object2, useStrictComparaison = true) {
22
28
  const keys1 = Object.keys(object1);
23
29
  const keys2 = Object.keys(object2);
24
- if (keys1.length !== keys2.length) {
30
+ if (keys1.length !== keys2.length && useStrictComparaison) {
25
31
  return false;
26
32
  }
27
33
  for (const key of keys1) {
28
34
  const val1 = object1[key];
29
35
  const val2 = object2[key];
30
36
  const areObjects = Objects.isObject(val1) && Objects.isObject(val2);
31
- if ((areObjects && !Objects.deepEqual(val1, val2)) || (!areObjects && val1 !== val2)) {
37
+ const areEqual = useStrictComparaison ? val1 !== val2 : val1 != val2;
38
+ if ((areObjects && !Objects.deepEqual(val1, val2)) || (!areObjects && areEqual)) {
32
39
  return false;
33
40
  }
34
41
  }
35
42
  return true;
36
43
  }
44
+ /*eslint-enable @typescript-eslint/no-explicit-any*/
37
45
  /**
38
46
  * @returns true si l'objet est un objet ou un tableau (qui est un objet). mais false si null (car sinon typeof null "object")
39
47
  */
@@ -50,9 +58,10 @@ class Objects {
50
58
  * traverse l'objet pour obtenir la valeur a l'adresse donnée via le tableau de clés pathArray.
51
59
  * 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.
52
60
  */
61
+ /*eslint-disable @typescript-eslint/no-explicit-any*/
53
62
  static traverse(obj, pathArray, extendValues = false) {
54
- for (let key of pathArray) {
55
- let newObj = obj[key];
63
+ for (const key of pathArray) {
64
+ const newObj = obj[key];
56
65
  if (newObj === undefined) {
57
66
  return undefined;
58
67
  }
@@ -65,5 +74,24 @@ class Objects {
65
74
  }
66
75
  return obj;
67
76
  }
77
+ /*eslint-enable @typescript-eslint/no-explicit-any*/
78
+ static getURLSearchArray(sourceObject, prefix = "") {
79
+ let arr = [];
80
+ for (let key in sourceObject) {
81
+ const value = sourceObject[key];
82
+ if (prefix)
83
+ key = prefix + "[" + key + "]";
84
+ if (Objects.isObject(value)) {
85
+ arr = [...arr, ...this.getURLSearchArray(value, key)];
86
+ }
87
+ else {
88
+ arr.push(`${key}=${value}`);
89
+ }
90
+ }
91
+ return arr;
92
+ }
93
+ static getURLSearchString(sourceObject) {
94
+ return Objects.getURLSearchArray(sourceObject, "").join("&");
95
+ }
68
96
  }
69
97
  export default Objects;
@@ -1,18 +1,29 @@
1
+ /**
2
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3
+ * Merci de laisser ce fichier sans la moindre dépendance en dehors de types du ceur.
4
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5
+ * **/
6
+ import { CoreJSType, PublisherContentType } from "../_types/types";
7
+ type DynamicFillingListener = any;
8
+ type TemplateFillingListener = {
9
+ propertyMap: Record<string, string>;
10
+ } & DynamicFillingListener;
1
11
  /**
2
12
  * Custom Proxy contient les méthodes des publishers retournés par PublisherManager.get(publisherId) qui seront utilisées couramment
3
13
  */
4
- export class PublisherProxy {
5
- constructor(target: any, parentProxPub?: null);
6
- _proxies_: Map<any, any>;
7
- _value_: any;
8
- _invalidateListeners_: Set<any>;
9
- _assignListeners_: Set<any>;
10
- _mutationListeners_: Set<any>;
11
- _fillListeners_: Set<any>;
14
+ export declare class PublisherProxy<T = any> {
15
+ _proxies_: Map<string, PublisherProxy>;
16
+ _value_: T;
17
+ _key_: string;
18
+ _invalidateListeners_: Set<VoidFunction>;
19
+ _assignListeners_: Set<(value: T) => void>;
20
+ _mutationListeners_: Set<VoidFunction>;
21
+ _fillListeners_: Set<Record<string, CoreJSType>>;
12
22
  _templateFillListeners_: Set<any>;
13
23
  _lockInternalMutationPublishing_: boolean;
14
- parent: any;
15
- root: any;
24
+ parent: PublisherProxy | null;
25
+ root: PublisherProxy;
26
+ constructor(target: T, parentProxPub: PublisherProxy | null);
16
27
  /**
17
28
  * Supprime le proxy et ses sous proxy
18
29
  * Supprime les écouteurs associés
@@ -25,69 +36,71 @@ export class PublisherProxy {
25
36
  _publishInternalMutation_(lockInternalMutationsTransmission?: boolean): void;
26
37
  _publishAssignement_(lockInternalMutationsTransmission?: boolean): void;
27
38
  _publishInvalidation_(): void;
28
- _publishDynamicFilling_(key: any, value: any): void;
29
- _publishTemplateFilling_(key: any, value: any): void;
39
+ _publishDynamicFilling_(key: string, value: CoreJSType): void;
40
+ _publishTemplateFilling_(key: string, value: CoreJSType): void;
30
41
  /**
31
42
  * Appel la fonction "handler" (passée en paramettre) lorsque la valeur gérée par le proxy change par assignation
32
43
  * hanlder reçois alors la nouvelle valeur interne du proxy en paramètre
33
44
  */
34
- onAssign(handler: any): void;
45
+ onAssign(handler: (value: T) => void): void;
35
46
  /**
36
47
  * Stop les appels de la fonction "handler" (passée en paramettre) lorsque la valeur gérée par le proxy change par assignation
37
48
  */
38
- offAssign(handler: any): void;
49
+ offAssign(handler: (value: T) => void): void;
39
50
  /**
40
51
  * Appel la fonction "handler" (passée en paramettre) lorsque la donnée est flaggée comme invalide
41
52
  */
42
- onInvalidate(handler: any): void;
53
+ onInvalidate(handler: VoidFunction | undefined): void;
43
54
  /**
44
55
  * Stop les appels de la fonction "handler" (passée en paramettre) lorsque la donnée est flaggée comme invalide
45
56
  */
46
- offInvalidate(handler: any): void;
57
+ offInvalidate(handler: VoidFunction | undefined): void;
47
58
  /**
48
59
  * Flag les données comme étant invalides
49
60
  */
50
- invalidate(handler: any): void;
61
+ invalidate(): void;
51
62
  /**
52
63
  * Appel la fonction "handler" (passée en paramettre) lorsque quelque chose change la valeur gérée par le proxy quelque soit la profondeur de la donnée
53
64
  *
54
65
  */
55
- onInternalMutation(handler: any): void;
66
+ onInternalMutation(handler: VoidFunction | undefined): void;
56
67
  /**
57
68
  * Stop les Appels de la fonction "handler" (passée en paramettre) lorsque quelque chose change la valeur gérée par le proxy quelque soit la profondeur de la donnée
58
69
  */
59
- offInternalMutation(handler: any): void;
70
+ offInternalMutation(handler: VoidFunction | undefined): void;
60
71
  /**
61
72
  * Maintient le remplissage de l'objet / tableau "handler" passé en paramètre avec les valeurs du proxy
62
73
  * Remplit uniquement les valeurs déjà présentes dans l'objet / tableau passé en paramètre
63
74
  */
64
- startTemplateFilling(handler: any): void;
75
+ startTemplateFilling(handler: TemplateFillingListener): void;
65
76
  /**
66
77
  * Arrête de maintenir le remplissage de l'objet / tableau "handler" passé en paramètre avec les valeurs du proxy
67
78
  */
68
- stopTemplateFilling(handler: any): void;
79
+ stopTemplateFilling(handler: TemplateFillingListener): void;
69
80
  /**
70
81
  * Maintient le remplissage de l'objet / tableau "handler" passé en paramètre avec les valeurs du proxy
71
82
  * Remplit toute valeur qu'elle soit présente ou pas initialement dans l'objet
72
83
  */
73
- startDynamicFilling(handler: any): void;
74
- stopDynamicFilling(handler: any): void;
84
+ startDynamicFilling(handler: DynamicFillingListener): void;
85
+ stopDynamicFilling(handler: DynamicFillingListener): void;
75
86
  /**
76
87
  * Assigne une nouvelle valeur au proxy ce qui déclenche la transmission de la donnée en fonction des "écouteurs" associés
77
88
  */
78
- set(newValue: any, lockInternalMutationsTransmission?: boolean): boolean;
89
+ set(newValue: T, lockInternalMutationsTransmission?: boolean): boolean;
79
90
  /**
80
91
  * Extraire la valeur actuelle du proxy
81
92
  */
82
- get(): any;
93
+ get(): T;
83
94
  }
84
95
  /**
85
96
  * Utilitaires de gestion des Publisher
86
97
  * Obtenir, replacer ou supprimer un Publisher
87
98
  *
88
99
  */
89
- export class PublisherManager {
90
- static instance: null;
100
+ export declare class PublisherManager {
101
+ static instance: PublisherManager | null;
102
+ publishers: Map<string, Publisher<PublisherContentType>>;
103
+ constructor();
91
104
  /**
92
105
  * PublisherManager est un singleton
93
106
  */
@@ -96,29 +109,31 @@ export class PublisherManager {
96
109
  * shortcut static pour obtenir un publisher vias sont id/adresse sans taper getInstance.
97
110
  * Si le publisher n'existe pas, il est créé.
98
111
  */
99
- static get(id: any): any;
112
+ static get(id: string): any;
100
113
  /**
101
114
  * shortcut static pour supprimer un publisher de la liste et appel également delete sur le publisher ce qui le supprime, de même que ses sous publishers
102
115
  */
103
- static delete(id: any): false | undefined;
104
- publishers: Map<any, any>;
116
+ static delete(id: string): boolean;
105
117
  /**
106
118
  * Obtenir un publisher vias sont id/adresse
107
119
  * Si le publisher n'existe pas, il est créé.
108
120
  */
109
- get(id: any): any;
121
+ get(id: string): any;
110
122
  /**
111
123
  * Remplace un publisher pour l'id fourni par un autre.
112
124
  * L'autre publisher n'est pas supprimé.
113
125
  */
114
- set(id: any, publisher: any): void;
126
+ set(id: string, publisher: Publisher): void;
115
127
  /**
116
128
  * supprimer un publisher de la liste et appel également delete sur le publisher ce qui le supprime, de même que ses sous publishers
117
129
  */
118
- delete(id: any): false | undefined;
130
+ delete(id: string): boolean;
119
131
  }
120
132
  /**
121
133
  * Le Proxy Javascript
122
134
  */
123
- export default class Publisher extends PublisherProxy {
135
+ export default class Publisher<T = PublisherContentType> extends PublisherProxy<T> {
136
+ constructor(target: T, parentProxPub?: PublisherProxy | null);
137
+ getProperty<U, K extends keyof U>(o: U, propertyName: K): U[K];
124
138
  }
139
+ export {};