@arcgis/coding-components
Version:
Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.
88 lines (87 loc) • 1.71 kB
JavaScript
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
v4.33.14 */
function t(e) {
switch (e.type) {
case "oid":
return "key";
case "small-integer":
case "big-integer":
case "integer":
case "single":
case "double":
case "long":
return "number";
case "global-id":
case "guid":
return "key";
case "string":
return "string";
case "date":
return "date-time";
case "date-only":
return "calendar";
case "time-only":
return "clock";
case "timestamp-offset":
return "time-zone";
default:
return "cube";
}
}
function s(e) {
switch (e.type) {
case "small-integer":
case "integer":
case "big-integer":
case "single":
case "double":
case "long":
case "oid":
return "number";
case "global-id":
case "guid":
case "string":
return "text";
case "date":
return "date";
case "date-only":
return "dateOnly";
case "time-only":
return "time";
default:
return "text";
}
}
function n(e) {
return (e ?? []).filter((a) => {
switch (a.type) {
case "string":
case "small-integer":
case "integer":
case "big-integer":
case "single":
case "double":
case "long":
case "date":
case "date-only":
case "time-only":
case "timestamp-offset":
case "oid":
case "guid":
case "global-id":
return !0;
default:
return !1;
}
});
}
function r(e) {
return e.alias || e.name;
}
export {
r as a,
s as b,
t as f,
n as s
};