@vuu-ui/vuu-shell 0.13.24 → 0.13.26
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.
|
@@ -29,12 +29,14 @@ const FeatureList = ({
|
|
|
29
29
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
30
30
|
vuuLayout.PaletteItem,
|
|
31
31
|
{
|
|
32
|
-
|
|
32
|
+
ViewProps: {
|
|
33
|
+
closeable: true,
|
|
34
|
+
header: true,
|
|
35
|
+
resize: "defer",
|
|
36
|
+
resizeable: true
|
|
37
|
+
},
|
|
33
38
|
component: vuuUtils.featureFromJson({ type }),
|
|
34
39
|
value: label,
|
|
35
|
-
resizeable: true,
|
|
36
|
-
resize: "defer",
|
|
37
|
-
header: true,
|
|
38
40
|
children: [
|
|
39
41
|
/* @__PURE__ */ jsxRuntime.jsx(vuuUiControls.Icon, { name: "draggable", size: 18 }),
|
|
40
42
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `${classBase}-itemName`, children: label })
|
|
@@ -46,15 +48,19 @@ const FeatureList = ({
|
|
|
46
48
|
}
|
|
47
49
|
if (Array.isArray(features)) {
|
|
48
50
|
return [
|
|
49
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `${classBase}-standalone`, children: /* @__PURE__ */ jsxRuntime.jsx(vuuLayout.Palette, { orientation: "vertical", children: features.map((featureProps, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
51
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `${classBase}-standalone`, children: /* @__PURE__ */ jsxRuntime.jsx(vuuLayout.Palette, { orientation: "vertical", children: features.map(({ ViewProps, ...featureProps }, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
50
52
|
vuuLayout.PaletteItem,
|
|
51
53
|
{
|
|
52
|
-
|
|
54
|
+
ViewProps: {
|
|
55
|
+
closeable: true,
|
|
56
|
+
header: true,
|
|
57
|
+
resize: "defer",
|
|
58
|
+
resizeable: true,
|
|
59
|
+
title: featureProps.title,
|
|
60
|
+
...ViewProps
|
|
61
|
+
},
|
|
53
62
|
component: /* @__PURE__ */ jsxRuntime.jsx(Feature.Feature, { ...featureProps }),
|
|
54
63
|
value: featureProps.title,
|
|
55
|
-
resizeable: true,
|
|
56
|
-
resize: "defer",
|
|
57
|
-
header: true,
|
|
58
64
|
children: [
|
|
59
65
|
/* @__PURE__ */ jsxRuntime.jsx(vuuUiControls.Icon, { name: "draggable", size: 18 }),
|
|
60
66
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `${classBase}-itemName`, children: featureProps.title })
|
|
@@ -67,22 +73,28 @@ const FeatureList = ({
|
|
|
67
73
|
return Object.entries(features).map(([heading, featureList], index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${classBase}-group`, children: [
|
|
68
74
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `${classBase}-groupHeader`, children: heading }),
|
|
69
75
|
/* @__PURE__ */ jsxRuntime.jsx(vuuLayout.Palette, { orientation: "vertical", children: featureList.map(
|
|
70
|
-
(featureProps, i) =>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
76
|
+
({ ViewProps, ...featureProps }, i) => {
|
|
77
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
78
|
+
vuuLayout.PaletteItem,
|
|
79
|
+
{
|
|
80
|
+
ViewProps: {
|
|
81
|
+
closeable: true,
|
|
82
|
+
header: true,
|
|
83
|
+
resize: "defer",
|
|
84
|
+
resizeable: true,
|
|
85
|
+
title: featureProps.title,
|
|
86
|
+
...ViewProps
|
|
87
|
+
},
|
|
88
|
+
component: /* @__PURE__ */ jsxRuntime.jsx(Feature.Feature, { ...featureProps }),
|
|
89
|
+
value: featureProps.title,
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ jsxRuntime.jsx(vuuUiControls.Icon, { name: "draggable", size: 18 }),
|
|
92
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `${classBase}-itemName`, children: featureProps.title })
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
i
|
|
96
|
+
);
|
|
97
|
+
}
|
|
86
98
|
) })
|
|
87
99
|
] }, index));
|
|
88
100
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureList.js","sources":["../../../../packages/vuu-shell/src/feature-list/FeatureList.tsx"],"sourcesContent":["import { Palette, PaletteItem } from \"@vuu-ui/vuu-layout\";\nimport { Icon } from \"@vuu-ui/vuu-ui-controls\";\nimport {\n DynamicFeatureProps,\n StaticFeatureDescriptor,\n featureFromJson,\n isStaticFeatures,\n} from \"@vuu-ui/vuu-utils\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\nimport cx from \"clsx\";\nimport { HTMLAttributes, Key, ReactElement, useMemo } from \"react\";\nimport { Feature } from \"../feature/Feature\";\n\nimport featureListCss from \"./FeatureList.css\";\n\nconst classBase = \"vuuFeatureList\";\n\nexport type GroupedFeatureProps<P extends object | undefined = object> = Record<\n string,\n DynamicFeatureProps<P>[]\n>;\n\nexport interface FeatureListProps extends HTMLAttributes<HTMLDivElement> {\n features:\n | DynamicFeatureProps[]\n | GroupedFeatureProps\n | StaticFeatureDescriptor[];\n}\n\nexport const FeatureList = ({\n features,\n title = \"VUU TABLES\",\n ...htmlAttributes\n}: FeatureListProps) => {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"vuu-feature-list\",\n css: featureListCss,\n window: targetWindow,\n });\n\n const content = useMemo<ReactElement[]>(() => {\n if (isStaticFeatures(features)) {\n return features.map(({ label, type }, idx) => {\n return (\n <PaletteItem\n closeable\n component={featureFromJson({ type })}\n key={idx}\n value={label}\n
|
|
1
|
+
{"version":3,"file":"FeatureList.js","sources":["../../../../packages/vuu-shell/src/feature-list/FeatureList.tsx"],"sourcesContent":["import { Palette, PaletteItem } from \"@vuu-ui/vuu-layout\";\nimport { Icon } from \"@vuu-ui/vuu-ui-controls\";\nimport {\n DynamicFeatureProps,\n StaticFeatureDescriptor,\n featureFromJson,\n isStaticFeatures,\n} from \"@vuu-ui/vuu-utils\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\nimport cx from \"clsx\";\nimport { HTMLAttributes, Key, ReactElement, useMemo } from \"react\";\nimport { Feature } from \"../feature/Feature\";\n\nimport featureListCss from \"./FeatureList.css\";\n\nconst classBase = \"vuuFeatureList\";\n\nexport type GroupedFeatureProps<P extends object | undefined = object> = Record<\n string,\n DynamicFeatureProps<P>[]\n>;\n\nexport interface FeatureListProps extends HTMLAttributes<HTMLDivElement> {\n features:\n | DynamicFeatureProps[]\n | GroupedFeatureProps\n | StaticFeatureDescriptor[];\n}\n\nexport const FeatureList = ({\n features,\n title = \"VUU TABLES\",\n ...htmlAttributes\n}: FeatureListProps) => {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"vuu-feature-list\",\n css: featureListCss,\n window: targetWindow,\n });\n\n const content = useMemo<ReactElement[]>(() => {\n if (isStaticFeatures(features)) {\n return features.map(({ label, type }, idx) => {\n return (\n <PaletteItem\n ViewProps={{\n closeable: true,\n header: true,\n resize: \"defer\",\n resizeable: true,\n }}\n component={featureFromJson({ type })}\n key={idx}\n value={label}\n >\n <Icon name=\"draggable\" size={18} />\n <span className={`${classBase}-itemName`}>{label}</span>\n </PaletteItem>\n );\n });\n }\n if (Array.isArray(features)) {\n return [\n <div className={`${classBase}-standalone`} key={0}>\n <Palette key=\"0\" orientation=\"vertical\">\n {features.map(({ ViewProps, ...featureProps }, i) => (\n <PaletteItem\n ViewProps={{\n closeable: true,\n header: true,\n resize: \"defer\",\n resizeable: true,\n title: featureProps.title,\n ...ViewProps,\n }}\n component={<Feature {...featureProps} />}\n key={i}\n value={featureProps.title}\n >\n <Icon name=\"draggable\" size={18} />\n <span className={`${classBase}-itemName`}>\n {featureProps.title}\n </span>\n </PaletteItem>\n ))}\n </Palette>\n </div>,\n ];\n } else {\n return Object.entries(features).map(([heading, featureList], index) => (\n <div className={`${classBase}-group`} key={index}>\n <div className={`${classBase}-groupHeader`}>{heading}</div>\n <Palette orientation=\"vertical\">\n {featureList.map(\n (\n { ViewProps, ...featureProps }: DynamicFeatureProps<object>,\n i: Key,\n ) => {\n return (\n <PaletteItem\n ViewProps={{\n closeable: true,\n header: true,\n resize: \"defer\",\n resizeable: true,\n title: featureProps.title,\n ...ViewProps,\n }}\n component={<Feature {...featureProps} />}\n key={i}\n value={featureProps.title}\n >\n <Icon name=\"draggable\" size={18} />\n <span className={`${classBase}-itemName`}>\n {featureProps.title}\n </span>\n </PaletteItem>\n );\n },\n )}\n </Palette>\n </div>\n ));\n }\n }, [features]);\n\n return (\n <div {...htmlAttributes} className={cx(classBase, \"vuuScrollable\")}>\n <div className={`${classBase}-header`}>{title}</div>\n <div className={`${classBase}-content`}>{content}</div>\n </div>\n );\n};\n"],"names":["useWindow","useComponentCssInjection","featureListCss","useMemo","isStaticFeatures","jsxs","PaletteItem","featureFromJson","jsx","Icon","Palette","Feature"],"mappings":";;;;;;;;;;;;;AAgBA,MAAM,SAAY,GAAA,gBAAA;AAcX,MAAM,cAAc,CAAC;AAAA,EAC1B,QAAA;AAAA,EACA,KAAQ,GAAA,YAAA;AAAA,EACR,GAAG;AACL,CAAwB,KAAA;AACtB,EAAA,MAAM,eAAeA,gBAAU,EAAA;AAC/B,EAAyBC,+BAAA,CAAA;AAAA,IACvB,MAAQ,EAAA,kBAAA;AAAA,IACR,GAAK,EAAAC,aAAA;AAAA,IACL,MAAQ,EAAA;AAAA,GACT,CAAA;AAED,EAAM,MAAA,OAAA,GAAUC,cAAwB,MAAM;AAC5C,IAAI,IAAAC,yBAAA,CAAiB,QAAQ,CAAG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AW,kBAAAE,cAAA,CAACG,eAAS,EAAA,EAAA,GAAG,YAAc,EAAA,CAAA;AAAA,gBAEtC,OAAO,YAAa,CAAA,KAAA;AAAA,gBAEpB,QAAA,EAAA;AAAA,kCAAAH,cAAA,CAACC,kBAAK,EAAA,EAAA,IAAA,EAAK,WAAY,EAAA,IAAA,EAAM,EAAI,EAAA,CAAA;AAAA,iDAChC,MAAK,EAAA,EAAA,SAAA,EAAW,GAAG,SAAS,CAAA,SAAA,CAAA,EAC1B,uBAAa,KAChB,EAAA;AAAA;AAAA,eAAA;AAAA,cANK;AAAA,aAOP;AAAA;AAEJ,SAEJ,EAAA;AAAA,OAAA,EAAA,EA9ByC,KA+B3C,CACD,CAAA;AAAA;AACH,GACF,EAAG,CAAC,QAAQ,CAAC,CAAA;AAEb,EACE,uBAAAJ,eAAA,CAAC,SAAK,GAAG,cAAA,EAAgB,WAAW,EAAG,CAAA,SAAA,EAAW,eAAe,CAC/D,EAAA,QAAA,EAAA;AAAA,oBAAAG,cAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAW,CAAG,EAAA,SAAS,WAAY,QAAM,EAAA,KAAA,EAAA,CAAA;AAAA,mCAC7C,KAAI,EAAA,EAAA,SAAA,EAAW,CAAG,EAAA,SAAS,YAAa,QAAQ,EAAA,OAAA,EAAA;AAAA,GACnD,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -27,12 +27,14 @@ const FeatureList = ({
|
|
|
27
27
|
return /* @__PURE__ */ jsxs(
|
|
28
28
|
PaletteItem,
|
|
29
29
|
{
|
|
30
|
-
|
|
30
|
+
ViewProps: {
|
|
31
|
+
closeable: true,
|
|
32
|
+
header: true,
|
|
33
|
+
resize: "defer",
|
|
34
|
+
resizeable: true
|
|
35
|
+
},
|
|
31
36
|
component: featureFromJson({ type }),
|
|
32
37
|
value: label,
|
|
33
|
-
resizeable: true,
|
|
34
|
-
resize: "defer",
|
|
35
|
-
header: true,
|
|
36
38
|
children: [
|
|
37
39
|
/* @__PURE__ */ jsx(Icon, { name: "draggable", size: 18 }),
|
|
38
40
|
/* @__PURE__ */ jsx("span", { className: `${classBase}-itemName`, children: label })
|
|
@@ -44,15 +46,19 @@ const FeatureList = ({
|
|
|
44
46
|
}
|
|
45
47
|
if (Array.isArray(features)) {
|
|
46
48
|
return [
|
|
47
|
-
/* @__PURE__ */ jsx("div", { className: `${classBase}-standalone`, children: /* @__PURE__ */ jsx(Palette, { orientation: "vertical", children: features.map((featureProps, i) => /* @__PURE__ */ jsxs(
|
|
49
|
+
/* @__PURE__ */ jsx("div", { className: `${classBase}-standalone`, children: /* @__PURE__ */ jsx(Palette, { orientation: "vertical", children: features.map(({ ViewProps, ...featureProps }, i) => /* @__PURE__ */ jsxs(
|
|
48
50
|
PaletteItem,
|
|
49
51
|
{
|
|
50
|
-
|
|
52
|
+
ViewProps: {
|
|
53
|
+
closeable: true,
|
|
54
|
+
header: true,
|
|
55
|
+
resize: "defer",
|
|
56
|
+
resizeable: true,
|
|
57
|
+
title: featureProps.title,
|
|
58
|
+
...ViewProps
|
|
59
|
+
},
|
|
51
60
|
component: /* @__PURE__ */ jsx(Feature, { ...featureProps }),
|
|
52
61
|
value: featureProps.title,
|
|
53
|
-
resizeable: true,
|
|
54
|
-
resize: "defer",
|
|
55
|
-
header: true,
|
|
56
62
|
children: [
|
|
57
63
|
/* @__PURE__ */ jsx(Icon, { name: "draggable", size: 18 }),
|
|
58
64
|
/* @__PURE__ */ jsx("span", { className: `${classBase}-itemName`, children: featureProps.title })
|
|
@@ -65,22 +71,28 @@ const FeatureList = ({
|
|
|
65
71
|
return Object.entries(features).map(([heading, featureList], index) => /* @__PURE__ */ jsxs("div", { className: `${classBase}-group`, children: [
|
|
66
72
|
/* @__PURE__ */ jsx("div", { className: `${classBase}-groupHeader`, children: heading }),
|
|
67
73
|
/* @__PURE__ */ jsx(Palette, { orientation: "vertical", children: featureList.map(
|
|
68
|
-
(featureProps, i) =>
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
74
|
+
({ ViewProps, ...featureProps }, i) => {
|
|
75
|
+
return /* @__PURE__ */ jsxs(
|
|
76
|
+
PaletteItem,
|
|
77
|
+
{
|
|
78
|
+
ViewProps: {
|
|
79
|
+
closeable: true,
|
|
80
|
+
header: true,
|
|
81
|
+
resize: "defer",
|
|
82
|
+
resizeable: true,
|
|
83
|
+
title: featureProps.title,
|
|
84
|
+
...ViewProps
|
|
85
|
+
},
|
|
86
|
+
component: /* @__PURE__ */ jsx(Feature, { ...featureProps }),
|
|
87
|
+
value: featureProps.title,
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ jsx(Icon, { name: "draggable", size: 18 }),
|
|
90
|
+
/* @__PURE__ */ jsx("span", { className: `${classBase}-itemName`, children: featureProps.title })
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
i
|
|
94
|
+
);
|
|
95
|
+
}
|
|
84
96
|
) })
|
|
85
97
|
] }, index));
|
|
86
98
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureList.js","sources":["../../../../packages/vuu-shell/src/feature-list/FeatureList.tsx"],"sourcesContent":["import { Palette, PaletteItem } from \"@vuu-ui/vuu-layout\";\nimport { Icon } from \"@vuu-ui/vuu-ui-controls\";\nimport {\n DynamicFeatureProps,\n StaticFeatureDescriptor,\n featureFromJson,\n isStaticFeatures,\n} from \"@vuu-ui/vuu-utils\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\nimport cx from \"clsx\";\nimport { HTMLAttributes, Key, ReactElement, useMemo } from \"react\";\nimport { Feature } from \"../feature/Feature\";\n\nimport featureListCss from \"./FeatureList.css\";\n\nconst classBase = \"vuuFeatureList\";\n\nexport type GroupedFeatureProps<P extends object | undefined = object> = Record<\n string,\n DynamicFeatureProps<P>[]\n>;\n\nexport interface FeatureListProps extends HTMLAttributes<HTMLDivElement> {\n features:\n | DynamicFeatureProps[]\n | GroupedFeatureProps\n | StaticFeatureDescriptor[];\n}\n\nexport const FeatureList = ({\n features,\n title = \"VUU TABLES\",\n ...htmlAttributes\n}: FeatureListProps) => {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"vuu-feature-list\",\n css: featureListCss,\n window: targetWindow,\n });\n\n const content = useMemo<ReactElement[]>(() => {\n if (isStaticFeatures(features)) {\n return features.map(({ label, type }, idx) => {\n return (\n <PaletteItem\n closeable\n component={featureFromJson({ type })}\n key={idx}\n value={label}\n
|
|
1
|
+
{"version":3,"file":"FeatureList.js","sources":["../../../../packages/vuu-shell/src/feature-list/FeatureList.tsx"],"sourcesContent":["import { Palette, PaletteItem } from \"@vuu-ui/vuu-layout\";\nimport { Icon } from \"@vuu-ui/vuu-ui-controls\";\nimport {\n DynamicFeatureProps,\n StaticFeatureDescriptor,\n featureFromJson,\n isStaticFeatures,\n} from \"@vuu-ui/vuu-utils\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\nimport cx from \"clsx\";\nimport { HTMLAttributes, Key, ReactElement, useMemo } from \"react\";\nimport { Feature } from \"../feature/Feature\";\n\nimport featureListCss from \"./FeatureList.css\";\n\nconst classBase = \"vuuFeatureList\";\n\nexport type GroupedFeatureProps<P extends object | undefined = object> = Record<\n string,\n DynamicFeatureProps<P>[]\n>;\n\nexport interface FeatureListProps extends HTMLAttributes<HTMLDivElement> {\n features:\n | DynamicFeatureProps[]\n | GroupedFeatureProps\n | StaticFeatureDescriptor[];\n}\n\nexport const FeatureList = ({\n features,\n title = \"VUU TABLES\",\n ...htmlAttributes\n}: FeatureListProps) => {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"vuu-feature-list\",\n css: featureListCss,\n window: targetWindow,\n });\n\n const content = useMemo<ReactElement[]>(() => {\n if (isStaticFeatures(features)) {\n return features.map(({ label, type }, idx) => {\n return (\n <PaletteItem\n ViewProps={{\n closeable: true,\n header: true,\n resize: \"defer\",\n resizeable: true,\n }}\n component={featureFromJson({ type })}\n key={idx}\n value={label}\n >\n <Icon name=\"draggable\" size={18} />\n <span className={`${classBase}-itemName`}>{label}</span>\n </PaletteItem>\n );\n });\n }\n if (Array.isArray(features)) {\n return [\n <div className={`${classBase}-standalone`} key={0}>\n <Palette key=\"0\" orientation=\"vertical\">\n {features.map(({ ViewProps, ...featureProps }, i) => (\n <PaletteItem\n ViewProps={{\n closeable: true,\n header: true,\n resize: \"defer\",\n resizeable: true,\n title: featureProps.title,\n ...ViewProps,\n }}\n component={<Feature {...featureProps} />}\n key={i}\n value={featureProps.title}\n >\n <Icon name=\"draggable\" size={18} />\n <span className={`${classBase}-itemName`}>\n {featureProps.title}\n </span>\n </PaletteItem>\n ))}\n </Palette>\n </div>,\n ];\n } else {\n return Object.entries(features).map(([heading, featureList], index) => (\n <div className={`${classBase}-group`} key={index}>\n <div className={`${classBase}-groupHeader`}>{heading}</div>\n <Palette orientation=\"vertical\">\n {featureList.map(\n (\n { ViewProps, ...featureProps }: DynamicFeatureProps<object>,\n i: Key,\n ) => {\n return (\n <PaletteItem\n ViewProps={{\n closeable: true,\n header: true,\n resize: \"defer\",\n resizeable: true,\n title: featureProps.title,\n ...ViewProps,\n }}\n component={<Feature {...featureProps} />}\n key={i}\n value={featureProps.title}\n >\n <Icon name=\"draggable\" size={18} />\n <span className={`${classBase}-itemName`}>\n {featureProps.title}\n </span>\n </PaletteItem>\n );\n },\n )}\n </Palette>\n </div>\n ));\n }\n }, [features]);\n\n return (\n <div {...htmlAttributes} className={cx(classBase, \"vuuScrollable\")}>\n <div className={`${classBase}-header`}>{title}</div>\n <div className={`${classBase}-content`}>{content}</div>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAgBA,MAAM,SAAY,GAAA,gBAAA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
1
|
{
|
|
2
|
-
"version": "0.13.
|
|
2
|
+
"version": "0.13.26",
|
|
3
3
|
"description": "VUU UI Shell",
|
|
4
4
|
"author": "heswell",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@vuu-ui/vuu-data-types": "0.13.
|
|
8
|
-
"@vuu-ui/vuu-protocol-types": "0.13.
|
|
9
|
-
"@vuu-ui/vuu-table-types": "0.13.
|
|
7
|
+
"@vuu-ui/vuu-data-types": "0.13.26",
|
|
8
|
+
"@vuu-ui/vuu-protocol-types": "0.13.26",
|
|
9
|
+
"@vuu-ui/vuu-table-types": "0.13.26"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@salt-ds/core": "1.43.0",
|
|
13
13
|
"@salt-ds/styles": "0.2.1",
|
|
14
14
|
"@salt-ds/window": "0.1.1",
|
|
15
|
-
"@vuu-ui/vuu-context-menu": "0.13.
|
|
16
|
-
"@vuu-ui/vuu-data-react": "0.13.
|
|
17
|
-
"@vuu-ui/vuu-data-remote": "0.13.
|
|
18
|
-
"@vuu-ui/vuu-icons": "0.13.
|
|
19
|
-
"@vuu-ui/vuu-layout": "0.13.
|
|
20
|
-
"@vuu-ui/vuu-popups": "0.13.
|
|
21
|
-
"@vuu-ui/vuu-table": "0.13.
|
|
22
|
-
"@vuu-ui/vuu-ui-controls": "0.13.
|
|
23
|
-
"@vuu-ui/vuu-utils": "0.13.
|
|
15
|
+
"@vuu-ui/vuu-context-menu": "0.13.26",
|
|
16
|
+
"@vuu-ui/vuu-data-react": "0.13.26",
|
|
17
|
+
"@vuu-ui/vuu-data-remote": "0.13.26",
|
|
18
|
+
"@vuu-ui/vuu-icons": "0.13.26",
|
|
19
|
+
"@vuu-ui/vuu-layout": "0.13.26",
|
|
20
|
+
"@vuu-ui/vuu-popups": "0.13.26",
|
|
21
|
+
"@vuu-ui/vuu-table": "0.13.26",
|
|
22
|
+
"@vuu-ui/vuu-ui-controls": "0.13.26",
|
|
23
|
+
"@vuu-ui/vuu-utils": "0.13.26",
|
|
24
24
|
"html-to-image": "^1.11.11"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|