npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

leumas-universal-crud-react

v1.0.19

Published

Leumas Universal CRUD to a dynamic Endpoint, Setup your own Dynamic Endpoint and Use Leumas API to send to your MONGO clusters

Downloads

12

Readme

Components

CreateBulkItem - model, endpoint, propDataArray, token

<CreateBulkItem 
    model={"List"}
    endpoint="LeumasAPI"
    propDataArray={propDataArray}
    token={auth?.token}
/>

CreateItem - model, endpoint, propData, token

<CreateItem 
    model={"List"}
    endpoint="LeumasAPI"
    propData={propData}
    token={auth?.token}
/>

CustomDropdown - model, modelArray, endpoint, propData, token, onSelectedChange, color

<CustomDropdown 
    model={"List"}
    modelArray={modelArray}
    endpoint="LeumasAPI"
    propData={propData}
    token={auth?.token}
    onSelectedChange={onSelectedChange}
    color={color}
/>

DeleteItem - model, id, endpoint, token, onToggleChange

<DeleteItem 
    model={"List"}
    id={itemId}
    endpoint="LeumasAPI"
    token={auth?.token}
    onToggleChange={onToggleChange}
/>

EditItem - model, id, endpoint, data, token

<EditItem 
    model={"List"}
    id={itemId}
    endpoint="LeumasAPI"
    data={data}
    token={auth?.token}
/>

GetAllByOwner - model, id, endpoint, token, CardComponent, setMode, handleSchemaSelect

<GetAllByOwner 
    model={"List"}
    id={ownerId}
    endpoint="LeumasAPI"
    token={auth?.token}
    CardComponent={CardComponent}
    setMode={setMode}
    handleSchemaSelect={handleSchemaSelect}
/>

GetAllItems - model, endpoint, token, Cardcomponent, setMode, handleSchemaSelect

<GetAllItems 
    model={"List"}
    endpoint="LeumasAPI"
    token={auth?.token}
    CardComponent={CardComponent}
    setMode={setMode}
    handleSchemaSelect={handleSchemaSelect}
/>

GetItemById - model, id, endpoint, token

<GetItemById 
    model={"List"}
    id={itemId}
    endpoint="LeumasAPI"
    token={auth?.token}
/>

ItemRenderer - model, renderData, setMode, setIcon, token, baseLink

<ItemRenderer 
    model={"List"}
    renderData={renderData}
    setMode={setMode}
    setIcon={setIcon}
    token={auth?.token}
    baseLink={baseLink}
/>

SaveButton - model, data, isLoading, setIsLoading, setMessage, setMessgaeType, onSuccess, editMode, selectedItemId, styles

<SaveButton 
    model={"List"}
    data={data}
    isLoading={isLoading}
    setIsLoading={setIsLoading}
    setMessage={setMessage}
    setMessageType={setMessageType}
    onSuccess={onSuccess}
    editMode={editMode}
    selectedItemId={selectedItemId}
    styles={styles}
/>

ToggleStatus - model, isPublished, endpoint, itemId, token, onToggleChange

<ToggleStatus 
    model={"List"}
    isPublished={isPublished}
    endpoint="LeumasAPI"
    itemId={itemId}
    token={auth?.token}
    onToggleChange={onToggleChange}
/>

Helpers

createItem - model, endpointKey, data, token

const dataToSubmit ={
    model: "list",
    endpoint: "LeumasAPI",
    data: {
        ... data
    }
}
    const response = await createITem("List", "LeumasAPI", dataToSubmit auth?.token)

createItemsBulk - model, endpointKey, bulkData, token

const DataToSubmit = [
    {...Item1},
    {...Item2},
]
    const response = await createItemsBulk("List", "LeumasAPI", DataToSubmit, auth?.token)

editItem - model, id, data, endpointKey, token

const dataToSubmit = {
    ...data
}
const response = await editItem("List", itemId, dataToSubmit, "LeumasAPI", auth?.token)

editCoverPhoto - blockId, coverPhotoUrl, token, ownerID

const dataToSubmit = {
    coverPhotoUrl,
    ownerID
}
const response = await editCoverPhoto(blockId, dataToSubmit, auth?.token)

getAllItems - model, endpointKey, token

    const response = await getAllItems("List", "LeumasAPI", auth?.token)

getAllOwnerRelated - owner, endpointKey, token

    const response = await getAllOwnerRelated(owner, "LeumasAPI", auth?.token)

getAllOwnerCreated - owner, endpointKey, token

    const response = await getAllOwnerCreated(owner, "LeumasAPI", auth?.token)

getAllPublicItems - model, endpointKey, token

    const response = await getAllPublicItems("List", "LeumasAPI", auth?.token)

getItemById - model, id, endpointKey, token

    const response = await getItemById("List", itemId, "LeumasAPI", auth?.token)

getRelatedApp - id, endpointKey, token

    const response = await getRelatedApp(itemId, "LeumasAPI", auth?.token)

getItemsByOwner - model, id, endpointKey, token

    const response = await getItemsByOwner("List", itemId, "LeumasAPI", auth?.token)

getVirtualIdsByOwner - id, endpointKey, token

    const response = await getVirtualIdsByOwner(itemId, "LeumasAPI", auth?.token)

deleteItem - model, id, endpointKey, token

    const response = await deleteItem("List", itemId, "LeumasAPI", auth?.token)

togglePublishStatus - model, endpointKey, id, token

    const response = await togglePublishStatus("List", "LeumasAPI", itemId, auth?.token)

filterItems - model, criteria, endpointKey, token

    const response = await filterItems("List", criteria, "LeumasAPI", auth?.token)

searchItems - model, query, endpointKey, token

    const response = await searchItems("List", query, "LeumasAPI", auth?.token)

bulkEditItems - model, items, endpointKey, token

    const DataToSubmit = [
    { ...Item1 },
    { ...Item2 },
]
const response = await bulkEditItems("List", DataToSubmit, "LeumasAPI", auth?.token)

exportItems - model, endpointKey, token

    const response = await exportItems("List", "LeumasAPI", auth?.token)

getItemHistoryLog - model, itemId, endpointKey, token, userId

    const dataToSubmit = {
    userId
}
const response = await getItemHistoryLog("List", itemId, "LeumasAPI", dataToSubmit, auth?.token)

undoLastAction - model, itemId, endpointKey, token

    const response = await undoLastAction("List", itemId, "LeumasAPI", auth?.token)

redoLastAction - model, itemId, endpointKey, token

    const response = await redoLastAction("List", itemId, "LeumasAPI", auth?.token)

setUserPermissions - model, itemId, permissions, endpointKey, token

    const dataToSubmit = {
    permissions
}
const response = await setUserPermissions("List", itemId, dataToSubmit, "LeumasAPI", auth?.token)

sendNotifications - model, notificationData, endpointKey, token

    const dataToSubmit = {
    ...notificationData
}
const response = await sendNotifications("List", dataToSubmit, "LeumasAPI", auth?.token)

toggleFavoriteItem - model, itemId, endpointKey, token

    const response = await toggleFavoriteItem("List", itemId, "LeumasAPI", auth?.token)

processBatchTasks - model, batchTasks, endpointKey, token

    const DataToSubmit = [
    { ...Task1 },
    { ...Task2 },
]
const response = await processBatchTasks("List", DataToSubmit, "LeumasAPI", auth?.token)

suggestRelatedItems - model, itemId, endpointKey, token

    const response = await suggestRelatedItems("List", itemId, "LeumasAPI", auth?.token)

getItemFromDynamicSchema - model, itemId, endpointKey, token

    const response = await getItemFromDynamicSchema("List", itemId, "LeumasAPI", auth?.token)

createItemForDynamicSchema - model, data, endpointKey, token

    const dataToSubmit = {
    ...data
}
const response = await createItemForDynamicSchema("List", dataToSubmit, "LeumasAPI", auth?.token)

editItemFromDynamicSchema - model, itemId, data, endpointKey, token

    const dataToSubmit = {
    ...data
}
const response = await editItemFromDynamicSchema("List", itemId, dataToSubmit, "LeumasAPI", auth?.token)

deleteItemFromDynamicSchema - model, itemId, endpointKey, token

    const response = await deleteItemFromDynamicSchema("List", itemId, "LeumasAPI", auth?.token)

Endpoints

import { endpoints } from "leumas-universal-crud-react"

console.log(endpoints)