Meta tags:
description= Everything is exported by @pidrang/core, which depends only on @angular/core. Read libs/core/src/index.ts for the full list of re-exports.;
Headings (most frequently used words):
reference, configuration, reading, the, list, field, core, guide, ui, layers, maintainers, loading, session, resource, types, params, data, provider, authentication, form, payloads, errors, tokens, and, identity,
Text of the page (most frequently used words):
the (52), source (47), core (44), src (40), libs (39), lib (38), #resource (36), string (36), line (33), lines (31), field (31), same (28), file (27), and (26), type (25), boolean (25), params (22), when (21), error (20), undefined (19), number (19), pidrang (18), for (16), name (15), provider (14), list (14), not (13), value (13), null (13), true (12), signal (11), page (10), session (10), authprovider (10), what (10), filter (10), input (10), date (10), providepidrang (9), interface (9), returns (9), operator (9), text (9), filters (9), with (8), angular (8), auth (8), dataprovider (8), promise (8), edit (7), only (7), resources (7), data (7), create (7), time (7), from (7), property (6), form (6), fields (6), default (6), does (6), void (6), listresult (6), listparams (6), pattern (6), timestamp (6), false (6), cli (6), components (5), its (5), identity (5), authidentity (5), registered (5), are (5), each (5), record (5), status (5), reference (5), into (5), readonly (5), reload (5), own (5), than (5), throws (5), order (5), numeric (5), never (5), label (5), enable (5), disable (5), loading (5), configured (4), once (4), watchidentity (4), passed (4), injectiontoken (4), yes (4), token (4), category (4), unknown (4), them (4), invalid (4), that (4), function (4), called (4), logout (4), login (4), object (4), filtervalue (4), values (4), through (4), unsupported (4), generated (4), notes (4), column (4), table (4), was (4), this (3), becomes (3), provide (3), injectauthsession (3), getidentity (3), onsessionchange (3), optional (3), injected (3), data_provider (3), required (3), three (3), see (3), providers (3), writing (3), user (3), generic (3), message (3), code (3), supabase (3), mode (3), resourceformmode (3), resourceform (3), helpers (3), use (3), authentication (3), email (3), updates (3), member (3), getlist (3), delete (3), operators (3), array (3), shorthand (3), pagination (3), before (3), request (3), sent (3), single (3), asc (3), per (3), layers (3), validation (3), always (3), entirely (3), design (3), action (3), pages (3), demo (3), after (3), load (3), resourceref (3), register (3), refine (2), tailwind (2), css (2), provided (2), starts (2), startup (2), every (2), keeps (2), rejects (2), which (2), session_identity (2), auth_provider (2), via (2), injectresource (2), injectresources (2), tokens (2), injectdataprovider (2), constructor (2), these (2), errors (2), maps (2), found (2), forbidden (2), unauthenticated (2), pidrangerrorcategory (2), cause (2), meaning (2), where (2), call (2), turns (2), draft (2), binds (2), blocks (2), shouldblocksubmit (2), can (2), password (2), loginparams (2), listener (2), loads (2), current (2), out (2), success (2), automatically (2), all (2), implementation (2), crud (2), method (2), instead (2), without (2), parameters (2), semantics (2), case (2), columns (2), greater (2), equal (2), less (2), total (2), validate (2), loaded (2), rows (2), holds (2), members (2), plain (2), reject (2), normalize (2), rejected (2), sort (2), desc (2), sorters (2), hint (2), under (2), nullable (2), input_type_by_field_type (2), presentation (2), checkbox (2), kept (2), fieldtype (2), check (2), while (2), skip (2), hidden (2), docs (2), derived (2), changes (2), describes (2), enabled (2), show (2), route (2), has (2), one (2), state (2), created_at (2), definitions (2), menu (2), first (2), must (2), change (2), calls (2), isloading (2), during (2), signed (2), injectauthprovider (2), reading (2), return (2), reloading (2), inject (2), configuration (2), read (2), artifacts (2), releasing (2), maintainers (2), getting (2), started (2), navigation (2), mit, licensed, inspired, affiliated, next, previous, pager, github, also, created, refreshes, again, notification, last, writablesignal, description, how, construct, pidrangerroroptions, options, facing, response, ask, sign, allowed, invisible, absent, underlying, original, exception, http, applicable, specific, postgrest, classification, reactive, handling, class, pidrangerror, extends, payload, normalizeresourcevalue, immediately, touched, dirty, changed, server, applies, rest, isdirty, buildresourcepayload, switch, signature, export, builds, emits, hand, written, too, payloads, walkthrough, permissions, subscription, events, unsubscribe, signs, authenticates, four, param, interfaces, details, beyond, takes, positional, arguments, like, added, later, breaking, signatures, meta, deleteparams, updateparams, update, createparams, getoneparams, getone, exact, delegated, filteroperator, accepted, enforces, compile, typescript, constraints, checks, insensitive, substring, contains, membership, gte, lte, inequality, equality, equivalent, row, count, validated, apply, those, rules, any, copies, backend, cannot, express, malformed, sorter, sources, validatelistparams, rejectunsupportedfilters, supported, normalizefilters, combined, syntax, normalized, anything, else, direction, pagesize, based, five, turn, renders, both, keeping, their, copy, lookup, there, none, shown, istextinputboundfield, fieldrequiresvaluewhenempty, formathintforfield, formatpatternforfield, regexp, inputtypeforfield, text_input_bound_field_types, format_pattern_by_field_type, stay, strings, converts, uses, regex, patterns, defined, decimal, digits, iso, datetime, yyyy, mat, types, shows, leave, unchanged, database, exempts, untouched, hasdefault, allows, cleared, rather, blocked, empty, excluded, forms, primary, keys, views, render, schema, metadata, baked, codegen, affects, visibility, prevents, editing, header, matches, otherwise, isresourceactionenabled, resourceaction, applied, set, adds, exists, itself, comes, copied, helper, app, shared, defaultsorterslines, sortablecreatedat, generate, createdat, defaultsorters, typed, rendered, resourcetable, display, titles, items, headers, split, boundaries, capitalize, word, lowercase, others, readable, url, segment, collide, existing, routes, definition, ref, force, you, need, pushes, between, until, settles, failure, alongside, initial, computation, linkedsignal, subscribes, notifications, because, authsessionref, skipped, convention, may, parameter, changing, reloads, two, triggers, new, shortcut, resourcestatus, result, populated, done, across, wraps, native, api, returning, following, documented, injectresourcelist, resourcename, functions, injection, context, component, initializer, factory, matching, pass, present, writable, driven, here, reads, registers, config, pidrangconfig, environmentproviders, everything, exported, depends, full, exports, index, material, overview, architecture, write, yourself, guide, sidebar, top, demos, main, search, content,
Text of the page (random words):
easing demo artifacts demos menu return to top sidebar navigation guide getting started write the pages yourself authentication architecture data providers ui layers overview angular material tailwind css reference core components cli maintainers design notes releasing demo artifacts on this page core reference everything is exported by pidrang core which depends only on angular core read libs core src index ts for the full list of re exports configuration providepidrang config pidrangconfig environmentproviders registers three providers property type required what it does dataprovider dataprovider yes register as data_provider token every page reads through it source libs core src lib provide pidrang ts lines 48 50 resources resource yes register as resources token pages read resource definitions from here source same file line 50 authprovider authprovider no when present register as auth_provider token and provide session_identity a writable signal driven by watchidentity without it injectauthsession throws source same file lines 53 62 watchidentity function at lines 23 45 reading the configuration function returns throws when source injectdataprovider dataprovider the configured dataprovider when providepidrang was not called angular s di error no provider for data_provider libs core src lib inject pidrang ts lines 8 9 injectauthprovider authprovider the configured authprovider when no auth provider was passed to providepidrang error message pidrang no auth provider configured pass authprovider to providepidrang source same file lines 12 17 injectresources resource the registered resources array when providepidrang was not called angular s di error no provider for resources same file lines 20 21 injectresource name string resource the single resource matching name when no resource has that name error message pidrang no resource registered with name name source same file lines 24 29 all functions use angular s inject and must be called in an injection context component constructor field initializer factory loading a list injectresourcelist t resourcename string string params listparams undefined resourceref listresult t undefined wraps dataprovider getlist in angular s native resource api returning a resourceref with the following members documented under resourceref in angular core member type what it holds value signal listresult t undefined the loaded result undefined while loading populated when done kept across status changes status signal resourcestatus loading reloading error or success error signal error undefined the error if status is error isloading signal boolean shortcut for loading reloading reload void triggers a new load two notes the resource name may be a function e g a route parameter signal changing the return value reloads automatically when params returns undefined loading is skipped entirely per resource s own convention source libs core src lib resource list ts lines 11 28 reading the session injectauthsession authsessionref loads the identity once subscribes to session change notifications and updates on its own after login logout it throws when no authprovider was passed to providepidrang because it calls injectauthprovider first member type meaning value signal authidentity null undefined undefined during initial load null when signed out authidentity when signed in updates after each login logout source libs core src lib auth session ts lines 25 36 linkedsignal computation error signal error undefined provider failure during load check this alongside value isloading signal boolean true between reload calls until getidentity settles reload void force a reload of the identity with pidrang supabase you do not need it after login logout the provider pushes the change through onsessionchange source libs core src lib auth session ref ts lines 5 10 interface definition auth session ts lines 16 51 implementation resource interface resource describes one table as a resource property type default what it does name string table name resource name and url segment must not collide with existing routes source libs core src lib resource ts line 5 label string derived from name display label for titles menu items headers generated from the table name by readable label ts in the cli split on _ case boundaries capitalize first word lowercase others fields field typed field definitions rendered by resourceform and resourcetable source same file line 7 defaultsorters listparams sorters field id order asc order applied when the page has no user set sort the cli adds field created_at order desc field id order asc when a timestamp or date created_at column exists or the same on createdat when only that one does source libs cli src lib generate resources file ts lines 53 74 sortablecreatedat and defaultsorterslines the id default itself comes from libs demo shared src lib resource list state ts line 96 copied into the generated helper src app pidrang resource list state ts at libs cli src lib generated pages ts line 72 list boolean true enable disable the generic list page and its route source libs core src lib resource ts line 10 create boolean true enable disable create source same file line 11 show boolean true enable disable show source same file line 12 edit boolean true enable disable edit source same file line 13 delete boolean true enable disable delete source same file line 14 isresourceactionenabled resource resource undefined action resourceaction boolean returns false when resource is undefined or resource action false true otherwise enabled by default source libs core src lib is resource action enabled ts lines 4 9 field interface field describes a single column property type default what it changes name string column name matches supabase table column source libs core src lib field ts line 11 label string derived from name header and form field label source same file line 12 type fieldtype input type and validation pattern source same file line 13 hidden boolean false generic list edit views skip the field at render time schema metadata not baked into codegen source same file line 14 per docs design notes md line 25 hidden affects visibility only readonly prevents editing entirely readonly boolean false field excluded from create and edit forms entirely primary keys generated columns source same file line 15 nullable boolean false for timestamp time numeric date allows the field to be cleared sent as null rather than blocked as invalid when empty source same file line 16 hasdefault boolean false shows hint leave unchanged to use the database default on create exempts from required check while untouched source same file line 17 field types type fieldtype text number boolean date timestamp time numeric type input kept as text input type text string always number input type number number always boolean mat checkbox checkbox boolean always date input type text pattern yyyy mm dd string never date timestamp input type text pattern iso datetime string never date time input type text pattern hh mm ss string never date numeric input type text pattern decimal digits string never number date timestamp time and numeric stay strings pidrang never converts them through number or date validation uses regex patterns defined in libs core src lib field presentation ts lines 15 25 source libs core src lib field presentation ts lines 3 48 input_type_by_field_type format_pattern_by_field_type text_input_bound_field_types five helpers turn a field into what a form renders both ui layers call them instead of keeping their own copy inputtypeforfield field string returns the input_type_by_field_type lookup formatpatternforfield field regexp undefined returns the validation pattern for the type undefined where there is none formathintforfield field string returns the hint shown under the input fieldrequiresvaluewhenempty field boolean is true for date timestamp time and numeric when the field is not nullable istextinputboundfield field boolean is true when the type binds a plain text input source same file lines 50 70 list params interface listparams property type what it does pagination current number page number 1 based pagination pagesize number rows per page sorters field string order asc desc sort fields and direction filters readonly filter record string filtervalue null undefined and combined filters shorthand object syntax maps values to eq values are normalized libs core src lib normalize filters ts and unsupported operators are rejected libs core src lib reject unsupported filters ts anything else is rejected before a request is sent three helpers apply those rules before any request normalizefilters filters listparams filters filter returns for undefined or null copies an array turns the shorthand record into field operator eq value members a null value becomes the null operator and throws on a single filter object or a value that is not a plain object rejectunsupportedfilters filters supported throws unsupported filter operator operator on field field for an operator the backend cannot express validatelistparams params rejects a malformed page number sorter or filter sources libs core src lib normalize filters ts line 16 libs core src lib reject unsupported filters ts lines 4 7 libs core src lib validate list params ts line 83 interface listresult t property type what it holds data t the loaded rows total number total row count for pagination list parameters are validated before a request is sent validate list params ts source libs core src lib list params ts lines 22 25 listresult filter operators operator value type semantics eq string number boolean equality shorthand field true is equivalent to operator eq value true ne string number boolean inequality lt string number less than lte string number less than or equal gt string number greater than gte string number greater than or equal in readonly filtervalue array membership contains string case insensitive substring text columns only null boolean checks for null values values accepted by operators string number or boolean filtervalue each operator enforces its own type at compile time through typescript constraints source libs core src lib list params ts lines 4 19 listparams lines 22 25 listresult libs core src lib filter ts lines 1 11 filter libs core src lib filter value ts line 1 filtervalue libs core src lib filter operator ts line 3 filteroperator exact semantics delegated to writing a data provider data provider interface dataprovider method parameters returns getlist t resource params resource string params listparams promise listresult t getone t resource params resource string params getoneparams promise t create t resource params resource string params createparams t promise t update t resource params resource string params updateparams t promise t delete t resource params resource string params deleteparams promise t each crud method beyond getlist takes its own params object instead of positional arguments so fields like meta can be added later without breaking signatures source libs core src lib data provider ts lines 4 13 libs core src lib crud params ts all four param interfaces see writing a data provider for implementation details authentication interface authprovider member type what it does login params params loginparams promise void authenticates the user with email password on success the session signal updates automatically source libs core src lib auth provider ts line 12 logout promise void signs out session becomes null source same file line 14 getidentity promise authidentity null loads the current identity called once at startup and on each reload source same file line 16 onsessionchange listener listener void void optional subscription to session events returns an unsubscribe function source same file line 18 interface loginparams email string password string source libs core src lib auth provider ts lines 1 4 interface authidentity id string email string source same file lines 6 9 see authentication and permissions for a walkthrough form payloads resourceform builds what it emits with these helpers a hand written form can use them too export signature what it does resourceformmode create edit the mode resourceform and shouldblocksubmit switch on buildresourcepayload t mode resourceformmode fields field draft t isdirty name string boolean record string unknown keeps only the fields that changed and are not readonly so the server s default applies to the rest shouldblocksubmit mode resourceformmode dirty boolean invalid boolean boolean blocks an invalid create immediately in edit it blocks only once the field is touched and invalid normalizeresourcevalue t fields field value t t turns a record into the draft the form binds to source libs core src lib resource form payload ts lines 4 34 50 and 65 where the components call them components reference errors class pidrangerror extends error property type meaning category pidrangerrorcategory classification for reactive handling source libs core src lib pidrang error ts line 5 code string undefined provider specific error code supabase postgrest error code source same file line 6 status number undefined http status if applicable source same file line 7 cause unknown underlying cause original exception source same file line 8 type pidrangerrorcategory unauthenticated forbidden not found unknown source libs core src lib pidrang error category ts lines 1 6 each category maps to a user facing response unauthenticated ask to sign in forbidden not allowed not found record invisible or absent unknown generic message source libs core src lib pidrang error ts lines 4 17 libs core src lib pidrang error options ts lines 3 8 pidrangerroroptions passed to the constructor libs core src lib pidrang error category ts lines 1 6 see writing a data provider for how providers construct these errors tokens and identity three injectiontoken s are provided by pidrang core token type required description data_provider injectiontoken dataprovider yes registered via providepidrang dataprovider injected by injectdataprovider source libs core src lib tokens ts line 7 resources injectiontoken resource yes registered via providepidrang resources injected by injectresources injectresource source same file line 9 auth_provider injectiontoken authprovider no optional only registered when authprovider is passed to providepidrang injected with optional true source same file line 11 when authprovider is configured session_identity is also provided a writablesignal authidentity null created by watchidentity it starts at null refreshes once at startup and again on every onsessionchange notification and keeps its last value when getidentity rejects it is not the same signal as injectauthsession value which starts at undefined and becomes undefined on error source libs core src lib provide pidrang ts lines 23 45 watchidentity libs core src lib session identity ts libs core src lib auth session ts lines 16 51 edit thi...
|