@devgateway/dvz-ui-react 1.0.6 → 1.1.0

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 (224) hide show
  1. package/dist/cjs/common.css +1 -1
  2. package/dist/cjs/embeddable/agree-and-download/index.js +1 -1
  3. package/dist/cjs/embeddable/big-number/index.js +1 -1
  4. package/dist/cjs/embeddable/big-number-trend/index.js +1 -1
  5. package/dist/cjs/embeddable/body/Background.js +1 -1
  6. package/dist/cjs/embeddable/body/Blood.js +1 -1
  7. package/dist/cjs/embeddable/body/Bounds.js +1 -1
  8. package/dist/cjs/embeddable/body/Brain.js +1 -1
  9. package/dist/cjs/embeddable/body/Ectopic.js +1 -1
  10. package/dist/cjs/embeddable/body/Erectile.js +1 -1
  11. package/dist/cjs/embeddable/body/Eyes.js +1 -1
  12. package/dist/cjs/embeddable/body/Head.js +1 -1
  13. package/dist/cjs/embeddable/body/Heart.js +1 -1
  14. package/dist/cjs/embeddable/body/Liver.js +1 -1
  15. package/dist/cjs/embeddable/body/Lungs.js +1 -1
  16. package/dist/cjs/embeddable/body/Stomach.js +1 -1
  17. package/dist/cjs/embeddable/body/index.js +1 -1
  18. package/dist/cjs/embeddable/chart/Bar.js +1 -1
  19. package/dist/cjs/embeddable/chart/CSVDataFrame.js +1 -1
  20. package/dist/cjs/embeddable/chart/Legends.js +1 -1
  21. package/dist/cjs/embeddable/chart/Line.js +1 -1
  22. package/dist/cjs/embeddable/chart/LineLayer.js +1 -1
  23. package/dist/cjs/embeddable/chart/Messages.js +2 -2
  24. package/dist/cjs/embeddable/chart/Pie.js +1 -1
  25. package/dist/cjs/embeddable/chart/Radar.js +1 -1
  26. package/dist/cjs/embeddable/chart/Tooltip.js +1 -1
  27. package/dist/cjs/embeddable/chart/colors/CategoricalColors.js +1 -1
  28. package/dist/cjs/embeddable/chart/colors/ColorProvider.js +1 -1
  29. package/dist/cjs/embeddable/chart/colors/Colors.js +1 -1
  30. package/dist/cjs/embeddable/chart/colors/ManualColors.js +1 -1
  31. package/dist/cjs/embeddable/chart/colors/PlainColor.js +1 -1
  32. package/dist/cjs/embeddable/chart/colors/SequentialColors.js +1 -1
  33. package/dist/cjs/embeddable/chart/colors/SystemColors.js +1 -1
  34. package/dist/cjs/embeddable/chart/data/Bar.js +1 -1
  35. package/dist/cjs/embeddable/chart/data/Line.js +1 -1
  36. package/dist/cjs/embeddable/chart/data/Utils.js +1 -1
  37. package/dist/cjs/embeddable/chart/data/index.js +1 -1
  38. package/dist/cjs/embeddable/chart/index.js +1 -1
  39. package/dist/cjs/embeddable/child-page-menu/index.js +1 -1
  40. package/dist/cjs/embeddable/common/Messages.js +2 -2
  41. package/dist/cjs/embeddable/common/colors/CategoricalColors.js +1 -1
  42. package/dist/cjs/embeddable/common/colors/ColorProvider.js +1 -1
  43. package/dist/cjs/embeddable/common/colors/Colors.js +1 -1
  44. package/dist/cjs/embeddable/common/colors/ManualColors.js +1 -1
  45. package/dist/cjs/embeddable/common/colors/PlainColor.js +1 -1
  46. package/dist/cjs/embeddable/common/colors/SequentialColors.js +1 -1
  47. package/dist/cjs/embeddable/common/colors/SystemColors.js +1 -1
  48. package/dist/cjs/embeddable/connected-templates/PostContent.js +1 -1
  49. package/dist/cjs/embeddable/connected-templates/PostIntro.js +1 -1
  50. package/dist/cjs/embeddable/d3Map/BaseLayer.js +1 -1
  51. package/dist/cjs/embeddable/d3Map/BreaksStyles.js +1 -1
  52. package/dist/cjs/embeddable/d3Map/DataLayer.js +1 -1
  53. package/dist/cjs/embeddable/d3Map/FlowLayer.js +1 -1
  54. package/dist/cjs/embeddable/d3Map/GradientColors.js +1 -0
  55. package/dist/cjs/embeddable/d3Map/LatLongLayer.js +1 -1
  56. package/dist/cjs/embeddable/d3Map/Layer.js +1 -1
  57. package/dist/cjs/embeddable/d3Map/Legends.js +1 -1
  58. package/dist/cjs/embeddable/d3Map/Map.js +1 -1
  59. package/dist/cjs/embeddable/d3Map/ProjectedContainer.js +1 -1
  60. package/dist/cjs/embeddable/d3Map/Utils.js +1 -0
  61. package/dist/cjs/embeddable/d3Map/ZoomControl.js +1 -1
  62. package/dist/cjs/embeddable/d3Map/index.js +1 -1
  63. package/dist/cjs/embeddable/data/CategoriesConsumer.js +1 -1
  64. package/dist/cjs/embeddable/data/CategoriesProvider.js +1 -1
  65. package/dist/cjs/embeddable/data/DataConsumer.js +1 -1
  66. package/dist/cjs/embeddable/data/DataProvider.js +1 -1
  67. package/dist/cjs/embeddable/datalabel/index.js +1 -1
  68. package/dist/cjs/embeddable/download/index.js +2 -2
  69. package/dist/cjs/embeddable/downloadPDF/index.js +1 -1
  70. package/dist/cjs/embeddable/featuredtabs/index.js +1 -1
  71. package/dist/cjs/embeddable/filter/index.js +1 -1
  72. package/dist/cjs/embeddable/filter-reset-button/index.js +1 -1
  73. package/dist/cjs/embeddable/filters-apply-button/index.js +1 -1
  74. package/dist/cjs/embeddable/index.js +1 -1
  75. package/dist/cjs/embeddable/inlinelist/index.js +1 -1
  76. package/dist/cjs/embeddable/map/MapCSVDataFrame.js +1 -1
  77. package/dist/cjs/embeddable/map/MapDataFrame.js +1 -1
  78. package/dist/cjs/embeddable/map/index.js +2 -2
  79. package/dist/cjs/embeddable/map/legend.js +1 -1
  80. package/dist/cjs/embeddable/map/map.js +3 -3
  81. package/dist/cjs/embeddable/measures/index.js +1 -1
  82. package/dist/cjs/embeddable/menu/index.js +2 -2
  83. package/dist/cjs/embeddable/new-time-line/index.js +1 -1
  84. package/dist/cjs/embeddable/new-time-line/timeline.js +1 -1
  85. package/dist/cjs/embeddable/newsletter/index.js +1 -1
  86. package/dist/cjs/embeddable/pagegallery/index.js +1 -1
  87. package/dist/cjs/embeddable/pagemodules/FloatingNavigator.js +1 -1
  88. package/dist/cjs/embeddable/pagemodules/index.js +1 -1
  89. package/dist/cjs/embeddable/parallax/index.js +1 -1
  90. package/dist/cjs/embeddable/posts-with-filters/Post.js +1 -0
  91. package/dist/cjs/embeddable/posts-with-filters/index.js +1 -0
  92. package/dist/cjs/embeddable/posts-with-filters/utils.js +1 -0
  93. package/dist/cjs/embeddable/postscarousel/index.js +1 -1
  94. package/dist/cjs/embeddable/reducers/data-api.js +1 -1
  95. package/dist/cjs/embeddable/reducers/data.js +1 -1
  96. package/dist/cjs/embeddable/references/Reference.js +1 -1
  97. package/dist/cjs/embeddable/references/ReferencesList.js +1 -1
  98. package/dist/cjs/embeddable/sankeychart/Sankey.js +1 -1
  99. package/dist/cjs/embeddable/sankeychart/index.js +1 -1
  100. package/dist/cjs/embeddable/showcase/index.js +1 -1
  101. package/dist/cjs/embeddable/superset-chart/index.js +1 -1
  102. package/dist/cjs/embeddable/superset-dashboard/index.js +1 -1
  103. package/dist/cjs/embeddable/tabbedposts/index.js +1 -1
  104. package/dist/cjs/embeddable/time-line/desktop.js +1 -1
  105. package/dist/cjs/embeddable/time-line/index.js +1 -1
  106. package/dist/cjs/embeddable/time-line/mobile.js +1 -1
  107. package/dist/cjs/embeddable/tooltip/index.js +1 -1
  108. package/dist/cjs/embeddable/vertical-featuredtabs/index.js +2 -2
  109. package/dist/cjs/embeddable/wrapped/index.js +1 -1
  110. package/dist/cjs/index.js +1 -1
  111. package/dist/cjs/layout/CustomSemanticSearch.js +1 -1
  112. package/dist/cjs/layout/FlexWrapDetector.js +1 -1
  113. package/dist/cjs/layout/Footer.js +1 -1
  114. package/dist/cjs/layout/Header.js +2 -2
  115. package/dist/cjs/layout/LangSwitcher.js +1 -1
  116. package/dist/cjs/layout/ResponsiveContainer.js +1 -1
  117. package/dist/cjs/layout/ScrollTop.js +1 -1
  118. package/dist/cjs/layout/SearchControl.js +1 -1
  119. package/dist/cjs/layout/TopNavigator.js +1 -1
  120. package/dist/cjs/layout/containers/PreviewPageContainer.js +1 -1
  121. package/dist/cjs/layout/containers/PreviewTypeContainer.js +1 -1
  122. package/dist/cjs/layout/containers/SlugContainer.js +1 -1
  123. package/dist/cjs/layout/containers/SlugPostContainer.js +1 -1
  124. package/dist/cjs/layout/index.js +1 -1
  125. package/dist/cjs/lib/hooks/screen-orientation.js +1 -0
  126. package/dist/cjs/lib/hooks/window-dimensions.js +1 -1
  127. package/dist/cjs/lib/react-intl-redux/index.js +1 -1
  128. package/dist/cjs/lib/react-intl-redux/providers/IntlProvider.js +1 -1
  129. package/dist/cjs/lib/react-intl-redux/providers/Provider.js +1 -1
  130. package/dist/cjs/redux/reducer.js +1 -1
  131. package/dist/cjs/redux/store.js +1 -1
  132. package/dist/cjs/styles.css +1 -1
  133. package/dist/cjs/translations/af.json.js +1 -1
  134. package/dist/cjs/utils/data.js +1 -0
  135. package/dist/cjs/utils/deviceType.js +1 -1
  136. package/dist/cjs/utils/semanticUtils.js +1 -1
  137. package/dist/esm/common.css +1 -1
  138. package/dist/esm/embeddable/big-number/index.js +82 -74
  139. package/dist/esm/embeddable/big-number-trend/index.js +117 -97
  140. package/dist/esm/embeddable/chart/Bar.js +235 -224
  141. package/dist/esm/embeddable/chart/Line.js +261 -252
  142. package/dist/esm/embeddable/chart/Tooltip.js +19 -17
  143. package/dist/esm/embeddable/chart/colors/ManualColors.js +19 -19
  144. package/dist/esm/embeddable/chart/data/Bar.js +179 -180
  145. package/dist/esm/embeddable/chart/data/Line.js +146 -193
  146. package/dist/esm/embeddable/chart/data/Utils.js +39 -23
  147. package/dist/esm/embeddable/chart/index.js +323 -316
  148. package/dist/esm/embeddable/d3Map/BaseLayer.js +38 -45
  149. package/dist/esm/embeddable/d3Map/DataLayer.js +418 -204
  150. package/dist/esm/embeddable/d3Map/FlowLayer.js +113 -115
  151. package/dist/esm/embeddable/d3Map/GradientColors.js +155 -0
  152. package/dist/esm/embeddable/d3Map/LatLongLayer.js +132 -104
  153. package/dist/esm/embeddable/d3Map/Layer.js +31 -31
  154. package/dist/esm/embeddable/d3Map/Legends.js +274 -162
  155. package/dist/esm/embeddable/d3Map/Map.js +14 -14
  156. package/dist/esm/embeddable/d3Map/ProjectedContainer.js +16 -15
  157. package/dist/esm/embeddable/d3Map/Utils.js +11 -0
  158. package/dist/esm/embeddable/d3Map/ZoomControl.js +83 -55
  159. package/dist/esm/embeddable/d3Map/index.js +116 -83
  160. package/dist/esm/embeddable/data/CategoriesProvider.js +38 -33
  161. package/dist/esm/embeddable/data/DataProvider.js +87 -79
  162. package/dist/esm/embeddable/filter/index.js +227 -233
  163. package/dist/esm/embeddable/filter-reset-button/index.js +38 -26
  164. package/dist/esm/embeddable/filters-apply-button/index.js +36 -28
  165. package/dist/esm/embeddable/index.js +15 -14
  166. package/dist/esm/embeddable/inlinelist/index.js +64 -61
  167. package/dist/esm/embeddable/map/index.js +157 -148
  168. package/dist/esm/embeddable/measures/index.js +3 -3
  169. package/dist/esm/embeddable/menu/index.js +8 -8
  170. package/dist/esm/embeddable/new-time-line/timeline.js +11 -11
  171. package/dist/esm/embeddable/pagegallery/index.js +11 -11
  172. package/dist/esm/embeddable/pagemodules/index.js +48 -49
  173. package/dist/esm/embeddable/parallax/index.js +30 -25
  174. package/dist/esm/embeddable/posts-with-filters/Post.js +26 -0
  175. package/dist/esm/embeddable/posts-with-filters/index.js +205 -0
  176. package/dist/esm/embeddable/posts-with-filters/utils.js +8 -0
  177. package/dist/esm/embeddable/reducers/data-api.js +27 -13
  178. package/dist/esm/embeddable/reducers/data.js +106 -94
  179. package/dist/esm/embeddable/references/ReferencesList.js +34 -33
  180. package/dist/esm/embeddable/superset-chart/index.js +12 -13
  181. package/dist/esm/embeddable/superset-dashboard/index.js +3 -4
  182. package/dist/esm/embeddable/tabbedposts/index.js +21 -23
  183. package/dist/esm/embeddable/time-line/index.js +14 -11
  184. package/dist/esm/embeddable/time-line/mobile.js +204 -206
  185. package/dist/esm/layout/CustomSemanticSearch.js +20 -22
  186. package/dist/esm/lib/hooks/screen-orientation.js +25 -0
  187. package/dist/esm/lib/hooks/window-dimensions.js +7 -7
  188. package/dist/esm/styles.css +1 -1
  189. package/dist/esm/utils/data.js +11 -0
  190. package/dist/esm/utils/semanticUtils.js +19 -13
  191. package/dist/types/common.css.d.ts +1 -0
  192. package/dist/types/embeddable/chart/Line.d.ts +4 -0
  193. package/dist/types/embeddable/chart/data/Line.d.ts +2 -2
  194. package/dist/types/embeddable/chart/index.d.ts +3 -1
  195. package/dist/types/embeddable/d3Map/GradientColors.d.ts +17 -0
  196. package/dist/types/embeddable/d3Map/Layer.d.ts +1 -0
  197. package/dist/types/embeddable/d3Map/Legends.d.ts +4 -2
  198. package/dist/types/embeddable/d3Map/Utils.d.ts +1 -0
  199. package/dist/types/embeddable/d3Map/ZoomControl.d.ts +11 -7
  200. package/dist/types/embeddable/data/CategoriesProvider.d.ts +6 -2
  201. package/dist/types/embeddable/inlinelist/index.d.ts +1 -8
  202. package/dist/types/embeddable/measures/index.d.ts +1 -1
  203. package/dist/types/embeddable/menu/index.d.ts +0 -10
  204. package/dist/types/embeddable/pagegallery/index.d.ts +0 -4
  205. package/dist/types/embeddable/pagemodules/index.d.ts +1 -1
  206. package/dist/types/embeddable/parallax/index.d.ts +1 -16
  207. package/dist/types/embeddable/posts-with-filters/Post.d.ts +3 -0
  208. package/dist/types/embeddable/posts-with-filters/index.d.ts +21 -0
  209. package/dist/types/embeddable/posts-with-filters/utils.d.ts +6 -0
  210. package/dist/types/embeddable/postscarousel/index.d.ts +1 -1
  211. package/dist/types/embeddable/reducers/data-api.d.ts +9 -18
  212. package/dist/types/embeddable/reducers/data.d.ts +32 -31
  213. package/dist/types/embeddable/references/ReferencesList.d.ts +2 -1
  214. package/dist/types/index.css.d.ts +1 -0
  215. package/dist/types/lib/hooks/resize-observer.d.ts +4 -0
  216. package/dist/types/lib/hooks/screen-orientation.d.ts +18 -0
  217. package/dist/types/utils/data.d.ts +5 -0
  218. package/dist/types/utils/semanticUtils.d.ts +30 -2
  219. package/package.json +3 -2
  220. package/dist/cjs/node_modules/.pnpm/semantic-ui-react@3.0.0-beta.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/semantic-ui-react/src/lib/classNameBuilders.js +0 -1
  221. package/dist/cjs/node_modules/.pnpm/semantic-ui-react@3.0.0-beta.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/semantic-ui-react/src/lib/getUnhandledProps.js +0 -1
  222. package/dist/esm/node_modules/.pnpm/semantic-ui-react@3.0.0-beta.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/semantic-ui-react/src/lib/classNameBuilders.js +0 -5
  223. package/dist/esm/node_modules/.pnpm/semantic-ui-react@3.0.0-beta.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/semantic-ui-react/src/lib/getUnhandledProps.js +0 -7
  224. package/dist/types/embeddable/index.d.ts +0 -161
@@ -1,116 +1,128 @@
1
- import { getData as F, getCategories as C } from "./data-api.js";
2
- import { Map as M, fromJS as v } from "immutable";
3
- import x from "papaparse";
4
- const d = "LOAD_DATA", I = "LOAD_DATA_DONE", A = "LOAD_DATA_ERROR", _ = "LOAD_CATEGORIES", S = "LOAD_CATEGORIES_DONE", f = "LOAD_CATEGORIES_ERROR", D = "SET_PAGE_MODULE_PROPS", y = "SET_FILTER", T = "SET_INITIAL_FILTER", R = "SET_APPLY", O = "CLEAN_FILTER", z = M({ mode: "info" }), L = "SET_MEASURES", P = "CLEAN_MEASURES", b = ({ app: r, group: a }) => (e, t) => {
5
- e({ type: P, app: r, group: a });
6
- }, J = ({ app: r, group: a, mGroup: e }) => (t, s) => {
7
- const n = Object.keys(e.measures).filter((l) => e.measures[l].selected), o = { ...e };
8
- o[r] = { measures: {} }, n.forEach((l) => {
9
- o[r].measures[l] = { ...e.measures[l] };
10
- }), o[r].format = e.format, t({ type: L, app: r, group: a, measure: o });
11
- }, j = ({ app: r, group: a, param: e, value: t, autoApply: s }) => (n, o) => {
12
- n({ type: y, app: r, group: a, param: e, value: t, autoApply: s });
13
- }, Y = ({ app: r, group: a }) => (e, t) => {
14
- e({ type: O, app: r, group: a });
15
- }, $ = ({ app: r, group: a }) => (e, t) => {
16
- e({ type: R, app: r, group: a });
17
- }, V = ({ app: r, group: a, param: e, value: t }) => (s, n) => {
18
- s({ type: T, app: r, group: a, param: e, value: t });
19
- }, k = (r) => (a, e) => {
20
- const { app: t, params: s } = r;
21
- a({ type: _, params: s, app: t, dvzProxyDatasetId: s.dvzProxyDatasetId }), C({ app: t, params: s }).then((n) => (n.appliedFilters = s, a({ type: S, app: t, data: n, dvzProxyDatasetId: s.dvzProxyDatasetId }))).catch((n) => a({
22
- type: f,
23
- app: t,
24
- error: n,
25
- dvzProxyDatasetId: s.dvzProxyDatasetId
1
+ import { getData as C, getCategories as M } from "./data-api.js";
2
+ import * as A from "immutable";
3
+ import w from "papaparse";
4
+ const S = "LOAD_DATA", p = "LOAD_DATA_DONE", _ = "LOAD_DATA_ERROR", d = "LOAD_CATEGORIES", D = "LOAD_CATEGORIES_DONE", T = "LOAD_CATEGORIES_ERROR", O = "SET_PAGE_MODULE_PROPS", R = "SET_FILTER", y = "SET_INITIAL_FILTER", L = "SET_APPLY", h = "CLEAN_FILTER", b = A.Map({ mode: "info" }), F = "SET_MEASURES", m = "CLEAN_MEASURES", v = ({ app: n, group: r }) => (t, s) => {
5
+ t({ type: m, app: n, group: r });
6
+ }, x = ({ app: n, group: r, mGroup: t }) => (s, e) => {
7
+ const o = Object.keys(t.measures).filter((l) => t.measures[l].selected), a = { ...t };
8
+ a[n] = { measures: {} }, o.forEach((l) => {
9
+ a[n].measures[l] = { ...t.measures[l] };
10
+ }), a[n].format = t.format, s({ type: F, app: n, group: r, measure: a });
11
+ }, z = ({ app: n, group: r, param: t, value: s, autoApply: e }) => (o, a) => {
12
+ o({ type: R, app: n, group: r, param: t, value: s, autoApply: e });
13
+ }, q = ({ app: n, group: r }) => (t, s) => {
14
+ t({ type: h, app: n, group: r });
15
+ }, j = ({ app: n, group: r }) => (t, s) => {
16
+ t({ type: L, app: n, group: r });
17
+ }, J = ({ app: n, group: r, param: t, value: s }) => (e, o) => {
18
+ e({ type: y, app: n, group: r, param: t, value: s });
19
+ }, Y = (n) => (r, t) => {
20
+ const { app: s, params: e, dvzProxyDatasetId: o, uniqueStorage: a } = n;
21
+ r({ type: d, params: e, app: s, uniqueStorage: a, dvzProxyDatasetId: o }), M({ app: s, params: e }).then((l) => (l.appliedFilters = e, r({
22
+ type: D,
23
+ app: s,
24
+ data: l,
25
+ uniqueStorage: a,
26
+ dvzProxyDatasetId: o
27
+ }))).catch((l) => r({
28
+ type: T,
29
+ app: s,
30
+ uniqueStorage: a,
31
+ error: l,
32
+ dvzProxyDatasetId: o
26
33
  }));
27
- }, q = ({ app: r, group: a, csv: e, store: t, params: s }) => (n, o) => {
28
- const l = o().get("data").getIn(["filters", r, a]);
29
- l && (s = { ...s, ...l.toJS() });
30
- const i = x.parse(e, { header: !0, dynamicTyping: !0 }), m = i.data.filter((u) => {
31
- let p = !1;
32
- return Object.keys(s).forEach((E) => {
33
- const N = s[E];
34
- if (u[E]) {
35
- const h = u[E].toString().trim().toLowerCase();
36
- p = N.filter((g) => g && g.toString().trim().toLowerCase() == h).length == 0;
34
+ }, $ = ({ app: n, group: r, csv: t, store: s, params: e }) => (o, a) => {
35
+ const l = a().get("data").getIn(["filters", n, r]);
36
+ l ? e = { ...e, ...l.toJS() } : e = e || {};
37
+ const i = w.parse(t, { header: !0, dynamicTyping: !0 }), c = i.data.filter((I) => {
38
+ let E = !1;
39
+ return Object.keys(e).forEach((g) => {
40
+ const N = e[g];
41
+ if (I[g]) {
42
+ const P = I[g].toString().trim().toLowerCase();
43
+ E = N.filter((f) => f && f.toString().trim().toLowerCase() == P).length == 0;
37
44
  }
38
- }), !p;
39
- }), c = { ...i, data: m, appliedFilters: s };
40
- n({ type: I, app: r, group: a, store: t, data: { count: c.data.length, itemsSize: c.data.length, ...c } });
41
- }, B = ({ app: r, group: a, source: e, store: t, params: s }) => (n, o) => {
42
- const l = o().get("data").getIn(["filters", r, a]);
43
- l && (s = { ...s, ...l.toJS() }), n({ type: d, app: r, group: a, params: s, store: t }), F({ app: r, source: e, params: s }).then((i) => (i.appliedFilters = s, n({ type: I, app: r, group: a, store: t, data: i }))).catch((i) => n({ type: A, app: r, group: a, store: t, error: i }));
44
- }, H = ({ data: r }) => (a, e) => {
45
- a({ type: D, data: r });
46
- }, K = (r = z, a) => {
47
- switch (a.type) {
48
- case d: {
49
- const { store: e, app: t, group: s } = a, n = Date.now();
50
- return r.deleteIn([...e, "error"]).setIn([...e, "loading"], !0).setIn([...e, "time"], n);
45
+ }), !E;
46
+ }), u = { ...i, data: c, appliedFilters: e };
47
+ o({ type: p, app: n, group: r, store: s, data: { count: u.data.length, itemsSize: u.data.length, ...u } });
48
+ }, B = ({ app: n, group: r, source: t, store: s, params: e }) => (o, a) => {
49
+ let l = a().get("data").getIn(["filters", n, r]);
50
+ e && Object.keys(e).forEach((c) => {
51
+ if (l && l.has(c)) {
52
+ let u = e[c], E = l.get(c).filter((g) => u.indexOf(g) > -1);
53
+ l = l.set(c, E);
51
54
  }
52
- case A: {
53
- const { error: e, store: t, app: s, group: n } = a;
54
- return r.setIn([...t, "loading"], !1).setIn([...t, "error"], e).setIn(["filters-settings", s, n, "apply"], null);
55
+ }), l && (e = { ...e, ...l.toJS() }), o({ type: S, app: n, group: r, params: e, store: s }), C({ app: n, source: t, params: e }).then((i) => (i.appliedFilters = e, o({ type: p, app: n, group: r, store: s, data: i, params: e }))).catch((i) => o({ type: _, app: n, group: r, store: s, error: i }));
56
+ }, V = ({ data: n }) => (r, t) => {
57
+ r({ type: O, data: n });
58
+ }, H = (n = b, r) => {
59
+ switch (r.type) {
60
+ case S: {
61
+ const { store: t, app: s, group: e, params: o } = r, a = Date.now();
62
+ return n.deleteIn([...t, "error"]).setIn([...t, "loading"], !0).setIn([...t, "time"], a).setIn([...t, "presetFilter"], o);
55
63
  }
56
- case I: {
57
- const { data: e, app: t, group: s, store: n } = a;
58
- return r.setIn([...n, "loading"], !1).deleteIn([...n, "error"]).setIn([...n, "data"], e).setIn(["filters-settings", t, s, "apply"], null);
64
+ case _: {
65
+ const { error: t, store: s, app: e, group: o } = r;
66
+ return n.setIn([...s, "loading"], !1).setIn([...s, "error"], t).setIn(["filters-settings", e, o, "apply"], null);
59
67
  }
60
- case D: {
61
- const { data: e } = a;
62
- return r.setIn(["pageModuleProps"], e);
68
+ case p: {
69
+ const { data: t, app: s, group: e, store: o } = r;
70
+ return n.setIn([...o, "loading"], !1).deleteIn([...o, "error"]).setIn([...o, "data"], t).setIn(["filters-settings", s, e, "apply"], null);
63
71
  }
64
- case _: {
65
- const { data: e, app: t, dvzProxyDatasetId: s } = a, n = ["categories", t];
66
- return s && n.push(s), r.setIn([...n, "loading"], !0).deleteIn([...n, "error"]);
72
+ case O: {
73
+ const { data: t } = r;
74
+ return n.setIn(["pageModuleProps"], t);
67
75
  }
68
- case S: {
69
- const { data: e, app: t, dvzProxyDatasetId: s } = a, n = ["categories", t];
70
- return s && n.push(s), r.setIn([...n, "loading"], !1).setIn([...n, "items"], v(e));
76
+ case d: {
77
+ const { data: t, app: s, uniqueStorage: e, dvzProxyDatasetId: o } = r, a = ["categories", s];
78
+ return e && a.push(e), o && a.push(o), n.setIn([...a, "loading"], !0).deleteIn([...a, "error"]);
71
79
  }
72
- case f: {
73
- const { data: e, app: t, dvzProxyDatasetId: s } = a, n = ["categories", t];
74
- return s && n.push(s), r.setIn([...n, "loading"], !1).setIn([...n, "error"], e);
80
+ case D: {
81
+ const { data: t, app: s, uniqueStorage: e, dvzProxyDatasetId: o } = r, a = ["categories", s];
82
+ return o && a.push(o), e && a.push(e), n.setIn([...a, "loading"], !1).setIn([...a, "items"], A.fromJS(t));
83
+ }
84
+ case T: {
85
+ const { data: t, app: s, uniqueStorage: e, dvzProxyDatasetId: o } = r, a = ["categories", s];
86
+ return e && a.push(e), o && a.push(o), n.setIn([...a, "loading"], !1).setIn([...a, "error"], t);
87
+ }
88
+ case L: {
89
+ const { app: t, group: s } = r;
90
+ return n.setIn(["filters-settings", t, s, "apply"], (/* @__PURE__ */ new Date()).getTime());
75
91
  }
76
92
  case R: {
77
- const { app: e, group: t } = a;
78
- return r.setIn(["filters-settings", e, t, "apply"], (/* @__PURE__ */ new Date()).getTime());
93
+ const t = Date.now(), { app: s, group: e, param: o, value: a, autoApply: l } = r;
94
+ return n.setIn(["filters-settings", s, e, "autoApply"], l).setIn(["filters", s, e, o], a.length === 0 ? [Number.MIN_SAFE_INTEGER] : a).setIn(["filters-settings", s, e, "apply"], null).setIn(["filters-settings", s, e, "lastUserFilterChange"], t);
79
95
  }
80
96
  case y: {
81
- const { app: e, group: t, param: s, value: n, autoApply: o } = a;
82
- return r.setIn(["filters-settings", e, t, "autoApply"], o).setIn(["filters", e, t, s], n.length === 0 ? [Number.MIN_SAFE_INTEGER] : n).setIn(["filters-settings", e, t, "apply"], null);
97
+ const t = Date.now(), { app: s, group: e, param: o, value: a } = r;
98
+ return console.log(o), n.setIn(["filters", "initial", s, e, o], a.length === 0 ? [Number.MIN_SAFE_INTEGER] : a).setIn(["filters", s, e, o], a.length === 0 ? [Number.MIN_SAFE_INTEGER] : a).setIn(["filters-settings", s, e, "lastInitialFilterChange"], t);
83
99
  }
84
- case T: {
85
- const { app: e, group: t, param: s, value: n } = a;
86
- return r.setIn(["filters", "initial", e, t, s], n.length === 0 ? [Number.MIN_SAFE_INTEGER] : n).setIn(["filters", e, t, s], n.length === 0 ? [Number.MIN_SAFE_INTEGER] : n);
87
- }
88
- case O: {
89
- const { app: e, group: t } = a, s = r.getIn(["filters", "initial", e, t]);
90
- return r.setIn(["filters", e, t], s);
100
+ case h: {
101
+ const { app: t, group: s } = r, e = n.getIn(["filters", "initial", t, s]);
102
+ return n.setIn(["filters", t, s], e);
91
103
  }
92
- case L: {
93
- const { app: e, group: t, measure: s } = a;
94
- return r.setIn(["measures", e, t], s);
104
+ case F: {
105
+ const { app: t, group: s, measure: e } = r;
106
+ return n.setIn(["measures", t, s], e);
95
107
  }
96
- case P: {
97
- const { app: e, group: t, measure: s } = a;
98
- return r.deleteIn(["measures", e, t]);
108
+ case m: {
109
+ const { app: t, group: s, measure: e } = r;
110
+ return n.deleteIn(["measures", t, s]);
99
111
  }
100
112
  default:
101
- return r;
113
+ return n;
102
114
  }
103
115
  };
104
116
  export {
105
- $ as applyFilter,
106
- Y as cleanFilter,
107
- b as cleanMeasures,
108
- K as default,
109
- k as getCategories,
117
+ j as applyFilter,
118
+ q as cleanFilter,
119
+ v as cleanMeasures,
120
+ H as default,
121
+ Y as getCategories,
110
122
  B as getData,
111
- q as setData,
112
- j as setFilter,
113
- V as setInitialFilters,
114
- J as setMeasures,
115
- H as setPageModuleProps
123
+ $ as setData,
124
+ z as setFilter,
125
+ J as setInitialFilters,
126
+ x as setMeasures,
127
+ V as setPageModuleProps
116
128
  };
@@ -1,65 +1,66 @@
1
- import { jsxs as p, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as p, jsx as n } from "react/jsx-runtime";
2
2
  import { useState as a, useEffect as f } from "react";
3
- import { Container as x, Grid as T, GridColumn as E, GridRow as y } from "semantic-ui-react";
4
- import { connect as R } from "react-redux";
5
- import { useWindowDimensionsAndDevice as C } from "../../lib/hooks/window-dimensions.js";
6
- const O = ({ content: n, link: t, index: i }) => /* @__PURE__ */ r(E, { children: /* @__PURE__ */ p(y, { id: "ref_" + i, className: "reference", children: [
7
- /* @__PURE__ */ r("div", { className: "index", children: i }),
8
- /* @__PURE__ */ r("div", { className: "content", children: n }),
9
- /* @__PURE__ */ r("div", { className: "link", children: /* @__PURE__ */ r("a", { href: t, target: "_blank", children: t }) })
10
- ] }) }), S = (n) => {
3
+ import { Container as T, Grid as E, GridColumn as y, GridRow as R } from "semantic-ui-react";
4
+ import { connect as C } from "react-redux";
5
+ import { useWindowDimensionsAndDevice as O } from "../../lib/hooks/window-dimensions.js";
6
+ const S = ({ content: r, link: t, index: i }) => /* @__PURE__ */ n(y, { children: /* @__PURE__ */ p(R, { id: "ref_" + i, className: "reference", children: [
7
+ /* @__PURE__ */ n("div", { className: "index", children: i }),
8
+ /* @__PURE__ */ n("div", { className: "content", children: r }),
9
+ /* @__PURE__ */ n("div", { className: "link", children: /* @__PURE__ */ n("a", { href: t, target: "_blank", children: t }) })
10
+ ] }) }), W = (r) => {
11
11
  let t;
12
12
  try {
13
- t = decodeURIComponent(n);
13
+ t = decodeURIComponent(r);
14
14
  } catch {
15
- t = n, console.error("error occurred decoding content:" + n);
15
+ t = r, console.error("error occurred decoding content:" + r);
16
16
  }
17
17
  return t;
18
- }, W = ({
19
- editing: n = !1,
20
- "data-columns": t = 3,
21
- "data-height": i = 1e3,
18
+ }, P = ({
19
+ random: r,
20
+ editing: t = !1,
21
+ "data-columns": i = 3,
22
+ "data-height": w = 1e3,
22
23
  "data-flex-direction": c = "row"
23
24
  }) => {
24
- const { width: w } = C(), [k, b] = a(window.innerWidth > window.innerHeight ? "landscape" : "portrait"), [l, g] = a(w < 1380);
25
+ const { width: b } = O(), [z, g] = a(window.innerWidth > window.innerHeight ? "landscape" : "portrait"), [l, I] = a(b < 1380);
25
26
  f(() => {
26
27
  const e = () => {
27
- b(window.innerWidth > window.innerHeight ? "landscape" : "portrait"), g(window.innerWidth < 1380);
28
+ g(window.innerWidth > window.innerHeight ? "landscape" : "portrait"), I(window.innerWidth < 1380);
28
29
  };
29
30
  return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
30
31
  }, []);
31
- const u = { flexDirection: c }, [m, I] = a([]);
32
- c == "column" && t > 1 && (u.height = i + "px"), f(() => {
32
+ const m = { flexDirection: c }, [u, v] = a([]);
33
+ c == "column" && i > 1 && (m.height = w + "px"), f(() => {
33
34
  try {
34
35
  setTimeout(() => {
35
36
  const e = window.parent.document.querySelectorAll("div.wp-reference");
36
- I(e);
37
+ v(e);
37
38
  }, 3e3);
38
39
  } catch {
39
40
  }
40
41
  });
41
- const v = m ? new Array(...m) : [], d = [];
42
- return v.forEach((e) => {
43
- d.find((s) => s.getAttribute("data-index") == e.getAttribute("data-index")) || d.push(e);
44
- }), /* @__PURE__ */ p(x, { className: "references list", children: [
45
- n && /* @__PURE__ */ r("div", { className: "edit-mode-message", children: /* @__PURE__ */ r("p", { children: "No preview available. The full list of references will be displayed in the live page." }) }),
46
- /* @__PURE__ */ r(T, { fluid: !0, stretched: !!l, columns: l ? 1 : t, style: u, children: d.sort((e, o) => {
47
- const s = e.getAttribute("data-index") ?? "", h = o.getAttribute("data-index") ?? "", A = s ? parseInt(s) : Number.POSITIVE_INFINITY, N = h ? parseInt(h) : Number.POSITIVE_INFINITY;
48
- return A - N;
42
+ const A = u ? new Array(...u) : [], s = [];
43
+ return A.forEach((e) => {
44
+ s.find((d) => d.getAttribute("data-index") == e.getAttribute("data-index")) || s.push(e);
45
+ }), /* @__PURE__ */ p(T, { className: "references list", children: [
46
+ t && /* @__PURE__ */ n("div", { className: "edit-mode-message", children: /* @__PURE__ */ n("p", { children: "No preview available. The full list of references will be displayed in the live page." }) }),
47
+ /* @__PURE__ */ n(E, { fluid: !0, stretched: !!l, columns: l ? 1 : i, style: m, children: s.sort((e, o) => {
48
+ const d = e.getAttribute("data-index") ?? "", h = o.getAttribute("data-index") ?? "", N = d ? parseInt(d) : Number.POSITIVE_INFINITY, x = h ? parseInt(h) : Number.POSITIVE_INFINITY;
49
+ return N - x;
49
50
  }).map((e) => {
50
51
  const o = e.getAttribute("data-index") ?? "";
51
- return /* @__PURE__ */ r(
52
- O,
52
+ return /* @__PURE__ */ n(
53
+ S,
53
54
  {
54
55
  index: o,
55
- content: S(e.getAttribute("data-description")),
56
+ content: W(e.getAttribute("data-description")),
56
57
  link: e.getAttribute("data-link")
57
58
  },
58
59
  o
59
60
  );
60
61
  }) })
61
62
  ] });
62
- }, _ = (n, t) => ({ random: n.getIn(["embeddable", "random"]) }), P = {}, B = R(_, P)(W);
63
+ }, _ = (r, t) => ({ random: r.getIn(["embeddable", "random"]) }), k = {}, F = C(_, k)(P);
63
64
  export {
64
- B as default
65
+ F as default
65
66
  };
@@ -1,29 +1,28 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import "react";
3
- import { connect as m } from "react-redux";
4
- import { SettingProvider as u, SettingsConsumer as g } from "@devgateway/wp-react-lib";
5
- const f = (t) => /* @__PURE__ */ e(u, { locale: t.intl.locale, changeUUID: t.unique, children: /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(C, { ...t }) }) }), C = (t) => {
3
+ import { connect as l } from "react-redux";
4
+ const u = (t) => /* @__PURE__ */ e(g, { ...t }), g = (t) => {
6
5
  const {
7
- editing: a = !1,
6
+ editing: r = !1,
8
7
  unique: s,
9
- intl: U,
10
- "data-csv": v = "",
8
+ intl: C,
9
+ "data-csv": S = "",
11
10
  "data-selected-chart-data": n = "{}",
12
11
  "data-height": o,
13
12
  "data-width": c = 100,
14
- "data-margin": i = 0,
15
- settings: r
16
- } = t, d = r ? r.apache_superset_url : "", h = decodeURIComponent(d), l = decodeURIComponent(n), p = `${h}/superset/explore/?form_data=${l}&standalone=1`;
13
+ "data-margin": d = 0,
14
+ settings: a
15
+ } = t, i = a ? a.apache_superset_url : "", p = decodeURIComponent(i), h = decodeURIComponent(n), m = `${p}/superset/explore/?form_data=${h}&standalone=1`;
17
16
  return /* @__PURE__ */ e("div", { id: `superset-chart-${s}`, children: /* @__PURE__ */ e(
18
17
  "iframe",
19
18
  {
20
- src: p,
19
+ src: m,
21
20
  seamless: "seamless",
22
21
  title: "superset-chart",
23
- style: { border: "none", width: c + "%", height: o + "px", margin: i + "px" }
22
+ style: { border: "none", width: c + "%", height: o + "px", margin: d + "px" }
24
23
  }
25
24
  ) });
26
- }, S = (t, a) => ({}), x = {}, $ = m(S, x)(f);
25
+ }, f = (t, r) => ({}), x = {}, _ = l(f, x)(u);
27
26
  export {
28
- $ as default
27
+ _ as default
29
28
  };
@@ -1,8 +1,7 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { connect as h } from "react-redux";
4
- import "@devgateway/wp-react-lib";
5
- const m = (e) => {
4
+ const l = (e) => {
6
5
  const {
7
6
  editing: a = !1,
8
7
  unique: r,
@@ -23,7 +22,7 @@ const m = (e) => {
23
22
  style: { border: "none", width: n + "%", height: d + "px", margin: i + "px" }
24
23
  }
25
24
  ) });
26
- }, l = (e, a) => ({}), u = {}, $ = h(l, u)(m);
25
+ }, m = (e, a) => ({}), u = {}, v = h(m, u)(l);
27
26
  export {
28
- $ as default
27
+ v as default
29
28
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as e, jsxs as b } from "react/jsx-runtime";
2
- import F, { useState as p, useRef as ne, useEffect as v } from "react";
2
+ import F, { useState as p, useRef as ne, useEffect as T } from "react";
3
3
  import { Container as S, Accordion as E, Icon as oe, Menu as z, Grid as _, Label as G, Button as ie } from "semantic-ui-react";
4
4
  import { PostProvider as re, PostConsumer as q, MediaProvider as V, MediaConsumer as U, PostIcon as Y, PostLabel as J } from "@devgateway/wp-react-lib";
5
5
  import { injectIntl as ae } from "react-intl";
@@ -54,7 +54,7 @@ const se = ({ posts: t, activeItem: s, setActive: i, showLabels: n }) => t ? t.m
54
54
  c.id
55
55
  );
56
56
  }) : null;
57
- }, Q = ({ posts: t, activeItem: s }) => (v(() => {
57
+ }, Q = ({ posts: t, activeItem: s }) => (T(() => {
58
58
  const i = document.querySelector(".ui.container.content-tab");
59
59
  i && (i.scrollTop = 0);
60
60
  }, [s]), t ? t.map((i) => {
@@ -75,7 +75,7 @@ const se = ({ posts: t, activeItem: s, setActive: i, showLabels: n }) => t ? t.m
75
75
  const [n, r] = p(
76
76
  t.findIndex((o) => o.slug === s)
77
77
  ), [l, c] = p(null), h = ne(null), [w, A] = p(window.innerWidth <= 1250);
78
- v(() => {
78
+ T(() => {
79
79
  if (l) {
80
80
  const o = l.getBoundingClientRect().top + window.scrollY;
81
81
  window.scrollTo({
@@ -84,12 +84,12 @@ const se = ({ posts: t, activeItem: s, setActive: i, showLabels: n }) => t ? t.m
84
84
  });
85
85
  }
86
86
  }, [l]);
87
- const C = () => {
87
+ const v = () => {
88
88
  var o;
89
89
  return ((o = window.screen.orientation) == null ? void 0 : o.type) || (window.innerWidth > window.innerHeight ? "landscape-primary" : "portrait-primary");
90
- }, [m, L] = p(C()), g = () => {
90
+ }, [m, L] = p(v()), g = () => {
91
91
  setTimeout(() => {
92
- L(C()), A(window.innerWidth <= 1250);
92
+ L(v()), A(window.innerWidth <= 1250);
93
93
  }, 100);
94
94
  }, P = (o) => {
95
95
  setTimeout(() => {
@@ -104,34 +104,34 @@ const se = ({ posts: t, activeItem: s, setActive: i, showLabels: n }) => t ? t.m
104
104
  continue;
105
105
  const I = f.getBoundingClientRect(), D = a.getBoundingClientRect(), X = window.getComputedStyle(f), H = window.getComputedStyle(a), Z = Number.parseFloat(X.marginTop) || 0, ee = Number.parseFloat(H.marginBottom) || 0, M = D.bottom + ee, W = I.top - Z;
106
106
  if (M > W) {
107
- const y = M - W;
108
- f.style.marginTop = `${y + 20}px`;
107
+ const C = M - W;
108
+ f.style.marginTop = `${C + 20}px`;
109
109
  }
110
110
  const N = (d = a.closest(
111
111
  ".wp-block-column.is-layout-flow.wp-block-column-is-layout-flow"
112
112
  )) == null ? void 0 : d.nextElementSibling;
113
113
  if (N) {
114
- const y = N.getBoundingClientRect(), k = window.getComputedStyle(N), $ = Number.parseFloat(k.marginTop) || 0, T = y.top - $;
115
- if (M > T) {
116
- const j = M - T;
114
+ const C = N.getBoundingClientRect(), k = window.getComputedStyle(N), $ = Number.parseFloat(k.marginTop) || 0, y = C.top - $;
115
+ if (M > y) {
116
+ const j = M - y;
117
117
  N.style.marginTop = `${j + 20}px`;
118
118
  }
119
119
  }
120
120
  const R = a.closest(".chart.container");
121
121
  if (R) {
122
- const y = R.getBoundingClientRect(), k = window.getComputedStyle(R), $ = Number.parseFloat(k.marginBottom) || 0, T = y.bottom + $, j = Number.parseFloat(H.marginTop) || 0, O = D.top - j;
123
- if (O < T) {
124
- const te = T - O;
122
+ const C = R.getBoundingClientRect(), k = window.getComputedStyle(R), $ = Number.parseFloat(k.marginBottom) || 0, y = C.bottom + $, j = Number.parseFloat(H.marginTop) || 0, O = D.top - j;
123
+ if (O < y) {
124
+ const te = y - O;
125
125
  a.style.marginTop = `${te + 20}px`;
126
126
  }
127
127
  }
128
128
  }
129
129
  }, 10);
130
130
  };
131
- v(() => (window.screen.orientation && window.screen.orientation.addEventListener(
131
+ T(() => (window.screen.orientation && window.screen.orientation.addEventListener(
132
132
  "change",
133
133
  g
134
- ), window.addEventListener("resize", g), () => window.removeEventListener("resize", g)), []), v(() => {
134
+ ), window.addEventListener("resize", g), () => window.removeEventListener("resize", g)), []), T(() => {
135
135
  let o;
136
136
  const u = [];
137
137
  return n !== -1 && (o = setTimeout(() => {
@@ -192,16 +192,14 @@ const se = ({ posts: t, activeItem: s, setActive: i, showLabels: n }) => t ? t.m
192
192
  }) });
193
193
  }, me = ({ posts: t, showLabels: s, height: i }) => {
194
194
  const [n, r] = p(t ? t[0].slug : null);
195
- return v(() => {
195
+ return T(() => {
196
196
  setTimeout(() => {
197
197
  if (window.location.hash) {
198
198
  const l = window.location.hash.substr(1), c = document.getElementById(l);
199
199
  c && t.map((h) => h.slug).indexOf(l) > -1 && (r(l), c.scrollIntoView({ behavior: "auto", block: "start" }));
200
200
  }
201
201
  }, 0);
202
- }, [t]), v(() => {
203
- n && window.scrollTo({ top: 0, behavior: "smooth" });
204
- }, [n]), /* @__PURE__ */ b(F.Fragment, { children: [
202
+ }, [t]), /* @__PURE__ */ b(F.Fragment, { children: [
205
203
  t.map((l) => /* @__PURE__ */ e("anchor", { id: l.slug }, l.slug)),
206
204
  /* @__PURE__ */ e(z, { className: "tabbed posts", text: !0, children: /* @__PURE__ */ e(se, { showLabels: s, posts: t, setActive: r, activeItem: n }) }),
207
205
  /* @__PURE__ */ e(S, { className: "content-tab", style: { height: `${i}px` }, children: /* @__PURE__ */ e(Q, { posts: t, activeItem: n }) })
@@ -224,14 +222,14 @@ const se = ({ posts: t, activeItem: s, setActive: i, showLabels: n }) => t ? t.m
224
222
  "data-use-scrolls": h,
225
223
  "data-show-labels": w,
226
224
  "data-height": A,
227
- "data-preview-mode": C = "Desktop",
225
+ "data-preview-mode": v = "Desktop",
228
226
  pageModuleProps: m,
229
227
  parent: L,
230
228
  editing: g,
231
229
  unique: P
232
230
  } = t;
233
- m != null && m.previewMode && (m != null && m.editing) && (C = m.previewMode, g = m.editing);
234
- const B = t.intl.locale, o = h === "true", u = o ? A : void 0, { width: d } = ce(), a = d <= 1024, x = C !== "Desktop" && g, f = a && !g;
231
+ m != null && m.previewMode && (m != null && m.editing) && (v = m.previewMode, g = m.editing);
232
+ const B = t.intl.locale, o = h === "true", u = o ? A : void 0, { width: d } = ce(), a = d <= 1024, x = v !== "Desktop" && g, f = a && !g;
235
233
  return /* @__PURE__ */ e(S, { className: `viz tabbed posts ${g ? "editing" : ""} ${o ? "scrollable" : ""}`, fluid: !0, children: /* @__PURE__ */ e(
236
234
  re,
237
235
  {
@@ -1,16 +1,19 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { connect as n } from "react-redux";
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { connect as c } from "react-redux";
3
3
  import r from "./mobile.js";
4
4
  import s from "./desktop.js";
5
- import c from "../../utils/deviceType.js";
6
- const m = (o) => {
7
- const e = o.getIn(["data", "pageModuleProps"]), t = {};
8
- return e && (t.pageModuleProps = e), t;
9
- }, a = {}, p = (o) => {
10
- const { pageModuleProps: e } = o;
5
+ import { useWindowDimensionsAndDevice as m } from "../../lib/hooks/window-dimensions.js";
6
+ const p = (o) => {
7
+ const e = o.getIn(["data", "pageModuleProps"]), i = {};
8
+ return e && (i.pageModuleProps = e), i;
9
+ }, a = {}, d = (o) => {
10
+ const { pageModuleProps: e } = o, { deviceType: i, width: l, height: f } = m({
11
+ getDeviceType: !0,
12
+ getHeight: !0
13
+ });
11
14
  let t;
12
- return e != null && e.editing && (e != null && e.previewMode) ? (e == null ? void 0 : e.previewMode) === "Desktop" ? t = s : t = r : ["tablet", "mobile", "midTablet"].includes(c()) ? t = r : t = s, /* @__PURE__ */ i(t, { ...o });
13
- }, k = n(m, a)(p);
15
+ return (e == null ? void 0 : e.editing) === !0 && (e != null && e.previewMode) ? (e == null ? void 0 : e.previewMode) === "Desktop" ? t = s : t = r : ["tablet", "mobile", "midTablet"].includes(i) ? t = r : t = s, /* @__PURE__ */ n(t, { ...o });
16
+ }, D = c(p, a)(d);
14
17
  export {
15
- k as default
18
+ D as default
16
19
  };