@sankhyalabs/sankhyablocks 1.1.25 → 1.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/dist/cjs/{AssetsUtils-7e3c38f9.js → AssetsUtils-bd004f63.js} +1 -1
  2. package/dist/cjs/_commonjsHelpers-537d719a.js +20 -0
  3. package/dist/cjs/ez-action-chip.cjs.entry.js +1 -1
  4. package/dist/cjs/ez-application.cjs.entry.js +1 -1
  5. package/dist/cjs/ez-button_4.cjs.entry.js +1 -1
  6. package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
  7. package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
  8. package/dist/cjs/ez-combo-box.cjs.entry.js +1 -1
  9. package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
  10. package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
  11. package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
  12. package/dist/cjs/ez-form.cjs.entry.js +325 -3
  13. package/dist/cjs/ez-grid.cjs.entry.js +109843 -5
  14. package/dist/cjs/ez-icon.cjs.entry.js +1 -1
  15. package/dist/cjs/ez-label-chip.cjs.entry.js +1 -1
  16. package/dist/cjs/ez-modal_2.cjs.entry.js +2 -2
  17. package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
  18. package/dist/cjs/ez-popover.cjs.entry.js +1 -1
  19. package/dist/cjs/ez-popup.cjs.entry.js +1 -1
  20. package/dist/cjs/ez-search.cjs.entry.js +1 -1
  21. package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
  22. package/dist/cjs/ez-text-area.cjs.entry.js +1 -1
  23. package/dist/cjs/ez-text-input.cjs.entry.js +1 -1
  24. package/dist/cjs/ez-time-input.cjs.entry.js +2 -2
  25. package/dist/cjs/ez-toast.cjs.entry.js +1 -1
  26. package/dist/cjs/ez-upload.cjs.entry.js +1 -1
  27. package/dist/cjs/{index-682c98b2.js → index-6ac5268e.js} +7 -9
  28. package/dist/cjs/loader.cjs.js +2 -2
  29. package/dist/cjs/sankhyablocks.cjs.js +2 -2
  30. package/dist/cjs/snk-application.cjs.entry.js +47 -345
  31. package/dist/cjs/test-du.cjs.entry.js +1 -1
  32. package/dist/collection/collection-manifest.json +1 -1
  33. package/dist/components/_commonjsHelpers.js +17 -0
  34. package/dist/components/ez-form2.js +323 -1
  35. package/dist/components/ez-grid.js +109844 -6
  36. package/dist/components/snk-application.js +8 -306
  37. package/dist/esm/{AssetsUtils-6e6624dc.js → AssetsUtils-98074c9c.js} +1 -1
  38. package/dist/esm/_commonjsHelpers-9943807e.js +17 -0
  39. package/dist/esm/ez-action-chip.entry.js +1 -1
  40. package/dist/esm/ez-application.entry.js +1 -1
  41. package/dist/esm/ez-button_4.entry.js +1 -1
  42. package/dist/esm/ez-calendar.entry.js +1 -1
  43. package/dist/esm/ez-collapsible-box.entry.js +1 -1
  44. package/dist/esm/ez-combo-box.entry.js +1 -1
  45. package/dist/esm/ez-date-input.entry.js +1 -1
  46. package/dist/esm/ez-date-time-input.entry.js +1 -1
  47. package/dist/esm/ez-dialog.entry.js +1 -1
  48. package/dist/esm/ez-form.entry.js +324 -2
  49. package/dist/esm/ez-grid.entry.js +109843 -5
  50. package/dist/esm/ez-icon.entry.js +1 -1
  51. package/dist/esm/ez-label-chip.entry.js +1 -1
  52. package/dist/esm/ez-modal_2.entry.js +2 -2
  53. package/dist/esm/ez-number-input.entry.js +1 -1
  54. package/dist/esm/ez-popover.entry.js +1 -1
  55. package/dist/esm/ez-popup.entry.js +1 -1
  56. package/dist/esm/ez-search.entry.js +1 -1
  57. package/dist/esm/ez-tabselector.entry.js +1 -1
  58. package/dist/esm/ez-text-area.entry.js +1 -1
  59. package/dist/esm/ez-text-input.entry.js +1 -1
  60. package/dist/esm/ez-time-input.entry.js +2 -2
  61. package/dist/esm/ez-toast.entry.js +1 -1
  62. package/dist/esm/ez-upload.entry.js +1 -1
  63. package/dist/esm/{index-35088a3f.js → index-df166135.js} +7 -9
  64. package/dist/esm/loader.js +2 -2
  65. package/dist/esm/sankhyablocks.js +2 -2
  66. package/dist/esm/snk-application.entry.js +9 -307
  67. package/dist/esm/test-du.entry.js +1 -1
  68. package/dist/sankhyablocks/{p-9750632b.entry.js → p-08e1cded.entry.js} +1 -1
  69. package/dist/sankhyablocks/p-0a77ac95.entry.js +57 -0
  70. package/dist/sankhyablocks/p-112455b1.js +1 -0
  71. package/dist/sankhyablocks/p-126c4aaa.entry.js +1 -0
  72. package/dist/sankhyablocks/{p-f6db07fb.entry.js → p-1421b89a.entry.js} +1 -1
  73. package/dist/sankhyablocks/{p-8b543003.entry.js → p-1beadcaf.entry.js} +1 -1
  74. package/dist/sankhyablocks/{p-89a1100f.entry.js → p-1c423f5d.entry.js} +1 -1
  75. package/dist/sankhyablocks/{p-0183d259.entry.js → p-28a0dbf0.entry.js} +1 -1
  76. package/dist/sankhyablocks/p-4763d5c2.js +1 -0
  77. package/dist/sankhyablocks/{p-ba64cc41.entry.js → p-4c66200a.entry.js} +1 -1
  78. package/dist/sankhyablocks/{p-ac8842e5.entry.js → p-5dc772be.entry.js} +1 -1
  79. package/dist/sankhyablocks/p-5ff3e300.entry.js +1 -0
  80. package/dist/sankhyablocks/{p-710bfffe.entry.js → p-7122cec4.entry.js} +1 -1
  81. package/dist/sankhyablocks/{p-5f9af495.entry.js → p-9b33a005.entry.js} +1 -1
  82. package/dist/sankhyablocks/{p-01f23a70.entry.js → p-9e22ec87.entry.js} +1 -1
  83. package/dist/sankhyablocks/{p-105724a3.entry.js → p-9f7239df.entry.js} +1 -1
  84. package/dist/sankhyablocks/p-9f7e6e48.js +1 -0
  85. package/dist/sankhyablocks/{p-ef04b633.entry.js → p-a47e0537.entry.js} +1 -1
  86. package/dist/sankhyablocks/{p-c1ede043.entry.js → p-a9aba60a.entry.js} +1 -1
  87. package/dist/sankhyablocks/{p-3f6aa9a7.entry.js → p-afda7940.entry.js} +1 -1
  88. package/dist/sankhyablocks/{p-07c32f68.entry.js → p-b3a83eaf.entry.js} +1 -1
  89. package/dist/sankhyablocks/{p-e5355a29.entry.js → p-b96a8d40.entry.js} +1 -1
  90. package/dist/sankhyablocks/{p-70ad6c16.entry.js → p-c61c0e40.entry.js} +1 -1
  91. package/dist/sankhyablocks/{p-35364a97.entry.js → p-ca29d028.entry.js} +1 -1
  92. package/dist/sankhyablocks/{p-fcd9bd92.entry.js → p-cd17abb1.entry.js} +1 -1
  93. package/dist/sankhyablocks/p-d3a5366d.entry.js +369 -0
  94. package/dist/sankhyablocks/{p-a96272f7.entry.js → p-d5703a41.entry.js} +1 -1
  95. package/dist/sankhyablocks/{p-2ac02d48.entry.js → p-e5f77a59.entry.js} +1 -1
  96. package/dist/sankhyablocks/{p-d90ebb85.entry.js → p-e9e94d51.entry.js} +1 -1
  97. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  98. package/dist/types/components.d.ts +2 -6
  99. package/package.json +10 -7
  100. package/dist/sankhyablocks/p-0f90499d.entry.js +0 -1
  101. package/dist/sankhyablocks/p-60967cf0.js +0 -1
  102. package/dist/sankhyablocks/p-6ce33b60.entry.js +0 -57
  103. package/dist/sankhyablocks/p-735440c1.entry.js +0 -1
  104. package/dist/sankhyablocks/p-85a9446b.js +0 -2
  105. package/dist/sankhyablocks/p-e17dfaae.entry.js +0 -1
@@ -1,6 +1,5 @@
1
- import { h, r as registerInstance, f as forceUpdate, H as Host, g as getElement } from './index-35088a3f.js';
1
+ import { h, r as registerInstance, f as forceUpdate, H as Host, g as getElement } from './index-df166135.js';
2
2
  import { UserInterface, ApplicationContext, Action, DataUnitAction, DataUnit } from '@sankhyalabs/core';
3
- import { createStore } from 'redux';
4
3
  import { A as ApplicationUtils } from './ApplicationUtils-e0b6d857.js';
5
4
 
6
5
  const buildTextArea = ({ name, label, readOnly }) => {
@@ -233,6 +232,329 @@ const buildFromConfig = (fields, dataUnit) => {
233
232
  return metadata;
234
233
  };
235
234
 
235
+ /**
236
+ * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js
237
+ *
238
+ * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes
239
+ * during build.
240
+ * @param {number} code
241
+ */
242
+ function formatProdErrorMessage(code) {
243
+ return "Minified Redux error #" + code + "; visit https://redux.js.org/Errors?code=" + code + " for the full message or " + 'use the non-minified dev environment for full errors. ';
244
+ }
245
+
246
+ // Inlined version of the `symbol-observable` polyfill
247
+ var $$observable = (function () {
248
+ return typeof Symbol === 'function' && Symbol.observable || '@@observable';
249
+ })();
250
+
251
+ /**
252
+ * These are private action types reserved by Redux.
253
+ * For any unknown actions, you must return the current state.
254
+ * If the current state is undefined, you must return the initial state.
255
+ * Do not reference these action types directly in your code.
256
+ */
257
+ var randomString = function randomString() {
258
+ return Math.random().toString(36).substring(7).split('').join('.');
259
+ };
260
+
261
+ var ActionTypes = {
262
+ INIT: "@@redux/INIT" + randomString(),
263
+ REPLACE: "@@redux/REPLACE" + randomString(),
264
+ PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
265
+ return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
266
+ }
267
+ };
268
+
269
+ /**
270
+ * @param {any} obj The object to inspect.
271
+ * @returns {boolean} True if the argument appears to be a plain object.
272
+ */
273
+ function isPlainObject(obj) {
274
+ if (typeof obj !== 'object' || obj === null) return false;
275
+ var proto = obj;
276
+
277
+ while (Object.getPrototypeOf(proto) !== null) {
278
+ proto = Object.getPrototypeOf(proto);
279
+ }
280
+
281
+ return Object.getPrototypeOf(obj) === proto;
282
+ }
283
+
284
+ /**
285
+ * @deprecated
286
+ *
287
+ * **We recommend using the `configureStore` method
288
+ * of the `@reduxjs/toolkit` package**, which replaces `createStore`.
289
+ *
290
+ * Redux Toolkit is our recommended approach for writing Redux logic today,
291
+ * including store setup, reducers, data fetching, and more.
292
+ *
293
+ * **For more details, please read this Redux docs page:**
294
+ * **https://redux.js.org/introduction/why-rtk-is-redux-today**
295
+ *
296
+ * `configureStore` from Redux Toolkit is an improved version of `createStore` that
297
+ * simplifies setup and helps avoid common bugs.
298
+ *
299
+ * You should not be using the `redux` core package by itself today, except for learning purposes.
300
+ * The `createStore` method from the core `redux` package will not be removed, but we encourage
301
+ * all users to migrate to using Redux Toolkit for all Redux code.
302
+ *
303
+ * If you want to use `createStore` without this visual deprecation warning, use
304
+ * the `legacy_createStore` import instead:
305
+ *
306
+ * `import { legacy_createStore as createStore} from 'redux'`
307
+ *
308
+ */
309
+
310
+ function createStore(reducer, preloadedState, enhancer) {
311
+ var _ref2;
312
+
313
+ if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {
314
+ throw new Error(formatProdErrorMessage(0) );
315
+ }
316
+
317
+ if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
318
+ enhancer = preloadedState;
319
+ preloadedState = undefined;
320
+ }
321
+
322
+ if (typeof enhancer !== 'undefined') {
323
+ if (typeof enhancer !== 'function') {
324
+ throw new Error(formatProdErrorMessage(1) );
325
+ }
326
+
327
+ return enhancer(createStore)(reducer, preloadedState);
328
+ }
329
+
330
+ if (typeof reducer !== 'function') {
331
+ throw new Error(formatProdErrorMessage(2) );
332
+ }
333
+
334
+ var currentReducer = reducer;
335
+ var currentState = preloadedState;
336
+ var currentListeners = [];
337
+ var nextListeners = currentListeners;
338
+ var isDispatching = false;
339
+ /**
340
+ * This makes a shallow copy of currentListeners so we can use
341
+ * nextListeners as a temporary list while dispatching.
342
+ *
343
+ * This prevents any bugs around consumers calling
344
+ * subscribe/unsubscribe in the middle of a dispatch.
345
+ */
346
+
347
+ function ensureCanMutateNextListeners() {
348
+ if (nextListeners === currentListeners) {
349
+ nextListeners = currentListeners.slice();
350
+ }
351
+ }
352
+ /**
353
+ * Reads the state tree managed by the store.
354
+ *
355
+ * @returns {any} The current state tree of your application.
356
+ */
357
+
358
+
359
+ function getState() {
360
+ if (isDispatching) {
361
+ throw new Error(formatProdErrorMessage(3) );
362
+ }
363
+
364
+ return currentState;
365
+ }
366
+ /**
367
+ * Adds a change listener. It will be called any time an action is dispatched,
368
+ * and some part of the state tree may potentially have changed. You may then
369
+ * call `getState()` to read the current state tree inside the callback.
370
+ *
371
+ * You may call `dispatch()` from a change listener, with the following
372
+ * caveats:
373
+ *
374
+ * 1. The subscriptions are snapshotted just before every `dispatch()` call.
375
+ * If you subscribe or unsubscribe while the listeners are being invoked, this
376
+ * will not have any effect on the `dispatch()` that is currently in progress.
377
+ * However, the next `dispatch()` call, whether nested or not, will use a more
378
+ * recent snapshot of the subscription list.
379
+ *
380
+ * 2. The listener should not expect to see all state changes, as the state
381
+ * might have been updated multiple times during a nested `dispatch()` before
382
+ * the listener is called. It is, however, guaranteed that all subscribers
383
+ * registered before the `dispatch()` started will be called with the latest
384
+ * state by the time it exits.
385
+ *
386
+ * @param {Function} listener A callback to be invoked on every dispatch.
387
+ * @returns {Function} A function to remove this change listener.
388
+ */
389
+
390
+
391
+ function subscribe(listener) {
392
+ if (typeof listener !== 'function') {
393
+ throw new Error(formatProdErrorMessage(4) );
394
+ }
395
+
396
+ if (isDispatching) {
397
+ throw new Error(formatProdErrorMessage(5) );
398
+ }
399
+
400
+ var isSubscribed = true;
401
+ ensureCanMutateNextListeners();
402
+ nextListeners.push(listener);
403
+ return function unsubscribe() {
404
+ if (!isSubscribed) {
405
+ return;
406
+ }
407
+
408
+ if (isDispatching) {
409
+ throw new Error(formatProdErrorMessage(6) );
410
+ }
411
+
412
+ isSubscribed = false;
413
+ ensureCanMutateNextListeners();
414
+ var index = nextListeners.indexOf(listener);
415
+ nextListeners.splice(index, 1);
416
+ currentListeners = null;
417
+ };
418
+ }
419
+ /**
420
+ * Dispatches an action. It is the only way to trigger a state change.
421
+ *
422
+ * The `reducer` function, used to create the store, will be called with the
423
+ * current state tree and the given `action`. Its return value will
424
+ * be considered the **next** state of the tree, and the change listeners
425
+ * will be notified.
426
+ *
427
+ * The base implementation only supports plain object actions. If you want to
428
+ * dispatch a Promise, an Observable, a thunk, or something else, you need to
429
+ * wrap your store creating function into the corresponding middleware. For
430
+ * example, see the documentation for the `redux-thunk` package. Even the
431
+ * middleware will eventually dispatch plain object actions using this method.
432
+ *
433
+ * @param {Object} action A plain object representing “what changed”. It is
434
+ * a good idea to keep actions serializable so you can record and replay user
435
+ * sessions, or use the time travelling `redux-devtools`. An action must have
436
+ * a `type` property which may not be `undefined`. It is a good idea to use
437
+ * string constants for action types.
438
+ *
439
+ * @returns {Object} For convenience, the same action object you dispatched.
440
+ *
441
+ * Note that, if you use a custom middleware, it may wrap `dispatch()` to
442
+ * return something else (for example, a Promise you can await).
443
+ */
444
+
445
+
446
+ function dispatch(action) {
447
+ if (!isPlainObject(action)) {
448
+ throw new Error(formatProdErrorMessage(7) );
449
+ }
450
+
451
+ if (typeof action.type === 'undefined') {
452
+ throw new Error(formatProdErrorMessage(8) );
453
+ }
454
+
455
+ if (isDispatching) {
456
+ throw new Error(formatProdErrorMessage(9) );
457
+ }
458
+
459
+ try {
460
+ isDispatching = true;
461
+ currentState = currentReducer(currentState, action);
462
+ } finally {
463
+ isDispatching = false;
464
+ }
465
+
466
+ var listeners = currentListeners = nextListeners;
467
+
468
+ for (var i = 0; i < listeners.length; i++) {
469
+ var listener = listeners[i];
470
+ listener();
471
+ }
472
+
473
+ return action;
474
+ }
475
+ /**
476
+ * Replaces the reducer currently used by the store to calculate the state.
477
+ *
478
+ * You might need this if your app implements code splitting and you want to
479
+ * load some of the reducers dynamically. You might also need this if you
480
+ * implement a hot reloading mechanism for Redux.
481
+ *
482
+ * @param {Function} nextReducer The reducer for the store to use instead.
483
+ * @returns {void}
484
+ */
485
+
486
+
487
+ function replaceReducer(nextReducer) {
488
+ if (typeof nextReducer !== 'function') {
489
+ throw new Error(formatProdErrorMessage(10) );
490
+ }
491
+
492
+ currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.
493
+ // Any reducers that existed in both the new and old rootReducer
494
+ // will receive the previous state. This effectively populates
495
+ // the new state tree with any relevant data from the old one.
496
+
497
+ dispatch({
498
+ type: ActionTypes.REPLACE
499
+ });
500
+ }
501
+ /**
502
+ * Interoperability point for observable/reactive libraries.
503
+ * @returns {observable} A minimal observable of state changes.
504
+ * For more information, see the observable proposal:
505
+ * https://github.com/tc39/proposal-observable
506
+ */
507
+
508
+
509
+ function observable() {
510
+ var _ref;
511
+
512
+ var outerSubscribe = subscribe;
513
+ return _ref = {
514
+ /**
515
+ * The minimal observable subscription method.
516
+ * @param {Object} observer Any object that can be used as an observer.
517
+ * The observer object should have a `next` method.
518
+ * @returns {subscription} An object with an `unsubscribe` method that can
519
+ * be used to unsubscribe the observable from the store, and prevent further
520
+ * emission of values from the observable.
521
+ */
522
+ subscribe: function subscribe(observer) {
523
+ if (typeof observer !== 'object' || observer === null) {
524
+ throw new Error(formatProdErrorMessage(11) );
525
+ }
526
+
527
+ function observeState() {
528
+ if (observer.next) {
529
+ observer.next(getState());
530
+ }
531
+ }
532
+
533
+ observeState();
534
+ var unsubscribe = outerSubscribe(observeState);
535
+ return {
536
+ unsubscribe: unsubscribe
537
+ };
538
+ }
539
+ }, _ref[$$observable] = function () {
540
+ return this;
541
+ }, _ref;
542
+ } // When a store is created, an "INIT" action is dispatched so that every
543
+ // reducer returns their initial state. This effectively populates
544
+ // the initial state tree.
545
+
546
+
547
+ dispatch({
548
+ type: ActionTypes.INIT
549
+ });
550
+ return _ref2 = {
551
+ dispatch: dispatch,
552
+ subscribe: subscribe,
553
+ getState: getState,
554
+ replaceReducer: replaceReducer
555
+ }, _ref2[$$observable] = observable, _ref2;
556
+ }
557
+
236
558
  const inicialState = {};
237
559
  /////////////////////////////// REDUCERS ///////////////////////////////
238
560
  function formReducer(state = inicialState, action) {