@macrostrat/data-sheet 2.2.3 → 3.0.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.
- package/CHANGELOG.md +13 -0
- package/dist/components/actions.cjs +14 -0
- package/dist/components/actions.cjs.map +1 -0
- package/dist/components/actions.d.ts +2 -0
- package/dist/components/actions.js +14 -0
- package/dist/components/actions.js.map +1 -0
- package/dist/components/actions.module.sass.cjs +8 -0
- package/dist/components/actions.module.sass.cjs.map +1 -0
- package/dist/components/actions.module.sass.js +8 -0
- package/dist/components/actions.module.sass.js.map +1 -0
- package/dist/components/colors.cjs +102 -0
- package/dist/components/colors.cjs.map +1 -0
- package/dist/components/colors.d.ts +27 -0
- package/dist/components/colors.js +102 -0
- package/dist/components/colors.js.map +1 -0
- package/dist/components/editor-popup.cjs +77 -0
- package/dist/components/editor-popup.cjs.map +1 -0
- package/dist/components/editor-popup.d.ts +1 -0
- package/dist/components/editor-popup.js +77 -0
- package/dist/components/editor-popup.js.map +1 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/main.module.sass.cjs +18 -0
- package/dist/components/main.module.sass.cjs.map +1 -0
- package/dist/components/main.module.sass.js +18 -0
- package/dist/components/main.module.sass.js.map +1 -0
- package/dist/components/text-areas.cjs +41 -0
- package/dist/components/text-areas.cjs.map +1 -0
- package/dist/components/text-areas.d.ts +4 -0
- package/dist/components/text-areas.js +41 -0
- package/dist/components/text-areas.js.map +1 -0
- package/dist/core.cjs +477 -0
- package/dist/core.cjs.map +1 -0
- package/dist/core.d.ts +31 -0
- package/dist/core.js +475 -0
- package/dist/core.js.map +1 -0
- package/dist/data-sheet.css +1336 -0
- package/dist/index.cjs +51 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +48 -0
- package/dist/index.js.map +1 -0
- package/dist/main.module.sass.cjs +19 -0
- package/dist/main.module.sass.cjs.map +1 -0
- package/dist/main.module.sass.js +19 -0
- package/dist/main.module.sass.js.map +1 -0
- package/dist/postgrest-table/data-loaders.cjs +189 -0
- package/dist/postgrest-table/data-loaders.cjs.map +1 -0
- package/dist/postgrest-table/data-loaders.d.ts +55 -0
- package/dist/postgrest-table/data-loaders.js +189 -0
- package/dist/postgrest-table/data-loaders.js.map +1 -0
- package/dist/postgrest-table/index.cjs +212 -0
- package/dist/postgrest-table/index.cjs.map +1 -0
- package/dist/postgrest-table/index.d.ts +56 -0
- package/dist/postgrest-table/index.js +212 -0
- package/dist/postgrest-table/index.js.map +1 -0
- package/dist/postgrest-table/main.module.sass.cjs +22 -0
- package/dist/postgrest-table/main.module.sass.cjs.map +1 -0
- package/dist/postgrest-table/main.module.sass.js +22 -0
- package/dist/postgrest-table/main.module.sass.js.map +1 -0
- package/dist/provider.cjs +376 -0
- package/dist/provider.cjs.map +1 -0
- package/dist/provider.d.ts +69 -0
- package/dist/provider.js +376 -0
- package/dist/provider.js.map +1 -0
- package/dist/utils/column-spec.cjs +99 -0
- package/dist/utils/column-spec.cjs.map +1 -0
- package/dist/utils/column-spec.d.ts +31 -0
- package/dist/utils/column-spec.js +99 -0
- package/dist/utils/column-spec.js.map +1 -0
- package/dist/utils/index.cjs +9 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +9 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/key-handling.cjs +85 -0
- package/dist/utils/key-handling.cjs.map +1 -0
- package/dist/utils/key-handling.d.ts +5 -0
- package/dist/utils/key-handling.js +85 -0
- package/dist/utils/key-handling.js.map +1 -0
- package/package.json +44 -39
- package/src/components/colors.ts +25 -12
- package/src/components/editor-popup.ts +4 -2
- package/src/components/main.module.sass +3 -7
- package/src/components/text-areas.ts +1 -1
- package/src/core.ts +29 -38
- package/src/main.module.sass +7 -7
- package/src/postgrest-table/index.ts +6 -6
- package/src/postgrest-table/main.module.sass +1 -1
- package/src/provider.ts +2 -1
- package/dist/esm/data-sheet.00353511.js +0 -237
- package/dist/esm/data-sheet.00353511.js.map +0 -1
- package/dist/esm/data-sheet.186dcac8.js +0 -86
- package/dist/esm/data-sheet.186dcac8.js.map +0 -1
- package/dist/esm/data-sheet.37e35216.js +0 -40
- package/dist/esm/data-sheet.37e35216.js.map +0 -1
- package/dist/esm/data-sheet.410c5122.js +0 -83
- package/dist/esm/data-sheet.410c5122.js.map +0 -1
- package/dist/esm/data-sheet.48635112.js +0 -40
- package/dist/esm/data-sheet.48635112.js.map +0 -1
- package/dist/esm/data-sheet.54cfa8e8.js +0 -16
- package/dist/esm/data-sheet.54cfa8e8.js.map +0 -1
- package/dist/esm/data-sheet.6021b6c9.js +0 -92
- package/dist/esm/data-sheet.6021b6c9.js.map +0 -1
- package/dist/esm/data-sheet.6776e250.js +0 -76
- package/dist/esm/data-sheet.6776e250.js.map +0 -1
- package/dist/esm/data-sheet.706f955d.css +0 -11
- package/dist/esm/data-sheet.706f955d.css.map +0 -1
- package/dist/esm/data-sheet.8dbfccef.js +0 -16
- package/dist/esm/data-sheet.8dbfccef.js.map +0 -1
- package/dist/esm/data-sheet.91223ec6.css +0 -69
- package/dist/esm/data-sheet.91223ec6.css.map +0 -1
- package/dist/esm/data-sheet.96446cae.js +0 -58
- package/dist/esm/data-sheet.96446cae.js.map +0 -1
- package/dist/esm/data-sheet.9b593da4.js +0 -13
- package/dist/esm/data-sheet.9b593da4.js.map +0 -1
- package/dist/esm/data-sheet.a3eb6088.js +0 -21
- package/dist/esm/data-sheet.a3eb6088.js.map +0 -1
- package/dist/esm/data-sheet.b3ccc91b.css +0 -65
- package/dist/esm/data-sheet.b3ccc91b.css.map +0 -1
- package/dist/esm/data-sheet.ba9a1241.js +0 -431
- package/dist/esm/data-sheet.ba9a1241.js.map +0 -1
- package/dist/esm/data-sheet.c9b6b6f2.js +0 -439
- package/dist/esm/data-sheet.c9b6b6f2.js.map +0 -1
- package/dist/esm/data-sheet.d2160988.js +0 -218
- package/dist/esm/data-sheet.d2160988.js.map +0 -1
- package/dist/esm/data-sheet.d570ef95.js +0 -43
- package/dist/esm/data-sheet.d570ef95.js.map +0 -1
- package/dist/esm/data-sheet.ef63e366.css +0 -110
- package/dist/esm/data-sheet.ef63e366.css.map +0 -1
- package/dist/esm/index.d.ts +0 -289
- package/dist/esm/index.d.ts.map +0 -1
- package/dist/esm/index.js +0 -15
- package/dist/esm/index.js.map +0 -1
- package/dist/node/data-sheet.171105c1.js +0 -2
- package/dist/node/data-sheet.171105c1.js.map +0 -1
- package/dist/node/data-sheet.28641e23.css +0 -2
- package/dist/node/data-sheet.28641e23.css.map +0 -1
- package/dist/node/data-sheet.2a613259.js +0 -2
- package/dist/node/data-sheet.2a613259.js.map +0 -1
- package/dist/node/data-sheet.2cac1a8c.js +0 -2
- package/dist/node/data-sheet.2cac1a8c.js.map +0 -1
- package/dist/node/data-sheet.2f64274d.css +0 -2
- package/dist/node/data-sheet.2f64274d.css.map +0 -1
- package/dist/node/data-sheet.3680e59d.js +0 -2
- package/dist/node/data-sheet.3680e59d.js.map +0 -1
- package/dist/node/data-sheet.648db7af.js +0 -2
- package/dist/node/data-sheet.648db7af.js.map +0 -1
- package/dist/node/data-sheet.6a663031.js +0 -2
- package/dist/node/data-sheet.6a663031.js.map +0 -1
- package/dist/node/data-sheet.7b95fbc1.css +0 -2
- package/dist/node/data-sheet.7b95fbc1.css.map +0 -1
- package/dist/node/data-sheet.809cdb29.js +0 -2
- package/dist/node/data-sheet.809cdb29.js.map +0 -1
- package/dist/node/data-sheet.945becc3.js +0 -2
- package/dist/node/data-sheet.945becc3.js.map +0 -1
- package/dist/node/data-sheet.97ac1b50.js +0 -2
- package/dist/node/data-sheet.97ac1b50.js.map +0 -1
- package/dist/node/data-sheet.ae543670.js +0 -2
- package/dist/node/data-sheet.ae543670.js.map +0 -1
- package/dist/node/data-sheet.bb45401c.js +0 -2
- package/dist/node/data-sheet.bb45401c.js.map +0 -1
- package/dist/node/data-sheet.c350336f.js +0 -2
- package/dist/node/data-sheet.c350336f.js.map +0 -1
- package/dist/node/data-sheet.cbbc8d31.js +0 -2
- package/dist/node/data-sheet.cbbc8d31.js.map +0 -1
- package/dist/node/data-sheet.d971095a.js +0 -2
- package/dist/node/data-sheet.d971095a.js.map +0 -1
- package/dist/node/data-sheet.dffdda71.js +0 -2
- package/dist/node/data-sheet.dffdda71.js.map +0 -1
- package/dist/node/data-sheet.f0223f39.js +0 -2
- package/dist/node/data-sheet.f0223f39.js.map +0 -1
- package/dist/node/data-sheet.ffaf8ac7.css +0 -2
- package/dist/node/data-sheet.ffaf8ac7.css.map +0 -1
- package/dist/node/index.js +0 -2
- package/dist/node/index.js.map +0 -1
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
const $afa6527b61074fe8$var$defaultRenderers = {
|
|
2
|
-
string: (d)=>d,
|
|
3
|
-
number: (d)=>d?.toFixed(2),
|
|
4
|
-
boolean: (d)=>d ? "T" : "F",
|
|
5
|
-
object: (d)=>JSON.stringify(d),
|
|
6
|
-
integer: (d)=>d?.toFixed(0),
|
|
7
|
-
array: (d)=>d?.join(", ")
|
|
8
|
-
};
|
|
9
|
-
const $afa6527b61074fe8$var$defaultWidthForValue = (val)=>String(val).length * 8;
|
|
10
|
-
function $afa6527b61074fe8$export$90c86365d1c277aa(data, options = {}) {
|
|
11
|
-
/** Build a default column spec from a dataset based on the first n rows */ if (data == null) return [];
|
|
12
|
-
// Get the keys
|
|
13
|
-
const { defaultWidth: defaultWidth = 150, calculateWidths: calculateWidths = true, getWidthForValue: getWidthForValue = $afa6527b61074fe8$var$defaultWidthForValue } = options;
|
|
14
|
-
const keys = new Set();
|
|
15
|
-
const types = new Map();
|
|
16
|
-
const columnWidths = new Map();
|
|
17
|
-
for (const row of data){
|
|
18
|
-
if (row == null) continue;
|
|
19
|
-
for (const key of Object.keys(row)){
|
|
20
|
-
const val = row[key];
|
|
21
|
-
keys.add(key);
|
|
22
|
-
if (val == null) continue;
|
|
23
|
-
if (calculateWidths) {
|
|
24
|
-
let width = getWidthForValue(val);
|
|
25
|
-
if (width != null && width >= 0) columnWidths.set(key, Math.max(width, columnWidths.get(key) ?? 0));
|
|
26
|
-
}
|
|
27
|
-
let type = typeof val;
|
|
28
|
-
// Special 'type' for integers
|
|
29
|
-
if (Number.isInteger(val)) type = "integer";
|
|
30
|
-
// Special 'type' for arrays of simple values
|
|
31
|
-
if (Array.isArray(val) && val.every((d)=>typeof d === "string" || typeof d === "number")) type = "array";
|
|
32
|
-
if (types.has(key)) {
|
|
33
|
-
if (types.get(key) !== type) {
|
|
34
|
-
if (type === "number" && types.get(key) === "integer") types.set(key, "number");
|
|
35
|
-
if (type === "object" && types.get(key) === "array") types.set(key, "object");
|
|
36
|
-
types.set(key, "string");
|
|
37
|
-
}
|
|
38
|
-
} else types.set(key, type);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
// Build a column spec
|
|
42
|
-
const spec = [];
|
|
43
|
-
for (const key of keys){
|
|
44
|
-
let width = null;
|
|
45
|
-
if (calculateWidths) // If we are calculating widths, use the value lengths
|
|
46
|
-
width = Math.min(Math.max(defaultWidth / 2, columnWidths.get(key) ?? defaultWidth), defaultWidth * 1.5);
|
|
47
|
-
spec.push({
|
|
48
|
-
name: key,
|
|
49
|
-
key: key,
|
|
50
|
-
valueRenderer: $afa6527b61074fe8$var$defaultRenderers[types.get(key)],
|
|
51
|
-
width: width
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
return spec;
|
|
55
|
-
}
|
|
56
|
-
function $afa6527b61074fe8$export$30457629971d2e1f(data, options) {
|
|
57
|
-
/** Generate a column spec from a dataset */ const { overrides: overrides = {}, nRows: nRows = 10, omitColumns: omitColumns, includeColumns: includeColumns } = options;
|
|
58
|
-
if (data == null) return [];
|
|
59
|
-
const _nRows = Math.min(nRows, data.length);
|
|
60
|
-
let columnSpec = $afa6527b61074fe8$export$90c86365d1c277aa(data.slice(0, _nRows));
|
|
61
|
-
let filteredSpec = columnSpec.filter((col)=>{
|
|
62
|
-
if (omitColumns != null && omitColumns.includes(col.key)) return false;
|
|
63
|
-
if (includeColumns != null && !includeColumns.includes(col.key)) return false;
|
|
64
|
-
return true;
|
|
65
|
-
});
|
|
66
|
-
// Apply overrides
|
|
67
|
-
return filteredSpec.map((col)=>{
|
|
68
|
-
let ovr = overrides[col.key];
|
|
69
|
-
if (ovr == null) return col;
|
|
70
|
-
if (typeof ovr === "string") return {
|
|
71
|
-
...col,
|
|
72
|
-
name: ovr
|
|
73
|
-
};
|
|
74
|
-
return {
|
|
75
|
-
...col,
|
|
76
|
-
...ovr
|
|
77
|
-
};
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
export {$afa6527b61074fe8$export$90c86365d1c277aa as generateDefaultColumnSpec, $afa6527b61074fe8$export$30457629971d2e1f as generateColumnSpec};
|
|
83
|
-
//# sourceMappingURL=data-sheet.410c5122.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAEA,MAAM,yCAAmB;IACvB,QAAQ,CAAC,IAAM;IACf,QAAQ,CAAC,IAAM,GAAG,QAAQ;IAC1B,SAAS,CAAC,IAAO,IAAI,MAAM;IAC3B,QAAQ,CAAC,IAAM,KAAK,SAAS,CAAC;IAC9B,SAAS,CAAC,IAAM,GAAG,QAAQ;IAC3B,OAAO,CAAC,IAAM,GAAG,KAAK;AACxB;AAQA,MAAM,6CAAuB,CAAC,MAAQ,OAAO,KAAK,MAAM,GAAG;AA0BpD,SAAS,0CACd,IAAc,EACd,UAAqC,CAAC,CAAC;IAEvC,yEAAyE,GACzE,IAAI,QAAQ,MAAM,OAAO,EAAE;IAC3B,eAAe;IAEf,MAAM,gBACJ,eAAe,sBACf,kBAAkB,wBAClB,mBAAmB,4CACpB,GAAG;IAEJ,MAAM,OAAO,IAAI;IACjB,MAAM,QAAQ,IAAI;IAElB,MAAM,eAAe,IAAI;IAEzB,KAAK,MAAM,OAAO,KAAM;QACtB,IAAI,OAAO,MAAM;QACjB,KAAK,MAAM,OAAO,OAAO,IAAI,CAAC,KAAM;YAClC,MAAM,MAAM,GAAG,CAAC,IAAI;YACpB,KAAK,GAAG,CAAC;YAET,IAAI,OAAO,MAAM;YAEjB,IAAI,iBAAiB;gBACnB,IAAI,QAAQ,iBAAiB;gBAC7B,IAAI,SAAS,QAAQ,SAAS,GAC5B,aAAa,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,OAAO,aAAa,GAAG,CAAC,QAAQ;YAEnE;YAEA,IAAI,OAAe,OAAO;YAC1B,8BAA8B;YAC9B,IAAI,OAAO,SAAS,CAAC,MACnB,OAAO;YAGT,6CAA6C;YAC7C,IACE,MAAM,OAAO,CAAC,QACd,IAAI,KAAK,CAAC,CAAC,IAAM,OAAO,MAAM,YAAY,OAAO,MAAM,WAEvD,OAAO;YAGT,IAAI,MAAM,GAAG,CAAC,MACZ;gBAAA,IAAI,MAAM,GAAG,CAAC,SAAS,MAAM;oBAC3B,IAAI,SAAS,YAAY,MAAM,GAAG,CAAC,SAAS,WAC1C,MAAM,GAAG,CAAC,KAAK;oBAEjB,IAAI,SAAS,YAAY,MAAM,GAAG,CAAC,SAAS,SAC1C,MAAM,GAAG,CAAC,KAAK;oBAGjB,MAAM,GAAG,CAAC,KAAK;gBACjB;YAAA,OAEA,MAAM,GAAG,CAAC,KAAK;QAEnB;IACF;IAEA,sBAAsB;IACtB,MAAM,OAAO,EAAE;IACf,KAAK,MAAM,OAAO,KAAM;QACtB,IAAI,QAAQ;QACZ,IAAI,iBACF,sDAAsD;QACtD,QAAQ,KAAK,GAAG,CACd,KAAK,GAAG,CAAC,eAAe,GAAG,aAAa,GAAG,CAAC,QAAQ,eACpD,eAAe;QAInB,KAAK,IAAI,CAAC;YACR,MAAM;iBACN;YACA,eAAe,sCAAgB,CAAC,MAAM,GAAG,CAAC,KAAK;mBAC/C;QACF;IACF;IACA,OAAO;AACT;AAEO,SAAS,0CACd,IAAS,EACT,OAA6B;IAE7B,0CAA0C,GAC1C,MAAM,aAAE,YAAY,CAAC,UAAG,QAAQ,iBAAI,WAAW,kBAAE,cAAc,EAAE,GAAG;IAEpE,IAAI,QAAQ,MAAM,OAAO,EAAE;IAE3B,MAAM,SAAS,KAAK,GAAG,CAAC,OAAO,KAAK,MAAM;IAE1C,IAAI,aAAa,0CAA0B,KAAK,KAAK,CAAC,GAAG;IACzD,IAAI,eAAe,WAAW,MAAM,CAAC,CAAC;QACpC,IAAI,eAAe,QAAQ,YAAY,QAAQ,CAAC,IAAI,GAAG,GACrD,OAAO;QAET,IAAI,kBAAkB,QAAQ,CAAC,eAAe,QAAQ,CAAC,IAAI,GAAG,GAC5D,OAAO;QAET,OAAO;IACT;IAEA,kBAAkB;IAClB,OAAO,aAAa,GAAG,CAAC,CAAC;QACvB,IAAI,MAAM,SAAS,CAAC,IAAI,GAAG,CAAC;QAC5B,IAAI,OAAO,MAAM,OAAO;QACxB,IAAI,OAAO,QAAQ,UACjB,OAAO;YAAE,GAAG,GAAG;YAAE,MAAM;QAAI;QAE7B,OAAO;YAAE,GAAG,GAAG;YAAE,GAAG,GAAG;QAAC;IAC1B;AACF","sources":["packages/data-sheet/src/utils/column-spec.ts"],"sourcesContent":["import React from \"react\";\n\nconst defaultRenderers = {\n string: (d) => d,\n number: (d) => d?.toFixed(2),\n boolean: (d) => (d ? \"T\" : \"F\"),\n object: (d) => JSON.stringify(d),\n integer: (d) => d?.toFixed(0),\n array: (d) => d?.join(\", \"),\n};\n\ninterface ColumnSpecGenerateOptions {\n calculateWidths?: boolean;\n defaultWidth?: number;\n getWidthForValue?: (value: any) => number;\n}\n\nconst defaultWidthForValue = (val) => String(val).length * 8;\n\nexport interface ColumnSpec {\n name: string;\n key: string;\n required?: boolean;\n isValid?: (d: any) => boolean;\n transformValue?: (d: any) => any;\n valueRenderer?: (d: any) => string | React.ReactNode;\n dataEditor?: any;\n cellComponent?: any;\n category?: string;\n editable?: boolean;\n inlineEditor?: boolean | React.ComponentType<any> | string | null;\n style?: React.CSSProperties;\n width?: number;\n}\n\nexport interface ColumnSpecOptions<T> {\n overrides: Record<string, Partial<ColumnSpec> | string>;\n data?: T[]; // Data to use for type inference\n nRows?: number; // Number of rows to use for type inference\n omitColumns?: string[]; // Columns to omit. Takes precedence over includeColumns.\n includeColumns?: string[]; // Columns to include.\n}\n\nexport function generateDefaultColumnSpec<T>(\n data: Array<T>,\n options: ColumnSpecGenerateOptions = {},\n): ColumnSpec[] {\n /** Build a default column spec from a dataset based on the first n rows */\n if (data == null) return [];\n // Get the keys\n\n const {\n defaultWidth = 150,\n calculateWidths = true,\n getWidthForValue = defaultWidthForValue,\n } = options;\n\n const keys = new Set<string>();\n const types = new Map();\n\n const columnWidths = new Map<string, number>();\n\n for (const row of data) {\n if (row == null) continue;\n for (const key of Object.keys(row)) {\n const val = row[key];\n keys.add(key);\n\n if (val == null) continue;\n\n if (calculateWidths) {\n let width = getWidthForValue(val);\n if (width != null && width >= 0) {\n columnWidths.set(key, Math.max(width, columnWidths.get(key) ?? 0));\n }\n }\n\n let type: string = typeof val;\n // Special 'type' for integers\n if (Number.isInteger(val)) {\n type = \"integer\";\n }\n\n // Special 'type' for arrays of simple values\n if (\n Array.isArray(val) &&\n val.every((d) => typeof d === \"string\" || typeof d === \"number\")\n ) {\n type = \"array\";\n }\n\n if (types.has(key)) {\n if (types.get(key) !== type) {\n if (type === \"number\" && types.get(key) === \"integer\") {\n types.set(key, \"number\");\n }\n if (type === \"object\" && types.get(key) === \"array\") {\n types.set(key, \"object\");\n }\n\n types.set(key, \"string\");\n }\n } else {\n types.set(key, type);\n }\n }\n }\n\n // Build a column spec\n const spec = [];\n for (const key of keys) {\n let width = null;\n if (calculateWidths) {\n // If we are calculating widths, use the value lengths\n width = Math.min(\n Math.max(defaultWidth / 2, columnWidths.get(key) ?? defaultWidth),\n defaultWidth * 1.5,\n );\n }\n\n spec.push({\n name: key,\n key,\n valueRenderer: defaultRenderers[types.get(key)],\n width,\n });\n }\n return spec;\n}\n\nexport function generateColumnSpec<T>(\n data: T[],\n options: ColumnSpecOptions<T>,\n): ColumnSpec[] {\n /** Generate a column spec from a dataset */\n const { overrides = {}, nRows = 10, omitColumns, includeColumns } = options;\n\n if (data == null) return [];\n\n const _nRows = Math.min(nRows, data.length);\n\n let columnSpec = generateDefaultColumnSpec(data.slice(0, _nRows));\n let filteredSpec = columnSpec.filter((col) => {\n if (omitColumns != null && omitColumns.includes(col.key)) {\n return false;\n }\n if (includeColumns != null && !includeColumns.includes(col.key)) {\n return false;\n }\n return true;\n });\n\n // Apply overrides\n return filteredSpec.map((col) => {\n let ovr = overrides[col.key];\n if (ovr == null) return col;\n if (typeof ovr === \"string\") {\n return { ...col, name: ovr };\n }\n return { ...col, ...ovr };\n });\n}\n"],"names":[],"version":3,"file":"data-sheet.410c5122.js.map"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
function $parcel$export(e, n, v, s) {
|
|
3
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
4
|
-
}
|
|
5
|
-
var $4829e0f8e57759e3$exports = {};
|
|
6
|
-
|
|
7
|
-
$parcel$export($4829e0f8e57759e3$exports, "basis-col", () => $4829e0f8e57759e3$export$1ed47493f461348b, (v) => $4829e0f8e57759e3$export$1ed47493f461348b = v);
|
|
8
|
-
$parcel$export($4829e0f8e57759e3$exports, "basis-panel", () => $4829e0f8e57759e3$export$c7bc816036885da1, (v) => $4829e0f8e57759e3$export$c7bc816036885da1 = v);
|
|
9
|
-
$parcel$export($4829e0f8e57759e3$exports, "data-sheet-outer", () => $4829e0f8e57759e3$export$a41cc5b8098038de, (v) => $4829e0f8e57759e3$export$a41cc5b8098038de = v);
|
|
10
|
-
$parcel$export($4829e0f8e57759e3$exports, "description", () => $4829e0f8e57759e3$export$6d59db4903f20f7d, (v) => $4829e0f8e57759e3$export$6d59db4903f20f7d = v);
|
|
11
|
-
$parcel$export($4829e0f8e57759e3$exports, "inline-lithology", () => $4829e0f8e57759e3$export$1ec8789066e3d6bc, (v) => $4829e0f8e57759e3$export$1ec8789066e3d6bc = v);
|
|
12
|
-
$parcel$export($4829e0f8e57759e3$exports, "lithology", () => $4829e0f8e57759e3$export$5c23751bce3f0807, (v) => $4829e0f8e57759e3$export$5c23751bce3f0807 = v);
|
|
13
|
-
$parcel$export($4829e0f8e57759e3$exports, "liths", () => $4829e0f8e57759e3$export$edffc8ad17c72de6, (v) => $4829e0f8e57759e3$export$edffc8ad17c72de6 = v);
|
|
14
|
-
$parcel$export($4829e0f8e57759e3$exports, "long-text", () => $4829e0f8e57759e3$export$617db6d5463a006, (v) => $4829e0f8e57759e3$export$617db6d5463a006 = v);
|
|
15
|
-
$parcel$export($4829e0f8e57759e3$exports, "tag-cell-content", () => $4829e0f8e57759e3$export$f83be3fbc2592c17, (v) => $4829e0f8e57759e3$export$f83be3fbc2592c17 = v);
|
|
16
|
-
$parcel$export($4829e0f8e57759e3$exports, "tag-header", () => $4829e0f8e57759e3$export$3a7d1f90484c84e1, (v) => $4829e0f8e57759e3$export$3a7d1f90484c84e1 = v);
|
|
17
|
-
var $4829e0f8e57759e3$export$1ed47493f461348b;
|
|
18
|
-
var $4829e0f8e57759e3$export$c7bc816036885da1;
|
|
19
|
-
var $4829e0f8e57759e3$export$a41cc5b8098038de;
|
|
20
|
-
var $4829e0f8e57759e3$export$6d59db4903f20f7d;
|
|
21
|
-
var $4829e0f8e57759e3$export$1ec8789066e3d6bc;
|
|
22
|
-
var $4829e0f8e57759e3$export$5c23751bce3f0807;
|
|
23
|
-
var $4829e0f8e57759e3$export$edffc8ad17c72de6;
|
|
24
|
-
var $4829e0f8e57759e3$export$617db6d5463a006;
|
|
25
|
-
var $4829e0f8e57759e3$export$f83be3fbc2592c17;
|
|
26
|
-
var $4829e0f8e57759e3$export$3a7d1f90484c84e1;
|
|
27
|
-
$4829e0f8e57759e3$export$1ed47493f461348b = `h0RamW_basis-col`;
|
|
28
|
-
$4829e0f8e57759e3$export$c7bc816036885da1 = `h0RamW_basis-panel`;
|
|
29
|
-
$4829e0f8e57759e3$export$a41cc5b8098038de = `h0RamW_data-sheet-outer`;
|
|
30
|
-
$4829e0f8e57759e3$export$6d59db4903f20f7d = `h0RamW_description`;
|
|
31
|
-
$4829e0f8e57759e3$export$1ec8789066e3d6bc = `h0RamW_inline-lithology`;
|
|
32
|
-
$4829e0f8e57759e3$export$5c23751bce3f0807 = `h0RamW_lithology`;
|
|
33
|
-
$4829e0f8e57759e3$export$edffc8ad17c72de6 = `h0RamW_liths`;
|
|
34
|
-
$4829e0f8e57759e3$export$617db6d5463a006 = `h0RamW_long-text`;
|
|
35
|
-
$4829e0f8e57759e3$export$f83be3fbc2592c17 = `h0RamW_tag-cell-content`;
|
|
36
|
-
$4829e0f8e57759e3$export$3a7d1f90484c84e1 = `h0RamW_tag-header`;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
export {$4829e0f8e57759e3$exports as default};
|
|
40
|
-
//# sourceMappingURL=data-sheet.48635112.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AATA,4CAA8B,CAAC,gBAAgB,CAAC;AAChD,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAAqC,CAAC,uBAAuB,CAAC;AAC9D,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAAqC,CAAC,uBAAuB,CAAC;AAC9D,4CAA8B,CAAC,gBAAgB,CAAC;AAChD,4CAA0B,CAAC,YAAY,CAAC;AACxC,2CAA8B,CAAC,gBAAgB,CAAC;AAChD,4CAAqC,CAAC,uBAAuB,CAAC;AAC9D,4CAA+B,CAAC,iBAAiB,CAAC","sources":["packages/data-sheet/src/postgrest-table/main.module.sass"],"sourcesContent":[".lithology\n font-weight: bold\n display: inline-block\n padding: 0 0.5em\n border-radius: 0.5em\n\n.inline-lithology .lithology\n line-height: 1em\n\n.basis-panel\n :global(.bp5-tag)\n margin: 0 0.5em 0.5em 0\n\n td\n vertical-align: top\n\n th\n text-align: left\n font-weight: 400\n font-size: 0.9em\n font-style: italic\n color: var(--secondary-color)\n\n.basis-panel, .long-text\n max-width: 20em\n padding: 8px\n max-height: 30em\n overflow-y: scroll\n pointer-events: all\n\n.description\n font-style: italic\n\n\n.tag-header\n font-weight: bold\n text-transform: small-caps\n font-size: 0.8em\n color: var(--secondary-color)\n\n.basis-col\n max-width: 15em\n\n.liths>*\n margin-right: 0.5em\n\n.data-sheet-outer\n position: relative\n flex: 1\n display: flex\n min-height: 0\n\n.tag-cell-content\n line-height: 1\n"],"names":[],"version":3,"file":"data-sheet.48635112.js.map"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
function $parcel$export(e, n, v, s) {
|
|
3
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
4
|
-
}
|
|
5
|
-
var $2c100a5db8320baf$exports = {};
|
|
6
|
-
|
|
7
|
-
$parcel$export($2c100a5db8320baf$exports, "table-action", () => $2c100a5db8320baf$export$d6d0049d3b1f338e, (v) => $2c100a5db8320baf$export$d6d0049d3b1f338e = v);
|
|
8
|
-
$parcel$export($2c100a5db8320baf$exports, "table-actions", () => $2c100a5db8320baf$export$204e8b69eae0e749, (v) => $2c100a5db8320baf$export$204e8b69eae0e749 = v);
|
|
9
|
-
var $2c100a5db8320baf$export$d6d0049d3b1f338e;
|
|
10
|
-
var $2c100a5db8320baf$export$204e8b69eae0e749;
|
|
11
|
-
$2c100a5db8320baf$export$d6d0049d3b1f338e = `mo-ulq_table-action`;
|
|
12
|
-
$2c100a5db8320baf$export$204e8b69eae0e749 = `mo-ulq_table-actions`;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export {$2c100a5db8320baf$exports as default};
|
|
16
|
-
//# sourceMappingURL=data-sheet.54cfa8e8.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;AAAA,IAAA;AACA,IAAA;AADA,4CAAiC,CAAC,mBAAmB,CAAC;AACtD,4CAAkC,CAAC,oBAAoB,CAAC","sources":["packages/data-sheet/src/components/actions.module.sass"],"sourcesContent":[".table-actions, .table-action\n display: flex\n flex-direction: row\n gap: 0.5em\n\n.table-actions\n margin-bottom: 0.5em\n gap: 1em\n"],"names":[],"version":3,"file":"data-sheet.54cfa8e8.js.map"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import $iaGQ1$datasheet37e35216js from "./data-sheet.37e35216.js";
|
|
2
|
-
import "./data-sheet.91223ec6.css";
|
|
3
|
-
import {Cell as $iaGQ1$Cell} from "@blueprintjs/table";
|
|
4
|
-
import {useInDarkMode as $iaGQ1$useInDarkMode} from "@macrostrat/ui-components";
|
|
5
|
-
import $iaGQ1$macrostrathyper from "@macrostrat/hyper";
|
|
6
|
-
import {getLuminanceAdjustedColorScheme as $iaGQ1$getLuminanceAdjustedColorScheme, asChromaColor as $iaGQ1$asChromaColor} from "@macrostrat/color-utils";
|
|
7
|
-
import {HexColorPicker as $iaGQ1$HexColorPicker} from "react-colorful";
|
|
8
|
-
import {useRef as $iaGQ1$useRef, useEffect as $iaGQ1$useEffect} from "react";
|
|
9
|
-
import {memoize as $iaGQ1$memoize} from "underscore";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function $parcel$interopDefault(a) {
|
|
13
|
-
return a && a.__esModule ? a.default : a;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const $423bf54b4879ebeb$var$h = (0, $iaGQ1$macrostrathyper).styled((0, ($parcel$interopDefault($iaGQ1$datasheet37e35216js))));
|
|
24
|
-
function $423bf54b4879ebeb$export$24aecfe8a925020d({ value: value, children: children, style: style, intent: intent, adjustLuminance: adjustLuminance = true, ...rest }) {
|
|
25
|
-
const darkMode = (0, $iaGQ1$useInDarkMode)();
|
|
26
|
-
let mainColor = "var(--text-color)";
|
|
27
|
-
let backgroundColor = value;
|
|
28
|
-
if (adjustLuminance) {
|
|
29
|
-
// If adjustLuminance is true, get the color scheme based on the value
|
|
30
|
-
let colors = $423bf54b4879ebeb$var$colorCombo(value, darkMode, 0.05);
|
|
31
|
-
if (colors != null) {
|
|
32
|
-
mainColor = colors.mainColor;
|
|
33
|
-
backgroundColor = colors.backgroundColor;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return $423bf54b4879ebeb$var$h((0, $iaGQ1$Cell), {
|
|
37
|
-
...rest,
|
|
38
|
-
style: {
|
|
39
|
-
color: mainColor,
|
|
40
|
-
backgroundColor: backgroundColor,
|
|
41
|
-
...style
|
|
42
|
-
}
|
|
43
|
-
}, children);
|
|
44
|
-
}
|
|
45
|
-
function $423bf54b4879ebeb$export$e5f546a5ba915f1c(value) {
|
|
46
|
-
return $423bf54b4879ebeb$var$h("span.color-swatch-container", [
|
|
47
|
-
$423bf54b4879ebeb$var$h("span.color-swatch", {
|
|
48
|
-
style: {
|
|
49
|
-
backgroundColor: value
|
|
50
|
-
}
|
|
51
|
-
}),
|
|
52
|
-
$423bf54b4879ebeb$var$h("span.color-name", value)
|
|
53
|
-
]);
|
|
54
|
-
}
|
|
55
|
-
const $423bf54b4879ebeb$var$colorCombo = (0, $iaGQ1$memoize)((0, $iaGQ1$getLuminanceAdjustedColorScheme));
|
|
56
|
-
var $423bf54b4879ebeb$var$ColorConversionType = /*#__PURE__*/ function(ColorConversionType) {
|
|
57
|
-
ColorConversionType["HEX"] = "hex";
|
|
58
|
-
ColorConversionType["RGB"] = "rgb";
|
|
59
|
-
ColorConversionType["HSL"] = "hsl";
|
|
60
|
-
ColorConversionType["CSS"] = "css";
|
|
61
|
-
return ColorConversionType;
|
|
62
|
-
}($423bf54b4879ebeb$var$ColorConversionType || {});
|
|
63
|
-
function $423bf54b4879ebeb$export$9feb1bc2e5f1ccb3({ value: value, onChange: onChange, type: type = "css" }) {
|
|
64
|
-
const ref = (0, $iaGQ1$useRef)(null);
|
|
65
|
-
(0, $iaGQ1$useEffect)(()=>{
|
|
66
|
-
if (ref.current == null) return;
|
|
67
|
-
ref.current.focus();
|
|
68
|
-
}, []);
|
|
69
|
-
let color;
|
|
70
|
-
try {
|
|
71
|
-
color = (0, $iaGQ1$asChromaColor)(value).hex();
|
|
72
|
-
} catch {
|
|
73
|
-
color = "#aaaaaa";
|
|
74
|
-
}
|
|
75
|
-
return $423bf54b4879ebeb$var$h("div.color-picker-container", {
|
|
76
|
-
onKeyDown (evt) {
|
|
77
|
-
console.log(evt);
|
|
78
|
-
if (evt.key === "Escape") evt.preventDefault();
|
|
79
|
-
},
|
|
80
|
-
ref: ref,
|
|
81
|
-
tabIndex: 0
|
|
82
|
-
}, $423bf54b4879ebeb$var$h((0, $iaGQ1$HexColorPicker), {
|
|
83
|
-
color: color,
|
|
84
|
-
onChange (color) {
|
|
85
|
-
onChange((0, $iaGQ1$asChromaColor)(color)[type]());
|
|
86
|
-
}
|
|
87
|
-
}));
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
export {$423bf54b4879ebeb$export$24aecfe8a925020d as ColorCell, $423bf54b4879ebeb$export$e5f546a5ba915f1c as colorSwatchRenderer, $423bf54b4879ebeb$export$9feb1bc2e5f1ccb3 as ColorPicker};
|
|
92
|
-
//# sourceMappingURL=data-sheet.6021b6c9.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;AAaA,MAAM,0BAAI,CAAA,GAAA,sBAAI,EAAE,MAAM,CAAC,CAAA,GAAA,qEAAK;AAErB,SAAS,0CAAU,SACxB,KAAK,YACL,QAAQ,SACR,KAAK,UACL,MAAM,mBACN,kBAAkB,MAClB,GAAG,MACJ;IACC,MAAM,WAAW,CAAA,GAAA,oBAAY;IAE7B,IAAI,YAAY;IAChB,IAAI,kBAAkB;IAEtB,IAAI,iBAAiB;QACnB,sEAAsE;QACtE,IAAI,SAAS,iCAAW,OAAO,UAAU;QACzC,IAAI,UAAU,MAAM;YAClB,YAAY,OAAO,SAAS;YAC5B,kBAAkB,OAAO,eAAe;QAC1C;IACF;IAEA,OAAO,wBACL,CAAA,GAAA,WAAG,GACH;QACE,GAAG,IAAI;QACP,OAAO;YACL,OAAO;6BACP;YACA,GAAG,KAAK;QACV;IACF,GACA;AAEJ;AAEO,SAAS,0CAAoB,KAAK;IACvC,OAAO,wBAAE,+BAA+B;QACtC,wBAAE,qBAAqB;YACrB,OAAO;gBAAE,iBAAiB;YAAM;QAClC;QACA,wBAAE,mBAAmB;KACtB;AACH;AAEA,MAAM,mCAAa,CAAA,GAAA,cAAM,EAAE,CAAA,GAAA,sCAA8B;AAEzD,IAAA,AAAK,mEAAA;;;;;WAAA;EAAA;AAOE,SAAS,0CAAY,SAC1B,KAAK,YACL,QAAQ,QACR,cACD;IACC,MAAM,MAAM,CAAA,GAAA,aAAK,EAAE;IACnB,CAAA,GAAA,gBAAQ,EAAE;QACR,IAAI,IAAI,OAAO,IAAI,MAAM;QACzB,IAAI,OAAO,CAAC,KAAK;IACnB,GAAG,EAAE;IAEL,IAAI;IACJ,IAAI;QACF,QAAQ,CAAA,GAAA,oBAAY,EAAE,OAAO,GAAG;IAClC,EAAE,OAAM;QACN,QAAQ;IACV;IACA,OAAO,wBACL,8BACA;QACE,WAAU,GAAG;YACX,QAAQ,GAAG,CAAC;YACZ,IAAI,IAAI,GAAG,KAAK,UACd,IAAI,cAAc;QAEtB;aACA;QACA,UAAU;IACZ,GACA,wBAAE,CAAA,GAAA,qBAAa,GAAG;eAChB;QACA,UAAS,KAAK;YACZ,SAAS,CAAA,GAAA,oBAAY,EAAE,MAAM,CAAC,KAAK;QACrC;IACF;AAEJ","sources":["packages/data-sheet/src/components/colors.ts"],"sourcesContent":["import { Cell } from \"@blueprintjs/table\";\nimport { useInDarkMode } from \"@macrostrat/ui-components\";\nimport hyper from \"@macrostrat/hyper\";\nimport styles from \"./main.module.sass\";\nimport {\n asChromaColor,\n getLuminanceAdjustedColorScheme,\n} from \"@macrostrat/color-utils\";\nimport { HexColorPicker } from \"react-colorful\";\nimport { useEffect, useRef } from \"react\";\nimport { memoize } from \"underscore\";\nimport main from \"../../../../.storybook/main\";\n\nconst h = hyper.styled(styles);\n\nexport function ColorCell({\n value,\n children,\n style,\n intent,\n adjustLuminance = true,\n ...rest\n}) {\n const darkMode = useInDarkMode();\n\n let mainColor = \"var(--text-color)\";\n let backgroundColor = value;\n\n if (adjustLuminance) {\n // If adjustLuminance is true, get the color scheme based on the value\n let colors = colorCombo(value, darkMode, 0.05);\n if (colors != null) {\n mainColor = colors.mainColor;\n backgroundColor = colors.backgroundColor;\n }\n }\n\n return h(\n Cell,\n {\n ...rest,\n style: {\n color: mainColor,\n backgroundColor,\n ...style,\n },\n },\n children,\n );\n}\n\nexport function colorSwatchRenderer(value) {\n return h(\"span.color-swatch-container\", [\n h(\"span.color-swatch\", {\n style: { backgroundColor: value },\n }),\n h(\"span.color-name\", value),\n ]);\n}\n\nconst colorCombo = memoize(getLuminanceAdjustedColorScheme);\n\nenum ColorConversionType {\n HEX = \"hex\",\n RGB = \"rgb\",\n HSL = \"hsl\",\n CSS = \"css\",\n}\n\nexport function ColorPicker({\n value,\n onChange,\n type = ColorConversionType.CSS,\n}) {\n const ref = useRef(null);\n useEffect(() => {\n if (ref.current == null) return;\n ref.current.focus();\n }, []);\n\n let color: any;\n try {\n color = asChromaColor(value).hex();\n } catch {\n color = \"#aaaaaa\";\n }\n return h(\n \"div.color-picker-container\",\n {\n onKeyDown(evt) {\n console.log(evt);\n if (evt.key === \"Escape\") {\n evt.preventDefault();\n }\n },\n ref,\n tabIndex: 0,\n },\n h(HexColorPicker, {\n color,\n onChange(color) {\n onChange(asChromaColor(color)[type]());\n },\n }),\n );\n}\n"],"names":[],"version":3,"file":"data-sheet.6021b6c9.js.map"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import $bf5AK$datasheet37e35216js from "./data-sheet.37e35216.js";
|
|
2
|
-
import "./data-sheet.91223ec6.css";
|
|
3
|
-
import {useSelector as $4b6643d78a77a8eb$export$2105062e25df4afe} from "./data-sheet.c9b6b6f2.js";
|
|
4
|
-
import $bf5AK$macrostrathyper from "@macrostrat/hyper";
|
|
5
|
-
import {ErrorBoundary as $bf5AK$ErrorBoundary} from "@macrostrat/ui-components";
|
|
6
|
-
import {Popover as $bf5AK$Popover} from "@blueprintjs/core";
|
|
7
|
-
import {useState as $bf5AK$useState, useRef as $bf5AK$useRef} from "react";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
function $parcel$interopDefault(a) {
|
|
11
|
-
return a && a.__esModule ? a.default : a;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const $88e63ff6e4eea209$var$h = (0, $bf5AK$macrostrathyper).styled((0, ($parcel$interopDefault($bf5AK$datasheet37e35216js))));
|
|
20
|
-
function $88e63ff6e4eea209$export$2a7e60c8443c1751(props) {
|
|
21
|
-
const { children: children, targetClassName: targetClassName, autoFocus: autoFocus, valueViewer: valueViewer, minimal: minimal = true } = props;
|
|
22
|
-
const [isOpen, setIsOpen] = (0, $bf5AK$useState)(autoFocus);
|
|
23
|
-
const keyHandler = (0, $4b6643d78a77a8eb$export$2105062e25df4afe)((state)=>state.keyHandler);
|
|
24
|
-
const ref = (0, $bf5AK$useRef)(null);
|
|
25
|
-
const inlineEditor = $88e63ff6e4eea209$var$h([
|
|
26
|
-
$88e63ff6e4eea209$var$h("span.editor-value.bp5-table-cell", valueViewer),
|
|
27
|
-
$88e63ff6e4eea209$var$h("input.hidden-editor", {
|
|
28
|
-
value: "",
|
|
29
|
-
autoFocus: true,
|
|
30
|
-
onKeyDown: keyHandler
|
|
31
|
-
})
|
|
32
|
-
]);
|
|
33
|
-
return $88e63ff6e4eea209$var$h((0, $bf5AK$Popover), {
|
|
34
|
-
content: $88e63ff6e4eea209$var$h("div.interaction-barrier", {
|
|
35
|
-
onMouseDown (evt) {
|
|
36
|
-
evt.nativeEvent.stopImmediatePropagation();
|
|
37
|
-
},
|
|
38
|
-
onKeyDown (evt) {
|
|
39
|
-
if (evt.key === "Escape") {
|
|
40
|
-
if (isOpen) setIsOpen(false);
|
|
41
|
-
evt.stopPropagation();
|
|
42
|
-
evt.preventDefault();
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
// Climb over the interaction barrier to propagate the key event to the table
|
|
46
|
-
}
|
|
47
|
-
}, $88e63ff6e4eea209$var$h((0, $bf5AK$ErrorBoundary), null, children)),
|
|
48
|
-
enforceFocus: false,
|
|
49
|
-
autoFocus: false,
|
|
50
|
-
minimal: minimal,
|
|
51
|
-
modifiers: {
|
|
52
|
-
offset: {
|
|
53
|
-
enabled: true,
|
|
54
|
-
options: {
|
|
55
|
-
offset: [
|
|
56
|
-
0,
|
|
57
|
-
8
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
interactionKind: "hover-target",
|
|
63
|
-
isOpen: isOpen,
|
|
64
|
-
// Portal must be used to avoid issues with the editor being clipped to the bounds of the cell
|
|
65
|
-
usePortal: true
|
|
66
|
-
}, $88e63ff6e4eea209$var$h("span.editor-popup-target.bp5-table-cell", {
|
|
67
|
-
className: targetClassName,
|
|
68
|
-
onClick: ()=>setIsOpen(!isOpen),
|
|
69
|
-
ref: ref
|
|
70
|
-
}, // If the editor is open, show the inline editor, otherwise show the value viewer
|
|
71
|
-
isOpen ? valueViewer : inlineEditor ?? valueViewer));
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
export {$88e63ff6e4eea209$export$2a7e60c8443c1751 as EditorPopup};
|
|
76
|
-
//# sourceMappingURL=data-sheet.6776e250.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;AAOA,MAAM,0BAAI,CAAA,GAAA,sBAAI,EAAE,MAAM,CAAC,CAAA,GAAA,qEAAK;AAErB,SAAS,0CAAY,KAAK;IAC/B,MAAM,YACJ,QAAQ,mBACR,eAAe,aACf,SAAS,eACT,WAAW,WACX,UAAU,MACX,GAAG;IAEJ,MAAM,CAAC,QAAQ,UAAU,GAAG,CAAA,GAAA,eAAO,EAAE;IACrC,MAAM,aAAa,CAAA,GAAA,yCAAU,EAAE,CAAC,QAAU,MAAM,UAAU;IAE1D,MAAM,MAAM,CAAA,GAAA,aAAK,EAAE;IAEnB,MAAM,eAAe,wBAAE;QACrB,wBAAE,oCAAoC;QACtC,wBAAE,uBAAuB;YACvB,OAAO;YACP,WAAW;YACX,WAAW;QACb;KACD;IAED,OAAO,wBACL,CAAA,GAAA,cAAM,GACN;QACE,SAAS,wBACP,2BACA;YACE,aAAY,GAAG;gBACb,IAAI,WAAW,CAAC,wBAAwB;YAC1C;YACA,WAAU,GAAG;gBACX,IAAI,IAAI,GAAG,KAAK,UAAU;oBACxB,IAAI,QACF,UAAU;oBAEZ,IAAI,eAAe;oBACnB,IAAI,cAAc;oBAClB;gBACF;YACA,6EAA6E;YAC/E;QACF,GACA,wBAAE,CAAA,GAAA,oBAAY,GAAG,MAAM;QAEzB,cAAc;QACd,WAAW;iBACX;QACA,WAAW;YACT,QAAQ;gBAAE,SAAS;gBAAM,SAAS;oBAAE,QAAQ;wBAAC;wBAAG;qBAAE;gBAAC;YAAE;QACvD;QACA,iBAAiB;gBACjB;QACA,8FAA8F;QAC9F,WAAW;IACb,GACA,wBACE,2CACA;QACE,WAAW;QACX,SAAS,IAAM,UAAU,CAAC;aAC1B;IACF,GACA,iFAAiF;IACjF,SAAS,cAAe,gBAAgB;AAG9C","sources":["packages/data-sheet/src/components/editor-popup.ts"],"sourcesContent":["import hyper from \"@macrostrat/hyper\";\nimport { ErrorBoundary } from \"@macrostrat/ui-components\";\nimport { Popover } from \"@blueprintjs/core\";\nimport styles from \"./main.module.sass\";\nimport { useRef, useState } from \"react\";\nimport { useSelector } from \"../provider\";\n\nconst h = hyper.styled(styles);\n\nexport function EditorPopup(props) {\n const {\n children,\n targetClassName,\n autoFocus,\n valueViewer,\n minimal = true,\n } = props;\n\n const [isOpen, setIsOpen] = useState(autoFocus);\n const keyHandler = useSelector((state) => state.keyHandler);\n\n const ref = useRef(null);\n\n const inlineEditor = h([\n h(\"span.editor-value.bp5-table-cell\", valueViewer),\n h(\"input.hidden-editor\", {\n value: \"\",\n autoFocus: true,\n onKeyDown: keyHandler,\n }),\n ]);\n\n return h(\n Popover,\n {\n content: h(\n \"div.interaction-barrier\",\n {\n onMouseDown(evt) {\n evt.nativeEvent.stopImmediatePropagation();\n },\n onKeyDown(evt) {\n if (evt.key === \"Escape\") {\n if (isOpen) {\n setIsOpen(false);\n }\n evt.stopPropagation();\n evt.preventDefault();\n return;\n }\n // Climb over the interaction barrier to propagate the key event to the table\n },\n },\n h(ErrorBoundary, null, children),\n ),\n enforceFocus: false,\n autoFocus: false,\n minimal,\n modifiers: {\n offset: { enabled: true, options: { offset: [0, 8] } },\n },\n interactionKind: \"hover-target\",\n isOpen,\n // Portal must be used to avoid issues with the editor being clipped to the bounds of the cell\n usePortal: true,\n },\n h(\n \"span.editor-popup-target.bp5-table-cell\",\n {\n className: targetClassName,\n onClick: () => setIsOpen(!isOpen),\n ref,\n },\n // If the editor is open, show the inline editor, otherwise show the value viewer\n isOpen ? valueViewer : (inlineEditor ?? valueViewer),\n ),\n );\n}\n"],"names":[],"version":3,"file":"data-sheet.6776e250.js.map"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAAA;;;;;;AAKA","sources":["packages/data-sheet/src/components/actions.module.sass"],"sourcesContent":[".table-actions, .table-action\n display: flex\n flex-direction: row\n gap: 0.5em\n\n.table-actions\n margin-bottom: 0.5em\n gap: 1em\n"],"names":[],"version":3,"file":"data-sheet.706f955d.css.map"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import {generateDefaultColumnSpec as $afa6527b61074fe8$export$90c86365d1c277aa, generateColumnSpec as $afa6527b61074fe8$export$30457629971d2e1f} from "./data-sheet.410c5122.js";
|
|
2
|
-
import {tableKeyHandler as $953dc094ec21e2f0$export$b010a8fb240edb5e, editorKeyHandler as $953dc094ec21e2f0$export$1ebdb7ea82507aae, multiLineTextKeyHandler as $953dc094ec21e2f0$export$eb6970f6c0d44205} from "./data-sheet.186dcac8.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function $cd1c51962d90ebe2$export$d02631cccf789723(arr) {
|
|
7
|
-
if (arr.length != 2) throw new Error("Range must have two elements");
|
|
8
|
-
const [start, end] = arr;
|
|
9
|
-
return Array.from({
|
|
10
|
-
length: end - start + 1
|
|
11
|
-
}, (_, i)=>i + start);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export {$cd1c51962d90ebe2$export$d02631cccf789723 as range, $afa6527b61074fe8$export$90c86365d1c277aa as generateDefaultColumnSpec, $afa6527b61074fe8$export$30457629971d2e1f as generateColumnSpec, $953dc094ec21e2f0$export$b010a8fb240edb5e as tableKeyHandler, $953dc094ec21e2f0$export$1ebdb7ea82507aae as editorKeyHandler, $953dc094ec21e2f0$export$eb6970f6c0d44205 as multiLineTextKeyHandler};
|
|
16
|
-
//# sourceMappingURL=data-sheet.8dbfccef.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;AAGO,SAAS,0CAAM,GAAa;IACjC,IAAI,IAAI,MAAM,IAAI,GAAG,MAAM,IAAI,MAAM;IACrC,MAAM,CAAC,OAAO,IAAI,GAAG;IACrB,OAAO,MAAM,IAAI,CAAC;QAAE,QAAQ,MAAM,QAAQ;IAAE,GAAG,CAAC,GAAG,IAAM,IAAI;AAC/D","sources":["packages/data-sheet/src/utils/index.ts"],"sourcesContent":["export * from \"./column-spec\";\nexport * from \"./key-handling\";\n\nexport function range(arr: number[]) {\n if (arr.length != 2) throw new Error(\"Range must have two elements\");\n const [start, end] = arr;\n return Array.from({ length: end - start + 1 }, (_, i) => i + start);\n}\n"],"names":[],"version":3,"file":"data-sheet.8dbfccef.js.map"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
.interaction-barrier_c65904 {
|
|
2
|
-
pointer-events: all;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.editor-popup-target_c65904 {
|
|
6
|
-
width: 100%;
|
|
7
|
-
height: 100%;
|
|
8
|
-
display: block;
|
|
9
|
-
position: absolute;
|
|
10
|
-
top: 0;
|
|
11
|
-
left: 0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.editable-text-area_c65904 {
|
|
15
|
-
position: relative;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.editable-text-area_c65904 textarea {
|
|
19
|
-
min-width: var(--data-editor-width, 15em);
|
|
20
|
-
min-height: var(--data-editor-height, 10em);
|
|
21
|
-
font-family: inherit;
|
|
22
|
-
font-size: inherit;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.editable-text-area_c65904 .tools_c65904 {
|
|
26
|
-
position: absolute;
|
|
27
|
-
top: .2em;
|
|
28
|
-
right: .2em;
|
|
29
|
-
transform: scale(.8);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.hidden-editor_c65904 {
|
|
33
|
-
opacity: 0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.editor-value_c65904 {
|
|
37
|
-
width: 100%;
|
|
38
|
-
height: 100%;
|
|
39
|
-
position: absolute;
|
|
40
|
-
top: 0;
|
|
41
|
-
left: 0;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.color-picker-container_c65904 .react-colorful__saturation, .color-picker-container_c65904 .react-colorful__hue {
|
|
45
|
-
border-radius: 0;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.color-swatch_c65904 {
|
|
49
|
-
width: 18px;
|
|
50
|
-
height: 18px;
|
|
51
|
-
margin-right: .5em;
|
|
52
|
-
display: inline-block;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.color-swatch-container_c65904 {
|
|
56
|
-
flex-direction: row;
|
|
57
|
-
align-items: center;
|
|
58
|
-
gap: .3em;
|
|
59
|
-
display: flex;
|
|
60
|
-
position: absolute;
|
|
61
|
-
inset: 0;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.color-name_c65904 {
|
|
65
|
-
flex-grow: 1;
|
|
66
|
-
display: block;
|
|
67
|
-
position: relative;
|
|
68
|
-
}
|
|
69
|
-
/*# sourceMappingURL=data-sheet.91223ec6.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAAA;;;;AAGA;;;;;;;;;AAQA;;;;AAII;;;;;;;AAOA;;;;;;;;;;;AASF;;;;;;;;;;;;AAmBA;;;;;;;AAMA;;;;;;;;;AAWA","sources":["packages/data-sheet/src/components/main.module.sass"],"sourcesContent":[".interaction-barrier\n pointer-events: all\n\n.editor-popup-target\n position: absolute\n display: block\n top: 0\n left: 0\n width: 100%\n height: 100%\n\n.editable-text-area\n position: relative\n\n textarea\n min-width: var(--data-editor-width, 15em)\n min-height: var(--data-editor-height, 10em)\n font-family: inherit\n font-size: inherit\n\n .tools\n position: absolute\n top: 0.2em\n right: 0.2em\n transform: scale(0.8)\n\n.hidden-editor\n opacity: 0\n\n.editor-value\n position: absolute\n top: 0\n left: 0\n width: 100%\n height: 100%\n\n\n// Color picker\n.color-picker-container\n :global\n .react-colorful__saturation\n border-radius: 0\n\n .react-colorful__hue\n border-radius: 0\n\n\n.color-swatch\n width: 18px\n height: 18px\n display: inline-block\n margin-right: 0.5em\n\n.color-swatch-container\n position: absolute\n top: 0\n left: 0\n right: 0\n bottom: 0\n display: flex\n flex-direction: row\n align-items: center\n gap: 0.3em\n\n.color-name\n position: relative\n flex-grow: 1\n display: block\n"],"names":[],"version":3,"file":"data-sheet.91223ec6.css.map"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import $eBkqD$datasheet37e35216js from "./data-sheet.37e35216.js";
|
|
2
|
-
import "./data-sheet.91223ec6.css";
|
|
3
|
-
import {multiLineTextKeyHandler as $eBkqD$multiLineTextKeyHandler} from "./data-sheet.8dbfccef.js";
|
|
4
|
-
import $eBkqD$macrostrathyper from "@macrostrat/hyper";
|
|
5
|
-
import {Button as $eBkqD$Button} from "@blueprintjs/core";
|
|
6
|
-
import {useRef as $eBkqD$useRef, useEffect as $eBkqD$useEffect} from "react";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
function $parcel$interopDefault(a) {
|
|
10
|
-
return a && a.__esModule ? a.default : a;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const $0aa421c11d2af971$var$h = (0, $eBkqD$macrostrathyper).styled((0, ($parcel$interopDefault($eBkqD$datasheet37e35216js))));
|
|
18
|
-
function $0aa421c11d2af971$export$b8e68c321a6269f1({ value: value, onChange: onChange }) {
|
|
19
|
-
const ref = (0, $eBkqD$useRef)(null);
|
|
20
|
-
(0, $eBkqD$useEffect)(()=>{
|
|
21
|
-
if (ref.current == null) return;
|
|
22
|
-
ref.current.focus();
|
|
23
|
-
// Get the current value
|
|
24
|
-
const val = ref.current.value;
|
|
25
|
-
// Move the cursor to the end of the text
|
|
26
|
-
ref.current.setSelectionRange(val.length, val.length);
|
|
27
|
-
}, []);
|
|
28
|
-
return $0aa421c11d2af971$var$h("div.editable-text-area", [
|
|
29
|
-
$0aa421c11d2af971$var$h("textarea.bp5-input", {
|
|
30
|
-
ref: ref,
|
|
31
|
-
value: value ?? "",
|
|
32
|
-
onChange: (evt)=>onChange(evt.target.value),
|
|
33
|
-
onKeyDown: (0, $eBkqD$multiLineTextKeyHandler)
|
|
34
|
-
}),
|
|
35
|
-
$0aa421c11d2af971$var$h("div.tools", [
|
|
36
|
-
$0aa421c11d2af971$var$h((0, $eBkqD$Button), {
|
|
37
|
-
icon: "key-enter",
|
|
38
|
-
minimal: true,
|
|
39
|
-
small: true,
|
|
40
|
-
onClick () {
|
|
41
|
-
// Get cursor position
|
|
42
|
-
let _value = value ?? "";
|
|
43
|
-
const cursorPos = ref.current.selectionStart ?? _value.length;
|
|
44
|
-
// Insert a newline at the cursor position
|
|
45
|
-
onChange(_value.slice(0, cursorPos) + "\n" + _value.slice(cursorPos));
|
|
46
|
-
// Re-focus the textarea
|
|
47
|
-
ref.current.focus();
|
|
48
|
-
// Move the cursor to the end of the line
|
|
49
|
-
ref.current.setSelectionRange(cursorPos + 1, cursorPos + 1);
|
|
50
|
-
}
|
|
51
|
-
})
|
|
52
|
-
])
|
|
53
|
-
]);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
export {$0aa421c11d2af971$export$b8e68c321a6269f1 as EditableTextArea};
|
|
58
|
-
//# sourceMappingURL=data-sheet.96446cae.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;AAMA,MAAM,0BAAI,CAAA,GAAA,sBAAI,EAAE,MAAM,CAAC,CAAA,GAAA,qEAAK;AAErB,SAAS,0CAAiB,SAAE,KAAK,YAAE,QAAQ,EAAE;IAClD,MAAM,MAAM,CAAA,GAAA,aAAK,EAAE;IAEnB,CAAA,GAAA,gBAAQ,EAAE;QACR,IAAI,IAAI,OAAO,IAAI,MAAM;QACzB,IAAI,OAAO,CAAC,KAAK;QACjB,wBAAwB;QACxB,MAAM,MAAM,IAAI,OAAO,CAAC,KAAK;QAC7B,yCAAyC;QACzC,IAAI,OAAO,CAAC,iBAAiB,CAAC,IAAI,MAAM,EAAE,IAAI,MAAM;IACtD,GAAG,EAAE;IAEL,OAAO,wBAAE,0BAA0B;QACjC,wBAAE,sBAAsB;iBACtB;YACA,OAAO,SAAS;YAChB,UAAU,CAAC,MAAQ,SAAS,IAAI,MAAM,CAAC,KAAK;YAC5C,WAAW,CAAA,GAAA,8BAAsB;QACnC;QACA,wBAAE,aAAa;YACb,wBAAE,CAAA,GAAA,aAAK,GAAG;gBACR,MAAM;gBACN,SAAS;gBACT,OAAO;gBACP;oBACE,sBAAsB;oBACtB,IAAI,SAAS,SAAS;oBAEtB,MAAM,YAAY,IAAI,OAAO,CAAC,cAAc,IAAI,OAAO,MAAM;oBAC7D,0CAA0C;oBAC1C,SAAS,OAAO,KAAK,CAAC,GAAG,aAAa,OAAO,OAAO,KAAK,CAAC;oBAC1D,wBAAwB;oBACxB,IAAI,OAAO,CAAC,KAAK;oBACjB,yCAAyC;oBACzC,IAAI,OAAO,CAAC,iBAAiB,CAAC,YAAY,GAAG,YAAY;gBAC3D;YACF;SACD;KACF;AACH","sources":["packages/data-sheet/src/components/text-areas.ts"],"sourcesContent":["import hyper from \"@macrostrat/hyper\";\nimport styles from \"./main.module.sass\";\nimport { Button } from \"@blueprintjs/core\";\nimport { useEffect, useRef } from \"react\";\nimport { multiLineTextKeyHandler } from \"../utils\";\n\nconst h = hyper.styled(styles);\n\nexport function EditableTextArea({ value, onChange }) {\n const ref = useRef(null);\n\n useEffect(() => {\n if (ref.current == null) return;\n ref.current.focus();\n // Get the current value\n const val = ref.current.value;\n // Move the cursor to the end of the text\n ref.current.setSelectionRange(val.length, val.length);\n }, []);\n\n return h(\"div.editable-text-area\", [\n h(\"textarea.bp5-input\", {\n ref,\n value: value ?? \"\",\n onChange: (evt) => onChange(evt.target.value),\n onKeyDown: multiLineTextKeyHandler,\n }),\n h(\"div.tools\", [\n h(Button, {\n icon: \"key-enter\",\n minimal: true,\n small: true,\n onClick() {\n // Get cursor position\n let _value = value ?? \"\";\n\n const cursorPos = ref.current.selectionStart ?? _value.length;\n // Insert a newline at the cursor position\n onChange(_value.slice(0, cursorPos) + \"\\n\" + _value.slice(cursorPos));\n // Re-focus the textarea\n ref.current.focus();\n // Move the cursor to the end of the line\n ref.current.setSelectionRange(cursorPos + 1, cursorPos + 1);\n },\n }),\n ]),\n ]);\n}\n"],"names":[],"version":3,"file":"data-sheet.96446cae.js.map"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {EditorPopup as $88e63ff6e4eea209$export$2a7e60c8443c1751} from "./data-sheet.6776e250.js";
|
|
2
|
-
import {ColorCell as $423bf54b4879ebeb$export$24aecfe8a925020d, colorSwatchRenderer as $423bf54b4879ebeb$export$e5f546a5ba915f1c, ColorPicker as $423bf54b4879ebeb$export$9feb1bc2e5f1ccb3} from "./data-sheet.6021b6c9.js";
|
|
3
|
-
import {EditableTextArea as $0aa421c11d2af971$export$b8e68c321a6269f1} from "./data-sheet.96446cae.js";
|
|
4
|
-
import {DataSheetActionsRow as $a36e736abd533bdf$export$b215fe4466d8f847, DataSheetAction as $a36e736abd533bdf$export$c2c7070a9fc246e1} from "./data-sheet.a3eb6088.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export {$88e63ff6e4eea209$export$2a7e60c8443c1751 as EditorPopup, $423bf54b4879ebeb$export$24aecfe8a925020d as ColorCell, $423bf54b4879ebeb$export$e5f546a5ba915f1c as colorSwatchRenderer, $423bf54b4879ebeb$export$9feb1bc2e5f1ccb3 as ColorPicker, $0aa421c11d2af971$export$b8e68c321a6269f1 as EditableTextArea, $a36e736abd533bdf$export$b215fe4466d8f847 as DataSheetActionsRow, $a36e736abd533bdf$export$c2c7070a9fc246e1 as DataSheetAction};
|
|
13
|
-
//# sourceMappingURL=data-sheet.9b593da4.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"","sources":["packages/data-sheet/src/components/index.ts"],"sourcesContent":["export * from \"./editor-popup\";\nexport * from \"./colors\";\nexport * from \"./text-areas\";\nexport * from \"./actions\";\n"],"names":[],"version":3,"file":"data-sheet.9b593da4.js.map"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import "./data-sheet.706f955d.css";
|
|
2
|
-
import $ffo9G$datasheet54cfa8e8js from "./data-sheet.54cfa8e8.js";
|
|
3
|
-
import $ffo9G$macrostrathyper from "@macrostrat/hyper";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function $parcel$interopDefault(a) {
|
|
7
|
-
return a && a.__esModule ? a.default : a;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const $a36e736abd533bdf$var$h = (0, $ffo9G$macrostrathyper).styled((0, ($parcel$interopDefault($ffo9G$datasheet54cfa8e8js))));
|
|
12
|
-
function $a36e736abd533bdf$export$b215fe4466d8f847(props) {
|
|
13
|
-
return $a36e736abd533bdf$var$h("div.table-actions", props.children);
|
|
14
|
-
}
|
|
15
|
-
function $a36e736abd533bdf$export$c2c7070a9fc246e1(props) {
|
|
16
|
-
return $a36e736abd533bdf$var$h("div.table-action", props.children);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export {$a36e736abd533bdf$export$b215fe4466d8f847 as DataSheetActionsRow, $a36e736abd533bdf$export$c2c7070a9fc246e1 as DataSheetAction};
|
|
21
|
-
//# sourceMappingURL=data-sheet.a3eb6088.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;AAEA,MAAM,0BAAI,CAAA,GAAA,sBAAI,EAAE,MAAM,CAAC,CAAA,GAAA,qEAAI;AAEpB,SAAS,0CAAoB,KAAK;IACvC,OAAO,wBAAE,qBAAqB,MAAM,QAAQ;AAC9C;AAEO,SAAS,0CAAgB,KAAK;IACnC,OAAO,wBAAE,oBAAoB,MAAM,QAAQ;AAC7C","sources":["packages/data-sheet/src/components/actions.ts"],"sourcesContent":["import hyper from \"@macrostrat/hyper\";\nimport style from \"./actions.module.sass\";\nconst h = hyper.styled(style);\n\nexport function DataSheetActionsRow(props) {\n return h(\"div.table-actions\", props.children);\n}\n\nexport function DataSheetAction(props) {\n return h(\"div.table-action\", props.children);\n}\n"],"names":[],"version":3,"file":"data-sheet.a3eb6088.js.map"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
.h0RamW_lithology {
|
|
2
|
-
border-radius: .5em;
|
|
3
|
-
padding: 0 .5em;
|
|
4
|
-
font-weight: bold;
|
|
5
|
-
display: inline-block;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.h0RamW_inline-lithology .h0RamW_lithology {
|
|
9
|
-
line-height: 1em;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.h0RamW_basis-panel .bp5-tag {
|
|
13
|
-
margin: 0 .5em .5em 0;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.h0RamW_basis-panel td {
|
|
17
|
-
vertical-align: top;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.h0RamW_basis-panel th {
|
|
21
|
-
text-align: left;
|
|
22
|
-
color: var(--secondary-color);
|
|
23
|
-
font-size: .9em;
|
|
24
|
-
font-style: italic;
|
|
25
|
-
font-weight: 400;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.h0RamW_basis-panel, .h0RamW_long-text {
|
|
29
|
-
pointer-events: all;
|
|
30
|
-
max-width: 20em;
|
|
31
|
-
max-height: 30em;
|
|
32
|
-
padding: 8px;
|
|
33
|
-
overflow-y: scroll;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.h0RamW_description {
|
|
37
|
-
font-style: italic;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.h0RamW_tag-header {
|
|
41
|
-
text-transform: small-caps;
|
|
42
|
-
color: var(--secondary-color);
|
|
43
|
-
font-size: .8em;
|
|
44
|
-
font-weight: bold;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.h0RamW_basis-col {
|
|
48
|
-
max-width: 15em;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.h0RamW_liths > * {
|
|
52
|
-
margin-right: .5em;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.h0RamW_data-sheet-outer {
|
|
56
|
-
flex: 1;
|
|
57
|
-
min-height: 0;
|
|
58
|
-
display: flex;
|
|
59
|
-
position: relative;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.h0RamW_tag-cell-content {
|
|
63
|
-
line-height: 1;
|
|
64
|
-
}
|
|
65
|
-
/*# sourceMappingURL=data-sheet.b3ccc91b.css.map */
|