@react-pakistan/util-functions 1.25.90 → 2.0.2
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.
- package/README.md +74 -315
- package/constants/api-methods.d.ts +3 -1
- package/constants/api-methods.js +1 -15
- package/constants/cache-time.d.ts +7 -5
- package/constants/cache-time.js +1 -8
- package/constants/countries-timezones.d.ts +4 -2
- package/constants/countries-timezones.js +1 -1411
- package/constants/currencies.d.ts +4 -2
- package/constants/currencies.js +1 -1076
- package/constants/dial-codes.d.ts +5 -3
- package/constants/dial-codes.js +1 -1216
- package/constants/layout-direction.d.ts +3 -1
- package/constants/layout-direction.js +1 -8
- package/constants/react-pakistan-meta.d.ts +4 -2
- package/constants/react-pakistan-meta.js +1 -35
- package/constants/react-pakistan.d.ts +5 -3
- package/constants/react-pakistan.js +12 -104
- package/constants/select-value-delimiter.d.ts +3 -1
- package/constants/select-value-delimiter.js +1 -13
- package/constants/social-media-colors.d.ts +3 -1
- package/constants/social-media-colors.js +1 -42
- package/constants/social-media-sizes.d.ts +6 -4
- package/constants/social-media-sizes.js +1 -327
- package/constants/user-roles.d.ts +3 -1
- package/constants/user-roles.js +1 -9
- package/edu-pilot-pro/types/academics.d.ts +2 -266
- package/edu-pilot-pro/types/academics.js +1 -9
- package/edu-pilot-pro/types/admission.d.ts +803 -10
- package/edu-pilot-pro/types/admission.js +1 -7
- package/edu-pilot-pro/types/communication.d.ts +2 -165
- package/edu-pilot-pro/types/communication.js +1 -8
- package/edu-pilot-pro/types/enums.d.ts +30 -28
- package/edu-pilot-pro/types/enums.js +1 -445
- package/edu-pilot-pro/types/finance.d.ts +2 -128
- package/edu-pilot-pro/types/finance.js +1 -8
- package/edu-pilot-pro/types/index.d.ts +2 -12
- package/edu-pilot-pro/types/index.js +1 -28
- package/edu-pilot-pro/types/user-management.d.ts +2 -236
- package/edu-pilot-pro/types/user-management.js +1 -8
- package/factory/generic-component-factory.d.ts +12 -9
- package/factory/generic-component-factory.js +1 -131
- package/factory/generic-module-factory.d.ts +14 -10
- package/factory/generic-module-factory.js +1 -190
- package/general/basic-get.d.ts +8 -1
- package/general/basic-get.js +1 -83
- package/general/basic-post.d.ts +8 -1
- package/general/basic-post.js +1 -70
- package/general/calculate-pages.d.ts +9 -1
- package/general/calculate-pages.js +1 -7
- package/general/camel-to-sentence-case.d.ts +3 -1
- package/general/camel-to-sentence-case.js +1 -20
- package/general/check-even-odd-length.d.ts +3 -1
- package/general/check-even-odd-length.js +1 -17
- package/general/clear-cache.d.ts +7 -2
- package/general/clear-cache.js +1 -12
- package/general/cnic-formatter.d.ts +16 -3
- package/general/cnic-formatter.js +1 -53
- package/general/convert-url-to-base64.d.ts +8 -6
- package/general/convert-url-to-base64.js +1 -231
- package/general/countries.d.ts +5 -3
- package/general/countries.js +1 -514
- package/general/create-date.d.ts +3 -1
- package/general/create-date.js +1 -22
- package/general/crypto.d.ts +4 -2
- package/general/crypto.js +1 -45
- package/general/currencies.d.ts +2 -0
- package/general/currencies.js +0 -1077
- package/general/delete-image-from-private-supabase.d.ts +10 -2
- package/general/delete-image-from-private-supabase.js +1 -66
- package/general/delete-image-from-public-supabase.d.ts +10 -2
- package/general/delete-image-from-public-supabase.js +1 -66
- package/general/download-from-url.d.ts +8 -1
- package/general/download-from-url.js +1 -82
- package/general/dynamic-page-limit.d.ts +9 -3
- package/general/dynamic-page-limit.js +1 -7
- package/general/enum-to-text.d.ts +8 -1
- package/general/enum-to-text.js +1 -11
- package/general/fetch-data.d.ts +16 -4
- package/general/fetch-data.js +1 -95
- package/general/fetch-supabase-image.d.ts +11 -2
- package/general/fetch-supabase-image.js +1 -67
- package/general/fetch-supabase-private-assets.d.ts +11 -2
- package/general/fetch-supabase-private-assets.js +1 -69
- package/general/format-date.d.ts +10 -2
- package/general/format-date.js +1 -49
- package/general/format-number.d.ts +12 -2
- package/general/format-number.js +1 -35
- package/general/format-phone-display.d.ts +9 -1
- package/general/format-phone-display.js +1 -32
- package/general/format-phone.d.ts +10 -2
- package/general/format-phone.js +1 -20
- package/general/format-pricing.d.ts +8 -1
- package/general/format-pricing.js +1 -23
- package/general/format-secs.d.ts +8 -1
- package/general/format-secs.js +1 -21
- package/general/format-time.d.ts +8 -2
- package/general/format-time.js +1 -38
- package/general/format-value.d.ts +8 -1
- package/general/format-value.js +1 -7
- package/general/full-month-range.d.ts +3 -2
- package/general/full-month-range.js +1 -24
- package/general/full-year-range.d.ts +3 -2
- package/general/full-year-range.js +1 -20
- package/general/generate-article-schema.d.ts +3 -2
- package/general/generate-article-schema.js +1 -100
- package/general/generate-blog-schema.d.ts +3 -2
- package/general/generate-blog-schema.js +1 -32
- package/general/generate-book-schema.d.ts +3 -2
- package/general/generate-book-schema.js +1 -109
- package/general/generate-breadcrumb-schema.d.ts +3 -2
- package/general/generate-breadcrumb-schema.js +1 -34
- package/general/generate-carousel-schema.d.ts +3 -2
- package/general/generate-carousel-schema.js +1 -172
- package/general/generate-course-schema.d.ts +3 -2
- package/general/generate-course-schema.js +1 -124
- package/general/generate-dataset-schema.d.ts +3 -2
- package/general/generate-dataset-schema.js +1 -156
- package/general/generate-discussion-forum-schema.d.ts +3 -2
- package/general/generate-discussion-forum-schema.js +1 -67
- package/general/generate-education-schema.d.ts +3 -2
- package/general/generate-education-schema.js +1 -137
- package/general/generate-employer-aggregate-rating-schema.d.ts +3 -2
- package/general/generate-employer-aggregate-rating-schema.js +1 -64
- package/general/generate-event-schema.d.ts +3 -2
- package/general/generate-event-schema.js +1 -214
- package/general/generate-faq-schema.d.ts +3 -2
- package/general/generate-faq-schema.js +1 -43
- package/general/generate-grid.d.ts +3 -2
- package/general/generate-grid.js +1 -55
- package/general/generate-image-metadata-schema.d.ts +3 -2
- package/general/generate-image-metadata-schema.js +1 -73
- package/general/generate-job-posting-schema.d.ts +3 -2
- package/general/generate-job-posting-schema.js +1 -120
- package/general/generate-local-business-schema.d.ts +3 -2
- package/general/generate-local-business-schema.js +1 -75
- package/general/generate-math-solver-schema.d.ts +3 -2
- package/general/generate-math-solver-schema.js +1 -83
- package/general/generate-movie-carousel-schema.d.ts +3 -2
- package/general/generate-movie-carousel-schema.js +1 -160
- package/general/generate-organization-schema.d.ts +3 -2
- package/general/generate-organization-schema.js +1 -39
- package/general/generate-profile-page-schema.d.ts +3 -2
- package/general/generate-profile-page-schema.js +1 -82
- package/general/generate-qa-page-schema.d.ts +3 -2
- package/general/generate-qa-page-schema.js +1 -67
- package/general/generate-recipe-schema.d.ts +3 -2
- package/general/generate-recipe-schema.js +1 -104
- package/general/generate-ref.d.ts +8 -2
- package/general/generate-ref.js +1 -12
- package/general/generate-review-snippet-schema.d.ts +3 -2
- package/general/generate-review-snippet-schema.js +1 -137
- package/general/generate-shopping-loyalty-program-schema.d.ts +3 -2
- package/general/generate-shopping-loyalty-program-schema.js +1 -59
- package/general/generate-shopping-merchant-listing-schema.d.ts +3 -2
- package/general/generate-shopping-merchant-listing-schema.js +1 -153
- package/general/generate-shopping-merchant-return-policy-schema.d.ts +3 -2
- package/general/generate-shopping-merchant-return-policy-schema.js +1 -68
- package/general/generate-shopping-merchant-shipping-policy-schema.d.ts +3 -2
- package/general/generate-shopping-merchant-shipping-policy-schema.js +1 -74
- package/general/generate-shopping-overview-schema.d.ts +3 -2
- package/general/generate-shopping-overview-schema.js +1 -157
- package/general/generate-shopping-product-snippet-schema.d.ts +3 -2
- package/general/generate-shopping-product-snippet-schema.js +1 -167
- package/general/generate-shopping-variants-schema.d.ts +3 -2
- package/general/generate-shopping-variants-schema.js +1 -143
- package/general/generate-software-app-schema.d.ts +3 -2
- package/general/generate-software-app-schema.js +1 -143
- package/general/generate-speakable-schema.d.ts +3 -2
- package/general/generate-speakable-schema.js +1 -139
- package/general/generate-subscription-schema.d.ts +3 -2
- package/general/generate-subscription-schema.js +1 -133
- package/general/generate-vacation-rental-schema.d.ts +3 -2
- package/general/generate-vacation-rental-schema.js +1 -135
- package/general/generate-video-schema.d.ts +3 -2
- package/general/generate-video-schema.js +1 -163
- package/general/generic-cache.d.ts +17 -15
- package/general/generic-cache.js +1 -659
- package/general/get-available-page-limit.d.ts +8 -2
- package/general/get-available-page-limit.js +1 -31
- package/general/get-calendar-current-month.d.ts +11 -3
- package/general/get-calendar-current-month.js +1 -31
- package/general/get-calendar-dates.d.ts +11 -3
- package/general/get-calendar-dates.js +1 -42
- package/general/get-calendar-next-month.d.ts +12 -3
- package/general/get-calendar-next-month.js +1 -32
- package/general/get-calendar-previous-month.d.ts +12 -3
- package/general/get-calendar-previous-month.js +1 -36
- package/general/get-current-year.d.ts +7 -1
- package/general/get-current-year.js +1 -5
- package/general/get-day-name.d.ts +5 -3
- package/general/get-day-name.js +1 -14
- package/general/get-dial-code.d.ts +8 -1
- package/general/get-dial-code.js +1 -8
- package/general/get-full-name.d.ts +9 -2
- package/general/get-full-name.js +1 -8
- package/general/get-href.d.ts +3 -1
- package/general/get-href.js +1 -13
- package/general/get-month-name.d.ts +5 -3
- package/general/get-month-name.js +1 -19
- package/general/get-month-number.d.ts +5 -3
- package/general/get-month-number.js +1 -29
- package/general/get-number-of-days-in-month.d.ts +9 -2
- package/general/get-number-of-days-in-month.js +1 -12
- package/general/get-pathname.d.ts +3 -1
- package/general/get-pathname.js +1 -16
- package/general/get-week-day.d.ts +8 -1
- package/general/get-week-day.js +1 -9
- package/general/image-url-to-base64.d.ts +3 -1
- package/general/image-url-to-base64.js +1 -80
- package/general/is-created-or-updated.d.ts +3 -1
- package/general/is-created-or-updated.js +1 -26
- package/general/is-next-button-disabled.d.ts +9 -1
- package/general/is-next-button-disabled.js +1 -5
- package/general/is-odd.d.ts +3 -1
- package/general/is-odd.js +1 -13
- package/general/is-previous-button-disabled.d.ts +8 -1
- package/general/is-previous-button-disabled.js +1 -7
- package/general/linear-gradients.d.ts +4 -2
- package/general/linear-gradients.js +1 -52
- package/general/multi-part-search.d.ts +10 -2
- package/general/multi-part-search.js +1 -16
- package/general/normalize-phone.d.ts +15 -2
- package/general/normalize-phone.js +1 -40
- package/general/parse-frontmatter.d.ts +11 -4
- package/general/parse-frontmatter.js +2 -35
- package/general/remove-data-image-prefix.d.ts +8 -1
- package/general/remove-data-image-prefix.js +1 -7
- package/general/repeat-times.d.ts +3 -1
- package/general/repeat-times.js +1 -21
- package/general/resolve-anchor-link.d.ts +3 -1
- package/general/resolve-anchor-link.js +1 -26
- package/general/resolve-current-date.d.ts +3 -1
- package/general/resolve-current-date.js +1 -22
- package/general/resolve-grid.d.ts +3 -1
- package/general/resolve-grid.js +1 -18
- package/general/resolve-initials.d.ts +3 -1
- package/general/resolve-initials.js +1 -17
- package/general/set-timezone.d.ts +11 -1
- package/general/set-timezone.js +1 -12
- package/general/slugify.d.ts +3 -1
- package/general/slugify.js +1 -24
- package/general/text-to-enum.d.ts +8 -1
- package/general/text-to-enum.js +1 -10
- package/general/text-to-sentence-case.d.ts +3 -1
- package/general/text-to-sentence-case.js +1 -16
- package/general/time-out.d.ts +3 -1
- package/general/time-out.js +1 -16
- package/general/time-zones.d.ts +3 -1
- package/general/time-zones.js +1 -437
- package/general/truncate-text.d.ts +3 -1
- package/general/truncate-text.js +1 -18
- package/general/type.d.ts +3 -1
- package/general/type.js +1 -2
- package/general/upload-blob-to-private-supabase.d.ts +14 -2
- package/general/upload-blob-to-private-supabase.js +1 -62
- package/general/upload-blob-to-public-supabase.d.ts +14 -2
- package/general/upload-blob-to-public-supabase.js +1 -62
- package/general/upload-image-to-private-supabase.d.ts +15 -3
- package/general/upload-image-to-private-supabase.js +1 -66
- package/general/upload-image-to-public-supabase.d.ts +15 -3
- package/general/upload-image-to-public-supabase.js +1 -66
- package/general/url-to-sentence-case.d.ts +3 -1
- package/general/url-to-sentence-case.js +1 -19
- package/general/validate-comment.d.ts +3 -1
- package/general/validate-comment.js +1 -21
- package/general/validate-email.d.ts +3 -1
- package/general/validate-email.js +1 -24
- package/general/validate-form.d.ts +12 -3
- package/general/validate-form.js +1 -29
- package/general/validate-name.d.ts +3 -1
- package/general/validate-name.js +1 -21
- package/hooks/use-change.d.ts +11 -2
- package/hooks/use-change.js +1 -23
- package/hooks/use-debounce.d.ts +10 -1
- package/hooks/use-debounce.js +1 -14
- package/hooks/use-fetch.d.ts +7 -5
- package/hooks/use-fetch.js +1 -239
- package/hooks/use-force-render.d.ts +6 -2
- package/hooks/use-force-render.js +1 -17
- package/hooks/use-ip-geo-location.d.ts +8 -1
- package/hooks/use-ip-geo-location.js +1 -79
- package/hooks/use-is-mobile.d.ts +8 -1
- package/hooks/use-is-mobile.js +1 -22
- package/hooks/use-module-entity-v2.d.ts +7 -4
- package/hooks/use-module-entity-v2.js +1 -188
- package/hooks/use-module-entity.d.ts +7 -4
- package/hooks/use-module-entity.js +1 -177
- package/hooks/use-phone-formatter.d.ts +10 -2
- package/hooks/use-phone-formatter.js +1 -23
- package/hooks/use-position.d.ts +6 -3
- package/hooks/use-position.js +1 -43
- package/hooks/use-rtl.d.ts +4 -2
- package/hooks/use-rtl.js +1 -84
- package/hooks/use-sticky.d.ts +3 -1
- package/hooks/use-sticky.js +1 -39
- package/hooks/use-toggle-state.d.ts +3 -2
- package/hooks/use-toggle-state.js +1 -26
- package/hooks/use-window-event-listener.d.ts +9 -1
- package/hooks/use-window-event-listener.js +1 -11
- package/hooks/with-seo.d.ts +11 -2
- package/hooks/with-seo.js +1 -37
- package/local-storage/get-storage-value.d.ts +5 -2
- package/local-storage/get-storage-value.js +1 -20
- package/local-storage/remove-storage-value.d.ts +3 -1
- package/local-storage/remove-storage-value.js +1 -14
- package/local-storage/set-storage-value.d.ts +3 -1
- package/local-storage/set-storage-value.js +1 -14
- package/local-storage/type.d.ts +3 -1
- package/local-storage/type.js +1 -2
- package/npm.d.d.ts +2 -0
- package/npm.d.js +0 -0
- package/package.json +21 -19
- package/{api/stellar-solutions → stellar-solution}/types/common.d.ts +4 -2
- package/stellar-solution/types/common.js +1 -0
- package/{api/stellar-solutions → stellar-solution}/types/erp.d.ts +36 -33
- package/stellar-solution/types/erp.js +1 -0
- package/stellar-solution/types/index.d.ts +3 -0
- package/stellar-solution/types/index.js +1 -0
- package/{api/stellar-solutions → stellar-solution}/types/pos.d.ts +27 -24
- package/stellar-solution/types/pos.js +1 -0
- package/storybook/generate-sitemap.d.ts +3 -1
- package/storybook/generate-sitemap.js +17 -26
- package/storybook/preview.d.ts +4 -2
- package/storybook/preview.js +1 -62
- package/storybook/react-design-story-script.d.ts +3 -1
- package/storybook/react-design-story-script.js +5 -27
- package/storybook/react-emoji-collection.d.ts +3 -1
- package/storybook/react-emoji-collection.js +10 -55
- package/storybook/react-emoji-story-script.d.ts +3 -1
- package/storybook/react-emoji-story-script.js +5 -31
- package/storybook/react-emoji-story-template.d.ts +3 -1
- package/storybook/react-emoji-story-template.js +45 -15
- package/storybook/react-icon-collection.d.ts +3 -1
- package/storybook/react-icon-collection.js +10 -42
- package/storybook/react-icon-story-script.d.ts +3 -1
- package/storybook/react-icon-story-script.js +5 -27
- package/storybook/react-icon-story-template.d.ts +3 -1
- package/storybook/react-icon-story-template.js +45 -14
- package/storybook/react-logo-collection.d.ts +3 -1
- package/storybook/react-logo-collection.js +10 -42
- package/storybook/react-logo-story-script.d.ts +3 -1
- package/storybook/react-logo-story-script.js +5 -27
- package/storybook/react-logo-story-template.d.ts +3 -1
- package/storybook/react-logo-story-template.js +45 -14
- package/storybook/react-pakistan-theme.d.ts +3 -1
- package/storybook/react-pakistan-theme.js +1 -31
- package/storybook/responsive-args.d.ts +11 -10
- package/storybook/responsive-args.js +1 -19
- package/storybook/responsive-component.d.ts +4 -2
- package/storybook/responsive-component.js +37 -23
- package/storybook/responsive-screens.d.ts +3 -1
- package/storybook/responsive-screens.js +1 -109
- package/storybook/theme.d.ts +17 -15
- package/storybook/theme.js +1 -1022
- package/api/stellar-solutions/app-user/index.d.ts +0 -51
- package/api/stellar-solutions/app-user/index.js +0 -210
- package/api/stellar-solutions/bank/index.d.ts +0 -59
- package/api/stellar-solutions/bank/index.js +0 -210
- package/api/stellar-solutions/branch/index.d.ts +0 -58
- package/api/stellar-solutions/branch/index.js +0 -220
- package/api/stellar-solutions/company/index.d.ts +0 -57
- package/api/stellar-solutions/company/index.js +0 -218
- package/api/stellar-solutions/company-report/index.d.ts +0 -15
- package/api/stellar-solutions/company-report/index.js +0 -74
- package/api/stellar-solutions/constants.d.ts +0 -19
- package/api/stellar-solutions/constants.js +0 -22
- package/api/stellar-solutions/contact/index.d.ts +0 -56
- package/api/stellar-solutions/contact/index.js +0 -217
- package/api/stellar-solutions/currency/index.d.ts +0 -55
- package/api/stellar-solutions/currency/index.js +0 -212
- package/api/stellar-solutions/customer/index.d.ts +0 -68
- package/api/stellar-solutions/customer/index.js +0 -249
- package/api/stellar-solutions/expense/index.d.ts +0 -58
- package/api/stellar-solutions/expense/index.js +0 -229
- package/api/stellar-solutions/expense-category/index.d.ts +0 -53
- package/api/stellar-solutions/expense-category/index.js +0 -214
- package/api/stellar-solutions/lead/index.d.ts +0 -51
- package/api/stellar-solutions/lead/index.js +0 -206
- package/api/stellar-solutions/menu-order/index.d.ts +0 -53
- package/api/stellar-solutions/menu-order/index.js +0 -202
- package/api/stellar-solutions/payment/index.d.ts +0 -65
- package/api/stellar-solutions/payment/index.js +0 -230
- package/api/stellar-solutions/payment-mode/index.d.ts +0 -53
- package/api/stellar-solutions/payment-mode/index.js +0 -191
- package/api/stellar-solutions/preference/index.d.ts +0 -25
- package/api/stellar-solutions/preference/index.js +0 -114
- package/api/stellar-solutions/product/index.d.ts +0 -64
- package/api/stellar-solutions/product/index.js +0 -235
- package/api/stellar-solutions/product-category/index.d.ts +0 -51
- package/api/stellar-solutions/product-category/index.js +0 -212
- package/api/stellar-solutions/profile/index.d.ts +0 -78
- package/api/stellar-solutions/profile/index.js +0 -234
- package/api/stellar-solutions/quote-invoice/index.d.ts +0 -97
- package/api/stellar-solutions/quote-invoice/index.js +0 -369
- package/api/stellar-solutions/quote-invoice-report/index.d.ts +0 -15
- package/api/stellar-solutions/quote-invoice-report/index.js +0 -74
- package/api/stellar-solutions/tax/index.d.ts +0 -55
- package/api/stellar-solutions/tax/index.js +0 -224
- package/api/stellar-solutions/types/common.js +0 -22
- package/api/stellar-solutions/types/erp.js +0 -73
- package/api/stellar-solutions/types/index.d.ts +0 -3
- package/api/stellar-solutions/types/index.js +0 -19
- package/api/stellar-solutions/types/pos.js +0 -61
- package/constants/index.d.ts +0 -12
- package/constants/index.js +0 -28
- package/factory/index.d.ts +0 -2
- package/factory/index.js +0 -18
- package/general/index.d.ts +0 -95
- package/general/index.js +0 -111
- package/index.d.ts +0 -28
- package/index.js +0 -44
- package/local-storage/index.d.ts +0 -4
- package/local-storage/index.js +0 -20
- package/setupTests.d.ts +0 -1
- package/setupTests.js +0 -52
- package/storybook/index.d.ts +0 -17
- package/storybook/index.js +0 -33
|
@@ -1,51 +1,52 @@
|
|
|
1
|
-
import { BaseEntity } from './common';
|
|
2
|
-
|
|
1
|
+
import { BaseEntity } from './common.js';
|
|
2
|
+
|
|
3
|
+
declare enum POS_ORDER_STATUS {
|
|
3
4
|
OPEN = "OPEN",
|
|
4
5
|
CLOSED = "CLOSED",
|
|
5
6
|
CANCELLED = "CANCELLED",
|
|
6
7
|
REFUNDED = "REFUNDED"
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
+
declare enum POS_PAYMENT_STATUS {
|
|
9
10
|
PENDING = "PENDING",
|
|
10
11
|
PAID = "PAID",
|
|
11
12
|
FAILED = "FAILED",
|
|
12
13
|
REFUNDED = "REFUNDED"
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
+
declare enum POS_PAYMENT_METHOD_TYPE {
|
|
15
16
|
CASH = "CASH",
|
|
16
17
|
CARD = "CARD",
|
|
17
18
|
GIFT_CARD = "GIFT_CARD",
|
|
18
19
|
MOBILE_WALLET = "MOBILE_WALLET",
|
|
19
20
|
OTHER = "OTHER"
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
+
declare enum POS_REGISTER_STATUS {
|
|
22
23
|
ACTIVE = "ACTIVE",
|
|
23
24
|
INACTIVE = "INACTIVE"
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
+
declare enum POS_TAX_TYPE {
|
|
26
27
|
EXCLUSIVE = "EXCLUSIVE",
|
|
27
28
|
INCLUSIVE = "INCLUSIVE"
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
+
declare enum POS_TABLE_STATUS {
|
|
30
31
|
AVAILABLE = "AVAILABLE",
|
|
31
32
|
OCCUPIED = "OCCUPIED",
|
|
32
33
|
RESERVED = "RESERVED"
|
|
33
34
|
}
|
|
34
|
-
|
|
35
|
+
declare enum POS_RESERVATION_STATUS {
|
|
35
36
|
PENDING = "PENDING",
|
|
36
37
|
CONFIRMED = "CONFIRMED",
|
|
37
38
|
CANCELLED = "CANCELLED",
|
|
38
39
|
COMPLETED = "COMPLETED"
|
|
39
40
|
}
|
|
40
|
-
|
|
41
|
+
declare enum POS_SHIFT_STATUS {
|
|
41
42
|
OPEN = "OPEN",
|
|
42
43
|
CLOSED = "CLOSED"
|
|
43
44
|
}
|
|
44
|
-
|
|
45
|
+
declare enum POS_DISCOUNT_TYPE {
|
|
45
46
|
FIXED = "FIXED",
|
|
46
47
|
PERCENTAGE = "PERCENTAGE"
|
|
47
48
|
}
|
|
48
|
-
|
|
49
|
+
interface POSStoreBE extends BaseEntity {
|
|
49
50
|
name: string;
|
|
50
51
|
code?: string;
|
|
51
52
|
address?: string;
|
|
@@ -55,13 +56,13 @@ export interface POSStoreBE extends BaseEntity {
|
|
|
55
56
|
meta?: any;
|
|
56
57
|
enabled: boolean;
|
|
57
58
|
}
|
|
58
|
-
|
|
59
|
+
interface POSRegisterBE extends BaseEntity {
|
|
59
60
|
name: string;
|
|
60
61
|
storeId: string;
|
|
61
62
|
status: POS_REGISTER_STATUS;
|
|
62
63
|
meta?: any;
|
|
63
64
|
}
|
|
64
|
-
|
|
65
|
+
interface POSShiftBE extends BaseEntity {
|
|
65
66
|
registerId: string;
|
|
66
67
|
openedByUserId?: string;
|
|
67
68
|
openedAt: Date;
|
|
@@ -71,14 +72,14 @@ export interface POSShiftBE extends BaseEntity {
|
|
|
71
72
|
status: POS_SHIFT_STATUS;
|
|
72
73
|
meta?: any;
|
|
73
74
|
}
|
|
74
|
-
|
|
75
|
+
interface POSCategoryBE extends BaseEntity {
|
|
75
76
|
name: string;
|
|
76
77
|
description?: string;
|
|
77
78
|
storeId: string;
|
|
78
79
|
parentId?: string;
|
|
79
80
|
meta?: any;
|
|
80
81
|
}
|
|
81
|
-
|
|
82
|
+
interface POSProductBE extends BaseEntity {
|
|
82
83
|
sku?: string;
|
|
83
84
|
name: string;
|
|
84
85
|
description?: string;
|
|
@@ -89,7 +90,7 @@ export interface POSProductBE extends BaseEntity {
|
|
|
89
90
|
categoryId?: string;
|
|
90
91
|
meta?: any;
|
|
91
92
|
}
|
|
92
|
-
|
|
93
|
+
interface POSProductVariantBE extends BaseEntity {
|
|
93
94
|
productId: string;
|
|
94
95
|
name: string;
|
|
95
96
|
sku?: string;
|
|
@@ -97,7 +98,7 @@ export interface POSProductVariantBE extends BaseEntity {
|
|
|
97
98
|
stock: number;
|
|
98
99
|
meta?: any;
|
|
99
100
|
}
|
|
100
|
-
|
|
101
|
+
interface POSCustomerBE extends BaseEntity {
|
|
101
102
|
name: string;
|
|
102
103
|
email?: string;
|
|
103
104
|
phone?: string;
|
|
@@ -105,14 +106,14 @@ export interface POSCustomerBE extends BaseEntity {
|
|
|
105
106
|
loyaltyPoints: number;
|
|
106
107
|
meta?: any;
|
|
107
108
|
}
|
|
108
|
-
|
|
109
|
+
interface POSTableBE extends BaseEntity {
|
|
109
110
|
storeId: string;
|
|
110
111
|
name: string;
|
|
111
112
|
seats: number;
|
|
112
113
|
status: POS_TABLE_STATUS;
|
|
113
114
|
meta?: any;
|
|
114
115
|
}
|
|
115
|
-
|
|
116
|
+
interface POSReservationBE extends BaseEntity {
|
|
116
117
|
tableId: string;
|
|
117
118
|
customerId: string;
|
|
118
119
|
startAt: Date;
|
|
@@ -121,7 +122,7 @@ export interface POSReservationBE extends BaseEntity {
|
|
|
121
122
|
status: POS_RESERVATION_STATUS;
|
|
122
123
|
meta?: any;
|
|
123
124
|
}
|
|
124
|
-
|
|
125
|
+
interface POSOrderBE extends BaseEntity {
|
|
125
126
|
orderNumber: string;
|
|
126
127
|
storeId: string;
|
|
127
128
|
registerId?: string;
|
|
@@ -137,7 +138,7 @@ export interface POSOrderBE extends BaseEntity {
|
|
|
137
138
|
note?: string;
|
|
138
139
|
meta?: any;
|
|
139
140
|
}
|
|
140
|
-
|
|
141
|
+
interface POSOrderItemBE extends BaseEntity {
|
|
141
142
|
orderId: string;
|
|
142
143
|
productId?: string;
|
|
143
144
|
variantId?: string;
|
|
@@ -149,7 +150,7 @@ export interface POSOrderItemBE extends BaseEntity {
|
|
|
149
150
|
discountAmount: number;
|
|
150
151
|
meta?: any;
|
|
151
152
|
}
|
|
152
|
-
|
|
153
|
+
interface POSPaymentBE extends BaseEntity {
|
|
153
154
|
orderId: string;
|
|
154
155
|
amount: number;
|
|
155
156
|
method: POS_PAYMENT_METHOD_TYPE;
|
|
@@ -159,7 +160,7 @@ export interface POSPaymentBE extends BaseEntity {
|
|
|
159
160
|
processedAt?: Date;
|
|
160
161
|
meta?: any;
|
|
161
162
|
}
|
|
162
|
-
|
|
163
|
+
interface POSTaxBE extends BaseEntity {
|
|
163
164
|
name: string;
|
|
164
165
|
rate: number;
|
|
165
166
|
type: POS_TAX_TYPE;
|
|
@@ -167,10 +168,12 @@ export interface POSTaxBE extends BaseEntity {
|
|
|
167
168
|
storeId: string;
|
|
168
169
|
meta?: any;
|
|
169
170
|
}
|
|
170
|
-
|
|
171
|
+
interface POSDiscountBE extends BaseEntity {
|
|
171
172
|
name: string;
|
|
172
173
|
type: POS_DISCOUNT_TYPE;
|
|
173
174
|
value: number;
|
|
174
175
|
storeId: string;
|
|
175
176
|
meta?: any;
|
|
176
177
|
}
|
|
178
|
+
|
|
179
|
+
export { type POSCategoryBE, type POSCustomerBE, type POSDiscountBE, type POSOrderBE, type POSOrderItemBE, type POSPaymentBE, type POSProductBE, type POSProductVariantBE, type POSRegisterBE, type POSReservationBE, type POSShiftBE, type POSStoreBE, type POSTableBE, type POSTaxBE, POS_DISCOUNT_TYPE, POS_ORDER_STATUS, POS_PAYMENT_METHOD_TYPE, POS_PAYMENT_STATUS, POS_REGISTER_STATUS, POS_RESERVATION_STATUS, POS_SHIFT_STATUS, POS_TABLE_STATUS, POS_TAX_TYPE };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var i=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var D=(r,n)=>{for(var e in n)i(r,e,{get:n[e],enumerable:!0})},b=(r,n,e,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of x(n))!C.call(r,t)&&t!==e&&i(r,t,{get:()=>n[t],enumerable:!(s=c(n,t))||s.enumerable});return r};var B=r=>b(i({},"__esModule",{value:!0}),r);var L={};D(L,{POS_DISCOUNT_TYPE:()=>y,POS_ORDER_STATUS:()=>o,POS_PAYMENT_METHOD_TYPE:()=>E,POS_PAYMENT_STATUS:()=>m,POS_REGISTER_STATUS:()=>u,POS_RESERVATION_STATUS:()=>I,POS_SHIFT_STATUS:()=>p,POS_TABLE_STATUS:()=>g,POS_TAX_TYPE:()=>d});module.exports=B(L);var o=(t=>(t.OPEN="OPEN",t.CLOSED="CLOSED",t.CANCELLED="CANCELLED",t.REFUNDED="REFUNDED",t))(o||{}),m=(t=>(t.PENDING="PENDING",t.PAID="PAID",t.FAILED="FAILED",t.REFUNDED="REFUNDED",t))(m||{}),E=(a=>(a.CASH="CASH",a.CARD="CARD",a.GIFT_CARD="GIFT_CARD",a.MOBILE_WALLET="MOBILE_WALLET",a.OTHER="OTHER",a))(E||{}),u=(e=>(e.ACTIVE="ACTIVE",e.INACTIVE="INACTIVE",e))(u||{}),d=(e=>(e.EXCLUSIVE="EXCLUSIVE",e.INCLUSIVE="INCLUSIVE",e))(d||{}),g=(s=>(s.AVAILABLE="AVAILABLE",s.OCCUPIED="OCCUPIED",s.RESERVED="RESERVED",s))(g||{}),I=(t=>(t.PENDING="PENDING",t.CONFIRMED="CONFIRMED",t.CANCELLED="CANCELLED",t.COMPLETED="COMPLETED",t))(I||{}),p=(e=>(e.OPEN="OPEN",e.CLOSED="CLOSED",e))(p||{}),y=(e=>(e.FIXED="FIXED",e.PERCENTAGE="PERCENTAGE",e))(y||{});0&&(module.exports={POS_DISCOUNT_TYPE,POS_ORDER_STATUS,POS_PAYMENT_METHOD_TYPE,POS_PAYMENT_STATUS,POS_REGISTER_STATUS,POS_RESERVATION_STATUS,POS_SHIFT_STATUS,POS_TABLE_STATUS,POS_TAX_TYPE});
|
|
@@ -11,4 +11,6 @@
|
|
|
11
11
|
* React Emoji Collection
|
|
12
12
|
*/
|
|
13
13
|
/** End file docs */
|
|
14
|
-
|
|
14
|
+
declare const generateSitemap: (baseUrl: string, fs: any, stories: Record<string, unknown>) => void;
|
|
15
|
+
|
|
16
|
+
export { generateSitemap };
|
|
@@ -1,26 +1,17 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var generatedSitemap = '';
|
|
19
|
-
Object.keys(stories).forEach(function (id) {
|
|
20
|
-
generatedSitemap += "\n <url>\n <loc>".concat(baseUrl).concat(id, "</loc>\n <changefreq>weekly</changefreq>\n <priority>0.5</priority>\n <lastmod>2020-10-10</lastmod>\n </url>");
|
|
21
|
-
});
|
|
22
|
-
var resolvedInitialUrl = baseUrl.split('?')[0];
|
|
23
|
-
var sitemap = "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>\n <urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\" xmlns:xhtml=\"http://www.w3.org/1999/xhtml\" >\n <url>\n <loc>".concat(resolvedInitialUrl, "</loc>\n <changefreq>daily</changefreq>\n <priority>1</priority>\n <lastmod>2020-10-10</lastmod>\n </url>\n ").concat(generatedSitemap, "\n </urlset>\n ");
|
|
24
|
-
fs.writeFileSync('./sitemap.xml', sitemap);
|
|
25
|
-
};
|
|
26
|
-
exports.generateSitemap = generateSitemap;
|
|
1
|
+
var o=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var p=(t,e)=>{for(var r in e)o(t,r,{get:e[r],enumerable:!0})},d=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of c(e))!m.call(t,l)&&l!==r&&o(t,l,{get:()=>e[l],enumerable:!(i=a(e,l))||i.enumerable});return t};var g=t=>d(o({},"__esModule",{value:!0}),t);var w={};p(w,{generateSitemap:()=>h});module.exports=g(w);const h=(t,e,r)=>{let i="";Object.keys(r).forEach(n=>{i+=`
|
|
2
|
+
<url>
|
|
3
|
+
<loc>${t}${n}</loc>
|
|
4
|
+
<changefreq>weekly</changefreq>
|
|
5
|
+
<priority>0.5</priority>
|
|
6
|
+
<lastmod>2020-10-10</lastmod>
|
|
7
|
+
</url>`});const s=`<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
|
8
|
+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" >
|
|
9
|
+
<url>
|
|
10
|
+
<loc>${t.split("?")[0]}</loc>
|
|
11
|
+
<changefreq>daily</changefreq>
|
|
12
|
+
<priority>1</priority>
|
|
13
|
+
<lastmod>2020-10-10</lastmod>
|
|
14
|
+
</url>
|
|
15
|
+
${i}
|
|
16
|
+
</urlset>
|
|
17
|
+
`;e.writeFileSync("./sitemap.xml",s)};0&&(module.exports={generateSitemap});
|
package/storybook/preview.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
declare const parameters: {
|
|
2
2
|
actions: {
|
|
3
3
|
argTypesRegex: string;
|
|
4
4
|
};
|
|
@@ -120,7 +120,7 @@ export declare const parameters: {
|
|
|
120
120
|
};
|
|
121
121
|
};
|
|
122
122
|
};
|
|
123
|
-
|
|
123
|
+
declare const globalTypes: {
|
|
124
124
|
theme: {
|
|
125
125
|
name: string;
|
|
126
126
|
description: string;
|
|
@@ -144,3 +144,5 @@ export declare const globalTypes: {
|
|
|
144
144
|
};
|
|
145
145
|
};
|
|
146
146
|
};
|
|
147
|
+
|
|
148
|
+
export { globalTypes, parameters };
|
package/storybook/preview.js
CHANGED
|
@@ -1,62 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.globalTypes = exports.parameters = void 0;
|
|
15
|
-
var responsive_screens_1 = require("./responsive-screens");
|
|
16
|
-
exports.parameters = {
|
|
17
|
-
actions: {
|
|
18
|
-
argTypesRegex: '^on[A-Z].*',
|
|
19
|
-
},
|
|
20
|
-
backgrounds: {
|
|
21
|
-
values: [
|
|
22
|
-
{
|
|
23
|
-
name: 'twitter',
|
|
24
|
-
value: '#00aced',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: 'facebook',
|
|
28
|
-
value: '#3b5998',
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
controls: { expanded: true },
|
|
33
|
-
viewport: {
|
|
34
|
-
viewports: __assign({}, responsive_screens_1.responsiveScreens),
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
exports.globalTypes = {
|
|
38
|
-
theme: {
|
|
39
|
-
name: 'Theme',
|
|
40
|
-
description: 'Global theme for components',
|
|
41
|
-
defaultValue: 'light',
|
|
42
|
-
toolbar: {
|
|
43
|
-
icon: 'circlehollow',
|
|
44
|
-
items: ['light', 'dark'],
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
locale: {
|
|
48
|
-
name: 'Locale',
|
|
49
|
-
description: 'Internationalization locale',
|
|
50
|
-
defaultValue: 'en',
|
|
51
|
-
toolbar: {
|
|
52
|
-
icon: 'globe',
|
|
53
|
-
items: [
|
|
54
|
-
{ value: 'en', right: '🇺🇸', title: 'English' },
|
|
55
|
-
{ value: 'fr', right: '🇫🇷', title: 'Français' },
|
|
56
|
-
{ value: 'es', right: '🇪🇸', title: 'Español' },
|
|
57
|
-
{ value: 'zh', right: '🇨🇳', title: '中文' },
|
|
58
|
-
{ value: 'kr', right: '🇰🇷', title: '한국어' },
|
|
59
|
-
],
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
};
|
|
1
|
+
var o=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var p=(t,e)=>{for(var l in e)o(t,l,{get:e[l],enumerable:!0})},u=(t,e,l,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of s(e))!c.call(t,a)&&a!==l&&o(t,a,{get:()=>e[a],enumerable:!(i=n(e,a))||i.enumerable});return t};var g=t=>u(o({},"__esModule",{value:!0}),t);var v={};p(v,{globalTypes:()=>m,parameters:()=>h});module.exports=g(v);var r=require("./responsive-screens");const h={actions:{argTypesRegex:"^on[A-Z].*"},backgrounds:{values:[{name:"twitter",value:"#00aced"},{name:"facebook",value:"#3b5998"}]},controls:{expanded:!0},viewport:{viewports:{...r.responsiveScreens}}},m={theme:{name:"Theme",description:"Global theme for components",defaultValue:"light",toolbar:{icon:"circlehollow",items:["light","dark"]}},locale:{name:"Locale",description:"Internationalization locale",defaultValue:"en",toolbar:{icon:"globe",items:[{value:"en",right:"\u{1F1FA}\u{1F1F8}",title:"English"},{value:"fr",right:"\u{1F1EB}\u{1F1F7}",title:"Fran\xE7ais"},{value:"es",right:"\u{1F1EA}\u{1F1F8}",title:"Espa\xF1ol"},{value:"zh",right:"\u{1F1E8}\u{1F1F3}",title:"\u4E2D\u6587"},{value:"kr",right:"\u{1F1F0}\u{1F1F7}",title:"\uD55C\uAD6D\uC5B4"}]}}};0&&(module.exports={globalTypes,parameters});
|
|
@@ -1,27 +1,5 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* @returns an auto generated logo story file
|
|
7
|
-
* @author Taimoor Khan
|
|
8
|
-
* @remarks React Logo Collection
|
|
9
|
-
*/
|
|
10
|
-
/** End file docs */
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.generateReactDesignScript = void 0;
|
|
13
|
-
var generateReactDesignScript = function (fs) {
|
|
14
|
-
var svgDir = './assets/templates/';
|
|
15
|
-
var saveDir = './scripts/';
|
|
16
|
-
var scriptOutput = "# Generated by scripts/generate-script.js\n# DO NO EDIT\n\n";
|
|
17
|
-
// Read root Svg logo directory
|
|
18
|
-
fs.readdirSync(svgDir).forEach(function (folderName) {
|
|
19
|
-
if (folderName === '.DS_Store')
|
|
20
|
-
return;
|
|
21
|
-
// const flowArray = folderName.split('-');
|
|
22
|
-
// const flow = 'color';
|
|
23
|
-
scriptOutput += "svgr --template scripts/svgr-template.js --config-file scripts/.svgrrc-color.js -d src/templates/ --ext tsx assets/templates/".concat(folderName, "\n");
|
|
24
|
-
});
|
|
25
|
-
fs.writeFileSync("".concat(saveDir, "all-scripts.sh"), scriptOutput);
|
|
26
|
-
};
|
|
27
|
-
exports.generateReactDesignScript = generateReactDesignScript;
|
|
1
|
+
var c=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var l=(s,t)=>{for(var r in t)c(s,r,{get:t[r],enumerable:!0})},o=(s,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of p(t))!n.call(s,e)&&e!==r&&c(s,e,{get:()=>t[e],enumerable:!(i=a(t,e))||i.enumerable});return s};var g=s=>o(c({},"__esModule",{value:!0}),s);var D={};l(D,{generateReactDesignScript:()=>v});module.exports=g(D);const v=s=>{const t="./assets/templates/",r="./scripts/";let i=`# Generated by scripts/generate-script.js
|
|
2
|
+
# DO NO EDIT
|
|
3
|
+
|
|
4
|
+
`;s.readdirSync(t).forEach(e=>{e!==".DS_Store"&&(i+=`svgr --template scripts/svgr-template.js --config-file scripts/.svgrrc-color.js -d src/templates/ --ext tsx assets/templates/${e}
|
|
5
|
+
`)}),s.writeFileSync(`${r}all-scripts.sh`,i)};0&&(module.exports={generateReactDesignScript});
|
|
@@ -1,56 +1,11 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* and constructs an emoji story for all of it's subdirectories
|
|
5
|
-
*
|
|
6
|
-
* @param fs any
|
|
7
|
-
* @returns an auto generated emoji story file
|
|
8
|
-
* @author Taimoor Khan
|
|
9
|
-
* @remarks React Emoji Collection
|
|
1
|
+
var $=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var E=Object.prototype.hasOwnProperty;var m=(t,r)=>{for(var i in r)$(t,i,{get:r[i],enumerable:!0})},u=(t,r,i,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of D(r))!E.call(t,s)&&s!==i&&$(t,s,{get:()=>r[s],enumerable:!(o=j(r,s))||o.enumerable});return t};var _=t=>u($({},"__esModule",{value:!0}),t);var C={};m(C,{generateReactEmojis:()=>x});module.exports=_(C);var p=require("./react-emoji-story-template");const x=t=>{const r="./assets/",i="./src/__stories__/";t.readdirSync(r).forEach(o=>{let s="",c="";if(o===".DS_Store")return;const S=`${r}${o}`;t.readdirSync(S).forEach(e=>{if(e===".DS_Store")return;c=e;const a=`${r}${o}/${e}`;s=`/**
|
|
2
|
+
* Generated by scripts/generate-emojis.js.
|
|
3
|
+
* DO NOT EDIT!
|
|
10
4
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
// Read root Emoji directory
|
|
19
|
-
fs.readdirSync(emojiDir).forEach(function (fileName) {
|
|
20
|
-
var emojiListOutput = '';
|
|
21
|
-
var level1FileName = '';
|
|
22
|
-
if (fileName === '.DS_Store')
|
|
23
|
-
return;
|
|
24
|
-
var level1Dir = "".concat(emojiDir).concat(fileName);
|
|
25
|
-
// Read level1-directory
|
|
26
|
-
fs.readdirSync(level1Dir).forEach(function (_level1FileName) {
|
|
27
|
-
if (_level1FileName === '.DS_Store')
|
|
28
|
-
return;
|
|
29
|
-
level1FileName = _level1FileName;
|
|
30
|
-
var level2Dir = "".concat(emojiDir).concat(fileName, "/").concat(_level1FileName);
|
|
31
|
-
emojiListOutput = "/**\n * Generated by scripts/generate-emojis.js.\n * DO NOT EDIT!\n */\n\nimport * as Emojis from '../../".concat(fileName, "/").concat(_level1FileName, "';\n\nexport const EMOJI_LIST = [\n");
|
|
32
|
-
// Read level2-directory
|
|
33
|
-
fs.readdirSync(level2Dir).forEach(function (level2FileName) {
|
|
34
|
-
if (level2FileName === '.DS_Store')
|
|
35
|
-
return;
|
|
36
|
-
emojiListOutput += " { emoji: Emojis.".concat(level2FileName.split('.')[0], ", name: '").concat(level2FileName.split('.')[0], "' },\n");
|
|
37
|
-
});
|
|
38
|
-
emojiListOutput += "];\n ";
|
|
39
|
-
if (!fs.existsSync("".concat(saveDir).concat(fileName))) {
|
|
40
|
-
fs.mkdirSync("".concat(saveDir).concat(fileName));
|
|
41
|
-
}
|
|
42
|
-
var mainCategoryName = fileName
|
|
43
|
-
.split('-')
|
|
44
|
-
.map(function (str) { return str[0].toUpperCase() + str.slice(1); })
|
|
45
|
-
.join('');
|
|
46
|
-
var subCategoryName = level1FileName
|
|
47
|
-
.split('-')
|
|
48
|
-
.map(function (str) { return str[0].toUpperCase() + str.slice(1); })
|
|
49
|
-
.join('');
|
|
50
|
-
var story = (0, react_emoji_story_template_1.reactEmojiStoryTemplate)(mainCategoryName, subCategoryName, level1FileName);
|
|
51
|
-
fs.writeFileSync("".concat(saveDir).concat(fileName, "/").concat(level1FileName, ".ts"), emojiListOutput);
|
|
52
|
-
fs.writeFileSync("".concat(saveDir).concat(fileName, "/").concat(level1FileName, ".story.tsx"), story);
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
exports.generateReactEmojis = generateReactEmojis;
|
|
5
|
+
|
|
6
|
+
import * as Emojis from '../../${o}/${e}';
|
|
7
|
+
|
|
8
|
+
export const EMOJI_LIST = [
|
|
9
|
+
`,t.readdirSync(a).forEach(n=>{n!==".DS_Store"&&(s+=` { emoji: Emojis.${n.split(".")[0]}, name: '${n.split(".")[0]}' },
|
|
10
|
+
`)}),s+=`];
|
|
11
|
+
`,t.existsSync(`${i}${o}`)||t.mkdirSync(`${i}${o}`);const y=o.split("-").map(n=>n[0].toUpperCase()+n.slice(1)).join(""),d=c.split("-").map(n=>n[0].toUpperCase()+n.slice(1)).join(""),g=(0,p.reactEmojiStoryTemplate)(y,d,c);t.writeFileSync(`${i}${o}/${c}.ts`,s),t.writeFileSync(`${i}${o}/${c}.story.tsx`,g)})})};0&&(module.exports={generateReactEmojis});
|
|
@@ -1,31 +1,5 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* @returns an auto generated emoji story file
|
|
7
|
-
* @author Taimoor Khan
|
|
8
|
-
* @remarks React Emoji Collection
|
|
9
|
-
*/
|
|
10
|
-
/** End file docs */
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.generateReactEmojiScript = void 0;
|
|
13
|
-
var generateReactEmojiScript = function (fs) {
|
|
14
|
-
var svgDir = './assets/';
|
|
15
|
-
var saveDir = './scripts/';
|
|
16
|
-
var scriptOutput = "# Generated by scripts/generate-script.js\n# DO NO EDIT\n\n";
|
|
17
|
-
// Read root Svg emoji directory
|
|
18
|
-
fs.readdirSync(svgDir).forEach(function (folderName) {
|
|
19
|
-
if (folderName === '.DS_Store')
|
|
20
|
-
return;
|
|
21
|
-
var subDir = "".concat(svgDir).concat(folderName);
|
|
22
|
-
// Read sub-directory
|
|
23
|
-
fs.readdirSync(subDir).forEach(function (subFolderName) {
|
|
24
|
-
if (subFolderName === '.DS_Store')
|
|
25
|
-
return;
|
|
26
|
-
scriptOutput += "svgr --template scripts/svgr-template.js --config-file scripts/.svgrrc-color.js -d src/".concat(folderName, "/").concat(subFolderName, " --ext tsx assets/").concat(folderName, "/").concat(subFolderName, "\n");
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
fs.writeFileSync("".concat(saveDir, "all-scripts.sh"), scriptOutput);
|
|
30
|
-
};
|
|
31
|
-
exports.generateReactEmojiScript = generateReactEmojiScript;
|
|
1
|
+
var n=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var v=(s,t)=>{for(var i in t)n(s,i,{get:t[i],enumerable:!0})},S=(s,t,i,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of a(t))!g.call(s,r)&&r!==i&&n(s,r,{get:()=>t[r],enumerable:!(c=o(t,r))||c.enumerable});return s};var D=s=>S(n({},"__esModule",{value:!0}),s);var y={};v(y,{generateReactEmojiScript:()=>$});module.exports=D(y);const $=s=>{const t="./assets/",i="./scripts/";let c=`# Generated by scripts/generate-script.js
|
|
2
|
+
# DO NO EDIT
|
|
3
|
+
|
|
4
|
+
`;s.readdirSync(t).forEach(r=>{if(r===".DS_Store")return;const p=`${t}${r}`;s.readdirSync(p).forEach(e=>{e!==".DS_Store"&&(c+=`svgr --template scripts/svgr-template.js --config-file scripts/.svgrrc-color.js -d src/${r}/${e} --ext tsx assets/${r}/${e}
|
|
5
|
+
`)})}),s.writeFileSync(`${i}all-scripts.sh`,c)};0&&(module.exports={generateReactEmojiScript});
|
|
@@ -9,4 +9,6 @@
|
|
|
9
9
|
* @remarks React Emoji Collection
|
|
10
10
|
*/
|
|
11
11
|
/** End file docs */
|
|
12
|
-
|
|
12
|
+
declare const reactEmojiStoryTemplate: (mainCategory: string, subCategory: string, emojiListDirName: string) => string;
|
|
13
|
+
|
|
14
|
+
export { reactEmojiStoryTemplate };
|
|
@@ -1,16 +1,46 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* @param mainCategory string
|
|
6
|
-
* @param subCategory string
|
|
7
|
-
* @param iconListDirName string
|
|
8
|
-
* @returns an auto generated icon story file
|
|
9
|
-
* @author Taimoor Khan
|
|
10
|
-
* @remarks React Emoji Collection
|
|
1
|
+
var o=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var j=(t,e)=>{for(var m in e)o(t,m,{get:e[m],enumerable:!0})},s=(t,e,m,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of n(e))!a.call(t,r)&&r!==m&&o(t,r,{get:()=>e[r],enumerable:!(i=p(e,r))||i.enumerable});return t};var E=t=>s(o({},"__esModule",{value:!0}),t);var l={};j(l,{reactEmojiStoryTemplate:()=>c});module.exports=E(l);const c=(t,e,m)=>`/*
|
|
2
|
+
* Generated by scripts/generate-emojis.js
|
|
3
|
+
* DO NOT EDIT!
|
|
11
4
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
|
|
6
|
+
import React, { ReactElement } from 'react';
|
|
7
|
+
import { EmojiWrapper, EmojiTextWrapper, EmojiItem } from '../../styled';
|
|
8
|
+
import { StyledStory } from '../../styled-app';
|
|
9
|
+
import { EMOJI_LIST } from './${m}';
|
|
10
|
+
|
|
11
|
+
const emojiStyle = { width: '7rem', height: '7rem' };
|
|
12
|
+
|
|
13
|
+
const renderItem = (
|
|
14
|
+
item: { emoji: React.FC<React.SVGProps<SVGSVGElement>>, name: string }
|
|
15
|
+
): ReactElement => {
|
|
16
|
+
const Emoji = item.emoji;
|
|
17
|
+
return (
|
|
18
|
+
<EmojiItem
|
|
19
|
+
key={item.name}
|
|
20
|
+
>
|
|
21
|
+
<Emoji style={emojiStyle} />
|
|
22
|
+
<EmojiTextWrapper>
|
|
23
|
+
{item.name}
|
|
24
|
+
</EmojiTextWrapper>
|
|
25
|
+
</EmojiItem>
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const emojis = EMOJI_LIST.map(renderItem);
|
|
30
|
+
|
|
31
|
+
export const ${e} = (): ReactElement => (
|
|
32
|
+
<StyledStory>
|
|
33
|
+
<EmojiWrapper>
|
|
34
|
+
{emojis}
|
|
35
|
+
</EmojiWrapper>
|
|
36
|
+
</StyledStory>
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
export default {
|
|
40
|
+
title: '${t}/${e}',
|
|
41
|
+
|
|
42
|
+
parameters: {
|
|
43
|
+
component: ${e},
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
`;0&&(module.exports={reactEmojiStoryTemplate});
|
|
@@ -1,43 +1,11 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* and constructs an icon story for all of it's subdirectories
|
|
5
|
-
*
|
|
6
|
-
* @param fs any
|
|
7
|
-
* @returns an auto generated icon story file
|
|
8
|
-
* @author Taimoor Khan
|
|
9
|
-
* @remarks React Icon Collection
|
|
1
|
+
var i=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var D=(t,r)=>{for(var s in r)i(t,s,{get:r[s],enumerable:!0})},I=(t,r,s,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of d(r))!g.call(t,o)&&o!==s&&i(t,o,{get:()=>r[o],enumerable:!(n=$(r,o))||n.enumerable});return t};var _=t=>I(i({},"__esModule",{value:!0}),t);var v={};D(v,{generateReactIcons:()=>l});module.exports=_(v);var a=require("./react-icon-story-template");const l=t=>{const r="./assets/",s="./src/__stories__/";let n="",o="";t.readdirSync(r).forEach(c=>{if(c===".DS_Store")return;const p=`${r}${c}`;n=`/**
|
|
2
|
+
* Generated by scripts/generate-icons.js
|
|
3
|
+
* DO NOT EDIT!
|
|
10
4
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var iconListOutput = '';
|
|
19
|
-
var level1FileName = '';
|
|
20
|
-
// Read root Icon directory
|
|
21
|
-
fs.readdirSync(iconDir).forEach(function (fileName) {
|
|
22
|
-
if (fileName === '.DS_Store')
|
|
23
|
-
return;
|
|
24
|
-
var level1Dir = "".concat(iconDir).concat(fileName);
|
|
25
|
-
iconListOutput = "/**\n * Generated by scripts/generate-icons.js\n * DO NOT EDIT!\n */\n\nimport * as Icons from '../".concat(fileName, "';\n\nexport const ICON_LIST = [\n");
|
|
26
|
-
// Read level1-directory
|
|
27
|
-
fs.readdirSync(level1Dir).forEach(function (_level1FileName) {
|
|
28
|
-
if (_level1FileName === '.DS_Store')
|
|
29
|
-
return;
|
|
30
|
-
level1FileName = _level1FileName;
|
|
31
|
-
iconListOutput += " { icon: Icons.".concat(level1FileName.split('.')[0], ", name: '").concat(level1FileName.split('.')[0], "' },\n");
|
|
32
|
-
});
|
|
33
|
-
iconListOutput += "];\n";
|
|
34
|
-
var categoryName = fileName
|
|
35
|
-
.split('-')
|
|
36
|
-
.map(function (str) { return str[0].toUpperCase() + str.slice(1); })
|
|
37
|
-
.join('');
|
|
38
|
-
var story = (0, react_icon_story_template_1.reactIconStoryTemplate)(categoryName, fileName);
|
|
39
|
-
fs.writeFileSync("".concat(saveDir, "/").concat(fileName, ".ts"), iconListOutput);
|
|
40
|
-
fs.writeFileSync("".concat(saveDir, "/").concat(fileName, ".story.tsx"), story);
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
exports.generateReactIcons = generateReactIcons;
|
|
5
|
+
|
|
6
|
+
import * as Icons from '../${c}';
|
|
7
|
+
|
|
8
|
+
export const ICON_LIST = [
|
|
9
|
+
`,t.readdirSync(p).forEach(e=>{e!==".DS_Store"&&(o=e,n+=` { icon: Icons.${o.split(".")[0]}, name: '${o.split(".")[0]}' },
|
|
10
|
+
`)}),n+=`];
|
|
11
|
+
`;const y=c.split("-").map(e=>e[0].toUpperCase()+e.slice(1)).join(""),S=(0,a.reactIconStoryTemplate)(y,c);t.writeFileSync(`${s}/${c}.ts`,n),t.writeFileSync(`${s}/${c}.story.tsx`,S)})};0&&(module.exports={generateReactIcons});
|