Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

Abilities (#14)

Brad Barbinc22c9d62c9be
diff --git a/README.md b/README.md
index e215e2963d..5823fd62c0 100644
--- a/README.md
+++ b/README.md
@@ -37,7 +37,7 @@ The monorepo follows the Turborepo covention of grouping packages into one of tw
| Package Name | Description |
| ---------------------- | ----------------------------------------------------------------------- |
| `eslint-config-carbon` | Shared, extendable eslint configuration for apps and packages |
-| `@carbon/database` | Database migrations and types |
+| `@carbon/database` | Database schema, migrations and types |
| `@carbon/jest` | Jest preset configuration shared across apps and packages |
| `@carbon/logger` | Shared logger used across apps |
| `@carbon/react` | Shared web-based UI components |
@@ -60,7 +60,17 @@ The monorepo follows the Turborepo covention of grouping packages into one of tw
Make sure that you have [Docker installed](https://docs.docker.com/desktop/install/mac-install/) and [yarn installed](https://yarnpkg.com/lang/en/docs/install/#debian-stable)
on your system since this monorepo uses the yarn package manager.
-Then download and initialize the repository dependencies.
+After running the steps below you should be able to access the following apps/containers locally:
+
+| Application | URL |
+| --------------- | ------------------------------------------------------------------------------------------------------------------ |
+| Carbon ERP | [http://localhost:3000](http://localhost:3000) |
+| Postgres | [postgresql://postgres:postgres@localhost:54322/postgres](postgresql://postgres:postgres@localhost:54322/postgres) |
+| Supabase Studio | [http://localhost:54323/project/default](http://localhost:54323/project/default) |
+| Inbucket | [http://localhost:54324/monitor](http://localhost:54324/monitor) |
+| Redis | [redis://localhost:6379](redis://localhost:6379) |
+
+First download and initialize the repository dependencies.
```bash
$ yarn # install dependencies
diff --git a/SCHEMA.md b/SCHEMA.md
new file mode 100644
index 0000000000..495551ea32
--- /dev/null
+++ b/SCHEMA.md
@@ -0,0 +1,2080 @@
+# Carbon Database Schema
+
+This file is generated by `scripts/generate-schema-md.ts` using the migrations in `packages/carbon-database/supabase/migrations`.
+
+
+
+## `xid`
+
+```sql
+-- xid is a globally unique id generator functions.
+-- they are 20 characters long and ordered
+-- https://github.com/modfin/pg-xid
+
+CREATE DOMAIN public.xid AS CHAR(20) CHECK (VALUE ~ '^[a-v0-9]{20}$');
+
+CREATE SEQUENCE IF NOT EXISTS public.xid_serial MINVALUE 0 MAXVALUE 16777215 CYCLE; -- ((255<<16) + (255<<8) + 255))
+
+SELECT setval('xid_serial', (random() * 16777215)::INT); -- ((255<<16) + (255<<8) + 255))
+
+CREATE OR REPLACE FUNCTION public._xid_machine_id()
+ RETURNS INT
+ LANGUAGE plpgsql
+ IMMUTABLE
+AS
+$$
+DECLARE
+BEGIN
+ RETURN (SELECT system_identifier & 16777215 FROM pg_control_system());
+END
+$$;
+
+CREATE OR REPLACE FUNCTION public.xid_encode(_id int[])
+ RETURNS public.xid
+ LANGUAGE plpgsql
+AS
+$$
+DECLARE
+ _encoding CHAR(1)[] = '{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v}';
+BEGIN
+ RETURN _encoding[1 + (_id[1] >> 3)]
+ || _encoding[1 + ((_id[2] >> 6) & 31 | (_id[1] << 2) & 31)]
+ || _encoding[1 + ((_id[2] >> 1) & 31)]
+ || _encoding[1 + ((_id[3] >> 4) & 31 | (_id[2] << 4) & 31)]
+ || _encoding[1 + (_id[4] >> 7 | (_id[3] << 1) & 31)]
+ || _encoding[1 + ((_id[4] >> 2) & 31)]
+ || _encoding[1 + (_id[5] >> 5 | (_id[4] << 3) & 31)]
+ || _encoding[1 + (_id[5] & 31)]
+ || _encoding[1 + (_id[6] >> 3)]
+ || _encoding[1 + ((_id[7] >> 6) & 31 | (_id[6] << 2) & 31)]
+ || _encoding[1 + ((_id[7] >> 1) & 31)]
+ || _encoding[1 + ((_id[8] >> 4) & 31 | (_id[7] << 4) & 31)]
+ || _encoding[1 + (_id[9] >> 7 | (_id[8] << 1) & 31)]
+ || _encoding[1 + ((_id[9] >> 2) & 31)]
+ || _encoding[1 + ((_id[10] >> 5) | (_id[9] << 3) & 31)]
+ || _encoding[1 + (_id[10] & 31)]
+ || _encoding[1 + (_id[11] >> 3)]
+ || _encoding[1 + ((_id[12] >> 6) & 31 | (_id[11] << 2) & 31)]
+ || _encoding[1 + ((_id[12] >> 1) & 31)]
+ || _encoding[1 + ((_id[12] << 4) & 31)];
+END;
+$$;
+
+CREATE OR REPLACE FUNCTION public.xid_decode(_xid public.xid)
+ RETURNS int[]
+ LANGUAGE plpgsql
+AS
+$$
+DECLARE
+ _dec int[] = '{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}';
+ _b bytea;
+BEGIN
+ _b := _xid::BYTEA;
+ return ARRAY [
+ ((_dec[get_byte(_b, 0)] << 3) | (_dec[get_byte(_b, 1)] >> 2)) & 255,
+ ((_dec[get_byte(_b, 1)] << 6) | (_dec[get_byte(_b, 2)] << 1) | (_dec[get_byte(_b, 3)] >> 4)) & 255,
+ ((_dec[get_byte(_b, 3)] << 4) | (_dec[get_byte(_b, 4)] >> 1)) & 255,
+ ((_dec[get_byte(_b, 4)] << 7) | (_dec[get_byte(_b, 5)] << 2) | (_dec[get_byte(_b, 6)] >> 3)) & 255,
+ ((_dec[get_byte(_b, 6)] << 5) | (_dec[get_byte(_b, 7)])) & 255,
+ ((_dec[get_byte(_b, 8)] << 3) | (_dec[get_byte(_b, 9)] >> 2)) & 255,
+ ((_dec[get_byte(_b, 9)] << 6) | (_dec[get_byte(_b, 10)] << 1) | (_dec[get_byte(_b, 11)] >> 4)) & 255,
+ ((_dec[get_byte(_b, 11)] << 4) | (_dec[get_byte(_b, 12)] >> 1)) & 255,
+ ((_dec[get_byte(_b, 12)] << 7) | (_dec[get_byte(_b, 13)] << 2) | (_dec[get_byte(_b, 14)] >> 3)) & 255,
+ ((_dec[get_byte(_b, 14)] << 5) | (_dec[get_byte(_b, 15)])) & 255,
+ ((_dec[get_byte(_b, 16)] << 3) | (_dec[get_byte(_b, 17)] >> 2)) & 255,
+ ((_dec[get_byte(_b, 17)] << 6) | (_dec[get_byte(_b, 18)] << 1) | (_dec[get_byte(_b, 19)] >> 4)) & 255
+ ];
+END;
+$$;
+
+CREATE OR REPLACE FUNCTION xid(_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP)
+ RETURNS public.xid
+ LANGUAGE plpgsql
+AS
+$$
+DECLARE
+ _t INT;
+ _m INT;
+ _p INT;
+ _c INT;
+BEGIN
+ _t := floor(EXTRACT(epoch FROM _at));
+ _m := _xid_machine_id();
+ _p := pg_backend_pid();
+ _c := nextval('xid_serial')::INT;
+
+ return public.xid_encode(ARRAY [
+ (_t >> 24) & 255, (_t >> 16) & 255, (_t >> 8) & 255 , _t & 255,
+ (_m >> 16) & 255, (_m >> 8) & 255 , _m & 255,
+ (_p >> 8) & 255, _p & 255,
+ (_c >> 16) & 255, (_c >> 8) & 255 , _c & 255
+ ]);
+END;
+$$;
+
+CREATE OR REPLACE FUNCTION public.xid_time(_xid public.xid)
+ RETURNS TIMESTAMPTZ
+ LANGUAGE plpgsql
+AS
+$$
+DECLARE
+ _id int[];
+BEGIN
+ _id := public.xid_decode(_xid);
+ return to_timestamp((_id[1] << 24)::BIGINT + (_id[2] << 16) + (_id[3] << 8) + (_id[4]));
+END;
+$$;
+
+CREATE OR REPLACE FUNCTION public.xid_machine(_xid public.xid)
+ RETURNS INT[]
+ LANGUAGE plpgsql
+AS
+$$
+DECLARE
+ _id int[];
+BEGIN
+ _id := public.xid_decode(_xid);
+ return ARRAY [_id[5], _id[6], _id[7]];
+END;
+$$;
+
+CREATE OR REPLACE FUNCTION public.xid_pid(_xid public.xid)
+ RETURNS INT
+ LANGUAGE plpgsql
+AS
+$$
+DECLARE
+ _id int[];
+BEGIN
+ _id := public.xid_decode(_xid);
+ return (_id[8] << 8) + (_id[9]);
+END;
+$$;
+
+CREATE OR REPLACE FUNCTION public.xid_counter(_xid public.xid)
+ RETURNS INT
+ LANGUAGE plpgsql
+AS
+$$
+DECLARE
+ _id int[];
+BEGIN
+ _id := public.xid_decode(_xid);
+ return (_id[10] << 16) + (_id[11] << 8) + (_id[12]);
+END;
+$$;
+```
+
+
+
+## `claims`
+
+```sql
+CREATE OR REPLACE FUNCTION is_claims_admin() RETURNS "bool"
+ LANGUAGE "plpgsql"
+ AS $$
+ BEGIN
+ IF session_user = 'authenticator' THEN
+ --------------------------------------------
+ -- To disallow any authenticated app users
+ -- from editing claims, delete the following
+ -- block of code and replace it with:
+ -- RETURN FALSE;
+ --------------------------------------------
+ IF extract(epoch from now()) > coalesce((current_setting('request.jwt.claims', true)::jsonb)->>'exp', '0')::numeric THEN
+ return false; -- jwt expired
+ END IF;
+ IF coalesce((current_setting('request.jwt.claims', true)::jsonb)->'app_metadata'->'users_update', 'false')::bool THEN
+ return true; -- user has user_update set to true
+ ELSE
+ return false; -- user does NOT have user_update set to true
+ END IF;
+ --------------------------------------------
+ -- End of block
+ --------------------------------------------
+ ELSE -- not a user session, probably being called from a trigger or something
+ return true;
+ END IF;
+ END;
+$$;
+
+CREATE OR REPLACE FUNCTION get_my_claims() RETURNS "jsonb"
+ LANGUAGE "sql" STABLE
+ AS $$
+ select
+ coalesce(nullif(current_setting('request.jwt.claims', true), '')::jsonb -> 'app_metadata', '{}'::jsonb)::jsonb
+$$;
+CREATE OR REPLACE FUNCTION get_my_claim(claim TEXT) RETURNS "jsonb"
+ LANGUAGE "sql" STABLE
+ AS $$
+ select
+ coalesce(nullif(current_setting('request.jwt.claims', true), '')::jsonb -> 'app_metadata' -> claim, null)
+$$;
+
+CREATE OR REPLACE FUNCTION get_claims(uid uuid) RETURNS "jsonb"
+ LANGUAGE "plpgsql" SECURITY DEFINER SET search_path = public
+ AS $$
+ DECLARE retval jsonb;
+ BEGIN
+ IF NOT is_claims_admin() THEN
+ RETURN '{"error":"access denied"}'::jsonb;
+ ELSE
+ select raw_app_meta_data from auth.users into retval where id = uid::uuid;
+ return retval;
+ END IF;
+ END;
+$$;
+
+CREATE OR REPLACE FUNCTION get_claim(uid uuid, claim text) RETURNS "jsonb"
+ LANGUAGE "plpgsql" SECURITY DEFINER SET search_path = public
+ AS $$
+ DECLARE retval jsonb;
+ BEGIN
+ IF NOT is_claims_admin() THEN
+ RETURN '{"error":"access denied"}'::jsonb;
+ ELSE
+ select coalesce(raw_app_meta_data->claim, null) from auth.users into retval where id = uid::uuid;
+ return retval;
+ END IF;
+ END;
+$$;
+
+CREATE OR REPLACE FUNCTION set_claim(uid uuid, claim text, value jsonb) RETURNS "text"
+ LANGUAGE "plpgsql" SECURITY DEFINER SET search_path = public
+ AS $$
+ BEGIN
+ IF NOT is_claims_admin() THEN
+ RETURN 'error: access denied';
+ ELSE
+ update auth.users set raw_app_meta_data =
+ raw_app_meta_data ||
+ json_build_object(claim, value)::jsonb where id = uid;
+ return 'OK';
+ END IF;
+ END;
+$$;
+
+CREATE OR REPLACE FUNCTION delete_claim(uid uuid, claim text) RETURNS "text"
+ LANGUAGE "plpgsql" SECURITY DEFINER SET search_path = public
+ AS $$
+ BEGIN
+ IF NOT is_claims_admin() THEN
+ RETURN 'error: access denied';
+ ELSE
+ update auth.users set raw_app_meta_data =
+ raw_app_meta_data - claim where id = uid;
+ return 'OK';
+ END IF;
+ END;
+$$;
+NOTIFY pgrst, 'reload schema';
+```
+
+
+
+## `users`
+
+```sql
+CREATE TABLE "user" (
+ "id" TEXT NOT NULL,
+ "email" TEXT NOT NULL,
+ "firstName" TEXT NOT NULL,
+ "lastName" TEXT NOT NULL,
+ "fullName" TEXT GENERATED ALWAYS AS ("firstName" || ' ' || "lastName") STORED,
+ "about" TEXT NOT NULL DEFAULT '',
+ "avatarUrl" TEXT,
+ "active" BOOLEAN DEFAULT TRUE,
+ "emailVerified" TIMESTAMP WITH TIME ZONE,
+ "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
+ "updatedAt" TIMESTAMP WITH TIME ZONE,
+
+ CONSTRAINT "user_pkey" PRIMARY KEY ("id")
+);
+
+CREATE UNIQUE INDEX "index_user_email_key" ON "user"("email");
+CREATE INDEX "index_user_fullName" ON "user"("fullName");
+
+ALTER TABLE "user" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "Claims admin can view/modify users" ON "user" FOR ALL USING (is_claims_admin());
+CREATE POLICY "Users can modify themselves" ON "user" FOR UPDATE WITH CHECK (auth.uid() = id::uuid);
+CREATE POLICY "Anyone that's authenticated can view users" ON "user" FOR SELECT USING (auth.role() = 'authenticated');
+
+```
+
+
+
+## `employee-types`
+
+```sql
+CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
+
+-- CreateTable
+CREATE TABLE "employeeType" (
+ "id" TEXT NOT NULL DEFAULT uuid_generate_v4(),
+ "name" TEXT NOT NULL,
+ "color" TEXT DEFAULT '#000000',
+ "protected" BOOLEAN NOT NULL DEFAULT false,
+ "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
+ "updatedAt" TIMESTAMP WITH TIME ZONE,
+
+ CONSTRAINT "employeeType_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "employeeType_colorCheck" CHECK ("color" is null or "color" ~* '^#[a-f0-9]{6}$')
+);
+
+ALTER TABLE "employeeType" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "Only claims admin can view/modify permissions for employee types" ON "employeeType" FOR ALL USING (is_claims_admin());
+
+
+```
+
+
+
+## `permissions`
+
+```sql
+CREATE TABLE "feature" (
+ "id" TEXT NOT NULL DEFAULT uuid_generate_v4(),
+ "name" TEXT NOT NULL,
+ "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
+ "updatedAt" TIMESTAMP WITH TIME ZONE,
+
+ CONSTRAINT "feature_pkey" PRIMARY KEY ("id")
+);
+
+ALTER TABLE "feature" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "Only claims admin can view/modify modules" ON "feature" FOR ALL USING (is_claims_admin());
+
+CREATE TABLE "employeeTypePermission" (
+ "employeeTypeId" TEXT NOT NULL,
+ "featureId" TEXT NOT NULL,
+ "create" BOOLEAN NOT NULL DEFAULT false,
+ "delete" BOOLEAN NOT NULL DEFAULT false,
+ "update" BOOLEAN NOT NULL DEFAULT false,
+ "view" BOOLEAN NOT NULL DEFAULT false,
+ "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
+ "updatedAt" TIMESTAMP WITH TIME ZONE,
+
+ CONSTRAINT "employeeTypePermission_pkey" PRIMARY KEY ("employeeTypeId", "featureId"),
+ CONSTRAINT "employeeTypePermission_employeeTypeId_fkey" FOREIGN KEY ("employeeTypeId") REFERENCES "employeeType"("id") ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT "employeeTypePermission_featureId_fkey" FOREIGN KEY ("featureId") REFERENCES "feature"("id") ON DELETE CASCADE ON UPDATE CASCADE
+);
+
+ALTER TABLE "employeeTypePermission" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "Only claims admin can view/modify permissions for employee types" ON "employeeTypePermission" FOR ALL USING (is_claims_admin());
+
+
+
+```
+
+
+
+## `employee`
+
+```sql
+CREATE TABLE "employee" (
+ "id" TEXT NOT NULL,
+ "employeeTypeId" TEXT NOT NULL,
+
+ CONSTRAINT "employee_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "employee_employeeTypeId_fkey" FOREIGN KEY ("employeeTypeId") REFERENCES "employeeType"("id") ON DELETE NO ACTION ON UPDATE CASCADE,
+ CONSTRAINT "employee_id_fkey" FOREIGN KEY ("id") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE
+);
+
+ALTER TABLE "employee" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "Only claims admin can view/modify employees" ON "employee" FOR ALL USING (is_claims_admin());
+CREATE POLICY "Anyone that's authenticated can view employees" ON "employee" FOR SELECT USING (auth.role() = 'authenticated');
+
+
+```
+
+
+
+## `buckets`
+
+```sql
+INSERT INTO storage.buckets (id, name, public)
+VALUES
+ ('public', 'public', true),
+ ('avatars', 'avatars', true),
+ ('private', 'private', false);
+
+CREATE POLICY "Anyone can view avatars"
+ON storage.objects FOR SELECT USING (
+ bucket_id = 'avatars'
+);
+
+CREATE POLICY "Users can delete their own avatars"
+ON storage.objects FOR DELETE USING (
+ bucket_id = 'avatars'
+ and (auth.role() = 'authenticated')
+ and storage.filename(name) LIKE concat(auth.uid()::text, '%')
+);
+
+CREATE POLICY "Users can update their own avatars"
+ON storage.objects FOR UPDATE USING (
+ bucket_id = 'avatars'
+ and (auth.role() = 'authenticated')
+ and storage.filename(name) LIKE concat(auth.uid()::text, '%')
+);
+
+CREATE POLICY "Users can insert their own avatars"
+ON storage.objects FOR INSERT WITH CHECK (
+ bucket_id = 'avatars'
+ and (auth.role() = 'authenticated')
+ and storage.filename(name) LIKE concat(auth.uid()::text, '%')
+);
+
+
+```
+
+
+
+## `attributes`
+
+```sql
+
+CREATE TABLE "userAttributeCategory" (
+ "id" TEXT NOT NULL DEFAULT xid(),
+ "name" TEXT NOT NULL,
+ "public" BOOLEAN DEFAULT FALSE,
+ "protected" BOOLEAN DEFAULT FALSE,
+ "active" BOOLEAN DEFAULT TRUE,
+ "createdAt" TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL,
+ "createdBy" TEXT NOT NULL,
+ "updatedAt" TIMESTAMP WITH TIME ZONE,
+ "updatedBy" TEXT,
+
+ CONSTRAINT "userAttributeCategory_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "userAttributeCategory_createdBy_fkey" FOREIGN KEY ("createdBy") REFERENCES "user"("id"),
+ CONSTRAINT "userAttributeCategory_updatedBy_fkey" FOREIGN KEY ("updatedBy") REFERENCES "user"("id")
+);
+
+-- ALTER TABLE "userAttributeCategory" ENABLE ROW LEVEL SECURITY;
+
+CREATE TABLE "attributeDataType" (
+ "id" SERIAL PRIMARY KEY,
+ "label" TEXT NOT NULL,
+ "isBoolean" BOOLEAN NOT NULL DEFAULT FALSE,
+ "isDate" BOOLEAN NOT NULL DEFAULT FALSE,
+ "isList" BOOLEAN NOT NULL DEFAULT FALSE,
+ "isNumeric" BOOLEAN NOT NULL DEFAULT FALSE,
+ "isText" BOOLEAN NOT NULL DEFAULT FALSE,
+ "isUser" BOOLEAN NOT NULL DEFAULT FALSE,
+
+ CONSTRAINT "userAttributeDataType_singleDataType"
+ CHECK (
+ (
+ "isBoolean" = true AND
+ "isDate" = false AND
+ "isList" = false AND
+ "isNumeric" = false AND
+ "isText" = false AND
+ "isUser" = false
+ )
+ OR (
+ "isBoolean" = false AND
+ "isDate" = true AND
+ "isList" = false AND
+ "isNumeric" = false AND
+ "isText" = false AND
+ "isUser" = false
+ )
+ OR (
+ "isBoolean" = false AND
+ "isDate" = false AND
+ "isList" = true AND
+ "isNumeric" = false AND
+ "isText" = false AND
+ "isUser" = false
+ )
+ OR (
+ "isBoolean" = false AND
+ "isDate" = false AND
+ "isList" = false AND
+ "isNumeric" = true AND
+ "isText" = false AND
+ "isUser" = false
+ )
+ OR (
+ "isBoolean" = false AND
+ "isDate" = false AND
+ "isList" = false AND
+ "isNumeric" = false AND
+ "isText" = true AND
+ "isUser" = false
+ )
+ OR (
+ "isBoolean" = false AND
+ "isDate" = false AND
+ "isList" = false AND
+ "isNumeric" = false AND
+ "isText" = false AND
+ "isUser" = true
+ )
+ )
+);
+
+INSERT INTO "attributeDataType" ("label", "isBoolean", "isDate", "isList", "isNumeric", "isText", "isUser")
+VALUES
+ ('Yes/No', true, false, false, false, false, false),
+ ('Date', false, true, false, false, false, false),
+ ('List', false, false, true, false, false, false),
+ ('Numeric', false, false, false, true, false, false),
+ ('Text', false, false, false, false, true, false),
+ ('User', false, false, false, false, false, true);
+
+
+-- ALTER TABLE "attributeDataType" ENABLE ROW LEVEL SECURITY;
+
+CREATE TABLE "userAttribute" (
+ "id" TEXT NOT NULL DEFAULT xid(),
+ "name" TEXT NOT NULL,
+ "sortOrder" INTEGER NOT NULL DEFAULT 1,
+ "userAttributeCategoryId" TEXT NOT NULL,
+ "attributeDataTypeId" INTEGER NOT NULL,
+ "listOptions" TEXT ARRAY,
+ "canSelfManage" BOOLEAN DEFAULT FALSE,
+ "active" BOOLEAN DEFAULT TRUE,
+ "createdAt" TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL,
+ "createdBy" TEXT NOT NULL,
+ "updatedAt" TIMESTAMP WITH TIME ZONE,
+ "updatedBy" TEXT,
+
+ CONSTRAINT "userAttribute_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "userAttribute_userAttributeCategoryId_fkey" FOREIGN KEY ("userAttributeCategoryId") REFERENCES "userAttributeCategory"("id") ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT "userAttribute_attributeDataTypeId_fkey" FOREIGN KEY ("attributeDataTypeId") REFERENCES "attributeDataType"("id") ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT "userAttribute_createdBy_fkey" FOREIGN KEY ("createdBy") REFERENCES "user"("id"),
+ CONSTRAINT "userAttribute_updatedBy_fkey" FOREIGN KEY ("updatedBy") REFERENCES "user"("id")
+
+);
+
+-- ALTER TABLE "userAttribute" ENABLE ROW LEVEL SECURITY;
+
+CREATE TABLE "userAttributeValue" (
+ "id" TEXT NOT NULL DEFAULT xid(),
+ "userAttributeId" TEXT NOT NULL,
+ "userId" TEXT NOT NULL,
+ "valueBoolean" BOOLEAN,
+ "valueDate" DATE,
+ "valueNumeric" NUMERIC,
+ "valueText" TEXT,
+ "valueUser" TEXT,
+ "createdAt" TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
+ "createdBy" TEXT NOT NULL,
+ "updatedAt" TIMESTAMP WITH TIME ZONE,
+ "updatedBy" TEXT,
+
+ CONSTRAINT "userAttributeValue_singleValue"
+ CHECK (
+ (
+ "valueBoolean" IS NOT NULL AND
+ "valueDate" IS NULL AND
+ "valueNumeric" IS NULL AND
+ "valueText" IS NULL AND
+ "valueUser" IS NULL
+ )
+ OR (
+ "valueBoolean" IS NULL AND
+ "valueDate" IS NULL AND
+ "valueNumeric" IS NULL AND
+ "valueText" IS NOT NULL AND
+ "valueUser" IS NULL
+ )
+ OR (
+ "valueBoolean" IS NULL AND
+ "valueDate" IS NOT NULL AND
+ "valueNumeric" IS NULL AND
+ "valueText" IS NULL AND
+ "valueUser" IS NULL
+ )
+ OR (
+ "valueBoolean" IS NULL AND
+ "valueDate" IS NULL AND
+ "valueNumeric" IS NOT NULL AND
+ "valueText" IS NULL AND
+ "valueUser" IS NULL
+ )
+ OR (
+ "valueBoolean" IS NULL AND
+ "valueDate" IS NULL AND
+ "valueNumeric" IS NULL AND
+ "valueText" IS NULL AND
+ "valueUser" IS NOT NULL
+ )
+ ),
+
+ CONSTRAINT "userAttributeValue_userAttributeId_fkey" FOREIGN KEY ("userAttributeId") REFERENCES "userAttribute"("id") ON DELETE CASCADE,
+ CONSTRAINT "userAttributeValue_valueUser_fkey" FOREIGN KEY ("valueUser") REFERENCES "user"("id") ON DELETE CASCADE,
+ CONSTRAINT "userAttributeValue_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE,
+ CONSTRAINT "userAttributeValue_createdBy_fkey" FOREIGN KEY ("createdBy") REFERENCES "user"("id"),
+ CONSTRAINT "userAttributeValue_updatedBy_fkey" FOREIGN KEY ("updatedBy") REFERENCES "user"("id"),
+ CONSTRAINT uq_userAttributeId_userId
+ UNIQUE ( "userAttributeId", "userId")
+);
+
+ALTER TABLE "userAttributeValue" ENABLE ROW LEVEL SECURITY;
+CREATE POLICY "Claims admin can view/modify user attribute values" ON "userAttributeValue" FOR ALL USING (is_claims_admin());
+CREATE POLICY "Users can insert attributes for themselves" ON "userAttributeValue" FOR UPDATE WITH CHECK (auth.uid() = "userId"::uuid);
+CREATE POLICY "Users can modify attributes for themselves" ON "userAttributeValue" FOR UPDATE WITH CHECK (auth.uid() = "userId"::uuid);
+CREATE POLICY "Users can view their own attribtues" ON "userAttributeValue" FOR SELECT USING (auth.uid() = "userId"::uuid);
+CREATE POLICY "Users can view other users attributes if the category is public" ON "userAttributeValue" FOR SELECT
+ USING (
+ auth.role() = 'authenticated' AND
+ "userAttributeValue"."userAttributeId" IN (
+ SELECT "id" FROM "userAttribute" WHERE "userAttributeCategoryId" IN (
+ SELECT "id" FROM "userAttributeCategory" WHERE "public" = true
+ )
+ )
+ );
+
+-- CREATE TABLE employee_personal_data (
+-- "id" TEXT NOT NULL DEFAULT xid(),
+-- bank_account_number TEXT,
+-- bank_routing_number TEXT,
+-- drivers_license_number TEXT,
+-- social_security TEXT,
+-- user_id TEXT NOT NULL,
+-- key_id uuid NOT NULL DEFAULT '7da3ce7e-98f0-4c4f-9b63-b3f783eab919'::uuid,
+-- nonce BYTEA DEFAULT pgsodium.crypto_aead_det_noncegen(),
+
+-- CONSTRAINT "employee_personal_data_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "user"("id") ON DELETE CASCADE
+-- );
+
+-- SECURITY LABEL FOR pgsodium
+-- ON COLUMN employee_personal_data.bank_account
+-- IS 'ENCRYPT WITH KEY COLUMN key_id ASSOCIATED (user_id) NONCE nonce';
+
+-- SECURITY LABEL FOR pgsodium
+-- ON COLUMN employee_personal_data.bank_routing
+-- IS 'ENCRYPT WITH KEY COLUMN key_id ASSOCIATED (user_id) NONCE nonce';
+
+-- SECURITY LABEL FOR pgsodium
+-- ON COLUMN employee_personal_data.drivers_license
+-- IS 'ENCRYPT WITH KEY COLUMN key_id ASSOCIATED (user_id) NONCE nonce';
+
+-- SECURITY LABEL FOR pgsodium
+-- ON COLUMN employee_personal_data.social_security
+-- IS 'ENCRYPT WITH KEY COLUMN key_id ASSOCIATED (user_id) NONCE nonce';
+
+-- ALTER TABLE "employee_personal_data" ENABLE ROW LEVEL SECURITY;
+```
+
+
+
+## `suppliers-and-customers`
+
+```sql
+CREATE TABLE "country" (
+ "id" SERIAL PRIMARY KEY,
+ "name" TEXT NOT NULL,
+ "code" TEXT NOT NULL
+);
+
+CREATE TABLE "contact" (
+ "id" TEXT NOT NULL DEFAULT xid(),
+ "firstName" TEXT NOT NULL,
+ "lastName" TEXT NOT NULL,
+ "email" TEXT NOT NULL,
+ "title" TEXT,
+ "mobilePhone" TEXT,
+ "homePhone" TEXT,
+ "workPhone" TEXT,
+ "fax" TEXT,
+ "addressLine1" TEXT,
+ "addressLine2" TEXT,
+ "city" TEXT,
+ "state" TEXT,
+ "postalCode" TEXT,
+ "countryId" INTEGER,
+ "birthday" DATE,
+ "notes" TEXT,
+
+ CONSTRAINT "contact_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "contact_countryId_fkey" FOREIGN KEY ("countryId") REFERENCES "country"("id") ON DELETE SET NULL ON UPDATE CASCADE
+);
+
+
+CREATE TABLE "address" (
+ "id" TEXT NOT NULL DEFAULT xid(),
+ "addressLine1" TEXT,
+ "addressLine2" TEXT,
+ "city" TEXT,
+ "state" TEXT,
+ "postalCode" TEXT,
+ "countryId" INTEGER,
+ "phone" TEXT,
+ "fax" TEXT,
+
+ CONSTRAINT "address_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "address_countryId_fkey" FOREIGN KEY ("countryId") REFERENCES "country"("id") ON DELETE SET NULL ON UPDATE CASCADE
+);
+
+CREATE TABLE "supplierStatus" (
+ "id" TEXT NOT NULL DEFAULT xid(),
+ "name" TEXT NOT NULL,
+ "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
+ "updatedAt" TIMESTAMP WITH TIME ZONE,
+
+ CONSTRAINT "supplierStatus_pkey" PRIMARY KEY ("id")
+);
+
+INSERT INTO "supplierStatus" ("name") VALUES ('Active'), ('Inactive'), ('Pending'), ('Rejected');
+
+CREATE TABLE "supplierType" (
+ "id" TEXT NOT NULL DEFAULT uuid_generate_v4(),
+ "name" TEXT NOT NULL,
+ "color" TEXT DEFAULT '#000000',
+ "protected" BOOLEAN NOT NULL DEFAULT false,
+ "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
+ "updatedAt" TIMESTAMP WITH TIME ZONE,
+
+ CONSTRAINT "supplierType_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "supplierType_colorCheck" CHECK ("color" is null or "color" ~* '^#[a-f0-9]{6}$')
+);
+
+CREATE TABLE "supplier" (
+ "id" TEXT NOT NULL DEFAULT uuid_generate_v4(),
+ "name" TEXT NOT NULL,
+ "description" TEXT,
+ "supplierTypeId" TEXT,
+ "supplierStatusId" TEXT,
+ "taxId" TEXT,
+ "accountManagerId" TEXT,
+ "logo" TEXT,
+ "createdAt" TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL,
+ "createdBy" TEXT,
+ "updatedAt" TIMESTAMP WITH TIME ZONE,
+ "updatedBy" TEXT,
+
+ CONSTRAINT "supplier_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "supplier_supplierTypeId_fkey" FOREIGN KEY ("supplierTypeId") REFERENCES "supplierType"("id") ON UPDATE CASCADE ON DELETE SET NULL,
+ CONSTRAINT "supplier_supplierStatusId_fkey" FOREIGN KEY ("supplierStatusId") REFERENCES "supplierStatus"("id") ON UPDATE CASCADE ON DELETE SET NULL,
+ CONSTRAINT "supplier_accountManagerId_fkey" FOREIGN KEY ("accountManagerId") REFERENCES "user"("id") ON UPDATE CASCADE ON DELETE SET NULL,
+ CONSTRAINT "supplier_createdBy_fkey" FOREIGN KEY ("createdBy") REFERENCES "user"("id") ON UPDATE CASCADE ON DELETE SET NULL,
+ CONSTRAINT "supplier_updatedBy_fkey" FOREIGN KEY ("updatedBy") REFERENCES "user"("id") ON UPDATE CASCADE ON DELETE SET NULL,
+ CONSTRAINT "supplier_name_unique" UNIQUE ("name")
+);
+
+CREATE TABLE "supplierLocation" (
+ "id" TEXT NOT NULL DEFAULT xid(),
+ "supplierId" TEXT NOT NULL,
+ "addressId" TEXT NOT NULL,
+
+ CONSTRAINT "supplierLocation_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "supplierLocation_supplierId_fkey" FOREIGN KEY ("supplierId") REFERENCES "supplier"("id") ON UPDATE CASCADE ON DELETE CASCADE,
+ CONSTRAINT "supplierLocation_addressId_fkey" FOREIGN KEY ("addressId") REFERENCES "address"("id") ON UPDATE CASCADE ON DELETE CASCADE
+);
+
+CREATE TABLE "supplierContact" (
+ "id" TEXT NOT NULL DEFAULT xid(),
+ "supplierId" TEXT NOT NULL,
+ "contactId" TEXT NOT NULL,
+ "supplierLocationId" TEXT,
+ "userId" TEXT,
+
+ CONSTRAINT "supplierContact_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "supplierContact_supplierId_fkey" FOREIGN KEY ("supplierId") REFERENCES "supplier"("id") ON UPDATE CASCADE ON DELETE CASCADE,
+ CONSTRAINT "supplierContact_contactId_fkey" FOREIGN KEY ("contactId") REFERENCES "contact"("id") ON UPDATE CASCADE ON DELETE CASCADE,
+ CONSTRAINT "supplierContact_supplierLocationId_fkey" FOREIGN KEY ("supplierLocationId") REFERENCES "supplierLocation"("id") ON UPDATE CASCADE ON DELETE SET NULL,
+ CONSTRAINT "supplierContact_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user"("id") ON UPDATE CASCADE ON DELETE SET NULL
+);
+
+CREATE TABLE "supplierAccount" (
+ "id" TEXT NOT NULL,
+ "supplierId" TEXT NOT NULL,
+
+ CONSTRAINT "supplierAccount_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "supplierAccount_supplierId_fkey" FOREIGN KEY ("supplierId") REFERENCES "supplier"("id") ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT "supplierAccount_id_fkey" FOREIGN KEY ("id") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE
+);
+
+CREATE TABLE "customerStatus" (
+ "id" TEXT NOT NULL DEFAULT xid(),
+ "name" TEXT NOT NULL,
+ "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
+ "updatedAt" TIMESTAMP WITH TIME ZONE,
+
+ CONSTRAINT "customerStatus_pkey" PRIMARY KEY ("id")
+);
+
+INSERT INTO "customerStatus" ("name") VALUES ('Active'), ('Inactive'), ('Prospect'), ('Lead'), ('On Hold'), ('Cancelled'), ('Archived');
+
+CREATE TABLE "customerType" (
+ "id" TEXT NOT NULL DEFAULT uuid_generate_v4(),
+ "name" TEXT NOT NULL,
+ "color" TEXT DEFAULT '#000000',
+ "protected" BOOLEAN NOT NULL DEFAULT false,
+ "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
+ "updatedAt" TIMESTAMP WITH TIME ZONE,
+
+ CONSTRAINT "customerType_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "customerType_colorCheck" CHECK ("color" is null or "color" ~* '^#[a-f0-9]{6}$')
+);
+
+CREATE TABLE "customer" (
+ "id" TEXT NOT NULL DEFAULT uuid_generate_v4(),
+ "name" TEXT NOT NULL,
+ "description" TEXT,
+ "customerTypeId" TEXT,
+ "customerStatusId" TEXT,
+ "taxId" TEXT,
+ "accountManagerId" TEXT,
+ "logo" TEXT,
+ "createdAt" TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL,
+ "createdBy" TEXT,
+ "updatedAt" TIMESTAMP WITH TIME ZONE,
+ "updatedBy" TEXT,
+
+ CONSTRAINT "customer_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "customer_customerTypeId_fkey" FOREIGN KEY ("customerTypeId") REFERENCES "customerType"("id") ON UPDATE CASCADE ON DELETE SET NULL,
+ CONSTRAINT "customer_customerStatusId_fkey" FOREIGN KEY ("customerStatusId") REFERENCES "customerStatus"("id") ON UPDATE CASCADE ON DELETE SET NULL,
+ CONSTRAINT "customer_accountManagerId_fkey" FOREIGN KEY ("accountManagerId") REFERENCES "user"("id") ON UPDATE CASCADE ON DELETE SET NULL,
+ CONSTRAINT "customer_createdBy_fkey" FOREIGN KEY ("createdBy") REFERENCES "user"("id") ON UPDATE CASCADE ON DELETE SET NULL,
+ CONSTRAINT "customer_updatedBy_fkey" FOREIGN KEY ("updatedBy") REFERENCES "user"("id") ON UPDATE CASCADE ON DELETE SET NULL,
+ CONSTRAINT "customer_name_unique" UNIQUE ("name")
+);
+
+CREATE TABLE "customerLocation" (
+ "id" TEXT NOT NULL DEFAULT xid(),
+ "customerId" TEXT NOT NULL,
+ "addressId" TEXT NOT NULL,
+
+ CONSTRAINT "customerLocation_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "customerLocation_customerId_fkey" FOREIGN KEY ("customerId") REFERENCES "customer"("id") ON UPDATE CASCADE ON DELETE CASCADE,
+ CONSTRAINT "customerLocation_addressId_fkey" FOREIGN KEY ("addressId") REFERENCES "address"("id") ON UPDATE CASCADE ON DELETE CASCADE
+);
+
+CREATE TABLE "customerContact" (
+ "id" TEXT NOT NULL DEFAULT xid(),
+ "customerId" TEXT NOT NULL,
+ "contactId" TEXT NOT NULL,
+ "customerLocationId" TEXT,
+ "userId" TEXT,
+
+ CONSTRAINT "customerContact_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "customerContact_customerId_fkey" FOREIGN KEY ("customerId") REFERENCES "customer"("id") ON UPDATE CASCADE ON DELETE CASCADE,
+ CONSTRAINT "customerContact_contactId_fkey" FOREIGN KEY ("contactId") REFERENCES "contact"("id") ON UPDATE CASCADE ON DELETE CASCADE,
+ CONSTRAINT "customerContact_customerLocationId_fkey" FOREIGN KEY ("customerLocationId") REFERENCES "customerLocation"("id") ON UPDATE CASCADE ON DELETE SET NULL,
+ CONSTRAINT "customerContact_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user"("id") ON UPDATE CASCADE ON DELETE SET NULL
+);
+
+CREATE TABLE "customerAccount" (
+ "id" TEXT NOT NULL,
+ "customerId" TEXT NOT NULL,
+
+ CONSTRAINT "customerAccount_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "customerAccount_customerId_fkey" FOREIGN KEY ("customerId") REFERENCES "customer"("id") ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT "customerAccount_id_fkey" FOREIGN KEY ("id") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE
+);
+
+```
+
+
+
+## `groups`
+
+```sql
+CREATE TABLE "group" (
+ "id" TEXT NOT NULL DEFAULT uuid_generate_v4(),
+ "name" TEXT NOT NULL,
+ "isIdentityGroup" BOOLEAN NOT NULL DEFAULT false,
+ "isEmployeeTypeGroup" BOOLEAN NOT NULL DEFAULT false,
+ "isCustomerOrgGroup" BOOLEAN NOT NULL DEFAULT false,
+ "isCustomerTypeGroup" BOOLEAN NOT NULL DEFAULT false,
+ "isSupplierTypeGroup" BOOLEAN NOT NULL DEFAULT false,
+ "isSupplierOrgGroup" BOOLEAN NOT NULL DEFAULT false,
+ "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
+ "updatedAt" TIMESTAMP WITH TIME ZONE,
+
+ CONSTRAINT "group_pkey" PRIMARY KEY ("id")
+);
+
+CREATE TABLE "membership" (
+ "id" SERIAL NOT NULL,
+ "groupId" TEXT NOT NULL,
+ "memberGroupId" TEXT,
+ "memberUserId" TEXT,
+
+ CONSTRAINT "membership_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "membership_groupId_fkey" FOREIGN KEY ("groupId") REFERENCES "group"("id") ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT "membership_memberGroupId_fkey" FOREIGN KEY ("memberGroupId") REFERENCES "group"("id") ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT "membership_memberUserId_fkey" FOREIGN KEY ("memberUserId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE,
+
+ CONSTRAINT uq_membership
+ UNIQUE ( "groupId", "memberGroupId", "memberUserId" ),
+
+ CONSTRAINT membership_hasPersonOrGroup
+ CHECK (
+ ("memberGroupId" IS NULL AND "memberUserId" IS NOT NULL)
+ OR
+ ("memberGroupId" IS NOT NULL AND "memberUserId" IS NULL)
+ )
+);
+
+CREATE INDEX index_membership_groupId ON "membership" ("groupId");
+CREATE INDEX index_membership_memberGroupId ON "membership" ("memberGroupId");
+CREATE INDEX index_membership_memberUserId ON "membership" ("memberUserId");
+
+CREATE FUNCTION public.create_employee_type_group()
+RETURNS TRIGGER AS $$
+BEGIN
+ INSERT INTO public."group" ("id", "name", "isEmployeeTypeGroup")
+ VALUES (new.id, new.name, TRUE);
+
+ INSERT INTO public."membership"("groupId", "memberGroupId")
+ VALUES ('00000000-0000-0000-0000-000000000000', new.id);
+ RETURN new;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
+
+CREATE FUNCTION public.update_employee_type_group()
+RETURNS TRIGGER AS $$
+BEGIN
+ UPDATE public."group" SET "name" = new.name
+ WHERE "id" = new.id AND "isEmployeeTypeGroup" = TRUE;
+ RETURN new;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
+
+CREATE FUNCTION public.create_user_identity_group()
+RETURNS TRIGGER AS $$
+BEGIN
+ INSERT INTO public."group" ("id", "name", "isIdentityGroup")
+ VALUES (new.id, new."fullName", TRUE);
+
+ INSERT INTO public."membership"("groupId", "memberUserId")
+ VALUES (new.id, new.id);
+ RETURN new;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
+
+CREATE FUNCTION public.update_user_identity_group()
+RETURNS TRIGGER AS $$
+BEGIN
+ update public."group" set "name" = new."fullName"
+ where "id" = new.id and "isIdentityGroup" = TRUE;
+
+ RETURN new;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
+
+
+CREATE FUNCTION public.add_employee_to_employee_type_group()
+RETURNS TRIGGER AS $$
+BEGIN
+ INSERT INTO public."membership" ("groupId", "memberUserId")
+ VALUES (new."employeeTypeId", new.id);
+
+ RETURN new;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
+
+CREATE FUNCTION public.update_employee_to_employee_type_group()
+RETURNS TRIGGER AS $$
+BEGIN
+ UPDATE public."membership" SET "groupId" = new."employeeTypeId"
+ WHERE "groupId" = old."employeeTypeId" AND "memberUserId" = new.id;
+
+ RETURN new;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
+
+CREATE TRIGGER create_employee_type_group
+ AFTER INSERT on public."employeeType"
+ FOR EACH ROW EXECUTE PROCEDURE public.create_employee_type_group();
+
+CREATE TRIGGER create_user_identity_group
+ AFTER INSERT on public.user
+ FOR EACH ROW EXECUTE PROCEDURE public.create_user_identity_group();
+
+CREATE TRIGGER add_employee_to_employee_type_group
+ AFTER INSERT on public.employee
+ FOR EACH ROW EXECUTE PROCEDURE public.add_employee_to_employee_type_group();
+
+CREATE TRIGGER update_user_identity_group
+ AFTER UPDATE on public.user
+ FOR EACH ROW EXECUTE PROCEDURE public.update_user_identity_group();
+
+CREATE TRIGGER update_employee_to_employee_type_group
+ AFTER UPDATE on public.employee
+ FOR EACH ROW EXECUTE PROCEDURE public.update_employee_to_employee_type_group();
+
+CREATE TRIGGER update_employee_type_group
+ AFTER UPDATE on public."employeeType"
+ FOR EACH ROW EXECUTE PROCEDURE public.update_employee_type_group();
+
+CREATE VIEW "group_member" AS
+ SELECT
+ gm.id,
+ g.name,
+ g."isIdentityGroup",
+ g."isEmployeeTypeGroup",
+ g."isCustomerOrgGroup",
+ g."isCustomerTypeGroup",
+ g."isSupplierOrgGroup",
+ g."isSupplierTypeGroup",
+ gm."groupId",
+ gm."memberGroupId",
+ gm."memberUserId",
+ to_jsonb(u) as user
+ FROM
+ "membership" gm
+ INNER JOIN "group" g ON g.id = gm."groupId"
+ LEFT OUTER JOIN (
+ SELECT * FROM "user" WHERE active = TRUE
+ ) u ON u.id = gm."memberUserId";
+
+
+CREATE RECURSIVE VIEW groups_recursive
+(
+ "groupId",
+ "name",
+ "parentId",
+ "isIdentityGroup",
+ "isEmployeeTypeGroup",
+ "isCustomerOrgGroup",
+ "isCustomerTypeGroup",
+ "isSupplierOrgGroup",
+ "isSupplierTypeGroup",
+ "user"
+) AS
+ SELECT
+ "groupId",
+ "name",
+ NULL AS "parentId",
+ "isIdentityGroup",
+ "isEmployeeTypeGroup",
+ "isCustomerOrgGroup",
+ "isCustomerTypeGroup",
+ "isSupplierOrgGroup",
+ "isSupplierTypeGroup",
+ "user"
+ FROM group_member
+ UNION ALL
+ SELECT
+ g2."groupId",
+ g2.name,
+ g1."groupId" AS "parentId",
+ g1."isIdentityGroup",
+ g2."isEmployeeTypeGroup",
+ g2."isCustomerOrgGroup",
+ g2."isCustomerTypeGroup",
+ g2."isSupplierOrgGroup",
+ g2."isSupplierTypeGroup",
+ g2."user"
+ FROM group_member g1
+ INNER JOIN group_member g2 ON g1."memberGroupId" = g2."groupId";
+
+CREATE VIEW groups_view AS
+ SELECT
+ "groupId" as "id",
+ "isEmployeeTypeGroup",
+ "isCustomerOrgGroup",
+ "isCustomerTypeGroup",
+ "isSupplierOrgGroup",
+ "isSupplierTypeGroup",
+ "name",
+ "parentId",
+ coalesce(jsonb_agg("user") filter (where "user" is not null), '[]') as users
+ FROM groups_recursive
+ WHERE "isIdentityGroup" = false
+ GROUP BY
+ "groupId",
+ "name",
+ "parentId",
+ "isEmployeeTypeGroup",
+ "isCustomerOrgGroup",
+ "isCustomerTypeGroup",
+ "isSupplierOrgGroup",
+ "isSupplierTypeGroup"
+ ORDER BY "isEmployeeTypeGroup" DESC, "isCustomerTypeGroup" DESC, "isSupplierTypeGroup" DESC, "name" ASC;
+
+
+CREATE OR REPLACE FUNCTION groups_query(
+ _name TEXT DEFAULT '',
+ _uid TEXT DEFAULT NULL
+)
+RETURNS TABLE (
+ "id" TEXT,
+ "name" TEXT,
+ "parentId" TEXT,
+ "isEmployeeTypeGroup" BOOLEAN,
+ "isCustomerOrgGroup" BOOLEAN,
+ "isCustomerTypeGroup" BOOLEAN,
+ "isSupplierOrgGroup" BOOLEAN,
+ "isSupplierTypeGroup" BOOLEAN,
+ "users" JSONB
+) LANGUAGE "plpgsql" SECURITY INVOKER SET search_path = public
+AS $$
+ BEGIN
+ RETURN QUERY
+ WITH group_ids AS (
+ SELECT g."id"
+ FROM "group" g
+ WHERE g."isIdentityGroup" = false
+ AND g."name" ILIKE '%' || _name || '%'
+ )
+ SELECT
+ g."id",
+ g."name",
+ g."parentId",
+ g."isEmployeeTypeGroup",
+ g."isCustomerOrgGroup",
+ g."isCustomerTypeGroup",
+ g."isSupplierOrgGroup",
+ g."isSupplierTypeGroup",
+ g."users"
+ FROM groups_view g
+ WHERE g."id" IN (SELECT * FROM group_ids)
+ OR g."parentId" IN (SELECT * FROM group_ids);
+ END;
+$$;
+
+CREATE OR REPLACE FUNCTION groups_for_user(uid text) RETURNS "jsonb" -- TODO: return setof string
+ LANGUAGE "plpgsql" SECURITY DEFINER SET search_path = public
+ AS $$
+ DECLARE retval jsonb;
+ BEGIN
+ WITH RECURSIVE "groupsForUser" AS (
+ SELECT "groupId", "memberGroupId", "memberUserId" FROM "membership"
+ WHERE "memberUserId" = uid::text
+ UNION
+ SELECT g1."groupId", g1."memberGroupId", g1."memberUserId" FROM "membership" g1
+ INNER JOIN "groupsForUser" g2 ON g2."groupId" = g1."memberGroupId"
+ ) SELECT coalesce(jsonb_agg("groupId"), '[]') INTO retval AS groups FROM "groupsForUser";
+ RETURN retval;
+ END;
+$$;
+
+CREATE OR REPLACE FUNCTION users_for_groups(groups text[]) RETURNS "jsonb"
+ LANGUAGE "plpgsql" SECURITY DEFINER SET search_path = public
+ AS $$
+ DECLARE retval jsonb;
+ BEGIN
+ WITH RECURSIVE "usersForGroups" AS (
+ SELECT "groupId", "memberGroupId", "memberUserId" FROM "membership"
+ WHERE "groupId" = ANY(groups)
+ UNION
+ SELECT g1."groupId", g1."memberGroupId", g1."memberUserId" FROM "membership" g1
+ INNER JOIN "usersForGroups" g2 ON g2."memberGroupId" = g1."groupId"
+ ) SELECT coalesce(jsonb_agg("memberUserId"), '[]') AS groups INTO retval FROM "usersForGroups" WHERE "memberUserId" IS NOT NULL;
+ RETURN retval;
+ END;
+$$;
+
+CREATE FUNCTION public.create_customer_type_group()
+RETURNS TRIGGER AS $$
+BEGIN
+ INSERT INTO public."group" ("id", "name", "isCustomerTypeGroup")
+ VALUES (new.id, new.name, TRUE);
+
+ INSERT INTO public."membership"("groupId", "memberGroupId")
+ VALUES ('11111111-1111-1111-1111-111111111111', new.id);
+ RETURN new;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
+
+CREATE FUNCTION public.create_supplier_type_group()
+RETURNS TRIGGER AS $$
+BEGIN
+ INSERT INTO public."group" ("id", "name", "isSupplierTypeGroup")
+ VALUES (new.id, new.name, TRUE);
+
+ INSERT INTO public."membership"("groupId", "memberGroupId")
+ VALUES ('22222222-2222-2222-2222-222222222222', new.id);
+
+ RETURN new;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
+
+CREATE FUNCTION public.create_customer_org_group()
+RETURNS TRIGGER AS $$
+BEGIN
+ INSERT INTO public."group" ("id", "name", "isCustomerOrgGroup")
+ VALUES (new.id, new.name, TRUE);
+
+ IF new."customerTypeId" IS NOT NULL THEN
+ INSERT INTO public."membership"("groupId", "memberGroupId")
+ VALUES (new."customerTypeId", new.id);
+ END IF;
+
+ RETURN new;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
+
+CREATE FUNCTION public.create_supplier_org_group()
+RETURNS TRIGGER AS $$
+BEGIN
+ INSERT INTO public."group" ("id", "name", "isSupplierOrgGroup")
+ VALUES (new.id, new.name, TRUE);
+
+ IF new."supplierTypeId" IS NOT NULL THEN
+ INSERT INTO public."membership"("groupId", "memberGroupId")
+ VALUES (new."supplierTypeId", new.id);
+ END IF;
+
+ RETURN new;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
+
+CREATE FUNCTION public.add_customer_account_to_customer_group()
+RETURNS TRIGGER AS $$
+BEGIN
+ INSERT INTO public."membership" ("groupId", "memberUserId")
+ VALUES (new."customerId", new.id);
+ RETURN new;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
+
+CREATE FUNCTION public.add_supplier_account_to_supplier_group()
+RETURNS TRIGGER AS $$
+BEGIN
+ INSERT INTO public."membership" ("groupId", "memberUserId")
+ VALUES (new."supplierId", new.id);
+ RETURN new;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
+
+CREATE FUNCTION public.update_customer_type_group()
+RETURNS TRIGGER AS $$
+BEGIN
+ UPDATE public."group" SET "name" = new.name
+ WHERE "id" = new.id AND "isCustomerTypeGroup" = TRUE;
+ RETURN new;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
+
+CREATE FUNCTION public.update_supplier_type_group()
+RETURNS TRIGGER AS $$
+BEGIN
+ UPDATE public."group" SET "name" = new.name
+ WHERE "id" = new.id AND "isSupplierTypeGroup" = TRUE;
+ RETURN new;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
+
+CREATE FUNCTION public.update_customer_to_customer_type_group()
+RETURNS TRIGGER AS $$
+BEGIN
+ IF old."customerTypeId" IS NOT NULL THEN
+ IF new."customerTypeId" IS NOT NULL THEN
+ UPDATE public."membership" SET "groupId" = new."customerTypeId"
+ WHERE "groupId" = old."customerTypeId" AND "memberGroupId" = new.id;
+ ELSE
+ DELETE FROM public."membership" WHERE "groupId" = old."customerTypeId" AND "memberGroupId" = new.id;
+ END IF;
+ ELSE
+ IF new."customerTypeId" IS NOT NULL THEN
+ INSERT INTO public."membership" ("groupId", "memberGroupId")
+ VALUES (new."customerTypeId", new.id);
+ END IF;
+ END IF;
+
+ UPDATE public."group" SET "name" = new.name
+ WHERE "id" = new.id AND "isCustomerOrgGroup" = TRUE;
+ RETURN new;
+
+ RETURN new;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
+
+CREATE FUNCTION public.update_supplier_to_supplier_type_group()
+RETURNS TRIGGER AS $$
+BEGIN
+ IF old."supplierTypeId" IS NOT NULL THEN
+ IF new."supplierTypeId" IS NOT NULL THEN
+ UPDATE public."membership" SET "groupId" = new."supplierTypeId"
+ WHERE "groupId" = old."supplierTypeId" AND "memberGroupId" = new.id;
+ ELSE
+ DELETE FROM public."membership" WHERE "groupId" = old."supplierTypeId" AND "memberGroupId" = new.id;
+ END IF;
+ ELSE
+ IF new."supplierTypeId" IS NOT NULL THEN
+ INSERT INTO public."membership" ("groupId", "memberGroupId")
+ VALUES (new."supplierTypeId", new.id);
+ END IF;
+ END IF;
+
+ UPDATE public."group" SET "name" = new.name
+ WHERE "id" = new.id AND "isSupplierOrgGroup" = TRUE;
+
+ RETURN new;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
+
+CREATE TRIGGER create_customer_type_group
+ AFTER INSERT on public."customerType"
+ FOR EACH ROW EXECUTE PROCEDURE public.create_customer_type_group();
+
+CREATE TRIGGER create_supplier_type_group
+ AFTER INSERT on public."supplierType"
+ FOR EACH ROW EXECUTE PROCEDURE public.create_supplier_type_group();
+
+CREATE TRIGGER create_customer_org_group
+ AFTER INSERT on public.customer
+ FOR EACH ROW EXECUTE PROCEDURE public.create_customer_org_group();
+
+CREATE TRIGGER create_supplier_org_group
+ AFTER INSERT on public.supplier
+ FOR EACH ROW EXECUTE PROCEDURE public.create_supplier_org_group();
+
+CREATE TRIGGER create_customer_account_group
+ AFTER INSERT on public."customerAccount"
+ FOR EACH ROW EXECUTE PROCEDURE public.add_customer_account_to_customer_group();
+
+CREATE TRIGGER create_supplier_account_group
+ AFTER INSERT on public."supplierAccount"
+ FOR EACH ROW EXECUTE PROCEDURE public.add_supplier_account_to_supplier_group();
+
+CREATE TRIGGER create_customer_group
+ AFTER UPDATE on public.customer
+ FOR EACH ROW EXECUTE PROCEDURE public.update_customer_to_customer_type_group();
+
+CREATE TRIGGER create_supplier_group
+ AFTER UPDATE on public.supplier
+ FOR EACH ROW EXECUTE PROCEDURE public.update_supplier_to_supplier_type_group();
+
+CREATE TRIGGER update_customer_type_group
+ AFTER UPDATE on public."customerType"
+ FOR EACH ROW EXECUTE PROCEDURE public.update_customer_type_group();
+
+CREATE TRIGGER update_supplier_type_group
+ AFTER UPDATE on public."supplierType"
+ FOR EACH ROW EXECUTE PROCEDURE public.update_supplier_type_group();
+
+NOTIFY pgrst, 'reload schema';
+
+
+```
+
+
+
+## `search`
+
+```sql
+
+CREATE TYPE search_entity AS enum ('Resource', 'Person', 'Customer', 'Supplier', 'Job', 'Part', 'Purchase Order', 'Sales Order', 'Document');
+
+CREATE TABLE search (
+ id BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
+ name TEXT NOT NULL,
+ description TEXT DEFAULT '',
+ entity search_entity,
+ uuid TEXT,
+ link TEXT NOT NULL
+);
+
+ALTER TABLE
+ public.search
+ADD COLUMN
+ fts tsvector GENERATED always as (to_tsvector('english', name || ' ' || description)) STORED;
+
+CREATE INDEX index_search_uuid ON public.search (uuid);
+CREATE INDEX index_search_fts ON public.search USING GIN (fts);
+
+CREATE FUNCTION public.create_employee_search_result()
+RETURNS TRIGGER AS $$
+DECLARE
+ employee TEXT;
+BEGIN
+ employee := (SELECT u."fullName" FROM public.user u WHERE u.id = new.id);
+ INSERT INTO public.search(name, entity, uuid, link)
+ VALUES (employee, 'Person', new.id, '/x/resources/person/' || new.id);
+ RETURN new;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
+
+CREATE TRIGGER create_employee_search_result
+ AFTER INSERT on public.user
+ FOR EACH ROW EXECUTE PROCEDURE public.create_employee_search_result();
+
+CREATE FUNCTION public.update_employee_search_result()
+RETURNS TRIGGER AS $$
+BEGIN
+ IF (new.active = false) THEN
+ DELETE FROM public.search
+ WHERE entity = 'Person' AND uuid = new.id;
+ RETURN new;
+ END IF;
+ IF (old."fullName" <> new."fullName") THEN
+ UPDATE public.search SET name = new."fullName"
+ WHERE entity = 'Person' AND uuid = new.id;
+ END IF;
+ RETURN new;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
+
+CREATE TRIGGER update_employee_search_result
+ AFTER UPDATE on public.user
+ FOR EACH ROW EXECUTE PROCEDURE public.update_employee_search_result();
+
+CREATE FUNCTION public.create_customer_search_result()
+RETURNS TRIGGER AS $$
+BEGIN
+ INSERT INTO public.search(name, entity, uuid, link)
+ VALUES (new.name, 'Customer', new.id, '/x/sales/customers/' || new.id);
+ RETURN new;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
+
+CREATE TRIGGER create_customer_search_result
+ AFTER INSERT on public.customer
+ FOR EACH ROW EXECUTE PROCEDURE public.create_customer_search_result();
+
+CREATE FUNCTION public.update_customer_search_result()
+RETURNS TRIGGER AS $$
+BEGIN
+ IF (old.name <> new.name) THEN
+ UPDATE public.search SET name = new.name
+ WHERE entity = 'Customer' AND uuid = new.id;
+ END IF;
+ RETURN new;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
+
+CREATE TRIGGER update_customer_search_result
+ AFTER UPDATE on public.customer
+ FOR EACH ROW EXECUTE PROCEDURE public.update_customer_search_result();
+
+CREATE FUNCTION public.create_supplier_search_result()
+RETURNS TRIGGER AS $$
+BEGIN
+ INSERT INTO public.search(name, entity, uuid, link)
+ VALUES (new.name, 'Supplier', new.id, '/x/purchasing/suppliers/' || new.id);
+ RETURN new;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
+
+CREATE TRIGGER create_supplier_search_result
+ AFTER INSERT on public.supplier
+ FOR EACH ROW EXECUTE PROCEDURE public.create_supplier_search_result();
+
+CREATE FUNCTION public.update_supplier_search_result()
+RETURNS TRIGGER AS $$
+BEGIN
+ IF (old.name <> new.name) THEN
+ UPDATE public.search SET name = new.name
+ WHERE entity = 'Supplier' AND uuid = new.id;
+ END IF;
+ RETURN new;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
+
+CREATE TRIGGER update_supplier_search_result
+ AFTER UPDATE on public.supplier
+ FOR EACH ROW EXECUTE PROCEDURE public.update_supplier_search_result();
+
+ALTER TABLE "search" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "Employees with sales_view can search for customers and sales orders" ON "search"
+ FOR SELECT
+ USING (coalesce(get_my_claim('sales_view')::boolean, false) = true AND entity IN ('Customer', 'Sales Order') AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+-- TODO: customers should be able to search for their sales orders
+
+CREATE POLICY "Employees with purchasing_view can search for suppliers and purchase orders" ON "search"
+ FOR SELECT
+ USING (coalesce(get_my_claim('purchasing_view')::boolean, false) = true AND entity IN ('Supplier', 'Purchase Order') AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+-- TODO: suppliers should be able to search for their purchase orders
+
+CREATE POLICY "Employees with resources_view can search for resources" ON "search"
+ FOR SELECT
+ USING (coalesce(get_my_claim('resources_view')::boolean, false) = true AND entity = 'Resource');
+
+CREATE POLICY "Employees with resources_view can search for people" ON "search"
+ FOR SELECT
+ USING (coalesce(get_my_claim('resources_view')::boolean, false) = true AND entity = 'Person');
+
+-- TODO: documents should be filtered based on visibility
+CREATE POLICY "Employees with document_view can search for documents" ON "search"
+ FOR SELECT
+ USING (coalesce(get_my_claim('document_view')::boolean, false) = true AND entity = 'Document' AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+CREATE POLICY "Employees with parts_view can search for parts" ON "search"
+ FOR SELECT
+ USING (coalesce(get_my_claim('parts_view')::boolean, false) = true AND entity = 'Part' AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+-- TODO: suppliers should be able to search for parts that they supply
+
+CREATE POLICY "Employees with jobs_view can search for jobs" ON "search"
+ FOR SELECT
+ USING (coalesce(get_my_claim('jobs_view')::boolean, false) = true AND entity = 'Job' AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+-- TODO: customers should be able to search for their jobs
+```
+
+
+
+## `rbac`
+
+```sql
+-- contact
+
+ALTER TABLE "contact" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "Employees with purchasing_view can view contacts that are suppliers" ON "contact"
+ FOR SELECT
+ USING (
+ coalesce(get_my_claim('purchasing_view')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+ AND id IN (
+ SELECT "contactId" FROM "supplierContact"
+ )
+ );
+
+CREATE POLICY "Employees with sales_view can view contacts that are customer" ON "contact"
+ FOR SELECT
+ USING (
+ coalesce(get_my_claim('sales_view')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+ AND id IN (
+ SELECT "contactId" FROM "customerContact"
+ )
+ );
+
+CREATE POLICY "Suppliers with purchasing_view can view contacts from their organization" ON "contact"
+ FOR SELECT
+ USING (
+ coalesce(get_my_claim('purchasing_view')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"supplier"'::jsonb
+ AND (
+ id IN (
+ SELECT "contactId" FROM "supplierContact" WHERE "supplierId" IN (
+ SELECT "supplierId" FROM "supplierAccount" WHERE id::uuid = auth.uid()
+ )
+ )
+ )
+ );
+
+CREATE POLICY "Customers with sales_view can view contacts from their organization" ON "contact"
+ FOR SELECT
+ USING (
+ coalesce(get_my_claim('sales_view')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"customer"'::jsonb
+ AND (
+ id IN (
+ SELECT "contactId" FROM "customerContact" WHERE "customerId" IN (
+ SELECT "customerId" FROM "customerAccount" WHERE id::uuid = auth.uid()
+ )
+ )
+ )
+ );
+
+CREATE POLICY "Many employees can create contact" ON "contact"
+ FOR INSERT
+ WITH CHECK (
+ (
+ coalesce(get_my_claim('purchasing_create')::boolean,false) OR
+ coalesce(get_my_claim('sales_create')::boolean,false) OR
+ coalesce(get_my_claim('users_create')::boolean,false)
+ ) AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+);
+
+CREATE POLICY "Suppliers with purchasing_update can create contacts from their organization" ON "contact"
+ FOR INSERT
+ WITH CHECK (
+ coalesce(get_my_claim('purchasing_update')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"supplier"'::jsonb
+ AND (
+ id IN (
+ SELECT "contactId" FROM "supplierContact" WHERE "supplierId" IN (
+ SELECT "supplierId" FROM "supplierAccount" WHERE id::uuid = auth.uid()
+ )
+ )
+ )
+ );
+
+CREATE POLICY "Customers with sales_update can create contacts from their organization" ON "contact"
+ FOR INSERT
+ WITH CHECK (
+ coalesce(get_my_claim('sales_update')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"customer"'::jsonb
+ AND (
+ id IN (
+ SELECT "contactId" FROM "customerContact" WHERE "customerId" IN (
+ SELECT "customerId" FROM "customerAccount" WHERE id::uuid = auth.uid()
+ )
+ )
+ )
+ );
+
+CREATE POLICY "Employees with purchasing_update can update supplier contacts" ON "contact"
+ FOR UPDATE
+ USING (
+ coalesce(get_my_claim('purchasing_update')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+ AND id IN (
+ SELECT "contactId" FROM "supplierContact"
+ )
+ );
+
+CREATE POLICY "Suppliers with purchasing_update can update contacts from their organization" ON "contact"
+ FOR UPDATE
+ USING (
+ coalesce(get_my_claim('purchasing_update')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"supplier"'::jsonb
+ AND (
+ id IN (
+ SELECT "contactId" FROM "supplierContact" WHERE "supplierId" IN (
+ SELECT "supplierId" FROM "supplierAccount" WHERE id::uuid = auth.uid()
+ )
+ )
+ )
+ );
+
+CREATE POLICY "Employees with sales_update can update customer contacts" ON "contact"
+ FOR UPDATE
+ USING (
+ coalesce(get_my_claim('purchasing_update')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+ AND id IN (
+ SELECT "contactId" FROM "customerContact"
+ )
+ );
+
+CREATE POLICY "Customers with sales_update can update contacts from their organization" ON "contact"
+ FOR UPDATE
+ USING (
+ coalesce(get_my_claim('sales_update')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"customer"'::jsonb
+ AND (
+ id IN (
+ SELECT "contactId" FROM "customerContact" WHERE "customerId" IN (
+ SELECT "customerId" FROM "customerAccount" WHERE id::uuid = auth.uid()
+ )
+ )
+ )
+ );
+
+CREATE POLICY "Employees with purchasing_delete can delete supplier contacts" ON "contact"
+ FOR DELETE
+ USING (
+ coalesce(get_my_claim('purchasing_delete')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+ AND id IN (
+ SELECT "contactId" FROM "supplierContact"
+ )
+ );
+
+CREATE POLICY "Suppliers with purchasing_delete can delete contacts from their organization" ON "contact"
+ FOR DELETE
+ USING (
+ coalesce(get_my_claim('purchasing_delete')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"supplier"'::jsonb
+ AND (
+ id IN (
+ SELECT "contactId" FROM "supplierContact" WHERE "supplierId" IN (
+ SELECT "supplierId" FROM "supplierAccount" WHERE id::uuid = auth.uid()
+ )
+ )
+ )
+ );
+
+CREATE POLICY "Employees with sales_delete can delete customer contacts" ON "contact"
+ FOR DELETE
+ USING (
+ coalesce(get_my_claim('sales_delete')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+ AND id IN (
+ SELECT "contactId" FROM "customerContact"
+ )
+ );
+
+CREATE POLICY "Customers with sales_delete can delete contacts from their organization" ON "contact"
+ FOR DELETE
+ USING (
+ coalesce(get_my_claim('sales_delete')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"customer"'::jsonb
+ AND (
+ id IN (
+ SELECT "contactId" FROM "customerContact" WHERE "customerId" IN (
+ SELECT "customerId" FROM "customerAccount" WHERE id::uuid = auth.uid()
+ )
+ )
+ )
+ );
+
+-- customerType
+
+ALTER TABLE "customerType" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "Employees with sales_view can view customer types" ON "customerType"
+ FOR SELECT
+ USING (coalesce(get_my_claim('sales_view')::boolean, false) = true AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+CREATE POLICY "Employees with sales_create can create customer types" ON "customerType"
+ FOR INSERT
+ WITH CHECK (coalesce(get_my_claim('sales_create')::boolean,false) AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+CREATE POLICY "Employees with sales_update can update customer types" ON "customerType"
+ FOR UPDATE
+ USING (coalesce(get_my_claim('sales_update')::boolean,false) AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+CREATE POLICY "Employees with sales_delete can delete customer types" ON "customerType"
+ FOR DELETE
+ USING (coalesce(get_my_claim('sales_delete')::boolean, false) = true AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+-- customer
+
+ALTER TABLE "customer" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "Employees with sales_view can view customer" ON "customer"
+ FOR SELECT
+ USING (coalesce(get_my_claim('sales_view')::boolean, false) = true AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+CREATE POLICY "Customers with sales_view can their own organization" ON "customer"
+ FOR SELECT
+ USING (
+ coalesce(get_my_claim('sales_view')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"customer"'::jsonb
+ AND id IN (
+ SELECT "customerId" FROM "customerAccount" WHERE id::uuid = auth.uid()
+ )
+ );
+
+CREATE POLICY "Employees with sales_create can create customers" ON "customer"
+ FOR INSERT
+ WITH CHECK (coalesce(get_my_claim('sales_create')::boolean,false) AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+CREATE POLICY "Employees with sales_update can update customers" ON "customer"
+ FOR UPDATE
+ USING (coalesce(get_my_claim('sales_update')::boolean,false) AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+CREATE POLICY "Customers with sales_update can their own organization" ON "customer"
+ FOR UPDATE
+ USING (
+ coalesce(get_my_claim('sales_update')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"customer"'::jsonb
+ AND id IN (
+ SELECT "customerId" FROM "customerAccount" WHERE id::uuid = auth.uid()
+ )
+ );
+
+CREATE POLICY "Employees with sales_delete can delete customers" ON "customer"
+ FOR DELETE
+ USING (coalesce(get_my_claim('sales_delete')::boolean, false) = true AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+-- customerContact
+
+ALTER TABLE "customerContact" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "Employees with sales_view can view customer contact" ON "customerContact"
+ FOR SELECT
+ USING (coalesce(get_my_claim('sales_view')::boolean, false) = true AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+CREATE POLICY "Customers with sales_view can their own customer contacts" ON "customerContact"
+ FOR SELECT
+ USING (
+ coalesce(get_my_claim('sales_view')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"customer"'::jsonb
+ AND "customerId" IN (
+ SELECT "customerId" FROM "customerAccount" WHERE id::uuid = auth.uid()
+ )
+ );
+
+CREATE POLICY "Employees with sales_create can create customer contacts" ON "customerContact"
+ FOR INSERT
+ WITH CHECK (coalesce(get_my_claim('sales_create')::boolean,false) AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+CREATE POLICY "Customers with sales_create can create customer contacts" ON "customerContact"
+ FOR INSERT
+ WITH CHECK (coalesce(get_my_claim('sales_create')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"customer"'::jsonb
+ AND "customerId" IN (
+ SELECT "customerId" FROM "customerAccount" WHERE id::uuid = auth.uid()
+ )
+ );
+
+CREATE POLICY "Employees with sales_update can update customer contacts" ON "customerContact"
+ FOR UPDATE
+ USING (coalesce(get_my_claim('sales_update')::boolean,false) AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+CREATE POLICY "Customers with sales_update can update their customer contacts" ON "customerContact"
+ FOR UPDATE
+ USING (coalesce(get_my_claim('sales_update')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"customer"'::jsonb
+ AND "customerId" IN (
+ SELECT "customerId" FROM "customerAccount" WHERE id::uuid = auth.uid()
+ )
+ );
+
+CREATE POLICY "Employees with sales_delete can delete customer contacts" ON "customerContact"
+ FOR DELETE
+ USING (coalesce(get_my_claim('sales_delete')::boolean, false) = true AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+
+-- supplierType
+
+ALTER TABLE "supplierType" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "Employees with purchasing_view can view supplier types" ON "supplierType"
+ FOR SELECT
+ USING (coalesce(get_my_claim('purchasing_view')::boolean, false) = true AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+CREATE POLICY "Employees with purchasing_create can create supplier types" ON "supplierType"
+ FOR INSERT
+ WITH CHECK (coalesce(get_my_claim('purchasing_create')::boolean,false) AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+CREATE POLICY "Employees with purchasing_update can update supplier types" ON "supplierType"
+ FOR UPDATE
+ USING (coalesce(get_my_claim('purchasing_update')::boolean,false) AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+CREATE POLICY "Employees with purchasing_delete can delete supplier types" ON "supplierType"
+ FOR DELETE
+ USING (coalesce(get_my_claim('purchasing_delete')::boolean, false) = true AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+-- supplier
+
+ALTER TABLE "supplier" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "Employees with purchasing_view can view supplier" ON "supplier"
+ FOR SELECT
+ USING (coalesce(get_my_claim('purchasing_view')::boolean, false) = true AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+CREATE POLICY "Suppliers with purchasing_view can their own organization" ON "supplier"
+ FOR SELECT
+ USING (
+ coalesce(get_my_claim('purchasing_view')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"supplier"'::jsonb
+ AND id IN (
+ SELECT "supplierId" FROM "supplierAccount" WHERE id::uuid = auth.uid()
+ )
+ );
+
+CREATE POLICY "Employees with purchasing_create can create suppliers" ON "supplier"
+ FOR INSERT
+ WITH CHECK (coalesce(get_my_claim('purchasing_create')::boolean,false) AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+CREATE POLICY "Employees with purchasing_update can update suppliers" ON "supplier"
+ FOR UPDATE
+ USING (coalesce(get_my_claim('purchasing_update')::boolean,false) AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+CREATE POLICY "Suppliers with purchasing_update can their own organization" ON "supplier"
+ FOR UPDATE
+ USING (
+ coalesce(get_my_claim('purchasing_update')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"supplier"'::jsonb
+ AND id IN (
+ SELECT "supplierId" FROM "supplierAccount" WHERE id::uuid = auth.uid()
+ )
+ );
+
+CREATE POLICY "Employees with purchasing_delete can delete suppliers" ON "supplier"
+ FOR DELETE
+ USING (coalesce(get_my_claim('purchasing_delete')::boolean, false) = true AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+-- supplierContact
+
+ALTER TABLE "supplierContact" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "Employees with purchasing_view can view supplier contact" ON "supplierContact"
+ FOR SELECT
+ USING (coalesce(get_my_claim('purchasing_view')::boolean, false) = true AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+CREATE POLICY "Suppliers with purchasing_view can their own supplier contacts" ON "supplierContact"
+ FOR SELECT
+ USING (
+ coalesce(get_my_claim('purchasing_view')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"supplier"'::jsonb
+ AND "supplierId" IN (
+ SELECT "supplierId" FROM "supplierAccount" WHERE id::uuid = auth.uid()
+ )
+ );
+
+CREATE POLICY "Employees with purchasing_create can create supplier contacts" ON "supplierContact"
+ FOR INSERT
+ WITH CHECK (coalesce(get_my_claim('purchasing_create')::boolean,false) AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+CREATE POLICY "Suppliers with purchasing_create can create supplier contacts" ON "supplierContact"
+ FOR INSERT
+ WITH CHECK (coalesce(get_my_claim('purchasing_create')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"supplier"'::jsonb
+ AND "supplierId" IN (
+ SELECT "supplierId" FROM "supplierAccount" WHERE id::uuid = auth.uid()
+ )
+ );
+
+CREATE POLICY "Employees with purchasing_update can update supplier contacts" ON "supplierContact"
+ FOR UPDATE
+ USING (coalesce(get_my_claim('purchasing_update')::boolean,false) AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+CREATE POLICY "Suppliers with purchasing_update can update their supplier contacts" ON "supplierContact"
+ FOR UPDATE
+ USING (coalesce(get_my_claim('purchasing_update')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"supplier"'::jsonb
+ AND "supplierId" IN (
+ SELECT "supplierId" FROM "supplierAccount" WHERE id::uuid = auth.uid()
+ )
+ );
+
+CREATE POLICY "Employees with purchasing_delete can delete supplier contacts" ON "supplierContact"
+ FOR DELETE
+ USING (coalesce(get_my_claim('purchasing_delete')::boolean, false) = true AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
+
+```
+
+
+
+## `notes`
+
+```sql
+CREATE TABLE "userNote" (
+ "id" TEXT NOT NULL DEFAULT xid(),
+ "userId" TEXT NOT NULL,
+ "note" TEXT NOT NULL,
+ "noteRichText" JSONB NOT NULL DEFAULT '{}'::jsonb,
+ "active" BOOLEAN NOT NULL DEFAULT true,
+ "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
+ "createdBy" TEXT NOT NULL,
+ "updatedAt" TIMESTAMP WITH TIME ZONE,
+
+ CONSTRAINT "notes_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "notes_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT "notes_createdBy_fkey" FOREIGN KEY ("createdBy") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE
+);
+
+ALTER TABLE "userNote" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "Employees with resources_view can view notes" ON "userNote"
+ FOR SELECT
+ USING (
+ coalesce(get_my_claim('resources_view')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+ );
+
+CREATE POLICY "Employees with resources_create can insert notes" ON "userNote"
+ FOR INSERT
+ WITH CHECK (
+ coalesce(get_my_claim('resources_create')::boolean,false)
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+);
+
+CREATE POLICY "Employees with resources_update can update their own notes" ON "userNote"
+ FOR UPDATE
+ USING (
+ coalesce(get_my_claim('resources_update')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+ AND "createdBy"::uuid = auth.uid()
+ );
+
+CREATE POLICY "Employees with resources_update can delete their own notes" ON "userNote"
+ FOR DELETE
+ USING (
+ coalesce(get_my_claim('resources_update')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+ AND "createdBy"::uuid = auth.uid()
+ );
+
+CREATE POLICY "Employees with resources_delete can delete any note" ON "userNote"
+ FOR UPDATE
+ USING (
+ coalesce(get_my_claim('resources_delete')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+ );
+```
+
+
+
+## `abilities`
+
+```sql
+CREATE TABLE "ability" (
+ "id" TEXT NOT NULL DEFAULT xid(),
+ "name" TEXT NOT NULL,
+ "curve" JSONB NOT NULL DEFAULT '{"data":[{"id":0,"week":0,"value":50},{"id":1,"week":1,"value":80},{"id":2,"week":2,"value":90},{"id":3,"week":3,"value":100}]}'::jsonb,
+ "shadowWeeks" NUMERIC NOT NULL DEFAULT 0,
+ "active" BOOLEAN NOT NULL DEFAULT true,
+ "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
+ "createdBy" TEXT NOT NULL,
+ "updatedAt" TIMESTAMP WITH TIME ZONE,
+ "updatedBy" TEXT,
+
+ CONSTRAINT "abilities_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "abilities_createdBy_fkey" FOREIGN KEY ("createdBy") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT "abilities_updatedBy_fkey" FOREIGN KEY ("updatedBy") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE
+);
+
+ALTER TABLE "ability" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "Employees with resources_view can view abilities" ON "ability"
+ FOR SELECT
+ USING (
+ coalesce(get_my_claim('resources_view')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+ );
+
+CREATE POLICY "Employees with resources_create can insert abilities" ON "ability"
+ FOR INSERT
+ WITH CHECK (
+ coalesce(get_my_claim('resources_create')::boolean,false)
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+);
+
+CREATE POLICY "Employees with resources_update can update abilities" ON "ability"
+ FOR UPDATE
+ USING (
+ coalesce(get_my_claim('resources_update')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+ );
+
+CREATE POLICY "Employees with resources_delete can delete abilities" ON "ability"
+ FOR DELETE
+ USING (
+ coalesce(get_my_claim('resources_delete')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+ );
+
+CREATE TABLE "employeeAbility" (
+ "id" TEXT NOT NULL DEFAULT xid(),
+ "employeeId" TEXT NOT NULL,
+ "abilityId" TEXT NOT NULL,
+ "active" BOOLEAN NOT NULL DEFAULT true,
+ "lastTrainingDate" DATE,
+ "trainingDays" NUMERIC NOT NULL DEFAULT 0,
+ "trainingCompleted" BOOLEAN DEFAULT false,
+
+ CONSTRAINT "employeeAbilities_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "employeeAbilities_employeeId_fkey" FOREIGN KEY ("employeeId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT "employeeAbilities_abilityId_fkey" FOREIGN KEY ("abilityId") REFERENCES "ability"("id") ON DELETE CASCADE ON UPDATE CASCADE,
+
+ CONSTRAINT uq_employeeAbility_employeeId_abilityId UNIQUE ( "employeeId", "abilityId")
+);
+
+ALTER TABLE "employeeAbility" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "Employees with resources_view can view employeeAbilities" ON "employeeAbility"
+ FOR SELECT
+ USING (
+ coalesce(get_my_claim('resources_view')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+ );
+
+CREATE POLICY "Employees with resources_create can insert employeeAbilities" ON "employeeAbility"
+ FOR INSERT
+ WITH CHECK (
+ coalesce(get_my_claim('resources_create')::boolean,false)
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+);
+
+CREATE POLICY "Employees with resources_update can update employeeAbilities" ON "employeeAbility"
+ FOR UPDATE
+ USING (
+ coalesce(get_my_claim('resources_update')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+ );
+
+CREATE POLICY "Employees with resources_delete can delete employeeAbilities" ON "employeeAbility"
+ FOR DELETE
+ USING (
+ coalesce(get_my_claim('resources_delete')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+ );
+
+```
+
diff --git a/apps/carbon/app/components/Form/Employee.tsx b/apps/carbon/app/components/Form/Employee.tsx
new file mode 100644
index 0000000000..6389831d7a
--- /dev/null
+++ b/apps/carbon/app/components/Form/Employee.tsx
@@ -0,0 +1,10 @@
+import type { UserProps } from "./User";
+import User from "./User";
+
+export type EmployeesProps = UserProps;
+
+const Employee = (props: EmployeesProps) => (
+ <User {...props} usersOnly type="employee" />
+);
+
+export default Employee;
diff --git a/apps/carbon/app/components/Form/Employees.tsx b/apps/carbon/app/components/Form/Employees.tsx
new file mode 100644
index 0000000000..15ee836895
--- /dev/null
+++ b/apps/carbon/app/components/Form/Employees.tsx
@@ -0,0 +1,55 @@
+import {
+ FormControl,
+ FormErrorMessage,
+ FormHelperText,
+ FormLabel,
+} from "@chakra-ui/react";
+import { useState } from "react";
+import { useField } from "remix-validated-form";
+import { UserSelect } from "../Selectors";
+import type {
+ SelectionItemInterface,
+ UserSelectProps,
+} from "../Selectors/UserSelect/types";
+
+export type EmployeesProps = {
+ name: string;
+ label?: string;
+ helperText?: string;
+} & UserSelectProps;
+
+const Employees = ({ name, label, helperText, ...props }: EmployeesProps) => {
+ const { error, defaultValue, validate } = useField(name);
+ const [selections, setSelections] = useState<string[]>(defaultValue);
+
+ const handleChange = (items: SelectionItemInterface[]) => {
+ setSelections(items.map((item) => item.id));
+ validate();
+ };
+
+ return (
+ <FormControl isInvalid={!!error}>
+ {label && <FormLabel htmlFor={name}>{label}</FormLabel>}
+ {selections.map((selection, index) => (
+ <input
+ key={`${name}[${index}]`}
+ type="hidden"
+ name={`${name}[${index}]`}
+ value={selection}
+ />
+ ))}
+ <UserSelect
+ {...props}
+ type="employee"
+ usersOnly
+ isMulti
+ value={selections}
+ onChange={handleChange}
+ />
+ {helperText && <FormHelperText>{helperText}</FormHelperText>}
+ {error && <FormErrorMessage>{error}</FormErrorMessage>}
+ </FormControl>
+ );
+};
+
+export default Employees;
diff --git a/apps/carbon/app/components/Form/Number.tsx b/apps/carbon/app/components/Form/Number.tsx
index 213fd95d1e..4ab9174d3e 100644
--- a/apps/carbon/app/components/Form/Number.tsx
+++ b/apps/carbon/app/components/Form/Number.tsx
@@ -1,4 +1,5 @@
import type { NumberInputProps } from "@chakra-ui/react";
+import { FormHelperText } from "@chakra-ui/react";
import {
FormControl,
FormErrorMessage,
@@ -16,10 +17,11 @@ type FormNumberProps = NumberInputProps & {
name: string;
label?: string;
isRequired?: boolean;
+ helperText?: string;
};
const Number = forwardRef<HTMLInputElement, FormNumberProps>(
- ({ name, label, isRequired, ...rest }, ref) => {
+ ({ name, label, isRequired, helperText, ...rest }, ref) => {
const { getInputProps, error } = useField(name);
return (
@@ -37,6 +39,7 @@ const Number = forwardRef<HTMLInputElement, FormNumberProps>(
<NumberDecrementStepper />
</NumberInputStepper>
</NumberInput>
+ {helperText && <FormHelperText>{helperText}</FormHelperText>}
{error && <FormErrorMessage>{error}</FormErrorMessage>}
</FormControl>
);
diff --git a/apps/carbon/app/components/Form/Slider.tsx b/apps/carbon/app/components/Form/Slider.tsx
new file mode 100644
index 0000000000..b93c0fc440
--- /dev/null
+++ b/apps/carbon/app/components/Form/Slider.tsx
@@ -0,0 +1,54 @@
+import type { SliderProps as ChakraSliderProps } from "@chakra-ui/react";
+import {
+ Box,
+ SliderFilledTrack,
+ SliderThumb,
+ SliderTrack,
+} from "@chakra-ui/react";
+import { FormHelperText } from "@chakra-ui/react";
+import {
+ FormControl,
+ FormErrorMessage,
+ FormLabel,
+ Slider as ChakraSlider,
+} from "@chakra-ui/react";
+import { forwardRef } from "react";
+import { useField } from "remix-validated-form";
+
+type SliderProps = ChakraSliderProps & {
+ name: string;
+ label?: string;
+ isRequired?: boolean;
+ helperText?: string;
+};
+
+const Slider = forwardRef<HTMLInputElement, SliderProps>(
+ ({ name, label, isRequired, helperText, ...rest }, ref) => {
+ const { getInputProps, error } = useField(name);
+
+ return (
+ <FormControl isInvalid={!!error} isRequired={isRequired}>
+ {label && <FormLabel htmlFor={name}>{label}</FormLabel>}
+
+ <ChakraSlider
+ {...getInputProps({
+ id: name,
+ ...rest,
+ })}
+ >
+ <SliderTrack bg="green.100" h={2}>
+ <Box position="relative" right={10} />
+ <SliderFilledTrack bg="green.500" />
+ </SliderTrack>
+ <SliderThumb boxSize={6} />
+ </ChakraSlider>
+ {helperText && <FormHelperText>{helperText}</FormHelperText>}
+ {error && <FormErrorMessage>{error}</FormErrorMessage>}
+ </FormControl>
+ );
+ }
+);
+
+Slider.displayName = "Slider";
+
+export default Slider;
diff --git a/apps/carbon/app/components/Form/User.tsx b/apps/carbon/app/components/Form/User.tsx
index e1af50c3dc..2b6e076961 100644
--- a/apps/carbon/app/components/Form/User.tsx
+++ b/apps/carbon/app/components/Form/User.tsx
@@ -1,4 +1,9 @@
-import { FormControl, FormErrorMessage, FormLabel } from "@chakra-ui/react";
+import {
+ FormControl,
+ FormErrorMessage,
+ FormHelperText,
+ FormLabel,
+} from "@chakra-ui/react";
import { useState } from "react";
import { useField } from "remix-validated-form";
import { UserSelect } from "../Selectors";
@@ -7,9 +12,13 @@ import type {
UserSelectProps,
} from "../Selectors/UserSelect/types";
-type UserProps = { name: string; label?: string } & UserSelectProps;
+export type UserProps = {
+ name: string;
+ label?: string;
+ helperText?: string;
+} & UserSelectProps;
-const User = ({ name, label, ...props }: UserProps) => {
+const User = ({ name, label, type, helperText, ...props }: UserProps) => {
const { error, defaultValue, validate } = useField(name);
const [selection, setSelection] = useState<string>(defaultValue);
@@ -29,11 +38,13 @@ const User = ({ name, label, ...props }: UserProps) => {
<input type="hidden" name={name} value={selection} />
<UserSelect
{...props}
+ type={type}
usersOnly
isMulti={false}
value={selection}
onChange={handleChange}
/>
+ {helperText && <FormHelperText>{helperText}</FormHelperText>}
{error && <FormErrorMessage>{error}</FormErrorMessage>}
</FormControl>
);
diff --git a/apps/carbon/app/components/Form/Users.tsx b/apps/carbon/app/components/Form/Users.tsx
index 2d721218f6..ad2c5eac7e 100644
--- a/apps/carbon/app/components/Form/Users.tsx
+++ b/apps/carbon/app/components/Form/Users.tsx
@@ -1,4 +1,9 @@
-import { FormControl, FormErrorMessage, FormLabel } from "@chakra-ui/react";
+import {
+ FormControl,
+ FormErrorMessage,
+ FormHelperText,
+ FormLabel,
+} from "@chakra-ui/react";
import { useState } from "react";
import { useField } from "remix-validated-form";
import { UserSelect } from "../Selectors";
@@ -7,9 +12,13 @@ import type {
UserSelectProps,
} from "../Selectors/UserSelect/types";
-type UsersProps = { name: string; label?: string } & UserSelectProps;
+export type UsersProps = {
+ name: string;
+ label?: string;
+ helperText?: string;
+} & UserSelectProps;
-const Users = ({ name, label, ...props }: UsersProps) => {
+const Users = ({ name, label, type, helperText, ...props }: UsersProps) => {
const { error, defaultValue, validate } = useField(name);
const [selections, setSelections] = useState<string[]>(defaultValue);
@@ -35,10 +44,12 @@ const Users = ({ name, label, ...props }: UsersProps) => {
))}
<UserSelect
{...props}
+ type={type}
isMulti
value={stripUserGroupPrefix(selections)}
onChange={handleChange}
/>
+ {helperText && <FormHelperText>{helperText}</FormHelperText>}
{error && <FormErrorMessage>{error}</FormErrorMessage>}
</FormControl>
);
diff --git a/apps/carbon/app/components/Form/index.ts b/apps/carbon/app/components/Form/index.ts
index 7fac7dcbed..e99f0d97fd 100644
--- a/apps/carbon/app/components/Form/index.ts
+++ b/apps/carbon/app/components/Form/index.ts
@@ -4,6 +4,8 @@ import Color from "./Color";
import Customer from "./Customer";
import CustomerContact from "./CustomerContact";
import DatePicker from "./DatePicker";
+import Employee from "./Employee";
+import Employees from "./Employees";
import Input from "./Input";
import Hidden from "./Hidden";
import Number from "./Number";
@@ -11,6 +13,7 @@ import Password from "./Password";
import Phone from "./Phone";
import Radios from "./Radios";
import Select from "./Select";
+import Slider from "./Slider";
import Submit from "./Submit";
import Supplier from "./Supplier";
import SupplierContact from "./SupplierContact";
@@ -25,6 +28,8 @@ export {
Customer,
CustomerContact,
DatePicker,
+ Employee,
+ Employees,
Input,
Hidden,
Number,
@@ -32,6 +37,7 @@ export {
Phone,
Radios,
Select,
+ Slider,
Submit,
Supplier,
SupplierContact,
diff --git a/apps/carbon/app/components/Layout/Topbar/useBreadcrumbs.tsx b/apps/carbon/app/components/Layout/Topbar/useBreadcrumbs.tsx
index ada76e419e..70edf4c45c 100644
--- a/apps/carbon/app/components/Layout/Topbar/useBreadcrumbs.tsx
+++ b/apps/carbon/app/components/Layout/Topbar/useBreadcrumbs.tsx
@@ -54,6 +54,16 @@ export default function useBreadcrumbs(): Route[] {
name: "Resources",
to: match.pathname,
});
+ case "routes/x+/resources.abilities":
+ return acc.concat({
+ name: "Abilities",
+ to: match.pathname,
+ });
+ case "routes/x+/resources.ability.$abilityId":
+ return acc.concat({
+ name: "Abilities",
+ to: "/x/resources/abilities",
+ });
case "routes/x+/resources.people":
return acc.concat({
name: "People",
diff --git a/apps/carbon/app/components/Selectors/UserSelect/UserSelect.tsx b/apps/carbon/app/components/Selectors/UserSelect/UserSelect.tsx
index 8aee3d43eb..c40a19960d 100644
--- a/apps/carbon/app/components/Selectors/UserSelect/UserSelect.tsx
+++ b/apps/carbon/app/components/Selectors/UserSelect/UserSelect.tsx
@@ -44,7 +44,7 @@ const UserSelect = (props: UserSelectProps) => {
<UserSelectContext.Provider value={state}>
{label && <FormLabel>{label}</FormLabel>}
<Container ref={containerRef} width={width} testID={testID}>
- {!readOnly && (
+ {!(readOnly && isMulti) && (
<Combobox>
<Input />
{dropdown.isOpen && (
diff --git a/apps/carbon/app/components/Selectors/UserSelect/components/Input.tsx b/apps/carbon/app/components/Selectors/UserSelect/components/Input.tsx
index 2d58c15507..7bcf8daee1 100644
--- a/apps/carbon/app/components/Selectors/UserSelect/components/Input.tsx
+++ b/apps/carbon/app/components/Selectors/UserSelect/components/Input.tsx
@@ -15,7 +15,7 @@ import useUserSelectContext from "../provider";
const SelectInput = () => {
const {
aria: { inputProps },
- innerProps: { disabled, isMulti, placeholder, testID },
+ innerProps: { disabled, isMulti, placeholder, readOnly, testID },
inputValue,
instanceId,
loading,
@@ -45,8 +45,8 @@ const SelectInput = () => {
{...inputProps}
id={`${instanceId}:UserSelectionInput:searchInput:${testID}`}
data-testid={`UserSelectionInput:searchInput:${testID}`}
- readOnly={disabled}
- isDisabled={disabled}
+ readOnly={disabled || readOnly}
+ isDisabled={disabled || readOnly}
onBlur={onInputBlur}
onChange={onInputChange}
onFocus={onInputFocus}
diff --git a/apps/carbon/app/components/Selectors/UserSelect/types.ts b/apps/carbon/app/components/Selectors/UserSelect/types.ts
index 9bebf2a7f9..6b93ee87aa 100644
--- a/apps/carbon/app/components/Selectors/UserSelect/types.ts
+++ b/apps/carbon/app/components/Selectors/UserSelect/types.ts
@@ -40,6 +40,7 @@ export interface UserSelectProps {
selections?: SelectionItemInterface[];
selectionsMaxHeight?: string | number;
testID?: string;
+ type?: "employee" | "supplier" | "customer";
usersOnly?: boolean;
value?: string[] | string; // Will be set when used as a controlled input
width?: number;
diff --git a/apps/carbon/app/components/Selectors/UserSelect/useUserSelect.ts b/apps/carbon/app/components/Selectors/UserSelect/useUserSelect.ts
index a17ff9d216..f9e5c8af7c 100644
--- a/apps/carbon/app/components/Selectors/UserSelect/useUserSelect.ts
+++ b/apps/carbon/app/components/Selectors/UserSelect/useUserSelect.ts
@@ -54,9 +54,9 @@ export default function useUserSelect(props: UserSelectProps) {
useEffect(() => {
if (groupsFetcher.type === "init") {
- groupsFetcher.load(`/resource/users/groups`);
+ groupsFetcher.load(`/resource/users/groups?type=${innerProps.type}`);
}
- }, [groupsFetcher]);
+ }, [groupsFetcher, innerProps.type]);
/* Refs */
const containerRef = useRef<HTMLDivElement>(null);
@@ -183,11 +183,11 @@ export default function useUserSelect(props: UserSelectProps) {
}, [optionGroups, innerProps.value]);
const makeFilteredOptionGroups = useCallback(
- (filter?: string): OptionGroup[] =>
+ (query?: string): OptionGroup[] =>
optionGroups.reduce((acc, group) => {
- if (filter?.trim()) {
+ if (query?.trim()) {
const matches = group.items.filter((item) =>
- searchTermStartsWordInString(item.label, filter)
+ stringContainsTerm(item.label, query)
);
if (matches && matches.length) {
return acc.concat({
@@ -814,17 +814,16 @@ function makeSelectionItemsById(
return result;
}
-function searchTermStartsWordInString(string: string, searchTerm: string) {
- const stringLowerCase = string.toLocaleLowerCase().trim();
- const searchTermLowerCase = searchTerm.toLocaleLowerCase().trim();
- if (stringLowerCase.startsWith(searchTermLowerCase)) {
+function stringContainsTerm(input: string, filter: string) {
+ const i = input.toLocaleLowerCase().trim();
+ const f = filter.toLocaleLowerCase().trim();
+ if (i.startsWith(f)) {
return true;
}
- const searchTermWords = words(searchTermLowerCase);
- const stringWords = words(stringLowerCase);
- return stringWords.some((stringWord) =>
- searchTermWords.some((searchTermWord) =>
- stringWord.startsWith(searchTermWord)
- )
+
+ const filterTokens = words(f);
+ const inputTokens = words(i);
+ return filterTokens.every((fToken) =>
+ inputTokens.some((iToken) => iToken.startsWith(fToken))
);
}
diff --git a/apps/carbon/app/interfaces/Account/UserAttributes/UserAttributesForm.tsx b/apps/carbon/app/interfaces/Account/UserAttributes/UserAttributesForm.tsx
index 9c158f4cef..1c9ee32b86 100644
--- a/apps/carbon/app/interfaces/Account/UserAttributes/UserAttributesForm.tsx
+++ b/apps/carbon/app/interfaces/Account/UserAttributes/UserAttributesForm.tsx
@@ -16,11 +16,11 @@ import { ValidatedForm } from "remix-validated-form";
import {
Boolean as BooleanInput,
DatePicker,
+ Employee,
Input,
Hidden,
Number as NumberInput,
Submit,
- User,
Select,
} from "~/components/Form";
import { UserSelect } from "~/components/Selectors";
@@ -383,7 +383,7 @@ function renderTypedForm({
<Hidden name="type" value="user" />
<Hidden name="userAttributeId" />
<Hidden name="userAttributeValueId" />
- <User name="value" />
+ <Employee name="value" />
</Box>
<HStack justifyContent="end" w="full" alignSelf="center">
<Submit size="sm" type="submit">
diff --git a/apps/carbon/app/interfaces/Purchasing/Suppliers/SupplierForm/SupplierForm.tsx b/apps/carbon/app/interfaces/Purchasing/Suppliers/SupplierForm/SupplierForm.tsx
index b3c5dbc8f9..200e03f51e 100644
--- a/apps/carbon/app/interfaces/Purchasing/Suppliers/SupplierForm/SupplierForm.tsx
+++ b/apps/carbon/app/interfaces/Purchasing/Suppliers/SupplierForm/SupplierForm.tsx
@@ -15,10 +15,10 @@ import {
import { useNavigate } from "@remix-run/react";
import { ValidatedForm } from "remix-validated-form";
import {
+ Employee,
Input,
Select,
Submit,
- User,
TextArea,
Hidden,
} from "~/components/Form";
@@ -123,7 +123,7 @@ const SupplierForm = ({
options={supplierTypeOptions}
placeholder="Select Supplier Type"
/>
- <User name="accountManagerId" label="Account Manager" />
+ <Employee name="accountManagerId" label="Account Manager" />
<Select
name="supplierStatusId"
label="Supplier Status"
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/AbilitiesTable/AbilitiesTable.tsx b/apps/carbon/app/interfaces/Resources/Abilities/AbilitiesTable/AbilitiesTable.tsx
new file mode 100644
index 0000000000..a559635c81
--- /dev/null
+++ b/apps/carbon/app/interfaces/Resources/Abilities/AbilitiesTable/AbilitiesTable.tsx
@@ -0,0 +1,135 @@
+import { ActionMenu } from "@carbon/react";
+import { AvatarGroup, Flex, MenuItem, VisuallyHidden } from "@chakra-ui/react";
+import { useNavigate } from "@remix-run/react";
+import type { ColumnDef } from "@tanstack/react-table";
+import { memo, useMemo } from "react";
+import { BsPencilSquare } from "react-icons/bs";
+import { IoMdTrash } from "react-icons/io";
+import { Avatar } from "~/components";
+import { Table } from "~/components";
+import { usePermissions } from "~/hooks";
+import type { Abilities, AbilityDatum } from "~/interfaces/Resources/types";
+import AbilityChart from "../AbilityChart";
+
+type AbilitiesTableProps = {
+ data: Abilities;
+ count: number;
+};
+
+const AbilitiesTable = memo(({ data, count }: AbilitiesTableProps) => {
+ const navigate = useNavigate();
+ const permissions = usePermissions();
+
+ const rows = data.map((row) => ({
+ id: row.id,
+ name: row.name,
+ // @ts-ignore
+ weeks: row.curve?.data.at(-1).week,
+ curve: row.curve as { data: AbilityDatum[] },
+ shadowWeeks: row.shadowWeeks,
+ employees: Array.isArray(row.employeeAbility)
+ ? row.employeeAbility.reduce<
+ { name: string; avatarUrl: string | null }[]
+ >((acc, curr) => {
+ if (curr.user) {
+ if (Array.isArray(curr.user)) {
+ curr.user.forEach((user) => {
+ acc.push({
+ name: user.fullName ?? "",
+ avatarUrl: user.avatarUrl,
+ });
+ });
+ } else {
+ acc.push({
+ name: curr.user.fullName ?? "",
+ avatarUrl: curr.user.avatarUrl,
+ });
+ }
+ }
+ return acc;
+ }, [])
+ : row.employeeAbility?.user && Array.isArray(row.employeeAbility?.user)
+ ? row.employeeAbility.user.map((user) => ({
+ name: user.fullName ?? "",
+ avatarUrl: user.avatarUrl,
+ }))
+ : [],
+ }));
+
+ const columns = useMemo<ColumnDef<typeof rows[number]>[]>(() => {
+ return [
+ {
+ accessorKey: "name",
+ header: "Ability",
+ cell: (item) => item.getValue(),
+ },
+ {
+ header: "Employees",
+ // accessorKey: undefined, // makes the column unsortable
+ cell: ({ row }) => (
+ <AvatarGroup max={5} size="sm" spacing={-2}>
+ {row.original.employees.map((employee, index: number) => (
+ <Avatar
+ key={index}
+ name={employee.name ?? undefined}
+ title={employee.name ?? undefined}
+ path={employee.avatarUrl}
+ />
+ ))}
+ </AvatarGroup>
+ ),
+ },
+ {
+ header: "Time to Learn",
+ cell: ({ row }) => `${row.original.weeks} weeks`,
+ },
+ {
+ header: "Efficiency Curve",
+ size: 200,
+ cell: ({ row }) => (
+ <AbilityChart
+ parentHeight={33}
+ parentWidth={200}
+ data={row.original.curve.data}
+ shadowWeeks={row.original.shadowWeeks}
+ margin={{ top: 0, right: 0, bottom: 0, left: 2 }}
+ />
+ ),
+ },
+ {
+ accessorKey: "id",
+ header: () => <VisuallyHidden>Actions</VisuallyHidden>,
+ cell: ({ row }) => (
+ <Flex justifyContent="end">
+ <ActionMenu>
+ <MenuItem
+ icon={<BsPencilSquare />}
+ onClick={() => {
+ navigate(`/x/resources/ability/${row.original.id}`);
+ }}
+ >
+ Edit Ability
+ </MenuItem>
+ <MenuItem
+ isDisabled={!permissions.can("delete", "resources")}
+ icon={<IoMdTrash />}
+ onClick={() => {
+ navigate(`/x/resources/abilities/delete/${row.original.id}`);
+ }}
+ >
+ Delete Ability
+ </MenuItem>
+ </ActionMenu>
+ </Flex>
+ ),
+ },
+ ];
+ }, [navigate, permissions]);
+
+ return (
+ <Table<typeof rows[number]> data={rows} count={count} columns={columns} />
+ );
+});
+
+AbilitiesTable.displayName = "AbilitiesTable";
+export default AbilitiesTable;
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/AbilitiesTable/index.ts b/apps/carbon/app/interfaces/Resources/Abilities/AbilitiesTable/index.ts
new file mode 100644
index 0000000000..06226f4198
--- /dev/null
+++ b/apps/carbon/app/interfaces/Resources/Abilities/AbilitiesTable/index.ts
@@ -0,0 +1,3 @@
+import AbilitiesTable from "./AbilitiesTable";
+
+export default AbilitiesTable;
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/AbilitiesTableFilters/AbilitiesTableFilters.tsx b/apps/carbon/app/interfaces/Resources/Abilities/AbilitiesTableFilters/AbilitiesTableFilters.tsx
new file mode 100644
index 0000000000..1bcb39f251
--- /dev/null
+++ b/apps/carbon/app/interfaces/Resources/Abilities/AbilitiesTableFilters/AbilitiesTableFilters.tsx
@@ -0,0 +1,46 @@
+import { useColor } from "@carbon/react";
+import { Button, HStack } from "@chakra-ui/react";
+import { Link } from "@remix-run/react";
+import { IoMdAdd } from "react-icons/io";
+import { DebouncedInput } from "~/components/Search";
+import { usePermissions, useUrlParams } from "~/hooks";
+
+const AbilitiesTableFilters = () => {
+ const [params] = useUrlParams();
+ const permissions = usePermissions();
+ const borderColor = useColor("gray.200");
+ return (
+ <HStack
+ borderBottomColor={borderColor}
+ borderBottomStyle="solid"
+ borderBottomWidth={1}
+ justifyContent="space-between"
+ px={4}
+ py={3}
+ w="full"
+ >
+ <HStack spacing={2}>
+ <DebouncedInput
+ param="name"
+ size="sm"
+ minW={180}
+ placeholder="Search by name"
+ />
+ </HStack>
+ <HStack spacing={2}>
+ {permissions.can("create", "resources") && (
+ <Button
+ as={Link}
+ to={`new?${params.toString()}`}
+ colorScheme="brand"
+ leftIcon={<IoMdAdd />}
+ >
+ New Ability
+ </Button>
+ )}
+ </HStack>
+ </HStack>
+ );
+};
+
+export default AbilitiesTableFilters;
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/AbilitiesTableFilters/index.ts b/apps/carbon/app/interfaces/Resources/Abilities/AbilitiesTableFilters/index.ts
new file mode 100644
index 0000000000..9d1df7d801
--- /dev/null
+++ b/apps/carbon/app/interfaces/Resources/Abilities/AbilitiesTableFilters/index.ts
@@ -0,0 +1,3 @@
+import AbilitiesTableFilters from "./AbilitiesTableFilters";
+
+export default AbilitiesTableFilters;
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/AbilityChart/AbilityChart.tsx b/apps/carbon/app/interfaces/Resources/Abilities/AbilityChart/AbilityChart.tsx
new file mode 100644
index 0000000000..b70d4fc8a9
--- /dev/null
+++ b/apps/carbon/app/interfaces/Resources/Abilities/AbilityChart/AbilityChart.tsx
@@ -0,0 +1,236 @@
+import { AxisLeft, AxisBottom } from "@visx/axis";
+import { curveNatural } from "@visx/curve";
+import { Drag } from "@visx/drag";
+import { LinearGradient } from "@visx/gradient";
+import { GridRows, GridColumns } from "@visx/grid";
+import { Group } from "@visx/group";
+import { PatternLines } from "@visx/pattern";
+import { scaleLinear } from "@visx/scale";
+import { AreaClosed, LinePath } from "@visx/shape";
+import { useRef } from "react";
+import type { AbilityDatum } from "~/interfaces/Resources/types";
+
+type AbilityChartProps = {
+ data: AbilityDatum[];
+ shadowWeeks: number;
+ parentHeight: number;
+ parentWidth: number;
+ margin?: { top: number; right: number; bottom: number; left: number };
+ onDataChange?: (data: AbilityDatum[]) => void;
+};
+
+const AbilityChart = ({
+ data,
+ shadowWeeks,
+ parentHeight,
+ parentWidth,
+ margin = { top: 10, right: 20, bottom: 50, left: 40 },
+ onDataChange,
+}: AbilityChartProps) => {
+ const svgRef = useRef<SVGSVGElement>(null);
+
+ if (parentWidth < 50) return null;
+
+ const width = parentWidth - margin.left - margin.right;
+ const height = parentHeight - margin.top - margin.bottom;
+
+ const condensed = height < 100;
+
+ const x = (d: AbilityDatum) => d.week;
+ const y = (d: AbilityDatum) => d.value;
+
+ const lastDataPoint = data[data.length - 1];
+ const maxValue = 100;
+
+ const xScale = scaleLinear<number>({
+ range: [0, width],
+ domain: [0, x(lastDataPoint)],
+ });
+
+ const yScale = scaleLinear<number>({
+ range: [height, 0],
+ domain: [0, maxValue],
+ });
+
+ const interpolateAt = (week: number) => {
+ // find the point on the data monotoneX curve that is closest to the given week
+ const index = data.findIndex((d) => d.week >= week);
+ const prev = data[index - 1];
+ const next = data[index];
+ if (!prev && !next) return 0;
+ if (!prev) return next.value;
+ if (!next) return prev.value;
+ const ratio = (week - prev.week) / (next.week - prev.week);
+ return prev.value + (next.value - prev.value) * ratio;
+ };
+
+ const shadowData: AbilityDatum[] = [
+ ...data.filter((d) => d.week <= shadowWeeks),
+ { week: shadowWeeks, value: interpolateAt(shadowWeeks) },
+ ];
+
+ return (
+ <svg ref={svgRef} width={parentWidth} height={parentHeight}>
+ <Group top={margin.top} left={margin.left}>
+ {!condensed && (
+ <>
+ <GridRows
+ scale={yScale}
+ width={width}
+ height={height}
+ stroke="#e0e0e0"
+ />
+ <GridColumns
+ scale={xScale}
+ width={width}
+ height={height}
+ stroke="#e0e0e0"
+ />
+ <AxisBottom
+ top={height}
+ scale={xScale}
+ numTicks={width > 520 ? 10 : 5}
+ />
+ <text
+ x={xScale(lastDataPoint.week / 2) - 14}
+ y={yScale(0) + 35}
+ fontSize={10}
+ >
+ Week
+ </text>
+
+ <text x="-70" y="15" transform="rotate(-90)" fontSize={10}>
+ Efficiency (%)
+ </text>
+
+ <LinearGradient
+ id="fill"
+ from="var(--chakra-colors-lime-200)"
+ to="var(--chakra-colors-gray-500)"
+ fromOpacity={0.2}
+ toOpacity={0}
+ />
+
+ <PatternLines
+ id="diagonalLines"
+ height={6}
+ width={6}
+ stroke="var(--chakra-colors-gray-500)"
+ strokeWidth={1}
+ orientation={["diagonal"]}
+ />
+ <AreaClosed
+ stroke="transparent"
+ data={data}
+ yScale={yScale}
+ x={(d) => xScale(x(d))}
+ y={(d) => yScale(y(d))}
+ fill="url(#fill)"
+ curve={curveNatural}
+ />
+
+ <AreaClosed
+ stroke="transparent"
+ data={shadowData}
+ yScale={yScale}
+ x={(d) => xScale(x(d))}
+ y={(d) => yScale(y(d))}
+ fill="url(#diagonalLines)"
+ curve={curveNatural}
+ />
+ </>
+ )}
+ <AxisLeft
+ scale={yScale}
+ numTicks={condensed ? 0 : undefined}
+ hideTicks={condensed}
+ />
+ <LinePath
+ data={data}
+ y={(d) => yScale(y(d))}
+ x={(d) => xScale(x(d))}
+ stroke="var(--chakra-colors-lime-700)"
+ strokeOpacity="0.8"
+ strokeWidth={2}
+ curve={curveNatural}
+ />
+ <LinePath
+ data={shadowData}
+ y={(d) => yScale(y(d))}
+ x={(d) => xScale(x(d))}
+ stroke="var(--chakra-colors-gray-900)"
+ strokeOpacity="0.5"
+ strokeWidth={2}
+ curve={curveNatural}
+ />
+ {!condensed &&
+ data.map((d, index) => (
+ <Drag
+ key={`drag-${index}`}
+ width={width}
+ height={height}
+ x={xScale(x(d))}
+ y={yScale(y(d))}
+ snapToPointer={false}
+ restrict={
+ index === data.length - 1
+ ? // The last point must be in the top right corner
+ {
+ xMin: xScale(lastDataPoint.week),
+ xMax: xScale(lastDataPoint.week),
+ yMin: yScale(maxValue),
+ yMax: yScale(maxValue),
+ }
+ : index === 0
+ ? // The first point must be at time 0, and less than the second point
+ {
+ xMin: xScale(0),
+ xMax: xScale(0),
+ yMin: yScale(data[index + 1].value),
+ yMax: yScale(0),
+ }
+ : // All other data must be between the previous and next point
+ {
+ xMin: xScale(data[index - 1].week),
+ xMax: xScale(data[index + 1].week),
+ yMin: yScale(data[index + 1].value),
+ yMax: yScale(data[index - 1].value),
+ }
+ }
+ onDragMove={({ dx, dy }) => {
+ const newData = [...data];
+ newData[index] = {
+ ...newData[index],
+ week: newData[index].week + xScale.invert(dx),
+ value: newData[index].value + yScale.invert(dy) - 100,
+ };
+ onDataChange?.(newData);
+ }}
+ >
+ {({ dragStart, dragEnd, dragMove, isDragging, x, y, dx, dy }) => (
+ <circle
+ key={`dot-${index}`}
+ cx={x}
+ cy={y}
+ r={isDragging ? 10 : 6}
+ fill={"var(--chakra-colors-lime-700)"}
+ transform={`translate(${dx}, ${dy})`}
+ fillOpacity={0.9}
+ stroke="var(--chakra-colors-lime-900)"
+ strokeWidth={2}
+ onMouseMove={dragMove}
+ onMouseUp={dragEnd}
+ onMouseDown={dragStart}
+ onTouchStart={dragStart}
+ onTouchMove={dragMove}
+ onTouchEnd={dragEnd}
+ />
+ )}
+ </Drag>
+ ))}
+ </Group>
+ </svg>
+ );
+};
+
+export default AbilityChart;
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/AbilityChart/index.ts b/apps/carbon/app/interfaces/Resources/Abilities/AbilityChart/index.ts
new file mode 100644
index 0000000000..d46627c229
--- /dev/null
+++ b/apps/carbon/app/interfaces/Resources/Abilities/AbilityChart/index.ts
@@ -0,0 +1,3 @@
+import AbilityChart from "./AbilityChart";
+
+export default AbilityChart;
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/AbilityEmployeesTable/AbilityEmployeesTable.tsx b/apps/carbon/app/interfaces/Resources/Abilities/AbilityEmployeesTable/AbilityEmployeesTable.tsx
new file mode 100644
index 0000000000..2cede83c5a
--- /dev/null
+++ b/apps/carbon/app/interfaces/Resources/Abilities/AbilityEmployeesTable/AbilityEmployeesTable.tsx
@@ -0,0 +1,174 @@
+import { ActionMenu } from "@carbon/react";
+import {
+ Badge,
+ Flex,
+ HStack,
+ MenuItem,
+ Progress,
+ VisuallyHidden,
+} from "@chakra-ui/react";
+import { useNavigate, useParams } from "@remix-run/react";
+import type { ColumnDef } from "@tanstack/react-table";
+import { useMemo } from "react";
+import { BsPencilSquare } from "react-icons/bs";
+import { IoMdTrash } from "react-icons/io";
+import { Avatar, Table } from "~/components";
+import { usePermissions } from "~/hooks";
+import { AbilityEmployeeStatus } from "~/interfaces/Resources/types";
+import type { AbilityEmployees } from "~/interfaces/Resources/types";
+
+type AbilityEmployeeTableProps = {
+ employees: AbilityEmployees;
+ weeks: number;
+ shadowWeeks: number;
+};
+
+const AbilityEmployeesTable = ({
+ employees,
+ weeks,
+}: AbilityEmployeeTableProps) => {
+ const { abilityId } = useParams();
+ const navigate = useNavigate();
+ const permissions = usePermissions();
+
+ const rows = useMemo(
+ () =>
+ Array.isArray(employees)
+ ? employees
+ .filter((employee) => {
+ // @ts-ignore
+ return employee.user?.active === true;
+ })
+ .map((employee) => {
+ if (Array.isArray(employee.user)) {
+ throw new Error("AbilityEmployeesTable: user is an array");
+ }
+
+ return {
+ id: employee.id,
+ name: employee.user?.fullName ?? "",
+ avatarUrl: employee.user?.avatarUrl ?? null,
+ status: employee.trainingCompleted
+ ? AbilityEmployeeStatus.Complete
+ : employee.trainingDays
+ ? AbilityEmployeeStatus.InProgress
+ : AbilityEmployeeStatus.NotStarted,
+ percentage: (employee.trainingDays / 5 / weeks) * 100,
+ };
+ })
+ : [],
+ [employees, weeks]
+ );
+
+ const columns = useMemo<ColumnDef<typeof rows[number]>[]>(() => {
+ return [
+ {
+ // accessorKey: "name",
+ header: "Name",
+ cell: ({ row }) => (
+ <HStack spacing={2}>
+ <Avatar
+ size="sm"
+ // @ts-ignore
+ name={row.original.name}
+ // @ts-ignore
+ path={row.original.avatarUrl}
+ />
+
+ <span>{row.original.name}</span>
+ </HStack>
+ ),
+ },
+ {
+ header: "Training Status",
+ cell: ({ row }) => {
+ const status = row.original.status;
+ return (
+ <Badge
+ size="sm"
+ variant={
+ status === AbilityEmployeeStatus.Complete
+ ? undefined
+ : "outline"
+ }
+ colorScheme={
+ status === AbilityEmployeeStatus.Complete
+ ? "green"
+ : status === AbilityEmployeeStatus.InProgress
+ ? "yellow"
+ : "gray"
+ }
+ >
+ {status}
+ </Badge>
+ );
+ },
+ },
+ {
+ header: "Training Progress",
+ width: 200,
+ cell: ({ row }) => {
+ const percentage = row.original.percentage;
+ return (
+ <Progress
+ size="md"
+ borderRadius="full"
+ maxW={200}
+ colorScheme="green"
+ value={
+ row.original.status === AbilityEmployeeStatus.Complete
+ ? 100
+ : percentage
+ }
+ />
+ );
+ },
+ },
+ {
+ accessorKey: "id",
+ header: () => <VisuallyHidden>Actions</VisuallyHidden>,
+ cell: ({ row }) => (
+ <Flex justifyContent="end">
+ <ActionMenu>
+ <MenuItem
+ isDisabled={!permissions.can("update", "resources")}
+ icon={<BsPencilSquare />}
+ onClick={() => {
+ navigate(
+ `/x/resources/ability/${abilityId}/employee/${row.original.id}`
+ );
+ }}
+ >
+ Edit Employee Ability
+ </MenuItem>
+ <MenuItem
+ isDisabled={!permissions.can("delete", "resources")}
+ icon={<IoMdTrash />}
+ onClick={() => {
+ navigate(
+ `/x/resources/ability/${abilityId}/employee/delete/${row.original.id}`
+ );
+ }}
+ >
+ Delete Employee Ability
+ </MenuItem>
+ </ActionMenu>
+ </Flex>
+ ),
+ },
+ ];
+ }, []);
+
+ if (!abilityId) return null;
+
+ return (
+ <Table<typeof rows[number]>
+ data={rows}
+ count={rows.length}
+ columns={columns}
+ withPagination={false}
+ />
+ );
+};
+
+export default AbilityEmployeesTable;
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/AbilityEmployeesTable/index.ts b/apps/carbon/app/interfaces/Resources/Abilities/AbilityEmployeesTable/index.ts
new file mode 100644
index 0000000000..1f0759744e
--- /dev/null
+++ b/apps/carbon/app/interfaces/Resources/Abilities/AbilityEmployeesTable/index.ts
@@ -0,0 +1,3 @@
+import AbilityEmployeesTable from "./AbilityEmployeesTable";
+
+export default AbilityEmployeesTable;
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/AbilityForm/AbilityForm.tsx b/apps/carbon/app/interfaces/Resources/Abilities/AbilityForm/AbilityForm.tsx
new file mode 100644
index 0000000000..2131cf3b08
--- /dev/null
+++ b/apps/carbon/app/interfaces/Resources/Abilities/AbilityForm/AbilityForm.tsx
@@ -0,0 +1,115 @@
+import {
+ Button,
+ Drawer,
+ DrawerBody,
+ DrawerCloseButton,
+ DrawerContent,
+ DrawerFooter,
+ DrawerHeader,
+ DrawerOverlay,
+ HStack,
+ VStack,
+} from "@chakra-ui/react";
+import { useNavigate } from "@remix-run/react";
+import { useState } from "react";
+import { ValidatedForm } from "remix-validated-form";
+import {
+ Employees,
+ Hidden,
+ Input,
+ Number,
+ Select,
+ Submit,
+} from "~/components/Form";
+import { usePermissions } from "~/hooks";
+import { abilityValidator } from "~/services/resources";
+
+type AbilityFormProps = {
+ initialValues: {
+ name: string;
+ startingPoint: number;
+ shadowWeeks: number;
+ weeks: number;
+ employees: string[];
+ };
+};
+
+const AbilityForm = ({ initialValues }: AbilityFormProps) => {
+ const permissions = usePermissions();
+ const navigate = useNavigate();
+ const onClose = () => navigate(-1);
+ const [maxShadowWeeks, setMaxShadowWeeks] = useState(initialValues.weeks);
+
+ const onWeekChange = (_: string, value: number) => {
+ setMaxShadowWeeks(value);
+ };
+
+ const isDisabled = !permissions.can("create", "resources");
+
+ return (
+ <Drawer onClose={onClose} isOpen={true} size="sm">
+ <ValidatedForm
+ validator={abilityValidator}
+ method="post"
+ action={"/x/resources/abilities/new"}
+ defaultValues={initialValues}
+ >
+ <DrawerOverlay />
+ <DrawerContent>
+ <DrawerCloseButton />
+ <DrawerHeader>New Ability</DrawerHeader>
+ <DrawerBody pb={8}>
+ <Hidden name="id" />
+ <VStack spacing={4} alignItems="start">
+ <Input name="name" label="Name" />
+ <Select
+ name="startingPoint"
+ label="Learning Curve"
+ options={[
+ { value: 85, label: "Easy" },
+ { value: 70, label: "Medium" },
+ { value: 50, label: "Hard" },
+ ]}
+ />
+ <Number
+ name="weeks"
+ label="Time to Efficiency (Weeks)"
+ onChange={onWeekChange}
+ min={0}
+ max={52}
+ />
+ <Number
+ name="shadowWeeks"
+ label="Time Shadowing (Weeks)"
+ helperText="Non-productive time spent shadowing another employee"
+ min={0}
+ max={maxShadowWeeks}
+ />
+ <Employees
+ name="employees"
+ selectionsMaxHeight={"calc(100vh - 330px)"}
+ label="Employees"
+ helperText="Employees who already have this ability"
+ />
+ </VStack>
+ </DrawerBody>
+ <DrawerFooter>
+ <HStack spacing={2}>
+ <Submit isDisabled={isDisabled}>Save</Submit>
+ <Button
+ size="md"
+ colorScheme="gray"
+ variant="solid"
+ onClick={onClose}
+ >
+ Cancel
+ </Button>
+ </HStack>
+ </DrawerFooter>
+ </DrawerContent>
+ </ValidatedForm>
+ </Drawer>
+ );
+};
+
+export default AbilityForm;
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/AbilityForm/index.ts b/apps/carbon/app/interfaces/Resources/Abilities/AbilityForm/index.ts
new file mode 100644
index 0000000000..aa2e0a96e4
--- /dev/null
+++ b/apps/carbon/app/interfaces/Resources/Abilities/AbilityForm/index.ts
@@ -0,0 +1,3 @@
+import AbilityForm from "./AbilityForm";
+
+export default AbilityForm;
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/EmployeeAbilityForm/EmployeeAbilityForm.tsx b/apps/carbon/app/interfaces/Resources/Abilities/EmployeeAbilityForm/EmployeeAbilityForm.tsx
new file mode 100644
index 0000000000..6123f283f7
--- /dev/null
+++ b/apps/carbon/app/interfaces/Resources/Abilities/EmployeeAbilityForm/EmployeeAbilityForm.tsx
@@ -0,0 +1,141 @@
+import {
+ Button,
+ Drawer,
+ DrawerBody,
+ DrawerCloseButton,
+ DrawerContent,
+ DrawerFooter,
+ DrawerHeader,
+ DrawerOverlay,
+ HStack,
+ VStack,
+} from "@chakra-ui/react";
+import { useParams } from "@remix-run/react";
+import { useState } from "react";
+import { ValidatedForm } from "remix-validated-form";
+import { Employee, Hidden, Select, Slider, Submit } from "~/components/Form";
+import { usePermissions } from "~/hooks";
+import type { Ability } from "~/interfaces/Resources/types";
+import { AbilityEmployeeStatus } from "~/interfaces/Resources/types";
+import { employeeAbilityValidator } from "~/services/resources";
+
+type EmployeeAbilityFormProps = {
+ ability?: Ability;
+ weeks: number;
+ initialValues: {
+ employeeId?: string;
+ trainingStatus?: AbilityEmployeeStatus;
+ trainingPercent?: number;
+ };
+ onClose: () => void;
+};
+
+const defaultPercent = 50;
+
+const EmployeeAbilityForm = ({
+ ability,
+ weeks,
+ initialValues,
+ onClose,
+}: EmployeeAbilityFormProps) => {
+ const { id } = useParams();
+ const permissions = usePermissions();
+ const isEditing = initialValues.employeeId !== undefined;
+ const isDisabled = isEditing
+ ? !permissions.can("update", "resources")
+ : !permissions.can("create", "resources");
+
+ const days = (percent: number) => weeks * 5 * (percent / 100);
+ const [trainingDays, setTrainingDays] = useState(
+ days(initialValues.trainingPercent ?? defaultPercent)
+ );
+ const updateTrainingDays = (percent: number) => {
+ setTrainingDays(days(percent));
+ };
+
+ const [inProgress, setInProgress] = useState(
+ initialValues?.trainingStatus === AbilityEmployeeStatus.InProgress
+ );
+
+ if (!ability) return null;
+
+ return (
+ <Drawer onClose={onClose} isOpen={true} size="sm">
+ <ValidatedForm
+ validator={employeeAbilityValidator}
+ method="post"
+ action={
+ isEditing
+ ? `/x/resources/ability/${ability.id}/employee/${id}`
+ : `/x/resources/ability/${ability.id}/employee/new`
+ }
+ defaultValues={initialValues}
+ >
+ <DrawerOverlay />
+ <DrawerContent>
+ <DrawerCloseButton />
+ <DrawerHeader>{isEditing ? "Edit" : "New"} Employee</DrawerHeader>
+ <DrawerBody pb={8}>
+ <VStack spacing={4} alignItems="start">
+ <Employee
+ name="employeeId"
+ label="Employee"
+ readOnly={isEditing}
+ />
+ <Select
+ name="trainingStatus"
+ label="Training Status"
+ onChange={({ value }) => {
+ setInProgress(value === AbilityEmployeeStatus.InProgress);
+ }}
+ options={[
+ {
+ value: AbilityEmployeeStatus.NotStarted,
+ label: "Not Started",
+ },
+ {
+ value: AbilityEmployeeStatus.InProgress,
+ label: "In Progress",
+ },
+ {
+ value: AbilityEmployeeStatus.Complete,
+ label: "Complete",
+ },
+ ]}
+ />
+ {inProgress && (
+ <>
+ <Slider
+ name="trainingPercent"
+ label="Training Percent"
+ onChange={(value) => updateTrainingDays(value)}
+ defaultValue={defaultPercent}
+ min={0}
+ max={100}
+ step={10}
+ />
+ <Hidden name="trainingDays" value={trainingDays} />
+ </>
+ )}
+ </VStack>
+ </DrawerBody>
+ <DrawerFooter>
+ <HStack spacing={2}>
+ <Submit isDisabled={isDisabled}>Save</Submit>
+ <Button
+ size="md"
+ colorScheme="gray"
+ variant="solid"
+ onClick={onClose}
+ >
+ Cancel
+ </Button>
+ </HStack>
+ </DrawerFooter>
+ </DrawerContent>
+ </ValidatedForm>
+ </Drawer>
+ );
+};
+
+export default EmployeeAbilityForm;
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/EmployeeAbilityForm/index.ts b/apps/carbon/app/interfaces/Resources/Abilities/EmployeeAbilityForm/index.ts
new file mode 100644
index 0000000000..2c0896d6fc
--- /dev/null
+++ b/apps/carbon/app/interfaces/Resources/Abilities/EmployeeAbilityForm/index.ts
@@ -0,0 +1,3 @@
+import EmployeeAbilityForm from "./EmployeeAbilityForm";
+
+export default EmployeeAbilityForm;
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/index.ts b/apps/carbon/app/interfaces/Resources/Abilities/index.ts
new file mode 100644
index 0000000000..1dc60cca60
--- /dev/null
+++ b/apps/carbon/app/interfaces/Resources/Abilities/index.ts
@@ -0,0 +1,15 @@
+import AbilityChart from "./AbilityChart";
+import AbilitiesTable from "./AbilitiesTable";
+import AbilitiesTableFilters from "./AbilitiesTableFilters";
+import AbilityForm from "./AbilityForm";
+import AbilityEmployeesTable from "./AbilityEmployeesTable";
+import EmployeeAbilityForm from "./EmployeeAbilityForm";
+
+export {
+ AbilityChart,
+ AbilitiesTable,
+ AbilitiesTableFilters,
+ AbilityForm,
+ AbilityEmployeesTable,
+ EmployeeAbilityForm,
+};
diff --git a/apps/carbon/app/interfaces/Resources/People/index.ts b/apps/carbon/app/interfaces/Resources/People/index.ts
new file mode 100644
index 0000000000..98c1588d21
--- /dev/null
+++ b/apps/carbon/app/interfaces/Resources/People/index.ts
@@ -0,0 +1,4 @@
+import PeopleTable from "./PeopleTable";
+import PeopleTableFilters from "./PeopleTableFilters";
+
+export { PeopleTable, PeopleTableFilters };
diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonSchedule/PersonSchedule.tsx b/apps/carbon/app/interfaces/Resources/Person/PersonSchedule/PersonSchedule.tsx
new file mode 100644
index 0000000000..48aa473773
--- /dev/null
+++ b/apps/carbon/app/interfaces/Resources/Person/PersonSchedule/PersonSchedule.tsx
@@ -0,0 +1,14 @@
+import { Card, CardBody, CardHeader, Heading } from "@chakra-ui/react";
+
+const PersonSchedule = () => {
+ return (
+ <Card w="full">
+ <CardHeader>
+ <Heading size="md">Schedule</Heading>
+ </CardHeader>
+ <CardBody></CardBody>
+ </Card>
+ );
+};
+
+export default PersonSchedule;
diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonSchedule/index.ts b/apps/carbon/app/interfaces/Resources/Person/PersonSchedule/index.ts
new file mode 100644
index 0000000000..95c9408f0f
--- /dev/null
+++ b/apps/carbon/app/interfaces/Resources/Person/PersonSchedule/index.ts
@@ -0,0 +1,3 @@
+import PersonSchedule from "./PersonSchedule";
+
+export default PersonSchedule;
diff --git a/apps/carbon/app/interfaces/Resources/Person/index.ts b/apps/carbon/app/interfaces/Resources/Person/index.ts
new file mode 100644
index 0000000000..e8a053187a
--- /dev/null
+++ b/apps/carbon/app/interfaces/Resources/Person/index.ts
@@ -0,0 +1,13 @@
+import PersonAbilities from "./PersonAbilities";
+import PersonHeader from "./PersonHeader";
+import PersonNotes from "./PersonNotes";
+import PersonTabs from "./PersonTabs";
+import PersonSchedule from "./PersonSchedule";
+
+export {
+ PersonAbilities,
+ PersonHeader,
+ PersonNotes,
+ PersonTabs,
+ PersonSchedule,
+};
diff --git a/apps/carbon/app/interfaces/Resources/index.ts b/apps/carbon/app/interfaces/Resources/index.ts
index 5018b42e88..ff16b414fc 100644
--- a/apps/carbon/app/interfaces/Resources/index.ts
+++ b/apps/carbon/app/interfaces/Resources/index.ts
@@ -1,17 +1,3 @@
-import PeopleTable from "./People/PeopleTable";
-import PeopleTableFilters from "./People/PeopleTableFilters";
-import PersonAbilities from "./Person/PersonAbilities";
-import PersonHeader from "./Person/PersonHeader";
-import PersonNotes from "./Person/PersonNotes";
-import PersonTabs from "./Person/PersonTabs";
import useResourcesSidebar from "./useResourcesSidebar";
-export {
- PeopleTable,
- PeopleTableFilters,
- PersonAbilities,
- PersonHeader,
- PersonNotes,
- PersonTabs,
- useResourcesSidebar,
-};
+export { useResourcesSidebar };
diff --git a/apps/carbon/app/interfaces/Resources/types.ts b/apps/carbon/app/interfaces/Resources/types.ts
index 2ca217df27..3d49c6aa16 100644
--- a/apps/carbon/app/interfaces/Resources/types.ts
+++ b/apps/carbon/app/interfaces/Resources/types.ts
@@ -4,8 +4,33 @@ import type {
getAttributeCategory,
getPeople,
getNotes,
+ getAbility,
+ getAbilities,
} from "~/services/resources";
+export type Ability = NonNullable<
+ Awaited<ReturnType<typeof getAbility>>["data"]
+>;
+
+export type Abilities = NonNullable<
+ Awaited<ReturnType<typeof getAbilities>>["data"]
+>;
+
+export type AbilityDatum = {
+ week: number;
+ value: number;
+};
+
+export type AbilityEmployees = NonNullable<
+ NonNullable<Awaited<ReturnType<typeof getAbility>>["data"]>["employeeAbility"]
+>;
+
+export enum AbilityEmployeeStatus {
+ NotStarted = "Not Started",
+ InProgress = "In Progress",
+ Complete = "Complete",
+}
+
export type Attribute = NonNullable<
Awaited<ReturnType<typeof getAttribute>>["data"]
>;
diff --git a/apps/carbon/app/interfaces/Sales/Customers/CustomerForm/CustomerForm.tsx b/apps/carbon/app/interfaces/Sales/Customers/CustomerForm/CustomerForm.tsx
index 47d21dcb26..47e84b15cd 100644
--- a/apps/carbon/app/interfaces/Sales/Customers/CustomerForm/CustomerForm.tsx
+++ b/apps/carbon/app/interfaces/Sales/Customers/CustomerForm/CustomerForm.tsx
@@ -15,10 +15,10 @@ import {
import { useNavigate } from "@remix-run/react";
import { ValidatedForm } from "remix-validated-form";
import {
+ Employee,
Input,
Select,
Submit,
- User,
TextArea,
Hidden,
} from "~/components/Form";
@@ -123,7 +123,7 @@ const CustomerForm = ({
options={customerTypeOptions}
placeholder="Select Customer Type"
/>
- <User name="accountManagerId" label="Account Manager" />
+ <Employee name="accountManagerId" label="Account Manager" />
<Select
name="customerStatusId"
label="Customer Status"
diff --git a/apps/carbon/app/interfaces/Users/Employees/BulkEditPermissionsForm/BulkEditPermissionsForm.tsx b/apps/carbon/app/interfaces/Users/Employees/BulkEditPermissionsForm/BulkEditPermissionsForm.tsx
index 7db2d5a4ea..d4a350ca5f 100644
--- a/apps/carbon/app/interfaces/Users/Employees/BulkEditPermissionsForm/BulkEditPermissionsForm.tsx
+++ b/apps/carbon/app/interfaces/Users/Employees/BulkEditPermissionsForm/BulkEditPermissionsForm.tsx
@@ -15,7 +15,7 @@ import {
import { useFetcher } from "@remix-run/react";
import { useEffect, useState } from "react";
import { ValidatedForm } from "remix-validated-form";
-import { Hidden, Radios, Submit, Users } from "~/components/Form";
+import { Employees, Hidden, Radios, Submit } from "~/components/Form";
import { bulkPermissionsValidator } from "~/services/users";
import PermissionCheckboxes from "../../components/Permission";
import type { Permission } from "../../types";
@@ -109,9 +109,8 @@ const BulkEditPermissions = ({
/>
</Box>
- <Users
+ <Employees
name="userIds"
- usersOnly
selectionsMaxHeight={"calc(100vh - 330px)"}
label="Users to Update"
/>
diff --git a/apps/carbon/app/interfaces/Users/Groups/GroupsForm/GroupsForm.tsx b/apps/carbon/app/interfaces/Users/Groups/GroupsForm/GroupsForm.tsx
index fddd0e4646..7de342f8ad 100644
--- a/apps/carbon/app/interfaces/Users/Groups/GroupsForm/GroupsForm.tsx
+++ b/apps/carbon/app/interfaces/Users/Groups/GroupsForm/GroupsForm.tsx
@@ -29,10 +29,12 @@ const GroupForm = ({ initialValues }: GroupFormProps) => {
const navigate = useNavigate();
const onClose = () => navigate(-1);
+ console.log(initialValues.selections);
+
const isEditing = initialValues.id !== undefined;
const isDisabled = isEditing
- ? !permissions.can("update", "purchasing")
- : !permissions.can("create", "purchasing");
+ ? !permissions.can("update", "users")
+ : !permissions.can("create", "users");
return (
<Drawer onClose={onClose} isOpen={true} size="sm">
diff --git a/apps/carbon/app/routes/resource+/users.groups.tsx b/apps/carbon/app/routes/resource+/users.groups.tsx
index 7cd9682e6c..c432379298 100644
--- a/apps/carbon/app/routes/resource+/users.groups.tsx
+++ b/apps/carbon/app/routes/resource+/users.groups.tsx
@@ -7,11 +7,22 @@ import { flash } from "~/services/session";
import { error } from "~/utils/result";
export async function loader({ request }: LoaderArgs) {
- const authorized = await requirePermissions(request, {
+ const { client } = await requirePermissions(request, {
role: "employee",
});
- const groups = await authorized.client.from("groups_view").select("*");
+ const url = new URL(request.url);
+ const searchParams = new URLSearchParams(url.search);
+ const type = searchParams.get("type");
+
+ const query = client.from("groups_view").select("*");
+
+ if (type === "employee") query.eq("isEmployeeTypeGroup", true);
+ if (type === "customer") query.eq("isCustomerOrgGroup", true);
+ if (type === "supplier") query.eq("isSupplierOrgGroup", true);
+
+ const groups = await query;
+
if (groups.error) {
return json(
{ groups: [], error: groups.error },
diff --git a/apps/carbon/app/routes/x+/resources.abilities.delete.$abilityId.tsx b/apps/carbon/app/routes/x+/resources.abilities.delete.$abilityId.tsx
new file mode 100644
index 0000000000..3497c6eebd
--- /dev/null
+++ b/apps/carbon/app/routes/x+/resources.abilities.delete.$abilityId.tsx
@@ -0,0 +1,80 @@
+import type { ActionArgs, LoaderArgs } from "@remix-run/node";
+import { json, redirect } from "@remix-run/node";
+import { useLoaderData, useNavigate, useParams } from "@remix-run/react";
+import { ConfirmDelete } from "~/components/Modals";
+import { requirePermissions } from "~/services/auth";
+import { deleteAbility, getAbility } from "~/services/resources";
+import { flash } from "~/services/session";
+import { error, success } from "~/utils/result";
+import { notFound } from "~/utils/http";
+
+export async function loader({ request, params }: LoaderArgs) {
+ const { client } = await requirePermissions(request, {
+ view: "resources",
+ role: "employee",
+ });
+
+ const { abilityId } = params;
+ if (!abilityId) throw notFound("abilityId not found");
+
+ const ability = await getAbility(client, abilityId);
+ if (ability.error) {
+ return redirect(
+ "/x/resources/abilities",
+ await flash(request, error(ability.error, "Failed to get ability"))
+ );
+ }
+
+ return json({
+ ability: ability.data,
+ });
+}
+
+export async function action({ request, params }: ActionArgs) {
+ const { client } = await requirePermissions(request, {
+ delete: "resources",
+ });
+
+ const { abilityId } = params;
+ if (!abilityId) {
+ return redirect(
+ "/x/resources/abilities",
+ await flash(request, error(params, "Failed to get ability id"))
+ );
+ }
+
+ const { error: deleteAbilityError } = await deleteAbility(client, abilityId);
+ if (deleteAbilityError) {
+ return redirect(
+ "/x/resources/abilities",
+ await flash(
+ request,
+ error(deleteAbilityError, "Failed to delete ability")
+ )
+ );
+ }
+
+ return redirect(
+ "/x/resources/abilities",
+ await flash(request, success("Successfully deleted employee type"))
+ );
+}
+
+export default function DeleteEmployeeTypeRoute() {
+ const { abilityId } = useParams();
+ const { ability } = useLoaderData<typeof loader>();
+ const navigate = useNavigate();
+
+ if (!abilityId || !ability) return null; // TODO - handle this better (404?)
+
+ const onCancel = () => navigate("/x/resources/abilities");
+
+ return (
+ <ConfirmDelete
+ action={`/x/resources/abilities/delete/${abilityId}`}
+ name={ability.name}
+ text={`Are you sure you want to delete the ability: ${ability.name}? This cannot be undone.`}
+ onCancel={onCancel}
+ />
+ );
+}
diff --git a/apps/carbon/app/routes/x+/resources.abilities.new.tsx b/apps/carbon/app/routes/x+/resources.abilities.new.tsx
new file mode 100644
index 0000000000..6609b32ed7
--- /dev/null
+++ b/apps/carbon/app/routes/x+/resources.abilities.new.tsx
@@ -0,0 +1,117 @@
+import type { ActionArgs } from "@remix-run/node";
+import { redirect } from "@remix-run/node";
+import { json } from "@remix-run/node";
+import { validationError } from "remix-validated-form";
+import { AbilityForm } from "~/interfaces/Resources/Abilities";
+import { assertIsPost } from "~/utils/http";
+import { error, success } from "~/utils/result";
+import { requirePermissions } from "~/services/auth";
+import { flash } from "~/services/session";
+import {
+ abilityValidator,
+ deleteAbility,
+ insertAbility,
+ insertEmployeeAbilities,
+} from "~/services/resources";
+
+function makeCurve(startingPoint: number, weeks: number) {
+ return {
+ data: [
+ {
+ week: 0,
+ value: startingPoint,
+ },
+ {
+ week: weeks / 4,
+ value: (100 - startingPoint) * 0.5 + startingPoint,
+ },
+ {
+ week: weeks / 2,
+ value: 100 - (100 - startingPoint) * 0.25,
+ },
+ {
+ week: weeks,
+ value: 100,
+ },
+ ],
+ };
+}
+
+export async function action({ request }: ActionArgs) {
+ assertIsPost(request);
+ const { client, userId } = await requirePermissions(request, {
+ create: "resources",
+ });
+
+ const validation = await abilityValidator.validate(await request.formData());
+
+ if (validation.error) {
+ return validationError(validation.error);
+ }
+
+ const { name, startingPoint, shadowWeeks, weeks, employees } =
+ validation.data;
+
+ const createAbility = await insertAbility(client, {
+ name,
+ curve: makeCurve(startingPoint, weeks),
+ shadowWeeks,
+ createdBy: userId,
+ });
+ if (createAbility.error) {
+ return json(
+ {},
+ await flash(
+ request,
+ error(createAbility.error, "Failed to insert ability")
+ )
+ );
+ }
+
+ const abilityId = createAbility.data[0]?.id;
+ if (!abilityId) {
+ return json(
+ {},
+ await flash(request, error(createAbility, "Failed to insert ability"))
+ );
+ }
+
+ if (employees) {
+ const createEmployeeAbilities = await insertEmployeeAbilities(
+ client,
+ abilityId,
+ employees
+ );
+
+ if (createEmployeeAbilities.error) {
+ await deleteAbility(client, abilityId, true);
+ return json(
+ {},
+ await flash(
+ request,
+ error(
+ createEmployeeAbilities.error,
+ "Failed to insert ability members"
+ )
+ )
+ );
+ }
+ }
+
+ return redirect(
+ "/x/resources/abilities",
+ await flash(request, success(`Ability created`))
+ );
+}
+
+export default function NewAbilityRoute() {
+ const initialValues = {
+ name: "",
+ startingPoint: 85,
+ shadowWeeks: 0,
+ weeks: 4,
+ employees: [],
+ };
+
+ return <AbilityForm initialValues={initialValues} />;
+}
diff --git a/apps/carbon/app/routes/x+/resources.abilities.tsx b/apps/carbon/app/routes/x+/resources.abilities.tsx
new file mode 100644
index 0000000000..fad1710853
--- /dev/null
+++ b/apps/carbon/app/routes/x+/resources.abilities.tsx
@@ -0,0 +1,52 @@
+import { VStack } from "@chakra-ui/react";
+import type { LoaderArgs } from "@remix-run/node";
+import { redirect } from "@remix-run/node";
+import { json } from "@remix-run/node";
+import { Outlet, useLoaderData } from "@remix-run/react";
+import {
+ AbilitiesTable,
+ AbilitiesTableFilters,
+} from "~/interfaces/Resources/Abilities";
+import { requirePermissions } from "~/services/auth";
+import { flash } from "~/services/session";
+import { getAbilities } from "~/services/resources";
+import { getGenericQueryFilters } from "~/utils/query";
+import { error } from "~/utils/result";
+
+export async function loader({ request }: LoaderArgs) {
+ const { client } = await requirePermissions(request, {
+ view: "users",
+ role: "employee",
+ });
+
+ const url = new URL(request.url);
+ const searchParams = new URLSearchParams(url.search);
+ const name = searchParams.get("name");
+ const { limit, offset, sorts } = getGenericQueryFilters(searchParams);
+
+ const abilities = await getAbilities(client, { name, limit, offset, sorts });
+
+ if (abilities.error) {
+ return redirect(
+ "/x/resources",
+ await flash(request, error(abilities.error, "Failed to load abilities"))
+ );
+ }
+
+ return json({
+ abilities: abilities.data ?? [],
+ count: abilities.count ?? 0,
+ });
+}
+
+export default function AbilitiesRoute() {
+ const { abilities, count } = useLoaderData<typeof loader>();
+
+ return (
+ <VStack w="full" h="full" spacing={0}>
+ <AbilitiesTableFilters />
+ <AbilitiesTable data={abilities} count={count} />
+ <Outlet />
+ </VStack>
+ );
+}
diff --git a/apps/carbon/app/routes/x+/resources.ability.$abilityId.employee.$id.tsx b/apps/carbon/app/routes/x+/resources.ability.$abilityId.employee.$id.tsx
new file mode 100644
index 0000000000..19c7a53d89
--- /dev/null
+++ b/apps/carbon/app/routes/x+/resources.ability.$abilityId.employee.$id.tsx
@@ -0,0 +1,141 @@
+import type { ActionArgs, LoaderArgs } from "@remix-run/node";
+import { redirect } from "@remix-run/node";
+import { useLoaderData, useNavigate, useParams } from "@remix-run/react";
+import { validationError } from "remix-validated-form";
+import { useRouteData } from "~/hooks";
+import { EmployeeAbilityForm } from "~/interfaces/Resources/Abilities";
+import type { Ability } from "~/interfaces/Resources/types";
+import { AbilityEmployeeStatus } from "~/interfaces/Resources/types";
+import { requirePermissions } from "~/services/auth";
+import {
+ employeeAbilityValidator,
+ getEmployeeAbility,
+ upsertEmployeeAbility,
+} from "~/services/resources";
+import { flash } from "~/services/session";
+import { error, success } from "~/utils/result";
+
+export async function loader({ request, params }: LoaderArgs) {
+ const { client } = await requirePermissions(request, {
+ view: "resources",
+ });
+
+ // get the abilityId and id from the params
+ const { abilityId, id } = params;
+ if (!abilityId) {
+ throw new Error("Ability ID not found");
+ }
+
+ if (!id) {
+ throw new Error("Employee ID not found");
+ }
+
+ const employeeAbility = await getEmployeeAbility(client, abilityId, id);
+ if (employeeAbility.error)
+ redirect(
+ "/x/resources/abilities",
+ await flash(
+ request,
+ error(employeeAbility.error, "Failed to get employee ability")
+ )
+ );
+
+ return { employeeAbility: employeeAbility.data };
+}
+
+export async function action({ params, request }: ActionArgs) {
+ const { abilityId, id } = params;
+ if (!abilityId) throw new Error("abilityId is not found");
+ if (!id) throw new Error("id is not found");
+
+ console.log(params);
+
+ const { client } = await requirePermissions(request, {
+ create: "resources",
+ });
+
+ const validation = await employeeAbilityValidator.validate(
+ await request.formData()
+ );
+
+ if (validation.error) {
+ return validationError(validation.error);
+ }
+
+ const { employeeId, trainingStatus, trainingDays } = validation.data;
+
+ const updateEmployeeAbility = await upsertEmployeeAbility(client, {
+ id,
+ employeeId,
+ abilityId,
+ trainingCompleted: trainingStatus === AbilityEmployeeStatus.Complete,
+ trainingDays: trainingDays || 0,
+ });
+
+ if (updateEmployeeAbility.error) {
+ return redirect(
+ `/x/resources/ability/${abilityId}`,
+ await flash(
+ request,
+ error(
+ updateEmployeeAbility.error,
+ "Failed to insert new employee ability"
+ )
+ )
+ );
+ }
+
+ return redirect(
+ `/x/resources/ability/${abilityId}`,
+ await flash(request, success("Employee ability updated"))
+ );
+}
+
+export default function EmployeeAbilityRoute() {
+ const navigate = useNavigate();
+ const { abilityId } = useParams();
+ const { employeeAbility } = useLoaderData<typeof loader>();
+ const routeData = useRouteData<{
+ ability: Ability;
+ weeks: number;
+ }>(`/x/resources/ability/${abilityId}`);
+
+ if (Array.isArray(employeeAbility?.user)) {
+ throw new Error("employeeAbility.user is an array");
+ }
+ const initialValues = {
+ employeeId: employeeAbility?.user?.id,
+ trainingStatus: getTrainingStatus(employeeAbility),
+ trainingPercent: getTrainingPercent(
+ employeeAbility?.trainingDays,
+ routeData?.weeks
+ ),
+ };
+
+ return (
+ <EmployeeAbilityForm
+ ability={routeData?.ability}
+ initialValues={initialValues}
+ weeks={routeData?.weeks ?? 4}
+ onClose={() => navigate(-1)}
+ />
+ );
+}
+
+function getTrainingStatus(
+ employeeAbility: {
+ lastTrainingDate: string | null;
+ trainingDays: number;
+ trainingCompleted: boolean | null;
+ } | null
+) {
+ if (!employeeAbility) return undefined;
+ if (employeeAbility.trainingCompleted) return AbilityEmployeeStatus.Complete;
+ if (employeeAbility.trainingDays > 0) return AbilityEmployeeStatus.InProgress;
+ return AbilityEmployeeStatus.NotStarted;
+}
+
+function getTrainingPercent(traniningDays?: number, weeks?: number) {
+ if (!traniningDays || !weeks) return 0;
+ return (traniningDays / 5 / weeks) * 100;
+}
diff --git a/apps/carbon/app/routes/x+/resources.ability.$abilityId.employee.delete.$id.tsx b/apps/carbon/app/routes/x+/resources.ability.$abilityId.employee.delete.$id.tsx
new file mode 100644
index 0000000000..f3a061be57
--- /dev/null
+++ b/apps/carbon/app/routes/x+/resources.ability.$abilityId.employee.delete.$id.tsx
@@ -0,0 +1,67 @@
+import type { ActionArgs } from "@remix-run/node";
+import { redirect } from "@remix-run/node";
+import { useNavigate, useParams } from "@remix-run/react";
+import { ConfirmDelete } from "~/components/Modals";
+import { useRouteData } from "~/hooks";
+import type { Ability } from "~/interfaces/Resources/types";
+import { requirePermissions } from "~/services/auth";
+import { deleteEmployeeAbility } from "~/services/resources";
+// import { deleteEmployeeAbility } from "~/services/resources";
+import { flash } from "~/services/session";
+import { error, success } from "~/utils/result";
+
+export async function action({ request, params }: ActionArgs) {
+ const { client } = await requirePermissions(request, {
+ delete: "sales",
+ });
+
+ const { abilityId, id } = params;
+ if (!abilityId) throw new Error("No abilityId provided");
+ if (!id) throw new Error("No id provided");
+
+ const removeEmployeeAbility = await deleteEmployeeAbility(client, id);
+ if (removeEmployeeAbility.error) {
+ return redirect(
+ `/x/resources/ability/${abilityId}`,
+ await flash(
+ request,
+ error(removeEmployeeAbility.error, "Failed to delete employee ability")
+ )
+ );
+ }
+
+ return redirect(
+ `/x/resources/ability/${abilityId}`,
+ await flash(request, success("Successfully deleted employee ability"))
+ );
+}
+
+export default function DeleteCustomerTypeRoute() {
+ const navigate = useNavigate();
+ const { abilityId, id } = useParams();
+ const routeData = useRouteData<{
+ ability: Ability;
+ }>(`/x/resources/ability/${abilityId}`);
+
+ if (!abilityId || !routeData?.ability) return null;
+
+ const employee = Array.isArray(routeData?.ability.employeeAbility)
+ ? routeData.ability.employeeAbility.find((ea) => ea.id === id)
+ : undefined;
+
+ const onCancel = () => navigate("/x/sales/customer-types");
+
+ const name =
+ (Array.isArray(employee?.user)
+ ? employee?.user[0].fullName
+ : employee?.user?.fullName) ?? "this employee";
+
+ return (
+ <ConfirmDelete
+ action={`/x/resources/ability/${abilityId}/employee/delete/${id}`}
+ name={name}
+ text={`Are you sure you want remove delete ${name}? This cannot be undone.`}
+ onCancel={onCancel}
+ />
+ );
+}
diff --git a/apps/carbon/app/routes/x+/resources.ability.$abilityId.employee.new.tsx b/apps/carbon/app/routes/x+/resources.ability.$abilityId.employee.new.tsx
new file mode 100644
index 0000000000..284457b607
--- /dev/null
+++ b/apps/carbon/app/routes/x+/resources.ability.$abilityId.employee.new.tsx
@@ -0,0 +1,84 @@
+import type { ActionArgs } from "@remix-run/node";
+import { redirect } from "@remix-run/node";
+import { useNavigate, useParams } from "@remix-run/react";
+import { validationError } from "remix-validated-form";
+import { useRouteData } from "~/hooks";
+import { EmployeeAbilityForm } from "~/interfaces/Resources/Abilities";
+import type { Ability } from "~/interfaces/Resources/types";
+import { AbilityEmployeeStatus } from "~/interfaces/Resources/types";
+import { requirePermissions } from "~/services/auth";
+import {
+ employeeAbilityValidator,
+ upsertEmployeeAbility,
+} from "~/services/resources";
+import { flash } from "~/services/session";
+import { error, success } from "~/utils/result";
+
+export async function action({ params, request }: ActionArgs) {
+ const { abilityId } = params;
+ if (!abilityId) throw new Error("abilityId is not found");
+
+ const { client } = await requirePermissions(request, {
+ create: "resources",
+ });
+
+ const validation = await employeeAbilityValidator.validate(
+ await request.formData()
+ );
+
+ if (validation.error) {
+ return validationError(validation.error);
+ }
+
+ const { employeeId, trainingStatus, trainingDays } = validation.data;
+
+ const insertEmployeeAbility = await upsertEmployeeAbility(client, {
+ employeeId,
+ abilityId,
+ trainingCompleted: trainingStatus === AbilityEmployeeStatus.Complete,
+ trainingDays: trainingDays || 0,
+ });
+
+ if (insertEmployeeAbility.error) {
+ return redirect(
+ `/x/resources/ability/${abilityId}`,
+ await flash(
+ request,
+ error(
+ insertEmployeeAbility.error,
+ "Failed to insert new employee ability"
+ )
+ )
+ );
+ }
+
+ return redirect(
+ `/x/resources/ability/${abilityId}`,
+ await flash(request, success("Employee ability created"))
+ );
+}
+
+export default function NewEmployeeAbilityRoute() {
+ const { abilityId } = useParams();
+ if (!abilityId) throw new Error("abilityId is not found");
+
+ const navigate = useNavigate();
+ const onClose = () => navigate(-1);
+ const abilitiesRouteData = useRouteData<{
+ ability: Ability;
+ weeks: number;
+ }>(`/x/resources/ability/${abilityId}`);
+
+ if (!abilitiesRouteData?.ability) return null;
+
+ return (
+ <EmployeeAbilityForm
+ initialValues={{
+ employeeId: undefined,
+ }}
+ ability={abilitiesRouteData?.ability}
+ weeks={abilitiesRouteData.weeks}
+ onClose={onClose}
+ />
+ );
+}
diff --git a/apps/carbon/app/routes/x+/resources.ability.$abilityId.tsx b/apps/carbon/app/routes/x+/resources.ability.$abilityId.tsx
new file mode 100644
index 0000000000..1acea622c3
--- /dev/null
+++ b/apps/carbon/app/routes/x+/resources.ability.$abilityId.tsx
@@ -0,0 +1,291 @@
+import { useColor } from "@carbon/react";
+import {
+ Box,
+ Button,
+ Heading,
+ HStack,
+ IconButton,
+ NumberDecrementStepper,
+ NumberIncrementStepper,
+ NumberInput,
+ NumberInputField,
+ NumberInputStepper,
+ Text,
+ useDisclosure,
+} from "@chakra-ui/react";
+import type { ActionArgs, LoaderArgs } from "@remix-run/node";
+import { redirect } from "@remix-run/node";
+import { json } from "@remix-run/node";
+import { Link, Outlet, useLoaderData, useNavigate } from "@remix-run/react";
+import { ParentSize } from "@visx/responsive";
+import { useState } from "react";
+import { IoMdAdd, IoMdClose } from "react-icons/io";
+import { MdEdit, MdOutlineArrowBackIos } from "react-icons/md";
+import { ValidatedForm, validationError } from "remix-validated-form";
+import { Hidden, Input, Submit } from "~/components/Form";
+import {
+ AbilityChart,
+ AbilityEmployeesTable,
+} from "~/interfaces/Resources/Abilities";
+import type { AbilityDatum } from "~/interfaces/Resources/types";
+import { requirePermissions } from "~/services/auth";
+import {
+ abilityNameValidator,
+ getAbility,
+ updateAbility,
+ abilityCurveValidator,
+} from "~/services/resources";
+import { flash } from "~/services/session";
+import { error, success } from "~/utils/result";
+
+export async function loader({ request, params }: LoaderArgs) {
+ const { client } = await requirePermissions(request, {
+ view: "resources",
+ });
+
+ const { abilityId } = params;
+ if (!abilityId) {
+ return redirect(
+ "/x/resources/abilities",
+ await flash(request, error(null, "Ability ID is required"))
+ );
+ }
+
+ const ability = await getAbility(client, abilityId);
+ if (ability.error || !ability.data) {
+ return redirect(
+ "/x/resources/abilities",
+ await flash(request, error(ability.error, "Failed to load ability"))
+ );
+ }
+
+ return json({
+ ability: ability.data,
+ weeks:
+ // @ts-ignore
+ ability.data.curve?.data[ability.data.curve?.data.length - 1].week ?? 0,
+ });
+}
+
+export async function action({ request, params }: ActionArgs) {
+ const { client } = await requirePermissions(request, {
+ update: "resources",
+ });
+
+ const { abilityId } = params;
+ if (!abilityId) {
+ throw new Error("Ability ID not found");
+ }
+
+ const formData = await request.formData();
+
+ if (formData.get("intent") === "name") {
+ const validation = await abilityNameValidator.validate(formData);
+ if (validation.error) {
+ return validationError(validation.error);
+ }
+
+ const { name } = validation.data;
+ const updateAbilityName = await updateAbility(client, abilityId, {
+ name,
+ });
+ if (updateAbilityName.error) {
+ return redirect(
+ `/x/resources/ability/${abilityId}`,
+ await flash(
+ request,
+ error(updateAbilityName.error, "Failed to update ability name")
+ )
+ );
+ }
+ }
+
+ if (formData.get("intent") === "curve") {
+ const validation = await abilityCurveValidator.validate(formData);
+ if (validation.error) {
+ return validationError(validation.error);
+ }
+
+ const { data, shadowWeeks } = validation.data;
+ const updateAbilityCurve = await updateAbility(client, abilityId, {
+ curve: {
+ data: JSON.parse(data),
+ },
+ shadowWeeks,
+ });
+ if (updateAbilityCurve.error) {
+ return redirect(
+ `/x/resources/ability/${abilityId}`,
+ await flash(
+ request,
+ error(updateAbilityCurve.error, "Failed to update ability data")
+ )
+ );
+ }
+ }
+
+ return redirect(
+ `/x/resources/ability/${abilityId}`,
+ await flash(request, success("Ability updated"))
+ );
+}
+
+export default function AbilitiesRoute() {
+ const { ability, weeks } = useLoaderData<typeof loader>();
+ const navigate = useNavigate();
+ const editingTitle = useDisclosure();
+ const [data, setData] = useState<AbilityDatum[]>(
+ // @ts-ignore
+ ability.curve?.data ?? []
+ );
+ const [time, setTime] = useState<number>(weeks);
+ const [controlledShadowWeeks, setControlledShadowWeeks] = useState<number>(
+ ability.shadowWeeks ?? 0
+ );
+
+ const updateWeeks = (_: string, newWeeks: number) => {
+ const scale = 1 + (newWeeks - time) / time;
+ setData((prevData) =>
+ prevData.map((datum) => ({
+ ...datum,
+ week: Math.round(datum.week * scale * 10) / 10,
+ }))
+ );
+ setTime(newWeeks);
+ };
+
+ const updateShadowTime = (_: string, newShadowTime: number) => {
+ setControlledShadowWeeks(newShadowTime);
+ };
+
+ return (
+ <>
+ <Box bg={useColor("white")} w="full" position="relative">
+ <HStack w="full" justifyContent="space-between" p={4}>
+ {editingTitle.isOpen ? (
+ <ValidatedForm
+ validator={abilityNameValidator}
+ method="post"
+ action={`/x/resources/ability/${ability.id}`}
+ defaultValues={{
+ name: ability.name,
+ }}
+ onSubmit={editingTitle.onClose}
+ >
+ <Hidden name="intent" value="name" />
+ <HStack spacing={2}>
+ <IconButton
+ aria-label="Back"
+ variant="ghost"
+ icon={<MdOutlineArrowBackIos />}
+ onClick={() => navigate("/x/resources/abilities")}
+ />
+ <Input
+ autoFocus
+ name="name"
+ variant="unstyled"
+ fontWeight="bold"
+ fontSize="xl"
+ />
+ <Submit size="sm">Save</Submit>
+ <IconButton
+ aria-label="Cancel"
+ variant="ghost"
+ icon={<IoMdClose />}
+ onClick={editingTitle.onClose}
+ />
+ </HStack>
+ </ValidatedForm>
+ ) : (
+ <HStack spacing={2}>
+ <IconButton
+ aria-label="Back"
+ variant="ghost"
+ icon={<MdOutlineArrowBackIos />}
+ onClick={() => navigate("/x/resources/abilities")}
+ />
+ <Heading size="md">{ability.name}</Heading>
+ <IconButton
+ aria-label="Edit"
+ variant="ghost"
+ icon={<MdEdit />}
+ onClick={editingTitle.onOpen}
+ />
+ </HStack>
+ )}
+
+ <HStack spacing={2}>
+ <Text fontSize="sm">Weeks Shadowing:</Text>
+ <NumberInput
+ maxW="100px"
+ size="sm"
+ min={0}
+ max={time}
+ value={controlledShadowWeeks}
+ onChange={updateShadowTime}
+ >
+ <NumberInputField />
+ <NumberInputStepper>
+ <NumberIncrementStepper />
+ <NumberDecrementStepper />
+ </NumberInputStepper>
+ </NumberInput>
+ <Text fontSize="sm">Weeks to Learn:</Text>
+ <NumberInput
+ maxW="100px"
+ size="sm"
+ min={1}
+ value={time}
+ onChange={updateWeeks}
+ >
+ <NumberInputField />
+ <NumberInputStepper>
+ <NumberIncrementStepper />
+ <NumberDecrementStepper />
+ </NumberInputStepper>
+ </NumberInput>
+ <ValidatedForm
+ validator={abilityCurveValidator}
+ method="post"
+ action={`/x/resources/ability/${ability.id}`}
+ >
+ <Hidden name="intent" value="curve" />
+ <Hidden name="data" value={JSON.stringify(data)} />
+ <Hidden name="shadowWeeks" value={controlledShadowWeeks} />
+ <Submit size="sm">Save</Submit>
+ </ValidatedForm>
+ </HStack>
+ </HStack>
+ <Box w="full" h="33vh">
+ <ParentSize>
+ {({ height, width }) => (
+ <AbilityChart
+ parentHeight={height}
+ parentWidth={width}
+ data={data}
+ shadowWeeks={controlledShadowWeeks}
+ onDataChange={setData}
+ />
+ )}
+ </ParentSize>
+ </Box>
+ <Box position="absolute" bottom={-4} right={4} zIndex={3}>
+ <Button
+ as={Link}
+ to="employee/new"
+ colorScheme="brand"
+ leftIcon={<IoMdAdd />}
+ >
+ New Employee
+ </Button>
+ </Box>
+ </Box>
+ <AbilityEmployeesTable
+ employees={ability.employeeAbility ?? []}
+ weeks={weeks}
+ shadowWeeks={ability.shadowWeeks}
+ />
+ <Outlet />
+ </>
+ );
+}
diff --git a/apps/carbon/app/routes/x+/resources.people.tsx b/apps/carbon/app/routes/x+/resources.people.tsx
index f66751a8c4..4482e0fdbc 100644
--- a/apps/carbon/app/routes/x+/resources.people.tsx
+++ b/apps/carbon/app/routes/x+/resources.people.tsx
@@ -4,7 +4,7 @@ import { redirect } from "@remix-run/node";
import { json } from "@remix-run/node";
import { Outlet, useLoaderData } from "@remix-run/react";
import { usePermissions } from "~/hooks";
-import { PeopleTable, PeopleTableFilters } from "~/interfaces/Resources";
+import { PeopleTable, PeopleTableFilters } from "~/interfaces/Resources/People";
import { requirePermissions } from "~/services/auth";
import { getAttributeCategories, getPeople } from "~/services/resources";
import { flash } from "~/services/session";
diff --git a/apps/carbon/app/routes/x+/resources.person.$personId.tsx b/apps/carbon/app/routes/x+/resources.person.$personId.tsx
index 43f125ebd1..1d6ba902e3 100644
--- a/apps/carbon/app/routes/x+/resources.person.$personId.tsx
+++ b/apps/carbon/app/routes/x+/resources.person.$personId.tsx
@@ -8,7 +8,8 @@ import {
PersonHeader,
PersonNotes,
PersonTabs,
-} from "~/interfaces/Resources";
+ PersonSchedule,
+} from "~/interfaces/Resources/Person";
import {
getAccount,
getPrivateAttributes,
@@ -83,8 +84,9 @@ export default function PersonRoute() {
publicAttributes={publicAttributes}
privateAttributes={privateAttributes}
/>
- <PersonAbilities />
+ <PersonSchedule />
<PersonNotes notes={notes} />
+ <PersonAbilities />
</Grid>
</Box>
);
diff --git a/apps/carbon/app/routes/x+/users.employee-types.delete.$employeeTypeId.tsx b/apps/carbon/app/routes/x+/users.employee-types.delete.$employeeTypeId.tsx
index faf4797dd6..03d635dd45 100644
--- a/apps/carbon/app/routes/x+/users.employee-types.delete.$employeeTypeId.tsx
+++ b/apps/carbon/app/routes/x+/users.employee-types.delete.$employeeTypeId.tsx
@@ -27,7 +27,9 @@ export async function loader({ request, params }: LoaderArgs) {
);
}
- return json(employeeType);
+ return json({
+ employeeType: employeeType.data,
+ });
}
export async function action({ request, params }: ActionArgs) {
@@ -67,18 +69,18 @@ export async function action({ request, params }: ActionArgs) {
export default function DeleteEmployeeTypeRoute() {
const { employeeTypeId } = useParams();
- const { data } = useLoaderData<typeof loader>();
+ const { employeeType } = useLoaderData<typeof loader>();
const navigate = useNavigate();
- if (!employeeTypeId || !data) return null; // TODO - handle this better (404?)
+ if (!employeeTypeId || !employeeType) return null; // TODO - handle this better (404?)
const onCancel = () => navigate("/x/users/employee-types");
return (
<ConfirmDelete
action={`/x/users/employee-types/delete/${employeeTypeId}`}
- name={data.name}
- text={`Are you sure you want to delete the employee type: ${data.name}? This cannot be undone.`}
+ name={employeeType.name}
+ text={`Are you sure you want to delete the employee type: ${employeeType.name}? This cannot be undone.`}
onCancel={onCancel}
/>
);
diff --git a/apps/carbon/app/routes/x+/users.groups.tsx b/apps/carbon/app/routes/x+/users.groups.tsx
index 3669f9b6ec..fc4eb9aa2e 100644
--- a/apps/carbon/app/routes/x+/users.groups.tsx
+++ b/apps/carbon/app/routes/x+/users.groups.tsx
@@ -33,9 +33,9 @@ export async function loader({ request }: LoaderArgs) {
}
return json({
- groups: arrayToTree(groups.data) as Group[],
+ groups: (groups.data ? arrayToTree(groups.data) : []) as Group[],
error: null,
- count: groups.count,
+ count: groups.count ?? 0,
});
}
@@ -45,7 +45,7 @@ export default function GroupsRoute() {
return (
<VStack w="full" h="full" spacing={0}>
<GroupsTableFilters />
- <GroupsTable data={groups ?? []} count={count ?? 0} />
+ <GroupsTable data={groups} count={count} />
<Outlet />
</VStack>
);
diff --git a/apps/carbon/app/services/resources/resources.form.ts b/apps/carbon/app/services/resources/resources.form.ts
index dcf8cd61fc..4d62849047 100644
--- a/apps/carbon/app/services/resources/resources.form.ts
+++ b/apps/carbon/app/services/resources/resources.form.ts
@@ -3,6 +3,45 @@ import { z } from "zod";
import { zfd } from "zod-form-data";
import { DataType } from "~/interfaces/Users/types";
+export const abilityValidator = withZod(
+ z
+ .object({
+ name: z.string().min(1, { message: "Name is required" }),
+ startingPoint: zfd.numeric(
+ z.number().min(0, { message: "Learning curve is required" })
+ ),
+ weeks: zfd.numeric(z.number().min(0, { message: "Weeks is required" })),
+ shadowWeeks: zfd.numeric(
+ z.number().min(0, { message: "Shadow is required" })
+ ),
+ employees: z
+ .array(z.string().min(36, { message: "Invalid selection" }))
+ .min(1, { message: "Group members are required" })
+ .optional(),
+ })
+ .refine((schema) => schema.shadowWeeks <= schema.weeks, {
+ message: "name is required when you send color on request",
+ })
+);
+
+export const abilityCurveValidator = withZod(
+ z.object({
+ data: z
+ .string()
+ .startsWith("[", { message: "Invalid JSON" })
+ .endsWith("]", { message: "Invalid JSON" }),
+ shadowWeeks: zfd.numeric(
+ z.number().min(0, { message: "Time shadowing is required" })
+ ),
+ })
+);
+
+export const abilityNameValidator = withZod(
+ z.object({
+ name: z.string().min(1, { message: "Name is required" }),
+ })
+);
+
export const attributeValidator = withZod(
z
.object({
@@ -35,6 +74,15 @@ export const attributeCategoryValidator = withZod(
})
);
+export const employeeAbilityValidator = withZod(
+ z.object({
+ employeeId: z.string().min(36, { message: "Employee is required" }),
+ trainingStatus: z.string().min(1, { message: "Status is required" }),
+ trainingPercent: zfd.numeric(z.number().optional()),
+ trainingDays: zfd.numeric(z.number().optional()),
+ })
+);
+
export const noteValidator = withZod(
z.object({
id: zfd.text(z.string().optional()),
diff --git a/apps/carbon/app/services/resources/resources.server.ts b/apps/carbon/app/services/resources/resources.server.ts
index b2c2339e22..5f9baeffd0 100644
--- a/apps/carbon/app/services/resources/resources.server.ts
+++ b/apps/carbon/app/services/resources/resources.server.ts
@@ -5,6 +5,16 @@ import { getEmployees } from "~/services/users";
import type { GenericQueryFilters } from "~/utils/query";
import { setGenericQueryFilters } from "~/utils/query";
+export async function deleteAbility(
+ client: SupabaseClient<Database>,
+ abilityId: string,
+ hardDelete = false
+) {
+ return hardDelete
+ ? client.from("ability").delete().eq("id", abilityId)
+ : client.from("ability").update({ active: false }).eq("id", abilityId);
+}
+
export async function deleteAttribute(
client: SupabaseClient<Database>,
attributeId: string
@@ -25,6 +35,16 @@ export async function deleteAttributeCategory(
.eq("id", attributeCategoryId);
}
+export async function deleteEmployeeAbility(
+ client: SupabaseClient<Database>,
+ employeeAbilityId: string
+) {
+ return client
+ .from("employeeAbility")
+ .update({ active: false })
+ .eq("id", employeeAbilityId);
+}
+
export async function deleteNote(
client: SupabaseClient<Database>,
noteId: string
@@ -32,6 +52,49 @@ export async function deleteNote(
return client.from("userNote").update({ active: false }).eq("id", noteId);
}
+export async function getAbilities(
+ client: SupabaseClient<Database>,
+ args: GenericQueryFilters & { name: string | null }
+) {
+ let query = client
+ .from("ability")
+ .select(
+ `id, name, curve, shadowWeeks, employeeAbility(user(id, fullName, avatarUrl))`,
+ {
+ count: "exact",
+ }
+ )
+ .eq("active", true)
+ .eq("employeeAbility.active", true)
+ .eq("employeeAbility.user.active", true);
+
+ if (args?.name) {
+ query = query.ilike("name", `%${args.name}%`);
+ }
+
+ query = setGenericQueryFilters(query, args, "name");
+ return query;
+}
+
+export async function getAbility(
+ client: SupabaseClient<Database>,
+ abilityId: string
+) {
+ return client
+ .from("ability")
+ .select(
+ `id, name, curve, shadowWeeks, employeeAbility(id, user(id, fullName, avatarUrl, active), lastTrainingDate, trainingDays, trainingCompleted)`,
+ {
+ count: "exact",
+ }
+ )
+ .eq("id", abilityId)
+ .eq("active", true)
+ .eq("employeeAbility.active", true)
+ .eq("employeeAbility.user.active", true)
+ .single();
+}
+
export async function getAttribute(
client: SupabaseClient<Database>,
attributeId: string
@@ -118,6 +181,22 @@ export async function getAttributeDataTypes(client: SupabaseClient<Database>) {
return client.from("attributeDataType").select("*");
}
+export async function getEmployeeAbility(
+ client: SupabaseClient<Database>,
+ abilityId: string,
+ employeeId: string
+) {
+ return client
+ .from("employeeAbility")
+ .select(
+ `id, lastTrainingDate, trainingDays, trainingCompleted, user(id, fullName, avatarUrl)`
+ )
+ .eq("abilityId", abilityId)
+ .eq("id", employeeId)
+ .eq("active", true)
+ .single();
+}
+
export async function getNotes(
client: SupabaseClient<Database>,
userId: string
@@ -231,6 +310,37 @@ export async function getPeople(
};
}
+export async function insertAbility(
+ client: SupabaseClient<Database>,
+ ability: {
+ name: string;
+ curve: {
+ data: {
+ week: number;
+ value: number;
+ }[];
+ };
+ shadowWeeks: number;
+ createdBy: string;
+ }
+) {
+ return client.from("ability").insert([ability]).select("id");
+}
+
+export async function insertEmployeeAbilities(
+ client: SupabaseClient<Database>,
+ abilityId: string,
+ employeeIds: string[]
+) {
+ const employeeAbilities = employeeIds.map((employeeId) => ({
+ abilityId,
+ employeeId,
+ trainingCompleted: true,
+ }));
+
+ return client.from("employeeAbility").insert(employeeAbilities).select("id");
+}
+
export async function insertAttribute(
client: SupabaseClient<Database>,
attribute: {
@@ -284,6 +394,23 @@ export async function insertNote(
return client.from("userNote").insert([note]).select("id");
}
+export async function updateAbility(
+ client: SupabaseClient<Database>,
+ id: string,
+ ability: Partial<{
+ name: string;
+ curve: {
+ data: {
+ week: number;
+ value: number;
+ }[];
+ };
+ shadowWeeks: number;
+ }>
+) {
+ return client.from("ability").update(ability).eq("id", id);
+}
+
export async function updateAttribute(
client: SupabaseClient<Database>,
attribute: {
@@ -332,3 +459,42 @@ export async function updateAttributeSortOrder(
);
return Promise.all(updatePromises);
}
+
+export async function upsertEmployeeAbility(
+ client: SupabaseClient<Database>,
+ employeeAbility: {
+ id?: string;
+ abilityId: string;
+ employeeId: string;
+ trainingCompleted: boolean;
+ trainingDays?: number;
+ }
+) {
+ const { id, ...update } = employeeAbility;
+ if (id) {
+ return client
+ .from("employeeAbility")
+ .update({ ...update })
+ .eq("id", id);
+ }
+
+ const deactivatedId = await client
+ .from("employeeAbility")
+ .select("id")
+ .eq("employeeId", employeeAbility.employeeId)
+ .eq("abilityId", employeeAbility.abilityId)
+ .eq("active", false)
+ .single();
+
+ if (deactivatedId.data?.id) {
+ return client
+ .from("employeeAbility")
+ .update({ ...update, active: true })
+ .eq("id", deactivatedId.data.id);
+ }
+
+ return client
+ .from("employeeAbility")
+ .insert([{ ...update }])
+ .select("id");
+}
diff --git a/apps/carbon/package.json b/apps/carbon/package.json
index 598c6610a4..ae74a754c1 100644
--- a/apps/carbon/package.json
+++ b/apps/carbon/package.json
@@ -21,15 +21,26 @@
"@emotion/server": "^11.10.0",
"@emotion/styled": "^11.10.4",
"@internationalized/date": "^3.0.2",
- "@remix-run/eslint-config": "1.9.0",
- "@remix-run/node": "1.9.0",
- "@remix-run/react": "1.9.0",
- "@remix-run/vercel": "1.9.0",
+ "@remix-run/eslint-config": "1.13.0",
+ "@remix-run/node": "1.13.0",
+ "@remix-run/react": "1.13.0",
+ "@remix-run/vercel": "1.13.0",
"@remix-validated-form/with-zod": "^2.0.5",
"@supabase/supabase-js": "^2.2.1",
"@tanstack/react-table": "^8.7.3",
- "@vercel/node": "^2.8.0",
- "bullmq": "~3.5.1",
+ "@vercel/node": "^2.9.6",
+ "@visx/axis": "^2.18.0",
+ "@visx/curve": "^2.17.0",
+ "@visx/drag": "^2.17.0",
+ "@visx/gradient": "2.17.0",
+ "@visx/grid": "^2.18.0",
+ "@visx/group": "^2.17.0",
+ "@visx/pattern": "2.17.0",
+ "@visx/responsive": "^2.17.0",
+ "@visx/scale": "^2.18.0",
+ "@visx/shape": "^2.18.0",
+ "bullmq": "~3.7.0",
+ "d3-array": "^3.2.2",
"framer-motion": "^8.5.2",
"lodash.debounce": "^4.0.8",
"lodash.words": "^4.2.0",
@@ -38,16 +49,16 @@
"react-dom": "^18.2.0",
"react-icons": "4.7.1",
"react-virtual": "2.10.4",
- "reactflow": "^11.4.1",
- "remix-flat-routes": "^0.5.6",
- "remix-validated-form": "^4.6.5",
+ "reactflow": "^11.5.6",
+ "remix-flat-routes": "^0.5.7",
+ "remix-validated-form": "^4.6.8",
"zod": "^3.20.2",
- "zod-form-data": "1.2.4"
+ "zod-form-data": "1.3.1"
},
"devDependencies": {
"@carbon/tsconfig": "*",
- "@remix-run/dev": "1.9.0",
- "@remix-run/serve": "1.9.0",
+ "@remix-run/dev": "1.13.0",
+ "@remix-run/serve": "1.13.0",
"@types/react": "^18.0.21",
"@types/react-dom": "^18.0.6",
"typescript": "^4.9.3"
diff --git a/apps/carbon/remix.config.js b/apps/carbon/remix.config.js
index af0a3cf81f..530556044d 100644
--- a/apps/carbon/remix.config.js
+++ b/apps/carbon/remix.config.js
@@ -1,4 +1,5 @@
const { flatRoutes } = require("remix-flat-routes");
+const { getDependenciesToBundle } = require("@remix-run/dev");
module.exports = {
serverBuildTarget: "vercel",
diff --git a/package.json b/package.json
index 20d54abd9c..6d517b86ef 100755
--- a/package.json
+++ b/package.json
@@ -9,7 +9,9 @@
"build": "turbo run build",
"build:packages": "turbo run build --filter=./packages/*",
"clean": "turbo run clean && rm -rf node_modules && rm -rf supabase",
+ "predb:rebuild": "tsx scripts/generate-schema-md.ts",
"db:rebuild": "run-s db:kill db:start setup",
+ "postdb:rebuild": "tsx scripts/generate-db-types.ts",
"db:init": "turbo run db:init",
"db:start": "run-p db:start:database db:start:redis",
"db:start:database": "yarn workspace @carbon/database supabase start",
@@ -32,9 +34,7 @@
"initialize": "run-s db:init db:start",
"lint": "turbo run lint",
"setup": "turbo run setup",
- "test": "turbo run test",
- "prebuild": "tsx scripts/generate-types.ts",
- "predev": "tsx scripts/generate-types.ts"
+ "test": "turbo run test"
},
"devDependencies": {
"npm-run-all": "^4.1.5",
diff --git a/packages/carbon-database/src/types.ts b/packages/carbon-database/src/types.ts
index c260b29a51..7ed0593c1f 100644
--- a/packages/carbon-database/src/types.ts
+++ b/packages/carbon-database/src/types.ts
@@ -4,944 +4,1011 @@ export type Json =
| boolean
| null
| { [key: string]: Json }
- | Json[];
+ | Json[]
export interface Database {
public: {
Tables: {
+ ability: {
+ Row: {
+ name: string
+ createdBy: string
+ updatedAt: string | null
+ updatedBy: string | null
+ id: string
+ curve: Json
+ shadowWeeks: number
+ active: boolean
+ createdAt: string
+ }
+ Insert: {
+ name: string
+ createdBy: string
+ updatedAt?: string | null
+ updatedBy?: string | null
+ id?: string
+ curve?: Json
+ shadowWeeks?: number
+ active?: boolean
+ createdAt?: string
+ }
+ Update: {
+ name?: string
+ createdBy?: string
+ updatedAt?: string | null
+ updatedBy?: string | null
+ id?: string
+ curve?: Json
+ shadowWeeks?: number
+ active?: boolean
+ createdAt?: string
+ }
+ }
address: {
Row: {
- addressLine1: string | null;
- addressLine2: string | null;
- city: string | null;
- state: string | null;
- postalCode: string | null;
- countryId: number | null;
- phone: string | null;
- fax: string | null;
- id: string;
- };
+ addressLine1: string | null
+ addressLine2: string | null
+ city: string | null
+ state: string | null
+ postalCode: string | null
+ countryId: number | null
+ phone: string | null
+ fax: string | null
+ id: string
+ }
Insert: {
- addressLine1?: string | null;
- addressLine2?: string | null;
- city?: string | null;
- state?: string | null;
- postalCode?: string | null;
- countryId?: number | null;
- phone?: string | null;
- fax?: string | null;
- id?: string;
- };
+ addressLine1?: string | null
+ addressLine2?: string | null
+ city?: string | null
+ state?: string | null
+ postalCode?: string | null
+ countryId?: number | null
+ phone?: string | null
+ fax?: string | null
+ id?: string
+ }
Update: {
- addressLine1?: string | null;
- addressLine2?: string | null;
- city?: string | null;
- state?: string | null;
- postalCode?: string | null;
- countryId?: number | null;
- phone?: string | null;
- fax?: string | null;
- id?: string;
- };
- };
+ addressLine1?: string | null
+ addressLine2?: string | null
+ city?: string | null
+ state?: string | null
+ postalCode?: string | null
+ countryId?: number | null
+ phone?: string | null
+ fax?: string | null
+ id?: string
+ }
+ }
attributeDataType: {
Row: {
- label: string;
- id: number;
- isBoolean: boolean;
- isDate: boolean;
- isList: boolean;
- isNumeric: boolean;
- isText: boolean;
- isUser: boolean;
- };
+ label: string
+ id: number
+ isBoolean: boolean
+ isDate: boolean
+ isList: boolean
+ isNumeric: boolean
+ isText: boolean
+ isUser: boolean
+ }
Insert: {
- label: string;
- id?: number;
- isBoolean?: boolean;
- isDate?: boolean;
- isList?: boolean;
- isNumeric?: boolean;
- isText?: boolean;
- isUser?: boolean;
- };
+ label: string
+ id?: number
+ isBoolean?: boolean
+ isDate?: boolean
+ isList?: boolean
+ isNumeric?: boolean
+ isText?: boolean
+ isUser?: boolean
+ }
Update: {
- label?: string;
- id?: number;
- isBoolean?: boolean;
- isDate?: boolean;
- isList?: boolean;
- isNumeric?: boolean;
- isText?: boolean;
- isUser?: boolean;
- };
- };
+ label?: string
+ id?: number
+ isBoolean?: boolean
+ isDate?: boolean
+ isList?: boolean
+ isNumeric?: boolean
+ isText?: boolean
+ isUser?: boolean
+ }
+ }
contact: {
Row: {
- firstName: string;
- lastName: string;
- email: string;
- title: string | null;
- mobilePhone: string | null;
- homePhone: string | null;
- workPhone: string | null;
- fax: string | null;
- addressLine1: string | null;
- addressLine2: string | null;
- city: string | null;
- state: string | null;
- postalCode: string | null;
- countryId: number | null;
- birthday: string | null;
- notes: string | null;
- id: string;
- };
+ firstName: string
+ lastName: string
+ email: string
+ title: string | null
+ mobilePhone: string | null
+ homePhone: string | null
+ workPhone: string | null
+ fax: string | null
+ addressLine1: string | null
+ addressLine2: string | null
+ city: string | null
+ state: string | null
+ postalCode: string | null
+ countryId: number | null
+ birthday: string | null
+ notes: string | null
+ id: string
+ }
Insert: {
- firstName: string;
- lastName: string;
- email: string;
- title?: string | null;
- mobilePhone?: string | null;
- homePhone?: string | null;
- workPhone?: string | null;
- fax?: string | null;
- addressLine1?: string | null;
- addressLine2?: string | null;
- city?: string | null;
- state?: string | null;
- postalCode?: string | null;
- countryId?: number | null;
- birthday?: string | null;
- notes?: string | null;
- id?: string;
- };
+ firstName: string
+ lastName: string
+ email: string
+ title?: string | null
+ mobilePhone?: string | null
+ homePhone?: string | null
+ workPhone?: string | null
+ fax?: string | null
+ addressLine1?: string | null
+ addressLine2?: string | null
+ city?: string | null
+ state?: string | null
+ postalCode?: string | null
+ countryId?: number | null
+ birthday?: string | null
+ notes?: string | null
+ id?: string
+ }
Update: {
- firstName?: string;
- lastName?: string;
- email?: string;
- title?: string | null;
- mobilePhone?: string | null;
- homePhone?: string | null;
- workPhone?: string | null;
- fax?: string | null;
- addressLine1?: string | null;
- addressLine2?: string | null;
- city?: string | null;
- state?: string | null;
- postalCode?: string | null;
- countryId?: number | null;
- birthday?: string | null;
- notes?: string | null;
- id?: string;
- };
- };
+ firstName?: string
+ lastName?: string
+ email?: string
+ title?: string | null
+ mobilePhone?: string | null
+ homePhone?: string | null
+ workPhone?: string | null
+ fax?: string | null
+ addressLine1?: string | null
+ addressLine2?: string | null
+ city?: string | null
+ state?: string | null
+ postalCode?: string | null
+ countryId?: number | null
+ birthday?: string | null
+ notes?: string | null
+ id?: string
+ }
+ }
country: {
Row: {
- name: string;
- code: string;
- id: number;
- };
+ name: string
+ code: string
+ id: number
+ }
Insert: {
- name: string;
- code: string;
- id?: number;
- };
+ name: string
+ code: string
+ id?: number
+ }
Update: {
- name?: string;
- code?: string;
- id?: number;
- };
- };
+ name?: string
+ code?: string
+ id?: number
+ }
+ }
customer: {
Row: {
- name: string;
- description: string | null;
- customerTypeId: string | null;
- customerStatusId: string | null;
- taxId: string | null;
- accountManagerId: string | null;
- logo: string | null;
- createdBy: string | null;
- updatedAt: string | null;
- updatedBy: string | null;
- id: string;
- createdAt: string;
- };
+ name: string
+ description: string | null
+ customerTypeId: string | null
+ customerStatusId: string | null
+ taxId: string | null
+ accountManagerId: string | null
+ logo: string | null
+ createdBy: string | null
+ updatedAt: string | null
+ updatedBy: string | null
+ id: string
+ createdAt: string
+ }
Insert: {
- name: string;
- description?: string | null;
- customerTypeId?: string | null;
- customerStatusId?: string | null;
- taxId?: string | null;
- accountManagerId?: string | null;
- logo?: string | null;
- createdBy?: string | null;
- updatedAt?: string | null;
- updatedBy?: string | null;
- id?: string;
- createdAt?: string;
- };
+ name: string
+ description?: string | null
+ customerTypeId?: string | null
+ customerStatusId?: string | null
+ taxId?: string | null
+ accountManagerId?: string | null
+ logo?: string | null
+ createdBy?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ id?: string
+ createdAt?: string
+ }
Update: {
- name?: string;
- description?: string | null;
- customerTypeId?: string | null;
- customerStatusId?: string | null;
- taxId?: string | null;
- accountManagerId?: string | null;
- logo?: string | null;
- createdBy?: string | null;
- updatedAt?: string | null;
- updatedBy?: string | null;
- id?: string;
- createdAt?: string;
- };
- };
+ name?: string
+ description?: string | null
+ customerTypeId?: string | null
+ customerStatusId?: string | null
+ taxId?: string | null
+ accountManagerId?: string | null
+ logo?: string | null
+ createdBy?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ id?: string
+ createdAt?: string
+ }
+ }
customerAccount: {
Row: {
- id: string;
- customerId: string;
- };
+ id: string
+ customerId: string
+ }
Insert: {
- id: string;
- customerId: string;
- };
+ id: string
+ customerId: string
+ }
Update: {
- id?: string;
- customerId?: string;
- };
- };
+ id?: string
+ customerId?: string
+ }
+ }
customerContact: {
Row: {
- customerId: string;
- contactId: string;
- customerLocationId: string | null;
- userId: string | null;
- id: string;
- };
+ customerId: string
+ contactId: string
+ customerLocationId: string | null
+ userId: string | null
+ id: string
+ }
Insert: {
- customerId: string;
- contactId: string;
- customerLocationId?: string | null;
- userId?: string | null;
- id?: string;
- };
+ customerId: string
+ contactId: string
+ customerLocationId?: string | null
+ userId?: string | null
+ id?: string
+ }
Update: {
- customerId?: string;
- contactId?: string;
- customerLocationId?: string | null;
- userId?: string | null;
- id?: string;
- };
- };
+ customerId?: string
+ contactId?: string
+ customerLocationId?: string | null
+ userId?: string | null
+ id?: string
+ }
+ }
customerLocation: {
Row: {
- customerId: string;
- addressId: string;
- id: string;
- };
+ customerId: string
+ addressId: string
+ id: string
+ }
Insert: {
- customerId: string;
- addressId: string;
- id?: string;
- };
+ customerId: string
+ addressId: string
+ id?: string
+ }
Update: {
- customerId?: string;
- addressId?: string;
- id?: string;
- };
- };
+ customerId?: string
+ addressId?: string
+ id?: string
+ }
+ }
customerStatus: {
Row: {
- name: string;
- updatedAt: string | null;
- id: string;
- createdAt: string;
- };
+ name: string
+ updatedAt: string | null
+ id: string
+ createdAt: string
+ }
Insert: {
- name: string;
- updatedAt?: string | null;
- id?: string;
- createdAt?: string;
- };
+ name: string
+ updatedAt?: string | null
+ id?: string
+ createdAt?: string
+ }
Update: {
- name?: string;
- updatedAt?: string | null;
- id?: string;
- createdAt?: string;
- };
- };
+ name?: string
+ updatedAt?: string | null
+ id?: string
+ createdAt?: string
+ }
+ }
customerType: {
Row: {
- name: string;
- updatedAt: string | null;
- id: string;
- color: string | null;
- protected: boolean;
- createdAt: string;
- };
+ name: string
+ updatedAt: string | null
+ id: string
+ color: string | null
+ protected: boolean
+ createdAt: string
+ }
Insert: {
- name: string;
- updatedAt?: string | null;
- id?: string;
- color?: string | null;
- protected?: boolean;
- createdAt?: string;
- };
+ name: string
+ updatedAt?: string | null
+ id?: string
+ color?: string | null
+ protected?: boolean
+ createdAt?: string
+ }
Update: {
- name?: string;
- updatedAt?: string | null;
- id?: string;
- color?: string | null;
- protected?: boolean;
- createdAt?: string;
- };
- };
+ name?: string
+ updatedAt?: string | null
+ id?: string
+ color?: string | null
+ protected?: boolean
+ createdAt?: string
+ }
+ }
employee: {
Row: {
- id: string;
- employeeTypeId: string;
- };
+ id: string
+ employeeTypeId: string
+ }
Insert: {
- id: string;
- employeeTypeId: string;
- };
+ id: string
+ employeeTypeId: string
+ }
Update: {
- id?: string;
- employeeTypeId?: string;
- };
- };
+ id?: string
+ employeeTypeId?: string
+ }
+ }
+ employeeAbility: {
+ Row: {
+ employeeId: string
+ abilityId: string
+ lastTrainingDate: string | null
+ id: string
+ active: boolean
+ trainingDays: number
+ trainingCompleted: boolean | null
+ }
+ Insert: {
+ employeeId: string
+ abilityId: string
+ lastTrainingDate?: string | null
+ id?: string
+ active?: boolean
+ trainingDays?: number
+ trainingCompleted?: boolean | null
+ }
+ Update: {
+ employeeId?: string
+ abilityId?: string
+ lastTrainingDate?: string | null
+ id?: string
+ active?: boolean
+ trainingDays?: number
+ trainingCompleted?: boolean | null
+ }
+ }
employeeType: {
Row: {
- name: string;
- updatedAt: string | null;
- id: string;
- color: string | null;
- protected: boolean;
- createdAt: string;
- };
+ name: string
+ updatedAt: string | null
+ id: string
+ color: string | null
+ protected: boolean
+ createdAt: string
+ }
Insert: {
- name: string;
- updatedAt?: string | null;
- id?: string;
- color?: string | null;
- protected?: boolean;
- createdAt?: string;
- };
+ name: string
+ updatedAt?: string | null
+ id?: string
+ color?: string | null
+ protected?: boolean
+ createdAt?: string
+ }
Update: {
- name?: string;
- updatedAt?: string | null;
- id?: string;
- color?: string | null;
- protected?: boolean;
- createdAt?: string;
- };
- };
+ name?: string
+ updatedAt?: string | null
+ id?: string
+ color?: string | null
+ protected?: boolean
+ createdAt?: string
+ }
+ }
employeeTypePermission: {
Row: {
- employeeTypeId: string;
- featureId: string;
- updatedAt: string | null;
- create: boolean;
- delete: boolean;
- update: boolean;
- view: boolean;
- createdAt: string;
- };
+ employeeTypeId: string
+ featureId: string
+ updatedAt: string | null
+ create: boolean
+ delete: boolean
+ update: boolean
+ view: boolean
+ createdAt: string
+ }
Insert: {
- employeeTypeId: string;
- featureId: string;
- updatedAt?: string | null;
- create?: boolean;
- delete?: boolean;
- update?: boolean;
- view?: boolean;
- createdAt?: string;
- };
+ employeeTypeId: string
+ featureId: string
+ updatedAt?: string | null
+ create?: boolean
+ delete?: boolean
+ update?: boolean
+ view?: boolean
+ createdAt?: string
+ }
Update: {
- employeeTypeId?: string;
- featureId?: string;
- updatedAt?: string | null;
- create?: boolean;
- delete?: boolean;
- update?: boolean;
- view?: boolean;
- createdAt?: string;
- };
- };
+ employeeTypeId?: string
+ featureId?: string
+ updatedAt?: string | null
+ create?: boolean
+ delete?: boolean
+ update?: boolean
+ view?: boolean
+ createdAt?: string
+ }
+ }
feature: {
Row: {
- name: string;
- updatedAt: string | null;
- id: string;
- createdAt: string;
- };
+ name: string
+ updatedAt: string | null
+ id: string
+ createdAt: string
+ }
Insert: {
- name: string;
- updatedAt?: string | null;
- id?: string;
- createdAt?: string;
- };
+ name: string
+ updatedAt?: string | null
+ id?: string
+ createdAt?: string
+ }
Update: {
- name?: string;
- updatedAt?: string | null;
- id?: string;
- createdAt?: string;
- };
- };
+ name?: string
+ updatedAt?: string | null
+ id?: string
+ createdAt?: string
+ }
+ }
group: {
Row: {
- name: string;
- id: string;
- updatedAt: string | null;
- isIdentityGroup: boolean;
- isEmployeeTypeGroup: boolean;
- isCustomerOrgGroup: boolean;
- isCustomerTypeGroup: boolean;
- isSupplierTypeGroup: boolean;
- isSupplierOrgGroup: boolean;
- createdAt: string;
- };
+ name: string
+ id: string
+ updatedAt: string | null
+ isIdentityGroup: boolean
+ isEmployeeTypeGroup: boolean
+ isCustomerOrgGroup: boolean
+ isCustomerTypeGroup: boolean
+ isSupplierTypeGroup: boolean
+ isSupplierOrgGroup: boolean
+ createdAt: string
+ }
Insert: {
- name: string;
- id?: string;
- updatedAt?: string | null;
- isIdentityGroup?: boolean;
- isEmployeeTypeGroup?: boolean;
- isCustomerOrgGroup?: boolean;
- isCustomerTypeGroup?: boolean;
- isSupplierTypeGroup?: boolean;
- isSupplierOrgGroup?: boolean;
- createdAt?: string;
- };
+ name: string
+ id?: string
+ updatedAt?: string | null
+ isIdentityGroup?: boolean
+ isEmployeeTypeGroup?: boolean
+ isCustomerOrgGroup?: boolean
+ isCustomerTypeGroup?: boolean
+ isSupplierTypeGroup?: boolean
+ isSupplierOrgGroup?: boolean
+ createdAt?: string
+ }
Update: {
- name?: string;
- id?: string;
- updatedAt?: string | null;
- isIdentityGroup?: boolean;
- isEmployeeTypeGroup?: boolean;
- isCustomerOrgGroup?: boolean;
- isCustomerTypeGroup?: boolean;
- isSupplierTypeGroup?: boolean;
- isSupplierOrgGroup?: boolean;
- createdAt?: string;
- };
- };
+ name?: string
+ id?: string
+ updatedAt?: string | null
+ isIdentityGroup?: boolean
+ isEmployeeTypeGroup?: boolean
+ isCustomerOrgGroup?: boolean
+ isCustomerTypeGroup?: boolean
+ isSupplierTypeGroup?: boolean
+ isSupplierOrgGroup?: boolean
+ createdAt?: string
+ }
+ }
membership: {
Row: {
- groupId: string;
- memberGroupId: string | null;
- memberUserId: string | null;
- id: number;
- };
+ groupId: string
+ memberGroupId: string | null
+ memberUserId: string | null
+ id: number
+ }
Insert: {
- groupId: string;
- memberGroupId?: string | null;
- memberUserId?: string | null;
- id?: number;
- };
+ groupId: string
+ memberGroupId?: string | null
+ memberUserId?: string | null
+ id?: number
+ }
Update: {
- groupId?: string;
- memberGroupId?: string | null;
- memberUserId?: string | null;
- id?: number;
- };
- };
+ groupId?: string
+ memberGroupId?: string | null
+ memberUserId?: string | null
+ id?: number
+ }
+ }
search: {
Row: {
- id: number;
- name: string;
- entity: Database["public"]["Enums"]["search_entity"] | null;
- uuid: string | null;
- link: string;
- description: string | null;
- fts: unknown | null;
- };
+ id: number
+ name: string
+ entity: Database["public"]["Enums"]["search_entity"] | null
+ uuid: string | null
+ link: string
+ description: string | null
+ fts: unknown | null
+ }
Insert: {
- id?: number;
- name: string;
- entity?: Database["public"]["Enums"]["search_entity"] | null;
- uuid?: string | null;
- link: string;
- description?: string | null;
- fts?: unknown | null;
- };
+ id?: number
+ name: string
+ entity?: Database["public"]["Enums"]["search_entity"] | null
+ uuid?: string | null
+ link: string
+ description?: string | null
+ fts?: unknown | null
+ }
Update: {
- id?: number;
- name?: string;
- entity?: Database["public"]["Enums"]["search_entity"] | null;
- uuid?: string | null;
- link?: string;
- description?: string | null;
- fts?: unknown | null;
- };
- };
+ id?: number
+ name?: string
+ entity?: Database["public"]["Enums"]["search_entity"] | null
+ uuid?: string | null
+ link?: string
+ description?: string | null
+ fts?: unknown | null
+ }
+ }
supplier: {
Row: {
- name: string;
- description: string | null;
- supplierTypeId: string | null;
- supplierStatusId: string | null;
- taxId: string | null;
- accountManagerId: string | null;
- logo: string | null;
- createdBy: string | null;
- updatedAt: string | null;
- updatedBy: string | null;
- id: string;
- createdAt: string;
- };
+ name: string
+ description: string | null
+ supplierTypeId: string | null
+ supplierStatusId: string | null
+ taxId: string | null
+ accountManagerId: string | null
+ logo: string | null
+ createdBy: string | null
+ updatedAt: string | null
+ updatedBy: string | null
+ id: string
+ createdAt: string
+ }
Insert: {
- name: string;
- description?: string | null;
- supplierTypeId?: string | null;
- supplierStatusId?: string | null;
- taxId?: string | null;
- accountManagerId?: string | null;
- logo?: string | null;
- createdBy?: string | null;
- updatedAt?: string | null;
- updatedBy?: string | null;
- id?: string;
- createdAt?: string;
- };
+ name: string
+ description?: string | null
+ supplierTypeId?: string | null
+ supplierStatusId?: string | null
+ taxId?: string | null
+ accountManagerId?: string | null
+ logo?: string | null
+ createdBy?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ id?: string
+ createdAt?: string
+ }
Update: {
- name?: string;
- description?: string | null;
- supplierTypeId?: string | null;
- supplierStatusId?: string | null;
- taxId?: string | null;
- accountManagerId?: string | null;
- logo?: string | null;
- createdBy?: string | null;
- updatedAt?: string | null;
- updatedBy?: string | null;
- id?: string;
- createdAt?: string;
- };
- };
+ name?: string
+ description?: string | null
+ supplierTypeId?: string | null
+ supplierStatusId?: string | null
+ taxId?: string | null
+ accountManagerId?: string | null
+ logo?: string | null
+ createdBy?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ id?: string
+ createdAt?: string
+ }
+ }
supplierAccount: {
Row: {
- id: string;
- supplierId: string;
- };
+ id: string
+ supplierId: string
+ }
Insert: {
- id: string;
- supplierId: string;
- };
+ id: string
+ supplierId: string
+ }
Update: {
- id?: string;
- supplierId?: string;
- };
- };
+ id?: string
+ supplierId?: string
+ }
+ }
supplierContact: {
Row: {
- supplierId: string;
- contactId: string;
- supplierLocationId: string | null;
- userId: string | null;
- id: string;
- };
+ supplierId: string
+ contactId: string
+ supplierLocationId: string | null
+ userId: string | null
+ id: string
+ }
Insert: {
- supplierId: string;
- contactId: string;
- supplierLocationId?: string | null;
- userId?: string | null;
- id?: string;
- };
+ supplierId: string
+ contactId: string
+ supplierLocationId?: string | null
+ userId?: string | null
+ id?: string
+ }
Update: {
- supplierId?: string;
- contactId?: string;
- supplierLocationId?: string | null;
- userId?: string | null;
- id?: string;
- };
- };
+ supplierId?: string
+ contactId?: string
+ supplierLocationId?: string | null
+ userId?: string | null
+ id?: string
+ }
+ }
supplierLocation: {
Row: {
- supplierId: string;
- addressId: string;
- id: string;
- };
+ supplierId: string
+ addressId: string
+ id: string
+ }
Insert: {
- supplierId: string;
- addressId: string;
- id?: string;
- };
+ supplierId: string
+ addressId: string
+ id?: string
+ }
Update: {
- supplierId?: string;
- addressId?: string;
- id?: string;
- };
- };
+ supplierId?: string
+ addressId?: string
+ id?: string
+ }
+ }
supplierStatus: {
Row: {
- name: string;
- updatedAt: string | null;
- id: string;
- createdAt: string;
- };
+ name: string
+ updatedAt: string | null
+ id: string
+ createdAt: string
+ }
Insert: {
- name: string;
- updatedAt?: string | null;
- id?: string;
- createdAt?: string;
- };
+ name: string
+ updatedAt?: string | null
+ id?: string
+ createdAt?: string
+ }
Update: {
- name?: string;
- updatedAt?: string | null;
- id?: string;
- createdAt?: string;
- };
- };
+ name?: string
+ updatedAt?: string | null
+ id?: string
+ createdAt?: string
+ }
+ }
supplierType: {
Row: {
- name: string;
- updatedAt: string | null;
- id: string;
- color: string | null;
- protected: boolean;
- createdAt: string;
- };
+ name: string
+ updatedAt: string | null
+ id: string
+ color: string | null
+ protected: boolean
+ createdAt: string
+ }
Insert: {
- name: string;
- updatedAt?: string | null;
- id?: string;
- color?: string | null;
- protected?: boolean;
- createdAt?: string;
- };
+ name: string
+ updatedAt?: string | null
+ id?: string
+ color?: string | null
+ protected?: boolean
+ createdAt?: string
+ }
Update: {
- name?: string;
- updatedAt?: string | null;
- id?: string;
- color?: string | null;
- protected?: boolean;
- createdAt?: string;
- };
- };
+ name?: string
+ updatedAt?: string | null
+ id?: string
+ color?: string | null
+ protected?: boolean
+ createdAt?: string
+ }
+ }
user: {
Row: {
- id: string;
- email: string;
- firstName: string;
- lastName: string;
- avatarUrl: string | null;
- emailVerified: string | null;
- updatedAt: string | null;
- fullName: string | null;
- about: string;
- active: boolean | null;
- createdAt: string;
- };
+ id: string
+ email: string
+ firstName: string
+ lastName: string
+ avatarUrl: string | null
+ emailVerified: string | null
+ updatedAt: string | null
+ fullName: string | null
+ about: string
+ active: boolean | null
+ createdAt: string
+ }
Insert: {
- id: string;
- email: string;
- firstName: string;
- lastName: string;
- avatarUrl?: string | null;
- emailVerified?: string | null;
- updatedAt?: string | null;
- fullName?: string | null;
- about?: string;
- active?: boolean | null;
- createdAt?: string;
- };
+ id: string
+ email: string
+ firstName: string
+ lastName: string
+ avatarUrl?: string | null
+ emailVerified?: string | null
+ updatedAt?: string | null
+ fullName?: string | null
+ about?: string
+ active?: boolean | null
+ createdAt?: string
+ }
Update: {
- id?: string;
- email?: string;
- firstName?: string;
- lastName?: string;
- avatarUrl?: string | null;
- emailVerified?: string | null;
- updatedAt?: string | null;
- fullName?: string | null;
- about?: string;
- active?: boolean | null;
- createdAt?: string;
- };
- };
+ id?: string
+ email?: string
+ firstName?: string
+ lastName?: string
+ avatarUrl?: string | null
+ emailVerified?: string | null
+ updatedAt?: string | null
+ fullName?: string | null
+ about?: string
+ active?: boolean | null
+ createdAt?: string
+ }
+ }
userAttribute: {
Row: {
- name: string;
- userAttributeCategoryId: string;
- attributeDataTypeId: number;
- listOptions: string[] | null;
- createdBy: string;
- updatedAt: string | null;
- updatedBy: string | null;
- id: string;
- sortOrder: number;
- canSelfManage: boolean | null;
- active: boolean | null;
- createdAt: string;
- };
+ name: string
+ userAttributeCategoryId: string
+ attributeDataTypeId: number
+ listOptions: string[] | null
+ createdBy: string
+ updatedAt: string | null
+ updatedBy: string | null
+ id: string
+ sortOrder: number
+ canSelfManage: boolean | null
+ active: boolean | null
+ createdAt: string
+ }
Insert: {
- name: string;
- userAttributeCategoryId: string;
- attributeDataTypeId: number;
- listOptions?: string[] | null;
- createdBy: string;
- updatedAt?: string | null;
- updatedBy?: string | null;
- id?: string;
- sortOrder?: number;
- canSelfManage?: boolean | null;
- active?: boolean | null;
- createdAt?: string;
- };
+ name: string
+ userAttributeCategoryId: string
+ attributeDataTypeId: number
+ listOptions?: string[] | null
+ createdBy: string
+ updatedAt?: string | null
+ updatedBy?: string | null
+ id?: string
+ sortOrder?: number
+ canSelfManage?: boolean | null
+ active?: boolean | null
+ createdAt?: string
+ }
Update: {
- name?: string;
- userAttributeCategoryId?: string;
- attributeDataTypeId?: number;
- listOptions?: string[] | null;
- createdBy?: string;
- updatedAt?: string | null;
- updatedBy?: string | null;
- id?: string;
- sortOrder?: number;
- canSelfManage?: boolean | null;
- active?: boolean | null;
- createdAt?: string;
- };
- };
+ name?: string
+ userAttributeCategoryId?: string
+ attributeDataTypeId?: number
+ listOptions?: string[] | null
+ createdBy?: string
+ updatedAt?: string | null
+ updatedBy?: string | null
+ id?: string
+ sortOrder?: number
+ canSelfManage?: boolean | null
+ active?: boolean | null
+ createdAt?: string
+ }
+ }
userAttributeCategory: {
Row: {
- name: string;
- createdBy: string;
- updatedAt: string | null;
- updatedBy: string | null;
- id: string;
- public: boolean | null;
- protected: boolean | null;
- active: boolean | null;
- createdAt: string;
- };
+ name: string
+ createdBy: string
+ updatedAt: string | null
+ updatedBy: string | null
+ id: string
+ public: boolean | null
+ protected: boolean | null
+ active: boolean | null
+ createdAt: string
+ }
Insert: {
- name: string;
- createdBy: string;
- updatedAt?: string | null;
- updatedBy?: string | null;
- id?: string;
- public?: boolean | null;
- protected?: boolean | null;
- active?: boolean | null;
- createdAt?: string;
- };
+ name: string
+ createdBy: string
+ updatedAt?: string | null
+ updatedBy?: string | null
+ id?: string
+ public?: boolean | null
+ protected?: boolean | null
+ active?: boolean | null
+ createdAt?: string
+ }
Update: {
- name?: string;
- createdBy?: string;
- updatedAt?: string | null;
- updatedBy?: string | null;
- id?: string;
- public?: boolean | null;
- protected?: boolean | null;
- active?: boolean | null;
- createdAt?: string;
- };
- };
+ name?: string
+ createdBy?: string
+ updatedAt?: string | null
+ updatedBy?: string | null
+ id?: string
+ public?: boolean | null
+ protected?: boolean | null
+ active?: boolean | null
+ createdAt?: string
+ }
+ }
userAttributeValue: {
Row: {
- userAttributeId: string;
- userId: string;
- valueBoolean: boolean | null;
- valueDate: string | null;
- valueNumeric: number | null;
- valueText: string | null;
- valueUser: string | null;
- createdBy: string;
- updatedAt: string | null;
- updatedBy: string | null;
- id: string;
- createdAt: string;
- };
+ userAttributeId: string
+ userId: string
+ valueBoolean: boolean | null
+ valueDate: string | null
+ valueNumeric: number | null
+ valueText: string | null
+ valueUser: string | null
+ createdBy: string
+ updatedAt: string | null
+ updatedBy: string | null
+ id: string
+ createdAt: string
+ }
Insert: {
- userAttributeId: string;
- userId: string;
- valueBoolean?: boolean | null;
- valueDate?: string | null;
- valueNumeric?: number | null;
- valueText?: string | null;
- valueUser?: string | null;
- createdBy: string;
- updatedAt?: string | null;
- updatedBy?: string | null;
- id?: string;
- createdAt?: string;
- };
+ userAttributeId: string
+ userId: string
+ valueBoolean?: boolean | null
+ valueDate?: string | null
+ valueNumeric?: number | null
+ valueText?: string | null
+ valueUser?: string | null
+ createdBy: string
+ updatedAt?: string | null
+ updatedBy?: string | null
+ id?: string
+ createdAt?: string
+ }
Update: {
- userAttributeId?: string;
- userId?: string;
- valueBoolean?: boolean | null;
- valueDate?: string | null;
- valueNumeric?: number | null;
- valueText?: string | null;
- valueUser?: string | null;
- createdBy?: string;
- updatedAt?: string | null;
- updatedBy?: string | null;
- id?: string;
- createdAt?: string;
- };
- };
+ userAttributeId?: string
+ userId?: string
+ valueBoolean?: boolean | null
+ valueDate?: string | null
+ valueNumeric?: number | null
+ valueText?: string | null
+ valueUser?: string | null
+ createdBy?: string
+ updatedAt?: string | null
+ updatedBy?: string | null
+ id?: string
+ createdAt?: string
+ }
+ }
userNote: {
Row: {
- userId: string;
- note: string;
- id: string;
- active: boolean;
- createdAt: string;
- createdBy: string;
- updatedAt: string | null;
- };
+ userId: string
+ note: string
+ id: string
+ noteRichText: Json
+ active: boolean
+ createdBy: string
+ updatedAt: string | null
+ createdAt: string
+ }
Insert: {
- userId: string;
- note: string;
- id?: string;
- active?: boolean;
- createdAt?: string;
- createdBy: string;
- updatedAt?: string | null;
- };
+ userId: string
+ note: string
+ id?: string
+ noteRichText?: Json
+ active?: boolean
+ createdBy: string
+ updatedAt?: string | null
+ createdAt?: string
+ }
Update: {
- userId?: string;
- note?: string;
- id?: string;
- active?: boolean;
- createdAt?: string;
- createdBy?: string;
- updatedAt?: string | null;
- };
- };
- };
+ userId?: string
+ note?: string
+ id?: string
+ noteRichText?: Json
+ active?: boolean
+ createdBy?: string
+ updatedAt?: string | null
+ createdAt?: string
+ }
+ }
+ }
Views: {
group_member: {
Row: {
- id: number | null;
- name: string | null;
- isIdentityGroup: boolean | null;
- isEmployeeTypeGroup: boolean | null;
- isCustomerOrgGroup: boolean | null;
- isCustomerTypeGroup: boolean | null;
- isSupplierOrgGroup: boolean | null;
- isSupplierTypeGroup: boolean | null;
- groupId: string | null;
- memberGroupId: string | null;
- memberUserId: string | null;
- user: Json | null;
- };
- };
+ id: number | null
+ name: string | null
+ isIdentityGroup: boolean | null
+ isEmployeeTypeGroup: boolean | null
+ isCustomerOrgGroup: boolean | null
+ isCustomerTypeGroup: boolean | null
+ isSupplierOrgGroup: boolean | null
+ isSupplierTypeGroup: boolean | null
+ groupId: string | null
+ memberGroupId: string | null
+ memberUserId: string | null
+ user: Json | null
+ }
+ }
groups_recursive: {
Row: {
- groupId: string | null;
- name: string | null;
- parentId: string | null;
- isIdentityGroup: boolean | null;
- isEmployeeTypeGroup: boolean | null;
- isCustomerOrgGroup: boolean | null;
- isCustomerTypeGroup: boolean | null;
- isSupplierOrgGroup: boolean | null;
- isSupplierTypeGroup: boolean | null;
- user: Json | null;
- };
- };
+ groupId: string | null
+ name: string | null
+ parentId: string | null
+ isIdentityGroup: boolean | null
+ isEmployeeTypeGroup: boolean | null
+ isCustomerOrgGroup: boolean | null
+ isCustomerTypeGroup: boolean | null
+ isSupplierOrgGroup: boolean | null
+ isSupplierTypeGroup: boolean | null
+ user: Json | null
+ }
+ }
groups_view: {
Row: {
- id: string | null;
- isEmployeeTypeGroup: boolean | null;
- isCustomerOrgGroup: boolean | null;
- isCustomerTypeGroup: boolean | null;
- isSupplierOrgGroup: boolean | null;
- isSupplierTypeGroup: boolean | null;
- name: string | null;
- parentId: string | null;
- users: Json | null;
- };
- };
- };
+ id: string | null
+ isEmployeeTypeGroup: boolean | null
+ isCustomerOrgGroup: boolean | null
+ isCustomerTypeGroup: boolean | null
+ isSupplierOrgGroup: boolean | null
+ isSupplierTypeGroup: boolean | null
+ name: string | null
+ parentId: string | null
+ users: Json | null
+ }
+ }
+ }
Functions: {
_xid_machine_id: {
- Args: Record<PropertyKey, never>;
- Returns: number;
- };
+ Args: Record<PropertyKey, never>
+ Returns: number
+ }
delete_claim: {
- Args: { uid: string; claim: string };
- Returns: string;
- };
+ Args: { uid: string; claim: string }
+ Returns: string
+ }
get_claim: {
- Args: { uid: string; claim: string };
- Returns: Json;
- };
+ Args: { uid: string; claim: string }
+ Returns: Json
+ }
get_claims: {
- Args: { uid: string };
- Returns: Json;
- };
+ Args: { uid: string }
+ Returns: Json
+ }
get_my_claim: {
- Args: { claim: string };
- Returns: Json;
- };
+ Args: { claim: string }
+ Returns: Json
+ }
get_my_claims: {
- Args: Record<PropertyKey, never>;
- Returns: Json;
- };
+ Args: Record<PropertyKey, never>
+ Returns: Json
+ }
groups_for_user: {
- Args: { uid: string };
- Returns: Json;
- };
+ Args: { uid: string }
+ Returns: Json
+ }
groups_query: {
- Args: { _name: string; _uid: string };
+ Args: { _name: string; _uid: string }
Returns: {
- id: string;
- name: string;
- parentId: string;
- isEmployeeTypeGroup: boolean;
- isCustomerOrgGroup: boolean;
- isCustomerTypeGroup: boolean;
- isSupplierOrgGroup: boolean;
- isSupplierTypeGroup: boolean;
- users: Json;
- }[];
- };
+ id: string
+ name: string
+ parentId: string
+ isEmployeeTypeGroup: boolean
+ isCustomerOrgGroup: boolean
+ isCustomerTypeGroup: boolean
+ isSupplierOrgGroup: boolean
+ isSupplierTypeGroup: boolean
+ users: Json
+ }[]
+ }
is_claims_admin: {
- Args: Record<PropertyKey, never>;
- Returns: boolean;
- };
+ Args: Record<PropertyKey, never>
+ Returns: boolean
+ }
set_claim: {
- Args: { uid: string; claim: string; value: Json };
- Returns: string;
- };
+ Args: { uid: string; claim: string; value: Json }
+ Returns: string
+ }
users_for_groups: {
- Args: { groups: string[] };
- Returns: Json;
- };
+ Args: { groups: string[] }
+ Returns: Json
+ }
xid: {
- Args: { _at: string };
- Returns: unknown;
- };
+ Args: { _at: string }
+ Returns: unknown
+ }
xid_counter: {
- Args: { _xid: unknown };
- Returns: number;
- };
+ Args: { _xid: unknown }
+ Returns: number
+ }
xid_decode: {
- Args: { _xid: unknown };
- Returns: number[];
- };
+ Args: { _xid: unknown }
+ Returns: number[]
+ }
xid_encode: {
- Args: { _id: number[] };
- Returns: unknown;
- };
+ Args: { _id: number[] }
+ Returns: unknown
+ }
xid_machine: {
- Args: { _xid: unknown };
- Returns: number[];
- };
+ Args: { _xid: unknown }
+ Returns: number[]
+ }
xid_pid: {
- Args: { _xid: unknown };
- Returns: number;
- };
+ Args: { _xid: unknown }
+ Returns: number
+ }
xid_time: {
- Args: { _xid: unknown };
- Returns: string;
- };
- };
+ Args: { _xid: unknown }
+ Returns: string
+ }
+ }
Enums: {
search_entity:
| "Resource"
@@ -952,7 +1019,8 @@ export interface Database {
| "Part"
| "Purchase Order"
| "Sales Order"
- | "Document";
- };
- };
+ | "Document"
+ }
+ }
}
+
diff --git a/packages/carbon-database/supabase/migrations/20230123003711_xid.sql b/packages/carbon-database/supabase/migrations/20230123003711_xid.sql
index f30b1870f8..36f2ebf682 100644
--- a/packages/carbon-database/supabase/migrations/20230123003711_xid.sql
+++ b/packages/carbon-database/supabase/migrations/20230123003711_xid.sql
@@ -1,3 +1,7 @@
+-- xid is a globally unique id generator functions.
+-- they are 20 characters long and ordered
+-- https://github.com/modfin/pg-xid
+
CREATE DOMAIN public.xid AS CHAR(20) CHECK (VALUE ~ '^[a-v0-9]{20}$');
CREATE SEQUENCE IF NOT EXISTS public.xid_serial MINVALUE 0 MAXVALUE 16777215 CYCLE; -- ((255<<16) + (255<<8) + 255))
diff --git a/packages/carbon-database/supabase/migrations/20230209041302_notes.sql b/packages/carbon-database/supabase/migrations/20230209041302_notes.sql
index 9c92be0f59..58da9f62d9 100644
--- a/packages/carbon-database/supabase/migrations/20230209041302_notes.sql
+++ b/packages/carbon-database/supabase/migrations/20230209041302_notes.sql
@@ -2,6 +2,7 @@ CREATE TABLE "userNote" (
"id" TEXT NOT NULL DEFAULT xid(),
"userId" TEXT NOT NULL,
"note" TEXT NOT NULL,
+ "noteRichText" JSONB NOT NULL DEFAULT '{}'::jsonb,
"active" BOOLEAN NOT NULL DEFAULT true,
"createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
"createdBy" TEXT NOT NULL,
diff --git a/packages/carbon-database/supabase/migrations/20230215023746_abilities.sql b/packages/carbon-database/supabase/migrations/20230215023746_abilities.sql
new file mode 100644
index 0000000000..33570506dd
--- /dev/null
+++ b/packages/carbon-database/supabase/migrations/20230215023746_abilities.sql
@@ -0,0 +1,91 @@
+CREATE TABLE "ability" (
+ "id" TEXT NOT NULL DEFAULT xid(),
+ "name" TEXT NOT NULL,
+ "curve" JSONB NOT NULL DEFAULT '{"data":[{"id":0,"week":0,"value":50},{"id":1,"week":1,"value":80},{"id":2,"week":2,"value":90},{"id":3,"week":3,"value":100}]}'::jsonb,
+ "shadowWeeks" NUMERIC NOT NULL DEFAULT 0,
+ "active" BOOLEAN NOT NULL DEFAULT true,
+ "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
+ "createdBy" TEXT NOT NULL,
+ "updatedAt" TIMESTAMP WITH TIME ZONE,
+ "updatedBy" TEXT,
+
+ CONSTRAINT "abilities_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "abilities_createdBy_fkey" FOREIGN KEY ("createdBy") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT "abilities_updatedBy_fkey" FOREIGN KEY ("updatedBy") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE
+);
+
+ALTER TABLE "ability" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "Employees with resources_view can view abilities" ON "ability"
+ FOR SELECT
+ USING (
+ coalesce(get_my_claim('resources_view')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+ );
+
+CREATE POLICY "Employees with resources_create can insert abilities" ON "ability"
+ FOR INSERT
+ WITH CHECK (
+ coalesce(get_my_claim('resources_create')::boolean,false)
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+);
+
+CREATE POLICY "Employees with resources_update can update abilities" ON "ability"
+ FOR UPDATE
+ USING (
+ coalesce(get_my_claim('resources_update')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+ );
+
+CREATE POLICY "Employees with resources_delete can delete abilities" ON "ability"
+ FOR DELETE
+ USING (
+ coalesce(get_my_claim('resources_delete')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+ );
+
+CREATE TABLE "employeeAbility" (
+ "id" TEXT NOT NULL DEFAULT xid(),
+ "employeeId" TEXT NOT NULL,
+ "abilityId" TEXT NOT NULL,
+ "active" BOOLEAN NOT NULL DEFAULT true,
+ "lastTrainingDate" DATE,
+ "trainingDays" NUMERIC NOT NULL DEFAULT 0,
+ "trainingCompleted" BOOLEAN DEFAULT false,
+
+ CONSTRAINT "employeeAbilities_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "employeeAbilities_employeeId_fkey" FOREIGN KEY ("employeeId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT "employeeAbilities_abilityId_fkey" FOREIGN KEY ("abilityId") REFERENCES "ability"("id") ON DELETE CASCADE ON UPDATE CASCADE,
+
+ CONSTRAINT uq_employeeAbility_employeeId_abilityId UNIQUE ( "employeeId", "abilityId")
+);
+
+ALTER TABLE "employeeAbility" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "Employees with resources_view can view employeeAbilities" ON "employeeAbility"
+ FOR SELECT
+ USING (
+ coalesce(get_my_claim('resources_view')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+ );
+
+CREATE POLICY "Employees with resources_create can insert employeeAbilities" ON "employeeAbility"
+ FOR INSERT
+ WITH CHECK (
+ coalesce(get_my_claim('resources_create')::boolean,false)
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+);
+
+CREATE POLICY "Employees with resources_update can update employeeAbilities" ON "employeeAbility"
+ FOR UPDATE
+ USING (
+ coalesce(get_my_claim('resources_update')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+ );
+
+CREATE POLICY "Employees with resources_delete can delete employeeAbilities" ON "employeeAbility"
+ FOR DELETE
+ USING (
+ coalesce(get_my_claim('resources_delete')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+ );
diff --git a/packages/carbon-react/src/Inputs/Select/components/containers.tsx b/packages/carbon-react/src/Inputs/Select/components/containers.tsx
index 1f979a3173..7821b729c7 100644
--- a/packages/carbon-react/src/Inputs/Select/components/containers.tsx
+++ b/packages/carbon-react/src/Inputs/Select/components/containers.tsx
@@ -6,6 +6,7 @@ import type {
IndicatorsContainerProps,
ValueContainerProps,
} from "react-select";
+import { useColor } from "../../../hooks";
export const SelectContainer = <
Option,
@@ -28,6 +29,7 @@ export const SelectContainer = <
const initialSx: SystemStyleObject = {
position: "relative",
direction: isRtl ? "rtl" : undefined,
+ background: useColor("white"),
...(isDisabled ? { cursor: "not-allowed" } : {}),
};
diff --git a/packages/carbon-react/src/Inputs/Select/useSelect.ts b/packages/carbon-react/src/Inputs/Select/useSelect.ts
index 5779496d32..5ff7764efb 100644
--- a/packages/carbon-react/src/Inputs/Select/useSelect.ts
+++ b/packages/carbon-react/src/Inputs/Select/useSelect.ts
@@ -103,7 +103,6 @@ const useSelect = <
...components,
},
// Custom select props
- borderRadius,
colorScheme,
size: realSize,
tagVariant: realTagVariant,
diff --git a/packages/carbon-react/src/Theme/focusRing.ts b/packages/carbon-react/src/Theme/focusRing.ts
index 66dff7a63a..095dabafca 100644
--- a/packages/carbon-react/src/Theme/focusRing.ts
+++ b/packages/carbon-react/src/Theme/focusRing.ts
@@ -1,5 +1,7 @@
-export const focusRingOutlined = () => ({
+type ColorMode = "light" | "dark";
+export const focusRingOutlined = ({ colorMode }: { colorMode: ColorMode }) => ({
field: {
+ backgroundColor: colorMode == "light" ? "white" : "gray.800",
_focus: {
borderColor: "var(--chakra-ui-focus-ring-color)",
boxShadow: "0 0 0 2px var(--chakra-ui-focus-ring-color)",
@@ -7,8 +9,9 @@ export const focusRingOutlined = () => ({
},
});
-export const focusRingFilled = () => ({
+export const focusRingFilled = ({ colorMode }: { colorMode: ColorMode }) => ({
field: {
+ backgroundColor: colorMode == "light" ? "white" : "gray.800",
_focus: {
borderColor: "var(--chakra-ui-focus-ring-color)",
boxShadow: "0 0 0 1px var(--chakra-ui-focus-ring-color)",
@@ -16,8 +19,9 @@ export const focusRingFilled = () => ({
},
});
-export const focusRingFlushed = () => ({
+export const focusRingFlushed = ({ colorMode }: { colorMode: ColorMode }) => ({
field: {
+ backgroundColor: colorMode == "light" ? "white" : "gray.800",
_focus: {
borderColor: "var(--chakra-ui-focus-ring-color)",
boxShadow: "0 1px 0 0 var(--chakra-ui-focus-ring-color)",
diff --git a/packages/carbon-react/src/Theme/theme.ts b/packages/carbon-react/src/Theme/theme.ts
index a4272cc07d..c1e98a3d70 100644
--- a/packages/carbon-react/src/Theme/theme.ts
+++ b/packages/carbon-react/src/Theme/theme.ts
@@ -56,7 +56,9 @@ export const theme = {
borderBottomStyle: "solid",
},
footer: {
- background: "gray.100",
+ borderTopWidth: "1px",
+ borderTopStyle: "solid",
+ borderColor: "gray.200",
display: "block",
},
},
@@ -80,11 +82,6 @@ export const theme = {
defaultProps: {},
},
Input: {
- baseStyle: {
- field: {
- background: "white",
- },
- },
defaultProps: {
borderRadius: "md",
},
@@ -123,9 +120,9 @@ export const theme = {
},
Textarea: {
variants: {
- outline: () => focusRingOutlined().field,
- filled: () => focusRingFilled().field,
- flushed: () => focusRingFlushed().field,
+ outline: () => focusRingOutlined,
+ filled: () => focusRingFilled,
+ flushed: () => focusRingFlushed,
},
},
},
diff --git a/packages/carbon-utils/src/arrays.ts b/packages/carbon-utils/src/arrays.ts
new file mode 100644
index 0000000000..2b2cc8c753
--- /dev/null
+++ b/packages/carbon-utils/src/arrays.ts
@@ -0,0 +1,21 @@
+/**
+ * A utility type to get the element type of an array.
+ */
+export type ArrayElement<A> = A extends readonly (infer T)[] ? T : never;
+
+/**
+ * A utility function to filter out null and undefined values from an array.
+ */
+export const filterEmpty = <
+ T extends Array<any>,
+ U = Exclude<ArrayElement<T>, null | undefined>
+>(
+ arr: T
+): U[] =>
+ arr.reduce<U[]>((acc, item) => {
+ if (item !== null && item !== undefined) {
+ acc.push(item);
+ }
+
+ return acc;
+ }, []);
diff --git a/scripts/generate-types.ts b/scripts/generate-db-types.ts
similarity index 100%
rename from scripts/generate-types.ts
rename to scripts/generate-db-types.ts
diff --git a/scripts/generate-schema-md.ts b/scripts/generate-schema-md.ts
new file mode 100644
index 0000000000..7bcf92c5cc
--- /dev/null
+++ b/scripts/generate-schema-md.ts
@@ -0,0 +1,64 @@
+import fs from "fs";
+import path from "path";
+
+readFiles(
+ path.resolve(__dirname, "../packages/carbon-database/supabase/migrations"),
+ writeMarkDown,
+ (err) => {
+ throw new Error(err.message);
+ }
+);
+
+function writeMarkDown(
+ fileName: string,
+ content: string,
+ stream: fs.WriteStream
+) {
+ const heading = fileName.split("_")[1].split(".")[0];
+ const markdown = `
+
+## \`${heading}\`
+
+\`\`\`sql
+${content}
+\`\`\`
+
+`;
+ stream.write(markdown);
+}
+
+function readFiles(
+ dirName: string,
+ onFileContent: (
+ fileName: string,
+ content: string,
+ stream: fs.WriteStream
+ ) => void,
+ onError: (err: Error) => void
+) {
+ fs.writeFile(
+ path.resolve(__dirname, "../SCHEMA.md"),
+ "# Carbon Database Schema",
+ function () {
+ console.log("Rewriting SCHEMA.md");
+ }
+ );
+ const stream = fs.createWriteStream("SCHEMA.md", { flags: "a" });
+ stream.write(`
+
+This file is generated by \`scripts/generate-schema-md.ts\` using the migrations in \`packages/carbon-database/supabase/migrations\`.
+
+`);
+ fs.readdir(dirName, function (err, fileNames) {
+ if (err) {
+ onError(err);
+ return;
+ }
+ fileNames.forEach(function (fileName) {
+ let content = fs.readFileSync(dirName + "/" + fileName, "utf-8");
+ onFileContent(fileName, content, stream);
+ });
+
+ stream.end();
+ });
+}
diff --git a/yarn.lock b/yarn.lock
index 1f81b4b069..397f71fd7d 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2,7 +2,7 @@
# yarn lockfile v1
-"@ampproject/remapping@^2.1.0":
+"@ampproject/remapping@^2.1.0", "@ampproject/remapping@^2.2.0":
version "2.2.0"
resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d"
integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==
@@ -29,7 +29,12 @@
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.19.4.tgz#95c86de137bf0317f3a570e1b6e996b427299747"
integrity sha512-CHIGpJcUQ5lU9KrPHTjBMhVwQG6CQjxfg36fGXl3qk/Gik1WwWachaXFuo0uCWJT/mStOKtcbFJCaVLihC1CMw==
-"@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.13.16", "@babel/core@^7.18.6", "@babel/core@^7.19.1", "@babel/core@^7.7.5":
+"@babel/compat-data@^7.20.5":
+ version "7.21.0"
+ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.21.0.tgz#c241dc454e5b5917e40d37e525e2f4530c399298"
+ integrity sha512-gMuZsmsgxk/ENC3O/fRw5QY8A9/uxQbbCEypnLIiYYc/qVJtEV7ouxC3EllIIwNzMqAQee5tanFabWsUOutS7g==
+
+"@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.18.6", "@babel/core@^7.19.1", "@babel/core@^7.7.5":
version "7.19.6"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.19.6.tgz#7122ae4f5c5a37c0946c066149abd8e75f81540f"
integrity sha512-D2Ue4KHpc6Ys2+AxpIx1BZ8+UegLLLE2p3KJEuJRKmokHOtl49jQ5ny1773KsGLZs8MQvBidAF6yWUJxRqtKtg==
@@ -50,6 +55,27 @@
json5 "^2.2.1"
semver "^6.3.0"
+"@babel/core@^7.20.7":
+ version "7.21.0"
+ resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.0.tgz#1341aefdcc14ccc7553fcc688dd8986a2daffc13"
+ integrity sha512-PuxUbxcW6ZYe656yL3EAhpy7qXKq0DmYsrJLpbB8XrsCP9Nm+XCg9XFMb5vIDliPD7+U/+M+QJlH17XOcB7eXA==
+ dependencies:
+ "@ampproject/remapping" "^2.2.0"
+ "@babel/code-frame" "^7.18.6"
+ "@babel/generator" "^7.21.0"
+ "@babel/helper-compilation-targets" "^7.20.7"
+ "@babel/helper-module-transforms" "^7.21.0"
+ "@babel/helpers" "^7.21.0"
+ "@babel/parser" "^7.21.0"
+ "@babel/template" "^7.20.7"
+ "@babel/traverse" "^7.21.0"
+ "@babel/types" "^7.21.0"
+ convert-source-map "^1.7.0"
+ debug "^4.1.0"
+ gensync "^1.0.0-beta.2"
+ json5 "^2.2.2"
+ semver "^6.3.0"
+
"@babel/eslint-parser@^7.19.1":
version "7.19.1"
resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.19.1.tgz#4f68f6b0825489e00a24b41b6a1ae35414ecd2f4"
@@ -59,6 +85,16 @@
eslint-visitor-keys "^2.1.0"
semver "^6.3.0"
+"@babel/generator@^7.18.6", "@babel/generator@^7.21.0":
+ version "7.21.1"
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.1.tgz#951cc626057bc0af2c35cd23e9c64d384dea83dd"
+ integrity sha512-1lT45bAYlQhFn/BHivJs43AiW2rg3/UbLyShGfF3C0KmHvO5fSghWd5kBJy30kpRRucGzXStvnnCFniCR2kXAA==
+ dependencies:
+ "@babel/types" "^7.21.0"
+ "@jridgewell/gen-mapping" "^0.3.2"
+ "@jridgewell/trace-mapping" "^0.3.17"
+ jsesc "^2.5.1"
+
"@babel/generator@^7.19.6":
version "7.19.6"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.19.6.tgz#9e481a3fe9ca6261c972645ae3904ec0f9b34a1d"
@@ -93,6 +129,17 @@
browserslist "^4.21.3"
semver "^6.3.0"
+"@babel/helper-compilation-targets@^7.20.7":
+ version "7.20.7"
+ resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz#a6cd33e93629f5eb473b021aac05df62c4cd09bb"
+ integrity sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==
+ dependencies:
+ "@babel/compat-data" "^7.20.5"
+ "@babel/helper-validator-option" "^7.18.6"
+ browserslist "^4.21.3"
+ lru-cache "^5.1.1"
+ semver "^6.3.0"
+
"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.19.0":
version "7.19.0"
resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.19.0.tgz#bfd6904620df4e46470bae4850d66be1054c404b"
@@ -146,6 +193,14 @@
"@babel/template" "^7.18.10"
"@babel/types" "^7.19.0"
+"@babel/helper-function-name@^7.21.0":
+ version "7.21.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz#d552829b10ea9f120969304023cd0645fa00b1b4"
+ integrity sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==
+ dependencies:
+ "@babel/template" "^7.20.7"
+ "@babel/types" "^7.21.0"
+
"@babel/helper-hoist-variables@^7.18.6":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678"
@@ -181,6 +236,20 @@
"@babel/traverse" "^7.19.6"
"@babel/types" "^7.19.4"
+"@babel/helper-module-transforms@^7.21.0":
+ version "7.21.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.21.0.tgz#89a8f86ad748870e3d024e470b2e8405e869db67"
+ integrity sha512-eD/JQ21IG2i1FraJnTMbUarAUkA7G988ofehG5MDCRXaUU91rEBJuCeSoou2Sk1y4RbLYXzqEg1QLwEmRU4qcQ==
+ dependencies:
+ "@babel/helper-environment-visitor" "^7.18.9"
+ "@babel/helper-module-imports" "^7.18.6"
+ "@babel/helper-simple-access" "^7.20.2"
+ "@babel/helper-split-export-declaration" "^7.18.6"
+ "@babel/helper-validator-identifier" "^7.19.1"
+ "@babel/template" "^7.20.7"
+ "@babel/traverse" "^7.21.0"
+ "@babel/types" "^7.21.0"
+
"@babel/helper-optimise-call-expression@^7.18.6":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe"
@@ -221,6 +290,13 @@
dependencies:
"@babel/types" "^7.19.4"
+"@babel/helper-simple-access@^7.20.2":
+ version "7.20.2"
+ resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz#0ab452687fe0c2cfb1e2b9e0015de07fc2d62dd9"
+ integrity sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==
+ dependencies:
+ "@babel/types" "^7.20.2"
+
"@babel/helper-skip-transparent-expression-wrappers@^7.18.9":
version "7.18.9"
resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.9.tgz#778d87b3a758d90b471e7b9918f34a9a02eb5818"
@@ -269,6 +345,15 @@
"@babel/traverse" "^7.19.4"
"@babel/types" "^7.19.4"
+"@babel/helpers@^7.21.0":
+ version "7.21.0"
+ resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.21.0.tgz#9dd184fb5599862037917cdc9eecb84577dc4e7e"
+ integrity sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA==
+ dependencies:
+ "@babel/template" "^7.20.7"
+ "@babel/traverse" "^7.21.0"
+ "@babel/types" "^7.21.0"
+
"@babel/highlight@^7.10.4", "@babel/highlight@^7.18.6":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf"
@@ -278,11 +363,16 @@
chalk "^2.0.0"
js-tokens "^4.0.0"
-"@babel/parser@^7.1.0", "@babel/parser@^7.13.16", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.19.6":
+"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.19.6":
version "7.19.6"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.19.6.tgz#b923430cb94f58a7eae8facbffa9efd19130e7f8"
integrity sha512-h1IUp81s2JYJ3mRkdxJgs4UvmSsRvDrx5ICSJbPvtWYv5i1nTBGcBpnog+89rAFMwvvru6E5NUHdBe01UeSzYA==
+"@babel/parser@^7.18.6", "@babel/parser@^7.20.7", "@babel/parser@^7.21.0":
+ version "7.21.1"
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.1.tgz#a8f81ee2fe872af23faea4b17a08fcc869de7bcc"
+ integrity sha512-JzhBFpkuhBNYUY7qs+wTzNmyCWUHEaAFpQQD2YfU1rPL38/L43Wvid0fFkiOCnHvsGncRZgEPyGnltABLcVDTg==
+
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz#da5b8f9a580acdfbe53494dba45ea389fb09a4d2"
@@ -309,7 +399,7 @@
"@babel/helper-remap-async-to-generator" "^7.18.9"
"@babel/plugin-syntax-async-generators" "^7.8.4"
-"@babel/plugin-proposal-class-properties@^7.13.0", "@babel/plugin-proposal-class-properties@^7.18.6":
+"@babel/plugin-proposal-class-properties@^7.18.6":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3"
integrity sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==
@@ -358,7 +448,7 @@
"@babel/helper-plugin-utils" "^7.18.9"
"@babel/plugin-syntax-logical-assignment-operators" "^7.10.4"
-"@babel/plugin-proposal-nullish-coalescing-operator@^7.13.8", "@babel/plugin-proposal-nullish-coalescing-operator@^7.18.6":
+"@babel/plugin-proposal-nullish-coalescing-operator@^7.18.6":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz#fdd940a99a740e577d6c753ab6fbb43fdb9467e1"
integrity sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==
@@ -393,7 +483,7 @@
"@babel/helper-plugin-utils" "^7.18.6"
"@babel/plugin-syntax-optional-catch-binding" "^7.8.3"
-"@babel/plugin-proposal-optional-chaining@^7.13.12", "@babel/plugin-proposal-optional-chaining@^7.18.9":
+"@babel/plugin-proposal-optional-chaining@^7.18.9":
version "7.18.9"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.9.tgz#e8e8fe0723f2563960e4bf5e9690933691915993"
integrity sha512-v5nwt4IqBXihxGsW2QmCWMDS3B3bzGIk/EQVZz2ei7f3NJl8NzAJVvUmpDW5q1CRNY+Beb/k58UAH1Km1N411w==
@@ -470,13 +560,6 @@
dependencies:
"@babel/helper-plugin-utils" "^7.8.3"
-"@babel/plugin-syntax-flow@^7.18.6":
- version "7.18.6"
- resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.18.6.tgz#774d825256f2379d06139be0c723c4dd444f3ca1"
- integrity sha512-LUbR+KNTBWCUAqRG9ex5Gnzu2IOkt8jRJbHHXFT9q+L9zm7M/QQbEqXyw1n1pohYvOyWC8CjeyjrSaIwiYjK7A==
- dependencies:
- "@babel/helper-plugin-utils" "^7.18.6"
-
"@babel/plugin-syntax-import-assertions@^7.18.6":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.18.6.tgz#cd6190500a4fa2fe31990a963ffab4b63e4505e4"
@@ -657,14 +740,6 @@
"@babel/helper-builder-binary-assignment-operator-visitor" "^7.18.6"
"@babel/helper-plugin-utils" "^7.18.6"
-"@babel/plugin-transform-flow-strip-types@^7.18.6":
- version "7.19.0"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.19.0.tgz#e9e8606633287488216028719638cbbb2f2dde8f"
- integrity sha512-sgeMlNaQVbCSpgLSKP4ZZKfsJVnFnNQlUSk6gPYzR/q7tzCgQF2t8RBKAP6cKJeZdveei7Q7Jm527xepI8lNLg==
- dependencies:
- "@babel/helper-plugin-utils" "^7.19.0"
- "@babel/plugin-syntax-flow" "^7.18.6"
-
"@babel/plugin-transform-for-of@^7.18.8":
version "7.18.8"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz#6ef8a50b244eb6a0bdbad0c7c61877e4e30097c1"
@@ -703,7 +778,7 @@
"@babel/helper-module-transforms" "^7.19.6"
"@babel/helper-plugin-utils" "^7.19.0"
-"@babel/plugin-transform-modules-commonjs@^7.13.8", "@babel/plugin-transform-modules-commonjs@^7.18.6":
+"@babel/plugin-transform-modules-commonjs@^7.18.6":
version "7.19.6"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.19.6.tgz#25b32feef24df8038fc1ec56038917eacb0b730c"
integrity sha512-8PIa1ym4XRTKuSsOUXqDG0YaOlEuTVvHMe5JCfgBMOtHvJKw/4NGovEGN33viISshG/rZNVrACiBmPQLvWN8xQ==
@@ -956,15 +1031,6 @@
core-js-compat "^3.25.1"
semver "^6.3.0"
-"@babel/preset-flow@^7.13.13":
- version "7.18.6"
- resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.18.6.tgz#83f7602ba566e72a9918beefafef8ef16d2810cb"
- integrity sha512-E7BDhL64W6OUqpuyHnSroLnqyRTcG6ZdOBl1OKI/QK/HJfplqK/S3sq1Cckx7oTodJ5yOXyfw7rEADJ6UjoQDQ==
- dependencies:
- "@babel/helper-plugin-utils" "^7.18.6"
- "@babel/helper-validator-option" "^7.18.6"
- "@babel/plugin-transform-flow-strip-types" "^7.18.6"
-
"@babel/preset-modules@^0.1.5":
version "0.1.5"
resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.5.tgz#ef939d6e7f268827e1841638dc6ff95515e115d9"
@@ -988,7 +1054,7 @@
"@babel/plugin-transform-react-jsx-development" "^7.18.6"
"@babel/plugin-transform-react-pure-annotations" "^7.18.6"
-"@babel/preset-typescript@^7.13.0", "@babel/preset-typescript@^7.18.6":
+"@babel/preset-typescript@^7.18.6":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz#ce64be3e63eddc44240c6358daefac17b3186399"
integrity sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ==
@@ -997,17 +1063,6 @@
"@babel/helper-validator-option" "^7.18.6"
"@babel/plugin-transform-typescript" "^7.18.6"
-"@babel/register@^7.13.16":
- version "7.18.9"
- resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.18.9.tgz#1888b24bc28d5cc41c412feb015e9ff6b96e439c"
- integrity sha512-ZlbnXDcNYHMR25ITwwNKT88JiaukkdVj/nG7r3wnuXkOTHc60Uy05PwMCPre0hSkY68E6zK3xz+vUJSP2jWmcw==
- dependencies:
- clone-deep "^4.0.1"
- find-cache-dir "^2.0.0"
- make-dir "^2.1.0"
- pirates "^4.0.5"
- source-map-support "^0.5.16"
-
"@babel/runtime-corejs3@^7.10.2":
version "7.19.6"
resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.19.6.tgz#778471a71d915cf3b955a9201bebabfe924f872a"
@@ -1032,6 +1087,15 @@
"@babel/parser" "^7.18.10"
"@babel/types" "^7.18.10"
+"@babel/template@^7.20.7":
+ version "7.20.7"
+ resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.20.7.tgz#a15090c2839a83b02aa996c0b4994005841fd5a8"
+ integrity sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==
+ dependencies:
+ "@babel/code-frame" "^7.18.6"
+ "@babel/parser" "^7.20.7"
+ "@babel/types" "^7.20.7"
+
"@babel/traverse@^7.1.0", "@babel/traverse@^7.19.0", "@babel/traverse@^7.19.1", "@babel/traverse@^7.19.4", "@babel/traverse@^7.19.6":
version "7.19.6"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.19.6.tgz#7b4c865611df6d99cb131eec2e8ac71656a490dc"
@@ -1048,6 +1112,22 @@
debug "^4.1.0"
globals "^11.1.0"
+"@babel/traverse@^7.18.6", "@babel/traverse@^7.21.0":
+ version "7.21.0"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.21.0.tgz#0e1807abd5db98e6a19c204b80ed1e3f5bca0edc"
+ integrity sha512-Xdt2P1H4LKTO8ApPfnO1KmzYMFpp7D/EinoXzLYN/cHcBNrVCAkAtGUcXnHXrl/VGktureU6fkQrHSBE2URfoA==
+ dependencies:
+ "@babel/code-frame" "^7.18.6"
+ "@babel/generator" "^7.21.0"
+ "@babel/helper-environment-visitor" "^7.18.9"
+ "@babel/helper-function-name" "^7.21.0"
+ "@babel/helper-hoist-variables" "^7.18.6"
+ "@babel/helper-split-export-declaration" "^7.18.6"
+ "@babel/parser" "^7.21.0"
+ "@babel/types" "^7.21.0"
+ debug "^4.1.0"
+ globals "^11.1.0"
+
"@babel/types@^7.0.0", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.0", "@babel/types@^7.19.4", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4":
version "7.19.4"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.19.4.tgz#0dd5c91c573a202d600490a35b33246fed8a41c7"
@@ -1066,6 +1146,15 @@
"@babel/helper-validator-identifier" "^7.19.1"
to-fast-properties "^2.0.0"
+"@babel/types@^7.20.7", "@babel/types@^7.21.0":
+ version "7.21.0"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.0.tgz#1da00d89c2f18b226c9207d96edbeb79316a1819"
+ integrity sha512-uR7NWq2VNFnDi7EYqiRz2Jv/VQIu38tu64Zy8TX2nQFQ6etJ9V/Rr2msW8BS132mum2rL645qpDrLtAJtVpuow==
+ dependencies:
+ "@babel/helper-string-parser" "^7.19.4"
+ "@babel/helper-validator-identifier" "^7.19.1"
+ to-fast-properties "^2.0.0"
+
"@bcoe/v8-coverage@^0.2.3":
version "0.2.3"
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
@@ -1872,6 +1961,13 @@
exec-sh "^0.3.2"
minimist "^1.2.0"
+"@cspotcode/source-map-support@^0.8.0":
+ version "0.8.1"
+ resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1"
+ integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==
+ dependencies:
+ "@jridgewell/trace-mapping" "0.3.9"
+
"@edge-runtime/[email protected]":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@edge-runtime/format/-/format-1.1.0.tgz#5a209221a8bae7791d6e465c480f146249d1e15f"
@@ -2051,6 +2147,11 @@
escape-string-regexp "^4.0.0"
rollup-plugin-node-polyfills "^0.2.1"
+"@esbuild/[email protected]":
+ version "0.16.17"
+ resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.16.17.tgz#cf91e86df127aa3d141744edafcba0abdc577d23"
+ integrity sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==
+
"@esbuild/[email protected]":
version "0.16.3"
resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.16.3.tgz#6af6d16be6d534d776a51fc215bfd81a68906d2c"
@@ -2066,46 +2167,91 @@
resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.15.15.tgz#35b3cc0f9e69cb53932d44f60b99dd440335d2f0"
integrity sha512-JJjZjJi2eBL01QJuWjfCdZxcIgot+VoK6Fq7eKF9w4YHm9hwl7nhBR1o2Wnt/WcANk5l9SkpvrldW1PLuXxcbw==
+"@esbuild/[email protected]":
+ version "0.16.17"
+ resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.16.17.tgz#025b6246d3f68b7bbaa97069144fb5fb70f2fff2"
+ integrity sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==
+
"@esbuild/[email protected]":
version "0.16.3"
resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.16.3.tgz#2a091222f3b1928e3246fb3c5202eaca88baab67"
integrity sha512-mueuEoh+s1eRbSJqq9KNBQwI4QhQV6sRXIfTyLXSHGMpyew61rOK4qY21uKbXl1iBoMb0AdL1deWFCQVlN2qHA==
+"@esbuild/[email protected]":
+ version "0.16.17"
+ resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.16.17.tgz#c820e0fef982f99a85c4b8bfdd582835f04cd96e"
+ integrity sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==
+
"@esbuild/[email protected]":
version "0.16.3"
resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.16.3.tgz#a6d749c58b022d371dc40d50ac1bb4aebd1eb953"
integrity sha512-SFpTUcIT1bIJuCCBMCQWq1bL2gPTjWoLZdjmIhjdcQHaUfV41OQfho6Ici5uvvkMmZRXIUGpM3GxysP/EU7ifQ==
+"@esbuild/[email protected]":
+ version "0.16.17"
+ resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.16.17.tgz#edef4487af6b21afabba7be5132c26d22379b220"
+ integrity sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==
+
"@esbuild/[email protected]":
version "0.16.3"
resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.16.3.tgz#92d1826ed2f21dcac5830b70d7215c6afbb744e2"
integrity sha512-DO8WykMyB+N9mIDfI/Hug70Dk1KipavlGAecxS3jDUwAbTpDXj0Lcwzw9svkhxfpCagDmpaTMgxWK8/C/XcXvw==
+"@esbuild/[email protected]":
+ version "0.16.17"
+ resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.16.17.tgz#42829168730071c41ef0d028d8319eea0e2904b4"
+ integrity sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==
+
"@esbuild/[email protected]":
version "0.16.3"
resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.16.3.tgz#7fc3570c2b16e9ff4fc178593a0a4adb1ae8ea57"
integrity sha512-uEqZQ2omc6BvWqdCiyZ5+XmxuHEi1SPzpVxXCSSV2+Sh7sbXbpeNhHIeFrIpRjAs0lI1FmA1iIOxFozKBhKgRQ==
+"@esbuild/[email protected]":
+ version "0.16.17"
+ resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.17.tgz#1f4af488bfc7e9ced04207034d398e793b570a27"
+ integrity sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==
+
"@esbuild/[email protected]":
version "0.16.3"
resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.3.tgz#16735ce16f8c9a4e7289e9e259aa01a8d9874307"
integrity sha512-nJansp3sSXakNkOD5i5mIz2Is/HjzIhFs49b1tjrPrpCmwgBmH9SSzhC/Z1UqlkivqMYkhfPwMw1dGFUuwmXhw==
+"@esbuild/[email protected]":
+ version "0.16.17"
+ resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.16.17.tgz#636306f19e9bc981e06aa1d777302dad8fddaf72"
+ integrity sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==
+
"@esbuild/[email protected]":
version "0.16.3"
resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.16.3.tgz#f4edd1464cb072799ed6b8ab5178478e71c13459"
integrity sha512-TfoDzLw+QHfc4a8aKtGSQ96Wa+6eimljjkq9HKR0rHlU83vw8aldMOUSJTUDxbcUdcgnJzPaX8/vGWm7vyV7ug==
+"@esbuild/[email protected]":
+ version "0.16.17"
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.16.17.tgz#a003f7ff237c501e095d4f3a09e58fc7b25a4aca"
+ integrity sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==
+
"@esbuild/[email protected]":
version "0.16.3"
resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.16.3.tgz#4b7ae6fe3618d9a40d6ca39c6edc991ac1447203"
integrity sha512-7I3RlsnxEFCHVZNBLb2w7unamgZ5sVwO0/ikE2GaYvYuUQs9Qte/w7TqWcXHtCwxvZx/2+F97ndiUQAWs47ZfQ==
+"@esbuild/[email protected]":
+ version "0.16.17"
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.16.17.tgz#b591e6a59d9c4fe0eeadd4874b157ab78cf5f196"
+ integrity sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==
+
"@esbuild/[email protected]":
version "0.16.3"
resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.16.3.tgz#4b3e9f849822e16a76a70844c4db68075b259a58"
integrity sha512-VwswmSYwVAAq6LysV59Fyqk3UIjbhuc6wb3vEcJ7HEJUtFuLK9uXWuFoH1lulEbE4+5GjtHi3MHX+w1gNHdOWQ==
+"@esbuild/[email protected]":
+ version "0.16.17"
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.16.17.tgz#24333a11027ef46a18f57019450a5188918e2a54"
+ integrity sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==
+
"@esbuild/[email protected]":
version "0.16.3"
resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.16.3.tgz#2ff3936b91bfff62f9ecf7f6411ef399b29ed22d"
@@ -2121,61 +2267,121 @@
resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.15.15.tgz#32c65517a09320b62530867345222fde7794fbe1"
integrity sha512-lhz6UNPMDXUhtXSulw8XlFAtSYO26WmHQnCi2Lg2p+/TMiJKNLtZCYUxV4wG6rZMzXmr8InGpNwk+DLT2Hm0PA==
+"@esbuild/[email protected]":
+ version "0.16.17"
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.16.17.tgz#d5ad459d41ed42bbd4d005256b31882ec52227d8"
+ integrity sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==
+
"@esbuild/[email protected]":
version "0.16.3"
resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.16.3.tgz#ff8aa59f49d9ccbc1ff952ba1f5cd01a534562df"
integrity sha512-hIbeejCOyO0X9ujfIIOKjBjNAs9XD/YdJ9JXAy1lHA+8UXuOqbFe4ErMCqMr8dhlMGBuvcQYGF7+kO7waj2KHw==
+"@esbuild/[email protected]":
+ version "0.16.17"
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.16.17.tgz#4e5967a665c38360b0a8205594377d4dcf9c3726"
+ integrity sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==
+
"@esbuild/[email protected]":
version "0.16.3"
resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.16.3.tgz#5dd5e118071c3912df69beedbfd11fb117f0fe5e"
integrity sha512-znFRzICT/V8VZQMt6rjb21MtAVJv/3dmKRMlohlShrbVXdBuOdDrGb+C2cZGQAR8RFyRe7HS6klmHq103WpmVw==
+"@esbuild/[email protected]":
+ version "0.16.17"
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.16.17.tgz#206443a02eb568f9fdf0b438fbd47d26e735afc8"
+ integrity sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==
+
"@esbuild/[email protected]":
version "0.16.3"
resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.16.3.tgz#36c62e24eae7fa3f0d921506da8fc1e6098a1364"
integrity sha512-EV7LuEybxhXrVTDpbqWF2yehYRNz5e5p+u3oQUS2+ZFpknyi1NXxr8URk4ykR8Efm7iu04//4sBg249yNOwy5Q==
+"@esbuild/[email protected]":
+ version "0.16.17"
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.16.17.tgz#c351e433d009bf256e798ad048152c8d76da2fc9"
+ integrity sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==
+
"@esbuild/[email protected]":
version "0.16.3"
resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.16.3.tgz#f0fec8e7affb5bcc817fefc61a21cbb95539e393"
integrity sha512-uDxqFOcLzFIJ+r/pkTTSE9lsCEaV/Y6rMlQjUI9BkzASEChYL/aSQjZjchtEmdnVxDKETnUAmsaZ4pqK1eE5BQ==
+"@esbuild/[email protected]":
+ version "0.16.17"
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.16.17.tgz#661f271e5d59615b84b6801d1c2123ad13d9bd87"
+ integrity sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==
+
"@esbuild/[email protected]":
version "0.16.3"
resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.16.3.tgz#22e10edd6e91f53c2e1f60e46abd453d7794409b"
integrity sha512-NbeREhzSxYwFhnCAQOQZmajsPYtX71Ufej3IQ8W2Gxskfz9DK58ENEju4SbpIj48VenktRASC52N5Fhyf/aliQ==
+"@esbuild/[email protected]":
+ version "0.16.17"
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.16.17.tgz#e4ba18e8b149a89c982351443a377c723762b85f"
+ integrity sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==
+
"@esbuild/[email protected]":
version "0.16.3"
resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.16.3.tgz#38388b73fd9eebe45b073d7d8099b9c2e54f7139"
integrity sha512-SDiG0nCixYO9JgpehoKgScwic7vXXndfasjnD5DLbp1xltANzqZ425l7LSdHynt19UWOcDjG9wJJzSElsPvk0w==
+"@esbuild/[email protected]":
+ version "0.16.17"
+ resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.16.17.tgz#7d4f4041e30c5c07dd24ffa295c73f06038ec775"
+ integrity sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==
+
"@esbuild/[email protected]":
version "0.16.3"
resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.16.3.tgz#e0270569567f1530b8dbe6d11d5b4930b9cc71ae"
integrity sha512-AzbsJqiHEq1I/tUvOfAzCY15h4/7Ivp3ff/o1GpP16n48JMNAtbW0qui2WCgoIZArEHD0SUQ95gvR0oSO7ZbdA==
+"@esbuild/[email protected]":
+ version "0.16.17"
+ resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.16.17.tgz#970fa7f8470681f3e6b1db0cc421a4af8060ec35"
+ integrity sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==
+
"@esbuild/[email protected]":
version "0.16.3"
resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.16.3.tgz#3b16642d443848bca605f33ee3978a1890911e6d"
integrity sha512-gSABi8qHl8k3Cbi/4toAzHiykuBuWLZs43JomTcXkjMZVkp0gj3gg9mO+9HJW/8GB5H89RX/V0QP4JGL7YEEVg==
+"@esbuild/[email protected]":
+ version "0.16.17"
+ resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.16.17.tgz#abc60e7c4abf8b89fb7a4fe69a1484132238022c"
+ integrity sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==
+
"@esbuild/[email protected]":
version "0.16.3"
resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.16.3.tgz#a838f247867380f0ae25ce1936dc5ab6f57b7734"
integrity sha512-SF9Kch5Ete4reovvRO6yNjMxrvlfT0F0Flm+NPoUw5Z4Q3r1d23LFTgaLwm3Cp0iGbrU/MoUI+ZqwCv5XJijCw==
+"@esbuild/[email protected]":
+ version "0.16.17"
+ resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.16.17.tgz#7b0ff9e8c3265537a7a7b1fd9a24e7bd39fcd87a"
+ integrity sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==
+
"@esbuild/[email protected]":
version "0.16.3"
resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.16.3.tgz#bedd9bef5fb41f89ce2599f1761973cf6d6a67b6"
integrity sha512-u5aBonZIyGopAZyOnoPAA6fGsDeHByZ9CnEzyML9NqntK6D/xl5jteZUKm/p6nD09+v3pTM6TuUIqSPcChk5gg==
+"@esbuild/[email protected]":
+ version "0.16.17"
+ resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.16.17.tgz#e90fe5267d71a7b7567afdc403dfd198c292eb09"
+ integrity sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==
+
"@esbuild/[email protected]":
version "0.16.3"
resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.16.3.tgz#49800aa812d8cc35ceef61e8d3b01224684cc0b1"
integrity sha512-GlgVq1WpvOEhNioh74TKelwla9KDuAaLZrdxuuUgsP2vayxeLgVc+rbpIv0IYF4+tlIzq2vRhofV+KGLD+37EQ==
+"@esbuild/[email protected]":
+ version "0.16.17"
+ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.16.17.tgz#c5a1a4bfe1b57f0c3e61b29883525c6da3e5c091"
+ integrity sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==
+
"@esbuild/[email protected]":
version "0.16.3"
resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.16.3.tgz#94047dae921949cfb308117d993c4b941291ae10"
@@ -2533,7 +2739,7 @@
"@jridgewell/sourcemap-codec" "^1.4.10"
"@jridgewell/trace-mapping" "^0.3.9"
-"@jridgewell/[email protected]":
+"@jridgewell/[email protected]", "@jridgewell/resolve-uri@^3.0.3":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78"
integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==
@@ -2548,7 +2754,15 @@
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24"
integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==
-"@jridgewell/trace-mapping@^0.3.9":
+"@jridgewell/[email protected]":
+ version "0.3.9"
+ resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9"
+ integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==
+ dependencies:
+ "@jridgewell/resolve-uri" "^3.0.3"
+ "@jridgewell/sourcemap-codec" "^1.4.10"
+
+"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9":
version "0.3.17"
resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz#793041277af9073b0951a7fe0f0d8c4c98c36985"
integrity sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==
@@ -2556,6 +2770,11 @@
"@jridgewell/resolve-uri" "3.1.0"
"@jridgewell/sourcemap-codec" "1.4.14"
+"@juggle/resize-observer@^3.3.1":
+ version "3.4.0"
+ resolved "https://registry.yarnpkg.com/@juggle/resize-observer/-/resize-observer-3.4.0.tgz#08d6c5e20cf7e4cc02fd181c4b0c225cd31dbb60"
+ integrity sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==
+
"@motionone/animation@^10.15.1":
version "10.15.1"
resolved "https://registry.yarnpkg.com/@motionone/animation/-/animation-10.15.1.tgz#4a85596c31cbc5100ae8eb8b34c459fb0ccf6807"
@@ -2953,27 +3172,27 @@
resolved "https://registry.yarnpkg.com/@react-types/shared/-/shared-3.16.0.tgz#cab7bf0376969d1773480ecb2d6da5aa91391db5"
integrity sha512-IQgU4oAEvMwylEvaTsr2XB1G/mAoMe1JFYLD6G78v++oAR9l8o9MQxZ0YSeANDkqTamb2gKezGoT1RxvSKjVxw==
-"@reactflow/[email protected]":
- version "11.1.2"
- resolved "https://registry.yarnpkg.com/@reactflow/background/-/background-11.1.2.tgz#6f4e5d8ae6bc0b5d76f4394ab7a2ae59b568aa02"
- integrity sha512-A/Hfah+l9C7mzZ4IG2Kw9phOTLUPIie2zRFE59EXEwHUmSS91SPaFE464ydclj1Y4+OEYZb7cTiaHiKEzp3OkA==
+"@reactflow/[email protected]":
+ version "11.1.8"
+ resolved "https://registry.yarnpkg.com/@reactflow/background/-/background-11.1.8.tgz#e804eb82ade6f70ab5f218dc767051083497c0f7"
+ integrity sha512-NYZwiEeKVc1qJbDRrRX5RgHbMMzofhzOAqz3teWtUIGju5d+kEf/vcx/35bLM+CZuhucL+OvJpRgCjKmViiTIw==
dependencies:
- "@reactflow/core" "11.4.2"
+ "@reactflow/core" "11.5.5"
classcat "^5.0.3"
zustand "^4.3.1"
-"@reactflow/[email protected]":
- version "11.1.2"
- resolved "https://registry.yarnpkg.com/@reactflow/controls/-/controls-11.1.2.tgz#2701c32c7ae718bb7c59fb99e64e33a37799f386"
- integrity sha512-XyZuMOxSmqYnH+MpRxMiZS8uCdPqaWg4Ju4Sv4B1WW6ae5YsgqG9MGgHF1mOc63BhK6gchRtxV9mW+EJoB+6Pg==
+"@reactflow/[email protected]":
+ version "11.1.8"
+ resolved "https://registry.yarnpkg.com/@reactflow/controls/-/controls-11.1.8.tgz#43c3756a53479382e34d495f4b123f45b8cf658f"
+ integrity sha512-QCG4q52HS/zmuBAFzmTFh4wkR6thmNDxSKHQPxTwfVIuQtV/oGpfz7zMaoU0ZSN84qSWl5UdzmV4PAC50tOAkQ==
dependencies:
- "@reactflow/core" "11.4.2"
+ "@reactflow/core" "11.5.5"
classcat "^5.0.3"
-"@reactflow/[email protected]":
- version "11.4.2"
- resolved "https://registry.yarnpkg.com/@reactflow/core/-/core-11.4.2.tgz#70d6e7f1d33b93cc8a75a72192a06397bc05c9cf"
- integrity sha512-JVKFNJ3LTVyQXkZCnk5X5bGo01k4uCyYLlenkCEHL7HZ65v9k6WjD+tY4mdO/t1LIZ18t3j7wlhEhvTrjupN9Q==
+"@reactflow/[email protected]":
+ version "11.5.5"
+ resolved "https://registry.yarnpkg.com/@reactflow/core/-/core-11.5.5.tgz#bced11d76fc200b4dc301f2f2b882c4f4ec3dad3"
+ integrity sha512-/FPnpvO9I4E6/mmfZInbsVusR214gzIZ2e2xgl9XJdBo90cWaqHgo0c5F2YPXX19R3mItzxveN+WlENFEOvdPg==
dependencies:
"@types/d3" "^7.4.0"
"@types/d3-drag" "^3.0.1"
@@ -2985,12 +3204,12 @@
d3-zoom "^3.0.0"
zustand "^4.3.1"
-"@reactflow/[email protected]":
- version "11.3.2"
- resolved "https://registry.yarnpkg.com/@reactflow/minimap/-/minimap-11.3.2.tgz#5d00a2f6d74c4da4c5740985126dded56e870f12"
- integrity sha512-tdzV+pJqNxfEdLMZIgIBOhdIxM04PWsWUKx9RdZlZBmo+28RV/lVNh77Qu4L74eNuDTn9CrKH3UmRPy9H0LlfQ==
+"@reactflow/[email protected]":
+ version "11.3.8"
+ resolved "https://registry.yarnpkg.com/@reactflow/minimap/-/minimap-11.3.8.tgz#f2324c2f038d75bf9f8b27d46d782f488038f341"
+ integrity sha512-hOW3FVP/ObRK3oZxvKSSKIIR/DRe1OR4KU+3AIHxTK6K2kt/D48zQU37fOmEasfohjBjsqEopK7Ux8tapTT0EA==
dependencies:
- "@reactflow/core" "11.4.2"
+ "@reactflow/core" "11.5.5"
"@types/d3-selection" "^3.0.3"
"@types/d3-zoom" "^3.0.1"
classcat "^5.0.3"
@@ -2998,29 +3217,33 @@
d3-zoom "^3.0.0"
zustand "^4.3.1"
-"@reactflow/[email protected]":
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/@reactflow/node-toolbar/-/node-toolbar-1.1.2.tgz#577c63429526950083663dd869bc2c53eca9ea36"
- integrity sha512-zzG+s5jY9F1VbBh0na71AuarlQi8BHnkbd6mUCWJf50DPnmk05sEdurky7C9oNccm7wxEYBirBLyW4+1vnn4Nw==
+"@reactflow/[email protected]":
+ version "1.1.8"
+ resolved "https://registry.yarnpkg.com/@reactflow/node-toolbar/-/node-toolbar-1.1.8.tgz#36a97fb390b8c622fa98e7ffaf1b03c2f75f812a"
+ integrity sha512-/Aj5dfarrBRvPeyDk+CZef7InP4LXlhMnlMPw6hnT/P9lVVChe02knzzkeKiVGmiWKXWL/gOCDXBFp9tMtIAsQ==
dependencies:
- "@reactflow/core" "11.4.2"
+ "@reactflow/core" "11.5.5"
classcat "^5.0.3"
zustand "^4.3.1"
-"@remix-run/[email protected]":
- version "1.9.0"
- resolved "https://registry.yarnpkg.com/@remix-run/dev/-/dev-1.9.0.tgz#2e594d143d47afc29e4bbdee02291649b0766dc6"
- integrity sha512-4EEctL2lo7eLPbVkzVBuRW+TX1B9yNdR9Ug7z7PYwFvJF0Oy9PovGx7ooVIypNiWLGOztKgN+K3c9jdffsrYYQ==
+"@remix-run/[email protected]":
+ version "1.13.0"
+ resolved "https://registry.yarnpkg.com/@remix-run/dev/-/dev-1.13.0.tgz#6fa065c4ebadfdffe077b0229740bcedf71255c4"
+ integrity sha512-hPqUjM9RRcz3inBOWqP3GKhggVz0a0ikWaRZpdKrhpQNCNiF6Hunbx876mJERj2YrmIzJ05eoeQmmdF6xcr4qg==
dependencies:
"@babel/core" "^7.18.6"
+ "@babel/generator" "^7.18.6"
+ "@babel/parser" "^7.18.6"
"@babel/plugin-syntax-jsx" "^7.18.6"
"@babel/plugin-syntax-typescript" "^7.20.0"
"@babel/preset-env" "^7.18.6"
"@babel/preset-typescript" "^7.18.6"
+ "@babel/traverse" "^7.18.6"
"@babel/types" "^7.20.2"
"@esbuild-plugins/node-modules-polyfill" "^0.1.4"
"@npmcli/package-json" "^2.0.0"
- "@remix-run/server-runtime" "1.9.0"
+ "@remix-run/server-runtime" "1.13.0"
+ "@vanilla-extract/integration" "^6.0.2"
arg "^5.0.1"
cacache "^15.0.5"
chalk "^4.1.2"
@@ -3035,14 +3258,18 @@
get-port "^5.1.1"
gunzip-maybe "^1.4.2"
inquirer "^8.2.1"
- jscodeshift "^0.13.1"
jsesc "3.0.2"
json5 "^2.2.1"
lodash "^4.17.21"
lodash.debounce "^4.0.8"
+ lru-cache "^7.14.1"
minimatch "^3.0.4"
node-fetch "^2.6.7"
ora "^5.4.1"
+ postcss "^8.4.19"
+ postcss-discard-duplicates "^5.1.0"
+ postcss-load-config "^4.0.1"
+ postcss-modules "^6.0.0"
prettier "2.7.1"
pretty-ms "^7.0.1"
proxy-agent "^5.0.0"
@@ -3056,10 +3283,10 @@
ws "^7.4.5"
xdm "^2.0.0"
-"@remix-run/[email protected]":
- version "1.9.0"
- resolved "https://registry.yarnpkg.com/@remix-run/eslint-config/-/eslint-config-1.9.0.tgz#9a7e35c61f703165657dd3126bc1cb2424989fc6"
- integrity sha512-SPEY+FqvYrlpqYpvPPKd/2dlKzd9Vlxa2HkvKqIHtaiBFUGX9GWnKRro6b5KQ6IU0K5wupCJXG4/bw1CYd8pFg==
+"@remix-run/[email protected]":
+ version "1.13.0"
+ resolved "https://registry.yarnpkg.com/@remix-run/eslint-config/-/eslint-config-1.13.0.tgz#295a44af8eb48f34eb8ab0504551e91c4600e13f"
+ integrity sha512-qz/N99D/q1mQefZl2X+p11xVk03r6aFDMvk/4mG+8IrMRU4BqMJ/bF53/CUOveSzvzLua4Pfi2wmqF+deHw0GQ==
dependencies:
"@babel/core" "^7.19.1"
"@babel/eslint-parser" "^7.19.1"
@@ -3078,19 +3305,19 @@
eslint-plugin-react-hooks "^4.6.0"
eslint-plugin-testing-library "^5.6.4"
-"@remix-run/[email protected]":
- version "1.9.0"
- resolved "https://registry.yarnpkg.com/@remix-run/express/-/express-1.9.0.tgz#6f1c1027cccf72717acd2bec5eaa93bcf9e77546"
- integrity sha512-kWLINQNx4D2ypBzfgUiTwEvsM/GFTtpnjK1aHBKH/PCN1JH0yDpbr6VGlUbj0Mmnfy9Qg2yPlwTlgHNox++a4g==
+"@remix-run/[email protected]":
+ version "1.13.0"
+ resolved "https://registry.yarnpkg.com/@remix-run/express/-/express-1.13.0.tgz#627f74c8c804f0d4b74ca87ac7b88636405e1856"
+ integrity sha512-MX80PdQu3k1HlQsHlUjPBZe5rpTdn4FqZ5Fg4d85cVi+GMfu3x8n8hB0xbCDLhmRbKTR01PQ01j3UUNtsWWikg==
dependencies:
- "@remix-run/node" "1.9.0"
+ "@remix-run/node" "1.13.0"
-"@remix-run/[email protected]":
- version "1.9.0"
- resolved "https://registry.yarnpkg.com/@remix-run/node/-/node-1.9.0.tgz#afed6996305e1fb4b524569797214362d8d46955"
- integrity sha512-LKbzMieBEE1oxeEoR3qyAFd29o/dQvRZvxQyB0LLy1IdAfrMTrADCRK8YZ7xVtJeUzWnNpn9abslotQN82Oz7g==
+"@remix-run/[email protected]":
+ version "1.13.0"
+ resolved "https://registry.yarnpkg.com/@remix-run/node/-/node-1.13.0.tgz#275a0b616b455e4b90250c8b2d42609f5bf9ba9c"
+ integrity sha512-FDvPGaoDyon8UGYQ9DroLtiX8vFa0efBQQSHV3az0s7HbUpugw7BcA6NBW5pIs2z5sszCCeRbAgSIXcETLzfhw==
dependencies:
- "@remix-run/server-runtime" "1.9.0"
+ "@remix-run/server-runtime" "1.13.0"
"@remix-run/web-fetch" "^4.3.2"
"@remix-run/web-file" "^3.0.2"
"@remix-run/web-stream" "^1.0.3"
@@ -3100,47 +3327,49 @@
source-map-support "^0.5.21"
stream-slice "^0.1.2"
-"@remix-run/[email protected]":
- version "1.9.0"
- resolved "https://registry.yarnpkg.com/@remix-run/react/-/react-1.9.0.tgz#e072f2b26df4ecc5b593633e18777bae936a600a"
- integrity sha512-Rtm6qqdKMD0AMsJuzCFwpz40/o6LXQq20smHyyvH8EMHJRPrms44By28uMW0kmc+M9q0wa0gBfMzWFfZnCSFwg==
+"@remix-run/[email protected]":
+ version "1.13.0"
+ resolved "https://registry.yarnpkg.com/@remix-run/react/-/react-1.13.0.tgz#44737fa38fd27716c0a4ebf7c218f31c4905dd3c"
+ integrity sha512-LT9TStmMavBlLqRG8u5Ku8bxdYcpIbqpmh44/f2Fyw8RvdaRCYYMkuUXsr8bhOqftaEZMFLqFhi19NWY/18DLA==
dependencies:
- "@remix-run/router" "1.1.0"
- react-router-dom "6.5.0"
+ "@remix-run/router" "1.3.2"
+ react-router-dom "6.8.1"
+ use-sync-external-store "1.2.0"
-"@remix-run/[email protected]":
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.1.0.tgz#b48db8148c8a888e50580a8152b6f68161c49406"
- integrity sha512-rGl+jH/7x1KBCQScz9p54p0dtPLNeKGb3e0wD2H5/oZj41bwQUnXdzbj2TbUAFhvD7cp9EyEQA4dEgpUFa1O7Q==
+"@remix-run/[email protected]":
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.3.2.tgz#58cd2bd25df2acc16c628e1b6f6150ea6c7455bc"
+ integrity sha512-t54ONhl/h75X94SWsHGQ4G/ZrCEguKSRQr7DrjTciJXW0YU1QhlwYeycvK5JgkzlxmvrK7wq1NB/PLtHxoiDcA==
-"@remix-run/[email protected]":
- version "1.9.0"
- resolved "https://registry.yarnpkg.com/@remix-run/serve/-/serve-1.9.0.tgz#b415ddb3006715bbe92788267e5768b71ca726a7"
- integrity sha512-dERDi06Qqd5VIHvtHx++Wna4NX+lrtUFFuMdPyDmn3ii8RVhh0yED7yJBe3t0k3Syk5IysMc3V49k6pOGtEsdQ==
+"@remix-run/[email protected]":
+ version "1.13.0"
+ resolved "https://registry.yarnpkg.com/@remix-run/serve/-/serve-1.13.0.tgz#bec54192e2535d8270555a8080b14ef210ac5ed2"
+ integrity sha512-ondApr1ZUbQR6iy1iGvdarBGqvTZdET4wSNFb2+2NrbxW9Y9E3RZ7q+5M5/iiuy1qbdqubqsoq2N7uFk+gDGxw==
dependencies:
- "@remix-run/express" "1.9.0"
+ "@remix-run/express" "1.13.0"
compression "^1.7.4"
express "^4.17.1"
morgan "^1.10.0"
-"@remix-run/[email protected]":
- version "1.9.0"
- resolved "https://registry.yarnpkg.com/@remix-run/server-runtime/-/server-runtime-1.9.0.tgz#b0e1b0431fcd91daa6058691290f8ebb9519d922"
- integrity sha512-HNJGAzdp4JZqBtDqhi9tEtTxWztuQYruuMPyTlJmSWQhK3MdaOs7F9DJtfFKAhy8LBOqniwpE5w27dkCx7trOg==
+"@remix-run/[email protected]":
+ version "1.13.0"
+ resolved "https://registry.yarnpkg.com/@remix-run/server-runtime/-/server-runtime-1.13.0.tgz#7e04955b401c3f9f114ebaf4e14adf48c0fd822f"
+ integrity sha512-gjIW3XCeIlOt3rrOZMD6HixQydRgs1SwYjP99ZAVruG2+gNq/tL2OusMFYTLvtWrybt215tPROyF/6iTLsaO3g==
dependencies:
- "@remix-run/router" "1.1.0"
+ "@remix-run/router" "1.3.2"
"@types/cookie" "^0.4.0"
+ "@types/react" "^18.0.15"
"@web3-storage/multipart-parser" "^1.0.0"
cookie "^0.4.1"
set-cookie-parser "^2.4.8"
source-map "^0.7.3"
-"@remix-run/[email protected]":
- version "1.9.0"
- resolved "https://registry.yarnpkg.com/@remix-run/vercel/-/vercel-1.9.0.tgz#359af372590f44020897b28a66881a372587f983"
- integrity sha512-pNtVUH6T5gJXgGk7UluK9iOwB+5QmB+UXDGMzyPic5ZGxqxWDTetIwqwLXgxV6xZvAfAClFE8Jf1kZXCUfE1HQ==
+"@remix-run/[email protected]":
+ version "1.13.0"
+ resolved "https://registry.yarnpkg.com/@remix-run/vercel/-/vercel-1.13.0.tgz#40c0456b3792721bf15a03ec659ef2fae7a02a09"
+ integrity sha512-6ZzVFTCjbZMonaZwyM7rWtqPFP1IEK8ntiUIl2oUT3V8O6hsbfkik+1x8FkcSJQu96mfgxVhBhOS9P3Hz8aHlg==
dependencies:
- "@remix-run/node" "1.9.0"
+ "@remix-run/node" "1.13.0"
"@remix-run/web-blob@^3.0.3", "@remix-run/web-blob@^3.0.4":
version "3.0.4"
@@ -3324,6 +3553,26 @@
mkdirp "^1.0.4"
path-browserify "^1.0.1"
+"@tsconfig/node10@^1.0.7":
+ version "1.0.9"
+ resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2"
+ integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==
+
+"@tsconfig/node12@^1.0.7":
+ version "1.0.11"
+ resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d"
+ integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==
+
+"@tsconfig/node14@^1.0.0":
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1"
+ integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==
+
+"@tsconfig/node16@^1.0.2":
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e"
+ integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==
+
"@types/acorn@^4.0.0":
version "4.0.6"
resolved "https://registry.yarnpkg.com/@types/acorn/-/acorn-4.0.6.tgz#d61ca5480300ac41a7d973dd5b84d0a591154a22"
@@ -3413,6 +3662,11 @@
resolved "https://registry.yarnpkg.com/@types/d3-color/-/d3-color-3.1.0.tgz#6594da178ded6c7c3842f3cc0ac84b156f12f2d4"
integrity sha512-HKuicPHJuvPgCD+np6Se9MQvS6OCbJmOjGvylzMJRlDwUXjKTTXs6Pwgk79O09Vj/ho3u1ofXnhFOaEWWPrlwA==
+"@types/d3-color@^1":
+ version "1.4.2"
+ resolved "https://registry.yarnpkg.com/@types/d3-color/-/d3-color-1.4.2.tgz#944f281d04a0f06e134ea96adbb68303515b2784"
+ integrity sha512-fYtiVLBYy7VQX+Kx7wU/uOIkGQn8aAEY8oWMoyja3N4dLd8Yf6XgSIR/4yWvMuveNOH5VShnqCgRqqh/UNanBA==
+
"@types/d3-contour@*":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@types/d3-contour/-/d3-contour-3.0.1.tgz#9ff4e2fd2a3910de9c5097270a7da8a6ef240017"
@@ -3484,11 +3738,23 @@
dependencies:
"@types/d3-color" "*"
+"@types/d3-interpolate@^1.3.1":
+ version "1.4.2"
+ resolved "https://registry.yarnpkg.com/@types/d3-interpolate/-/d3-interpolate-1.4.2.tgz#88902a205f682773a517612299a44699285eed7b"
+ integrity sha512-ylycts6llFf8yAEs1tXzx2loxxzDZHseuhPokrqKprTQSTcD3JbJI1omZP1rphsELZO3Q+of3ff0ZS7+O6yVzg==
+ dependencies:
+ "@types/d3-color" "^1"
+
"@types/d3-path@*":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/d3-path/-/d3-path-3.0.0.tgz#939e3a784ae4f80b1fde8098b91af1776ff1312b"
integrity sha512-0g/A+mZXgFkQxN3HniRDbXMN79K3CdTpLsevj+PXiTcb2hVyvkZUBg37StmgCQkaD84cUJ4uaDAWq7UJOQy2Tg==
+"@types/d3-path@^1", "@types/d3-path@^1.0.8":
+ version "1.0.9"
+ resolved "https://registry.yarnpkg.com/@types/d3-path/-/d3-path-1.0.9.tgz#73526b150d14cd96e701597cbf346cfd1fd4a58c"
+ integrity sha512-NaIeSIBiFgSC6IGUBjZWcscUJEq7vpVu7KthHN8eieTV9d9MqkSOZLH4chq1PmcKy06PNe3axLeKmRIyxJ+PZQ==
+
"@types/d3-polygon@*":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/d3-polygon/-/d3-polygon-3.0.0.tgz#5200a3fa793d7736fa104285fa19b0dbc2424b93"
@@ -3516,6 +3782,13 @@
dependencies:
"@types/d3-time" "*"
+"@types/d3-scale@^3.3.0":
+ version "3.3.2"
+ resolved "https://registry.yarnpkg.com/@types/d3-scale/-/d3-scale-3.3.2.tgz#18c94e90f4f1c6b1ee14a70f14bfca2bd1c61d06"
+ integrity sha512-gGqr7x1ost9px3FvIfUMi5XA/F/yAf4UkUDtdQhpH92XCT0Oa7zkkRzY61gPVJq+DxpHn/btouw5ohWkbBsCzQ==
+ dependencies:
+ "@types/d3-time" "^2"
+
"@types/d3-selection@*", "@types/d3-selection@^3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@types/d3-selection/-/d3-selection-3.0.3.tgz#57be7da68e7d9c9b29efefd8ea5a9ef1171e42ba"
@@ -3528,6 +3801,13 @@
dependencies:
"@types/d3-path" "*"
+"@types/d3-shape@^1.3.1":
+ version "1.3.8"
+ resolved "https://registry.yarnpkg.com/@types/d3-shape/-/d3-shape-1.3.8.tgz#c3c15ec7436b4ce24e38de517586850f1fea8e89"
+ integrity sha512-gqfnMz6Fd5H6GOLYixOZP/xlrMtJms9BaS+6oWxTKHNqPGZ93BkWWupQSCYm6YHqx6h9wjRupuJb90bun6ZaYg==
+ dependencies:
+ "@types/d3-path" "^1"
+
"@types/d3-time-format@*":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@types/d3-time-format/-/d3-time-format-4.0.0.tgz#ee7b6e798f8deb2d9640675f8811d0253aaa1946"
@@ -3538,6 +3818,11 @@
resolved "https://registry.yarnpkg.com/@types/d3-time/-/d3-time-3.0.0.tgz#e1ac0f3e9e195135361fa1a1d62f795d87e6e819"
integrity sha512-sZLCdHvBUcNby1cB6Fd3ZBrABbjz3v1Vm90nysCQ6Vt7vd6e/h9Lt7SiJUoEX0l4Dzc7P5llKyhqSi1ycSf1Hg==
+"@types/d3-time@^2", "@types/d3-time@^2.0.0":
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/@types/d3-time/-/d3-time-2.1.1.tgz#743fdc821c81f86537cbfece07093ac39b4bc342"
+ integrity sha512-9MVYlmIgmRR31C5b4FVSWtuMmBHh2mOWQYfl7XAYOa8dsnb7iEmUmRSWSFgXFtkjxO65d7hTUHQC+RhR/9IWFg==
+
"@types/d3-timer@*":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/d3-timer/-/d3-timer-3.0.0.tgz#e2505f1c21ec08bda8915238e397fb71d2fc54ce"
@@ -3715,6 +4000,11 @@
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.186.tgz#862e5514dd7bd66ada6c70ee5fce844b06c8ee97"
integrity sha512-eHcVlLXP0c2FlMPm56ITode2AgLMSa6aJ05JTTbYbI+7EMkCEE5qk2E41d5g2lCVTqRe0GnnRFurmlCsDODrPw==
+"@types/lodash@^4.14.172":
+ version "4.14.191"
+ resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.191.tgz#09511e7f7cba275acd8b419ddac8da9a6a79e2fa"
+ integrity sha512-BdZ5BCCvho3EIXw6wUCXHe7rS53AIDPLE+JzwgT+OsJk53oBfbSmZZ7CX4VaRoN78N+TJpFi9QPlfIVNmJYWxQ==
+
"@types/mdast@^3.0.0":
version "3.0.10"
resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-3.0.10.tgz#4724244a82a4598884cbbe9bcfd73dff927ee8af"
@@ -3800,6 +4090,15 @@
"@types/scheduler" "*"
csstype "^3.0.2"
+"@types/react@^18.0.15":
+ version "18.0.28"
+ resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.28.tgz#accaeb8b86f4908057ad629a26635fe641480065"
+ integrity sha512-RD0ivG1kEztNBdoAK7lekI9M+azSnitIn85h4iOiaLjaTrMjzslhaqCGaI4IyCJ1RljWiLCEu4jyrLLgqxBTew==
+ dependencies:
+ "@types/prop-types" "*"
+ "@types/scheduler" "*"
+ csstype "^3.0.2"
+
"@types/responselike@*", "@types/responselike@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29"
@@ -3926,42 +4225,226 @@
"@typescript-eslint/types" "5.40.1"
eslint-visitor-keys "^3.3.0"
-"@vercel/[email protected]":
- version "5.7.0"
- resolved "https://registry.yarnpkg.com/@vercel/build-utils/-/build-utils-5.7.0.tgz#73f5b66ee970a2712cfea62a19e04f6869c589f5"
- integrity sha512-hOcb7HxYza5LtZLcmh9VkShV3hLaLlZarLBqQmMR/oTlvgIybeW6LjrPpFiu2hCCf9VbkdBR1OFmDh8EydFswQ==
+"@vanilla-extract/babel-plugin-debug-ids@^1.0.1":
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/@vanilla-extract/babel-plugin-debug-ids/-/babel-plugin-debug-ids-1.0.1.tgz#d20bd0c9ec867ca892fcf665dca171110aa2a1e1"
+ integrity sha512-ynyKqsJiMzM1/yiIJ6QdqpWKlK4IMJJWREpPtaemZrE1xG1B4E/Nfa6YazuDWjDkCJC1tRIpEGnVs+pMIjUxyw==
+ dependencies:
+ "@babel/core" "^7.20.7"
-"@vercel/[email protected]":
- version "3.1.2"
- resolved "https://registry.yarnpkg.com/@vercel/node-bridge/-/node-bridge-3.1.2.tgz#8e9c00201dfcfd73db0e18bb8e5db313611328f7"
- integrity sha512-dgcLXug0IqUeRsywf0G8IrhUFcgw+GYj+EZB4JneglKSofFBh3Xy/t7KfBUxLlKnoq6kyGYJvTmAVB1YBt11qw==
+"@vanilla-extract/css@^1.9.4":
+ version "1.9.5"
+ resolved "https://registry.yarnpkg.com/@vanilla-extract/css/-/css-1.9.5.tgz#c5361c04045e6f01502564c2fb6b82177b97f6bc"
+ integrity sha512-aVSv6q24zelKRtWx/l9yshU3gD1uCDMZ2ZGcIiYnAcPfyLryrG/1X5DxtyiPKcyI/hZWoteHofsN//2q9MvzOA==
+ dependencies:
+ "@emotion/hash" "^0.9.0"
+ "@vanilla-extract/private" "^1.0.3"
+ ahocorasick "1.0.2"
+ chalk "^4.1.1"
+ css-what "^5.0.1"
+ cssesc "^3.0.0"
+ csstype "^3.0.7"
+ deep-object-diff "^1.1.9"
+ deepmerge "^4.2.2"
+ media-query-parser "^2.0.2"
+ outdent "^0.8.0"
-"@vercel/node@^2.8.0":
- version "2.8.0"
- resolved "https://registry.yarnpkg.com/@vercel/node/-/node-2.8.0.tgz#98bc45098f080c036cc04739c98943438b148f52"
- integrity sha512-Vji7/j1boSGNsPS3Zw5Av21dAQMUcuci9l9OI2JhJ7kG1NGT3+8k83Dy46ZI1Q9+5m+ibUxVVzfsS7Fr6oYVYA==
+"@vanilla-extract/integration@^6.0.2":
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/@vanilla-extract/integration/-/integration-6.1.0.tgz#0b6e60f04cd3ef4501fb6a896533e67eabfcbd9d"
+ integrity sha512-7gDkOibk/DraG35ZpiAYqWd33wLA6YRnieC5vw7ItoFEzCv9bUaS9c+ZyktyWW3nRnL+e7Pc6FS6l7MKgEsX1w==
+ dependencies:
+ "@babel/core" "^7.20.7"
+ "@babel/plugin-syntax-typescript" "^7.20.0"
+ "@vanilla-extract/babel-plugin-debug-ids" "^1.0.1"
+ "@vanilla-extract/css" "^1.9.4"
+ esbuild "^0.16.3"
+ eval "0.1.6"
+ find-up "^5.0.0"
+ javascript-stringify "^2.0.1"
+ lodash "^4.17.21"
+ mlly "^1.1.0"
+ outdent "^0.8.0"
+
+"@vanilla-extract/private@^1.0.3":
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/@vanilla-extract/private/-/private-1.0.3.tgz#7ec72bc2ff6fe51f9d650f962e8d1989b073690f"
+ integrity sha512-17kVyLq3ePTKOkveHxXuIJZtGYs+cSoev7BlP+Lf4916qfDhk/HBjvlYDe8egrea7LNPHKwSZJK/bzZC+Q6AwQ==
+
+"@vercel/[email protected]":
+ version "6.3.0"
+ resolved "https://registry.yarnpkg.com/@vercel/build-utils/-/build-utils-6.3.0.tgz#74d2b029f1d30eee146f1fdb0079d435cd42617c"
+ integrity sha512-Nbu/CIsv8HMp1+KPZ0n2YlHTKPfGRDrwhMgKW9Dx4z2S5sQWkXpe9WQ5ajePgwZVd7V1XiJYx1CCRaupIVgUwA==
+
+"@vercel/[email protected]":
+ version "3.1.11"
+ resolved "https://registry.yarnpkg.com/@vercel/node-bridge/-/node-bridge-3.1.11.tgz#48f086628c412ce1f737d0003c8174652df0477a"
+ integrity sha512-LGbj+kPGgRnIlKo3949z01mLbHVi4BnRE7V5R6+J4E3f7xpQ12I9Wek10V7ivLB+LyS1+ATdjasdXAF4HOhqQw==
+
+"@vercel/node@^2.9.6":
+ version "2.9.6"
+ resolved "https://registry.yarnpkg.com/@vercel/node/-/node-2.9.6.tgz#04e25cb9a429e4ea19f7440d999a14f239a1c89b"
+ integrity sha512-A1/1LucW54jUH8YspTTQYeGdhOPK8Z17bt5vrnB4PW5PGnq5Dn2DaC1mly0/Lo4Qlz44xDIiknwGvAitLAs2gQ==
dependencies:
"@edge-runtime/vm" "2.0.0"
"@types/node" "14.18.33"
- "@vercel/build-utils" "5.7.0"
- "@vercel/node-bridge" "3.1.2"
- "@vercel/static-config" "2.0.6"
+ "@vercel/build-utils" "6.3.0"
+ "@vercel/node-bridge" "3.1.11"
+ "@vercel/static-config" "2.0.13"
edge-runtime "2.0.0"
esbuild "0.14.47"
exit-hook "2.2.1"
node-fetch "2.6.7"
- ts-node "8.9.1"
+ ts-node "10.9.1"
typescript "4.3.4"
-"@vercel/[email protected]":
- version "2.0.6"
- resolved "https://registry.yarnpkg.com/@vercel/static-config/-/static-config-2.0.6.tgz#9e963eaf9eeebb28d729c963039bb9caf617ae4b"
- integrity sha512-P0kh9ZBA9RrP4u0pDENxsuU/PAOw/ph+CoGgS5ZfDNa7P0qYhi9TfgVAtjFnGxi0dImq/S49uTVW5NPYWwc+ww==
+"@vercel/[email protected]":
+ version "2.0.13"
+ resolved "https://registry.yarnpkg.com/@vercel/static-config/-/static-config-2.0.13.tgz#6ffd6879bdfa3014e7aceb68876b5757e9d90e19"
+ integrity sha512-09bVISGyhRMoL6gQTfM7n89SeUmyOlIzVMo2oNOj3thy4AIKGuN0SzEp0qNRw8d9j07rifp9JPD4rOuDRx4+eA==
dependencies:
ajv "8.6.3"
json-schema-to-ts "1.6.4"
ts-morph "12.0.0"
+"@visx/axis@^2.18.0":
+ version "2.18.0"
+ resolved "https://registry.yarnpkg.com/@visx/axis/-/axis-2.18.0.tgz#9175e9d969df420592082b1ea64c16422377b389"
+ integrity sha512-iBMObSKHOHDZbuVXsdVLmAjLE5jCN1Ls3XI57v3yuf+qZ327mdPSliSOyOxhvRdaNDYPLSQj+P1nKan+04wJiQ==
+ dependencies:
+ "@types/react" "*"
+ "@visx/group" "2.17.0"
+ "@visx/point" "2.17.0"
+ "@visx/scale" "2.18.0"
+ "@visx/shape" "2.18.0"
+ "@visx/text" "2.17.0"
+ classnames "^2.3.1"
+ prop-types "^15.6.0"
+
+"@visx/[email protected]", "@visx/curve@^2.17.0":
+ version "2.17.0"
+ resolved "https://registry.yarnpkg.com/@visx/curve/-/curve-2.17.0.tgz#9b4c87dd0d10a62a0f85d5a72e4c0400316df9bf"
+ integrity sha512-8Fw2ZalgYbpeoelLqTOmMs/wD8maSKsKS9rRIwmHZ0O0XxY8iG9oVYbD4CLWzf/uFWCY6+qofk4J1g9BWQSXJQ==
+ dependencies:
+ "@types/d3-shape" "^1.3.1"
+ d3-shape "^1.0.6"
+
+"@visx/drag@^2.17.0":
+ version "2.17.0"
+ resolved "https://registry.yarnpkg.com/@visx/drag/-/drag-2.17.0.tgz#22e8e06d7dfe9e9527e7e1d4dd5ceb0195898c2b"
+ integrity sha512-k6PNOmL9Q1jiz+sCzxiV+Ue41EOU597WBPEZQd9baL08OQlFsYLxT95OpqQvZwlU1aHHr3hXxg4W6LtUCcUrNQ==
+ dependencies:
+ "@types/react" "*"
+ "@visx/event" "2.17.0"
+ "@visx/point" "2.17.0"
+ prop-types "^15.5.10"
+
+ version "2.17.0"
+ resolved "https://registry.yarnpkg.com/@visx/event/-/event-2.17.0.tgz#220c7674505e0d7a55f36bce9575482a7fa7dc23"
+ integrity sha512-fg2UWo89RgKgWWnnqI+i7EF8Ry+3CdMHTND4lo4DyJvcZZUCOwhxCHMQ4/PHW0EAUfxI51nGadcE1BcEVR5zWw==
+ dependencies:
+ "@types/react" "*"
+ "@visx/point" "2.17.0"
+
+ version "2.17.0"
+ resolved "https://registry.yarnpkg.com/@visx/gradient/-/gradient-2.17.0.tgz#8c1113f66703b48ee2d4fc064d7ff6dfc701094c"
+ integrity sha512-3vyMzSR5iSo8+nKOx+bQZpFXqFGVzCrRbuStxTH4Ag0KFATOYnjCsypjD+gc2DEVzkarVGy0V9kRfFIH09r8Fg==
+ dependencies:
+ "@types/react" "*"
+ prop-types "^15.5.7"
+
+"@visx/grid@^2.18.0":
+ version "2.18.0"
+ resolved "https://registry.yarnpkg.com/@visx/grid/-/grid-2.18.0.tgz#ae68e975d4b203a626ddba3a39d67a135816d6be"
+ integrity sha512-bmOowI5QA0R1KgNKxj5y+Belj5MbUz+RRW2BxTsXa7NbDV6IsA7H4l+kj3DDldRi7Q5SVm9zpfwWXNIBAhiFdA==
+ dependencies:
+ "@types/react" "*"
+ "@visx/curve" "2.17.0"
+ "@visx/group" "2.17.0"
+ "@visx/point" "2.17.0"
+ "@visx/scale" "2.18.0"
+ "@visx/shape" "2.18.0"
+ classnames "^2.3.1"
+ prop-types "^15.6.2"
+
+"@visx/[email protected]", "@visx/group@^2.17.0":
+ version "2.17.0"
+ resolved "https://registry.yarnpkg.com/@visx/group/-/group-2.17.0.tgz#b349fd6507e56fcb43d0b067d728df4ab329ca2e"
+ integrity sha512-60Y2dIKRh3cp/Drpq//wM067ZNrnCcvFCXufPgIihv0Ix8O7oMsYxu3ch4XUMjks+U2IAZQr5Dnc+C9sTQFkhw==
+ dependencies:
+ "@types/react" "*"
+ classnames "^2.3.1"
+ prop-types "^15.6.2"
+
+ version "2.17.0"
+ resolved "https://registry.yarnpkg.com/@visx/pattern/-/pattern-2.17.0.tgz#c00e7f80fa3d9100046d7480222679c8d92d9ae0"
+ integrity sha512-Mt1BXj3eQA+/6SeyxKEZvEUs43N4RHrnoISoQYctVJ+H8EcgfRyQZnxQRDqmY++YTW+VfXyJEGVU4Ix8Yzd1tA==
+ dependencies:
+ "@types/react" "*"
+ classnames "^2.3.1"
+ prop-types "^15.5.10"
+
+ version "2.17.0"
+ resolved "https://registry.yarnpkg.com/@visx/point/-/point-2.17.0.tgz#c11f1efee5241bcd612a29f3b3099cb435c9604e"
+ integrity sha512-fUdGQBLGaSVbFTbQ6k+1nPisbqYjTjAdo9FhlwLd3W3uyXN/39Sx2z3N2579sVNBDzmCKdYNQIU0HC+/3Vqo6w==
+
+"@visx/responsive@^2.17.0":
+ version "2.17.0"
+ resolved "https://registry.yarnpkg.com/@visx/responsive/-/responsive-2.17.0.tgz#8a31f016a270234bfecf25fb066f30d19784ddc7"
+ integrity sha512-3dY2shGbQnoknIRv3Vfnwsy3ZA8Q5Q/rYnTLiokWChYRfNC8NMPoX9mprEeb/gMAxtKjaLn3zcCgd8R+eetxIQ==
+ dependencies:
+ "@juggle/resize-observer" "^3.3.1"
+ "@types/lodash" "^4.14.172"
+ "@types/react" "*"
+ lodash "^4.17.21"
+ prop-types "^15.6.1"
+
+"@visx/[email protected]", "@visx/scale@^2.18.0":
+ version "2.18.0"
+ resolved "https://registry.yarnpkg.com/@visx/scale/-/scale-2.18.0.tgz#b78054e68ac8de49f0abeea0c60bb0bd14dec492"
+ integrity sha512-clH8HFblMlCuHvUjGRwenvbY1w9YXHU9fPl91Vbtd5bdM9xAN0Lo2+cgV46cvaX3YpnyVb4oNhlbPCBu3h6Rhw==
+ dependencies:
+ "@types/d3-interpolate" "^1.3.1"
+ "@types/d3-scale" "^3.3.0"
+ "@types/d3-time" "^2.0.0"
+ d3-interpolate "^1.4.0"
+ d3-scale "^3.3.0"
+ d3-time "^2.1.1"
+
+"@visx/[email protected]", "@visx/shape@^2.18.0":
+ version "2.18.0"
+ resolved "https://registry.yarnpkg.com/@visx/shape/-/shape-2.18.0.tgz#0d7202ca9e722ed9360e1b76f6de7b2748511d2a"
+ integrity sha512-kVSEjnzswQMyFDa/IXE7K+WsAkl91xK6A4W6MbGfcUhfQn+AP0GorvotW7HZGjkIlbmuLl14+vRktDo5jqS/og==
+ dependencies:
+ "@types/d3-path" "^1.0.8"
+ "@types/d3-shape" "^1.3.1"
+ "@types/lodash" "^4.14.172"
+ "@types/react" "*"
+ "@visx/curve" "2.17.0"
+ "@visx/group" "2.17.0"
+ "@visx/scale" "2.18.0"
+ classnames "^2.3.1"
+ d3-path "^1.0.5"
+ d3-shape "^1.2.0"
+ lodash "^4.17.21"
+ prop-types "^15.5.10"
+
+ version "2.17.0"
+ resolved "https://registry.yarnpkg.com/@visx/text/-/text-2.17.0.tgz#e65aa8a202ce9cfdcbd898bb0afd6253ccea6a40"
+ integrity sha512-Eu6b8SMI+LU4O6H4l/QhCa7c4GtDTQO6jhSYuU70pdTST1Bm74nImPGekG2xDW3uxaLlkb8fDpvXag0Z7v+vlQ==
+ dependencies:
+ "@types/lodash" "^4.14.172"
+ "@types/react" "*"
+ classnames "^2.3.1"
+ lodash "^4.17.21"
+ prop-types "^15.7.2"
+ reduce-css-calc "^1.3.0"
+
"@web3-storage/multipart-parser@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@web3-storage/multipart-parser/-/multipart-parser-1.0.0.tgz#6b69dc2a32a5b207ba43e556c25cc136a56659c4"
@@ -4020,7 +4503,7 @@ acorn-walk@^7.1.1:
resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc"
integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==
-acorn-walk@^8.2.0:
+acorn-walk@^8.1.1, acorn-walk@^8.2.0:
version "8.2.0"
resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1"
integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==
@@ -4035,6 +4518,11 @@ acorn@^8.0.0, acorn@^8.2.4, acorn@^8.7.0, acorn@^8.8.0:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8"
integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==
+acorn@^8.4.1, acorn@^8.8.2:
+ version "8.8.2"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a"
+ integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==
+
agent-base@6, agent-base@^6.0.0, agent-base@^6.0.2:
version "6.0.2"
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77"
@@ -4050,6 +4538,11 @@ aggregate-error@^3.0.0:
clean-stack "^2.0.0"
indent-string "^4.0.0"
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/ahocorasick/-/ahocorasick-1.0.2.tgz#9eee93aef9d02bfb476d9b648d9b7a40ef2fd500"
+ integrity sha512-hCOfMzbFx5IDutmWLAt6MZwOUjIfSM9G9FyVxytmE4Rs/5YDPWQrD/+IR1w+FweD9H2oOZEnv36TmkjhNURBVA==
+
version "8.6.3"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.6.3.tgz#11a66527761dc3e9a3845ea775d2d3c0414e8764"
@@ -4250,13 +4743,6 @@ ast-types-flow@^0.0.7:
resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad"
integrity sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==
- version "0.14.2"
- resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.14.2.tgz#600b882df8583e3cd4f2df5fa20fa83759d4bdfd"
- integrity sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA==
- dependencies:
- tslib "^2.0.1"
-
version "0.15.2"
resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.15.2.tgz#39ae4809393c4b16df751ee563411423e85fb49d"
@@ -4306,11 +4792,6 @@ axobject-query@^2.2.0:
resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.2.0.tgz#943d47e10c0b704aa42275e20edf3722648989be"
integrity sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==
-babel-core@^7.0.0-bridge.0:
- version "7.0.0-bridge.0"
- resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece"
- integrity sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==
-
babel-jest@^26.6.3:
version "26.6.3"
resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.6.3.tgz#d87d25cb0037577a0c89f82e5755c5d293c01056"
@@ -4410,6 +4891,11 @@ bail@^2.0.0:
resolved "https://registry.yarnpkg.com/bail/-/bail-2.0.2.tgz#d26f5cd8fe5d6f832a31517b9f7c356040ba6d5d"
integrity sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==
+balanced-match@^0.4.2:
+ version "0.4.2"
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
+ integrity sha512-STw03mQKnGUYtoNjmowo4F2cRmIIxYEGiMsjjwla/u5P1lxadj/05WkNaFjNiKTgJkj8KiXbgAiRTmcQRwQNtg==
+
balanced-match@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
@@ -4593,14 +5079,14 @@ bufferutil@^4.0.1:
dependencies:
node-gyp-build "^4.3.0"
-bullmq@~3.5.1:
- version "3.5.1"
- resolved "https://registry.yarnpkg.com/bullmq/-/bullmq-3.5.1.tgz#253032396e9fb30d63336ad28ae2eaeffb37de41"
- integrity sha512-QxQnSIPBmEVq/bM1wxmMdh9RS4oNyUNeCvoTegr2EgtlNYToCkLgHAkM56JhaRlffo9ExNiWfVFJpXLWDfK0Fw==
+bullmq@~3.7.0:
+ version "3.7.0"
+ resolved "https://registry.yarnpkg.com/bullmq/-/bullmq-3.7.0.tgz#555de80c9646cdd17cd997b0baf811fc84af810f"
+ integrity sha512-cKFwOQsqnCmYWFflUiI6WyUFXlGVwy6lIwwwKmMpEGvLRKo700AhFvJSw0d+LzQGhYq3PCjW1wUMKl/az8IDoQ==
dependencies:
cron-parser "^4.6.0"
glob "^8.0.3"
- ioredis "^5.2.2"
+ ioredis "^5.3.0"
lodash "^4.17.21"
msgpackr "^1.6.2"
semver "^7.3.7"
@@ -4825,6 +5311,11 @@ classcat@^5.0.3:
resolved "https://registry.yarnpkg.com/classcat/-/classcat-5.0.4.tgz#e12d1dfe6df6427f260f03b80dc63571a5107ba6"
integrity sha512-sbpkOw6z413p+HDGcBENe498WM9woqWHiJxCq7nvmxe9WmrUmqfAcxpIwAiMtM5Q3AhYkzXcNQHqsWq0mND51g==
+classnames@^2.3.1:
+ version "2.3.2"
+ resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.3.2.tgz#351d813bf0137fcc6a76a16b88208d2560a0d924"
+ integrity sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==
+
clean-stack@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b"
@@ -4856,15 +5347,6 @@ cliui@^6.0.0:
strip-ansi "^6.0.0"
wrap-ansi "^6.2.0"
-clone-deep@^4.0.1:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387"
- integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==
- dependencies:
- is-plain-object "^2.0.4"
- kind-of "^6.0.2"
- shallow-clone "^3.0.0"
-
clone-response@^1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.3.tgz#af2032aa47816399cf5f0a1d0db902f517abb8c3"
@@ -4961,11 +5443,6 @@ commander@^4.0.0:
resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068"
integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==
-commondir@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
- integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==
-
component-emitter@^1.2.1:
version "1.3.0"
resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0"
@@ -5083,6 +5560,11 @@ cosmiconfig@^7.0.0:
path-type "^4.0.0"
yaml "^1.10.0"
+create-require@^1.1.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333"
+ integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==
+
cron-parser@^4.6.0:
version "4.7.0"
resolved "https://registry.yarnpkg.com/cron-parser/-/cron-parser-4.7.0.tgz#184eac151f810e7bf2b32ad37b4dd4a711797cdc"
@@ -5124,6 +5606,16 @@ [email protected]:
dependencies:
tiny-invariant "^1.0.6"
+css-what@^5.0.1:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/css-what/-/css-what-5.1.0.tgz#3f7b707aadf633baf62c2ceb8579b545bb40f7fe"
+ integrity sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==
+
+cssesc@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee"
+ integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==
+
cssom@^0.4.4:
version "0.4.4"
resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10"
@@ -5141,11 +5633,35 @@ cssstyle@^2.3.0:
dependencies:
cssom "~0.3.6"
-csstype@^3.0.11, csstype@^3.0.2:
+csstype@^3.0.11, csstype@^3.0.2, csstype@^3.0.7:
version "3.1.1"
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.1.tgz#841b532c45c758ee546a11d5bd7b7b473c8c30b9"
integrity sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==
+d3-array@2, d3-array@^2.3.0:
+ version "2.12.1"
+ resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-2.12.1.tgz#e20b41aafcdffdf5d50928004ececf815a465e81"
+ integrity sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ==
+ dependencies:
+ internmap "^1.0.0"
+
+d3-array@^3.2.2:
+ version "3.2.2"
+ resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-3.2.2.tgz#f8ac4705c5b06914a7e0025bbf8d5f1513f6a86e"
+ integrity sha512-yEEyEAbDrF8C6Ob2myOBLjwBLck1Z89jMGFee0oPsn95GqjerpaOA4ch+vc2l0FNFFwMD5N7OCSEN5eAlsUbgQ==
+ dependencies:
+ internmap "1 - 2"
+
+d3-color@1:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-1.4.1.tgz#c52002bf8846ada4424d55d97982fef26eb3bc8a"
+ integrity sha512-p2sTHSLCJI2QKunbGb7ocOh7DgTAn8IrLx21QRc/BSnodXM4sv6aLQlnfpvehFMLZEfBc6g9pH9SWQccFYfJ9Q==
+
+"d3-color@1 - 2":
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-2.0.0.tgz#8d625cab42ed9b8f601a1760a389f7ea9189d62e"
+ integrity sha512-SPXi0TSKPD4g9tw0NMZFnR95XVgUZiBH+uUTqQuDu1OsE2zomHU7ho0FISciaPvosimixwHFl3WHLGabv6dDgQ==
+
"d3-color@1 - 3":
version "3.1.0"
resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-3.1.0.tgz#395b2833dfac71507f12ac2f7af23bf819de24e2"
@@ -5169,6 +5685,11 @@ csstype@^3.0.11, csstype@^3.0.2:
resolved "https://registry.yarnpkg.com/d3-ease/-/d3-ease-3.0.1.tgz#9658ac38a2140d59d346160f1f6c30fda0bd12f4"
integrity sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==
+"d3-format@1 - 2":
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-2.0.0.tgz#a10bcc0f986c372b729ba447382413aabf5b0767"
+ integrity sha512-Ab3S6XuE/Q+flY96HXT0jOXcM4EAClYFnRGY5zsjRGNy6qCYrQsMffs7cV5Q9xejb35zxW5hf/guKw34kvIKsA==
+
"d3-interpolate@1 - 3":
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-3.0.1.tgz#3c47aa5b32c5b3dfb56ef3fd4342078a632b400d"
@@ -5176,11 +5697,62 @@ csstype@^3.0.11, csstype@^3.0.2:
dependencies:
d3-color "1 - 3"
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-2.0.1.tgz#98be499cfb8a3b94d4ff616900501a64abc91163"
+ integrity sha512-c5UhwwTs/yybcmTpAVqwSFl6vrQ8JZJoT5F7xNFK9pymv5C0Ymcc9/LIJHtYIggg/yS9YHw8i8O8tgb9pupjeQ==
+ dependencies:
+ d3-color "1 - 2"
+
+d3-interpolate@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-1.4.0.tgz#526e79e2d80daa383f9e0c1c1c7dcc0f0583e987"
+ integrity sha512-V9znK0zc3jOPV4VD2zZn0sDhZU3WAE2bmlxdIwwQPPzPjvyLkd8B3JUVdS1IDUFDkWZ72c9qnv1GK2ZagTZ8EA==
+ dependencies:
+ d3-color "1"
+
+d3-path@1, d3-path@^1.0.5:
+ version "1.0.9"
+ resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-1.0.9.tgz#48c050bb1fe8c262493a8caf5524e3e9591701cf"
+ integrity sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==
+
+d3-scale@^3.3.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-3.3.0.tgz#28c600b29f47e5b9cd2df9749c206727966203f3"
+ integrity sha512-1JGp44NQCt5d1g+Yy+GeOnZP7xHo0ii8zsQp6PGzd+C1/dl0KGsp9A7Mxwp+1D1o4unbTTxVdU/ZOIEBoeZPbQ==
+ dependencies:
+ d3-array "^2.3.0"
+ d3-format "1 - 2"
+ d3-interpolate "1.2.0 - 2"
+ d3-time "^2.1.1"
+ d3-time-format "2 - 3"
+
"d3-selection@2 - 3", d3-selection@3, d3-selection@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/d3-selection/-/d3-selection-3.0.0.tgz#c25338207efa72cc5b9bd1458a1a41901f1e1b31"
integrity sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==
+d3-shape@^1.0.6, d3-shape@^1.2.0:
+ version "1.3.7"
+ resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-1.3.7.tgz#df63801be07bc986bc54f63789b4fe502992b5d7"
+ integrity sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==
+ dependencies:
+ d3-path "1"
+
+"d3-time-format@2 - 3":
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-3.0.0.tgz#df8056c83659e01f20ac5da5fdeae7c08d5f1bb6"
+ integrity sha512-UXJh6EKsHBTjopVqZBhFysQcoXSv/5yLONZvkQ5Kk3qbwiUYkdX17Xa1PT6U1ZWXGGfB1ey5L8dKMlFq2DO0Ag==
+ dependencies:
+ d3-time "1 - 2"
+
+"d3-time@1 - 2", d3-time@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-2.1.1.tgz#e9d8a8a88691f4548e68ca085e5ff956724a6682"
+ integrity sha512-/eIQe/eR4kCQwq7yxi7z4c6qEXf2IYGcjoWB5OOQy4Tq9Uv39/947qlDcN2TLkiTzQWzvnsuYPB9TrWaNfipKQ==
+ dependencies:
+ d3-array "2"
+
"d3-timer@1 - 3":
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-timer/-/d3-timer-3.0.1.tgz#6284d2a2708285b1abb7e201eda4380af35e63b0"
@@ -5303,6 +5875,11 @@ deep-is@^0.1.3, deep-is@~0.1.3:
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831"
integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==
+deep-object-diff@^1.1.9:
+ version "1.1.9"
+ resolved "https://registry.yarnpkg.com/deep-object-diff/-/deep-object-diff-1.1.9.tgz#6df7ef035ad6a0caa44479c536ed7b02570f4595"
+ integrity sha512-Rn+RuwkmkDwCi2/oXOFS9Gsr5lJZu/yTGpK7wAaAIE75CC+LCGEZHpY6VQJa/RoJcrmaA/docWJZvYohlNkWPA==
+
deepmerge@^4.2.2:
version "4.2.2"
resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955"
@@ -5370,7 +5947,7 @@ delayed-stream@~1.0.0:
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==
-denque@^2.0.1:
+denque@^2.0.1, denque@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/denque/-/denque-2.1.0.tgz#e93e1a6569fb5e66f16a3c2a2964617d349d6ab1"
integrity sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==
@@ -6016,6 +6593,34 @@ esbuild@^0.15.1:
esbuild-windows-64 "0.15.12"
esbuild-windows-arm64 "0.15.12"
+esbuild@^0.16.3:
+ version "0.16.17"
+ resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.16.17.tgz#fc2c3914c57ee750635fee71b89f615f25065259"
+ integrity sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==
+ optionalDependencies:
+ "@esbuild/android-arm" "0.16.17"
+ "@esbuild/android-arm64" "0.16.17"
+ "@esbuild/android-x64" "0.16.17"
+ "@esbuild/darwin-arm64" "0.16.17"
+ "@esbuild/darwin-x64" "0.16.17"
+ "@esbuild/freebsd-arm64" "0.16.17"
+ "@esbuild/freebsd-x64" "0.16.17"
+ "@esbuild/linux-arm" "0.16.17"
+ "@esbuild/linux-arm64" "0.16.17"
+ "@esbuild/linux-ia32" "0.16.17"
+ "@esbuild/linux-loong64" "0.16.17"
+ "@esbuild/linux-mips64el" "0.16.17"
+ "@esbuild/linux-ppc64" "0.16.17"
+ "@esbuild/linux-riscv64" "0.16.17"
+ "@esbuild/linux-s390x" "0.16.17"
+ "@esbuild/linux-x64" "0.16.17"
+ "@esbuild/netbsd-x64" "0.16.17"
+ "@esbuild/openbsd-x64" "0.16.17"
+ "@esbuild/sunos-x64" "0.16.17"
+ "@esbuild/win32-arm64" "0.16.17"
+ "@esbuild/win32-ia32" "0.16.17"
+ "@esbuild/win32-x64" "0.16.17"
+
esbuild@~0.15.10:
version "0.15.15"
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.15.15.tgz#503b70bdc18d72d8fc2962ed3ab9219249e58bbe"
@@ -6481,6 +7086,13 @@ etag@~1.8.1:
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/eval/-/eval-0.1.6.tgz#9620d7d8c85515e97e6b47c5814f46ae381cb3cc"
+ integrity sha512-o0XUw+5OGkXw4pJZzQoXUk+H87DHuC+7ZE//oSrRGtatTmr12oTnLfg6QOq9DyTt0c/p4TwzgmkKrBzWTSizyQ==
+ dependencies:
+ require-like ">= 0.1.1"
+
event-target-shim@^5.0.0:
version "5.0.1"
resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789"
@@ -6776,27 +7388,11 @@ [email protected]:
statuses "2.0.1"
unpipe "~1.0.0"
-find-cache-dir@^2.0.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7"
- integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==
- dependencies:
- commondir "^1.0.1"
- make-dir "^2.0.0"
- pkg-dir "^3.0.0"
-
find-root@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4"
integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==
-find-up@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73"
- integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==
- dependencies:
- locate-path "^3.0.0"
-
find-up@^4.0.0, find-up@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19"
@@ -6826,11 +7422,6 @@ flatted@^3.1.0:
resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787"
integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==
-flow-parser@0.*:
- version "0.190.0"
- resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.190.0.tgz#8e0706d58d156d9db0b3350b76636eb0a77e754e"
- integrity sha512-9jxaqkeeARD//nhwDoN//j+EFcwzKJCGPtTQzUdKZdlZG3JmUdbV6XJFLD9sbWFPUmcCT1mblwILwdoq0mKWQw==
-
focus-lock@^0.11.5:
version "0.11.5"
resolved "https://registry.yarnpkg.com/focus-lock/-/focus-lock-0.11.5.tgz#bef1bf86000ce5ee634a7fedeecf28a580dfbc9d"
@@ -6979,6 +7570,13 @@ functions-have-names@^1.2.2:
resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834"
integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==
+generic-names@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/generic-names/-/generic-names-4.0.0.tgz#0bd8a2fd23fe8ea16cbd0a279acd69c06933d9a3"
+ integrity sha512-ySFolZQfw9FoDb3ed9d80Cm9f0+r7qj+HJkWjeD9RBfpxEVTlVhol+gvaQB/78WbwYfbnNh8nWHHBSlg072y6A==
+ dependencies:
+ loader-utils "^3.2.0"
+
gensync@^1.0.0-beta.2:
version "1.0.0-beta.2"
resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
@@ -7192,7 +7790,7 @@ got@^11.0.0:
p-cancelable "^2.0.0"
responselike "^2.0.0"
-graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4:
+graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4:
version "4.2.10"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c"
integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==
@@ -7420,6 +8018,11 @@ [email protected], iconv-lite@^0.4.24:
dependencies:
safer-buffer ">= 2.1.2 < 3"
+icss-utils@^5.0.0, icss-utils@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae"
+ integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==
+
ieee754@^1.1.13:
version "1.2.1"
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
@@ -7519,6 +8122,16 @@ internal-slot@^1.0.3:
has "^1.0.3"
side-channel "^1.0.4"
+"internmap@1 - 2":
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/internmap/-/internmap-2.0.3.tgz#6685f23755e43c524e251d29cbc97248e3061009"
+ integrity sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==
+
+internmap@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/internmap/-/internmap-1.0.1.tgz#0017cc8a3b99605f0302f2b198d272e015e5df95"
+ integrity sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==
+
intl-messageformat@^10.1.0:
version "10.2.5"
resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-10.2.5.tgz#a51e6e2700d82b5b7ccd7a9f3bd45d967d95afc0"
@@ -7536,7 +8149,7 @@ invariant@^2.2.4:
dependencies:
loose-envify "^1.0.0"
-ioredis@*, ioredis@^5.2.2, ioredis@^5.2.4:
+ioredis@*, ioredis@^5.2.4:
version "5.2.4"
resolved "https://registry.yarnpkg.com/ioredis/-/ioredis-5.2.4.tgz#9e262a668bc29bae98f2054c1e0d7efd86996b96"
integrity sha512-qIpuAEt32lZJQ0XyrloCRdlEdUUNGG9i0UOk6zgzK6igyudNWqEBxfH6OlbnOOoBBvr1WB02mm8fR55CnikRng==
@@ -7551,6 +8164,21 @@ ioredis@*, ioredis@^5.2.2, ioredis@^5.2.4:
redis-parser "^3.0.0"
standard-as-callback "^2.1.0"
+ioredis@^5.3.0:
+ version "5.3.1"
+ resolved "https://registry.yarnpkg.com/ioredis/-/ioredis-5.3.1.tgz#55d394a51258cee3af9e96c21c863b1a97bf951f"
+ integrity sha512-C+IBcMysM6v52pTLItYMeV4Hz7uriGtoJdz7SSBDX6u+zwSYGirLdQh3L7t/OItWITcw3gTFMjJReYUwS4zihg==
+ dependencies:
+ "@ioredis/commands" "^1.1.1"
+ cluster-key-slot "^1.1.0"
+ debug "^4.3.4"
+ denque "^2.1.0"
+ lodash.defaults "^4.2.0"
+ lodash.isarguments "^3.1.0"
+ redis-errors "^1.2.0"
+ redis-parser "^3.0.0"
+ standard-as-callback "^2.1.0"
+
ip@^1.1.5:
version "1.1.8"
resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48"
@@ -7988,6 +8616,11 @@ istanbul-reports@^3.0.2:
html-escaper "^2.0.0"
istanbul-lib-report "^3.0.0"
+javascript-stringify@^2.0.1:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/javascript-stringify/-/javascript-stringify-2.1.0.tgz#27c76539be14d8bd128219a2d731b09337904e79"
+ integrity sha512-JVAfqNPTvNq3sB/VHQJAFxN/sPgKnsKrCwyRt15zwNCdrMMJDdcEOdubuy+DuJYYdm0ox1J4uzEuYKkN+9yhVg==
+
jest-changed-files@^26.6.2:
version "26.6.2"
resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.6.2.tgz#f6198479e1cc66f22f9ae1e22acaa0b429c042d0"
@@ -8391,31 +9024,6 @@ js-yaml@^4.0.0, js-yaml@^4.1.0:
dependencies:
argparse "^2.0.1"
-jscodeshift@^0.13.1:
- version "0.13.1"
- resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.13.1.tgz#69bfe51e54c831296380585c6d9e733512aecdef"
- integrity sha512-lGyiEbGOvmMRKgWk4vf+lUrCWO/8YR8sUR3FKF1Cq5fovjZDlIcw3Hu5ppLHAnEXshVffvaM0eyuY/AbOeYpnQ==
- dependencies:
- "@babel/core" "^7.13.16"
- "@babel/parser" "^7.13.16"
- "@babel/plugin-proposal-class-properties" "^7.13.0"
- "@babel/plugin-proposal-nullish-coalescing-operator" "^7.13.8"
- "@babel/plugin-proposal-optional-chaining" "^7.13.12"
- "@babel/plugin-transform-modules-commonjs" "^7.13.8"
- "@babel/preset-flow" "^7.13.13"
- "@babel/preset-typescript" "^7.13.0"
- "@babel/register" "^7.13.16"
- babel-core "^7.0.0-bridge.0"
- chalk "^4.1.2"
- flow-parser "0.*"
- graceful-fs "^4.2.4"
- micromatch "^3.1.10"
- neo-async "^2.5.0"
- node-dir "^0.1.17"
- recast "^0.20.4"
- temp "^0.8.4"
- write-file-atomic "^2.3.0"
-
jsdom@^16.4.0:
version "16.7.0"
resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.7.0.tgz#918ae71965424b197c819f8183a754e18977b710"
@@ -8514,6 +9122,16 @@ json5@^1.0.1:
dependencies:
minimist "^1.2.0"
+json5@^2.2.2:
+ version "2.2.3"
+ resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283"
+ integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==
+
+jsonc-parser@^3.2.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76"
+ integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==
+
jsonfile@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
@@ -8646,13 +9264,10 @@ loader-utils@^2.0.0:
emojis-list "^3.0.0"
json5 "^2.1.2"
-locate-path@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e"
- integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==
- dependencies:
- p-locate "^3.0.0"
- path-exists "^3.0.0"
+loader-utils@^3.2.0:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-3.2.1.tgz#4fb104b599daafd82ef3e1a41fb9265f87e1f576"
+ integrity sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw==
locate-path@^5.0.0:
version "5.0.0"
@@ -8668,6 +9283,11 @@ locate-path@^6.0.0:
dependencies:
p-locate "^5.0.0"
+lodash.camelcase@^4.3.0:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6"
+ integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==
+
lodash.debounce@^4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
@@ -8678,6 +9298,11 @@ lodash.defaults@^4.2.0:
resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c"
integrity sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==
+lodash.get@^4.4.2:
+ version "4.4.2"
+ resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
+ integrity sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==
+
lodash.isarguments@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a"
@@ -8752,6 +9377,11 @@ lru-cache@^6.0.0:
dependencies:
yallist "^4.0.0"
+lru-cache@^7.14.1:
+ version "7.16.1"
+ resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.16.1.tgz#7acea16fecd9ed11430e78443c2bb81a06d3dea9"
+ integrity sha512-9kkuMZHnLH/8qXARvYSjNvq8S1GYFFzynQTAfKeaJ0sIrR3PUPuu37Z+EiIANiZBvpfTf2B5y8ecDLSMWlLv+w==
+
luxon@^3.1.0:
version "3.1.1"
resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.1.1.tgz#b492c645b2474fb86f3bd3283213846b99c32c1e"
@@ -8769,14 +9399,6 @@ magic-string@^0.25.3:
dependencies:
sourcemap-codec "^1.4.8"
-make-dir@^2.0.0, make-dir@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5"
- integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==
- dependencies:
- pify "^4.0.1"
- semver "^5.6.0"
-
make-dir@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f"
@@ -8813,6 +9435,11 @@ markdown-extensions@^1.0.0:
resolved "https://registry.yarnpkg.com/markdown-extensions/-/markdown-extensions-1.1.1.tgz#fea03b539faeaee9b4ef02a3769b455b189f7fc3"
integrity sha512-WWC0ZuMzCyDHYCasEGs4IPvLyTGftYwh6wIEOULOF0HXcqZlhwRzrK0w2VUlxWA98xnvb/jszw4ZSkJ6ADpM6Q==
+math-expression-evaluator@^1.2.14:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.4.0.tgz#3d66031117fbb7b9715ea6c9c68c2cd2eebd37e2"
+ integrity sha512-4vRUvPyxdO8cWULGTh9dZWL2tZK6LDBvj+OGHBER7poH9Qdt7kXEoj20wiz4lQUbUXQZFjPbe5mVDo9nutizCw==
+
mdast-util-definitions@^5.0.0:
version "5.1.1"
resolved "https://registry.yarnpkg.com/mdast-util-definitions/-/mdast-util-definitions-5.1.1.tgz#2c1d684b28e53f84938bb06317944bee8efa79db"
@@ -8930,6 +9557,13 @@ mdurl@^1.0.0:
resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e"
integrity sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==
+media-query-parser@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/media-query-parser/-/media-query-parser-2.0.2.tgz#ff79e56cee92615a304a1c2fa4f2bd056c0a1d29"
+ integrity sha512-1N4qp+jE0pL5Xv4uEcwVUhIkwdUO3S/9gML90nqKA7v7FcOS5vUtatfzok9S9U1EJU8dHWlcv95WLnKmmxZI9w==
+ dependencies:
+ "@babel/runtime" "^7.12.5"
+
version "0.3.0"
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
@@ -9259,7 +9893,7 @@ micromark@^3.0.0:
micromark-util-types "^1.0.1"
uvu "^0.5.0"
-micromatch@^3.1.10, micromatch@^3.1.4:
+micromatch@^3.1.4:
version "3.1.10"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==
@@ -9318,7 +9952,7 @@ mimic-response@^3.1.0:
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9"
integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==
-minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2:
+minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
@@ -9405,6 +10039,16 @@ [email protected], mkdirp@^1.0.3, mkdirp@^1.0.4:
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
+mlly@^1.1.0, mlly@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.1.1.tgz#f1838b14795e2cc284aa4ebcc76a258a52e6f537"
+ integrity sha512-Jnlh4W/aI4GySPo6+DyTN17Q75KKbLTyFK8BrGhjNP4rxuUjbRWhE6gHg3bs33URWAF44FRm7gdQA348i3XxRw==
+ dependencies:
+ acorn "^8.8.2"
+ pathe "^1.1.0"
+ pkg-types "^1.0.1"
+ ufo "^1.1.0"
+
morgan@^1.10.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/morgan/-/morgan-1.10.0.tgz#091778abc1fc47cd3509824653dae1faab6b17d7"
@@ -9484,6 +10128,11 @@ mz@^2.7.0:
object-assign "^4.0.1"
thenify-all "^1.0.0"
+nanoid@^3.3.4:
+ version "3.3.4"
+ resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab"
+ integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==
+
nanomatch@^1.2.9:
version "1.2.13"
resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119"
@@ -9511,11 +10160,6 @@ [email protected]:
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd"
integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==
-neo-async@^2.5.0:
- version "2.6.2"
- resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f"
- integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==
-
netmask@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/netmask/-/netmask-2.0.2.tgz#8b01a07644065d536383835823bc52004ebac5e7"
@@ -9536,13 +10180,6 @@ node-addon-api@^1.7.1:
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-1.7.2.tgz#3df30b95720b53c24e59948b49532b662444f54d"
integrity sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==
-node-dir@^0.1.17:
- version "0.1.17"
- resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.17.tgz#5f5665d93351335caabef8f1c554516cf5f1e4e5"
- integrity sha512-tmPX422rYgofd4epzrNoOXiE8XFZYOcCq1vD7MAXCDO+O+zndlA2ztdKKMa+EeuBG5tHETpr4ml4RGgpqDCCAg==
- dependencies:
- minimatch "^3.0.2"
-
node-domexception@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5"
@@ -9836,6 +10473,11 @@ os-tmpdir@~1.0.2:
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==
+outdent@^0.8.0:
+ version "0.8.0"
+ resolved "https://registry.yarnpkg.com/outdent/-/outdent-0.8.0.tgz#2ebc3e77bf49912543f1008100ff8e7f44428eb0"
+ integrity sha512-KiOAIsdpUTcAXuykya5fnVVT+/5uS0Q1mrkRHcF89tpieSmY33O/tmc54CqwA+bfhbtEfZUNLHaPUiB9X3jt1A==
+
p-cancelable@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf"
@@ -9851,7 +10493,7 @@ p-finally@^1.0.0:
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
integrity sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==
-p-limit@^2.0.0, p-limit@^2.2.0:
+p-limit@^2.2.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1"
integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==
@@ -9865,13 +10507,6 @@ p-limit@^3.0.2:
dependencies:
yocto-queue "^0.1.0"
-p-locate@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4"
- integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==
- dependencies:
- p-limit "^2.0.0"
-
p-locate@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07"
@@ -9991,11 +10626,6 @@ path-browserify@^1.0.1:
resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd"
integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==
-path-exists@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515"
- integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==
-
path-exists@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
@@ -10038,6 +10668,11 @@ path-type@^4.0.0:
resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
+pathe@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.0.tgz#e2e13f6c62b31a3289af4ba19886c230f295ec03"
+ integrity sha512-ODbEPR0KKHqECXW1GoxdDb+AZvULmXjVPy4rt+pGo2+TnjJTIPJQSVS6N63n8T2Ip+syHhbn52OewKicV0373w==
+
peek-stream@^1.1.0:
version "1.1.3"
resolved "https://registry.yarnpkg.com/peek-stream/-/peek-stream-1.1.3.tgz#3b35d84b7ccbbd262fff31dc10da56856ead6d67"
@@ -10080,23 +10715,11 @@ pify@^3.0.0:
resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
integrity sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==
-pify@^4.0.1:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231"
- integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==
-
-pirates@^4.0.1, pirates@^4.0.5:
+pirates@^4.0.1:
version "4.0.5"
resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b"
integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==
-pkg-dir@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3"
- integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==
- dependencies:
- find-up "^3.0.0"
-
pkg-dir@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3"
@@ -10104,11 +10727,25 @@ pkg-dir@^4.2.0:
dependencies:
find-up "^4.0.0"
+pkg-types@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.0.2.tgz#c233efc5210a781e160e0cafd60c0d0510a4b12e"
+ integrity sha512-hM58GKXOcj8WTqUXnsQyJYXdeAPbythQgEF3nTcEo+nkD49chjQ9IKm/QJy9xf6JakXptz86h7ecP2024rrLaQ==
+ dependencies:
+ jsonc-parser "^3.2.0"
+ mlly "^1.1.1"
+ pathe "^1.1.0"
+
posix-character-classes@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==
+postcss-discard-duplicates@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-5.1.0.tgz#9eb4fe8456706a4eebd6d3b7b777d07bad03e848"
+ integrity sha512-zmX3IoSI2aoenxHV6C7plngHWWhUOV3sP1T8y2ifzxzbtnuhk1EdPwm0S1bIUNaJ2eNbWeGLEwzw8huPD67aQw==
+
postcss-load-config@^3.0.1:
version "3.1.4"
resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.4.tgz#1ab2571faf84bb078877e1d07905eabe9ebda855"
@@ -10117,6 +10754,78 @@ postcss-load-config@^3.0.1:
lilconfig "^2.0.5"
yaml "^1.10.2"
+postcss-load-config@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-4.0.1.tgz#152383f481c2758274404e4962743191d73875bd"
+ integrity sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==
+ dependencies:
+ lilconfig "^2.0.5"
+ yaml "^2.1.1"
+
+postcss-modules-extract-imports@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz#cda1f047c0ae80c97dbe28c3e76a43b88025741d"
+ integrity sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==
+
+postcss-modules-local-by-default@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz#ebbb54fae1598eecfdf691a02b3ff3b390a5a51c"
+ integrity sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==
+ dependencies:
+ icss-utils "^5.0.0"
+ postcss-selector-parser "^6.0.2"
+ postcss-value-parser "^4.1.0"
+
+postcss-modules-scope@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz#9ef3151456d3bbfa120ca44898dfca6f2fa01f06"
+ integrity sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==
+ dependencies:
+ postcss-selector-parser "^6.0.4"
+
+postcss-modules-values@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz#d7c5e7e68c3bb3c9b27cbf48ca0bb3ffb4602c9c"
+ integrity sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==
+ dependencies:
+ icss-utils "^5.0.0"
+
+postcss-modules@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/postcss-modules/-/postcss-modules-6.0.0.tgz#cac283dbabbbdc2558c45391cbd0e2df9ec50118"
+ integrity sha512-7DGfnlyi/ju82BRzTIjWS5C4Tafmzl3R79YP/PASiocj+aa6yYphHhhKUOEoXQToId5rgyFgJ88+ccOUydjBXQ==
+ dependencies:
+ generic-names "^4.0.0"
+ icss-utils "^5.1.0"
+ lodash.camelcase "^4.3.0"
+ postcss-modules-extract-imports "^3.0.0"
+ postcss-modules-local-by-default "^4.0.0"
+ postcss-modules-scope "^3.0.0"
+ postcss-modules-values "^4.0.0"
+ string-hash "^1.1.1"
+
+postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4:
+ version "6.0.11"
+ resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz#2e41dc39b7ad74046e1615185185cd0b17d0c8dc"
+ integrity sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==
+ dependencies:
+ cssesc "^3.0.0"
+ util-deprecate "^1.0.2"
+
+postcss-value-parser@^4.1.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514"
+ integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==
+
+postcss@^8.4.19:
+ version "8.4.21"
+ resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.21.tgz#c639b719a57efc3187b13a1d765675485f4134f4"
+ integrity sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==
+ dependencies:
+ nanoid "^3.3.4"
+ picocolors "^1.0.0"
+ source-map-js "^1.0.2"
+
prelude-ls@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
@@ -10191,7 +10900,7 @@ prompts@^2.0.1:
kleur "^3.0.3"
sisteransi "^1.0.5"
-prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.8.1:
+prop-types@^15.5.10, prop-types@^15.5.7, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1:
version "15.8.1"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==
@@ -10380,20 +11089,20 @@ react-remove-scroll@^2.5.5:
use-callback-ref "^1.3.0"
use-sidecar "^1.1.2"
- version "6.5.0"
- resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.5.0.tgz#3970bdcaa7c710a6e0b478a833ba0b4b8ae61a6f"
- integrity sha512-/XzRc5fq80gW1ctiIGilyKFZC/j4kfe75uivMsTChFbkvrK4ZrF3P3cGIc1f/SSkQ4JiJozPrf+AwUHHWVehVg==
+ version "6.8.1"
+ resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.8.1.tgz#7e136b67d9866f55999e9a8482c7008e3c575ac9"
+ integrity sha512-67EXNfkQgf34P7+PSb6VlBuaacGhkKn3kpE51+P6zYSG2kiRoumXEL6e27zTa9+PGF2MNXbgIUHTVlleLbIcHQ==
dependencies:
- "@remix-run/router" "1.1.0"
- react-router "6.5.0"
+ "@remix-run/router" "1.3.2"
+ react-router "6.8.1"
- version "6.5.0"
- resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.5.0.tgz#b53f15543a60750c925609d2e38037ac5aed6dd3"
- integrity sha512-fqqUSU0NC0tSX0sZbyuxzuAzvGqbjiZItBQnyicWlOUmzhAU8YuLgRbaCL2hf3sJdtRy4LP/WBrWtARkMvdGPQ==
+ version "6.8.1"
+ resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.8.1.tgz#e362caf93958a747c649be1b47cd505cf28ca63e"
+ integrity sha512-Jgi8BzAJQ8MkPt8ipXnR73rnD7EmZ0HFFb7jdQU24TynGW1Ooqin2KVDN9voSC+7xhqbbCd2cjGUepb6RObnyg==
dependencies:
- "@remix-run/router" "1.1.0"
+ "@remix-run/router" "1.3.2"
react-select@^5.5.1:
version "5.5.4"
@@ -10443,16 +11152,16 @@ react@^18.2.0:
dependencies:
loose-envify "^1.1.0"
-reactflow@^11.4.1:
- version "11.4.2"
- resolved "https://registry.yarnpkg.com/reactflow/-/reactflow-11.4.2.tgz#8aeee24baf53bb7938ad41e57a6bbb4d84ca7261"
- integrity sha512-kedccI6S/+/Fj+MFqEqb5bUncyTsr5DTxeAG5TZ6QB6wwNEE6KG3UFsqRaa1wbOtKnEWwOOupq0fDPE1ePUAZQ==
+reactflow@^11.5.6:
+ version "11.5.6"
+ resolved "https://registry.yarnpkg.com/reactflow/-/reactflow-11.5.6.tgz#744e2aa6cfb2c376b560633377063c2a576f3eec"
+ integrity sha512-my4LUKT7H7t2mK/qy4n+bfAMgjqhHOhYGYrvzSWB4yPhOhamPGjs0Ted9G8JWEw15Svn7pHf8DppTHUfk5zH2g==
dependencies:
- "@reactflow/background" "11.1.2"
- "@reactflow/controls" "11.1.2"
- "@reactflow/core" "11.4.2"
- "@reactflow/minimap" "11.3.2"
- "@reactflow/node-toolbar" "1.1.2"
+ "@reactflow/background" "11.1.8"
+ "@reactflow/controls" "11.1.8"
+ "@reactflow/core" "11.5.5"
+ "@reactflow/minimap" "11.3.8"
+ "@reactflow/node-toolbar" "1.1.8"
read-cmd-shim@^4.0.0:
version "4.0.0"
@@ -10536,16 +11245,6 @@ readdirp@~3.6.0:
dependencies:
picomatch "^2.2.1"
-recast@^0.20.4:
- version "0.20.5"
- resolved "https://registry.yarnpkg.com/recast/-/recast-0.20.5.tgz#8e2c6c96827a1b339c634dd232957d230553ceae"
- integrity sha512-E5qICoPoNL4yU0H0NoBDntNB0Q5oMSNh9usFctYniLBluTthi3RsQVBXIJNbApOlvSwW/RGxIuokPcAc59J5fQ==
- dependencies:
- ast-types "0.14.2"
- esprima "~4.0.0"
- source-map "~0.6.1"
- tslib "^2.0.1"
-
recast@^0.21.5:
version "0.21.5"
resolved "https://registry.yarnpkg.com/recast/-/recast-0.21.5.tgz#e8cd22bb51bcd6130e54f87955d33a2b2e57b495"
@@ -10568,6 +11267,22 @@ redis-parser@^3.0.0:
dependencies:
redis-errors "^1.0.0"
+reduce-css-calc@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716"
+ integrity sha512-0dVfwYVOlf/LBA2ec4OwQ6p3X9mYxn/wOl2xTcLwjnPYrkgEfPx3VI4eGCH3rQLlPISG5v9I9bkZosKsNRTRKA==
+ dependencies:
+ balanced-match "^0.4.2"
+ math-expression-evaluator "^1.2.14"
+ reduce-function-call "^1.0.1"
+
+reduce-function-call@^1.0.1:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/reduce-function-call/-/reduce-function-call-1.0.3.tgz#60350f7fb252c0a67eb10fd4694d16909971300f"
+ integrity sha512-Hl/tuV2VDgWgCSEeWMLwxLZqX7OK59eU1guxXsRKTAyeYimivsKdtcV4fu3r710tpG5GmDKDhQ0HSZLExnNmyQ==
+ dependencies:
+ balanced-match "^1.0.0"
+
regenerate-unicode-properties@^10.1.0:
version "10.1.0"
resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz#7c3192cab6dd24e21cb4461e5ddd7dd24fa8374c"
@@ -10682,22 +11397,23 @@ remeda@^1.2.0:
resolved "https://registry.yarnpkg.com/remeda/-/remeda-1.3.0.tgz#6dc642187e08ead2265e8c7f8517a16a69e325ce"
integrity sha512-DJkLBUzi0dEigDuyPtVe50aNzQq8EBQOintPaxvzwSNreXOGsRnvfGiK+cTsY+nUgGCBrcFxcvH8MIg2skfIZA==
-remix-flat-routes@^0.5.6:
- version "0.5.6"
- resolved "https://registry.yarnpkg.com/remix-flat-routes/-/remix-flat-routes-0.5.6.tgz#58475b8ddba3d8a29cd7634f9e691a70efaf7a86"
- integrity sha512-Y+cB9Fg5L21FGSpW703tMsoORgC02Qa4BS6JG/TOM0ccDSvPDpkl/XAbg86JtZ/9aytSa7nUORlcB1725y8kAQ==
+remix-flat-routes@^0.5.7:
+ version "0.5.7"
+ resolved "https://registry.yarnpkg.com/remix-flat-routes/-/remix-flat-routes-0.5.7.tgz#1085cf2cbc27cb0683d194ddba60ea6d2e878b30"
+ integrity sha512-rDGnpAPz3i7cwAAGcfLCZszWmwrT3Yy6phTmdptl1WlA5yHmHNd1ggP6f2TEyqqjMiQto89d43lV9OkNr4rHww==
dependencies:
minimatch "^5.1.0"
-remix-validated-form@^4.6.5:
- version "4.6.5"
- resolved "https://registry.yarnpkg.com/remix-validated-form/-/remix-validated-form-4.6.5.tgz#0ce7943af82cf7dac67ac8688ef49ca92ac9e8b3"
- integrity sha512-pf6048rqhsT0lJGDvK8vapAuCITz0L05SyjSvkPNu+2t5DZAlUQaZaR1NMPu7se9RbRh1WeEUa7JWvv8HE9NrQ==
+remix-validated-form@^4.6.8:
+ version "4.6.8"
+ resolved "https://registry.yarnpkg.com/remix-validated-form/-/remix-validated-form-4.6.8.tgz#5366704d9cc60c63e22d9803924e9990f7979f86"
+ integrity sha512-9pi2RXLuH+ogp7XsUVKfXgkDBsbh/X+ppUJg+O+8v1ZTvX6Fia7A01gSwMG/rN3wWaQwgRU9xJj7WigOyMKFhg==
dependencies:
immer "^9.0.12"
+ lodash.get "^4.4.2"
remeda "^1.2.0"
tiny-invariant "^1.2.0"
- zustand "^4.0.0-rc.1"
+ zustand "^4.3.0"
remove-trailing-separator@^1.0.1:
version "1.1.0"
@@ -10724,6 +11440,11 @@ require-from-string@^2.0.2:
resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909"
integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==
+"require-like@>= 0.1.1":
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/require-like/-/require-like-0.1.2.tgz#ad6f30c13becd797010c468afa775c0c0a6b47fa"
+ integrity sha512-oyrU88skkMtDdauHDuKVrgR+zuItqr6/c//FXzvmxRGMexSDc6hNvJInGW3LL46n+8b50RykrvwSUIIQH2LQ5A==
+
require-main-filename@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b"
@@ -10816,13 +11537,6 @@ rimraf@^3.0.0, rimraf@^3.0.2:
dependencies:
glob "^7.1.3"
-rimraf@~2.6.2:
- version "2.6.3"
- resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
- integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==
- dependencies:
- glob "^7.1.3"
-
rollup-plugin-inject@^3.0.0:
version "3.0.2"
resolved "https://registry.yarnpkg.com/rollup-plugin-inject/-/rollup-plugin-inject-3.0.2.tgz#e4233855bfba6c0c12a312fd6649dff9a13ee9f4"
@@ -10951,7 +11665,7 @@ scheduler@^0.23.0:
dependencies:
loose-envify "^1.1.0"
-"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.6.0:
+"semver@2 || 3 || 4 || 5", semver@^5.5.0:
version "5.7.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
@@ -11022,13 +11736,6 @@ [email protected]:
resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424"
integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==
-shallow-clone@^3.0.0:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3"
- integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==
- dependencies:
- kind-of "^6.0.2"
-
shebang-command@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
@@ -11170,6 +11877,11 @@ sort-package-json@^1.55.0:
is-plain-obj "2.1.0"
sort-object-keys "^1.1.3"
+source-map-js@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
+ integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
+
source-map-resolve@^0.5.0:
version "0.5.3"
resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a"
@@ -11181,7 +11893,7 @@ source-map-resolve@^0.5.0:
source-map-url "^0.4.0"
urix "^0.1.0"
-source-map-support@^0.5.16, source-map-support@^0.5.17, source-map-support@^0.5.21, source-map-support@^0.5.6:
+source-map-support@^0.5.21, source-map-support@^0.5.6:
version "0.5.21"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f"
integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==
@@ -11306,6 +12018,11 @@ stream-slice@^0.1.2:
resolved "https://registry.yarnpkg.com/stream-slice/-/stream-slice-0.1.2.tgz#2dc4f4e1b936fb13f3eb39a2def1932798d07a4b"
integrity sha512-QzQxpoacatkreL6jsxnVb7X5R/pGw9OUv2qWTYWnmLpg4NdN31snPy/f3TdQE1ZUXaThRvj1Zw4/OGg0ZkaLMA==
+string-hash@^1.1.1:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/string-hash/-/string-hash-1.1.3.tgz#e8aafc0ac1855b4666929ed7dd1275df5d6c811b"
+ integrity sha512-kJUvRUFK49aub+a7T1nNE66EJbZBMnBgoC1UbCZ5n6bsZKBRga4KgBRTMn/pFkeCZSYtNeSyMxPDM0AXWELk2A==
+
string-length@^4.0.1:
version "4.0.2"
resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a"
@@ -11557,13 +12274,6 @@ tar@^6.0.2:
mkdirp "^1.0.3"
yallist "^4.0.0"
-temp@^0.8.4:
- version "0.8.4"
- resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.4.tgz#8c97a33a4770072e0a05f919396c7665a7dd59f2"
- integrity sha512-s0ZZzd0BzYv5tLSptZooSjK8oj6C+c19p7Vqta9+6NPOf7r+fxq0cJe6/oN4LTC79sy5NY8ucOJNgwsKCSbfqg==
- dependencies:
- rimraf "~2.6.2"
-
terminal-link@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994"
@@ -11778,15 +12488,23 @@ [email protected]:
"@ts-morph/common" "~0.11.0"
code-block-writer "^10.1.1"
- version "8.9.1"
- resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.9.1.tgz#2f857f46c47e91dcd28a14e052482eb14cfd65a5"
- integrity sha512-yrq6ODsxEFTLz0R3BX2myf0WBCSQh9A+py8PBo1dCzWIOcvisbyH6akNKqDHMgXePF2kir5mm5JXJTH3OUJYOQ==
- dependencies:
+ version "10.9.1"
+ resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b"
+ integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==
+ dependencies:
+ "@cspotcode/source-map-support" "^0.8.0"
+ "@tsconfig/node10" "^1.0.7"
+ "@tsconfig/node12" "^1.0.7"
+ "@tsconfig/node14" "^1.0.0"
+ "@tsconfig/node16" "^1.0.2"
+ acorn "^8.4.1"
+ acorn-walk "^8.1.1"
arg "^4.1.0"
+ create-require "^1.1.0"
diff "^4.0.1"
make-error "^1.1.1"
- source-map-support "^0.5.17"
+ v8-compile-cache-lib "^3.0.1"
yn "3.1.1"
ts-toolbelt@^6.15.5:
@@ -12002,6 +12720,11 @@ typescript@^4.9.3:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.3.tgz#3aea307c1746b8c384435d8ac36b8a2e580d85db"
integrity sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==
+ufo@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.1.0.tgz#a5c4c814b0a98f7e0ca42c478688663fd3e3c037"
+ integrity sha512-LQc2s/ZDMaCN3QLpa+uzHUOQ7SdV0qgv3VBXOolQGXTaaZpIur6PwUclF5nN2hNkiTRcUugXd1zFOW3FLJ135Q==
+
unbox-primitive@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e"
@@ -12228,7 +12951,7 @@ utf-8-validate@^5.0.2:
dependencies:
node-gyp-build "^4.3.0"
-util-deprecate@^1.0.1, util-deprecate@~1.0.1:
+util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==
@@ -12269,6 +12992,11 @@ uvu@^0.5.0:
kleur "^4.0.3"
sade "^1.7.3"
+v8-compile-cache-lib@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf"
+ integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==
+
v8-compile-cache@^2.0.3:
version "2.3.0"
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee"
@@ -12512,15 +13240,6 @@ wrappy@1:
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
-write-file-atomic@^2.3.0:
- version "2.4.3"
- resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481"
- integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==
- dependencies:
- graceful-fs "^4.1.11"
- imurmurhash "^0.1.4"
- signal-exit "^3.0.2"
-
write-file-atomic@^3.0.0:
version "3.0.3"
resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8"
@@ -12625,6 +13344,11 @@ yaml@^1.10.0, yaml@^1.10.2:
resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b"
integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==
+yaml@^2.1.1:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.2.1.tgz#3014bf0482dcd15147aa8e56109ce8632cd60ce4"
+ integrity sha512-e0WHiYql7+9wr4cWMx3TVQrNwejKaEe7/rHNmQmqRjazfOP5W8PB6Jpebb5o6fIapbz9o9+2ipcaTM2ZwDI6lw==
+
version "20.2.9"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
@@ -12665,20 +13389,20 @@ yocto-queue@^0.1.0:
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
- version "1.2.4"
- resolved "https://registry.yarnpkg.com/zod-form-data/-/zod-form-data-1.2.4.tgz#161967a60d351cc4e5e6af248e074b93ac74ec94"
- integrity sha512-mI/rgItfvYQpvzEqGuBda/nuTHrMNoFZJ5cpiGLC5O3ZaVwI0XVo3/yTY2RreVMu57wGcDrfQcTRe5aMq2ijYA==
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/zod-form-data/-/zod-form-data-1.3.1.tgz#9f2d8cab45ad052e995986c0ec6e2e53f0f7f88e"
+ integrity sha512-Uicl6vXkAqsc58Zj8ktmIJOIa3W+iI1fbfFNlGbfxBXiSZzuOiSKvIQQZAvU8H14kVgpKUpvhnBlrskis5t8HQ==
zod@^3.20.2:
version "3.20.2"
resolved "https://registry.yarnpkg.com/zod/-/zod-3.20.2.tgz#068606642c8f51b3333981f91c0a8ab37dfc2807"
integrity sha512-1MzNQdAvO+54H+EaK5YpyEy0T+Ejo/7YLHS93G3RnYWh5gaotGHwGeN/ZO687qEDU2y4CdStQYXVHIgrUl5UVQ==
-zustand@^4.0.0-rc.1:
- version "4.1.4"
- resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.1.4.tgz#b0286da4cc9edd35e91c96414fa54bfa4652a54d"
- integrity sha512-k2jVOlWo8p4R83mQ+/uyB8ILPO2PCJOf+QVjcL+1PbMCk1w5OoPYpAIxy9zd93FSfmJqoH6lGdwzzjwqJIRU5A==
+zustand@^4.3.0:
+ version "4.3.3"
+ resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.3.3.tgz#c9113499074dde2d6d99c1b5f591e9329572c224"
+ integrity sha512-x2jXq8S0kfLGNwGh87nhRfEc2eZy37tSatpSoSIN+O6HIaBhgQHSONV/F9VNrNcBcKQu/E80K1DeHDYQC/zCrQ==
dependencies:
use-sync-external-store "1.2.0"