@sankhyalabs/sankhyablocks 1.0.12 → 1.1.14

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 (100) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +61 -26
  3. package/dist/cjs/index-d3250310.js +728 -0
  4. package/dist/cjs/index.cjs.js +2 -0
  5. package/dist/cjs/loader.cjs.js +21 -0
  6. package/dist/cjs/sankhyablocks.cjs.js +19 -0
  7. package/dist/cjs/snk-application.cjs.entry.js +7861 -0
  8. package/dist/collection/collection-manifest.json +12 -0
  9. package/dist/collection/components/snk-application/snk-application.css +5 -0
  10. package/dist/collection/components/snk-application/snk-application.js +451 -0
  11. package/dist/collection/index.js +1 -0
  12. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +158 -0
  13. package/dist/collection/lib/http/data-fetcher/fetchers/application-config-fetcher.js +23 -0
  14. package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +157 -0
  15. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +2 -0
  16. package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +2 -0
  17. package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +59 -0
  18. package/dist/collection/lib/http/data-fetcher/state/LoadStateManager.js +66 -0
  19. package/dist/collection/lib/utils/urlutils.js +23 -0
  20. package/dist/collection/lib/workspace/workspace.js +7 -0
  21. package/dist/collection/temp/ApplicationUtils.js +31 -0
  22. package/dist/components/index.d.ts +26 -0
  23. package/dist/components/index.js +1 -0
  24. package/dist/components/snk-application.d.ts +11 -0
  25. package/dist/components/snk-application.js +7889 -0
  26. package/dist/esm/index-781079ed.js +702 -0
  27. package/dist/esm/index.js +1 -0
  28. package/dist/esm/loader.js +17 -0
  29. package/dist/esm/polyfills/core-js.js +11 -0
  30. package/dist/esm/polyfills/css-shim.js +1 -0
  31. package/dist/esm/polyfills/dom.js +79 -0
  32. package/dist/esm/polyfills/es5-html-element.js +1 -0
  33. package/dist/esm/polyfills/index.js +34 -0
  34. package/dist/esm/polyfills/system.js +6 -0
  35. package/dist/esm/sankhyablocks.js +17 -0
  36. package/dist/esm/snk-application.entry.js +7857 -0
  37. package/dist/index.cjs.js +1 -0
  38. package/dist/index.js +1 -9425
  39. package/dist/sankhyablocks/index.esm.js +0 -0
  40. package/dist/sankhyablocks/p-83177bdc.js +1 -0
  41. package/dist/sankhyablocks/p-ba60812c.entry.js +53 -0
  42. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -0
  43. package/dist/types/components/snk-application/snk-application.d.ts +38 -0
  44. package/dist/types/components.d.ts +60 -0
  45. package/dist/types/index.d.ts +1 -5
  46. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +15 -0
  47. package/dist/types/lib/http/data-fetcher/fetchers/application-config-fetcher.d.ts +6 -0
  48. package/dist/types/lib/http/data-fetcher/fetchers/dataunit-fetcher.d.ts +10 -0
  49. package/dist/types/{http → lib/http/data-fetcher}/fetchers/form-config-fetcher.d.ts +0 -0
  50. package/dist/types/{http → lib/http/data-fetcher}/fetchers/grid-config-fetcher.d.ts +0 -0
  51. package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +13 -0
  52. package/dist/types/lib/http/data-fetcher/state/LoadStateManager.d.ts +23 -0
  53. package/dist/types/lib/utils/urlutils.d.ts +4 -0
  54. package/dist/types/lib/workspace/workspace.d.ts +4 -0
  55. package/dist/types/stencil-public-runtime.d.ts +1565 -0
  56. package/dist/types/temp/ApplicationUtils.d.ts +7 -0
  57. package/loader/cdn.js +3 -0
  58. package/loader/index.cjs.js +3 -0
  59. package/loader/index.d.ts +12 -0
  60. package/loader/index.es2017.js +3 -0
  61. package/loader/index.js +4 -0
  62. package/loader/package.json +10 -0
  63. package/package.json +33 -70
  64. package/react/components.d.ts +3 -0
  65. package/react/components.js +6 -0
  66. package/react/components.js.map +1 -0
  67. package/react/react-component-lib/createComponent.d.ts +10 -0
  68. package/react/react-component-lib/createComponent.js +75 -0
  69. package/react/react-component-lib/createComponent.js.map +1 -0
  70. package/react/react-component-lib/createOverlayComponent.d.ts +21 -0
  71. package/react/react-component-lib/createOverlayComponent.js +109 -0
  72. package/react/react-component-lib/createOverlayComponent.js.map +1 -0
  73. package/react/react-component-lib/index.d.ts +2 -0
  74. package/react/react-component-lib/index.js +3 -0
  75. package/react/react-component-lib/index.js.map +1 -0
  76. package/react/react-component-lib/interfaces.d.ts +29 -0
  77. package/react/react-component-lib/interfaces.js +1 -0
  78. package/react/react-component-lib/interfaces.js.map +1 -0
  79. package/react/react-component-lib/utils/attachProps.d.ts +12 -0
  80. package/react/react-component-lib/utils/attachProps.js +98 -0
  81. package/react/react-component-lib/utils/attachProps.js.map +1 -0
  82. package/react/react-component-lib/utils/case.d.ts +2 -0
  83. package/react/react-component-lib/utils/case.js +7 -0
  84. package/react/react-component-lib/utils/case.js.map +1 -0
  85. package/react/react-component-lib/utils/dev.d.ts +2 -0
  86. package/react/react-component-lib/utils/dev.js +13 -0
  87. package/react/react-component-lib/utils/dev.js.map +1 -0
  88. package/react/react-component-lib/utils/index.d.ts +10 -0
  89. package/react/react-component-lib/utils/index.js +34 -0
  90. package/react/react-component-lib/utils/index.js.map +1 -0
  91. package/dist/index.js.map +0 -1
  92. package/dist/types/application/AppParameterProvider.d.ts +0 -10
  93. package/dist/types/application/SankhyaAppProvider.d.ts +0 -15
  94. package/dist/types/http/fetchers/application-config-fetcher.d.ts +0 -6
  95. package/dist/types/http/fetchers/dataunit-fetcher.d.ts +0 -10
  96. package/dist/types/http/fetchers/parameters-fecher.d.ts +0 -13
  97. package/dist/types/utils/urlutils.d.ts +0 -4
  98. package/dist/types/workspace/workspace.d.ts +0 -4
  99. package/tsconfig.json +0 -17
  100. package/webpack.config.demo.js +0 -47
@@ -0,0 +1,13 @@
1
+ export const isDevMode = () => {
2
+ return process && process.env && process.env.NODE_ENV === 'development';
3
+ };
4
+ const warnings = {};
5
+ export const deprecationWarning = (key, message) => {
6
+ if (isDevMode()) {
7
+ if (!warnings[key]) {
8
+ console.warn(message);
9
+ warnings[key] = true;
10
+ }
11
+ }
12
+ };
13
+ //# sourceMappingURL=dev.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev.js","sourceRoot":"","sources":["../../../src/react-component-lib/utils/dev.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,EAAE;IAC5B,OAAO,OAAO,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,CAAC;AAC1E,CAAC,CAAC;AAEF,MAAM,QAAQ,GAA+B,EAAE,CAAC;AAEhD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,GAAW,EAAE,OAAe,EAAE,EAAE;IACjE,IAAI,SAAS,EAAE,EAAE;QACf,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAClB,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACtB,QAAQ,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;SACtB;KACF;AACH,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { StyleReactProps } from '../interfaces';
3
+ export declare type StencilReactExternalProps<PropType, ElementType> = PropType & Omit<React.HTMLAttributes<ElementType>, 'style'> & StyleReactProps;
4
+ export declare type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;
5
+ export declare const setRef: (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => void;
6
+ export declare const mergeRefs: (...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]) => any;
7
+ export declare const createForwardRef: <PropType, ElementType>(ReactComponent: any, displayName: string) => React.ForwardRefExoticComponent<React.PropsWithoutRef<StencilReactExternalProps<PropType, ElementType>> & React.RefAttributes<ElementType>>;
8
+ export declare const defineCustomElement: (tagName: string, customElement: any) => void;
9
+ export * from './attachProps';
10
+ export * from './case';
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ export const setRef = (ref, value) => {
3
+ if (typeof ref === 'function') {
4
+ ref(value);
5
+ }
6
+ else if (ref != null) {
7
+ // Cast as a MutableRef so we can assign current
8
+ ref.current = value;
9
+ }
10
+ };
11
+ export const mergeRefs = (...refs) => {
12
+ return (value) => {
13
+ refs.forEach(ref => {
14
+ setRef(ref, value);
15
+ });
16
+ };
17
+ };
18
+ export const createForwardRef = (ReactComponent, displayName) => {
19
+ const forwardRef = (props, ref) => {
20
+ return React.createElement(ReactComponent, Object.assign({}, props, { forwardedRef: ref }));
21
+ };
22
+ forwardRef.displayName = displayName;
23
+ return React.forwardRef(forwardRef);
24
+ };
25
+ export const defineCustomElement = (tagName, customElement) => {
26
+ if (customElement !== undefined &&
27
+ typeof customElements !== 'undefined' &&
28
+ !customElements.get(tagName)) {
29
+ customElements.define(tagName, customElement);
30
+ }
31
+ };
32
+ export * from './attachProps';
33
+ export * from './case';
34
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react-component-lib/utils/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,GAA+D,EAAE,KAAU,EAAE,EAAE;IACpG,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;QAC7B,GAAG,CAAC,KAAK,CAAC,CAAA;KACX;SAAM,IAAI,GAAG,IAAI,IAAI,EAAE;QACtB,gDAAgD;QAC/C,GAAmC,CAAC,OAAO,GAAG,KAAK,CAAA;KACrD;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,GAAG,IAAoE,EAC/C,EAAE;IAC1B,OAAO,CAAC,KAAU,EAAE,EAAE;QACpB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YACjB,MAAM,CAAC,GAAG,EAAE,KAAK,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