@salla.sa/twilight-components 2.11.8 → 2.11.10

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 (36) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/salla-button_37.cjs.entry.js +202 -136
  3. package/dist/cjs/twilight.cjs.js +1 -1
  4. package/dist/collection/components/salla-color-picker/salla-color-picker.js +63 -14
  5. package/dist/collection/components/salla-file-upload/salla-file-upload.js +233 -122
  6. package/dist/collection/components/salla-map/salla-map.js +58 -18
  7. package/dist/collection/components/salla-product-options/interfaces.js +3 -0
  8. package/dist/collection/components/salla-product-options/salla-product-options.js +69 -20
  9. package/dist/collection/components/salla-slider/salla-slider.js +27 -7
  10. package/dist/components/salla-color-picker.js +1 -1173
  11. package/dist/components/salla-color-picker2.js +1192 -0
  12. package/dist/components/salla-file-upload2.js +116 -111
  13. package/dist/components/salla-map.js +1 -716
  14. package/dist/components/salla-map2.js +728 -0
  15. package/dist/components/salla-product-options.js +82 -26
  16. package/dist/components/salla-slider2.js +8 -5
  17. package/dist/esm/loader.js +1 -1
  18. package/dist/esm/salla-button_37.entry.js +202 -136
  19. package/dist/esm/twilight.js +1 -1
  20. package/dist/esm-es5/loader.js +1 -1
  21. package/dist/esm-es5/salla-button_37.entry.js +2 -2
  22. package/dist/esm-es5/twilight.js +1 -1
  23. package/dist/twilight/p-184f8592.system.entry.js +53 -0
  24. package/dist/twilight/p-301c6601.entry.js +36 -0
  25. package/dist/twilight/p-c71ec183.system.js +1 -1
  26. package/dist/twilight/twilight.esm.js +1 -1
  27. package/dist/types/components/salla-color-picker/salla-color-picker.d.ts +9 -0
  28. package/dist/types/components/salla-file-upload/salla-file-upload.d.ts +35 -31
  29. package/dist/types/components/salla-map/salla-map.d.ts +13 -2
  30. package/dist/types/components/salla-product-options/interfaces.d.ts +4 -1
  31. package/dist/types/components/salla-product-options/salla-product-options.d.ts +14 -3
  32. package/dist/types/components/salla-slider/salla-slider.d.ts +8 -2
  33. package/dist/types/components.d.ts +101 -8
  34. package/package.json +4 -4
  35. package/dist/twilight/p-95e1fd9d.system.entry.js +0 -53
  36. package/dist/twilight/p-e31a8a33.entry.js +0 -36
@@ -8,6 +8,7 @@ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  import { Color, Options } from "./components/salla-color-picker/interfaces";
9
9
  import { DateLimit, DateOption, LocaleKey } from "./components/salla-datetime-picker/interfaces";
10
10
  import { FilePondFile } from "./components/salla-file-upload/interfaces";
11
+ import { FilePondErrorDescription } from "filepond/types/index";
11
12
  import { Item } from "./components/salla-loyalty/loyalty-schema";
12
13
  import { Phone } from "./components/salla-tel-input/interfaces";
13
14
  export namespace Components {
@@ -130,10 +131,18 @@ export namespace Components {
130
131
  * @param openImmediately
131
132
  */
132
133
  "movePopUp": (options: Options, openImmediately: boolean) => Promise<void>;
134
+ /**
135
+ * File input name for the native formData
136
+ */
137
+ "name": string;
133
138
  /**
134
139
  * Show/open the picker.
135
140
  */
136
141
  "openPicker": () => Promise<void>;
142
+ /**
143
+ * Set if the color picker input is required or not
144
+ */
145
+ "required": boolean;
137
146
  /**
138
147
  * Set/initialize the picker's color. Color name, RGBA/HSLA/HEX string, or RGBA array.
139
148
  * @param color If true, won't trigger onChange.
@@ -365,6 +374,10 @@ export namespace Components {
365
374
  "wrap": boolean;
366
375
  }
367
376
  interface SallaFileUpload {
377
+ /**
378
+ * Accepted file types
379
+ */
380
+ "accept": string;
368
381
  /**
369
382
  * Enable or disable file browser
370
383
  */
@@ -401,6 +414,10 @@ export namespace Components {
401
414
  * Enable or disable the revert processing button
402
415
  */
403
416
  "allowRevert": boolean;
417
+ /**
418
+ * to prepare the upload url automatically pass this prop, ex to upload attach file in cart Item.
419
+ */
420
+ "cartItemId"?: string;
404
421
  /**
405
422
  * Set to true to enable custom validity messages. FilePond will throw an error when a parent form is submitted and it contains invalid files.
406
423
  */
@@ -445,6 +462,10 @@ export namespace Components {
445
462
  * If current file has id, pass it here, to be passed back in the `removed` event
446
463
  */
447
464
  "fileId"?: number;
465
+ /**
466
+ * The uploaded files as json `[{url:"...", id:123}]` for delete possibility
467
+ */
468
+ "files": string;
448
469
  /**
449
470
  * Set to true to require the file to be successfully reverted before continuing.
450
471
  */
@@ -453,6 +474,10 @@ export namespace Components {
453
474
  * json formData to be injected in the submit request
454
475
  */
455
476
  "formData": string;
477
+ /**
478
+ * The original height of the uploader, will be used to reset the height after the image is removed.
479
+ */
480
+ "height": string;
456
481
  /**
457
482
  * The icon used for process actions
458
483
  */
@@ -517,11 +542,15 @@ export namespace Components {
517
542
  /**
518
543
  * File input name for the native formData
519
544
  */
520
- "name": string;
545
+ "name"?: string;
521
546
  /**
522
547
  * File input name in the request payload
523
548
  */
524
549
  "payloadName": string;
550
+ /**
551
+ * Set the component to be profile image uploader with a preview and a circular shape
552
+ */
553
+ "profileImage": boolean;
525
554
  /**
526
555
  * Sets the required attribute to the output field
527
556
  */
@@ -721,17 +750,21 @@ export namespace Components {
721
750
  */
722
751
  "apiKey": string;
723
752
  /**
724
- * Latitude coordinate, defaults to Mecca 🕋 ❤️
753
+ * Latitude coordinate, defaults to current user location
725
754
  */
726
755
  "lat": number;
727
756
  /**
728
- * Longitude coordinate, defaults to Mecca 🕋 ❤️
757
+ * Longitude coordinate, defaults to current user location
729
758
  */
730
759
  "lng": number;
731
760
  /**
732
761
  * Modal Title
733
762
  */
734
763
  "modalTitle": string;
764
+ /**
765
+ * File input name for the native formData
766
+ */
767
+ "name": string;
735
768
  /**
736
769
  * Open location component
737
770
  */
@@ -740,6 +773,10 @@ export namespace Components {
740
773
  * Disable or enable actions
741
774
  */
742
775
  "readonly": boolean;
776
+ /**
777
+ * Set if the location input is required or not
778
+ */
779
+ "required": boolean;
743
780
  /**
744
781
  * Sets the search bar visibility.
745
782
  */
@@ -1116,6 +1153,10 @@ export namespace Components {
1116
1153
  "width": string;
1117
1154
  }
1118
1155
  interface SallaSlider {
1156
+ /**
1157
+ * Show/hide display all button beside arrows
1158
+ */
1159
+ "arrowsCentered": boolean;
1119
1160
  /**
1120
1161
  * Auto Height slider
1121
1162
  */
@@ -1230,7 +1271,7 @@ export namespace Components {
1230
1271
  /**
1231
1272
  * Set the type of the slider Default: ''
1232
1273
  */
1233
- "type": 'carousel' | 'fullscreen' | 'thumbs' | 'default' | 'hero' | 'testimonials' | 'blog' | '';
1274
+ "type": 'carousel' | 'fullscreen' | 'thumbs' | 'default' | 'hero' | 'testimonials' | 'blog' | 'fullwidth' | '';
1234
1275
  /**
1235
1276
  * You should call it after you add/remove slides manually, or after you hide/show it, or do any custom DOM modifications with Swiper This method also includes subcall of the following methods which you can use separately: *
1236
1277
  */
@@ -1829,6 +1870,10 @@ declare namespace LocalJSX {
1829
1870
  * How to display the selected color in the text field (the text field still supports input in any format).
1830
1871
  */
1831
1872
  "format"?: 'hex' | 'hsl' | 'rgb';
1873
+ /**
1874
+ * File input name for the native formData
1875
+ */
1876
+ "name"?: string;
1832
1877
  /**
1833
1878
  * Event whenever the color changes.
1834
1879
  */
@@ -1845,6 +1890,10 @@ declare namespace LocalJSX {
1845
1890
  * Event emitter when the user clicks "Ok".
1846
1891
  */
1847
1892
  "onSubmitted"?: (event: SallaColorPickerCustomEvent<Color>) => void;
1893
+ /**
1894
+ * Set if the color picker input is required or not
1895
+ */
1896
+ "required"?: boolean;
1848
1897
  /**
1849
1898
  * Whether to have a "Cancel" button which closes the popup.
1850
1899
  */
@@ -2069,6 +2118,10 @@ declare namespace LocalJSX {
2069
2118
  "wrap"?: boolean;
2070
2119
  }
2071
2120
  interface SallaFileUpload {
2121
+ /**
2122
+ * Accepted file types
2123
+ */
2124
+ "accept"?: string;
2072
2125
  /**
2073
2126
  * Enable or disable file browser
2074
2127
  */
@@ -2105,6 +2158,10 @@ declare namespace LocalJSX {
2105
2158
  * Enable or disable the revert processing button
2106
2159
  */
2107
2160
  "allowRevert"?: boolean;
2161
+ /**
2162
+ * to prepare the upload url automatically pass this prop, ex to upload attach file in cart Item.
2163
+ */
2164
+ "cartItemId"?: string;
2108
2165
  /**
2109
2166
  * Set to true to enable custom validity messages. FilePond will throw an error when a parent form is submitted and it contains invalid files.
2110
2167
  */
@@ -2149,6 +2206,10 @@ declare namespace LocalJSX {
2149
2206
  * If current file has id, pass it here, to be passed back in the `removed` event
2150
2207
  */
2151
2208
  "fileId"?: number;
2209
+ /**
2210
+ * The uploaded files as json `[{url:"...", id:123}]` for delete possibility
2211
+ */
2212
+ "files"?: string;
2152
2213
  /**
2153
2214
  * Set to true to require the file to be successfully reverted before continuing.
2154
2215
  */
@@ -2157,6 +2218,10 @@ declare namespace LocalJSX {
2157
2218
  * json formData to be injected in the submit request
2158
2219
  */
2159
2220
  "formData"?: string;
2221
+ /**
2222
+ * The original height of the uploader, will be used to reset the height after the image is removed.
2223
+ */
2224
+ "height"?: string;
2160
2225
  /**
2161
2226
  * The icon used for process actions
2162
2227
  */
@@ -2222,10 +2287,14 @@ declare namespace LocalJSX {
2222
2287
  * File input name for the native formData
2223
2288
  */
2224
2289
  "name"?: string;
2290
+ /**
2291
+ * Event emitted when the file has been added
2292
+ */
2293
+ "onAdded"?: (event: SallaFileUploadCustomEvent<{ error: FilePondErrorDescription | null, file: FilePondFile }>) => void;
2225
2294
  /**
2226
2295
  * Event emitted when the file is about to be removed. Returns boolean value.
2227
2296
  */
2228
- "onRemoved"?: (event: SallaFileUploadCustomEvent<any>) => void;
2297
+ "onRemoved"?: (event: SallaFileUploadCustomEvent<FilePondFile>) => void;
2229
2298
  /**
2230
2299
  * Event emitted when the file has been uploaded and link to the file has been recieved from the server. Returns string value.
2231
2300
  */
@@ -2234,6 +2303,10 @@ declare namespace LocalJSX {
2234
2303
  * File input name in the request payload
2235
2304
  */
2236
2305
  "payloadName"?: string;
2306
+ /**
2307
+ * Set the component to be profile image uploader with a preview and a circular shape
2308
+ */
2309
+ "profileImage"?: boolean;
2237
2310
  /**
2238
2311
  * Sets the required attribute to the output field
2239
2312
  */
@@ -2391,17 +2464,21 @@ declare namespace LocalJSX {
2391
2464
  */
2392
2465
  "apiKey"?: string;
2393
2466
  /**
2394
- * Latitude coordinate, defaults to Mecca 🕋 ❤️
2467
+ * Latitude coordinate, defaults to current user location
2395
2468
  */
2396
2469
  "lat"?: number;
2397
2470
  /**
2398
- * Longitude coordinate, defaults to Mecca 🕋 ❤️
2471
+ * Longitude coordinate, defaults to current user location
2399
2472
  */
2400
2473
  "lng"?: number;
2401
2474
  /**
2402
2475
  * Modal Title
2403
2476
  */
2404
2477
  "modalTitle"?: string;
2478
+ /**
2479
+ * File input name for the native formData
2480
+ */
2481
+ "name"?: string;
2405
2482
  /**
2406
2483
  * Custome DOM event emitter when current location is selected
2407
2484
  */
@@ -2418,6 +2495,10 @@ declare namespace LocalJSX {
2418
2495
  * Disable or enable actions
2419
2496
  */
2420
2497
  "readonly"?: boolean;
2498
+ /**
2499
+ * Set if the location input is required or not
2500
+ */
2501
+ "required"?: boolean;
2421
2502
  /**
2422
2503
  * Sets the search bar visibility.
2423
2504
  */
@@ -2512,6 +2593,10 @@ declare namespace LocalJSX {
2512
2593
  "productId"?: number;
2513
2594
  }
2514
2595
  interface SallaProductOptions {
2596
+ /**
2597
+ * Color Picker option
2598
+ */
2599
+ "onColorPicked"?: (event: SallaProductOptionsCustomEvent<any>) => void;
2515
2600
  /**
2516
2601
  * Colors Option Event
2517
2602
  */
@@ -2532,6 +2617,10 @@ declare namespace LocalJSX {
2532
2617
  * Multi-Select Option
2533
2618
  */
2534
2619
  "onItemsSelected"?: (event: SallaProductOptionsCustomEvent<string[]>) => void;
2620
+ /**
2621
+ * Map (Location Selection) option
2622
+ */
2623
+ "onLocationSelected"?: (event: SallaProductOptionsCustomEvent<any>) => void;
2535
2624
  /**
2536
2625
  * Number Option
2537
2626
  */
@@ -2772,6 +2861,10 @@ declare namespace LocalJSX {
2772
2861
  "width"?: string;
2773
2862
  }
2774
2863
  interface SallaSlider {
2864
+ /**
2865
+ * Show/hide display all button beside arrows
2866
+ */
2867
+ "arrowsCentered"?: boolean;
2775
2868
  /**
2776
2869
  * Auto Height slider
2777
2870
  */
@@ -2893,7 +2986,7 @@ declare namespace LocalJSX {
2893
2986
  /**
2894
2987
  * Set the type of the slider Default: ''
2895
2988
  */
2896
- "type"?: 'carousel' | 'fullscreen' | 'thumbs' | 'default' | 'hero' | 'testimonials' | 'blog' | '';
2989
+ "type"?: 'carousel' | 'fullscreen' | 'thumbs' | 'default' | 'hero' | 'testimonials' | 'blog' | 'fullwidth' | '';
2897
2990
  /**
2898
2991
  * Vertical or Horizontal main slider
2899
2992
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salla.sa/twilight-components",
3
- "version": "2.11.8",
3
+ "version": "2.11.10",
4
4
  "license": "GPL-3.0",
5
5
  "author": "Salla Team <support@salla.dev> (https://salla.dev)",
6
6
  "bugs": {
@@ -76,8 +76,8 @@
76
76
  "typescript": "^4.4.3"
77
77
  },
78
78
  "dependencies": {
79
- "@salla.sa/twilight": "^2.11.8",
80
- "@salla.sa/twilight-tailwind-theme": "^2.11.8",
79
+ "@salla.sa/twilight": "^2.11.10",
80
+ "@salla.sa/twilight-tailwind-theme": "^2.11.10",
81
81
  "animejs": "^3.2.1",
82
82
  "filepond": "^4.30.4",
83
83
  "filepond-plugin-file-poster": "^2.5.1",
@@ -93,5 +93,5 @@
93
93
  "vanilla-lazyload": "^17.8.3",
94
94
  "vanilla-picker": "^2.12.1"
95
95
  },
96
- "gitHead": "3191748fef54e68120e0a1a688220a89cc65be29"
96
+ "gitHead": "14e32e3f4828f40fb4ad072cb32d9ad728c71211"
97
97
  }