Giter VIP home page Giter VIP logo

grist-widget's Introduction

grist-widget

A repository of Grist custom widgets that have no back-end requirements.

Custom hosting

To use this repository for your own Grist instance, you need to copy all the files to your own hosting provider and recreate the manifest.json file used by Grist.

yarn install
yarn run build

To tell your Grist instance to use your repository set the GRIST_WIDGET_LIST_URL environmental variable to URL of the manifest.json file, for example

GRIST_WIDGET_LIST_URL=https:/<your address>/manifest.json npm start

Developing

To run a local widget server in a watch mode, with automatic reload use:

yarn install
yarn run dev

This will start local development server that will host contents of this repository, recreate the manifest.json file on every change and replace grist-plugin-api.js URL to one provided by your own Grist instance, assuming it is available at http://localhost:8484, to override the port use:

GRIST_PORT=<your port> yarn run dev

Next start Grist with an URL pointing to a local widget manifest file:

GRIST_WIDGET_LIST_URL=http://localhost:8585/manifest.json npm start

grist-widget's People

Contributors

alexmojaki avatar berhalak avatar chiuta avatar cpind avatar dsagal avatar fprijate avatar georgegevoian avatar guillett avatar jakubserafin avatar jperon avatar jvorob avatar matrej avatar metala avatar paulfitz avatar peterdavehello avatar samkhal avatar santossi avatar weblate avatar wunter8 avatar xabirequejo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

grist-widget's Issues

Adjust the Width of Columns on PDF view

Hello,

I am trying to adjust the column width on PDF view. It changed within Grist, but not on the PDF.

Can you please help me.

.DateWidth{width:12%; -webkit-print-color-adjust: exact !important; color-adjust: exact !important;} .BilledWidth{width:17%; -webkit-print-color-adjust: exact !important; color-adjust: exact !important;}

<tr> <th class="DateWidth">Date</th> <th>Service</th> <th>Description</th> <th class="BilledWidth">Billed By</th> <th class="money">Rate</th> <th class="number">Qty</th> <th class="money">Amount</th> </tr>

image

image

Mixed Content Error when serving widgets over HTTPS

When using custom widgets with HTTPS served custom grist instance it becomes visible that there are http requests send which cause the iframe of the widget to stay white and chrome console gives following error:

Mixed Content: The page at 'https://<mygristinstance>/XXXXXXXXXX/Untitled-document2' was loaded over HTTPS, 
but requested an insecure frame 'http://<mygristinstance>/widgets/markdown/?access=none&readonly=false'. 
This request has been blocked; the content must be served over HTTPS.

I noticed that behavior for multiple widgets.

I tried to track it down, but calling https://<mygristinstance>/widgets/markdown shows that the widget itself is served via HTTPS.

  • Debugged grist-core around WidgetFrame.ts with chrome and source map and searched for http in variables, found nothing
  • Searching for http:// in this repo and checking paths did not help

When running grist only on HTTP the markdown editor from the same URL works fine.

It seems to make no difference whether the widget is used via custom url or via configured widget repository with GRIST_WIDGET_LIST_URL.

Custom Invoice CSS not showing on Print

Hello,

This might be a stupid question, so sorry in advance.

I have added my own css to customize the look, however it is not showing up when I hit the Print button.

Can you please tell, do I need to add something to the invoice.js file or do you know why the css is not carrying forward?
image

The first part should have green and the button has no styling.
image
image

My CSS
image

Thank you

Please HELP! Add Another section like Note

Hello,

I am trying to add another section called Trust Balance. I copied the Note example. However now the invoice is not showing up.

Here is the code I added.
image

Index.html
image

invoice.js
function addDemo(row) { if (!row.Issued && !row.Due) { for (const key of ['Number', 'Issued', 'Due', 'Matter']) { if (!row[key]) { row[key] = key; } } for (const key of ['Subtotal', 'LateFee', 'Taxes', 'Total']) { if (!(key in row)) { row[key] = key; } } if (!('Note' in row)) { row.Note = '(Anything in a Note column goes here)'; } } if (!('TrustBal' in row)) { row.TrustBal = '(Trust Balance goes here)'; } }
image

How to calculate properly - Custom Invoice

Hello,

I recently added your updated code for the invoice.js. You provided this:
row.Total = row.Subtotal + (row.Taxes || 0) - (row.Deduction || 0);

However, I need for this to multiply a fee charge. Here is the code I have, but it is not appearing correctly on the invoice.
addDemo(row); if (!row.Subtotal && !row.Total && row.Items && Array.isArray(row.Items)) { try { row.Subtotal = row.Items.reduce((a, b) => a + b.Rate * b.Qty, 0); row.Total = row.Subtotal; row.Total = row.Subtotal * (row.Taxes || 0) - (row.Deduction || 0); } catch (e) { console.error(e); } }
image

Can you please advise me how to calculate the row.Taxes (Fees) and then subtract the row.Deduction (Trust Fund).

Thank you

Adding Merge Tags to URL - Make Payment

Hello,

I have no idea if this is possible, but really hoping so.

Within the custom invoice (index.html), I created a pay now button. Within the URL it looks like this
<div class="footer"> <p class="PayInfo">Please click on the button below to make your payment today.</p> <div class="PayBTN"><a href="https://uslawpros.com/client-payments/?invoice={{ invoice.Number }}&client={{ business }}"><button>Pay Now</button></a></div> <div class="thanks"> Thank you! </div> </div>
image

I call these merge tags, and it pulls in the content. However, it is not pulling in the content.
This is the results
image

Is there a way to pull in the data into this URL, so when the client clicks on the button, it automatically fills in the information for them?

Thank you

P.S. I just noticed the Invoice number is missing.

Present the widgets from the readme

This reposity seems to be a great resource for Grist!

However it's not so obvious to be aware of all the work done here and which component does what.

Some proposals could be either:

  • having a list of the widgets with a tiny description
  • present a screenshot of the widget within a context

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.