@evlop/commons 1.0.79 → 1.0.80

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"useAction.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAction.tsx"],"names":[],"mappings":"AASA;;;;GAIG;AAEF,UAAU,YAAY;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IACjC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC5B,QAAQ,EAAE,QAAQ,CAAC;CACtB;AAED,aAAK,MAAM,GAAG,YAAY,GAAG,QAAQ,GAAG,GAAG,CAAA;AAE5C,eAAO,MAAM,SAAS,WAAY,MAAM,QA+BvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"useAction.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAction.tsx"],"names":[],"mappings":"AASA;;;;GAIG;AAEF,UAAU,YAAY;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IACjC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC5B,QAAQ,EAAE,QAAQ,CAAC;CACtB;AAED,aAAK,MAAM,GAAG,YAAY,GAAG,QAAQ,GAAG,GAAG,CAAA;AAE5C,eAAO,MAAM,SAAS,WAAY,MAAM,QAgCvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -24,11 +24,13 @@ const useAction = (action) => {
24
24
  if (typeof actionToUse === 'function')
25
25
  return actionToUse;
26
26
  if (actionToUse) {
27
- const { link, navigate, page, params, dispatch: dispatchAction, route, callback } = actionToUse;
27
+ const { link, navigate, push, page, params, dispatch: dispatchAction, route, callback } = actionToUse;
28
28
  if (link)
29
29
  return () => navigator.openURL(template(link));
30
30
  if (navigate)
31
- return () => navigator.navigate(...lodash_1.castArray(navigate));
31
+ return () => navigator.navigate(...lodash_1.castArray(JSON.parse(template(JSON.stringify(navigate)))));
32
+ if (push)
33
+ return () => navigator.push(...lodash_1.castArray(JSON.parse(template(JSON.stringify(navigate)))));
32
34
  if (page)
33
35
  return () => {
34
36
  console.log(page, params);
@@ -1 +1 @@
1
- {"version":3,"file":"useAction.js","sourceRoot":"","sources":["../../../src/hooks/useAction.tsx"],"names":[],"mappings":";;;;;;AAAA,iCAAgC;AAChC,6CAA0C;AAC1C,mCAAwC;AACxC,iDAA4C;AAC5C,yCAAoC;AACpC,gEAAwC;AACxC,mCAAiC;AAqB1B,MAAM,SAAS,GAAG,CAAC,MAAc,EAAC,EAAE;IAEvC,MAAM,SAAS,GAAG,2BAAY,EAAE,CAAC;IACjC,MAAM,QAAQ,GAAG,yBAAW,EAAE,CAAC;IAC/B,MAAM,KAAK,GAAG,mBAAQ,EAAE,CAAC;IACzB,MAAM,QAAQ,GAAG,qBAAW,EAAE,CAAC;IAE/B,OAAO,eAAO,CAAC,GAAE,EAAE;QACf,IAAI,WAAW,GAAG,MAAM,CAAC;QAEzB,OAAO,WAAW,IAAI,WAAW,CAAC,OAAO,EAAC;YACtC,WAAW,GAAG,YAAG,CAAC,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;SACjD;QAED,IAAG,OAAO,WAAW,KAAK,UAAU;YAAE,OAAO,WAAW,CAAC;QAEzD,IAAG,WAAW,EAAE;YACZ,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,QAAQ,EAAC,GAAG,WAAW,CAAC;YAE/F,IAAI,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