@startinblox/core 0.17.31 → 0.18.0-beta.1

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 (255) hide show
  1. package/dist/_snowpack/pkg/autolinker.js +3515 -3367
  2. package/dist/_snowpack/pkg/autolinker.js.map +1 -1
  3. package/dist/_snowpack/pkg/common/{_baseUnary-217dffb2.js → _baseUnary-c1edb653.js} +16 -40
  4. package/dist/_snowpack/pkg/common/{_baseUnary-217dffb2.js.map → _baseUnary-c1edb653.js.map} +1 -1
  5. package/dist/_snowpack/pkg/common/{_commonjsHelpers-8c19dec8.js → _commonjsHelpers-37fa8da4.js} +6 -2
  6. package/dist/_snowpack/pkg/common/_commonjsHelpers-37fa8da4.js.map +1 -0
  7. package/dist/_snowpack/pkg/common/{decode-a4c334cf.js → decode-26fbf385.js} +38 -69
  8. package/dist/_snowpack/pkg/common/decode-26fbf385.js.map +1 -0
  9. package/dist/_snowpack/pkg/common/lit-html-3647afce.js +1104 -0
  10. package/dist/_snowpack/pkg/common/lit-html-3647afce.js.map +1 -0
  11. package/dist/_snowpack/pkg/delta-markdown-for-quill.js +4767 -4246
  12. package/dist/_snowpack/pkg/delta-markdown-for-quill.js.map +1 -1
  13. package/dist/_snowpack/pkg/dialog-polyfill.js +107 -139
  14. package/dist/_snowpack/pkg/dialog-polyfill.js.map +1 -1
  15. package/dist/_snowpack/pkg/fusejs.js +411 -601
  16. package/dist/_snowpack/pkg/fusejs.js.map +1 -1
  17. package/dist/_snowpack/pkg/jsonld-context-parser.js +718 -686
  18. package/dist/_snowpack/pkg/jsonld-context-parser.js.map +1 -1
  19. package/dist/_snowpack/pkg/leaflet.markercluster/dist/MarkerCluster.Default.css +59 -59
  20. package/dist/_snowpack/pkg/leaflet.markercluster/dist/MarkerCluster.Default.css.proxy.js +1 -1
  21. package/dist/_snowpack/pkg/leaflet.markercluster/dist/MarkerCluster.css +14 -14
  22. package/dist/_snowpack/pkg/leaflet.markercluster/dist/MarkerCluster.css.proxy.js +1 -1
  23. package/dist/_snowpack/pkg/lit-html/directives/if-defined.js +13 -14
  24. package/dist/_snowpack/pkg/lit-html/directives/if-defined.js.map +1 -1
  25. package/dist/_snowpack/pkg/lit-html/directives/unsafe-html.js +17 -15
  26. package/dist/_snowpack/pkg/lit-html/directives/unsafe-html.js.map +1 -1
  27. package/dist/_snowpack/pkg/lit-html/directives/until.js +45 -46
  28. package/dist/_snowpack/pkg/lit-html/directives/until.js.map +1 -1
  29. package/dist/_snowpack/pkg/lit-html.js +37 -35
  30. package/dist/_snowpack/pkg/lit-html.js.map +1 -1
  31. package/dist/_snowpack/pkg/markdown-it-link-attributes.js +1 -20
  32. package/dist/_snowpack/pkg/markdown-it-link-attributes.js.map +1 -1
  33. package/dist/_snowpack/pkg/markdown-it.js +1731 -2284
  34. package/dist/_snowpack/pkg/markdown-it.js.map +1 -1
  35. package/dist/_snowpack/pkg/quill-delta-to-markdown.js +236 -294
  36. package/dist/_snowpack/pkg/quill-delta-to-markdown.js.map +1 -1
  37. package/dist/_snowpack/pkg/quill.js +12077 -11017
  38. package/dist/_snowpack/pkg/quill.js.map +1 -1
  39. package/dist/_snowpack/pkg/slim-select.js +711 -1
  40. package/dist/_snowpack/pkg/slim-select.js.map +1 -1
  41. package/dist/_snowpack/pkg/tui-calendar/dist/tui-calendar.css +1 -16
  42. package/dist/_snowpack/pkg/tui-calendar/dist/tui-calendar.css.proxy.js +1 -1
  43. package/dist/_snowpack/pkg/tui-calendar.js +44297 -40075
  44. package/dist/_snowpack/pkg/tui-calendar.js.map +1 -1
  45. package/dist/components/solid-ac-checker.js +4 -17
  46. package/dist/components/solid-calendar.js +5 -26
  47. package/dist/components/solid-delete.js +9 -24
  48. package/dist/components/solid-display.js +15 -59
  49. package/dist/components/solid-form-search.js +27 -79
  50. package/dist/components/solid-form.js +48 -143
  51. package/dist/components/solid-lang.js +8 -19
  52. package/dist/components/solid-map.js +26 -64
  53. package/dist/components/solid-table.js +51 -133
  54. package/dist/components/solid-widget.js +2 -24
  55. package/dist/index.js +17 -11
  56. package/dist/libs/Component.js +4 -10
  57. package/dist/libs/ComponentFactory.js +6 -34
  58. package/dist/libs/Compositor.js +8 -15
  59. package/dist/libs/Sib.js +7 -21
  60. package/dist/libs/filter.js +184 -0
  61. package/dist/libs/helpers.js +19 -47
  62. package/dist/libs/interfaces.js +1 -1
  63. package/dist/libs/lit-helpers.js +7 -34
  64. package/dist/libs/polyfills.js +7 -10
  65. package/dist/libs/store/server-pagination.js +22 -0
  66. package/dist/libs/store/server-search.js +35 -0
  67. package/dist/libs/store/store.js +212 -227
  68. package/dist/mixins/attributeBinderMixin.js +17 -25
  69. package/dist/mixins/contextMixin.js +5 -7
  70. package/dist/mixins/counterMixin.js +2 -23
  71. package/dist/mixins/federationMixin.js +2 -14
  72. package/dist/mixins/filterMixin.js +60 -100
  73. package/dist/mixins/grouperMixin.js +11 -18
  74. package/dist/mixins/highlighterMixin.js +2 -8
  75. package/dist/mixins/interfaces.js +3 -5
  76. package/dist/mixins/listMixin.js +12 -43
  77. package/dist/mixins/nextMixin.js +1 -4
  78. package/dist/mixins/paginateMixin.js +17 -30
  79. package/dist/mixins/requiredMixin.js +1 -9
  80. package/dist/mixins/serverPaginationMixin.js +122 -0
  81. package/dist/mixins/sorterMixin.js +26 -44
  82. package/dist/mixins/storeMixin.js +28 -21
  83. package/dist/mixins/translationMixin.js +2 -12
  84. package/dist/mixins/validationMixin.js +28 -46
  85. package/dist/mixins/widgetMixin.js +58 -154
  86. package/dist/new-widgets/attributeMixins/actionMixin.js +1 -2
  87. package/dist/new-widgets/attributeMixins/blankMixin.js +1 -4
  88. package/dist/new-widgets/attributeMixins/booleanMixin.js +1 -4
  89. package/dist/new-widgets/attributeMixins/index.js +1 -2
  90. package/dist/new-widgets/attributeMixins/mailtoMixin.js +1 -4
  91. package/dist/new-widgets/attributeMixins/multipleMixin.js +1 -2
  92. package/dist/new-widgets/attributeMixins/numberMixin.js +1 -4
  93. package/dist/new-widgets/attributeMixins/placeholderMixin.js +1 -4
  94. package/dist/new-widgets/attributeMixins/telMixin.js +1 -4
  95. package/dist/new-widgets/baseWidgetMixin.js +5 -18
  96. package/dist/new-widgets/callbackMixins/autocompletionMixin.js +3 -11
  97. package/dist/new-widgets/callbackMixins/index.js +1 -2
  98. package/dist/new-widgets/callbackMixins/richtextMixin.js +1 -6
  99. package/dist/new-widgets/interfaces.js +1 -0
  100. package/dist/new-widgets/new-widget-factory.js +14 -19
  101. package/dist/new-widgets/templateAdditionMixins/addableMixin.js +6 -21
  102. package/dist/new-widgets/templateAdditionMixins/index.js +2 -3
  103. package/dist/new-widgets/templateAdditionMixins/labelLastMixin.js +5 -18
  104. package/dist/new-widgets/templateAdditionMixins/labelMixin.js +5 -18
  105. package/dist/new-widgets/templates/defaultTemplatesDirectory.js +21 -27
  106. package/dist/new-widgets/templates/displayTemplatesDirectory.js +35 -70
  107. package/dist/new-widgets/templates/formTemplatesDirectory.js +350 -315
  108. package/dist/new-widgets/templates/groupTemplatesDirectory.js +5 -15
  109. package/dist/new-widgets/templates/index.js +1 -2
  110. package/dist/new-widgets/templates/setTemplatesDirectory.js +4 -37
  111. package/dist/new-widgets/templatesDependencies/altMixin.js +1 -2
  112. package/dist/new-widgets/templatesDependencies/editableMixin.js +9 -26
  113. package/dist/new-widgets/templatesDependencies/filterRangeFormMixin.js +3 -7
  114. package/dist/new-widgets/templatesDependencies/formCheckboxMixin.js +1 -5
  115. package/dist/new-widgets/templatesDependencies/formCheckboxesMixin.js +1 -11
  116. package/dist/new-widgets/templatesDependencies/formDropdownMixin.js +3 -13
  117. package/dist/new-widgets/templatesDependencies/formFileMixin.js +1 -13
  118. package/dist/new-widgets/templatesDependencies/formLengthMixin.js +1 -2
  119. package/dist/new-widgets/templatesDependencies/formMinMaxMixin.js +1 -2
  120. package/dist/new-widgets/templatesDependencies/formMixin.js +4 -14
  121. package/dist/new-widgets/templatesDependencies/formNumberMixin.js +1 -5
  122. package/dist/new-widgets/templatesDependencies/formRadioMixin.js +1 -5
  123. package/dist/new-widgets/templatesDependencies/formStepMixin.js +1 -2
  124. package/dist/new-widgets/templatesDependencies/linkTextMixin.js +13 -0
  125. package/dist/new-widgets/templatesDependencies/multipleFormMixin.js +23 -18
  126. package/dist/new-widgets/templatesDependencies/multipleselectFormMixin.js +1 -10
  127. package/dist/new-widgets/templatesDependencies/patternMixin.js +1 -2
  128. package/dist/new-widgets/templatesDependencies/rangeMixin.js +5 -15
  129. package/dist/new-widgets/templatesDependencies/setMixin.js +1 -4
  130. package/dist/new-widgets/templatesDependencies/valueRichtextMixin.js +1 -4
  131. package/dist/new-widgets/valueTransformationMixins/autolinkMixin.js +1 -5
  132. package/dist/new-widgets/valueTransformationMixins/dateMixin.js +5 -11
  133. package/dist/new-widgets/valueTransformationMixins/dateTimeMixin.js +1 -5
  134. package/dist/new-widgets/valueTransformationMixins/index.js +1 -2
  135. package/dist/new-widgets/valueTransformationMixins/markdownMixin.js +1 -7
  136. package/dist/new-widgets/valueTransformationMixins/multilineMixin.js +1 -5
  137. package/dist/new-widgets/valueTransformationMixins/oembedMixin.js +1 -7
  138. package/dist/solid-template-element.js +24 -44
  139. package/dist/widgets/baseWidget.js +21 -85
  140. package/dist/widgets/widget-factory.js +4 -6
  141. package/package.json +8 -6
  142. package/dist/_snowpack/env.js +0 -3
  143. package/dist/_snowpack/pkg/autolinker.js.map.proxy.js +0 -1
  144. package/dist/_snowpack/pkg/common/_baseUnary-217dffb2.js.map.proxy.js +0 -1
  145. package/dist/_snowpack/pkg/common/_commonjsHelpers-8c19dec8.js.map +0 -1
  146. package/dist/_snowpack/pkg/common/_commonjsHelpers-8c19dec8.js.map.proxy.js +0 -1
  147. package/dist/_snowpack/pkg/common/decode-a4c334cf.js.map +0 -1
  148. package/dist/_snowpack/pkg/common/decode-a4c334cf.js.map.proxy.js +0 -1
  149. package/dist/_snowpack/pkg/common/lit-html-babd44cd.js +0 -1119
  150. package/dist/_snowpack/pkg/common/lit-html-babd44cd.js.map +0 -1
  151. package/dist/_snowpack/pkg/common/lit-html-babd44cd.js.map.proxy.js +0 -1
  152. package/dist/_snowpack/pkg/delta-markdown-for-quill.js.map.proxy.js +0 -1
  153. package/dist/_snowpack/pkg/dialog-polyfill.js.map.proxy.js +0 -1
  154. package/dist/_snowpack/pkg/fusejs.js.map.proxy.js +0 -1
  155. package/dist/_snowpack/pkg/jsonld-context-parser.js.map.proxy.js +0 -1
  156. package/dist/_snowpack/pkg/lit-html/directives/if-defined.js.map.proxy.js +0 -1
  157. package/dist/_snowpack/pkg/lit-html/directives/unsafe-html.js.map.proxy.js +0 -1
  158. package/dist/_snowpack/pkg/lit-html/directives/until.js.map.proxy.js +0 -1
  159. package/dist/_snowpack/pkg/lit-html.js.map.proxy.js +0 -1
  160. package/dist/_snowpack/pkg/markdown-it-link-attributes.js.map.proxy.js +0 -1
  161. package/dist/_snowpack/pkg/markdown-it.js.map.proxy.js +0 -1
  162. package/dist/_snowpack/pkg/quill-delta-to-markdown.js.map.proxy.js +0 -1
  163. package/dist/_snowpack/pkg/quill.js.map.proxy.js +0 -1
  164. package/dist/_snowpack/pkg/slim-select.js.map.proxy.js +0 -1
  165. package/dist/_snowpack/pkg/tui-calendar.js.map.proxy.js +0 -1
  166. package/dist/components/solid-ac-checker.js.map +0 -1
  167. package/dist/components/solid-calendar.js.map +0 -1
  168. package/dist/components/solid-delete.js.map +0 -1
  169. package/dist/components/solid-display.js.map +0 -1
  170. package/dist/components/solid-form-search.js.map +0 -1
  171. package/dist/components/solid-form.js.map +0 -1
  172. package/dist/components/solid-lang.js.map +0 -1
  173. package/dist/components/solid-map.js.map +0 -1
  174. package/dist/components/solid-table.js.map +0 -1
  175. package/dist/components/solid-widget.js.map +0 -1
  176. package/dist/index.js.map +0 -1
  177. package/dist/libs/Component.js.map +0 -1
  178. package/dist/libs/ComponentFactory.js.map +0 -1
  179. package/dist/libs/Compositor.js.map +0 -1
  180. package/dist/libs/Sib.js.map +0 -1
  181. package/dist/libs/helpers.js.map +0 -1
  182. package/dist/libs/interfaces.js.map +0 -1
  183. package/dist/libs/lit-helpers.js.map +0 -1
  184. package/dist/libs/polyfills.js.map +0 -1
  185. package/dist/libs/store/store.js.map +0 -1
  186. package/dist/mixins/attributeBinderMixin.js.map +0 -1
  187. package/dist/mixins/contextMixin.js.map +0 -1
  188. package/dist/mixins/counterMixin.js.map +0 -1
  189. package/dist/mixins/federationMixin.js.map +0 -1
  190. package/dist/mixins/filterMixin.js.map +0 -1
  191. package/dist/mixins/grouperMixin.js.map +0 -1
  192. package/dist/mixins/highlighterMixin.js.map +0 -1
  193. package/dist/mixins/interfaces.js.map +0 -1
  194. package/dist/mixins/listMixin.js.map +0 -1
  195. package/dist/mixins/nextMixin.js.map +0 -1
  196. package/dist/mixins/paginateMixin.js.map +0 -1
  197. package/dist/mixins/requiredMixin.js.map +0 -1
  198. package/dist/mixins/sorterMixin.js.map +0 -1
  199. package/dist/mixins/storeMixin.js.map +0 -1
  200. package/dist/mixins/translationMixin.js.map +0 -1
  201. package/dist/mixins/validationMixin.js.map +0 -1
  202. package/dist/mixins/widgetMixin.js.map +0 -1
  203. package/dist/new-widgets/attributeMixins/actionMixin.js.map +0 -1
  204. package/dist/new-widgets/attributeMixins/blankMixin.js.map +0 -1
  205. package/dist/new-widgets/attributeMixins/booleanMixin.js.map +0 -1
  206. package/dist/new-widgets/attributeMixins/index.js.map +0 -1
  207. package/dist/new-widgets/attributeMixins/mailtoMixin.js.map +0 -1
  208. package/dist/new-widgets/attributeMixins/multipleMixin.js.map +0 -1
  209. package/dist/new-widgets/attributeMixins/numberMixin.js.map +0 -1
  210. package/dist/new-widgets/attributeMixins/placeholderMixin.js.map +0 -1
  211. package/dist/new-widgets/attributeMixins/telMixin.js.map +0 -1
  212. package/dist/new-widgets/baseWidgetMixin.js.map +0 -1
  213. package/dist/new-widgets/callbackMixins/autocompletionMixin.js.map +0 -1
  214. package/dist/new-widgets/callbackMixins/index.js.map +0 -1
  215. package/dist/new-widgets/callbackMixins/richtextMixin.js.map +0 -1
  216. package/dist/new-widgets/new-widget-factory.js.map +0 -1
  217. package/dist/new-widgets/templateAdditionMixins/addableMixin.js.map +0 -1
  218. package/dist/new-widgets/templateAdditionMixins/index.js.map +0 -1
  219. package/dist/new-widgets/templateAdditionMixins/labelLastMixin.js.map +0 -1
  220. package/dist/new-widgets/templateAdditionMixins/labelMixin.js.map +0 -1
  221. package/dist/new-widgets/templates/defaultTemplatesDirectory.js.map +0 -1
  222. package/dist/new-widgets/templates/displayTemplatesDirectory.js.map +0 -1
  223. package/dist/new-widgets/templates/formTemplatesDirectory.js.map +0 -1
  224. package/dist/new-widgets/templates/groupTemplatesDirectory.js.map +0 -1
  225. package/dist/new-widgets/templates/index.js.map +0 -1
  226. package/dist/new-widgets/templates/setTemplatesDirectory.js.map +0 -1
  227. package/dist/new-widgets/templatesDependencies/altMixin.js.map +0 -1
  228. package/dist/new-widgets/templatesDependencies/editableMixin.js.map +0 -1
  229. package/dist/new-widgets/templatesDependencies/filterRangeFormMixin.js.map +0 -1
  230. package/dist/new-widgets/templatesDependencies/formCheckboxMixin.js.map +0 -1
  231. package/dist/new-widgets/templatesDependencies/formCheckboxesMixin.js.map +0 -1
  232. package/dist/new-widgets/templatesDependencies/formDropdownMixin.js.map +0 -1
  233. package/dist/new-widgets/templatesDependencies/formFileMixin.js.map +0 -1
  234. package/dist/new-widgets/templatesDependencies/formLengthMixin.js.map +0 -1
  235. package/dist/new-widgets/templatesDependencies/formMinMaxMixin.js.map +0 -1
  236. package/dist/new-widgets/templatesDependencies/formMixin.js.map +0 -1
  237. package/dist/new-widgets/templatesDependencies/formNumberMixin.js.map +0 -1
  238. package/dist/new-widgets/templatesDependencies/formRadioMixin.js.map +0 -1
  239. package/dist/new-widgets/templatesDependencies/formStepMixin.js.map +0 -1
  240. package/dist/new-widgets/templatesDependencies/multipleFormMixin.js.map +0 -1
  241. package/dist/new-widgets/templatesDependencies/multipleselectFormMixin.js.map +0 -1
  242. package/dist/new-widgets/templatesDependencies/patternMixin.js.map +0 -1
  243. package/dist/new-widgets/templatesDependencies/rangeMixin.js.map +0 -1
  244. package/dist/new-widgets/templatesDependencies/setMixin.js.map +0 -1
  245. package/dist/new-widgets/templatesDependencies/valueRichtextMixin.js.map +0 -1
  246. package/dist/new-widgets/valueTransformationMixins/autolinkMixin.js.map +0 -1
  247. package/dist/new-widgets/valueTransformationMixins/dateMixin.js.map +0 -1
  248. package/dist/new-widgets/valueTransformationMixins/dateTimeMixin.js.map +0 -1
  249. package/dist/new-widgets/valueTransformationMixins/index.js.map +0 -1
  250. package/dist/new-widgets/valueTransformationMixins/markdownMixin.js.map +0 -1
  251. package/dist/new-widgets/valueTransformationMixins/multilineMixin.js.map +0 -1
  252. package/dist/new-widgets/valueTransformationMixins/oembedMixin.js.map +0 -1
  253. package/dist/solid-template-element.js.map +0 -1
  254. package/dist/widgets/baseWidget.js.map +0 -1
  255. package/dist/widgets/widget-factory.js.map +0 -1
@@ -1,10 +1,7 @@
1
1
  const NumberMixin = {
2
2
  name: 'number-mixin',
3
-
4
3
  get type() {
5
4
  return 'number';
6
5
  }
7
-
8
6
  };
9
- export { NumberMixin };
10
- //# sourceMappingURL=numberMixin.js.map
7
+ export { NumberMixin };
@@ -9,11 +9,8 @@ const PlaceholderMixin = {
9
9
  }
10
10
  }
11
11
  },
12
-
13
12
  attached() {
14
13
  this.listAttributes['placeholder'] = this.placeholder || this.label || this.name || '';
15
14
  }
16
-
17
15
  };
18
- export { PlaceholderMixin };
19
- //# sourceMappingURL=placeholderMixin.js.map
16
+ export { PlaceholderMixin };
@@ -1,10 +1,7 @@
1
1
  const TelMixin = {
2
2
  name: 'tel-mixin',
3
-
4
3
  created() {
5
4
  this.listAttributes['tel'] = 'tel:';
6
5
  }
7
-
8
6
  };
9
- export { TelMixin };
10
- //# sourceMappingURL=telMixin.js.map
7
+ export { TelMixin };
@@ -40,11 +40,9 @@ const BaseWidgetMixin = {
40
40
  listCallbacks: [],
41
41
  renderPlanned: false
42
42
  },
43
-
44
43
  get template() {
45
44
  return null;
46
45
  },
47
-
48
46
  created() {
49
47
  this.listValueTransformations = [];
50
48
  this.listAttributes = {};
@@ -52,15 +50,12 @@ const BaseWidgetMixin = {
52
50
  this.listCallbacks = [];
53
51
  this.subscription = null;
54
52
  },
55
-
56
53
  attached() {
57
54
  this.planRender();
58
55
  },
59
-
60
56
  detached() {
61
57
  if (this.subscription) PubSub.unsubscribe(this.subscription);
62
58
  },
63
-
64
59
  planRender() {
65
60
  if (!this.renderPlanned && document.body.contains(this.element)) {
66
61
  this.renderPlanned = true;
@@ -70,53 +65,45 @@ const BaseWidgetMixin = {
70
65
  });
71
66
  }
72
67
  },
73
-
74
68
  render() {
75
69
  const listValueTransformations = [...this.listValueTransformations];
76
70
  listValueTransformations.push(this.renderTemplate.bind(this));
77
71
  const nextProcessor = listValueTransformations.shift();
78
- nextProcessor(this.value, listValueTransformations); // Callbacks
72
+ nextProcessor(this.value, listValueTransformations);
79
73
 
74
+ // Callbacks
80
75
  const listCallbacks = [...this.listCallbacks];
81
-
82
76
  if (listCallbacks.length) {
83
77
  const nextCallback = listCallbacks.shift();
84
78
  nextCallback(this.value, listCallbacks);
85
79
  }
86
-
87
80
  this.element.dispatchEvent(new CustomEvent('widgetRendered', {
88
81
  bubbles: true
89
82
  }));
90
83
  },
91
-
92
84
  renderTemplate(value) {
93
- const template = this.template(value, { ...this.listAttributes
85
+ const template = this.template(value, {
86
+ ...this.listAttributes
94
87
  });
95
88
  const listTemplateAdditions = [...this.listTemplateAdditions];
96
89
  listTemplateAdditions.push(this.templateToDOM.bind(this));
97
90
  const nextProcessor = listTemplateAdditions.shift();
98
91
  nextProcessor(template, listTemplateAdditions);
99
92
  },
100
-
101
93
  templateToDOM(template) {
102
94
  render(template, this.element);
103
95
  },
104
-
105
96
  addToAttributes(value, attrKey) {
106
97
  if (value !== null && value !== this.listAttributes[attrKey]) {
107
98
  this.listAttributes[attrKey] = value;
108
99
  this.planRender();
109
100
  }
110
101
  },
111
-
112
102
  subscribe(event) {
113
103
  this.subscription = PubSub.subscribe(event, () => this.planRender());
114
104
  },
115
-
116
105
  update() {
117
106
  this.planRender();
118
107
  }
119
-
120
108
  };
121
- export { BaseWidgetMixin };
122
- //# sourceMappingURL=baseWidgetMixin.js.map
109
+ export { BaseWidgetMixin };
@@ -24,7 +24,6 @@ const AutocompletionMixin = {
24
24
  slimSelect: null,
25
25
  mutationObserver: null
26
26
  },
27
-
28
27
  created() {
29
28
  //@ts-ignore
30
29
  import("./slimselect.css.proxy.js");
@@ -32,23 +31,19 @@ const AutocompletionMixin = {
32
31
  this.addToAttributes(true, 'autocomplete');
33
32
  this.listCallbacks.push(this.addCallback.bind(this));
34
33
  },
35
-
36
34
  detached() {
37
35
  if (this.slimSelect) this.slimSelect.destroy();
38
36
  if (this.mutationObserver) this.mutationObserver.disconnect();
39
37
  },
40
-
41
38
  addCallback(value, listCallbacks) {
42
39
  if (this.slimSelect) return;
43
40
  let select = this.element.querySelector('select');
44
-
45
41
  if (select) {
46
42
  this.initSlimSelect(select);
47
43
  } else {
48
44
  // if no select available, wait for one and init slimSelect
49
45
  new MutationObserver((_m, observer) => {
50
46
  const select = this.element.querySelector('select');
51
-
52
47
  if (select) {
53
48
  this.initSlimSelect(select);
54
49
  observer.disconnect(); // then disconnect mutationObserver
@@ -59,11 +54,9 @@ const AutocompletionMixin = {
59
54
  subtree: true
60
55
  });
61
56
  }
62
-
63
57
  const nextProcessor = listCallbacks.shift();
64
58
  if (nextProcessor) nextProcessor(value, listCallbacks);
65
59
  },
66
-
67
60
  initSlimSelect(select) {
68
61
  const slimSelect = new SlimSelect({
69
62
  select
@@ -80,8 +73,9 @@ const AutocompletionMixin = {
80
73
  // avoid update search result when search in slimSelect suggestions
81
74
  e.stopPropagation();
82
75
  }
83
- }); // when data changes, re-build slimSelect
76
+ });
84
77
 
78
+ // when data changes, re-build slimSelect
85
79
  if (this.mutationObserver) this.mutationObserver.disconnect();
86
80
  this.mutationObserver = new MutationObserver(() => {
87
81
  this.slimSelect.destroy();
@@ -98,7 +92,5 @@ const AutocompletionMixin = {
98
92
  subtree: true
99
93
  });
100
94
  }
101
-
102
95
  };
103
- export { AutocompletionMixin };
104
- //# sourceMappingURL=autocompletionMixin.js.map
96
+ export { AutocompletionMixin };
@@ -4,5 +4,4 @@ const callbackDirectory = {
4
4
  autocompletion: AutocompletionMixin,
5
5
  richtext: RichtextMixin
6
6
  };
7
- export { callbackDirectory, AutocompletionMixin, RichtextMixin };
8
- //# sourceMappingURL=index.js.map
7
+ export { callbackDirectory, AutocompletionMixin, RichtextMixin };
@@ -5,14 +5,12 @@ const RichtextMixin = {
5
5
  initialState: {
6
6
  quill: null
7
7
  },
8
-
9
8
  created() {
10
9
  //@ts-ignore
11
10
  import("../../_snowpack/pkg/quill/dist/quill.snow.css.proxy.js");
12
11
  this.quill = null;
13
12
  this.listCallbacks.push(this.addCallback.bind(this));
14
13
  },
15
-
16
14
  addCallback(value, listCallbacks) {
17
15
  if (this.quill == null) {
18
16
  var toolbarOptions = [['bold', 'italic'], ['blockquote'], [{
@@ -30,13 +28,10 @@ const RichtextMixin = {
30
28
  theme: 'snow'
31
29
  });
32
30
  }
33
-
34
31
  const ops = deltaMd.toDelta(this.value);
35
32
  this.quill.setContents(ops);
36
33
  const nextProcessor = listCallbacks.shift();
37
34
  if (nextProcessor) nextProcessor(value, listCallbacks);
38
35
  }
39
-
40
36
  };
41
- export { RichtextMixin };
42
- //# sourceMappingURL=richtextMixin.js.map
37
+ export { RichtextMixin };
@@ -0,0 +1 @@
1
+ export {};
@@ -9,14 +9,13 @@ const valueTransformationKeys = Object.keys(valueTransformationDirectory);
9
9
  const attributeKeys = Object.keys(attributeDirectory);
10
10
  const templateAdditionKeys = Object.keys(templateAdditionDirectory);
11
11
  const callbackKeys = Object.keys(callbackDirectory);
12
+
12
13
  /**
13
14
  * Create and register a widget based on its tagName
14
15
  * @param tagName - string
15
16
  */
16
-
17
17
  export const newWidgetFactory = tagName => {
18
18
  let widgetMixins;
19
-
20
19
  try {
21
20
  widgetMixins = getWidgetMixins(tagName);
22
21
  } // get mixins and template
@@ -24,7 +23,6 @@ export const newWidgetFactory = tagName => {
24
23
  console.error(e);
25
24
  return;
26
25
  }
27
-
28
26
  const newWidget = {
29
27
  // compose widget
30
28
  name: tagName,
@@ -34,63 +32,60 @@ export const newWidgetFactory = tagName => {
34
32
  get template() {
35
33
  return widgetMixins.templateMixin.template;
36
34
  }
37
-
38
35
  };
39
36
  Sib.register(newWidget); // and register component
40
37
  };
38
+
41
39
  /**
42
40
  * Returns mixins and the template of a widget, depending of its tagName
43
41
  * @param tagName - string
44
42
  */
45
-
46
43
  function getWidgetMixins(tagName) {
47
44
  const valueTransformations = [];
48
45
  const attributes = [];
49
46
  const templateAdditions = [];
50
47
  const callbacks = [];
51
- let template = null; // decompose widget name
48
+ let template = null;
52
49
 
53
- const mixinNames = tagName.split('-').filter(t => t !== 'solid'); // choose widget type (default or set)
50
+ // decompose widget name
51
+ const mixinNames = tagName.split('-').filter(t => t !== 'solid');
54
52
 
53
+ // choose widget type (default or set)
55
54
  let widgetType = defaultTemplates;
56
55
  if (mixinNames.includes('display')) widgetType = displayTemplates;else if (mixinNames.includes('form')) widgetType = formTemplates;else if (mixinNames.includes('set')) widgetType = setTemplates;else if (mixinNames.includes('group')) widgetType = groupTemplates;
57
- const templateKeys = Object.keys(widgetType); // build mixins array
56
+ const templateKeys = Object.keys(widgetType);
58
57
 
58
+ // build mixins array
59
59
  for (const mixin of mixinNames) {
60
60
  // features
61
61
  if (valueTransformationKeys.includes(mixin)) {
62
62
  valueTransformations.push(valueTransformationDirectory[mixin]);
63
63
  }
64
-
65
64
  if (attributeKeys.includes(mixin)) {
66
65
  attributes.push(attributeDirectory[mixin]);
67
66
  }
68
-
69
67
  if (templateAdditionKeys.includes(mixin)) {
70
68
  templateAdditions.push(templateAdditionDirectory[mixin]);
71
69
  }
72
-
73
70
  if (callbackKeys.includes(mixin)) {
74
71
  callbacks.push(callbackDirectory[mixin]);
75
- } // template
76
-
72
+ }
77
73
 
74
+ // template
78
75
  if (templateKeys.includes(mixin)) {
79
76
  template = widgetType[mixin];
80
77
  }
81
78
  }
82
-
83
- if (!template) throw "No template found for widget \"".concat(tagName, "\"");
79
+ if (!template) throw `No template found for widget "${tagName}"`;
84
80
  return {
85
81
  templateMixin: template,
86
82
  mixins: [...valueTransformations, ...attributes, ...templateAdditions, ...(template.dependencies || []), ...callbacks]
87
83
  };
88
- } // create default widgets
89
-
84
+ }
90
85
 
86
+ // create default widgets
91
87
  newWidgetFactory('solid-form-dropdown');
92
88
  newWidgetFactory('solid-form-multicheckbox');
93
89
  newWidgetFactory('solid-form-file-label');
94
90
  newWidgetFactory('solid-action');
95
- newWidgetFactory('solid-group-default');
96
- //# sourceMappingURL=new-widget-factory.js.map
91
+ newWidgetFactory('solid-group-default');
@@ -1,41 +1,26 @@
1
- function _templateObject() {
2
- const data = _taggedTemplateLiteral(["\n ", "\n <solid-form ...=", ">\n </solid-form>\n "]);
3
-
4
- _templateObject = function () {
5
- return data;
6
- };
7
-
8
- return data;
9
- }
10
-
11
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
12
-
13
1
  import { spread } from '../../libs/lit-helpers.js';
14
2
  import { html } from '../../_snowpack/pkg/lit-html.js';
15
3
  const AddableMixin = {
16
4
  name: 'addable-mixin',
17
-
18
5
  created() {
19
6
  this.listTemplateAdditions.push(this.addableValue.bind(this));
20
7
  },
21
-
22
8
  getAddableAttributes() {
23
9
  const addableAttr = Array.from(this.element.attributes).filter(a => a.name.startsWith('addable-'));
24
10
  const cleanAddableAttr = {};
25
-
26
11
  for (let attr of addableAttr) cleanAddableAttr[attr.name.replace('addable-', '')] = attr.value;
27
-
28
12
  if (!cleanAddableAttr.hasOwnProperty('data-src')) cleanAddableAttr['data-src'] = this.range;
29
13
  return cleanAddableAttr;
30
14
  },
31
-
32
15
  addableValue(template, listTemplateAdditions, attributes) {
33
16
  const addables = this.getAddableAttributes(attributes);
34
- const newTemplate = html(_templateObject(), template, spread(addables));
17
+ const newTemplate = html`
18
+ ${template}
19
+ <solid-form ...=${spread(addables)}>
20
+ </solid-form>
21
+ `;
35
22
  const nextProcessor = listTemplateAdditions.shift();
36
23
  if (nextProcessor) nextProcessor(newTemplate, listTemplateAdditions);
37
24
  }
38
-
39
25
  };
40
- export { AddableMixin };
41
- //# sourceMappingURL=addableMixin.js.map
26
+ export { AddableMixin };
@@ -1,14 +1,13 @@
1
1
  import { LabelMixin } from './labelMixin.js';
2
2
  import { LabelLastMixin } from './labelLastMixin.js';
3
3
  import { AddableMixin } from './addableMixin.js';
4
+
4
5
  /**
5
6
  * DOM Additions
6
7
  */
7
-
8
8
  const templateAdditionDirectory = {
9
9
  label: LabelMixin,
10
10
  labellast: LabelLastMixin,
11
11
  addable: AddableMixin
12
12
  };
13
- export { templateAdditionDirectory, LabelMixin, LabelLastMixin, AddableMixin };
14
- //# sourceMappingURL=index.js.map
13
+ export { templateAdditionDirectory, LabelMixin, LabelLastMixin, AddableMixin };
@@ -1,29 +1,16 @@
1
- function _templateObject() {
2
- const data = _taggedTemplateLiteral(["\n ", "\n <label>", "</label>\n "]);
3
-
4
- _templateObject = function () {
5
- return data;
6
- };
7
-
8
- return data;
9
- }
10
-
11
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
12
-
13
1
  import { html } from '../../_snowpack/pkg/lit-html.js';
14
2
  const LabelLastMixin = {
15
3
  name: 'label-last-mixin',
16
-
17
4
  created() {
18
5
  this.listTemplateAdditions.push(this.addLabelLast.bind(this));
19
6
  },
20
-
21
7
  addLabelLast(template, listTemplateAdditions) {
22
- const newTemplate = html(_templateObject(), template, this.label || this.name);
8
+ const newTemplate = html`
9
+ ${template}
10
+ <label>${this.label || this.name}</label>
11
+ `;
23
12
  const nextProcessor = listTemplateAdditions.shift();
24
13
  if (nextProcessor) nextProcessor(newTemplate, listTemplateAdditions);
25
14
  }
26
-
27
15
  };
28
- export { LabelLastMixin };
29
- //# sourceMappingURL=labelLastMixin.js.map
16
+ export { LabelLastMixin };
@@ -1,31 +1,18 @@
1
- function _templateObject() {
2
- const data = _taggedTemplateLiteral(["\n <label for=\"", "\">", "</label>\n ", "\n "]);
3
-
4
- _templateObject = function () {
5
- return data;
6
- };
7
-
8
- return data;
9
- }
10
-
11
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
12
-
13
1
  import { html } from '../../_snowpack/pkg/lit-html.js';
14
2
  import { uniqID } from '../../libs/helpers.js';
15
3
  const LabelMixin = {
16
4
  name: 'label-mixin',
17
-
18
5
  created() {
19
6
  this.listAttributes['id'] = uniqID();
20
7
  this.listTemplateAdditions.push(this.addLabel.bind(this));
21
8
  },
22
-
23
9
  addLabel(template, listTemplateAdditions) {
24
- const newTemplate = html(_templateObject(), this.listAttributes['id'], this.label || this.name, template);
10
+ const newTemplate = html`
11
+ <label for="${this.listAttributes['id']}">${this.label || this.name}</label>
12
+ ${template}
13
+ `;
25
14
  const nextProcessor = listTemplateAdditions.shift();
26
15
  if (nextProcessor) nextProcessor(newTemplate, listTemplateAdditions);
27
16
  }
28
-
29
17
  };
30
- export { LabelMixin };
31
- //# sourceMappingURL=labelMixin.js.map
18
+ export { LabelMixin };
@@ -1,35 +1,29 @@
1
- function _templateObject2() {
2
- const data = _taggedTemplateLiteral(["\n <solid-display\n data-src=", "\n fields=", "\n next=", "\n empty-widget=", "\n ></solid-display>\n "]);
3
-
4
- _templateObject2 = function () {
5
- return data;
6
- };
7
-
8
- return data;
9
- }
10
-
11
- function _templateObject() {
12
- const data = _taggedTemplateLiteral(["\n <solid-link\n data-src=", "\n next=", "\n >\n ", "\n </solid-link>\n "]);
13
-
14
- _templateObject = function () {
15
- return data;
16
- };
17
-
18
- return data;
19
- }
20
-
21
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
22
-
23
1
  import { html } from '../../_snowpack/pkg/lit-html.js';
24
2
  import { ifDefined } from '../../_snowpack/pkg/lit-html/directives/if-defined.js';
3
+ import { LinkTextMixin } from '../templatesDependencies/linkTextMixin.js';
25
4
  export const defaultTemplates = {
26
5
  action: {
27
- template: (value, attributes) => html(_templateObject(), ifDefined(attributes.src), ifDefined(value), attributes.label == null ? attributes.name || '' : attributes.label),
28
- dependencies: []
6
+ template: (value, attributes) => html`
7
+ <solid-link
8
+ data-src=${ifDefined(attributes.src)}
9
+ next=${ifDefined(value)}
10
+ id=${ifDefined(attributes.id)}
11
+ link-text=${ifDefined(attributes.linkText)}
12
+ >
13
+ ${attributes.linkText == null ? attributes.name || '' : attributes.linkText}
14
+ </solid-link>
15
+ `,
16
+ dependencies: [LinkTextMixin]
29
17
  },
30
18
  multiple: {
31
- template: (value, attributes) => html(_templateObject2(), value || '', ifDefined(attributes.fields), ifDefined(attributes.next), ifDefined(attributes.emptyWidget)),
19
+ template: (value, attributes) => html`
20
+ <solid-display
21
+ data-src=${value || ''}
22
+ fields=${ifDefined(attributes.fields)}
23
+ next=${ifDefined(attributes.next)}
24
+ empty-widget=${ifDefined(attributes.emptyWidget)}
25
+ ></solid-display>
26
+ `,
32
27
  dependencies: []
33
28
  }
34
- };
35
- //# sourceMappingURL=defaultTemplatesDirectory.js.map
29
+ };
@@ -1,89 +1,54 @@
1
- function _templateObject6() {
2
- const data = _taggedTemplateLiteral(["<label>", "</label>"]);
3
-
4
- _templateObject6 = function () {
5
- return data;
6
- };
7
-
8
- return data;
9
- }
10
-
11
- function _templateObject5() {
12
- const data = _taggedTemplateLiteral(["\n ", "\n "]);
13
-
14
- _templateObject5 = function () {
15
- return data;
16
- };
17
-
18
- return data;
19
- }
20
-
21
- function _templateObject4() {
22
- const data = _taggedTemplateLiteral(["\n <img\n name=", "\n src=", "\n alt=", "\n style=\"max-width: 100%; max-height: 100%;\"\n />\n "]);
23
-
24
- _templateObject4 = function () {
25
- return data;
26
- };
27
-
28
- return data;
29
- }
30
-
31
- function _templateObject3() {
32
- const data = _taggedTemplateLiteral(["\n <a\n name=", "\n href=", "\n target=", "\n ?data-editable=", "\n >\n ", "\n </a>\n "]);
33
-
34
- _templateObject3 = function () {
35
- return data;
36
- };
37
-
38
- return data;
39
- }
40
-
41
- function _templateObject2() {
42
- const data = _taggedTemplateLiteral(["\n <div\n name=", "\n ?data-editable=", "\n >\n ", "\n </div>\n "]);
43
-
44
- _templateObject2 = function () {
45
- return data;
46
- };
47
-
48
- return data;
49
- }
50
-
51
- function _templateObject() {
52
- const data = _taggedTemplateLiteral(["", ""]);
53
-
54
- _templateObject = function () {
55
- return data;
56
- };
57
-
58
- return data;
59
- }
60
-
61
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
62
-
63
1
  import { EditableMixin } from '../templatesDependencies/editableMixin.js';
64
2
  import { AltMixin } from '../templatesDependencies/altMixin.js';
3
+ import { LinkTextMixin } from '../templatesDependencies/linkTextMixin.js';
65
4
  import { html } from '../../_snowpack/pkg/lit-html.js';
66
5
  import { ifDefined } from '../../_snowpack/pkg/lit-html/directives/if-defined.js';
67
6
  export const displayTemplates = {
68
7
  value: {
69
- template: value => html(_templateObject(), value),
8
+ template: value => html`${value}`,
70
9
  dependencies: []
71
10
  },
72
11
  div: {
73
- template: (value, attributes) => html(_templateObject2(), ifDefined(attributes.name), attributes.editable, value),
12
+ template: (value, attributes) => html`
13
+ <div
14
+ name=${ifDefined(attributes.name)}
15
+ ?data-editable=${attributes.editable}
16
+ >
17
+ ${value}
18
+ </div>
19
+ `,
74
20
  dependencies: [EditableMixin]
75
21
  },
76
22
  link: {
77
- template: (value, attributes) => html(_templateObject3(), ifDefined(attributes.name), (attributes.mailto || attributes.tel || '') + (value || '#'), ifDefined(attributes.target), attributes.editable, attributes.label || value || ''),
78
- dependencies: [EditableMixin]
23
+ template: (value, attributes) => html`
24
+ <a
25
+ name=${ifDefined(attributes.name)}
26
+ href=${(attributes.mailto || attributes.tel || '') + (value || '#')}
27
+ target=${ifDefined(attributes.target)}
28
+ ?data-editable=${attributes.editable}
29
+ id=${ifDefined(attributes.id)}
30
+ link-text=${ifDefined(attributes.linkText)}
31
+ >
32
+ ${attributes.linkText || value || ''}
33
+ </a>
34
+ `,
35
+ dependencies: [EditableMixin, LinkTextMixin]
79
36
  },
80
37
  img: {
81
- template: (value, attributes) => html(_templateObject4(), ifDefined(attributes.name), ifDefined(value), ifDefined(attributes.alt)),
38
+ template: (value, attributes) => html`
39
+ <img
40
+ name=${ifDefined(attributes.name)}
41
+ src=${ifDefined(value)}
42
+ alt=${ifDefined(attributes.alt)}
43
+ style="max-width: 100%; max-height: 100%;"
44
+ />
45
+ `,
82
46
  dependencies: [AltMixin]
83
47
  },
84
48
  boolean: {
85
- template: (value, attributes) => html(_templateObject5(), value === 'true' ? html(_templateObject6(), attributes.label || attributes.name || '') : ''),
49
+ template: (value, attributes) => html`
50
+ ${value === 'true' ? html`<label>${attributes.label || attributes.name || ''}</label>` : ''}
51
+ `,
86
52
  dependencies: []
87
53
  }
88
- };
89
- //# sourceMappingURL=displayTemplatesDirectory.js.map
54
+ };