@beinformed/ui 1.25.5 → 1.25.6

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.25.6](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.25.5...v1.25.6) (2023-01-11)
6
+
7
+ ### Bug Fixes
8
+
9
+ - **use-modularui:** add useSearch hook for advanced search ([30eb63c](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/30eb63c665dd8e6ebca7eab988afe29c427f7d00))
10
+ - **use-modularui:** could not use useModularUI hook in useEffect ([46d5e8d](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/46d5e8d2f4f7e2181e1d9c484c9e6a1232c4d77c))
11
+
5
12
  ### [1.25.5](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.25.4...v1.25.5) (2023-01-10)
6
13
 
7
14
  ### Bug Fixes
@@ -82,6 +82,13 @@ export const useQuicksearch = href => useModularUIBasic("quicksearch", href, {
82
82
  targetModel: CaseSearchModel
83
83
  });
84
84
 
85
+ /**
86
+ */
87
+ export const useSearch = href => useModularUIBasic("search", href, {
88
+ expectedModels: ["CaseSearch"],
89
+ targetModel: CaseSearchModel
90
+ });
91
+
85
92
  /**
86
93
  */
87
94
  export const useUserProfile = href => useModularUIBasic("userprofile", href, {
@@ -1 +1 @@
1
- {"version":3,"file":"useModularUIModel.js","names":["ApplicationModel","CaseViewModel","TabModel","ListModel","GroupingPanelModel","DetailModel","CaseSearchModel","ListDetailModel","UserProfileModel","useModularUIBasic","useApplication","expectedModels","targetModel","useTab","href","useCaseView","usePanel","useList","useListOrDetail","useListDetail","forceTargetModel","useGroupingPanel","useDetailPanel","useQuicksearch","useUserProfile"],"sources":["../../src/hooks/useModularUIModel.js"],"sourcesContent":["// @flow\nimport ApplicationModel from \"../models/application/ApplicationModel\";\nimport CaseViewModel from \"../models/caseview/CaseViewModel\";\nimport TabModel from \"../models/tab/TabModel\";\nimport ListModel from \"../models/list/ListModel\";\nimport GroupingPanelModel from \"../models/panels/GroupingPanelModel\";\nimport DetailModel from \"../models/detail/DetailModel\";\nimport CaseSearchModel from \"../models/search/CaseSearchModel\";\nimport ListDetailModel from \"../models/list/ListDetailModel\";\nimport UserProfileModel from \"../models/user/UserProfileModel\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\n\n/**\n * Load application\n */\nexport const useApplication = (): ApplicationModel | null =>\n useModularUIBasic(\"application\", \"/\", {\n expectedModels: [\"Application\"],\n targetModel: ApplicationModel,\n });\n\n/**\n * Load a tab by href\n */\nexport const useTab = (href: string): TabModel | null =>\n useModularUIBasic(\"tab\", href, {\n expectedModels: [\"Tab\"],\n targetModel: TabModel,\n });\n\n/**\n * Load caseview by href\n */\nexport const useCaseView = (href: string): CaseViewModel | null =>\n useModularUIBasic(\"caseview\", href, {\n expectedModels: [\"CaseView\"],\n targetModel: CaseViewModel,\n });\n\n/**\n */\nexport const usePanel = (\n href: string\n): ListModel | GroupingPanelModel | DetailModel | null =>\n useModularUIBasic(\"panel\", href, {\n expectedModels: [\"List\", \"GroupingPanel\", \"Detail\"],\n });\n\n/**\n */\nexport const useList = (href: string): ListModel | null =>\n useModularUIBasic(\"list\", href, {\n expectedModels: [\"List\"],\n targetModel: ListModel,\n });\n\n/**\n */\nexport const useListOrDetail = (href: string): ListModel | DetailModel | null =>\n useModularUIBasic(\"list\", href, {\n expectedModels: [\"List\", \"Detail\"],\n targetModel: [ListModel, DetailModel],\n });\n\n/**\n */\nexport const useListDetail = (href: string): ListDetailModel | null =>\n useModularUIBasic(\"listdetail\", href, {\n expectedModels: [\"ListDetail\"],\n targetModel: ListDetailModel,\n forceTargetModel: true,\n });\n\n/**\n */\nexport const useGroupingPanel = (href: string): GroupingPanelModel | null =>\n useModularUIBasic(\"groupingpanel\", href, {\n expectedModels: [\"GroupingPanel\"],\n targetModel: GroupingPanelModel,\n });\n\n/**\n */\nexport const useDetailPanel = (href: string): DetailModel | null =>\n useModularUIBasic(\"detailpanel\", href, {\n expectedModels: [\"Detail\"],\n targetModel: DetailModel,\n });\n\n/**\n */\nexport const useQuicksearch = (href: string): CaseSearchModel | null =>\n useModularUIBasic(\"quicksearch\", href, {\n expectedModels: [\"CaseSearch\"],\n targetModel: CaseSearchModel,\n });\n\n/**\n */\nexport const useUserProfile = (href: string): UserProfileModel | null =>\n useModularUIBasic(\"userprofile\", href, {\n expectedModels: [\"UserProfile\"],\n targetModel: UserProfileModel,\n });\n"],"mappings":"AACA,OAAOA,gBAAgB,MAAM,wCAAwC;AACrE,OAAOC,aAAa,MAAM,kCAAkC;AAC5D,OAAOC,QAAQ,MAAM,wBAAwB;AAC7C,OAAOC,SAAS,MAAM,0BAA0B;AAChD,OAAOC,kBAAkB,MAAM,qCAAqC;AACpE,OAAOC,WAAW,MAAM,8BAA8B;AACtD,OAAOC,eAAe,MAAM,kCAAkC;AAC9D,OAAOC,eAAe,MAAM,gCAAgC;AAC5D,OAAOC,gBAAgB,MAAM,iCAAiC;AAE9D,SAASC,iBAAiB,QAAQ,qBAAqB;;AAEvD;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAG,MAC5BD,iBAAiB,CAAC,aAAa,EAAE,GAAG,EAAE;EACpCE,cAAc,EAAE,CAAC,aAAa,CAAC;EAC/BC,WAAW,EAAEZ;AACf,CAAC,CAAC;;AAEJ;AACA;AACA;AACA,OAAO,MAAMa,MAAM,GAAIC,IAAY,IACjCL,iBAAiB,CAAC,KAAK,EAAEK,IAAI,EAAE;EAC7BH,cAAc,EAAE,CAAC,KAAK,CAAC;EACvBC,WAAW,EAAEV;AACf,CAAC,CAAC;;AAEJ;AACA;AACA;AACA,OAAO,MAAMa,WAAW,GAAID,IAAY,IACtCL,iBAAiB,CAAC,UAAU,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O,MAAMkB,cAAc,GAAIT,IAAY,IACzCL,iBAAiB,CAAC,aAAa,EAAEK,IAAI,EAAE;EACrCH,cAAc,EAAE,CAAC,YAAY,CAAC;EAC9BC,WAAW,EAAEN;AACf,CAAC,CAAC;;AAEJ;AACA;AACA,OAAO,MAAMkB,cAAc,GAAIV,IAAY,IACzCL,iBAAiB,CAAC,aAAa,EAAEK,IAAI,EAAE;EACrCH,cAAc,EAAE,CAAC,aAAa,CAAC;EAC/BC,WAAW,EAAEJ;AACf,CAAC,CAAC"}
1
+ {"version":3,"file":"useModularUIModel.js","names":["ApplicationModel","CaseViewModel","TabModel","ListModel","GroupingPanelModel","DetailModel","CaseSearchModel","ListDetailModel","UserProfileModel","useModularUIBasic","useApplication","expectedModels","targetModel","useTab","href","useCaseView","usePanel","useList","useListOrDetail","useListDetail","forceTargetModel","useGroupingPanel","useDetailPanel","useQuicksearch","useSearch","useUserProfile"],"sources":["../../src/hooks/useModularUIModel.js"],"sourcesContent":["// @flow\nimport ApplicationModel from \"../models/application/ApplicationModel\";\nimport CaseViewModel from \"../models/caseview/CaseViewModel\";\nimport TabModel from \"../models/tab/TabModel\";\nimport ListModel from \"../models/list/ListModel\";\nimport GroupingPanelModel from \"../models/panels/GroupingPanelModel\";\nimport DetailModel from \"../models/detail/DetailModel\";\nimport CaseSearchModel from \"../models/search/CaseSearchModel\";\nimport ListDetailModel from \"../models/list/ListDetailModel\";\nimport UserProfileModel from \"../models/user/UserProfileModel\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\n\n/**\n * Load application\n */\nexport const useApplication = (): ApplicationModel | null =>\n useModularUIBasic(\"application\", \"/\", {\n expectedModels: [\"Application\"],\n targetModel: ApplicationModel,\n });\n\n/**\n * Load a tab by href\n */\nexport const useTab = (href: string): TabModel | null =>\n useModularUIBasic(\"tab\", href, {\n expectedModels: [\"Tab\"],\n targetModel: TabModel,\n });\n\n/**\n * Load caseview by href\n */\nexport const useCaseView = (href: string): CaseViewModel | null =>\n useModularUIBasic(\"caseview\", href, {\n expectedModels: [\"CaseView\"],\n targetModel: CaseViewModel,\n });\n\n/**\n */\nexport const usePanel = (\n href: string\n): ListModel | GroupingPanelModel | DetailModel | null =>\n useModularUIBasic(\"panel\", href, {\n expectedModels: [\"List\", \"GroupingPanel\", \"Detail\"],\n });\n\n/**\n */\nexport const useList = (href: string): ListModel | null =>\n useModularUIBasic(\"list\", href, {\n expectedModels: [\"List\"],\n targetModel: ListModel,\n });\n\n/**\n */\nexport const useListOrDetail = (href: string): ListModel | DetailModel | null =>\n useModularUIBasic(\"list\", href, {\n expectedModels: [\"List\", \"Detail\"],\n targetModel: [ListModel, DetailModel],\n });\n\n/**\n */\nexport const useListDetail = (href: string): ListDetailModel | null =>\n useModularUIBasic(\"listdetail\", href, {\n expectedModels: [\"ListDetail\"],\n targetModel: ListDetailModel,\n forceTargetModel: true,\n });\n\n/**\n */\nexport const useGroupingPanel = (href: string): GroupingPanelModel | null =>\n useModularUIBasic(\"groupingpanel\", href, {\n expectedModels: [\"GroupingPanel\"],\n targetModel: GroupingPanelModel,\n });\n\n/**\n */\nexport const useDetailPanel = (href: string): DetailModel | null =>\n useModularUIBasic(\"detailpanel\", href, {\n expectedModels: [\"Detail\"],\n targetModel: DetailModel,\n });\n\n/**\n */\nexport const useQuicksearch = (href: string): CaseSearchModel | null =>\n useModularUIBasic(\"quicksearch\", href, {\n expectedModels: [\"CaseSearch\"],\n targetModel: CaseSearchModel,\n });\n\n/**\n */\nexport const useSearch = (href: string): CaseSearchModel | null =>\n useModularUIBasic(\"search\", href, {\n expectedModels: [\"CaseSearch\"],\n targetModel: CaseSearchModel,\n });\n\n/**\n */\nexport const useUserProfile = (href: string): UserProfileModel | null =>\n useModularUIBasic(\"userprofile\", href, {\n expectedModels: [\"UserProfile\"],\n targetModel: UserProfileModel,\n });\n"],"mappings":"AACA,OAAOA,gBAAgB,MAAM,wCAAwC;AACrE,OAAOC,aAAa,MAAM,kCAAkC;AAC5D,OAAOC,QAAQ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"reselect";
2
2
  import { useSelector } from "react-redux";
3
3
  import ModularUIRequest from "../modularui/ModularUIRequest";
4
4
  import { getLocale } from "../redux/selectors/i18n";
5
- /**
6
- * Creates a ModularUIRequest with the locale as available in the redux store
7
- */
8
- export const useModularUIRequest = () => useSelector(createSelector([getLocale], localeCode => {
5
+ const getModularUIRequest = createSelector([getLocale], localeCode => {
9
6
  return (href, options) => {
10
7
  const request = new ModularUIRequest(href, options);
11
8
  request.locale = localeCode;
12
9
  return request;
13
10
  };
14
- }));
11
+ });
12
+
13
+ /**
14
+ * Creates a ModularUIRequest with the locale as available in the redux store
15
+ */
16
+ export const useModularUIRequest = () => useSelector(getModularUIRequest);
15
17
  //# sourceMappingURL=useModularUIRequest.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useModularUIRequest.js","names":["createSelector","useSelector","ModularUIRequest","getLocale","useModularUIRequest","localeCode","href","options","request","locale"],"sources":["../../src/hooks/useModularUIRequest.js"],"sourcesContent":["// @flow\nimport { createSelector } from \"reselect\";\nimport { useSelector } from \"react-redux\";\n\nimport ModularUIRequest from \"../modularui/ModularUIRequest\";\nimport { getLocale } from \"../redux/selectors/i18n\";\n\nimport type Href from \"../models/href/Href\";\nimport type { RequestModularUIOptions } from \"../utils\";\n\n/**\n * Creates a ModularUIRequest with the locale as available in the redux store\n */\nexport const useModularUIRequest = (): ((\n href: Href,\n options?: $Shape<RequestModularUIOptions>\n) => ModularUIRequest) =>\n useSelector(\n createSelector([getLocale], (localeCode) => {\n return (href: Href, options?: $Shape<RequestModularUIOptions>) => {\n const request = new ModularUIRequest(href, options);\n request.locale = localeCode;\n return request;\n };\n })\n );\n"],"mappings":"AACA,SAASA,cAAc,QAAQ,UAAU;AACzC,SAASC,WAAW,QAAQ,aAAa;AAEzC,OAAOC,gBAAgB,MAAM,+BAA+B;AAC5D,SAASC,SAAS,QAAQ,yBAAyB;AAKnD;AACA;AACA;AACA,OAAO,MAAMC,mBAAmB,GAAG,MAIjCH,WAAW,CACTD,cAAc,CAAC,CAACG,SAAS,CAAC,EAAGE,UAAU,IAAK;EAC1C,OAAO,CAACC,IAAU,EAAEC,OAAyC,KAAK;IAChE,MAAMC,OAAO,GAAG,IAAIN,gBAAgB,CAACI,IAAI,EAAEC,OAAO,CAAC;IACnDC,OAAO,CAACC,MAAM,GAAGJ,UAAU;IAC3B,OAAOG,OAAO;EAChB,CAAC;AACH,CAAC,CAAC,CACH"}
1
+ {"version":3,"file":"useModularUIRequest.js","names":["createSelector","useSelector","ModularUIRequest","getLocale","getModularUIRequest","localeCode","href","options","request","locale","useModularUIRequest"],"sources":["../../src/hooks/useModularUIRequest.js"],"sourcesContent":["// @flow\nimport { createSelector } from \"reselect\";\nimport { useSelector } from \"react-redux\";\n\nimport ModularUIRequest from \"../modularui/ModularUIRequest\";\nimport { getLocale } from \"../redux/selectors/i18n\";\n\nimport type { RequestModularUIOptions } from \"../utils\";\nimport type Href from \"../models/href/Href\";\n\nconst getModularUIRequest = createSelector([getLocale], (localeCode) => {\n return (href: Href, options?: $Shape<RequestModularUIOptions>) => {\n const request = new ModularUIRequest(href, options);\n request.locale = localeCode;\n return request;\n };\n});\n\n/**\n * Creates a ModularUIRequest with the locale as available in the redux store\n */\nexport const useModularUIRequest = (): ((\n href: Href,\n options?: $Shape<RequestModularUIOptions>\n) => ModularUIRequest) => useSelector(getModularUIRequest);\n"],"mappings":"AACA,SAASA,cAAc,QAAQ,UAAU;AACzC,SAASC,WAAW,QAAQ,aAAa;AAEzC,OAAOC,gBAAgB,MAAM,+BAA+B;AAC5D,SAASC,SAAS,QAAQ,yBAAyB;AAKnD,MAAMC,mBAAmB,GAAGJ,cAAc,CAAC,CAACG,SAAS,CAAC,EAAGE,UAAU,IAAK;EACtE,OAAO,CAACC,IAAU,EAAEC,OAAyC,KAAK;IAChE,MAAMC,OAAO,GAAG,IAAIN,gBAAgB,CAACI,IAAI,EAAEC,OAAO,CAAC;IACnDC,OAAO,CAACC,MAAM,GAAGJ,UAAU;IAC3B,OAAOG,OAAO;EAChB,CAAC;AACH,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAME,mBAAmB,GAAG,MAGTT,WAAW,CAACG,mBAAmB,CAAC"}
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.useUserProfile = exports.useTab = exports.useQuicksearch = exports.usePanel = exports.useListOrDetail = exports.useListDetail = exports.useList = exports.useGroupingPanel = exports.useDetailPanel = exports.useCaseView = exports.useApplication = void 0;
7
+ exports.useUserProfile = exports.useTab = exports.useSearch = exports.useQuicksearch = exports.usePanel = exports.useListOrDetail = exports.useListDetail = exports.useList = exports.useGroupingPanel = exports.useDetailPanel = exports.useCaseView = exports.useApplication = void 0;
8
8
  var _ApplicationModel = _interopRequireDefault(require("../models/application/ApplicationModel"));
9
9
  var _CaseViewModel = _interopRequireDefault(require("../models/caseview/CaseViewModel"));
10
10
  var _TabModel = _interopRequireDefault(require("../models/tab/TabModel"));
@@ -100,6 +100,14 @@ const useQuicksearch = href => (0, _useModularUIBasic.useModularUIBasic)("quicks
100
100
  /**
101
101
  */
102
102
  exports.useQuicksearch = useQuicksearch;
103
+ const useSearch = href => (0, _useModularUIBasic.useModularUIBasic)("search", href, {
104
+ expectedModels: ["CaseSearch"],
105
+ targetModel: _CaseSearchModel.default
106
+ });
107
+
108
+ /**
109
+ */
110
+ exports.useSearch = useSearch;
103
111
  const useUserProfile = href => (0, _useModularUIBasic.useModularUIBasic)("userprofile", href, {
104
112
  expectedModels: ["UserProfile"],
105
113
  targetModel: _UserProfileModel.default
@@ -96,6 +96,14 @@ export const useQuicksearch = (href: string): CaseSearchModel | null =>
96
96
  targetModel: CaseSearchModel,
97
97
  });
98
98
 
99
+ /**
100
+ */
101
+ export const useSearch = (href: string): CaseSearchModel | null =>
102
+ useModularUIBasic("search", href, {
103
+ expectedModels: ["CaseSearch"],
104
+ targetModel: CaseSearchModel,
105
+ });
106
+
99
107
  /**
100
108
  */
101
109
  export const useUserProfile = (href: string): UserProfileModel | null =>
@@ -1 +1 @@
1
- {"version":3,"file":"useModularUIModel.js","names":["useApplication","useModularUIBasic","expectedModels","targetModel","ApplicationModel","useTab","href","TabModel","useCaseView","CaseViewModel","usePanel","useList","ListModel","useListOrDetail","DetailModel","useListDetail","ListDetailModel","forceTargetModel","useGroupingPanel","GroupingPanelModel","useDetailPanel","useQuicksearch","CaseSearchModel","useUserProfile","UserProfileModel"],"sources":["../../src/hooks/useModularUIModel.js"],"sourcesContent":["// @flow\nimport ApplicationModel from \"../models/application/ApplicationModel\";\nimport CaseViewModel from \"../models/caseview/CaseViewModel\";\nimport TabModel from \"../models/tab/TabModel\";\nimport ListModel from \"../models/list/ListModel\";\nimport GroupingPanelModel from \"../models/panels/GroupingPanelModel\";\nimport DetailModel from \"../models/detail/DetailModel\";\nimport CaseSearchModel from \"../models/search/CaseSearchModel\";\nimport ListDetailModel from \"../models/list/ListDetailModel\";\nimport UserProfileModel from \"../models/user/UserProfileModel\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\n\n/**\n * Load application\n */\nexport const useApplication = (): ApplicationModel | null =>\n useModularUIBasic(\"application\", \"/\", {\n expectedModels: [\"Application\"],\n targetModel: ApplicationModel,\n });\n\n/**\n * Load a tab by href\n */\nexport const useTab = (href: string): TabModel | null =>\n useModularUIBasic(\"tab\", href, {\n expectedModels: [\"Tab\"],\n targetModel: TabModel,\n });\n\n/**\n * Load caseview by href\n */\nexport const useCaseView = (href: string): CaseViewModel | null =>\n useModularUIBasic(\"caseview\", href, {\n expectedModels: [\"CaseView\"],\n targetModel: CaseViewModel,\n });\n\n/**\n */\nexport const usePanel = (\n href: string\n): ListModel | GroupingPanelModel | DetailModel | null =>\n useModularUIBasic(\"panel\", href, {\n expectedModels: [\"List\", \"GroupingPanel\", \"Detail\"],\n });\n\n/**\n */\nexport const useList = (href: string): ListModel | null =>\n useModularUIBasic(\"list\", href, {\n expectedModels: [\"List\"],\n targetModel: ListModel,\n });\n\n/**\n */\nexport const useListOrDetail = (href: string): ListModel | DetailModel | null =>\n useModularUIBasic(\"list\", href, {\n expectedModels: [\"List\", \"Detail\"],\n targetModel: [ListModel, DetailModel],\n });\n\n/**\n */\nexport const useListDetail = (href: string): ListDetailModel | null =>\n useModularUIBasic(\"listdetail\", href, {\n expectedModels: [\"ListDetail\"],\n targetModel: ListDetailModel,\n forceTargetModel: true,\n });\n\n/**\n */\nexport const useGroupingPanel = (href: string): GroupingPanelModel | null =>\n useModularUIBasic(\"groupingpanel\", href, {\n expectedModels: [\"GroupingPanel\"],\n targetModel: GroupingPanelModel,\n });\n\n/**\n */\nexport const useDetailPanel = (href: string): DetailModel | null =>\n useModularUIBasic(\"detailpanel\", href, {\n expectedModels: [\"Detail\"],\n targetModel: DetailModel,\n });\n\n/**\n */\nexport const useQuicksearch = (href: string): CaseSearchModel | null =>\n useModularUIBasic(\"quicksearch\", href, {\n expectedModels: [\"CaseSearch\"],\n targetModel: CaseSearchModel,\n });\n\n/**\n */\nexport const useUserProfile = (href: string): UserProfileModel | null =>\n useModularUIBasic(\"userprofile\", href, {\n expectedModels: [\"UserProfile\"],\n targetModel: UserProfileModel,\n });\n"],"mappings":";;;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACO,MAAMA,cAAc,GAAG,MAC5B,IAAAC,oCAAiB,EAAC,aAAa,EAAE,GAAG,EAAE;EACpCC,cAAc,EAAE,CAAC,aAAa,CAAC;EAC/BC,WAAW,EAAEC;AACf,CAAC,CAAC;;AAEJ;AACA;AACA;AAFA;AAGO,MAAMC,MAAM,GAAIC,IAAY,IACjC,IAAAL,oCAAiB,EAAC,KAAK,EAAEK,IAAI,EAAE;EAC7BJ,cAAc,EAAE,CAAC,KAAK,CAAC;EACvBC,WAAW,EAAEI;AACf,CAAC,CAAC;;AAEJ;AACA;AACA;AAFA;AAGO,MAAM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AAE;EACrCJ,cAAc,EAAE,CAAC,QAAQ,CAAC;EAC1BC,WAAW,EAAEW;AACf,CAAC,CAAC;;AAEJ;AACA;AADA;AAEO,MAAMO,cAAc,GAAIf,IAAY,IACzC,IAAAL,oCAAiB,EAAC,aAAa,EAAEK,IAAI,EAAE;EACrCJ,cAAc,EAAE,CAAC,YAAY,CAAC;EAC9BC,WAAW,EAAEmB;AACf,CAAC,CAAC;;AAEJ;AACA;AADA;AAEO,MAAMC,cAAc,GAAIjB,IAAY,IACzC,IAAAL,oCAAiB,EAAC,aAAa,EAAEK,IAAI,EAAE;EACrCJ,cAAc,EAAE,CAAC,aAAa,CAAC;EAC/BC,WAAW,EAAEqB;AACf,CAAC,CAAC;AAAC"}
1
+ {"version":3,"file":"useModularUIModel.js","names":["useApplication","useModularUIBasic","expectedModels","targetModel","ApplicationModel","useTab","href","TabModel","useCaseView","CaseViewModel","usePanel","useList","ListModel","useListOrDetail","DetailModel","useListDetail","ListDetailModel","forceTargetModel","useGroupingPanel","GroupingPanelModel","useDetailPanel","useQuicksearch","CaseSearchModel","useSearch","useUserProfile","UserProfileModel"],"sources":["../../src/hooks/useModularUIModel.js"],"sourcesContent":["// @flow\nimport ApplicationModel from \"../models/application/ApplicationModel\";\nimport CaseViewModel from \"../models/caseview/CaseViewModel\";\nimport TabModel from \"../models/tab/TabModel\";\nimport ListModel from \"../models/list/ListModel\";\nimport GroupingPanelModel from \"../models/panels/GroupingPanelModel\";\nimport DetailModel from \"../models/detail/DetailModel\";\nimport CaseSearchModel from \"../models/search/CaseSearchModel\";\nimport ListDetailModel from \"../models/list/ListDetailModel\";\nimport UserProfileModel from \"../models/user/UserProfileModel\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\n\n/**\n * Load application\n */\nexport const useApplication = (): ApplicationModel | null =>\n useModularUIBasic(\"application\", \"/\", {\n expectedModels: [\"Application\"],\n targetModel: ApplicationModel,\n });\n\n/**\n * Load a tab by href\n */\nexport const useTab = (href: string): TabModel | null =>\n useModularUIBasic(\"tab\", href, {\n expectedModels: [\"Tab\"],\n targetModel: TabModel,\n });\n\n/**\n * Load caseview by href\n */\nexport const useCaseView = (href: string): CaseViewModel | null =>\n useModularUIBasic(\"caseview\", href, {\n expectedModels: [\"CaseView\"],\n targetModel: CaseViewModel,\n });\n\n/**\n */\nexport const usePanel = (\n href: string\n): ListModel | GroupingPanelModel | DetailModel | null =>\n useModularUIBasic(\"panel\", href, {\n expectedModels: [\"List\", \"GroupingPanel\", \"Detail\"],\n });\n\n/**\n */\nexport const useList = (href: string): ListModel | null =>\n useModularUIBasic(\"list\", href, {\n expectedModels: [\"List\"],\n targetModel: ListModel,\n });\n\n/**\n */\nexport const useListOrDetail = (href: string): ListModel | DetailModel | null =>\n useModularUIBasic(\"list\", href, {\n expectedModels: [\"List\", \"Detail\"],\n targetModel: [ListModel, DetailModel],\n });\n\n/**\n */\nexport const useListDetail = (href: string): ListDetailModel | null =>\n useModularUIBasic(\"listdetail\", href, {\n expectedModels: [\"ListDetail\"],\n targetModel: ListDetailModel,\n forceTargetModel: true,\n });\n\n/**\n */\nexport const useGroupingPanel = (href: string): GroupingPanelModel | null =>\n useModularUIBasic(\"groupingpanel\", href, {\n expectedModels: [\"GroupingPanel\"],\n targetModel: GroupingPanelModel,\n });\n\n/**\n */\nexport const useDetailPanel = (href: string): DetailModel | null =>\n useModularUIBasic(\"detailpanel\", href, {\n expectedModels: [\"Detail\"],\n targetModel: DetailModel,\n });\n\n/**\n */\nexport const useQuicksearch = (href: string): CaseSearchModel | null =>\n useModularUIBasic(\"quicksearch\", href, {\n expectedModels: [\"CaseSearch\"],\n targetModel: CaseSearchModel,\n });\n\n/**\n */\nexport const useSearch = (href: string): CaseSearchModel | null =>\n useModularUIBasic(\"search\", href, {\n expectedModels: [\"CaseSearch\"],\n targetModel: CaseSearchModel,\n });\n\n/**\n */\nexport const useUserProfile = (href: string): UserProfileModel | null =>\n useModularUIBasic(\"userprofile\", href, {\n expectedModels: [\"UserProfile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A;AADA;AAEO,MAAMC,aAAa,GAAIT,IAAY,IACxC,IAAAL,oCAAiB,EAAC,YAAY,EAAEK,IAAI,EAAE;EACpCJ,cAAc,EAAE,CAAC,YAAY,CAAC;EAC9BC,WAAW,EAAEa,wBAAe;EAC5BC,gBAAgB,EAAE;AACpB,CAAC,CAAC;;AAEJ;AACA;AADA;AAEO,MAAMC,gBAAgB,GAAIZ,IAAY,IAC3C,IAAAL,oCAAiB,EAAC,eAAe,EAAEK,IAAI,EAAE;EACvCJ,cAAc,EAAE,CAAC,eAAe,CAAC;EACjCC,WAAW,EAAEgB;AACf,CAAC,CAAC;;AAEJ;AACA;AADA;AAEO,MAAMC,cAAc,GAAId,IAAY,IACzC,IAAAL,oCAAiB,EAAC,aAAa,EAAEK,IAAI,EAAE;EACrCJ,cAAc,EAAE,CAAC,QAAQ,CAAC;EAC1BC,WAAW,EAAEW;AACf,CAAC,CAAC;;AAEJ;AACA;AADA;AAEO,MAAMO,cAAc,GAAIf,IAAY,IACzC,IAAAL,oCAAiB,EAAC,aAAa,EAAEK,IAAI,EAAE;EACrCJ,cAAc,EAAE,CAAC,YAAY,CAAC;EAC9BC,WAAW,EAAEmB;AACf,CAAC,CAAC;;AAEJ;AACA;AADA;AAEO,MAAMC,SAAS,GAAIjB,IAAY,IACpC,IAAAL,oCAAiB,EAAC,QAAQ,EAAEK,IAAI,EAAE;EAChCJ,cAAc,EAAE,CAAC,YAAY,CAAC;EAC9BC,WAAW,EAAEmB;AACf,CAAC,CAAC;;AAEJ;AACA;AADA;AAEO,MAAME,cAAc,GAAIlB,IAAY,IACzC,IAAAL,oCAAiB,EAAC,aAAa,EAAEK,IAAI,EAAE;EACrCJ,cAAc,EAAE,CAAC,aAAa,CAAC;EAC/BC,WAAW,EAAEsB;AACf,CAAC,CAAC;AAAC"}
@@ -9,15 +9,17 @@ var _reselect = require("reselect");
9
9
  var _reactRedux = require("react-redux");
10
10
  var _ModularUIRequest = _interopRequireDefault(require("../modularui/ModularUIRequest"));
11
11
  var _i18n = require("../redux/selectors/i18n");
12
- /**
13
- * Creates a ModularUIRequest with the locale as available in the redux store
14
- */
15
- const useModularUIRequest = () => (0, _reactRedux.useSelector)((0, _reselect.createSelector)([_i18n.getLocale], localeCode => {
12
+ const getModularUIRequest = (0, _reselect.createSelector)([_i18n.getLocale], localeCode => {
16
13
  return (href, options) => {
17
14
  const request = new _ModularUIRequest.default(href, options);
18
15
  request.locale = localeCode;
19
16
  return request;
20
17
  };
21
- }));
18
+ });
19
+
20
+ /**
21
+ * Creates a ModularUIRequest with the locale as available in the redux store
22
+ */
23
+ const useModularUIRequest = () => (0, _reactRedux.useSelector)(getModularUIRequest);
22
24
  exports.useModularUIRequest = useModularUIRequest;
23
25
  //# sourceMappingURL=useModularUIRequest.js.map
@@ -5,8 +5,16 @@ import { useSelector } from "react-redux";
5
5
  import ModularUIRequest from "../modularui/ModularUIRequest";
6
6
  import { getLocale } from "../redux/selectors/i18n";
7
7
 
8
- import type Href from "../models/href/Href";
9
8
  import type { RequestModularUIOptions } from "../utils";
9
+ import type Href from "../models/href/Href";
10
+
11
+ const getModularUIRequest = createSelector([getLocale], (localeCode) => {
12
+ return (href: Href, options?: $Shape<RequestModularUIOptions>) => {
13
+ const request = new ModularUIRequest(href, options);
14
+ request.locale = localeCode;
15
+ return request;
16
+ };
17
+ });
10
18
 
11
19
  /**
12
20
  * Creates a ModularUIRequest with the locale as available in the redux store
@@ -14,13 +22,4 @@ import type { RequestModularUIOptions } from "../utils";
14
22
  export const useModularUIRequest = (): ((
15
23
  href: Href,
16
24
  options?: $Shape<RequestModularUIOptions>
17
- ) => ModularUIRequest) =>
18
- useSelector(
19
- createSelector([getLocale], (localeCode) => {
20
- return (href: Href, options?: $Shape<RequestModularUIOptions>) => {
21
- const request = new ModularUIRequest(href, options);
22
- request.locale = localeCode;
23
- return request;
24
- };
25
- })
26
- );
25
+ ) => ModularUIRequest) => useSelector(getModularUIRequest);
@@ -1 +1 @@
1
- {"version":3,"file":"useModularUIRequest.js","names":["useModularUIRequest","useSelector","createSelector","getLocale","localeCode","href","options","request","ModularUIRequest","locale"],"sources":["../../src/hooks/useModularUIRequest.js"],"sourcesContent":["// @flow\nimport { createSelector } from \"reselect\";\nimport { useSelector } from \"react-redux\";\n\nimport ModularUIRequest from \"../modularui/ModularUIRequest\";\nimport { getLocale } from \"../redux/selectors/i18n\";\n\nimport type Href from \"../models/href/Href\";\nimport type { RequestModularUIOptions } from \"../utils\";\n\n/**\n * Creates a ModularUIRequest with the locale as available in the redux store\n */\nexport const useModularUIRequest = (): ((\n href: Href,\n options?: $Shape<RequestModularUIOptions>\n) => ModularUIRequest) =>\n useSelector(\n createSelector([getLocale], (localeCode) => {\n return (href: Href, options?: $Shape<RequestModularUIOptions>) => {\n const request = new ModularUIRequest(href, options);\n request.locale = localeCode;\n return request;\n };\n })\n );\n"],"mappings":";;;;;;;AACA;AACA;AAEA;AACA;AAKA;AACA;AACA;AACO,MAAMA,mBAAmB,GAAG,MAIjC,IAAAC,uBAAW,EACT,IAAAC,wBAAc,EAAC,CAACC,eAAS,CAAC,EAAGC,UAAU,IAAK;EAC1C,OAAO,CAACC,IAAU,EAAEC,OAAyC,KAAK;IAChE,MAAMC,OAAO,GAAG,IAAIC,yBAAgB,CAACH,IAAI,EAAEC,OAAO,CAAC;IACnDC,OAAO,CAACE,MAAM,GAAGL,UAAU;IAC3B,OAAOG,OAAO;EAChB,CAAC;AACH,CAAC,CAAC,CACH;AAAC"}
1
+ {"version":3,"file":"useModularUIRequest.js","names":["getModularUIRequest","createSelector","getLocale","localeCode","href","options","request","ModularUIRequest","locale","useModularUIRequest","useSelector"],"sources":["../../src/hooks/useModularUIRequest.js"],"sourcesContent":["// @flow\nimport { createSelector } from \"reselect\";\nimport { useSelector } from \"react-redux\";\n\nimport ModularUIRequest from \"../modularui/ModularUIRequest\";\nimport { getLocale } from \"../redux/selectors/i18n\";\n\nimport type { RequestModularUIOptions } from \"../utils\";\nimport type Href from \"../models/href/Href\";\n\nconst getModularUIRequest = createSelector([getLocale], (localeCode) => {\n return (href: Href, options?: $Shape<RequestModularUIOptions>) => {\n const request = new ModularUIRequest(href, options);\n request.locale = localeCode;\n return request;\n };\n});\n\n/**\n * Creates a ModularUIRequest with the locale as available in the redux store\n */\nexport const useModularUIRequest = (): ((\n href: Href,\n options?: $Shape<RequestModularUIOptions>\n) => ModularUIRequest) => useSelector(getModularUIRequest);\n"],"mappings":";;;;;;;AACA;AACA;AAEA;AACA;AAKA,MAAMA,mBAAmB,GAAG,IAAAC,wBAAc,EAAC,CAACC,eAAS,CAAC,EAAGC,UAAU,IAAK;EACtE,OAAO,CAACC,IAAU,EAAEC,OAAyC,KAAK;IAChE,MAAMC,OAAO,GAAG,IAAIC,yBAAgB,CAACH,IAAI,EAAEC,OAAO,CAAC;IACnDC,OAAO,CAACE,MAAM,GAAGL,UAAU;IAC3B,OAAOG,OAAO;EAChB,CAAC;AACH,CAAC,CAAC;;AAEF;AACA;AACA;AACO,MAAMG,mBAAmB,GAAG,MAGT,IAAAC,uBAAW,EAACV,mBAAmB,CAAC;AAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beinformed/ui",
3
- "version": "1.25.5",
3
+ "version": "1.25.6",
4
4
  "description": "Toolbox for be informed javascript layouts",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "bugs": "http://support.beinformed.com",
@@ -125,7 +125,7 @@
125
125
  "eslint-plugin-import": "^2.26.0",
126
126
  "eslint-plugin-jest": "^27.2.1",
127
127
  "eslint-plugin-jsdoc": "^39.6.4",
128
- "eslint-plugin-react": "^7.31.11",
128
+ "eslint-plugin-react": "^7.32.0",
129
129
  "eslint-plugin-react-hooks": "^4.5.0",
130
130
  "eslint-plugin-you-dont-need-lodash-underscore": "^6.12.0",
131
131
  "flow-bin": "^0.196.3",
@@ -96,6 +96,14 @@ export const useQuicksearch = (href: string): CaseSearchModel | null =>
96
96
  targetModel: CaseSearchModel,
97
97
  });
98
98
 
99
+ /**
100
+ */
101
+ export const useSearch = (href: string): CaseSearchModel | null =>
102
+ useModularUIBasic("search", href, {
103
+ expectedModels: ["CaseSearch"],
104
+ targetModel: CaseSearchModel,
105
+ });
106
+
99
107
  /**
100
108
  */
101
109
  export const useUserProfile = (href: string): UserProfileModel | null =>
@@ -5,8 +5,16 @@ import { useSelector } from "react-redux";
5
5
  import ModularUIRequest from "../modularui/ModularUIRequest";
6
6
  import { getLocale } from "../redux/selectors/i18n";
7
7
 
8
- import type Href from "../models/href/Href";
9
8
  import type { RequestModularUIOptions } from "../utils";
9
+ import type Href from "../models/href/Href";
10
+
11
+ const getModularUIRequest = createSelector([getLocale], (localeCode) => {
12
+ return (href: Href, options?: $Shape<RequestModularUIOptions>) => {
13
+ const request = new ModularUIRequest(href, options);
14
+ request.locale = localeCode;
15
+ return request;
16
+ };
17
+ });
10
18
 
11
19
  /**
12
20
  * Creates a ModularUIRequest with the locale as available in the redux store
@@ -14,13 +22,4 @@ import type { RequestModularUIOptions } from "../utils";
14
22
  export const useModularUIRequest = (): ((
15
23
  href: Href,
16
24
  options?: $Shape<RequestModularUIOptions>
17
- ) => ModularUIRequest) =>
18
- useSelector(
19
- createSelector([getLocale], (localeCode) => {
20
- return (href: Href, options?: $Shape<RequestModularUIOptions>) => {
21
- const request = new ModularUIRequest(href, options);
22
- request.locale = localeCode;
23
- return request;
24
- };
25
- })
26
- );
25
+ ) => ModularUIRequest) => useSelector(getModularUIRequest);